]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
f6366d6f6dea62e78e1f97c29382d45912b5b3bd
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.713 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
764 Fine-Tuning Your Configuration:
765   --with-extra-suffix=X   append extra suffix to header/library paths
766   --disable-overwrite     put headers in subdir, omit link to -lcurses
767   --disable-database      do not use terminfo, only fallbacks/termcap
768   --with-database=XXX     specify terminfo source to install
769   --with-hashed-db        specify hashed-database library
770   --with-fallbacks=XXX    specify list of fallback terminal descriptions
771   --with-tic-path=XXX     specify path of tic for fallbacks
772   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
773   --without-xterm-new     specify if xterm terminfo should be old version
774   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
775   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
776   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
777   --disable-big-core      assume machine has little memory
778   --disable-big-strings   assume compiler has only standard-size strings
779   --enable-termcap        compile in termcap fallback support
780   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
781   --enable-getcap         fast termcap load, no xrefs to terminfo
782   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
783   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
784   --disable-root-environ  restrict environment when running as root
785   --enable-symlinks       make tic use symbolic links not hard links
786   --enable-broken_linker  compile with broken-linker support code
787   --enable-bsdpad         recognize BSD-style prefix padding
788   --enable-widec          compile with wide-char/UTF-8 code
789   --disable-lp64          allow chtype to be long (ignore _LP64)
790   --disable-largefile     omit support for large files
791   --disable-tparm-varargs compile tparm() without varargs interface
792   --disable-tic-depends   link tic library without explicit dependency on ncurses library
793   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
794   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
795   --with-bool=TYPE        override fallback type of bool variable
796   --with-caps=alt         compile with alternate Caps file
797   --with-chtype=TYPE      override type of chtype
798   --with-ospeed=TYPE      override type of ospeed variable
799   --with-mmask-t=TYPE     override type of mmask_t
800   --with-ccharw-max=XXX   override size CCHARW_MAX
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --with-tparm-arg=TYPE   override parameter type of tparm
803   --with-rcs-ids          compile-in RCS identifiers
804 Options to Specify How Manpages are Installed:
805   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
806                           optionally formatted/catonly, e.g., gzip,formatted
807   --with-manpage-renames  specify manpage-renaming
808   --with-manpage-aliases  specify manpage-aliases using .so
809   --with-manpage-symlinks specify manpage-aliases using symlinks
810   --with-manpage-tbl      specify manpage processing with tbl
811 Extensions:
812   --disable-ext-funcs     disable function-extensions
813   --enable-sp-funcs       enable SCREEN-extensions
814   --enable-term-driver    enable terminal-driver
815   --enable-const          compile with extra/non-standard const
816   --enable-ext-colors     compile for 256-color support
817   --enable-ext-mouse      compile for extended mouse-encoding
818   --enable-ext-putwin     compile with extended putwin/screendump
819   --enable-no-padding     compile with $NCURSES_NO_PADDING code
820   --enable-sigwinch       compile with SIGWINCH handler
821   --enable-tcap-names     compile with user-definable terminal capabilities
822 Reentrant Code:
823   --with-pthread          use POSIX thread library
824   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
825   --enable-weak-symbols   enable weak-symbols for pthreads
826   --enable-reentrant      compile with reentrant code
827   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
828   --enable-opaque-form    make form-library structures "opaque"
829   --enable-opaque-menu    make menu-library structures "opaque"
830   --enable-opaque-panel   make panel-library structures "opaque"
831   --with-wrap-prefix=XXX  override prefix used for public variables
832 Development Code:
833   --without-develop       disable development options
834   --enable-hard-tabs      compile with hard-tabs code
835   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
836 Experimental Code:
837   --disable-assumed-color do not assume anything about default-colors
838   --disable-hashmap       compile without hashmap scrolling-optimization
839   --enable-colorfgbg      compile-in experimental $COLORFGBG code
840   --enable-fvisibility    compile with -fvisibility=hidden
841   --enable-interop        compile-in interop bindings
842   --enable-safe-sprintf   compile with experimental safe-sprintf code
843   --disable-scroll-hints  compile without scroll-hints code
844   --enable-wgetch-events  compile with wgetch-events code
845 Testing/development Options:
846   --disable-echo          do not display "compiling" commands
847   --disable-stripping     do not strip (debug info) installed executables
848   --enable-warnings       build: turn on GCC compiler warnings
849   --enable-string-hacks   work around bogus compiler/loader warnings
850   --enable-assertions     test: turn on generation of assertion code
851   --with-dmalloc          test: use Gray Watson's dmalloc library
852   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
853   --with-valgrind         test: use valgrind
854   --disable-leaks         test: free permanent memory, analyze leaks
855   --enable-expanded       test: generate functions for certain macros
856   --disable-macros        test: use functions rather than macros
857   --with-trace            test: add trace() function to all models of ncurses
858   --disable-gnat-projects test: disable GNAT projects even if usable
859 Ada Binding Options:
860   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
861   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
862   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
863   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
864   --with-ada-libname=XXX  override default Ada library-name
865   --with-form-libname=XXX override form basename of library
866   --with-menu-libname=XXX override menu basename of library
867   --with-panel-libname=XXX override panel basename of library
868   --with-cxx-libname=XXX override ncurses++ basename of library
869
870 Some influential environment variables:
871   CC          C compiler command
872   CFLAGS      C compiler flags
873   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
874               nonstandard directory <lib dir>
875   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
876               headers in a nonstandard directory <include dir>
877   CPP         C preprocessor
878   CXX         C++ compiler command
879   CXXFLAGS    C++ compiler flags
880   CXXCPP      C++ preprocessor
881
882 Use these variables to override the choices made by `configure' or to help
883 it to find libraries and programs with nonstandard names/locations.
884
885 EOF
886 fi
887
888 if test "$ac_init_help" = "recursive"; then
889   # If there are subdirs, report their specific --help.
890   ac_popdir=`pwd`
891   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
892     cd $ac_subdir
893     # A "../" for each directory in /$ac_subdir.
894     ac_dots=`echo $ac_subdir |
895              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
896
897     case $srcdir in
898     .) # No --srcdir option.  We are building in place.
899       ac_sub_srcdir=$srcdir ;;
900     [\\/]* | ?:[\\/]* ) # Absolute path.
901       ac_sub_srcdir=$srcdir/$ac_subdir ;;
902     *) # Relative path.
903       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
904     esac
905
906     # Check for guested configure; otherwise get Cygnus style configure.
907     if test -f $ac_sub_srcdir/configure.gnu; then
908       echo
909       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
910     elif test -f $ac_sub_srcdir/configure; then
911       echo
912       $SHELL $ac_sub_srcdir/configure  --help=recursive
913     elif test -f $ac_sub_srcdir/configure.ac ||
914            test -f $ac_sub_srcdir/configure.in; then
915       echo
916       $ac_configure --help
917     else
918       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
919     fi
920     cd $ac_popdir
921   done
922 fi
923
924 test -n "$ac_init_help" && exit 0
925 if $ac_init_version; then
926   cat <<\EOF
927
928 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
929 Free Software Foundation, Inc.
930 This configure script is free software; the Free Software Foundation
931 gives unlimited permission to copy, distribute and modify it.
932 EOF
933   exit 0
934 fi
935 exec 5>config.log
936 cat >&5 <<EOF
937 This file contains any messages produced by compilers while
938 running configure, to aid debugging if configure makes a mistake.
939
940 It was created by $as_me, which was
941 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
942
943   $ $0 $@
944
945 EOF
946 {
947 cat <<_ASUNAME
948 ## ---------- ##
949 ## Platform.  ##
950 ## ---------- ##
951
952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
957
958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
959 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
960
961 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
962 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
964 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
965 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
966 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
967 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
968
969 PATH = $PATH
970
971 _ASUNAME
972 } >&5
973
974 cat >&5 <<EOF
975 ## ------------ ##
976 ## Core tests.  ##
977 ## ------------ ##
978
979 EOF
980
981 # Keep a trace of the command line.
982 # Strip out --no-create and --no-recursion so they do not pile up.
983 # Also quote any args containing shell meta-characters.
984 ac_configure_args=
985 ac_sep=
986 for ac_arg
987 do
988   case $ac_arg in
989   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
990   | --no-cr | --no-c) ;;
991   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
993   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
994     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
995     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
996     ac_sep=" " ;;
997   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
998      ac_sep=" " ;;
999   esac
1000   # Get rid of the leading space.
1001 done
1002
1003 # When interrupted or exit'd, cleanup temporary files, and complete
1004 # config.log.  We remove comments because anyway the quotes in there
1005 # would cause problems or look ugly.
1006 trap 'exit_status=$?
1007   # Save into config.log some information that might help in debugging.
1008   echo >&5
1009   echo "## ----------------- ##" >&5
1010   echo "## Cache variables.  ##" >&5
1011   echo "## ----------------- ##" >&5
1012   echo >&5
1013   # The following way of writing the cache mishandles newlines in values,
1014 {
1015   (set) 2>&1 |
1016     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1017     *ac_space=\ *)
1018       sed -n \
1019         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1020           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1021       ;;
1022     *)
1023       sed -n \
1024         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1025       ;;
1026     esac;
1027 } >&5
1028   sed "/^$/d" confdefs.h >conftest.log
1029   if test -s conftest.log; then
1030     echo >&5
1031     echo "## ------------ ##" >&5
1032     echo "## confdefs.h.  ##" >&5
1033     echo "## ------------ ##" >&5
1034     echo >&5
1035     cat conftest.log >&5
1036   fi
1037   (echo; echo) >&5
1038   test "$ac_signal" != 0 &&
1039     echo "$as_me: caught signal $ac_signal" >&5
1040   echo "$as_me: exit $exit_status" >&5
1041   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1042     exit $exit_status
1043      ' 0
1044 for ac_signal in 1 2 13 15; do
1045   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1046 done
1047 ac_signal=0
1048
1049 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1050 rm -rf conftest* confdefs.h
1051 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1052 echo >confdefs.h
1053
1054 # Let the site file select an alternate cache file if it wants to.
1055 # Prefer explicitly selected file to automatically selected ones.
1056 if test -z "$CONFIG_SITE"; then
1057   if test "x$prefix" != xNONE; then
1058     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1059   else
1060     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1061   fi
1062 fi
1063 for ac_site_file in $CONFIG_SITE; do
1064   if test -r "$ac_site_file"; then
1065     { echo "$as_me:1065: loading site script $ac_site_file" >&5
1066 echo "$as_me: loading site script $ac_site_file" >&6;}
1067     cat "$ac_site_file" >&5
1068     . "$ac_site_file"
1069   fi
1070 done
1071
1072 if test -r "$cache_file"; then
1073   # Some versions of bash will fail to source /dev/null (special
1074   # files actually), so we avoid doing that.
1075   if test -f "$cache_file"; then
1076     { echo "$as_me:1076: loading cache $cache_file" >&5
1077 echo "$as_me: loading cache $cache_file" >&6;}
1078     case $cache_file in
1079       [\\/]* | ?:[\\/]* ) . $cache_file;;
1080       *)                      . ./$cache_file;;
1081     esac
1082   fi
1083 else
1084   { echo "$as_me:1084: creating cache $cache_file" >&5
1085 echo "$as_me: creating cache $cache_file" >&6;}
1086   >$cache_file
1087 fi
1088
1089 # Check that the precious variables saved in the cache have kept the same
1090 # value.
1091 ac_cache_corrupted=false
1092 for ac_var in `(set) 2>&1 |
1093                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1094   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1095   eval ac_new_set=\$ac_env_${ac_var}_set
1096   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1097   eval ac_new_val="\$ac_env_${ac_var}_value"
1098   case $ac_old_set,$ac_new_set in
1099     set,)
1100       { echo "$as_me:1100: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1101 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1102       ac_cache_corrupted=: ;;
1103     ,set)
1104       { echo "$as_me:1104: error: \`$ac_var' was not set in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,);;
1108     *)
1109       if test "x$ac_old_val" != "x$ac_new_val"; then
1110         { echo "$as_me:1110: error: \`$ac_var' has changed since the previous run:" >&5
1111 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1112         { echo "$as_me:1112:   former value:  $ac_old_val" >&5
1113 echo "$as_me:   former value:  $ac_old_val" >&2;}
1114         { echo "$as_me:1114:   current value: $ac_new_val" >&5
1115 echo "$as_me:   current value: $ac_new_val" >&2;}
1116         ac_cache_corrupted=:
1117       fi;;
1118   esac
1119   # Pass precious variables to config.status.  It doesn't matter if
1120   # we pass some twice (in addition to the command line arguments).
1121   if test "$ac_new_set" = set; then
1122     case $ac_new_val in
1123     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1124       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1125       ac_configure_args="$ac_configure_args '$ac_arg'"
1126       ;;
1127     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1128        ;;
1129     esac
1130   fi
1131 done
1132 if $ac_cache_corrupted; then
1133   { echo "$as_me:1133: error: changes in the environment can compromise the build" >&5
1134 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1135   { { echo "$as_me:1135: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1136 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1137    { (exit 1); exit 1; }; }
1138 fi
1139
1140 ac_ext=c
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146
1147 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1148   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1149                    ECHO_T='     ' ;;
1150   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1151   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1152 esac
1153 echo "#! $SHELL" >conftest.sh
1154 echo  "exit 0"   >>conftest.sh
1155 chmod +x conftest.sh
1156 if { (echo "$as_me:1156: PATH=\".;.\"; conftest.sh") >&5
1157   (PATH=".;."; conftest.sh) 2>&5
1158   ac_status=$?
1159   echo "$as_me:1159: \$? = $ac_status" >&5
1160   (exit $ac_status); }; then
1161   ac_path_separator=';'
1162 else
1163   ac_path_separator=:
1164 fi
1165 PATH_SEPARATOR="$ac_path_separator"
1166 rm -f conftest.sh
1167
1168 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1169
1170 top_builddir=`pwd`
1171
1172 echo "$as_me:1172: checking for egrep" >&5
1173 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1174 if test "${ac_cv_prog_egrep+set}" = set; then
1175   echo $ECHO_N "(cached) $ECHO_C" >&6
1176 else
1177   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1178                 then ac_cv_prog_egrep='grep -E'
1179                 else ac_cv_prog_egrep='egrep'
1180         fi
1181 fi
1182 echo "$as_me:1182: result: $ac_cv_prog_egrep" >&5
1183 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1184         EGREP=$ac_cv_prog_egrep
1185
1186         test -z "$EGREP" && { { echo "$as_me:1186: error: No egrep program found" >&5
1187 echo "$as_me: error: No egrep program found" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 cf_cv_abi_version=${NCURSES_MAJOR}
1194 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1195 cf_cv_timestamp=`date`
1196 echo "$as_me:1196: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1197 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1198
1199 if test -f $srcdir/VERSION ; then
1200         echo "$as_me:1200: checking for package version" >&5
1201 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1202
1203         # if there are not enough fields, cut returns the last one...
1204         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1205         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1206         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1207
1208         # this is how CF_BUNDLED_INTL uses $VERSION:
1209         VERSION="$cf_field1"
1210
1211         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1212         test -z "$VERSION_MAJOR" && { { echo "$as_me:1212: error: missing major-version" >&5
1213 echo "$as_me: error: missing major-version" >&2;}
1214    { (exit 1); exit 1; }; }
1215
1216         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1217         test -z "$VERSION_MINOR" && { { echo "$as_me:1217: error: missing minor-version" >&5
1218 echo "$as_me: error: missing minor-version" >&2;}
1219    { (exit 1); exit 1; }; }
1220
1221         echo "$as_me:1221: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1222 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1223
1224         echo "$as_me:1224: checking for package patch date" >&5
1225 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1226         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1227         case .$VERSION_PATCH in
1228         (.)
1229                 { { echo "$as_me:1229: error: missing patch-date $VERSION_PATCH" >&5
1230 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1231    { (exit 1); exit 1; }; }
1232                 ;;
1233         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1234                 ;;
1235         (*)
1236                 { { echo "$as_me:1236: error: illegal patch-date $VERSION_PATCH" >&5
1237 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1238    { (exit 1); exit 1; }; }
1239                 ;;
1240         esac
1241         echo "$as_me:1241: result: $VERSION_PATCH" >&5
1242 echo "${ECHO_T}$VERSION_PATCH" >&6
1243 else
1244         { { echo "$as_me:1244: error: did not find $srcdir/VERSION" >&5
1245 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1246    { (exit 1); exit 1; }; }
1247 fi
1248
1249 # show the actual data that we have for versions:
1250 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1251
1252 echo "${as_me:-configure}:1252: testing ABI VERSION $VERSION ..." 1>&5
1253
1254 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1255
1256 echo "${as_me:-configure}:1256: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1257
1258 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1259
1260 echo "${as_me:-configure}:1260: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1261
1262 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1263
1264 echo "${as_me:-configure}:1264: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1265
1266         cf_PACKAGE=NCURSES
1267         PACKAGE=ncurses
1268
1269 cat >>confdefs.h <<EOF
1270 #define PACKAGE "$PACKAGE"
1271 EOF
1272
1273 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1274
1275         cat >>confdefs.h <<EOF
1276 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1277 EOF
1278
1279         cat >>confdefs.h <<EOF
1280 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1281 EOF
1282
1283 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1284
1285 # Check whether --with-rel-version or --without-rel-version was given.
1286 if test "${with_rel_version+set}" = set; then
1287   withval="$with_rel_version"
1288   { echo "$as_me:1288: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1289 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1290  cf_cv_rel_version=$withval
1291 fi;
1292
1293  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1294  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1295
1296 if test -n "$NCURSES_MAJOR" ; then
1297   case $NCURSES_MAJOR in
1298   ([0-9]*)
1299         ;;
1300   (*)
1301         { { echo "$as_me:1301: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1302 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1303    { (exit 1); exit 1; }; }
1304         ;;
1305   esac
1306 else
1307   { { echo "$as_me:1307: error: Release major-version value is empty" >&5
1308 echo "$as_me: error: Release major-version value is empty" >&2;}
1309    { (exit 1); exit 1; }; }
1310 fi
1311
1312 if test -n "$NCURSES_MINOR" ; then
1313   case $NCURSES_MINOR in
1314   ([0-9]*)
1315         ;;
1316   (*)
1317         { { echo "$as_me:1317: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1318 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1319    { (exit 1); exit 1; }; }
1320         ;;
1321   esac
1322 else
1323   { { echo "$as_me:1323: error: Release minor-version value is empty" >&5
1324 echo "$as_me: error: Release minor-version value is empty" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1329
1330 # Check whether --with-abi-version or --without-abi-version was given.
1331 if test "${with_abi_version+set}" = set; then
1332   withval="$with_abi_version"
1333
1334         if test "x$cf_cv_abi_version" != "x$withval"
1335         then
1336                 { echo "$as_me:1336: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1337 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1338                 case $cf_cv_rel_version in
1339                 (5.*)
1340                         cf_cv_rel_version=$withval.0
1341                         ;;
1342                 (6.*)
1343                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1344                         ;;
1345                 esac
1346         fi
1347         cf_cv_abi_version=$withval
1348 fi;
1349
1350 if test -n "$cf_cv_abi_version" ; then
1351   case $cf_cv_abi_version in
1352   ([0-9]*)
1353         ;;
1354   (*)
1355         { { echo "$as_me:1355: error: ABI version is not a number: $cf_cv_abi_version" >&5
1356 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1357    { (exit 1); exit 1; }; }
1358         ;;
1359   esac
1360 else
1361   { { echo "$as_me:1361: error: ABI version value is empty" >&5
1362 echo "$as_me: error: ABI version value is empty" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1367 then
1368         case $cf_cv_rel_version in
1369         (5.*)
1370                 cf_cv_rel_version=$with_abi_version.0
1371                 ;;
1372         esac
1373 fi
1374
1375 ac_aux_dir=
1376 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1377   if test -f $ac_dir/install-sh; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/install-sh -c"
1380     break
1381   elif test -f $ac_dir/install.sh; then
1382     ac_aux_dir=$ac_dir
1383     ac_install_sh="$ac_aux_dir/install.sh -c"
1384     break
1385   elif test -f $ac_dir/shtool; then
1386     ac_aux_dir=$ac_dir
1387     ac_install_sh="$ac_aux_dir/shtool install -c"
1388     break
1389   fi
1390 done
1391 if test -z "$ac_aux_dir"; then
1392   { { echo "$as_me:1392: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1393 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1394    { (exit 1); exit 1; }; }
1395 fi
1396 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1397 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1398 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:1402: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:1406: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:1415: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 echo "$as_me:1431: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:1440: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:1445: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1453         echo "$as_me:1453: checking target system type" >&5
1454 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1455 if test "${ac_cv_target+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   ac_cv_target_alias=$target_alias
1459 test "x$ac_cv_target_alias" = "x" &&
1460   ac_cv_target_alias=$ac_cv_host_alias
1461 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1462   { { echo "$as_me:1462: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1463 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1464    { (exit 1); exit 1; }; }
1465
1466 fi
1467 echo "$as_me:1467: result: $ac_cv_target" >&5
1468 echo "${ECHO_T}$ac_cv_target" >&6
1469 target=$ac_cv_target
1470 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1471 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1472 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1473
1474 # The aliases save the names the user supplied, while $host etc.
1475 # will get canonicalized.
1476 test -n "$target_alias" &&
1477   test "$program_prefix$program_suffix$program_transform_name" = \
1478     NONENONEs,x,x, &&
1479   program_prefix=${target_alias}-
1480         system_name="$host_os"
1481 else
1482         system_name="`(uname -s -r) 2>/dev/null`"
1483         if test -z "$system_name" ; then
1484                 system_name="`(hostname) 2>/dev/null`"
1485         fi
1486 fi
1487 test -n "$system_name" &&
1488 cat >>confdefs.h <<EOF
1489 #define SYSTEM_NAME "$system_name"
1490 EOF
1491
1492 if test "${cf_cv_system_name+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   cf_cv_system_name="$system_name"
1496 fi
1497
1498 test -z "$system_name" && system_name="$cf_cv_system_name"
1499 test -n "$cf_cv_system_name" && echo "$as_me:1499: result: Configuring for $cf_cv_system_name" >&5
1500 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1501
1502 if test ".$system_name" != ".$cf_cv_system_name" ; then
1503         echo "$as_me:1503: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1504 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1505         { { echo "$as_me:1505: error: \"Please remove config.cache and try again.\"" >&5
1506 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1507    { (exit 1); exit 1; }; }
1508 fi
1509
1510 # Check whether --with-system-type or --without-system-type was given.
1511 if test "${with_system_type+set}" = set; then
1512   withval="$with_system_type"
1513   { echo "$as_me:1513: WARNING: overriding system type to $withval" >&5
1514 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1515         cf_cv_system_name=$withval
1516         host_os=$withval
1517
1518 fi;
1519
1520 ###     Save the given $CFLAGS to allow user-override.
1521 cf_user_CFLAGS="$CFLAGS"
1522
1523 ###     Default install-location
1524
1525 echo "$as_me:1525: checking for prefix" >&5
1526 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1527 if test "x$prefix" = "xNONE" ; then
1528         case "$cf_cv_system_name" in
1529                 # non-vendor systems don't have a conflict
1530         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1531                 prefix=/usr
1532                 ;;
1533         (*)     prefix=$ac_default_prefix
1534                 ;;
1535         esac
1536 fi
1537 echo "$as_me:1537: result: $prefix" >&5
1538 echo "${ECHO_T}$prefix" >&6
1539
1540 if test "x$prefix" = "xNONE" ; then
1541 echo "$as_me:1541: checking for default include-directory" >&5
1542 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1543 test -n "$verbose" && echo 1>&6
1544 for cf_symbol in \
1545         $includedir \
1546         $includedir/ncurses \
1547         $prefix/include \
1548         $prefix/include/ncurses \
1549         /usr/local/include \
1550         /usr/local/include/ncurses \
1551         /usr/include \
1552         /usr/include/ncurses
1553 do
1554         cf_dir=`eval echo $cf_symbol`
1555         if test -f $cf_dir/curses.h ; then
1556         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1557                 includedir="$cf_symbol"
1558                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1559                 break
1560         fi
1561         fi
1562         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1563 done
1564 echo "$as_me:1564: result: $includedir" >&5
1565 echo "${ECHO_T}$includedir" >&6
1566 fi
1567
1568 ### Defaults for ncurses ABI
1569
1570 case x$cf_cv_abi_version in
1571 (x[6789])
1572         cf_dft_ext_colors=yes
1573         cf_dft_ext_const=yes
1574         cf_dft_ext_mouse=yes
1575         cf_dft_ext_putwin=yes
1576         cf_dft_ext_spfuncs=yes
1577         cf_dft_filter_syms=yes
1578         cf_dft_chtype=uint32_t
1579         cf_dft_mmask_t=uint32_t
1580         cf_dft_interop=yes
1581         cf_dft_tparm_arg=intptr_t
1582         cf_dft_with_lp64=yes
1583         ;;
1584 (*)
1585         cf_dft_ext_colors=no
1586         cf_dft_ext_const=no
1587         cf_dft_ext_mouse=no
1588         cf_dft_ext_putwin=no
1589         cf_dft_ext_spfuncs=no
1590         cf_dft_filter_syms=no
1591         cf_dft_chtype=auto
1592         cf_dft_mmask_t=auto
1593         cf_dft_interop=no
1594         cf_dft_tparm_arg=long
1595         cf_dft_with_lp64=no
1596         ;;
1597 esac
1598
1599 ###     Checks for programs.
1600
1601 # Check whether --with-ada or --without-ada was given.
1602 if test "${with_ada+set}" = set; then
1603   withval="$with_ada"
1604   cf_with_ada=$withval
1605 else
1606   cf_with_ada=yes
1607 fi;
1608
1609 if test "x$cf_with_ada" = xyes
1610 then
1611         cf_prog_cc="gnatgcc gcc cc"
1612 else
1613         cf_prog_cc="gcc cc"
1614 fi
1615
1616 ac_ext=c
1617 ac_cpp='$CPP $CPPFLAGS'
1618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1621 ac_main_return=return
1622 if test -n "$ac_tool_prefix"; then
1623   for ac_prog in $cf_prog_cc
1624   do
1625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1627 echo "$as_me:1627: checking for $ac_word" >&5
1628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629 if test "${ac_cv_prog_CC+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   ac_save_IFS=$IFS; IFS=$ac_path_separator
1636 ac_dummy="$PATH"
1637 for ac_dir in $ac_dummy; do
1638   IFS=$ac_save_IFS
1639   test -z "$ac_dir" && ac_dir=.
1640   $as_executable_p "$ac_dir/$ac_word" || continue
1641 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1642 echo "$as_me:1642: found $ac_dir/$ac_word" >&5
1643 break
1644 done
1645
1646 fi
1647 fi
1648 CC=$ac_cv_prog_CC
1649 if test -n "$CC"; then
1650   echo "$as_me:1650: result: $CC" >&5
1651 echo "${ECHO_T}$CC" >&6
1652 else
1653   echo "$as_me:1653: result: no" >&5
1654 echo "${ECHO_T}no" >&6
1655 fi
1656
1657     test -n "$CC" && break
1658   done
1659 fi
1660 if test -z "$CC"; then
1661   ac_ct_CC=$CC
1662   for ac_prog in $cf_prog_cc
1663 do
1664   # Extract the first word of "$ac_prog", so it can be a program name with args.
1665 set dummy $ac_prog; ac_word=$2
1666 echo "$as_me:1666: checking for $ac_word" >&5
1667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   if test -n "$ac_ct_CC"; then
1672   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673 else
1674   ac_save_IFS=$IFS; IFS=$ac_path_separator
1675 ac_dummy="$PATH"
1676 for ac_dir in $ac_dummy; do
1677   IFS=$ac_save_IFS
1678   test -z "$ac_dir" && ac_dir=.
1679   $as_executable_p "$ac_dir/$ac_word" || continue
1680 ac_cv_prog_ac_ct_CC="$ac_prog"
1681 echo "$as_me:1681: found $ac_dir/$ac_word" >&5
1682 break
1683 done
1684
1685 fi
1686 fi
1687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1688 if test -n "$ac_ct_CC"; then
1689   echo "$as_me:1689: result: $ac_ct_CC" >&5
1690 echo "${ECHO_T}$ac_ct_CC" >&6
1691 else
1692   echo "$as_me:1692: result: no" >&5
1693 echo "${ECHO_T}no" >&6
1694 fi
1695
1696   test -n "$ac_ct_CC" && break
1697 done
1698
1699   CC=$ac_ct_CC
1700 fi
1701
1702 test -z "$CC" && { { echo "$as_me:1702: error: no acceptable cc found in \$PATH" >&5
1703 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1704    { (exit 1); exit 1; }; }
1705
1706 # Provide some information about the compiler.
1707 echo "$as_me:1707:" \
1708      "checking for C compiler version" >&5
1709 ac_compiler=`set X $ac_compile; echo $2`
1710 { (eval echo "$as_me:1710: \"$ac_compiler --version </dev/null >&5\"") >&5
1711   (eval $ac_compiler --version </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -v </dev/null >&5\"") >&5
1716   (eval $ac_compiler -v </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720 { (eval echo "$as_me:1720: \"$ac_compiler -V </dev/null >&5\"") >&5
1721   (eval $ac_compiler -V </dev/null >&5) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }
1725
1726 cat >conftest.$ac_ext <<_ACEOF
1727 #line 1727 "configure"
1728 #include "confdefs.h"
1729
1730 int
1731 main (void)
1732 {
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 ac_clean_files_save=$ac_clean_files
1739 ac_clean_files="$ac_clean_files a.out a.exe"
1740 # Try to create an executable without -o first, disregard a.out.
1741 # It will help us diagnose broken compilers, and finding out an intuition
1742 # of exeext.
1743 echo "$as_me:1743: checking for C compiler default output" >&5
1744 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1745 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1746 if { (eval echo "$as_me:1746: \"$ac_link_default\"") >&5
1747   (eval $ac_link_default) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; then
1751   # Find the output, starting from the most likely.  This scheme is
1752 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1753 # resort.
1754 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1755                 ls a.out conftest 2>/dev/null;
1756                 ls a.* conftest.* 2>/dev/null`; do
1757   case $ac_file in
1758     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1759     a.out ) # We found the default executable, but exeext='' is most
1760             # certainly right.
1761             break;;
1762     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1763           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1764           export ac_cv_exeext
1765           break;;
1766     * ) break;;
1767   esac
1768 done
1769 else
1770   echo "$as_me: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1772 { { echo "$as_me:1772: error: C compiler cannot create executables" >&5
1773 echo "$as_me: error: C compiler cannot create executables" >&2;}
1774    { (exit 77); exit 77; }; }
1775 fi
1776
1777 ac_exeext=$ac_cv_exeext
1778 echo "$as_me:1778: result: $ac_file" >&5
1779 echo "${ECHO_T}$ac_file" >&6
1780
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether the C compiler works" >&5
1784 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1785 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1786 # If not cross compiling, check that we can run a simple program.
1787 if test "$cross_compiling" != yes; then
1788   if { ac_try='./$ac_file'
1789   { (eval echo "$as_me:1789: \"$ac_try\"") >&5
1790   (eval $ac_try) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; }; then
1794     cross_compiling=no
1795   else
1796     if test "$cross_compiling" = maybe; then
1797         cross_compiling=yes
1798     else
1799         { { echo "$as_me:1799: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&5
1801 echo "$as_me: error: cannot run C compiled programs.
1802 If you meant to cross compile, use \`--host'." >&2;}
1803    { (exit 1); exit 1; }; }
1804     fi
1805   fi
1806 fi
1807 echo "$as_me:1807: result: yes" >&5
1808 echo "${ECHO_T}yes" >&6
1809
1810 rm -f a.out a.exe conftest$ac_cv_exeext
1811 ac_clean_files=$ac_clean_files_save
1812 # Check the compiler produces executables we can run.  If not, either
1813 # the compiler is broken, or we cross compile.
1814 echo "$as_me:1814: checking whether we are cross compiling" >&5
1815 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1816 echo "$as_me:1816: result: $cross_compiling" >&5
1817 echo "${ECHO_T}$cross_compiling" >&6
1818
1819 echo "$as_me:1819: checking for executable suffix" >&5
1820 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1821 if { (eval echo "$as_me:1821: \"$ac_link\"") >&5
1822   (eval $ac_link) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit $ac_status); }; then
1826   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1827 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1828 # work properly (i.e., refer to `conftest.exe'), while it won't with
1829 # `rm'.
1830 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1831   case $ac_file in
1832     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1833     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1834           export ac_cv_exeext
1835           break;;
1836     * ) break;;
1837   esac
1838 done
1839 else
1840   { { echo "$as_me:1840: error: cannot compute EXEEXT: cannot compile and link" >&5
1841 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1842    { (exit 1); exit 1; }; }
1843 fi
1844
1845 rm -f conftest$ac_cv_exeext
1846 echo "$as_me:1846: result: $ac_cv_exeext" >&5
1847 echo "${ECHO_T}$ac_cv_exeext" >&6
1848
1849 rm -f conftest.$ac_ext
1850 EXEEXT=$ac_cv_exeext
1851 ac_exeext=$EXEEXT
1852 echo "$as_me:1852: checking for object suffix" >&5
1853 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1854 if test "${ac_cv_objext+set}" = set; then
1855   echo $ECHO_N "(cached) $ECHO_C" >&6
1856 else
1857   cat >conftest.$ac_ext <<_ACEOF
1858 #line 1858 "configure"
1859 #include "confdefs.h"
1860
1861 int
1862 main (void)
1863 {
1864
1865   ;
1866   return 0;
1867 }
1868 _ACEOF
1869 rm -f conftest.o conftest.obj
1870 if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
1871   (eval $ac_compile) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; then
1875   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1876   case $ac_file in
1877     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1878     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1879        break;;
1880   esac
1881 done
1882 else
1883   echo "$as_me: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 { { echo "$as_me:1885: error: cannot compute OBJEXT: cannot compile" >&5
1886 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1887    { (exit 1); exit 1; }; }
1888 fi
1889
1890 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1891 fi
1892 echo "$as_me:1892: result: $ac_cv_objext" >&5
1893 echo "${ECHO_T}$ac_cv_objext" >&6
1894 OBJEXT=$ac_cv_objext
1895 ac_objext=$OBJEXT
1896 echo "$as_me:1896: checking whether we are using the GNU C compiler" >&5
1897 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1898 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   cat >conftest.$ac_ext <<_ACEOF
1902 #line 1902 "configure"
1903 #include "confdefs.h"
1904
1905 int
1906 main (void)
1907 {
1908 #ifndef __GNUC__
1909        choke me
1910 #endif
1911
1912   ;
1913   return 0;
1914 }
1915 _ACEOF
1916 rm -f conftest.$ac_objext
1917 if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918   (eval $ac_compile) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); } &&
1922          { ac_try='test -s conftest.$ac_objext'
1923   { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924   (eval $ac_try) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); }; }; then
1928   ac_compiler_gnu=yes
1929 else
1930   echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1932 ac_compiler_gnu=no
1933 fi
1934 rm -f conftest.$ac_objext conftest.$ac_ext
1935 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1936
1937 fi
1938 echo "$as_me:1938: result: $ac_cv_c_compiler_gnu" >&5
1939 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1940 GCC=`test $ac_compiler_gnu = yes && echo yes`
1941 ac_test_CFLAGS=${CFLAGS+set}
1942 ac_save_CFLAGS=$CFLAGS
1943 CFLAGS="-g"
1944 echo "$as_me:1944: checking whether $CC accepts -g" >&5
1945 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_g+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952
1953 int
1954 main (void)
1955 {
1956
1957   ;
1958   return 0;
1959 }
1960 _ACEOF
1961 rm -f conftest.$ac_objext
1962 if { (eval echo "$as_me:1962: \"$ac_compile\"") >&5
1963   (eval $ac_compile) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); } &&
1967          { ac_try='test -s conftest.$ac_objext'
1968   { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969   (eval $ac_try) 2>&5
1970   ac_status=$?
1971   echo "$as_me:1971: \$? = $ac_status" >&5
1972   (exit $ac_status); }; }; then
1973   ac_cv_prog_cc_g=yes
1974 else
1975   echo "$as_me: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 ac_cv_prog_cc_g=no
1978 fi
1979 rm -f conftest.$ac_objext conftest.$ac_ext
1980 fi
1981 echo "$as_me:1981: result: $ac_cv_prog_cc_g" >&5
1982 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1983 if test "$ac_test_CFLAGS" = set; then
1984   CFLAGS=$ac_save_CFLAGS
1985 elif test $ac_cv_prog_cc_g = yes; then
1986   if test "$GCC" = yes; then
1987     CFLAGS="-g -O2"
1988   else
1989     CFLAGS="-g"
1990   fi
1991 else
1992   if test "$GCC" = yes; then
1993     CFLAGS="-O2"
1994   else
1995     CFLAGS=
1996   fi
1997 fi
1998 # Some people use a C++ compiler to compile C.  Since we use `exit',
1999 # in C++ we need to declare it.  In case someone uses the same compiler
2000 # for both compiling C and C++ we need to have the C++ compiler decide
2001 # the declaration of exit, since it's the most demanding environment.
2002 cat >conftest.$ac_ext <<_ACEOF
2003 #ifndef __cplusplus
2004   choke me
2005 #endif
2006 _ACEOF
2007 rm -f conftest.$ac_objext
2008 if { (eval echo "$as_me:2008: \"$ac_compile\"") >&5
2009   (eval $ac_compile) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); } &&
2013          { ac_try='test -s conftest.$ac_objext'
2014   { (eval echo "$as_me:2014: \"$ac_try\"") >&5
2015   (eval $ac_try) 2>&5
2016   ac_status=$?
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); }; }; then
2019   for ac_declaration in \
2020    ''\
2021    '#include <stdlib.h>' \
2022    'extern "C" void std::exit (int) throw (); using std::exit;' \
2023    'extern "C" void std::exit (int); using std::exit;' \
2024    'extern "C" void exit (int) throw ();' \
2025    'extern "C" void exit (int);' \
2026    'void exit (int);'
2027 do
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 #include <stdlib.h>
2032 $ac_declaration
2033 int
2034 main (void)
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   :
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 continue
2058 fi
2059 rm -f conftest.$ac_objext conftest.$ac_ext
2060   cat >conftest.$ac_ext <<_ACEOF
2061 #line 2061 "configure"
2062 #include "confdefs.h"
2063 $ac_declaration
2064 int
2065 main (void)
2066 {
2067 exit (42);
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 rm -f conftest.$ac_objext
2073 if { (eval echo "$as_me:2073: \"$ac_compile\"") >&5
2074   (eval $ac_compile) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); } &&
2078          { ac_try='test -s conftest.$ac_objext'
2079   { (eval echo "$as_me:2079: \"$ac_try\"") >&5
2080   (eval $ac_try) 2>&5
2081   ac_status=$?
2082   echo "$as_me:2082: \$? = $ac_status" >&5
2083   (exit $ac_status); }; }; then
2084   break
2085 else
2086   echo "$as_me: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 fi
2089 rm -f conftest.$ac_objext conftest.$ac_ext
2090 done
2091 rm -rf conftest*
2092 if test -n "$ac_declaration"; then
2093   echo '#ifdef __cplusplus' >>confdefs.h
2094   echo $ac_declaration      >>confdefs.h
2095   echo '#endif'             >>confdefs.h
2096 fi
2097
2098 else
2099   echo "$as_me: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 fi
2102 rm -f conftest.$ac_objext conftest.$ac_ext
2103 ac_ext=c
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109
2110 GCC_VERSION=none
2111 if test "$GCC" = yes ; then
2112         echo "$as_me:2112: checking version of $CC" >&5
2113 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2114         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.].*//'`"
2115         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2116         echo "$as_me:2116: result: $GCC_VERSION" >&5
2117 echo "${ECHO_T}$GCC_VERSION" >&6
2118 fi
2119
2120 INTEL_COMPILER=no
2121
2122 if test "$GCC" = yes ; then
2123         case $host_os in
2124         (linux*|gnu*)
2125                 echo "$as_me:2125: checking if this is really Intel C compiler" >&5
2126 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2127                 cf_save_CFLAGS="$CFLAGS"
2128                 CFLAGS="$CFLAGS -no-gcc"
2129                 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2132
2133 int
2134 main (void)
2135 {
2136
2137 #ifdef __INTEL_COMPILER
2138 #else
2139 make an error
2140 #endif
2141
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 rm -f conftest.$ac_objext
2147 if { (eval echo "$as_me:2147: \"$ac_compile\"") >&5
2148   (eval $ac_compile) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152          { ac_try='test -s conftest.$ac_objext'
2153   { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); }; }; then
2158   INTEL_COMPILER=yes
2159 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2160
2161 else
2162   echo "$as_me: failed program was:" >&5
2163 cat conftest.$ac_ext >&5
2164 fi
2165 rm -f conftest.$ac_objext conftest.$ac_ext
2166                 CFLAGS="$cf_save_CFLAGS"
2167                 echo "$as_me:2167: result: $INTEL_COMPILER" >&5
2168 echo "${ECHO_T}$INTEL_COMPILER" >&6
2169                 ;;
2170         esac
2171 fi
2172
2173 CLANG_COMPILER=no
2174
2175 if test "$GCC" = yes ; then
2176         echo "$as_me:2176: checking if this is really Clang C compiler" >&5
2177 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2178         cf_save_CFLAGS="$CFLAGS"
2179         CFLAGS="$CFLAGS -Qunused-arguments"
2180         cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183
2184 int
2185 main (void)
2186 {
2187
2188 #ifdef __clang__
2189 #else
2190 make an error
2191 #endif
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 rm -f conftest.$ac_objext
2198 if { (eval echo "$as_me:2198: \"$ac_compile\"") >&5
2199   (eval $ac_compile) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); } &&
2203          { ac_try='test -s conftest.$ac_objext'
2204   { (eval echo "$as_me:2204: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); }; }; then
2209   CLANG_COMPILER=yes
2210 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2211
2212 else
2213   echo "$as_me: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 fi
2216 rm -f conftest.$ac_objext conftest.$ac_ext
2217         CFLAGS="$cf_save_CFLAGS"
2218         echo "$as_me:2218: result: $CLANG_COMPILER" >&5
2219 echo "${ECHO_T}$CLANG_COMPILER" >&6
2220 fi
2221
2222 echo "$as_me:2222: checking for $CC option to accept ANSI C" >&5
2223 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2224 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2225   echo $ECHO_N "(cached) $ECHO_C" >&6
2226 else
2227   ac_cv_prog_cc_stdc=no
2228 ac_save_CC=$CC
2229 cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <stdarg.h>
2233 #include <stdio.h>
2234 #include <sys/types.h>
2235 #include <sys/stat.h>
2236 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2237 struct buf { int x; };
2238 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2239 static char *e (p, i)
2240      char **p;
2241      int i;
2242 {
2243   return p[i];
2244 }
2245 static char *f (char * (*g) (char **, int), char **p, ...)
2246 {
2247   char *s;
2248   va_list v;
2249   va_start (v,p);
2250   s = g (p, va_arg (v,int));
2251   va_end (v);
2252   return s;
2253 }
2254 int test (int i, double x);
2255 struct s1 {int (*f) (int a);};
2256 struct s2 {int (*f) (double a);};
2257 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2258 int argc;
2259 char **argv;
2260 int
2261 main (void)
2262 {
2263 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 # Don't try gcc -ansi; that turns off useful extensions and
2269 # breaks some systems' header files.
2270 # AIX                   -qlanglvl=ansi
2271 # Ultrix and OSF/1      -std1
2272 # HP-UX 10.20 and later -Ae
2273 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2274 # SVR4                  -Xc -D__EXTENSIONS__
2275 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2276 do
2277   CC="$ac_save_CC $ac_arg"
2278   rm -f conftest.$ac_objext
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); } &&
2284          { ac_try='test -s conftest.$ac_objext'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit $ac_status); }; }; then
2290   ac_cv_prog_cc_stdc=$ac_arg
2291 break
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext
2297 done
2298 rm -f conftest.$ac_ext conftest.$ac_objext
2299 CC=$ac_save_CC
2300
2301 fi
2302
2303 case "x$ac_cv_prog_cc_stdc" in
2304   x|xno)
2305     echo "$as_me:2305: result: none needed" >&5
2306 echo "${ECHO_T}none needed" >&6 ;;
2307   *)
2308     echo "$as_me:2308: result: $ac_cv_prog_cc_stdc" >&5
2309 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2310     CC="$CC $ac_cv_prog_cc_stdc" ;;
2311 esac
2312
2313 # This should have been defined by AC_PROG_CC
2314 : ${CC:=cc}
2315
2316 echo "$as_me:2316: checking \$CFLAGS variable" >&5
2317 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2318 case "x$CFLAGS" in
2319 (*-[IUD]*)
2320         echo "$as_me:2320: result: broken" >&5
2321 echo "${ECHO_T}broken" >&6
2322         { echo "$as_me:2322: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2323 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2324         cf_flags="$CFLAGS"
2325         CFLAGS=
2326         for cf_arg in $cf_flags
2327         do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 (no)
2338         case $cf_add_cflags in
2339         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2340                 case $cf_add_cflags in
2341                 (-D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         elif test "${cf_tst_cflags}" = "\"'" ; then
2355
2356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2358
2359                                 continue
2360                         fi
2361                         ;;
2362                 esac
2363                 case "$CPPFLAGS" in
2364                 (*$cf_add_cflags)
2365                         ;;
2366                 (*)
2367                         case $cf_add_cflags in
2368                         (-D*)
2369                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2370
2371 CPPFLAGS=`echo "$CPPFLAGS" | \
2372         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2373                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2374
2375                                 ;;
2376                         esac
2377
2378         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2379         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2380
2381                         ;;
2382                 esac
2383                 ;;
2384         (*)
2385
2386         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2387         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2388
2389                 ;;
2390         esac
2391         ;;
2392 (yes)
2393
2394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2398
2399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                 && test -z "${cf_tst_cflags}" \
2401                 && cf_fix_cppflags=no
2402         ;;
2403 esac
2404 done
2405
2406 if test -n "$cf_new_cflags" ; then
2407
2408         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2409         CFLAGS="${CFLAGS}$cf_new_cflags"
2410
2411 fi
2412
2413 if test -n "$cf_new_cppflags" ; then
2414
2415         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2416         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2417
2418 fi
2419
2420 if test -n "$cf_new_extra_cppflags" ; then
2421
2422         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2423         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2424
2425 fi
2426
2427         done
2428         ;;
2429 (*)
2430         echo "$as_me:2430: result: ok" >&5
2431 echo "${ECHO_T}ok" >&6
2432         ;;
2433 esac
2434
2435 echo "$as_me:2435: checking \$CC variable" >&5
2436 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2437 case "$CC" in
2438 (*[\ \  ]-*)
2439         echo "$as_me:2439: result: broken" >&5
2440 echo "${ECHO_T}broken" >&6
2441         { echo "$as_me:2441: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2442 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2443         # humor him...
2444         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2445         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2446         CC="$cf_prog"
2447         for cf_arg in $cf_flags
2448         do
2449                 case "x$cf_arg" in
2450                 (x-[IUDfgOW]*)
2451
2452 cf_fix_cppflags=no
2453 cf_new_cflags=
2454 cf_new_cppflags=
2455 cf_new_extra_cppflags=
2456
2457 for cf_add_cflags in $cf_arg
2458 do
2459 case $cf_fix_cppflags in
2460 (no)
2461         case $cf_add_cflags in
2462         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2463                 case $cf_add_cflags in
2464                 (-D*)
2465                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2466
2467                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2468                                 && test -z "${cf_tst_cflags}" \
2469                                 && cf_fix_cppflags=yes
2470
2471                         if test $cf_fix_cppflags = yes ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         elif test "${cf_tst_cflags}" = "\"'" ; then
2478
2479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2481
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 (*$cf_add_cflags)
2488                         ;;
2489                 (*)
2490                         case $cf_add_cflags in
2491                         (-D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500
2501         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2502         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2503
2504                         ;;
2505                 esac
2506                 ;;
2507         (*)
2508
2509         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2510         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2511
2512                 ;;
2513         esac
2514         ;;
2515 (yes)
2516
2517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2519
2520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2521
2522         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2523                 && test -z "${cf_tst_cflags}" \
2524                 && cf_fix_cppflags=no
2525         ;;
2526 esac
2527 done
2528
2529 if test -n "$cf_new_cflags" ; then
2530
2531         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2532         CFLAGS="${CFLAGS}$cf_new_cflags"
2533
2534 fi
2535
2536 if test -n "$cf_new_cppflags" ; then
2537
2538         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2539         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2540
2541 fi
2542
2543 if test -n "$cf_new_extra_cppflags" ; then
2544
2545         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2546         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2547
2548 fi
2549
2550                         ;;
2551                 (*)
2552                         CC="$CC $cf_arg"
2553                         ;;
2554                 esac
2555         done
2556         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2557
2558 echo "${as_me:-configure}:2558: testing resulting CC: '$CC' ..." 1>&5
2559
2560         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2561
2562 echo "${as_me:-configure}:2562: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2563
2564         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2565
2566 echo "${as_me:-configure}:2566: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2567
2568         ;;
2569 (*)
2570         echo "$as_me:2570: result: ok" >&5
2571 echo "${ECHO_T}ok" >&6
2572         ;;
2573 esac
2574
2575 ac_ext=c
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580 ac_main_return=return
2581 echo "$as_me:2581: checking how to run the C preprocessor" >&5
2582 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2583 # On Suns, sometimes $CPP names a directory.
2584 if test -n "$CPP" && test -d "$CPP"; then
2585   CPP=
2586 fi
2587 if test -z "$CPP"; then
2588   if test "${ac_cv_prog_CPP+set}" = set; then
2589   echo $ECHO_N "(cached) $ECHO_C" >&6
2590 else
2591       # Double quotes because CPP needs to be expanded
2592     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2593     do
2594       ac_preproc_ok=false
2595 for ac_c_preproc_warn_flag in '' yes
2596 do
2597   # Use a header file that comes with gcc, so configuring glibc
2598   # with a fresh cross-compiler works.
2599   # On the NeXT, cc -E runs the code through the compiler's parser,
2600   # not just through cpp. "Syntax error" is here to catch this case.
2601   cat >conftest.$ac_ext <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <assert.h>
2605                      Syntax error
2606 _ACEOF
2607 if { (eval echo "$as_me:2607: \"$ac_cpp conftest.$ac_ext\"") >&5
2608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2609   ac_status=$?
2610   egrep -v '^ *\+' conftest.er1 >conftest.err
2611   rm -f conftest.er1
2612   cat conftest.err >&5
2613   echo "$as_me:2613: \$? = $ac_status" >&5
2614   (exit $ac_status); } >/dev/null; then
2615   if test -s conftest.err; then
2616     ac_cpp_err=$ac_c_preproc_warn_flag
2617   else
2618     ac_cpp_err=
2619   fi
2620 else
2621   ac_cpp_err=yes
2622 fi
2623 if test -z "$ac_cpp_err"; then
2624   :
2625 else
2626   echo "$as_me: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   # Broken: fails on valid input.
2629 continue
2630 fi
2631 rm -f conftest.err conftest.$ac_ext
2632
2633   # OK, works on sane cases.  Now check whether non-existent headers
2634   # can be detected and how.
2635   cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2638 #include <ac_nonexistent.h>
2639 _ACEOF
2640 if { (eval echo "$as_me:2640: \"$ac_cpp conftest.$ac_ext\"") >&5
2641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642   ac_status=$?
2643   egrep -v '^ *\+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:2646: \$? = $ac_status" >&5
2647   (exit $ac_status); } >/dev/null; then
2648   if test -s conftest.err; then
2649     ac_cpp_err=$ac_c_preproc_warn_flag
2650   else
2651     ac_cpp_err=
2652   fi
2653 else
2654   ac_cpp_err=yes
2655 fi
2656 if test -z "$ac_cpp_err"; then
2657   # Broken: success on invalid input.
2658 continue
2659 else
2660   echo "$as_me: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   # Passes both tests.
2663 ac_preproc_ok=:
2664 break
2665 fi
2666 rm -f conftest.err conftest.$ac_ext
2667
2668 done
2669 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2670 rm -f conftest.err conftest.$ac_ext
2671 if $ac_preproc_ok; then
2672   break
2673 fi
2674
2675     done
2676     ac_cv_prog_CPP=$CPP
2677
2678 fi
2679   CPP=$ac_cv_prog_CPP
2680 else
2681   ac_cv_prog_CPP=$CPP
2682 fi
2683 echo "$as_me:2683: result: $CPP" >&5
2684 echo "${ECHO_T}$CPP" >&6
2685 ac_preproc_ok=false
2686 for ac_c_preproc_warn_flag in '' yes
2687 do
2688   # Use a header file that comes with gcc, so configuring glibc
2689   # with a fresh cross-compiler works.
2690   # On the NeXT, cc -E runs the code through the compiler's parser,
2691   # not just through cpp. "Syntax error" is here to catch this case.
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line 2693 "configure"
2694 #include "confdefs.h"
2695 #include <assert.h>
2696                      Syntax error
2697 _ACEOF
2698 if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
2699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2700   ac_status=$?
2701   egrep -v '^ *\+' conftest.er1 >conftest.err
2702   rm -f conftest.er1
2703   cat conftest.err >&5
2704   echo "$as_me:2704: \$? = $ac_status" >&5
2705   (exit $ac_status); } >/dev/null; then
2706   if test -s conftest.err; then
2707     ac_cpp_err=$ac_c_preproc_warn_flag
2708   else
2709     ac_cpp_err=
2710   fi
2711 else
2712   ac_cpp_err=yes
2713 fi
2714 if test -z "$ac_cpp_err"; then
2715   :
2716 else
2717   echo "$as_me: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   # Broken: fails on valid input.
2720 continue
2721 fi
2722 rm -f conftest.err conftest.$ac_ext
2723
2724   # OK, works on sane cases.  Now check whether non-existent headers
2725   # can be detected and how.
2726   cat >conftest.$ac_ext <<_ACEOF
2727 #line 2727 "configure"
2728 #include "confdefs.h"
2729 #include <ac_nonexistent.h>
2730 _ACEOF
2731 if { (eval echo "$as_me:2731: \"$ac_cpp conftest.$ac_ext\"") >&5
2732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2733   ac_status=$?
2734   egrep -v '^ *\+' conftest.er1 >conftest.err
2735   rm -f conftest.er1
2736   cat conftest.err >&5
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); } >/dev/null; then
2739   if test -s conftest.err; then
2740     ac_cpp_err=$ac_c_preproc_warn_flag
2741   else
2742     ac_cpp_err=
2743   fi
2744 else
2745   ac_cpp_err=yes
2746 fi
2747 if test -z "$ac_cpp_err"; then
2748   # Broken: success on invalid input.
2749 continue
2750 else
2751   echo "$as_me: failed program was:" >&5
2752   cat conftest.$ac_ext >&5
2753   # Passes both tests.
2754 ac_preproc_ok=:
2755 break
2756 fi
2757 rm -f conftest.err conftest.$ac_ext
2758
2759 done
2760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2761 rm -f conftest.err conftest.$ac_ext
2762 if $ac_preproc_ok; then
2763   :
2764 else
2765   { { echo "$as_me:2765: error: C preprocessor \"$CPP\" fails sanity check" >&5
2766 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2767    { (exit 1); exit 1; }; }
2768 fi
2769
2770 ac_ext=c
2771 ac_cpp='$CPP $CPPFLAGS'
2772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 ac_main_return=return
2776
2777 if test $ac_cv_c_compiler_gnu = yes; then
2778     echo "$as_me:2778: checking whether $CC needs -traditional" >&5
2779 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2780 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783     ac_pattern="Autoconf.*'x'"
2784   cat >conftest.$ac_ext <<_ACEOF
2785 #line 2785 "configure"
2786 #include "confdefs.h"
2787 #include <sgtty.h>
2788 int Autoconf = TIOCGETP;
2789 _ACEOF
2790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2791   egrep "$ac_pattern" >/dev/null 2>&1; then
2792   ac_cv_prog_gcc_traditional=yes
2793 else
2794   ac_cv_prog_gcc_traditional=no
2795 fi
2796 rm -rf conftest*
2797
2798   if test $ac_cv_prog_gcc_traditional = no; then
2799     cat >conftest.$ac_ext <<_ACEOF
2800 #line 2800 "configure"
2801 #include "confdefs.h"
2802 #include <termio.h>
2803 int Autoconf = TCGETA;
2804 _ACEOF
2805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2806   egrep "$ac_pattern" >/dev/null 2>&1; then
2807   ac_cv_prog_gcc_traditional=yes
2808 fi
2809 rm -rf conftest*
2810
2811   fi
2812 fi
2813 echo "$as_me:2813: result: $ac_cv_prog_gcc_traditional" >&5
2814 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2815   if test $ac_cv_prog_gcc_traditional = yes; then
2816     CC="$CC -traditional"
2817   fi
2818 fi
2819
2820 echo "$as_me:2820: checking whether $CC understands -c and -o together" >&5
2821 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2822 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2823   echo $ECHO_N "(cached) $ECHO_C" >&6
2824 else
2825
2826 cat > conftest.$ac_ext <<CF_EOF
2827 int main(void)
2828 {
2829         ${cf_cv_main_return:-return}(0);
2830 }
2831 CF_EOF
2832 # We do the test twice because some compilers refuse to overwrite an
2833 # existing .o file with -o, though they will create one.
2834 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2835 if { (eval echo "$as_me:2835: \"$ac_try\"") >&5
2836   (eval $ac_try) 2>&5
2837   ac_status=$?
2838   echo "$as_me:2838: \$? = $ac_status" >&5
2839   (exit $ac_status); } &&
2840   test -f conftest2.$ac_objext && { (eval echo "$as_me:2840: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:2843: \$? = $ac_status" >&5
2844   (exit $ac_status); };
2845 then
2846   eval cf_cv_prog_CC_c_o=yes
2847 else
2848   eval cf_cv_prog_CC_c_o=no
2849 fi
2850 rm -rf conftest*
2851
2852 fi
2853 if test $cf_cv_prog_CC_c_o = yes; then
2854   echo "$as_me:2854: result: yes" >&5
2855 echo "${ECHO_T}yes" >&6
2856 else
2857   echo "$as_me:2857: result: no" >&5
2858 echo "${ECHO_T}no" >&6
2859 fi
2860
2861 if test "$cross_compiling" = yes ; then
2862         LDCONFIG=:
2863 else
2864         case "$cf_cv_system_name" in
2865         (dragonfly*|mirbsd*|freebsd*)
2866                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2867                 ;;
2868         (*) LDPATH=$PATH:/sbin:/usr/sbin
2869                 # Extract the first word of "ldconfig", so it can be a program name with args.
2870 set dummy ldconfig; ac_word=$2
2871 echo "$as_me:2871: checking for $ac_word" >&5
2872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2873 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876   case $LDCONFIG in
2877   [\\/]* | ?:[\\/]*)
2878   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2879   ;;
2880   *)
2881   ac_save_IFS=$IFS; IFS=$ac_path_separator
2882 ac_dummy="$LDPATH"
2883 for ac_dir in $ac_dummy; do
2884   IFS=$ac_save_IFS
2885   test -z "$ac_dir" && ac_dir=.
2886   if $as_executable_p "$ac_dir/$ac_word"; then
2887    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2888    echo "$as_me:2888: found $ac_dir/$ac_word" >&5
2889    break
2890 fi
2891 done
2892
2893   ;;
2894 esac
2895 fi
2896 LDCONFIG=$ac_cv_path_LDCONFIG
2897
2898 if test -n "$LDCONFIG"; then
2899   echo "$as_me:2899: result: $LDCONFIG" >&5
2900 echo "${ECHO_T}$LDCONFIG" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906                 ;;
2907         esac
2908 fi
2909
2910 echo "$as_me:2910: checking if you want to ensure bool is consistent with C++" >&5
2911 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2912
2913 # Check whether --with-cxx or --without-cxx was given.
2914 if test "${with_cxx+set}" = set; then
2915   withval="$with_cxx"
2916   cf_with_cxx=$withval
2917 else
2918   cf_with_cxx=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_cxx" >&5
2921 echo "${ECHO_T}$cf_with_cxx" >&6
2922 if test "X$cf_with_cxx" = Xno ; then
2923         CXX=""
2924         GXX=""
2925 else
2926         # with autoconf 2.13, we can change the error to a warning:
2927                 ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933 if test -n "$ac_tool_prefix"; then
2934   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2935   do
2936     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2937 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2938 echo "$as_me:2938: checking for $ac_word" >&5
2939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2940 if test "${ac_cv_prog_CXX+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   if test -n "$CXX"; then
2944   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2945 else
2946   ac_save_IFS=$IFS; IFS=$ac_path_separator
2947 ac_dummy="$PATH"
2948 for ac_dir in $ac_dummy; do
2949   IFS=$ac_save_IFS
2950   test -z "$ac_dir" && ac_dir=.
2951   $as_executable_p "$ac_dir/$ac_word" || continue
2952 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2953 echo "$as_me:2953: found $ac_dir/$ac_word" >&5
2954 break
2955 done
2956
2957 fi
2958 fi
2959 CXX=$ac_cv_prog_CXX
2960 if test -n "$CXX"; then
2961   echo "$as_me:2961: result: $CXX" >&5
2962 echo "${ECHO_T}$CXX" >&6
2963 else
2964   echo "$as_me:2964: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968     test -n "$CXX" && break
2969   done
2970 fi
2971 if test -z "$CXX"; then
2972   ac_ct_CXX=$CXX
2973   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2974 do
2975   # Extract the first word of "$ac_prog", so it can be a program name with args.
2976 set dummy $ac_prog; ac_word=$2
2977 echo "$as_me:2977: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if test -n "$ac_ct_CXX"; then
2983   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2984 else
2985   ac_save_IFS=$IFS; IFS=$ac_path_separator
2986 ac_dummy="$PATH"
2987 for ac_dir in $ac_dummy; do
2988   IFS=$ac_save_IFS
2989   test -z "$ac_dir" && ac_dir=.
2990   $as_executable_p "$ac_dir/$ac_word" || continue
2991 ac_cv_prog_ac_ct_CXX="$ac_prog"
2992 echo "$as_me:2992: found $ac_dir/$ac_word" >&5
2993 break
2994 done
2995
2996 fi
2997 fi
2998 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2999 if test -n "$ac_ct_CXX"; then
3000   echo "$as_me:3000: result: $ac_ct_CXX" >&5
3001 echo "${ECHO_T}$ac_ct_CXX" >&6
3002 else
3003   echo "$as_me:3003: result: no" >&5
3004 echo "${ECHO_T}no" >&6
3005 fi
3006
3007   test -n "$ac_ct_CXX" && break
3008 done
3009 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3010
3011   CXX=$ac_ct_CXX
3012 fi
3013
3014 # Provide some information about the compiler.
3015 echo "$as_me:3015:" \
3016      "checking for C++ compiler version" >&5
3017 ac_compiler=`set X $ac_compile; echo $2`
3018 { (eval echo "$as_me:3018: \"$ac_compiler --version </dev/null >&5\"") >&5
3019   (eval $ac_compiler --version </dev/null >&5) 2>&5
3020   ac_status=$?
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit $ac_status); }
3023 { (eval echo "$as_me:3023: \"$ac_compiler -v </dev/null >&5\"") >&5
3024   (eval $ac_compiler -v </dev/null >&5) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); }
3028 { (eval echo "$as_me:3028: \"$ac_compiler -V </dev/null >&5\"") >&5
3029   (eval $ac_compiler -V </dev/null >&5) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }
3033
3034 echo "$as_me:3034: checking whether we are using the GNU C++ compiler" >&5
3035 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3036 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   cat >conftest.$ac_ext <<_ACEOF
3040 #line 3040 "configure"
3041 #include "confdefs.h"
3042
3043 int
3044 main (void)
3045 {
3046 #ifndef __GNUC__
3047        choke me
3048 #endif
3049
3050   ;
3051   return 0;
3052 }
3053 _ACEOF
3054 rm -f conftest.$ac_objext
3055 if { (eval echo "$as_me:3055: \"$ac_compile\"") >&5
3056   (eval $ac_compile) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); } &&
3060          { ac_try='test -s conftest.$ac_objext'
3061   { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit $ac_status); }; }; then
3066   ac_compiler_gnu=yes
3067 else
3068   echo "$as_me: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 ac_compiler_gnu=no
3071 fi
3072 rm -f conftest.$ac_objext conftest.$ac_ext
3073 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3074
3075 fi
3076 echo "$as_me:3076: result: $ac_cv_cxx_compiler_gnu" >&5
3077 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3078 GXX=`test $ac_compiler_gnu = yes && echo yes`
3079 ac_test_CXXFLAGS=${CXXFLAGS+set}
3080 ac_save_CXXFLAGS=$CXXFLAGS
3081 CXXFLAGS="-g"
3082 echo "$as_me:3082: checking whether $CXX accepts -g" >&5
3083 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3084 if test "${ac_cv_prog_cxx_g+set}" = set; then
3085   echo $ECHO_N "(cached) $ECHO_C" >&6
3086 else
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090
3091 int
3092 main (void)
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); } &&
3105          { ac_try='test -s conftest.$ac_objext'
3106   { (eval echo "$as_me:3106: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); }; }; then
3111   ac_cv_prog_cxx_g=yes
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 ac_cv_prog_cxx_g=no
3116 fi
3117 rm -f conftest.$ac_objext conftest.$ac_ext
3118 fi
3119 echo "$as_me:3119: result: $ac_cv_prog_cxx_g" >&5
3120 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3121 if test "$ac_test_CXXFLAGS" = set; then
3122   CXXFLAGS=$ac_save_CXXFLAGS
3123 elif test $ac_cv_prog_cxx_g = yes; then
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-g -O2"
3126   else
3127     CXXFLAGS="-g"
3128   fi
3129 else
3130   if test "$GXX" = yes; then
3131     CXXFLAGS="-O2"
3132   else
3133     CXXFLAGS=
3134   fi
3135 fi
3136 for ac_declaration in \
3137    ''\
3138    '#include <stdlib.h>' \
3139    'extern "C" void std::exit (int) throw (); using std::exit;' \
3140    'extern "C" void std::exit (int); using std::exit;' \
3141    'extern "C" void exit (int) throw ();' \
3142    'extern "C" void exit (int);' \
3143    'void exit (int);'
3144 do
3145   cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <stdlib.h>
3149 $ac_declaration
3150 int
3151 main (void)
3152 {
3153 exit (42);
3154   ;
3155   return 0;
3156 }
3157 _ACEOF
3158 rm -f conftest.$ac_objext
3159 if { (eval echo "$as_me:3159: \"$ac_compile\"") >&5
3160   (eval $ac_compile) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); } &&
3164          { ac_try='test -s conftest.$ac_objext'
3165   { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3166   (eval $ac_try) 2>&5
3167   ac_status=$?
3168   echo "$as_me:3168: \$? = $ac_status" >&5
3169   (exit $ac_status); }; }; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 continue
3175 fi
3176 rm -f conftest.$ac_objext conftest.$ac_ext
3177   cat >conftest.$ac_ext <<_ACEOF
3178 #line 3178 "configure"
3179 #include "confdefs.h"
3180 $ac_declaration
3181 int
3182 main (void)
3183 {
3184 exit (42);
3185   ;
3186   return 0;
3187 }
3188 _ACEOF
3189 rm -f conftest.$ac_objext
3190 if { (eval echo "$as_me:3190: \"$ac_compile\"") >&5
3191   (eval $ac_compile) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); } &&
3195          { ac_try='test -s conftest.$ac_objext'
3196   { (eval echo "$as_me:3196: \"$ac_try\"") >&5
3197   (eval $ac_try) 2>&5
3198   ac_status=$?
3199   echo "$as_me:3199: \$? = $ac_status" >&5
3200   (exit $ac_status); }; }; then
3201   break
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3205 fi
3206 rm -f conftest.$ac_objext conftest.$ac_ext
3207 done
3208 rm -rf conftest*
3209 if test -n "$ac_declaration"; then
3210   echo '#ifdef __cplusplus' >>confdefs.h
3211   echo $ac_declaration      >>confdefs.h
3212   echo '#endif'             >>confdefs.h
3213 fi
3214
3215 ac_ext=c
3216 ac_cpp='$CPP $CPPFLAGS'
3217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3220 ac_main_return=return
3221
3222         ac_ext=cc
3223 ac_cpp='$CXXCPP $CPPFLAGS'
3224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3227 ac_main_return=return
3228
3229         if test "x$cf_with_cxx" != xno
3230         then
3231                 # Several of the C++ configurations do not work, particularly when
3232                 # cross-compiling (20140913 -TD)
3233                 echo "$as_me:3233: checking if $CXX works" >&5
3234 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3235
3236                 save_CPPFLAGS="$CPPFLAGS"
3237                 eval cf_includedir=${includedir}
3238                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3239
3240 cat >conftest.$ac_ext <<_ACEOF
3241 #line 3241 "configure"
3242 #include "confdefs.h"
3243
3244 #include <stdlib.h>
3245 #include <stdio.h>
3246
3247 int
3248 main (void)
3249 {
3250
3251                 printf("Hello world!\n")
3252
3253   ;
3254   return 0;
3255 }
3256 _ACEOF
3257 rm -f conftest.$ac_objext
3258 if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
3259   (eval $ac_compile) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); } &&
3263          { ac_try='test -s conftest.$ac_objext'
3264   { (eval echo "$as_me:3264: \"$ac_try\"") >&5
3265   (eval $ac_try) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit $ac_status); }; }; then
3269   cf_cxx_works=yes
3270 else
3271   echo "$as_me: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 cf_cxx_works=no
3274 fi
3275 rm -f conftest.$ac_objext conftest.$ac_ext
3276                 CPPFLAGS="$save_CPPFLAGS"
3277
3278                 echo "$as_me:3278: result: $cf_cxx_works" >&5
3279 echo "${ECHO_T}$cf_cxx_works" >&6
3280                 if test "x$cf_cxx_works" = xno
3281                 then
3282                         { echo "$as_me:3282: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3283 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3284                         cf_with_cxx=no; CXX=""; GXX="";
3285                 fi
3286         fi
3287         ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292 ac_main_return=return
3293
3294         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3295         if test "$CXX" = "g++" ; then
3296                 # Extract the first word of "g++", so it can be a program name with args.
3297 set dummy g++; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_path_CXX+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   case $CXX in
3304   [\\/]* | ?:[\\/]*)
3305   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3306   ;;
3307   *)
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   if $as_executable_p "$ac_dir/$ac_word"; then
3314    ac_cv_path_CXX="$ac_dir/$ac_word"
3315    echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316    break
3317 fi
3318 done
3319
3320   ;;
3321 esac
3322 fi
3323 CXX=$ac_cv_path_CXX
3324
3325 if test -n "$CXX"; then
3326   echo "$as_me:3326: result: $CXX" >&5
3327 echo "${ECHO_T}$CXX" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333         fi
3334         case "x$CXX" in
3335         (x|xg++)
3336                 { echo "$as_me:3336: WARNING: You don't have any C++ compiler, too bad" >&5
3337 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3338                 cf_with_cxx=no; CXX=""; GXX="";
3339                 ;;
3340         esac
3341 fi
3342
3343 GXX_VERSION=none
3344 if test "$GXX" = yes; then
3345         echo "$as_me:3345: checking version of ${CXX:-g++}" >&5
3346 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3347         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3348         if test -z "$GXX_VERSION"
3349         then
3350                 GXX_VERSION=unknown
3351                 GXX=no
3352         fi
3353         echo "$as_me:3353: result: $GXX_VERSION" >&5
3354 echo "${ECHO_T}$GXX_VERSION" >&6
3355 fi
3356
3357 case $GXX_VERSION in
3358 ([1-9][0-9].*)
3359         ;;
3360 (1.*|2.[0-6]*)
3361         { echo "$as_me:3361: WARNING: templates do not work" >&5
3362 echo "$as_me: WARNING: templates do not work" >&2;}
3363         ;;
3364 esac
3365
3366 echo "$as_me:3366: checking if you want to build C++ binding and demo" >&5
3367 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3368
3369 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3370 if test "${with_cxx_binding+set}" = set; then
3371   withval="$with_cxx_binding"
3372   cf_with_cxx_binding=$withval
3373 else
3374   cf_with_cxx_binding=$cf_with_cxx
3375 fi;
3376 echo "$as_me:3376: result: $cf_with_cxx_binding" >&5
3377 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3378
3379 echo "$as_me:3379: checking if you want to build with Ada" >&5
3380 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3381 echo "$as_me:3381: result: $cf_with_ada" >&5
3382 echo "${ECHO_T}$cf_with_ada" >&6
3383
3384 echo "$as_me:3384: checking if you want to install terminal database" >&5
3385 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3386
3387 # Check whether --enable-db-install or --disable-db-install was given.
3388 if test "${enable_db_install+set}" = set; then
3389   enableval="$enable_db_install"
3390   cf_with_db_install=$enableval
3391 else
3392   cf_with_db_install=yes
3393 fi;
3394 echo "$as_me:3394: result: $cf_with_db_install" >&5
3395 echo "${ECHO_T}$cf_with_db_install" >&6
3396
3397 echo "$as_me:3397: checking if you want to install manpages" >&5
3398 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3399
3400 # Check whether --with-manpages or --without-manpages was given.
3401 if test "${with_manpages+set}" = set; then
3402   withval="$with_manpages"
3403   cf_with_manpages=$withval
3404 else
3405   cf_with_manpages=yes
3406 fi;
3407 echo "$as_me:3407: result: $cf_with_manpages" >&5
3408 echo "${ECHO_T}$cf_with_manpages" >&6
3409
3410 echo "$as_me:3410: checking if you want to build programs such as tic" >&5
3411 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3412
3413 # Check whether --with-progs or --without-progs was given.
3414 if test "${with_progs+set}" = set; then
3415   withval="$with_progs"
3416   cf_with_progs=$withval
3417 else
3418   cf_with_progs=yes
3419 fi;
3420 echo "$as_me:3420: result: $cf_with_progs" >&5
3421 echo "${ECHO_T}$cf_with_progs" >&6
3422
3423 if test -f $srcdir/tack/tack.h; then
3424         if test "x$cross_compiling" = xyes ; then
3425                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3426
3427 echo "${as_me:-configure}:3427: testing ignoring tack because we are cross-compiling ..." 1>&5
3428
3429                 cf_with_tack=no
3430         else
3431                 echo "$as_me:3431: checking if you want to build the tack program" >&5
3432 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3433
3434 # Check whether --with-tack or --without-tack was given.
3435 if test "${with_tack+set}" = set; then
3436   withval="$with_tack"
3437   cf_with_tack=$withval
3438 else
3439   cf_with_tack=$cf_with_progs
3440 fi;
3441                 echo "$as_me:3441: result: $cf_with_tack" >&5
3442 echo "${ECHO_T}$cf_with_tack" >&6
3443         fi
3444 else
3445         cf_with_tack=no
3446 fi
3447
3448 echo "$as_me:3448: checking if you want to build test-programs" >&5
3449 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3450
3451 # Check whether --with-tests or --without-tests was given.
3452 if test "${with_tests+set}" = set; then
3453   withval="$with_tests"
3454   cf_with_tests=$withval
3455 else
3456   cf_with_tests=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_with_tests" >&5
3459 echo "${ECHO_T}$cf_with_tests" >&6
3460
3461 echo "$as_me:3461: checking if you wish to install curses.h" >&5
3462 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3463
3464 # Check whether --with-curses-h or --without-curses-h was given.
3465 if test "${with_curses_h+set}" = set; then
3466   withval="$with_curses_h"
3467   with_curses_h=$withval
3468 else
3469   with_curses_h=yes
3470 fi;
3471 echo "$as_me:3471: result: $with_curses_h" >&5
3472 echo "${ECHO_T}$with_curses_h" >&6
3473
3474 modules_to_build="ncurses"
3475 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3476 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3477 modules_to_build="$modules_to_build panel menu form"
3478
3479 test "$program_prefix" != NONE &&
3480   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3481 # Use a double $ so make ignores it.
3482 test "$program_suffix" != NONE &&
3483   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3484 # Double any \ or $.  echo might interpret backslashes.
3485 # By default was `s,x,x', remove it if useless.
3486 cat <<\_ACEOF >conftest.sed
3487 s/[\\$]/&&/g;s/;s,x,x,$//
3488 _ACEOF
3489 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3490 rm conftest.sed
3491
3492 for ac_prog in mawk gawk nawk awk
3493 do
3494   # Extract the first word of "$ac_prog", so it can be a program name with args.
3495 set dummy $ac_prog; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_AWK+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   if test -n "$AWK"; then
3502   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3503 else
3504   ac_save_IFS=$IFS; IFS=$ac_path_separator
3505 ac_dummy="$PATH"
3506 for ac_dir in $ac_dummy; do
3507   IFS=$ac_save_IFS
3508   test -z "$ac_dir" && ac_dir=.
3509   $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_AWK="$ac_prog"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3512 break
3513 done
3514
3515 fi
3516 fi
3517 AWK=$ac_cv_prog_AWK
3518 if test -n "$AWK"; then
3519   echo "$as_me:3519: result: $AWK" >&5
3520 echo "${ECHO_T}$AWK" >&6
3521 else
3522   echo "$as_me:3522: result: no" >&5
3523 echo "${ECHO_T}no" >&6
3524 fi
3525
3526   test -n "$AWK" && break
3527 done
3528
3529 test -z "$AWK" && { { echo "$as_me:3529: error: No awk program found" >&5
3530 echo "$as_me: error: No awk program found" >&2;}
3531    { (exit 1); exit 1; }; }
3532
3533 echo "$as_me:3533: checking for egrep" >&5
3534 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3535 if test "${ac_cv_prog_egrep+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3539                 then ac_cv_prog_egrep='grep -E'
3540                 else ac_cv_prog_egrep='egrep'
3541         fi
3542 fi
3543 echo "$as_me:3543: result: $ac_cv_prog_egrep" >&5
3544 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3545         EGREP=$ac_cv_prog_egrep
3546
3547         test -z "$EGREP" && { { echo "$as_me:3547: error: No egrep program found" >&5
3548 echo "$as_me: error: No egrep program found" >&2;}
3549    { (exit 1); exit 1; }; }
3550
3551 # Find a good install program.  We prefer a C program (faster),
3552 # so one script is as good as another.  But avoid the broken or
3553 # incompatible versions:
3554 # SysV /etc/install, /usr/sbin/install
3555 # SunOS /usr/etc/install
3556 # IRIX /sbin/install
3557 # AIX /bin/install
3558 # AmigaOS /C/install, which installs bootblocks on floppy discs
3559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 echo "$as_me:3563: checking for a BSD compatible install" >&5
3564 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3565 if test -z "$INSTALL"; then
3566 if test "${ac_cv_path_install+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569     ac_save_IFS=$IFS; IFS=$ac_path_separator
3570   for ac_dir in $PATH; do
3571     IFS=$ac_save_IFS
3572     # Account for people who put trailing slashes in PATH elements.
3573     case $ac_dir/ in
3574     / | ./ | .// | /cC/* \
3575     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3576     | /usr/ucb/* ) ;;
3577     *)
3578       # OSF1 and SCO ODT 3.0 have their own names for install.
3579       # Don't use installbsd from OSF since it installs stuff as root
3580       # by default.
3581       for ac_prog in ginstall scoinst install; do
3582         if $as_executable_p "$ac_dir/$ac_prog"; then
3583           if test $ac_prog = install &&
3584             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3585             # AIX install.  It has an incompatible calling convention.
3586             :
3587           elif test $ac_prog = install &&
3588             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3589             # program-specific install script used by HP pwplus--don't use.
3590             :
3591           else
3592             ac_cv_path_install="$ac_dir/$ac_prog -c"
3593             break 2
3594           fi
3595         fi
3596       done
3597       ;;
3598     esac
3599   done
3600
3601 fi
3602   if test "${ac_cv_path_install+set}" = set; then
3603     INSTALL=$ac_cv_path_install
3604   else
3605     # As a last resort, use the slow shell script.  We don't cache a
3606     # path for INSTALL within a source directory, because that will
3607     # break other packages using the cache if that directory is
3608     # removed, or if the path is relative.
3609     INSTALL=$ac_install_sh
3610   fi
3611 fi
3612 echo "$as_me:3612: result: $INSTALL" >&5
3613 echo "${ECHO_T}$INSTALL" >&6
3614
3615 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3616 # It thinks the first close brace ends the variable substitution.
3617 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3618
3619 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3620
3621 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3622
3623 case $INSTALL in
3624 (/*)
3625         ;;
3626 (*)
3627         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3628         test -z "$cf_dir" && cf_dir=.
3629         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3630         ;;
3631 esac
3632
3633 for ac_prog in lint cppcheck splint
3634 do
3635   # Extract the first word of "$ac_prog", so it can be a program name with args.
3636 set dummy $ac_prog; ac_word=$2
3637 echo "$as_me:3637: checking for $ac_word" >&5
3638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639 if test "${ac_cv_prog_LINT+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   if test -n "$LINT"; then
3643   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3644 else
3645   ac_save_IFS=$IFS; IFS=$ac_path_separator
3646 ac_dummy="$PATH"
3647 for ac_dir in $ac_dummy; do
3648   IFS=$ac_save_IFS
3649   test -z "$ac_dir" && ac_dir=.
3650   $as_executable_p "$ac_dir/$ac_word" || continue
3651 ac_cv_prog_LINT="$ac_prog"
3652 echo "$as_me:3652: found $ac_dir/$ac_word" >&5
3653 break
3654 done
3655
3656 fi
3657 fi
3658 LINT=$ac_cv_prog_LINT
3659 if test -n "$LINT"; then
3660   echo "$as_me:3660: result: $LINT" >&5
3661 echo "${ECHO_T}$LINT" >&6
3662 else
3663   echo "$as_me:3663: result: no" >&5
3664 echo "${ECHO_T}no" >&6
3665 fi
3666
3667   test -n "$LINT" && break
3668 done
3669
3670 case "x$LINT" in
3671 (xcppcheck|x*/cppcheck)
3672         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3673         ;;
3674 esac
3675
3676 echo "$as_me:3676: checking whether ln -s works" >&5
3677 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3678 LN_S=$as_ln_s
3679 if test "$LN_S" = "ln -s"; then
3680   echo "$as_me:3680: result: yes" >&5
3681 echo "${ECHO_T}yes" >&6
3682 else
3683   echo "$as_me:3683: result: no, using $LN_S" >&5
3684 echo "${ECHO_T}no, using $LN_S" >&6
3685 fi
3686
3687 echo "$as_me:3687: checking if $LN_S -f options work" >&5
3688 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3689
3690 rm -f conf$$.src conf$$dst
3691 echo >conf$$.dst
3692 echo first >conf$$.src
3693 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3694         cf_prog_ln_sf=yes
3695 else
3696         cf_prog_ln_sf=no
3697 fi
3698 rm -f conf$$.dst conf$$src
3699 echo "$as_me:3699: result: $cf_prog_ln_sf" >&5
3700 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3701
3702 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3703
3704 echo "$as_me:3704: checking for long file names" >&5
3705 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3706 if test "${ac_cv_sys_long_file_names+set}" = set; then
3707   echo $ECHO_N "(cached) $ECHO_C" >&6
3708 else
3709   ac_cv_sys_long_file_names=yes
3710 # Test for long file names in all the places we know might matter:
3711 #      .                the current directory, where building will happen
3712 #      $prefix/lib      where we will be installing things
3713 #      $exec_prefix/lib likewise
3714 # eval it to expand exec_prefix.
3715 #      $TMPDIR          if set, where it might want to write temporary files
3716 # if $TMPDIR is not set:
3717 #      /tmp             where it might want to write temporary files
3718 #      /var/tmp         likewise
3719 #      /usr/tmp         likewise
3720 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3721   ac_tmpdirs=$TMPDIR
3722 else
3723   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3724 fi
3725 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3726   test -d $ac_dir || continue
3727   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3728   ac_xdir=$ac_dir/cf$$
3729   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3730   ac_tf1=$ac_xdir/conftest9012345
3731   ac_tf2=$ac_xdir/conftest9012346
3732   (echo 1 >$ac_tf1) 2>/dev/null
3733   (echo 2 >$ac_tf2) 2>/dev/null
3734   ac_val=`cat $ac_tf1 2>/dev/null`
3735   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3736     ac_cv_sys_long_file_names=no
3737     rm -rf $ac_xdir 2>/dev/null
3738     break
3739   fi
3740   rm -rf $ac_xdir 2>/dev/null
3741 done
3742 fi
3743 echo "$as_me:3743: result: $ac_cv_sys_long_file_names" >&5
3744 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3745 if test $ac_cv_sys_long_file_names = yes; then
3746
3747 cat >>confdefs.h <<\EOF
3748 #define HAVE_LONG_FILE_NAMES 1
3749 EOF
3750
3751 fi
3752
3753 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3754 # of package conflict.
3755 cf_config_suffix=
3756
3757 # Check whether --with-config-suffix or --without-config-suffix was given.
3758 if test "${with_config_suffix+set}" = set; then
3759   withval="$with_config_suffix"
3760   case "x$withval" in
3761         (xyes|xno)
3762                 { echo "$as_me:3762: WARNING: expected a value for config-suffix option" >&5
3763 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3764                 ;;
3765         (*)     cf_config_suffix="$withval"
3766                 ;;
3767         esac
3768 fi;
3769
3770 # If we find pkg-config, check if we should install the ".pc" files.
3771
3772 echo "$as_me:3772: checking if you want to use pkg-config" >&5
3773 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3774
3775 # Check whether --with-pkg-config or --without-pkg-config was given.
3776 if test "${with_pkg_config+set}" = set; then
3777   withval="$with_pkg_config"
3778   cf_pkg_config=$withval
3779 else
3780   cf_pkg_config=yes
3781 fi;
3782 echo "$as_me:3782: result: $cf_pkg_config" >&5
3783 echo "${ECHO_T}$cf_pkg_config" >&6
3784
3785 case $cf_pkg_config in
3786 (no)
3787         PKG_CONFIG=none
3788         ;;
3789 (yes)
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   case $PKG_CONFIG in
3800   [\\/]* | ?:[\\/]*)
3801   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3802   ;;
3803   *)
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   if $as_executable_p "$ac_dir/$ac_word"; then
3810    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3811    echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812    break
3813 fi
3814 done
3815
3816   ;;
3817 esac
3818 fi
3819 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3820
3821 if test -n "$PKG_CONFIG"; then
3822   echo "$as_me:3822: result: $PKG_CONFIG" >&5
3823 echo "${ECHO_T}$PKG_CONFIG" >&6
3824 else
3825   echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 fi
3828
3829 fi
3830 if test -z "$ac_cv_path_PKG_CONFIG"; then
3831   ac_pt_PKG_CONFIG=$PKG_CONFIG
3832   # Extract the first word of "pkg-config", so it can be a program name with args.
3833 set dummy pkg-config; ac_word=$2
3834 echo "$as_me:3834: checking for $ac_word" >&5
3835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3836 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3837   echo $ECHO_N "(cached) $ECHO_C" >&6
3838 else
3839   case $ac_pt_PKG_CONFIG in
3840   [\\/]* | ?:[\\/]*)
3841   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3842   ;;
3843   *)
3844   ac_save_IFS=$IFS; IFS=$ac_path_separator
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847   IFS=$ac_save_IFS
3848   test -z "$ac_dir" && ac_dir=.
3849   if $as_executable_p "$ac_dir/$ac_word"; then
3850    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3851    echo "$as_me:3851: found $ac_dir/$ac_word" >&5
3852    break
3853 fi
3854 done
3855
3856   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3857   ;;
3858 esac
3859 fi
3860 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3861
3862 if test -n "$ac_pt_PKG_CONFIG"; then
3863   echo "$as_me:3863: result: $ac_pt_PKG_CONFIG" >&5
3864 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870   PKG_CONFIG=$ac_pt_PKG_CONFIG
3871 else
3872   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3873 fi
3874
3875         ;;
3876 (*)
3877         PKG_CONFIG=$withval
3878         ;;
3879 esac
3880
3881 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3882 if test "$PKG_CONFIG" != none ; then
3883
3884 if test "x$prefix" != xNONE; then
3885         cf_path_syntax="$prefix"
3886 else
3887         cf_path_syntax="$ac_default_prefix"
3888 fi
3889
3890 case ".$PKG_CONFIG" in
3891 (.\$\(*\)*|.\'*\'*)
3892         ;;
3893 (..|./*|.\\*)
3894         ;;
3895 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3896         ;;
3897 (.\${*prefix}*|.\${*dir}*)
3898         eval PKG_CONFIG="$PKG_CONFIG"
3899         case ".$PKG_CONFIG" in
3900         (.NONE/*)
3901                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3902                 ;;
3903         esac
3904         ;;
3905 (.no|.NONE/*)
3906         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3907         ;;
3908 (*)
3909         { { echo "$as_me:3909: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3910 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3911    { (exit 1); exit 1; }; }
3912         ;;
3913 esac
3914
3915 elif test "x$cf_pkg_config" != xno ; then
3916         { echo "$as_me:3916: WARNING: pkg-config is not installed" >&5
3917 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3918 fi
3919
3920 case $PKG_CONFIG in
3921 (no|none|yes)
3922         echo "$as_me:3922: checking for pkg-config library directory" >&5
3923 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3924         ;;
3925 (*)
3926         echo "$as_me:3926: checking for $PKG_CONFIG library directory" >&5
3927 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3928         ;;
3929 esac
3930
3931 PKG_CONFIG_LIBDIR=no
3932
3933 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3934 if test "${with_pkg_config_libdir+set}" = set; then
3935   withval="$with_pkg_config_libdir"
3936   PKG_CONFIG_LIBDIR=$withval
3937 else
3938   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3939 fi;
3940
3941 case x$PKG_CONFIG_LIBDIR in
3942 (x/*)
3943         ;;
3944 (xyes)
3945         # Look for the library directory using the same prefix as the executable
3946         if test "x$PKG_CONFIG" = xnone
3947         then
3948                 cf_path=$prefix
3949         else
3950                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3951         fi
3952
3953         # If you don't like using the default architecture, you have to specify the
3954         # intended library directory and corresponding compiler/linker options.
3955         #
3956         # This case allows for Debian's 2014-flavor of multiarch, along with the
3957         # most common variations before that point.  Some other variants spell the
3958         # directory differently, e.g., "pkg-config", and put it in unusual places.
3959         # pkg-config has always been poorly standardized, which is ironic...
3960         case x`(arch) 2>/dev/null` in
3961         (*64)
3962                 cf_search_path="\
3963                         $cf_path/lib/*64-linux-gnu \
3964                         $cf_path/share \
3965                         $cf_path/lib64 \
3966                         $cf_path/lib32 \
3967                         $cf_path/lib"
3968                 ;;
3969         (*)
3970                 cf_search_path="\
3971                         $cf_path/lib/*-linux-gnu \
3972                         $cf_path/share \
3973                         $cf_path/lib32 \
3974                         $cf_path/lib \
3975                         $cf_path/libdata"
3976                 ;;
3977         esac
3978
3979         test -n "$verbose" && echo "    list..." 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing list... ..." 1>&5
3982
3983         for cf_config in $cf_search_path
3984         do
3985                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3986
3987 echo "${as_me:-configure}:3987: testing checking $cf_config/pkgconfig ..." 1>&5
3988
3989                 if test -d $cf_config/pkgconfig
3990                 then
3991                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3992                         echo "$as_me:3992: checking done" >&5
3993 echo $ECHO_N "checking done... $ECHO_C" >&6
3994                         break
3995                 fi
3996         done
3997         ;;
3998 (*)
3999         ;;
4000 esac
4001
4002 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4003         echo "$as_me:4003: result: $PKG_CONFIG_LIBDIR" >&5
4004 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4005 fi
4006
4007 if test "x$PKG_CONFIG" != xnone
4008 then
4009         echo "$as_me:4009: checking if we should install .pc files for $PKG_CONFIG" >&5
4010 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4011 else
4012         echo "$as_me:4012: checking if we should install .pc files" >&5
4013 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4014 fi
4015
4016 # Check whether --enable-pc-files or --disable-pc-files was given.
4017 if test "${enable_pc_files+set}" = set; then
4018   enableval="$enable_pc_files"
4019   enable_pc_files=$enableval
4020 else
4021   enable_pc_files=no
4022 fi;
4023 echo "$as_me:4023: result: $enable_pc_files" >&5
4024 echo "${ECHO_T}$enable_pc_files" >&6
4025
4026 if test "x$enable_pc_files" != xno
4027 then
4028         MAKE_PC_FILES=
4029         case "x$PKG_CONFIG_LIBDIR" in
4030         (xno|xyes)
4031                 { echo "$as_me:4031: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4032 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4033                 ;;
4034         (*)
4035
4036 if test "x$prefix" != xNONE; then
4037         cf_path_syntax="$prefix"
4038 else
4039         cf_path_syntax="$ac_default_prefix"
4040 fi
4041
4042 case ".$PKG_CONFIG_LIBDIR" in
4043 (.\$\(*\)*|.\'*\'*)
4044         ;;
4045 (..|./*|.\\*)
4046         ;;
4047 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4048         ;;
4049 (.\${*prefix}*|.\${*dir}*)
4050         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4051         case ".$PKG_CONFIG_LIBDIR" in
4052         (.NONE/*)
4053                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4054                 ;;
4055         esac
4056         ;;
4057 (.no|.NONE/*)
4058         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4059         ;;
4060 (*)
4061         { { echo "$as_me:4061: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4062 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4063    { (exit 1); exit 1; }; }
4064         ;;
4065 esac
4066
4067                 ;;
4068         esac
4069 else
4070         MAKE_PC_FILES="#"
4071 fi
4072
4073 if test -z "$MAKE_PC_FILES"
4074 then
4075         echo "$as_me:4075: checking for suffix to add to pc-files" >&5
4076 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4077
4078 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4079 if test "${with_pc_suffix+set}" = set; then
4080   withval="$with_pc_suffix"
4081   case "x$withval" in
4082         (xyes|xno)
4083                 PC_MODULE_SUFFIX=
4084                 ;;
4085         (*)     PC_MODULE_SUFFIX="$withval"
4086                 ;;
4087         esac
4088 fi;
4089         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4090         echo "$as_me:4090: result: $PC_MODULE_SUFFIX" >&5
4091 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4092         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4093
4094 fi
4095
4096 echo "$as_me:4096: checking if we should assume mixed-case filenames" >&5
4097 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4098
4099 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4100 if test "${enable_mixed_case+set}" = set; then
4101   enableval="$enable_mixed_case"
4102   enable_mixedcase=$enableval
4103 else
4104   enable_mixedcase=auto
4105 fi;
4106 echo "$as_me:4106: result: $enable_mixedcase" >&5
4107 echo "${ECHO_T}$enable_mixedcase" >&6
4108 if test "$enable_mixedcase" = "auto" ; then
4109
4110 echo "$as_me:4110: checking if filesystem supports mixed-case filenames" >&5
4111 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4112 if test "${cf_cv_mixedcase+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115
4116 if test "$cross_compiling" = yes ; then
4117         case $target_alias in
4118         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4119                 cf_cv_mixedcase=no
4120                 ;;
4121         (*)
4122                 cf_cv_mixedcase=yes
4123                 ;;
4124         esac
4125 else
4126         rm -f conftest CONFTEST
4127         echo test >conftest
4128         if test -f CONFTEST ; then
4129                 cf_cv_mixedcase=no
4130         else
4131                 cf_cv_mixedcase=yes
4132         fi
4133         rm -f conftest CONFTEST
4134 fi
4135
4136 fi
4137 echo "$as_me:4137: result: $cf_cv_mixedcase" >&5
4138 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4139 test "$cf_cv_mixedcase" = yes &&
4140 cat >>confdefs.h <<\EOF
4141 #define MIXEDCASE_FILENAMES 1
4142 EOF
4143
4144 else
4145         cf_cv_mixedcase=$enable_mixedcase
4146         if test "x$enable_mixedcase" = "xyes" ; then
4147
4148 cat >>confdefs.h <<\EOF
4149 #define MIXEDCASE_FILENAMES 1
4150 EOF
4151
4152         fi
4153 fi
4154
4155 # do this after mixed-case option (tags/TAGS is not as important as tic).
4156 echo "$as_me:4156: checking whether ${MAKE-make} sets \${MAKE}" >&5
4157 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4158 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4159 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4160   echo $ECHO_N "(cached) $ECHO_C" >&6
4161 else
4162   cat >conftest.make <<\EOF
4163 all:
4164         @echo 'ac_maketemp="${MAKE}"'
4165 EOF
4166 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4167 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4168 if test -n "$ac_maketemp"; then
4169   eval ac_cv_prog_make_${ac_make}_set=yes
4170 else
4171   eval ac_cv_prog_make_${ac_make}_set=no
4172 fi
4173 rm -f conftest.make
4174 fi
4175 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4176   echo "$as_me:4176: result: yes" >&5
4177 echo "${ECHO_T}yes" >&6
4178   SET_MAKE=
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182   SET_MAKE="MAKE=${MAKE-make}"
4183 fi
4184
4185 for ac_prog in exctags ctags
4186 do
4187   # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_CTAGS+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$CTAGS"; then
4195   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_CTAGS="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208 fi
4209 fi
4210 CTAGS=$ac_cv_prog_CTAGS
4211 if test -n "$CTAGS"; then
4212   echo "$as_me:4212: result: $CTAGS" >&5
4213 echo "${ECHO_T}$CTAGS" >&6
4214 else
4215   echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4217 fi
4218
4219   test -n "$CTAGS" && break
4220 done
4221
4222 for ac_prog in exetags etags
4223 do
4224   # Extract the first word of "$ac_prog", so it can be a program name with args.
4225 set dummy $ac_prog; ac_word=$2
4226 echo "$as_me:4226: checking for $ac_word" >&5
4227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4228 if test "${ac_cv_prog_ETAGS+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231   if test -n "$ETAGS"; then
4232   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4233 else
4234   ac_save_IFS=$IFS; IFS=$ac_path_separator
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237   IFS=$ac_save_IFS
4238   test -z "$ac_dir" && ac_dir=.
4239   $as_executable_p "$ac_dir/$ac_word" || continue
4240 ac_cv_prog_ETAGS="$ac_prog"
4241 echo "$as_me:4241: found $ac_dir/$ac_word" >&5
4242 break
4243 done
4244
4245 fi
4246 fi
4247 ETAGS=$ac_cv_prog_ETAGS
4248 if test -n "$ETAGS"; then
4249   echo "$as_me:4249: result: $ETAGS" >&5
4250 echo "${ECHO_T}$ETAGS" >&6
4251 else
4252   echo "$as_me:4252: result: no" >&5
4253 echo "${ECHO_T}no" >&6
4254 fi
4255
4256   test -n "$ETAGS" && break
4257 done
4258
4259 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4260 set dummy ${CTAGS:-ctags}; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$MAKE_LOWER_TAGS"; then
4267   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4281 fi
4282 fi
4283 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4284 if test -n "$MAKE_LOWER_TAGS"; then
4285   echo "$as_me:4285: result: $MAKE_LOWER_TAGS" >&5
4286 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4287 else
4288   echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4290 fi
4291
4292 if test "$cf_cv_mixedcase" = yes ; then
4293         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4294 set dummy ${ETAGS:-etags}; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$MAKE_UPPER_TAGS"; then
4301   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4315 fi
4316 fi
4317 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4318 if test -n "$MAKE_UPPER_TAGS"; then
4319   echo "$as_me:4319: result: $MAKE_UPPER_TAGS" >&5
4320 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 else
4327         MAKE_UPPER_TAGS=no
4328 fi
4329
4330 if test "$MAKE_UPPER_TAGS" = yes ; then
4331         MAKE_UPPER_TAGS=
4332 else
4333         MAKE_UPPER_TAGS="#"
4334 fi
4335
4336 if test "$MAKE_LOWER_TAGS" = yes ; then
4337         MAKE_LOWER_TAGS=
4338 else
4339         MAKE_LOWER_TAGS="#"
4340 fi
4341
4342 echo "$as_me:4342: checking for makeflags variable" >&5
4343 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4344 if test "${cf_cv_makeflags+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347
4348         cf_cv_makeflags=''
4349         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4350         do
4351                 cat >cf_makeflags.tmp <<CF_EOF
4352 SHELL = $SHELL
4353 all :
4354         @ echo '.$cf_option'
4355 CF_EOF
4356                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4357                 case "$cf_result" in
4358                 (.*k|.*kw)
4359                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4360                         case "$cf_result" in
4361                         (.*CC=*)        cf_cv_makeflags=
4362                                 ;;
4363                         (*)     cf_cv_makeflags=$cf_option
4364                                 ;;
4365                         esac
4366                         break
4367                         ;;
4368                 (.-)
4369                         ;;
4370                 (*)
4371
4372 echo "${as_me:-configure}:4372: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4373
4374                         ;;
4375                 esac
4376         done
4377         rm -f cf_makeflags.tmp
4378
4379 fi
4380 echo "$as_me:4380: result: $cf_cv_makeflags" >&5
4381 echo "${ECHO_T}$cf_cv_makeflags" >&6
4382
4383 if test -n "$ac_tool_prefix"; then
4384   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4385 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4386 echo "$as_me:4386: checking for $ac_word" >&5
4387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4388 if test "${ac_cv_prog_RANLIB+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391   if test -n "$RANLIB"; then
4392   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4393 else
4394   ac_save_IFS=$IFS; IFS=$ac_path_separator
4395 ac_dummy="$PATH"
4396 for ac_dir in $ac_dummy; do
4397   IFS=$ac_save_IFS
4398   test -z "$ac_dir" && ac_dir=.
4399   $as_executable_p "$ac_dir/$ac_word" || continue
4400 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4401 echo "$as_me:4401: found $ac_dir/$ac_word" >&5
4402 break
4403 done
4404
4405 fi
4406 fi
4407 RANLIB=$ac_cv_prog_RANLIB
4408 if test -n "$RANLIB"; then
4409   echo "$as_me:4409: result: $RANLIB" >&5
4410 echo "${ECHO_T}$RANLIB" >&6
4411 else
4412   echo "$as_me:4412: result: no" >&5
4413 echo "${ECHO_T}no" >&6
4414 fi
4415
4416 fi
4417 if test -z "$ac_cv_prog_RANLIB"; then
4418   ac_ct_RANLIB=$RANLIB
4419   # Extract the first word of "ranlib", so it can be a program name with args.
4420 set dummy ranlib; ac_word=$2
4421 echo "$as_me:4421: checking for $ac_word" >&5
4422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4423 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4424   echo $ECHO_N "(cached) $ECHO_C" >&6
4425 else
4426   if test -n "$ac_ct_RANLIB"; then
4427   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4428 else
4429   ac_save_IFS=$IFS; IFS=$ac_path_separator
4430 ac_dummy="$PATH"
4431 for ac_dir in $ac_dummy; do
4432   IFS=$ac_save_IFS
4433   test -z "$ac_dir" && ac_dir=.
4434   $as_executable_p "$ac_dir/$ac_word" || continue
4435 ac_cv_prog_ac_ct_RANLIB="ranlib"
4436 echo "$as_me:4436: found $ac_dir/$ac_word" >&5
4437 break
4438 done
4439
4440   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4441 fi
4442 fi
4443 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4444 if test -n "$ac_ct_RANLIB"; then
4445   echo "$as_me:4445: result: $ac_ct_RANLIB" >&5
4446 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4447 else
4448   echo "$as_me:4448: result: no" >&5
4449 echo "${ECHO_T}no" >&6
4450 fi
4451
4452   RANLIB=$ac_ct_RANLIB
4453 else
4454   RANLIB="$ac_cv_prog_RANLIB"
4455 fi
4456
4457 if test -n "$ac_tool_prefix"; then
4458   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4459 set dummy ${ac_tool_prefix}ld; ac_word=$2
4460 echo "$as_me:4460: checking for $ac_word" >&5
4461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4462 if test "${ac_cv_prog_LD+set}" = set; then
4463   echo $ECHO_N "(cached) $ECHO_C" >&6
4464 else
4465   if test -n "$LD"; then
4466   ac_cv_prog_LD="$LD" # Let the user override the test.
4467 else
4468   ac_save_IFS=$IFS; IFS=$ac_path_separator
4469 ac_dummy="$PATH"
4470 for ac_dir in $ac_dummy; do
4471   IFS=$ac_save_IFS
4472   test -z "$ac_dir" && ac_dir=.
4473   $as_executable_p "$ac_dir/$ac_word" || continue
4474 ac_cv_prog_LD="${ac_tool_prefix}ld"
4475 echo "$as_me:4475: found $ac_dir/$ac_word" >&5
4476 break
4477 done
4478
4479 fi
4480 fi
4481 LD=$ac_cv_prog_LD
4482 if test -n "$LD"; then
4483   echo "$as_me:4483: result: $LD" >&5
4484 echo "${ECHO_T}$LD" >&6
4485 else
4486   echo "$as_me:4486: result: no" >&5
4487 echo "${ECHO_T}no" >&6
4488 fi
4489
4490 fi
4491 if test -z "$ac_cv_prog_LD"; then
4492   ac_ct_LD=$LD
4493   # Extract the first word of "ld", so it can be a program name with args.
4494 set dummy ld; ac_word=$2
4495 echo "$as_me:4495: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$ac_ct_LD"; then
4501   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4502 else
4503   ac_save_IFS=$IFS; IFS=$ac_path_separator
4504 ac_dummy="$PATH"
4505 for ac_dir in $ac_dummy; do
4506   IFS=$ac_save_IFS
4507   test -z "$ac_dir" && ac_dir=.
4508   $as_executable_p "$ac_dir/$ac_word" || continue
4509 ac_cv_prog_ac_ct_LD="ld"
4510 echo "$as_me:4510: found $ac_dir/$ac_word" >&5
4511 break
4512 done
4513
4514   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4515 fi
4516 fi
4517 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4518 if test -n "$ac_ct_LD"; then
4519   echo "$as_me:4519: result: $ac_ct_LD" >&5
4520 echo "${ECHO_T}$ac_ct_LD" >&6
4521 else
4522   echo "$as_me:4522: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   LD=$ac_ct_LD
4527 else
4528   LD="$ac_cv_prog_LD"
4529 fi
4530
4531 if test -n "$ac_tool_prefix"; then
4532   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4533 set dummy ${ac_tool_prefix}ar; ac_word=$2
4534 echo "$as_me:4534: checking for $ac_word" >&5
4535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4536 if test "${ac_cv_prog_AR+set}" = set; then
4537   echo $ECHO_N "(cached) $ECHO_C" >&6
4538 else
4539   if test -n "$AR"; then
4540   ac_cv_prog_AR="$AR" # Let the user override the test.
4541 else
4542   ac_save_IFS=$IFS; IFS=$ac_path_separator
4543 ac_dummy="$PATH"
4544 for ac_dir in $ac_dummy; do
4545   IFS=$ac_save_IFS
4546   test -z "$ac_dir" && ac_dir=.
4547   $as_executable_p "$ac_dir/$ac_word" || continue
4548 ac_cv_prog_AR="${ac_tool_prefix}ar"
4549 echo "$as_me:4549: found $ac_dir/$ac_word" >&5
4550 break
4551 done
4552
4553 fi
4554 fi
4555 AR=$ac_cv_prog_AR
4556 if test -n "$AR"; then
4557   echo "$as_me:4557: result: $AR" >&5
4558 echo "${ECHO_T}$AR" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 fi
4565 if test -z "$ac_cv_prog_AR"; then
4566   ac_ct_AR=$AR
4567   # Extract the first word of "ar", so it can be a program name with args.
4568 set dummy ar; ac_word=$2
4569 echo "$as_me:4569: checking for $ac_word" >&5
4570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4571 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4572   echo $ECHO_N "(cached) $ECHO_C" >&6
4573 else
4574   if test -n "$ac_ct_AR"; then
4575   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4576 else
4577   ac_save_IFS=$IFS; IFS=$ac_path_separator
4578 ac_dummy="$PATH"
4579 for ac_dir in $ac_dummy; do
4580   IFS=$ac_save_IFS
4581   test -z "$ac_dir" && ac_dir=.
4582   $as_executable_p "$ac_dir/$ac_word" || continue
4583 ac_cv_prog_ac_ct_AR="ar"
4584 echo "$as_me:4584: found $ac_dir/$ac_word" >&5
4585 break
4586 done
4587
4588   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4589 fi
4590 fi
4591 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4592 if test -n "$ac_ct_AR"; then
4593   echo "$as_me:4593: result: $ac_ct_AR" >&5
4594 echo "${ECHO_T}$ac_ct_AR" >&6
4595 else
4596   echo "$as_me:4596: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600   AR=$ac_ct_AR
4601 else
4602   AR="$ac_cv_prog_AR"
4603 fi
4604
4605 if test -n "$ac_tool_prefix"; then
4606   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4607 set dummy ${ac_tool_prefix}nm; ac_word=$2
4608 echo "$as_me:4608: checking for $ac_word" >&5
4609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4610 if test "${ac_cv_prog_NM+set}" = set; then
4611   echo $ECHO_N "(cached) $ECHO_C" >&6
4612 else
4613   if test -n "$NM"; then
4614   ac_cv_prog_NM="$NM" # Let the user override the test.
4615 else
4616   ac_save_IFS=$IFS; IFS=$ac_path_separator
4617 ac_dummy="$PATH"
4618 for ac_dir in $ac_dummy; do
4619   IFS=$ac_save_IFS
4620   test -z "$ac_dir" && ac_dir=.
4621   $as_executable_p "$ac_dir/$ac_word" || continue
4622 ac_cv_prog_NM="${ac_tool_prefix}nm"
4623 echo "$as_me:4623: found $ac_dir/$ac_word" >&5
4624 break
4625 done
4626
4627 fi
4628 fi
4629 NM=$ac_cv_prog_NM
4630 if test -n "$NM"; then
4631   echo "$as_me:4631: result: $NM" >&5
4632 echo "${ECHO_T}$NM" >&6
4633 else
4634   echo "$as_me:4634: result: no" >&5
4635 echo "${ECHO_T}no" >&6
4636 fi
4637
4638 fi
4639 if test -z "$ac_cv_prog_NM"; then
4640   ac_ct_NM=$NM
4641   # Extract the first word of "nm", so it can be a program name with args.
4642 set dummy nm; ac_word=$2
4643 echo "$as_me:4643: checking for $ac_word" >&5
4644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4645 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648   if test -n "$ac_ct_NM"; then
4649   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4650 else
4651   ac_save_IFS=$IFS; IFS=$ac_path_separator
4652 ac_dummy="$PATH"
4653 for ac_dir in $ac_dummy; do
4654   IFS=$ac_save_IFS
4655   test -z "$ac_dir" && ac_dir=.
4656   $as_executable_p "$ac_dir/$ac_word" || continue
4657 ac_cv_prog_ac_ct_NM="nm"
4658 echo "$as_me:4658: found $ac_dir/$ac_word" >&5
4659 break
4660 done
4661
4662   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4663 fi
4664 fi
4665 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4666 if test -n "$ac_ct_NM"; then
4667   echo "$as_me:4667: result: $ac_ct_NM" >&5
4668 echo "${ECHO_T}$ac_ct_NM" >&6
4669 else
4670   echo "$as_me:4670: result: no" >&5
4671 echo "${ECHO_T}no" >&6
4672 fi
4673
4674   NM=$ac_ct_NM
4675 else
4676   NM="$ac_cv_prog_NM"
4677 fi
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ar; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_AR+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$AR"; then
4688   ac_cv_prog_AR="$AR" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_AR="${ac_tool_prefix}ar"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 AR=$ac_cv_prog_AR
4704 if test -n "$AR"; then
4705   echo "$as_me:4705: result: $AR" >&5
4706 echo "${ECHO_T}$AR" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_AR"; then
4714   ac_ct_AR=$AR
4715   # Extract the first word of "ar", so it can be a program name with args.
4716 set dummy ar; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_AR"; then
4723   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_AR="ar"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4737 fi
4738 fi
4739 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4740 if test -n "$ac_ct_AR"; then
4741   echo "$as_me:4741: result: $ac_ct_AR" >&5
4742 echo "${ECHO_T}$ac_ct_AR" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   AR=$ac_ct_AR
4749 else
4750   AR="$ac_cv_prog_AR"
4751 fi
4752
4753 echo "$as_me:4753: checking for options to update archives" >&5
4754 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4755 if test "${cf_cv_ar_flags+set}" = set; then
4756   echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758
4759         case $cf_cv_system_name in
4760         (*-msvc*)
4761                 cf_cv_ar_flags=''
4762                 cat >mk_static_lib.sh <<-EOF
4763                 #!$SHELL
4764                 MSVC_BIN="$AR"
4765                 out="\$1"
4766                 shift
4767                 exec \$MSVC_BIN -out:"\$out" \$@
4768                 EOF
4769                 chmod +x mk_static_lib.sh
4770                 AR=`pwd`/mk_static_lib.sh
4771                 ;;
4772         (*)
4773                 cf_cv_ar_flags=unknown
4774                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4775                 do
4776
4777                         # check if $ARFLAGS already contains this choice
4778                         if test "x$ARFLAGS" != "x" ; then
4779                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4780                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4781                                         cf_cv_ar_flags=
4782                                         break
4783                                 fi
4784                         fi
4785
4786                         rm -f conftest.$ac_cv_objext
4787                         rm -f conftest.a
4788
4789                         cat >conftest.$ac_ext <<EOF
4790 #line 4790 "configure"
4791 int     testdata[3] = { 123, 456, 789 };
4792 EOF
4793                         if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794   (eval $ac_compile) 2>&5
4795   ac_status=$?
4796   echo "$as_me:4796: \$? = $ac_status" >&5
4797   (exit $ac_status); } ; then
4798                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4799                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4800                                 if test -f conftest.a ; then
4801                                         cf_cv_ar_flags=$cf_ar_flags
4802                                         break
4803                                 fi
4804                         else
4805                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4806
4807 echo "${as_me:-configure}:4807: testing cannot compile test-program ..." 1>&5
4808
4809                                 break
4810                         fi
4811                 done
4812                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4813                 ;;
4814         esac
4815
4816 fi
4817 echo "$as_me:4817: result: $cf_cv_ar_flags" >&5
4818 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4819
4820 if test -n "$ARFLAGS" ; then
4821         if test -n "$cf_cv_ar_flags" ; then
4822                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4823         fi
4824 else
4825         ARFLAGS=$cf_cv_ar_flags
4826 fi
4827
4828 echo "$as_me:4828: checking if you have specified an install-prefix" >&5
4829 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4830
4831 # Check whether --with-install-prefix or --without-install-prefix was given.
4832 if test "${with_install_prefix+set}" = set; then
4833   withval="$with_install_prefix"
4834   case "x$withval" in
4835         (xyes|xno)
4836                 ;;
4837         (*)     DESTDIR="$withval"
4838                 ;;
4839         esac
4840 fi;
4841 echo "$as_me:4841: result: $DESTDIR" >&5
4842 echo "${ECHO_T}$DESTDIR" >&6
4843
4844 ###############################################################################
4845
4846 # If we're cross-compiling, allow the user to override the tools and their
4847 # options.  The configure script is oriented toward identifying the host
4848 # compiler, etc., but we need a build compiler to generate parts of the source.
4849
4850 case $cf_cv_system_name in
4851 (*-msvc*)
4852         LDFLAGS="$LDFLAGS user32.lib"
4853         export LDFLAGS
4854         ;;
4855 esac
4856
4857 if test "$cross_compiling" = yes ; then
4858
4859         # defaults that we might want to override
4860         : ${BUILD_CFLAGS:=''}
4861         : ${BUILD_CPPFLAGS:=''}
4862         : ${BUILD_LDFLAGS:=''}
4863         : ${BUILD_LIBS:=''}
4864         : ${BUILD_EXEEXT:='$x'}
4865         : ${BUILD_OBJEXT:='o'}
4866
4867 # Check whether --with-build-cc or --without-build-cc was given.
4868 if test "${with_build_cc+set}" = set; then
4869   withval="$with_build_cc"
4870   BUILD_CC="$withval"
4871 else
4872   for ac_prog in gcc clang c99 c89 cc cl
4873 do
4874   # Extract the first word of "$ac_prog", so it can be a program name with args.
4875 set dummy $ac_prog; ac_word=$2
4876 echo "$as_me:4876: checking for $ac_word" >&5
4877 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4878 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4879   echo $ECHO_N "(cached) $ECHO_C" >&6
4880 else
4881   if test -n "$BUILD_CC"; then
4882   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4883 else
4884   ac_save_IFS=$IFS; IFS=$ac_path_separator
4885 ac_dummy="$PATH"
4886 for ac_dir in $ac_dummy; do
4887   IFS=$ac_save_IFS
4888   test -z "$ac_dir" && ac_dir=.
4889   $as_executable_p "$ac_dir/$ac_word" || continue
4890 ac_cv_prog_BUILD_CC="$ac_prog"
4891 echo "$as_me:4891: found $ac_dir/$ac_word" >&5
4892 break
4893 done
4894
4895 fi
4896 fi
4897 BUILD_CC=$ac_cv_prog_BUILD_CC
4898 if test -n "$BUILD_CC"; then
4899   echo "$as_me:4899: result: $BUILD_CC" >&5
4900 echo "${ECHO_T}$BUILD_CC" >&6
4901 else
4902   echo "$as_me:4902: result: no" >&5
4903 echo "${ECHO_T}no" >&6
4904 fi
4905
4906   test -n "$BUILD_CC" && break
4907 done
4908 test -n "$BUILD_CC" || BUILD_CC="none"
4909
4910 fi;
4911         echo "$as_me:4911: checking for native build C compiler" >&5
4912 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4913         echo "$as_me:4913: result: $BUILD_CC" >&5
4914 echo "${ECHO_T}$BUILD_CC" >&6
4915
4916         echo "$as_me:4916: checking for native build C preprocessor" >&5
4917 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4918
4919 # Check whether --with-build-cpp or --without-build-cpp was given.
4920 if test "${with_build_cpp+set}" = set; then
4921   withval="$with_build_cpp"
4922   BUILD_CPP="$withval"
4923 else
4924   BUILD_CPP='${BUILD_CC} -E'
4925 fi;
4926         echo "$as_me:4926: result: $BUILD_CPP" >&5
4927 echo "${ECHO_T}$BUILD_CPP" >&6
4928
4929         echo "$as_me:4929: checking for native build C flags" >&5
4930 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4931
4932 # Check whether --with-build-cflags or --without-build-cflags was given.
4933 if test "${with_build_cflags+set}" = set; then
4934   withval="$with_build_cflags"
4935   BUILD_CFLAGS="$withval"
4936 fi;
4937         echo "$as_me:4937: result: $BUILD_CFLAGS" >&5
4938 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4939
4940         echo "$as_me:4940: checking for native build C preprocessor-flags" >&5
4941 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4942
4943 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4944 if test "${with_build_cppflags+set}" = set; then
4945   withval="$with_build_cppflags"
4946   BUILD_CPPFLAGS="$withval"
4947 fi;
4948         echo "$as_me:4948: result: $BUILD_CPPFLAGS" >&5
4949 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4950
4951         echo "$as_me:4951: checking for native build linker-flags" >&5
4952 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4953
4954 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4955 if test "${with_build_ldflags+set}" = set; then
4956   withval="$with_build_ldflags"
4957   BUILD_LDFLAGS="$withval"
4958 fi;
4959         echo "$as_me:4959: result: $BUILD_LDFLAGS" >&5
4960 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4961
4962         echo "$as_me:4962: checking for native build linker-libraries" >&5
4963 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4964
4965 # Check whether --with-build-libs or --without-build-libs was given.
4966 if test "${with_build_libs+set}" = set; then
4967   withval="$with_build_libs"
4968   BUILD_LIBS="$withval"
4969 fi;
4970         echo "$as_me:4970: result: $BUILD_LIBS" >&5
4971 echo "${ECHO_T}$BUILD_LIBS" >&6
4972
4973         # this assumes we're on Unix.
4974         BUILD_EXEEXT=
4975         BUILD_OBJEXT=o
4976
4977         : ${BUILD_CC:='${CC}'}
4978
4979         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4980                 { { echo "$as_me:4980: error: Cross-build requires two compilers.
4981 Use --with-build-cc to specify the native compiler." >&5
4982 echo "$as_me: error: Cross-build requires two compilers.
4983 Use --with-build-cc to specify the native compiler." >&2;}
4984    { (exit 1); exit 1; }; }
4985         fi
4986
4987 else
4988         : ${BUILD_CC:='${CC}'}
4989         : ${BUILD_CPP:='${CPP}'}
4990         : ${BUILD_CFLAGS:='${CFLAGS}'}
4991         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4992         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4993         : ${BUILD_LIBS:='${LIBS}'}
4994         : ${BUILD_EXEEXT:='$x'}
4995         : ${BUILD_OBJEXT:='o'}
4996 fi
4997
4998 ###############################################################################
4999
5000 ### Options to allow the user to specify the set of libraries which are used.
5001 ### Use "--without-normal --with-shared" to allow the default model to be
5002 ### shared, for example.
5003 cf_list_models=""
5004
5005 echo "$as_me:5005: checking if libtool -version-number should be used" >&5
5006 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5007
5008 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5009 if test "${enable_libtool_version+set}" = set; then
5010   enableval="$enable_libtool_version"
5011   test "$enableval" != no && enableval=yes
5012         if test "$enableval" != "yes" ; then
5013     cf_libtool_version=no
5014         else
5015                 cf_libtool_version=yes
5016         fi
5017 else
5018   enableval=yes
5019         cf_libtool_version=yes
5020
5021 fi;
5022 echo "$as_me:5022: result: $cf_libtool_version" >&5
5023 echo "${ECHO_T}$cf_libtool_version" >&6
5024
5025 if test "$cf_libtool_version" = yes ; then
5026         LIBTOOL_VERSION="-version-number"
5027 else
5028         LIBTOOL_VERSION="-version-info"
5029         case "x$VERSION" in
5030         (x)
5031                 { echo "$as_me:5031: WARNING: VERSION was not set" >&5
5032 echo "$as_me: WARNING: VERSION was not set" >&2;}
5033                 ;;
5034         (x*.*.*)
5035                 ABI_VERSION="$VERSION"
5036                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5037
5038 echo "${as_me:-configure}:5038: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5039
5040                 ;;
5041         (x*:*:*)
5042                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5043                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5044
5045 echo "${as_me:-configure}:5045: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5046
5047                 ;;
5048         (*)
5049                 { echo "$as_me:5049: WARNING: unexpected VERSION value: $VERSION" >&5
5050 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5051                 ;;
5052         esac
5053 fi
5054
5055 LIBTOOL=
5056
5057 # common library maintenance symbols that are convenient for libtool scripts:
5058 LIB_CREATE='${AR} -cr'
5059 LIB_OBJECT='${OBJECTS}'
5060 LIB_SUFFIX=.a
5061 LIB_PREP="$RANLIB"
5062
5063 # symbols used to prop libtool up to enable it to determine what it should be
5064 # doing:
5065 LIB_CLEAN=
5066 LIB_COMPILE=
5067 LIB_LINK='${CC}'
5068 LIB_INSTALL=
5069 LIB_UNINSTALL=
5070
5071 echo "$as_me:5071: checking if you want to build libraries with libtool" >&5
5072 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5073
5074 # Check whether --with-libtool or --without-libtool was given.
5075 if test "${with_libtool+set}" = set; then
5076   withval="$with_libtool"
5077   with_libtool=$withval
5078 else
5079   with_libtool=no
5080 fi;
5081 echo "$as_me:5081: result: $with_libtool" >&5
5082 echo "${ECHO_T}$with_libtool" >&6
5083 if test "$with_libtool" != "no"; then
5084
5085         if test "$with_libtool" != "yes" ; then
5086
5087 if test "x$prefix" != xNONE; then
5088         cf_path_syntax="$prefix"
5089 else
5090         cf_path_syntax="$ac_default_prefix"
5091 fi
5092
5093 case ".$with_libtool" in
5094 (.\$\(*\)*|.\'*\'*)
5095         ;;
5096 (..|./*|.\\*)
5097         ;;
5098 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5099         ;;
5100 (.\${*prefix}*|.\${*dir}*)
5101         eval with_libtool="$with_libtool"
5102         case ".$with_libtool" in
5103         (.NONE/*)
5104                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5105                 ;;
5106         esac
5107         ;;
5108 (.no|.NONE/*)
5109         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5110         ;;
5111 (*)
5112         { { echo "$as_me:5112: error: expected a pathname, not \"$with_libtool\"" >&5
5113 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5114    { (exit 1); exit 1; }; }
5115         ;;
5116 esac
5117
5118                 LIBTOOL=$with_libtool
5119         else
5120                 if test -n "$ac_tool_prefix"; then
5121   for ac_prog in libtool glibtool
5122   do
5123     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5124 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5125 echo "$as_me:5125: checking for $ac_word" >&5
5126 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5127 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5128   echo $ECHO_N "(cached) $ECHO_C" >&6
5129 else
5130   if test -n "$LIBTOOL"; then
5131   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5132 else
5133   ac_save_IFS=$IFS; IFS=$ac_path_separator
5134 ac_dummy="$PATH"
5135 for ac_dir in $ac_dummy; do
5136   IFS=$ac_save_IFS
5137   test -z "$ac_dir" && ac_dir=.
5138   $as_executable_p "$ac_dir/$ac_word" || continue
5139 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5140 echo "$as_me:5140: found $ac_dir/$ac_word" >&5
5141 break
5142 done
5143
5144 fi
5145 fi
5146 LIBTOOL=$ac_cv_prog_LIBTOOL
5147 if test -n "$LIBTOOL"; then
5148   echo "$as_me:5148: result: $LIBTOOL" >&5
5149 echo "${ECHO_T}$LIBTOOL" >&6
5150 else
5151   echo "$as_me:5151: result: no" >&5
5152 echo "${ECHO_T}no" >&6
5153 fi
5154
5155     test -n "$LIBTOOL" && break
5156   done
5157 fi
5158 if test -z "$LIBTOOL"; then
5159   ac_ct_LIBTOOL=$LIBTOOL
5160   for ac_prog in libtool glibtool
5161 do
5162   # Extract the first word of "$ac_prog", so it can be a program name with args.
5163 set dummy $ac_prog; ac_word=$2
5164 echo "$as_me:5164: checking for $ac_word" >&5
5165 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5166 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5167   echo $ECHO_N "(cached) $ECHO_C" >&6
5168 else
5169   if test -n "$ac_ct_LIBTOOL"; then
5170   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5171 else
5172   ac_save_IFS=$IFS; IFS=$ac_path_separator
5173 ac_dummy="$PATH"
5174 for ac_dir in $ac_dummy; do
5175   IFS=$ac_save_IFS
5176   test -z "$ac_dir" && ac_dir=.
5177   $as_executable_p "$ac_dir/$ac_word" || continue
5178 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5179 echo "$as_me:5179: found $ac_dir/$ac_word" >&5
5180 break
5181 done
5182
5183 fi
5184 fi
5185 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5186 if test -n "$ac_ct_LIBTOOL"; then
5187   echo "$as_me:5187: result: $ac_ct_LIBTOOL" >&5
5188 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5189 else
5190   echo "$as_me:5190: result: no" >&5
5191 echo "${ECHO_T}no" >&6
5192 fi
5193
5194   test -n "$ac_ct_LIBTOOL" && break
5195 done
5196 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5197
5198   LIBTOOL=$ac_ct_LIBTOOL
5199 fi
5200
5201 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5202 then
5203         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.].*//'`
5204 else
5205         cf_cv_libtool_version=
5206 fi
5207 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5208
5209                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5210                 then
5211
5212 unset ac_cv_prog_ac_ct_LIBTOOL
5213 unset ac_ct_LIBTOOL
5214 unset LIBTOOL
5215
5216                         if test -n "$ac_tool_prefix"; then
5217   for ac_prog in glibtool
5218   do
5219     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5220 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5221 echo "$as_me:5221: checking for $ac_word" >&5
5222 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5223 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5224   echo $ECHO_N "(cached) $ECHO_C" >&6
5225 else
5226   if test -n "$LIBTOOL"; then
5227   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5228 else
5229   ac_save_IFS=$IFS; IFS=$ac_path_separator
5230 ac_dummy="$PATH"
5231 for ac_dir in $ac_dummy; do
5232   IFS=$ac_save_IFS
5233   test -z "$ac_dir" && ac_dir=.
5234   $as_executable_p "$ac_dir/$ac_word" || continue
5235 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5236 echo "$as_me:5236: found $ac_dir/$ac_word" >&5
5237 break
5238 done
5239
5240 fi
5241 fi
5242 LIBTOOL=$ac_cv_prog_LIBTOOL
5243 if test -n "$LIBTOOL"; then
5244   echo "$as_me:5244: result: $LIBTOOL" >&5
5245 echo "${ECHO_T}$LIBTOOL" >&6
5246 else
5247   echo "$as_me:5247: result: no" >&5
5248 echo "${ECHO_T}no" >&6
5249 fi
5250
5251     test -n "$LIBTOOL" && break
5252   done
5253 fi
5254 if test -z "$LIBTOOL"; then
5255   ac_ct_LIBTOOL=$LIBTOOL
5256   for ac_prog in glibtool
5257 do
5258   # Extract the first word of "$ac_prog", so it can be a program name with args.
5259 set dummy $ac_prog; ac_word=$2
5260 echo "$as_me:5260: checking for $ac_word" >&5
5261 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5262 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5263   echo $ECHO_N "(cached) $ECHO_C" >&6
5264 else
5265   if test -n "$ac_ct_LIBTOOL"; then
5266   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5267 else
5268   ac_save_IFS=$IFS; IFS=$ac_path_separator
5269 ac_dummy="$PATH"
5270 for ac_dir in $ac_dummy; do
5271   IFS=$ac_save_IFS
5272   test -z "$ac_dir" && ac_dir=.
5273   $as_executable_p "$ac_dir/$ac_word" || continue
5274 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5275 echo "$as_me:5275: found $ac_dir/$ac_word" >&5
5276 break
5277 done
5278
5279 fi
5280 fi
5281 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5282 if test -n "$ac_ct_LIBTOOL"; then
5283   echo "$as_me:5283: result: $ac_ct_LIBTOOL" >&5
5284 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5285 else
5286   echo "$as_me:5286: result: no" >&5
5287 echo "${ECHO_T}no" >&6
5288 fi
5289
5290   test -n "$ac_ct_LIBTOOL" && break
5291 done
5292 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5293
5294   LIBTOOL=$ac_ct_LIBTOOL
5295 fi
5296
5297 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5298 then
5299         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.].*//'`
5300 else
5301         cf_cv_libtool_version=
5302 fi
5303 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5304
5305                 fi
5306         fi
5307         if test -z "$LIBTOOL" ; then
5308                 { { echo "$as_me:5308: error: Cannot find libtool" >&5
5309 echo "$as_me: error: Cannot find libtool" >&2;}
5310    { (exit 1); exit 1; }; }
5311         fi
5312         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5313         LIB_OBJECT='${OBJECTS:.o=.lo}'
5314         LIB_SUFFIX=.la
5315         LIB_CLEAN='${LIBTOOL} --mode=clean'
5316         LIB_COMPILE='${LIBTOOL} --mode=compile'
5317         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5318         LIB_INSTALL='${LIBTOOL} --mode=install'
5319         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5320         LIB_PREP=:
5321
5322 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5323 then
5324         echo "$as_me:5324: checking version of $LIBTOOL" >&5
5325 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5326
5327 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5328 then
5329         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.].*//'`
5330 else
5331         cf_cv_libtool_version=
5332 fi
5333 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5334
5335         echo "$as_me:5335: result: $cf_cv_libtool_version" >&5
5336 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5337         if test -z "$cf_cv_libtool_version" ; then
5338                 { { echo "$as_me:5338: error: This is not GNU libtool" >&5
5339 echo "$as_me: error: This is not GNU libtool" >&2;}
5340    { (exit 1); exit 1; }; }
5341         fi
5342 else
5343         { { echo "$as_me:5343: error: GNU libtool has not been found" >&5
5344 echo "$as_me: error: GNU libtool has not been found" >&2;}
5345    { (exit 1); exit 1; }; }
5346 fi
5347
5348         # special hack to add -no-undefined (which libtool should do for itself)
5349         LT_UNDEF=
5350         case "$cf_cv_system_name" in
5351         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5352                 LT_UNDEF=-no-undefined
5353                 ;;
5354         esac
5355
5356         # special hack to add --tag option for C++ compiler
5357         case $cf_cv_libtool_version in
5358         (1.[5-9]*|[2-9].[0-9.a-z]*)
5359                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5360                 LIBTOOL="$LIBTOOL --tag=CC"
5361                 ;;
5362         (*)
5363                 LIBTOOL_CXX="$LIBTOOL"
5364                 ;;
5365         esac
5366 else
5367         LIBTOOL=""
5368         LIBTOOL_CXX=""
5369 fi
5370
5371 test -z "$LIBTOOL" && ECHO_LT=
5372
5373 if test "$with_libtool" != "no" ; then
5374
5375 cf_list_models="$cf_list_models libtool"
5376
5377 else
5378
5379 echo "$as_me:5379: checking if you want to build shared libraries" >&5
5380 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5381
5382 # Check whether --with-shared or --without-shared was given.
5383 if test "${with_shared+set}" = set; then
5384   withval="$with_shared"
5385   with_shared=$withval
5386 else
5387   with_shared=no
5388 fi;
5389 echo "$as_me:5389: result: $with_shared" >&5
5390 echo "${ECHO_T}$with_shared" >&6
5391 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5392
5393 echo "$as_me:5393: checking if you want to build static libraries" >&5
5394 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5395
5396 # Check whether --with-normal or --without-normal was given.
5397 if test "${with_normal+set}" = set; then
5398   withval="$with_normal"
5399   with_normal=$withval
5400 else
5401   with_normal=yes
5402 fi;
5403 echo "$as_me:5403: result: $with_normal" >&5
5404 echo "${ECHO_T}$with_normal" >&6
5405 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5406
5407 echo "$as_me:5407: checking if you want to build debug libraries" >&5
5408 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5409
5410 # Check whether --with-debug or --without-debug was given.
5411 if test "${with_debug+set}" = set; then
5412   withval="$with_debug"
5413   with_debug=$withval
5414 else
5415   with_debug=yes
5416 fi;
5417 echo "$as_me:5417: result: $with_debug" >&5
5418 echo "${ECHO_T}$with_debug" >&6
5419 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5420
5421 echo "$as_me:5421: checking if you want to build profiling libraries" >&5
5422 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5423
5424 # Check whether --with-profile or --without-profile was given.
5425 if test "${with_profile+set}" = set; then
5426   withval="$with_profile"
5427   with_profile=$withval
5428 else
5429   with_profile=no
5430 fi;
5431 echo "$as_me:5431: result: $with_profile" >&5
5432 echo "${ECHO_T}$with_profile" >&6
5433 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5434
5435 fi
5436
5437 if test "X$cf_with_cxx_binding" != Xno; then
5438 if test "x$with_shared" = "xyes"; then
5439 echo "$as_me:5439: checking if you want to build C++ shared libraries" >&5
5440 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5441
5442 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5443 if test "${with_cxx_shared+set}" = set; then
5444   withval="$with_cxx_shared"
5445   with_shared_cxx=$withval
5446 else
5447   with_shared_cxx=no
5448 fi;
5449 echo "$as_me:5449: result: $with_shared_cxx" >&5
5450 echo "${ECHO_T}$with_shared_cxx" >&6
5451 fi
5452 fi
5453
5454 ###############################################################################
5455
5456 echo "$as_me:5456: checking for specified models" >&5
5457 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5458 test -z "$cf_list_models" && cf_list_models=normal
5459 test "$with_libtool" != "no" && cf_list_models=libtool
5460 echo "$as_me:5460: result: $cf_list_models" >&5
5461 echo "${ECHO_T}$cf_list_models" >&6
5462
5463 ### Use the first model as the default, and save its suffix for use in building
5464 ### up test-applications.
5465 echo "$as_me:5465: checking for default model" >&5
5466 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5467 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5468 echo "$as_me:5468: result: $DFT_LWR_MODEL" >&5
5469 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5470
5471 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5472
5473 TICS_NAME=tic
5474
5475 TINFO_NAME=tinfo
5476
5477 LIB_NAME=ncurses
5478
5479 LIB_DIR=../lib
5480 LIB_2ND=../../lib
5481
5482 echo "$as_me:5482: checking if you want to have a library-prefix" >&5
5483 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5484
5485 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5486 if test "${with_lib_prefix+set}" = set; then
5487   withval="$with_lib_prefix"
5488   with_lib_prefix=$withval
5489 else
5490   with_lib_prefix=auto
5491 fi;
5492 echo "$as_me:5492: result: $with_lib_prefix" >&5
5493 echo "${ECHO_T}$with_lib_prefix" >&6
5494
5495 if test $with_lib_prefix = auto
5496 then
5497
5498         case $cf_cv_system_name in
5499         (OS/2*|os2*)
5500                 if test "$DFT_LWR_MODEL" = libtool; then
5501                         LIB_PREFIX='lib'
5502                 else
5503                         LIB_PREFIX=''
5504                 fi
5505                 ;;
5506         (*-msvc*)
5507                 LIB_PREFIX=''
5508                 ;;
5509         (*)     LIB_PREFIX='lib'
5510                 ;;
5511         esac
5512 cf_prefix=$LIB_PREFIX
5513
5514 elif test $with_lib_prefix = no
5515 then
5516         LIB_PREFIX=
5517 else
5518         LIB_PREFIX=$with_lib_prefix
5519 fi
5520
5521 LIB_SUFFIX=
5522
5523         echo "$as_me:5523: checking for PATH separator" >&5
5524 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5525         case $cf_cv_system_name in
5526         (os2*)  PATH_SEPARATOR=';'  ;;
5527         (*)     ${PATH_SEPARATOR:=':'}  ;;
5528         esac
5529
5530         echo "$as_me:5530: result: $PATH_SEPARATOR" >&5
5531 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5532
5533 ###############################################################################
5534
5535 echo "$as_me:5535: checking if you want to build a separate terminfo library" >&5
5536 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5537
5538 # Check whether --with-termlib or --without-termlib was given.
5539 if test "${with_termlib+set}" = set; then
5540   withval="$with_termlib"
5541   with_termlib=$withval
5542 else
5543   with_termlib=no
5544 fi;
5545 echo "$as_me:5545: result: $with_termlib" >&5
5546 echo "${ECHO_T}$with_termlib" >&6
5547
5548 echo "$as_me:5548: checking if you want to build a separate tic library" >&5
5549 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5550
5551 # Check whether --with-ticlib or --without-ticlib was given.
5552 if test "${with_ticlib+set}" = set; then
5553   withval="$with_ticlib"
5554   with_ticlib=$withval
5555 else
5556   with_ticlib=no
5557 fi;
5558 echo "$as_me:5558: result: $with_ticlib" >&5
5559 echo "${ECHO_T}$with_ticlib" >&6
5560
5561 if test X"$CC_G_OPT" = X"" ; then
5562         CC_G_OPT='-g'
5563         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5564 fi
5565
5566 if test X"$CXX_G_OPT" = X"" ; then
5567         CXX_G_OPT='-g'
5568         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5569 fi
5570
5571 echo "$as_me:5571: checking for default loader flags" >&5
5572 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5573 case $DFT_LWR_MODEL in
5574 (libtool) LD_MODEL=''   ;;
5575 (normal)  LD_MODEL=''   ;;
5576 (debug)   LD_MODEL=$CC_G_OPT ;;
5577 (profile) LD_MODEL='-pg';;
5578 (shared)  LD_MODEL=''   ;;
5579 esac
5580 echo "$as_me:5580: result: $LD_MODEL" >&5
5581 echo "${ECHO_T}$LD_MODEL" >&6
5582
5583 case $DFT_LWR_MODEL in
5584 (shared)
5585
5586 echo "$as_me:5586: checking if rpath option should be used" >&5
5587 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5588
5589 # Check whether --enable-rpath or --disable-rpath was given.
5590 if test "${enable_rpath+set}" = set; then
5591   enableval="$enable_rpath"
5592   cf_cv_enable_rpath=$enableval
5593 else
5594   cf_cv_enable_rpath=no
5595 fi;
5596 echo "$as_me:5596: result: $cf_cv_enable_rpath" >&5
5597 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5598
5599 echo "$as_me:5599: checking if shared libraries should be relinked during install" >&5
5600 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5601
5602 # Check whether --enable-relink or --disable-relink was given.
5603 if test "${enable_relink+set}" = set; then
5604   enableval="$enable_relink"
5605   cf_cv_do_relink=$enableval
5606 else
5607   cf_cv_do_relink=yes
5608 fi;
5609 echo "$as_me:5609: result: $cf_cv_do_relink" >&5
5610 echo "${ECHO_T}$cf_cv_do_relink" >&6
5611         ;;
5612 esac
5613
5614 # we will build libraries one-level down.
5615 rel_builddir=..
5616
5617 LD_RPATH_OPT=
5618 if test "x$cf_cv_enable_rpath" != xno
5619 then
5620         echo "$as_me:5620: checking for an rpath option" >&5
5621 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5622         case $cf_cv_system_name in
5623         (irix*)
5624                 if test "$GCC" = yes; then
5625                         LD_RPATH_OPT="-Wl,-rpath,"
5626                 else
5627                         LD_RPATH_OPT="-rpath "
5628                 fi
5629                 ;;
5630         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5631                 LD_RPATH_OPT="-Wl,-rpath,"
5632                 ;;
5633         (openbsd[2-9].*|mirbsd*)
5634                 LD_RPATH_OPT="-Wl,-rpath,"
5635                 ;;
5636         (dragonfly*)
5637                 LD_RPATH_OPT="-rpath "
5638                 ;;
5639         (netbsd*)
5640                 LD_RPATH_OPT="-Wl,-rpath,"
5641                 ;;
5642         (osf*|mls+*)
5643                 LD_RPATH_OPT="-rpath "
5644                 ;;
5645         (solaris2*)
5646                 LD_RPATH_OPT="-R"
5647                 ;;
5648         (*)
5649                 ;;
5650         esac
5651         echo "$as_me:5651: result: $LD_RPATH_OPT" >&5
5652 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5653
5654         case "x$LD_RPATH_OPT" in
5655         (x-R*)
5656                 echo "$as_me:5656: checking if we need a space after rpath option" >&5
5657 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5658                 cf_save_LIBS="$LIBS"
5659
5660 cf_add_libs="$LIBS"
5661 # reverse order
5662 cf_add_0lib=
5663 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5664 # filter duplicates
5665 for cf_add_1lib in $cf_add_0lib; do
5666         for cf_add_2lib in $cf_add_libs; do
5667                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5668                         cf_add_1lib=
5669                         break
5670                 fi
5671         done
5672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5673 done
5674 LIBS="$cf_add_libs"
5675
5676                 cat >conftest.$ac_ext <<_ACEOF
5677 #line 5677 "configure"
5678 #include "confdefs.h"
5679
5680 int
5681 main (void)
5682 {
5683
5684   ;
5685   return 0;
5686 }
5687 _ACEOF
5688 rm -f conftest.$ac_objext conftest$ac_exeext
5689 if { (eval echo "$as_me:5689: \"$ac_link\"") >&5
5690   (eval $ac_link) 2>&5
5691   ac_status=$?
5692   echo "$as_me:5692: \$? = $ac_status" >&5
5693   (exit $ac_status); } &&
5694          { ac_try='test -s conftest$ac_exeext'
5695   { (eval echo "$as_me:5695: \"$ac_try\"") >&5
5696   (eval $ac_try) 2>&5
5697   ac_status=$?
5698   echo "$as_me:5698: \$? = $ac_status" >&5
5699   (exit $ac_status); }; }; then
5700   cf_rpath_space=no
5701 else
5702   echo "$as_me: failed program was:" >&5
5703 cat conftest.$ac_ext >&5
5704 cf_rpath_space=yes
5705 fi
5706 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5707                 LIBS="$cf_save_LIBS"
5708                 echo "$as_me:5708: result: $cf_rpath_space" >&5
5709 echo "${ECHO_T}$cf_rpath_space" >&6
5710                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5711                 ;;
5712         esac
5713 fi
5714
5715         RM_SHARED_OPTS=
5716         LOCAL_LDFLAGS=
5717         LOCAL_LDFLAGS2=
5718         LD_SHARED_OPTS=
5719         INSTALL_LIB="-m 644"
5720         : ${rel_builddir:=.}
5721
5722         shlibdir=$libdir
5723
5724         MAKE_DLLS="#"
5725
5726         cf_cv_do_symlinks=no
5727         cf_ld_rpath_opt=
5728         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5729
5730         echo "$as_me:5730: checking if release/abi version should be used for shared libs" >&5
5731 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5732
5733 # Check whether --with-shlib-version or --without-shlib-version was given.
5734 if test "${with_shlib_version+set}" = set; then
5735   withval="$with_shlib_version"
5736   test -z "$withval" && withval=auto
5737         case $withval in
5738         (yes)
5739                 cf_cv_shlib_version=auto
5740                 ;;
5741         (rel|abi|auto)
5742                 cf_cv_shlib_version=$withval
5743                 ;;
5744         (*)
5745                 echo "$as_me:5745: result: $withval" >&5
5746 echo "${ECHO_T}$withval" >&6
5747                 { { echo "$as_me:5747: error: option value must be one of: rel, abi, or auto" >&5
5748 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5749    { (exit 1); exit 1; }; }
5750                 ;;
5751         esac
5752
5753 else
5754   cf_cv_shlib_version=auto
5755 fi;
5756         echo "$as_me:5756: result: $cf_cv_shlib_version" >&5
5757 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5758
5759         cf_cv_rm_so_locs=no
5760         cf_try_cflags=
5761
5762         # Some less-capable ports of gcc support only -fpic
5763         CC_SHARED_OPTS=
5764
5765         cf_try_fPIC=no
5766         if test "$GCC" = yes
5767         then
5768                 cf_try_fPIC=yes
5769         else
5770                 case $cf_cv_system_name in
5771                 (*linux*)       # e.g., PGI compiler
5772                         cf_try_fPIC=yes
5773                         ;;
5774                 esac
5775         fi
5776
5777         if test "$cf_try_fPIC" = yes
5778         then
5779                 echo "$as_me:5779: checking which $CC option to use" >&5
5780 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5781                 cf_save_CFLAGS="$CFLAGS"
5782                 for CC_SHARED_OPTS in -fPIC -fpic ''
5783                 do
5784                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5785                         cat >conftest.$ac_ext <<_ACEOF
5786 #line 5786 "configure"
5787 #include "confdefs.h"
5788 #include <stdio.h>
5789 int
5790 main (void)
5791 {
5792 int x = 1
5793   ;
5794   return 0;
5795 }
5796 _ACEOF
5797 rm -f conftest.$ac_objext
5798 if { (eval echo "$as_me:5798: \"$ac_compile\"") >&5
5799   (eval $ac_compile) 2>&5
5800   ac_status=$?
5801   echo "$as_me:5801: \$? = $ac_status" >&5
5802   (exit $ac_status); } &&
5803          { ac_try='test -s conftest.$ac_objext'
5804   { (eval echo "$as_me:5804: \"$ac_try\"") >&5
5805   (eval $ac_try) 2>&5
5806   ac_status=$?
5807   echo "$as_me:5807: \$? = $ac_status" >&5
5808   (exit $ac_status); }; }; then
5809   break
5810 else
5811   echo "$as_me: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5813 fi
5814 rm -f conftest.$ac_objext conftest.$ac_ext
5815                 done
5816                 echo "$as_me:5816: result: $CC_SHARED_OPTS" >&5
5817 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5818                 CFLAGS="$cf_save_CFLAGS"
5819         fi
5820
5821         cf_cv_shlib_version_infix=no
5822
5823         case $cf_cv_system_name in
5824         (aix4.3-9*|aix[5-7]*)
5825                 if test "$GCC" = yes; then
5826                         CC_SHARED_OPTS='-Wl,-brtl'
5827                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5828                 else
5829                         CC_SHARED_OPTS='-brtl'
5830                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5832                 fi
5833                 ;;
5834         (beos*)
5835                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5836                 ;;
5837         (cygwin*)
5838                 CC_SHARED_OPTS=
5839                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5840                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5841                 cf_cv_shlib_version=cygdll
5842                 cf_cv_shlib_version_infix=cygdll
5843                 shlibdir=$bindir
5844                 MAKE_DLLS=
5845                 cat >mk_shared_lib.sh <<-CF_EOF
5846                 #!$SHELL
5847                 SHARED_LIB=\$1
5848                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5849                 shift
5850                 cat <<-EOF
5851                 Linking shared library
5852                 ** SHARED_LIB \$SHARED_LIB
5853                 ** IMPORT_LIB \$IMPORT_LIB
5854 EOF
5855                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5856 CF_EOF
5857                 chmod +x mk_shared_lib.sh
5858                 ;;
5859         (msys*)
5860                 CC_SHARED_OPTS=
5861                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5862                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5863                 cf_cv_shlib_version=msysdll
5864                 cf_cv_shlib_version_infix=msysdll
5865                 shlibdir=$bindir
5866                 MAKE_DLLS=
5867                 cat >mk_shared_lib.sh <<-CF_EOF
5868                 #!$SHELL
5869                 SHARED_LIB=\$1
5870                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5871                 shift
5872                 cat <<-EOF
5873                 Linking shared library
5874                 ** SHARED_LIB \$SHARED_LIB
5875                 ** IMPORT_LIB \$IMPORT_LIB
5876 EOF
5877                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5878 CF_EOF
5879                 chmod +x mk_shared_lib.sh
5880                 ;;
5881         (darwin*)
5882                 cf_try_cflags="no-cpp-precomp"
5883                 CC_SHARED_OPTS="-dynamic"
5884                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5885                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5886                 cf_cv_shlib_version_infix=yes
5887                 echo "$as_me:5887: checking if ld -search_paths_first works" >&5
5888 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5889 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5890   echo $ECHO_N "(cached) $ECHO_C" >&6
5891 else
5892
5893                         cf_save_LDFLAGS=$LDFLAGS
5894                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5895                         cat >conftest.$ac_ext <<_ACEOF
5896 #line 5896 "configure"
5897 #include "confdefs.h"
5898
5899 int
5900 main (void)
5901 {
5902 int i;
5903   ;
5904   return 0;
5905 }
5906 _ACEOF
5907 rm -f conftest.$ac_objext conftest$ac_exeext
5908 if { (eval echo "$as_me:5908: \"$ac_link\"") >&5
5909   (eval $ac_link) 2>&5
5910   ac_status=$?
5911   echo "$as_me:5911: \$? = $ac_status" >&5
5912   (exit $ac_status); } &&
5913          { ac_try='test -s conftest$ac_exeext'
5914   { (eval echo "$as_me:5914: \"$ac_try\"") >&5
5915   (eval $ac_try) 2>&5
5916   ac_status=$?
5917   echo "$as_me:5917: \$? = $ac_status" >&5
5918   (exit $ac_status); }; }; then
5919   cf_cv_ldflags_search_paths_first=yes
5920 else
5921   echo "$as_me: failed program was:" >&5
5922 cat conftest.$ac_ext >&5
5923 cf_cv_ldflags_search_paths_first=no
5924 fi
5925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5926                                 LDFLAGS=$cf_save_LDFLAGS
5927 fi
5928 echo "$as_me:5928: result: $cf_cv_ldflags_search_paths_first" >&5
5929 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5930                 if test $cf_cv_ldflags_search_paths_first = yes; then
5931                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5932                 fi
5933                 ;;
5934         (hpux[7-8]*)
5935                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5936                 if test "$GCC" != yes; then
5937                         CC_SHARED_OPTS='+Z'
5938                 fi
5939                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5940                 INSTALL_LIB="-m 555"
5941                 ;;
5942         (hpux*)
5943                 # (tested with gcc 2.7.2 -- I don't have c89)
5944                 if test "$GCC" = yes; then
5945                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5946                 else
5947                         CC_SHARED_OPTS='+Z'
5948                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5949                 fi
5950                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5951                 # HP-UX shared libraries must be executable, and should be
5952                 # readonly to exploit a quirk in the memory manager.
5953                 INSTALL_LIB="-m 555"
5954                 ;;
5955         (interix*)
5956                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5957                 if test "$cf_cv_shlib_version" = rel; then
5958                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5959                 else
5960                         cf_shared_soname='`basename $@`'
5961                 fi
5962                 CC_SHARED_OPTS=
5963                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5964                 ;;
5965         (irix*)
5966                 if test "$cf_cv_enable_rpath" = yes ; then
5967                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5968                 fi
5969                 # tested with IRIX 5.2 and 'cc'.
5970                 if test "$GCC" != yes; then
5971                         CC_SHARED_OPTS='-KPIC'
5972                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5973                 else
5974                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5975                 fi
5976                 cf_cv_rm_so_locs=yes
5977                 ;;
5978         (linux*|gnu*|k*bsd*-gnu)
5979                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5980                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5981                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5982                 fi
5983                 if test "$cf_cv_enable_rpath" = yes ; then
5984                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5985                 fi
5986
5987         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5988         if test "$cf_cv_shlib_version" = rel; then
5989                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5990         else
5991                 cf_cv_shared_soname='`basename $@`'
5992         fi
5993
5994                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5995                 ;;
5996         (mingw*msvc*)
5997                 cf_cv_shlib_version=msvcdll
5998                 cf_cv_shlib_version_infix=msvcdll
5999                 shlibdir=$bindir
6000                 MAKE_DLLS=
6001                 if test "$DFT_LWR_MODEL" = "shared" ; then
6002                         LOCAL_LDFLAGS="-link -dll"
6003                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6004                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6005                 fi
6006                 CC_SHARED_OPTS=
6007                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6008                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6009                 cat >mk_shared_lib.sh <<-CF_EOF
6010                 #!$SHELL
6011                 SHARED_LIB=\$1
6012                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6013                 shift
6014                 my_ld=\$1
6015                 shift
6016                 cat <<-EOF
6017                 Linking shared library
6018                 ** SHARED LIB \$SHARED_LIB
6019                 ** IMPORT_LIB \$IMPORT_LIB
6020 EOF
6021                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6022                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6023                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6024 CF_EOF
6025                 chmod +x mk_shared_lib.sh
6026                 cat >mk_prog.sh <<-CF_EOF
6027                 #!$SHELL
6028                 shift
6029                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6030                 LD="$LD"
6031                 clopts=()
6032                 ldopts=("/subsystem:console")
6033                 libs=()
6034                 isdll=0
6035                 while test \$# -gt 0; do
6036                         case "\$1" in
6037                                 -link)
6038                                         # ignore -link argument
6039                                         ;;
6040                                 -dll)
6041                                         isdll=1
6042                                         ;;
6043                                 -W* | -w*)
6044                                         # ignore warnings
6045                                         ;;
6046                                 -D*)
6047                                         clopts+=("\$1")
6048                                         ;;
6049                                 -I*)
6050                                         clopts+=("\$1")
6051                                         ;;
6052                                 -l*)
6053                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6054                                         ;;
6055                                 -L*)
6056                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6057                                         ;;
6058                                 *.obj | *.o)
6059                                         ldopts+=("\$1")
6060                                         ;;
6061                                 -Wl,*)
6062                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6063                                                 ldopts+=("\${linkarg}")
6064                                         done
6065                                         ;;
6066                                 *.lib)
6067                                         ldopts+=("\$1")
6068                                         ;;
6069                                 -o)
6070                                         shift
6071                                         ldopts+=("-out:\$1")
6072                                         ;;
6073                                 *)
6074                                         clopts+=("\$1")
6075                                         ldopts+=("\$1")
6076                                         ;;
6077                         esac
6078                         shift
6079                 done
6080                 if [ "\$isdll" -ne 0 ]; then
6081                         for lib in \${libs[*]}; do
6082                                 ldopts+=("\$lib.dll.lib")
6083                         done
6084                 else
6085                         for lib in \${libs[*]}; do
6086                                 ldopts+=("\$lib.lib")
6087                         done
6088                 fi
6089                 cat <<-EOF
6090                 Creating program
6091                 ** ld options:   "\${ldopts[@]}"
6092 EOF
6093                 exec \$LD \${ldopts[@]}
6094 CF_EOF
6095                 chmod +x mk_prog.sh
6096                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6097                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6098                 ;;
6099         (mingw*)
6100                 cf_cv_shlib_version=mingw
6101                 cf_cv_shlib_version_infix=mingw
6102                 shlibdir=$bindir
6103                 MAKE_DLLS=
6104                 if test "$DFT_LWR_MODEL" = "shared" ; then
6105                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6106                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6107                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6108                 fi
6109                 CC_SHARED_OPTS=
6110                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6111                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6112                 cat >mk_shared_lib.sh <<-CF_EOF
6113                 #!$SHELL
6114                 SHARED_LIB=\$1
6115                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6116                 shift
6117                 cat <<-EOF
6118                 Linking shared library
6119                 ** SHARED_LIB \$SHARED_LIB
6120                 ** IMPORT_LIB \$IMPORT_LIB
6121 EOF
6122                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6123 CF_EOF
6124                 chmod +x mk_shared_lib.sh
6125                 ;;
6126         (openbsd[2-9].*|mirbsd*)
6127                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6128                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6129                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6130                 fi
6131                 if test "$cf_cv_enable_rpath" = yes ; then
6132                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6133                 fi
6134                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6135
6136         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6137         if test "$cf_cv_shlib_version" = rel; then
6138                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6139         else
6140                 cf_cv_shared_soname='`basename $@`'
6141         fi
6142
6143                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6144                 ;;
6145         (nto-qnx*|openbsd*|freebsd[12].*)
6146                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6147                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6148                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6149                 ;;
6150         (dragonfly*|freebsd*)
6151                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6152                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6153                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6154                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6155                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6156                 fi
6157
6158         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6159         if test "$cf_cv_shlib_version" = rel; then
6160                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6161         else
6162                 cf_cv_shared_soname='`basename $@`'
6163         fi
6164
6165                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6166                 ;;
6167         (netbsd*)
6168                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6169                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6170                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6171                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6172                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6173                         if test "$cf_cv_shlib_version" = auto; then
6174                         if test -f /usr/libexec/ld.elf_so; then
6175                                 cf_cv_shlib_version=abi
6176                         else
6177                                 cf_cv_shlib_version=rel
6178                         fi
6179                         fi
6180
6181         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6182         if test "$cf_cv_shlib_version" = rel; then
6183                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6184         else
6185                 cf_cv_shared_soname='`basename $@`'
6186         fi
6187
6188                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6189                 else
6190                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6191                 fi
6192                 ;;
6193         (osf*|mls+*)
6194                 # tested with OSF/1 V3.2 and 'cc'
6195                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6196                 # link with shared libs).
6197                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6198                 case $host_os in
6199                 (osf4*)
6200                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6201                         ;;
6202                 esac
6203                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6204                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6205                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6206                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6207                 fi
6208                 cf_cv_rm_so_locs=yes
6209                 ;;
6210         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6211                 # tested with osr5.0.5
6212                 if test "$GCC" != yes; then
6213                         CC_SHARED_OPTS='-belf -KPIC'
6214                 fi
6215                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6216                 if test "$cf_cv_enable_rpath" = yes ; then
6217                         # only way is to set LD_RUN_PATH but no switch for it
6218                         RUN_PATH=$libdir
6219                 fi
6220                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6221                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6222                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6223                 ;;
6224         (sunos4*)
6225                 # tested with SunOS 4.1.1 and gcc 2.7.0
6226                 if test "$GCC" != yes; then
6227                         CC_SHARED_OPTS='-KPIC'
6228                 fi
6229                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6230                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6231                 ;;
6232         (solaris2*)
6233                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6234                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6235                 if test "$DFT_LWR_MODEL" = "shared" ; then
6236                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6237                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6238                 fi
6239                 if test "$cf_cv_enable_rpath" = yes ; then
6240                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6241                 fi
6242
6243         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6244         if test "$cf_cv_shlib_version" = rel; then
6245                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6246         else
6247                 cf_cv_shared_soname='`basename $@`'
6248         fi
6249
6250                 if test "$GCC" != yes; then
6251                         cf_save_CFLAGS="$CFLAGS"
6252                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6253                         do
6254                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6255                                 cat >conftest.$ac_ext <<_ACEOF
6256 #line 6256 "configure"
6257 #include "confdefs.h"
6258 #include <stdio.h>
6259 int
6260 main (void)
6261 {
6262 printf("Hello\n");
6263   ;
6264   return 0;
6265 }
6266 _ACEOF
6267 rm -f conftest.$ac_objext
6268 if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269   (eval $ac_compile) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit $ac_status); } &&
6273          { ac_try='test -s conftest.$ac_objext'
6274   { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275   (eval $ac_try) 2>&5
6276   ac_status=$?
6277   echo "$as_me:6277: \$? = $ac_status" >&5
6278   (exit $ac_status); }; }; then
6279   break
6280 else
6281   echo "$as_me: failed program was:" >&5
6282 cat conftest.$ac_ext >&5
6283 fi
6284 rm -f conftest.$ac_objext conftest.$ac_ext
6285                         done
6286                         CFLAGS="$cf_save_CFLAGS"
6287                         CC_SHARED_OPTS=$cf_shared_opts
6288                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6289                 else
6290                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6291                 fi
6292                 ;;
6293         (sysv5uw7*|unix_sv*)
6294                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6295                 if test "$GCC" != yes; then
6296                         CC_SHARED_OPTS='-KPIC'
6297                 fi
6298                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6299                 ;;
6300         (*)
6301                 CC_SHARED_OPTS='unknown'
6302                 MK_SHARED_LIB='echo unknown'
6303                 ;;
6304         esac
6305
6306         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6307         case "$cf_cv_shlib_version" in
6308         (rel|abi)
6309                 case "$MK_SHARED_LIB" in
6310                 (*'-o $@')
6311                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6312                         ;;
6313                 (*)
6314                         { echo "$as_me:6314: WARNING: ignored --with-shlib-version" >&5
6315 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6316                         ;;
6317                 esac
6318                 ;;
6319         esac
6320
6321         if test -n "$cf_try_cflags"
6322         then
6323 cat > conftest.$ac_ext <<EOF
6324 #line 6324 "${as_me:-configure}"
6325 #include <stdio.h>
6326 int main(int argc, char *argv[])
6327 {
6328         printf("hello\n");
6329         return (argv[argc-1] == 0) ;
6330 }
6331 EOF
6332                 cf_save_CFLAGS="$CFLAGS"
6333                 for cf_opt in $cf_try_cflags
6334                 do
6335                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6336                         echo "$as_me:6336: checking if CFLAGS option -$cf_opt works" >&5
6337 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6338                         if { (eval echo "$as_me:6338: \"$ac_compile\"") >&5
6339   (eval $ac_compile) 2>&5
6340   ac_status=$?
6341   echo "$as_me:6341: \$? = $ac_status" >&5
6342   (exit $ac_status); }; then
6343                                 echo "$as_me:6343: result: yes" >&5
6344 echo "${ECHO_T}yes" >&6
6345                                 cf_save_CFLAGS="$CFLAGS"
6346                         else
6347                                 echo "$as_me:6347: result: no" >&5
6348 echo "${ECHO_T}no" >&6
6349                         fi
6350                 done
6351                 CFLAGS="$cf_save_CFLAGS"
6352         fi
6353
6354         # RPATH_LIST is a colon-separated list of directories
6355         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6356         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6357
6358         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6359
6360         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6361
6362 echo "${as_me:-configure}:6362: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6363
6364         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6365
6366 echo "${as_me:-configure}:6366: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6367
6368 for model in $cf_list_models; do
6369         case $model in
6370         (libtool)
6371
6372 echo "$as_me:6372: checking for additional libtool options" >&5
6373 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6374
6375 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6376 if test "${with_libtool_opts+set}" = set; then
6377   withval="$with_libtool_opts"
6378   with_libtool_opts=$withval
6379 else
6380   with_libtool_opts=no
6381 fi;
6382 echo "$as_me:6382: result: $with_libtool_opts" >&5
6383 echo "${ECHO_T}$with_libtool_opts" >&6
6384
6385 case .$with_libtool_opts in
6386 (.yes|.no|.)
6387         ;;
6388 (*)
6389         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6390         ;;
6391 esac
6392
6393 echo "$as_me:6393: checking if exported-symbols file should be used" >&5
6394 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6395
6396 # Check whether --with-export-syms or --without-export-syms was given.
6397 if test "${with_export_syms+set}" = set; then
6398   withval="$with_export_syms"
6399   with_export_syms=$withval
6400 else
6401   with_export_syms=no
6402 fi;
6403 if test "x$with_export_syms" = xyes
6404 then
6405         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6406
6407 fi
6408 echo "$as_me:6408: result: $with_export_syms" >&5
6409 echo "${ECHO_T}$with_export_syms" >&6
6410 if test "x$with_export_syms" != xno
6411 then
6412         EXPORT_SYMS="-export-symbols $with_export_syms"
6413
6414 fi
6415
6416                 ;;
6417         (shared)
6418                 if test "$CC_SHARED_OPTS" = "unknown"; then
6419                         { { echo "$as_me:6419: error: Shared libraries are not supported in this version" >&5
6420 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6421    { (exit 1); exit 1; }; }
6422                 fi
6423                 # workaround for inept transition to PIE vs PIC...
6424                 echo "$as_me:6424: checking if current CFLAGS link properly" >&5
6425 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6426                 cat >conftest.$ac_ext <<_ACEOF
6427 #line 6427 "configure"
6428 #include "confdefs.h"
6429 #include <stdio.h>
6430 int
6431 main (void)
6432 {
6433 printf("Hello work\n");
6434   ;
6435   return 0;
6436 }
6437 _ACEOF
6438 rm -f conftest.$ac_objext conftest$ac_exeext
6439 if { (eval echo "$as_me:6439: \"$ac_link\"") >&5
6440   (eval $ac_link) 2>&5
6441   ac_status=$?
6442   echo "$as_me:6442: \$? = $ac_status" >&5
6443   (exit $ac_status); } &&
6444          { ac_try='test -s conftest$ac_exeext'
6445   { (eval echo "$as_me:6445: \"$ac_try\"") >&5
6446   (eval $ac_try) 2>&5
6447   ac_status=$?
6448   echo "$as_me:6448: \$? = $ac_status" >&5
6449   (exit $ac_status); }; }; then
6450   cf_cflags_work=yes
6451 else
6452   echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454 cf_cflags_work=no
6455 fi
6456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6457                 echo "$as_me:6457: result: $cf_cflags_work" >&5
6458 echo "${ECHO_T}$cf_cflags_work" >&6
6459                 if test "$cf_cflags_work" = no
6460                 then
6461                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6462
6463 echo "${as_me:-configure}:6463: testing try to work around by appending shared-options ..." 1>&5
6464
6465                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6466                 fi
6467
6468 echo "$as_me:6468: checking if versioned-symbols file should be used" >&5
6469 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6470
6471 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6472 if test "${with_versioned_syms+set}" = set; then
6473   withval="$with_versioned_syms"
6474   with_versioned_syms=$withval
6475 else
6476   with_versioned_syms=no
6477 fi;
6478 case "x$with_versioned_syms" in
6479 (xyes)
6480         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6481
6482         ;;
6483 (xno)
6484         ;;
6485 (x/*)
6486         test -f "$with_versioned_syms" || { { echo "$as_me:6486: error: expected a filename: $with_versioned_syms" >&5
6487 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6488    { (exit 1); exit 1; }; }
6489         ;;
6490 (*)
6491         test -f "$with_versioned_syms" || { { echo "$as_me:6491: error: expected a filename: $with_versioned_syms" >&5
6492 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6493    { (exit 1); exit 1; }; }
6494         with_versioned_syms=`pwd`/"$with_versioned_syms"
6495         ;;
6496 esac
6497 echo "$as_me:6497: result: $with_versioned_syms" >&5
6498 echo "${ECHO_T}$with_versioned_syms" >&6
6499
6500 RESULTING_SYMS=
6501 VERSIONED_SYMS=
6502 WILDCARD_SYMS=
6503
6504 if test "x$with_versioned_syms" != xno
6505 then
6506         RESULTING_SYMS=$with_versioned_syms
6507         case "x$MK_SHARED_LIB" in
6508         (*-Wl,*)
6509                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6511                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6514
6515                 ;;
6516         (*-dy\ *)
6517                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6518                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6519                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6520
6521 echo "${as_me:-configure}:6521: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6522
6523                 ;;
6524         (*)
6525                 { echo "$as_me:6525: WARNING: this system does not support versioned-symbols" >&5
6526 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6527                 ;;
6528         esac
6529
6530         # Linux ld can selectively override scope, e.g., of symbols beginning with
6531         # "_" by first declaring some as global, and then using a wildcard to
6532         # declare the others as local.  Some other loaders cannot do this.  Check
6533         # by constructing a (very) simple shared library and inspecting its
6534         # symbols.
6535         if test "x$VERSIONED_SYMS" != "x"
6536         then
6537                 echo "$as_me:6537: checking if wildcards can be used to selectively omit symbols" >&5
6538 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6539                 WILDCARD_SYMS=no
6540
6541                 # make sources
6542                 rm -f conftest.*
6543
6544                 cat >conftest.ver <<EOF
6545 module_1.0 {
6546 global:
6547         globalf1;
6548 local:
6549         localf1;
6550 };
6551 module_2.0 {
6552 global:
6553         globalf2;
6554 local:
6555         localf2;
6556         _*;
6557 } module_1.0;
6558 submodule_1.0 {
6559 global:
6560         subglobalf1;
6561         _ismissing;
6562 local:
6563         sublocalf1;
6564 };
6565 submodule_2.0 {
6566 global:
6567         subglobalf2;
6568 local:
6569         sublocalf2;
6570         _*;
6571 } submodule_1.0;
6572 EOF
6573                 cat >conftest.$ac_ext <<EOF
6574 #line 6574 "configure"
6575 int     _ismissing(void) { return 1; }
6576 int     _localf1(void) { return 1; }
6577 int     _localf2(void) { return 2; }
6578 int     globalf1(void) { return 1; }
6579 int     globalf2(void) { return 2; }
6580 int     _sublocalf1(void) { return 1; }
6581 int     _sublocalf2(void) { return 2; }
6582 int     subglobalf1(void) { return 1; }
6583 int     subglobalf2(void) { return 2; }
6584 EOF
6585                 cat >conftest.mk <<EOF
6586 CC=${CC}
6587 CFLAGS=${CFLAGS}
6588 CPPFLAGS=${CPPFLAGS}
6589 LDFLAGS=${LDFLAGS}
6590 LIBS=${LIBS}
6591 VERSIONED_SYMS=${VERSIONED_SYMS}
6592 RESULTING_SYMS=conftest.ver
6593 MK_SHARED_LIB=${MK_SHARED_LIB}
6594 conftest.so: conftest.$ac_cv_objext
6595                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6596 EOF
6597
6598                 # compile source, make library
6599                 if make -f conftest.mk 2>&5 >/dev/null
6600                 then
6601                         # test for missing symbol in either Data or Text section
6602                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6603                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6604                 fi
6605                 echo "$as_me:6605: result: $WILDCARD_SYMS" >&5
6606 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6607                 rm -f conftest.*
6608         fi
6609 fi
6610
6611                 ;;
6612         esac
6613 done
6614
6615 ### Checks for special libraries, must be done up-front.
6616 SHLIB_LIST=""
6617
6618 echo "$as_me:6618: checking if you want to link with the GPM mouse library" >&5
6619 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6620
6621 # Check whether --with-gpm or --without-gpm was given.
6622 if test "${with_gpm+set}" = set; then
6623   withval="$with_gpm"
6624   with_gpm=$withval
6625 else
6626   with_gpm=maybe
6627 fi;
6628 echo "$as_me:6628: result: $with_gpm" >&5
6629 echo "${ECHO_T}$with_gpm" >&6
6630
6631 if test "$with_gpm" != no ; then
6632         echo "$as_me:6632: checking for gpm.h" >&5
6633 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6634 if test "${ac_cv_header_gpm_h+set}" = set; then
6635   echo $ECHO_N "(cached) $ECHO_C" >&6
6636 else
6637   cat >conftest.$ac_ext <<_ACEOF
6638 #line 6638 "configure"
6639 #include "confdefs.h"
6640 #include <gpm.h>
6641 _ACEOF
6642 if { (eval echo "$as_me:6642: \"$ac_cpp conftest.$ac_ext\"") >&5
6643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6644   ac_status=$?
6645   egrep -v '^ *\+' conftest.er1 >conftest.err
6646   rm -f conftest.er1
6647   cat conftest.err >&5
6648   echo "$as_me:6648: \$? = $ac_status" >&5
6649   (exit $ac_status); } >/dev/null; then
6650   if test -s conftest.err; then
6651     ac_cpp_err=$ac_c_preproc_warn_flag
6652   else
6653     ac_cpp_err=
6654   fi
6655 else
6656   ac_cpp_err=yes
6657 fi
6658 if test -z "$ac_cpp_err"; then
6659   ac_cv_header_gpm_h=yes
6660 else
6661   echo "$as_me: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   ac_cv_header_gpm_h=no
6664 fi
6665 rm -f conftest.err conftest.$ac_ext
6666 fi
6667 echo "$as_me:6667: result: $ac_cv_header_gpm_h" >&5
6668 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6669 if test $ac_cv_header_gpm_h = yes; then
6670
6671 cat >>confdefs.h <<\EOF
6672 #define HAVE_GPM_H 1
6673 EOF
6674
6675                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6676                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6677
6678 echo "${as_me:-configure}:6678: testing assuming we really have GPM library ..." 1>&5
6679
6680 cat >>confdefs.h <<\EOF
6681 #define HAVE_LIBGPM 1
6682 EOF
6683
6684                         with_gpm=yes
6685                 else
6686                         echo "$as_me:6686: checking for Gpm_Open in -lgpm" >&5
6687 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6688 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6689   echo $ECHO_N "(cached) $ECHO_C" >&6
6690 else
6691   ac_check_lib_save_LIBS=$LIBS
6692 LIBS="-lgpm  $LIBS"
6693 cat >conftest.$ac_ext <<_ACEOF
6694 #line 6694 "configure"
6695 #include "confdefs.h"
6696
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 #ifdef __cplusplus
6699 extern "C"
6700 #endif
6701 /* We use char because int might match the return type of a gcc2
6702    builtin and then its argument prototype would still apply.  */
6703 char Gpm_Open ();
6704 int
6705 main (void)
6706 {
6707 Gpm_Open ();
6708   ;
6709   return 0;
6710 }
6711 _ACEOF
6712 rm -f conftest.$ac_objext conftest$ac_exeext
6713 if { (eval echo "$as_me:6713: \"$ac_link\"") >&5
6714   (eval $ac_link) 2>&5
6715   ac_status=$?
6716   echo "$as_me:6716: \$? = $ac_status" >&5
6717   (exit $ac_status); } &&
6718          { ac_try='test -s conftest$ac_exeext'
6719   { (eval echo "$as_me:6719: \"$ac_try\"") >&5
6720   (eval $ac_try) 2>&5
6721   ac_status=$?
6722   echo "$as_me:6722: \$? = $ac_status" >&5
6723   (exit $ac_status); }; }; then
6724   ac_cv_lib_gpm_Gpm_Open=yes
6725 else
6726   echo "$as_me: failed program was:" >&5
6727 cat conftest.$ac_ext >&5
6728 ac_cv_lib_gpm_Gpm_Open=no
6729 fi
6730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6731 LIBS=$ac_check_lib_save_LIBS
6732 fi
6733 echo "$as_me:6733: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6734 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6735 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6736   with_gpm=yes
6737 else
6738
6739                                 if test "$with_gpm" = maybe; then
6740                                         { echo "$as_me:6740: WARNING: Cannot link with GPM library" >&5
6741 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6742                                         with_gpm=no
6743                                 else
6744                                         { { echo "$as_me:6744: error: Cannot link with GPM library" >&5
6745 echo "$as_me: error: Cannot link with GPM library" >&2;}
6746    { (exit 1); exit 1; }; }
6747                                 fi
6748
6749 fi
6750
6751                 fi
6752
6753 else
6754
6755                 test "$with_gpm" != maybe && { echo "$as_me:6755: WARNING: Cannot find GPM header" >&5
6756 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6757                 with_gpm=no
6758
6759 fi
6760
6761 fi
6762
6763 if test "$with_gpm" != no ; then
6764         echo "$as_me:6764: checking if you want to load GPM dynamically" >&5
6765 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6766
6767 # Check whether --with-dlsym or --without-dlsym was given.
6768 if test "${with_dlsym+set}" = set; then
6769   withval="$with_dlsym"
6770   with_dlsym=$withval
6771 else
6772   with_dlsym=yes
6773 fi;
6774         echo "$as_me:6774: result: $with_dlsym" >&5
6775 echo "${ECHO_T}$with_dlsym" >&6
6776         if test "x$with_dlsym" = xyes ; then
6777
6778 cf_have_dlsym=no
6779 echo "$as_me:6779: checking for dlsym" >&5
6780 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6781 if test "${ac_cv_func_dlsym+set}" = set; then
6782   echo $ECHO_N "(cached) $ECHO_C" >&6
6783 else
6784   cat >conftest.$ac_ext <<_ACEOF
6785 #line 6785 "configure"
6786 #include "confdefs.h"
6787 #define dlsym autoconf_temporary
6788 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6789 #undef dlsym
6790
6791 #ifdef __cplusplus
6792 extern "C"
6793 #endif
6794
6795 /* We use char because int might match the return type of a gcc2
6796    builtin and then its argument prototype would still apply.  */
6797 char dlsym (void);
6798
6799 int
6800 main (void)
6801 {
6802
6803 /* The GNU C library defines stubs for functions which it implements
6804     to always fail with ENOSYS.  Some functions are actually named
6805     something starting with __ and the normal name is an alias.  */
6806 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6807 #error found stub for dlsym
6808 #endif
6809
6810         return dlsym ();
6811   ;
6812   return 0;
6813 }
6814 _ACEOF
6815 rm -f conftest.$ac_objext conftest$ac_exeext
6816 if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
6817   (eval $ac_link) 2>&5
6818   ac_status=$?
6819   echo "$as_me:6819: \$? = $ac_status" >&5
6820   (exit $ac_status); } &&
6821          { ac_try='test -s conftest$ac_exeext'
6822   { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6823   (eval $ac_try) 2>&5
6824   ac_status=$?
6825   echo "$as_me:6825: \$? = $ac_status" >&5
6826   (exit $ac_status); }; }; then
6827   ac_cv_func_dlsym=yes
6828 else
6829   echo "$as_me: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 ac_cv_func_dlsym=no
6832 fi
6833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6834 fi
6835 echo "$as_me:6835: result: $ac_cv_func_dlsym" >&5
6836 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6837 if test $ac_cv_func_dlsym = yes; then
6838   cf_have_dlsym=yes
6839 else
6840
6841 cf_have_libdl=no
6842 echo "$as_me:6842: checking for dlsym in -ldl" >&5
6843 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6844 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6845   echo $ECHO_N "(cached) $ECHO_C" >&6
6846 else
6847   ac_check_lib_save_LIBS=$LIBS
6848 LIBS="-ldl  $LIBS"
6849 cat >conftest.$ac_ext <<_ACEOF
6850 #line 6850 "configure"
6851 #include "confdefs.h"
6852
6853 /* Override any gcc2 internal prototype to avoid an error.  */
6854 #ifdef __cplusplus
6855 extern "C"
6856 #endif
6857 /* We use char because int might match the return type of a gcc2
6858    builtin and then its argument prototype would still apply.  */
6859 char dlsym ();
6860 int
6861 main (void)
6862 {
6863 dlsym ();
6864   ;
6865   return 0;
6866 }
6867 _ACEOF
6868 rm -f conftest.$ac_objext conftest$ac_exeext
6869 if { (eval echo "$as_me:6869: \"$ac_link\"") >&5
6870   (eval $ac_link) 2>&5
6871   ac_status=$?
6872   echo "$as_me:6872: \$? = $ac_status" >&5
6873   (exit $ac_status); } &&
6874          { ac_try='test -s conftest$ac_exeext'
6875   { (eval echo "$as_me:6875: \"$ac_try\"") >&5
6876   (eval $ac_try) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); }; }; then
6880   ac_cv_lib_dl_dlsym=yes
6881 else
6882   echo "$as_me: failed program was:" >&5
6883 cat conftest.$ac_ext >&5
6884 ac_cv_lib_dl_dlsym=no
6885 fi
6886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6887 LIBS=$ac_check_lib_save_LIBS
6888 fi
6889 echo "$as_me:6889: result: $ac_cv_lib_dl_dlsym" >&5
6890 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6891 if test $ac_cv_lib_dl_dlsym = yes; then
6892
6893         cf_have_dlsym=yes
6894         cf_have_libdl=yes
6895 fi
6896
6897 fi
6898
6899 if test "$cf_have_dlsym" = yes ; then
6900         test "$cf_have_libdl" = yes && {
6901 cf_add_libs="$LIBS"
6902 # reverse order
6903 cf_add_0lib=
6904 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6905 # filter duplicates
6906 for cf_add_1lib in $cf_add_0lib; do
6907         for cf_add_2lib in $cf_add_libs; do
6908                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6909                         cf_add_1lib=
6910                         break
6911                 fi
6912         done
6913         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6914 done
6915 LIBS="$cf_add_libs"
6916  }
6917
6918         echo "$as_me:6918: checking whether able to link to dl*() functions" >&5
6919 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6920         cat >conftest.$ac_ext <<_ACEOF
6921 #line 6921 "configure"
6922 #include "confdefs.h"
6923 #include <dlfcn.h>
6924 int
6925 main (void)
6926 {
6927
6928                 void *obj;
6929                 if ((obj = dlopen("filename", 0)) != 0) {
6930                         if (dlsym(obj, "symbolname") == 0) {
6931                         dlclose(obj);
6932                         }
6933                 }
6934   ;
6935   return 0;
6936 }
6937 _ACEOF
6938 rm -f conftest.$ac_objext conftest$ac_exeext
6939 if { (eval echo "$as_me:6939: \"$ac_link\"") >&5
6940   (eval $ac_link) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); } &&
6944          { ac_try='test -s conftest$ac_exeext'
6945   { (eval echo "$as_me:6945: \"$ac_try\"") >&5
6946   (eval $ac_try) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); }; }; then
6950
6951 cat >>confdefs.h <<\EOF
6952 #define HAVE_LIBDL 1
6953 EOF
6954
6955 else
6956   echo "$as_me: failed program was:" >&5
6957 cat conftest.$ac_ext >&5
6958
6959                 { { echo "$as_me:6959: error: Cannot link test program for libdl" >&5
6960 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6961    { (exit 1); exit 1; }; }
6962 fi
6963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6964         echo "$as_me:6964: result: ok" >&5
6965 echo "${ECHO_T}ok" >&6
6966 else
6967         { { echo "$as_me:6967: error: Cannot find dlsym function" >&5
6968 echo "$as_me: error: Cannot find dlsym function" >&2;}
6969    { (exit 1); exit 1; }; }
6970 fi
6971
6972                 if test "x$with_gpm" != xyes ; then
6973                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6974
6975 echo "${as_me:-configure}:6975: testing assuming soname for gpm is $with_gpm ..." 1>&5
6976
6977                         cf_cv_gpm_soname="$with_gpm"
6978                 else
6979
6980 echo "$as_me:6980: checking for soname of gpm library" >&5
6981 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6982 if test "${cf_cv_gpm_soname+set}" = set; then
6983   echo $ECHO_N "(cached) $ECHO_C" >&6
6984 else
6985
6986 cf_cv_gpm_soname=unknown
6987 if test "$cross_compiling" != yes ; then
6988 cat >conftest.$ac_ext <<CF_EOF
6989 #include <gpm.h>
6990 int main(void)
6991 {
6992 if (Gpm_Open(0,0)) Gpm_Close();
6993         ${cf_cv_main_return:-return}(0);
6994 }
6995 CF_EOF
6996 cf_save_LIBS="$LIBS"
6997
6998 cf_add_libs="$LIBS"
6999 # reverse order
7000 cf_add_0lib=
7001 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7002 # filter duplicates
7003 for cf_add_1lib in $cf_add_0lib; do
7004         for cf_add_2lib in $cf_add_libs; do
7005                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7006                         cf_add_1lib=
7007                         break
7008                 fi
7009         done
7010         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7011 done
7012 LIBS="$cf_add_libs"
7013
7014         if { (eval echo "$as_me:7014: \"$ac_compile\"") >&5
7015   (eval $ac_compile) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit $ac_status); } ; then
7019                 if { (eval echo "$as_me:7019: \"$ac_link\"") >&5
7020   (eval $ac_link) 2>&5
7021   ac_status=$?
7022   echo "$as_me:7022: \$? = $ac_status" >&5
7023   (exit $ac_status); } ; then
7024                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7025                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7026                 fi
7027         fi
7028 rm -rf conftest*
7029 LIBS="$cf_save_LIBS"
7030 fi
7031
7032 fi
7033 echo "$as_me:7033: result: $cf_cv_gpm_soname" >&5
7034 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7035
7036                 fi
7037                 test "$cf_cv_gpm_soname" != "unknown" &&
7038 cat >>confdefs.h <<EOF
7039 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7040 EOF
7041
7042                 SHLIB_LIST="-ldl $SHLIB_LIST"
7043
7044 cf_add_libs="$PRIVATE_LIBS"
7045 # reverse order
7046 cf_add_0lib=
7047 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7048 # filter duplicates
7049 for cf_add_1lib in $cf_add_0lib; do
7050         for cf_add_2lib in $cf_add_libs; do
7051                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7052                         cf_add_1lib=
7053                         break
7054                 fi
7055         done
7056         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7057 done
7058 PRIVATE_LIBS="$cf_add_libs"
7059
7060         else
7061                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7062
7063 cf_add_libs="$TEST_LIBS"
7064 # reverse order
7065 cf_add_0lib=
7066 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7067 # filter duplicates
7068 for cf_add_1lib in $cf_add_0lib; do
7069         for cf_add_2lib in $cf_add_libs; do
7070                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7071                         cf_add_1lib=
7072                         break
7073                 fi
7074         done
7075         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7076 done
7077 TEST_LIBS="$cf_add_libs"
7078
7079 cf_add_libs="$PRIVATE_LIBS"
7080 # reverse order
7081 cf_add_0lib=
7082 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7083 # filter duplicates
7084 for cf_add_1lib in $cf_add_0lib; do
7085         for cf_add_2lib in $cf_add_libs; do
7086                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7087                         cf_add_1lib=
7088                         break
7089                 fi
7090         done
7091         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7092 done
7093 PRIVATE_LIBS="$cf_add_libs"
7094
7095         fi
7096
7097 cat >>confdefs.h <<\EOF
7098 #define HAVE_LIBGPM 1
7099 EOF
7100
7101 echo "$as_me:7101: checking for Gpm_Wgetch in -lgpm" >&5
7102 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7103 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7104   echo $ECHO_N "(cached) $ECHO_C" >&6
7105 else
7106   ac_check_lib_save_LIBS=$LIBS
7107 LIBS="-lgpm  $LIBS"
7108 cat >conftest.$ac_ext <<_ACEOF
7109 #line 7109 "configure"
7110 #include "confdefs.h"
7111
7112 /* Override any gcc2 internal prototype to avoid an error.  */
7113 #ifdef __cplusplus
7114 extern "C"
7115 #endif
7116 /* We use char because int might match the return type of a gcc2
7117    builtin and then its argument prototype would still apply.  */
7118 char Gpm_Wgetch ();
7119 int
7120 main (void)
7121 {
7122 Gpm_Wgetch ();
7123   ;
7124   return 0;
7125 }
7126 _ACEOF
7127 rm -f conftest.$ac_objext conftest$ac_exeext
7128 if { (eval echo "$as_me:7128: \"$ac_link\"") >&5
7129   (eval $ac_link) 2>&5
7130   ac_status=$?
7131   echo "$as_me:7131: \$? = $ac_status" >&5
7132   (exit $ac_status); } &&
7133          { ac_try='test -s conftest$ac_exeext'
7134   { (eval echo "$as_me:7134: \"$ac_try\"") >&5
7135   (eval $ac_try) 2>&5
7136   ac_status=$?
7137   echo "$as_me:7137: \$? = $ac_status" >&5
7138   (exit $ac_status); }; }; then
7139   ac_cv_lib_gpm_Gpm_Wgetch=yes
7140 else
7141   echo "$as_me: failed program was:" >&5
7142 cat conftest.$ac_ext >&5
7143 ac_cv_lib_gpm_Gpm_Wgetch=no
7144 fi
7145 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7146 LIBS=$ac_check_lib_save_LIBS
7147 fi
7148 echo "$as_me:7148: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7149 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7150 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7151
7152 echo "$as_me:7152: checking if GPM is weakly bound to curses library" >&5
7153 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7154 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7155   echo $ECHO_N "(cached) $ECHO_C" >&6
7156 else
7157
7158 cf_cv_check_gpm_wgetch=unknown
7159 if test "$cross_compiling" != yes ; then
7160
7161 cat >conftest.$ac_ext <<CF_EOF
7162 #include <gpm.h>
7163 int main(void)
7164 {
7165         Gpm_Wgetch();
7166         ${cf_cv_main_return:-return}(0);
7167 }
7168 CF_EOF
7169
7170         cf_save_LIBS="$LIBS"
7171         # This only works if we can look at the symbol table.  If a shared
7172         # library is stripped for install, we cannot use that.  So we're forced
7173         # to rely on the static library, noting that some packagers may not
7174         # include it.
7175         LIBS="-static -lgpm -dynamic $LIBS"
7176         if { (eval echo "$as_me:7176: \"$ac_compile\"") >&5
7177   (eval $ac_compile) 2>&5
7178   ac_status=$?
7179   echo "$as_me:7179: \$? = $ac_status" >&5
7180   (exit $ac_status); } ; then
7181                 if { (eval echo "$as_me:7181: \"$ac_link\"") >&5
7182   (eval $ac_link) 2>&5
7183   ac_status=$?
7184   echo "$as_me:7184: \$? = $ac_status" >&5
7185   (exit $ac_status); } ; then
7186                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7187                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7188                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7189                 fi
7190         fi
7191         rm -rf conftest*
7192         LIBS="$cf_save_LIBS"
7193 fi
7194
7195 fi
7196 echo "$as_me:7196: result: $cf_cv_check_gpm_wgetch" >&5
7197 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7198
7199 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7200         { echo "$as_me:7200: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7201 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7202 fi
7203
7204 fi
7205
7206 fi
7207
7208 echo "$as_me:7208: checking if you want to use PCRE2 for regular-expressions" >&5
7209 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7210
7211 # Check whether --with-pcre2 or --without-pcre2 was given.
7212 if test "${with_pcre2+set}" = set; then
7213   withval="$with_pcre2"
7214
7215 fi;
7216 test -z "$with_pcre2" && with_pcre2=no
7217 echo "$as_me:7217: result: $with_pcre2" >&5
7218 echo "${ECHO_T}$with_pcre2" >&6
7219
7220 if test "x$with_pcre2" != xno ; then
7221
7222 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7223         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7224
7225 echo "${as_me:-configure}:7225: testing found package libpcre2 ..." 1>&5
7226
7227         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7228         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7229         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7230
7231 echo "${as_me:-configure}:7231: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7232
7233         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7234
7235 echo "${as_me:-configure}:7235: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7236
7237 cf_fix_cppflags=no
7238 cf_new_cflags=
7239 cf_new_cppflags=
7240 cf_new_extra_cppflags=
7241
7242 for cf_add_cflags in $cf_pkgconfig_incs
7243 do
7244 case $cf_fix_cppflags in
7245 (no)
7246         case $cf_add_cflags in
7247         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7248                 case $cf_add_cflags in
7249                 (-D*)
7250                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7251
7252                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7253                                 && test -z "${cf_tst_cflags}" \
7254                                 && cf_fix_cppflags=yes
7255
7256                         if test $cf_fix_cppflags = yes ; then
7257
7258         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7259         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7260
7261                                 continue
7262                         elif test "${cf_tst_cflags}" = "\"'" ; then
7263
7264         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7265         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7266
7267                                 continue
7268                         fi
7269                         ;;
7270                 esac
7271                 case "$CPPFLAGS" in
7272                 (*$cf_add_cflags)
7273                         ;;
7274                 (*)
7275                         case $cf_add_cflags in
7276                         (-D*)
7277                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7278
7279 CPPFLAGS=`echo "$CPPFLAGS" | \
7280         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7281                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7282
7283                                 ;;
7284                         esac
7285
7286         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7287         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7288
7289                         ;;
7290                 esac
7291                 ;;
7292         (*)
7293
7294         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7295         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7296
7297                 ;;
7298         esac
7299         ;;
7300 (yes)
7301
7302         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7303         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7304
7305         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7306
7307         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7308                 && test -z "${cf_tst_cflags}" \
7309                 && cf_fix_cppflags=no
7310         ;;
7311 esac
7312 done
7313
7314 if test -n "$cf_new_cflags" ; then
7315
7316         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7317         CFLAGS="${CFLAGS}$cf_new_cflags"
7318
7319 fi
7320
7321 if test -n "$cf_new_cppflags" ; then
7322
7323         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7324         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7325
7326 fi
7327
7328 if test -n "$cf_new_extra_cppflags" ; then
7329
7330         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7331         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7332
7333 fi
7334
7335 cf_add_libs="$LIBS"
7336 # reverse order
7337 cf_add_0lib=
7338 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7339 # filter duplicates
7340 for cf_add_1lib in $cf_add_0lib; do
7341         for cf_add_2lib in $cf_add_libs; do
7342                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7343                         cf_add_1lib=
7344                         break
7345                 fi
7346         done
7347         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7348 done
7349 LIBS="$cf_add_libs"
7350
7351         :
7352 else
7353         cf_pkgconfig_incs=
7354         cf_pkgconfig_libs=
7355
7356 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7357         test -n "$verbose" && echo "    found package libpcre" 1>&6
7358
7359 echo "${as_me:-configure}:7359: testing found package libpcre ..." 1>&5
7360
7361         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7362         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7363         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7364
7365 echo "${as_me:-configure}:7365: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7366
7367         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7368
7369 echo "${as_me:-configure}:7369: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7370
7371 cf_fix_cppflags=no
7372 cf_new_cflags=
7373 cf_new_cppflags=
7374 cf_new_extra_cppflags=
7375
7376 for cf_add_cflags in $cf_pkgconfig_incs
7377 do
7378 case $cf_fix_cppflags in
7379 (no)
7380         case $cf_add_cflags in
7381         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7382                 case $cf_add_cflags in
7383                 (-D*)
7384                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7385
7386                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7387                                 && test -z "${cf_tst_cflags}" \
7388                                 && cf_fix_cppflags=yes
7389
7390                         if test $cf_fix_cppflags = yes ; then
7391
7392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7394
7395                                 continue
7396                         elif test "${cf_tst_cflags}" = "\"'" ; then
7397
7398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7400
7401                                 continue
7402                         fi
7403                         ;;
7404                 esac
7405                 case "$CPPFLAGS" in
7406                 (*$cf_add_cflags)
7407                         ;;
7408                 (*)
7409                         case $cf_add_cflags in
7410                         (-D*)
7411                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7412
7413 CPPFLAGS=`echo "$CPPFLAGS" | \
7414         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7415                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7416
7417                                 ;;
7418                         esac
7419
7420         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7421         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7422
7423                         ;;
7424                 esac
7425                 ;;
7426         (*)
7427
7428         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7429         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7430
7431                 ;;
7432         esac
7433         ;;
7434 (yes)
7435
7436         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7437         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7438
7439         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7440
7441         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7442                 && test -z "${cf_tst_cflags}" \
7443                 && cf_fix_cppflags=no
7444         ;;
7445 esac
7446 done
7447
7448 if test -n "$cf_new_cflags" ; then
7449
7450         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7451         CFLAGS="${CFLAGS}$cf_new_cflags"
7452
7453 fi
7454
7455 if test -n "$cf_new_cppflags" ; then
7456
7457         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7458         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7459
7460 fi
7461
7462 if test -n "$cf_new_extra_cppflags" ; then
7463
7464         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7465         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7466
7467 fi
7468
7469 cf_add_libs="$LIBS"
7470 # reverse order
7471 cf_add_0lib=
7472 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7473 # filter duplicates
7474 for cf_add_1lib in $cf_add_0lib; do
7475         for cf_add_2lib in $cf_add_libs; do
7476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7477                         cf_add_1lib=
7478                         break
7479                 fi
7480         done
7481         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7482 done
7483 LIBS="$cf_add_libs"
7484
7485         :
7486 else
7487         cf_pkgconfig_incs=
7488         cf_pkgconfig_libs=
7489
7490                         { { echo "$as_me:7490: error: Cannot find PCRE2 library" >&5
7491 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7492    { (exit 1); exit 1; }; }
7493 fi
7494
7495 fi
7496
7497 cat >>confdefs.h <<\EOF
7498 #define HAVE_LIB_PCRE2 1
7499 EOF
7500
7501         # if pkgconfig gave no results, look for the libraries directly
7502         case $LIBS in
7503         (*pcre2-posix*|*pcreposix*)
7504                 ;;
7505         (*)
7506                 echo "$as_me:7506: checking for regcomp in -lpcre2-posix" >&5
7507 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7508 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7509   echo $ECHO_N "(cached) $ECHO_C" >&6
7510 else
7511   ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lpcre2-posix  $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 #line 7514 "configure"
7515 #include "confdefs.h"
7516
7517 /* Override any gcc2 internal prototype to avoid an error.  */
7518 #ifdef __cplusplus
7519 extern "C"
7520 #endif
7521 /* We use char because int might match the return type of a gcc2
7522    builtin and then its argument prototype would still apply.  */
7523 char regcomp ();
7524 int
7525 main (void)
7526 {
7527 regcomp ();
7528   ;
7529   return 0;
7530 }
7531 _ACEOF
7532 rm -f conftest.$ac_objext conftest$ac_exeext
7533 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534   (eval $ac_link) 2>&5
7535   ac_status=$?
7536   echo "$as_me:7536: \$? = $ac_status" >&5
7537   (exit $ac_status); } &&
7538          { ac_try='test -s conftest$ac_exeext'
7539   { (eval echo "$as_me:7539: \"$ac_try\"") >&5
7540   (eval $ac_try) 2>&5
7541   ac_status=$?
7542   echo "$as_me:7542: \$? = $ac_status" >&5
7543   (exit $ac_status); }; }; then
7544   ac_cv_lib_pcre2_posix_regcomp=yes
7545 else
7546   echo "$as_me: failed program was:" >&5
7547 cat conftest.$ac_ext >&5
7548 ac_cv_lib_pcre2_posix_regcomp=no
7549 fi
7550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7551 LIBS=$ac_check_lib_save_LIBS
7552 fi
7553 echo "$as_me:7553: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7554 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7555 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7556
7557 cf_add_libs="$LIBS"
7558 # reverse order
7559 cf_add_0lib=
7560 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7561 # filter duplicates
7562 for cf_add_1lib in $cf_add_0lib; do
7563         for cf_add_2lib in $cf_add_libs; do
7564                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7565                         cf_add_1lib=
7566                         break
7567                 fi
7568         done
7569         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7570 done
7571 LIBS="$cf_add_libs"
7572
7573 else
7574   echo "$as_me:7574: checking for regcomp in -lpcreposix" >&5
7575 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7576 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7577   echo $ECHO_N "(cached) $ECHO_C" >&6
7578 else
7579   ac_check_lib_save_LIBS=$LIBS
7580 LIBS="-lpcreposix  $LIBS"
7581 cat >conftest.$ac_ext <<_ACEOF
7582 #line 7582 "configure"
7583 #include "confdefs.h"
7584
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 #ifdef __cplusplus
7587 extern "C"
7588 #endif
7589 /* We use char because int might match the return type of a gcc2
7590    builtin and then its argument prototype would still apply.  */
7591 char regcomp ();
7592 int
7593 main (void)
7594 {
7595 regcomp ();
7596   ;
7597   return 0;
7598 }
7599 _ACEOF
7600 rm -f conftest.$ac_objext conftest$ac_exeext
7601 if { (eval echo "$as_me:7601: \"$ac_link\"") >&5
7602   (eval $ac_link) 2>&5
7603   ac_status=$?
7604   echo "$as_me:7604: \$? = $ac_status" >&5
7605   (exit $ac_status); } &&
7606          { ac_try='test -s conftest$ac_exeext'
7607   { (eval echo "$as_me:7607: \"$ac_try\"") >&5
7608   (eval $ac_try) 2>&5
7609   ac_status=$?
7610   echo "$as_me:7610: \$? = $ac_status" >&5
7611   (exit $ac_status); }; }; then
7612   ac_cv_lib_pcreposix_regcomp=yes
7613 else
7614   echo "$as_me: failed program was:" >&5
7615 cat conftest.$ac_ext >&5
7616 ac_cv_lib_pcreposix_regcomp=no
7617 fi
7618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7619 LIBS=$ac_check_lib_save_LIBS
7620 fi
7621 echo "$as_me:7621: result: $ac_cv_lib_pcreposix_regcomp" >&5
7622 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7623 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7624
7625 cf_add_libs="$LIBS"
7626 # reverse order
7627 cf_add_0lib=
7628 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7629 # filter duplicates
7630 for cf_add_1lib in $cf_add_0lib; do
7631         for cf_add_2lib in $cf_add_libs; do
7632                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7633                         cf_add_1lib=
7634                         break
7635                 fi
7636         done
7637         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7638 done
7639 LIBS="$cf_add_libs"
7640
7641 else
7642   { { echo "$as_me:7642: error: Cannot find PCRE2 POSIX library" >&5
7643 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7644    { (exit 1); exit 1; }; }
7645 fi
7646
7647 fi
7648
7649                 ;;
7650         esac
7651
7652         # either way, check for the library header files
7653
7654 for ac_header in pcre2posix.h pcreposix.h
7655 do
7656 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7657 echo "$as_me:7657: checking for $ac_header" >&5
7658 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7659 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7660   echo $ECHO_N "(cached) $ECHO_C" >&6
7661 else
7662   cat >conftest.$ac_ext <<_ACEOF
7663 #line 7663 "configure"
7664 #include "confdefs.h"
7665 #include <$ac_header>
7666 _ACEOF
7667 if { (eval echo "$as_me:7667: \"$ac_cpp conftest.$ac_ext\"") >&5
7668   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7669   ac_status=$?
7670   egrep -v '^ *\+' conftest.er1 >conftest.err
7671   rm -f conftest.er1
7672   cat conftest.err >&5
7673   echo "$as_me:7673: \$? = $ac_status" >&5
7674   (exit $ac_status); } >/dev/null; then
7675   if test -s conftest.err; then
7676     ac_cpp_err=$ac_c_preproc_warn_flag
7677   else
7678     ac_cpp_err=
7679   fi
7680 else
7681   ac_cpp_err=yes
7682 fi
7683 if test -z "$ac_cpp_err"; then
7684   eval "$as_ac_Header=yes"
7685 else
7686   echo "$as_me: failed program was:" >&5
7687   cat conftest.$ac_ext >&5
7688   eval "$as_ac_Header=no"
7689 fi
7690 rm -f conftest.err conftest.$ac_ext
7691 fi
7692 echo "$as_me:7692: result: `eval echo '${'$as_ac_Header'}'`" >&5
7693 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7694 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7695   cat >>confdefs.h <<EOF
7696 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7697 EOF
7698
7699 fi
7700 done
7701
7702 fi
7703
7704 # not everyone has "test -c"
7705 if test -c /dev/sysmouse 2>/dev/null ; then
7706 echo "$as_me:7706: checking if you want to use sysmouse" >&5
7707 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7708
7709 # Check whether --with-sysmouse or --without-sysmouse was given.
7710 if test "${with_sysmouse+set}" = set; then
7711   withval="$with_sysmouse"
7712   cf_with_sysmouse=$withval
7713 else
7714   cf_with_sysmouse=maybe
7715 fi;
7716         if test "$cf_with_sysmouse" != no ; then
7717         cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720
7721 #include <osreldate.h>
7722 #if (__FreeBSD_version >= 400017)
7723 #include <sys/consio.h>
7724 #include <sys/fbio.h>
7725 #else
7726 #include <machine/console.h>
7727 #endif
7728
7729 int
7730 main (void)
7731 {
7732
7733         struct mouse_info the_mouse;
7734         ioctl(0, CONS_MOUSECTL, &the_mouse);
7735
7736   ;
7737   return 0;
7738 }
7739 _ACEOF
7740 rm -f conftest.$ac_objext
7741 if { (eval echo "$as_me:7741: \"$ac_compile\"") >&5
7742   (eval $ac_compile) 2>&5
7743   ac_status=$?
7744   echo "$as_me:7744: \$? = $ac_status" >&5
7745   (exit $ac_status); } &&
7746          { ac_try='test -s conftest.$ac_objext'
7747   { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7748   (eval $ac_try) 2>&5
7749   ac_status=$?
7750   echo "$as_me:7750: \$? = $ac_status" >&5
7751   (exit $ac_status); }; }; then
7752   cf_with_sysmouse=yes
7753 else
7754   echo "$as_me: failed program was:" >&5
7755 cat conftest.$ac_ext >&5
7756 cf_with_sysmouse=no
7757 fi
7758 rm -f conftest.$ac_objext conftest.$ac_ext
7759         fi
7760 echo "$as_me:7760: result: $cf_with_sysmouse" >&5
7761 echo "${ECHO_T}$cf_with_sysmouse" >&6
7762 test "$cf_with_sysmouse" = yes &&
7763 cat >>confdefs.h <<\EOF
7764 #define USE_SYSMOUSE 1
7765 EOF
7766
7767 fi
7768
7769 # pretend that ncurses==ncursesw==ncursest
7770 echo "$as_me:7770: checking if you want to disable library suffixes" >&5
7771 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7772
7773 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7774 if test "${enable_lib_suffixes+set}" = set; then
7775   enableval="$enable_lib_suffixes"
7776   test "$enableval" != no && enableval=yes
7777         if test "$enableval" != "yes" ; then
7778     disable_lib_suffixes=yes
7779         else
7780                 disable_lib_suffixes=no
7781         fi
7782 else
7783   enableval=yes
7784         disable_lib_suffixes=no
7785
7786 fi;
7787 echo "$as_me:7787: result: $disable_lib_suffixes" >&5
7788 echo "${ECHO_T}$disable_lib_suffixes" >&6
7789
7790 ### If we're building with rpath, try to link non-standard libs that way too.
7791 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7792
7793 echo "$as_me:7793: checking if rpath-hack should be disabled" >&5
7794 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7795
7796 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7797 if test "${enable_rpath_hack+set}" = set; then
7798   enableval="$enable_rpath_hack"
7799   test "$enableval" != no && enableval=yes
7800         if test "$enableval" != "yes" ; then
7801     cf_disable_rpath_hack=yes
7802         else
7803                 cf_disable_rpath_hack=no
7804         fi
7805 else
7806   enableval=yes
7807         cf_disable_rpath_hack=no
7808
7809 fi;
7810 echo "$as_me:7810: result: $cf_disable_rpath_hack" >&5
7811 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7812 if test "$cf_disable_rpath_hack" = no ; then
7813
7814 echo "$as_me:7814: checking for updated LDFLAGS" >&5
7815 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7816 if test -n "$LD_RPATH_OPT" ; then
7817         echo "$as_me:7817: result: maybe" >&5
7818 echo "${ECHO_T}maybe" >&6
7819
7820         for ac_prog in ldd
7821 do
7822   # Extract the first word of "$ac_prog", so it can be a program name with args.
7823 set dummy $ac_prog; ac_word=$2
7824 echo "$as_me:7824: checking for $ac_word" >&5
7825 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7826 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7827   echo $ECHO_N "(cached) $ECHO_C" >&6
7828 else
7829   if test -n "$cf_ldd_prog"; then
7830   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7831 else
7832   ac_save_IFS=$IFS; IFS=$ac_path_separator
7833 ac_dummy="$PATH"
7834 for ac_dir in $ac_dummy; do
7835   IFS=$ac_save_IFS
7836   test -z "$ac_dir" && ac_dir=.
7837   $as_executable_p "$ac_dir/$ac_word" || continue
7838 ac_cv_prog_cf_ldd_prog="$ac_prog"
7839 echo "$as_me:7839: found $ac_dir/$ac_word" >&5
7840 break
7841 done
7842
7843 fi
7844 fi
7845 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7846 if test -n "$cf_ldd_prog"; then
7847   echo "$as_me:7847: result: $cf_ldd_prog" >&5
7848 echo "${ECHO_T}$cf_ldd_prog" >&6
7849 else
7850   echo "$as_me:7850: result: no" >&5
7851 echo "${ECHO_T}no" >&6
7852 fi
7853
7854   test -n "$cf_ldd_prog" && break
7855 done
7856 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7857
7858         cf_rpath_list="/usr/lib /lib"
7859         if test "$cf_ldd_prog" != no
7860         then
7861                 cf_rpath_oops=
7862
7863 cat >conftest.$ac_ext <<_ACEOF
7864 #line 7864 "configure"
7865 #include "confdefs.h"
7866 #include <stdio.h>
7867 int
7868 main (void)
7869 {
7870 printf("Hello");
7871   ;
7872   return 0;
7873 }
7874 _ACEOF
7875 rm -f conftest.$ac_objext conftest$ac_exeext
7876 if { (eval echo "$as_me:7876: \"$ac_link\"") >&5
7877   (eval $ac_link) 2>&5
7878   ac_status=$?
7879   echo "$as_me:7879: \$? = $ac_status" >&5
7880   (exit $ac_status); } &&
7881          { ac_try='test -s conftest$ac_exeext'
7882   { (eval echo "$as_me:7882: \"$ac_try\"") >&5
7883   (eval $ac_try) 2>&5
7884   ac_status=$?
7885   echo "$as_me:7885: \$? = $ac_status" >&5
7886   (exit $ac_status); }; }; then
7887   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7888                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7889 else
7890   echo "$as_me: failed program was:" >&5
7891 cat conftest.$ac_ext >&5
7892 fi
7893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7894
7895                 # If we passed the link-test, but get a "not found" on a given library,
7896                 # this could be due to inept reconfiguration of gcc to make it only
7897                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7898                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7899                 # /usr/local libraries.
7900                 if test -n "$cf_rpath_oops"
7901                 then
7902                         for cf_rpath_src in $cf_rpath_oops
7903                         do
7904                                 for cf_rpath_dir in \
7905                                         /usr/local \
7906                                         /usr/pkg \
7907                                         /opt/sfw
7908                                 do
7909                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7910                                         then
7911                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7912
7913 echo "${as_me:-configure}:7913: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7914
7915                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7916                                                 break
7917                                         fi
7918                                 done
7919                         done
7920                 fi
7921         fi
7922
7923         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7924
7925 echo "${as_me:-configure}:7925: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7926
7927 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7928
7929 echo "${as_me:-configure}:7929: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7930
7931 cf_rpath_dst=
7932 for cf_rpath_src in $LDFLAGS
7933 do
7934         case $cf_rpath_src in
7935         (-L*)
7936
7937                 # check if this refers to a directory which we will ignore
7938                 cf_rpath_skip=no
7939                 if test -n "$cf_rpath_list"
7940                 then
7941                         for cf_rpath_item in $cf_rpath_list
7942                         do
7943                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7944                                 then
7945                                         cf_rpath_skip=yes
7946                                         break
7947                                 fi
7948                         done
7949                 fi
7950
7951                 if test "$cf_rpath_skip" = no
7952                 then
7953                         # transform the option
7954                         if test "$LD_RPATH_OPT" = "-R " ; then
7955                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7956                         else
7957                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7958                         fi
7959
7960                         # if we have not already added this, add it now
7961                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7962                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7963                         then
7964                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7965
7966 echo "${as_me:-configure}:7966: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7967
7968                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7969                         fi
7970                 fi
7971                 ;;
7972         esac
7973         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7974 done
7975 LDFLAGS=$cf_rpath_dst
7976
7977 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7978
7979 echo "${as_me:-configure}:7979: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7980
7981 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7982
7983 echo "${as_me:-configure}:7983: testing ...checking LIBS $LIBS ..." 1>&5
7984
7985 cf_rpath_dst=
7986 for cf_rpath_src in $LIBS
7987 do
7988         case $cf_rpath_src in
7989         (-L*)
7990
7991                 # check if this refers to a directory which we will ignore
7992                 cf_rpath_skip=no
7993                 if test -n "$cf_rpath_list"
7994                 then
7995                         for cf_rpath_item in $cf_rpath_list
7996                         do
7997                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7998                                 then
7999                                         cf_rpath_skip=yes
8000                                         break
8001                                 fi
8002                         done
8003                 fi
8004
8005                 if test "$cf_rpath_skip" = no
8006                 then
8007                         # transform the option
8008                         if test "$LD_RPATH_OPT" = "-R " ; then
8009                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8010                         else
8011                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8012                         fi
8013
8014                         # if we have not already added this, add it now
8015                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8016                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8017                         then
8018                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8019
8020 echo "${as_me:-configure}:8020: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8021
8022                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8023                         fi
8024                 fi
8025                 ;;
8026         esac
8027         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8028 done
8029 LIBS=$cf_rpath_dst
8030
8031 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8032
8033 echo "${as_me:-configure}:8033: testing ...checked LIBS $LIBS ..." 1>&5
8034
8035         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8036
8037 echo "${as_me:-configure}:8037: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8038
8039 else
8040         echo "$as_me:8040: result: no" >&5
8041 echo "${ECHO_T}no" >&6
8042 fi
8043
8044 fi
8045
8046 fi
8047
8048 ### Depending on the system, someone may use rpath to build ncurses but not
8049 # want users of the package to rely upon that feature.  Give those people an
8050 # option to suppress that detail from EXTRA_LDFLAGS.
8051 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8052 if test -n "$EXTRA_PKG_LDFLAGS"
8053 then
8054         echo "$as_me:8054: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8055 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8056
8057 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8058 if test "${enable_pkg_ldflags+set}" = set; then
8059   enableval="$enable_pkg_ldflags"
8060   test "$enableval" != no && enableval=yes
8061         if test "$enableval" != "yes" ; then
8062     disable_pkg_ldflags=yes
8063         else
8064                 disable_pkg_ldflags=no
8065         fi
8066 else
8067   enableval=yes
8068         disable_pkg_ldflags=no
8069
8070 fi;
8071         echo "$as_me:8071: result: $disable_pkg_ldflags" >&5
8072 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8073         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8074 fi
8075
8076 ###############################################################################
8077
8078 ###     use option --with-extra-suffix to append suffix to headers and libraries
8079 echo "$as_me:8079: checking if you wish to append extra suffix to header/library paths" >&5
8080 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8081 EXTRA_SUFFIX=
8082
8083 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8084 if test "${with_extra_suffix+set}" = set; then
8085   withval="$with_extra_suffix"
8086   case x$withval in
8087         (no)
8088                 ;;
8089         (xyes|x)
8090                 EXTRA_SUFFIX=$cf_cv_abi_version
8091                 ;;
8092         (*)
8093                 EXTRA_SUFFIX=$withval
8094                 ;;
8095         esac
8096
8097 fi;
8098 echo "$as_me:8098: result: $EXTRA_SUFFIX" >&5
8099 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8100
8101 ###     use option --disable-overwrite to leave out the link to -lcurses
8102 echo "$as_me:8102: checking if you wish to install ncurses overwriting curses" >&5
8103 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8104
8105 # Check whether --enable-overwrite or --disable-overwrite was given.
8106 if test "${enable_overwrite+set}" = set; then
8107   enableval="$enable_overwrite"
8108   with_overwrite=$enableval
8109 else
8110   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8111 fi;
8112 echo "$as_me:8112: result: $with_overwrite" >&5
8113 echo "${ECHO_T}$with_overwrite" >&6
8114
8115 echo "$as_me:8115: checking if external terminfo-database is used" >&5
8116 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8117
8118 # Check whether --enable-database or --disable-database was given.
8119 if test "${enable_database+set}" = set; then
8120   enableval="$enable_database"
8121   use_database=$enableval
8122 else
8123   use_database=yes
8124 fi;
8125 echo "$as_me:8125: result: $use_database" >&5
8126 echo "${ECHO_T}$use_database" >&6
8127
8128 case $host_os in
8129 (os2*)
8130         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8131         ;;
8132 (*)
8133         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8134         ;;
8135 esac
8136
8137 NCURSES_USE_DATABASE=0
8138 if test "$use_database" != no ; then
8139         NCURSES_USE_DATABASE=1
8140
8141         echo "$as_me:8141: checking which terminfo source-file will be installed" >&5
8142 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8143
8144 # Check whether --with-database or --without-database was given.
8145 if test "${with_database+set}" = set; then
8146   withval="$with_database"
8147   TERMINFO_SRC=$withval
8148 fi;
8149         echo "$as_me:8149: result: $TERMINFO_SRC" >&5
8150 echo "${ECHO_T}$TERMINFO_SRC" >&6
8151
8152         echo "$as_me:8152: checking whether to use hashed database instead of directory/tree" >&5
8153 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8154
8155 # Check whether --with-hashed-db or --without-hashed-db was given.
8156 if test "${with_hashed_db+set}" = set; then
8157   withval="$with_hashed_db"
8158
8159 else
8160   with_hashed_db=no
8161 fi;
8162         echo "$as_me:8162: result: $with_hashed_db" >&5
8163 echo "${ECHO_T}$with_hashed_db" >&6
8164 else
8165         with_hashed_db=no
8166 fi
8167
8168 echo "$as_me:8168: checking for list of fallback descriptions" >&5
8169 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8170
8171 # Check whether --with-fallbacks or --without-fallbacks was given.
8172 if test "${with_fallbacks+set}" = set; then
8173   withval="$with_fallbacks"
8174   with_fallback=$withval
8175 else
8176   with_fallback=
8177 fi;
8178 echo "$as_me:8178: result: $with_fallback" >&5
8179 echo "${ECHO_T}$with_fallback" >&6
8180
8181 case ".$with_fallback" in
8182 (.|.no)
8183         FALLBACK_LIST=
8184         ;;
8185 (.yes)
8186         { echo "$as_me:8186: WARNING: expected a list of terminal descriptions" >&5
8187 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8188         ;;
8189 (*)
8190         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8191         ;;
8192 esac
8193
8194 USE_FALLBACKS=
8195 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8196
8197 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8198 # tree for generating the terminal descriptions that will be compiled into the
8199 # library.  If your toolchain is old, it may not handle current terminal
8200 # databases.  Use configure-options to point to the tools which will be used,
8201 # rather than the first ones found on the $PATH.
8202 if test -n "$FALLBACK_LIST"
8203 then
8204
8205 # Check whether --with-tic-path or --without-tic-path was given.
8206 if test "${with_tic_path+set}" = set; then
8207   withval="$with_tic_path"
8208   echo "$as_me:8208: checking for tic program for fallbacks" >&5
8209 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8210                 TIC=$withval
8211                 echo "$as_me:8211: result: $TIC" >&5
8212 echo "${ECHO_T}$TIC" >&6
8213
8214 if test "x$prefix" != xNONE; then
8215         cf_path_syntax="$prefix"
8216 else
8217         cf_path_syntax="$ac_default_prefix"
8218 fi
8219
8220 case ".$TIC" in
8221 (.\$\(*\)*|.\'*\'*)
8222         ;;
8223 (..|./*|.\\*)
8224         ;;
8225 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8226         ;;
8227 (.\${*prefix}*|.\${*dir}*)
8228         eval TIC="$TIC"
8229         case ".$TIC" in
8230         (.NONE/*)
8231                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8232                 ;;
8233         esac
8234         ;;
8235 (.no|.NONE/*)
8236         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8237         ;;
8238 (*)
8239         { { echo "$as_me:8239: error: expected a pathname, not \"$TIC\"" >&5
8240 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8241    { (exit 1); exit 1; }; }
8242         ;;
8243 esac
8244
8245 else
8246
8247 test -z "$TIC" && TIC=tic
8248 for ac_prog in $TIC tic
8249 do
8250   # Extract the first word of "$ac_prog", so it can be a program name with args.
8251 set dummy $ac_prog; ac_word=$2
8252 echo "$as_me:8252: checking for $ac_word" >&5
8253 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8254 if test "${ac_cv_path_TIC+set}" = set; then
8255   echo $ECHO_N "(cached) $ECHO_C" >&6
8256 else
8257   case $TIC in
8258   [\\/]* | ?:[\\/]*)
8259   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8260   ;;
8261   *)
8262   ac_save_IFS=$IFS; IFS=$ac_path_separator
8263 ac_dummy="$PATH:/usr/local/ncurses/bin"
8264 for ac_dir in $ac_dummy; do
8265   IFS=$ac_save_IFS
8266   test -z "$ac_dir" && ac_dir=.
8267   if $as_executable_p "$ac_dir/$ac_word"; then
8268    ac_cv_path_TIC="$ac_dir/$ac_word"
8269    echo "$as_me:8269: found $ac_dir/$ac_word" >&5
8270    break
8271 fi
8272 done
8273
8274   ;;
8275 esac
8276 fi
8277 TIC=$ac_cv_path_TIC
8278
8279 if test -n "$TIC"; then
8280   echo "$as_me:8280: result: $TIC" >&5
8281 echo "${ECHO_T}$TIC" >&6
8282 else
8283   echo "$as_me:8283: result: no" >&5
8284 echo "${ECHO_T}no" >&6
8285 fi
8286
8287   test -n "$TIC" && break
8288 done
8289 test -n "$TIC" || TIC="$TIC"
8290
8291 cf_path_prog=""
8292 cf_path_args=""
8293 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8294 for cf_temp in $ac_cv_path_TIC
8295 do
8296         if test -z "$cf_path_prog" ; then
8297                 if test "$with_full_paths" = yes ; then
8298
8299 if test "x$prefix" != xNONE; then
8300         cf_path_syntax="$prefix"
8301 else
8302         cf_path_syntax="$ac_default_prefix"
8303 fi
8304
8305 case ".$cf_temp" in
8306 (.\$\(*\)*|.\'*\'*)
8307         ;;
8308 (..|./*|.\\*)
8309         ;;
8310 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8311         ;;
8312 (.\${*prefix}*|.\${*dir}*)
8313         eval cf_temp="$cf_temp"
8314         case ".$cf_temp" in
8315         (.NONE/*)
8316                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8317                 ;;
8318         esac
8319         ;;
8320 (.no|.NONE/*)
8321         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8322         ;;
8323 (*)
8324         break
8325         ;;
8326 esac
8327
8328                         cf_path_prog="$cf_temp"
8329                 else
8330                         cf_path_prog="`basename $cf_temp`"
8331                 fi
8332         elif test -z "$cf_path_args" ; then
8333                 cf_path_args="$cf_temp"
8334         else
8335                 cf_path_args="$cf_path_args $cf_temp"
8336         fi
8337 done
8338 IFS="$cf_save_ifs"
8339
8340 if test -n "$cf_path_prog" ; then
8341
8342 echo "${as_me:-configure}:8342: testing defining path for ${cf_path_prog} ..." 1>&5
8343
8344 cat >>confdefs.h <<EOF
8345 #define TIC_PATH "$cf_path_prog"
8346 EOF
8347
8348         test -n "$cf_path_args" &&
8349 cat >>confdefs.h <<EOF
8350 #define TIC_ARGS "$cf_path_args"
8351 EOF
8352
8353 fi
8354
8355                 if test -z "$TIC"
8356                 then
8357                         { echo "$as_me:8357: WARNING: no tic program found for fallbacks" >&5
8358 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8359                 fi
8360
8361 fi;
8362
8363 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8364 if test "${with_infocmp_path+set}" = set; then
8365   withval="$with_infocmp_path"
8366   echo "$as_me:8366: checking for infocmp program for fallbacks" >&5
8367 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8368                 INFOCMP=$withval
8369                 echo "$as_me:8369: result: $INFOCMP" >&5
8370 echo "${ECHO_T}$INFOCMP" >&6
8371
8372 if test "x$prefix" != xNONE; then
8373         cf_path_syntax="$prefix"
8374 else
8375         cf_path_syntax="$ac_default_prefix"
8376 fi
8377
8378 case ".$INFOCMP" in
8379 (.\$\(*\)*|.\'*\'*)
8380         ;;
8381 (..|./*|.\\*)
8382         ;;
8383 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8384         ;;
8385 (.\${*prefix}*|.\${*dir}*)
8386         eval INFOCMP="$INFOCMP"
8387         case ".$INFOCMP" in
8388         (.NONE/*)
8389                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8390                 ;;
8391         esac
8392         ;;
8393 (.no|.NONE/*)
8394         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8395         ;;
8396 (*)
8397         { { echo "$as_me:8397: error: expected a pathname, not \"$INFOCMP\"" >&5
8398 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8399    { (exit 1); exit 1; }; }
8400         ;;
8401 esac
8402
8403 else
8404
8405 test -z "$INFOCMP" && INFOCMP=infocmp
8406 for ac_prog in $INFOCMP infocmp
8407 do
8408   # Extract the first word of "$ac_prog", so it can be a program name with args.
8409 set dummy $ac_prog; ac_word=$2
8410 echo "$as_me:8410: checking for $ac_word" >&5
8411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8412 if test "${ac_cv_path_INFOCMP+set}" = set; then
8413   echo $ECHO_N "(cached) $ECHO_C" >&6
8414 else
8415   case $INFOCMP in
8416   [\\/]* | ?:[\\/]*)
8417   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8418   ;;
8419   *)
8420   ac_save_IFS=$IFS; IFS=$ac_path_separator
8421 ac_dummy="$PATH:/usr/local/ncurses/bin"
8422 for ac_dir in $ac_dummy; do
8423   IFS=$ac_save_IFS
8424   test -z "$ac_dir" && ac_dir=.
8425   if $as_executable_p "$ac_dir/$ac_word"; then
8426    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8427    echo "$as_me:8427: found $ac_dir/$ac_word" >&5
8428    break
8429 fi
8430 done
8431
8432   ;;
8433 esac
8434 fi
8435 INFOCMP=$ac_cv_path_INFOCMP
8436
8437 if test -n "$INFOCMP"; then
8438   echo "$as_me:8438: result: $INFOCMP" >&5
8439 echo "${ECHO_T}$INFOCMP" >&6
8440 else
8441   echo "$as_me:8441: result: no" >&5
8442 echo "${ECHO_T}no" >&6
8443 fi
8444
8445   test -n "$INFOCMP" && break
8446 done
8447 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8448
8449 cf_path_prog=""
8450 cf_path_args=""
8451 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8452 for cf_temp in $ac_cv_path_INFOCMP
8453 do
8454         if test -z "$cf_path_prog" ; then
8455                 if test "$with_full_paths" = yes ; then
8456
8457 if test "x$prefix" != xNONE; then
8458         cf_path_syntax="$prefix"
8459 else
8460         cf_path_syntax="$ac_default_prefix"
8461 fi
8462
8463 case ".$cf_temp" in
8464 (.\$\(*\)*|.\'*\'*)
8465         ;;
8466 (..|./*|.\\*)
8467         ;;
8468 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8469         ;;
8470 (.\${*prefix}*|.\${*dir}*)
8471         eval cf_temp="$cf_temp"
8472         case ".$cf_temp" in
8473         (.NONE/*)
8474                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8475                 ;;
8476         esac
8477         ;;
8478 (.no|.NONE/*)
8479         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8480         ;;
8481 (*)
8482         break
8483         ;;
8484 esac
8485
8486                         cf_path_prog="$cf_temp"
8487                 else
8488                         cf_path_prog="`basename $cf_temp`"
8489                 fi
8490         elif test -z "$cf_path_args" ; then
8491                 cf_path_args="$cf_temp"
8492         else
8493                 cf_path_args="$cf_path_args $cf_temp"
8494         fi
8495 done
8496 IFS="$cf_save_ifs"
8497
8498 if test -n "$cf_path_prog" ; then
8499
8500 echo "${as_me:-configure}:8500: testing defining path for ${cf_path_prog} ..." 1>&5
8501
8502 cat >>confdefs.h <<EOF
8503 #define INFOCMP_PATH "$cf_path_prog"
8504 EOF
8505
8506         test -n "$cf_path_args" &&
8507 cat >>confdefs.h <<EOF
8508 #define INFOCMP_ARGS "$cf_path_args"
8509 EOF
8510
8511 fi
8512
8513                 if test -z "$INFOCMP"
8514                 then
8515                         { echo "$as_me:8515: WARNING: no infocmp program found for fallbacks" >&5
8516 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8517                 fi
8518
8519 fi;
8520
8521 else
8522         : ${TIC:=tic}
8523         : ${INFOCMP:=infocmp}
8524 fi
8525
8526 echo "$as_me:8526: checking if you want modern xterm or antique" >&5
8527 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8528
8529 # Check whether --with-xterm-new or --without-xterm-new was given.
8530 if test "${with_xterm_new+set}" = set; then
8531   withval="$with_xterm_new"
8532   with_xterm_new=$withval
8533 else
8534   with_xterm_new=yes
8535 fi;
8536 case $with_xterm_new in
8537 (no) with_xterm_new=xterm-old;;
8538 (*)      with_xterm_new=xterm-new;;
8539 esac
8540 echo "$as_me:8540: result: $with_xterm_new" >&5
8541 echo "${ECHO_T}$with_xterm_new" >&6
8542 WHICH_XTERM=$with_xterm_new
8543
8544 echo "$as_me:8544: checking if xterm backspace sends BS or DEL" >&5
8545 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8546
8547 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8548 if test "${with_xterm_kbs+set}" = set; then
8549   withval="$with_xterm_kbs"
8550   with_xterm_kbs=$withval
8551 else
8552   with_xterm_kbs=BS
8553 fi;
8554 case x$with_xterm_kbs in
8555 (xyes|xno|xBS|xbs|x8)
8556         with_xterm_kbs=BS
8557         ;;
8558 (xDEL|xdel|x127)
8559         with_xterm_kbs=DEL
8560         ;;
8561 (*)
8562         with_xterm_kbs=$withval
8563         ;;
8564 esac
8565 echo "$as_me:8565: result: $with_xterm_kbs" >&5
8566 echo "${ECHO_T}$with_xterm_kbs" >&6
8567 XTERM_KBS=$with_xterm_kbs
8568
8569 MAKE_TERMINFO=
8570 if test "$use_database" = no ; then
8571         TERMINFO="${datadir}/terminfo"
8572         MAKE_TERMINFO="#"
8573 else
8574
8575 echo "$as_me:8575: checking for list of terminfo directories" >&5
8576 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8577
8578 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8579 if test "${with_terminfo_dirs+set}" = set; then
8580   withval="$with_terminfo_dirs"
8581
8582 else
8583   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8584 fi;
8585 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8586 cf_dst_path=
8587 for cf_src_path in $withval
8588 do
8589
8590 if test "x$prefix" != xNONE; then
8591         cf_path_syntax="$prefix"
8592 else
8593         cf_path_syntax="$ac_default_prefix"
8594 fi
8595
8596 case ".$cf_src_path" in
8597 (.\$\(*\)*|.\'*\'*)
8598         ;;
8599 (..|./*|.\\*)
8600         ;;
8601 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8602         ;;
8603 (.\${*prefix}*|.\${*dir}*)
8604         eval cf_src_path="$cf_src_path"
8605         case ".$cf_src_path" in
8606         (.NONE/*)
8607                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8608                 ;;
8609         esac
8610         ;;
8611 (.no|.NONE/*)
8612         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8613         ;;
8614 (*)
8615         { { echo "$as_me:8615: error: expected a pathname, not \"$cf_src_path\"" >&5
8616 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8617    { (exit 1); exit 1; }; }
8618         ;;
8619 esac
8620
8621   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8622   cf_dst_path="${cf_dst_path}${cf_src_path}"
8623 done
8624 IFS="$ac_save_ifs"
8625
8626 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8627 # so we have to check/work around.  We do prefer the result of "eval"...
8628 eval cf_dst_eval="$cf_dst_path"
8629 case "x$cf_dst_eval" in
8630 (xNONE*)
8631         TERMINFO_DIRS=$cf_dst_path
8632         ;;
8633 (*)
8634         TERMINFO_DIRS="$cf_dst_eval"
8635         ;;
8636 esac
8637
8638 echo "$as_me:8638: result: $TERMINFO_DIRS" >&5
8639 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8640 test -n "$TERMINFO_DIRS" &&
8641 cat >>confdefs.h <<EOF
8642 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8643 EOF
8644
8645 case "x$TERMINFO" in
8646 x???:*)
8647         { echo "$as_me:8647: WARNING: ignoring non-directory/file TERMINFO value" >&5
8648 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8649         unset TERMINFO
8650         ;;
8651 esac
8652
8653 echo "$as_me:8653: checking for default terminfo directory" >&5
8654 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8655
8656 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8657 if test "${with_default_terminfo_dir+set}" = set; then
8658   withval="$with_default_terminfo_dir"
8659
8660 else
8661   withval="${TERMINFO:-${datadir}/terminfo}"
8662 fi; if test -n "${datadir}/terminfo" ; then
8663
8664 if test "x$prefix" != xNONE; then
8665         cf_path_syntax="$prefix"
8666 else
8667         cf_path_syntax="$ac_default_prefix"
8668 fi
8669
8670 case ".$withval" in
8671 (.\$\(*\)*|.\'*\'*)
8672         ;;
8673 (..|./*|.\\*)
8674         ;;
8675 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8676         ;;
8677 (.\${*prefix}*|.\${*dir}*)
8678         eval withval="$withval"
8679         case ".$withval" in
8680         (.NONE/*)
8681                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8682                 ;;
8683         esac
8684         ;;
8685 (.no|.NONE/*)
8686         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8687         ;;
8688 (*)
8689         { { echo "$as_me:8689: error: expected a pathname, not \"$withval\"" >&5
8690 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8691    { (exit 1); exit 1; }; }
8692         ;;
8693 esac
8694
8695 fi
8696 eval TERMINFO="$withval"
8697
8698 echo "$as_me:8698: result: $TERMINFO" >&5
8699 echo "${ECHO_T}$TERMINFO" >&6
8700
8701 cat >>confdefs.h <<EOF
8702 #define TERMINFO "$TERMINFO"
8703 EOF
8704
8705 fi
8706
8707 ###     use option --disable-big-core to make tic run on small machines
8708 ###     We need 4Mb, check if we can allocate 50% more than that.
8709 echo "$as_me:8709: checking if big-core option selected" >&5
8710 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8711
8712 # Check whether --enable-big-core or --disable-big-core was given.
8713 if test "${enable_big_core+set}" = set; then
8714   enableval="$enable_big_core"
8715   with_big_core=$enableval
8716 else
8717   if test "$cross_compiling" = yes; then
8718   with_big_core=no
8719 else
8720   cat >conftest.$ac_ext <<_ACEOF
8721 #line 8721 "configure"
8722 #include "confdefs.h"
8723
8724 #include <stdlib.h>
8725 #include <string.h>
8726 int main() {
8727         unsigned long n = 6000000L;
8728         char *s = malloc(n);
8729         if (s != 0)
8730                 s[0] = s[n-1] = 0;
8731         ${cf_cv_main_return:-return}(s == 0);
8732 }
8733 _ACEOF
8734 rm -f conftest$ac_exeext
8735 if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
8736   (eval $ac_link) 2>&5
8737   ac_status=$?
8738   echo "$as_me:8738: \$? = $ac_status" >&5
8739   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8740   { (eval echo "$as_me:8740: \"$ac_try\"") >&5
8741   (eval $ac_try) 2>&5
8742   ac_status=$?
8743   echo "$as_me:8743: \$? = $ac_status" >&5
8744   (exit $ac_status); }; }; then
8745   with_big_core=yes
8746 else
8747   echo "$as_me: program exited with status $ac_status" >&5
8748 echo "$as_me: failed program was:" >&5
8749 cat conftest.$ac_ext >&5
8750 with_big_core=no
8751 fi
8752 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8753 fi
8754 fi;
8755 echo "$as_me:8755: result: $with_big_core" >&5
8756 echo "${ECHO_T}$with_big_core" >&6
8757 test "x$with_big_core" = "xyes" &&
8758 cat >>confdefs.h <<\EOF
8759 #define HAVE_BIG_CORE 1
8760 EOF
8761
8762 ### ISO C only guarantees 512-char strings, we have tables which load faster
8763 ### when constructed using "big" strings.  More than the C compiler, the awk
8764 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8765 echo "$as_me:8765: checking if big-strings option selected" >&5
8766 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8767
8768 # Check whether --enable-big-strings or --disable-big-strings was given.
8769 if test "${enable_big_strings+set}" = set; then
8770   enableval="$enable_big_strings"
8771   with_big_strings=$enableval
8772 else
8773
8774         case x$AWK in
8775         (x)
8776                 eval with_big_strings=no
8777                 ;;
8778         (*)
8779                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8780                         | $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
8781                         eval with_big_strings=yes
8782                 else
8783                         eval with_big_strings=no
8784                 fi
8785                 ;;
8786         esac
8787
8788 fi;
8789 echo "$as_me:8789: result: $with_big_strings" >&5
8790 echo "${ECHO_T}$with_big_strings" >&6
8791
8792 USE_BIG_STRINGS=0
8793 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8794
8795 ###     use option --enable-termcap to compile in the termcap fallback support
8796 echo "$as_me:8796: checking if you want termcap-fallback support" >&5
8797 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8798
8799 # Check whether --enable-termcap or --disable-termcap was given.
8800 if test "${enable_termcap+set}" = set; then
8801   enableval="$enable_termcap"
8802   with_termcap=$enableval
8803 else
8804   with_termcap=no
8805 fi;
8806 echo "$as_me:8806: result: $with_termcap" >&5
8807 echo "${ECHO_T}$with_termcap" >&6
8808
8809 NCURSES_USE_TERMCAP=0
8810 if test "x$with_termcap" != "xyes" ; then
8811         if test "$use_database" = no ; then
8812                 if test -z "$with_fallback" ; then
8813                         { { echo "$as_me:8813: error: You have disabled the database w/o specifying fallbacks" >&5
8814 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8815    { (exit 1); exit 1; }; }
8816                 fi
8817         fi
8818
8819 cat >>confdefs.h <<\EOF
8820 #define PURE_TERMINFO 1
8821 EOF
8822
8823 else
8824
8825         if test "$with_ticlib" != no ; then
8826                 { { echo "$as_me:8826: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8827 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8828    { (exit 1); exit 1; }; }
8829         fi
8830
8831         NCURSES_USE_TERMCAP=1
8832         echo "$as_me:8832: checking for list of termcap files" >&5
8833 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8834
8835 # Check whether --with-termpath or --without-termpath was given.
8836 if test "${with_termpath+set}" = set; then
8837   withval="$with_termpath"
8838
8839 else
8840   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8841 fi;
8842 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8843 cf_dst_path=
8844 for cf_src_path in $withval
8845 do
8846
8847 if test "x$prefix" != xNONE; then
8848         cf_path_syntax="$prefix"
8849 else
8850         cf_path_syntax="$ac_default_prefix"
8851 fi
8852
8853 case ".$cf_src_path" in
8854 (.\$\(*\)*|.\'*\'*)
8855         ;;
8856 (..|./*|.\\*)
8857         ;;
8858 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8859         ;;
8860 (.\${*prefix}*|.\${*dir}*)
8861         eval cf_src_path="$cf_src_path"
8862         case ".$cf_src_path" in
8863         (.NONE/*)
8864                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8865                 ;;
8866         esac
8867         ;;
8868 (.no|.NONE/*)
8869         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8870         ;;
8871 (*)
8872         { { echo "$as_me:8872: error: expected a pathname, not \"$cf_src_path\"" >&5
8873 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8874    { (exit 1); exit 1; }; }
8875         ;;
8876 esac
8877
8878   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8879   cf_dst_path="${cf_dst_path}${cf_src_path}"
8880 done
8881 IFS="$ac_save_ifs"
8882
8883 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8884 # so we have to check/work around.  We do prefer the result of "eval"...
8885 eval cf_dst_eval="$cf_dst_path"
8886 case "x$cf_dst_eval" in
8887 (xNONE*)
8888         TERMPATH=$cf_dst_path
8889         ;;
8890 (*)
8891         TERMPATH="$cf_dst_eval"
8892         ;;
8893 esac
8894
8895         echo "$as_me:8895: result: $TERMPATH" >&5
8896 echo "${ECHO_T}$TERMPATH" >&6
8897         test -n "$TERMPATH" &&
8898 cat >>confdefs.h <<EOF
8899 #define TERMPATH "$TERMPATH"
8900 EOF
8901
8902         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8903         echo "$as_me:8903: checking if fast termcap-loader is needed" >&5
8904 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8905
8906 # Check whether --enable-getcap or --disable-getcap was given.
8907 if test "${enable_getcap+set}" = set; then
8908   enableval="$enable_getcap"
8909   with_getcap=$enableval
8910 else
8911   with_getcap=no
8912 fi;
8913         echo "$as_me:8913: result: $with_getcap" >&5
8914 echo "${ECHO_T}$with_getcap" >&6
8915         test "x$with_getcap" = "xyes" &&
8916 cat >>confdefs.h <<\EOF
8917 #define USE_GETCAP 1
8918 EOF
8919
8920         echo "$as_me:8920: checking if translated termcaps will be cached in ~/.terminfo" >&5
8921 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8922
8923 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8924 if test "${enable_getcap_cache+set}" = set; then
8925   enableval="$enable_getcap_cache"
8926   with_getcap_cache=$enableval
8927 else
8928   with_getcap_cache=no
8929 fi;
8930         echo "$as_me:8930: result: $with_getcap_cache" >&5
8931 echo "${ECHO_T}$with_getcap_cache" >&6
8932         test "x$with_getcap_cache" = "xyes" &&
8933 cat >>confdefs.h <<\EOF
8934 #define USE_GETCAP_CACHE 1
8935 EOF
8936
8937 fi
8938
8939 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8940 echo "$as_me:8940: checking if ~/.terminfo is wanted" >&5
8941 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8942
8943 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8944 if test "${enable_home_terminfo+set}" = set; then
8945   enableval="$enable_home_terminfo"
8946   with_home_terminfo=$enableval
8947 else
8948   with_home_terminfo=yes
8949 fi;
8950 echo "$as_me:8950: result: $with_home_terminfo" >&5
8951 echo "${ECHO_T}$with_home_terminfo" >&6
8952 test "x$with_home_terminfo" = "xyes" &&
8953 cat >>confdefs.h <<\EOF
8954 #define USE_HOME_TERMINFO 1
8955 EOF
8956
8957 echo "$as_me:8957: checking if you want to use restricted environment when running as root" >&5
8958 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8959
8960 # Check whether --enable-root-environ or --disable-root-environ was given.
8961 if test "${enable_root_environ+set}" = set; then
8962   enableval="$enable_root_environ"
8963   with_root_environ=$enableval
8964 else
8965   with_root_environ=yes
8966 fi;
8967 echo "$as_me:8967: result: $with_root_environ" >&5
8968 echo "${ECHO_T}$with_root_environ" >&6
8969 test "x$with_root_environ" = xyes &&
8970 cat >>confdefs.h <<\EOF
8971 #define USE_ROOT_ENVIRON 1
8972 EOF
8973
8974 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8975 ###   to reduce storage requirements for the terminfo database.
8976
8977 for ac_header in \
8978 unistd.h \
8979
8980 do
8981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8982 echo "$as_me:8982: checking for $ac_header" >&5
8983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8985   echo $ECHO_N "(cached) $ECHO_C" >&6
8986 else
8987   cat >conftest.$ac_ext <<_ACEOF
8988 #line 8988 "configure"
8989 #include "confdefs.h"
8990 #include <$ac_header>
8991 _ACEOF
8992 if { (eval echo "$as_me:8992: \"$ac_cpp conftest.$ac_ext\"") >&5
8993   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8994   ac_status=$?
8995   egrep -v '^ *\+' conftest.er1 >conftest.err
8996   rm -f conftest.er1
8997   cat conftest.err >&5
8998   echo "$as_me:8998: \$? = $ac_status" >&5
8999   (exit $ac_status); } >/dev/null; then
9000   if test -s conftest.err; then
9001     ac_cpp_err=$ac_c_preproc_warn_flag
9002   else
9003     ac_cpp_err=
9004   fi
9005 else
9006   ac_cpp_err=yes
9007 fi
9008 if test -z "$ac_cpp_err"; then
9009   eval "$as_ac_Header=yes"
9010 else
9011   echo "$as_me: failed program was:" >&5
9012   cat conftest.$ac_ext >&5
9013   eval "$as_ac_Header=no"
9014 fi
9015 rm -f conftest.err conftest.$ac_ext
9016 fi
9017 echo "$as_me:9017: result: `eval echo '${'$as_ac_Header'}'`" >&5
9018 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9019 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9020   cat >>confdefs.h <<EOF
9021 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9022 EOF
9023
9024 fi
9025 done
9026
9027 for ac_func in \
9028         remove \
9029         unlink
9030 do
9031 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9032 echo "$as_me:9032: checking for $ac_func" >&5
9033 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9034 if eval "test \"\${$as_ac_var+set}\" = set"; then
9035   echo $ECHO_N "(cached) $ECHO_C" >&6
9036 else
9037   cat >conftest.$ac_ext <<_ACEOF
9038 #line 9038 "configure"
9039 #include "confdefs.h"
9040 #define $ac_func autoconf_temporary
9041 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9042 #undef $ac_func
9043
9044 #ifdef __cplusplus
9045 extern "C"
9046 #endif
9047
9048 /* We use char because int might match the return type of a gcc2
9049    builtin and then its argument prototype would still apply.  */
9050 char $ac_func (void);
9051
9052 int
9053 main (void)
9054 {
9055
9056 /* The GNU C library defines stubs for functions which it implements
9057     to always fail with ENOSYS.  Some functions are actually named
9058     something starting with __ and the normal name is an alias.  */
9059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9060 #error found stub for $ac_func
9061 #endif
9062
9063         return $ac_func ();
9064   ;
9065   return 0;
9066 }
9067 _ACEOF
9068 rm -f conftest.$ac_objext conftest$ac_exeext
9069 if { (eval echo "$as_me:9069: \"$ac_link\"") >&5
9070   (eval $ac_link) 2>&5
9071   ac_status=$?
9072   echo "$as_me:9072: \$? = $ac_status" >&5
9073   (exit $ac_status); } &&
9074          { ac_try='test -s conftest$ac_exeext'
9075   { (eval echo "$as_me:9075: \"$ac_try\"") >&5
9076   (eval $ac_try) 2>&5
9077   ac_status=$?
9078   echo "$as_me:9078: \$? = $ac_status" >&5
9079   (exit $ac_status); }; }; then
9080   eval "$as_ac_var=yes"
9081 else
9082   echo "$as_me: failed program was:" >&5
9083 cat conftest.$ac_ext >&5
9084 eval "$as_ac_var=no"
9085 fi
9086 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9087 fi
9088 echo "$as_me:9088: result: `eval echo '${'$as_ac_var'}'`" >&5
9089 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9090 if test `eval echo '${'$as_ac_var'}'` = yes; then
9091   cat >>confdefs.h <<EOF
9092 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9093 EOF
9094
9095 fi
9096 done
9097
9098 if test "$cross_compiling" = yes ; then
9099
9100 for ac_func in \
9101                 link \
9102                 symlink
9103 do
9104 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9105 echo "$as_me:9105: checking for $ac_func" >&5
9106 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9107 if eval "test \"\${$as_ac_var+set}\" = set"; then
9108   echo $ECHO_N "(cached) $ECHO_C" >&6
9109 else
9110   cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9113 #define $ac_func autoconf_temporary
9114 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9115 #undef $ac_func
9116
9117 #ifdef __cplusplus
9118 extern "C"
9119 #endif
9120
9121 /* We use char because int might match the return type of a gcc2
9122    builtin and then its argument prototype would still apply.  */
9123 char $ac_func (void);
9124
9125 int
9126 main (void)
9127 {
9128
9129 /* The GNU C library defines stubs for functions which it implements
9130     to always fail with ENOSYS.  Some functions are actually named
9131     something starting with __ and the normal name is an alias.  */
9132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9133 #error found stub for $ac_func
9134 #endif
9135
9136         return $ac_func ();
9137   ;
9138   return 0;
9139 }
9140 _ACEOF
9141 rm -f conftest.$ac_objext conftest$ac_exeext
9142 if { (eval echo "$as_me:9142: \"$ac_link\"") >&5
9143   (eval $ac_link) 2>&5
9144   ac_status=$?
9145   echo "$as_me:9145: \$? = $ac_status" >&5
9146   (exit $ac_status); } &&
9147          { ac_try='test -s conftest$ac_exeext'
9148   { (eval echo "$as_me:9148: \"$ac_try\"") >&5
9149   (eval $ac_try) 2>&5
9150   ac_status=$?
9151   echo "$as_me:9151: \$? = $ac_status" >&5
9152   (exit $ac_status); }; }; then
9153   eval "$as_ac_var=yes"
9154 else
9155   echo "$as_me: failed program was:" >&5
9156 cat conftest.$ac_ext >&5
9157 eval "$as_ac_var=no"
9158 fi
9159 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9160 fi
9161 echo "$as_me:9161: result: `eval echo '${'$as_ac_var'}'`" >&5
9162 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9163 if test `eval echo '${'$as_ac_var'}'` = yes; then
9164   cat >>confdefs.h <<EOF
9165 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9166 EOF
9167
9168 fi
9169 done
9170
9171 else
9172         echo "$as_me:9172: checking if link/symlink functions work" >&5
9173 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9174 if test "${cf_cv_link_funcs+set}" = set; then
9175   echo $ECHO_N "(cached) $ECHO_C" >&6
9176 else
9177
9178                 cf_cv_link_funcs=
9179                 for cf_func in link symlink ; do
9180                         if test "$cross_compiling" = yes; then
9181
9182                         eval 'ac_cv_func_'$cf_func'=error'
9183 else
9184   cat >conftest.$ac_ext <<_ACEOF
9185 #line 9185 "configure"
9186 #include "confdefs.h"
9187
9188 #include <sys/types.h>
9189 #include <sys/stat.h>
9190 #ifdef HAVE_UNISTD_H
9191 #include <unistd.h>
9192 #endif
9193 int main(void)
9194 {
9195         int fail = 0;
9196         char *src = "config.log";
9197         char *dst = "conftest.chk";
9198         struct stat src_sb;
9199         struct stat dst_sb;
9200
9201         stat(src, &src_sb);
9202         fail = ($cf_func("config.log", "conftest.chk") < 0)
9203             || (stat(dst, &dst_sb) < 0)
9204             || (dst_sb.st_mtime != src_sb.st_mtime);
9205 #ifdef HAVE_UNLINK
9206         unlink(dst);
9207 #else
9208         remove(dst);
9209 #endif
9210         ${cf_cv_main_return:-return} (fail);
9211 }
9212
9213 _ACEOF
9214 rm -f conftest$ac_exeext
9215 if { (eval echo "$as_me:9215: \"$ac_link\"") >&5
9216   (eval $ac_link) 2>&5
9217   ac_status=$?
9218   echo "$as_me:9218: \$? = $ac_status" >&5
9219   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9220   { (eval echo "$as_me:9220: \"$ac_try\"") >&5
9221   (eval $ac_try) 2>&5
9222   ac_status=$?
9223   echo "$as_me:9223: \$? = $ac_status" >&5
9224   (exit $ac_status); }; }; then
9225
9226                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9227                         eval 'ac_cv_func_'$cf_func'=yes'
9228 else
9229   echo "$as_me: program exited with status $ac_status" >&5
9230 echo "$as_me: failed program was:" >&5
9231 cat conftest.$ac_ext >&5
9232
9233                         eval 'ac_cv_func_'$cf_func'=no'
9234 fi
9235 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9236 fi
9237                 done
9238                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9239
9240 fi
9241 echo "$as_me:9241: result: $cf_cv_link_funcs" >&5
9242 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9243         test "$ac_cv_func_link"    = yes &&
9244 cat >>confdefs.h <<\EOF
9245 #define HAVE_LINK 1
9246 EOF
9247
9248         test "$ac_cv_func_symlink" = yes &&
9249 cat >>confdefs.h <<\EOF
9250 #define HAVE_SYMLINK 1
9251 EOF
9252
9253 fi
9254
9255 with_links=no
9256 with_symlinks=no
9257
9258 # soft links (symbolic links) are useful for some systems where hard links do
9259 # not work, or to make it simpler to copy terminfo trees around.
9260 if test "x$ac_cv_func_symlink" = xyes ; then
9261         echo "$as_me:9261: checking if tic should use symbolic links" >&5
9262 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9263
9264 # Check whether --enable-symlinks or --disable-symlinks was given.
9265 if test "${enable_symlinks+set}" = set; then
9266   enableval="$enable_symlinks"
9267   with_symlinks=$enableval
9268 else
9269   with_symlinks=no
9270 fi;
9271         echo "$as_me:9271: result: $with_symlinks" >&5
9272 echo "${ECHO_T}$with_symlinks" >&6
9273 fi
9274
9275 # If we have hard links and did not choose to use soft links instead, there is
9276 # no reason to make this choice optional - use the hard links.
9277 if test "$with_symlinks" = no ; then
9278         echo "$as_me:9278: checking if tic should use hard links" >&5
9279 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9280         if test "x$ac_cv_func_link" = xyes ; then
9281                 with_links=yes
9282         else
9283                 with_links=no
9284         fi
9285         echo "$as_me:9285: result: $with_links" >&5
9286 echo "${ECHO_T}$with_links" >&6
9287 fi
9288
9289 test "x$with_links" = xyes &&
9290 cat >>confdefs.h <<\EOF
9291 #define USE_LINKS 1
9292 EOF
9293
9294 test "x$with_symlinks" = xyes &&
9295 cat >>confdefs.h <<\EOF
9296 #define USE_SYMLINKS 1
9297 EOF
9298
9299 ###   use option --enable-broken-linker to force on use of broken-linker support
9300
9301 echo "$as_me:9301: checking if you want broken-linker support code" >&5
9302 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9303
9304 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9305 if test "${enable_broken_linker+set}" = set; then
9306   enableval="$enable_broken_linker"
9307   with_broken_linker=$enableval
9308 else
9309   with_broken_linker=no
9310 fi;
9311 echo "$as_me:9311: result: $with_broken_linker" >&5
9312 echo "${ECHO_T}$with_broken_linker" >&6
9313
9314 : ${BROKEN_LINKER:=0}
9315 if test "x$with_broken_linker" = xyes ; then
9316
9317 cat >>confdefs.h <<\EOF
9318 #define BROKEN_LINKER 1
9319 EOF
9320
9321         BROKEN_LINKER=1
9322 fi
9323
9324 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9325 echo "$as_me:9325: checking if tputs should process BSD-style prefix padding" >&5
9326 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9327
9328 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9329 if test "${enable_bsdpad+set}" = set; then
9330   enableval="$enable_bsdpad"
9331   with_bsdpad=$enableval
9332 else
9333   with_bsdpad=no
9334 fi;
9335 echo "$as_me:9335: result: $with_bsdpad" >&5
9336 echo "${ECHO_T}$with_bsdpad" >&6
9337 test "x$with_bsdpad" = xyes &&
9338 cat >>confdefs.h <<\EOF
9339 #define BSD_TPUTS 1
9340 EOF
9341
9342 ###   use option --enable-widec to turn on use of wide-character support
9343 NCURSES_CH_T=chtype
9344 NCURSES_LIBUTF8=0
9345
9346 NEED_WCHAR_H=0
9347 NCURSES_MBSTATE_T=0
9348 NCURSES_WCHAR_T=0
9349 NCURSES_WINT_T=0
9350
9351 # Check to define _XOPEN_SOURCE "automatically"
9352 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9353
9354 echo "$as_me:9354: checking if the POSIX test-macros are already defined" >&5
9355 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9356 if test "${cf_cv_posix_visible+set}" = set; then
9357   echo $ECHO_N "(cached) $ECHO_C" >&6
9358 else
9359
9360 cat >conftest.$ac_ext <<_ACEOF
9361 #line 9361 "configure"
9362 #include "confdefs.h"
9363 #include <stdio.h>
9364 int
9365 main (void)
9366 {
9367
9368 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9369         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9370         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9371         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9372 #error conflicting symbols found
9373 #endif
9374
9375   ;
9376   return 0;
9377 }
9378 _ACEOF
9379 rm -f conftest.$ac_objext
9380 if { (eval echo "$as_me:9380: \"$ac_compile\"") >&5
9381   (eval $ac_compile) 2>&5
9382   ac_status=$?
9383   echo "$as_me:9383: \$? = $ac_status" >&5
9384   (exit $ac_status); } &&
9385          { ac_try='test -s conftest.$ac_objext'
9386   { (eval echo "$as_me:9386: \"$ac_try\"") >&5
9387   (eval $ac_try) 2>&5
9388   ac_status=$?
9389   echo "$as_me:9389: \$? = $ac_status" >&5
9390   (exit $ac_status); }; }; then
9391   cf_cv_posix_visible=no
9392 else
9393   echo "$as_me: failed program was:" >&5
9394 cat conftest.$ac_ext >&5
9395 cf_cv_posix_visible=yes
9396 fi
9397 rm -f conftest.$ac_objext conftest.$ac_ext
9398
9399 fi
9400 echo "$as_me:9400: result: $cf_cv_posix_visible" >&5
9401 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9402
9403 if test "$cf_cv_posix_visible" = no; then
9404
9405 cf_XOPEN_SOURCE=600
9406 cf_POSIX_C_SOURCE=199506L
9407 cf_xopen_source=
9408
9409 case $host_os in
9410 (aix[4-7]*)
9411         cf_xopen_source="-D_ALL_SOURCE"
9412         ;;
9413 (msys)
9414         cf_XOPEN_SOURCE=600
9415         ;;
9416 (darwin[0-8].*)
9417         cf_xopen_source="-D_APPLE_C_SOURCE"
9418         ;;
9419 (darwin*)
9420         cf_xopen_source="-D_DARWIN_C_SOURCE"
9421         cf_XOPEN_SOURCE=
9422         ;;
9423 (freebsd*|dragonfly*|midnightbsd*)
9424         # 5.x headers associate
9425         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9426         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9427         cf_POSIX_C_SOURCE=200112L
9428         cf_XOPEN_SOURCE=600
9429         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9430         ;;
9431 (hpux11*)
9432         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9433         ;;
9434 (hpux*)
9435         cf_xopen_source="-D_HPUX_SOURCE"
9436         ;;
9437 (irix[56].*)
9438         cf_xopen_source="-D_SGI_SOURCE"
9439         cf_XOPEN_SOURCE=
9440         ;;
9441 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9442
9443 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9444
9445 echo "$as_me:9445: checking if this is the GNU C library" >&5
9446 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9447 if test "${cf_cv_gnu_library+set}" = set; then
9448   echo $ECHO_N "(cached) $ECHO_C" >&6
9449 else
9450
9451 cat >conftest.$ac_ext <<_ACEOF
9452 #line 9452 "configure"
9453 #include "confdefs.h"
9454 #include <sys/types.h>
9455 int
9456 main (void)
9457 {
9458
9459         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9460                 return 0;
9461         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9462                 return 0;
9463         #else
9464         #       error not GNU C library
9465         #endif
9466   ;
9467   return 0;
9468 }
9469 _ACEOF
9470 rm -f conftest.$ac_objext
9471 if { (eval echo "$as_me:9471: \"$ac_compile\"") >&5
9472   (eval $ac_compile) 2>&5
9473   ac_status=$?
9474   echo "$as_me:9474: \$? = $ac_status" >&5
9475   (exit $ac_status); } &&
9476          { ac_try='test -s conftest.$ac_objext'
9477   { (eval echo "$as_me:9477: \"$ac_try\"") >&5
9478   (eval $ac_try) 2>&5
9479   ac_status=$?
9480   echo "$as_me:9480: \$? = $ac_status" >&5
9481   (exit $ac_status); }; }; then
9482   cf_cv_gnu_library=yes
9483 else
9484   echo "$as_me: failed program was:" >&5
9485 cat conftest.$ac_ext >&5
9486 cf_cv_gnu_library=no
9487 fi
9488 rm -f conftest.$ac_objext conftest.$ac_ext
9489
9490 fi
9491 echo "$as_me:9491: result: $cf_cv_gnu_library" >&5
9492 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9493
9494 if test x$cf_cv_gnu_library = xyes; then
9495
9496         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9497         # was changed to help a little.  newlib incorporated the change about 4
9498         # years later.
9499         echo "$as_me:9499: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9500 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9501 if test "${cf_cv_gnu_library_219+set}" = set; then
9502   echo $ECHO_N "(cached) $ECHO_C" >&6
9503 else
9504
9505                 cf_save="$CPPFLAGS"
9506
9507         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9508         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9509
9510                 cat >conftest.$ac_ext <<_ACEOF
9511 #line 9511 "configure"
9512 #include "confdefs.h"
9513 #include <sys/types.h>
9514 int
9515 main (void)
9516 {
9517
9518                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9519                                 return 0;
9520                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9521                                 return 0;
9522                         #else
9523                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9524                         #endif
9525   ;
9526   return 0;
9527 }
9528 _ACEOF
9529 rm -f conftest.$ac_objext
9530 if { (eval echo "$as_me:9530: \"$ac_compile\"") >&5
9531   (eval $ac_compile) 2>&5
9532   ac_status=$?
9533   echo "$as_me:9533: \$? = $ac_status" >&5
9534   (exit $ac_status); } &&
9535          { ac_try='test -s conftest.$ac_objext'
9536   { (eval echo "$as_me:9536: \"$ac_try\"") >&5
9537   (eval $ac_try) 2>&5
9538   ac_status=$?
9539   echo "$as_me:9539: \$? = $ac_status" >&5
9540   (exit $ac_status); }; }; then
9541   cf_cv_gnu_library_219=yes
9542 else
9543   echo "$as_me: failed program was:" >&5
9544 cat conftest.$ac_ext >&5
9545 cf_cv_gnu_library_219=no
9546 fi
9547 rm -f conftest.$ac_objext conftest.$ac_ext
9548                 CPPFLAGS="$cf_save"
9549
9550 fi
9551 echo "$as_me:9551: result: $cf_cv_gnu_library_219" >&5
9552 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9553
9554         if test "x$cf_cv_gnu_library_219" = xyes; then
9555                 cf_save="$CPPFLAGS"
9556                 echo "$as_me:9556: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9557 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9558 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9559   echo $ECHO_N "(cached) $ECHO_C" >&6
9560 else
9561
9562 cf_fix_cppflags=no
9563 cf_new_cflags=
9564 cf_new_cppflags=
9565 cf_new_extra_cppflags=
9566
9567 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9568 do
9569 case $cf_fix_cppflags in
9570 (no)
9571         case $cf_add_cflags in
9572         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9573                 case $cf_add_cflags in
9574                 (-D*)
9575                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9576
9577                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9578                                 && test -z "${cf_tst_cflags}" \
9579                                 && cf_fix_cppflags=yes
9580
9581                         if test $cf_fix_cppflags = yes ; then
9582
9583         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9584         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9585
9586                                 continue
9587                         elif test "${cf_tst_cflags}" = "\"'" ; then
9588
9589         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9590         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9591
9592                                 continue
9593                         fi
9594                         ;;
9595                 esac
9596                 case "$CPPFLAGS" in
9597                 (*$cf_add_cflags)
9598                         ;;
9599                 (*)
9600                         case $cf_add_cflags in
9601                         (-D*)
9602                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9603
9604 CPPFLAGS=`echo "$CPPFLAGS" | \
9605         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9606                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9607
9608                                 ;;
9609                         esac
9610
9611         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9612         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9613
9614                         ;;
9615                 esac
9616                 ;;
9617         (*)
9618
9619         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9620         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9621
9622                 ;;
9623         esac
9624         ;;
9625 (yes)
9626
9627         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9628         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9629
9630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9631
9632         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9633                 && test -z "${cf_tst_cflags}" \
9634                 && cf_fix_cppflags=no
9635         ;;
9636 esac
9637 done
9638
9639 if test -n "$cf_new_cflags" ; then
9640
9641         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9642         CFLAGS="${CFLAGS}$cf_new_cflags"
9643
9644 fi
9645
9646 if test -n "$cf_new_cppflags" ; then
9647
9648         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9649         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9650
9651 fi
9652
9653 if test -n "$cf_new_extra_cppflags" ; then
9654
9655         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9656         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9657
9658 fi
9659
9660                         cat >conftest.$ac_ext <<_ACEOF
9661 #line 9661 "configure"
9662 #include "confdefs.h"
9663
9664                                 #include <limits.h>
9665                                 #include <sys/types.h>
9666
9667 int
9668 main (void)
9669 {
9670
9671                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9672                                         return 0;
9673                                 #else
9674                                 #       error GNU C library is too old
9675                                 #endif
9676   ;
9677   return 0;
9678 }
9679 _ACEOF
9680 rm -f conftest.$ac_objext
9681 if { (eval echo "$as_me:9681: \"$ac_compile\"") >&5
9682   (eval $ac_compile) 2>&5
9683   ac_status=$?
9684   echo "$as_me:9684: \$? = $ac_status" >&5
9685   (exit $ac_status); } &&
9686          { ac_try='test -s conftest.$ac_objext'
9687   { (eval echo "$as_me:9687: \"$ac_try\"") >&5
9688   (eval $ac_try) 2>&5
9689   ac_status=$?
9690   echo "$as_me:9690: \$? = $ac_status" >&5
9691   (exit $ac_status); }; }; then
9692   cf_cv_gnu_dftsrc_219=yes
9693 else
9694   echo "$as_me: failed program was:" >&5
9695 cat conftest.$ac_ext >&5
9696 cf_cv_gnu_dftsrc_219=no
9697 fi
9698 rm -f conftest.$ac_objext conftest.$ac_ext
9699
9700 fi
9701 echo "$as_me:9701: result: $cf_cv_gnu_dftsrc_219" >&5
9702 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9703                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9704         else
9705                 cf_cv_gnu_dftsrc_219=maybe
9706         fi
9707
9708         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9709
9710                 echo "$as_me:9710: checking if we must define _GNU_SOURCE" >&5
9711 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9712 if test "${cf_cv_gnu_source+set}" = set; then
9713   echo $ECHO_N "(cached) $ECHO_C" >&6
9714 else
9715
9716                 cat >conftest.$ac_ext <<_ACEOF
9717 #line 9717 "configure"
9718 #include "confdefs.h"
9719 #include <sys/types.h>
9720 int
9721 main (void)
9722 {
9723
9724                         #ifndef _XOPEN_SOURCE
9725                         #error  expected _XOPEN_SOURCE to be defined
9726                         #endif
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 rm -f conftest.$ac_objext
9732 if { (eval echo "$as_me:9732: \"$ac_compile\"") >&5
9733   (eval $ac_compile) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); } &&
9737          { ac_try='test -s conftest.$ac_objext'
9738   { (eval echo "$as_me:9738: \"$ac_try\"") >&5
9739   (eval $ac_try) 2>&5
9740   ac_status=$?
9741   echo "$as_me:9741: \$? = $ac_status" >&5
9742   (exit $ac_status); }; }; then
9743   cf_cv_gnu_source=no
9744 else
9745   echo "$as_me: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9747 cf_save="$CPPFLAGS"
9748
9749 cf_fix_cppflags=no
9750 cf_new_cflags=
9751 cf_new_cppflags=
9752 cf_new_extra_cppflags=
9753
9754 for cf_add_cflags in -D_GNU_SOURCE
9755 do
9756 case $cf_fix_cppflags in
9757 (no)
9758         case $cf_add_cflags in
9759         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9760                 case $cf_add_cflags in
9761                 (-D*)
9762                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9763
9764                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9765                                 && test -z "${cf_tst_cflags}" \
9766                                 && cf_fix_cppflags=yes
9767
9768                         if test $cf_fix_cppflags = yes ; then
9769
9770         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9771         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9772
9773                                 continue
9774                         elif test "${cf_tst_cflags}" = "\"'" ; then
9775
9776         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9777         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9778
9779                                 continue
9780                         fi
9781                         ;;
9782                 esac
9783                 case "$CPPFLAGS" in
9784                 (*$cf_add_cflags)
9785                         ;;
9786                 (*)
9787                         case $cf_add_cflags in
9788                         (-D*)
9789                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9790
9791 CPPFLAGS=`echo "$CPPFLAGS" | \
9792         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9793                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9794
9795                                 ;;
9796                         esac
9797
9798         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9799         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9800
9801                         ;;
9802                 esac
9803                 ;;
9804         (*)
9805
9806         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9807         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9808
9809                 ;;
9810         esac
9811         ;;
9812 (yes)
9813
9814         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9815         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9816
9817         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9818
9819         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9820                 && test -z "${cf_tst_cflags}" \
9821                 && cf_fix_cppflags=no
9822         ;;
9823 esac
9824 done
9825
9826 if test -n "$cf_new_cflags" ; then
9827
9828         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9829         CFLAGS="${CFLAGS}$cf_new_cflags"
9830
9831 fi
9832
9833 if test -n "$cf_new_cppflags" ; then
9834
9835         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9836         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9837
9838 fi
9839
9840 if test -n "$cf_new_extra_cppflags" ; then
9841
9842         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9843         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9844
9845 fi
9846
9847                          cat >conftest.$ac_ext <<_ACEOF
9848 #line 9848 "configure"
9849 #include "confdefs.h"
9850 #include <sys/types.h>
9851 int
9852 main (void)
9853 {
9854
9855                                 #ifdef _XOPEN_SOURCE
9856                                 #error  expected _XOPEN_SOURCE to be undefined
9857                                 #endif
9858   ;
9859   return 0;
9860 }
9861 _ACEOF
9862 rm -f conftest.$ac_objext
9863 if { (eval echo "$as_me:9863: \"$ac_compile\"") >&5
9864   (eval $ac_compile) 2>&5
9865   ac_status=$?
9866   echo "$as_me:9866: \$? = $ac_status" >&5
9867   (exit $ac_status); } &&
9868          { ac_try='test -s conftest.$ac_objext'
9869   { (eval echo "$as_me:9869: \"$ac_try\"") >&5
9870   (eval $ac_try) 2>&5
9871   ac_status=$?
9872   echo "$as_me:9872: \$? = $ac_status" >&5
9873   (exit $ac_status); }; }; then
9874   cf_cv_gnu_source=no
9875 else
9876   echo "$as_me: failed program was:" >&5
9877 cat conftest.$ac_ext >&5
9878 cf_cv_gnu_source=yes
9879 fi
9880 rm -f conftest.$ac_objext conftest.$ac_ext
9881                         CPPFLAGS="$cf_save"
9882
9883 fi
9884 rm -f conftest.$ac_objext conftest.$ac_ext
9885
9886 fi
9887 echo "$as_me:9887: result: $cf_cv_gnu_source" >&5
9888 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9889
9890                 if test "$cf_cv_gnu_source" = yes
9891                 then
9892                 echo "$as_me:9892: checking if we should also define _DEFAULT_SOURCE" >&5
9893 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9894 if test "${cf_cv_default_source+set}" = set; then
9895   echo $ECHO_N "(cached) $ECHO_C" >&6
9896 else
9897
9898         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9899         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9900
9901                         cat >conftest.$ac_ext <<_ACEOF
9902 #line 9902 "configure"
9903 #include "confdefs.h"
9904 #include <sys/types.h>
9905 int
9906 main (void)
9907 {
9908
9909                                 #ifdef _DEFAULT_SOURCE
9910                                 #error  expected _DEFAULT_SOURCE to be undefined
9911                                 #endif
9912   ;
9913   return 0;
9914 }
9915 _ACEOF
9916 rm -f conftest.$ac_objext
9917 if { (eval echo "$as_me:9917: \"$ac_compile\"") >&5
9918   (eval $ac_compile) 2>&5
9919   ac_status=$?
9920   echo "$as_me:9920: \$? = $ac_status" >&5
9921   (exit $ac_status); } &&
9922          { ac_try='test -s conftest.$ac_objext'
9923   { (eval echo "$as_me:9923: \"$ac_try\"") >&5
9924   (eval $ac_try) 2>&5
9925   ac_status=$?
9926   echo "$as_me:9926: \$? = $ac_status" >&5
9927   (exit $ac_status); }; }; then
9928   cf_cv_default_source=no
9929 else
9930   echo "$as_me: failed program was:" >&5
9931 cat conftest.$ac_ext >&5
9932 cf_cv_default_source=yes
9933 fi
9934 rm -f conftest.$ac_objext conftest.$ac_ext
9935
9936 fi
9937 echo "$as_me:9937: result: $cf_cv_default_source" >&5
9938 echo "${ECHO_T}$cf_cv_default_source" >&6
9939                         if test "$cf_cv_default_source" = yes
9940                         then
9941
9942         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9943         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9944
9945                         fi
9946                 fi
9947         fi
9948
9949 fi
9950
9951         ;;
9952 (minix*)
9953         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9954         ;;
9955 (mirbsd*)
9956         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9957         cf_XOPEN_SOURCE=
9958
9959 if test "$cf_cv_posix_visible" = no; then
9960
9961 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9962
9963 cf_save_CFLAGS="$CFLAGS"
9964 cf_save_CPPFLAGS="$CPPFLAGS"
9965
9966 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9967         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9968                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9969
9970 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9971         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9972                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9973
9974 echo "$as_me:9974: checking if we should define _POSIX_C_SOURCE" >&5
9975 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9976 if test "${cf_cv_posix_c_source+set}" = set; then
9977   echo $ECHO_N "(cached) $ECHO_C" >&6
9978 else
9979
9980 echo "${as_me:-configure}:9980: testing if the symbol is already defined go no further ..." 1>&5
9981
9982         cat >conftest.$ac_ext <<_ACEOF
9983 #line 9983 "configure"
9984 #include "confdefs.h"
9985 #include <sys/types.h>
9986 int
9987 main (void)
9988 {
9989
9990 #ifndef _POSIX_C_SOURCE
9991 make an error
9992 #endif
9993   ;
9994   return 0;
9995 }
9996 _ACEOF
9997 rm -f conftest.$ac_objext
9998 if { (eval echo "$as_me:9998: \"$ac_compile\"") >&5
9999   (eval $ac_compile) 2>&5
10000   ac_status=$?
10001   echo "$as_me:10001: \$? = $ac_status" >&5
10002   (exit $ac_status); } &&
10003          { ac_try='test -s conftest.$ac_objext'
10004   { (eval echo "$as_me:10004: \"$ac_try\"") >&5
10005   (eval $ac_try) 2>&5
10006   ac_status=$?
10007   echo "$as_me:10007: \$? = $ac_status" >&5
10008   (exit $ac_status); }; }; then
10009   cf_cv_posix_c_source=no
10010 else
10011   echo "$as_me: failed program was:" >&5
10012 cat conftest.$ac_ext >&5
10013 cf_want_posix_source=no
10014          case .$cf_POSIX_C_SOURCE in
10015          (.[12]??*)
10016                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10017                 ;;
10018          (.2)
10019                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10020                 cf_want_posix_source=yes
10021                 ;;
10022          (.*)
10023                 cf_want_posix_source=yes
10024                 ;;
10025          esac
10026          if test "$cf_want_posix_source" = yes ; then
10027                 cat >conftest.$ac_ext <<_ACEOF
10028 #line 10028 "configure"
10029 #include "confdefs.h"
10030 #include <sys/types.h>
10031 int
10032 main (void)
10033 {
10034
10035 #ifdef _POSIX_SOURCE
10036 make an error
10037 #endif
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 rm -f conftest.$ac_objext
10043 if { (eval echo "$as_me:10043: \"$ac_compile\"") >&5
10044   (eval $ac_compile) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } &&
10048          { ac_try='test -s conftest.$ac_objext'
10049   { (eval echo "$as_me:10049: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); }; }; then
10054   :
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 cat conftest.$ac_ext >&5
10058 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10059 fi
10060 rm -f conftest.$ac_objext conftest.$ac_ext
10061          fi
10062
10063 echo "${as_me:-configure}:10063: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10064
10065          CFLAGS="$cf_trim_CFLAGS"
10066          CPPFLAGS="$cf_trim_CPPFLAGS"
10067
10068         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10069         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10070
10071 echo "${as_me:-configure}:10071: testing if the second compile does not leave our definition intact error ..." 1>&5
10072
10073          cat >conftest.$ac_ext <<_ACEOF
10074 #line 10074 "configure"
10075 #include "confdefs.h"
10076 #include <sys/types.h>
10077 int
10078 main (void)
10079 {
10080
10081 #ifndef _POSIX_C_SOURCE
10082 make an error
10083 #endif
10084   ;
10085   return 0;
10086 }
10087 _ACEOF
10088 rm -f conftest.$ac_objext
10089 if { (eval echo "$as_me:10089: \"$ac_compile\"") >&5
10090   (eval $ac_compile) 2>&5
10091   ac_status=$?
10092   echo "$as_me:10092: \$? = $ac_status" >&5
10093   (exit $ac_status); } &&
10094          { ac_try='test -s conftest.$ac_objext'
10095   { (eval echo "$as_me:10095: \"$ac_try\"") >&5
10096   (eval $ac_try) 2>&5
10097   ac_status=$?
10098   echo "$as_me:10098: \$? = $ac_status" >&5
10099   (exit $ac_status); }; }; then
10100   :
10101 else
10102   echo "$as_me: failed program was:" >&5
10103 cat conftest.$ac_ext >&5
10104 cf_cv_posix_c_source=no
10105 fi
10106 rm -f conftest.$ac_objext conftest.$ac_ext
10107          CFLAGS="$cf_save_CFLAGS"
10108          CPPFLAGS="$cf_save_CPPFLAGS"
10109
10110 fi
10111 rm -f conftest.$ac_objext conftest.$ac_ext
10112
10113 fi
10114 echo "$as_me:10114: result: $cf_cv_posix_c_source" >&5
10115 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10116
10117 if test "$cf_cv_posix_c_source" != no ; then
10118         CFLAGS="$cf_trim_CFLAGS"
10119         CPPFLAGS="$cf_trim_CPPFLAGS"
10120
10121 cf_fix_cppflags=no
10122 cf_new_cflags=
10123 cf_new_cppflags=
10124 cf_new_extra_cppflags=
10125
10126 for cf_add_cflags in $cf_cv_posix_c_source
10127 do
10128 case $cf_fix_cppflags in
10129 (no)
10130         case $cf_add_cflags in
10131         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10132                 case $cf_add_cflags in
10133                 (-D*)
10134                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10135
10136                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10137                                 && test -z "${cf_tst_cflags}" \
10138                                 && cf_fix_cppflags=yes
10139
10140                         if test $cf_fix_cppflags = yes ; then
10141
10142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10144
10145                                 continue
10146                         elif test "${cf_tst_cflags}" = "\"'" ; then
10147
10148         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10149         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10150
10151                                 continue
10152                         fi
10153                         ;;
10154                 esac
10155                 case "$CPPFLAGS" in
10156                 (*$cf_add_cflags)
10157                         ;;
10158                 (*)
10159                         case $cf_add_cflags in
10160                         (-D*)
10161                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10162
10163 CPPFLAGS=`echo "$CPPFLAGS" | \
10164         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10165                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10166
10167                                 ;;
10168                         esac
10169
10170         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10171         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10172
10173                         ;;
10174                 esac
10175                 ;;
10176         (*)
10177
10178         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10179         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10180
10181                 ;;
10182         esac
10183         ;;
10184 (yes)
10185
10186         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10187         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10188
10189         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10190
10191         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10192                 && test -z "${cf_tst_cflags}" \
10193                 && cf_fix_cppflags=no
10194         ;;
10195 esac
10196 done
10197
10198 if test -n "$cf_new_cflags" ; then
10199
10200         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10201         CFLAGS="${CFLAGS}$cf_new_cflags"
10202
10203 fi
10204
10205 if test -n "$cf_new_cppflags" ; then
10206
10207         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10208         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10209
10210 fi
10211
10212 if test -n "$cf_new_extra_cppflags" ; then
10213
10214         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10215         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10216
10217 fi
10218
10219 fi
10220
10221 fi # cf_cv_posix_visible
10222
10223         ;;
10224 (netbsd*)
10225         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10226         ;;
10227 (openbsd[4-9]*)
10228         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10229         cf_xopen_source="-D_BSD_SOURCE"
10230         cf_XOPEN_SOURCE=600
10231         ;;
10232 (openbsd*)
10233         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10234         ;;
10235 (osf[45]*)
10236         cf_xopen_source="-D_OSF_SOURCE"
10237         ;;
10238 (nto-qnx*)
10239         cf_xopen_source="-D_QNX_SOURCE"
10240         ;;
10241 (sco*)
10242         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10243         ;;
10244 (solaris2.*)
10245         cf_xopen_source="-D__EXTENSIONS__"
10246         cf_cv_xopen_source=broken
10247         ;;
10248 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10249         cf_XOPEN_SOURCE=
10250         cf_POSIX_C_SOURCE=
10251         ;;
10252 (*)
10253
10254 echo "$as_me:10254: checking if we should define _XOPEN_SOURCE" >&5
10255 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10256 if test "${cf_cv_xopen_source+set}" = set; then
10257   echo $ECHO_N "(cached) $ECHO_C" >&6
10258 else
10259
10260         cat >conftest.$ac_ext <<_ACEOF
10261 #line 10261 "configure"
10262 #include "confdefs.h"
10263
10264 #include <stdlib.h>
10265 #include <string.h>
10266 #include <sys/types.h>
10267
10268 int
10269 main (void)
10270 {
10271
10272 #ifndef _XOPEN_SOURCE
10273 make an error
10274 #endif
10275   ;
10276   return 0;
10277 }
10278 _ACEOF
10279 rm -f conftest.$ac_objext
10280 if { (eval echo "$as_me:10280: \"$ac_compile\"") >&5
10281   (eval $ac_compile) 2>&5
10282   ac_status=$?
10283   echo "$as_me:10283: \$? = $ac_status" >&5
10284   (exit $ac_status); } &&
10285          { ac_try='test -s conftest.$ac_objext'
10286   { (eval echo "$as_me:10286: \"$ac_try\"") >&5
10287   (eval $ac_try) 2>&5
10288   ac_status=$?
10289   echo "$as_me:10289: \$? = $ac_status" >&5
10290   (exit $ac_status); }; }; then
10291   cf_cv_xopen_source=no
10292 else
10293   echo "$as_me: failed program was:" >&5
10294 cat conftest.$ac_ext >&5
10295 cf_save="$CPPFLAGS"
10296
10297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10298         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10299
10300          cat >conftest.$ac_ext <<_ACEOF
10301 #line 10301 "configure"
10302 #include "confdefs.h"
10303
10304 #include <stdlib.h>
10305 #include <string.h>
10306 #include <sys/types.h>
10307
10308 int
10309 main (void)
10310 {
10311
10312 #ifdef _XOPEN_SOURCE
10313 make an error
10314 #endif
10315   ;
10316   return 0;
10317 }
10318 _ACEOF
10319 rm -f conftest.$ac_objext
10320 if { (eval echo "$as_me:10320: \"$ac_compile\"") >&5
10321   (eval $ac_compile) 2>&5
10322   ac_status=$?
10323   echo "$as_me:10323: \$? = $ac_status" >&5
10324   (exit $ac_status); } &&
10325          { ac_try='test -s conftest.$ac_objext'
10326   { (eval echo "$as_me:10326: \"$ac_try\"") >&5
10327   (eval $ac_try) 2>&5
10328   ac_status=$?
10329   echo "$as_me:10329: \$? = $ac_status" >&5
10330   (exit $ac_status); }; }; then
10331   cf_cv_xopen_source=no
10332 else
10333   echo "$as_me: failed program was:" >&5
10334 cat conftest.$ac_ext >&5
10335 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10336 fi
10337 rm -f conftest.$ac_objext conftest.$ac_ext
10338         CPPFLAGS="$cf_save"
10339
10340 fi
10341 rm -f conftest.$ac_objext conftest.$ac_ext
10342
10343 fi
10344 echo "$as_me:10344: result: $cf_cv_xopen_source" >&5
10345 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10346
10347 if test "$cf_cv_xopen_source" != no ; then
10348
10349 CFLAGS=`echo "$CFLAGS" | \
10350         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10351                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10352
10353 CPPFLAGS=`echo "$CPPFLAGS" | \
10354         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10355                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10356
10357         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10358
10359 cf_fix_cppflags=no
10360 cf_new_cflags=
10361 cf_new_cppflags=
10362 cf_new_extra_cppflags=
10363
10364 for cf_add_cflags in $cf_temp_xopen_source
10365 do
10366 case $cf_fix_cppflags in
10367 (no)
10368         case $cf_add_cflags in
10369         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10370                 case $cf_add_cflags in
10371                 (-D*)
10372                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10373
10374                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10375                                 && test -z "${cf_tst_cflags}" \
10376                                 && cf_fix_cppflags=yes
10377
10378                         if test $cf_fix_cppflags = yes ; then
10379
10380         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10381         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10382
10383                                 continue
10384                         elif test "${cf_tst_cflags}" = "\"'" ; then
10385
10386         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10387         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10388
10389                                 continue
10390                         fi
10391                         ;;
10392                 esac
10393                 case "$CPPFLAGS" in
10394                 (*$cf_add_cflags)
10395                         ;;
10396                 (*)
10397                         case $cf_add_cflags in
10398                         (-D*)
10399                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10400
10401 CPPFLAGS=`echo "$CPPFLAGS" | \
10402         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10403                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10404
10405                                 ;;
10406                         esac
10407
10408         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10409         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10410
10411                         ;;
10412                 esac
10413                 ;;
10414         (*)
10415
10416         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10417         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10418
10419                 ;;
10420         esac
10421         ;;
10422 (yes)
10423
10424         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10425         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10426
10427         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10428
10429         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10430                 && test -z "${cf_tst_cflags}" \
10431                 && cf_fix_cppflags=no
10432         ;;
10433 esac
10434 done
10435
10436 if test -n "$cf_new_cflags" ; then
10437
10438         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10439         CFLAGS="${CFLAGS}$cf_new_cflags"
10440
10441 fi
10442
10443 if test -n "$cf_new_cppflags" ; then
10444
10445         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10446         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10447
10448 fi
10449
10450 if test -n "$cf_new_extra_cppflags" ; then
10451
10452         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10453         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10454
10455 fi
10456
10457 fi
10458
10459 if test "$cf_cv_posix_visible" = no; then
10460
10461 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10462
10463 cf_save_CFLAGS="$CFLAGS"
10464 cf_save_CPPFLAGS="$CPPFLAGS"
10465
10466 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10467         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10468                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10469
10470 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10471         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10472                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10473
10474 echo "$as_me:10474: checking if we should define _POSIX_C_SOURCE" >&5
10475 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10476 if test "${cf_cv_posix_c_source+set}" = set; then
10477   echo $ECHO_N "(cached) $ECHO_C" >&6
10478 else
10479
10480 echo "${as_me:-configure}:10480: testing if the symbol is already defined go no further ..." 1>&5
10481
10482         cat >conftest.$ac_ext <<_ACEOF
10483 #line 10483 "configure"
10484 #include "confdefs.h"
10485 #include <sys/types.h>
10486 int
10487 main (void)
10488 {
10489
10490 #ifndef _POSIX_C_SOURCE
10491 make an error
10492 #endif
10493   ;
10494   return 0;
10495 }
10496 _ACEOF
10497 rm -f conftest.$ac_objext
10498 if { (eval echo "$as_me:10498: \"$ac_compile\"") >&5
10499   (eval $ac_compile) 2>&5
10500   ac_status=$?
10501   echo "$as_me:10501: \$? = $ac_status" >&5
10502   (exit $ac_status); } &&
10503          { ac_try='test -s conftest.$ac_objext'
10504   { (eval echo "$as_me:10504: \"$ac_try\"") >&5
10505   (eval $ac_try) 2>&5
10506   ac_status=$?
10507   echo "$as_me:10507: \$? = $ac_status" >&5
10508   (exit $ac_status); }; }; then
10509   cf_cv_posix_c_source=no
10510 else
10511   echo "$as_me: failed program was:" >&5
10512 cat conftest.$ac_ext >&5
10513 cf_want_posix_source=no
10514          case .$cf_POSIX_C_SOURCE in
10515          (.[12]??*)
10516                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10517                 ;;
10518          (.2)
10519                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10520                 cf_want_posix_source=yes
10521                 ;;
10522          (.*)
10523                 cf_want_posix_source=yes
10524                 ;;
10525          esac
10526          if test "$cf_want_posix_source" = yes ; then
10527                 cat >conftest.$ac_ext <<_ACEOF
10528 #line 10528 "configure"
10529 #include "confdefs.h"
10530 #include <sys/types.h>
10531 int
10532 main (void)
10533 {
10534
10535 #ifdef _POSIX_SOURCE
10536 make an error
10537 #endif
10538   ;
10539   return 0;
10540 }
10541 _ACEOF
10542 rm -f conftest.$ac_objext
10543 if { (eval echo "$as_me:10543: \"$ac_compile\"") >&5
10544   (eval $ac_compile) 2>&5
10545   ac_status=$?
10546   echo "$as_me:10546: \$? = $ac_status" >&5
10547   (exit $ac_status); } &&
10548          { ac_try='test -s conftest.$ac_objext'
10549   { (eval echo "$as_me:10549: \"$ac_try\"") >&5
10550   (eval $ac_try) 2>&5
10551   ac_status=$?
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit $ac_status); }; }; then
10554   :
10555 else
10556   echo "$as_me: failed program was:" >&5
10557 cat conftest.$ac_ext >&5
10558 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10559 fi
10560 rm -f conftest.$ac_objext conftest.$ac_ext
10561          fi
10562
10563 echo "${as_me:-configure}:10563: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10564
10565          CFLAGS="$cf_trim_CFLAGS"
10566          CPPFLAGS="$cf_trim_CPPFLAGS"
10567
10568         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10569         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10570
10571 echo "${as_me:-configure}:10571: testing if the second compile does not leave our definition intact error ..." 1>&5
10572
10573          cat >conftest.$ac_ext <<_ACEOF
10574 #line 10574 "configure"
10575 #include "confdefs.h"
10576 #include <sys/types.h>
10577 int
10578 main (void)
10579 {
10580
10581 #ifndef _POSIX_C_SOURCE
10582 make an error
10583 #endif
10584   ;
10585   return 0;
10586 }
10587 _ACEOF
10588 rm -f conftest.$ac_objext
10589 if { (eval echo "$as_me:10589: \"$ac_compile\"") >&5
10590   (eval $ac_compile) 2>&5
10591   ac_status=$?
10592   echo "$as_me:10592: \$? = $ac_status" >&5
10593   (exit $ac_status); } &&
10594          { ac_try='test -s conftest.$ac_objext'
10595   { (eval echo "$as_me:10595: \"$ac_try\"") >&5
10596   (eval $ac_try) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); }; }; then
10600   :
10601 else
10602   echo "$as_me: failed program was:" >&5
10603 cat conftest.$ac_ext >&5
10604 cf_cv_posix_c_source=no
10605 fi
10606 rm -f conftest.$ac_objext conftest.$ac_ext
10607          CFLAGS="$cf_save_CFLAGS"
10608          CPPFLAGS="$cf_save_CPPFLAGS"
10609
10610 fi
10611 rm -f conftest.$ac_objext conftest.$ac_ext
10612
10613 fi
10614 echo "$as_me:10614: result: $cf_cv_posix_c_source" >&5
10615 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10616
10617 if test "$cf_cv_posix_c_source" != no ; then
10618         CFLAGS="$cf_trim_CFLAGS"
10619         CPPFLAGS="$cf_trim_CPPFLAGS"
10620
10621 cf_fix_cppflags=no
10622 cf_new_cflags=
10623 cf_new_cppflags=
10624 cf_new_extra_cppflags=
10625
10626 for cf_add_cflags in $cf_cv_posix_c_source
10627 do
10628 case $cf_fix_cppflags in
10629 (no)
10630         case $cf_add_cflags in
10631         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10632                 case $cf_add_cflags in
10633                 (-D*)
10634                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10635
10636                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10637                                 && test -z "${cf_tst_cflags}" \
10638                                 && cf_fix_cppflags=yes
10639
10640                         if test $cf_fix_cppflags = yes ; then
10641
10642         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10643         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10644
10645                                 continue
10646                         elif test "${cf_tst_cflags}" = "\"'" ; then
10647
10648         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10649         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10650
10651                                 continue
10652                         fi
10653                         ;;
10654                 esac
10655                 case "$CPPFLAGS" in
10656                 (*$cf_add_cflags)
10657                         ;;
10658                 (*)
10659                         case $cf_add_cflags in
10660                         (-D*)
10661                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10662
10663 CPPFLAGS=`echo "$CPPFLAGS" | \
10664         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10665                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10666
10667                                 ;;
10668                         esac
10669
10670         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10671         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10672
10673                         ;;
10674                 esac
10675                 ;;
10676         (*)
10677
10678         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10679         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10680
10681                 ;;
10682         esac
10683         ;;
10684 (yes)
10685
10686         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10687         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10688
10689         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10690
10691         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10692                 && test -z "${cf_tst_cflags}" \
10693                 && cf_fix_cppflags=no
10694         ;;
10695 esac
10696 done
10697
10698 if test -n "$cf_new_cflags" ; then
10699
10700         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10701         CFLAGS="${CFLAGS}$cf_new_cflags"
10702
10703 fi
10704
10705 if test -n "$cf_new_cppflags" ; then
10706
10707         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10708         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10709
10710 fi
10711
10712 if test -n "$cf_new_extra_cppflags" ; then
10713
10714         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10715         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10716
10717 fi
10718
10719 fi
10720
10721 fi # cf_cv_posix_visible
10722
10723         ;;
10724 esac
10725
10726 if test -n "$cf_xopen_source" ; then
10727
10728 cf_fix_cppflags=no
10729 cf_new_cflags=
10730 cf_new_cppflags=
10731 cf_new_extra_cppflags=
10732
10733 for cf_add_cflags in $cf_xopen_source
10734 do
10735 case $cf_fix_cppflags in
10736 (no)
10737         case $cf_add_cflags in
10738         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10739                 case $cf_add_cflags in
10740                 (-D*)
10741                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10742
10743                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10744                                 && test -z "${cf_tst_cflags}" \
10745                                 && cf_fix_cppflags=yes
10746
10747                         if test $cf_fix_cppflags = yes ; then
10748
10749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10751
10752                                 continue
10753                         elif test "${cf_tst_cflags}" = "\"'" ; then
10754
10755         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10756         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10757
10758                                 continue
10759                         fi
10760                         ;;
10761                 esac
10762                 case "$CPPFLAGS" in
10763                 (*$cf_add_cflags)
10764                         ;;
10765                 (*)
10766                         case $cf_add_cflags in
10767                         (-D*)
10768                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10769
10770 CPPFLAGS=`echo "$CPPFLAGS" | \
10771         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10772                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10773
10774                                 ;;
10775                         esac
10776
10777         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10778         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10779
10780                         ;;
10781                 esac
10782                 ;;
10783         (*)
10784
10785         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10786         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10787
10788                 ;;
10789         esac
10790         ;;
10791 (yes)
10792
10793         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10794         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10795
10796         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10797
10798         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10799                 && test -z "${cf_tst_cflags}" \
10800                 && cf_fix_cppflags=no
10801         ;;
10802 esac
10803 done
10804
10805 if test -n "$cf_new_cflags" ; then
10806         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10807
10808 echo "${as_me:-configure}:10808: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10809
10810         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10811         CFLAGS="${CFLAGS}$cf_new_cflags"
10812
10813 fi
10814
10815 if test -n "$cf_new_cppflags" ; then
10816         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10817
10818 echo "${as_me:-configure}:10818: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10819
10820         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10821         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10822
10823 fi
10824
10825 if test -n "$cf_new_extra_cppflags" ; then
10826         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10827
10828 echo "${as_me:-configure}:10828: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10829
10830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10832
10833 fi
10834
10835 fi
10836
10837 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10838         echo "$as_me:10838: checking if _XOPEN_SOURCE really is set" >&5
10839 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10840         cat >conftest.$ac_ext <<_ACEOF
10841 #line 10841 "configure"
10842 #include "confdefs.h"
10843 #include <stdlib.h>
10844 int
10845 main (void)
10846 {
10847
10848 #ifndef _XOPEN_SOURCE
10849 make an error
10850 #endif
10851   ;
10852   return 0;
10853 }
10854 _ACEOF
10855 rm -f conftest.$ac_objext
10856 if { (eval echo "$as_me:10856: \"$ac_compile\"") >&5
10857   (eval $ac_compile) 2>&5
10858   ac_status=$?
10859   echo "$as_me:10859: \$? = $ac_status" >&5
10860   (exit $ac_status); } &&
10861          { ac_try='test -s conftest.$ac_objext'
10862   { (eval echo "$as_me:10862: \"$ac_try\"") >&5
10863   (eval $ac_try) 2>&5
10864   ac_status=$?
10865   echo "$as_me:10865: \$? = $ac_status" >&5
10866   (exit $ac_status); }; }; then
10867   cf_XOPEN_SOURCE_set=yes
10868 else
10869   echo "$as_me: failed program was:" >&5
10870 cat conftest.$ac_ext >&5
10871 cf_XOPEN_SOURCE_set=no
10872 fi
10873 rm -f conftest.$ac_objext conftest.$ac_ext
10874         echo "$as_me:10874: result: $cf_XOPEN_SOURCE_set" >&5
10875 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10876         if test $cf_XOPEN_SOURCE_set = yes
10877         then
10878                 cat >conftest.$ac_ext <<_ACEOF
10879 #line 10879 "configure"
10880 #include "confdefs.h"
10881 #include <stdlib.h>
10882 int
10883 main (void)
10884 {
10885
10886 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10887 make an error
10888 #endif
10889   ;
10890   return 0;
10891 }
10892 _ACEOF
10893 rm -f conftest.$ac_objext
10894 if { (eval echo "$as_me:10894: \"$ac_compile\"") >&5
10895   (eval $ac_compile) 2>&5
10896   ac_status=$?
10897   echo "$as_me:10897: \$? = $ac_status" >&5
10898   (exit $ac_status); } &&
10899          { ac_try='test -s conftest.$ac_objext'
10900   { (eval echo "$as_me:10900: \"$ac_try\"") >&5
10901   (eval $ac_try) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit $ac_status); }; }; then
10905   cf_XOPEN_SOURCE_set_ok=yes
10906 else
10907   echo "$as_me: failed program was:" >&5
10908 cat conftest.$ac_ext >&5
10909 cf_XOPEN_SOURCE_set_ok=no
10910 fi
10911 rm -f conftest.$ac_objext conftest.$ac_ext
10912                 if test $cf_XOPEN_SOURCE_set_ok = no
10913                 then
10914                         { echo "$as_me:10914: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10915 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10916                 fi
10917         else
10918
10919 echo "$as_me:10919: checking if we should define _XOPEN_SOURCE" >&5
10920 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10921 if test "${cf_cv_xopen_source+set}" = set; then
10922   echo $ECHO_N "(cached) $ECHO_C" >&6
10923 else
10924
10925         cat >conftest.$ac_ext <<_ACEOF
10926 #line 10926 "configure"
10927 #include "confdefs.h"
10928
10929 #include <stdlib.h>
10930 #include <string.h>
10931 #include <sys/types.h>
10932
10933 int
10934 main (void)
10935 {
10936
10937 #ifndef _XOPEN_SOURCE
10938 make an error
10939 #endif
10940   ;
10941   return 0;
10942 }
10943 _ACEOF
10944 rm -f conftest.$ac_objext
10945 if { (eval echo "$as_me:10945: \"$ac_compile\"") >&5
10946   (eval $ac_compile) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); } &&
10950          { ac_try='test -s conftest.$ac_objext'
10951   { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952   (eval $ac_try) 2>&5
10953   ac_status=$?
10954   echo "$as_me:10954: \$? = $ac_status" >&5
10955   (exit $ac_status); }; }; then
10956   cf_cv_xopen_source=no
10957 else
10958   echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 cf_save="$CPPFLAGS"
10961
10962         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10963         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10964
10965          cat >conftest.$ac_ext <<_ACEOF
10966 #line 10966 "configure"
10967 #include "confdefs.h"
10968
10969 #include <stdlib.h>
10970 #include <string.h>
10971 #include <sys/types.h>
10972
10973 int
10974 main (void)
10975 {
10976
10977 #ifdef _XOPEN_SOURCE
10978 make an error
10979 #endif
10980   ;
10981   return 0;
10982 }
10983 _ACEOF
10984 rm -f conftest.$ac_objext
10985 if { (eval echo "$as_me:10985: \"$ac_compile\"") >&5
10986   (eval $ac_compile) 2>&5
10987   ac_status=$?
10988   echo "$as_me:10988: \$? = $ac_status" >&5
10989   (exit $ac_status); } &&
10990          { ac_try='test -s conftest.$ac_objext'
10991   { (eval echo "$as_me:10991: \"$ac_try\"") >&5
10992   (eval $ac_try) 2>&5
10993   ac_status=$?
10994   echo "$as_me:10994: \$? = $ac_status" >&5
10995   (exit $ac_status); }; }; then
10996   cf_cv_xopen_source=no
10997 else
10998   echo "$as_me: failed program was:" >&5
10999 cat conftest.$ac_ext >&5
11000 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11001 fi
11002 rm -f conftest.$ac_objext conftest.$ac_ext
11003         CPPFLAGS="$cf_save"
11004
11005 fi
11006 rm -f conftest.$ac_objext conftest.$ac_ext
11007
11008 fi
11009 echo "$as_me:11009: result: $cf_cv_xopen_source" >&5
11010 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11011
11012 if test "$cf_cv_xopen_source" != no ; then
11013
11014 CFLAGS=`echo "$CFLAGS" | \
11015         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11016                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11017
11018 CPPFLAGS=`echo "$CPPFLAGS" | \
11019         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11020                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11021
11022         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11023
11024 cf_fix_cppflags=no
11025 cf_new_cflags=
11026 cf_new_cppflags=
11027 cf_new_extra_cppflags=
11028
11029 for cf_add_cflags in $cf_temp_xopen_source
11030 do
11031 case $cf_fix_cppflags in
11032 (no)
11033         case $cf_add_cflags in
11034         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11035                 case $cf_add_cflags in
11036                 (-D*)
11037                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11038
11039                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11040                                 && test -z "${cf_tst_cflags}" \
11041                                 && cf_fix_cppflags=yes
11042
11043                         if test $cf_fix_cppflags = yes ; then
11044
11045         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11046         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11047
11048                                 continue
11049                         elif test "${cf_tst_cflags}" = "\"'" ; then
11050
11051         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11052         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11053
11054                                 continue
11055                         fi
11056                         ;;
11057                 esac
11058                 case "$CPPFLAGS" in
11059                 (*$cf_add_cflags)
11060                         ;;
11061                 (*)
11062                         case $cf_add_cflags in
11063                         (-D*)
11064                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11065
11066 CPPFLAGS=`echo "$CPPFLAGS" | \
11067         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11068                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11069
11070                                 ;;
11071                         esac
11072
11073         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11074         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11075
11076                         ;;
11077                 esac
11078                 ;;
11079         (*)
11080
11081         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11082         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11083
11084                 ;;
11085         esac
11086         ;;
11087 (yes)
11088
11089         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11090         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11091
11092         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11093
11094         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11095                 && test -z "${cf_tst_cflags}" \
11096                 && cf_fix_cppflags=no
11097         ;;
11098 esac
11099 done
11100
11101 if test -n "$cf_new_cflags" ; then
11102
11103         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11104         CFLAGS="${CFLAGS}$cf_new_cflags"
11105
11106 fi
11107
11108 if test -n "$cf_new_cppflags" ; then
11109
11110         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11111         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11112
11113 fi
11114
11115 if test -n "$cf_new_extra_cppflags" ; then
11116
11117         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11118         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11119
11120 fi
11121
11122 fi
11123
11124         fi
11125 fi
11126 fi # cf_cv_posix_visible
11127
11128 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11129
11130 # Work around breakage on OS X
11131
11132 echo "$as_me:11132: checking if SIGWINCH is defined" >&5
11133 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11134 if test "${cf_cv_define_sigwinch+set}" = set; then
11135   echo $ECHO_N "(cached) $ECHO_C" >&6
11136 else
11137
11138         cat >conftest.$ac_ext <<_ACEOF
11139 #line 11139 "configure"
11140 #include "confdefs.h"
11141
11142 #include <sys/types.h>
11143 #include <sys/signal.h>
11144
11145 int
11146 main (void)
11147 {
11148 int x = SIGWINCH; (void)x
11149   ;
11150   return 0;
11151 }
11152 _ACEOF
11153 rm -f conftest.$ac_objext
11154 if { (eval echo "$as_me:11154: \"$ac_compile\"") >&5
11155   (eval $ac_compile) 2>&5
11156   ac_status=$?
11157   echo "$as_me:11157: \$? = $ac_status" >&5
11158   (exit $ac_status); } &&
11159          { ac_try='test -s conftest.$ac_objext'
11160   { (eval echo "$as_me:11160: \"$ac_try\"") >&5
11161   (eval $ac_try) 2>&5
11162   ac_status=$?
11163   echo "$as_me:11163: \$? = $ac_status" >&5
11164   (exit $ac_status); }; }; then
11165   cf_cv_define_sigwinch=yes
11166 else
11167   echo "$as_me: failed program was:" >&5
11168 cat conftest.$ac_ext >&5
11169 cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172
11173 #undef _XOPEN_SOURCE
11174 #undef _POSIX_SOURCE
11175 #undef _POSIX_C_SOURCE
11176 #include <sys/types.h>
11177 #include <sys/signal.h>
11178
11179 int
11180 main (void)
11181 {
11182 int x = SIGWINCH; (void)x
11183   ;
11184   return 0;
11185 }
11186 _ACEOF
11187 rm -f conftest.$ac_objext
11188 if { (eval echo "$as_me:11188: \"$ac_compile\"") >&5
11189   (eval $ac_compile) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); } &&
11193          { ac_try='test -s conftest.$ac_objext'
11194   { (eval echo "$as_me:11194: \"$ac_try\"") >&5
11195   (eval $ac_try) 2>&5
11196   ac_status=$?
11197   echo "$as_me:11197: \$? = $ac_status" >&5
11198   (exit $ac_status); }; }; then
11199   cf_cv_define_sigwinch=maybe
11200 else
11201   echo "$as_me: failed program was:" >&5
11202 cat conftest.$ac_ext >&5
11203 cf_cv_define_sigwinch=no
11204 fi
11205 rm -f conftest.$ac_objext conftest.$ac_ext
11206
11207 fi
11208 rm -f conftest.$ac_objext conftest.$ac_ext
11209
11210 fi
11211 echo "$as_me:11211: result: $cf_cv_define_sigwinch" >&5
11212 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11213
11214 if test "$cf_cv_define_sigwinch" = maybe ; then
11215 echo "$as_me:11215: checking for actual SIGWINCH definition" >&5
11216 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11217 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11218   echo $ECHO_N "(cached) $ECHO_C" >&6
11219 else
11220
11221 cf_cv_fixup_sigwinch=unknown
11222 cf_sigwinch=32
11223 while test $cf_sigwinch != 1
11224 do
11225         cat >conftest.$ac_ext <<_ACEOF
11226 #line 11226 "configure"
11227 #include "confdefs.h"
11228
11229 #undef _XOPEN_SOURCE
11230 #undef _POSIX_SOURCE
11231 #undef _POSIX_C_SOURCE
11232 #include <sys/types.h>
11233 #include <sys/signal.h>
11234
11235 int
11236 main (void)
11237 {
11238
11239 #if SIGWINCH != $cf_sigwinch
11240 make an error
11241 #endif
11242 int x = SIGWINCH; (void)x
11243   ;
11244   return 0;
11245 }
11246 _ACEOF
11247 rm -f conftest.$ac_objext
11248 if { (eval echo "$as_me:11248: \"$ac_compile\"") >&5
11249   (eval $ac_compile) 2>&5
11250   ac_status=$?
11251   echo "$as_me:11251: \$? = $ac_status" >&5
11252   (exit $ac_status); } &&
11253          { ac_try='test -s conftest.$ac_objext'
11254   { (eval echo "$as_me:11254: \"$ac_try\"") >&5
11255   (eval $ac_try) 2>&5
11256   ac_status=$?
11257   echo "$as_me:11257: \$? = $ac_status" >&5
11258   (exit $ac_status); }; }; then
11259   cf_cv_fixup_sigwinch=$cf_sigwinch
11260          break
11261 else
11262   echo "$as_me: failed program was:" >&5
11263 cat conftest.$ac_ext >&5
11264 fi
11265 rm -f conftest.$ac_objext conftest.$ac_ext
11266
11267 cf_sigwinch=`expr $cf_sigwinch - 1`
11268 done
11269
11270 fi
11271 echo "$as_me:11271: result: $cf_cv_fixup_sigwinch" >&5
11272 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11273
11274         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11275                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11276         fi
11277 fi
11278
11279 # Checks for CODESET support.
11280
11281 echo "$as_me:11281: checking for nl_langinfo and CODESET" >&5
11282 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11283 if test "${am_cv_langinfo_codeset+set}" = set; then
11284   echo $ECHO_N "(cached) $ECHO_C" >&6
11285 else
11286   cat >conftest.$ac_ext <<_ACEOF
11287 #line 11287 "configure"
11288 #include "confdefs.h"
11289 #include <langinfo.h>
11290 int
11291 main (void)
11292 {
11293 char* cs = nl_langinfo(CODESET); (void)cs
11294   ;
11295   return 0;
11296 }
11297 _ACEOF
11298 rm -f conftest.$ac_objext conftest$ac_exeext
11299 if { (eval echo "$as_me:11299: \"$ac_link\"") >&5
11300   (eval $ac_link) 2>&5
11301   ac_status=$?
11302   echo "$as_me:11302: \$? = $ac_status" >&5
11303   (exit $ac_status); } &&
11304          { ac_try='test -s conftest$ac_exeext'
11305   { (eval echo "$as_me:11305: \"$ac_try\"") >&5
11306   (eval $ac_try) 2>&5
11307   ac_status=$?
11308   echo "$as_me:11308: \$? = $ac_status" >&5
11309   (exit $ac_status); }; }; then
11310   am_cv_langinfo_codeset=yes
11311 else
11312   echo "$as_me: failed program was:" >&5
11313 cat conftest.$ac_ext >&5
11314 am_cv_langinfo_codeset=no
11315 fi
11316 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11317
11318 fi
11319 echo "$as_me:11319: result: $am_cv_langinfo_codeset" >&5
11320 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11321         if test $am_cv_langinfo_codeset = yes; then
11322
11323 cat >>confdefs.h <<\EOF
11324 #define HAVE_LANGINFO_CODESET 1
11325 EOF
11326
11327         fi
11328
11329 # use these variables to work around a defect in gcc's fixincludes.
11330 NCURSES_OK_WCHAR_T=
11331 NCURSES_OK_WINT_T=
11332
11333 echo "$as_me:11333: checking if you want wide-character code" >&5
11334 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11335
11336 # Check whether --enable-widec or --disable-widec was given.
11337 if test "${enable_widec+set}" = set; then
11338   enableval="$enable_widec"
11339   with_widec=$enableval
11340 else
11341   with_widec=no
11342 fi;
11343 echo "$as_me:11343: result: $with_widec" >&5
11344 echo "${ECHO_T}$with_widec" >&6
11345
11346 NCURSES_WCWIDTH_GRAPHICS=1
11347
11348 if test "x$with_widec" = xyes ; then
11349         if test "x$disable_lib_suffixes" = xno ; then
11350                 LIB_SUFFIX="w${LIB_SUFFIX}"
11351         fi
11352
11353 cat >>confdefs.h <<\EOF
11354 #define USE_WIDEC_SUPPORT 1
11355 EOF
11356
11357 cat >>confdefs.h <<\EOF
11358 #define NCURSES_WIDECHAR 1
11359 EOF
11360
11361 for ac_header in \
11362 wchar.h \
11363 wctype.h \
11364
11365 do
11366 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11367 echo "$as_me:11367: checking for $ac_header" >&5
11368 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11369 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11370   echo $ECHO_N "(cached) $ECHO_C" >&6
11371 else
11372   cat >conftest.$ac_ext <<_ACEOF
11373 #line 11373 "configure"
11374 #include "confdefs.h"
11375 #include <$ac_header>
11376 _ACEOF
11377 if { (eval echo "$as_me:11377: \"$ac_cpp conftest.$ac_ext\"") >&5
11378   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11379   ac_status=$?
11380   egrep -v '^ *\+' conftest.er1 >conftest.err
11381   rm -f conftest.er1
11382   cat conftest.err >&5
11383   echo "$as_me:11383: \$? = $ac_status" >&5
11384   (exit $ac_status); } >/dev/null; then
11385   if test -s conftest.err; then
11386     ac_cpp_err=$ac_c_preproc_warn_flag
11387   else
11388     ac_cpp_err=
11389   fi
11390 else
11391   ac_cpp_err=yes
11392 fi
11393 if test -z "$ac_cpp_err"; then
11394   eval "$as_ac_Header=yes"
11395 else
11396   echo "$as_me: failed program was:" >&5
11397   cat conftest.$ac_ext >&5
11398   eval "$as_ac_Header=no"
11399 fi
11400 rm -f conftest.err conftest.$ac_ext
11401 fi
11402 echo "$as_me:11402: result: `eval echo '${'$as_ac_Header'}'`" >&5
11403 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11404 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11405   cat >>confdefs.h <<EOF
11406 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11407 EOF
11408
11409 fi
11410 done
11411
11412 echo "$as_me:11412: checking if wchar.h can be used as is" >&5
11413 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11414 if test "${cf_cv_wchar_h_okay+set}" = set; then
11415   echo $ECHO_N "(cached) $ECHO_C" >&6
11416 else
11417
11418 cat >conftest.$ac_ext <<_ACEOF
11419 #line 11419 "configure"
11420 #include "confdefs.h"
11421
11422 #include <stdlib.h>
11423 #ifdef HAVE_WCHAR_H
11424 #include <wchar.h>
11425 #endif
11426 #ifdef HAVE_WCTYPE_H
11427 #include <wctype.h>
11428 #endif
11429
11430 int
11431 main (void)
11432 {
11433
11434         wint_t foo = 0;
11435         int bar = iswpunct(foo)
11436   ;
11437   return 0;
11438 }
11439 _ACEOF
11440 rm -f conftest.$ac_objext
11441 if { (eval echo "$as_me:11441: \"$ac_compile\"") >&5
11442   (eval $ac_compile) 2>&5
11443   ac_status=$?
11444   echo "$as_me:11444: \$? = $ac_status" >&5
11445   (exit $ac_status); } &&
11446          { ac_try='test -s conftest.$ac_objext'
11447   { (eval echo "$as_me:11447: \"$ac_try\"") >&5
11448   (eval $ac_try) 2>&5
11449   ac_status=$?
11450   echo "$as_me:11450: \$? = $ac_status" >&5
11451   (exit $ac_status); }; }; then
11452   cf_cv_wchar_h_okay=yes
11453 else
11454   echo "$as_me: failed program was:" >&5
11455 cat conftest.$ac_ext >&5
11456 cf_cv_wchar_h_okay=no
11457 fi
11458 rm -f conftest.$ac_objext conftest.$ac_ext
11459 fi
11460 echo "$as_me:11460: result: $cf_cv_wchar_h_okay" >&5
11461 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11462
11463 if test $cf_cv_wchar_h_okay = no
11464 then
11465
11466 echo "$as_me:11466: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11467 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11468 cat >conftest.$ac_ext <<_ACEOF
11469 #line 11469 "configure"
11470 #include "confdefs.h"
11471 #include <sys/types.h>
11472
11473 int
11474 main (void)
11475 {
11476
11477 #ifndef _XOPEN_SOURCE_EXTENDED
11478 make an error
11479 #endif
11480   ;
11481   return 0;
11482 }
11483 _ACEOF
11484 rm -f conftest.$ac_objext
11485 if { (eval echo "$as_me:11485: \"$ac_compile\"") >&5
11486   (eval $ac_compile) 2>&5
11487   ac_status=$?
11488   echo "$as_me:11488: \$? = $ac_status" >&5
11489   (exit $ac_status); } &&
11490          { ac_try='test -s conftest.$ac_objext'
11491   { (eval echo "$as_me:11491: \"$ac_try\"") >&5
11492   (eval $ac_try) 2>&5
11493   ac_status=$?
11494   echo "$as_me:11494: \$? = $ac_status" >&5
11495   (exit $ac_status); }; }; then
11496   cf_result=no
11497 else
11498   echo "$as_me: failed program was:" >&5
11499 cat conftest.$ac_ext >&5
11500 cf_result=yes
11501 fi
11502 rm -f conftest.$ac_objext conftest.$ac_ext
11503 echo "$as_me:11503: result: $cf_result" >&5
11504 echo "${ECHO_T}$cf_result" >&6
11505
11506 if test "$cf_result" = yes ; then
11507         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11508 elif test "x" != "x" ; then
11509         echo "$as_me:11509: checking checking for compatible value versus " >&5
11510 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11511         cat >conftest.$ac_ext <<_ACEOF
11512 #line 11512 "configure"
11513 #include "confdefs.h"
11514 #include <sys/types.h>
11515
11516 int
11517 main (void)
11518 {
11519
11520 #if _XOPEN_SOURCE_EXTENDED- < 0
11521 make an error
11522 #endif
11523   ;
11524   return 0;
11525 }
11526 _ACEOF
11527 rm -f conftest.$ac_objext
11528 if { (eval echo "$as_me:11528: \"$ac_compile\"") >&5
11529   (eval $ac_compile) 2>&5
11530   ac_status=$?
11531   echo "$as_me:11531: \$? = $ac_status" >&5
11532   (exit $ac_status); } &&
11533          { ac_try='test -s conftest.$ac_objext'
11534   { (eval echo "$as_me:11534: \"$ac_try\"") >&5
11535   (eval $ac_try) 2>&5
11536   ac_status=$?
11537   echo "$as_me:11537: \$? = $ac_status" >&5
11538   (exit $ac_status); }; }; then
11539   cf_result=yes
11540 else
11541   echo "$as_me: failed program was:" >&5
11542 cat conftest.$ac_ext >&5
11543 cf_result=no
11544 fi
11545 rm -f conftest.$ac_objext conftest.$ac_ext
11546         echo "$as_me:11546: result: $cf_result" >&5
11547 echo "${ECHO_T}$cf_result" >&6
11548         if test "$cf_result" = no ; then
11549                 # perhaps we can override it - try...
11550                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11551         fi
11552 fi
11553
11554 fi
11555
11556 echo "$as_me:11556: checking if wcwidth agrees graphics are single-width" >&5
11557 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11558 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11559   echo $ECHO_N "(cached) $ECHO_C" >&6
11560 else
11561
11562 cat >conftest.in <<CF_EOF
11563 -       VT100 symbols
11564 0x250c  upper left corner
11565 0x2514  lower left corner
11566 0x2510  upper right corner
11567 0x2518  lower right corner
11568 0x251c  tee pointing left
11569 0x2524  tee pointing right
11570 0x2534  tee pointing up
11571 0x252c  tee pointing down
11572 0x2500  horizontal line
11573 0x2502  vertical line
11574 0x253c  large plus or crossover
11575 0x23ba  scan line 1
11576 0x23bd  scan line 9
11577 0x25c6  diamond
11578 0x2592  checker board (stipple)
11579 0x00b0  degree symbol
11580 0x00b1  plus/minus
11581 0x00b7  bullet
11582 -       Teletype 5410v1 symbols
11583 0x2190  arrow pointing left
11584 0x2192  arrow pointing right
11585 0x2193  arrow pointing down
11586 0x2191  arrow pointing up
11587 0x2592  board of squares
11588 0x2603  lantern symbol
11589 0x25ae  solid square block
11590 -       these defaults were invented for ncurses
11591 0x23bb  scan line 3
11592 0x23bc  scan line 7
11593 0x2264  less-than-or-equal-to
11594 0x2265  greater-than-or-equal-to
11595 0x03c0  greek pi
11596 0x2260  not-equal
11597 0x00a3  pound-sterling symbol
11598 -       thick-line-drawing
11599 0x250f  upper left corner
11600 0x2517  lower left corner
11601 0x2513  upper right corner
11602 0x251b  lower right corner
11603 0x2523  tee pointing left
11604 0x252b  tee pointing right
11605 0x253b  tee pointing up
11606 0x2533  tee pointing down
11607 0x2501  horizontal line
11608 0x2503  vertical line
11609 0x254b  large plus or crossover
11610 -       double-line-drawing
11611 0x2554  upper left corner
11612 0x255a  lower left corner
11613 0x2557  upper right corner
11614 0x255d  lower right corner
11615 0x2563  tee pointing left
11616 0x2560  tee pointing right
11617 0x2569  tee pointing up
11618 0x2566  tee pointing down
11619 0x2550  horizontal line
11620 0x2551  vertical line
11621 0x256c  large plus or crossover
11622 CF_EOF
11623 if test "$cross_compiling" = yes; then
11624   cf_cv_wcwidth_graphics=unknown
11625 else
11626   cat >conftest.$ac_ext <<_ACEOF
11627 #line 11627 "configure"
11628 #include "confdefs.h"
11629
11630 #include <locale.h>
11631 #include <stdio.h>
11632 #include <wchar.h>
11633
11634 #define MY_LEN 80
11635
11636 int
11637 main(void)
11638 {
11639         FILE *fp;
11640         int value;
11641         char buffer[MY_LEN + 1];
11642         char notes[MY_LEN + 1];
11643         int totals = 0;
11644         int passed = 0;
11645
11646         if (setlocale(LC_ALL, "en_US.UTF8") ||
11647                 setlocale(LC_ALL, "en_US.UTF-8") ||
11648                 setlocale(LC_ALL, "en_US.utf8") ||
11649                 setlocale(LC_ALL, "en_US.utf-8")) {
11650                 if ((fp = fopen("conftest.in", "r")) != 0) {
11651                         while (fgets(buffer, MY_LEN, fp) != 0) {
11652                                 if (*buffer == '-') {
11653                                         fprintf(stderr, "\t%s", buffer);
11654                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11655                                         ++totals;
11656                                         if (wcwidth(value) == 1)
11657                                                 ++passed;
11658                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11659                                 } else {
11660                                         fprintf(stderr, "?\t%s", buffer);
11661                                 }
11662                         }
11663                 }
11664         }
11665         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11666         return (totals == passed) ? 0 : 1;
11667 }
11668
11669 _ACEOF
11670 rm -f conftest$ac_exeext
11671 if { (eval echo "$as_me:11671: \"$ac_link\"") >&5
11672   (eval $ac_link) 2>&5
11673   ac_status=$?
11674   echo "$as_me:11674: \$? = $ac_status" >&5
11675   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11676   { (eval echo "$as_me:11676: \"$ac_try\"") >&5
11677   (eval $ac_try) 2>&5
11678   ac_status=$?
11679   echo "$as_me:11679: \$? = $ac_status" >&5
11680   (exit $ac_status); }; }; then
11681   cf_cv_wcwidth_graphics=yes
11682 else
11683   echo "$as_me: program exited with status $ac_status" >&5
11684 echo "$as_me: failed program was:" >&5
11685 cat conftest.$ac_ext >&5
11686 cf_cv_wcwidth_graphics=no
11687 fi
11688 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11689 fi
11690
11691 fi
11692 echo "$as_me:11692: result: $cf_cv_wcwidth_graphics" >&5
11693 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11694
11695         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11696
11697         # with_overwrite=no
11698         NCURSES_CH_T=cchar_t
11699
11700 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11701 do
11702 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11703 echo "$as_me:11703: checking for $ac_func" >&5
11704 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11705 if eval "test \"\${$as_ac_var+set}\" = set"; then
11706   echo $ECHO_N "(cached) $ECHO_C" >&6
11707 else
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #define $ac_func autoconf_temporary
11712 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11713 #undef $ac_func
11714
11715 #ifdef __cplusplus
11716 extern "C"
11717 #endif
11718
11719 /* We use char because int might match the return type of a gcc2
11720    builtin and then its argument prototype would still apply.  */
11721 char $ac_func (void);
11722
11723 int
11724 main (void)
11725 {
11726
11727 /* The GNU C library defines stubs for functions which it implements
11728     to always fail with ENOSYS.  Some functions are actually named
11729     something starting with __ and the normal name is an alias.  */
11730 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11731 #error found stub for $ac_func
11732 #endif
11733
11734         return $ac_func ();
11735   ;
11736   return 0;
11737 }
11738 _ACEOF
11739 rm -f conftest.$ac_objext conftest$ac_exeext
11740 if { (eval echo "$as_me:11740: \"$ac_link\"") >&5
11741   (eval $ac_link) 2>&5
11742   ac_status=$?
11743   echo "$as_me:11743: \$? = $ac_status" >&5
11744   (exit $ac_status); } &&
11745          { ac_try='test -s conftest$ac_exeext'
11746   { (eval echo "$as_me:11746: \"$ac_try\"") >&5
11747   (eval $ac_try) 2>&5
11748   ac_status=$?
11749   echo "$as_me:11749: \$? = $ac_status" >&5
11750   (exit $ac_status); }; }; then
11751   eval "$as_ac_var=yes"
11752 else
11753   echo "$as_me: failed program was:" >&5
11754 cat conftest.$ac_ext >&5
11755 eval "$as_ac_var=no"
11756 fi
11757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11758 fi
11759 echo "$as_me:11759: result: `eval echo '${'$as_ac_var'}'`" >&5
11760 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11761 if test `eval echo '${'$as_ac_var'}'` = yes; then
11762   cat >>confdefs.h <<EOF
11763 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11764 EOF
11765
11766 fi
11767 done
11768
11769         if test "x$ac_cv_func_putwc" != xyes ; then
11770
11771 echo "$as_me:11771: checking for multibyte character support" >&5
11772 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11773 if test "${cf_cv_utf8_lib+set}" = set; then
11774   echo $ECHO_N "(cached) $ECHO_C" >&6
11775 else
11776
11777         cf_save_LIBS="$LIBS"
11778         cat >conftest.$ac_ext <<_ACEOF
11779 #line 11779 "configure"
11780 #include "confdefs.h"
11781
11782 #include <stdlib.h>
11783 int
11784 main (void)
11785 {
11786 putwc(0,0);
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 rm -f conftest.$ac_objext conftest$ac_exeext
11792 if { (eval echo "$as_me:11792: \"$ac_link\"") >&5
11793   (eval $ac_link) 2>&5
11794   ac_status=$?
11795   echo "$as_me:11795: \$? = $ac_status" >&5
11796   (exit $ac_status); } &&
11797          { ac_try='test -s conftest$ac_exeext'
11798   { (eval echo "$as_me:11798: \"$ac_try\"") >&5
11799   (eval $ac_try) 2>&5
11800   ac_status=$?
11801   echo "$as_me:11801: \$? = $ac_status" >&5
11802   (exit $ac_status); }; }; then
11803   cf_cv_utf8_lib=yes
11804 else
11805   echo "$as_me: failed program was:" >&5
11806 cat conftest.$ac_ext >&5
11807
11808 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11809 # will be set on completion of the AC_TRY_LINK below.
11810 cf_cv_header_path_utf8=
11811 cf_cv_library_path_utf8=
11812
11813 echo "${as_me:-configure}:11813: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11814
11815 cf_save_LIBS="$LIBS"
11816
11817 cat >conftest.$ac_ext <<_ACEOF
11818 #line 11818 "configure"
11819 #include "confdefs.h"
11820
11821 #include <libutf8.h>
11822 int
11823 main (void)
11824 {
11825 putwc(0,0);
11826   ;
11827   return 0;
11828 }
11829 _ACEOF
11830 rm -f conftest.$ac_objext conftest$ac_exeext
11831 if { (eval echo "$as_me:11831: \"$ac_link\"") >&5
11832   (eval $ac_link) 2>&5
11833   ac_status=$?
11834   echo "$as_me:11834: \$? = $ac_status" >&5
11835   (exit $ac_status); } &&
11836          { ac_try='test -s conftest$ac_exeext'
11837   { (eval echo "$as_me:11837: \"$ac_try\"") >&5
11838   (eval $ac_try) 2>&5
11839   ac_status=$?
11840   echo "$as_me:11840: \$? = $ac_status" >&5
11841   (exit $ac_status); }; }; then
11842
11843         cf_cv_find_linkage_utf8=yes
11844         cf_cv_header_path_utf8=/usr/include
11845         cf_cv_library_path_utf8=/usr/lib
11846
11847 else
11848   echo "$as_me: failed program was:" >&5
11849 cat conftest.$ac_ext >&5
11850
11851 LIBS="-lutf8  $cf_save_LIBS"
11852
11853 cat >conftest.$ac_ext <<_ACEOF
11854 #line 11854 "configure"
11855 #include "confdefs.h"
11856
11857 #include <libutf8.h>
11858 int
11859 main (void)
11860 {
11861 putwc(0,0);
11862   ;
11863   return 0;
11864 }
11865 _ACEOF
11866 rm -f conftest.$ac_objext conftest$ac_exeext
11867 if { (eval echo "$as_me:11867: \"$ac_link\"") >&5
11868   (eval $ac_link) 2>&5
11869   ac_status=$?
11870   echo "$as_me:11870: \$? = $ac_status" >&5
11871   (exit $ac_status); } &&
11872          { ac_try='test -s conftest$ac_exeext'
11873   { (eval echo "$as_me:11873: \"$ac_try\"") >&5
11874   (eval $ac_try) 2>&5
11875   ac_status=$?
11876   echo "$as_me:11876: \$? = $ac_status" >&5
11877   (exit $ac_status); }; }; then
11878
11879         cf_cv_find_linkage_utf8=yes
11880         cf_cv_header_path_utf8=/usr/include
11881         cf_cv_library_path_utf8=/usr/lib
11882         cf_cv_library_file_utf8="-lutf8"
11883
11884 else
11885   echo "$as_me: failed program was:" >&5
11886 cat conftest.$ac_ext >&5
11887
11888         cf_cv_find_linkage_utf8=no
11889         LIBS="$cf_save_LIBS"
11890
11891         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11892
11893 echo "${as_me:-configure}:11893: testing find linkage for utf8 library ..." 1>&5
11894
11895 echo "${as_me:-configure}:11895: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11896
11897         cf_save_CPPFLAGS="$CPPFLAGS"
11898         cf_test_CPPFLAGS="$CPPFLAGS"
11899
11900 cf_search=
11901
11902 # collect the current set of include-directories from compiler flags
11903 cf_header_path_list=""
11904 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11905         for cf_header_path in $CPPFLAGS $CFLAGS
11906         do
11907                 case $cf_header_path in
11908                 (-I*)
11909                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11910
11911 test "x$cf_header_path" != "xNONE" && \
11912 test -d "$cf_header_path" && \
11913  {
11914         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11915         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11916         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11917         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11918         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11919         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11920 }
11921
11922                         cf_header_path_list="$cf_header_path_list $cf_search"
11923                         ;;
11924                 esac
11925         done
11926 fi
11927
11928 # add the variations for the package we are looking for
11929
11930 cf_search=
11931
11932 test "x$prefix" != "xNONE" && \
11933 test -d "$prefix" && \
11934  {
11935         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11936         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11937         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11938         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11939         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11940         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11941 }
11942
11943 for cf_subdir_prefix in \
11944         /usr \
11945         /usr/local \
11946         /usr/pkg \
11947         /opt \
11948         /opt/local \
11949         $HOME
11950 do
11951
11952 test "x$cf_subdir_prefix" != "x$prefix" && \
11953 test -d "$cf_subdir_prefix" && \
11954 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11955         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11956         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11957         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11958         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11959         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11960         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11961 }
11962
11963 done
11964
11965 test "$includedir" != NONE && \
11966 test "$includedir" != "/usr/include" && \
11967 test -d "$includedir" && {
11968         test -d $includedir &&    cf_search="$cf_search $includedir"
11969         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11970 }
11971
11972 test "$oldincludedir" != NONE && \
11973 test "$oldincludedir" != "/usr/include" && \
11974 test -d "$oldincludedir" && {
11975         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11976         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11977 }
11978
11979 cf_search="$cf_search $cf_header_path_list"
11980
11981         for cf_cv_header_path_utf8 in $cf_search
11982         do
11983                 if test -d $cf_cv_header_path_utf8 ; then
11984                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11985
11986 echo "${as_me:-configure}:11986: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11987
11988                         CPPFLAGS="$cf_save_CPPFLAGS"
11989
11990         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11991         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11992
11993                         cat >conftest.$ac_ext <<_ACEOF
11994 #line 11994 "configure"
11995 #include "confdefs.h"
11996
11997 #include <libutf8.h>
11998 int
11999 main (void)
12000 {
12001 putwc(0,0);
12002   ;
12003   return 0;
12004 }
12005 _ACEOF
12006 rm -f conftest.$ac_objext
12007 if { (eval echo "$as_me:12007: \"$ac_compile\"") >&5
12008   (eval $ac_compile) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit $ac_status); } &&
12012          { ac_try='test -s conftest.$ac_objext'
12013   { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014   (eval $ac_try) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit $ac_status); }; }; then
12018
12019                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12020
12021 echo "${as_me:-configure}:12021: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12022
12023                                 cf_cv_find_linkage_utf8=maybe
12024                                 cf_test_CPPFLAGS="$CPPFLAGS"
12025                                 break
12026 else
12027   echo "$as_me: failed program was:" >&5
12028 cat conftest.$ac_ext >&5
12029
12030                                 CPPFLAGS="$cf_save_CPPFLAGS"
12031
12032 fi
12033 rm -f conftest.$ac_objext conftest.$ac_ext
12034                 fi
12035         done
12036
12037         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12038
12039 echo "${as_me:-configure}:12039: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12040
12041                 cf_save_LIBS="$LIBS"
12042                 cf_save_LDFLAGS="$LDFLAGS"
12043
12044                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12045
12046 cf_search=
12047 cf_library_path_list=""
12048 if test -n "${LDFLAGS}${LIBS}" ; then
12049         for cf_library_path in $LDFLAGS $LIBS
12050         do
12051                 case $cf_library_path in
12052                 (-L*)
12053                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12054
12055 test "x$cf_library_path" != "xNONE" && \
12056 test -d "$cf_library_path" && \
12057  {
12058         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12059         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12060         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12061         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12062         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12063         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12064 }
12065
12066                         cf_library_path_list="$cf_library_path_list $cf_search"
12067                         ;;
12068                 esac
12069         done
12070 fi
12071
12072 cf_search=
12073
12074 test "x$prefix" != "xNONE" && \
12075 test -d "$prefix" && \
12076  {
12077         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12078         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12079         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12080         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12081         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12082         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12083 }
12084
12085 for cf_subdir_prefix in \
12086         /usr \
12087         /usr/local \
12088         /usr/pkg \
12089         /opt \
12090         /opt/local \
12091         $HOME
12092 do
12093
12094 test "x$cf_subdir_prefix" != "x$prefix" && \
12095 test -d "$cf_subdir_prefix" && \
12096 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12097         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12098         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12099         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12100         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12101         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12102         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12103 }
12104
12105 done
12106
12107 cf_search="$cf_library_path_list $cf_search"
12108
12109                         for cf_cv_library_path_utf8 in $cf_search
12110                         do
12111                                 if test -d $cf_cv_library_path_utf8 ; then
12112                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12113
12114 echo "${as_me:-configure}:12114: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12115
12116                                         CPPFLAGS="$cf_test_CPPFLAGS"
12117                                         LIBS="-lutf8  $cf_save_LIBS"
12118                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12119                                         cat >conftest.$ac_ext <<_ACEOF
12120 #line 12120 "configure"
12121 #include "confdefs.h"
12122
12123 #include <libutf8.h>
12124 int
12125 main (void)
12126 {
12127 putwc(0,0);
12128   ;
12129   return 0;
12130 }
12131 _ACEOF
12132 rm -f conftest.$ac_objext conftest$ac_exeext
12133 if { (eval echo "$as_me:12133: \"$ac_link\"") >&5
12134   (eval $ac_link) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); } &&
12138          { ac_try='test -s conftest$ac_exeext'
12139   { (eval echo "$as_me:12139: \"$ac_try\"") >&5
12140   (eval $ac_try) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); }; }; then
12144
12145                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12146
12147 echo "${as_me:-configure}:12147: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12148
12149                                         cf_cv_find_linkage_utf8=yes
12150                                         cf_cv_library_file_utf8="-lutf8"
12151                                         break
12152 else
12153   echo "$as_me: failed program was:" >&5
12154 cat conftest.$ac_ext >&5
12155
12156                                         CPPFLAGS="$cf_save_CPPFLAGS"
12157                                         LIBS="$cf_save_LIBS"
12158                                         LDFLAGS="$cf_save_LDFLAGS"
12159
12160 fi
12161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12162                                 fi
12163                         done
12164                         CPPFLAGS="$cf_save_CPPFLAGS"
12165                         LDFLAGS="$cf_save_LDFLAGS"
12166                 fi
12167
12168         else
12169                 cf_cv_find_linkage_utf8=no
12170         fi
12171
12172 fi
12173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12174
12175 fi
12176 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12177
12178 LIBS="$cf_save_LIBS"
12179
12180 if test "$cf_cv_find_linkage_utf8" = yes ; then
12181 cf_cv_utf8_lib=add-on
12182 else
12183 cf_cv_utf8_lib=no
12184 fi
12185
12186 fi
12187 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12188 fi
12189 echo "$as_me:12189: result: $cf_cv_utf8_lib" >&5
12190 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12191
12192 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12193 # ncurses/ncursesw:
12194 if test "$cf_cv_utf8_lib" = "add-on" ; then
12195
12196 cat >>confdefs.h <<\EOF
12197 #define HAVE_LIBUTF8_H 1
12198 EOF
12199
12200 if test -n "$cf_cv_header_path_utf8" ; then
12201   for cf_add_incdir in $cf_cv_header_path_utf8
12202   do
12203         while test $cf_add_incdir != /usr/include
12204         do
12205           if test -d $cf_add_incdir
12206           then
12207                 cf_have_incdir=no
12208                 if test -n "$CFLAGS$CPPFLAGS" ; then
12209                   # a loop is needed to ensure we can add subdirs of existing dirs
12210                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12211                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12212                           cf_have_incdir=yes; break
12213                         fi
12214                   done
12215                 fi
12216
12217                 if test "$cf_have_incdir" = no ; then
12218                   if test "$cf_add_incdir" = /usr/local/include ; then
12219                         if test "$GCC" = yes
12220                         then
12221                           cf_save_CPPFLAGS=$CPPFLAGS
12222
12223         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12224         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12225
12226                           cat >conftest.$ac_ext <<_ACEOF
12227 #line 12227 "configure"
12228 #include "confdefs.h"
12229 #include <stdio.h>
12230 int
12231 main (void)
12232 {
12233 printf("Hello")
12234   ;
12235   return 0;
12236 }
12237 _ACEOF
12238 rm -f conftest.$ac_objext
12239 if { (eval echo "$as_me:12239: \"$ac_compile\"") >&5
12240   (eval $ac_compile) 2>&5
12241   ac_status=$?
12242   echo "$as_me:12242: \$? = $ac_status" >&5
12243   (exit $ac_status); } &&
12244          { ac_try='test -s conftest.$ac_objext'
12245   { (eval echo "$as_me:12245: \"$ac_try\"") >&5
12246   (eval $ac_try) 2>&5
12247   ac_status=$?
12248   echo "$as_me:12248: \$? = $ac_status" >&5
12249   (exit $ac_status); }; }; then
12250   :
12251 else
12252   echo "$as_me: failed program was:" >&5
12253 cat conftest.$ac_ext >&5
12254 cf_have_incdir=yes
12255 fi
12256 rm -f conftest.$ac_objext conftest.$ac_ext
12257                           CPPFLAGS=$cf_save_CPPFLAGS
12258                         fi
12259                   fi
12260                 fi
12261
12262                 if test "$cf_have_incdir" = no ; then
12263                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12264
12265 echo "${as_me:-configure}:12265: testing adding $cf_add_incdir to include-path ..." 1>&5
12266
12267                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12268
12269                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12270                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12271                   cf_add_incdir="$cf_top_incdir"
12272                 else
12273                   break
12274                 fi
12275           else
12276                 break
12277           fi
12278         done
12279   done
12280 fi
12281
12282 if test -n "$cf_cv_library_path_utf8" ; then
12283         for cf_add_libdir in $cf_cv_library_path_utf8
12284         do
12285                 if test $cf_add_libdir = /usr/lib ; then
12286                         :
12287                 elif test -d $cf_add_libdir
12288                 then
12289                         cf_have_libdir=no
12290                         if test -n "$LDFLAGS$LIBS" ; then
12291                                 # a loop is needed to ensure we can add subdirs of existing dirs
12292                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12293                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12294                                                 cf_have_libdir=yes; break
12295                                         fi
12296                                 done
12297                         fi
12298                         if test "$cf_have_libdir" = no ; then
12299                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12300
12301 echo "${as_me:-configure}:12301: testing adding $cf_add_libdir to library-path ..." 1>&5
12302
12303                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12304                         fi
12305                 fi
12306         done
12307 fi
12308
12309 cf_add_libs="$LIBS"
12310 # reverse order
12311 cf_add_0lib=
12312 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12313 # filter duplicates
12314 for cf_add_1lib in $cf_add_0lib; do
12315         for cf_add_2lib in $cf_add_libs; do
12316                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12317                         cf_add_1lib=
12318                         break
12319                 fi
12320         done
12321         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12322 done
12323 LIBS="$cf_add_libs"
12324
12325 fi
12326
12327                 if test "$cf_cv_utf8_lib" != no ; then
12328                         NCURSES_LIBUTF8=1
12329                 fi
12330         fi
12331
12332 # This is needed on Tru64 5.0 to declare mbstate_t
12333 echo "$as_me:12333: checking if we must include wchar.h to declare mbstate_t" >&5
12334 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12335 if test "${cf_cv_mbstate_t+set}" = set; then
12336   echo $ECHO_N "(cached) $ECHO_C" >&6
12337 else
12338
12339 cat >conftest.$ac_ext <<_ACEOF
12340 #line 12340 "configure"
12341 #include "confdefs.h"
12342
12343 #include <stdlib.h>
12344 #include <stdarg.h>
12345 #include <stdio.h>
12346 #ifdef HAVE_LIBUTF8_H
12347 #include <libutf8.h>
12348 #endif
12349 int
12350 main (void)
12351 {
12352 mbstate_t state
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 rm -f conftest.$ac_objext
12358 if { (eval echo "$as_me:12358: \"$ac_compile\"") >&5
12359   (eval $ac_compile) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); } &&
12363          { ac_try='test -s conftest.$ac_objext'
12364   { (eval echo "$as_me:12364: \"$ac_try\"") >&5
12365   (eval $ac_try) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); }; }; then
12369   cf_cv_mbstate_t=no
12370 else
12371   echo "$as_me: failed program was:" >&5
12372 cat conftest.$ac_ext >&5
12373 cat >conftest.$ac_ext <<_ACEOF
12374 #line 12374 "configure"
12375 #include "confdefs.h"
12376
12377 #include <stdlib.h>
12378 #include <stdarg.h>
12379 #include <stdio.h>
12380 #include <wchar.h>
12381 #ifdef HAVE_LIBUTF8_H
12382 #include <libutf8.h>
12383 #endif
12384 int
12385 main (void)
12386 {
12387 mbstate_t value
12388   ;
12389   return 0;
12390 }
12391 _ACEOF
12392 rm -f conftest.$ac_objext
12393 if { (eval echo "$as_me:12393: \"$ac_compile\"") >&5
12394   (eval $ac_compile) 2>&5
12395   ac_status=$?
12396   echo "$as_me:12396: \$? = $ac_status" >&5
12397   (exit $ac_status); } &&
12398          { ac_try='test -s conftest.$ac_objext'
12399   { (eval echo "$as_me:12399: \"$ac_try\"") >&5
12400   (eval $ac_try) 2>&5
12401   ac_status=$?
12402   echo "$as_me:12402: \$? = $ac_status" >&5
12403   (exit $ac_status); }; }; then
12404   cf_cv_mbstate_t=yes
12405 else
12406   echo "$as_me: failed program was:" >&5
12407 cat conftest.$ac_ext >&5
12408 cf_cv_mbstate_t=unknown
12409 fi
12410 rm -f conftest.$ac_objext conftest.$ac_ext
12411 fi
12412 rm -f conftest.$ac_objext conftest.$ac_ext
12413 fi
12414 echo "$as_me:12414: result: $cf_cv_mbstate_t" >&5
12415 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12416
12417 if test "$cf_cv_mbstate_t" = yes ; then
12418
12419 cat >>confdefs.h <<\EOF
12420 #define NEED_WCHAR_H 1
12421 EOF
12422
12423         NEED_WCHAR_H=1
12424 fi
12425
12426 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12427 if test "$cf_cv_mbstate_t" = unknown ; then
12428         NCURSES_MBSTATE_T=1
12429 fi
12430
12431 # This is needed on Tru64 5.0 to declare wchar_t
12432 echo "$as_me:12432: checking if we must include wchar.h to declare wchar_t" >&5
12433 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12434 if test "${cf_cv_wchar_t+set}" = set; then
12435   echo $ECHO_N "(cached) $ECHO_C" >&6
12436 else
12437
12438 cat >conftest.$ac_ext <<_ACEOF
12439 #line 12439 "configure"
12440 #include "confdefs.h"
12441
12442 #include <stdlib.h>
12443 #include <stdarg.h>
12444 #include <stdio.h>
12445 #ifdef HAVE_LIBUTF8_H
12446 #include <libutf8.h>
12447 #endif
12448 int
12449 main (void)
12450 {
12451 wchar_t state
12452   ;
12453   return 0;
12454 }
12455 _ACEOF
12456 rm -f conftest.$ac_objext
12457 if { (eval echo "$as_me:12457: \"$ac_compile\"") >&5
12458   (eval $ac_compile) 2>&5
12459   ac_status=$?
12460   echo "$as_me:12460: \$? = $ac_status" >&5
12461   (exit $ac_status); } &&
12462          { ac_try='test -s conftest.$ac_objext'
12463   { (eval echo "$as_me:12463: \"$ac_try\"") >&5
12464   (eval $ac_try) 2>&5
12465   ac_status=$?
12466   echo "$as_me:12466: \$? = $ac_status" >&5
12467   (exit $ac_status); }; }; then
12468   cf_cv_wchar_t=no
12469 else
12470   echo "$as_me: failed program was:" >&5
12471 cat conftest.$ac_ext >&5
12472 cat >conftest.$ac_ext <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <stdlib.h>
12477 #include <stdarg.h>
12478 #include <stdio.h>
12479 #include <wchar.h>
12480 #ifdef HAVE_LIBUTF8_H
12481 #include <libutf8.h>
12482 #endif
12483 int
12484 main (void)
12485 {
12486 wchar_t value
12487   ;
12488   return 0;
12489 }
12490 _ACEOF
12491 rm -f conftest.$ac_objext
12492 if { (eval echo "$as_me:12492: \"$ac_compile\"") >&5
12493   (eval $ac_compile) 2>&5
12494   ac_status=$?
12495   echo "$as_me:12495: \$? = $ac_status" >&5
12496   (exit $ac_status); } &&
12497          { ac_try='test -s conftest.$ac_objext'
12498   { (eval echo "$as_me:12498: \"$ac_try\"") >&5
12499   (eval $ac_try) 2>&5
12500   ac_status=$?
12501   echo "$as_me:12501: \$? = $ac_status" >&5
12502   (exit $ac_status); }; }; then
12503   cf_cv_wchar_t=yes
12504 else
12505   echo "$as_me: failed program was:" >&5
12506 cat conftest.$ac_ext >&5
12507 cf_cv_wchar_t=unknown
12508 fi
12509 rm -f conftest.$ac_objext conftest.$ac_ext
12510 fi
12511 rm -f conftest.$ac_objext conftest.$ac_ext
12512 fi
12513 echo "$as_me:12513: result: $cf_cv_wchar_t" >&5
12514 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12515
12516 if test "$cf_cv_wchar_t" = yes ; then
12517
12518 cat >>confdefs.h <<\EOF
12519 #define NEED_WCHAR_H 1
12520 EOF
12521
12522         NEED_WCHAR_H=1
12523 fi
12524
12525 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12526 if test "$cf_cv_wchar_t" = unknown ; then
12527         NCURSES_WCHAR_T=1
12528 fi
12529
12530 # if we find wchar_t in either place, use substitution to provide a fallback.
12531 if test "$cf_cv_wchar_t" != unknown ; then
12532         NCURSES_OK_WCHAR_T=1
12533 fi
12534
12535 # This is needed on Tru64 5.0 to declare wint_t
12536 echo "$as_me:12536: checking if we must include wchar.h to declare wint_t" >&5
12537 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12538 if test "${cf_cv_wint_t+set}" = set; then
12539   echo $ECHO_N "(cached) $ECHO_C" >&6
12540 else
12541
12542 cat >conftest.$ac_ext <<_ACEOF
12543 #line 12543 "configure"
12544 #include "confdefs.h"
12545
12546 #include <stdlib.h>
12547 #include <stdarg.h>
12548 #include <stdio.h>
12549 #ifdef HAVE_LIBUTF8_H
12550 #include <libutf8.h>
12551 #endif
12552 int
12553 main (void)
12554 {
12555 wint_t state
12556   ;
12557   return 0;
12558 }
12559 _ACEOF
12560 rm -f conftest.$ac_objext
12561 if { (eval echo "$as_me:12561: \"$ac_compile\"") >&5
12562   (eval $ac_compile) 2>&5
12563   ac_status=$?
12564   echo "$as_me:12564: \$? = $ac_status" >&5
12565   (exit $ac_status); } &&
12566          { ac_try='test -s conftest.$ac_objext'
12567   { (eval echo "$as_me:12567: \"$ac_try\"") >&5
12568   (eval $ac_try) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); }; }; then
12572   cf_cv_wint_t=no
12573 else
12574   echo "$as_me: failed program was:" >&5
12575 cat conftest.$ac_ext >&5
12576 cat >conftest.$ac_ext <<_ACEOF
12577 #line 12577 "configure"
12578 #include "confdefs.h"
12579
12580 #include <stdlib.h>
12581 #include <stdarg.h>
12582 #include <stdio.h>
12583 #include <wchar.h>
12584 #ifdef HAVE_LIBUTF8_H
12585 #include <libutf8.h>
12586 #endif
12587 int
12588 main (void)
12589 {
12590 wint_t value
12591   ;
12592   return 0;
12593 }
12594 _ACEOF
12595 rm -f conftest.$ac_objext
12596 if { (eval echo "$as_me:12596: \"$ac_compile\"") >&5
12597   (eval $ac_compile) 2>&5
12598   ac_status=$?
12599   echo "$as_me:12599: \$? = $ac_status" >&5
12600   (exit $ac_status); } &&
12601          { ac_try='test -s conftest.$ac_objext'
12602   { (eval echo "$as_me:12602: \"$ac_try\"") >&5
12603   (eval $ac_try) 2>&5
12604   ac_status=$?
12605   echo "$as_me:12605: \$? = $ac_status" >&5
12606   (exit $ac_status); }; }; then
12607   cf_cv_wint_t=yes
12608 else
12609   echo "$as_me: failed program was:" >&5
12610 cat conftest.$ac_ext >&5
12611 cf_cv_wint_t=unknown
12612 fi
12613 rm -f conftest.$ac_objext conftest.$ac_ext
12614 fi
12615 rm -f conftest.$ac_objext conftest.$ac_ext
12616 fi
12617 echo "$as_me:12617: result: $cf_cv_wint_t" >&5
12618 echo "${ECHO_T}$cf_cv_wint_t" >&6
12619
12620 if test "$cf_cv_wint_t" = yes ; then
12621
12622 cat >>confdefs.h <<\EOF
12623 #define NEED_WCHAR_H 1
12624 EOF
12625
12626         NEED_WCHAR_H=1
12627 fi
12628
12629 # if we do not find wint_t in either place, use substitution to provide a fallback.
12630 if test "$cf_cv_wint_t" = unknown ; then
12631         NCURSES_WINT_T=1
12632 fi
12633
12634 # if we find wint_t in either place, use substitution to provide a fallback.
12635 if test "$cf_cv_wint_t" != unknown ; then
12636         NCURSES_OK_WINT_T=1
12637 fi
12638
12639         if test "$NCURSES_MBSTATE_T" != 0; then
12640
12641 cat >>confdefs.h <<\EOF
12642 #define NEED_MBSTATE_T_DEF 1
12643 EOF
12644
12645         fi
12646 fi
12647
12648 ###   use option --disable-lp64 to allow long chtype
12649 echo "$as_me:12649: checking whether to enable _LP64 definition in curses.h" >&5
12650 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12651
12652 # Check whether --enable-lp64 or --disable-lp64 was given.
12653 if test "${enable_lp64+set}" = set; then
12654   enableval="$enable_lp64"
12655   with_lp64=$enableval
12656 else
12657   with_lp64=$cf_dft_with_lp64
12658 fi;
12659 echo "$as_me:12659: result: $with_lp64" >&5
12660 echo "${ECHO_T}$with_lp64" >&6
12661
12662 if test "x$with_lp64" = xyes ; then
12663         cf_cv_enable_lp64=1
12664 else
12665         cf_cv_enable_lp64=0
12666 fi
12667
12668 # Check whether --enable-largefile or --disable-largefile was given.
12669 if test "${enable_largefile+set}" = set; then
12670   enableval="$enable_largefile"
12671
12672 fi;
12673 if test "$enable_largefile" != no; then
12674
12675   echo "$as_me:12675: checking for special C compiler options needed for large files" >&5
12676 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12677 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12678   echo $ECHO_N "(cached) $ECHO_C" >&6
12679 else
12680   ac_cv_sys_largefile_CC=no
12681      if test "$GCC" != yes; then
12682        ac_save_CC=$CC
12683        while :; do
12684          # IRIX 6.2 and later do not support large files by default,
12685          # so use the C compiler's -n32 option if that helps.
12686          cat >conftest.$ac_ext <<_ACEOF
12687 #line 12687 "configure"
12688 #include "confdefs.h"
12689 #include <sys/types.h>
12690  /* Check that off_t can represent 2**63 - 1 correctly.
12691     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12692     since some C++ compilers masquerading as C compilers
12693     incorrectly reject 9223372036854775807.  */
12694 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12695   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12696                        && LARGE_OFF_T % 2147483647 == 1)
12697                       ? 1 : -1];
12698 int
12699 main (void)
12700 {
12701
12702   ;
12703   return 0;
12704 }
12705 _ACEOF
12706          rm -f conftest.$ac_objext
12707 if { (eval echo "$as_me:12707: \"$ac_compile\"") >&5
12708   (eval $ac_compile) 2>&5
12709   ac_status=$?
12710   echo "$as_me:12710: \$? = $ac_status" >&5
12711   (exit $ac_status); } &&
12712          { ac_try='test -s conftest.$ac_objext'
12713   { (eval echo "$as_me:12713: \"$ac_try\"") >&5
12714   (eval $ac_try) 2>&5
12715   ac_status=$?
12716   echo "$as_me:12716: \$? = $ac_status" >&5
12717   (exit $ac_status); }; }; then
12718   break
12719 else
12720   echo "$as_me: failed program was:" >&5
12721 cat conftest.$ac_ext >&5
12722 fi
12723 rm -f conftest.$ac_objext
12724          CC="$CC -n32"
12725          rm -f conftest.$ac_objext
12726 if { (eval echo "$as_me:12726: \"$ac_compile\"") >&5
12727   (eval $ac_compile) 2>&5
12728   ac_status=$?
12729   echo "$as_me:12729: \$? = $ac_status" >&5
12730   (exit $ac_status); } &&
12731          { ac_try='test -s conftest.$ac_objext'
12732   { (eval echo "$as_me:12732: \"$ac_try\"") >&5
12733   (eval $ac_try) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit $ac_status); }; }; then
12737   ac_cv_sys_largefile_CC=' -n32'; break
12738 else
12739   echo "$as_me: failed program was:" >&5
12740 cat conftest.$ac_ext >&5
12741 fi
12742 rm -f conftest.$ac_objext
12743          break
12744        done
12745        CC=$ac_save_CC
12746        rm -f conftest.$ac_ext
12747     fi
12748 fi
12749 echo "$as_me:12749: result: $ac_cv_sys_largefile_CC" >&5
12750 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12751   if test "$ac_cv_sys_largefile_CC" != no; then
12752     CC=$CC$ac_cv_sys_largefile_CC
12753   fi
12754
12755   echo "$as_me:12755: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12756 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12757 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12758   echo $ECHO_N "(cached) $ECHO_C" >&6
12759 else
12760   while :; do
12761   ac_cv_sys_file_offset_bits=no
12762   cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765 #include <sys/types.h>
12766  /* Check that off_t can represent 2**63 - 1 correctly.
12767     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12768     since some C++ compilers masquerading as C compilers
12769     incorrectly reject 9223372036854775807.  */
12770 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12771   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12772                        && LARGE_OFF_T % 2147483647 == 1)
12773                       ? 1 : -1];
12774 int
12775 main (void)
12776 {
12777
12778   ;
12779   return 0;
12780 }
12781 _ACEOF
12782 rm -f conftest.$ac_objext
12783 if { (eval echo "$as_me:12783: \"$ac_compile\"") >&5
12784   (eval $ac_compile) 2>&5
12785   ac_status=$?
12786   echo "$as_me:12786: \$? = $ac_status" >&5
12787   (exit $ac_status); } &&
12788          { ac_try='test -s conftest.$ac_objext'
12789   { (eval echo "$as_me:12789: \"$ac_try\"") >&5
12790   (eval $ac_try) 2>&5
12791   ac_status=$?
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); }; }; then
12794   break
12795 else
12796   echo "$as_me: failed program was:" >&5
12797 cat conftest.$ac_ext >&5
12798 fi
12799 rm -f conftest.$ac_objext conftest.$ac_ext
12800   cat >conftest.$ac_ext <<_ACEOF
12801 #line 12801 "configure"
12802 #include "confdefs.h"
12803 #define _FILE_OFFSET_BITS 64
12804 #include <sys/types.h>
12805  /* Check that off_t can represent 2**63 - 1 correctly.
12806     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12807     since some C++ compilers masquerading as C compilers
12808     incorrectly reject 9223372036854775807.  */
12809 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12810   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12811                        && LARGE_OFF_T % 2147483647 == 1)
12812                       ? 1 : -1];
12813 int
12814 main (void)
12815 {
12816
12817   ;
12818   return 0;
12819 }
12820 _ACEOF
12821 rm -f conftest.$ac_objext
12822 if { (eval echo "$as_me:12822: \"$ac_compile\"") >&5
12823   (eval $ac_compile) 2>&5
12824   ac_status=$?
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); } &&
12827          { ac_try='test -s conftest.$ac_objext'
12828   { (eval echo "$as_me:12828: \"$ac_try\"") >&5
12829   (eval $ac_try) 2>&5
12830   ac_status=$?
12831   echo "$as_me:12831: \$? = $ac_status" >&5
12832   (exit $ac_status); }; }; then
12833   ac_cv_sys_file_offset_bits=64; break
12834 else
12835   echo "$as_me: failed program was:" >&5
12836 cat conftest.$ac_ext >&5
12837 fi
12838 rm -f conftest.$ac_objext conftest.$ac_ext
12839   break
12840 done
12841 fi
12842 echo "$as_me:12842: result: $ac_cv_sys_file_offset_bits" >&5
12843 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12844 if test "$ac_cv_sys_file_offset_bits" != no; then
12845
12846 cat >>confdefs.h <<EOF
12847 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12848 EOF
12849
12850 fi
12851 rm -rf conftest*
12852   echo "$as_me:12852: checking for _LARGE_FILES value needed for large files" >&5
12853 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12854 if test "${ac_cv_sys_large_files+set}" = set; then
12855   echo $ECHO_N "(cached) $ECHO_C" >&6
12856 else
12857   while :; do
12858   ac_cv_sys_large_files=no
12859   cat >conftest.$ac_ext <<_ACEOF
12860 #line 12860 "configure"
12861 #include "confdefs.h"
12862 #include <sys/types.h>
12863  /* Check that off_t can represent 2**63 - 1 correctly.
12864     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12865     since some C++ compilers masquerading as C compilers
12866     incorrectly reject 9223372036854775807.  */
12867 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12868   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12869                        && LARGE_OFF_T % 2147483647 == 1)
12870                       ? 1 : -1];
12871 int
12872 main (void)
12873 {
12874
12875   ;
12876   return 0;
12877 }
12878 _ACEOF
12879 rm -f conftest.$ac_objext
12880 if { (eval echo "$as_me:12880: \"$ac_compile\"") >&5
12881   (eval $ac_compile) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit $ac_status); } &&
12885          { ac_try='test -s conftest.$ac_objext'
12886   { (eval echo "$as_me:12886: \"$ac_try\"") >&5
12887   (eval $ac_try) 2>&5
12888   ac_status=$?
12889   echo "$as_me:12889: \$? = $ac_status" >&5
12890   (exit $ac_status); }; }; then
12891   break
12892 else
12893   echo "$as_me: failed program was:" >&5
12894 cat conftest.$ac_ext >&5
12895 fi
12896 rm -f conftest.$ac_objext conftest.$ac_ext
12897   cat >conftest.$ac_ext <<_ACEOF
12898 #line 12898 "configure"
12899 #include "confdefs.h"
12900 #define _LARGE_FILES 1
12901 #include <sys/types.h>
12902  /* Check that off_t can represent 2**63 - 1 correctly.
12903     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12904     since some C++ compilers masquerading as C compilers
12905     incorrectly reject 9223372036854775807.  */
12906 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12907   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12908                        && LARGE_OFF_T % 2147483647 == 1)
12909                       ? 1 : -1];
12910 int
12911 main (void)
12912 {
12913
12914   ;
12915   return 0;
12916 }
12917 _ACEOF
12918 rm -f conftest.$ac_objext
12919 if { (eval echo "$as_me:12919: \"$ac_compile\"") >&5
12920   (eval $ac_compile) 2>&5
12921   ac_status=$?
12922   echo "$as_me:12922: \$? = $ac_status" >&5
12923   (exit $ac_status); } &&
12924          { ac_try='test -s conftest.$ac_objext'
12925   { (eval echo "$as_me:12925: \"$ac_try\"") >&5
12926   (eval $ac_try) 2>&5
12927   ac_status=$?
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit $ac_status); }; }; then
12930   ac_cv_sys_large_files=1; break
12931 else
12932   echo "$as_me: failed program was:" >&5
12933 cat conftest.$ac_ext >&5
12934 fi
12935 rm -f conftest.$ac_objext conftest.$ac_ext
12936   break
12937 done
12938 fi
12939 echo "$as_me:12939: result: $ac_cv_sys_large_files" >&5
12940 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12941 if test "$ac_cv_sys_large_files" != no; then
12942
12943 cat >>confdefs.h <<EOF
12944 #define _LARGE_FILES $ac_cv_sys_large_files
12945 EOF
12946
12947 fi
12948 rm -rf conftest*
12949 fi
12950
12951         if test "$enable_largefile" != no ; then
12952         echo "$as_me:12952: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12953 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12954 if test "${ac_cv_sys_largefile_source+set}" = set; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957   while :; do
12958   ac_cv_sys_largefile_source=no
12959   cat >conftest.$ac_ext <<_ACEOF
12960 #line 12960 "configure"
12961 #include "confdefs.h"
12962 #include <stdio.h>
12963 int
12964 main (void)
12965 {
12966 return !fseeko;
12967   ;
12968   return 0;
12969 }
12970 _ACEOF
12971 rm -f conftest.$ac_objext
12972 if { (eval echo "$as_me:12972: \"$ac_compile\"") >&5
12973   (eval $ac_compile) 2>&5
12974   ac_status=$?
12975   echo "$as_me:12975: \$? = $ac_status" >&5
12976   (exit $ac_status); } &&
12977          { ac_try='test -s conftest.$ac_objext'
12978   { (eval echo "$as_me:12978: \"$ac_try\"") >&5
12979   (eval $ac_try) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); }; }; then
12983   break
12984 else
12985   echo "$as_me: failed program was:" >&5
12986 cat conftest.$ac_ext >&5
12987 fi
12988 rm -f conftest.$ac_objext conftest.$ac_ext
12989   cat >conftest.$ac_ext <<_ACEOF
12990 #line 12990 "configure"
12991 #include "confdefs.h"
12992 #define _LARGEFILE_SOURCE 1
12993 #include <stdio.h>
12994 int
12995 main (void)
12996 {
12997 return !fseeko;
12998   ;
12999   return 0;
13000 }
13001 _ACEOF
13002 rm -f conftest.$ac_objext
13003 if { (eval echo "$as_me:13003: \"$ac_compile\"") >&5
13004   (eval $ac_compile) 2>&5
13005   ac_status=$?
13006   echo "$as_me:13006: \$? = $ac_status" >&5
13007   (exit $ac_status); } &&
13008          { ac_try='test -s conftest.$ac_objext'
13009   { (eval echo "$as_me:13009: \"$ac_try\"") >&5
13010   (eval $ac_try) 2>&5
13011   ac_status=$?
13012   echo "$as_me:13012: \$? = $ac_status" >&5
13013   (exit $ac_status); }; }; then
13014   ac_cv_sys_largefile_source=1; break
13015 else
13016   echo "$as_me: failed program was:" >&5
13017 cat conftest.$ac_ext >&5
13018 fi
13019 rm -f conftest.$ac_objext conftest.$ac_ext
13020   break
13021 done
13022 fi
13023 echo "$as_me:13023: result: $ac_cv_sys_largefile_source" >&5
13024 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13025 if test "$ac_cv_sys_largefile_source" != no; then
13026
13027 cat >>confdefs.h <<EOF
13028 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13029 EOF
13030
13031 fi
13032 rm -rf conftest*
13033
13034 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13035 # in glibc 2.1.3, but that breaks too many other things.
13036 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13037 echo "$as_me:13037: checking for fseeko" >&5
13038 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13039 if test "${ac_cv_func_fseeko+set}" = set; then
13040   echo $ECHO_N "(cached) $ECHO_C" >&6
13041 else
13042   cat >conftest.$ac_ext <<_ACEOF
13043 #line 13043 "configure"
13044 #include "confdefs.h"
13045 #include <stdio.h>
13046 int
13047 main (void)
13048 {
13049 return fseeko && fseeko (stdin, 0, 0);
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f conftest.$ac_objext conftest$ac_exeext
13055 if { (eval echo "$as_me:13055: \"$ac_link\"") >&5
13056   (eval $ac_link) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); } &&
13060          { ac_try='test -s conftest$ac_exeext'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   ac_cv_func_fseeko=yes
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 cat conftest.$ac_ext >&5
13070 ac_cv_func_fseeko=no
13071 fi
13072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13073 fi
13074 echo "$as_me:13074: result: $ac_cv_func_fseeko" >&5
13075 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13076 if test $ac_cv_func_fseeko = yes; then
13077
13078 cat >>confdefs.h <<\EOF
13079 #define HAVE_FSEEKO 1
13080 EOF
13081
13082 fi
13083
13084         # Normally we would collect these definitions in the config.h,
13085         # but (like _XOPEN_SOURCE), some environments rely on having these
13086         # defined before any of the system headers are included.  Another
13087         # case comes up with C++, e.g., on AIX the compiler compiles the
13088         # header files by themselves before looking at the body files it is
13089         # told to compile.  For ncurses, those header files do not include
13090         # the config.h
13091         if test "$ac_cv_sys_large_files" != no
13092         then
13093
13094         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13095         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13096
13097         fi
13098         if test "$ac_cv_sys_largefile_source" != no
13099         then
13100
13101         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13102         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13103
13104         fi
13105         if test "$ac_cv_sys_file_offset_bits" != no
13106         then
13107
13108         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13109         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13110
13111         fi
13112
13113         echo "$as_me:13113: checking whether to use struct dirent64" >&5
13114 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13115 if test "${cf_cv_struct_dirent64+set}" = set; then
13116   echo $ECHO_N "(cached) $ECHO_C" >&6
13117 else
13118
13119                 cat >conftest.$ac_ext <<_ACEOF
13120 #line 13120 "configure"
13121 #include "confdefs.h"
13122
13123 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13124 #include <sys/types.h>
13125 #include <dirent.h>
13126
13127 int
13128 main (void)
13129 {
13130
13131                 /* if transitional largefile support is setup, this is true */
13132                 extern struct dirent64 * readdir(DIR *);
13133                 struct dirent64 *x = readdir((DIR *)0);
13134                 struct dirent *y = readdir((DIR *)0);
13135                 int z = x - y;
13136                 (void)z;
13137
13138   ;
13139   return 0;
13140 }
13141 _ACEOF
13142 rm -f conftest.$ac_objext
13143 if { (eval echo "$as_me:13143: \"$ac_compile\"") >&5
13144   (eval $ac_compile) 2>&5
13145   ac_status=$?
13146   echo "$as_me:13146: \$? = $ac_status" >&5
13147   (exit $ac_status); } &&
13148          { ac_try='test -s conftest.$ac_objext'
13149   { (eval echo "$as_me:13149: \"$ac_try\"") >&5
13150   (eval $ac_try) 2>&5
13151   ac_status=$?
13152   echo "$as_me:13152: \$? = $ac_status" >&5
13153   (exit $ac_status); }; }; then
13154   cf_cv_struct_dirent64=yes
13155 else
13156   echo "$as_me: failed program was:" >&5
13157 cat conftest.$ac_ext >&5
13158 cf_cv_struct_dirent64=no
13159 fi
13160 rm -f conftest.$ac_objext conftest.$ac_ext
13161
13162 fi
13163 echo "$as_me:13163: result: $cf_cv_struct_dirent64" >&5
13164 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13165         test "$cf_cv_struct_dirent64" = yes &&
13166 cat >>confdefs.h <<\EOF
13167 #define HAVE_STRUCT_DIRENT64 1
13168 EOF
13169
13170         fi
13171
13172 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13173 echo "$as_me:13173: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13174 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13175
13176 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13177 if test "${enable_tparm_varargs+set}" = set; then
13178   enableval="$enable_tparm_varargs"
13179   with_tparm_varargs=$enableval
13180 else
13181   with_tparm_varargs=yes
13182 fi;
13183 echo "$as_me:13183: result: $with_tparm_varargs" >&5
13184 echo "${ECHO_T}$with_tparm_varargs" >&6
13185 NCURSES_TPARM_VARARGS=0
13186 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13187
13188 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13189 if test "$with_ticlib" != no ; then
13190 echo "$as_me:13190: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13191 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13192
13193 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13194 if test "${enable_tic_depends+set}" = set; then
13195   enableval="$enable_tic_depends"
13196   with_tic_depends=$enableval
13197 else
13198   with_tic_depends=yes
13199 fi;
13200 echo "$as_me:13200: result: $with_tic_depends" >&5
13201 echo "${ECHO_T}$with_tic_depends" >&6
13202 else
13203         with_tic_depends=no
13204 fi
13205
13206 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13207 echo "$as_me:13207: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13208 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13209
13210 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13211 if test "${enable_wattr_macros+set}" = set; then
13212   enableval="$enable_wattr_macros"
13213   with_wattr_macros=$enableval
13214 else
13215   with_wattr_macros=yes
13216 fi;
13217 if [ "x$with_wattr_macros" != xyes ]; then
13218         NCURSES_WATTR_MACROS=0
13219         echo "$as_me:13219: result: yes" >&5
13220 echo "${ECHO_T}yes" >&6
13221 else
13222         NCURSES_WATTR_MACROS=1
13223         echo "$as_me:13223: result: no" >&5
13224 echo "${ECHO_T}no" >&6
13225 fi
13226
13227 echo "$as_me:13227: checking for X11 rgb file" >&5
13228 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13229
13230 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13231 if test "${with_x11_rgb+set}" = set; then
13232   withval="$with_x11_rgb"
13233   RGB_PATH=$withval
13234 else
13235   RGB_PATH=auto
13236 fi;
13237
13238 if test "x$RGB_PATH" = xauto
13239 then
13240         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13241         for cf_path in \
13242                 /opt/local/share/X11/rgb.txt \
13243                 /opt/X11/share/X11/rgb.txt \
13244                 /usr/share/X11/rgb.txt \
13245                 /usr/X11/share/X11/rgb.txt \
13246                 /usr/X11/lib/X11/rgb.txt \
13247                 /usr/lib/X11/rgb.txt \
13248                 /etc/X11/rgb.txt \
13249                 /usr/pkg/lib/X11/rgb.txt \
13250                 /usr/X11R7/lib/X11/rgb.txt \
13251                 /usr/X11R6/lib/X11/rgb.txt \
13252                 /usr/X11R5/lib/X11/rgb.txt \
13253                 /usr/X11R4/lib/X11/rgb.txt \
13254                 /usr/local/lib/X11/rgb.txt \
13255                 /usr/local/share/X11/rgb.txt \
13256                 /usr/lib64/X11/rgb.txt
13257         do
13258                 if test -f "$cf_path" ; then
13259                         RGB_PATH="$cf_path"
13260                         break
13261                 fi
13262         done
13263 else
13264         cf_path=$RGB_PATH
13265
13266 if test "x$prefix" != xNONE; then
13267         cf_path_syntax="$prefix"
13268 else
13269         cf_path_syntax="$ac_default_prefix"
13270 fi
13271
13272 case ".$cf_path" in
13273 (.\$\(*\)*|.\'*\'*)
13274         ;;
13275 (..|./*|.\\*)
13276         ;;
13277 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13278         ;;
13279 (.\${*prefix}*|.\${*dir}*)
13280         eval cf_path="$cf_path"
13281         case ".$cf_path" in
13282         (.NONE/*)
13283                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13284                 ;;
13285         esac
13286         ;;
13287 (.no|.NONE/*)
13288         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13289         ;;
13290 (*)
13291         { { echo "$as_me:13291: error: expected a pathname, not \"$cf_path\"" >&5
13292 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13293    { (exit 1); exit 1; }; }
13294         ;;
13295 esac
13296
13297 fi
13298
13299 echo "$as_me:13299: result: $RGB_PATH" >&5
13300 echo "${ECHO_T}$RGB_PATH" >&6
13301
13302 cat >>confdefs.h <<EOF
13303 #define RGB_PATH "$cf_path"
13304 EOF
13305
13306 no_x11_rgb=
13307 if test "$RGB_PATH" = no
13308 then
13309         no_x11_rgb="#"
13310 fi
13311
13312 ###   use option --with-bool to override bool's type
13313 echo "$as_me:13313: checking for type of bool" >&5
13314 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13315
13316 # Check whether --with-bool or --without-bool was given.
13317 if test "${with_bool+set}" = set; then
13318   withval="$with_bool"
13319   NCURSES_BOOL="$withval"
13320 else
13321   NCURSES_BOOL=auto
13322 fi;
13323 echo "$as_me:13323: result: $NCURSES_BOOL" >&5
13324 echo "${ECHO_T}$NCURSES_BOOL" >&6
13325
13326 echo "$as_me:13326: checking for alternate terminal capabilities file" >&5
13327 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13328
13329 # Check whether --with-caps or --without-caps was given.
13330 if test "${with_caps+set}" = set; then
13331   withval="$with_caps"
13332   TERMINFO_CAPS=Caps.$withval
13333 else
13334   TERMINFO_CAPS=Caps
13335 fi;
13336 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13337 echo "$as_me:13337: result: $TERMINFO_CAPS" >&5
13338 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13339
13340 ###   use option --with-chtype to override chtype's type
13341 echo "$as_me:13341: checking for type of chtype" >&5
13342 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13343
13344 # Check whether --with-chtype or --without-chtype was given.
13345 if test "${with_chtype+set}" = set; then
13346   withval="$with_chtype"
13347   NCURSES_CHTYPE="$withval"
13348 else
13349   NCURSES_CHTYPE=$cf_dft_chtype
13350 fi;
13351 echo "$as_me:13351: result: $NCURSES_CHTYPE" >&5
13352 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13353
13354 ###   use option --with-ospeed to override ospeed's type
13355 echo "$as_me:13355: checking for type of ospeed" >&5
13356 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13357
13358 # Check whether --with-ospeed or --without-ospeed was given.
13359 if test "${with_ospeed+set}" = set; then
13360   withval="$with_ospeed"
13361   NCURSES_OSPEED="$withval"
13362 else
13363   NCURSES_OSPEED=short
13364 fi;
13365 echo "$as_me:13365: result: $NCURSES_OSPEED" >&5
13366 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13367
13368 ###   use option --with-mmask-t to override mmask_t's type
13369 echo "$as_me:13369: checking for type of mmask_t" >&5
13370 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13371
13372 # Check whether --with-mmask-t or --without-mmask-t was given.
13373 if test "${with_mmask_t+set}" = set; then
13374   withval="$with_mmask_t"
13375   NCURSES_MMASK_T="$withval"
13376 else
13377   NCURSES_MMASK_T=$cf_dft_mmask_t
13378 fi;
13379 echo "$as_me:13379: result: $NCURSES_MMASK_T" >&5
13380 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13381
13382 ###   use option --with-ccharw-max to override CCHARW_MAX size
13383 echo "$as_me:13383: checking for size CCHARW_MAX" >&5
13384 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13385
13386 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13387 if test "${with_ccharw_max+set}" = set; then
13388   withval="$with_ccharw_max"
13389   NCURSES_CCHARW_MAX="$withval"
13390 else
13391   NCURSES_CCHARW_MAX=5
13392 fi;
13393 echo "$as_me:13393: result: $NCURSES_CCHARW_MAX" >&5
13394 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13395
13396 echo "$as_me:13396: checking for ANSI C header files" >&5
13397 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13398 if test "${ac_cv_header_stdc+set}" = set; then
13399   echo $ECHO_N "(cached) $ECHO_C" >&6
13400 else
13401   cat >conftest.$ac_ext <<_ACEOF
13402 #line 13402 "configure"
13403 #include "confdefs.h"
13404 #include <stdlib.h>
13405 #include <stdarg.h>
13406 #include <string.h>
13407 #include <float.h>
13408
13409 _ACEOF
13410 if { (eval echo "$as_me:13410: \"$ac_cpp conftest.$ac_ext\"") >&5
13411   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13412   ac_status=$?
13413   egrep -v '^ *\+' conftest.er1 >conftest.err
13414   rm -f conftest.er1
13415   cat conftest.err >&5
13416   echo "$as_me:13416: \$? = $ac_status" >&5
13417   (exit $ac_status); } >/dev/null; then
13418   if test -s conftest.err; then
13419     ac_cpp_err=$ac_c_preproc_warn_flag
13420   else
13421     ac_cpp_err=
13422   fi
13423 else
13424   ac_cpp_err=yes
13425 fi
13426 if test -z "$ac_cpp_err"; then
13427   ac_cv_header_stdc=yes
13428 else
13429   echo "$as_me: failed program was:" >&5
13430   cat conftest.$ac_ext >&5
13431   ac_cv_header_stdc=no
13432 fi
13433 rm -f conftest.err conftest.$ac_ext
13434
13435 if test $ac_cv_header_stdc = yes; then
13436   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13437   cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440 #include <string.h>
13441
13442 _ACEOF
13443 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13444   egrep "memchr" >/dev/null 2>&1; then
13445   :
13446 else
13447   ac_cv_header_stdc=no
13448 fi
13449 rm -rf conftest*
13450
13451 fi
13452
13453 if test $ac_cv_header_stdc = yes; then
13454   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13455   cat >conftest.$ac_ext <<_ACEOF
13456 #line 13456 "configure"
13457 #include "confdefs.h"
13458 #include <stdlib.h>
13459
13460 _ACEOF
13461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13462   egrep "free" >/dev/null 2>&1; then
13463   :
13464 else
13465   ac_cv_header_stdc=no
13466 fi
13467 rm -rf conftest*
13468
13469 fi
13470
13471 if test $ac_cv_header_stdc = yes; then
13472   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13473   if test "$cross_compiling" = yes; then
13474   :
13475 else
13476   cat >conftest.$ac_ext <<_ACEOF
13477 #line 13477 "configure"
13478 #include "confdefs.h"
13479 #include <ctype.h>
13480 #if ((' ' & 0x0FF) == 0x020)
13481 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13482 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13483 #else
13484 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13485                      || ('j' <= (c) && (c) <= 'r') \
13486                      || ('s' <= (c) && (c) <= 'z'))
13487 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13488 #endif
13489
13490 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13491 int
13492 main (void)
13493 {
13494   int i;
13495   for (i = 0; i < 256; i++)
13496     if (XOR (islower (i), ISLOWER (i))
13497         || toupper (i) != TOUPPER (i))
13498       $ac_main_return(2);
13499   $ac_main_return (0);
13500 }
13501 _ACEOF
13502 rm -f conftest$ac_exeext
13503 if { (eval echo "$as_me:13503: \"$ac_link\"") >&5
13504   (eval $ac_link) 2>&5
13505   ac_status=$?
13506   echo "$as_me:13506: \$? = $ac_status" >&5
13507   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13508   { (eval echo "$as_me:13508: \"$ac_try\"") >&5
13509   (eval $ac_try) 2>&5
13510   ac_status=$?
13511   echo "$as_me:13511: \$? = $ac_status" >&5
13512   (exit $ac_status); }; }; then
13513   :
13514 else
13515   echo "$as_me: program exited with status $ac_status" >&5
13516 echo "$as_me: failed program was:" >&5
13517 cat conftest.$ac_ext >&5
13518 ac_cv_header_stdc=no
13519 fi
13520 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13521 fi
13522 fi
13523 fi
13524 echo "$as_me:13524: result: $ac_cv_header_stdc" >&5
13525 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13526 if test $ac_cv_header_stdc = yes; then
13527
13528 cat >>confdefs.h <<\EOF
13529 #define STDC_HEADERS 1
13530 EOF
13531
13532 fi
13533
13534 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13535
13536 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13537                   inttypes.h stdint.h unistd.h
13538 do
13539 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13540 echo "$as_me:13540: checking for $ac_header" >&5
13541 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13542 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545   cat >conftest.$ac_ext <<_ACEOF
13546 #line 13546 "configure"
13547 #include "confdefs.h"
13548 $ac_includes_default
13549 #include <$ac_header>
13550 _ACEOF
13551 rm -f conftest.$ac_objext
13552 if { (eval echo "$as_me:13552: \"$ac_compile\"") >&5
13553   (eval $ac_compile) 2>&5
13554   ac_status=$?
13555   echo "$as_me:13555: \$? = $ac_status" >&5
13556   (exit $ac_status); } &&
13557          { ac_try='test -s conftest.$ac_objext'
13558   { (eval echo "$as_me:13558: \"$ac_try\"") >&5
13559   (eval $ac_try) 2>&5
13560   ac_status=$?
13561   echo "$as_me:13561: \$? = $ac_status" >&5
13562   (exit $ac_status); }; }; then
13563   eval "$as_ac_Header=yes"
13564 else
13565   echo "$as_me: failed program was:" >&5
13566 cat conftest.$ac_ext >&5
13567 eval "$as_ac_Header=no"
13568 fi
13569 rm -f conftest.$ac_objext conftest.$ac_ext
13570 fi
13571 echo "$as_me:13571: result: `eval echo '${'$as_ac_Header'}'`" >&5
13572 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13573 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13574   cat >>confdefs.h <<EOF
13575 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13576 EOF
13577
13578 fi
13579 done
13580
13581 echo "$as_me:13581: checking for signed char" >&5
13582 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13583 if test "${ac_cv_type_signed_char+set}" = set; then
13584   echo $ECHO_N "(cached) $ECHO_C" >&6
13585 else
13586   cat >conftest.$ac_ext <<_ACEOF
13587 #line 13587 "configure"
13588 #include "confdefs.h"
13589 $ac_includes_default
13590 int
13591 main (void)
13592 {
13593 if ((signed char *) 0)
13594   return 0;
13595 if (sizeof (signed char))
13596   return 0;
13597   ;
13598   return 0;
13599 }
13600 _ACEOF
13601 rm -f conftest.$ac_objext
13602 if { (eval echo "$as_me:13602: \"$ac_compile\"") >&5
13603   (eval $ac_compile) 2>&5
13604   ac_status=$?
13605   echo "$as_me:13605: \$? = $ac_status" >&5
13606   (exit $ac_status); } &&
13607          { ac_try='test -s conftest.$ac_objext'
13608   { (eval echo "$as_me:13608: \"$ac_try\"") >&5
13609   (eval $ac_try) 2>&5
13610   ac_status=$?
13611   echo "$as_me:13611: \$? = $ac_status" >&5
13612   (exit $ac_status); }; }; then
13613   ac_cv_type_signed_char=yes
13614 else
13615   echo "$as_me: failed program was:" >&5
13616 cat conftest.$ac_ext >&5
13617 ac_cv_type_signed_char=no
13618 fi
13619 rm -f conftest.$ac_objext conftest.$ac_ext
13620 fi
13621 echo "$as_me:13621: result: $ac_cv_type_signed_char" >&5
13622 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13623
13624 echo "$as_me:13624: checking size of signed char" >&5
13625 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13626 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13627   echo $ECHO_N "(cached) $ECHO_C" >&6
13628 else
13629   if test "$ac_cv_type_signed_char" = yes; then
13630   if test "$cross_compiling" = yes; then
13631   # Depending upon the size, compute the lo and hi bounds.
13632 cat >conftest.$ac_ext <<_ACEOF
13633 #line 13633 "configure"
13634 #include "confdefs.h"
13635 $ac_includes_default
13636 int
13637 main (void)
13638 {
13639 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13640   ;
13641   return 0;
13642 }
13643 _ACEOF
13644 rm -f conftest.$ac_objext
13645 if { (eval echo "$as_me:13645: \"$ac_compile\"") >&5
13646   (eval $ac_compile) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit $ac_status); } &&
13650          { ac_try='test -s conftest.$ac_objext'
13651   { (eval echo "$as_me:13651: \"$ac_try\"") >&5
13652   (eval $ac_try) 2>&5
13653   ac_status=$?
13654   echo "$as_me:13654: \$? = $ac_status" >&5
13655   (exit $ac_status); }; }; then
13656   ac_lo=0 ac_mid=0
13657   while :; do
13658     cat >conftest.$ac_ext <<_ACEOF
13659 #line 13659 "configure"
13660 #include "confdefs.h"
13661 $ac_includes_default
13662 int
13663 main (void)
13664 {
13665 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13666   ;
13667   return 0;
13668 }
13669 _ACEOF
13670 rm -f conftest.$ac_objext
13671 if { (eval echo "$as_me:13671: \"$ac_compile\"") >&5
13672   (eval $ac_compile) 2>&5
13673   ac_status=$?
13674   echo "$as_me:13674: \$? = $ac_status" >&5
13675   (exit $ac_status); } &&
13676          { ac_try='test -s conftest.$ac_objext'
13677   { (eval echo "$as_me:13677: \"$ac_try\"") >&5
13678   (eval $ac_try) 2>&5
13679   ac_status=$?
13680   echo "$as_me:13680: \$? = $ac_status" >&5
13681   (exit $ac_status); }; }; then
13682   ac_hi=$ac_mid; break
13683 else
13684   echo "$as_me: failed program was:" >&5
13685 cat conftest.$ac_ext >&5
13686 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13687 fi
13688 rm -f conftest.$ac_objext conftest.$ac_ext
13689   done
13690 else
13691   echo "$as_me: failed program was:" >&5
13692 cat conftest.$ac_ext >&5
13693 ac_hi=-1 ac_mid=-1
13694   while :; do
13695     cat >conftest.$ac_ext <<_ACEOF
13696 #line 13696 "configure"
13697 #include "confdefs.h"
13698 $ac_includes_default
13699 int
13700 main (void)
13701 {
13702 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13703   ;
13704   return 0;
13705 }
13706 _ACEOF
13707 rm -f conftest.$ac_objext
13708 if { (eval echo "$as_me:13708: \"$ac_compile\"") >&5
13709   (eval $ac_compile) 2>&5
13710   ac_status=$?
13711   echo "$as_me:13711: \$? = $ac_status" >&5
13712   (exit $ac_status); } &&
13713          { ac_try='test -s conftest.$ac_objext'
13714   { (eval echo "$as_me:13714: \"$ac_try\"") >&5
13715   (eval $ac_try) 2>&5
13716   ac_status=$?
13717   echo "$as_me:13717: \$? = $ac_status" >&5
13718   (exit $ac_status); }; }; then
13719   ac_lo=$ac_mid; break
13720 else
13721   echo "$as_me: failed program was:" >&5
13722 cat conftest.$ac_ext >&5
13723 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13724 fi
13725 rm -f conftest.$ac_objext conftest.$ac_ext
13726   done
13727 fi
13728 rm -f conftest.$ac_objext conftest.$ac_ext
13729 # Binary search between lo and hi bounds.
13730 while test "x$ac_lo" != "x$ac_hi"; do
13731   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13732   cat >conftest.$ac_ext <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735 $ac_includes_default
13736 int
13737 main (void)
13738 {
13739 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13740   ;
13741   return 0;
13742 }
13743 _ACEOF
13744 rm -f conftest.$ac_objext
13745 if { (eval echo "$as_me:13745: \"$ac_compile\"") >&5
13746   (eval $ac_compile) 2>&5
13747   ac_status=$?
13748   echo "$as_me:13748: \$? = $ac_status" >&5
13749   (exit $ac_status); } &&
13750          { ac_try='test -s conftest.$ac_objext'
13751   { (eval echo "$as_me:13751: \"$ac_try\"") >&5
13752   (eval $ac_try) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit $ac_status); }; }; then
13756   ac_hi=$ac_mid
13757 else
13758   echo "$as_me: failed program was:" >&5
13759 cat conftest.$ac_ext >&5
13760 ac_lo=`expr $ac_mid + 1`
13761 fi
13762 rm -f conftest.$ac_objext conftest.$ac_ext
13763 done
13764 ac_cv_sizeof_signed_char=$ac_lo
13765 else
13766   if test "$cross_compiling" = yes; then
13767   { { echo "$as_me:13767: error: cannot run test program while cross compiling" >&5
13768 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13769    { (exit 1); exit 1; }; }
13770 else
13771   cat >conftest.$ac_ext <<_ACEOF
13772 #line 13772 "configure"
13773 #include "confdefs.h"
13774 $ac_includes_default
13775 int
13776 main (void)
13777 {
13778 FILE *f = fopen ("conftest.val", "w");
13779 if (!f)
13780   $ac_main_return (1);
13781 fprintf (f, "%d", (sizeof (signed char)));
13782 fclose (f);
13783   ;
13784   return 0;
13785 }
13786 _ACEOF
13787 rm -f conftest$ac_exeext
13788 if { (eval echo "$as_me:13788: \"$ac_link\"") >&5
13789   (eval $ac_link) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13793   { (eval echo "$as_me:13793: \"$ac_try\"") >&5
13794   (eval $ac_try) 2>&5
13795   ac_status=$?
13796   echo "$as_me:13796: \$? = $ac_status" >&5
13797   (exit $ac_status); }; }; then
13798   ac_cv_sizeof_signed_char=`cat conftest.val`
13799 else
13800   echo "$as_me: program exited with status $ac_status" >&5
13801 echo "$as_me: failed program was:" >&5
13802 cat conftest.$ac_ext >&5
13803 fi
13804 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13805 fi
13806 fi
13807 rm -f conftest.val
13808 else
13809   ac_cv_sizeof_signed_char=0
13810 fi
13811 fi
13812 echo "$as_me:13812: result: $ac_cv_sizeof_signed_char" >&5
13813 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13814 cat >>confdefs.h <<EOF
13815 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13816 EOF
13817
13818 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13819         NCURSES_SBOOL="signed char"
13820 else
13821         NCURSES_SBOOL="char"
13822 fi
13823 echo "$as_me:13823: checking if you want to use signed Boolean array in term.h" >&5
13824 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13825
13826 # Check whether --enable-signed-char or --disable-signed-char was given.
13827 if test "${enable_signed_char+set}" = set; then
13828   enableval="$enable_signed_char"
13829   with_signed_char=$enableval
13830 else
13831   with_signed_char=no
13832 fi;
13833 echo "$as_me:13833: result: $with_signed_char" >&5
13834 echo "${ECHO_T}$with_signed_char" >&6
13835 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13836
13837 ###   use option --with-tparm-arg to override tparm's argument type
13838 echo "$as_me:13838: checking for type of tparm args" >&5
13839 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13840
13841 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13842 if test "${with_tparm_arg+set}" = set; then
13843   withval="$with_tparm_arg"
13844   NCURSES_TPARM_ARG="$withval"
13845 else
13846   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13847 fi;
13848 echo "$as_me:13848: result: $NCURSES_TPARM_ARG" >&5
13849 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13850
13851 ### Enable compiling-in rcs id's
13852 echo "$as_me:13852: checking if RCS identifiers should be compiled-in" >&5
13853 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13854
13855 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13856 if test "${with_rcs_ids+set}" = set; then
13857   withval="$with_rcs_ids"
13858   with_rcs_ids=$withval
13859 else
13860   with_rcs_ids=no
13861 fi;
13862 echo "$as_me:13862: result: $with_rcs_ids" >&5
13863 echo "${ECHO_T}$with_rcs_ids" >&6
13864 test "x$with_rcs_ids" = xyes &&
13865 cat >>confdefs.h <<\EOF
13866 #define USE_RCS_IDS 1
13867 EOF
13868
13869 ###############################################################################
13870
13871 echo "$as_me:13871: checking format of man-pages" >&5
13872 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13873
13874 # Check whether --with-manpage-format or --without-manpage-format was given.
13875 if test "${with_manpage_format+set}" = set; then
13876   withval="$with_manpage_format"
13877   MANPAGE_FORMAT=$withval
13878 else
13879   MANPAGE_FORMAT=unknown
13880 fi;
13881
13882 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13883 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13884
13885 cf_unknown=
13886
13887 case $MANPAGE_FORMAT in
13888 (unknown)
13889         if test -z "$MANPATH" ; then
13890                 MANPATH="/usr/man:/usr/share/man"
13891         fi
13892
13893         # look for the 'date' man-page (it's most likely to be installed!)
13894         MANPAGE_FORMAT=
13895         cf_preform=no
13896         cf_catonly=yes
13897         cf_example=date
13898
13899         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13900         for cf_dir in $MANPATH; do
13901                 test -z "$cf_dir" && cf_dir=/usr/man
13902                 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
13903                 do
13904                         cf_test=`echo $cf_name | sed -e 's/*//'`
13905                         if test "x$cf_test" = "x$cf_name" ; then
13906
13907                                 case "$cf_name" in
13908                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13909                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13910                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13911                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13912                                 esac
13913
13914                                 case "$cf_name" in
13915                                 ($cf_dir/man*)
13916                                         cf_catonly=no
13917                                         ;;
13918                                 ($cf_dir/cat*)
13919                                         cf_preform=yes
13920                                         ;;
13921                                 esac
13922                                 break
13923                         fi
13924
13925                         # if we found a match in either man* or cat*, stop looking
13926                         if test -n "$MANPAGE_FORMAT" ; then
13927                                 cf_found=no
13928                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13929                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13930                                 case "$cf_name" in
13931                                 ($cf_dir/cat*)
13932                                         cf_found=yes
13933                                         ;;
13934                                 esac
13935                                 test $cf_found=yes && break
13936                         fi
13937                 done
13938                 # only check the first directory in $MANPATH where we find manpages
13939                 if test -n "$MANPAGE_FORMAT" ; then
13940                         break
13941                 fi
13942         done
13943         # if we did not find the example, just assume it is normal
13944         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13945         IFS="$ac_save_ifs"
13946         ;;
13947 (*)
13948         for cf_option in $MANPAGE_FORMAT; do
13949         case $cf_option in
13950         (gzip|compress|BSDI|normal|formatted|catonly)
13951                 ;;
13952         (*)
13953                 cf_unknown="$cf_unknown $cf_option"
13954                 ;;
13955         esac
13956         done
13957         ;;
13958 esac
13959
13960 echo "$as_me:13960: result: $MANPAGE_FORMAT" >&5
13961 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13962 if test -n "$cf_unknown" ; then
13963         { echo "$as_me:13963: WARNING: Unexpected manpage-format $cf_unknown" >&5
13964 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13965 fi
13966
13967 echo "$as_me:13967: checking for manpage renaming" >&5
13968 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13969
13970 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13971 if test "${with_manpage_renames+set}" = set; then
13972   withval="$with_manpage_renames"
13973   MANPAGE_RENAMES=$withval
13974 else
13975   MANPAGE_RENAMES=yes
13976 fi;
13977
13978 case ".$MANPAGE_RENAMES" in
13979 (.no)
13980         ;;
13981 (.|.yes)
13982         # Debian 'man' program?
13983         if test -f /etc/debian_version ; then
13984                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13985         else
13986                 MANPAGE_RENAMES=no
13987         fi
13988         ;;
13989 esac
13990
13991 if test "$MANPAGE_RENAMES" != no ; then
13992         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13993                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13994         elif test ! -f $MANPAGE_RENAMES ; then
13995                 { { echo "$as_me:13995: error: not a filename: $MANPAGE_RENAMES" >&5
13996 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13997    { (exit 1); exit 1; }; }
13998         fi
13999
14000         test ! -d man && mkdir man
14001
14002         # Construct a sed-script to perform renaming within man-pages
14003         if test -n "$MANPAGE_RENAMES" ; then
14004                 test ! -d man && mkdir man
14005                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14006         fi
14007 fi
14008
14009 echo "$as_me:14009: result: $MANPAGE_RENAMES" >&5
14010 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14011
14012 echo "$as_me:14012: checking if manpage aliases will be installed" >&5
14013 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14014
14015 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14016 if test "${with_manpage_aliases+set}" = set; then
14017   withval="$with_manpage_aliases"
14018   MANPAGE_ALIASES=$withval
14019 else
14020   MANPAGE_ALIASES=yes
14021 fi;
14022
14023 echo "$as_me:14023: result: $MANPAGE_ALIASES" >&5
14024 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14025
14026 case "x$LN_S" in
14027 (xln*)
14028         cf_use_symlinks=yes
14029         ;;
14030 (*)
14031         cf_use_symlinks=no
14032         ;;
14033 esac
14034
14035 MANPAGE_SYMLINKS=no
14036 if test "$MANPAGE_ALIASES" = yes ; then
14037 echo "$as_me:14037: checking if manpage symlinks should be used" >&5
14038 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14039
14040 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14041 if test "${with_manpage_symlinks+set}" = set; then
14042   withval="$with_manpage_symlinks"
14043   MANPAGE_SYMLINKS=$withval
14044 else
14045   MANPAGE_SYMLINKS=$cf_use_symlinks
14046 fi;
14047
14048 if test "$$cf_use_symlinks" = no; then
14049 if test "$MANPAGE_SYMLINKS" = yes ; then
14050         { echo "$as_me:14050: WARNING: cannot make symlinks" >&5
14051 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14052         MANPAGE_SYMLINKS=no
14053 fi
14054 fi
14055
14056 echo "$as_me:14056: result: $MANPAGE_SYMLINKS" >&5
14057 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14058 fi
14059
14060 echo "$as_me:14060: checking for manpage tbl" >&5
14061 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14062
14063 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14064 if test "${with_manpage_tbl+set}" = set; then
14065   withval="$with_manpage_tbl"
14066   MANPAGE_TBL=$withval
14067 else
14068   MANPAGE_TBL=no
14069 fi;
14070
14071 echo "$as_me:14071: result: $MANPAGE_TBL" >&5
14072 echo "${ECHO_T}$MANPAGE_TBL" >&6
14073
14074 if test "$prefix" = "NONE" ; then
14075         cf_prefix="$ac_default_prefix"
14076 else
14077         cf_prefix="$prefix"
14078 fi
14079
14080 case "$MANPAGE_FORMAT" in
14081 (*catonly*)
14082         cf_format=yes
14083         cf_inboth=no
14084         ;;
14085 (*formatted*)
14086         cf_format=yes
14087         cf_inboth=yes
14088         ;;
14089 (*)
14090         cf_format=no
14091         cf_inboth=no
14092         ;;
14093 esac
14094
14095 test ! -d man && mkdir man
14096
14097 cf_so_strip=
14098 cf_compress=
14099 case "$MANPAGE_FORMAT" in
14100 (*compress*)
14101         cf_so_strip="Z"
14102         cf_compress=compress
14103         ;;
14104 (*gzip*)
14105         cf_so_strip="gz"
14106         cf_compress=gzip
14107         ;;
14108 esac
14109
14110 cf_edit_man=./edit_man.sh
14111 cf_man_alias=`pwd`/man_alias.sed
14112
14113 cat >$cf_edit_man <<CF_EOF
14114 #! $SHELL
14115 # this script is generated by the configure-script CF_MAN_PAGES macro.
14116
14117 prefix="$cf_prefix"
14118 datarootdir="$datarootdir"
14119 datadir="$datadir"
14120
14121 NCURSES_MAJOR="$NCURSES_MAJOR"
14122 NCURSES_MINOR="$NCURSES_MINOR"
14123 NCURSES_PATCH="$NCURSES_PATCH"
14124
14125 NCURSES_OSPEED="$NCURSES_OSPEED"
14126 TERMINFO="$TERMINFO"
14127
14128 INSTALL="$INSTALL"
14129 INSTALL_DATA="$INSTALL_DATA"
14130
14131 transform="$program_transform_name"
14132
14133 TMP=\${TMPDIR:=/tmp}/man\$\$
14134 trap "rm -f \$TMP" 0 1 2 3 15
14135
14136 form=\$1
14137 shift || exit 1
14138
14139 verb=\$1
14140 shift || exit 1
14141
14142 mandir=\$1
14143 shift || exit 1
14144
14145 srcdir=\$1
14146 top_srcdir=\$srcdir/..
14147 shift || exit 1
14148
14149 if test "\$form" = normal ; then
14150         if test "$cf_format" = yes ; then
14151         if test "$cf_inboth" = no ; then
14152                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14153                 exit $?
14154         fi
14155         fi
14156         cf_subdir=\$mandir/man
14157         cf_tables=$MANPAGE_TBL
14158 else
14159         cf_subdir=\$mandir/cat
14160         cf_tables=yes
14161 fi
14162
14163 # process the list of source-files
14164 for i in \$* ; do
14165 case \$i in
14166 (*.orig|*.rej) ;;
14167 (*.[0-9]*)
14168         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14169         if test \$verb = installing ; then
14170         if test ! -d \$cf_subdir\${section} ; then
14171                 mkdir -p \$cf_subdir\$section
14172         fi
14173         fi
14174
14175         # replace variables in man page
14176         if test ! -f $cf_man_alias ; then
14177 cat >>$cf_man_alias <<-CF_EOF2
14178                 s,@DATADIR@,\$datadir,g
14179                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14180                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14181                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14182                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14183                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14184                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14185 CF_EOF
14186
14187         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14188         do
14189                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14190                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14191 cat >>$cf_edit_man <<-CF_EOF
14192                 s,@$cf_NAME@,$cf_name,g
14193 CF_EOF
14194         done
14195
14196 cat >>$cf_edit_man <<CF_EOF
14197 CF_EOF2
14198                 echo "...made $cf_man_alias"
14199         fi
14200
14201         aliases=
14202         cf_source=\`basename \$i\`
14203         inalias=\$cf_source
14204         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14205         if test ! -f \$inalias ; then
14206                 echo .. skipped \$cf_source
14207                 continue
14208         fi
14209 CF_EOF
14210
14211 if test "$MANPAGE_ALIASES" != no ; then
14212 cat >>$cf_edit_man <<CF_EOF
14213         nCurses=ignore.3x
14214         test $with_curses_h = yes && nCurses=ncurses.3x
14215         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14216 CF_EOF
14217 fi
14218
14219 if test "$MANPAGE_RENAMES" = no ; then
14220 cat >>$cf_edit_man <<CF_EOF
14221         # perform program transformations for section 1 man pages
14222         if test \$section = 1 ; then
14223                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14224         else
14225                 cf_target=\$cf_subdir\${section}/\$cf_source
14226         fi
14227 CF_EOF
14228 else
14229 cat >>$cf_edit_man <<CF_EOF
14230         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14231         if test -z "\$cf_target" ; then
14232                 echo '? missing rename for '\$cf_source
14233                 cf_target="\$cf_source"
14234         fi
14235         cf_target="\$cf_subdir\${section}/\${cf_target}"
14236
14237 CF_EOF
14238 fi
14239
14240 cat >>$cf_edit_man <<CF_EOF
14241         sed     -f $cf_man_alias \\
14242 CF_EOF
14243
14244 if test -f $MANPAGE_RENAMES ; then
14245 cat >>$cf_edit_man <<CF_EOF
14246                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14247 CF_EOF
14248 else
14249 cat >>$cf_edit_man <<CF_EOF
14250                 < \$i >\$TMP
14251 CF_EOF
14252 fi
14253
14254 cat >>$cf_edit_man <<CF_EOF
14255 if test \$cf_tables = yes ; then
14256         tbl \$TMP >\$TMP.out
14257         mv \$TMP.out \$TMP
14258 fi
14259 CF_EOF
14260
14261 if test $with_overwrite != yes ; then
14262 cat >>$cf_edit_man <<CF_EOF
14263         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14264         mv \$TMP.out \$TMP
14265 CF_EOF
14266 fi
14267
14268 if test $with_curses_h != yes ; then
14269 cat >>$cf_edit_man <<CF_EOF
14270         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14271         mv \$TMP.out \$TMP
14272 CF_EOF
14273 fi
14274
14275 cat >>$cf_edit_man <<CF_EOF
14276         if test \$form = format ; then
14277                 nroff -man \$TMP >\$TMP.out
14278                 mv \$TMP.out \$TMP
14279         fi
14280 CF_EOF
14281
14282 if test -n "$cf_compress" ; then
14283 cat >>$cf_edit_man <<CF_EOF
14284         if test \$verb = installing ; then
14285         if ( $cf_compress -f \$TMP )
14286         then
14287                 mv \$TMP.$cf_so_strip \$TMP
14288         fi
14289         fi
14290         cf_target="\$cf_target.$cf_so_strip"
14291 CF_EOF
14292 fi
14293
14294 case "$MANPAGE_FORMAT" in
14295 (*BSDI*)
14296 cat >>$cf_edit_man <<CF_EOF
14297         if test \$form = format ; then
14298                 # BSDI installs only .0 suffixes in the cat directories
14299                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14300         fi
14301 CF_EOF
14302   ;;
14303 esac
14304
14305 cat >>$cf_edit_man <<CF_EOF
14306         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14307         if test \$verb = installing ; then
14308                 echo \$verb \$cf_target
14309                 \$INSTALL_DATA \$TMP \$cf_target
14310                 test -d \$cf_subdir\${section} &&
14311                 test -n "\$aliases" && (
14312                         cd \$cf_subdir\${section} && (
14313                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14314                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14315                                 cf_target=\`basename \$cf_target\`
14316                                 for cf_alias in \$aliases
14317                                 do
14318                                         if test \$section = 1 ; then
14319                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14320                                         fi
14321
14322                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14323                                                 if test -f \$cf_alias\${suffix} ; then
14324                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14325                                                         then
14326                                                                 continue
14327                                                         fi
14328                                                 fi
14329                                                 echo .. \$verb alias \$cf_alias\${suffix}
14330 CF_EOF
14331 case "x$LN_S" in
14332 (*-f)
14333 cat >>$cf_edit_man <<CF_EOF
14334                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14335 CF_EOF
14336         ;;
14337 (*)
14338 cat >>$cf_edit_man <<CF_EOF
14339                                                 rm -f \$cf_alias\${suffix}
14340                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14341 CF_EOF
14342         ;;
14343 esac
14344 cat >>$cf_edit_man <<CF_EOF
14345                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14346                                                 echo ".so \$cf_source" >\$TMP
14347 CF_EOF
14348 if test -n "$cf_compress" ; then
14349 cat >>$cf_edit_man <<CF_EOF
14350                                                 if test -n "$cf_so_strip" ; then
14351                                                         $cf_compress -f \$TMP
14352                                                         mv \$TMP.$cf_so_strip \$TMP
14353                                                 fi
14354 CF_EOF
14355 fi
14356 cat >>$cf_edit_man <<CF_EOF
14357                                                 echo .. \$verb alias \$cf_alias\${suffix}
14358                                                 rm -f \$cf_alias\${suffix}
14359                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14360                                         fi
14361                                 done
14362                         )
14363                 )
14364         elif test \$verb = removing ; then
14365                 test -f \$cf_target && (
14366                         echo \$verb \$cf_target
14367                         rm -f \$cf_target
14368                 )
14369                 test -d \$cf_subdir\${section} &&
14370                 test -n "\$aliases" && (
14371                         cd \$cf_subdir\${section} && (
14372                                 for cf_alias in \$aliases
14373                                 do
14374                                         if test \$section = 1 ; then
14375                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14376                                         fi
14377
14378                                         echo .. \$verb alias \$cf_alias\${suffix}
14379                                         rm -f \$cf_alias\${suffix}
14380                                 done
14381                         )
14382                 )
14383         else
14384 #               echo ".hy 0"
14385                 cat \$TMP
14386         fi
14387         ;;
14388 esac
14389 done
14390
14391 if test $cf_inboth = yes ; then
14392 if test \$form != format ; then
14393         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14394 fi
14395 fi
14396
14397 exit 0
14398 CF_EOF
14399 chmod 755 $cf_edit_man
14400
14401 ###############################################################################
14402
14403 ### Note that some functions (such as const) are normally disabled anyway.
14404 echo "$as_me:14404: checking if you want to build with function extensions" >&5
14405 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14406
14407 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14408 if test "${enable_ext_funcs+set}" = set; then
14409   enableval="$enable_ext_funcs"
14410   with_ext_funcs=$enableval
14411 else
14412   with_ext_funcs=yes
14413 fi;
14414 echo "$as_me:14414: result: $with_ext_funcs" >&5
14415 echo "${ECHO_T}$with_ext_funcs" >&6
14416 if test "x$with_ext_funcs" = xyes ; then
14417         NCURSES_EXT_FUNCS=1
14418
14419 cat >>confdefs.h <<\EOF
14420 #define NCURSES_EXT_FUNCS 1
14421 EOF
14422
14423 cat >>confdefs.h <<\EOF
14424 #define HAVE_ASSUME_DEFAULT_COLORS 1
14425 EOF
14426
14427 cat >>confdefs.h <<\EOF
14428 #define HAVE_CURSES_VERSION 1
14429 EOF
14430
14431 cat >>confdefs.h <<\EOF
14432 #define HAVE_HAS_KEY 1
14433 EOF
14434
14435 cat >>confdefs.h <<\EOF
14436 #define HAVE_RESIZETERM 1
14437 EOF
14438
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_RESIZE_TERM 1
14441 EOF
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_TERM_ENTRY_H 1
14445 EOF
14446
14447 cat >>confdefs.h <<\EOF
14448 #define HAVE_USE_DEFAULT_COLORS 1
14449 EOF
14450
14451 cat >>confdefs.h <<\EOF
14452 #define HAVE_USE_EXTENDED_NAMES 1
14453 EOF
14454
14455 cat >>confdefs.h <<\EOF
14456 #define HAVE_USE_SCREEN 1
14457 EOF
14458
14459 cat >>confdefs.h <<\EOF
14460 #define HAVE_USE_WINDOW 1
14461 EOF
14462
14463 cat >>confdefs.h <<\EOF
14464 #define HAVE_WRESIZE 1
14465 EOF
14466
14467         GENERATED_EXT_FUNCS=generated
14468         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14469 else
14470         NCURSES_EXT_FUNCS=0
14471         GENERATED_EXT_FUNCS=
14472 fi
14473
14474 echo "$as_me:14474: checking if you want to build with SCREEN extensions" >&5
14475 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14476
14477 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14478 if test "${enable_sp_funcs+set}" = set; then
14479   enableval="$enable_sp_funcs"
14480   with_sp_funcs=$enableval
14481 else
14482   with_sp_funcs=$cf_dft_ext_spfuncs
14483 fi;
14484 echo "$as_me:14484: result: $with_sp_funcs" >&5
14485 echo "${ECHO_T}$with_sp_funcs" >&6
14486 if test "x$with_sp_funcs" = xyes ; then
14487         NCURSES_SP_FUNCS=1
14488
14489 cat >>confdefs.h <<\EOF
14490 #define NCURSES_SP_FUNCS 1
14491 EOF
14492
14493 cat >>confdefs.h <<\EOF
14494 #define HAVE_TPUTS_SP 1
14495 EOF
14496
14497         GENERATED_SP_FUNCS=generated
14498 else
14499         NCURSES_SP_FUNCS=0
14500         GENERATED_SP_FUNCS=
14501 fi
14502
14503 echo "$as_me:14503: checking if you want to build with terminal-driver" >&5
14504 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14505
14506 # Check whether --enable-term-driver or --disable-term-driver was given.
14507 if test "${enable_term_driver+set}" = set; then
14508   enableval="$enable_term_driver"
14509   with_term_driver=$enableval
14510 else
14511   with_term_driver=no
14512 fi;
14513 echo "$as_me:14513: result: $with_term_driver" >&5
14514 echo "${ECHO_T}$with_term_driver" >&6
14515 if test "x$with_term_driver" = xyes ; then
14516
14517 cat >>confdefs.h <<\EOF
14518 #define USE_TERM_DRIVER 1
14519 EOF
14520
14521         if test "x$with_termlib" != xno ; then
14522                 { { echo "$as_me:14522: error: The term-driver option conflicts with the termlib option" >&5
14523 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14524    { (exit 1); exit 1; }; }
14525         fi
14526         if test "x$with_sp_funcs" != xyes ; then
14527                 { { echo "$as_me:14527: error: The term-driver option relies upon sp-funcs" >&5
14528 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14529    { (exit 1); exit 1; }; }
14530         fi
14531 fi
14532
14533 ###   use option --enable-const to turn on use of const beyond that in XSI.
14534 echo "$as_me:14534: checking for extended use of const keyword" >&5
14535 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14536
14537 # Check whether --enable-const or --disable-const was given.
14538 if test "${enable_const+set}" = set; then
14539   enableval="$enable_const"
14540   with_ext_const=$enableval
14541 else
14542   with_ext_const=$cf_dft_ext_const
14543 fi;
14544 echo "$as_me:14544: result: $with_ext_const" >&5
14545 echo "${ECHO_T}$with_ext_const" >&6
14546 NCURSES_CONST='/*nothing*/'
14547 if test "x$with_ext_const" = xyes ; then
14548         NCURSES_CONST=const
14549 fi
14550
14551 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14552 echo "$as_me:14552: checking if you want to use extended colors" >&5
14553 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14554
14555 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14556 if test "${enable_ext_colors+set}" = set; then
14557   enableval="$enable_ext_colors"
14558   with_ext_colors=$enableval
14559 else
14560   with_ext_colors=$cf_dft_ext_colors
14561 fi;
14562 echo "$as_me:14562: result: $with_ext_colors" >&5
14563 echo "${ECHO_T}$with_ext_colors" >&6
14564 NCURSES_EXT_COLORS=0
14565 if test "x$with_ext_colors" = xyes ; then
14566         if test "x$with_widec" != xyes ; then
14567                 { echo "$as_me:14567: WARNING: This option applies only to wide-character library" >&5
14568 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14569         else
14570                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14571
14572 if test "${with_abi_version+set}" != set; then
14573         case $cf_cv_rel_version in
14574         (5.*)
14575                 cf_cv_rel_version=6.0
14576                 cf_cv_abi_version=6
14577                 { echo "$as_me:14577: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14578 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14579                 ;;
14580         esac
14581 fi
14582
14583                 NCURSES_EXT_COLORS=1
14584
14585 cat >>confdefs.h <<\EOF
14586 #define NCURSES_EXT_COLORS 1
14587 EOF
14588
14589 cat >>confdefs.h <<\EOF
14590 #define HAVE_ALLOC_PAIR 1
14591 EOF
14592
14593 cat >>confdefs.h <<\EOF
14594 #define HAVE_INIT_EXTENDED_COLOR 1
14595 EOF
14596
14597 cat >>confdefs.h <<\EOF
14598 #define HAVE_RESET_COLOR_PAIRS 1
14599 EOF
14600
14601         fi
14602 fi
14603
14604 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14605 echo "$as_me:14605: checking if you want to use extended mouse encoding" >&5
14606 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14607
14608 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14609 if test "${enable_ext_mouse+set}" = set; then
14610   enableval="$enable_ext_mouse"
14611   with_ext_mouse=$enableval
14612 else
14613   with_ext_mouse=$cf_dft_ext_mouse
14614 fi;
14615 echo "$as_me:14615: result: $with_ext_mouse" >&5
14616 echo "${ECHO_T}$with_ext_mouse" >&6
14617 NCURSES_MOUSE_VERSION=1
14618 if test "x$with_ext_mouse" = xyes ; then
14619         NCURSES_MOUSE_VERSION=2
14620
14621 if test "${with_abi_version+set}" != set; then
14622         case $cf_cv_rel_version in
14623         (5.*)
14624                 cf_cv_rel_version=6.0
14625                 cf_cv_abi_version=6
14626                 { echo "$as_me:14626: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14627 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14628                 ;;
14629         esac
14630 fi
14631
14632 fi
14633
14634 ###   use option --enable-ext-putwin to turn on extended screendumps
14635 echo "$as_me:14635: checking if you want to use extended putwin/screendump" >&5
14636 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14637
14638 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14639 if test "${enable_ext_putwin+set}" = set; then
14640   enableval="$enable_ext_putwin"
14641   with_ext_putwin=$enableval
14642 else
14643   with_ext_putwin=$cf_dft_ext_putwin
14644 fi;
14645 echo "$as_me:14645: result: $with_ext_putwin" >&5
14646 echo "${ECHO_T}$with_ext_putwin" >&6
14647 if test "x$with_ext_putwin" = xyes ; then
14648
14649 cat >>confdefs.h <<\EOF
14650 #define NCURSES_EXT_PUTWIN 1
14651 EOF
14652
14653 fi
14654
14655 echo "$as_me:14655: checking if you want \$NCURSES_NO_PADDING code" >&5
14656 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14657
14658 # Check whether --enable-no-padding or --disable-no-padding was given.
14659 if test "${enable_no_padding+set}" = set; then
14660   enableval="$enable_no_padding"
14661   with_no_padding=$enableval
14662 else
14663   with_no_padding=$with_ext_funcs
14664 fi;
14665 echo "$as_me:14665: result: $with_no_padding" >&5
14666 echo "${ECHO_T}$with_no_padding" >&6
14667 test "x$with_no_padding" = xyes &&
14668 cat >>confdefs.h <<\EOF
14669 #define NCURSES_NO_PADDING 1
14670 EOF
14671
14672 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14673 echo "$as_me:14673: checking if you want SIGWINCH handler" >&5
14674 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14675
14676 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14677 if test "${enable_sigwinch+set}" = set; then
14678   enableval="$enable_sigwinch"
14679   with_sigwinch=$enableval
14680 else
14681   with_sigwinch=$with_ext_funcs
14682 fi;
14683 echo "$as_me:14683: result: $with_sigwinch" >&5
14684 echo "${ECHO_T}$with_sigwinch" >&6
14685 test "x$with_sigwinch" = xyes &&
14686 cat >>confdefs.h <<\EOF
14687 #define USE_SIGWINCH 1
14688 EOF
14689
14690 ###   use option --enable-tcap-names to allow user to define new capabilities
14691 echo "$as_me:14691: checking if you want user-definable terminal capabilities like termcap" >&5
14692 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14693
14694 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14695 if test "${enable_tcap_names+set}" = set; then
14696   enableval="$enable_tcap_names"
14697   with_tcap_names=$enableval
14698 else
14699   with_tcap_names=$with_ext_funcs
14700 fi;
14701 echo "$as_me:14701: result: $with_tcap_names" >&5
14702 echo "${ECHO_T}$with_tcap_names" >&6
14703 NCURSES_XNAMES=0
14704 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14705
14706 ##############################################################################
14707
14708 echo "$as_me:14708: checking if you want to link with the pthread library" >&5
14709 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14710
14711 # Check whether --with-pthread or --without-pthread was given.
14712 if test "${with_pthread+set}" = set; then
14713   withval="$with_pthread"
14714   with_pthread=$withval
14715 else
14716   with_pthread=no
14717 fi;
14718 echo "$as_me:14718: result: $with_pthread" >&5
14719 echo "${ECHO_T}$with_pthread" >&6
14720
14721 if test "$with_pthread" != no ; then
14722         echo "$as_me:14722: checking for pthread.h" >&5
14723 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14724 if test "${ac_cv_header_pthread_h+set}" = set; then
14725   echo $ECHO_N "(cached) $ECHO_C" >&6
14726 else
14727   cat >conftest.$ac_ext <<_ACEOF
14728 #line 14728 "configure"
14729 #include "confdefs.h"
14730 #include <pthread.h>
14731 _ACEOF
14732 if { (eval echo "$as_me:14732: \"$ac_cpp conftest.$ac_ext\"") >&5
14733   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14734   ac_status=$?
14735   egrep -v '^ *\+' conftest.er1 >conftest.err
14736   rm -f conftest.er1
14737   cat conftest.err >&5
14738   echo "$as_me:14738: \$? = $ac_status" >&5
14739   (exit $ac_status); } >/dev/null; then
14740   if test -s conftest.err; then
14741     ac_cpp_err=$ac_c_preproc_warn_flag
14742   else
14743     ac_cpp_err=
14744   fi
14745 else
14746   ac_cpp_err=yes
14747 fi
14748 if test -z "$ac_cpp_err"; then
14749   ac_cv_header_pthread_h=yes
14750 else
14751   echo "$as_me: failed program was:" >&5
14752   cat conftest.$ac_ext >&5
14753   ac_cv_header_pthread_h=no
14754 fi
14755 rm -f conftest.err conftest.$ac_ext
14756 fi
14757 echo "$as_me:14757: result: $ac_cv_header_pthread_h" >&5
14758 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14759 if test $ac_cv_header_pthread_h = yes; then
14760
14761 cat >>confdefs.h <<\EOF
14762 #define HAVE_PTHREADS_H 1
14763 EOF
14764
14765         for cf_lib_pthread in pthread c_r
14766         do
14767             echo "$as_me:14767: checking if we can link with the $cf_lib_pthread library" >&5
14768 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14769             cf_save_LIBS="$LIBS"
14770
14771 cf_add_libs="$LIBS"
14772 # reverse order
14773 cf_add_0lib=
14774 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14775 # filter duplicates
14776 for cf_add_1lib in $cf_add_0lib; do
14777         for cf_add_2lib in $cf_add_libs; do
14778                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14779                         cf_add_1lib=
14780                         break
14781                 fi
14782         done
14783         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14784 done
14785 LIBS="$cf_add_libs"
14786
14787             cat >conftest.$ac_ext <<_ACEOF
14788 #line 14788 "configure"
14789 #include "confdefs.h"
14790
14791 #include <pthread.h>
14792
14793 int
14794 main (void)
14795 {
14796
14797                 int rc = pthread_create(0,0,0,0);
14798                 int r2 = pthread_mutexattr_settype(0, 0);
14799
14800   ;
14801   return 0;
14802 }
14803 _ACEOF
14804 rm -f conftest.$ac_objext conftest$ac_exeext
14805 if { (eval echo "$as_me:14805: \"$ac_link\"") >&5
14806   (eval $ac_link) 2>&5
14807   ac_status=$?
14808   echo "$as_me:14808: \$? = $ac_status" >&5
14809   (exit $ac_status); } &&
14810          { ac_try='test -s conftest$ac_exeext'
14811   { (eval echo "$as_me:14811: \"$ac_try\"") >&5
14812   (eval $ac_try) 2>&5
14813   ac_status=$?
14814   echo "$as_me:14814: \$? = $ac_status" >&5
14815   (exit $ac_status); }; }; then
14816   with_pthread=yes
14817 else
14818   echo "$as_me: failed program was:" >&5
14819 cat conftest.$ac_ext >&5
14820 with_pthread=no
14821 fi
14822 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14823             LIBS="$cf_save_LIBS"
14824             echo "$as_me:14824: result: $with_pthread" >&5
14825 echo "${ECHO_T}$with_pthread" >&6
14826             test "$with_pthread" = yes && break
14827         done
14828
14829         if test "$with_pthread" = yes ; then
14830
14831 cf_add_libs="$LIBS"
14832 # reverse order
14833 cf_add_0lib=
14834 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14835 # filter duplicates
14836 for cf_add_1lib in $cf_add_0lib; do
14837         for cf_add_2lib in $cf_add_libs; do
14838                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14839                         cf_add_1lib=
14840                         break
14841                 fi
14842         done
14843         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14844 done
14845 LIBS="$cf_add_libs"
14846
14847 cat >>confdefs.h <<\EOF
14848 #define HAVE_LIBPTHREADS 1
14849 EOF
14850
14851         else
14852             { { echo "$as_me:14852: error: Cannot link with pthread library" >&5
14853 echo "$as_me: error: Cannot link with pthread library" >&2;}
14854    { (exit 1); exit 1; }; }
14855         fi
14856
14857 fi
14858
14859 fi
14860
14861 if test "x$with_pthread" != xno; then
14862         echo "$as_me:14862: checking for pthread_kill" >&5
14863 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14864 if test "${ac_cv_func_pthread_kill+set}" = set; then
14865   echo $ECHO_N "(cached) $ECHO_C" >&6
14866 else
14867   cat >conftest.$ac_ext <<_ACEOF
14868 #line 14868 "configure"
14869 #include "confdefs.h"
14870 #define pthread_kill autoconf_temporary
14871 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14872 #undef pthread_kill
14873
14874 #ifdef __cplusplus
14875 extern "C"
14876 #endif
14877
14878 /* We use char because int might match the return type of a gcc2
14879    builtin and then its argument prototype would still apply.  */
14880 char pthread_kill (void);
14881
14882 int
14883 main (void)
14884 {
14885
14886 /* The GNU C library defines stubs for functions which it implements
14887     to always fail with ENOSYS.  Some functions are actually named
14888     something starting with __ and the normal name is an alias.  */
14889 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14890 #error found stub for pthread_kill
14891 #endif
14892
14893         return pthread_kill ();
14894   ;
14895   return 0;
14896 }
14897 _ACEOF
14898 rm -f conftest.$ac_objext conftest$ac_exeext
14899 if { (eval echo "$as_me:14899: \"$ac_link\"") >&5
14900   (eval $ac_link) 2>&5
14901   ac_status=$?
14902   echo "$as_me:14902: \$? = $ac_status" >&5
14903   (exit $ac_status); } &&
14904          { ac_try='test -s conftest$ac_exeext'
14905   { (eval echo "$as_me:14905: \"$ac_try\"") >&5
14906   (eval $ac_try) 2>&5
14907   ac_status=$?
14908   echo "$as_me:14908: \$? = $ac_status" >&5
14909   (exit $ac_status); }; }; then
14910   ac_cv_func_pthread_kill=yes
14911 else
14912   echo "$as_me: failed program was:" >&5
14913 cat conftest.$ac_ext >&5
14914 ac_cv_func_pthread_kill=no
14915 fi
14916 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14917 fi
14918 echo "$as_me:14918: result: $ac_cv_func_pthread_kill" >&5
14919 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14920 if test $ac_cv_func_pthread_kill = yes; then
14921
14922                 echo "$as_me:14922: checking if you want to allow EINTR in wgetch with pthreads" >&5
14923 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14924
14925 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14926 if test "${enable_pthreads_eintr+set}" = set; then
14927   enableval="$enable_pthreads_eintr"
14928   use_pthreads_eintr=$enableval
14929 else
14930   use_pthreads_eintr=no
14931 fi;
14932                 echo "$as_me:14932: result: $use_pthreads_eintr" >&5
14933 echo "${ECHO_T}$use_pthreads_eintr" >&6
14934                 if test "x$use_pthreads_eintr" = xyes ; then
14935
14936 cat >>confdefs.h <<\EOF
14937 #define USE_PTHREADS_EINTR 1
14938 EOF
14939
14940                 fi
14941 fi
14942
14943         echo "$as_me:14943: checking if you want to use weak-symbols for pthreads" >&5
14944 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14945
14946 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14947 if test "${enable_weak_symbols+set}" = set; then
14948   enableval="$enable_weak_symbols"
14949   use_weak_symbols=$enableval
14950 else
14951   use_weak_symbols=no
14952 fi;
14953         echo "$as_me:14953: result: $use_weak_symbols" >&5
14954 echo "${ECHO_T}$use_weak_symbols" >&6
14955         if test "x$use_weak_symbols" = xyes ; then
14956
14957 echo "$as_me:14957: checking if $CC supports weak symbols" >&5
14958 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14959 if test "${cf_cv_weak_symbols+set}" = set; then
14960   echo $ECHO_N "(cached) $ECHO_C" >&6
14961 else
14962
14963 cat >conftest.$ac_ext <<_ACEOF
14964 #line 14964 "configure"
14965 #include "confdefs.h"
14966
14967 #include <stdio.h>
14968 int
14969 main (void)
14970 {
14971
14972 #if defined(__GNUC__)
14973 #  if defined __USE_ISOC99
14974 #    define _cat_pragma(exp)    _Pragma(#exp)
14975 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14976 #  else
14977 #    define _weak_pragma(exp)
14978 #  endif
14979 #  define _declare(name)        __extension__ extern __typeof__(name) name
14980 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14981 #endif
14982
14983 weak_symbol(fopen);
14984
14985   ;
14986   return 0;
14987 }
14988 _ACEOF
14989 rm -f conftest.$ac_objext
14990 if { (eval echo "$as_me:14990: \"$ac_compile\"") >&5
14991   (eval $ac_compile) 2>&5
14992   ac_status=$?
14993   echo "$as_me:14993: \$? = $ac_status" >&5
14994   (exit $ac_status); } &&
14995          { ac_try='test -s conftest.$ac_objext'
14996   { (eval echo "$as_me:14996: \"$ac_try\"") >&5
14997   (eval $ac_try) 2>&5
14998   ac_status=$?
14999   echo "$as_me:14999: \$? = $ac_status" >&5
15000   (exit $ac_status); }; }; then
15001   cf_cv_weak_symbols=yes
15002 else
15003   echo "$as_me: failed program was:" >&5
15004 cat conftest.$ac_ext >&5
15005 cf_cv_weak_symbols=no
15006 fi
15007 rm -f conftest.$ac_objext conftest.$ac_ext
15008
15009 fi
15010 echo "$as_me:15010: result: $cf_cv_weak_symbols" >&5
15011 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15012
15013         else
15014                 cf_cv_weak_symbols=no
15015         fi
15016
15017         if test "x$cf_cv_weak_symbols" = xyes ; then
15018
15019 cat >>confdefs.h <<\EOF
15020 #define USE_WEAK_SYMBOLS 1
15021 EOF
15022
15023         fi
15024 fi
15025
15026 PTHREAD=
15027 if test "x$with_pthread" = "xyes" ; then
15028
15029 cat >>confdefs.h <<\EOF
15030 #define USE_PTHREADS 1
15031 EOF
15032
15033         enable_reentrant=yes
15034         if test "x$cf_cv_weak_symbols" = xyes ; then
15035                 PTHREAD=-lpthread
15036
15037 cf_add_libs="$PRIVATE_LIBS"
15038 # reverse order
15039 cf_add_0lib=
15040 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15041 # filter duplicates
15042 for cf_add_1lib in $cf_add_0lib; do
15043         for cf_add_2lib in $cf_add_libs; do
15044                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15045                         cf_add_1lib=
15046                         break
15047                 fi
15048         done
15049         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15050 done
15051 PRIVATE_LIBS="$cf_add_libs"
15052
15053         fi
15054 fi
15055
15056 # Reentrant code has to be opaque; there's little advantage to making ncurses
15057 # opaque outside of that, so there is no --enable-opaque option.  We can use
15058 # this option without --with-pthreads, but this will be always set for
15059 # pthreads.
15060 echo "$as_me:15060: checking if you want reentrant code" >&5
15061 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15062
15063 # Check whether --enable-reentrant or --disable-reentrant was given.
15064 if test "${enable_reentrant+set}" = set; then
15065   enableval="$enable_reentrant"
15066   with_reentrant=$enableval
15067 else
15068   with_reentrant=no
15069 fi;
15070 echo "$as_me:15070: result: $with_reentrant" >&5
15071 echo "${ECHO_T}$with_reentrant" >&6
15072 if test "x$with_reentrant" = xyes ; then
15073         cf_cv_enable_reentrant=1
15074         cf_cv_enable_opaque="NCURSES_INTERNALS"
15075         NCURSES_SIZE_T=int
15076         if test "x$cf_cv_weak_symbols" = xyes ; then
15077
15078 # remove pthread library from $LIBS
15079 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15080
15081 cf_add_libs="$TEST_LIBS"
15082 # reverse order
15083 cf_add_0lib=
15084 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15085 # filter duplicates
15086 for cf_add_1lib in $cf_add_0lib; do
15087         for cf_add_2lib in $cf_add_libs; do
15088                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15089                         cf_add_1lib=
15090                         break
15091                 fi
15092         done
15093         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15094 done
15095 TEST_LIBS="$cf_add_libs"
15096
15097 cf_add_libs="$TEST_LIBS2"
15098 # reverse order
15099 cf_add_0lib=
15100 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15101 # filter duplicates
15102 for cf_add_1lib in $cf_add_0lib; do
15103         for cf_add_2lib in $cf_add_libs; do
15104                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15105                         cf_add_1lib=
15106                         break
15107                 fi
15108         done
15109         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15110 done
15111 TEST_LIBS2="$cf_add_libs"
15112
15113 cf_add_libs="$PRIVATE_LIBS"
15114 # reverse order
15115 cf_add_0lib=
15116 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15117 # filter duplicates
15118 for cf_add_1lib in $cf_add_0lib; do
15119         for cf_add_2lib in $cf_add_libs; do
15120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15121                         cf_add_1lib=
15122                         break
15123                 fi
15124         done
15125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15126 done
15127 PRIVATE_LIBS="$cf_add_libs"
15128
15129         else
15130                 # when not using weak symbols but with_reentrant,
15131                 # add 't' to the library suffix on all platforms
15132                 # except cygwin, where we only do that if ALSO
15133                 # compiling with full thread support.
15134                 case "$host" in
15135                 (*cygwin* | *msys*)
15136                         if test "$with_pthread" = "yes" ; then
15137                                 if test "x$disable_lib_suffixes" = "xno" ; then
15138                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15139                                 fi
15140                         fi ;;
15141                 (*)
15142                         if test "x$disable_lib_suffixes" = "xno" ; then
15143                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15144                         fi
15145                         ;;
15146                 esac
15147         fi
15148
15149 cat >>confdefs.h <<\EOF
15150 #define USE_REENTRANT 1
15151 EOF
15152
15153 if test "${with_abi_version+set}" != set; then
15154         case $cf_cv_rel_version in
15155         (5.*)
15156                 cf_cv_rel_version=6.0
15157                 cf_cv_abi_version=6
15158                 { echo "$as_me:15158: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15159 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15160                 ;;
15161         esac
15162 fi
15163
15164 else
15165         cf_cv_enable_reentrant=0
15166         cf_cv_enable_opaque="NCURSES_OPAQUE"
15167         NCURSES_SIZE_T=short
15168 fi
15169
15170 echo "$as_me:15170: checking if you want opaque curses-library structures" >&5
15171 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15172
15173 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15174 if test "${enable_opaque_curses+set}" = set; then
15175   enableval="$enable_opaque_curses"
15176   test "$enableval" != yes && enableval=no
15177         if test "$enableval" != "no" ; then
15178     enable_opaque_curses=yes
15179         else
15180
15181          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15182          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15183
15184         fi
15185 else
15186   enableval=no
15187
15188          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15189          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15190
15191 fi;
15192 echo "$as_me:15192: result: $enable_opaque_curses" >&5
15193 echo "${ECHO_T}$enable_opaque_curses" >&6
15194
15195 test "$cf_cv_enable_reentrant" = 1 && \
15196 test "$enable_opaque_curses" = no && \
15197 { { echo "$as_me:15197: error: reentrant configuration requires opaque library" >&5
15198 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15199    { (exit 1); exit 1; }; }
15200
15201 echo "$as_me:15201: checking if you want opaque form-library structures" >&5
15202 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15203
15204 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15205 if test "${enable_opaque_form+set}" = set; then
15206   enableval="$enable_opaque_form"
15207   enable_opaque_form=yes
15208 else
15209   enable_opaque_form=no
15210 fi;
15211 echo "$as_me:15211: result: $enable_opaque_form" >&5
15212 echo "${ECHO_T}$enable_opaque_form" >&6
15213
15214 echo "$as_me:15214: checking if you want opaque menu-library structures" >&5
15215 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15216
15217 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15218 if test "${enable_opaque_menu+set}" = set; then
15219   enableval="$enable_opaque_menu"
15220   enable_opaque_menu=yes
15221 else
15222   enable_opaque_menu=no
15223 fi;
15224 echo "$as_me:15224: result: $enable_opaque_menu" >&5
15225 echo "${ECHO_T}$enable_opaque_menu" >&6
15226
15227 echo "$as_me:15227: checking if you want opaque panel-library structures" >&5
15228 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15229
15230 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15231 if test "${enable_opaque_panel+set}" = set; then
15232   enableval="$enable_opaque_panel"
15233   enable_opaque_panel=yes
15234 else
15235   enable_opaque_panel=no
15236 fi;
15237 echo "$as_me:15237: result: $enable_opaque_panel" >&5
15238 echo "${ECHO_T}$enable_opaque_panel" >&6
15239
15240 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15241 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15242 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15243 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15244
15245 ### Allow using a different wrap-prefix
15246 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15247         echo "$as_me:15247: checking for prefix used to wrap public variables" >&5
15248 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15249
15250 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15251 if test "${with_wrap_prefix+set}" = set; then
15252   withval="$with_wrap_prefix"
15253   NCURSES_WRAP_PREFIX=$withval
15254 else
15255   NCURSES_WRAP_PREFIX=_nc_
15256 fi;
15257         echo "$as_me:15257: result: $NCURSES_WRAP_PREFIX" >&5
15258 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15259 else
15260         NCURSES_WRAP_PREFIX=_nc_
15261 fi
15262
15263 cat >>confdefs.h <<EOF
15264 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15265 EOF
15266
15267 ###############################################################################
15268 # These options are relatively safe to experiment with.
15269
15270 echo "$as_me:15270: checking if you want all development code" >&5
15271 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15272
15273 # Check whether --with-develop or --without-develop was given.
15274 if test "${with_develop+set}" = set; then
15275   withval="$with_develop"
15276   with_develop=$withval
15277 else
15278   with_develop=no
15279 fi;
15280 echo "$as_me:15280: result: $with_develop" >&5
15281 echo "${ECHO_T}$with_develop" >&6
15282
15283 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15284 echo "$as_me:15284: checking if you want hard-tabs code" >&5
15285 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15286
15287 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15288 if test "${enable_hard_tabs+set}" = set; then
15289   enableval="$enable_hard_tabs"
15290
15291 else
15292   enable_hard_tabs=$with_develop
15293 fi;
15294 echo "$as_me:15294: result: $enable_hard_tabs" >&5
15295 echo "${ECHO_T}$enable_hard_tabs" >&6
15296 test "x$enable_hard_tabs" = xyes &&
15297 cat >>confdefs.h <<\EOF
15298 #define USE_HARD_TABS 1
15299 EOF
15300
15301 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15302 echo "$as_me:15302: checking if you want limited support for xmc" >&5
15303 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15304
15305 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15306 if test "${enable_xmc_glitch+set}" = set; then
15307   enableval="$enable_xmc_glitch"
15308
15309 else
15310   enable_xmc_glitch=$with_develop
15311 fi;
15312 echo "$as_me:15312: result: $enable_xmc_glitch" >&5
15313 echo "${ECHO_T}$enable_xmc_glitch" >&6
15314 test "x$enable_xmc_glitch" = xyes &&
15315 cat >>confdefs.h <<\EOF
15316 #define USE_XMC_SUPPORT 1
15317 EOF
15318
15319 ###############################################################################
15320 # These are just experimental, probably should not be in a package:
15321
15322 echo "$as_me:15322: checking if you do not want to assume colors are white-on-black" >&5
15323 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15324
15325 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15326 if test "${enable_assumed_color+set}" = set; then
15327   enableval="$enable_assumed_color"
15328   with_assumed_color=$enableval
15329 else
15330   with_assumed_color=yes
15331 fi;
15332 echo "$as_me:15332: result: $with_assumed_color" >&5
15333 echo "${ECHO_T}$with_assumed_color" >&6
15334 test "x$with_assumed_color" = xyes &&
15335 cat >>confdefs.h <<\EOF
15336 #define USE_ASSUMED_COLOR 1
15337 EOF
15338
15339 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15340 echo "$as_me:15340: checking if you want hashmap scrolling-optimization code" >&5
15341 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15342
15343 # Check whether --enable-hashmap or --disable-hashmap was given.
15344 if test "${enable_hashmap+set}" = set; then
15345   enableval="$enable_hashmap"
15346   with_hashmap=$enableval
15347 else
15348   with_hashmap=yes
15349 fi;
15350 echo "$as_me:15350: result: $with_hashmap" >&5
15351 echo "${ECHO_T}$with_hashmap" >&6
15352 test "x$with_hashmap" = xyes &&
15353 cat >>confdefs.h <<\EOF
15354 #define USE_HASHMAP 1
15355 EOF
15356
15357 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15358 echo "$as_me:15358: checking if you want colorfgbg code" >&5
15359 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15360
15361 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15362 if test "${enable_colorfgbg+set}" = set; then
15363   enableval="$enable_colorfgbg"
15364   with_colorfgbg=$enableval
15365 else
15366   with_colorfgbg=no
15367 fi;
15368 echo "$as_me:15368: result: $with_colorfgbg" >&5
15369 echo "${ECHO_T}$with_colorfgbg" >&6
15370 test "x$with_colorfgbg" = xyes &&
15371 cat >>confdefs.h <<\EOF
15372 #define USE_COLORFGBG 1
15373 EOF
15374
15375 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15376 echo "$as_me:15376: checking if you want to use gcc -fvisibility option" >&5
15377 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15378
15379 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15380 if test "${enable_fvisibility+set}" = set; then
15381   enableval="$enable_fvisibility"
15382   cf_with_fvisibility=$enableval
15383 else
15384   cf_with_fvisibility=no
15385 fi;
15386 echo "$as_me:15386: result: $cf_with_fvisibility" >&5
15387 echo "${ECHO_T}$cf_with_fvisibility" >&6
15388
15389 NCURSES_IMPEXP=
15390 NCURSES_CXX_IMPEXP=
15391 if test "x$cf_with_fvisibility" = xyes; then
15392
15393 echo "$as_me:15393: checking if $CC -fvisibility=hidden option works" >&5
15394 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15395 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15396   echo $ECHO_N "(cached) $ECHO_C" >&6
15397 else
15398
15399     cf_save_cflags="$CFLAGS"
15400     CFLAGS="$CFLAGS -fvisibility=hidden"
15401     cat >conftest.$ac_ext <<_ACEOF
15402 #line 15402 "configure"
15403 #include "confdefs.h"
15404
15405 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15406
15407 int
15408 main (void)
15409 {
15410
15411         if (somefunc()) return 1;
15412
15413   ;
15414   return 0;
15415 }
15416 _ACEOF
15417 rm -f conftest.$ac_objext conftest$ac_exeext
15418 if { (eval echo "$as_me:15418: \"$ac_link\"") >&5
15419   (eval $ac_link) 2>&5
15420   ac_status=$?
15421   echo "$as_me:15421: \$? = $ac_status" >&5
15422   (exit $ac_status); } &&
15423          { ac_try='test -s conftest$ac_exeext'
15424   { (eval echo "$as_me:15424: \"$ac_try\"") >&5
15425   (eval $ac_try) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit $ac_status); }; }; then
15429   cf_cv_fvisibility_hidden=yes
15430 else
15431   echo "$as_me: failed program was:" >&5
15432 cat conftest.$ac_ext >&5
15433 cf_cv_fvisibility_hidden=no
15434 fi
15435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15436     CFLAGS=$cf_save_cflags
15437
15438 fi
15439 echo "$as_me:15439: result: $cf_cv_fvisibility_hidden" >&5
15440 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15441
15442         if test "x$cf_cv_fvisibility_hidden" = xyes
15443         then
15444
15445 cf_fix_cppflags=no
15446 cf_new_cflags=
15447 cf_new_cppflags=
15448 cf_new_extra_cppflags=
15449
15450 for cf_add_cflags in -fvisibility=hidden
15451 do
15452 case $cf_fix_cppflags in
15453 (no)
15454         case $cf_add_cflags in
15455         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15456                 case $cf_add_cflags in
15457                 (-D*)
15458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15459
15460                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15461                                 && test -z "${cf_tst_cflags}" \
15462                                 && cf_fix_cppflags=yes
15463
15464                         if test $cf_fix_cppflags = yes ; then
15465
15466         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15467         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15468
15469                                 continue
15470                         elif test "${cf_tst_cflags}" = "\"'" ; then
15471
15472         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15473         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15474
15475                                 continue
15476                         fi
15477                         ;;
15478                 esac
15479                 case "$CPPFLAGS" in
15480                 (*$cf_add_cflags)
15481                         ;;
15482                 (*)
15483                         case $cf_add_cflags in
15484                         (-D*)
15485                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15486
15487 CPPFLAGS=`echo "$CPPFLAGS" | \
15488         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15489                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15490
15491                                 ;;
15492                         esac
15493
15494         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15495         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15496
15497                         ;;
15498                 esac
15499                 ;;
15500         (*)
15501
15502         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15503         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15504
15505                 ;;
15506         esac
15507         ;;
15508 (yes)
15509
15510         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15511         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15512
15513         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15514
15515         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15516                 && test -z "${cf_tst_cflags}" \
15517                 && cf_fix_cppflags=no
15518         ;;
15519 esac
15520 done
15521
15522 if test -n "$cf_new_cflags" ; then
15523
15524         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15525         CFLAGS="${CFLAGS}$cf_new_cflags"
15526
15527 fi
15528
15529 if test -n "$cf_new_cppflags" ; then
15530
15531         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15532         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15533
15534 fi
15535
15536 if test -n "$cf_new_extra_cppflags" ; then
15537
15538         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15539         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15540
15541 fi
15542
15543                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15544         fi
15545         if test -n "$CXX"
15546         then
15547                 ac_ext=cc
15548 ac_cpp='$CXXCPP $CPPFLAGS'
15549 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15550 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15551 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15552 ac_main_return=return
15553
15554 echo "$as_me:15554: checking if $CXX -fvisibility=hidden option works" >&5
15555 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15556 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15557   echo $ECHO_N "(cached) $ECHO_C" >&6
15558 else
15559
15560     cf_save_cflags="$CXXFLAGS"
15561     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15562     cat >conftest.$ac_ext <<_ACEOF
15563 #line 15563 "configure"
15564 #include "confdefs.h"
15565
15566 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15567
15568 int
15569 main (void)
15570 {
15571
15572         if (somefunc()) return 1;
15573
15574   ;
15575   return 0;
15576 }
15577 _ACEOF
15578 rm -f conftest.$ac_objext conftest$ac_exeext
15579 if { (eval echo "$as_me:15579: \"$ac_link\"") >&5
15580   (eval $ac_link) 2>&5
15581   ac_status=$?
15582   echo "$as_me:15582: \$? = $ac_status" >&5
15583   (exit $ac_status); } &&
15584          { ac_try='test -s conftest$ac_exeext'
15585   { (eval echo "$as_me:15585: \"$ac_try\"") >&5
15586   (eval $ac_try) 2>&5
15587   ac_status=$?
15588   echo "$as_me:15588: \$? = $ac_status" >&5
15589   (exit $ac_status); }; }; then
15590   cf_cv_fvisibility_hidden2=yes
15591 else
15592   echo "$as_me: failed program was:" >&5
15593 cat conftest.$ac_ext >&5
15594 cf_cv_fvisibility_hidden2=no
15595 fi
15596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15597     CXXFLAGS=$cf_save_cflags
15598
15599 fi
15600 echo "$as_me:15600: result: $cf_cv_fvisibility_hidden2" >&5
15601 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15602
15603                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15604                 then
15605
15606 cf_save_CXXFLAGS="$CFLAGS"
15607 CFLAGS="$CXXFLAGS"
15608
15609 cf_fix_cppflags=no
15610 cf_new_cflags=
15611 cf_new_cppflags=
15612 cf_new_extra_cppflags=
15613
15614 for cf_add_cflags in -fvisibility=hidden
15615 do
15616 case $cf_fix_cppflags in
15617 (no)
15618         case $cf_add_cflags in
15619         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15620                 case $cf_add_cflags in
15621                 (-D*)
15622                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15623
15624                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15625                                 && test -z "${cf_tst_cflags}" \
15626                                 && cf_fix_cppflags=yes
15627
15628                         if test $cf_fix_cppflags = yes ; then
15629
15630         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15631         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15632
15633                                 continue
15634                         elif test "${cf_tst_cflags}" = "\"'" ; then
15635
15636         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15637         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15638
15639                                 continue
15640                         fi
15641                         ;;
15642                 esac
15643                 case "$CPPFLAGS" in
15644                 (*$cf_add_cflags)
15645                         ;;
15646                 (*)
15647                         case $cf_add_cflags in
15648                         (-D*)
15649                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15650
15651 CPPFLAGS=`echo "$CPPFLAGS" | \
15652         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15653                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15654
15655                                 ;;
15656                         esac
15657
15658         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15659         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15660
15661                         ;;
15662                 esac
15663                 ;;
15664         (*)
15665
15666         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15667         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15668
15669                 ;;
15670         esac
15671         ;;
15672 (yes)
15673
15674         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15675         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15676
15677         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15678
15679         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15680                 && test -z "${cf_tst_cflags}" \
15681                 && cf_fix_cppflags=no
15682         ;;
15683 esac
15684 done
15685
15686 if test -n "$cf_new_cflags" ; then
15687
15688         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15689         CFLAGS="${CFLAGS}$cf_new_cflags"
15690
15691 fi
15692
15693 if test -n "$cf_new_cppflags" ; then
15694
15695         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15696         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15697
15698 fi
15699
15700 if test -n "$cf_new_extra_cppflags" ; then
15701
15702         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15703         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15704
15705 fi
15706
15707 CXXFLAGS="$CFLAGS"
15708 CFLAGS="$cf_save_CXXFLAGS"
15709
15710                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15711                 fi
15712                 ac_ext=c
15713 ac_cpp='$CPP $CPPFLAGS'
15714 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15715 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15716 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15717 ac_main_return=return
15718
15719         fi
15720 fi
15721
15722 ###   use option --enable-interop to turn on use of bindings used for interop
15723 echo "$as_me:15723: checking if you want interop bindings" >&5
15724 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15725
15726 # Check whether --enable-interop or --disable-interop was given.
15727 if test "${enable_interop+set}" = set; then
15728   enableval="$enable_interop"
15729   with_exp_interop=$enableval
15730 else
15731   with_exp_interop=$cf_dft_interop
15732 fi;
15733 echo "$as_me:15733: result: $with_exp_interop" >&5
15734 echo "${ECHO_T}$with_exp_interop" >&6
15735
15736 NCURSES_INTEROP_FUNCS=0
15737 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15738
15739 echo "$as_me:15739: checking if you want experimental safe-sprintf code" >&5
15740 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15741
15742 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15743 if test "${enable_safe_sprintf+set}" = set; then
15744   enableval="$enable_safe_sprintf"
15745   with_safe_sprintf=$enableval
15746 else
15747   with_safe_sprintf=no
15748 fi;
15749 echo "$as_me:15749: result: $with_safe_sprintf" >&5
15750 echo "${ECHO_T}$with_safe_sprintf" >&6
15751
15752 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15753 # when hashmap is used scroll hints are useless
15754 if test "$with_hashmap" = no ; then
15755 echo "$as_me:15755: checking if you want to experiment without scrolling-hints code" >&5
15756 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15757
15758 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15759 if test "${enable_scroll_hints+set}" = set; then
15760   enableval="$enable_scroll_hints"
15761   with_scroll_hints=$enableval
15762 else
15763   with_scroll_hints=yes
15764 fi;
15765 echo "$as_me:15765: result: $with_scroll_hints" >&5
15766 echo "${ECHO_T}$with_scroll_hints" >&6
15767 test "x$with_scroll_hints" = xyes &&
15768 cat >>confdefs.h <<\EOF
15769 #define USE_SCROLL_HINTS 1
15770 EOF
15771
15772 fi
15773
15774 echo "$as_me:15774: checking if you want wgetch-events code" >&5
15775 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15776
15777 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15778 if test "${enable_wgetch_events+set}" = set; then
15779   enableval="$enable_wgetch_events"
15780   with_wgetch_events=$enableval
15781 else
15782   with_wgetch_events=no
15783 fi;
15784 echo "$as_me:15784: result: $with_wgetch_events" >&5
15785 echo "${ECHO_T}$with_wgetch_events" >&6
15786 test "x$with_wgetch_events" = xyes &&
15787 cat >>confdefs.h <<\EOF
15788 #define NCURSES_WGETCH_EVENTS 1
15789 EOF
15790
15791 ###############################################################################
15792
15793 ###     use option --disable-echo to suppress full display compiling commands
15794
15795 echo "$as_me:15795: checking if you want to see long compiling messages" >&5
15796 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15797
15798 # Check whether --enable-echo or --disable-echo was given.
15799 if test "${enable_echo+set}" = set; then
15800   enableval="$enable_echo"
15801   test "$enableval" != no && enableval=yes
15802         if test "$enableval" != "yes" ; then
15803
15804         ECHO_LT='--silent'
15805         ECHO_LD='@echo linking $@;'
15806         RULE_CC='@echo compiling $<'
15807         SHOW_CC='@echo compiling $@'
15808         ECHO_CC='@'
15809
15810         else
15811
15812         ECHO_LT=''
15813         ECHO_LD=''
15814         RULE_CC=''
15815         SHOW_CC=''
15816         ECHO_CC=''
15817
15818         fi
15819 else
15820   enableval=yes
15821
15822         ECHO_LT=''
15823         ECHO_LD=''
15824         RULE_CC=''
15825         SHOW_CC=''
15826         ECHO_CC=''
15827
15828 fi;
15829 echo "$as_me:15829: result: $enableval" >&5
15830 echo "${ECHO_T}$enableval" >&6
15831
15832 if test "x$enable_echo" = xyes; then
15833         ECHO_LINK=
15834 else
15835         ECHO_LINK='@ echo linking $@ ... ;'
15836         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15837         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15838 fi
15839
15840 # --disable-stripping is used for debugging
15841
15842 echo "$as_me:15842: checking if you want to install stripped executables" >&5
15843 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15844
15845 # Check whether --enable-stripping or --disable-stripping was given.
15846 if test "${enable_stripping+set}" = set; then
15847   enableval="$enable_stripping"
15848   test "$enableval" != no && enableval=yes
15849         if test "$enableval" != "yes" ; then
15850     with_stripping=no
15851         else
15852                 with_stripping=yes
15853         fi
15854 else
15855   enableval=yes
15856         with_stripping=yes
15857
15858 fi;
15859 echo "$as_me:15859: result: $with_stripping" >&5
15860 echo "${ECHO_T}$with_stripping" >&6
15861
15862 if test "$with_stripping" = yes
15863 then
15864         INSTALL_OPT_S="-s"
15865 else
15866         INSTALL_OPT_S=
15867 fi
15868
15869 : ${INSTALL:=install}
15870 echo "$as_me:15870: checking if install accepts -p option" >&5
15871 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15872 if test "${cf_cv_install_p+set}" = set; then
15873   echo $ECHO_N "(cached) $ECHO_C" >&6
15874 else
15875
15876         rm -rf conftest*
15877         date >conftest.in
15878         mkdir conftest.out
15879         sleep 3
15880         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15881         then
15882                 if test -f conftest.out/conftest.in
15883                 then
15884                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15885                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15886                         if test -s conftest.err
15887                         then
15888                                 cf_cv_install_p=no
15889                         else
15890                                 cf_cv_install_p=yes
15891                         fi
15892                 else
15893                         cf_cv_install_p=no
15894                 fi
15895         else
15896                 cf_cv_install_p=no
15897         fi
15898         rm -rf conftest*
15899
15900 fi
15901 echo "$as_me:15901: result: $cf_cv_install_p" >&5
15902 echo "${ECHO_T}$cf_cv_install_p" >&6
15903
15904 echo "$as_me:15904: checking if install needs to be told about ownership" >&5
15905 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15906 case `$ac_config_guess` in
15907 (*minix)
15908         with_install_o=yes
15909         ;;
15910 (*)
15911         with_install_o=no
15912         ;;
15913 esac
15914
15915 echo "$as_me:15915: result: $with_install_o" >&5
15916 echo "${ECHO_T}$with_install_o" >&6
15917 if test "x$with_install_o" = xyes
15918 then
15919         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'`
15920 else
15921         INSTALL_OPT_O=
15922 fi
15923
15924 # If we're avoiding relinking of shared libraries during install, that is to
15925 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15926 # the install program has "-p" (for preserving timestamps).
15927 cf_cv_do_reranlib=yes
15928 if test "x$cf_cv_install_p" = xyes
15929 then
15930         if test "x$cf_cv_do_relink" != xyes
15931         then
15932                 cf_cv_do_reranlib=no
15933                 INSTALL_OPT_P="-p"
15934                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15935         fi
15936 fi
15937
15938 ###     use option --enable-warnings to turn on all gcc warnings
15939 echo "$as_me:15939: checking if you want to see compiler warnings" >&5
15940 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15941
15942 # Check whether --enable-warnings or --disable-warnings was given.
15943 if test "${enable_warnings+set}" = set; then
15944   enableval="$enable_warnings"
15945   with_warnings=$enableval
15946 fi;
15947 echo "$as_me:15947: result: $with_warnings" >&5
15948 echo "${ECHO_T}$with_warnings" >&6
15949
15950 if test "x$with_warnings" = "xyes"; then
15951
15952         ADAFLAGS="$ADAFLAGS -gnatg"
15953
15954 if test "x$have_x" = xyes; then
15955
15956 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15957 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15958 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15959 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15960 for cf_X_CFLAGS in $X_CFLAGS
15961 do
15962         case "x$cf_X_CFLAGS" in
15963         x-[IUD]*)
15964                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15965                 ;;
15966         *)
15967                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15968                 ;;
15969         esac
15970 done
15971
15972 cat >conftest.$ac_ext <<_ACEOF
15973 #line 15973 "configure"
15974 #include "confdefs.h"
15975
15976 #include <stdlib.h>
15977 #include <X11/Intrinsic.h>
15978
15979 int
15980 main (void)
15981 {
15982 String foo = malloc(1); (void)foo
15983   ;
15984   return 0;
15985 }
15986 _ACEOF
15987 rm -f conftest.$ac_objext
15988 if { (eval echo "$as_me:15988: \"$ac_compile\"") >&5
15989   (eval $ac_compile) 2>&5
15990   ac_status=$?
15991   echo "$as_me:15991: \$? = $ac_status" >&5
15992   (exit $ac_status); } &&
15993          { ac_try='test -s conftest.$ac_objext'
15994   { (eval echo "$as_me:15994: \"$ac_try\"") >&5
15995   (eval $ac_try) 2>&5
15996   ac_status=$?
15997   echo "$as_me:15997: \$? = $ac_status" >&5
15998   (exit $ac_status); }; }; then
15999
16000 echo "$as_me:16000: checking for X11/Xt const-feature" >&5
16001 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16002 if test "${cf_cv_const_x_string+set}" = set; then
16003   echo $ECHO_N "(cached) $ECHO_C" >&6
16004 else
16005
16006         cat >conftest.$ac_ext <<_ACEOF
16007 #line 16007 "configure"
16008 #include "confdefs.h"
16009
16010 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16011 #undef  XTSTRINGDEFINES /* X11R5 and later */
16012 #include <stdlib.h>
16013 #include <X11/Intrinsic.h>
16014
16015 int
16016 main (void)
16017 {
16018 String foo = malloc(1); *foo = 0
16019   ;
16020   return 0;
16021 }
16022 _ACEOF
16023 rm -f conftest.$ac_objext
16024 if { (eval echo "$as_me:16024: \"$ac_compile\"") >&5
16025   (eval $ac_compile) 2>&5
16026   ac_status=$?
16027   echo "$as_me:16027: \$? = $ac_status" >&5
16028   (exit $ac_status); } &&
16029          { ac_try='test -s conftest.$ac_objext'
16030   { (eval echo "$as_me:16030: \"$ac_try\"") >&5
16031   (eval $ac_try) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit $ac_status); }; }; then
16035
16036                         cf_cv_const_x_string=no
16037
16038 else
16039   echo "$as_me: failed program was:" >&5
16040 cat conftest.$ac_ext >&5
16041
16042                         cf_cv_const_x_string=yes
16043
16044 fi
16045 rm -f conftest.$ac_objext conftest.$ac_ext
16046
16047 fi
16048 echo "$as_me:16048: result: $cf_cv_const_x_string" >&5
16049 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16050
16051 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16052 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16053 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16054
16055 case $cf_cv_const_x_string in
16056 (no)
16057
16058         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16059         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16060
16061         ;;
16062 (*)
16063
16064         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16065         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16066
16067         ;;
16068 esac
16069
16070 else
16071   echo "$as_me: failed program was:" >&5
16072 cat conftest.$ac_ext >&5
16073 fi
16074 rm -f conftest.$ac_objext conftest.$ac_ext
16075  fi
16076 cat > conftest.$ac_ext <<EOF
16077 #line 16077 "${as_me:-configure}"
16078 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16079 EOF
16080 if test "$INTEL_COMPILER" = yes
16081 then
16082 # The "-wdXXX" options suppress warnings:
16083 # remark #1419: external declaration in primary source file
16084 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16085 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16086 # remark #193: zero used for undefined preprocessing identifier
16087 # remark #593: variable "curs_sb_left_arrow" was set but never used
16088 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16089 # remark #869: parameter "tw" was never referenced
16090 # remark #981: operands are evaluated in unspecified order
16091 # warning #279: controlling expression is constant
16092
16093         { echo "$as_me:16093: checking for $CC warning options..." >&5
16094 echo "$as_me: checking for $CC warning options..." >&6;}
16095         cf_save_CFLAGS="$CFLAGS"
16096         EXTRA_CFLAGS="-Wall"
16097         for cf_opt in \
16098                 wd1419 \
16099                 wd1683 \
16100                 wd1684 \
16101                 wd193 \
16102                 wd593 \
16103                 wd279 \
16104                 wd810 \
16105                 wd869 \
16106                 wd981
16107         do
16108                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16109                 if { (eval echo "$as_me:16109: \"$ac_compile\"") >&5
16110   (eval $ac_compile) 2>&5
16111   ac_status=$?
16112   echo "$as_me:16112: \$? = $ac_status" >&5
16113   (exit $ac_status); }; then
16114                         test -n "$verbose" && echo "$as_me:16114: result: ... -$cf_opt" >&5
16115 echo "${ECHO_T}... -$cf_opt" >&6
16116                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16117                 fi
16118         done
16119         CFLAGS="$cf_save_CFLAGS"
16120 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16121 then
16122         { echo "$as_me:16122: checking for $CC warning options..." >&5
16123 echo "$as_me: checking for $CC warning options..." >&6;}
16124         cf_save_CFLAGS="$CFLAGS"
16125         EXTRA_CFLAGS=
16126         cf_warn_CONST=""
16127         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16128         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16129         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16130         for cf_opt in W Wall \
16131                 Wbad-function-cast \
16132                 Wcast-align \
16133                 Wcast-qual \
16134                 Wdeclaration-after-statement \
16135                 Wextra \
16136                 Winline \
16137                 Wmissing-declarations \
16138                 Wmissing-prototypes \
16139                 Wnested-externs \
16140                 Wpointer-arith \
16141                 Wshadow \
16142                 Wstrict-prototypes \
16143                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16144         do
16145                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16146                 if { (eval echo "$as_me:16146: \"$ac_compile\"") >&5
16147   (eval $ac_compile) 2>&5
16148   ac_status=$?
16149   echo "$as_me:16149: \$? = $ac_status" >&5
16150   (exit $ac_status); }; then
16151                         test -n "$verbose" && echo "$as_me:16151: result: ... -$cf_opt" >&5
16152 echo "${ECHO_T}... -$cf_opt" >&6
16153                         case $cf_opt in
16154                         (Winline)
16155                                 case $GCC_VERSION in
16156                                 ([34].*)
16157                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16158
16159 echo "${as_me:-configure}:16159: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16160
16161                                         continue;;
16162                                 esac
16163                                 ;;
16164                         (Wpointer-arith)
16165                                 case $GCC_VERSION in
16166                                 ([12].*)
16167                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16168
16169 echo "${as_me:-configure}:16169: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16170
16171                                         continue;;
16172                                 esac
16173                                 ;;
16174                         esac
16175                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16176                 fi
16177         done
16178         CFLAGS="$cf_save_CFLAGS"
16179 fi
16180 rm -rf conftest*
16181
16182         if test "x$cf_with_cxx" = xyes ; then
16183
16184 INTEL_CPLUSPLUS=no
16185
16186 if test "$GCC" = yes ; then
16187         case $host_os in
16188         (linux*|gnu*)
16189                 echo "$as_me:16189: checking if this is really Intel C++ compiler" >&5
16190 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16191                 cf_save_CFLAGS="$CXXFLAGS"
16192                 CXXFLAGS="$CXXFLAGS -no-gcc"
16193                 cat >conftest.$ac_ext <<_ACEOF
16194 #line 16194 "configure"
16195 #include "confdefs.h"
16196
16197 int
16198 main (void)
16199 {
16200
16201 #ifdef __INTEL_COMPILER
16202 #else
16203 make an error
16204 #endif
16205
16206   ;
16207   return 0;
16208 }
16209 _ACEOF
16210 rm -f conftest.$ac_objext
16211 if { (eval echo "$as_me:16211: \"$ac_compile\"") >&5
16212   (eval $ac_compile) 2>&5
16213   ac_status=$?
16214   echo "$as_me:16214: \$? = $ac_status" >&5
16215   (exit $ac_status); } &&
16216          { ac_try='test -s conftest.$ac_objext'
16217   { (eval echo "$as_me:16217: \"$ac_try\"") >&5
16218   (eval $ac_try) 2>&5
16219   ac_status=$?
16220   echo "$as_me:16220: \$? = $ac_status" >&5
16221   (exit $ac_status); }; }; then
16222   INTEL_CPLUSPLUS=yes
16223 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16224
16225 else
16226   echo "$as_me: failed program was:" >&5
16227 cat conftest.$ac_ext >&5
16228 fi
16229 rm -f conftest.$ac_objext conftest.$ac_ext
16230                 CXXFLAGS="$cf_save_CFLAGS"
16231                 echo "$as_me:16231: result: $INTEL_CPLUSPLUS" >&5
16232 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16233                 ;;
16234         esac
16235 fi
16236
16237 CLANG_CPLUSPLUS=no
16238
16239 if test "$GCC" = yes ; then
16240         echo "$as_me:16240: checking if this is really Clang C++ compiler" >&5
16241 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16242         cf_save_CFLAGS="$CXXFLAGS"
16243         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16244         cat >conftest.$ac_ext <<_ACEOF
16245 #line 16245 "configure"
16246 #include "confdefs.h"
16247
16248 int
16249 main (void)
16250 {
16251
16252 #ifdef __clang__
16253 #else
16254 make an error
16255 #endif
16256
16257   ;
16258   return 0;
16259 }
16260 _ACEOF
16261 rm -f conftest.$ac_objext
16262 if { (eval echo "$as_me:16262: \"$ac_compile\"") >&5
16263   (eval $ac_compile) 2>&5
16264   ac_status=$?
16265   echo "$as_me:16265: \$? = $ac_status" >&5
16266   (exit $ac_status); } &&
16267          { ac_try='test -s conftest.$ac_objext'
16268   { (eval echo "$as_me:16268: \"$ac_try\"") >&5
16269   (eval $ac_try) 2>&5
16270   ac_status=$?
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); }; }; then
16273   CLANG_CPLUSPLUS=yes
16274 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16275
16276 else
16277   echo "$as_me: failed program was:" >&5
16278 cat conftest.$ac_ext >&5
16279 fi
16280 rm -f conftest.$ac_objext conftest.$ac_ext
16281         CXXFLAGS="$cf_save_CFLAGS"
16282         echo "$as_me:16282: result: $CLANG_CPLUSPLUS" >&5
16283 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16284 fi
16285
16286 ac_ext=cc
16287 ac_cpp='$CXXCPP $CPPFLAGS'
16288 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16289 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16290 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16291 ac_main_return=return
16292
16293 cat > conftest.$ac_ext <<EOF
16294 #line 16294 "configure"
16295 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16296 EOF
16297
16298 if test "$INTEL_CPLUSPLUS" = yes
16299 then
16300 # The "-wdXXX" options suppress warnings:
16301 # remark #1419: external declaration in primary source file
16302 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16303 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16304 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16305 # remark #193: zero used for undefined preprocessing identifier
16306 # remark #593: variable "curs_sb_left_arrow" was set but never used
16307 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16308 # remark #869: parameter "tw" was never referenced
16309 # remark #981: operands are evaluated in unspecified order
16310 # warning #269: invalid format string conversion
16311
16312         { echo "$as_me:16312: checking for $CC warning options..." >&5
16313 echo "$as_me: checking for $CC warning options..." >&6;}
16314         cf_save_CXXFLAGS="$CXXFLAGS"
16315         EXTRA_CXXFLAGS="-Wall"
16316         for cf_opt in \
16317                 wd1419 \
16318                 wd1682 \
16319                 wd1683 \
16320                 wd1684 \
16321                 wd193 \
16322                 wd279 \
16323                 wd593 \
16324                 wd810 \
16325                 wd869 \
16326                 wd981
16327         do
16328                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16329                 if { (eval echo "$as_me:16329: \"$ac_compile\"") >&5
16330   (eval $ac_compile) 2>&5
16331   ac_status=$?
16332   echo "$as_me:16332: \$? = $ac_status" >&5
16333   (exit $ac_status); }; then
16334                         test -n "$verbose" && echo "$as_me:16334: result: ... -$cf_opt" >&5
16335 echo "${ECHO_T}... -$cf_opt" >&6
16336                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16337                 fi
16338         done
16339         CXXFLAGS="$cf_save_CXXFLAGS"
16340
16341 elif test "$GXX" = yes
16342 then
16343         { echo "$as_me:16343: checking for $CXX warning options..." >&5
16344 echo "$as_me: checking for $CXX warning options..." >&6;}
16345         cf_save_CXXFLAGS="$CXXFLAGS"
16346         EXTRA_CXXFLAGS="-W -Wall"
16347         cf_gxx_extra_warnings=""
16348         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16349         case "$GCC_VERSION" in
16350         ([1-2].*)
16351                 ;;
16352         (*)
16353                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16354                 ;;
16355         esac
16356         for cf_opt in \
16357                 Wabi \
16358                 fabi-version=0 \
16359                 Wextra \
16360                 Wignored-qualifiers \
16361                 Wlogical-op \
16362                 Woverloaded-virtual \
16363                 Wsign-promo \
16364                 Wsynth \
16365                 Wold-style-cast \
16366                 Wcast-align \
16367                 Wcast-qual \
16368                 Wpointer-arith \
16369                 Wshadow \
16370                 Wundef $cf_gxx_extra_warnings Wno-unused
16371         do
16372                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16373                 if { (eval echo "$as_me:16373: \"$ac_compile\"") >&5
16374   (eval $ac_compile) 2>&5
16375   ac_status=$?
16376   echo "$as_me:16376: \$? = $ac_status" >&5
16377   (exit $ac_status); }; then
16378                         test -n "$verbose" && echo "$as_me:16378: result: ... -$cf_opt" >&5
16379 echo "${ECHO_T}... -$cf_opt" >&6
16380                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16381                 else
16382                         test -n "$verbose" && echo "$as_me:16382: result: ... no -$cf_opt" >&5
16383 echo "${ECHO_T}... no -$cf_opt" >&6
16384                 fi
16385         done
16386         CXXFLAGS="$cf_save_CXXFLAGS"
16387 fi
16388
16389 rm -rf conftest*
16390 ac_ext=c
16391 ac_cpp='$CPP $CPPFLAGS'
16392 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16393 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16394 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16395 ac_main_return=return
16396
16397         fi
16398 fi
16399
16400 if test "$GCC" = yes
16401 then
16402 cat > conftest.i <<EOF
16403 #ifndef GCC_PRINTF
16404 #define GCC_PRINTF 0
16405 #endif
16406 #ifndef GCC_SCANF
16407 #define GCC_SCANF 0
16408 #endif
16409 #ifndef GCC_NORETURN
16410 #define GCC_NORETURN /* nothing */
16411 #endif
16412 #ifndef GCC_UNUSED
16413 #define GCC_UNUSED /* nothing */
16414 #endif
16415 EOF
16416 if test "$GCC" = yes
16417 then
16418         { echo "$as_me:16418: checking for $CC __attribute__ directives..." >&5
16419 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16420 cat > conftest.$ac_ext <<EOF
16421 #line 16421 "${as_me:-configure}"
16422 #include "confdefs.h"
16423 #include "conftest.h"
16424 #include "conftest.i"
16425 #if     GCC_PRINTF
16426 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16427 #else
16428 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16429 #endif
16430 #if     GCC_SCANF
16431 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16432 #else
16433 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16434 #endif
16435 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16436 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16437 extern void foo(void) GCC_NORETURN;
16438 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16439 EOF
16440         cf_printf_attribute=no
16441         cf_scanf_attribute=no
16442         for cf_attribute in scanf printf unused noreturn
16443         do
16444
16445 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16446
16447                 cf_directive="__attribute__(($cf_attribute))"
16448                 echo "checking for $CC $cf_directive" 1>&5
16449
16450                 case $cf_attribute in
16451                 (printf)
16452                         cf_printf_attribute=yes
16453                         cat >conftest.h <<EOF
16454 #define GCC_$cf_ATTRIBUTE 1
16455 EOF
16456                         ;;
16457                 (scanf)
16458                         cf_scanf_attribute=yes
16459                         cat >conftest.h <<EOF
16460 #define GCC_$cf_ATTRIBUTE 1
16461 EOF
16462                         ;;
16463                 (*)
16464                         cat >conftest.h <<EOF
16465 #define GCC_$cf_ATTRIBUTE $cf_directive
16466 EOF
16467                         ;;
16468                 esac
16469
16470                 if { (eval echo "$as_me:16470: \"$ac_compile\"") >&5
16471   (eval $ac_compile) 2>&5
16472   ac_status=$?
16473   echo "$as_me:16473: \$? = $ac_status" >&5
16474   (exit $ac_status); }; then
16475                         test -n "$verbose" && echo "$as_me:16475: result: ... $cf_attribute" >&5
16476 echo "${ECHO_T}... $cf_attribute" >&6
16477                         cat conftest.h >>confdefs.h
16478                         case $cf_attribute in
16479                         (noreturn)
16480
16481 cat >>confdefs.h <<EOF
16482 #define GCC_NORETURN $cf_directive
16483 EOF
16484
16485                                 ;;
16486                         (printf)
16487                                 cf_value='/* nothing */'
16488                                 if test "$cf_printf_attribute" != no ; then
16489                                         cf_value='__attribute__((format(printf,fmt,var)))'
16490
16491 cat >>confdefs.h <<\EOF
16492 #define GCC_PRINTF 1
16493 EOF
16494
16495                                 fi
16496
16497 cat >>confdefs.h <<EOF
16498 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16499 EOF
16500
16501                                 ;;
16502                         (scanf)
16503                                 cf_value='/* nothing */'
16504                                 if test "$cf_scanf_attribute" != no ; then
16505                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16506
16507 cat >>confdefs.h <<\EOF
16508 #define GCC_SCANF 1
16509 EOF
16510
16511                                 fi
16512
16513 cat >>confdefs.h <<EOF
16514 #define GCC_SCANFLIKE(fmt,var) $cf_value
16515 EOF
16516
16517                                 ;;
16518                         (unused)
16519
16520 cat >>confdefs.h <<EOF
16521 #define GCC_UNUSED $cf_directive
16522 EOF
16523
16524                                 ;;
16525                         esac
16526                 fi
16527         done
16528 else
16529         fgrep define conftest.i >>confdefs.h
16530 fi
16531 rm -rf conftest*
16532 fi
16533
16534 echo "$as_me:16534: checking if you want to work around bogus compiler/loader warnings" >&5
16535 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16536
16537 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16538 if test "${enable_string_hacks+set}" = set; then
16539   enableval="$enable_string_hacks"
16540   with_string_hacks=$enableval
16541 else
16542   with_string_hacks=no
16543 fi;
16544 echo "$as_me:16544: result: $with_string_hacks" >&5
16545 echo "${ECHO_T}$with_string_hacks" >&6
16546
16547 if test "x$with_string_hacks" = "xyes"; then
16548
16549 cat >>confdefs.h <<\EOF
16550 #define USE_STRING_HACKS 1
16551 EOF
16552
16553         { echo "$as_me:16553: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16554 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16555         echo "$as_me:16555: checking for strlcat" >&5
16556 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16557 if test "${ac_cv_func_strlcat+set}" = set; then
16558   echo $ECHO_N "(cached) $ECHO_C" >&6
16559 else
16560   cat >conftest.$ac_ext <<_ACEOF
16561 #line 16561 "configure"
16562 #include "confdefs.h"
16563 #define strlcat autoconf_temporary
16564 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16565 #undef strlcat
16566
16567 #ifdef __cplusplus
16568 extern "C"
16569 #endif
16570
16571 /* We use char because int might match the return type of a gcc2
16572    builtin and then its argument prototype would still apply.  */
16573 char strlcat (void);
16574
16575 int
16576 main (void)
16577 {
16578
16579 /* The GNU C library defines stubs for functions which it implements
16580     to always fail with ENOSYS.  Some functions are actually named
16581     something starting with __ and the normal name is an alias.  */
16582 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16583 #error found stub for strlcat
16584 #endif
16585
16586         return strlcat ();
16587   ;
16588   return 0;
16589 }
16590 _ACEOF
16591 rm -f conftest.$ac_objext conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593   (eval $ac_link) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); } &&
16597          { ac_try='test -s conftest$ac_exeext'
16598   { (eval echo "$as_me:16598: \"$ac_try\"") >&5
16599   (eval $ac_try) 2>&5
16600   ac_status=$?
16601   echo "$as_me:16601: \$? = $ac_status" >&5
16602   (exit $ac_status); }; }; then
16603   ac_cv_func_strlcat=yes
16604 else
16605   echo "$as_me: failed program was:" >&5
16606 cat conftest.$ac_ext >&5
16607 ac_cv_func_strlcat=no
16608 fi
16609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16610 fi
16611 echo "$as_me:16611: result: $ac_cv_func_strlcat" >&5
16612 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16613 if test $ac_cv_func_strlcat = yes; then
16614
16615 cat >>confdefs.h <<\EOF
16616 #define HAVE_STRLCAT 1
16617 EOF
16618
16619 else
16620
16621                 echo "$as_me:16621: checking for strlcat in -lbsd" >&5
16622 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16623 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16624   echo $ECHO_N "(cached) $ECHO_C" >&6
16625 else
16626   ac_check_lib_save_LIBS=$LIBS
16627 LIBS="-lbsd  $LIBS"
16628 cat >conftest.$ac_ext <<_ACEOF
16629 #line 16629 "configure"
16630 #include "confdefs.h"
16631
16632 /* Override any gcc2 internal prototype to avoid an error.  */
16633 #ifdef __cplusplus
16634 extern "C"
16635 #endif
16636 /* We use char because int might match the return type of a gcc2
16637    builtin and then its argument prototype would still apply.  */
16638 char strlcat ();
16639 int
16640 main (void)
16641 {
16642 strlcat ();
16643   ;
16644   return 0;
16645 }
16646 _ACEOF
16647 rm -f conftest.$ac_objext conftest$ac_exeext
16648 if { (eval echo "$as_me:16648: \"$ac_link\"") >&5
16649   (eval $ac_link) 2>&5
16650   ac_status=$?
16651   echo "$as_me:16651: \$? = $ac_status" >&5
16652   (exit $ac_status); } &&
16653          { ac_try='test -s conftest$ac_exeext'
16654   { (eval echo "$as_me:16654: \"$ac_try\"") >&5
16655   (eval $ac_try) 2>&5
16656   ac_status=$?
16657   echo "$as_me:16657: \$? = $ac_status" >&5
16658   (exit $ac_status); }; }; then
16659   ac_cv_lib_bsd_strlcat=yes
16660 else
16661   echo "$as_me: failed program was:" >&5
16662 cat conftest.$ac_ext >&5
16663 ac_cv_lib_bsd_strlcat=no
16664 fi
16665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16666 LIBS=$ac_check_lib_save_LIBS
16667 fi
16668 echo "$as_me:16668: result: $ac_cv_lib_bsd_strlcat" >&5
16669 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16670 if test $ac_cv_lib_bsd_strlcat = yes; then
16671
16672 cf_add_libs="$LIBS"
16673 # reverse order
16674 cf_add_0lib=
16675 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16676 # filter duplicates
16677 for cf_add_1lib in $cf_add_0lib; do
16678         for cf_add_2lib in $cf_add_libs; do
16679                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16680                         cf_add_1lib=
16681                         break
16682                 fi
16683         done
16684         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16685 done
16686 LIBS="$cf_add_libs"
16687
16688 for ac_header in bsd/string.h
16689 do
16690 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16691 echo "$as_me:16691: checking for $ac_header" >&5
16692 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16693 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16694   echo $ECHO_N "(cached) $ECHO_C" >&6
16695 else
16696   cat >conftest.$ac_ext <<_ACEOF
16697 #line 16697 "configure"
16698 #include "confdefs.h"
16699 #include <$ac_header>
16700 _ACEOF
16701 if { (eval echo "$as_me:16701: \"$ac_cpp conftest.$ac_ext\"") >&5
16702   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16703   ac_status=$?
16704   egrep -v '^ *\+' conftest.er1 >conftest.err
16705   rm -f conftest.er1
16706   cat conftest.err >&5
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); } >/dev/null; then
16709   if test -s conftest.err; then
16710     ac_cpp_err=$ac_c_preproc_warn_flag
16711   else
16712     ac_cpp_err=
16713   fi
16714 else
16715   ac_cpp_err=yes
16716 fi
16717 if test -z "$ac_cpp_err"; then
16718   eval "$as_ac_Header=yes"
16719 else
16720   echo "$as_me: failed program was:" >&5
16721   cat conftest.$ac_ext >&5
16722   eval "$as_ac_Header=no"
16723 fi
16724 rm -f conftest.err conftest.$ac_ext
16725 fi
16726 echo "$as_me:16726: result: `eval echo '${'$as_ac_Header'}'`" >&5
16727 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16728 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16729   cat >>confdefs.h <<EOF
16730 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16731 EOF
16732
16733 fi
16734 done
16735
16736 cat >>confdefs.h <<\EOF
16737 #define HAVE_STRLCAT 1
16738 EOF
16739
16740 fi
16741
16742 fi
16743
16744 for ac_func in strlcpy snprintf
16745 do
16746 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16747 echo "$as_me:16747: checking for $ac_func" >&5
16748 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16749 if eval "test \"\${$as_ac_var+set}\" = set"; then
16750   echo $ECHO_N "(cached) $ECHO_C" >&6
16751 else
16752   cat >conftest.$ac_ext <<_ACEOF
16753 #line 16753 "configure"
16754 #include "confdefs.h"
16755 #define $ac_func autoconf_temporary
16756 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16757 #undef $ac_func
16758
16759 #ifdef __cplusplus
16760 extern "C"
16761 #endif
16762
16763 /* We use char because int might match the return type of a gcc2
16764    builtin and then its argument prototype would still apply.  */
16765 char $ac_func (void);
16766
16767 int
16768 main (void)
16769 {
16770
16771 /* The GNU C library defines stubs for functions which it implements
16772     to always fail with ENOSYS.  Some functions are actually named
16773     something starting with __ and the normal name is an alias.  */
16774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16775 #error found stub for $ac_func
16776 #endif
16777
16778         return $ac_func ();
16779   ;
16780   return 0;
16781 }
16782 _ACEOF
16783 rm -f conftest.$ac_objext conftest$ac_exeext
16784 if { (eval echo "$as_me:16784: \"$ac_link\"") >&5
16785   (eval $ac_link) 2>&5
16786   ac_status=$?
16787   echo "$as_me:16787: \$? = $ac_status" >&5
16788   (exit $ac_status); } &&
16789          { ac_try='test -s conftest$ac_exeext'
16790   { (eval echo "$as_me:16790: \"$ac_try\"") >&5
16791   (eval $ac_try) 2>&5
16792   ac_status=$?
16793   echo "$as_me:16793: \$? = $ac_status" >&5
16794   (exit $ac_status); }; }; then
16795   eval "$as_ac_var=yes"
16796 else
16797   echo "$as_me: failed program was:" >&5
16798 cat conftest.$ac_ext >&5
16799 eval "$as_ac_var=no"
16800 fi
16801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16802 fi
16803 echo "$as_me:16803: result: `eval echo '${'$as_ac_var'}'`" >&5
16804 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16805 if test `eval echo '${'$as_ac_var'}'` = yes; then
16806   cat >>confdefs.h <<EOF
16807 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16808 EOF
16809
16810 fi
16811 done
16812
16813 fi
16814
16815 ###     use option --enable-assertions to turn on generation of assertion code
16816 echo "$as_me:16816: checking if you want to enable runtime assertions" >&5
16817 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16818
16819 # Check whether --enable-assertions or --disable-assertions was given.
16820 if test "${enable_assertions+set}" = set; then
16821   enableval="$enable_assertions"
16822   with_assertions=$enableval
16823 else
16824   with_assertions=no
16825 fi;
16826 echo "$as_me:16826: result: $with_assertions" >&5
16827 echo "${ECHO_T}$with_assertions" >&6
16828 if test -n "$GCC"
16829 then
16830         if test "$with_assertions" = no
16831         then
16832                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16833         else
16834
16835         ADAFLAGS="$ADAFLAGS -gnata"
16836
16837         fi
16838 fi
16839
16840 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16841
16842 echo "$as_me:16842: checking if you want to use dmalloc for testing" >&5
16843 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16844
16845 # Check whether --with-dmalloc or --without-dmalloc was given.
16846 if test "${with_dmalloc+set}" = set; then
16847   withval="$with_dmalloc"
16848
16849 cat >>confdefs.h <<EOF
16850 #define USE_DMALLOC 1
16851 EOF
16852
16853         : ${with_cflags:=-g}
16854         : ${with_no_leaks:=yes}
16855          with_dmalloc=yes
16856 else
16857   with_dmalloc=
16858 fi;
16859 echo "$as_me:16859: result: ${with_dmalloc:-no}" >&5
16860 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16861
16862 case .$with_cflags in
16863 (.*-g*)
16864         case .$CFLAGS in
16865         (.*-g*)
16866                 ;;
16867         (*)
16868
16869 cf_fix_cppflags=no
16870 cf_new_cflags=
16871 cf_new_cppflags=
16872 cf_new_extra_cppflags=
16873
16874 for cf_add_cflags in -g
16875 do
16876 case $cf_fix_cppflags in
16877 (no)
16878         case $cf_add_cflags in
16879         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16880                 case $cf_add_cflags in
16881                 (-D*)
16882                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16883
16884                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16885                                 && test -z "${cf_tst_cflags}" \
16886                                 && cf_fix_cppflags=yes
16887
16888                         if test $cf_fix_cppflags = yes ; then
16889
16890         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16891         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16892
16893                                 continue
16894                         elif test "${cf_tst_cflags}" = "\"'" ; then
16895
16896         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16897         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16898
16899                                 continue
16900                         fi
16901                         ;;
16902                 esac
16903                 case "$CPPFLAGS" in
16904                 (*$cf_add_cflags)
16905                         ;;
16906                 (*)
16907                         case $cf_add_cflags in
16908                         (-D*)
16909                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16910
16911 CPPFLAGS=`echo "$CPPFLAGS" | \
16912         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16913                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16914
16915                                 ;;
16916                         esac
16917
16918         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16919         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16920
16921                         ;;
16922                 esac
16923                 ;;
16924         (*)
16925
16926         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16927         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16928
16929                 ;;
16930         esac
16931         ;;
16932 (yes)
16933
16934         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16935         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16936
16937         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16938
16939         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16940                 && test -z "${cf_tst_cflags}" \
16941                 && cf_fix_cppflags=no
16942         ;;
16943 esac
16944 done
16945
16946 if test -n "$cf_new_cflags" ; then
16947
16948         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16949         CFLAGS="${CFLAGS}$cf_new_cflags"
16950
16951 fi
16952
16953 if test -n "$cf_new_cppflags" ; then
16954
16955         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16956         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16957
16958 fi
16959
16960 if test -n "$cf_new_extra_cppflags" ; then
16961
16962         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16963         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16964
16965 fi
16966
16967                 ;;
16968         esac
16969         ;;
16970 esac
16971
16972 if test "$with_dmalloc" = yes ; then
16973         echo "$as_me:16973: checking for dmalloc.h" >&5
16974 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16975 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16976   echo $ECHO_N "(cached) $ECHO_C" >&6
16977 else
16978   cat >conftest.$ac_ext <<_ACEOF
16979 #line 16979 "configure"
16980 #include "confdefs.h"
16981 #include <dmalloc.h>
16982 _ACEOF
16983 if { (eval echo "$as_me:16983: \"$ac_cpp conftest.$ac_ext\"") >&5
16984   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16985   ac_status=$?
16986   egrep -v '^ *\+' conftest.er1 >conftest.err
16987   rm -f conftest.er1
16988   cat conftest.err >&5
16989   echo "$as_me:16989: \$? = $ac_status" >&5
16990   (exit $ac_status); } >/dev/null; then
16991   if test -s conftest.err; then
16992     ac_cpp_err=$ac_c_preproc_warn_flag
16993   else
16994     ac_cpp_err=
16995   fi
16996 else
16997   ac_cpp_err=yes
16998 fi
16999 if test -z "$ac_cpp_err"; then
17000   ac_cv_header_dmalloc_h=yes
17001 else
17002   echo "$as_me: failed program was:" >&5
17003   cat conftest.$ac_ext >&5
17004   ac_cv_header_dmalloc_h=no
17005 fi
17006 rm -f conftest.err conftest.$ac_ext
17007 fi
17008 echo "$as_me:17008: result: $ac_cv_header_dmalloc_h" >&5
17009 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17010 if test $ac_cv_header_dmalloc_h = yes; then
17011
17012 echo "$as_me:17012: checking for dmalloc_debug in -ldmalloc" >&5
17013 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17014 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17015   echo $ECHO_N "(cached) $ECHO_C" >&6
17016 else
17017   ac_check_lib_save_LIBS=$LIBS
17018 LIBS="-ldmalloc  $LIBS"
17019 cat >conftest.$ac_ext <<_ACEOF
17020 #line 17020 "configure"
17021 #include "confdefs.h"
17022
17023 /* Override any gcc2 internal prototype to avoid an error.  */
17024 #ifdef __cplusplus
17025 extern "C"
17026 #endif
17027 /* We use char because int might match the return type of a gcc2
17028    builtin and then its argument prototype would still apply.  */
17029 char dmalloc_debug ();
17030 int
17031 main (void)
17032 {
17033 dmalloc_debug ();
17034   ;
17035   return 0;
17036 }
17037 _ACEOF
17038 rm -f conftest.$ac_objext conftest$ac_exeext
17039 if { (eval echo "$as_me:17039: \"$ac_link\"") >&5
17040   (eval $ac_link) 2>&5
17041   ac_status=$?
17042   echo "$as_me:17042: \$? = $ac_status" >&5
17043   (exit $ac_status); } &&
17044          { ac_try='test -s conftest$ac_exeext'
17045   { (eval echo "$as_me:17045: \"$ac_try\"") >&5
17046   (eval $ac_try) 2>&5
17047   ac_status=$?
17048   echo "$as_me:17048: \$? = $ac_status" >&5
17049   (exit $ac_status); }; }; then
17050   ac_cv_lib_dmalloc_dmalloc_debug=yes
17051 else
17052   echo "$as_me: failed program was:" >&5
17053 cat conftest.$ac_ext >&5
17054 ac_cv_lib_dmalloc_dmalloc_debug=no
17055 fi
17056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17057 LIBS=$ac_check_lib_save_LIBS
17058 fi
17059 echo "$as_me:17059: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17060 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17061 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17062   cat >>confdefs.h <<EOF
17063 #define HAVE_LIBDMALLOC 1
17064 EOF
17065
17066   LIBS="-ldmalloc $LIBS"
17067
17068 fi
17069
17070 fi
17071
17072 fi
17073
17074 echo "$as_me:17074: checking if you want to use dbmalloc for testing" >&5
17075 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17076
17077 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17078 if test "${with_dbmalloc+set}" = set; then
17079   withval="$with_dbmalloc"
17080
17081 cat >>confdefs.h <<EOF
17082 #define USE_DBMALLOC 1
17083 EOF
17084
17085         : ${with_cflags:=-g}
17086         : ${with_no_leaks:=yes}
17087          with_dbmalloc=yes
17088 else
17089   with_dbmalloc=
17090 fi;
17091 echo "$as_me:17091: result: ${with_dbmalloc:-no}" >&5
17092 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17093
17094 case .$with_cflags in
17095 (.*-g*)
17096         case .$CFLAGS in
17097         (.*-g*)
17098                 ;;
17099         (*)
17100
17101 cf_fix_cppflags=no
17102 cf_new_cflags=
17103 cf_new_cppflags=
17104 cf_new_extra_cppflags=
17105
17106 for cf_add_cflags in -g
17107 do
17108 case $cf_fix_cppflags in
17109 (no)
17110         case $cf_add_cflags in
17111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17112                 case $cf_add_cflags in
17113                 (-D*)
17114                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17115
17116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17117                                 && test -z "${cf_tst_cflags}" \
17118                                 && cf_fix_cppflags=yes
17119
17120                         if test $cf_fix_cppflags = yes ; then
17121
17122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17124
17125                                 continue
17126                         elif test "${cf_tst_cflags}" = "\"'" ; then
17127
17128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17130
17131                                 continue
17132                         fi
17133                         ;;
17134                 esac
17135                 case "$CPPFLAGS" in
17136                 (*$cf_add_cflags)
17137                         ;;
17138                 (*)
17139                         case $cf_add_cflags in
17140                         (-D*)
17141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17142
17143 CPPFLAGS=`echo "$CPPFLAGS" | \
17144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17146
17147                                 ;;
17148                         esac
17149
17150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17152
17153                         ;;
17154                 esac
17155                 ;;
17156         (*)
17157
17158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17160
17161                 ;;
17162         esac
17163         ;;
17164 (yes)
17165
17166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17168
17169         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17170
17171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17172                 && test -z "${cf_tst_cflags}" \
17173                 && cf_fix_cppflags=no
17174         ;;
17175 esac
17176 done
17177
17178 if test -n "$cf_new_cflags" ; then
17179
17180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17181         CFLAGS="${CFLAGS}$cf_new_cflags"
17182
17183 fi
17184
17185 if test -n "$cf_new_cppflags" ; then
17186
17187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17189
17190 fi
17191
17192 if test -n "$cf_new_extra_cppflags" ; then
17193
17194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17196
17197 fi
17198
17199                 ;;
17200         esac
17201         ;;
17202 esac
17203
17204 if test "$with_dbmalloc" = yes ; then
17205         echo "$as_me:17205: checking for dbmalloc.h" >&5
17206 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17207 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17208   echo $ECHO_N "(cached) $ECHO_C" >&6
17209 else
17210   cat >conftest.$ac_ext <<_ACEOF
17211 #line 17211 "configure"
17212 #include "confdefs.h"
17213 #include <dbmalloc.h>
17214 _ACEOF
17215 if { (eval echo "$as_me:17215: \"$ac_cpp conftest.$ac_ext\"") >&5
17216   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17217   ac_status=$?
17218   egrep -v '^ *\+' conftest.er1 >conftest.err
17219   rm -f conftest.er1
17220   cat conftest.err >&5
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } >/dev/null; then
17223   if test -s conftest.err; then
17224     ac_cpp_err=$ac_c_preproc_warn_flag
17225   else
17226     ac_cpp_err=
17227   fi
17228 else
17229   ac_cpp_err=yes
17230 fi
17231 if test -z "$ac_cpp_err"; then
17232   ac_cv_header_dbmalloc_h=yes
17233 else
17234   echo "$as_me: failed program was:" >&5
17235   cat conftest.$ac_ext >&5
17236   ac_cv_header_dbmalloc_h=no
17237 fi
17238 rm -f conftest.err conftest.$ac_ext
17239 fi
17240 echo "$as_me:17240: result: $ac_cv_header_dbmalloc_h" >&5
17241 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17242 if test $ac_cv_header_dbmalloc_h = yes; then
17243
17244 echo "$as_me:17244: checking for debug_malloc in -ldbmalloc" >&5
17245 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17246 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17247   echo $ECHO_N "(cached) $ECHO_C" >&6
17248 else
17249   ac_check_lib_save_LIBS=$LIBS
17250 LIBS="-ldbmalloc  $LIBS"
17251 cat >conftest.$ac_ext <<_ACEOF
17252 #line 17252 "configure"
17253 #include "confdefs.h"
17254
17255 /* Override any gcc2 internal prototype to avoid an error.  */
17256 #ifdef __cplusplus
17257 extern "C"
17258 #endif
17259 /* We use char because int might match the return type of a gcc2
17260    builtin and then its argument prototype would still apply.  */
17261 char debug_malloc ();
17262 int
17263 main (void)
17264 {
17265 debug_malloc ();
17266   ;
17267   return 0;
17268 }
17269 _ACEOF
17270 rm -f conftest.$ac_objext conftest$ac_exeext
17271 if { (eval echo "$as_me:17271: \"$ac_link\"") >&5
17272   (eval $ac_link) 2>&5
17273   ac_status=$?
17274   echo "$as_me:17274: \$? = $ac_status" >&5
17275   (exit $ac_status); } &&
17276          { ac_try='test -s conftest$ac_exeext'
17277   { (eval echo "$as_me:17277: \"$ac_try\"") >&5
17278   (eval $ac_try) 2>&5
17279   ac_status=$?
17280   echo "$as_me:17280: \$? = $ac_status" >&5
17281   (exit $ac_status); }; }; then
17282   ac_cv_lib_dbmalloc_debug_malloc=yes
17283 else
17284   echo "$as_me: failed program was:" >&5
17285 cat conftest.$ac_ext >&5
17286 ac_cv_lib_dbmalloc_debug_malloc=no
17287 fi
17288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17289 LIBS=$ac_check_lib_save_LIBS
17290 fi
17291 echo "$as_me:17291: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17292 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17293 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17294   cat >>confdefs.h <<EOF
17295 #define HAVE_LIBDBMALLOC 1
17296 EOF
17297
17298   LIBS="-ldbmalloc $LIBS"
17299
17300 fi
17301
17302 fi
17303
17304 fi
17305
17306 echo "$as_me:17306: checking if you want to use valgrind for testing" >&5
17307 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17308
17309 # Check whether --with-valgrind or --without-valgrind was given.
17310 if test "${with_valgrind+set}" = set; then
17311   withval="$with_valgrind"
17312
17313 cat >>confdefs.h <<EOF
17314 #define USE_VALGRIND 1
17315 EOF
17316
17317         : ${with_cflags:=-g}
17318         : ${with_no_leaks:=yes}
17319          with_valgrind=yes
17320 else
17321   with_valgrind=
17322 fi;
17323 echo "$as_me:17323: result: ${with_valgrind:-no}" >&5
17324 echo "${ECHO_T}${with_valgrind:-no}" >&6
17325
17326 case .$with_cflags in
17327 (.*-g*)
17328         case .$CFLAGS in
17329         (.*-g*)
17330                 ;;
17331         (*)
17332
17333 cf_fix_cppflags=no
17334 cf_new_cflags=
17335 cf_new_cppflags=
17336 cf_new_extra_cppflags=
17337
17338 for cf_add_cflags in -g
17339 do
17340 case $cf_fix_cppflags in
17341 (no)
17342         case $cf_add_cflags in
17343         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17344                 case $cf_add_cflags in
17345                 (-D*)
17346                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17347
17348                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17349                                 && test -z "${cf_tst_cflags}" \
17350                                 && cf_fix_cppflags=yes
17351
17352                         if test $cf_fix_cppflags = yes ; then
17353
17354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17356
17357                                 continue
17358                         elif test "${cf_tst_cflags}" = "\"'" ; then
17359
17360         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17361         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17362
17363                                 continue
17364                         fi
17365                         ;;
17366                 esac
17367                 case "$CPPFLAGS" in
17368                 (*$cf_add_cflags)
17369                         ;;
17370                 (*)
17371                         case $cf_add_cflags in
17372                         (-D*)
17373                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17374
17375 CPPFLAGS=`echo "$CPPFLAGS" | \
17376         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17377                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17378
17379                                 ;;
17380                         esac
17381
17382         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17383         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17384
17385                         ;;
17386                 esac
17387                 ;;
17388         (*)
17389
17390         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17391         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17392
17393                 ;;
17394         esac
17395         ;;
17396 (yes)
17397
17398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17400
17401         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17402
17403         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17404                 && test -z "${cf_tst_cflags}" \
17405                 && cf_fix_cppflags=no
17406         ;;
17407 esac
17408 done
17409
17410 if test -n "$cf_new_cflags" ; then
17411
17412         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17413         CFLAGS="${CFLAGS}$cf_new_cflags"
17414
17415 fi
17416
17417 if test -n "$cf_new_cppflags" ; then
17418
17419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17420         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17421
17422 fi
17423
17424 if test -n "$cf_new_extra_cppflags" ; then
17425
17426         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17427         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17428
17429 fi
17430
17431                 ;;
17432         esac
17433         ;;
17434 esac
17435
17436 echo "$as_me:17436: checking if you want to perform memory-leak testing" >&5
17437 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17438
17439 # Check whether --enable-leaks or --disable-leaks was given.
17440 if test "${enable_leaks+set}" = set; then
17441   enableval="$enable_leaks"
17442   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17443 else
17444   : ${with_no_leaks:=no}
17445 fi;
17446 echo "$as_me:17446: result: $with_no_leaks" >&5
17447 echo "${ECHO_T}$with_no_leaks" >&6
17448
17449 if test "$with_no_leaks" = yes ; then
17450
17451 cat >>confdefs.h <<\EOF
17452 #define NO_LEAKS 1
17453 EOF
17454
17455 cat >>confdefs.h <<\EOF
17456 #define YY_NO_LEAKS 1
17457 EOF
17458
17459 fi
17460
17461 cat >>confdefs.h <<\EOF
17462 #define HAVE_NC_ALLOC_H 1
17463 EOF
17464
17465 ###     use option --enable-expanded to generate certain macros as functions
17466
17467 # Check whether --enable-expanded or --disable-expanded was given.
17468 if test "${enable_expanded+set}" = set; then
17469   enableval="$enable_expanded"
17470   test "x$enableval" = xyes &&
17471 cat >>confdefs.h <<\EOF
17472 #define NCURSES_EXPANDED 1
17473 EOF
17474
17475 fi;
17476
17477 ###     use option --disable-macros to suppress macros in favor of functions
17478
17479 # Check whether --enable-macros or --disable-macros was given.
17480 if test "${enable_macros+set}" = set; then
17481   enableval="$enable_macros"
17482   test "$enableval" = no &&
17483 cat >>confdefs.h <<\EOF
17484 #define NCURSES_NOMACROS 1
17485 EOF
17486
17487 fi;
17488
17489 # Normally we only add trace() to the debug-library.  Allow this to be
17490 # extended to all models of the ncurses library:
17491 cf_all_traces=no
17492 case "$CFLAGS $CPPFLAGS" in
17493 (*-DTRACE*)
17494         cf_all_traces=yes
17495         ;;
17496 esac
17497
17498 echo "$as_me:17498: checking whether to add trace feature to all models" >&5
17499 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17500
17501 # Check whether --with-trace or --without-trace was given.
17502 if test "${with_trace+set}" = set; then
17503   withval="$with_trace"
17504   cf_with_trace=$withval
17505 else
17506   cf_with_trace=$cf_all_traces
17507 fi;
17508 echo "$as_me:17508: result: $cf_with_trace" >&5
17509 echo "${ECHO_T}$cf_with_trace" >&6
17510
17511 if test "x$cf_with_trace" = xyes ; then
17512         LIB_TRACING=all
17513         ADA_TRACE=TRUE
17514
17515 cf_fix_cppflags=no
17516 cf_new_cflags=
17517 cf_new_cppflags=
17518 cf_new_extra_cppflags=
17519
17520 for cf_add_cflags in -DTRACE
17521 do
17522 case $cf_fix_cppflags in
17523 (no)
17524         case $cf_add_cflags in
17525         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17526                 case $cf_add_cflags in
17527                 (-D*)
17528                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17529
17530                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17531                                 && test -z "${cf_tst_cflags}" \
17532                                 && cf_fix_cppflags=yes
17533
17534                         if test $cf_fix_cppflags = yes ; then
17535
17536         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17537         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17538
17539                                 continue
17540                         elif test "${cf_tst_cflags}" = "\"'" ; then
17541
17542         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17543         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17544
17545                                 continue
17546                         fi
17547                         ;;
17548                 esac
17549                 case "$CPPFLAGS" in
17550                 (*$cf_add_cflags)
17551                         ;;
17552                 (*)
17553                         case $cf_add_cflags in
17554                         (-D*)
17555                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17556
17557 CPPFLAGS=`echo "$CPPFLAGS" | \
17558         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17559                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17560
17561                                 ;;
17562                         esac
17563
17564         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17565         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17566
17567                         ;;
17568                 esac
17569                 ;;
17570         (*)
17571
17572         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17573         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17574
17575                 ;;
17576         esac
17577         ;;
17578 (yes)
17579
17580         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17581         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17582
17583         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17584
17585         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17586                 && test -z "${cf_tst_cflags}" \
17587                 && cf_fix_cppflags=no
17588         ;;
17589 esac
17590 done
17591
17592 if test -n "$cf_new_cflags" ; then
17593
17594         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17595         CFLAGS="${CFLAGS}$cf_new_cflags"
17596
17597 fi
17598
17599 if test -n "$cf_new_cppflags" ; then
17600
17601         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17602         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17603
17604 fi
17605
17606 if test -n "$cf_new_extra_cppflags" ; then
17607
17608         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17609         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17610
17611 fi
17612
17613 cat >>confdefs.h <<\EOF
17614 #define HAVE__TRACEF 1
17615 EOF
17616
17617 else
17618         LIB_TRACING=DEBUG
17619         ADA_TRACE=FALSE
17620 fi
17621
17622 echo "$as_me:17622: checking if we want to use GNAT projects" >&5
17623 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17624
17625 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17626 if test "${enable_gnat_projects+set}" = set; then
17627   enableval="$enable_gnat_projects"
17628   test "$enableval" != no && enableval=yes
17629         if test "$enableval" != "yes" ; then
17630     enable_gnat_projects=no
17631         else
17632                 enable_gnat_projects=yes
17633         fi
17634 else
17635   enableval=yes
17636         enable_gnat_projects=yes
17637
17638 fi;
17639 echo "$as_me:17639: result: $enable_gnat_projects" >&5
17640 echo "${ECHO_T}$enable_gnat_projects" >&6
17641
17642 ###     Checks for libraries.
17643 case $cf_cv_system_name in
17644 (*mingw32*|*mingw64*)
17645         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17646         # Note: WINVER may be a problem with Windows 10
17647         ;;
17648 (*)
17649 echo "$as_me:17649: checking for gettimeofday" >&5
17650 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17651 if test "${ac_cv_func_gettimeofday+set}" = set; then
17652   echo $ECHO_N "(cached) $ECHO_C" >&6
17653 else
17654   cat >conftest.$ac_ext <<_ACEOF
17655 #line 17655 "configure"
17656 #include "confdefs.h"
17657 #define gettimeofday autoconf_temporary
17658 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17659 #undef gettimeofday
17660
17661 #ifdef __cplusplus
17662 extern "C"
17663 #endif
17664
17665 /* We use char because int might match the return type of a gcc2
17666    builtin and then its argument prototype would still apply.  */
17667 char gettimeofday (void);
17668
17669 int
17670 main (void)
17671 {
17672
17673 /* The GNU C library defines stubs for functions which it implements
17674     to always fail with ENOSYS.  Some functions are actually named
17675     something starting with __ and the normal name is an alias.  */
17676 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17677 #error found stub for gettimeofday
17678 #endif
17679
17680         return gettimeofday ();
17681   ;
17682   return 0;
17683 }
17684 _ACEOF
17685 rm -f conftest.$ac_objext conftest$ac_exeext
17686 if { (eval echo "$as_me:17686: \"$ac_link\"") >&5
17687   (eval $ac_link) 2>&5
17688   ac_status=$?
17689   echo "$as_me:17689: \$? = $ac_status" >&5
17690   (exit $ac_status); } &&
17691          { ac_try='test -s conftest$ac_exeext'
17692   { (eval echo "$as_me:17692: \"$ac_try\"") >&5
17693   (eval $ac_try) 2>&5
17694   ac_status=$?
17695   echo "$as_me:17695: \$? = $ac_status" >&5
17696   (exit $ac_status); }; }; then
17697   ac_cv_func_gettimeofday=yes
17698 else
17699   echo "$as_me: failed program was:" >&5
17700 cat conftest.$ac_ext >&5
17701 ac_cv_func_gettimeofday=no
17702 fi
17703 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17704 fi
17705 echo "$as_me:17705: result: $ac_cv_func_gettimeofday" >&5
17706 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17707 if test $ac_cv_func_gettimeofday = yes; then
17708
17709 cat >>confdefs.h <<\EOF
17710 #define HAVE_GETTIMEOFDAY 1
17711 EOF
17712
17713 else
17714
17715 echo "$as_me:17715: checking for gettimeofday in -lbsd" >&5
17716 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17717 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17718   echo $ECHO_N "(cached) $ECHO_C" >&6
17719 else
17720   ac_check_lib_save_LIBS=$LIBS
17721 LIBS="-lbsd  $LIBS"
17722 cat >conftest.$ac_ext <<_ACEOF
17723 #line 17723 "configure"
17724 #include "confdefs.h"
17725
17726 /* Override any gcc2 internal prototype to avoid an error.  */
17727 #ifdef __cplusplus
17728 extern "C"
17729 #endif
17730 /* We use char because int might match the return type of a gcc2
17731    builtin and then its argument prototype would still apply.  */
17732 char gettimeofday ();
17733 int
17734 main (void)
17735 {
17736 gettimeofday ();
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_bsd_gettimeofday=yes
17754 else
17755   echo "$as_me: failed program was:" >&5
17756 cat conftest.$ac_ext >&5
17757 ac_cv_lib_bsd_gettimeofday=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_bsd_gettimeofday" >&5
17763 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17764 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17765
17766 cat >>confdefs.h <<\EOF
17767 #define HAVE_GETTIMEOFDAY 1
17768 EOF
17769
17770 cf_add_libs="$LIBS"
17771 # reverse order
17772 cf_add_0lib=
17773 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17774 # filter duplicates
17775 for cf_add_1lib in $cf_add_0lib; do
17776         for cf_add_2lib in $cf_add_libs; do
17777                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17778                         cf_add_1lib=
17779                         break
17780                 fi
17781         done
17782         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17783 done
17784 LIBS="$cf_add_libs"
17785
17786 fi
17787
17788 fi
17789         ;;
17790 esac
17791
17792 echo "$as_me:17792: checking if -lm needed for math functions" >&5
17793 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17794 if test "${cf_cv_need_libm+set}" = set; then
17795   echo $ECHO_N "(cached) $ECHO_C" >&6
17796 else
17797
17798         cat >conftest.$ac_ext <<_ACEOF
17799 #line 17799 "configure"
17800 #include "confdefs.h"
17801
17802         #include <stdio.h>
17803         #include <stdlib.h>
17804         #include <math.h>
17805
17806 int
17807 main (void)
17808 {
17809 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17810   ;
17811   return 0;
17812 }
17813 _ACEOF
17814 rm -f conftest.$ac_objext conftest$ac_exeext
17815 if { (eval echo "$as_me:17815: \"$ac_link\"") >&5
17816   (eval $ac_link) 2>&5
17817   ac_status=$?
17818   echo "$as_me:17818: \$? = $ac_status" >&5
17819   (exit $ac_status); } &&
17820          { ac_try='test -s conftest$ac_exeext'
17821   { (eval echo "$as_me:17821: \"$ac_try\"") >&5
17822   (eval $ac_try) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit $ac_status); }; }; then
17826   cf_cv_need_libm=no
17827 else
17828   echo "$as_me: failed program was:" >&5
17829 cat conftest.$ac_ext >&5
17830 cf_cv_need_libm=yes
17831 fi
17832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17833 fi
17834 echo "$as_me:17834: result: $cf_cv_need_libm" >&5
17835 echo "${ECHO_T}$cf_cv_need_libm" >&6
17836 if test "$cf_cv_need_libm" = yes
17837 then
17838 MATH_LIB=-lm
17839 fi
17840
17841 ###     Checks for header files.
17842 echo "$as_me:17842: checking for ANSI C header files" >&5
17843 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17844 if test "${ac_cv_header_stdc+set}" = set; then
17845   echo $ECHO_N "(cached) $ECHO_C" >&6
17846 else
17847   cat >conftest.$ac_ext <<_ACEOF
17848 #line 17848 "configure"
17849 #include "confdefs.h"
17850 #include <stdlib.h>
17851 #include <stdarg.h>
17852 #include <string.h>
17853 #include <float.h>
17854
17855 _ACEOF
17856 if { (eval echo "$as_me:17856: \"$ac_cpp conftest.$ac_ext\"") >&5
17857   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17858   ac_status=$?
17859   egrep -v '^ *\+' conftest.er1 >conftest.err
17860   rm -f conftest.er1
17861   cat conftest.err >&5
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit $ac_status); } >/dev/null; then
17864   if test -s conftest.err; then
17865     ac_cpp_err=$ac_c_preproc_warn_flag
17866   else
17867     ac_cpp_err=
17868   fi
17869 else
17870   ac_cpp_err=yes
17871 fi
17872 if test -z "$ac_cpp_err"; then
17873   ac_cv_header_stdc=yes
17874 else
17875   echo "$as_me: failed program was:" >&5
17876   cat conftest.$ac_ext >&5
17877   ac_cv_header_stdc=no
17878 fi
17879 rm -f conftest.err conftest.$ac_ext
17880
17881 if test $ac_cv_header_stdc = yes; then
17882   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17883   cat >conftest.$ac_ext <<_ACEOF
17884 #line 17884 "configure"
17885 #include "confdefs.h"
17886 #include <string.h>
17887
17888 _ACEOF
17889 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17890   egrep "memchr" >/dev/null 2>&1; then
17891   :
17892 else
17893   ac_cv_header_stdc=no
17894 fi
17895 rm -rf conftest*
17896
17897 fi
17898
17899 if test $ac_cv_header_stdc = yes; then
17900   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17901   cat >conftest.$ac_ext <<_ACEOF
17902 #line 17902 "configure"
17903 #include "confdefs.h"
17904 #include <stdlib.h>
17905
17906 _ACEOF
17907 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17908   egrep "free" >/dev/null 2>&1; then
17909   :
17910 else
17911   ac_cv_header_stdc=no
17912 fi
17913 rm -rf conftest*
17914
17915 fi
17916
17917 if test $ac_cv_header_stdc = yes; then
17918   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17919   if test "$cross_compiling" = yes; then
17920   :
17921 else
17922   cat >conftest.$ac_ext <<_ACEOF
17923 #line 17923 "configure"
17924 #include "confdefs.h"
17925 #include <ctype.h>
17926 #if ((' ' & 0x0FF) == 0x020)
17927 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17928 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17929 #else
17930 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17931                      || ('j' <= (c) && (c) <= 'r') \
17932                      || ('s' <= (c) && (c) <= 'z'))
17933 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17934 #endif
17935
17936 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17937 int
17938 main (void)
17939 {
17940   int i;
17941   for (i = 0; i < 256; i++)
17942     if (XOR (islower (i), ISLOWER (i))
17943         || toupper (i) != TOUPPER (i))
17944       $ac_main_return(2);
17945   $ac_main_return (0);
17946 }
17947 _ACEOF
17948 rm -f conftest$ac_exeext
17949 if { (eval echo "$as_me:17949: \"$ac_link\"") >&5
17950   (eval $ac_link) 2>&5
17951   ac_status=$?
17952   echo "$as_me:17952: \$? = $ac_status" >&5
17953   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17954   { (eval echo "$as_me:17954: \"$ac_try\"") >&5
17955   (eval $ac_try) 2>&5
17956   ac_status=$?
17957   echo "$as_me:17957: \$? = $ac_status" >&5
17958   (exit $ac_status); }; }; then
17959   :
17960 else
17961   echo "$as_me: program exited with status $ac_status" >&5
17962 echo "$as_me: failed program was:" >&5
17963 cat conftest.$ac_ext >&5
17964 ac_cv_header_stdc=no
17965 fi
17966 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17967 fi
17968 fi
17969 fi
17970 echo "$as_me:17970: result: $ac_cv_header_stdc" >&5
17971 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17972 if test $ac_cv_header_stdc = yes; then
17973
17974 cat >>confdefs.h <<\EOF
17975 #define STDC_HEADERS 1
17976 EOF
17977
17978 fi
17979
17980 ac_header_dirent=no
17981 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17982   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17983 echo "$as_me:17983: checking for $ac_hdr that defines DIR" >&5
17984 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17985 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17986   echo $ECHO_N "(cached) $ECHO_C" >&6
17987 else
17988   cat >conftest.$ac_ext <<_ACEOF
17989 #line 17989 "configure"
17990 #include "confdefs.h"
17991 #include <sys/types.h>
17992 #include <$ac_hdr>
17993
17994 int
17995 main (void)
17996 {
17997 if ((DIR *) 0)
17998 return 0;
17999   ;
18000   return 0;
18001 }
18002 _ACEOF
18003 rm -f conftest.$ac_objext
18004 if { (eval echo "$as_me:18004: \"$ac_compile\"") >&5
18005   (eval $ac_compile) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit $ac_status); } &&
18009          { ac_try='test -s conftest.$ac_objext'
18010   { (eval echo "$as_me:18010: \"$ac_try\"") >&5
18011   (eval $ac_try) 2>&5
18012   ac_status=$?
18013   echo "$as_me:18013: \$? = $ac_status" >&5
18014   (exit $ac_status); }; }; then
18015   eval "$as_ac_Header=yes"
18016 else
18017   echo "$as_me: failed program was:" >&5
18018 cat conftest.$ac_ext >&5
18019 eval "$as_ac_Header=no"
18020 fi
18021 rm -f conftest.$ac_objext conftest.$ac_ext
18022 fi
18023 echo "$as_me:18023: result: `eval echo '${'$as_ac_Header'}'`" >&5
18024 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18025 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18026   cat >>confdefs.h <<EOF
18027 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18028 EOF
18029
18030 ac_header_dirent=$ac_hdr; break
18031 fi
18032
18033 done
18034 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18035 if test $ac_header_dirent = dirent.h; then
18036   echo "$as_me:18036: checking for opendir in -ldir" >&5
18037 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18038 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18039   echo $ECHO_N "(cached) $ECHO_C" >&6
18040 else
18041   ac_check_lib_save_LIBS=$LIBS
18042 LIBS="-ldir  $LIBS"
18043 cat >conftest.$ac_ext <<_ACEOF
18044 #line 18044 "configure"
18045 #include "confdefs.h"
18046
18047 /* Override any gcc2 internal prototype to avoid an error.  */
18048 #ifdef __cplusplus
18049 extern "C"
18050 #endif
18051 /* We use char because int might match the return type of a gcc2
18052    builtin and then its argument prototype would still apply.  */
18053 char opendir ();
18054 int
18055 main (void)
18056 {
18057 opendir ();
18058   ;
18059   return 0;
18060 }
18061 _ACEOF
18062 rm -f conftest.$ac_objext conftest$ac_exeext
18063 if { (eval echo "$as_me:18063: \"$ac_link\"") >&5
18064   (eval $ac_link) 2>&5
18065   ac_status=$?
18066   echo "$as_me:18066: \$? = $ac_status" >&5
18067   (exit $ac_status); } &&
18068          { ac_try='test -s conftest$ac_exeext'
18069   { (eval echo "$as_me:18069: \"$ac_try\"") >&5
18070   (eval $ac_try) 2>&5
18071   ac_status=$?
18072   echo "$as_me:18072: \$? = $ac_status" >&5
18073   (exit $ac_status); }; }; then
18074   ac_cv_lib_dir_opendir=yes
18075 else
18076   echo "$as_me: failed program was:" >&5
18077 cat conftest.$ac_ext >&5
18078 ac_cv_lib_dir_opendir=no
18079 fi
18080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18081 LIBS=$ac_check_lib_save_LIBS
18082 fi
18083 echo "$as_me:18083: result: $ac_cv_lib_dir_opendir" >&5
18084 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18085 if test $ac_cv_lib_dir_opendir = yes; then
18086   LIBS="$LIBS -ldir"
18087 fi
18088
18089 else
18090   echo "$as_me:18090: checking for opendir in -lx" >&5
18091 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18092 if test "${ac_cv_lib_x_opendir+set}" = set; then
18093   echo $ECHO_N "(cached) $ECHO_C" >&6
18094 else
18095   ac_check_lib_save_LIBS=$LIBS
18096 LIBS="-lx  $LIBS"
18097 cat >conftest.$ac_ext <<_ACEOF
18098 #line 18098 "configure"
18099 #include "confdefs.h"
18100
18101 /* Override any gcc2 internal prototype to avoid an error.  */
18102 #ifdef __cplusplus
18103 extern "C"
18104 #endif
18105 /* We use char because int might match the return type of a gcc2
18106    builtin and then its argument prototype would still apply.  */
18107 char opendir ();
18108 int
18109 main (void)
18110 {
18111 opendir ();
18112   ;
18113   return 0;
18114 }
18115 _ACEOF
18116 rm -f conftest.$ac_objext conftest$ac_exeext
18117 if { (eval echo "$as_me:18117: \"$ac_link\"") >&5
18118   (eval $ac_link) 2>&5
18119   ac_status=$?
18120   echo "$as_me:18120: \$? = $ac_status" >&5
18121   (exit $ac_status); } &&
18122          { ac_try='test -s conftest$ac_exeext'
18123   { (eval echo "$as_me:18123: \"$ac_try\"") >&5
18124   (eval $ac_try) 2>&5
18125   ac_status=$?
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); }; }; then
18128   ac_cv_lib_x_opendir=yes
18129 else
18130   echo "$as_me: failed program was:" >&5
18131 cat conftest.$ac_ext >&5
18132 ac_cv_lib_x_opendir=no
18133 fi
18134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18135 LIBS=$ac_check_lib_save_LIBS
18136 fi
18137 echo "$as_me:18137: result: $ac_cv_lib_x_opendir" >&5
18138 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18139 if test $ac_cv_lib_x_opendir = yes; then
18140   LIBS="$LIBS -lx"
18141 fi
18142
18143 fi
18144
18145 echo "$as_me:18145: checking whether time.h and sys/time.h may both be included" >&5
18146 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18147 if test "${ac_cv_header_time+set}" = set; then
18148   echo $ECHO_N "(cached) $ECHO_C" >&6
18149 else
18150   cat >conftest.$ac_ext <<_ACEOF
18151 #line 18151 "configure"
18152 #include "confdefs.h"
18153 #include <sys/types.h>
18154 #include <sys/time.h>
18155 #include <time.h>
18156
18157 int
18158 main (void)
18159 {
18160 if ((struct tm *) 0)
18161 return 0;
18162   ;
18163   return 0;
18164 }
18165 _ACEOF
18166 rm -f conftest.$ac_objext
18167 if { (eval echo "$as_me:18167: \"$ac_compile\"") >&5
18168   (eval $ac_compile) 2>&5
18169   ac_status=$?
18170   echo "$as_me:18170: \$? = $ac_status" >&5
18171   (exit $ac_status); } &&
18172          { ac_try='test -s conftest.$ac_objext'
18173   { (eval echo "$as_me:18173: \"$ac_try\"") >&5
18174   (eval $ac_try) 2>&5
18175   ac_status=$?
18176   echo "$as_me:18176: \$? = $ac_status" >&5
18177   (exit $ac_status); }; }; then
18178   ac_cv_header_time=yes
18179 else
18180   echo "$as_me: failed program was:" >&5
18181 cat conftest.$ac_ext >&5
18182 ac_cv_header_time=no
18183 fi
18184 rm -f conftest.$ac_objext conftest.$ac_ext
18185 fi
18186 echo "$as_me:18186: result: $ac_cv_header_time" >&5
18187 echo "${ECHO_T}$ac_cv_header_time" >&6
18188 if test $ac_cv_header_time = yes; then
18189
18190 cat >>confdefs.h <<\EOF
18191 #define TIME_WITH_SYS_TIME 1
18192 EOF
18193
18194 fi
18195
18196 cf_regex_func=no
18197
18198 cf_regex_libs="regex re"
18199 case $host_os in
18200 (mingw*)
18201         cf_regex_libs="systre gnurx $cf_regex_libs"
18202         ;;
18203 esac
18204
18205 echo "$as_me:18205: checking for regcomp" >&5
18206 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18207 if test "${ac_cv_func_regcomp+set}" = set; then
18208   echo $ECHO_N "(cached) $ECHO_C" >&6
18209 else
18210   cat >conftest.$ac_ext <<_ACEOF
18211 #line 18211 "configure"
18212 #include "confdefs.h"
18213 #define regcomp autoconf_temporary
18214 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18215 #undef regcomp
18216
18217 #ifdef __cplusplus
18218 extern "C"
18219 #endif
18220
18221 /* We use char because int might match the return type of a gcc2
18222    builtin and then its argument prototype would still apply.  */
18223 char regcomp (void);
18224
18225 int
18226 main (void)
18227 {
18228
18229 /* The GNU C library defines stubs for functions which it implements
18230     to always fail with ENOSYS.  Some functions are actually named
18231     something starting with __ and the normal name is an alias.  */
18232 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18233 #error found stub for regcomp
18234 #endif
18235
18236         return regcomp ();
18237   ;
18238   return 0;
18239 }
18240 _ACEOF
18241 rm -f conftest.$ac_objext conftest$ac_exeext
18242 if { (eval echo "$as_me:18242: \"$ac_link\"") >&5
18243   (eval $ac_link) 2>&5
18244   ac_status=$?
18245   echo "$as_me:18245: \$? = $ac_status" >&5
18246   (exit $ac_status); } &&
18247          { ac_try='test -s conftest$ac_exeext'
18248   { (eval echo "$as_me:18248: \"$ac_try\"") >&5
18249   (eval $ac_try) 2>&5
18250   ac_status=$?
18251   echo "$as_me:18251: \$? = $ac_status" >&5
18252   (exit $ac_status); }; }; then
18253   ac_cv_func_regcomp=yes
18254 else
18255   echo "$as_me: failed program was:" >&5
18256 cat conftest.$ac_ext >&5
18257 ac_cv_func_regcomp=no
18258 fi
18259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18260 fi
18261 echo "$as_me:18261: result: $ac_cv_func_regcomp" >&5
18262 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18263 if test $ac_cv_func_regcomp = yes; then
18264   cf_regex_func=regcomp
18265 else
18266
18267         for cf_regex_lib in $cf_regex_libs
18268         do
18269                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18270 echo "$as_me:18270: checking for regcomp in -l$cf_regex_lib" >&5
18271 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18272 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18273   echo $ECHO_N "(cached) $ECHO_C" >&6
18274 else
18275   ac_check_lib_save_LIBS=$LIBS
18276 LIBS="-l$cf_regex_lib  $LIBS"
18277 cat >conftest.$ac_ext <<_ACEOF
18278 #line 18278 "configure"
18279 #include "confdefs.h"
18280
18281 /* Override any gcc2 internal prototype to avoid an error.  */
18282 #ifdef __cplusplus
18283 extern "C"
18284 #endif
18285 /* We use char because int might match the return type of a gcc2
18286    builtin and then its argument prototype would still apply.  */
18287 char regcomp ();
18288 int
18289 main (void)
18290 {
18291 regcomp ();
18292   ;
18293   return 0;
18294 }
18295 _ACEOF
18296 rm -f conftest.$ac_objext conftest$ac_exeext
18297 if { (eval echo "$as_me:18297: \"$ac_link\"") >&5
18298   (eval $ac_link) 2>&5
18299   ac_status=$?
18300   echo "$as_me:18300: \$? = $ac_status" >&5
18301   (exit $ac_status); } &&
18302          { ac_try='test -s conftest$ac_exeext'
18303   { (eval echo "$as_me:18303: \"$ac_try\"") >&5
18304   (eval $ac_try) 2>&5
18305   ac_status=$?
18306   echo "$as_me:18306: \$? = $ac_status" >&5
18307   (exit $ac_status); }; }; then
18308   eval "$as_ac_Lib=yes"
18309 else
18310   echo "$as_me: failed program was:" >&5
18311 cat conftest.$ac_ext >&5
18312 eval "$as_ac_Lib=no"
18313 fi
18314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18315 LIBS=$ac_check_lib_save_LIBS
18316 fi
18317 echo "$as_me:18317: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18318 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18319 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18320
18321 cf_add_libs="$LIBS"
18322 # reverse order
18323 cf_add_0lib=
18324 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18325 # filter duplicates
18326 for cf_add_1lib in $cf_add_0lib; do
18327         for cf_add_2lib in $cf_add_libs; do
18328                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18329                         cf_add_1lib=
18330                         break
18331                 fi
18332         done
18333         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18334 done
18335 LIBS="$cf_add_libs"
18336
18337                                 cf_regex_func=regcomp
18338                                 break
18339 fi
18340
18341         done
18342
18343 fi
18344
18345 if test "$cf_regex_func" = no ; then
18346         echo "$as_me:18346: checking for compile" >&5
18347 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18348 if test "${ac_cv_func_compile+set}" = set; then
18349   echo $ECHO_N "(cached) $ECHO_C" >&6
18350 else
18351   cat >conftest.$ac_ext <<_ACEOF
18352 #line 18352 "configure"
18353 #include "confdefs.h"
18354 #define compile autoconf_temporary
18355 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18356 #undef compile
18357
18358 #ifdef __cplusplus
18359 extern "C"
18360 #endif
18361
18362 /* We use char because int might match the return type of a gcc2
18363    builtin and then its argument prototype would still apply.  */
18364 char compile (void);
18365
18366 int
18367 main (void)
18368 {
18369
18370 /* The GNU C library defines stubs for functions which it implements
18371     to always fail with ENOSYS.  Some functions are actually named
18372     something starting with __ and the normal name is an alias.  */
18373 #if defined (__stub_compile) || defined (__stub___compile)
18374 #error found stub for compile
18375 #endif
18376
18377         return compile ();
18378   ;
18379   return 0;
18380 }
18381 _ACEOF
18382 rm -f conftest.$ac_objext conftest$ac_exeext
18383 if { (eval echo "$as_me:18383: \"$ac_link\"") >&5
18384   (eval $ac_link) 2>&5
18385   ac_status=$?
18386   echo "$as_me:18386: \$? = $ac_status" >&5
18387   (exit $ac_status); } &&
18388          { ac_try='test -s conftest$ac_exeext'
18389   { (eval echo "$as_me:18389: \"$ac_try\"") >&5
18390   (eval $ac_try) 2>&5
18391   ac_status=$?
18392   echo "$as_me:18392: \$? = $ac_status" >&5
18393   (exit $ac_status); }; }; then
18394   ac_cv_func_compile=yes
18395 else
18396   echo "$as_me: failed program was:" >&5
18397 cat conftest.$ac_ext >&5
18398 ac_cv_func_compile=no
18399 fi
18400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18401 fi
18402 echo "$as_me:18402: result: $ac_cv_func_compile" >&5
18403 echo "${ECHO_T}$ac_cv_func_compile" >&6
18404 if test $ac_cv_func_compile = yes; then
18405   cf_regex_func=compile
18406 else
18407
18408                 echo "$as_me:18408: checking for compile in -lgen" >&5
18409 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18410 if test "${ac_cv_lib_gen_compile+set}" = set; then
18411   echo $ECHO_N "(cached) $ECHO_C" >&6
18412 else
18413   ac_check_lib_save_LIBS=$LIBS
18414 LIBS="-lgen  $LIBS"
18415 cat >conftest.$ac_ext <<_ACEOF
18416 #line 18416 "configure"
18417 #include "confdefs.h"
18418
18419 /* Override any gcc2 internal prototype to avoid an error.  */
18420 #ifdef __cplusplus
18421 extern "C"
18422 #endif
18423 /* We use char because int might match the return type of a gcc2
18424    builtin and then its argument prototype would still apply.  */
18425 char compile ();
18426 int
18427 main (void)
18428 {
18429 compile ();
18430   ;
18431   return 0;
18432 }
18433 _ACEOF
18434 rm -f conftest.$ac_objext conftest$ac_exeext
18435 if { (eval echo "$as_me:18435: \"$ac_link\"") >&5
18436   (eval $ac_link) 2>&5
18437   ac_status=$?
18438   echo "$as_me:18438: \$? = $ac_status" >&5
18439   (exit $ac_status); } &&
18440          { ac_try='test -s conftest$ac_exeext'
18441   { (eval echo "$as_me:18441: \"$ac_try\"") >&5
18442   (eval $ac_try) 2>&5
18443   ac_status=$?
18444   echo "$as_me:18444: \$? = $ac_status" >&5
18445   (exit $ac_status); }; }; then
18446   ac_cv_lib_gen_compile=yes
18447 else
18448   echo "$as_me: failed program was:" >&5
18449 cat conftest.$ac_ext >&5
18450 ac_cv_lib_gen_compile=no
18451 fi
18452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18453 LIBS=$ac_check_lib_save_LIBS
18454 fi
18455 echo "$as_me:18455: result: $ac_cv_lib_gen_compile" >&5
18456 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18457 if test $ac_cv_lib_gen_compile = yes; then
18458
18459 cf_add_libs="$LIBS"
18460 # reverse order
18461 cf_add_0lib=
18462 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18463 # filter duplicates
18464 for cf_add_1lib in $cf_add_0lib; do
18465         for cf_add_2lib in $cf_add_libs; do
18466                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18467                         cf_add_1lib=
18468                         break
18469                 fi
18470         done
18471         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18472 done
18473 LIBS="$cf_add_libs"
18474
18475                                 cf_regex_func=compile
18476 fi
18477
18478 fi
18479
18480 fi
18481
18482 if test "$cf_regex_func" = no ; then
18483         { echo "$as_me:18483: WARNING: cannot find regular expression library" >&5
18484 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18485 fi
18486
18487 echo "$as_me:18487: checking for regular-expression headers" >&5
18488 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18489 if test "${cf_cv_regex_hdrs+set}" = set; then
18490   echo $ECHO_N "(cached) $ECHO_C" >&6
18491 else
18492
18493 cf_cv_regex_hdrs=no
18494 case $cf_regex_func in
18495 (compile)
18496         for cf_regex_hdr in regexp.h regexpr.h
18497         do
18498                 cat >conftest.$ac_ext <<_ACEOF
18499 #line 18499 "configure"
18500 #include "confdefs.h"
18501 #include <$cf_regex_hdr>
18502 int
18503 main (void)
18504 {
18505
18506                         char *p = compile("", "", "", 0);
18507                         int x = step("", "");
18508                         (void)p;
18509                         (void)x;
18510
18511   ;
18512   return 0;
18513 }
18514 _ACEOF
18515 rm -f conftest.$ac_objext conftest$ac_exeext
18516 if { (eval echo "$as_me:18516: \"$ac_link\"") >&5
18517   (eval $ac_link) 2>&5
18518   ac_status=$?
18519   echo "$as_me:18519: \$? = $ac_status" >&5
18520   (exit $ac_status); } &&
18521          { ac_try='test -s conftest$ac_exeext'
18522   { (eval echo "$as_me:18522: \"$ac_try\"") >&5
18523   (eval $ac_try) 2>&5
18524   ac_status=$?
18525   echo "$as_me:18525: \$? = $ac_status" >&5
18526   (exit $ac_status); }; }; then
18527
18528                         cf_cv_regex_hdrs=$cf_regex_hdr
18529                         break
18530
18531 else
18532   echo "$as_me: failed program was:" >&5
18533 cat conftest.$ac_ext >&5
18534 fi
18535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18536         done
18537         ;;
18538 (*)
18539         for cf_regex_hdr in regex.h
18540         do
18541                 cat >conftest.$ac_ext <<_ACEOF
18542 #line 18542 "configure"
18543 #include "confdefs.h"
18544 #include <sys/types.h>
18545 #include <$cf_regex_hdr>
18546 int
18547 main (void)
18548 {
18549
18550                         regex_t *p = 0;
18551                         int x = regcomp(p, "", 0);
18552                         int y = regexec(p, "", 0, 0, 0);
18553                         (void)x;
18554                         (void)y;
18555                         regfree(p);
18556
18557   ;
18558   return 0;
18559 }
18560 _ACEOF
18561 rm -f conftest.$ac_objext conftest$ac_exeext
18562 if { (eval echo "$as_me:18562: \"$ac_link\"") >&5
18563   (eval $ac_link) 2>&5
18564   ac_status=$?
18565   echo "$as_me:18565: \$? = $ac_status" >&5
18566   (exit $ac_status); } &&
18567          { ac_try='test -s conftest$ac_exeext'
18568   { (eval echo "$as_me:18568: \"$ac_try\"") >&5
18569   (eval $ac_try) 2>&5
18570   ac_status=$?
18571   echo "$as_me:18571: \$? = $ac_status" >&5
18572   (exit $ac_status); }; }; then
18573
18574                         cf_cv_regex_hdrs=$cf_regex_hdr
18575                         break
18576
18577 else
18578   echo "$as_me: failed program was:" >&5
18579 cat conftest.$ac_ext >&5
18580 fi
18581 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18582         done
18583         ;;
18584 esac
18585
18586 fi
18587 echo "$as_me:18587: result: $cf_cv_regex_hdrs" >&5
18588 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18589
18590 case $cf_cv_regex_hdrs in
18591         (no)            { echo "$as_me:18591: WARNING: no regular expression header found" >&5
18592 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18593         (regex.h)
18594 cat >>confdefs.h <<\EOF
18595 #define HAVE_REGEX_H_FUNCS 1
18596 EOF
18597  ;;
18598         (regexp.h)
18599 cat >>confdefs.h <<\EOF
18600 #define HAVE_REGEXP_H_FUNCS 1
18601 EOF
18602  ;;
18603         (regexpr.h)
18604 cat >>confdefs.h <<\EOF
18605 #define HAVE_REGEXPR_H_FUNCS 1
18606 EOF
18607  ;;
18608 esac
18609
18610 for ac_header in \
18611 fcntl.h \
18612 getopt.h \
18613 limits.h \
18614 locale.h \
18615 math.h \
18616 poll.h \
18617 sys/ioctl.h \
18618 sys/param.h \
18619 sys/poll.h \
18620 sys/select.h \
18621 sys/time.h \
18622 sys/times.h \
18623 ttyent.h \
18624 unistd.h \
18625 wctype.h \
18626
18627 do
18628 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18629 echo "$as_me:18629: checking for $ac_header" >&5
18630 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18631 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18632   echo $ECHO_N "(cached) $ECHO_C" >&6
18633 else
18634   cat >conftest.$ac_ext <<_ACEOF
18635 #line 18635 "configure"
18636 #include "confdefs.h"
18637 #include <$ac_header>
18638 _ACEOF
18639 if { (eval echo "$as_me:18639: \"$ac_cpp conftest.$ac_ext\"") >&5
18640   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18641   ac_status=$?
18642   egrep -v '^ *\+' conftest.er1 >conftest.err
18643   rm -f conftest.er1
18644   cat conftest.err >&5
18645   echo "$as_me:18645: \$? = $ac_status" >&5
18646   (exit $ac_status); } >/dev/null; then
18647   if test -s conftest.err; then
18648     ac_cpp_err=$ac_c_preproc_warn_flag
18649   else
18650     ac_cpp_err=
18651   fi
18652 else
18653   ac_cpp_err=yes
18654 fi
18655 if test -z "$ac_cpp_err"; then
18656   eval "$as_ac_Header=yes"
18657 else
18658   echo "$as_me: failed program was:" >&5
18659   cat conftest.$ac_ext >&5
18660   eval "$as_ac_Header=no"
18661 fi
18662 rm -f conftest.err conftest.$ac_ext
18663 fi
18664 echo "$as_me:18664: result: `eval echo '${'$as_ac_Header'}'`" >&5
18665 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18666 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18667   cat >>confdefs.h <<EOF
18668 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18669 EOF
18670
18671 fi
18672 done
18673
18674 for ac_header in unistd.h getopt.h
18675 do
18676 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18677 echo "$as_me:18677: checking for $ac_header" >&5
18678 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18679 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18680   echo $ECHO_N "(cached) $ECHO_C" >&6
18681 else
18682   cat >conftest.$ac_ext <<_ACEOF
18683 #line 18683 "configure"
18684 #include "confdefs.h"
18685 #include <$ac_header>
18686 _ACEOF
18687 if { (eval echo "$as_me:18687: \"$ac_cpp conftest.$ac_ext\"") >&5
18688   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18689   ac_status=$?
18690   egrep -v '^ *\+' conftest.er1 >conftest.err
18691   rm -f conftest.er1
18692   cat conftest.err >&5
18693   echo "$as_me:18693: \$? = $ac_status" >&5
18694   (exit $ac_status); } >/dev/null; then
18695   if test -s conftest.err; then
18696     ac_cpp_err=$ac_c_preproc_warn_flag
18697   else
18698     ac_cpp_err=
18699   fi
18700 else
18701   ac_cpp_err=yes
18702 fi
18703 if test -z "$ac_cpp_err"; then
18704   eval "$as_ac_Header=yes"
18705 else
18706   echo "$as_me: failed program was:" >&5
18707   cat conftest.$ac_ext >&5
18708   eval "$as_ac_Header=no"
18709 fi
18710 rm -f conftest.err conftest.$ac_ext
18711 fi
18712 echo "$as_me:18712: result: `eval echo '${'$as_ac_Header'}'`" >&5
18713 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18714 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18715   cat >>confdefs.h <<EOF
18716 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18717 EOF
18718
18719 fi
18720 done
18721
18722 echo "$as_me:18722: checking for header declaring getopt variables" >&5
18723 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18724 if test "${cf_cv_getopt_header+set}" = set; then
18725   echo $ECHO_N "(cached) $ECHO_C" >&6
18726 else
18727
18728 cf_cv_getopt_header=none
18729 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18730 do
18731 cat >conftest.$ac_ext <<_ACEOF
18732 #line 18732 "configure"
18733 #include "confdefs.h"
18734
18735 #include <$cf_header>
18736 int
18737 main (void)
18738 {
18739 int x = optind; char *y = optarg
18740   ;
18741   return 0;
18742 }
18743 _ACEOF
18744 rm -f conftest.$ac_objext
18745 if { (eval echo "$as_me:18745: \"$ac_compile\"") >&5
18746   (eval $ac_compile) 2>&5
18747   ac_status=$?
18748   echo "$as_me:18748: \$? = $ac_status" >&5
18749   (exit $ac_status); } &&
18750          { ac_try='test -s conftest.$ac_objext'
18751   { (eval echo "$as_me:18751: \"$ac_try\"") >&5
18752   (eval $ac_try) 2>&5
18753   ac_status=$?
18754   echo "$as_me:18754: \$? = $ac_status" >&5
18755   (exit $ac_status); }; }; then
18756   cf_cv_getopt_header=$cf_header
18757  break
18758 else
18759   echo "$as_me: failed program was:" >&5
18760 cat conftest.$ac_ext >&5
18761 fi
18762 rm -f conftest.$ac_objext conftest.$ac_ext
18763 done
18764
18765 fi
18766 echo "$as_me:18766: result: $cf_cv_getopt_header" >&5
18767 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18768 if test $cf_cv_getopt_header != none ; then
18769
18770 cat >>confdefs.h <<\EOF
18771 #define HAVE_GETOPT_HEADER 1
18772 EOF
18773
18774 fi
18775 if test $cf_cv_getopt_header = getopt.h ; then
18776
18777 cat >>confdefs.h <<\EOF
18778 #define NEED_GETOPT_H 1
18779 EOF
18780
18781 fi
18782
18783 echo "$as_me:18783: checking if external environ is declared" >&5
18784 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18785 if test "${cf_cv_dcl_environ+set}" = set; then
18786   echo $ECHO_N "(cached) $ECHO_C" >&6
18787 else
18788
18789     cat >conftest.$ac_ext <<_ACEOF
18790 #line 18790 "configure"
18791 #include "confdefs.h"
18792
18793 #ifdef HAVE_STDLIB_H
18794 #include <stdlib.h>
18795 #endif
18796 #include <unistd.h>
18797 int
18798 main (void)
18799 {
18800 int x = (int) environ
18801   ;
18802   return 0;
18803 }
18804 _ACEOF
18805 rm -f conftest.$ac_objext
18806 if { (eval echo "$as_me:18806: \"$ac_compile\"") >&5
18807   (eval $ac_compile) 2>&5
18808   ac_status=$?
18809   echo "$as_me:18809: \$? = $ac_status" >&5
18810   (exit $ac_status); } &&
18811          { ac_try='test -s conftest.$ac_objext'
18812   { (eval echo "$as_me:18812: \"$ac_try\"") >&5
18813   (eval $ac_try) 2>&5
18814   ac_status=$?
18815   echo "$as_me:18815: \$? = $ac_status" >&5
18816   (exit $ac_status); }; }; then
18817   cf_cv_dcl_environ=yes
18818 else
18819   echo "$as_me: failed program was:" >&5
18820 cat conftest.$ac_ext >&5
18821 cf_cv_dcl_environ=no
18822 fi
18823 rm -f conftest.$ac_objext conftest.$ac_ext
18824
18825 fi
18826 echo "$as_me:18826: result: $cf_cv_dcl_environ" >&5
18827 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18828
18829 if test "$cf_cv_dcl_environ" = no ; then
18830
18831 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18832
18833     cat >>confdefs.h <<EOF
18834 #define $cf_result 1
18835 EOF
18836
18837 fi
18838
18839 # It's possible (for near-UNIX clones) that the data doesn't exist
18840
18841 echo "$as_me:18841: checking if external environ exists" >&5
18842 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18843 if test "${cf_cv_have_environ+set}" = set; then
18844   echo $ECHO_N "(cached) $ECHO_C" >&6
18845 else
18846
18847         cat >conftest.$ac_ext <<_ACEOF
18848 #line 18848 "configure"
18849 #include "confdefs.h"
18850
18851 #undef environ
18852 extern int environ;
18853
18854 int
18855 main (void)
18856 {
18857 environ = 2
18858   ;
18859   return 0;
18860 }
18861 _ACEOF
18862 rm -f conftest.$ac_objext conftest$ac_exeext
18863 if { (eval echo "$as_me:18863: \"$ac_link\"") >&5
18864   (eval $ac_link) 2>&5
18865   ac_status=$?
18866   echo "$as_me:18866: \$? = $ac_status" >&5
18867   (exit $ac_status); } &&
18868          { ac_try='test -s conftest$ac_exeext'
18869   { (eval echo "$as_me:18869: \"$ac_try\"") >&5
18870   (eval $ac_try) 2>&5
18871   ac_status=$?
18872   echo "$as_me:18872: \$? = $ac_status" >&5
18873   (exit $ac_status); }; }; then
18874   cf_cv_have_environ=yes
18875 else
18876   echo "$as_me: failed program was:" >&5
18877 cat conftest.$ac_ext >&5
18878 cf_cv_have_environ=no
18879 fi
18880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18881
18882 fi
18883 echo "$as_me:18883: result: $cf_cv_have_environ" >&5
18884 echo "${ECHO_T}$cf_cv_have_environ" >&6
18885
18886 if test "$cf_cv_have_environ" = yes ; then
18887
18888 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18889
18890         cat >>confdefs.h <<EOF
18891 #define $cf_result 1
18892 EOF
18893
18894 fi
18895
18896 echo "$as_me:18896: checking for getenv" >&5
18897 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18898 if test "${ac_cv_func_getenv+set}" = set; then
18899   echo $ECHO_N "(cached) $ECHO_C" >&6
18900 else
18901   cat >conftest.$ac_ext <<_ACEOF
18902 #line 18902 "configure"
18903 #include "confdefs.h"
18904 #define getenv autoconf_temporary
18905 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18906 #undef getenv
18907
18908 #ifdef __cplusplus
18909 extern "C"
18910 #endif
18911
18912 /* We use char because int might match the return type of a gcc2
18913    builtin and then its argument prototype would still apply.  */
18914 char getenv (void);
18915
18916 int
18917 main (void)
18918 {
18919
18920 /* The GNU C library defines stubs for functions which it implements
18921     to always fail with ENOSYS.  Some functions are actually named
18922     something starting with __ and the normal name is an alias.  */
18923 #if defined (__stub_getenv) || defined (__stub___getenv)
18924 #error found stub for getenv
18925 #endif
18926
18927         return getenv ();
18928   ;
18929   return 0;
18930 }
18931 _ACEOF
18932 rm -f conftest.$ac_objext conftest$ac_exeext
18933 if { (eval echo "$as_me:18933: \"$ac_link\"") >&5
18934   (eval $ac_link) 2>&5
18935   ac_status=$?
18936   echo "$as_me:18936: \$? = $ac_status" >&5
18937   (exit $ac_status); } &&
18938          { ac_try='test -s conftest$ac_exeext'
18939   { (eval echo "$as_me:18939: \"$ac_try\"") >&5
18940   (eval $ac_try) 2>&5
18941   ac_status=$?
18942   echo "$as_me:18942: \$? = $ac_status" >&5
18943   (exit $ac_status); }; }; then
18944   ac_cv_func_getenv=yes
18945 else
18946   echo "$as_me: failed program was:" >&5
18947 cat conftest.$ac_ext >&5
18948 ac_cv_func_getenv=no
18949 fi
18950 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18951 fi
18952 echo "$as_me:18952: result: $ac_cv_func_getenv" >&5
18953 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18954
18955 for ac_func in putenv setenv strdup
18956 do
18957 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18958 echo "$as_me:18958: checking for $ac_func" >&5
18959 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18960 if eval "test \"\${$as_ac_var+set}\" = set"; then
18961   echo $ECHO_N "(cached) $ECHO_C" >&6
18962 else
18963   cat >conftest.$ac_ext <<_ACEOF
18964 #line 18964 "configure"
18965 #include "confdefs.h"
18966 #define $ac_func autoconf_temporary
18967 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18968 #undef $ac_func
18969
18970 #ifdef __cplusplus
18971 extern "C"
18972 #endif
18973
18974 /* We use char because int might match the return type of a gcc2
18975    builtin and then its argument prototype would still apply.  */
18976 char $ac_func (void);
18977
18978 int
18979 main (void)
18980 {
18981
18982 /* The GNU C library defines stubs for functions which it implements
18983     to always fail with ENOSYS.  Some functions are actually named
18984     something starting with __ and the normal name is an alias.  */
18985 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18986 #error found stub for $ac_func
18987 #endif
18988
18989         return $ac_func ();
18990   ;
18991   return 0;
18992 }
18993 _ACEOF
18994 rm -f conftest.$ac_objext conftest$ac_exeext
18995 if { (eval echo "$as_me:18995: \"$ac_link\"") >&5
18996   (eval $ac_link) 2>&5
18997   ac_status=$?
18998   echo "$as_me:18998: \$? = $ac_status" >&5
18999   (exit $ac_status); } &&
19000          { ac_try='test -s conftest$ac_exeext'
19001   { (eval echo "$as_me:19001: \"$ac_try\"") >&5
19002   (eval $ac_try) 2>&5
19003   ac_status=$?
19004   echo "$as_me:19004: \$? = $ac_status" >&5
19005   (exit $ac_status); }; }; then
19006   eval "$as_ac_var=yes"
19007 else
19008   echo "$as_me: failed program was:" >&5
19009 cat conftest.$ac_ext >&5
19010 eval "$as_ac_var=no"
19011 fi
19012 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19013 fi
19014 echo "$as_me:19014: result: `eval echo '${'$as_ac_var'}'`" >&5
19015 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19016 if test `eval echo '${'$as_ac_var'}'` = yes; then
19017   cat >>confdefs.h <<EOF
19018 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19019 EOF
19020
19021 fi
19022 done
19023
19024 echo "$as_me:19024: checking if getenv returns consistent values" >&5
19025 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19026 if test "${cf_cv_consistent_getenv+set}" = set; then
19027   echo $ECHO_N "(cached) $ECHO_C" >&6
19028 else
19029
19030 if test "$cross_compiling" = yes; then
19031   cf_cv_consistent_getenv=unknown
19032 else
19033   cat >conftest.$ac_ext <<_ACEOF
19034 #line 19034 "configure"
19035 #include "confdefs.h"
19036
19037 #include <stdlib.h>
19038 #include <unistd.h>
19039 #include <stdio.h>
19040 #include <string.h>
19041 #include <sys/types.h>
19042
19043 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19044 extern char **environ;  /* POSIX, but some systems are not... */
19045 #endif
19046
19047 #if defined(HAVE_STRDUP)
19048 #define str_alloc(s) strdup(s)
19049 #else
19050 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19051 #endif
19052
19053 static void set_value(const char *name, const char *value)
19054 {
19055 #if defined(HAVE_SETENV)
19056         setenv(name, value, 1);
19057 #elif defined(HAVE_PUTENV)
19058         char buffer[1024];
19059         sprintf(buffer, "%s=%s", name, value);
19060         putenv(str_alloc(buffer));
19061 #else
19062 #error neither putenv/setenv found
19063 #endif
19064 }
19065 int main(void)
19066 {
19067         int pass;
19068         size_t numenv, limit, j;
19069         char **mynames;
19070         char **myvalues;
19071         char **mypointer;
19072         char *equals;
19073         for (numenv = 0; environ[numenv]; ++numenv) ;
19074         limit = numenv + 10;
19075         mynames = (char **) calloc(limit + 1, sizeof(char *));
19076         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19077         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19078 #if defined(HAVE_ENVIRON)
19079         for (j = 0; environ[j]; ++j) {
19080                 mynames[j] = str_alloc(environ[j]);
19081                 equals = strchr(mynames[j], '=');
19082                 if (equals != 0) {
19083                         *equals++ = '\0';
19084                         myvalues[j] = str_alloc(equals);
19085                 } else {
19086                         myvalues[j] = str_alloc("");
19087                 }
19088         }
19089 #endif
19090         for (j = numenv; j < limit; ++j) {
19091                 char name[80];
19092                 char value[80];
19093                 size_t found;
19094                 size_t k = 0;
19095                 do {
19096                         size_t jk;
19097                         found = 0;
19098                         sprintf(name, "TERM%lu", (unsigned long) k);
19099                         for (jk = 0; jk < j; ++jk) {
19100                                 if (!strcmp(name, mynames[jk])) {
19101                                         found = 1;
19102                                         ++k;
19103                                         break;
19104                                 }
19105                         }
19106                 } while (found);
19107                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19108                 set_value(name, value);
19109                 mynames[j] = str_alloc(name);
19110                 myvalues[j] = str_alloc(value);
19111         }
19112         for (pass = 0; pass < 3; ++pass) {
19113                 for (j = 0; j < limit; ++j) {
19114                         char *value = getenv(mynames[j]);
19115                         if (pass) {
19116                                 if (value == 0) {
19117                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19118                                         ${cf_cv_main_return:-return}(1);
19119                                 } else if (value != mypointer[j]) {
19120                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19121                                         ${cf_cv_main_return:-return}(1);
19122                                 } else if (strcmp(value, myvalues[j])) {
19123                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19124                                         ${cf_cv_main_return:-return}(1);
19125                                 }
19126                         } else {
19127                                 size_t k;
19128                                 mypointer[j] = value;
19129                                 for (k = 0; k < j; ++k) {
19130                                         if (mypointer[j] == mypointer[k]) {
19131                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19132                                                 ${cf_cv_main_return:-return}(1);
19133                                         }
19134                                 }
19135                         }
19136                 }
19137         }
19138         ${cf_cv_main_return:-return}(0);
19139 }
19140
19141 _ACEOF
19142 rm -f conftest$ac_exeext
19143 if { (eval echo "$as_me:19143: \"$ac_link\"") >&5
19144   (eval $ac_link) 2>&5
19145   ac_status=$?
19146   echo "$as_me:19146: \$? = $ac_status" >&5
19147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19148   { (eval echo "$as_me:19148: \"$ac_try\"") >&5
19149   (eval $ac_try) 2>&5
19150   ac_status=$?
19151   echo "$as_me:19151: \$? = $ac_status" >&5
19152   (exit $ac_status); }; }; then
19153   cf_cv_consistent_getenv=yes
19154 else
19155   echo "$as_me: program exited with status $ac_status" >&5
19156 echo "$as_me: failed program was:" >&5
19157 cat conftest.$ac_ext >&5
19158 cf_cv_consistent_getenv=no
19159 fi
19160 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19161 fi
19162
19163 fi
19164 echo "$as_me:19164: result: $cf_cv_consistent_getenv" >&5
19165 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19166
19167 if test "x$cf_cv_consistent_getenv" = xno
19168 then
19169
19170 cat >>confdefs.h <<\EOF
19171 #define HAVE_CONSISTENT_GETENV 1
19172 EOF
19173
19174 fi
19175
19176 if test "x$cf_cv_consistent_getenv" = xno && \
19177         test "x$cf_with_trace" = xyes
19178 then
19179         { echo "$as_me:19179: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19180 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19181 fi
19182
19183 echo "$as_me:19183: checking if sys/time.h works with sys/select.h" >&5
19184 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19185 if test "${cf_cv_sys_time_select+set}" = set; then
19186   echo $ECHO_N "(cached) $ECHO_C" >&6
19187 else
19188
19189 cat >conftest.$ac_ext <<_ACEOF
19190 #line 19190 "configure"
19191 #include "confdefs.h"
19192
19193 #include <sys/types.h>
19194 #ifdef HAVE_SYS_TIME_H
19195 #include <sys/time.h>
19196 #endif
19197 #ifdef HAVE_SYS_SELECT_H
19198 #include <sys/select.h>
19199 #endif
19200
19201 int
19202 main (void)
19203 {
19204
19205   ;
19206   return 0;
19207 }
19208 _ACEOF
19209 rm -f conftest.$ac_objext
19210 if { (eval echo "$as_me:19210: \"$ac_compile\"") >&5
19211   (eval $ac_compile) 2>&5
19212   ac_status=$?
19213   echo "$as_me:19213: \$? = $ac_status" >&5
19214   (exit $ac_status); } &&
19215          { ac_try='test -s conftest.$ac_objext'
19216   { (eval echo "$as_me:19216: \"$ac_try\"") >&5
19217   (eval $ac_try) 2>&5
19218   ac_status=$?
19219   echo "$as_me:19219: \$? = $ac_status" >&5
19220   (exit $ac_status); }; }; then
19221   cf_cv_sys_time_select=yes
19222 else
19223   echo "$as_me: failed program was:" >&5
19224 cat conftest.$ac_ext >&5
19225 cf_cv_sys_time_select=no
19226 fi
19227 rm -f conftest.$ac_objext conftest.$ac_ext
19228
19229 fi
19230
19231 echo "$as_me:19231: result: $cf_cv_sys_time_select" >&5
19232 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19233 test "$cf_cv_sys_time_select" = yes &&
19234 cat >>confdefs.h <<\EOF
19235 #define HAVE_SYS_TIME_SELECT 1
19236 EOF
19237
19238 ###     checks for compiler characteristics
19239 ac_ext=c
19240 ac_cpp='$CPP $CPPFLAGS'
19241 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19242 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19243 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19244 ac_main_return=return
19245
19246 echo "$as_me:19246: checking for an ANSI C-conforming const" >&5
19247 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19248 if test "${ac_cv_c_const+set}" = set; then
19249   echo $ECHO_N "(cached) $ECHO_C" >&6
19250 else
19251   cat >conftest.$ac_ext <<_ACEOF
19252 #line 19252 "configure"
19253 #include "confdefs.h"
19254
19255 int
19256 main (void)
19257 {
19258 /* FIXME: Include the comments suggested by Paul. */
19259 #ifndef __cplusplus
19260   /* Ultrix mips cc rejects this.  */
19261   typedef int charset[2];
19262   const charset x;
19263   /* SunOS 4.1.1 cc rejects this.  */
19264   char const *const *ccp;
19265   char **p;
19266   /* NEC SVR4.0.2 mips cc rejects this.  */
19267   struct point {int x, y;};
19268   static struct point const zero = {0,0};
19269   /* AIX XL C 1.02.0.0 rejects this.
19270      It does not let you subtract one const X* pointer from another in
19271      an arm of an if-expression whose if-part is not a constant
19272      expression */
19273   const char *g = "string";
19274   ccp = &g + (g ? g-g : 0);
19275   /* HPUX 7.0 cc rejects these. */
19276   ++ccp;
19277   p = (char**) ccp;
19278   ccp = (char const *const *) p;
19279   { /* SCO 3.2v4 cc rejects this.  */
19280     char *t;
19281     char const *s = 0 ? (char *) 0 : (char const *) 0;
19282
19283     *t++ = 0;
19284   }
19285   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19286     int x[] = {25, 17};
19287     const int *foo = &x[0];
19288     ++foo;
19289   }
19290   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19291     typedef const int *iptr;
19292     iptr p = 0;
19293     ++p;
19294   }
19295   { /* AIX XL C 1.02.0.0 rejects this saying
19296        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19297     struct s { int j; const int *ap[3]; };
19298     struct s *b; b->j = 5;
19299   }
19300   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19301     const int foo = 10;
19302   }
19303 #endif
19304
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f conftest.$ac_objext
19310 if { (eval echo "$as_me:19310: \"$ac_compile\"") >&5
19311   (eval $ac_compile) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit $ac_status); } &&
19315          { ac_try='test -s conftest.$ac_objext'
19316   { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit $ac_status); }; }; then
19321   ac_cv_c_const=yes
19322 else
19323   echo "$as_me: failed program was:" >&5
19324 cat conftest.$ac_ext >&5
19325 ac_cv_c_const=no
19326 fi
19327 rm -f conftest.$ac_objext conftest.$ac_ext
19328 fi
19329 echo "$as_me:19329: result: $ac_cv_c_const" >&5
19330 echo "${ECHO_T}$ac_cv_c_const" >&6
19331 if test $ac_cv_c_const = no; then
19332
19333 cat >>confdefs.h <<\EOF
19334 #define const
19335 EOF
19336
19337 fi
19338
19339 echo "$as_me:19339: checking for inline" >&5
19340 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19341 if test "${ac_cv_c_inline+set}" = set; then
19342   echo $ECHO_N "(cached) $ECHO_C" >&6
19343 else
19344   ac_cv_c_inline=no
19345 for ac_kw in inline __inline__ __inline; do
19346   cat >conftest.$ac_ext <<_ACEOF
19347 #line 19347 "configure"
19348 #include "confdefs.h"
19349 #ifndef __cplusplus
19350 static $ac_kw int static_foo () {return 0; }
19351 $ac_kw int foo () {return 0; }
19352 #endif
19353
19354 _ACEOF
19355 rm -f conftest.$ac_objext
19356 if { (eval echo "$as_me:19356: \"$ac_compile\"") >&5
19357   (eval $ac_compile) 2>&5
19358   ac_status=$?
19359   echo "$as_me:19359: \$? = $ac_status" >&5
19360   (exit $ac_status); } &&
19361          { ac_try='test -s conftest.$ac_objext'
19362   { (eval echo "$as_me:19362: \"$ac_try\"") >&5
19363   (eval $ac_try) 2>&5
19364   ac_status=$?
19365   echo "$as_me:19365: \$? = $ac_status" >&5
19366   (exit $ac_status); }; }; then
19367   ac_cv_c_inline=$ac_kw; break
19368 else
19369   echo "$as_me: failed program was:" >&5
19370 cat conftest.$ac_ext >&5
19371 fi
19372 rm -f conftest.$ac_objext conftest.$ac_ext
19373 done
19374
19375 fi
19376 echo "$as_me:19376: result: $ac_cv_c_inline" >&5
19377 echo "${ECHO_T}$ac_cv_c_inline" >&6
19378 case $ac_cv_c_inline in
19379   inline | yes) ;;
19380   no)
19381 cat >>confdefs.h <<\EOF
19382 #define inline
19383 EOF
19384  ;;
19385   *)  cat >>confdefs.h <<EOF
19386 #define inline $ac_cv_c_inline
19387 EOF
19388  ;;
19389 esac
19390
19391 NCURSES_INLINE=
19392 if test "$ac_cv_c_inline" != no ; then
19393         NCURSES_INLINE=inline
19394         if test "$INTEL_COMPILER" = yes
19395         then
19396                 :
19397         elif test "$CLANG_COMPILER" = yes
19398         then
19399                 :
19400         elif test "$GCC" = yes
19401         then
19402                 echo "$as_me:19402: checking if $CC supports options to tune inlining" >&5
19403 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19404 if test "${cf_cv_gcc_inline+set}" = set; then
19405   echo $ECHO_N "(cached) $ECHO_C" >&6
19406 else
19407
19408                 cf_save_CFLAGS=$CFLAGS
19409                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19410                 cat >conftest.$ac_ext <<_ACEOF
19411 #line 19411 "configure"
19412 #include "confdefs.h"
19413 inline int foo(void) { return 1; }
19414 int
19415 main (void)
19416 {
19417 ${cf_cv_main_return:-return} foo()
19418   ;
19419   return 0;
19420 }
19421 _ACEOF
19422 rm -f conftest.$ac_objext
19423 if { (eval echo "$as_me:19423: \"$ac_compile\"") >&5
19424   (eval $ac_compile) 2>&5
19425   ac_status=$?
19426   echo "$as_me:19426: \$? = $ac_status" >&5
19427   (exit $ac_status); } &&
19428          { ac_try='test -s conftest.$ac_objext'
19429   { (eval echo "$as_me:19429: \"$ac_try\"") >&5
19430   (eval $ac_try) 2>&5
19431   ac_status=$?
19432   echo "$as_me:19432: \$? = $ac_status" >&5
19433   (exit $ac_status); }; }; then
19434   cf_cv_gcc_inline=yes
19435 else
19436   echo "$as_me: failed program was:" >&5
19437 cat conftest.$ac_ext >&5
19438 cf_cv_gcc_inline=no
19439 fi
19440 rm -f conftest.$ac_objext conftest.$ac_ext
19441                 CFLAGS=$cf_save_CFLAGS
19442
19443 fi
19444 echo "$as_me:19444: result: $cf_cv_gcc_inline" >&5
19445 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19446                 if test "$cf_cv_gcc_inline" = yes ; then
19447
19448 cf_fix_cppflags=no
19449 cf_new_cflags=
19450 cf_new_cppflags=
19451 cf_new_extra_cppflags=
19452
19453 for cf_add_cflags in --param max-inline-insns-single=1200
19454 do
19455 case $cf_fix_cppflags in
19456 (no)
19457         case $cf_add_cflags in
19458         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19459                 case $cf_add_cflags in
19460                 (-D*)
19461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19462
19463                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19464                                 && test -z "${cf_tst_cflags}" \
19465                                 && cf_fix_cppflags=yes
19466
19467                         if test $cf_fix_cppflags = yes ; then
19468
19469         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19470         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19471
19472                                 continue
19473                         elif test "${cf_tst_cflags}" = "\"'" ; then
19474
19475         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19476         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19477
19478                                 continue
19479                         fi
19480                         ;;
19481                 esac
19482                 case "$CPPFLAGS" in
19483                 (*$cf_add_cflags)
19484                         ;;
19485                 (*)
19486                         case $cf_add_cflags in
19487                         (-D*)
19488                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19489
19490 CPPFLAGS=`echo "$CPPFLAGS" | \
19491         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19492                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19493
19494                                 ;;
19495                         esac
19496
19497         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19498         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19499
19500                         ;;
19501                 esac
19502                 ;;
19503         (*)
19504
19505         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19506         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19507
19508                 ;;
19509         esac
19510         ;;
19511 (yes)
19512
19513         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19514         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19515
19516         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19517
19518         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19519                 && test -z "${cf_tst_cflags}" \
19520                 && cf_fix_cppflags=no
19521         ;;
19522 esac
19523 done
19524
19525 if test -n "$cf_new_cflags" ; then
19526
19527         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19528         CFLAGS="${CFLAGS}$cf_new_cflags"
19529
19530 fi
19531
19532 if test -n "$cf_new_cppflags" ; then
19533
19534         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19535         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19536
19537 fi
19538
19539 if test -n "$cf_new_extra_cppflags" ; then
19540
19541         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19542         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19543
19544 fi
19545
19546                 fi
19547         fi
19548 fi
19549
19550 echo "$as_me:19550: checking for signal global datatype" >&5
19551 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19552 if test "${cf_cv_sig_atomic_t+set}" = set; then
19553   echo $ECHO_N "(cached) $ECHO_C" >&6
19554 else
19555
19556         for cf_type in \
19557                 "volatile sig_atomic_t" \
19558                 "sig_atomic_t" \
19559                 "int"
19560         do
19561         cat >conftest.$ac_ext <<_ACEOF
19562 #line 19562 "configure"
19563 #include "confdefs.h"
19564
19565 #include <sys/types.h>
19566 #include <signal.h>
19567 #include <stdio.h>
19568
19569 extern $cf_type x;
19570 $cf_type x;
19571 static void handler(int sig)
19572 {
19573         (void)sig;
19574         x = 5;
19575 }
19576 int
19577 main (void)
19578 {
19579 signal(SIGINT, handler);
19580                  x = 1
19581   ;
19582   return 0;
19583 }
19584 _ACEOF
19585 rm -f conftest.$ac_objext
19586 if { (eval echo "$as_me:19586: \"$ac_compile\"") >&5
19587   (eval $ac_compile) 2>&5
19588   ac_status=$?
19589   echo "$as_me:19589: \$? = $ac_status" >&5
19590   (exit $ac_status); } &&
19591          { ac_try='test -s conftest.$ac_objext'
19592   { (eval echo "$as_me:19592: \"$ac_try\"") >&5
19593   (eval $ac_try) 2>&5
19594   ac_status=$?
19595   echo "$as_me:19595: \$? = $ac_status" >&5
19596   (exit $ac_status); }; }; then
19597   cf_cv_sig_atomic_t=$cf_type
19598 else
19599   echo "$as_me: failed program was:" >&5
19600 cat conftest.$ac_ext >&5
19601 cf_cv_sig_atomic_t=no
19602 fi
19603 rm -f conftest.$ac_objext conftest.$ac_ext
19604                 test "$cf_cv_sig_atomic_t" != no && break
19605         done
19606
19607 fi
19608
19609 echo "$as_me:19609: result: $cf_cv_sig_atomic_t" >&5
19610 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19611 test "$cf_cv_sig_atomic_t" != no &&
19612 cat >>confdefs.h <<EOF
19613 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19614 EOF
19615
19616 if test $NCURSES_CHTYPE = auto ; then
19617
19618 echo "$as_me:19618: checking for type of chtype" >&5
19619 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19620 if test "${cf_cv_typeof_chtype+set}" = set; then
19621   echo $ECHO_N "(cached) $ECHO_C" >&6
19622 else
19623
19624                 if test "$cross_compiling" = yes; then
19625   cf_cv_typeof_chtype=long
19626 else
19627   cat >conftest.$ac_ext <<_ACEOF
19628 #line 19628 "configure"
19629 #include "confdefs.h"
19630
19631 #define WANT_BITS 31
19632 #include <stdio.h>
19633 int main(void)
19634 {
19635         FILE *fp = fopen("cf_test.out", "w");
19636         if (fp != 0) {
19637                 char *result = "long";
19638                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19639                         int n;
19640                         unsigned int x, y;
19641                         for (n = 0; n < WANT_BITS; n++) {
19642                                 x = (1 << n);
19643                                 y = (x >> n);
19644                                 if (y != 1 || x == 0) {
19645                                         x = 0;
19646                                         break;
19647                                 }
19648                         }
19649                         /*
19650                          * If x is nonzero, an int is big enough for the bits
19651                          * that we want.
19652                          */
19653                         result = (x != 0) ? "int" : "long";
19654                 }
19655                 fputs(result, fp);
19656                 fclose(fp);
19657         }
19658         ${cf_cv_main_return:-return}(0);
19659 }
19660
19661 _ACEOF
19662 rm -f conftest$ac_exeext
19663 if { (eval echo "$as_me:19663: \"$ac_link\"") >&5
19664   (eval $ac_link) 2>&5
19665   ac_status=$?
19666   echo "$as_me:19666: \$? = $ac_status" >&5
19667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19668   { (eval echo "$as_me:19668: \"$ac_try\"") >&5
19669   (eval $ac_try) 2>&5
19670   ac_status=$?
19671   echo "$as_me:19671: \$? = $ac_status" >&5
19672   (exit $ac_status); }; }; then
19673   cf_cv_typeof_chtype=`cat cf_test.out`
19674 else
19675   echo "$as_me: program exited with status $ac_status" >&5
19676 echo "$as_me: failed program was:" >&5
19677 cat conftest.$ac_ext >&5
19678 cf_cv_typeof_chtype=long
19679 fi
19680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19681 fi
19682                 rm -f cf_test.out
19683
19684 fi
19685
19686 echo "$as_me:19686: result: $cf_cv_typeof_chtype" >&5
19687 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19688
19689 cat >>confdefs.h <<EOF
19690 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19691 EOF
19692
19693 else
19694         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19695 fi
19696 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19697
19698 echo "$as_me:19698: checking if unsigned literals are legal" >&5
19699 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19700 if test "${cf_cv_unsigned_literals+set}" = set; then
19701   echo $ECHO_N "(cached) $ECHO_C" >&6
19702 else
19703
19704         cat >conftest.$ac_ext <<_ACEOF
19705 #line 19705 "configure"
19706 #include "confdefs.h"
19707
19708 int
19709 main (void)
19710 {
19711 long x = 1L + 1UL + 1U + 1
19712   ;
19713   return 0;
19714 }
19715 _ACEOF
19716 rm -f conftest.$ac_objext
19717 if { (eval echo "$as_me:19717: \"$ac_compile\"") >&5
19718   (eval $ac_compile) 2>&5
19719   ac_status=$?
19720   echo "$as_me:19720: \$? = $ac_status" >&5
19721   (exit $ac_status); } &&
19722          { ac_try='test -s conftest.$ac_objext'
19723   { (eval echo "$as_me:19723: \"$ac_try\"") >&5
19724   (eval $ac_try) 2>&5
19725   ac_status=$?
19726   echo "$as_me:19726: \$? = $ac_status" >&5
19727   (exit $ac_status); }; }; then
19728   cf_cv_unsigned_literals=yes
19729 else
19730   echo "$as_me: failed program was:" >&5
19731 cat conftest.$ac_ext >&5
19732 cf_cv_unsigned_literals=no
19733 fi
19734 rm -f conftest.$ac_objext conftest.$ac_ext
19735
19736 fi
19737
19738 echo "$as_me:19738: result: $cf_cv_unsigned_literals" >&5
19739 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19740
19741 cf_cv_1UL="1"
19742 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19743 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19744
19745 if test $NCURSES_MMASK_T = auto ; then
19746         cf_cv_typeof_mmask_t=long
19747 else
19748         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19749 fi
19750 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19751
19752 ###     Checks for external-data
19753
19754 echo "$as_me:19754: checking if external errno is declared" >&5
19755 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19756 if test "${cf_cv_dcl_errno+set}" = set; then
19757   echo $ECHO_N "(cached) $ECHO_C" >&6
19758 else
19759
19760         cat >conftest.$ac_ext <<_ACEOF
19761 #line 19761 "configure"
19762 #include "confdefs.h"
19763
19764 #ifdef HAVE_STDLIB_H
19765 #include <stdlib.h>
19766 #endif
19767 #include <stdio.h>
19768 #include <sys/types.h>
19769 #include <errno.h>
19770 int
19771 main (void)
19772 {
19773 int x = (int) errno; (void)x
19774   ;
19775   return 0;
19776 }
19777 _ACEOF
19778 rm -f conftest.$ac_objext
19779 if { (eval echo "$as_me:19779: \"$ac_compile\"") >&5
19780   (eval $ac_compile) 2>&5
19781   ac_status=$?
19782   echo "$as_me:19782: \$? = $ac_status" >&5
19783   (exit $ac_status); } &&
19784          { ac_try='test -s conftest.$ac_objext'
19785   { (eval echo "$as_me:19785: \"$ac_try\"") >&5
19786   (eval $ac_try) 2>&5
19787   ac_status=$?
19788   echo "$as_me:19788: \$? = $ac_status" >&5
19789   (exit $ac_status); }; }; then
19790   cf_cv_dcl_errno=yes
19791 else
19792   echo "$as_me: failed program was:" >&5
19793 cat conftest.$ac_ext >&5
19794 cf_cv_dcl_errno=no
19795 fi
19796 rm -f conftest.$ac_objext conftest.$ac_ext
19797
19798 fi
19799 echo "$as_me:19799: result: $cf_cv_dcl_errno" >&5
19800 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19801
19802 if test "$cf_cv_dcl_errno" = no ; then
19803
19804 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19805
19806         cat >>confdefs.h <<EOF
19807 #define $cf_result 1
19808 EOF
19809
19810 fi
19811
19812 # It's possible (for near-UNIX clones) that the data doesn't exist
19813
19814 echo "$as_me:19814: checking if external errno exists" >&5
19815 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19816 if test "${cf_cv_have_errno+set}" = set; then
19817   echo $ECHO_N "(cached) $ECHO_C" >&6
19818 else
19819
19820         cat >conftest.$ac_ext <<_ACEOF
19821 #line 19821 "configure"
19822 #include "confdefs.h"
19823
19824 #undef errno
19825 extern int errno;
19826
19827 int
19828 main (void)
19829 {
19830 errno = 2
19831   ;
19832   return 0;
19833 }
19834 _ACEOF
19835 rm -f conftest.$ac_objext conftest$ac_exeext
19836 if { (eval echo "$as_me:19836: \"$ac_link\"") >&5
19837   (eval $ac_link) 2>&5
19838   ac_status=$?
19839   echo "$as_me:19839: \$? = $ac_status" >&5
19840   (exit $ac_status); } &&
19841          { ac_try='test -s conftest$ac_exeext'
19842   { (eval echo "$as_me:19842: \"$ac_try\"") >&5
19843   (eval $ac_try) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit $ac_status); }; }; then
19847   cf_cv_have_errno=yes
19848 else
19849   echo "$as_me: failed program was:" >&5
19850 cat conftest.$ac_ext >&5
19851 cf_cv_have_errno=no
19852 fi
19853 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19854
19855 fi
19856 echo "$as_me:19856: result: $cf_cv_have_errno" >&5
19857 echo "${ECHO_T}$cf_cv_have_errno" >&6
19858
19859 if test "$cf_cv_have_errno" = yes ; then
19860
19861 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19862
19863         cat >>confdefs.h <<EOF
19864 #define $cf_result 1
19865 EOF
19866
19867 fi
19868
19869 echo "$as_me:19869: checking if data-only library module links" >&5
19870 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19871 if test "${cf_cv_link_dataonly+set}" = set; then
19872   echo $ECHO_N "(cached) $ECHO_C" >&6
19873 else
19874
19875         rm -f conftest.a
19876         cat >conftest.$ac_ext <<EOF
19877 #line 19877 "configure"
19878 int     testdata[3] = { 123, 456, 789 };
19879 EOF
19880         if { (eval echo "$as_me:19880: \"$ac_compile\"") >&5
19881   (eval $ac_compile) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit $ac_status); } ; then
19885                 mv conftest.o data.o && \
19886                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
19887         fi
19888         rm -f conftest.$ac_ext data.o
19889         cat >conftest.$ac_ext <<EOF
19890 #line 19890 "configure"
19891 int     testfunc(void)
19892 {
19893 #if defined(NeXT)
19894         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
19895 #else
19896         extern int testdata[3];
19897         return testdata[0] == 123
19898            &&  testdata[1] == 456
19899            &&  testdata[2] == 789;
19900 #endif
19901 }
19902 EOF
19903         if { (eval echo "$as_me:19903: \"$ac_compile\"") >&5
19904   (eval $ac_compile) 2>&5
19905   ac_status=$?
19906   echo "$as_me:19906: \$? = $ac_status" >&5
19907   (exit $ac_status); }; then
19908                 mv conftest.o func.o && \
19909                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
19910         fi
19911         rm -f conftest.$ac_ext func.o
19912         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
19913         cf_saveLIBS="$LIBS"
19914         LIBS="conftest.a $LIBS"
19915         if test "$cross_compiling" = yes; then
19916   cf_cv_link_dataonly=unknown
19917 else
19918   cat >conftest.$ac_ext <<_ACEOF
19919 #line 19919 "configure"
19920 #include "confdefs.h"
19921
19922         int main(void)
19923         {
19924                 extern int testfunc();
19925                 ${cf_cv_main_return:-return} (!testfunc());
19926         }
19927
19928 _ACEOF
19929 rm -f conftest$ac_exeext
19930 if { (eval echo "$as_me:19930: \"$ac_link\"") >&5
19931   (eval $ac_link) 2>&5
19932   ac_status=$?
19933   echo "$as_me:19933: \$? = $ac_status" >&5
19934   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19935   { (eval echo "$as_me:19935: \"$ac_try\"") >&5
19936   (eval $ac_try) 2>&5
19937   ac_status=$?
19938   echo "$as_me:19938: \$? = $ac_status" >&5
19939   (exit $ac_status); }; }; then
19940   cf_cv_link_dataonly=yes
19941 else
19942   echo "$as_me: program exited with status $ac_status" >&5
19943 echo "$as_me: failed program was:" >&5
19944 cat conftest.$ac_ext >&5
19945 cf_cv_link_dataonly=no
19946 fi
19947 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19948 fi
19949         LIBS="$cf_saveLIBS"
19950
19951 fi
19952
19953 echo "$as_me:19953: result: $cf_cv_link_dataonly" >&5
19954 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
19955
19956 if test "$cf_cv_link_dataonly" = no ; then
19957
19958 cat >>confdefs.h <<\EOF
19959 #define BROKEN_LINKER 1
19960 EOF
19961
19962         BROKEN_LINKER=1
19963 fi
19964
19965 ###     Checks for library functions.
19966
19967 for ac_func in \
19968 getcwd \
19969 getegid \
19970 geteuid \
19971 getopt \
19972 getttynam \
19973 issetugid \
19974 localeconv \
19975 poll \
19976 putenv \
19977 remove \
19978 select \
19979 setbuf \
19980 setbuffer \
19981 setenv \
19982 setvbuf \
19983 sigaction \
19984 sigvec \
19985 snprintf \
19986 strdup \
19987 strstr \
19988 sysconf \
19989 tcgetpgrp \
19990 times \
19991 tsearch \
19992 vsnprintf \
19993
19994 do
19995 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19996 echo "$as_me:19996: checking for $ac_func" >&5
19997 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19998 if eval "test \"\${$as_ac_var+set}\" = set"; then
19999   echo $ECHO_N "(cached) $ECHO_C" >&6
20000 else
20001   cat >conftest.$ac_ext <<_ACEOF
20002 #line 20002 "configure"
20003 #include "confdefs.h"
20004 #define $ac_func autoconf_temporary
20005 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20006 #undef $ac_func
20007
20008 #ifdef __cplusplus
20009 extern "C"
20010 #endif
20011
20012 /* We use char because int might match the return type of a gcc2
20013    builtin and then its argument prototype would still apply.  */
20014 char $ac_func (void);
20015
20016 int
20017 main (void)
20018 {
20019
20020 /* The GNU C library defines stubs for functions which it implements
20021     to always fail with ENOSYS.  Some functions are actually named
20022     something starting with __ and the normal name is an alias.  */
20023 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20024 #error found stub for $ac_func
20025 #endif
20026
20027         return $ac_func ();
20028   ;
20029   return 0;
20030 }
20031 _ACEOF
20032 rm -f conftest.$ac_objext conftest$ac_exeext
20033 if { (eval echo "$as_me:20033: \"$ac_link\"") >&5
20034   (eval $ac_link) 2>&5
20035   ac_status=$?
20036   echo "$as_me:20036: \$? = $ac_status" >&5
20037   (exit $ac_status); } &&
20038          { ac_try='test -s conftest$ac_exeext'
20039   { (eval echo "$as_me:20039: \"$ac_try\"") >&5
20040   (eval $ac_try) 2>&5
20041   ac_status=$?
20042   echo "$as_me:20042: \$? = $ac_status" >&5
20043   (exit $ac_status); }; }; then
20044   eval "$as_ac_var=yes"
20045 else
20046   echo "$as_me: failed program was:" >&5
20047 cat conftest.$ac_ext >&5
20048 eval "$as_ac_var=no"
20049 fi
20050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20051 fi
20052 echo "$as_me:20052: result: `eval echo '${'$as_ac_var'}'`" >&5
20053 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20054 if test `eval echo '${'$as_ac_var'}'` = yes; then
20055   cat >>confdefs.h <<EOF
20056 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20057 EOF
20058
20059 fi
20060 done
20061
20062 if test "x$ac_cv_func_getopt" = xno && \
20063    test "x$cf_with_progs$cf_with_tests" != xnono; then
20064         { { echo "$as_me:20064: error: getopt is required for building programs" >&5
20065 echo "$as_me: error: getopt is required for building programs" >&2;}
20066    { (exit 1); exit 1; }; }
20067 fi
20068
20069 if test "x$with_safe_sprintf" = xyes
20070 then
20071         if test "x$ac_cv_func_vsnprintf" = xyes
20072         then
20073                 { echo "$as_me:20073: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20074 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20075         else
20076
20077 cat >>confdefs.h <<\EOF
20078 #define USE_SAFE_SPRINTF 1
20079 EOF
20080
20081         fi
20082 fi
20083
20084 if test "x$with_getcap" = "xyes" ; then
20085
20086 echo "$as_me:20086: checking for terminal-capability database functions" >&5
20087 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20088 if test "${cf_cv_cgetent+set}" = set; then
20089   echo $ECHO_N "(cached) $ECHO_C" >&6
20090 else
20091
20092 cat >conftest.$ac_ext <<_ACEOF
20093 #line 20093 "configure"
20094 #include "confdefs.h"
20095
20096 #include <stdlib.h>
20097 int
20098 main (void)
20099 {
20100
20101         char temp[128];
20102         char *buf = temp;
20103         char *db_array = temp;
20104         cgetent(&buf, &db_array, "vt100");
20105         cgetcap(buf, "tc", '=');
20106         cgetmatch(buf, "tc");
20107
20108   ;
20109   return 0;
20110 }
20111 _ACEOF
20112 rm -f conftest.$ac_objext conftest$ac_exeext
20113 if { (eval echo "$as_me:20113: \"$ac_link\"") >&5
20114   (eval $ac_link) 2>&5
20115   ac_status=$?
20116   echo "$as_me:20116: \$? = $ac_status" >&5
20117   (exit $ac_status); } &&
20118          { ac_try='test -s conftest$ac_exeext'
20119   { (eval echo "$as_me:20119: \"$ac_try\"") >&5
20120   (eval $ac_try) 2>&5
20121   ac_status=$?
20122   echo "$as_me:20122: \$? = $ac_status" >&5
20123   (exit $ac_status); }; }; then
20124   cf_cv_cgetent=yes
20125 else
20126   echo "$as_me: failed program was:" >&5
20127 cat conftest.$ac_ext >&5
20128 cf_cv_cgetent=no
20129 fi
20130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20131
20132 fi
20133 echo "$as_me:20133: result: $cf_cv_cgetent" >&5
20134 echo "${ECHO_T}$cf_cv_cgetent" >&6
20135
20136 if test "$cf_cv_cgetent" = yes
20137 then
20138
20139 cat >>confdefs.h <<\EOF
20140 #define HAVE_BSD_CGETENT 1
20141 EOF
20142
20143 echo "$as_me:20143: checking if cgetent uses const parameter" >&5
20144 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20145 if test "${cf_cv_cgetent_const+set}" = set; then
20146   echo $ECHO_N "(cached) $ECHO_C" >&6
20147 else
20148
20149 cat >conftest.$ac_ext <<_ACEOF
20150 #line 20150 "configure"
20151 #include "confdefs.h"
20152
20153 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20154 #include <stdlib.h>
20155 int
20156 main (void)
20157 {
20158
20159         char temp[128];
20160         char *buf = temp;
20161 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20162         const char *db_array = temp;
20163         cgetent(&buf, &db_array, "vt100");
20164 #endif
20165         cgetcap(buf, "tc", '=');
20166         cgetmatch(buf, "tc");
20167
20168   ;
20169   return 0;
20170 }
20171 _ACEOF
20172 rm -f conftest.$ac_objext conftest$ac_exeext
20173 if { (eval echo "$as_me:20173: \"$ac_link\"") >&5
20174   (eval $ac_link) 2>&5
20175   ac_status=$?
20176   echo "$as_me:20176: \$? = $ac_status" >&5
20177   (exit $ac_status); } &&
20178          { ac_try='test -s conftest$ac_exeext'
20179   { (eval echo "$as_me:20179: \"$ac_try\"") >&5
20180   (eval $ac_try) 2>&5
20181   ac_status=$?
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit $ac_status); }; }; then
20184   cf_cv_cgetent_const=yes
20185 else
20186   echo "$as_me: failed program was:" >&5
20187 cat conftest.$ac_ext >&5
20188 cf_cv_cgetent_const=no
20189 fi
20190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20191
20192 fi
20193 echo "$as_me:20193: result: $cf_cv_cgetent_const" >&5
20194 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20195         if test "$cf_cv_cgetent_const" = yes
20196         then
20197
20198 cat >>confdefs.h <<EOF
20199 #define CGETENT_CONST const
20200 EOF
20201
20202         fi
20203 fi
20204
20205 fi
20206
20207 echo "$as_me:20207: checking for isascii" >&5
20208 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20209 if test "${cf_cv_have_isascii+set}" = set; then
20210   echo $ECHO_N "(cached) $ECHO_C" >&6
20211 else
20212
20213         cat >conftest.$ac_ext <<_ACEOF
20214 #line 20214 "configure"
20215 #include "confdefs.h"
20216 #include <ctype.h>
20217 int
20218 main (void)
20219 {
20220 int x = isascii(' ')
20221   ;
20222   return 0;
20223 }
20224 _ACEOF
20225 rm -f conftest.$ac_objext conftest$ac_exeext
20226 if { (eval echo "$as_me:20226: \"$ac_link\"") >&5
20227   (eval $ac_link) 2>&5
20228   ac_status=$?
20229   echo "$as_me:20229: \$? = $ac_status" >&5
20230   (exit $ac_status); } &&
20231          { ac_try='test -s conftest$ac_exeext'
20232   { (eval echo "$as_me:20232: \"$ac_try\"") >&5
20233   (eval $ac_try) 2>&5
20234   ac_status=$?
20235   echo "$as_me:20235: \$? = $ac_status" >&5
20236   (exit $ac_status); }; }; then
20237   cf_cv_have_isascii=yes
20238 else
20239   echo "$as_me: failed program was:" >&5
20240 cat conftest.$ac_ext >&5
20241 cf_cv_have_isascii=no
20242 fi
20243 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20244
20245 fi
20246 echo "$as_me:20246: result: $cf_cv_have_isascii" >&5
20247 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20248 test "$cf_cv_have_isascii" = yes &&
20249 cat >>confdefs.h <<\EOF
20250 #define HAVE_ISASCII 1
20251 EOF
20252
20253 if test "$ac_cv_func_sigaction" = yes; then
20254 echo "$as_me:20254: checking whether sigaction needs _POSIX_SOURCE" >&5
20255 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20256 cat >conftest.$ac_ext <<_ACEOF
20257 #line 20257 "configure"
20258 #include "confdefs.h"
20259
20260 #include <sys/types.h>
20261 #include <signal.h>
20262 int
20263 main (void)
20264 {
20265 struct sigaction act
20266   ;
20267   return 0;
20268 }
20269 _ACEOF
20270 rm -f conftest.$ac_objext
20271 if { (eval echo "$as_me:20271: \"$ac_compile\"") >&5
20272   (eval $ac_compile) 2>&5
20273   ac_status=$?
20274   echo "$as_me:20274: \$? = $ac_status" >&5
20275   (exit $ac_status); } &&
20276          { ac_try='test -s conftest.$ac_objext'
20277   { (eval echo "$as_me:20277: \"$ac_try\"") >&5
20278   (eval $ac_try) 2>&5
20279   ac_status=$?
20280   echo "$as_me:20280: \$? = $ac_status" >&5
20281   (exit $ac_status); }; }; then
20282   sigact_bad=no
20283 else
20284   echo "$as_me: failed program was:" >&5
20285 cat conftest.$ac_ext >&5
20286
20287 cat >conftest.$ac_ext <<_ACEOF
20288 #line 20288 "configure"
20289 #include "confdefs.h"
20290
20291 #define _POSIX_SOURCE
20292 #include <sys/types.h>
20293 #include <signal.h>
20294 int
20295 main (void)
20296 {
20297 struct sigaction act
20298   ;
20299   return 0;
20300 }
20301 _ACEOF
20302 rm -f conftest.$ac_objext
20303 if { (eval echo "$as_me:20303: \"$ac_compile\"") >&5
20304   (eval $ac_compile) 2>&5
20305   ac_status=$?
20306   echo "$as_me:20306: \$? = $ac_status" >&5
20307   (exit $ac_status); } &&
20308          { ac_try='test -s conftest.$ac_objext'
20309   { (eval echo "$as_me:20309: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:20312: \$? = $ac_status" >&5
20313   (exit $ac_status); }; }; then
20314   sigact_bad=yes
20315
20316 cat >>confdefs.h <<\EOF
20317 #define _POSIX_SOURCE 1
20318 EOF
20319
20320 else
20321   echo "$as_me: failed program was:" >&5
20322 cat conftest.$ac_ext >&5
20323 sigact_bad=unknown
20324 fi
20325 rm -f conftest.$ac_objext conftest.$ac_ext
20326 fi
20327 rm -f conftest.$ac_objext conftest.$ac_ext
20328 echo "$as_me:20328: result: $sigact_bad" >&5
20329 echo "${ECHO_T}$sigact_bad" >&6
20330 fi
20331
20332 echo "$as_me:20332: checking if nanosleep really works" >&5
20333 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20334 if test "${cf_cv_func_nanosleep+set}" = set; then
20335   echo $ECHO_N "(cached) $ECHO_C" >&6
20336 else
20337
20338 if test "$cross_compiling" = yes; then
20339   cf_cv_func_nanosleep=unknown
20340 else
20341   cat >conftest.$ac_ext <<_ACEOF
20342 #line 20342 "configure"
20343 #include "confdefs.h"
20344
20345 #include <stdio.h>
20346 #include <errno.h>
20347 #include <time.h>
20348
20349 #ifdef HAVE_SYS_TIME_H
20350 #include <sys/time.h>
20351 #endif
20352
20353 int main(void) {
20354         struct timespec ts1, ts2;
20355         int code;
20356         ts1.tv_sec  = 0;
20357         ts1.tv_nsec = 750000000;
20358         ts2.tv_sec  = 0;
20359         ts2.tv_nsec = 0;
20360         errno = 0;
20361         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20362         ${cf_cv_main_return:-return}(code != 0);
20363 }
20364
20365 _ACEOF
20366 rm -f conftest$ac_exeext
20367 if { (eval echo "$as_me:20367: \"$ac_link\"") >&5
20368   (eval $ac_link) 2>&5
20369   ac_status=$?
20370   echo "$as_me:20370: \$? = $ac_status" >&5
20371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20372   { (eval echo "$as_me:20372: \"$ac_try\"") >&5
20373   (eval $ac_try) 2>&5
20374   ac_status=$?
20375   echo "$as_me:20375: \$? = $ac_status" >&5
20376   (exit $ac_status); }; }; then
20377   cf_cv_func_nanosleep=yes
20378 else
20379   echo "$as_me: program exited with status $ac_status" >&5
20380 echo "$as_me: failed program was:" >&5
20381 cat conftest.$ac_ext >&5
20382 cf_cv_func_nanosleep=no
20383 fi
20384 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20385 fi
20386 fi
20387 echo "$as_me:20387: result: $cf_cv_func_nanosleep" >&5
20388 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20389
20390 test "$cf_cv_func_nanosleep" = "yes" &&
20391 cat >>confdefs.h <<\EOF
20392 #define HAVE_NANOSLEEP 1
20393 EOF
20394
20395 for ac_header in \
20396 termio.h \
20397 termios.h \
20398 unistd.h \
20399 sys/ioctl.h \
20400 sys/termio.h \
20401
20402 do
20403 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20404 echo "$as_me:20404: checking for $ac_header" >&5
20405 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20406 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20407   echo $ECHO_N "(cached) $ECHO_C" >&6
20408 else
20409   cat >conftest.$ac_ext <<_ACEOF
20410 #line 20410 "configure"
20411 #include "confdefs.h"
20412 #include <$ac_header>
20413 _ACEOF
20414 if { (eval echo "$as_me:20414: \"$ac_cpp conftest.$ac_ext\"") >&5
20415   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20416   ac_status=$?
20417   egrep -v '^ *\+' conftest.er1 >conftest.err
20418   rm -f conftest.er1
20419   cat conftest.err >&5
20420   echo "$as_me:20420: \$? = $ac_status" >&5
20421   (exit $ac_status); } >/dev/null; then
20422   if test -s conftest.err; then
20423     ac_cpp_err=$ac_c_preproc_warn_flag
20424   else
20425     ac_cpp_err=
20426   fi
20427 else
20428   ac_cpp_err=yes
20429 fi
20430 if test -z "$ac_cpp_err"; then
20431   eval "$as_ac_Header=yes"
20432 else
20433   echo "$as_me: failed program was:" >&5
20434   cat conftest.$ac_ext >&5
20435   eval "$as_ac_Header=no"
20436 fi
20437 rm -f conftest.err conftest.$ac_ext
20438 fi
20439 echo "$as_me:20439: result: `eval echo '${'$as_ac_Header'}'`" >&5
20440 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20441 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20442   cat >>confdefs.h <<EOF
20443 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20444 EOF
20445
20446 fi
20447 done
20448
20449 if test "$ac_cv_header_termios_h" = yes ; then
20450         case "$CFLAGS $CPPFLAGS" in
20451         (*-D_POSIX_SOURCE*)
20452                 termios_bad=dunno ;;
20453         (*)     termios_bad=maybe ;;
20454         esac
20455         if test "$termios_bad" = maybe ; then
20456         echo "$as_me:20456: checking whether termios.h needs _POSIX_SOURCE" >&5
20457 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20458         cat >conftest.$ac_ext <<_ACEOF
20459 #line 20459 "configure"
20460 #include "confdefs.h"
20461 #include <termios.h>
20462 int
20463 main (void)
20464 {
20465 struct termios foo; int x = foo.c_iflag = 1; (void)x
20466   ;
20467   return 0;
20468 }
20469 _ACEOF
20470 rm -f conftest.$ac_objext
20471 if { (eval echo "$as_me:20471: \"$ac_compile\"") >&5
20472   (eval $ac_compile) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit $ac_status); } &&
20476          { ac_try='test -s conftest.$ac_objext'
20477   { (eval echo "$as_me:20477: \"$ac_try\"") >&5
20478   (eval $ac_try) 2>&5
20479   ac_status=$?
20480   echo "$as_me:20480: \$? = $ac_status" >&5
20481   (exit $ac_status); }; }; then
20482   termios_bad=no
20483 else
20484   echo "$as_me: failed program was:" >&5
20485 cat conftest.$ac_ext >&5
20486
20487                 cat >conftest.$ac_ext <<_ACEOF
20488 #line 20488 "configure"
20489 #include "confdefs.h"
20490
20491 #define _POSIX_SOURCE
20492 #include <termios.h>
20493 int
20494 main (void)
20495 {
20496 struct termios foo; int x = foo.c_iflag = 2; (void)x
20497   ;
20498   return 0;
20499 }
20500 _ACEOF
20501 rm -f conftest.$ac_objext
20502 if { (eval echo "$as_me:20502: \"$ac_compile\"") >&5
20503   (eval $ac_compile) 2>&5
20504   ac_status=$?
20505   echo "$as_me:20505: \$? = $ac_status" >&5
20506   (exit $ac_status); } &&
20507          { ac_try='test -s conftest.$ac_objext'
20508   { (eval echo "$as_me:20508: \"$ac_try\"") >&5
20509   (eval $ac_try) 2>&5
20510   ac_status=$?
20511   echo "$as_me:20511: \$? = $ac_status" >&5
20512   (exit $ac_status); }; }; then
20513   termios_bad=unknown
20514 else
20515   echo "$as_me: failed program was:" >&5
20516 cat conftest.$ac_ext >&5
20517 termios_bad=yes
20518 cat >>confdefs.h <<\EOF
20519 #define _POSIX_SOURCE 1
20520 EOF
20521
20522 fi
20523 rm -f conftest.$ac_objext conftest.$ac_ext
20524
20525 fi
20526 rm -f conftest.$ac_objext conftest.$ac_ext
20527         echo "$as_me:20527: result: $termios_bad" >&5
20528 echo "${ECHO_T}$termios_bad" >&6
20529         fi
20530 fi
20531
20532 echo "$as_me:20532: checking for tcgetattr" >&5
20533 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20534 if test "${cf_cv_have_tcgetattr+set}" = set; then
20535   echo $ECHO_N "(cached) $ECHO_C" >&6
20536 else
20537
20538 cat >conftest.$ac_ext <<_ACEOF
20539 #line 20539 "configure"
20540 #include "confdefs.h"
20541
20542 #include <sys/types.h>
20543 #ifdef HAVE_UNISTD_H
20544 #include <unistd.h>
20545 #endif
20546 #ifdef HAVE_TERMIOS_H
20547 #include <termios.h>
20548 #define TTY struct termios
20549 #else
20550 #ifdef HAVE_TERMIO_H
20551 #include <termio.h>
20552 #define TTY struct termio
20553 #endif
20554 #endif
20555
20556 int
20557 main (void)
20558 {
20559
20560 TTY foo;
20561 tcgetattr(1, &foo);
20562   ;
20563   return 0;
20564 }
20565 _ACEOF
20566 rm -f conftest.$ac_objext conftest$ac_exeext
20567 if { (eval echo "$as_me:20567: \"$ac_link\"") >&5
20568   (eval $ac_link) 2>&5
20569   ac_status=$?
20570   echo "$as_me:20570: \$? = $ac_status" >&5
20571   (exit $ac_status); } &&
20572          { ac_try='test -s conftest$ac_exeext'
20573   { (eval echo "$as_me:20573: \"$ac_try\"") >&5
20574   (eval $ac_try) 2>&5
20575   ac_status=$?
20576   echo "$as_me:20576: \$? = $ac_status" >&5
20577   (exit $ac_status); }; }; then
20578   cf_cv_have_tcgetattr=yes
20579 else
20580   echo "$as_me: failed program was:" >&5
20581 cat conftest.$ac_ext >&5
20582 cf_cv_have_tcgetattr=no
20583 fi
20584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20585 fi
20586 echo "$as_me:20586: result: $cf_cv_have_tcgetattr" >&5
20587 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20588 test "$cf_cv_have_tcgetattr" = yes &&
20589 cat >>confdefs.h <<\EOF
20590 #define HAVE_TCGETATTR 1
20591 EOF
20592
20593 echo "$as_me:20593: checking for vsscanf function or workaround" >&5
20594 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20595 if test "${cf_cv_func_vsscanf+set}" = set; then
20596   echo $ECHO_N "(cached) $ECHO_C" >&6
20597 else
20598
20599 cat >conftest.$ac_ext <<_ACEOF
20600 #line 20600 "configure"
20601 #include "confdefs.h"
20602
20603 #include <stdarg.h>
20604 #include <stdio.h>
20605 int
20606 main (void)
20607 {
20608
20609         va_list ap;
20610         vsscanf("from", "%d", ap)
20611   ;
20612   return 0;
20613 }
20614 _ACEOF
20615 rm -f conftest.$ac_objext conftest$ac_exeext
20616 if { (eval echo "$as_me:20616: \"$ac_link\"") >&5
20617   (eval $ac_link) 2>&5
20618   ac_status=$?
20619   echo "$as_me:20619: \$? = $ac_status" >&5
20620   (exit $ac_status); } &&
20621          { ac_try='test -s conftest$ac_exeext'
20622   { (eval echo "$as_me:20622: \"$ac_try\"") >&5
20623   (eval $ac_try) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit $ac_status); }; }; then
20627   cf_cv_func_vsscanf=vsscanf
20628 else
20629   echo "$as_me: failed program was:" >&5
20630 cat conftest.$ac_ext >&5
20631
20632 cat >conftest.$ac_ext <<_ACEOF
20633 #line 20633 "configure"
20634 #include "confdefs.h"
20635
20636 #include <stdarg.h>
20637 #include <stdio.h>
20638 int
20639 main (void)
20640 {
20641
20642         FILE strbuf;
20643         char *str = "from";
20644
20645         strbuf._flag = _IOREAD;
20646         strbuf._ptr = strbuf._base = (unsigned char *) str;
20647         strbuf._cnt = strlen(str);
20648         strbuf._file = _NFILE;
20649         return (vfscanf(&strbuf, "%d", ap))
20650   ;
20651   return 0;
20652 }
20653 _ACEOF
20654 rm -f conftest.$ac_objext conftest$ac_exeext
20655 if { (eval echo "$as_me:20655: \"$ac_link\"") >&5
20656   (eval $ac_link) 2>&5
20657   ac_status=$?
20658   echo "$as_me:20658: \$? = $ac_status" >&5
20659   (exit $ac_status); } &&
20660          { ac_try='test -s conftest$ac_exeext'
20661   { (eval echo "$as_me:20661: \"$ac_try\"") >&5
20662   (eval $ac_try) 2>&5
20663   ac_status=$?
20664   echo "$as_me:20664: \$? = $ac_status" >&5
20665   (exit $ac_status); }; }; then
20666   cf_cv_func_vsscanf=vfscanf
20667 else
20668   echo "$as_me: failed program was:" >&5
20669 cat conftest.$ac_ext >&5
20670
20671 cat >conftest.$ac_ext <<_ACEOF
20672 #line 20672 "configure"
20673 #include "confdefs.h"
20674
20675 #include <stdarg.h>
20676 #include <stdio.h>
20677 int
20678 main (void)
20679 {
20680
20681         FILE strbuf;
20682         char *str = "from";
20683
20684         strbuf._flag = _IOREAD;
20685         strbuf._ptr = strbuf._base = (unsigned char *) str;
20686         strbuf._cnt = strlen(str);
20687         strbuf._file = _NFILE;
20688         return (_doscan(&strbuf, "%d", ap))
20689   ;
20690   return 0;
20691 }
20692 _ACEOF
20693 rm -f conftest.$ac_objext conftest$ac_exeext
20694 if { (eval echo "$as_me:20694: \"$ac_link\"") >&5
20695   (eval $ac_link) 2>&5
20696   ac_status=$?
20697   echo "$as_me:20697: \$? = $ac_status" >&5
20698   (exit $ac_status); } &&
20699          { ac_try='test -s conftest$ac_exeext'
20700   { (eval echo "$as_me:20700: \"$ac_try\"") >&5
20701   (eval $ac_try) 2>&5
20702   ac_status=$?
20703   echo "$as_me:20703: \$? = $ac_status" >&5
20704   (exit $ac_status); }; }; then
20705   cf_cv_func_vsscanf=_doscan
20706 else
20707   echo "$as_me: failed program was:" >&5
20708 cat conftest.$ac_ext >&5
20709
20710 cf_cv_func_vsscanf=no
20711 fi
20712 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20713 fi
20714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20715 fi
20716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20717 fi
20718 echo "$as_me:20718: result: $cf_cv_func_vsscanf" >&5
20719 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20720
20721 case $cf_cv_func_vsscanf in
20722 (vsscanf)
20723 cat >>confdefs.h <<\EOF
20724 #define HAVE_VSSCANF 1
20725 EOF
20726 ;;
20727 (vfscanf)
20728 cat >>confdefs.h <<\EOF
20729 #define HAVE_VFSCANF 1
20730 EOF
20731 ;;
20732 (_doscan)
20733 cat >>confdefs.h <<\EOF
20734 #define HAVE__DOSCAN 1
20735 EOF
20736 ;;
20737 esac
20738
20739 for ac_header in \
20740 unistd.h \
20741
20742 do
20743 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20744 echo "$as_me:20744: checking for $ac_header" >&5
20745 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20746 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20747   echo $ECHO_N "(cached) $ECHO_C" >&6
20748 else
20749   cat >conftest.$ac_ext <<_ACEOF
20750 #line 20750 "configure"
20751 #include "confdefs.h"
20752 #include <$ac_header>
20753 _ACEOF
20754 if { (eval echo "$as_me:20754: \"$ac_cpp conftest.$ac_ext\"") >&5
20755   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20756   ac_status=$?
20757   egrep -v '^ *\+' conftest.er1 >conftest.err
20758   rm -f conftest.er1
20759   cat conftest.err >&5
20760   echo "$as_me:20760: \$? = $ac_status" >&5
20761   (exit $ac_status); } >/dev/null; then
20762   if test -s conftest.err; then
20763     ac_cpp_err=$ac_c_preproc_warn_flag
20764   else
20765     ac_cpp_err=
20766   fi
20767 else
20768   ac_cpp_err=yes
20769 fi
20770 if test -z "$ac_cpp_err"; then
20771   eval "$as_ac_Header=yes"
20772 else
20773   echo "$as_me: failed program was:" >&5
20774   cat conftest.$ac_ext >&5
20775   eval "$as_ac_Header=no"
20776 fi
20777 rm -f conftest.err conftest.$ac_ext
20778 fi
20779 echo "$as_me:20779: result: `eval echo '${'$as_ac_Header'}'`" >&5
20780 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20781 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20782   cat >>confdefs.h <<EOF
20783 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20784 EOF
20785
20786 fi
20787 done
20788
20789 echo "$as_me:20789: checking for working mkstemp" >&5
20790 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20791 if test "${cf_cv_func_mkstemp+set}" = set; then
20792   echo $ECHO_N "(cached) $ECHO_C" >&6
20793 else
20794
20795 rm -rf conftest*
20796 if test "$cross_compiling" = yes; then
20797   cf_cv_func_mkstemp=maybe
20798 else
20799   cat >conftest.$ac_ext <<_ACEOF
20800 #line 20800 "configure"
20801 #include "confdefs.h"
20802
20803 #include <sys/types.h>
20804 #ifdef HAVE_UNISTD_H
20805 #include <unistd.h>
20806 #endif
20807 #include <stdlib.h>
20808 #include <stdio.h>
20809 #include <string.h>
20810 #include <sys/stat.h>
20811 int main(void)
20812 {
20813         char *tmpl = "conftestXXXXXX";
20814         char name[2][80];
20815         int n;
20816         int result = 0;
20817         int fd;
20818         struct stat sb;
20819
20820         umask(077);
20821         for (n = 0; n < 2; ++n) {
20822                 strcpy(name[n], tmpl);
20823                 if ((fd = mkstemp(name[n])) >= 0) {
20824                         if (!strcmp(name[n], tmpl)
20825                          || stat(name[n], &sb) != 0
20826                          || (sb.st_mode & S_IFMT) != S_IFREG
20827                          || (sb.st_mode & 077) != 0) {
20828                                 result = 1;
20829                         }
20830                         close(fd);
20831                 }
20832         }
20833         if (result == 0
20834          && !strcmp(name[0], name[1]))
20835                 result = 1;
20836         ${cf_cv_main_return:-return}(result);
20837 }
20838
20839 _ACEOF
20840 rm -f conftest$ac_exeext
20841 if { (eval echo "$as_me:20841: \"$ac_link\"") >&5
20842   (eval $ac_link) 2>&5
20843   ac_status=$?
20844   echo "$as_me:20844: \$? = $ac_status" >&5
20845   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20846   { (eval echo "$as_me:20846: \"$ac_try\"") >&5
20847   (eval $ac_try) 2>&5
20848   ac_status=$?
20849   echo "$as_me:20849: \$? = $ac_status" >&5
20850   (exit $ac_status); }; }; then
20851   cf_cv_func_mkstemp=yes
20852
20853 else
20854   echo "$as_me: program exited with status $ac_status" >&5
20855 echo "$as_me: failed program was:" >&5
20856 cat conftest.$ac_ext >&5
20857 cf_cv_func_mkstemp=no
20858
20859 fi
20860 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20861 fi
20862
20863 fi
20864 echo "$as_me:20864: result: $cf_cv_func_mkstemp" >&5
20865 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20866 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20867         echo "$as_me:20867: checking for mkstemp" >&5
20868 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20869 if test "${ac_cv_func_mkstemp+set}" = set; then
20870   echo $ECHO_N "(cached) $ECHO_C" >&6
20871 else
20872   cat >conftest.$ac_ext <<_ACEOF
20873 #line 20873 "configure"
20874 #include "confdefs.h"
20875 #define mkstemp autoconf_temporary
20876 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20877 #undef mkstemp
20878
20879 #ifdef __cplusplus
20880 extern "C"
20881 #endif
20882
20883 /* We use char because int might match the return type of a gcc2
20884    builtin and then its argument prototype would still apply.  */
20885 char mkstemp (void);
20886
20887 int
20888 main (void)
20889 {
20890
20891 /* The GNU C library defines stubs for functions which it implements
20892     to always fail with ENOSYS.  Some functions are actually named
20893     something starting with __ and the normal name is an alias.  */
20894 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
20895 #error found stub for mkstemp
20896 #endif
20897
20898         return mkstemp ();
20899   ;
20900   return 0;
20901 }
20902 _ACEOF
20903 rm -f conftest.$ac_objext conftest$ac_exeext
20904 if { (eval echo "$as_me:20904: \"$ac_link\"") >&5
20905   (eval $ac_link) 2>&5
20906   ac_status=$?
20907   echo "$as_me:20907: \$? = $ac_status" >&5
20908   (exit $ac_status); } &&
20909          { ac_try='test -s conftest$ac_exeext'
20910   { (eval echo "$as_me:20910: \"$ac_try\"") >&5
20911   (eval $ac_try) 2>&5
20912   ac_status=$?
20913   echo "$as_me:20913: \$? = $ac_status" >&5
20914   (exit $ac_status); }; }; then
20915   ac_cv_func_mkstemp=yes
20916 else
20917   echo "$as_me: failed program was:" >&5
20918 cat conftest.$ac_ext >&5
20919 ac_cv_func_mkstemp=no
20920 fi
20921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20922 fi
20923 echo "$as_me:20923: result: $ac_cv_func_mkstemp" >&5
20924 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
20925
20926 fi
20927 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
20928
20929 cat >>confdefs.h <<\EOF
20930 #define HAVE_MKSTEMP 1
20931 EOF
20932
20933 fi
20934
20935 # setup for prototype of fallback for vsscanf()
20936
20937 if test "$cf_cv_func_vsscanf" = vsscanf ; then
20938         HAVE_VSSCANF=1
20939 else
20940         HAVE_VSSCANF=0
20941 fi
20942
20943 if test "x$cross_compiling" = xyes ; then
20944         { echo "$as_me:20944: WARNING: cross compiling: assume setvbuf params not reversed" >&5
20945 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
20946 else
20947         echo "$as_me:20947: checking whether setvbuf arguments are reversed" >&5
20948 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
20949 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
20950   echo $ECHO_N "(cached) $ECHO_C" >&6
20951 else
20952   if test "$cross_compiling" = yes; then
20953   { { echo "$as_me:20953: error: cannot run test program while cross compiling" >&5
20954 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20955    { (exit 1); exit 1; }; }
20956 else
20957   cat >conftest.$ac_ext <<_ACEOF
20958 #line 20958 "configure"
20959 #include "confdefs.h"
20960 #include <stdio.h>
20961 /* If setvbuf has the reversed format, exit 0. */
20962 int
20963 main (void)
20964 {
20965   /* This call has the arguments reversed.
20966      A reversed system may check and see that the address of main
20967      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
20968   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
20969     $ac_main_return(1);
20970   putc('\r', stdout);
20971   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
20972 }
20973 _ACEOF
20974 rm -f conftest$ac_exeext
20975 if { (eval echo "$as_me:20975: \"$ac_link\"") >&5
20976   (eval $ac_link) 2>&5
20977   ac_status=$?
20978   echo "$as_me:20978: \$? = $ac_status" >&5
20979   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20980   { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981   (eval $ac_try) 2>&5
20982   ac_status=$?
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit $ac_status); }; }; then
20985   ac_cv_func_setvbuf_reversed=yes
20986 else
20987   echo "$as_me: program exited with status $ac_status" >&5
20988 echo "$as_me: failed program was:" >&5
20989 cat conftest.$ac_ext >&5
20990 ac_cv_func_setvbuf_reversed=no
20991 fi
20992 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20993 fi
20994 rm -f core core.* *.core
20995 fi
20996 echo "$as_me:20996: result: $ac_cv_func_setvbuf_reversed" >&5
20997 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
20998 if test $ac_cv_func_setvbuf_reversed = yes; then
20999
21000 cat >>confdefs.h <<\EOF
21001 #define SETVBUF_REVERSED 1
21002 EOF
21003
21004 fi
21005
21006 fi
21007 echo "$as_me:21007: checking for intptr_t" >&5
21008 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21009 if test "${ac_cv_type_intptr_t+set}" = set; then
21010   echo $ECHO_N "(cached) $ECHO_C" >&6
21011 else
21012   cat >conftest.$ac_ext <<_ACEOF
21013 #line 21013 "configure"
21014 #include "confdefs.h"
21015 $ac_includes_default
21016 int
21017 main (void)
21018 {
21019 if ((intptr_t *) 0)
21020   return 0;
21021 if (sizeof (intptr_t))
21022   return 0;
21023   ;
21024   return 0;
21025 }
21026 _ACEOF
21027 rm -f conftest.$ac_objext
21028 if { (eval echo "$as_me:21028: \"$ac_compile\"") >&5
21029   (eval $ac_compile) 2>&5
21030   ac_status=$?
21031   echo "$as_me:21031: \$? = $ac_status" >&5
21032   (exit $ac_status); } &&
21033          { ac_try='test -s conftest.$ac_objext'
21034   { (eval echo "$as_me:21034: \"$ac_try\"") >&5
21035   (eval $ac_try) 2>&5
21036   ac_status=$?
21037   echo "$as_me:21037: \$? = $ac_status" >&5
21038   (exit $ac_status); }; }; then
21039   ac_cv_type_intptr_t=yes
21040 else
21041   echo "$as_me: failed program was:" >&5
21042 cat conftest.$ac_ext >&5
21043 ac_cv_type_intptr_t=no
21044 fi
21045 rm -f conftest.$ac_objext conftest.$ac_ext
21046 fi
21047 echo "$as_me:21047: result: $ac_cv_type_intptr_t" >&5
21048 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21049 if test $ac_cv_type_intptr_t = yes; then
21050   :
21051 else
21052
21053 cat >>confdefs.h <<EOF
21054 #define intptr_t long
21055 EOF
21056
21057 fi
21058
21059 echo "$as_me:21059: checking for ssize_t" >&5
21060 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21061 if test "${ac_cv_type_ssize_t+set}" = set; then
21062   echo $ECHO_N "(cached) $ECHO_C" >&6
21063 else
21064   cat >conftest.$ac_ext <<_ACEOF
21065 #line 21065 "configure"
21066 #include "confdefs.h"
21067 $ac_includes_default
21068 int
21069 main (void)
21070 {
21071 if ((ssize_t *) 0)
21072   return 0;
21073 if (sizeof (ssize_t))
21074   return 0;
21075   ;
21076   return 0;
21077 }
21078 _ACEOF
21079 rm -f conftest.$ac_objext
21080 if { (eval echo "$as_me:21080: \"$ac_compile\"") >&5
21081   (eval $ac_compile) 2>&5
21082   ac_status=$?
21083   echo "$as_me:21083: \$? = $ac_status" >&5
21084   (exit $ac_status); } &&
21085          { ac_try='test -s conftest.$ac_objext'
21086   { (eval echo "$as_me:21086: \"$ac_try\"") >&5
21087   (eval $ac_try) 2>&5
21088   ac_status=$?
21089   echo "$as_me:21089: \$? = $ac_status" >&5
21090   (exit $ac_status); }; }; then
21091   ac_cv_type_ssize_t=yes
21092 else
21093   echo "$as_me: failed program was:" >&5
21094 cat conftest.$ac_ext >&5
21095 ac_cv_type_ssize_t=no
21096 fi
21097 rm -f conftest.$ac_objext conftest.$ac_ext
21098 fi
21099 echo "$as_me:21099: result: $ac_cv_type_ssize_t" >&5
21100 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21101 if test $ac_cv_type_ssize_t = yes; then
21102   :
21103 else
21104
21105 cat >>confdefs.h <<EOF
21106 #define ssize_t int
21107 EOF
21108
21109 fi
21110
21111 echo "$as_me:21111: checking for type sigaction_t" >&5
21112 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21113 if test "${cf_cv_type_sigaction+set}" = set; then
21114   echo $ECHO_N "(cached) $ECHO_C" >&6
21115 else
21116
21117         cat >conftest.$ac_ext <<_ACEOF
21118 #line 21118 "configure"
21119 #include "confdefs.h"
21120
21121 #include <signal.h>
21122 int
21123 main (void)
21124 {
21125 sigaction_t x
21126   ;
21127   return 0;
21128 }
21129 _ACEOF
21130 rm -f conftest.$ac_objext
21131 if { (eval echo "$as_me:21131: \"$ac_compile\"") >&5
21132   (eval $ac_compile) 2>&5
21133   ac_status=$?
21134   echo "$as_me:21134: \$? = $ac_status" >&5
21135   (exit $ac_status); } &&
21136          { ac_try='test -s conftest.$ac_objext'
21137   { (eval echo "$as_me:21137: \"$ac_try\"") >&5
21138   (eval $ac_try) 2>&5
21139   ac_status=$?
21140   echo "$as_me:21140: \$? = $ac_status" >&5
21141   (exit $ac_status); }; }; then
21142   cf_cv_type_sigaction=yes
21143 else
21144   echo "$as_me: failed program was:" >&5
21145 cat conftest.$ac_ext >&5
21146 cf_cv_type_sigaction=no
21147 fi
21148 rm -f conftest.$ac_objext conftest.$ac_ext
21149 fi
21150
21151 echo "$as_me:21151: result: $cf_cv_type_sigaction" >&5
21152 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21153 test "$cf_cv_type_sigaction" = yes &&
21154 cat >>confdefs.h <<\EOF
21155 #define HAVE_TYPE_SIGACTION 1
21156 EOF
21157
21158 echo "$as_me:21158: checking declaration of size-change" >&5
21159 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21160 if test "${cf_cv_sizechange+set}" = set; then
21161   echo $ECHO_N "(cached) $ECHO_C" >&6
21162 else
21163
21164         cf_cv_sizechange=unknown
21165         cf_save_CPPFLAGS="$CPPFLAGS"
21166
21167 for cf_opts in "" "NEED_PTEM_H"
21168 do
21169
21170         CPPFLAGS="$cf_save_CPPFLAGS"
21171         if test -n "$cf_opts"
21172         then
21173
21174         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21175         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21176
21177         fi
21178         cat >conftest.$ac_ext <<_ACEOF
21179 #line 21179 "configure"
21180 #include "confdefs.h"
21181 #include <sys/types.h>
21182 #ifdef HAVE_TERMIOS_H
21183 #include <termios.h>
21184 #else
21185 #ifdef HAVE_TERMIO_H
21186 #include <termio.h>
21187 #endif
21188 #endif
21189
21190 #ifdef NEED_PTEM_H
21191 /* This is a workaround for SCO:  they neglected to define struct winsize in
21192  * termios.h -- it's only in termio.h and ptem.h
21193  */
21194 #include <sys/stream.h>
21195 #include <sys/ptem.h>
21196 #endif
21197
21198 #ifdef HAVE_SYS_IOCTL_H
21199 #include <sys/ioctl.h>
21200 #endif
21201
21202 int
21203 main (void)
21204 {
21205
21206 #ifdef TIOCGSIZE
21207         struct ttysize win;     /* SunOS 3.0... */
21208         int y = win.ts_lines = 2;
21209         int x = win.ts_cols = 1;
21210         (void)y;
21211         (void)x;
21212 #else
21213 #ifdef TIOCGWINSZ
21214         struct winsize win;     /* everything else */
21215         int y = win.ws_row = 2;
21216         int x = win.ws_col = 1;
21217         (void)y;
21218         (void)x;
21219 #else
21220         no TIOCGSIZE or TIOCGWINSZ
21221 #endif /* TIOCGWINSZ */
21222 #endif /* TIOCGSIZE */
21223
21224   ;
21225   return 0;
21226 }
21227 _ACEOF
21228 rm -f conftest.$ac_objext
21229 if { (eval echo "$as_me:21229: \"$ac_compile\"") >&5
21230   (eval $ac_compile) 2>&5
21231   ac_status=$?
21232   echo "$as_me:21232: \$? = $ac_status" >&5
21233   (exit $ac_status); } &&
21234          { ac_try='test -s conftest.$ac_objext'
21235   { (eval echo "$as_me:21235: \"$ac_try\"") >&5
21236   (eval $ac_try) 2>&5
21237   ac_status=$?
21238   echo "$as_me:21238: \$? = $ac_status" >&5
21239   (exit $ac_status); }; }; then
21240   cf_cv_sizechange=yes
21241 else
21242   echo "$as_me: failed program was:" >&5
21243 cat conftest.$ac_ext >&5
21244 cf_cv_sizechange=no
21245 fi
21246 rm -f conftest.$ac_objext conftest.$ac_ext
21247
21248         CPPFLAGS="$cf_save_CPPFLAGS"
21249         if test "$cf_cv_sizechange" = yes ; then
21250                 echo "size-change succeeded ($cf_opts)" >&5
21251                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21252                 break
21253         fi
21254 done
21255
21256 fi
21257 echo "$as_me:21257: result: $cf_cv_sizechange" >&5
21258 echo "${ECHO_T}$cf_cv_sizechange" >&6
21259 if test "$cf_cv_sizechange" != no ; then
21260
21261 cat >>confdefs.h <<\EOF
21262 #define HAVE_SIZECHANGE 1
21263 EOF
21264
21265         case $cf_cv_sizechange in
21266         (NEED*)
21267                 cat >>confdefs.h <<EOF
21268 #define $cf_cv_sizechange  1
21269 EOF
21270
21271                 ;;
21272         esac
21273 fi
21274
21275 echo "$as_me:21275: checking for memmove" >&5
21276 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21277 if test "${ac_cv_func_memmove+set}" = set; then
21278   echo $ECHO_N "(cached) $ECHO_C" >&6
21279 else
21280   cat >conftest.$ac_ext <<_ACEOF
21281 #line 21281 "configure"
21282 #include "confdefs.h"
21283 #define memmove autoconf_temporary
21284 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21285 #undef memmove
21286
21287 #ifdef __cplusplus
21288 extern "C"
21289 #endif
21290
21291 /* We use char because int might match the return type of a gcc2
21292    builtin and then its argument prototype would still apply.  */
21293 char memmove (void);
21294
21295 int
21296 main (void)
21297 {
21298
21299 /* The GNU C library defines stubs for functions which it implements
21300     to always fail with ENOSYS.  Some functions are actually named
21301     something starting with __ and the normal name is an alias.  */
21302 #if defined (__stub_memmove) || defined (__stub___memmove)
21303 #error found stub for memmove
21304 #endif
21305
21306         return memmove ();
21307   ;
21308   return 0;
21309 }
21310 _ACEOF
21311 rm -f conftest.$ac_objext conftest$ac_exeext
21312 if { (eval echo "$as_me:21312: \"$ac_link\"") >&5
21313   (eval $ac_link) 2>&5
21314   ac_status=$?
21315   echo "$as_me:21315: \$? = $ac_status" >&5
21316   (exit $ac_status); } &&
21317          { ac_try='test -s conftest$ac_exeext'
21318   { (eval echo "$as_me:21318: \"$ac_try\"") >&5
21319   (eval $ac_try) 2>&5
21320   ac_status=$?
21321   echo "$as_me:21321: \$? = $ac_status" >&5
21322   (exit $ac_status); }; }; then
21323   ac_cv_func_memmove=yes
21324 else
21325   echo "$as_me: failed program was:" >&5
21326 cat conftest.$ac_ext >&5
21327 ac_cv_func_memmove=no
21328 fi
21329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21330 fi
21331 echo "$as_me:21331: result: $ac_cv_func_memmove" >&5
21332 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21333 if test $ac_cv_func_memmove = yes; then
21334   :
21335 else
21336
21337 echo "$as_me:21337: checking for bcopy" >&5
21338 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21339 if test "${ac_cv_func_bcopy+set}" = set; then
21340   echo $ECHO_N "(cached) $ECHO_C" >&6
21341 else
21342   cat >conftest.$ac_ext <<_ACEOF
21343 #line 21343 "configure"
21344 #include "confdefs.h"
21345 #define bcopy autoconf_temporary
21346 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21347 #undef bcopy
21348
21349 #ifdef __cplusplus
21350 extern "C"
21351 #endif
21352
21353 /* We use char because int might match the return type of a gcc2
21354    builtin and then its argument prototype would still apply.  */
21355 char bcopy (void);
21356
21357 int
21358 main (void)
21359 {
21360
21361 /* The GNU C library defines stubs for functions which it implements
21362     to always fail with ENOSYS.  Some functions are actually named
21363     something starting with __ and the normal name is an alias.  */
21364 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21365 #error found stub for bcopy
21366 #endif
21367
21368         return bcopy ();
21369   ;
21370   return 0;
21371 }
21372 _ACEOF
21373 rm -f conftest.$ac_objext conftest$ac_exeext
21374 if { (eval echo "$as_me:21374: \"$ac_link\"") >&5
21375   (eval $ac_link) 2>&5
21376   ac_status=$?
21377   echo "$as_me:21377: \$? = $ac_status" >&5
21378   (exit $ac_status); } &&
21379          { ac_try='test -s conftest$ac_exeext'
21380   { (eval echo "$as_me:21380: \"$ac_try\"") >&5
21381   (eval $ac_try) 2>&5
21382   ac_status=$?
21383   echo "$as_me:21383: \$? = $ac_status" >&5
21384   (exit $ac_status); }; }; then
21385   ac_cv_func_bcopy=yes
21386 else
21387   echo "$as_me: failed program was:" >&5
21388 cat conftest.$ac_ext >&5
21389 ac_cv_func_bcopy=no
21390 fi
21391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21392 fi
21393 echo "$as_me:21393: result: $ac_cv_func_bcopy" >&5
21394 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21395 if test $ac_cv_func_bcopy = yes; then
21396
21397         echo "$as_me:21397: checking if bcopy does overlapping moves" >&5
21398 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21399 if test "${cf_cv_good_bcopy+set}" = set; then
21400   echo $ECHO_N "(cached) $ECHO_C" >&6
21401 else
21402
21403                 if test "$cross_compiling" = yes; then
21404   cf_cv_good_bcopy=unknown
21405 else
21406   cat >conftest.$ac_ext <<_ACEOF
21407 #line 21407 "configure"
21408 #include "confdefs.h"
21409
21410 int main(void) {
21411         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21412         char temp[40];
21413         bcopy(data, temp, sizeof(data));
21414         bcopy(temp+10, temp, 15);
21415         bcopy(temp+5, temp+15, 10);
21416         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21417 }
21418
21419 _ACEOF
21420 rm -f conftest$ac_exeext
21421 if { (eval echo "$as_me:21421: \"$ac_link\"") >&5
21422   (eval $ac_link) 2>&5
21423   ac_status=$?
21424   echo "$as_me:21424: \$? = $ac_status" >&5
21425   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21426   { (eval echo "$as_me:21426: \"$ac_try\"") >&5
21427   (eval $ac_try) 2>&5
21428   ac_status=$?
21429   echo "$as_me:21429: \$? = $ac_status" >&5
21430   (exit $ac_status); }; }; then
21431   cf_cv_good_bcopy=yes
21432 else
21433   echo "$as_me: program exited with status $ac_status" >&5
21434 echo "$as_me: failed program was:" >&5
21435 cat conftest.$ac_ext >&5
21436 cf_cv_good_bcopy=no
21437 fi
21438 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21439 fi
21440
21441 fi
21442 echo "$as_me:21442: result: $cf_cv_good_bcopy" >&5
21443 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21444
21445 else
21446   cf_cv_good_bcopy=no
21447 fi
21448
21449         if test "$cf_cv_good_bcopy" = yes ; then
21450
21451 cat >>confdefs.h <<\EOF
21452 #define USE_OK_BCOPY 1
21453 EOF
21454
21455         else
21456
21457 cat >>confdefs.h <<\EOF
21458 #define USE_MY_MEMMOVE 1
21459 EOF
21460
21461         fi
21462
21463 fi
21464
21465 tty 2>&1 >/dev/null || {
21466 for ac_func in posix_openpt
21467 do
21468 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21469 echo "$as_me:21469: checking for $ac_func" >&5
21470 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21471 if eval "test \"\${$as_ac_var+set}\" = set"; then
21472   echo $ECHO_N "(cached) $ECHO_C" >&6
21473 else
21474   cat >conftest.$ac_ext <<_ACEOF
21475 #line 21475 "configure"
21476 #include "confdefs.h"
21477 #define $ac_func autoconf_temporary
21478 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21479 #undef $ac_func
21480
21481 #ifdef __cplusplus
21482 extern "C"
21483 #endif
21484
21485 /* We use char because int might match the return type of a gcc2
21486    builtin and then its argument prototype would still apply.  */
21487 char $ac_func (void);
21488
21489 int
21490 main (void)
21491 {
21492
21493 /* The GNU C library defines stubs for functions which it implements
21494     to always fail with ENOSYS.  Some functions are actually named
21495     something starting with __ and the normal name is an alias.  */
21496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21497 #error found stub for $ac_func
21498 #endif
21499
21500         return $ac_func ();
21501   ;
21502   return 0;
21503 }
21504 _ACEOF
21505 rm -f conftest.$ac_objext conftest$ac_exeext
21506 if { (eval echo "$as_me:21506: \"$ac_link\"") >&5
21507   (eval $ac_link) 2>&5
21508   ac_status=$?
21509   echo "$as_me:21509: \$? = $ac_status" >&5
21510   (exit $ac_status); } &&
21511          { ac_try='test -s conftest$ac_exeext'
21512   { (eval echo "$as_me:21512: \"$ac_try\"") >&5
21513   (eval $ac_try) 2>&5
21514   ac_status=$?
21515   echo "$as_me:21515: \$? = $ac_status" >&5
21516   (exit $ac_status); }; }; then
21517   eval "$as_ac_var=yes"
21518 else
21519   echo "$as_me: failed program was:" >&5
21520 cat conftest.$ac_ext >&5
21521 eval "$as_ac_var=no"
21522 fi
21523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21524 fi
21525 echo "$as_me:21525: result: `eval echo '${'$as_ac_var'}'`" >&5
21526 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21527 if test `eval echo '${'$as_ac_var'}'` = yes; then
21528   cat >>confdefs.h <<EOF
21529 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21530 EOF
21531
21532 fi
21533 done
21534  }
21535 echo "$as_me:21535: checking if poll really works" >&5
21536 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21537 if test "${cf_cv_working_poll+set}" = set; then
21538   echo $ECHO_N "(cached) $ECHO_C" >&6
21539 else
21540
21541 if test "$cross_compiling" = yes; then
21542   cf_cv_working_poll=unknown
21543 else
21544   cat >conftest.$ac_ext <<_ACEOF
21545 #line 21545 "configure"
21546 #include "confdefs.h"
21547
21548 #include <stdlib.h>
21549 #include <stdio.h>
21550 #include <unistd.h>
21551 #include <fcntl.h>
21552 #ifdef HAVE_POLL_H
21553 #include <poll.h>
21554 #else
21555 #include <sys/poll.h>
21556 #endif
21557 int main(void) {
21558         struct pollfd myfds;
21559         int ret;
21560
21561         /* check for Darwin bug with respect to "devices" */
21562         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21563         if (myfds.fd < 0)
21564                 myfds.fd = 0;
21565         myfds.events = POLLIN;
21566         myfds.revents = 0;
21567
21568         ret = poll(&myfds, 1, 100);
21569
21570         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21571                 ret = -1;
21572         } else {
21573                 int fd = 0;
21574                 if (!isatty(fd)) {
21575                         fd = open("/dev/tty", 2);       /* O_RDWR */
21576                 }
21577 #ifdef HAVE_POSIX_OPENPT
21578                 if (fd < 0) {
21579                         fd = posix_openpt(O_RDWR);
21580                 }
21581 #endif
21582
21583                 if (fd >= 0) {
21584                         /* also check with standard input */
21585                         myfds.fd = fd;
21586                         myfds.events = POLLIN;
21587                         myfds.revents = 0;
21588                         ret = poll(&myfds, 1, 100);
21589                 } else {
21590                         ret = -1;
21591                 }
21592         }
21593         ${cf_cv_main_return:-return}(ret < 0);
21594 }
21595 _ACEOF
21596 rm -f conftest$ac_exeext
21597 if { (eval echo "$as_me:21597: \"$ac_link\"") >&5
21598   (eval $ac_link) 2>&5
21599   ac_status=$?
21600   echo "$as_me:21600: \$? = $ac_status" >&5
21601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21602   { (eval echo "$as_me:21602: \"$ac_try\"") >&5
21603   (eval $ac_try) 2>&5
21604   ac_status=$?
21605   echo "$as_me:21605: \$? = $ac_status" >&5
21606   (exit $ac_status); }; }; then
21607   cf_cv_working_poll=yes
21608 else
21609   echo "$as_me: program exited with status $ac_status" >&5
21610 echo "$as_me: failed program was:" >&5
21611 cat conftest.$ac_ext >&5
21612 cf_cv_working_poll=no
21613 fi
21614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21615 fi
21616 fi
21617 echo "$as_me:21617: result: $cf_cv_working_poll" >&5
21618 echo "${ECHO_T}$cf_cv_working_poll" >&6
21619 test "$cf_cv_working_poll" = "yes" &&
21620 cat >>confdefs.h <<\EOF
21621 #define HAVE_WORKING_POLL 1
21622 EOF
21623
21624 echo "$as_me:21624: checking for va_copy" >&5
21625 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21626 if test "${cf_cv_have_va_copy+set}" = set; then
21627   echo $ECHO_N "(cached) $ECHO_C" >&6
21628 else
21629
21630 cat >conftest.$ac_ext <<_ACEOF
21631 #line 21631 "configure"
21632 #include "confdefs.h"
21633
21634 #include <stdarg.h>
21635
21636 int
21637 main (void)
21638 {
21639
21640         static va_list dst;
21641         static va_list src;
21642         va_copy(dst, src)
21643   ;
21644   return 0;
21645 }
21646 _ACEOF
21647 rm -f conftest.$ac_objext conftest$ac_exeext
21648 if { (eval echo "$as_me:21648: \"$ac_link\"") >&5
21649   (eval $ac_link) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit $ac_status); } &&
21653          { ac_try='test -s conftest$ac_exeext'
21654   { (eval echo "$as_me:21654: \"$ac_try\"") >&5
21655   (eval $ac_try) 2>&5
21656   ac_status=$?
21657   echo "$as_me:21657: \$? = $ac_status" >&5
21658   (exit $ac_status); }; }; then
21659   cf_cv_have_va_copy=yes
21660 else
21661   echo "$as_me: failed program was:" >&5
21662 cat conftest.$ac_ext >&5
21663 cf_cv_have_va_copy=no
21664 fi
21665 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21666 fi
21667 echo "$as_me:21667: result: $cf_cv_have_va_copy" >&5
21668 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21669
21670 if test "$cf_cv_have_va_copy" = yes;
21671 then
21672
21673 cat >>confdefs.h <<\EOF
21674 #define HAVE_VA_COPY 1
21675 EOF
21676
21677 else # !cf_cv_have_va_copy
21678
21679 echo "$as_me:21679: checking for __va_copy" >&5
21680 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21681 if test "${cf_cv_have___va_copy+set}" = set; then
21682   echo $ECHO_N "(cached) $ECHO_C" >&6
21683 else
21684
21685 cat >conftest.$ac_ext <<_ACEOF
21686 #line 21686 "configure"
21687 #include "confdefs.h"
21688
21689 #include <stdarg.h>
21690
21691 int
21692 main (void)
21693 {
21694
21695         static va_list dst;
21696         static va_list src;
21697         __va_copy(dst, src)
21698   ;
21699   return 0;
21700 }
21701 _ACEOF
21702 rm -f conftest.$ac_objext conftest$ac_exeext
21703 if { (eval echo "$as_me:21703: \"$ac_link\"") >&5
21704   (eval $ac_link) 2>&5
21705   ac_status=$?
21706   echo "$as_me:21706: \$? = $ac_status" >&5
21707   (exit $ac_status); } &&
21708          { ac_try='test -s conftest$ac_exeext'
21709   { (eval echo "$as_me:21709: \"$ac_try\"") >&5
21710   (eval $ac_try) 2>&5
21711   ac_status=$?
21712   echo "$as_me:21712: \$? = $ac_status" >&5
21713   (exit $ac_status); }; }; then
21714   cf_cv_have___va_copy=yes
21715 else
21716   echo "$as_me: failed program was:" >&5
21717 cat conftest.$ac_ext >&5
21718 cf_cv_have___va_copy=no
21719 fi
21720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21721 fi
21722 echo "$as_me:21722: result: $cf_cv_have___va_copy" >&5
21723 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21724
21725 if test "$cf_cv_have___va_copy" = yes
21726 then
21727
21728 cat >>confdefs.h <<\EOF
21729 #define HAVE___VA_COPY 1
21730 EOF
21731
21732 else # !cf_cv_have___va_copy
21733
21734 echo "$as_me:21734: checking for __builtin_va_copy" >&5
21735 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21736 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21737   echo $ECHO_N "(cached) $ECHO_C" >&6
21738 else
21739
21740 cat >conftest.$ac_ext <<_ACEOF
21741 #line 21741 "configure"
21742 #include "confdefs.h"
21743
21744 #include <stdarg.h>
21745
21746 int
21747 main (void)
21748 {
21749
21750         static va_list dst;
21751         static va_list src;
21752         __builtin_va_copy(dst, src)
21753   ;
21754   return 0;
21755 }
21756 _ACEOF
21757 rm -f conftest.$ac_objext conftest$ac_exeext
21758 if { (eval echo "$as_me:21758: \"$ac_link\"") >&5
21759   (eval $ac_link) 2>&5
21760   ac_status=$?
21761   echo "$as_me:21761: \$? = $ac_status" >&5
21762   (exit $ac_status); } &&
21763          { ac_try='test -s conftest$ac_exeext'
21764   { (eval echo "$as_me:21764: \"$ac_try\"") >&5
21765   (eval $ac_try) 2>&5
21766   ac_status=$?
21767   echo "$as_me:21767: \$? = $ac_status" >&5
21768   (exit $ac_status); }; }; then
21769   cf_cv_have___builtin_va_copy=yes
21770 else
21771   echo "$as_me: failed program was:" >&5
21772 cat conftest.$ac_ext >&5
21773 cf_cv_have___builtin_va_copy=no
21774 fi
21775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21776 fi
21777 echo "$as_me:21777: result: $cf_cv_have___builtin_va_copy" >&5
21778 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21779
21780 test "$cf_cv_have___builtin_va_copy" = yes &&
21781
21782 cat >>confdefs.h <<\EOF
21783 #define HAVE___BUILTIN_VA_COPY 1
21784 EOF
21785
21786 fi # cf_cv_have___va_copy
21787
21788 fi # cf_cv_have_va_copy
21789
21790 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21791 (*yes*)
21792         ;;
21793
21794 (*)
21795         echo "$as_me:21795: checking if we can simply copy va_list" >&5
21796 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21797 if test "${cf_cv_pointer_va_list+set}" = set; then
21798   echo $ECHO_N "(cached) $ECHO_C" >&6
21799 else
21800
21801 cat >conftest.$ac_ext <<_ACEOF
21802 #line 21802 "configure"
21803 #include "confdefs.h"
21804
21805 #include <stdarg.h>
21806
21807 int
21808 main (void)
21809 {
21810
21811         va_list dst;
21812         va_list src;
21813         dst = src
21814   ;
21815   return 0;
21816 }
21817 _ACEOF
21818 rm -f conftest.$ac_objext conftest$ac_exeext
21819 if { (eval echo "$as_me:21819: \"$ac_link\"") >&5
21820   (eval $ac_link) 2>&5
21821   ac_status=$?
21822   echo "$as_me:21822: \$? = $ac_status" >&5
21823   (exit $ac_status); } &&
21824          { ac_try='test -s conftest$ac_exeext'
21825   { (eval echo "$as_me:21825: \"$ac_try\"") >&5
21826   (eval $ac_try) 2>&5
21827   ac_status=$?
21828   echo "$as_me:21828: \$? = $ac_status" >&5
21829   (exit $ac_status); }; }; then
21830   cf_cv_pointer_va_list=yes
21831 else
21832   echo "$as_me: failed program was:" >&5
21833 cat conftest.$ac_ext >&5
21834 cf_cv_pointer_va_list=no
21835 fi
21836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21837 fi
21838 echo "$as_me:21838: result: $cf_cv_pointer_va_list" >&5
21839 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21840
21841         if test "$cf_cv_pointer_va_list" = no
21842         then
21843                 echo "$as_me:21843: checking if we can copy va_list indirectly" >&5
21844 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21845 if test "${cf_cv_array_va_list+set}" = set; then
21846   echo $ECHO_N "(cached) $ECHO_C" >&6
21847 else
21848
21849 cat >conftest.$ac_ext <<_ACEOF
21850 #line 21850 "configure"
21851 #include "confdefs.h"
21852
21853 #include <stdarg.h>
21854
21855 int
21856 main (void)
21857 {
21858
21859         va_list dst;
21860         va_list src;
21861         *dst = *src
21862   ;
21863   return 0;
21864 }
21865 _ACEOF
21866 rm -f conftest.$ac_objext conftest$ac_exeext
21867 if { (eval echo "$as_me:21867: \"$ac_link\"") >&5
21868   (eval $ac_link) 2>&5
21869   ac_status=$?
21870   echo "$as_me:21870: \$? = $ac_status" >&5
21871   (exit $ac_status); } &&
21872          { ac_try='test -s conftest$ac_exeext'
21873   { (eval echo "$as_me:21873: \"$ac_try\"") >&5
21874   (eval $ac_try) 2>&5
21875   ac_status=$?
21876   echo "$as_me:21876: \$? = $ac_status" >&5
21877   (exit $ac_status); }; }; then
21878   cf_cv_array_va_list=yes
21879 else
21880   echo "$as_me: failed program was:" >&5
21881 cat conftest.$ac_ext >&5
21882 cf_cv_array_va_list=no
21883 fi
21884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21885 fi
21886 echo "$as_me:21886: result: $cf_cv_array_va_list" >&5
21887 echo "${ECHO_T}$cf_cv_array_va_list" >&6
21888                 test "$cf_cv_array_va_list" = yes &&
21889 cat >>confdefs.h <<\EOF
21890 #define ARRAY_VA_LIST 1
21891 EOF
21892
21893         fi
21894         ;;
21895 esac
21896
21897 echo "$as_me:21897: checking for pid_t" >&5
21898 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
21899 if test "${ac_cv_type_pid_t+set}" = set; then
21900   echo $ECHO_N "(cached) $ECHO_C" >&6
21901 else
21902   cat >conftest.$ac_ext <<_ACEOF
21903 #line 21903 "configure"
21904 #include "confdefs.h"
21905 $ac_includes_default
21906 int
21907 main (void)
21908 {
21909 if ((pid_t *) 0)
21910   return 0;
21911 if (sizeof (pid_t))
21912   return 0;
21913   ;
21914   return 0;
21915 }
21916 _ACEOF
21917 rm -f conftest.$ac_objext
21918 if { (eval echo "$as_me:21918: \"$ac_compile\"") >&5
21919   (eval $ac_compile) 2>&5
21920   ac_status=$?
21921   echo "$as_me:21921: \$? = $ac_status" >&5
21922   (exit $ac_status); } &&
21923          { ac_try='test -s conftest.$ac_objext'
21924   { (eval echo "$as_me:21924: \"$ac_try\"") >&5
21925   (eval $ac_try) 2>&5
21926   ac_status=$?
21927   echo "$as_me:21927: \$? = $ac_status" >&5
21928   (exit $ac_status); }; }; then
21929   ac_cv_type_pid_t=yes
21930 else
21931   echo "$as_me: failed program was:" >&5
21932 cat conftest.$ac_ext >&5
21933 ac_cv_type_pid_t=no
21934 fi
21935 rm -f conftest.$ac_objext conftest.$ac_ext
21936 fi
21937 echo "$as_me:21937: result: $ac_cv_type_pid_t" >&5
21938 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
21939 if test $ac_cv_type_pid_t = yes; then
21940   :
21941 else
21942
21943 cat >>confdefs.h <<EOF
21944 #define pid_t int
21945 EOF
21946
21947 fi
21948
21949 for ac_header in unistd.h vfork.h
21950 do
21951 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21952 echo "$as_me:21952: checking for $ac_header" >&5
21953 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21954 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21955   echo $ECHO_N "(cached) $ECHO_C" >&6
21956 else
21957   cat >conftest.$ac_ext <<_ACEOF
21958 #line 21958 "configure"
21959 #include "confdefs.h"
21960 #include <$ac_header>
21961 _ACEOF
21962 if { (eval echo "$as_me:21962: \"$ac_cpp conftest.$ac_ext\"") >&5
21963   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21964   ac_status=$?
21965   egrep -v '^ *\+' conftest.er1 >conftest.err
21966   rm -f conftest.er1
21967   cat conftest.err >&5
21968   echo "$as_me:21968: \$? = $ac_status" >&5
21969   (exit $ac_status); } >/dev/null; then
21970   if test -s conftest.err; then
21971     ac_cpp_err=$ac_c_preproc_warn_flag
21972   else
21973     ac_cpp_err=
21974   fi
21975 else
21976   ac_cpp_err=yes
21977 fi
21978 if test -z "$ac_cpp_err"; then
21979   eval "$as_ac_Header=yes"
21980 else
21981   echo "$as_me: failed program was:" >&5
21982   cat conftest.$ac_ext >&5
21983   eval "$as_ac_Header=no"
21984 fi
21985 rm -f conftest.err conftest.$ac_ext
21986 fi
21987 echo "$as_me:21987: result: `eval echo '${'$as_ac_Header'}'`" >&5
21988 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21989 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21990   cat >>confdefs.h <<EOF
21991 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21992 EOF
21993
21994 fi
21995 done
21996
21997 for ac_func in fork vfork
21998 do
21999 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22000 echo "$as_me:22000: checking for $ac_func" >&5
22001 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22002 if eval "test \"\${$as_ac_var+set}\" = set"; then
22003   echo $ECHO_N "(cached) $ECHO_C" >&6
22004 else
22005   cat >conftest.$ac_ext <<_ACEOF
22006 #line 22006 "configure"
22007 #include "confdefs.h"
22008 #define $ac_func autoconf_temporary
22009 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22010 #undef $ac_func
22011
22012 #ifdef __cplusplus
22013 extern "C"
22014 #endif
22015
22016 /* We use char because int might match the return type of a gcc2
22017    builtin and then its argument prototype would still apply.  */
22018 char $ac_func (void);
22019
22020 int
22021 main (void)
22022 {
22023
22024 /* The GNU C library defines stubs for functions which it implements
22025     to always fail with ENOSYS.  Some functions are actually named
22026     something starting with __ and the normal name is an alias.  */
22027 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22028 #error found stub for $ac_func
22029 #endif
22030
22031         return $ac_func ();
22032   ;
22033   return 0;
22034 }
22035 _ACEOF
22036 rm -f conftest.$ac_objext conftest$ac_exeext
22037 if { (eval echo "$as_me:22037: \"$ac_link\"") >&5
22038   (eval $ac_link) 2>&5
22039   ac_status=$?
22040   echo "$as_me:22040: \$? = $ac_status" >&5
22041   (exit $ac_status); } &&
22042          { ac_try='test -s conftest$ac_exeext'
22043   { (eval echo "$as_me:22043: \"$ac_try\"") >&5
22044   (eval $ac_try) 2>&5
22045   ac_status=$?
22046   echo "$as_me:22046: \$? = $ac_status" >&5
22047   (exit $ac_status); }; }; then
22048   eval "$as_ac_var=yes"
22049 else
22050   echo "$as_me: failed program was:" >&5
22051 cat conftest.$ac_ext >&5
22052 eval "$as_ac_var=no"
22053 fi
22054 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22055 fi
22056 echo "$as_me:22056: result: `eval echo '${'$as_ac_var'}'`" >&5
22057 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22058 if test `eval echo '${'$as_ac_var'}'` = yes; then
22059   cat >>confdefs.h <<EOF
22060 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22061 EOF
22062
22063 fi
22064 done
22065
22066 ac_cv_func_fork_works=$ac_cv_func_fork
22067 if test "x$ac_cv_func_fork" = xyes; then
22068   echo "$as_me:22068: checking for working fork" >&5
22069 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22070 if test "${ac_cv_func_fork_works+set}" = set; then
22071   echo $ECHO_N "(cached) $ECHO_C" >&6
22072 else
22073   if test "$cross_compiling" = yes; then
22074   ac_cv_func_fork_works=cross
22075 else
22076   cat >conftest.$ac_ext <<_ACEOF
22077 /* By Rüdiger Kuhlmann. */
22078       #include <sys/types.h>
22079       #if HAVE_UNISTD_H
22080       # include <unistd.h>
22081       #endif
22082       /* Some systems only have a dummy stub for fork() */
22083       int main (void)
22084       {
22085         if (fork() < 0)
22086           $ac_main_return (1);
22087         $ac_main_return (0);
22088       }
22089 _ACEOF
22090 rm -f conftest$ac_exeext
22091 if { (eval echo "$as_me:22091: \"$ac_link\"") >&5
22092   (eval $ac_link) 2>&5
22093   ac_status=$?
22094   echo "$as_me:22094: \$? = $ac_status" >&5
22095   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22096   { (eval echo "$as_me:22096: \"$ac_try\"") >&5
22097   (eval $ac_try) 2>&5
22098   ac_status=$?
22099   echo "$as_me:22099: \$? = $ac_status" >&5
22100   (exit $ac_status); }; }; then
22101   ac_cv_func_fork_works=yes
22102 else
22103   echo "$as_me: program exited with status $ac_status" >&5
22104 echo "$as_me: failed program was:" >&5
22105 cat conftest.$ac_ext >&5
22106 ac_cv_func_fork_works=no
22107 fi
22108 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22109 fi
22110 fi
22111 echo "$as_me:22111: result: $ac_cv_func_fork_works" >&5
22112 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22113
22114 fi
22115 if test "x$ac_cv_func_fork_works" = xcross; then
22116   case $host in
22117     *-*-amigaos* | *-*-msdosdjgpp*)
22118       # Override, as these systems have only a dummy fork() stub
22119       ac_cv_func_fork_works=no
22120       ;;
22121     *)
22122       ac_cv_func_fork_works=yes
22123       ;;
22124   esac
22125   { echo "$as_me:22125: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22126 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22127 fi
22128 ac_cv_func_vfork_works=$ac_cv_func_vfork
22129 if test "x$ac_cv_func_vfork" = xyes; then
22130   echo "$as_me:22130: checking for working vfork" >&5
22131 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22132 if test "${ac_cv_func_vfork_works+set}" = set; then
22133   echo $ECHO_N "(cached) $ECHO_C" >&6
22134 else
22135   if test "$cross_compiling" = yes; then
22136   ac_cv_func_vfork_works=cross
22137 else
22138   cat >conftest.$ac_ext <<_ACEOF
22139 #line 22139 "configure"
22140 #include "confdefs.h"
22141 /* Thanks to Paul Eggert for this test.  */
22142 #include <stdio.h>
22143 #include <sys/types.h>
22144 #include <sys/stat.h>
22145 #if HAVE_UNISTD_H
22146 # include <unistd.h>
22147 #endif
22148 #if HAVE_VFORK_H
22149 # include <vfork.h>
22150 #endif
22151 /* On some sparc systems, changes by the child to local and incoming
22152    argument registers are propagated back to the parent.  The compiler
22153    is told about this with #include <vfork.h>, but some compilers
22154    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22155    static variable whose address is put into a register that is
22156    clobbered by the vfork.  */
22157 static
22158 #ifdef __cplusplus
22159 sparc_address_test (int arg)
22160 # else
22161 sparc_address_test (arg) int arg;
22162 #endif
22163 {
22164   static pid_t child;
22165   if (!child) {
22166     child = vfork ();
22167     if (child < 0) {
22168       perror ("vfork");
22169       _exit(2);
22170     }
22171     if (!child) {
22172       arg = getpid();
22173       write(-1, "", 0);
22174       _exit (arg);
22175     }
22176   }
22177 }
22178
22179 int
22180 main (void)
22181 {
22182   pid_t parent = getpid ();
22183   pid_t child;
22184
22185   sparc_address_test ();
22186
22187   child = vfork ();
22188
22189   if (child == 0) {
22190     /* Here is another test for sparc vfork register problems.  This
22191        test uses lots of local variables, at least as many local
22192        variables as main has allocated so far including compiler
22193        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22194        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22195        reuse the register of parent for one of the local variables,
22196        since it will think that parent can't possibly be used any more
22197        in this routine.  Assigning to the local variable will thus
22198        munge parent in the parent process.  */
22199     pid_t
22200       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22201       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22202     /* Convince the compiler that p..p7 are live; otherwise, it might
22203        use the same hardware register for all 8 local variables.  */
22204     if (p != p1 || p != p2 || p != p3 || p != p4
22205         || p != p5 || p != p6 || p != p7)
22206       _exit(1);
22207
22208     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22209        from child file descriptors.  If the child closes a descriptor
22210        before it execs or exits, this munges the parent's descriptor
22211        as well.  Test for this by closing stdout in the child.  */
22212     _exit(close(fileno(stdout)) != 0);
22213   } else {
22214     int status;
22215     struct stat st;
22216
22217     while (wait(&status) != child)
22218       ;
22219     $ac_main_return(
22220          /* Was there some problem with vforking?  */
22221          child < 0
22222
22223          /* Did the child fail?  (This shouldn't happen.)  */
22224          || status
22225
22226          /* Did the vfork/compiler bug occur?  */
22227          || parent != getpid()
22228
22229          /* Did the file descriptor bug occur?  */
22230          || fstat(fileno(stdout), &st) != 0
22231          );
22232   }
22233 }
22234 _ACEOF
22235 rm -f conftest$ac_exeext
22236 if { (eval echo "$as_me:22236: \"$ac_link\"") >&5
22237   (eval $ac_link) 2>&5
22238   ac_status=$?
22239   echo "$as_me:22239: \$? = $ac_status" >&5
22240   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22241   { (eval echo "$as_me:22241: \"$ac_try\"") >&5
22242   (eval $ac_try) 2>&5
22243   ac_status=$?
22244   echo "$as_me:22244: \$? = $ac_status" >&5
22245   (exit $ac_status); }; }; then
22246   ac_cv_func_vfork_works=yes
22247 else
22248   echo "$as_me: program exited with status $ac_status" >&5
22249 echo "$as_me: failed program was:" >&5
22250 cat conftest.$ac_ext >&5
22251 ac_cv_func_vfork_works=no
22252 fi
22253 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22254 fi
22255 fi
22256 echo "$as_me:22256: result: $ac_cv_func_vfork_works" >&5
22257 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22258
22259 fi;
22260 if test "x$ac_cv_func_fork_works" = xcross; then
22261   ac_cv_func_vfork_works=ac_cv_func_vfork
22262   { echo "$as_me:22262: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22263 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22264 fi
22265
22266 if test "x$ac_cv_func_vfork_works" = xyes; then
22267
22268 cat >>confdefs.h <<\EOF
22269 #define HAVE_WORKING_VFORK 1
22270 EOF
22271
22272 else
22273
22274 cat >>confdefs.h <<\EOF
22275 #define vfork fork
22276 EOF
22277
22278 fi
22279 if test "x$ac_cv_func_fork_works" = xyes; then
22280
22281 cat >>confdefs.h <<\EOF
22282 #define HAVE_WORKING_FORK 1
22283 EOF
22284
22285 fi
22286
22287 echo "$as_me:22287: checking if fopen accepts explicit binary mode" >&5
22288 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22289 if test "${cf_cv_fopen_bin_r+set}" = set; then
22290   echo $ECHO_N "(cached) $ECHO_C" >&6
22291 else
22292
22293         if test "$cross_compiling" = yes; then
22294   cf_cv_fopen_bin_r=unknown
22295 else
22296   cat >conftest.$ac_ext <<_ACEOF
22297 #line 22297 "configure"
22298 #include "confdefs.h"
22299
22300 #include <stdio.h>
22301 int main(void) {
22302         FILE *fp = fopen("conftest.tmp", "wb");
22303         int rc = 0;
22304         if (fp != 0) {
22305                 int p, q;
22306                 for (p = 0; p < 256; ++p) {
22307                         fputc(p, fp);
22308                 }
22309                 fclose(fp);
22310                 fp = fopen("conftest.tmp", "rb");
22311                 if (fp != 0) {
22312                         for (p = 0; p < 256; ++p) {
22313                                 q = fgetc(fp);
22314                                 if (q != p) {
22315                                         rc = 1;
22316                                         break;
22317                                 }
22318                         }
22319                 } else {
22320                         rc = 1;
22321                 }
22322         } else {
22323                 rc = 1;
22324         }
22325         ${cf_cv_main_return:-return} (rc);
22326 }
22327
22328 _ACEOF
22329 rm -f conftest$ac_exeext
22330 if { (eval echo "$as_me:22330: \"$ac_link\"") >&5
22331   (eval $ac_link) 2>&5
22332   ac_status=$?
22333   echo "$as_me:22333: \$? = $ac_status" >&5
22334   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22335   { (eval echo "$as_me:22335: \"$ac_try\"") >&5
22336   (eval $ac_try) 2>&5
22337   ac_status=$?
22338   echo "$as_me:22338: \$? = $ac_status" >&5
22339   (exit $ac_status); }; }; then
22340   cf_cv_fopen_bin_r=yes
22341 else
22342   echo "$as_me: program exited with status $ac_status" >&5
22343 echo "$as_me: failed program was:" >&5
22344 cat conftest.$ac_ext >&5
22345 cf_cv_fopen_bin_r=no
22346 fi
22347 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22348 fi
22349
22350 fi
22351 echo "$as_me:22351: result: $cf_cv_fopen_bin_r" >&5
22352 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22353 test "x$cf_cv_fopen_bin_r" != xno &&
22354 cat >>confdefs.h <<\EOF
22355 #define USE_FOPEN_BIN_R 1
22356 EOF
22357
22358 # special check for test/ditto.c
22359
22360 echo "$as_me:22360: checking for openpty in -lutil" >&5
22361 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22362 if test "${ac_cv_lib_util_openpty+set}" = set; then
22363   echo $ECHO_N "(cached) $ECHO_C" >&6
22364 else
22365   ac_check_lib_save_LIBS=$LIBS
22366 LIBS="-lutil  $LIBS"
22367 cat >conftest.$ac_ext <<_ACEOF
22368 #line 22368 "configure"
22369 #include "confdefs.h"
22370
22371 /* Override any gcc2 internal prototype to avoid an error.  */
22372 #ifdef __cplusplus
22373 extern "C"
22374 #endif
22375 /* We use char because int might match the return type of a gcc2
22376    builtin and then its argument prototype would still apply.  */
22377 char openpty ();
22378 int
22379 main (void)
22380 {
22381 openpty ();
22382   ;
22383   return 0;
22384 }
22385 _ACEOF
22386 rm -f conftest.$ac_objext conftest$ac_exeext
22387 if { (eval echo "$as_me:22387: \"$ac_link\"") >&5
22388   (eval $ac_link) 2>&5
22389   ac_status=$?
22390   echo "$as_me:22390: \$? = $ac_status" >&5
22391   (exit $ac_status); } &&
22392          { ac_try='test -s conftest$ac_exeext'
22393   { (eval echo "$as_me:22393: \"$ac_try\"") >&5
22394   (eval $ac_try) 2>&5
22395   ac_status=$?
22396   echo "$as_me:22396: \$? = $ac_status" >&5
22397   (exit $ac_status); }; }; then
22398   ac_cv_lib_util_openpty=yes
22399 else
22400   echo "$as_me: failed program was:" >&5
22401 cat conftest.$ac_ext >&5
22402 ac_cv_lib_util_openpty=no
22403 fi
22404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22405 LIBS=$ac_check_lib_save_LIBS
22406 fi
22407 echo "$as_me:22407: result: $ac_cv_lib_util_openpty" >&5
22408 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22409 if test $ac_cv_lib_util_openpty = yes; then
22410   cf_cv_lib_util=yes
22411 else
22412   cf_cv_lib_util=no
22413 fi
22414
22415 echo "$as_me:22415: checking for openpty header" >&5
22416 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22417 if test "${cf_cv_func_openpty+set}" = set; then
22418   echo $ECHO_N "(cached) $ECHO_C" >&6
22419 else
22420
22421         cf_save_LIBS="$LIBS"
22422         test $cf_cv_lib_util = yes && {
22423 cf_add_libs="$LIBS"
22424 # reverse order
22425 cf_add_0lib=
22426 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22427 # filter duplicates
22428 for cf_add_1lib in $cf_add_0lib; do
22429         for cf_add_2lib in $cf_add_libs; do
22430                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22431                         cf_add_1lib=
22432                         break
22433                 fi
22434         done
22435         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22436 done
22437 LIBS="$cf_add_libs"
22438  }
22439         for cf_header in pty.h libutil.h util.h
22440         do
22441         cat >conftest.$ac_ext <<_ACEOF
22442 #line 22442 "configure"
22443 #include "confdefs.h"
22444
22445 #include <$cf_header>
22446
22447 int
22448 main (void)
22449 {
22450
22451         int x = openpty((int *)0, (int *)0, (char *)0,
22452                                    (struct termios *)0, (struct winsize *)0);
22453
22454   ;
22455   return 0;
22456 }
22457 _ACEOF
22458 rm -f conftest.$ac_objext conftest$ac_exeext
22459 if { (eval echo "$as_me:22459: \"$ac_link\"") >&5
22460   (eval $ac_link) 2>&5
22461   ac_status=$?
22462   echo "$as_me:22462: \$? = $ac_status" >&5
22463   (exit $ac_status); } &&
22464          { ac_try='test -s conftest$ac_exeext'
22465   { (eval echo "$as_me:22465: \"$ac_try\"") >&5
22466   (eval $ac_try) 2>&5
22467   ac_status=$?
22468   echo "$as_me:22468: \$? = $ac_status" >&5
22469   (exit $ac_status); }; }; then
22470
22471                 cf_cv_func_openpty=$cf_header
22472                 break
22473
22474 else
22475   echo "$as_me: failed program was:" >&5
22476 cat conftest.$ac_ext >&5
22477
22478                 cf_cv_func_openpty=no
22479
22480 fi
22481 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22482         done
22483         LIBS="$cf_save_LIBS"
22484
22485 fi
22486 echo "$as_me:22486: result: $cf_cv_func_openpty" >&5
22487 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22488
22489 if test "$cf_cv_func_openpty" != no ; then
22490
22491 cat >>confdefs.h <<EOF
22492 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22493 EOF
22494
22495 cat >>confdefs.h <<\EOF
22496 #define USE_XTERM_PTY 1
22497 EOF
22498
22499         if test "x$cf_cv_lib_util" = xyes ; then
22500
22501 cf_add_libs="$TEST_LIBS"
22502 # reverse order
22503 cf_add_0lib=
22504 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22505 # filter duplicates
22506 for cf_add_1lib in $cf_add_0lib; do
22507         for cf_add_2lib in $cf_add_libs; do
22508                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22509                         cf_add_1lib=
22510                         break
22511                 fi
22512         done
22513         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22514 done
22515 TEST_LIBS="$cf_add_libs"
22516
22517         fi
22518 fi
22519
22520 if test "$with_hashed_db" != no ; then
22521
22522 cat >>confdefs.h <<\EOF
22523 #define USE_HASHED_DB 1
22524 EOF
22525
22526 case $with_hashed_db in
22527 (yes|*able*)
22528         ;;
22529 (*)
22530         if test -d "$with_hashed_db" ; then
22531
22532 if test -n "$with_hashed_db/include" ; then
22533   for cf_add_incdir in $with_hashed_db/include
22534   do
22535         while test $cf_add_incdir != /usr/include
22536         do
22537           if test -d $cf_add_incdir
22538           then
22539                 cf_have_incdir=no
22540                 if test -n "$CFLAGS$CPPFLAGS" ; then
22541                   # a loop is needed to ensure we can add subdirs of existing dirs
22542                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22543                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22544                           cf_have_incdir=yes; break
22545                         fi
22546                   done
22547                 fi
22548
22549                 if test "$cf_have_incdir" = no ; then
22550                   if test "$cf_add_incdir" = /usr/local/include ; then
22551                         if test "$GCC" = yes
22552                         then
22553                           cf_save_CPPFLAGS=$CPPFLAGS
22554
22555         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22556         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22557
22558                           cat >conftest.$ac_ext <<_ACEOF
22559 #line 22559 "configure"
22560 #include "confdefs.h"
22561 #include <stdio.h>
22562 int
22563 main (void)
22564 {
22565 printf("Hello")
22566   ;
22567   return 0;
22568 }
22569 _ACEOF
22570 rm -f conftest.$ac_objext
22571 if { (eval echo "$as_me:22571: \"$ac_compile\"") >&5
22572   (eval $ac_compile) 2>&5
22573   ac_status=$?
22574   echo "$as_me:22574: \$? = $ac_status" >&5
22575   (exit $ac_status); } &&
22576          { ac_try='test -s conftest.$ac_objext'
22577   { (eval echo "$as_me:22577: \"$ac_try\"") >&5
22578   (eval $ac_try) 2>&5
22579   ac_status=$?
22580   echo "$as_me:22580: \$? = $ac_status" >&5
22581   (exit $ac_status); }; }; then
22582   :
22583 else
22584   echo "$as_me: failed program was:" >&5
22585 cat conftest.$ac_ext >&5
22586 cf_have_incdir=yes
22587 fi
22588 rm -f conftest.$ac_objext conftest.$ac_ext
22589                           CPPFLAGS=$cf_save_CPPFLAGS
22590                         fi
22591                   fi
22592                 fi
22593
22594                 if test "$cf_have_incdir" = no ; then
22595                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22596
22597 echo "${as_me:-configure}:22597: testing adding $cf_add_incdir to include-path ..." 1>&5
22598
22599                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22600
22601                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22602                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22603                   cf_add_incdir="$cf_top_incdir"
22604                 else
22605                   break
22606                 fi
22607           else
22608                 break
22609           fi
22610         done
22611   done
22612 fi
22613
22614 if test -n "$with_hashed_db/lib" ; then
22615         for cf_add_libdir in $with_hashed_db/lib
22616         do
22617                 if test $cf_add_libdir = /usr/lib ; then
22618                         :
22619                 elif test -d $cf_add_libdir
22620                 then
22621                         cf_have_libdir=no
22622                         if test -n "$LDFLAGS$LIBS" ; then
22623                                 # a loop is needed to ensure we can add subdirs of existing dirs
22624                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22625                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22626                                                 cf_have_libdir=yes; break
22627                                         fi
22628                                 done
22629                         fi
22630                         if test "$cf_have_libdir" = no ; then
22631                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22632
22633 echo "${as_me:-configure}:22633: testing adding $cf_add_libdir to library-path ..." 1>&5
22634
22635                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22636                         fi
22637                 fi
22638         done
22639 fi
22640
22641         else
22642                 case "$with_hashed_db" in
22643                 (./*|../*|/*)
22644                         { echo "$as_me:22644: WARNING: no such directory $with_hashed_db" >&5
22645 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22646                         ;;
22647                 (*)
22648
22649 cf_search=
22650
22651 test "x$prefix" != "xNONE" && \
22652 test -d "$prefix" && \
22653  {
22654         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22655         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22656         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22657         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22658         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22659         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22660 }
22661
22662 for cf_subdir_prefix in \
22663         /usr \
22664         /usr/local \
22665         /usr/pkg \
22666         /opt \
22667         /opt/local \
22668         $HOME
22669 do
22670
22671 test "x$cf_subdir_prefix" != "x$prefix" && \
22672 test -d "$cf_subdir_prefix" && \
22673 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22674         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22675         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22676         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22677         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22678         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22679         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"
22680 }
22681
22682 done
22683
22684         for cf_item in $cf_search
22685         do
22686                 case $cf_item in
22687                 (*/$with_hashed_db)
22688
22689 if test -n "$cf_item" ; then
22690   for cf_add_incdir in $cf_item
22691   do
22692         while test $cf_add_incdir != /usr/include
22693         do
22694           if test -d $cf_add_incdir
22695           then
22696                 cf_have_incdir=no
22697                 if test -n "$CFLAGS$CPPFLAGS" ; then
22698                   # a loop is needed to ensure we can add subdirs of existing dirs
22699                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22700                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22701                           cf_have_incdir=yes; break
22702                         fi
22703                   done
22704                 fi
22705
22706                 if test "$cf_have_incdir" = no ; then
22707                   if test "$cf_add_incdir" = /usr/local/include ; then
22708                         if test "$GCC" = yes
22709                         then
22710                           cf_save_CPPFLAGS=$CPPFLAGS
22711
22712         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22713         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22714
22715                           cat >conftest.$ac_ext <<_ACEOF
22716 #line 22716 "configure"
22717 #include "confdefs.h"
22718 #include <stdio.h>
22719 int
22720 main (void)
22721 {
22722 printf("Hello")
22723   ;
22724   return 0;
22725 }
22726 _ACEOF
22727 rm -f conftest.$ac_objext
22728 if { (eval echo "$as_me:22728: \"$ac_compile\"") >&5
22729   (eval $ac_compile) 2>&5
22730   ac_status=$?
22731   echo "$as_me:22731: \$? = $ac_status" >&5
22732   (exit $ac_status); } &&
22733          { ac_try='test -s conftest.$ac_objext'
22734   { (eval echo "$as_me:22734: \"$ac_try\"") >&5
22735   (eval $ac_try) 2>&5
22736   ac_status=$?
22737   echo "$as_me:22737: \$? = $ac_status" >&5
22738   (exit $ac_status); }; }; then
22739   :
22740 else
22741   echo "$as_me: failed program was:" >&5
22742 cat conftest.$ac_ext >&5
22743 cf_have_incdir=yes
22744 fi
22745 rm -f conftest.$ac_objext conftest.$ac_ext
22746                           CPPFLAGS=$cf_save_CPPFLAGS
22747                         fi
22748                   fi
22749                 fi
22750
22751                 if test "$cf_have_incdir" = no ; then
22752                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22753
22754 echo "${as_me:-configure}:22754: testing adding $cf_add_incdir to include-path ..." 1>&5
22755
22756                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22757
22758                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22759                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22760                   cf_add_incdir="$cf_top_incdir"
22761                 else
22762                   break
22763                 fi
22764           else
22765                 break
22766           fi
22767         done
22768   done
22769 fi
22770
22771                         ;;
22772                 esac
22773         done
22774
22775 cf_search=
22776
22777 test "x$prefix" != "xNONE" && \
22778 test -d "$prefix" && \
22779  {
22780         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22781         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22782         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22783         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22784         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22785         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22786 }
22787
22788 for cf_subdir_prefix in \
22789         /usr \
22790         /usr/local \
22791         /usr/pkg \
22792         /opt \
22793         /opt/local \
22794         $HOME
22795 do
22796
22797 test "x$cf_subdir_prefix" != "x$prefix" && \
22798 test -d "$cf_subdir_prefix" && \
22799 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22800         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22801         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22802         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22803         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22804         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22805         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"
22806 }
22807
22808 done
22809
22810         for cf_item in $cf_search
22811         do
22812                 case $cf_item in
22813                 (*/$with_hashed_db)
22814
22815 if test -n "$cf_item" ; then
22816         for cf_add_libdir in $cf_item
22817         do
22818                 if test $cf_add_libdir = /usr/lib ; then
22819                         :
22820                 elif test -d $cf_add_libdir
22821                 then
22822                         cf_have_libdir=no
22823                         if test -n "$LDFLAGS$LIBS" ; then
22824                                 # a loop is needed to ensure we can add subdirs of existing dirs
22825                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22826                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22827                                                 cf_have_libdir=yes; break
22828                                         fi
22829                                 done
22830                         fi
22831                         if test "$cf_have_libdir" = no ; then
22832                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22833
22834 echo "${as_me:-configure}:22834: testing adding $cf_add_libdir to library-path ..." 1>&5
22835
22836                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22837                         fi
22838                 fi
22839         done
22840 fi
22841
22842                         ;;
22843                 esac
22844         done
22845
22846                         ;;
22847                 esac
22848         fi
22849 esac
22850
22851 echo "$as_me:22851: checking for db.h" >&5
22852 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22853 if test "${ac_cv_header_db_h+set}" = set; then
22854   echo $ECHO_N "(cached) $ECHO_C" >&6
22855 else
22856   cat >conftest.$ac_ext <<_ACEOF
22857 #line 22857 "configure"
22858 #include "confdefs.h"
22859 #include <db.h>
22860 _ACEOF
22861 if { (eval echo "$as_me:22861: \"$ac_cpp conftest.$ac_ext\"") >&5
22862   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22863   ac_status=$?
22864   egrep -v '^ *\+' conftest.er1 >conftest.err
22865   rm -f conftest.er1
22866   cat conftest.err >&5
22867   echo "$as_me:22867: \$? = $ac_status" >&5
22868   (exit $ac_status); } >/dev/null; then
22869   if test -s conftest.err; then
22870     ac_cpp_err=$ac_c_preproc_warn_flag
22871   else
22872     ac_cpp_err=
22873   fi
22874 else
22875   ac_cpp_err=yes
22876 fi
22877 if test -z "$ac_cpp_err"; then
22878   ac_cv_header_db_h=yes
22879 else
22880   echo "$as_me: failed program was:" >&5
22881   cat conftest.$ac_ext >&5
22882   ac_cv_header_db_h=no
22883 fi
22884 rm -f conftest.err conftest.$ac_ext
22885 fi
22886 echo "$as_me:22886: result: $ac_cv_header_db_h" >&5
22887 echo "${ECHO_T}$ac_cv_header_db_h" >&6
22888 if test $ac_cv_header_db_h = yes; then
22889
22890 echo "$as_me:22890: checking for version of db" >&5
22891 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
22892 if test "${cf_cv_hashed_db_version+set}" = set; then
22893   echo $ECHO_N "(cached) $ECHO_C" >&6
22894 else
22895
22896 cf_cv_hashed_db_version=unknown
22897
22898 for cf_db_version in 1 2 3 4 5 6
22899 do
22900
22901 echo "${as_me:-configure}:22901: testing checking for db version $cf_db_version ..." 1>&5
22902
22903         cat >conftest.$ac_ext <<_ACEOF
22904 #line 22904 "configure"
22905 #include "confdefs.h"
22906
22907 $ac_includes_default
22908 #include <db.h>
22909
22910 #ifdef DB_VERSION_MAJOR
22911         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
22912 #if $cf_db_version == DB_VERSION_MAJOR
22913         /* ok */
22914 #else
22915         make an error
22916 #endif
22917 #else
22918 #if $cf_db_version == 1
22919         /* ok: assuming this is DB 1.8.5 */
22920 #else
22921         make an error
22922 #endif
22923 #endif
22924
22925 int
22926 main (void)
22927 {
22928 DBT *foo = 0
22929   ;
22930   return 0;
22931 }
22932 _ACEOF
22933 rm -f conftest.$ac_objext
22934 if { (eval echo "$as_me:22934: \"$ac_compile\"") >&5
22935   (eval $ac_compile) 2>&5
22936   ac_status=$?
22937   echo "$as_me:22937: \$? = $ac_status" >&5
22938   (exit $ac_status); } &&
22939          { ac_try='test -s conftest.$ac_objext'
22940   { (eval echo "$as_me:22940: \"$ac_try\"") >&5
22941   (eval $ac_try) 2>&5
22942   ac_status=$?
22943   echo "$as_me:22943: \$? = $ac_status" >&5
22944   (exit $ac_status); }; }; then
22945
22946         cf_cv_hashed_db_version=$cf_db_version
22947         break
22948
22949 else
22950   echo "$as_me: failed program was:" >&5
22951 cat conftest.$ac_ext >&5
22952 fi
22953 rm -f conftest.$ac_objext conftest.$ac_ext
22954 done
22955
22956 fi
22957 echo "$as_me:22957: result: $cf_cv_hashed_db_version" >&5
22958 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
22959
22960 if test "$cf_cv_hashed_db_version" = unknown ; then
22961         { { echo "$as_me:22961: error: Cannot determine version of db" >&5
22962 echo "$as_me: error: Cannot determine version of db" >&2;}
22963    { (exit 1); exit 1; }; }
22964 else
22965
22966 echo "$as_me:22966: checking for db libraries" >&5
22967 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
22968 if test "${cf_cv_hashed_db_libs+set}" = set; then
22969   echo $ECHO_N "(cached) $ECHO_C" >&6
22970 else
22971
22972 cf_cv_hashed_db_libs=unknown
22973 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
22974 do
22975         cf_save_libs="$LIBS"
22976         if test -n "$cf_db_libs"; then
22977
22978 cf_add_libs="$LIBS"
22979 # reverse order
22980 cf_add_0lib=
22981 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22982 # filter duplicates
22983 for cf_add_1lib in $cf_add_0lib; do
22984         for cf_add_2lib in $cf_add_libs; do
22985                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22986                         cf_add_1lib=
22987                         break
22988                 fi
22989         done
22990         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22991 done
22992 LIBS="$cf_add_libs"
22993
22994         fi
22995
22996 echo "${as_me:-configure}:22996: testing checking for library "$cf_db_libs" ..." 1>&5
22997
22998         cat >conftest.$ac_ext <<_ACEOF
22999 #line 22999 "configure"
23000 #include "confdefs.h"
23001
23002 $ac_includes_default
23003 #include <db.h>
23004
23005 int
23006 main (void)
23007 {
23008
23009         char *path = "/tmp/foo";
23010 #ifdef DB_VERSION_MAJOR
23011 #if DB_VERSION_MAJOR >= 4
23012         DB *result = 0;
23013         db_create(&result, NULL, 0);
23014         result->open(result,
23015                 NULL,
23016                 path,
23017                 path,
23018                 DB_HASH,
23019                 DB_CREATE,
23020                 0644);
23021 #elif DB_VERSION_MAJOR >= 3
23022         DB *result = 0;
23023         db_create(&result, NULL, 0);
23024         result->open(result,
23025                 path,
23026                 path,
23027                 DB_HASH,
23028                 DB_CREATE,
23029                 0644);
23030 #elif DB_VERSION_MAJOR >= 2
23031         DB *result = 0;
23032         db_open(path,
23033                 DB_HASH,
23034                 DB_CREATE,
23035                 0644,
23036                 (DB_ENV *) 0,
23037                 (DB_INFO *) 0,
23038                 &result);
23039 #endif /* DB_VERSION_MAJOR */
23040 #else
23041         DB *result = dbopen(path,
23042                      2,
23043                      0644,
23044                      DB_HASH,
23045                      0);
23046 #endif
23047         ${cf_cv_main_return:-return}(result != 0)
23048
23049   ;
23050   return 0;
23051 }
23052 _ACEOF
23053 rm -f conftest.$ac_objext conftest$ac_exeext
23054 if { (eval echo "$as_me:23054: \"$ac_link\"") >&5
23055   (eval $ac_link) 2>&5
23056   ac_status=$?
23057   echo "$as_me:23057: \$? = $ac_status" >&5
23058   (exit $ac_status); } &&
23059          { ac_try='test -s conftest$ac_exeext'
23060   { (eval echo "$as_me:23060: \"$ac_try\"") >&5
23061   (eval $ac_try) 2>&5
23062   ac_status=$?
23063   echo "$as_me:23063: \$? = $ac_status" >&5
23064   (exit $ac_status); }; }; then
23065
23066         if test -n "$cf_db_libs" ; then
23067                 cf_cv_hashed_db_libs=$cf_db_libs
23068         else
23069                 cf_cv_hashed_db_libs=default
23070         fi
23071         LIBS="$cf_save_libs"
23072         break
23073
23074 else
23075   echo "$as_me: failed program was:" >&5
23076 cat conftest.$ac_ext >&5
23077 fi
23078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23079         LIBS="$cf_save_libs"
23080 done
23081
23082 fi
23083 echo "$as_me:23083: result: $cf_cv_hashed_db_libs" >&5
23084 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23085
23086         if test "$cf_cv_hashed_db_libs" = unknown ; then
23087                 { { echo "$as_me:23087: error: Cannot determine library for db" >&5
23088 echo "$as_me: error: Cannot determine library for db" >&2;}
23089    { (exit 1); exit 1; }; }
23090         elif test "$cf_cv_hashed_db_libs" != default ; then
23091
23092 cf_add_libs="$LIBS"
23093 # reverse order
23094 cf_add_0lib=
23095 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23096 # filter duplicates
23097 for cf_add_1lib in $cf_add_0lib; do
23098         for cf_add_2lib in $cf_add_libs; do
23099                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23100                         cf_add_1lib=
23101                         break
23102                 fi
23103         done
23104         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23105 done
23106 LIBS="$cf_add_libs"
23107
23108         fi
23109 fi
23110
23111 else
23112
23113         { { echo "$as_me:23113: error: Cannot find db.h" >&5
23114 echo "$as_me: error: Cannot find db.h" >&2;}
23115    { (exit 1); exit 1; }; }
23116
23117 fi
23118
23119 fi
23120
23121 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23122         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23123         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23124 fi
23125
23126 # Just in case, check if the C compiler has a bool type.
23127
23128 echo "$as_me:23128: checking if we should include stdbool.h" >&5
23129 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23130
23131 if test "${cf_cv_header_stdbool_h+set}" = set; then
23132   echo $ECHO_N "(cached) $ECHO_C" >&6
23133 else
23134
23135         cat >conftest.$ac_ext <<_ACEOF
23136 #line 23136 "configure"
23137 #include "confdefs.h"
23138
23139 int
23140 main (void)
23141 {
23142 bool foo = false
23143   ;
23144   return 0;
23145 }
23146 _ACEOF
23147 rm -f conftest.$ac_objext
23148 if { (eval echo "$as_me:23148: \"$ac_compile\"") >&5
23149   (eval $ac_compile) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit $ac_status); } &&
23153          { ac_try='test -s conftest.$ac_objext'
23154   { (eval echo "$as_me:23154: \"$ac_try\"") >&5
23155   (eval $ac_try) 2>&5
23156   ac_status=$?
23157   echo "$as_me:23157: \$? = $ac_status" >&5
23158   (exit $ac_status); }; }; then
23159   cf_cv_header_stdbool_h=0
23160 else
23161   echo "$as_me: failed program was:" >&5
23162 cat conftest.$ac_ext >&5
23163 cat >conftest.$ac_ext <<_ACEOF
23164 #line 23164 "configure"
23165 #include "confdefs.h"
23166
23167 #ifndef __BEOS__
23168 #include <stdbool.h>
23169 #endif
23170
23171 int
23172 main (void)
23173 {
23174 bool foo = false
23175   ;
23176   return 0;
23177 }
23178 _ACEOF
23179 rm -f conftest.$ac_objext
23180 if { (eval echo "$as_me:23180: \"$ac_compile\"") >&5
23181   (eval $ac_compile) 2>&5
23182   ac_status=$?
23183   echo "$as_me:23183: \$? = $ac_status" >&5
23184   (exit $ac_status); } &&
23185          { ac_try='test -s conftest.$ac_objext'
23186   { (eval echo "$as_me:23186: \"$ac_try\"") >&5
23187   (eval $ac_try) 2>&5
23188   ac_status=$?
23189   echo "$as_me:23189: \$? = $ac_status" >&5
23190   (exit $ac_status); }; }; then
23191   cf_cv_header_stdbool_h=1
23192 else
23193   echo "$as_me: failed program was:" >&5
23194 cat conftest.$ac_ext >&5
23195 cf_cv_header_stdbool_h=0
23196 fi
23197 rm -f conftest.$ac_objext conftest.$ac_ext
23198 fi
23199 rm -f conftest.$ac_objext conftest.$ac_ext
23200 fi
23201
23202 if test "$cf_cv_header_stdbool_h" = 1
23203 then    echo "$as_me:23203: result: yes" >&5
23204 echo "${ECHO_T}yes" >&6
23205 else    echo "$as_me:23205: result: no" >&5
23206 echo "${ECHO_T}no" >&6
23207 fi
23208
23209 echo "$as_me:23209: checking for builtin bool type" >&5
23210 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23211
23212 if test "${cf_cv_cc_bool_type+set}" = set; then
23213   echo $ECHO_N "(cached) $ECHO_C" >&6
23214 else
23215
23216         cat >conftest.$ac_ext <<_ACEOF
23217 #line 23217 "configure"
23218 #include "confdefs.h"
23219
23220 #include <stdio.h>
23221 #include <sys/types.h>
23222
23223 int
23224 main (void)
23225 {
23226 bool x = false
23227   ;
23228   return 0;
23229 }
23230 _ACEOF
23231 rm -f conftest.$ac_objext
23232 if { (eval echo "$as_me:23232: \"$ac_compile\"") >&5
23233   (eval $ac_compile) 2>&5
23234   ac_status=$?
23235   echo "$as_me:23235: \$? = $ac_status" >&5
23236   (exit $ac_status); } &&
23237          { ac_try='test -s conftest.$ac_objext'
23238   { (eval echo "$as_me:23238: \"$ac_try\"") >&5
23239   (eval $ac_try) 2>&5
23240   ac_status=$?
23241   echo "$as_me:23241: \$? = $ac_status" >&5
23242   (exit $ac_status); }; }; then
23243   cf_cv_cc_bool_type=1
23244 else
23245   echo "$as_me: failed program was:" >&5
23246 cat conftest.$ac_ext >&5
23247 cf_cv_cc_bool_type=0
23248 fi
23249 rm -f conftest.$ac_objext conftest.$ac_ext
23250
23251 fi
23252
23253 if test "$cf_cv_cc_bool_type" = 1
23254 then    echo "$as_me:23254: result: yes" >&5
23255 echo "${ECHO_T}yes" >&6
23256 else    echo "$as_me:23256: result: no" >&5
23257 echo "${ECHO_T}no" >&6
23258 fi
23259
23260 # Check for C++ compiler characteristics (and ensure that it's there!)
23261 if test -n "$CXX" ; then
23262         ac_ext=cc
23263 ac_cpp='$CXXCPP $CPPFLAGS'
23264 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23265 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23266 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23267 ac_main_return=return
23268
23269 if test -n "$GXX" ; then
23270
23271         cf_save="$LIBS"
23272         LIBS="$LIBS $CXXLIBS"
23273         echo "$as_me:23273: checking if we already have C++ library" >&5
23274 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23275         cat >conftest.$ac_ext <<_ACEOF
23276 #line 23276 "configure"
23277 #include "confdefs.h"
23278
23279                         #include <iostream>
23280 int
23281 main (void)
23282 {
23283
23284                         std::cout << "Hello World!" << std::endl;
23285   ;
23286   return 0;
23287 }
23288 _ACEOF
23289 rm -f conftest.$ac_objext conftest$ac_exeext
23290 if { (eval echo "$as_me:23290: \"$ac_link\"") >&5
23291   (eval $ac_link) 2>&5
23292   ac_status=$?
23293   echo "$as_me:23293: \$? = $ac_status" >&5
23294   (exit $ac_status); } &&
23295          { ac_try='test -s conftest$ac_exeext'
23296   { (eval echo "$as_me:23296: \"$ac_try\"") >&5
23297   (eval $ac_try) 2>&5
23298   ac_status=$?
23299   echo "$as_me:23299: \$? = $ac_status" >&5
23300   (exit $ac_status); }; }; then
23301   cf_have_libstdcpp=yes
23302 else
23303   echo "$as_me: failed program was:" >&5
23304 cat conftest.$ac_ext >&5
23305 cf_have_libstdcpp=no
23306 fi
23307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23308         echo "$as_me:23308: result: $cf_have_libstdcpp" >&5
23309 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23310         LIBS="$cf_save"
23311
23312         if test $cf_have_libstdcpp != yes
23313         then
23314                 case $cf_cv_system_name in
23315                 (os2*)
23316                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23317                                 cf_stdcpp_libname=stdcpp
23318                         else
23319                                 cf_stdcpp_libname=stdc++
23320                         fi
23321                         ;;
23322                 (*)
23323                         cf_stdcpp_libname=stdc++
23324                         ;;
23325                 esac
23326
23327                 echo "$as_me:23327: checking for library $cf_stdcpp_libname" >&5
23328 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23329 if test "${cf_cv_libstdcpp+set}" = set; then
23330   echo $ECHO_N "(cached) $ECHO_C" >&6
23331 else
23332
23333                         cf_save="$LIBS"
23334                         LIBS="$LIBS $CXXLIBS"
23335
23336 cf_add_libs="$LIBS"
23337 # reverse order
23338 cf_add_0lib=
23339 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23340 # filter duplicates
23341 for cf_add_1lib in $cf_add_0lib; do
23342         for cf_add_2lib in $cf_add_libs; do
23343                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23344                         cf_add_1lib=
23345                         break
23346                 fi
23347         done
23348         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23349 done
23350 LIBS="$cf_add_libs"
23351
23352                 cat >conftest.$ac_ext <<_ACEOF
23353 #line 23353 "configure"
23354 #include "confdefs.h"
23355
23356                                 #include <iostream>
23357 int
23358 main (void)
23359 {
23360
23361                                 std::cout << "Hello World!" << std::endl;
23362   ;
23363   return 0;
23364 }
23365 _ACEOF
23366 rm -f conftest.$ac_objext conftest$ac_exeext
23367 if { (eval echo "$as_me:23367: \"$ac_link\"") >&5
23368   (eval $ac_link) 2>&5
23369   ac_status=$?
23370   echo "$as_me:23370: \$? = $ac_status" >&5
23371   (exit $ac_status); } &&
23372          { ac_try='test -s conftest$ac_exeext'
23373   { (eval echo "$as_me:23373: \"$ac_try\"") >&5
23374   (eval $ac_try) 2>&5
23375   ac_status=$?
23376   echo "$as_me:23376: \$? = $ac_status" >&5
23377   (exit $ac_status); }; }; then
23378   cf_cv_libstdcpp=yes
23379 else
23380   echo "$as_me: failed program was:" >&5
23381 cat conftest.$ac_ext >&5
23382 cf_cv_libstdcpp=no
23383 fi
23384 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23385                         LIBS="$cf_save"
23386
23387 fi
23388 echo "$as_me:23388: result: $cf_cv_libstdcpp" >&5
23389 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23390                 test "$cf_cv_libstdcpp" = yes && {
23391 cf_add_libs="$CXXLIBS"
23392 # reverse order
23393 cf_add_0lib=
23394 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23395 # filter duplicates
23396 for cf_add_1lib in $cf_add_0lib; do
23397         for cf_add_2lib in $cf_add_libs; do
23398                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23399                         cf_add_1lib=
23400                         break
23401                 fi
23402         done
23403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23404 done
23405 CXXLIBS="$cf_add_libs"
23406  }
23407         fi
23408 fi
23409
23410         echo "$as_me:23410: checking whether $CXX understands -c and -o together" >&5
23411 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23412 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23413   echo $ECHO_N "(cached) $ECHO_C" >&6
23414 else
23415
23416 cat > conftest.$ac_ext <<CF_EOF
23417 int main(void)
23418 {
23419         ${cf_cv_main_return:-return}(0);
23420 }
23421 CF_EOF
23422 # We do the test twice because some compilers refuse to overwrite an
23423 # existing .o file with -o, though they will create one.
23424 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23425 if { (eval echo "$as_me:23425: \"$ac_try\"") >&5
23426   (eval $ac_try) 2>&5
23427   ac_status=$?
23428   echo "$as_me:23428: \$? = $ac_status" >&5
23429   (exit $ac_status); } &&
23430   test -f conftest2.$ac_objext && { (eval echo "$as_me:23430: \"$ac_try\"") >&5
23431   (eval $ac_try) 2>&5
23432   ac_status=$?
23433   echo "$as_me:23433: \$? = $ac_status" >&5
23434   (exit $ac_status); };
23435 then
23436   eval cf_cv_prog_CXX_c_o=yes
23437 else
23438   eval cf_cv_prog_CXX_c_o=no
23439 fi
23440 rm -rf conftest*
23441
23442 fi
23443 if test $cf_cv_prog_CXX_c_o = yes; then
23444   echo "$as_me:23444: result: yes" >&5
23445 echo "${ECHO_T}yes" >&6
23446 else
23447   echo "$as_me:23447: result: no" >&5
23448 echo "${ECHO_T}no" >&6
23449 fi
23450
23451         case $GXX_VERSION in
23452         (1.*|2.[0-6]*|[1-9][0-9].*)
23453                 cf_cxx_library=yes
23454                 ;;
23455         (*-2.7*|2.7*)
23456
23457 cf_cxx_library=unknown
23458 case $cf_cv_system_name in
23459 (os2*)
23460         cf_gpp_libname=gpp
23461         ;;
23462 (*)
23463         cf_gpp_libname=g++
23464         ;;
23465 esac
23466 if test "$GXX" = yes; then
23467         echo "$as_me:23467: checking for lib$cf_gpp_libname" >&5
23468 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23469         cf_save="$LIBS"
23470
23471 cf_add_libs="$LIBS"
23472 # reverse order
23473 cf_add_0lib=
23474 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23475 # filter duplicates
23476 for cf_add_1lib in $cf_add_0lib; do
23477         for cf_add_2lib in $cf_add_libs; do
23478                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23479                         cf_add_1lib=
23480                         break
23481                 fi
23482         done
23483         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23484 done
23485 LIBS="$cf_add_libs"
23486
23487         cat >conftest.$ac_ext <<_ACEOF
23488 #line 23488 "configure"
23489 #include "confdefs.h"
23490
23491 #include <$cf_gpp_libname/builtin.h>
23492
23493 int
23494 main (void)
23495 {
23496 two_arg_error_handler_t foo2 = lib_error_handler
23497   ;
23498   return 0;
23499 }
23500 _ACEOF
23501 rm -f conftest.$ac_objext conftest$ac_exeext
23502 if { (eval echo "$as_me:23502: \"$ac_link\"") >&5
23503   (eval $ac_link) 2>&5
23504   ac_status=$?
23505   echo "$as_me:23505: \$? = $ac_status" >&5
23506   (exit $ac_status); } &&
23507          { ac_try='test -s conftest$ac_exeext'
23508   { (eval echo "$as_me:23508: \"$ac_try\"") >&5
23509   (eval $ac_try) 2>&5
23510   ac_status=$?
23511   echo "$as_me:23511: \$? = $ac_status" >&5
23512   (exit $ac_status); }; }; then
23513   cf_cxx_library=yes
23514
23515 cf_add_libs="$CXXLIBS"
23516 # reverse order
23517 cf_add_0lib=
23518 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23519 # filter duplicates
23520 for cf_add_1lib in $cf_add_0lib; do
23521         for cf_add_2lib in $cf_add_libs; do
23522                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23523                         cf_add_1lib=
23524                         break
23525                 fi
23526         done
23527         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23528 done
23529 CXXLIBS="$cf_add_libs"
23530
23531          if test "$cf_gpp_libname" = cpp ; then
23532
23533 cat >>confdefs.h <<\EOF
23534 #define HAVE_GPP_BUILTIN_H 1
23535 EOF
23536
23537          else
23538
23539 cat >>confdefs.h <<\EOF
23540 #define HAVE_GXX_BUILTIN_H 1
23541 EOF
23542
23543          fi
23544 else
23545   echo "$as_me: failed program was:" >&5
23546 cat conftest.$ac_ext >&5
23547 cat >conftest.$ac_ext <<_ACEOF
23548 #line 23548 "configure"
23549 #include "confdefs.h"
23550
23551 #include <builtin.h>
23552
23553 int
23554 main (void)
23555 {
23556 two_arg_error_handler_t foo2 = lib_error_handler
23557   ;
23558   return 0;
23559 }
23560 _ACEOF
23561 rm -f conftest.$ac_objext conftest$ac_exeext
23562 if { (eval echo "$as_me:23562: \"$ac_link\"") >&5
23563   (eval $ac_link) 2>&5
23564   ac_status=$?
23565   echo "$as_me:23565: \$? = $ac_status" >&5
23566   (exit $ac_status); } &&
23567          { ac_try='test -s conftest$ac_exeext'
23568   { (eval echo "$as_me:23568: \"$ac_try\"") >&5
23569   (eval $ac_try) 2>&5
23570   ac_status=$?
23571   echo "$as_me:23571: \$? = $ac_status" >&5
23572   (exit $ac_status); }; }; then
23573   cf_cxx_library=yes
23574
23575 cf_add_libs="$CXXLIBS"
23576 # reverse order
23577 cf_add_0lib=
23578 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23579 # filter duplicates
23580 for cf_add_1lib in $cf_add_0lib; do
23581         for cf_add_2lib in $cf_add_libs; do
23582                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23583                         cf_add_1lib=
23584                         break
23585                 fi
23586         done
23587         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23588 done
23589 CXXLIBS="$cf_add_libs"
23590
23591 cat >>confdefs.h <<\EOF
23592 #define HAVE_BUILTIN_H 1
23593 EOF
23594
23595 else
23596   echo "$as_me: failed program was:" >&5
23597 cat conftest.$ac_ext >&5
23598 cf_cxx_library=no
23599 fi
23600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23601 fi
23602 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23603         LIBS="$cf_save"
23604         echo "$as_me:23604: result: $cf_cxx_library" >&5
23605 echo "${ECHO_T}$cf_cxx_library" >&6
23606 fi
23607
23608                 ;;
23609         (*)
23610                 cf_cxx_library=no
23611                 ;;
23612         esac
23613
23614         ac_ext=cc
23615 ac_cpp='$CXXCPP $CPPFLAGS'
23616 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23617 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23618 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23619 ac_main_return=return
23620 echo "$as_me:23620: checking how to run the C++ preprocessor" >&5
23621 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23622 if test -z "$CXXCPP"; then
23623   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23624   echo $ECHO_N "(cached) $ECHO_C" >&6
23625 else
23626       # Double quotes because CXXCPP needs to be expanded
23627     for CXXCPP in "$CXX -E" "/lib/cpp"
23628     do
23629       ac_preproc_ok=false
23630 for ac_cxx_preproc_warn_flag in '' yes
23631 do
23632   # Use a header file that comes with gcc, so configuring glibc
23633   # with a fresh cross-compiler works.
23634   # On the NeXT, cc -E runs the code through the compiler's parser,
23635   # not just through cpp. "Syntax error" is here to catch this case.
23636   cat >conftest.$ac_ext <<_ACEOF
23637 #line 23637 "configure"
23638 #include "confdefs.h"
23639 #include <assert.h>
23640                      Syntax error
23641 _ACEOF
23642 if { (eval echo "$as_me:23642: \"$ac_cpp conftest.$ac_ext\"") >&5
23643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23644   ac_status=$?
23645   egrep -v '^ *\+' conftest.er1 >conftest.err
23646   rm -f conftest.er1
23647   cat conftest.err >&5
23648   echo "$as_me:23648: \$? = $ac_status" >&5
23649   (exit $ac_status); } >/dev/null; then
23650   if test -s conftest.err; then
23651     ac_cpp_err=$ac_cxx_preproc_warn_flag
23652   else
23653     ac_cpp_err=
23654   fi
23655 else
23656   ac_cpp_err=yes
23657 fi
23658 if test -z "$ac_cpp_err"; then
23659   :
23660 else
23661   echo "$as_me: failed program was:" >&5
23662   cat conftest.$ac_ext >&5
23663   # Broken: fails on valid input.
23664 continue
23665 fi
23666 rm -f conftest.err conftest.$ac_ext
23667
23668   # OK, works on sane cases.  Now check whether non-existent headers
23669   # can be detected and how.
23670   cat >conftest.$ac_ext <<_ACEOF
23671 #line 23671 "configure"
23672 #include "confdefs.h"
23673 #include <ac_nonexistent.h>
23674 _ACEOF
23675 if { (eval echo "$as_me:23675: \"$ac_cpp conftest.$ac_ext\"") >&5
23676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23677   ac_status=$?
23678   egrep -v '^ *\+' conftest.er1 >conftest.err
23679   rm -f conftest.er1
23680   cat conftest.err >&5
23681   echo "$as_me:23681: \$? = $ac_status" >&5
23682   (exit $ac_status); } >/dev/null; then
23683   if test -s conftest.err; then
23684     ac_cpp_err=$ac_cxx_preproc_warn_flag
23685   else
23686     ac_cpp_err=
23687   fi
23688 else
23689   ac_cpp_err=yes
23690 fi
23691 if test -z "$ac_cpp_err"; then
23692   # Broken: success on invalid input.
23693 continue
23694 else
23695   echo "$as_me: failed program was:" >&5
23696   cat conftest.$ac_ext >&5
23697   # Passes both tests.
23698 ac_preproc_ok=:
23699 break
23700 fi
23701 rm -f conftest.err conftest.$ac_ext
23702
23703 done
23704 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23705 rm -f conftest.err conftest.$ac_ext
23706 if $ac_preproc_ok; then
23707   break
23708 fi
23709
23710     done
23711     ac_cv_prog_CXXCPP=$CXXCPP
23712
23713 fi
23714   CXXCPP=$ac_cv_prog_CXXCPP
23715 else
23716   ac_cv_prog_CXXCPP=$CXXCPP
23717 fi
23718 echo "$as_me:23718: result: $CXXCPP" >&5
23719 echo "${ECHO_T}$CXXCPP" >&6
23720 ac_preproc_ok=false
23721 for ac_cxx_preproc_warn_flag in '' yes
23722 do
23723   # Use a header file that comes with gcc, so configuring glibc
23724   # with a fresh cross-compiler works.
23725   # On the NeXT, cc -E runs the code through the compiler's parser,
23726   # not just through cpp. "Syntax error" is here to catch this case.
23727   cat >conftest.$ac_ext <<_ACEOF
23728 #line 23728 "configure"
23729 #include "confdefs.h"
23730 #include <assert.h>
23731                      Syntax error
23732 _ACEOF
23733 if { (eval echo "$as_me:23733: \"$ac_cpp conftest.$ac_ext\"") >&5
23734   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23735   ac_status=$?
23736   egrep -v '^ *\+' conftest.er1 >conftest.err
23737   rm -f conftest.er1
23738   cat conftest.err >&5
23739   echo "$as_me:23739: \$? = $ac_status" >&5
23740   (exit $ac_status); } >/dev/null; then
23741   if test -s conftest.err; then
23742     ac_cpp_err=$ac_cxx_preproc_warn_flag
23743   else
23744     ac_cpp_err=
23745   fi
23746 else
23747   ac_cpp_err=yes
23748 fi
23749 if test -z "$ac_cpp_err"; then
23750   :
23751 else
23752   echo "$as_me: failed program was:" >&5
23753   cat conftest.$ac_ext >&5
23754   # Broken: fails on valid input.
23755 continue
23756 fi
23757 rm -f conftest.err conftest.$ac_ext
23758
23759   # OK, works on sane cases.  Now check whether non-existent headers
23760   # can be detected and how.
23761   cat >conftest.$ac_ext <<_ACEOF
23762 #line 23762 "configure"
23763 #include "confdefs.h"
23764 #include <ac_nonexistent.h>
23765 _ACEOF
23766 if { (eval echo "$as_me:23766: \"$ac_cpp conftest.$ac_ext\"") >&5
23767   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23768   ac_status=$?
23769   egrep -v '^ *\+' conftest.er1 >conftest.err
23770   rm -f conftest.er1
23771   cat conftest.err >&5
23772   echo "$as_me:23772: \$? = $ac_status" >&5
23773   (exit $ac_status); } >/dev/null; then
23774   if test -s conftest.err; then
23775     ac_cpp_err=$ac_cxx_preproc_warn_flag
23776   else
23777     ac_cpp_err=
23778   fi
23779 else
23780   ac_cpp_err=yes
23781 fi
23782 if test -z "$ac_cpp_err"; then
23783   # Broken: success on invalid input.
23784 continue
23785 else
23786   echo "$as_me: failed program was:" >&5
23787   cat conftest.$ac_ext >&5
23788   # Passes both tests.
23789 ac_preproc_ok=:
23790 break
23791 fi
23792 rm -f conftest.err conftest.$ac_ext
23793
23794 done
23795 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23796 rm -f conftest.err conftest.$ac_ext
23797 if $ac_preproc_ok; then
23798   :
23799 else
23800   { { echo "$as_me:23800: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23801 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23802    { (exit 1); exit 1; }; }
23803 fi
23804
23805 ac_ext=cc
23806 ac_cpp='$CXXCPP $CPPFLAGS'
23807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23808 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23810 ac_main_return=return
23811
23812 for ac_header in typeinfo
23813 do
23814 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23815 echo "$as_me:23815: checking for $ac_header" >&5
23816 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23817 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23818   echo $ECHO_N "(cached) $ECHO_C" >&6
23819 else
23820   cat >conftest.$ac_ext <<_ACEOF
23821 #line 23821 "configure"
23822 #include "confdefs.h"
23823 #include <$ac_header>
23824 _ACEOF
23825 if { (eval echo "$as_me:23825: \"$ac_cpp conftest.$ac_ext\"") >&5
23826   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23827   ac_status=$?
23828   egrep -v '^ *\+' conftest.er1 >conftest.err
23829   rm -f conftest.er1
23830   cat conftest.err >&5
23831   echo "$as_me:23831: \$? = $ac_status" >&5
23832   (exit $ac_status); } >/dev/null; then
23833   if test -s conftest.err; then
23834     ac_cpp_err=$ac_cxx_preproc_warn_flag
23835   else
23836     ac_cpp_err=
23837   fi
23838 else
23839   ac_cpp_err=yes
23840 fi
23841 if test -z "$ac_cpp_err"; then
23842   eval "$as_ac_Header=yes"
23843 else
23844   echo "$as_me: failed program was:" >&5
23845   cat conftest.$ac_ext >&5
23846   eval "$as_ac_Header=no"
23847 fi
23848 rm -f conftest.err conftest.$ac_ext
23849 fi
23850 echo "$as_me:23850: result: `eval echo '${'$as_ac_Header'}'`" >&5
23851 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23852 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23853   cat >>confdefs.h <<EOF
23854 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23855 EOF
23856
23857 fi
23858 done
23859
23860 for ac_header in iostream
23861 do
23862 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23863 echo "$as_me:23863: checking for $ac_header" >&5
23864 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23865 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23866   echo $ECHO_N "(cached) $ECHO_C" >&6
23867 else
23868   cat >conftest.$ac_ext <<_ACEOF
23869 #line 23869 "configure"
23870 #include "confdefs.h"
23871 #include <$ac_header>
23872 _ACEOF
23873 if { (eval echo "$as_me:23873: \"$ac_cpp conftest.$ac_ext\"") >&5
23874   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23875   ac_status=$?
23876   egrep -v '^ *\+' conftest.er1 >conftest.err
23877   rm -f conftest.er1
23878   cat conftest.err >&5
23879   echo "$as_me:23879: \$? = $ac_status" >&5
23880   (exit $ac_status); } >/dev/null; then
23881   if test -s conftest.err; then
23882     ac_cpp_err=$ac_cxx_preproc_warn_flag
23883   else
23884     ac_cpp_err=
23885   fi
23886 else
23887   ac_cpp_err=yes
23888 fi
23889 if test -z "$ac_cpp_err"; then
23890   eval "$as_ac_Header=yes"
23891 else
23892   echo "$as_me: failed program was:" >&5
23893   cat conftest.$ac_ext >&5
23894   eval "$as_ac_Header=no"
23895 fi
23896 rm -f conftest.err conftest.$ac_ext
23897 fi
23898 echo "$as_me:23898: result: `eval echo '${'$as_ac_Header'}'`" >&5
23899 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23900 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23901   cat >>confdefs.h <<EOF
23902 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23903 EOF
23904
23905 fi
23906 done
23907
23908 if test x"$ac_cv_header_iostream" = xyes ; then
23909         echo "$as_me:23909: checking if iostream uses std-namespace" >&5
23910 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
23911         cat >conftest.$ac_ext <<_ACEOF
23912 #line 23912 "configure"
23913 #include "confdefs.h"
23914
23915 #include <iostream>
23916 using std::endl;
23917 using std::cerr;
23918 int
23919 main (void)
23920 {
23921
23922 cerr << "testing" << endl;
23923
23924   ;
23925   return 0;
23926 }
23927 _ACEOF
23928 rm -f conftest.$ac_objext
23929 if { (eval echo "$as_me:23929: \"$ac_compile\"") >&5
23930   (eval $ac_compile) 2>&5
23931   ac_status=$?
23932   echo "$as_me:23932: \$? = $ac_status" >&5
23933   (exit $ac_status); } &&
23934          { ac_try='test -s conftest.$ac_objext'
23935   { (eval echo "$as_me:23935: \"$ac_try\"") >&5
23936   (eval $ac_try) 2>&5
23937   ac_status=$?
23938   echo "$as_me:23938: \$? = $ac_status" >&5
23939   (exit $ac_status); }; }; then
23940   cf_iostream_namespace=yes
23941 else
23942   echo "$as_me: failed program was:" >&5
23943 cat conftest.$ac_ext >&5
23944 cf_iostream_namespace=no
23945 fi
23946 rm -f conftest.$ac_objext conftest.$ac_ext
23947         echo "$as_me:23947: result: $cf_iostream_namespace" >&5
23948 echo "${ECHO_T}$cf_iostream_namespace" >&6
23949         if test "$cf_iostream_namespace" = yes ; then
23950
23951 cat >>confdefs.h <<\EOF
23952 #define IOSTREAM_NAMESPACE 1
23953 EOF
23954
23955         fi
23956 fi
23957
23958 echo "$as_me:23958: checking if we should include stdbool.h" >&5
23959 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23960
23961 if test "${cf_cv_header_stdbool_h+set}" = set; then
23962   echo $ECHO_N "(cached) $ECHO_C" >&6
23963 else
23964
23965         cat >conftest.$ac_ext <<_ACEOF
23966 #line 23966 "configure"
23967 #include "confdefs.h"
23968
23969 int
23970 main (void)
23971 {
23972 bool foo = false
23973   ;
23974   return 0;
23975 }
23976 _ACEOF
23977 rm -f conftest.$ac_objext
23978 if { (eval echo "$as_me:23978: \"$ac_compile\"") >&5
23979   (eval $ac_compile) 2>&5
23980   ac_status=$?
23981   echo "$as_me:23981: \$? = $ac_status" >&5
23982   (exit $ac_status); } &&
23983          { ac_try='test -s conftest.$ac_objext'
23984   { (eval echo "$as_me:23984: \"$ac_try\"") >&5
23985   (eval $ac_try) 2>&5
23986   ac_status=$?
23987   echo "$as_me:23987: \$? = $ac_status" >&5
23988   (exit $ac_status); }; }; then
23989   cf_cv_header_stdbool_h=0
23990 else
23991   echo "$as_me: failed program was:" >&5
23992 cat conftest.$ac_ext >&5
23993 cat >conftest.$ac_ext <<_ACEOF
23994 #line 23994 "configure"
23995 #include "confdefs.h"
23996
23997 #ifndef __BEOS__
23998 #include <stdbool.h>
23999 #endif
24000
24001 int
24002 main (void)
24003 {
24004 bool foo = false
24005   ;
24006   return 0;
24007 }
24008 _ACEOF
24009 rm -f conftest.$ac_objext
24010 if { (eval echo "$as_me:24010: \"$ac_compile\"") >&5
24011   (eval $ac_compile) 2>&5
24012   ac_status=$?
24013   echo "$as_me:24013: \$? = $ac_status" >&5
24014   (exit $ac_status); } &&
24015          { ac_try='test -s conftest.$ac_objext'
24016   { (eval echo "$as_me:24016: \"$ac_try\"") >&5
24017   (eval $ac_try) 2>&5
24018   ac_status=$?
24019   echo "$as_me:24019: \$? = $ac_status" >&5
24020   (exit $ac_status); }; }; then
24021   cf_cv_header_stdbool_h=1
24022 else
24023   echo "$as_me: failed program was:" >&5
24024 cat conftest.$ac_ext >&5
24025 cf_cv_header_stdbool_h=0
24026 fi
24027 rm -f conftest.$ac_objext conftest.$ac_ext
24028 fi
24029 rm -f conftest.$ac_objext conftest.$ac_ext
24030 fi
24031
24032 if test "$cf_cv_header_stdbool_h" = 1
24033 then    echo "$as_me:24033: result: yes" >&5
24034 echo "${ECHO_T}yes" >&6
24035 else    echo "$as_me:24035: result: no" >&5
24036 echo "${ECHO_T}no" >&6
24037 fi
24038
24039 echo "$as_me:24039: checking for builtin bool type" >&5
24040 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24041
24042 if test "${cf_cv_builtin_bool+set}" = set; then
24043   echo $ECHO_N "(cached) $ECHO_C" >&6
24044 else
24045
24046         cat >conftest.$ac_ext <<_ACEOF
24047 #line 24047 "configure"
24048 #include "confdefs.h"
24049
24050 #include <stdio.h>
24051 #include <sys/types.h>
24052
24053 int
24054 main (void)
24055 {
24056 bool x = false
24057   ;
24058   return 0;
24059 }
24060 _ACEOF
24061 rm -f conftest.$ac_objext
24062 if { (eval echo "$as_me:24062: \"$ac_compile\"") >&5
24063   (eval $ac_compile) 2>&5
24064   ac_status=$?
24065   echo "$as_me:24065: \$? = $ac_status" >&5
24066   (exit $ac_status); } &&
24067          { ac_try='test -s conftest.$ac_objext'
24068   { (eval echo "$as_me:24068: \"$ac_try\"") >&5
24069   (eval $ac_try) 2>&5
24070   ac_status=$?
24071   echo "$as_me:24071: \$? = $ac_status" >&5
24072   (exit $ac_status); }; }; then
24073   cf_cv_builtin_bool=1
24074 else
24075   echo "$as_me: failed program was:" >&5
24076 cat conftest.$ac_ext >&5
24077 cf_cv_builtin_bool=0
24078 fi
24079 rm -f conftest.$ac_objext conftest.$ac_ext
24080
24081 fi
24082
24083 if test "$cf_cv_builtin_bool" = 1
24084 then    echo "$as_me:24084: result: yes" >&5
24085 echo "${ECHO_T}yes" >&6
24086 else    echo "$as_me:24086: result: no" >&5
24087 echo "${ECHO_T}no" >&6
24088 fi
24089
24090 echo "$as_me:24090: checking for size of bool" >&5
24091 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24092 if test "${cf_cv_type_of_bool+set}" = set; then
24093   echo $ECHO_N "(cached) $ECHO_C" >&6
24094 else
24095
24096         rm -f cf_test.out
24097         if test "$cross_compiling" = yes; then
24098   cf_cv_type_of_bool=unknown
24099 else
24100   cat >conftest.$ac_ext <<_ACEOF
24101 #line 24101 "configure"
24102 #include "confdefs.h"
24103
24104 #include <stdlib.h>
24105 #include <stdio.h>
24106
24107 #if defined(__cplusplus)
24108
24109 #ifdef HAVE_GXX_BUILTIN_H
24110 #include <g++/builtin.h>
24111 #elif HAVE_GPP_BUILTIN_H
24112 #include <gpp/builtin.h>
24113 #elif HAVE_BUILTIN_H
24114 #include <builtin.h>
24115 #endif
24116
24117 #else
24118
24119 #if $cf_cv_header_stdbool_h
24120 #include <stdbool.h>
24121 #endif
24122
24123 #endif
24124
24125 int main(void)
24126 {
24127         FILE *fp = fopen("cf_test.out", "w");
24128         if (fp != 0) {
24129                 bool x = true;
24130                 if ((bool)(-x) >= 0)
24131                         fputs("unsigned ", fp);
24132                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24133                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24134                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24135                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24136                 fclose(fp);
24137         }
24138         ${cf_cv_main_return:-return}(0);
24139 }
24140
24141 _ACEOF
24142 rm -f conftest$ac_exeext
24143 if { (eval echo "$as_me:24143: \"$ac_link\"") >&5
24144   (eval $ac_link) 2>&5
24145   ac_status=$?
24146   echo "$as_me:24146: \$? = $ac_status" >&5
24147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24148   { (eval echo "$as_me:24148: \"$ac_try\"") >&5
24149   (eval $ac_try) 2>&5
24150   ac_status=$?
24151   echo "$as_me:24151: \$? = $ac_status" >&5
24152   (exit $ac_status); }; }; then
24153   cf_cv_type_of_bool=`cat cf_test.out`
24154                  if test -z "$cf_cv_type_of_bool"; then
24155                    cf_cv_type_of_bool=unknown
24156                  fi
24157 else
24158   echo "$as_me: program exited with status $ac_status" >&5
24159 echo "$as_me: failed program was:" >&5
24160 cat conftest.$ac_ext >&5
24161 cf_cv_type_of_bool=unknown
24162 fi
24163 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24164 fi
24165
24166 fi
24167
24168         rm -f cf_test.out
24169 echo "$as_me:24169: result: $cf_cv_type_of_bool" >&5
24170 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24171 if test "$cf_cv_type_of_bool" = unknown ; then
24172         case .$NCURSES_BOOL in
24173         (.auto|.) NCURSES_BOOL=unsigned;;
24174         esac
24175         { echo "$as_me:24175: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24176 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24177         cf_cv_type_of_bool=$NCURSES_BOOL
24178 fi
24179
24180 echo "$as_me:24180: checking for special defines needed for etip.h" >&5
24181 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24182 cf_save_CXXFLAGS="$CXXFLAGS"
24183 cf_result="none"
24184
24185 # etip.h includes ncurses.h which includes ncurses_dll.h
24186 # But ncurses_dll.h is generated - fix here.
24187 test -d include || mkdir include
24188 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
24189
24190 for cf_math in "" MATH_H
24191 do
24192 for cf_excp in "" MATH_EXCEPTION
24193 do
24194         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24195         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24196         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24197 cat >conftest.$ac_ext <<_ACEOF
24198 #line 24198 "configure"
24199 #include "confdefs.h"
24200
24201 #include <etip.h.in>
24202
24203 int
24204 main (void)
24205 {
24206
24207   ;
24208   return 0;
24209 }
24210 _ACEOF
24211 rm -f conftest.$ac_objext
24212 if { (eval echo "$as_me:24212: \"$ac_compile\"") >&5
24213   (eval $ac_compile) 2>&5
24214   ac_status=$?
24215   echo "$as_me:24215: \$? = $ac_status" >&5
24216   (exit $ac_status); } &&
24217          { ac_try='test -s conftest.$ac_objext'
24218   { (eval echo "$as_me:24218: \"$ac_try\"") >&5
24219   (eval $ac_try) 2>&5
24220   ac_status=$?
24221   echo "$as_me:24221: \$? = $ac_status" >&5
24222   (exit $ac_status); }; }; then
24223
24224         test -n "$cf_math" && cat >>confdefs.h <<EOF
24225 #define ETIP_NEEDS_${cf_math} 1
24226 EOF
24227
24228         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24229 #define ETIP_NEEDS_${cf_excp} 1
24230 EOF
24231
24232         cf_result="$cf_math $cf_excp"
24233         break 2
24234
24235 else
24236   echo "$as_me: failed program was:" >&5
24237 cat conftest.$ac_ext >&5
24238 fi
24239 rm -f conftest.$ac_objext conftest.$ac_ext
24240 done
24241 done
24242 echo "$as_me:24242: result: $cf_result" >&5
24243 echo "${ECHO_T}$cf_result" >&6
24244 CXXFLAGS="$cf_save_CXXFLAGS"
24245
24246 if test -n "$CXX"; then
24247 echo "$as_me:24247: checking if $CXX accepts parameter initialization" >&5
24248 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24249 if test "${cf_cv_cpp_param_init+set}" = set; then
24250   echo $ECHO_N "(cached) $ECHO_C" >&6
24251 else
24252
24253         ac_ext=cc
24254 ac_cpp='$CXXCPP $CPPFLAGS'
24255 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24256 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24257 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24258 ac_main_return=return
24259
24260         if test "$cross_compiling" = yes; then
24261   cf_cv_cpp_param_init=unknown
24262 else
24263   cat >conftest.$ac_ext <<_ACEOF
24264 #line 24264 "configure"
24265 #include "confdefs.h"
24266
24267 class TEST {
24268 private:
24269         int value;
24270 public:
24271         TEST(int x = 1);
24272         ~TEST();
24273 };
24274
24275 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24276 {
24277         value = x;
24278 }
24279 int main(void) { }
24280
24281 _ACEOF
24282 rm -f conftest$ac_exeext
24283 if { (eval echo "$as_me:24283: \"$ac_link\"") >&5
24284   (eval $ac_link) 2>&5
24285   ac_status=$?
24286   echo "$as_me:24286: \$? = $ac_status" >&5
24287   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24288   { (eval echo "$as_me:24288: \"$ac_try\"") >&5
24289   (eval $ac_try) 2>&5
24290   ac_status=$?
24291   echo "$as_me:24291: \$? = $ac_status" >&5
24292   (exit $ac_status); }; }; then
24293   cf_cv_cpp_param_init=yes
24294 else
24295   echo "$as_me: program exited with status $ac_status" >&5
24296 echo "$as_me: failed program was:" >&5
24297 cat conftest.$ac_ext >&5
24298 cf_cv_cpp_param_init=no
24299 fi
24300 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24301 fi
24302         ac_ext=cc
24303 ac_cpp='$CXXCPP $CPPFLAGS'
24304 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24305 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24306 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24307 ac_main_return=return
24308
24309 fi
24310 echo "$as_me:24310: result: $cf_cv_cpp_param_init" >&5
24311 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24312 fi
24313 test "$cf_cv_cpp_param_init" = yes &&
24314 cat >>confdefs.h <<\EOF
24315 #define CPP_HAS_PARAM_INIT 1
24316 EOF
24317
24318 if test -n "$CXX"; then
24319
24320 echo "$as_me:24320: checking if $CXX accepts static_cast" >&5
24321 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24322 if test "${cf_cv_cpp_static_cast+set}" = set; then
24323   echo $ECHO_N "(cached) $ECHO_C" >&6
24324 else
24325
24326         ac_ext=cc
24327 ac_cpp='$CXXCPP $CPPFLAGS'
24328 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24329 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24330 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24331 ac_main_return=return
24332
24333         cat >conftest.$ac_ext <<_ACEOF
24334 #line 24334 "configure"
24335 #include "confdefs.h"
24336
24337 class NCursesPanel
24338 {
24339 public:
24340   NCursesPanel(int nlines,
24341                int ncols,
24342                int begin_y = 0,
24343                int begin_x = 0)
24344   {
24345   }
24346   NCursesPanel();
24347   ~NCursesPanel();
24348 };
24349
24350 template<class T> class NCursesUserPanel : public NCursesPanel
24351 {
24352 public:
24353   NCursesUserPanel (int nlines,
24354                     int ncols,
24355                     int begin_y = 0,
24356                     int begin_x = 0,
24357                     const T* p_UserData = static_cast<T*>(0))
24358     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24359   {
24360   };
24361   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24362   {
24363   };
24364
24365   virtual ~NCursesUserPanel() {};
24366 };
24367
24368 int
24369 main (void)
24370 {
24371
24372         const char* p_UserData = static_cast<char*>(0)
24373   ;
24374   return 0;
24375 }
24376 _ACEOF
24377 rm -f conftest.$ac_objext
24378 if { (eval echo "$as_me:24378: \"$ac_compile\"") >&5
24379   (eval $ac_compile) 2>&5
24380   ac_status=$?
24381   echo "$as_me:24381: \$? = $ac_status" >&5
24382   (exit $ac_status); } &&
24383          { ac_try='test -s conftest.$ac_objext'
24384   { (eval echo "$as_me:24384: \"$ac_try\"") >&5
24385   (eval $ac_try) 2>&5
24386   ac_status=$?
24387   echo "$as_me:24387: \$? = $ac_status" >&5
24388   (exit $ac_status); }; }; then
24389   cf_cv_cpp_static_cast=yes
24390 else
24391   echo "$as_me: failed program was:" >&5
24392 cat conftest.$ac_ext >&5
24393 cf_cv_cpp_static_cast=no
24394 fi
24395 rm -f conftest.$ac_objext conftest.$ac_ext
24396
24397         ac_ext=cc
24398 ac_cpp='$CXXCPP $CPPFLAGS'
24399 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24400 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24401 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24402 ac_main_return=return
24403
24404 fi
24405 echo "$as_me:24405: result: $cf_cv_cpp_static_cast" >&5
24406 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24407
24408 fi
24409
24410 test "$cf_cv_cpp_static_cast" = yes &&
24411 cat >>confdefs.h <<\EOF
24412 #define CPP_HAS_STATIC_CAST 1
24413 EOF
24414
24415         CXX_AR='$(AR)'
24416         CXX_ARFLAGS='$(ARFLAGS)'
24417         case $cf_cv_system_name in
24418         (irix*)
24419             if test "$GXX" != yes ; then
24420                 CXX_AR='$(CXX)'
24421                 CXX_ARFLAGS='-ar -o'
24422             fi
24423             ;;
24424         (sco3.2v5*)
24425             CXXLDFLAGS="-u main"
24426             ;;
24427         (solaris2*)
24428             if test "$GXX" != yes ; then
24429                 CXX_AR='$(CXX)'
24430                 CXX_ARFLAGS='-xar -o'
24431             fi
24432             ;;
24433         esac
24434
24435 else
24436         cf_cxx_library=no
24437         cf_cv_builtin_bool=1
24438
24439         # Just because we are not configuring against C++ right now does not
24440         # mean that a user will not want to use C++.  Some distributors disable
24441         # the C++ portion of this configuration as a shortcut (or just to avoid
24442         # compiling the demo in the c++ directory).  So we need a reasonable
24443         # default for the 'bool' type.
24444         #
24445         # Caveat: since the storage of the bool type is not standardized, it
24446         # may change.
24447
24448         if test "$NCURSES_BOOL" != auto ; then
24449                 cf_cv_type_of_bool=$NCURSES_BOOL
24450                 cf_cv_header_stdbool_h=0
24451         else
24452                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24453
24454 echo "$as_me:24454: checking for size of bool" >&5
24455 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24456 if test "${cf_cv_type_of_bool+set}" = set; then
24457   echo $ECHO_N "(cached) $ECHO_C" >&6
24458 else
24459
24460         rm -f cf_test.out
24461         if test "$cross_compiling" = yes; then
24462   cf_cv_type_of_bool=unknown
24463 else
24464   cat >conftest.$ac_ext <<_ACEOF
24465 #line 24465 "configure"
24466 #include "confdefs.h"
24467
24468 #include <stdlib.h>
24469 #include <stdio.h>
24470
24471 #if defined(__cplusplus)
24472
24473 #ifdef HAVE_GXX_BUILTIN_H
24474 #include <g++/builtin.h>
24475 #elif HAVE_GPP_BUILTIN_H
24476 #include <gpp/builtin.h>
24477 #elif HAVE_BUILTIN_H
24478 #include <builtin.h>
24479 #endif
24480
24481 #else
24482
24483 #if $cf_cv_header_stdbool_h
24484 #include <stdbool.h>
24485 #endif
24486
24487 #endif
24488
24489 int main(void)
24490 {
24491         FILE *fp = fopen("cf_test.out", "w");
24492         if (fp != 0) {
24493                 bool x = true;
24494                 if ((bool)(-x) >= 0)
24495                         fputs("unsigned ", fp);
24496                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24497                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24498                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24499                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24500                 fclose(fp);
24501         }
24502         ${cf_cv_main_return:-return}(0);
24503 }
24504
24505 _ACEOF
24506 rm -f conftest$ac_exeext
24507 if { (eval echo "$as_me:24507: \"$ac_link\"") >&5
24508   (eval $ac_link) 2>&5
24509   ac_status=$?
24510   echo "$as_me:24510: \$? = $ac_status" >&5
24511   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24512   { (eval echo "$as_me:24512: \"$ac_try\"") >&5
24513   (eval $ac_try) 2>&5
24514   ac_status=$?
24515   echo "$as_me:24515: \$? = $ac_status" >&5
24516   (exit $ac_status); }; }; then
24517   cf_cv_type_of_bool=`cat cf_test.out`
24518                  if test -z "$cf_cv_type_of_bool"; then
24519                    cf_cv_type_of_bool=unknown
24520                  fi
24521 else
24522   echo "$as_me: program exited with status $ac_status" >&5
24523 echo "$as_me: failed program was:" >&5
24524 cat conftest.$ac_ext >&5
24525 cf_cv_type_of_bool=unknown
24526 fi
24527 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24528 fi
24529
24530 fi
24531
24532         rm -f cf_test.out
24533 echo "$as_me:24533: result: $cf_cv_type_of_bool" >&5
24534 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24535 if test "$cf_cv_type_of_bool" = unknown ; then
24536         case .$NCURSES_BOOL in
24537         (.auto|.) NCURSES_BOOL=unsigned;;
24538         esac
24539         { echo "$as_me:24539: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24540 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24541         cf_cv_type_of_bool=$NCURSES_BOOL
24542 fi
24543
24544                 else
24545                         echo "$as_me:24545: checking for fallback type of bool" >&5
24546 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24547                         case "$host_cpu" in
24548                         (i?86)  cf_cv_type_of_bool=char ;;
24549                         (*)     cf_cv_type_of_bool=int  ;;
24550                         esac
24551                         echo "$as_me:24551: result: $cf_cv_type_of_bool" >&5
24552 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24553                 fi
24554         fi
24555 fi
24556
24557 # If the C compiler did not declare bool, and we did not determine that the C++
24558 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24559 # ncurses library use the same type as C++ bool.  Note that this allows one to
24560 # specify the type of bool in a configure-script option and postpone
24561 # integration with the C++ compiler provided that the types are compatible.
24562 USE_CXX_BOOL=1
24563 if test $cf_cv_cc_bool_type = 1
24564 then
24565         # oops: C has a bool.  Unlikely, but C++ could differ.
24566         USE_CXX_BOOL=0
24567 elif test $cf_cv_builtin_bool = 0
24568 then
24569         # C++ has no bool
24570         USE_CXX_BOOL=0
24571 else
24572         # this is the normal case
24573         USE_CXX_BOOL='defined(__cplusplus)'
24574 fi
24575
24576 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24577
24578         if test "$cf_with_ada" != "no" ; then
24579                 if test "$with_libtool" != "no"; then
24580                         { echo "$as_me:24580: WARNING: libtool does not support Ada - disabling feature" >&5
24581 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24582                         cf_with_ada=no
24583                 fi
24584         fi
24585
24586         if test "$cf_with_ada" != "no" ; then
24587
24588 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24589 do
24590
24591 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24592
24593         unset ac_cv_path_cf_TEMP_gnat
24594         unset cf_TEMP_gnat
24595         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24596 set dummy $cf_prog_gnat; ac_word=$2
24597 echo "$as_me:24597: checking for $ac_word" >&5
24598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24599 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24600   echo $ECHO_N "(cached) $ECHO_C" >&6
24601 else
24602   case $cf_TEMP_gnat in
24603   [\\/]* | ?:[\\/]*)
24604   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24605   ;;
24606   *)
24607   ac_save_IFS=$IFS; IFS=$ac_path_separator
24608 ac_dummy="$PATH"
24609 for ac_dir in $ac_dummy; do
24610   IFS=$ac_save_IFS
24611   test -z "$ac_dir" && ac_dir=.
24612   if $as_executable_p "$ac_dir/$ac_word"; then
24613    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24614    echo "$as_me:24614: found $ac_dir/$ac_word" >&5
24615    break
24616 fi
24617 done
24618
24619   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24620   ;;
24621 esac
24622 fi
24623 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24624
24625 if test -n "$cf_TEMP_gnat"; then
24626   echo "$as_me:24626: result: $cf_TEMP_gnat" >&5
24627 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24628 else
24629   echo "$as_me:24629: result: no" >&5
24630 echo "${ECHO_T}no" >&6
24631 fi
24632
24633         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24634
24635         if test "x$cf_TEMP_gnat" != xno; then
24636                 unset cf_cv_gnat_version
24637                 unset cf_TEMP_gnat
24638
24639 echo "$as_me:24639: checking for $cf_prog_gnat version" >&5
24640 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24641 if test "${cf_cv_gnat_version+set}" = set; then
24642   echo $ECHO_N "(cached) $ECHO_C" >&6
24643 else
24644
24645 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24646         grep '[0-9].[0-9][0-9]*' |\
24647         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24648
24649 fi
24650 echo "$as_me:24650: result: $cf_cv_gnat_version" >&5
24651 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24652 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24653 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24654
24655         fi
24656         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24657
24658         unset cf_TEMP_gnat
24659         unset cf_cv_gnat_version
24660         unset ac_cv_path_cf_TEMP_gnat
24661 done
24662
24663 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24664         cf_ada_make=
24665         cf_cv_prog_gnat_correct=no
24666 else
24667         cf_ada_make=gnatmake
24668         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24669                 # gprconfig is newer than gnatmake; we can continue...
24670                 cf_ada_config="##"
24671         else
24672                 rm -rf conftest* *~conftest*
24673                 if mkdir conftest.src
24674                 then
24675                         cf_ada_config=""
24676                         cd conftest.src
24677                         for cf_gprconfig in Ada C
24678                         do
24679                                 echo "$as_me:24679: checking for gprconfig name for $cf_gprconfig" >&5
24680 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24681                                 if test $cf_gprconfig = C
24682                                 then
24683                                         for cf_gprconfig_param in \
24684                                                 $cf_gprconfig,,,,GNATGCC \
24685                                                 $cf_gprconfig,,,,GCC \
24686                                                 $cf_gprconfig
24687                                         do
24688                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24689                                                 test -n "$cf_gprconfig_value" && break
24690                                         done
24691                                 else
24692                                         cf_gprconfig_param=$cf_gprconfig
24693                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24694                                 fi
24695                                 if test -n "$cf_gprconfig_value"
24696                                 then
24697                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24698                                         echo "$as_me:24698: result: $cf_gprconfig_value" >&5
24699 echo "${ECHO_T}$cf_gprconfig_value" >&6
24700                                 else
24701                                         echo "$as_me:24701: result: missing" >&5
24702 echo "${ECHO_T}missing" >&6
24703                                         cf_ada_config="#"
24704                                         break
24705                                 fi
24706                         done
24707                         cd ..
24708                         rm -rf conftest* *~conftest*
24709                 fi
24710         fi
24711         if test "x$cf_ada_config" != "x#"
24712         then
24713
24714 echo "$as_me:24714: checking for gnat version" >&5
24715 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24716 if test "${cf_cv_gnat_version+set}" = set; then
24717   echo $ECHO_N "(cached) $ECHO_C" >&6
24718 else
24719
24720 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24721         grep '[0-9].[0-9][0-9]*' |\
24722         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24723
24724 fi
24725 echo "$as_me:24725: result: $cf_cv_gnat_version" >&5
24726 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24727 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24728
24729 case $cf_cv_gnat_version in
24730 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24731         cf_cv_prog_gnat_correct=yes
24732         ;;
24733 (*)
24734         { echo "$as_me:24734: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24735 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24736         cf_cv_prog_gnat_correct=no
24737         ;;
24738 esac
24739
24740                 # Extract the first word of "m4", so it can be a program name with args.
24741 set dummy m4; ac_word=$2
24742 echo "$as_me:24742: checking for $ac_word" >&5
24743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24744 if test "${ac_cv_prog_M4_exists+set}" = set; then
24745   echo $ECHO_N "(cached) $ECHO_C" >&6
24746 else
24747   if test -n "$M4_exists"; then
24748   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24749 else
24750   ac_save_IFS=$IFS; IFS=$ac_path_separator
24751 ac_dummy="$PATH"
24752 for ac_dir in $ac_dummy; do
24753   IFS=$ac_save_IFS
24754   test -z "$ac_dir" && ac_dir=.
24755   $as_executable_p "$ac_dir/$ac_word" || continue
24756 ac_cv_prog_M4_exists="yes"
24757 echo "$as_me:24757: found $ac_dir/$ac_word" >&5
24758 break
24759 done
24760
24761   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24762 fi
24763 fi
24764 M4_exists=$ac_cv_prog_M4_exists
24765 if test -n "$M4_exists"; then
24766   echo "$as_me:24766: result: $M4_exists" >&5
24767 echo "${ECHO_T}$M4_exists" >&6
24768 else
24769   echo "$as_me:24769: result: no" >&5
24770 echo "${ECHO_T}no" >&6
24771 fi
24772
24773                 if test "$ac_cv_prog_M4_exists" = no; then
24774                         cf_cv_prog_gnat_correct=no
24775                         { echo "$as_me:24775: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24776 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24777                 fi
24778                 if test "$cf_cv_prog_gnat_correct" = yes; then
24779                         echo "$as_me:24779: checking if GNAT works" >&5
24780 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24781
24782 rm -rf conftest* *~conftest*
24783 cat >>conftest.ads <<CF_EOF
24784 procedure conftest;
24785 CF_EOF
24786 cat >>conftest.adb <<CF_EOF
24787 with Text_IO;
24788 with GNAT.OS_Lib;
24789 procedure conftest is
24790 begin
24791    Text_IO.Put ("Hello World");
24792    Text_IO.New_Line;
24793    GNAT.OS_Lib.OS_Exit (0);
24794 end conftest;
24795 CF_EOF
24796 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24797    if ( ./conftest 1>&5 2>&1 ) ; then
24798       cf_cv_prog_gnat_correct=yes
24799    else
24800       cf_cv_prog_gnat_correct=no
24801    fi
24802 else
24803    cf_cv_prog_gnat_correct=no
24804 fi
24805 rm -rf conftest* *~conftest*
24806
24807                         echo "$as_me:24807: result: $cf_cv_prog_gnat_correct" >&5
24808 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24809                 fi
24810         else
24811                 cf_cv_prog_gnat_correct=no
24812         fi
24813 fi
24814
24815                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24816
24817         ADAFLAGS="$ADAFLAGS -gnatpn"
24818
24819         echo "$as_me:24819: checking optimization options for ADAFLAGS" >&5
24820 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24821         case "$CFLAGS" in
24822         (*-g*)
24823
24824         ADAFLAGS="$ADAFLAGS -g"
24825
24826                 ;;
24827         esac
24828         case "$CFLAGS" in
24829         (*-O*)
24830                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24831
24832         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24833
24834                 ;;
24835         esac
24836         echo "$as_me:24836: result: $ADAFLAGS" >&5
24837 echo "${ECHO_T}$ADAFLAGS" >&6
24838
24839 echo "$as_me:24839: checking if GNATPREP supports -T option" >&5
24840 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24841 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24842   echo $ECHO_N "(cached) $ECHO_C" >&6
24843 else
24844
24845 cf_cv_gnatprep_opt_t=no
24846 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24847
24848 fi
24849 echo "$as_me:24849: result: $cf_cv_gnatprep_opt_t" >&5
24850 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24851 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24852
24853 echo "$as_me:24853: checking if GNAT supports generics" >&5
24854 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24855 case $cf_cv_gnat_version in
24856 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24857         cf_gnat_generics=yes
24858         ;;
24859 (*)
24860         cf_gnat_generics=no
24861         ;;
24862 esac
24863 echo "$as_me:24863: result: $cf_gnat_generics" >&5
24864 echo "${ECHO_T}$cf_gnat_generics" >&6
24865
24866 if test "$cf_gnat_generics" = yes
24867 then
24868         cf_compile_generics=generics
24869         cf_generic_objects="\${GENOBJS}"
24870 else
24871         cf_compile_generics=
24872         cf_generic_objects=
24873 fi
24874
24875 echo "$as_me:24875: checking if GNAT supports SIGINT" >&5
24876 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24877 if test "${cf_cv_gnat_sigint+set}" = set; then
24878   echo $ECHO_N "(cached) $ECHO_C" >&6
24879 else
24880
24881 rm -rf conftest* *~conftest*
24882 cat >>conftest.ads <<CF_EOF
24883 with Ada.Interrupts.Names;
24884
24885 package ConfTest is
24886
24887    pragma Warnings (Off);  --  the next pragma exists since 3.11p
24888    pragma Unreserve_All_Interrupts;
24889    pragma Warnings (On);
24890
24891    protected Process is
24892       procedure Stop;
24893       function Continue return Boolean;
24894       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
24895    private
24896       Done : Boolean := False;
24897    end Process;
24898
24899 end ConfTest;
24900 CF_EOF
24901 cat >>conftest.adb <<CF_EOF
24902 package body ConfTest is
24903    protected body Process is
24904       procedure Stop is
24905       begin
24906          Done := True;
24907       end Stop;
24908       function Continue return Boolean is
24909       begin
24910          return not Done;
24911       end Continue;
24912    end Process;
24913 end ConfTest;
24914 CF_EOF
24915 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24916       cf_cv_gnat_sigint=yes
24917 else
24918    cf_cv_gnat_sigint=no
24919 fi
24920 rm -rf conftest* *~conftest*
24921
24922 fi
24923 echo "$as_me:24923: result: $cf_cv_gnat_sigint" >&5
24924 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
24925
24926 if test $cf_cv_gnat_sigint = yes ; then
24927         USE_GNAT_SIGINT=""
24928 else
24929         USE_GNAT_SIGINT="#"
24930 fi
24931
24932 cf_gnat_libraries=no
24933 cf_gnat_projects=no
24934
24935 if test "$enable_gnat_projects" != no ; then
24936 echo "$as_me:24936: checking if GNAT supports project files" >&5
24937 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
24938 case $cf_cv_gnat_version in
24939 (3.[0-9]*)
24940         ;;
24941 (*)
24942         case $cf_cv_system_name in
24943         (cygwin*|msys*)
24944                 ;;
24945         (*)
24946                 rm -rf conftest* *~conftest*
24947                 if mkdir conftest.src conftest.bin conftest.lib
24948                 then
24949                         cd conftest.src
24950                         rm -rf conftest* *~conftest*
24951                         cat >>library.gpr <<CF_EOF
24952 project Library is
24953   Kind := External ("LIB_KIND");
24954   for Library_Name use "ConfTest";
24955   for Object_Dir use ".";
24956   for Library_ALI_Dir use External("LIBRARY_DIR");
24957   for Library_Version use External ("SONAME");
24958   for Library_Kind use Kind;
24959   for Library_Dir use External("BUILD_DIR");
24960   Source_Dir := External ("SOURCE_DIR");
24961   for Source_Dirs use (Source_Dir);
24962 end Library;
24963 CF_EOF
24964                         cat >>confpackage.ads <<CF_EOF
24965 package ConfPackage is
24966    procedure conftest;
24967 end ConfPackage;
24968 CF_EOF
24969                         cat >>confpackage.adb <<CF_EOF
24970 with Text_IO;
24971 package body ConfPackage is
24972    procedure conftest is
24973    begin
24974       Text_IO.Put ("Hello World");
24975       Text_IO.New_Line;
24976    end conftest;
24977 end ConfPackage;
24978 CF_EOF
24979                         if ( $cf_ada_make $ADAFLAGS \
24980                                         -Plibrary.gpr \
24981                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
24982                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
24983                                         -XSOURCE_DIR=`pwd` \
24984                                         -XSONAME=libConfTest.so.1 \
24985                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
24986                                 cf_gnat_projects=yes
24987                         fi
24988                         cd ..
24989                 fi
24990                 if test -f conftest.lib/confpackage.ali
24991                 then
24992                         cf_gnat_libraries=yes
24993                 fi
24994                 rm -rf conftest* *~conftest*
24995                 ;;
24996         esac
24997         ;;
24998 esac
24999 echo "$as_me:24999: result: $cf_gnat_projects" >&5
25000 echo "${ECHO_T}$cf_gnat_projects" >&6
25001 fi # enable_gnat_projects
25002
25003 if test $cf_gnat_projects = yes
25004 then
25005         echo "$as_me:25005: checking if GNAT supports libraries" >&5
25006 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25007         echo "$as_me:25007: result: $cf_gnat_libraries" >&5
25008 echo "${ECHO_T}$cf_gnat_libraries" >&6
25009 fi
25010
25011 if test "$cf_gnat_projects" = yes
25012 then
25013         USE_OLD_MAKERULES="#"
25014         USE_GNAT_PROJECTS=""
25015 else
25016         USE_OLD_MAKERULES=""
25017         USE_GNAT_PROJECTS="#"
25018 fi
25019
25020 if test "$cf_gnat_libraries" = yes
25021 then
25022         USE_GNAT_LIBRARIES=""
25023 else
25024         USE_GNAT_LIBRARIES="#"
25025 fi
25026
25027 echo "$as_me:25027: checking for ada-compiler" >&5
25028 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25029
25030 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25031 if test "${with_ada_compiler+set}" = set; then
25032   withval="$with_ada_compiler"
25033   cf_ada_compiler=$withval
25034 else
25035   cf_ada_compiler=gnatmake
25036 fi;
25037
25038 echo "$as_me:25038: result: $cf_ada_compiler" >&5
25039 echo "${ECHO_T}$cf_ada_compiler" >&6
25040
25041                         cf_ada_package=terminal_interface
25042
25043 echo "$as_me:25043: checking for ada-include" >&5
25044 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25045
25046 # Check whether --with-ada-include or --without-ada-include was given.
25047 if test "${with_ada_include+set}" = set; then
25048   withval="$with_ada_include"
25049
25050 else
25051   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25052 fi; if test -n "$prefix/share/ada/adainclude" ; then
25053
25054 if test "x$prefix" != xNONE; then
25055         cf_path_syntax="$prefix"
25056 else
25057         cf_path_syntax="$ac_default_prefix"
25058 fi
25059
25060 case ".$withval" in
25061 (.\$\(*\)*|.\'*\'*)
25062         ;;
25063 (..|./*|.\\*)
25064         ;;
25065 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25066         ;;
25067 (.\${*prefix}*|.\${*dir}*)
25068         eval withval="$withval"
25069         case ".$withval" in
25070         (.NONE/*)
25071                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25072                 ;;
25073         esac
25074         ;;
25075 (.no|.NONE/*)
25076         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25077         ;;
25078 (*)
25079         { { echo "$as_me:25079: error: expected a pathname, not \"$withval\"" >&5
25080 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25081    { (exit 1); exit 1; }; }
25082         ;;
25083 esac
25084
25085 fi
25086 eval ADA_INCLUDE="$withval"
25087
25088 echo "$as_me:25088: result: $ADA_INCLUDE" >&5
25089 echo "${ECHO_T}$ADA_INCLUDE" >&6
25090
25091 echo "$as_me:25091: checking for ada-objects" >&5
25092 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25093
25094 # Check whether --with-ada-objects or --without-ada-objects was given.
25095 if test "${with_ada_objects+set}" = set; then
25096   withval="$with_ada_objects"
25097
25098 else
25099   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25100 fi; if test -n "$prefix/lib/ada/adalib" ; then
25101
25102 if test "x$prefix" != xNONE; then
25103         cf_path_syntax="$prefix"
25104 else
25105         cf_path_syntax="$ac_default_prefix"
25106 fi
25107
25108 case ".$withval" in
25109 (.\$\(*\)*|.\'*\'*)
25110         ;;
25111 (..|./*|.\\*)
25112         ;;
25113 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25114         ;;
25115 (.\${*prefix}*|.\${*dir}*)
25116         eval withval="$withval"
25117         case ".$withval" in
25118         (.NONE/*)
25119                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25120                 ;;
25121         esac
25122         ;;
25123 (.no|.NONE/*)
25124         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25125         ;;
25126 (*)
25127         { { echo "$as_me:25127: error: expected a pathname, not \"$withval\"" >&5
25128 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25129    { (exit 1); exit 1; }; }
25130         ;;
25131 esac
25132
25133 fi
25134 eval ADA_OBJECTS="$withval"
25135
25136 echo "$as_me:25136: result: $ADA_OBJECTS" >&5
25137 echo "${ECHO_T}$ADA_OBJECTS" >&6
25138
25139 echo "$as_me:25139: checking if an Ada95 shared-library should be built" >&5
25140 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25141
25142 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25143 if test "${with_ada_sharedlib+set}" = set; then
25144   withval="$with_ada_sharedlib"
25145   with_ada_sharedlib=$withval
25146 else
25147   with_ada_sharedlib=no
25148 fi;
25149 echo "$as_me:25149: result: $with_ada_sharedlib" >&5
25150 echo "${ECHO_T}$with_ada_sharedlib" >&6
25151
25152 if test "x$with_ada_sharedlib" != xno
25153 then
25154         if test "x$cf_gnat_projects" != xyes
25155         then
25156                 { echo "$as_me:25156: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25157 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25158                 with_ada_sharedlib=no
25159         fi
25160 fi
25161
25162 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25163 MAKE_ADA_SHAREDLIB="#"
25164
25165 if test "x$with_ada_sharedlib" != xno
25166 then
25167         MAKE_ADA_SHAREDLIB=
25168         if test "x$with_ada_sharedlib" != xyes
25169         then
25170                 ADA_SHAREDLIB="$with_ada_sharedlib"
25171         fi
25172 fi
25173
25174                         # allow the Ada binding to be renamed
25175
25176 echo "$as_me:25176: checking for ada-libname" >&5
25177 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25178
25179 # Check whether --with-ada-libname or --without-ada-libname was given.
25180 if test "${with_ada_libname+set}" = set; then
25181   withval="$with_ada_libname"
25182   ADA_LIBNAME=$withval
25183 else
25184   ADA_LIBNAME=AdaCurses
25185 fi;
25186 case "x$ADA_LIBNAME" in
25187 (x|xyes|xno)
25188         ADA_LIBNAME=AdaCurses
25189         ;;
25190 esac
25191
25192 echo "$as_me:25192: result: $ADA_LIBNAME" >&5
25193 echo "${ECHO_T}$ADA_LIBNAME" >&6
25194
25195                 fi
25196         fi
25197 else
25198         cf_with_ada=no
25199 fi
25200
25201 # do this "late" to avoid conflict with header-checks
25202 if test "x$with_widec" = xyes ; then
25203         echo "$as_me:25203: checking for wchar_t" >&5
25204 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25205 if test "${ac_cv_type_wchar_t+set}" = set; then
25206   echo $ECHO_N "(cached) $ECHO_C" >&6
25207 else
25208   cat >conftest.$ac_ext <<_ACEOF
25209 #line 25209 "configure"
25210 #include "confdefs.h"
25211 $ac_includes_default
25212 int
25213 main (void)
25214 {
25215 if ((wchar_t *) 0)
25216   return 0;
25217 if (sizeof (wchar_t))
25218   return 0;
25219   ;
25220   return 0;
25221 }
25222 _ACEOF
25223 rm -f conftest.$ac_objext
25224 if { (eval echo "$as_me:25224: \"$ac_compile\"") >&5
25225   (eval $ac_compile) 2>&5
25226   ac_status=$?
25227   echo "$as_me:25227: \$? = $ac_status" >&5
25228   (exit $ac_status); } &&
25229          { ac_try='test -s conftest.$ac_objext'
25230   { (eval echo "$as_me:25230: \"$ac_try\"") >&5
25231   (eval $ac_try) 2>&5
25232   ac_status=$?
25233   echo "$as_me:25233: \$? = $ac_status" >&5
25234   (exit $ac_status); }; }; then
25235   ac_cv_type_wchar_t=yes
25236 else
25237   echo "$as_me: failed program was:" >&5
25238 cat conftest.$ac_ext >&5
25239 ac_cv_type_wchar_t=no
25240 fi
25241 rm -f conftest.$ac_objext conftest.$ac_ext
25242 fi
25243 echo "$as_me:25243: result: $ac_cv_type_wchar_t" >&5
25244 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25245
25246 echo "$as_me:25246: checking size of wchar_t" >&5
25247 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25248 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25249   echo $ECHO_N "(cached) $ECHO_C" >&6
25250 else
25251   if test "$ac_cv_type_wchar_t" = yes; then
25252   if test "$cross_compiling" = yes; then
25253   # Depending upon the size, compute the lo and hi bounds.
25254 cat >conftest.$ac_ext <<_ACEOF
25255 #line 25255 "configure"
25256 #include "confdefs.h"
25257 $ac_includes_default
25258 int
25259 main (void)
25260 {
25261 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25262   ;
25263   return 0;
25264 }
25265 _ACEOF
25266 rm -f conftest.$ac_objext
25267 if { (eval echo "$as_me:25267: \"$ac_compile\"") >&5
25268   (eval $ac_compile) 2>&5
25269   ac_status=$?
25270   echo "$as_me:25270: \$? = $ac_status" >&5
25271   (exit $ac_status); } &&
25272          { ac_try='test -s conftest.$ac_objext'
25273   { (eval echo "$as_me:25273: \"$ac_try\"") >&5
25274   (eval $ac_try) 2>&5
25275   ac_status=$?
25276   echo "$as_me:25276: \$? = $ac_status" >&5
25277   (exit $ac_status); }; }; then
25278   ac_lo=0 ac_mid=0
25279   while :; do
25280     cat >conftest.$ac_ext <<_ACEOF
25281 #line 25281 "configure"
25282 #include "confdefs.h"
25283 $ac_includes_default
25284 int
25285 main (void)
25286 {
25287 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25288   ;
25289   return 0;
25290 }
25291 _ACEOF
25292 rm -f conftest.$ac_objext
25293 if { (eval echo "$as_me:25293: \"$ac_compile\"") >&5
25294   (eval $ac_compile) 2>&5
25295   ac_status=$?
25296   echo "$as_me:25296: \$? = $ac_status" >&5
25297   (exit $ac_status); } &&
25298          { ac_try='test -s conftest.$ac_objext'
25299   { (eval echo "$as_me:25299: \"$ac_try\"") >&5
25300   (eval $ac_try) 2>&5
25301   ac_status=$?
25302   echo "$as_me:25302: \$? = $ac_status" >&5
25303   (exit $ac_status); }; }; then
25304   ac_hi=$ac_mid; break
25305 else
25306   echo "$as_me: failed program was:" >&5
25307 cat conftest.$ac_ext >&5
25308 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25309 fi
25310 rm -f conftest.$ac_objext conftest.$ac_ext
25311   done
25312 else
25313   echo "$as_me: failed program was:" >&5
25314 cat conftest.$ac_ext >&5
25315 ac_hi=-1 ac_mid=-1
25316   while :; do
25317     cat >conftest.$ac_ext <<_ACEOF
25318 #line 25318 "configure"
25319 #include "confdefs.h"
25320 $ac_includes_default
25321 int
25322 main (void)
25323 {
25324 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25325   ;
25326   return 0;
25327 }
25328 _ACEOF
25329 rm -f conftest.$ac_objext
25330 if { (eval echo "$as_me:25330: \"$ac_compile\"") >&5
25331   (eval $ac_compile) 2>&5
25332   ac_status=$?
25333   echo "$as_me:25333: \$? = $ac_status" >&5
25334   (exit $ac_status); } &&
25335          { ac_try='test -s conftest.$ac_objext'
25336   { (eval echo "$as_me:25336: \"$ac_try\"") >&5
25337   (eval $ac_try) 2>&5
25338   ac_status=$?
25339   echo "$as_me:25339: \$? = $ac_status" >&5
25340   (exit $ac_status); }; }; then
25341   ac_lo=$ac_mid; break
25342 else
25343   echo "$as_me: failed program was:" >&5
25344 cat conftest.$ac_ext >&5
25345 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25346 fi
25347 rm -f conftest.$ac_objext conftest.$ac_ext
25348   done
25349 fi
25350 rm -f conftest.$ac_objext conftest.$ac_ext
25351 # Binary search between lo and hi bounds.
25352 while test "x$ac_lo" != "x$ac_hi"; do
25353   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25354   cat >conftest.$ac_ext <<_ACEOF
25355 #line 25355 "configure"
25356 #include "confdefs.h"
25357 $ac_includes_default
25358 int
25359 main (void)
25360 {
25361 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25362   ;
25363   return 0;
25364 }
25365 _ACEOF
25366 rm -f conftest.$ac_objext
25367 if { (eval echo "$as_me:25367: \"$ac_compile\"") >&5
25368   (eval $ac_compile) 2>&5
25369   ac_status=$?
25370   echo "$as_me:25370: \$? = $ac_status" >&5
25371   (exit $ac_status); } &&
25372          { ac_try='test -s conftest.$ac_objext'
25373   { (eval echo "$as_me:25373: \"$ac_try\"") >&5
25374   (eval $ac_try) 2>&5
25375   ac_status=$?
25376   echo "$as_me:25376: \$? = $ac_status" >&5
25377   (exit $ac_status); }; }; then
25378   ac_hi=$ac_mid
25379 else
25380   echo "$as_me: failed program was:" >&5
25381 cat conftest.$ac_ext >&5
25382 ac_lo=`expr $ac_mid + 1`
25383 fi
25384 rm -f conftest.$ac_objext conftest.$ac_ext
25385 done
25386 ac_cv_sizeof_wchar_t=$ac_lo
25387 else
25388   if test "$cross_compiling" = yes; then
25389   { { echo "$as_me:25389: error: cannot run test program while cross compiling" >&5
25390 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25391    { (exit 1); exit 1; }; }
25392 else
25393   cat >conftest.$ac_ext <<_ACEOF
25394 #line 25394 "configure"
25395 #include "confdefs.h"
25396 $ac_includes_default
25397 int
25398 main (void)
25399 {
25400 FILE *f = fopen ("conftest.val", "w");
25401 if (!f)
25402   $ac_main_return (1);
25403 fprintf (f, "%d", (sizeof (wchar_t)));
25404 fclose (f);
25405   ;
25406   return 0;
25407 }
25408 _ACEOF
25409 rm -f conftest$ac_exeext
25410 if { (eval echo "$as_me:25410: \"$ac_link\"") >&5
25411   (eval $ac_link) 2>&5
25412   ac_status=$?
25413   echo "$as_me:25413: \$? = $ac_status" >&5
25414   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25415   { (eval echo "$as_me:25415: \"$ac_try\"") >&5
25416   (eval $ac_try) 2>&5
25417   ac_status=$?
25418   echo "$as_me:25418: \$? = $ac_status" >&5
25419   (exit $ac_status); }; }; then
25420   ac_cv_sizeof_wchar_t=`cat conftest.val`
25421 else
25422   echo "$as_me: program exited with status $ac_status" >&5
25423 echo "$as_me: failed program was:" >&5
25424 cat conftest.$ac_ext >&5
25425 fi
25426 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25427 fi
25428 fi
25429 rm -f conftest.val
25430 else
25431   ac_cv_sizeof_wchar_t=0
25432 fi
25433 fi
25434 echo "$as_me:25434: result: $ac_cv_sizeof_wchar_t" >&5
25435 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25436 cat >>confdefs.h <<EOF
25437 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25438 EOF
25439
25440         # cross-compiling to mingw can run into the problem that attempting to
25441         # link with the regex library fails, causing the test to not set this to
25442         # a number.  "recent" autoconf does not address this problem either -TD
25443         if test -z "$ac_cv_sizeof_wchar_t"
25444         then
25445                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25446
25447 echo "${as_me:-configure}:25447: testing test failed (assume 2) ..." 1>&5
25448
25449                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25450                 mv confdefs.tmp confdefs.h
25451                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25452         fi
25453 fi
25454
25455 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25456 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25457 ###
25458 ### ticlib modules may be a separate library, otherwise contained in termlib.
25459 ### termlib modules may be a separate library, otherwise contained in ncurses.
25460 ###
25461 ### The of "+" or " " between the tokens controls the way the script
25462 ### chooses to split module lists into libraries.
25463 ###
25464 ### (see CF_LIB_RULES).
25465 echo "$as_me:25465: checking for library subsets" >&5
25466 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25467 LIB_SUBSETS=
25468
25469 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25470         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25471         if test "$with_ticlib" != no ; then
25472                 LIB_SUBSETS="${LIB_SUBSETS} "
25473         else
25474                 LIB_SUBSETS="${LIB_SUBSETS}+"
25475         fi
25476 fi
25477
25478 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25479 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25480
25481 if test "$with_termlib" != no ; then
25482         LIB_SUBSETS="${LIB_SUBSETS} "
25483 else
25484         LIB_SUBSETS="${LIB_SUBSETS}+"
25485 fi
25486
25487 LIB_SUBSETS="${LIB_SUBSETS}base"
25488
25489 # Most term-driver calls are to tinfo, but some like init_pair are to the
25490 # base library (so it resides in base).
25491 if test "$with_term_driver" != no ; then
25492         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25493         case $cf_cv_system_name in
25494         (*mingw32*|*mingw64*)
25495                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25496                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25497                 ;;
25498         (*)
25499                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25500                 ;;
25501         esac
25502 fi
25503
25504 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25505 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25506
25507 echo "$as_me:25507: result: $LIB_SUBSETS" >&5
25508 echo "${ECHO_T}$LIB_SUBSETS" >&6
25509
25510 ### Construct the list of include-directories to be generated
25511
25512 if test "$srcdir" != "."; then
25513         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25514 fi
25515 CPPFLAGS="-I../include $CPPFLAGS"
25516 if test "$srcdir" != "."; then
25517         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25518 fi
25519 CPPFLAGS="-I. $CPPFLAGS"
25520
25521 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25522 if test "$srcdir" != "."; then
25523         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25524 fi
25525 if test "$GCC" != yes; then
25526         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25527 elif test "$includedir" != "/usr/include"; then
25528         if test "$includedir" = '${prefix}/include' ; then
25529                 if test x$prefix != x/usr ; then
25530                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25531                 fi
25532         else
25533                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25534         fi
25535 fi
25536
25537 ### Build up pieces for makefile rules
25538 echo "$as_me:25538: checking default library suffix" >&5
25539 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25540
25541         case $DFT_LWR_MODEL in
25542         (libtool) DFT_ARG_SUFFIX=''   ;;
25543         (normal)  DFT_ARG_SUFFIX=''   ;;
25544         (debug)   DFT_ARG_SUFFIX='_g' ;;
25545         (profile) DFT_ARG_SUFFIX='_p' ;;
25546         (shared)  DFT_ARG_SUFFIX=''   ;;
25547         esac
25548         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25549 echo "$as_me:25549: result: $DFT_ARG_SUFFIX" >&5
25550 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25551
25552 echo "$as_me:25552: checking default library-dependency suffix" >&5
25553 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25554
25555         case X$DFT_LWR_MODEL in
25556         (Xlibtool)
25557                 DFT_LIB_SUFFIX='.la'
25558                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25559                 ;;
25560         (Xdebug)
25561                 case $cf_cv_system_name in
25562                 (*-msvc*)
25563                         DFT_LIB_SUFFIX='_g.lib'
25564                         ;;
25565                 (*)
25566                         DFT_LIB_SUFFIX='_g.a'
25567                         ;;
25568                 esac
25569                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25570                 ;;
25571         (Xprofile)
25572                 case $cf_cv_system_name in
25573                 (*-msvc*)
25574                         DFT_LIB_SUFFIX='_p.lib'
25575                         ;;
25576                 (*)
25577                         DFT_LIB_SUFFIX='_p.a'
25578                         ;;
25579                 esac
25580                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25581                 ;;
25582         (Xshared)
25583                 case $cf_cv_system_name in
25584                 (aix[5-7]*)
25585                         DFT_LIB_SUFFIX='.so'
25586                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25587                         ;;
25588                 (*-msvc*)
25589                         DFT_LIB_SUFFIX='.dll'
25590                         DFT_DEP_SUFFIX='.dll.lib'
25591                         ;;
25592                 (cygwin*|msys*|mingw*)
25593                         DFT_LIB_SUFFIX='.dll'
25594                         DFT_DEP_SUFFIX='.dll.a'
25595                         ;;
25596                 (darwin*)
25597                         DFT_LIB_SUFFIX='.dylib'
25598                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25599                         ;;
25600                 (hpux*)
25601                         case $target in
25602                         (ia64*)
25603                                 DFT_LIB_SUFFIX='.so'
25604                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25605                                 ;;
25606                         (*)
25607                                 DFT_LIB_SUFFIX='.sl'
25608                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25609                                 ;;
25610                         esac
25611                         ;;
25612                 (*)
25613                         DFT_LIB_SUFFIX='.so'
25614                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25615                         ;;
25616                 esac
25617                 ;;
25618         (*)
25619                 case $target in
25620                 (*-msvc*)
25621                         DFT_LIB_SUFFIX='.lib'
25622                         ;;
25623                 (*)
25624                         DFT_LIB_SUFFIX='.a'
25625                         ;;
25626                 esac
25627                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25628                 ;;
25629         esac
25630         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25631         then
25632                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25633                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25634         fi
25635 echo "$as_me:25635: result: $DFT_DEP_SUFFIX" >&5
25636 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25637
25638 echo "$as_me:25638: checking default object directory" >&5
25639 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25640
25641         case $DFT_LWR_MODEL in
25642         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25643         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25644         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25645         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25646         (shared)
25647                 case $cf_cv_system_name in
25648                 (cygwin|msys)
25649                         DFT_OBJ_SUBDIR='objects' ;;
25650                 (*)
25651                         DFT_OBJ_SUBDIR='obj_s' ;;
25652                 esac
25653         esac
25654 echo "$as_me:25654: result: $DFT_OBJ_SUBDIR" >&5
25655 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25656
25657 if test "x$cf_with_cxx" = xyes ; then
25658 echo "$as_me:25658: checking c++ library-dependency suffix" >&5
25659 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25660 if test "$with_libtool" != "no"; then
25661         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25662         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25663 elif test "$with_shared_cxx" != "no"; then
25664         # also for g++ users...
25665         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25666 else
25667         # we normally make a static library because C/C++ library rules differ
25668
25669         case Xnormal in
25670         (Xlibtool)
25671                 CXX_LIB_SUFFIX='.la'
25672                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25673                 ;;
25674         (Xdebug)
25675                 case $cf_cv_system_name in
25676                 (*-msvc*)
25677                         CXX_LIB_SUFFIX='_g.lib'
25678                         ;;
25679                 (*)
25680                         CXX_LIB_SUFFIX='_g.a'
25681                         ;;
25682                 esac
25683                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25684                 ;;
25685         (Xprofile)
25686                 case $cf_cv_system_name in
25687                 (*-msvc*)
25688                         CXX_LIB_SUFFIX='_p.lib'
25689                         ;;
25690                 (*)
25691                         CXX_LIB_SUFFIX='_p.a'
25692                         ;;
25693                 esac
25694                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25695                 ;;
25696         (Xshared)
25697                 case $cf_cv_system_name in
25698                 (aix[5-7]*)
25699                         CXX_LIB_SUFFIX='.so'
25700                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25701                         ;;
25702                 (*-msvc*)
25703                         CXX_LIB_SUFFIX='.dll'
25704                         CXX_DEP_SUFFIX='.dll.lib'
25705                         ;;
25706                 (cygwin*|msys*|mingw*)
25707                         CXX_LIB_SUFFIX='.dll'
25708                         CXX_DEP_SUFFIX='.dll.a'
25709                         ;;
25710                 (darwin*)
25711                         CXX_LIB_SUFFIX='.dylib'
25712                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25713                         ;;
25714                 (hpux*)
25715                         case $target in
25716                         (ia64*)
25717                                 CXX_LIB_SUFFIX='.so'
25718                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25719                                 ;;
25720                         (*)
25721                                 CXX_LIB_SUFFIX='.sl'
25722                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25723                                 ;;
25724                         esac
25725                         ;;
25726                 (*)
25727                         CXX_LIB_SUFFIX='.so'
25728                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25729                         ;;
25730                 esac
25731                 ;;
25732         (*)
25733                 case $target in
25734                 (*-msvc*)
25735                         CXX_LIB_SUFFIX='.lib'
25736                         ;;
25737                 (*)
25738                         CXX_LIB_SUFFIX='.a'
25739                         ;;
25740                 esac
25741                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25742                 ;;
25743         esac
25744         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25745         then
25746                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25747                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25748         fi
25749
25750 fi
25751 echo "$as_me:25751: result: $CXX_LIB_SUFFIX" >&5
25752 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25753
25754 fi
25755
25756 # do not want -ldl in build except as needed for -lncurses dependency
25757 if test "x$with_dlsym" = xyes ; then
25758 if test $DFT_LWR_MODEL = shared || \
25759    test $DFT_LWR_MODEL = libtool ; then
25760
25761 # remove dl library from $LIBS
25762 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25763
25764 fi
25765 fi
25766 ### Set up low-level terminfo dependencies for makefiles.
25767
25768 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25769 # do not need libdl
25770 TICS_LIST=
25771 if test "x$with_dlsym" = xyes ; then
25772
25773 # remove dl library from $SHLIB_LIST
25774 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25775
25776 fi
25777
25778 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25779 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25780 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25781 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25782 then
25783         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25784 fi
25785
25786 if test "$with_ticlib" != no ; then
25787
25788         if test "x$with_ticlib" != xyes ; then
25789                 TICS_NAME=$with_ticlib
25790                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25791                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25792                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25793                 TICS_LIB_SUFFIX="${with_ticlib}"
25794         else
25795                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25796                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25797                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25798                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25799         fi
25800         TICS_LDFLAGS="-L${LIB_DIR}"
25801         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25802 else
25803         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25804         TICS_LDFLAGS="-L${LIB_DIR}"
25805         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25806 fi
25807
25808 if test "$with_termlib" != no ; then
25809
25810         if test "x$with_termlib" != xyes ; then
25811                 TINFO_NAME=$with_termlib
25812                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25813                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25814                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25815                 TINFO_LIB_SUFFIX="${with_termlib}"
25816         else
25817                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25818                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25819                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25820                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25821         fi
25822
25823         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25824         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25825         if test "$DFT_LWR_MODEL" = "libtool"; then
25826                 TEST_ARGS="${TEST_DEPS}"
25827                 TEST_ARG2="${TEST_DEP2}"
25828                 TINFO_LDFLAGS="-L${LIB_DIR}"
25829                 TINFO_LIBS="$TEST_ARGS"
25830                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25831                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25832         else
25833                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25834                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25835                 if test "x$with_term_driver" != xno ; then
25836                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25837                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25838                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25839                 else
25840                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25841                         TINFO_LIBS="$TEST_ARGS"
25842                 fi
25843                 TINFO_LDFLAGS="-L${LIB_DIR}"
25844                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25845         fi
25846 else
25847         # the next lines are needed for linking libtic over libncurses
25848         TINFO_NAME=${LIB_NAME}
25849         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25850         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25851         if test "x$with_tic_depends" = xyes ; then
25852                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25853         else
25854                 TICS_LIST="$SHLIB_LIST"
25855         fi
25856
25857         TINFO_LDFLAGS="-L${LIB_DIR}"
25858         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25859 fi
25860
25861 if test "$DFT_LWR_MODEL" = shared ; then
25862         case $cf_cv_system_name in
25863         (cygwin*|msys*)
25864                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25865                 TINFO_SUFFIX=.dll
25866                 ;;
25867         esac
25868 fi
25869
25870 if test "x$with_dlsym" = xyes ; then
25871
25872 # remove dl library from $TICS_LIST
25873 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25874
25875 fi
25876
25877 if test "$DFT_LWR_MODEL" = "libtool"; then
25878         OBJEXT=lo
25879 fi
25880
25881 # needed for Ada95
25882 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
25883
25884 case $DFT_LWR_MODEL in
25885 (normal|debug|profile)
25886
25887 if test "$GCC" = yes ; then
25888         case $cf_cv_system_name in
25889         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
25890                 LDFLAGS_STATIC=
25891                 LDFLAGS_SHARED=
25892                 ;;
25893         (*)     # normally, except when broken
25894                 LDFLAGS_STATIC=-static
25895                 LDFLAGS_SHARED=-dynamic
25896                 ;;
25897         esac
25898 else
25899         case $cf_cv_system_name in
25900         (aix[4-7]*)     # from ld manpage
25901                 LDFLAGS_STATIC=-bstatic
25902                 LDFLAGS_SHARED=-bdynamic
25903                 ;;
25904         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
25905                 # We could also use just "archive" and "shared".
25906                 LDFLAGS_STATIC=-Wl,-a,archive_shared
25907                 LDFLAGS_SHARED=-Wl,-a,shared_archive
25908                 ;;
25909         (irix*)         # from ld manpage IRIX64
25910                 LDFLAGS_STATIC=-Bstatic
25911                 LDFLAGS_SHARED=-Bdynamic
25912                 ;;
25913         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
25914                 # alternative "-oldstyle_liblookup" (not in cc manpage)
25915                 LDFLAGS_STATIC=-noso
25916                 LDFLAGS_SHARED=-so_archive
25917                 ;;
25918         (solaris2*)
25919                 LDFLAGS_STATIC=-Bstatic
25920                 LDFLAGS_SHARED=-Bdynamic
25921                 ;;
25922         esac
25923 fi
25924
25925 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
25926 then
25927         echo "$as_me:25927: checking if linker supports switching between static/dynamic" >&5
25928 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
25929
25930         rm -f libconftest.a
25931         cat >conftest.$ac_ext <<EOF
25932 #line 25932 "configure"
25933 #include <stdio.h>
25934 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
25935 EOF
25936         if { (eval echo "$as_me:25936: \"$ac_compile\"") >&5
25937   (eval $ac_compile) 2>&5
25938   ac_status=$?
25939   echo "$as_me:25939: \$? = $ac_status" >&5
25940   (exit $ac_status); } ; then
25941                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
25942                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
25943         fi
25944         rm -f conftest.*
25945
25946         cf_save_LIBS="$LIBS"
25947
25948         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
25949         cat >conftest.$ac_ext <<_ACEOF
25950 #line 25950 "configure"
25951 #include "confdefs.h"
25952
25953 #line 25953 "configure"
25954 #include <stdio.h>
25955 int cf_ldflags_static(FILE *fp);
25956
25957 int
25958 main (void)
25959 {
25960
25961         return cf_ldflags_static(stdin);
25962
25963   ;
25964   return 0;
25965 }
25966 _ACEOF
25967 rm -f conftest.$ac_objext conftest$ac_exeext
25968 if { (eval echo "$as_me:25968: \"$ac_link\"") >&5
25969   (eval $ac_link) 2>&5
25970   ac_status=$?
25971   echo "$as_me:25971: \$? = $ac_status" >&5
25972   (exit $ac_status); } &&
25973          { ac_try='test -s conftest$ac_exeext'
25974   { (eval echo "$as_me:25974: \"$ac_try\"") >&5
25975   (eval $ac_try) 2>&5
25976   ac_status=$?
25977   echo "$as_me:25977: \$? = $ac_status" >&5
25978   (exit $ac_status); }; }; then
25979
25980         # some linkers simply ignore the -dynamic
25981         case x`file conftest$ac_exeext 2>/dev/null` in
25982         (*static*)
25983                 cf_ldflags_static=no
25984                 ;;
25985         (*)
25986                 cf_ldflags_static=yes
25987                 ;;
25988         esac
25989
25990 else
25991   echo "$as_me: failed program was:" >&5
25992 cat conftest.$ac_ext >&5
25993 cf_ldflags_static=no
25994 fi
25995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25996
25997         rm -f libconftest.*
25998         LIBS="$cf_save_LIBS"
25999
26000         echo "$as_me:26000: result: $cf_ldflags_static" >&5
26001 echo "${ECHO_T}$cf_ldflags_static" >&6
26002
26003         if test $cf_ldflags_static != yes
26004         then
26005                 LDFLAGS_STATIC=
26006                 LDFLAGS_SHARED=
26007         fi
26008 else
26009         LDFLAGS_STATIC=
26010         LDFLAGS_SHARED=
26011 fi
26012
26013         ;;
26014 esac
26015
26016 echo "$as_me:26016: checking where we will install curses.h" >&5
26017 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26018
26019 includesubdir=
26020 if test "$with_overwrite" = no && \
26021  ( test "x$includedir" = 'x${prefix}/include' || \
26022    test "x$includedir" = "x${prefix}/include" )
26023 then
26024         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26025 fi
26026 echo "$as_me:26026: result: ${includedir}${includesubdir}" >&5
26027 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26028
26029 ### Resolve a conflict between normal and wide-curses by forcing applications
26030 ### that will need libutf8 to add it to their configure script.
26031 if test "$with_overwrite" != no ; then
26032 if test "$NCURSES_LIBUTF8" = 1 ; then
26033         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26034         { echo "$as_me:26034: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26035 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26036 fi
26037 fi
26038 WITH_OVERWRITE=$with_overwrite
26039
26040 ### At least on MinGW a shared library build without libtool
26041 ### requires adding the additional libs to the link list.
26042 case $cf_cv_system_name in
26043 (*mingw32*|*mingw64*)
26044         if test "$DFT_LWR_MODEL" != "libtool"; then
26045            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
26046         fi
26047         ;;
26048 *)      ;;
26049 esac
26050
26051 # used to separate tack out of the tree
26052 NCURSES_TREE=
26053
26054 ### predefined stuff for the test programs
26055
26056 cat >>confdefs.h <<\EOF
26057 #define HAVE_SLK_COLOR 1
26058 EOF
26059
26060 # pkgsrc uses these
26061
26062 echo "$as_me:26062: checking for desired basename for form library" >&5
26063 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26064
26065 # Check whether --with-form-libname or --without-form-libname was given.
26066 if test "${with_form_libname+set}" = set; then
26067   withval="$with_form_libname"
26068   with_lib_basename=$withval
26069 else
26070   with_lib_basename=form
26071 fi;
26072 FORM_NAME="$with_lib_basename"
26073
26074 case "x$FORM_NAME" in
26075 (x|xno|xnone|xyes)
26076         FORM_NAME=form
26077         ;;
26078 (*)
26079         ;;
26080 esac
26081
26082 echo "$as_me:26082: result: $FORM_NAME" >&5
26083 echo "${ECHO_T}$FORM_NAME" >&6
26084
26085 echo "$as_me:26085: checking for desired basename for menu library" >&5
26086 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26087
26088 # Check whether --with-menu-libname or --without-menu-libname was given.
26089 if test "${with_menu_libname+set}" = set; then
26090   withval="$with_menu_libname"
26091   with_lib_basename=$withval
26092 else
26093   with_lib_basename=menu
26094 fi;
26095 MENU_NAME="$with_lib_basename"
26096
26097 case "x$MENU_NAME" in
26098 (x|xno|xnone|xyes)
26099         MENU_NAME=menu
26100         ;;
26101 (*)
26102         ;;
26103 esac
26104
26105 echo "$as_me:26105: result: $MENU_NAME" >&5
26106 echo "${ECHO_T}$MENU_NAME" >&6
26107
26108 echo "$as_me:26108: checking for desired basename for panel library" >&5
26109 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26110
26111 # Check whether --with-panel-libname or --without-panel-libname was given.
26112 if test "${with_panel_libname+set}" = set; then
26113   withval="$with_panel_libname"
26114   with_lib_basename=$withval
26115 else
26116   with_lib_basename=panel
26117 fi;
26118 PANEL_NAME="$with_lib_basename"
26119
26120 case "x$PANEL_NAME" in
26121 (x|xno|xnone|xyes)
26122         PANEL_NAME=panel
26123         ;;
26124 (*)
26125         ;;
26126 esac
26127
26128 echo "$as_me:26128: result: $PANEL_NAME" >&5
26129 echo "${ECHO_T}$PANEL_NAME" >&6
26130
26131 echo "$as_me:26131: checking for desired basename for cxx library" >&5
26132 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26133
26134 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26135 if test "${with_cxx_libname+set}" = set; then
26136   withval="$with_cxx_libname"
26137   with_lib_basename=$withval
26138 else
26139   with_lib_basename=ncurses++
26140 fi;
26141 CXX_NAME="$with_lib_basename"
26142
26143 case "x$CXX_NAME" in
26144 (x|xno|xnone|xyes)
26145         CXX_NAME=ncurses++
26146         ;;
26147 (*)
26148         ;;
26149 esac
26150
26151 echo "$as_me:26151: result: $CXX_NAME" >&5
26152 echo "${ECHO_T}$CXX_NAME" >&6
26153
26154 ### Construct the list of subdirectories for which we'll customize makefiles
26155 ### with the appropriate compile-rules.
26156
26157 echo "$as_me:26157: checking for src modules" >&5
26158 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26159
26160 # dependencies and linker-arguments for test-programs
26161 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26162 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26163 if test "$DFT_LWR_MODEL" = "libtool"; then
26164         TEST_ARGS="${TEST_DEPS}"
26165         TEST_ARG2="${TEST_DEP2}"
26166 else
26167         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26168         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26169 fi
26170
26171 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26172 cf_cv_src_modules=
26173 for cf_dir in $modules_to_build
26174 do
26175         if test -f $srcdir/$cf_dir/modules; then
26176
26177                 # We may/may not have tack in the distribution, though the
26178                 # makefile is.
26179                 if test $cf_dir = tack ; then
26180                         if test "x$cf_with_tack" != "xyes"; then
26181                                 continue
26182                         fi
26183                 fi
26184
26185                 if test -z "$cf_cv_src_modules"; then
26186                         cf_cv_src_modules=$cf_dir
26187                 else
26188                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26189                 fi
26190
26191                 # Make the ncurses_cfg.h file record the library interface files as
26192                 # well.  These are header files that are the same name as their
26193                 # directory.  Ncurses is the only library that does not follow
26194                 # that pattern.
26195                 if test $cf_dir = tack ; then
26196                         continue
26197                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26198
26199 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26200
26201                         cat >>confdefs.h <<EOF
26202 #define HAVE_${cf_have_include}_H 1
26203 EOF
26204
26205                         cat >>confdefs.h <<EOF
26206 #define HAVE_LIB${cf_have_include} 1
26207 EOF
26208
26209 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26210
26211 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26212
26213                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26214                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26215                         if test "$DFT_LWR_MODEL" = "libtool"; then
26216                                 TEST_ARGS="${TEST_DEPS}"
26217                                 TEST_ARG2="${TEST_DEP2}"
26218                         else
26219                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26220                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26221                         fi
26222                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26223                 fi
26224         fi
26225 done
26226 echo "$as_me:26226: result: $cf_cv_src_modules" >&5
26227 echo "${ECHO_T}$cf_cv_src_modules" >&6
26228
26229 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26230 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26231
26232 SRC_SUBDIRS=
26233 if test "x$cf_with_manpages" != xno ; then
26234         SRC_SUBDIRS="$SRC_SUBDIRS man"
26235 fi
26236 SRC_SUBDIRS="$SRC_SUBDIRS include"
26237 for cf_dir in $cf_cv_src_modules
26238 do
26239         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26240 done
26241 if test "x$cf_with_tests" != "xno" ; then
26242         SRC_SUBDIRS="$SRC_SUBDIRS test"
26243 fi
26244 # always make this, to install the ncurses-config script
26245 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26246 if test "$cf_with_cxx_binding" != no; then
26247         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26248         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26249 fi
26250
26251 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26252 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26253
26254 ADA_SUBDIRS=
26255 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26256         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26257         ADA_SUBDIRS="gen src"
26258         if test "x$cf_with_tests" != "xno" ; then
26259                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26260         fi
26261 fi
26262
26263 SUB_MAKEFILES=
26264 for cf_dir in $SRC_SUBDIRS
26265 do
26266         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26267 done
26268
26269 if test -n "$ADA_SUBDIRS"; then
26270         for cf_dir in $ADA_SUBDIRS
26271         do
26272                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26273         done
26274
26275 fi
26276
26277 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26278    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26279    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26280    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26281 fi
26282
26283 DIRS_TO_MAKE="lib"
26284 for cf_item in $cf_list_models
26285 do
26286
26287         case $cf_item in
26288         (libtool) cf_subdir='obj_lo'  ;;
26289         (normal)  cf_subdir='objects' ;;
26290         (debug)   cf_subdir='obj_g' ;;
26291         (profile) cf_subdir='obj_p' ;;
26292         (shared)
26293                 case $cf_cv_system_name in
26294                 (cygwin|msys)
26295                         cf_subdir='objects' ;;
26296                 (*)
26297                         cf_subdir='obj_s' ;;
26298                 esac
26299         esac
26300
26301         for cf_item2 in $DIRS_TO_MAKE
26302         do
26303                 test $cf_item2 = $cf_subdir && break
26304         done
26305         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26306 done
26307 for cf_dir in $DIRS_TO_MAKE
26308 do
26309         test ! -d $cf_dir && mkdir $cf_dir
26310 done
26311
26312 # symbols that differ when compiling Ada95 by itself.
26313 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26314
26315 # values to use as strings
26316
26317 cat >>confdefs.h <<EOF
26318 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26319 EOF
26320
26321 cat >>confdefs.h <<EOF
26322 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26323 EOF
26324
26325 ### Now that we're done running tests, add the compiler-warnings, if any
26326
26327 cf_fix_cppflags=no
26328 cf_new_cflags=
26329 cf_new_cppflags=
26330 cf_new_extra_cppflags=
26331
26332 for cf_add_cflags in $EXTRA_CFLAGS
26333 do
26334 case $cf_fix_cppflags in
26335 (no)
26336         case $cf_add_cflags in
26337         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26338                 case $cf_add_cflags in
26339                 (-D*)
26340                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26341
26342                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26343                                 && test -z "${cf_tst_cflags}" \
26344                                 && cf_fix_cppflags=yes
26345
26346                         if test $cf_fix_cppflags = yes ; then
26347
26348         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26349         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26350
26351                                 continue
26352                         elif test "${cf_tst_cflags}" = "\"'" ; then
26353
26354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26356
26357                                 continue
26358                         fi
26359                         ;;
26360                 esac
26361                 case "$CPPFLAGS" in
26362                 (*$cf_add_cflags)
26363                         ;;
26364                 (*)
26365                         case $cf_add_cflags in
26366                         (-D*)
26367                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26368
26369 CPPFLAGS=`echo "$CPPFLAGS" | \
26370         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26371                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26372
26373                                 ;;
26374                         esac
26375
26376         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26377         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26378
26379                         ;;
26380                 esac
26381                 ;;
26382         (*)
26383
26384         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26385         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26386
26387                 ;;
26388         esac
26389         ;;
26390 (yes)
26391
26392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26394
26395         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26396
26397         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26398                 && test -z "${cf_tst_cflags}" \
26399                 && cf_fix_cppflags=no
26400         ;;
26401 esac
26402 done
26403
26404 if test -n "$cf_new_cflags" ; then
26405
26406         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26407         CFLAGS="${CFLAGS}$cf_new_cflags"
26408
26409 fi
26410
26411 if test -n "$cf_new_cppflags" ; then
26412
26413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26414         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26415
26416 fi
26417
26418 if test -n "$cf_new_extra_cppflags" ; then
26419
26420         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26421         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26422
26423 fi
26424
26425 ### Define substitutions for header files to avoid name-pollution
26426
26427 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26428         HAVE_TCGETATTR=1
26429 else
26430         HAVE_TCGETATTR=0
26431 fi
26432
26433 if test "x$ac_cv_header_stdint_h" = xyes ; then
26434         HAVE_STDINT_H=1
26435 else
26436         HAVE_STDINT_H=0
26437 fi
26438
26439 if test "x$ac_cv_header_termio_h" = xyes ; then
26440         HAVE_TERMIO_H=1
26441 else
26442         HAVE_TERMIO_H=0
26443 fi
26444
26445 if test "x$ac_cv_header_termios_h" = xyes ; then
26446         HAVE_TERMIOS_H=1
26447 else
26448         HAVE_TERMIOS_H=0
26449 fi
26450
26451 ################################################################################
26452 test "x$use_database" = xyes && \
26453 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26454
26455 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26456 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26457
26458 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26459 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26460 fi
26461
26462 if test "x$cf_with_tests" != xno ; then
26463         MAKE_TESTS=
26464 else
26465         MAKE_TESTS="#"
26466 fi
26467
26468 ADAHTML_DIR=../../doc/html/ada
26469
26470 # workaround for OS/2 (20151017)
26471 case $cf_cv_system_name in
26472 (os2*)
26473         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26474         ;;
26475 (*)
26476         LIBTOOL_OPTS_CXX=
26477         ;;
26478 esac
26479
26480 # workaround for g++ versus Solaris (20131116)
26481 case $cf_cv_system_name in
26482 (solaris2*)
26483         case "x$CPPFLAGS" in
26484         (*-D_XOPEN_SOURCE_EXTENDED*)
26485                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26486
26487 echo "${as_me:-configure}:26487: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26488
26489                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26490                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26491                 ;;
26492         esac
26493         ;;
26494 esac
26495
26496 # Help to automatically enable the extended curses features when using either
26497 # the *-config or the ".pc" files by adding defines.
26498 echo "$as_me:26498: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26499 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26500 PKG_CFLAGS=
26501 for cf_loop1 in $CPPFLAGS_after_XOPEN
26502 do
26503         cf_found=no
26504         for cf_loop2 in $CPPFLAGS_before_XOPEN
26505         do
26506                 if test "x$cf_loop1" = "x$cf_loop2"
26507                 then
26508                         cf_found=yes
26509                         break
26510                 fi
26511         done
26512         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26513 done
26514 echo "$as_me:26514: result: $PKG_CFLAGS" >&5
26515 echo "${ECHO_T}$PKG_CFLAGS" >&6
26516
26517 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26518 case "x$NCURSES_OSPEED" in
26519 (*short*)
26520         cf_compatible=1
26521         ;;
26522 (*)
26523         cf_compatible=0
26524         ;;
26525 esac
26526
26527 cat >>confdefs.h <<EOF
26528 #define NCURSES_OSPEED_COMPAT $cf_compatible
26529 EOF
26530
26531 case "x$cf_cv_typeof_chtype" in
26532 (xshort|xint|xlong)
26533         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26534         ;;
26535 esac
26536
26537 case "x$cf_cv_typeof_mmask_t" in
26538 (xshort|xint|xlong)
26539         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26540         ;;
26541 esac
26542
26543 # substitute into misc/Makefile to suppress
26544 # (un)install.data from the
26545 # (un)install rules.
26546 if test "x$cf_with_db_install" = "xno"; then
26547         MISC_INSTALL_DATA=
26548         MISC_UNINSTALL_DATA=
26549 else
26550         MISC_INSTALL_DATA=install.data
26551         MISC_UNINSTALL_DATA=uninstall.data
26552 fi
26553
26554 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26555         MAKE_DATABASE="#"
26556 else
26557         MAKE_DATABASE="$MAKE_TERMINFO"
26558 fi
26559
26560 if test -n "$PACKAGE"
26561 then
26562         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26563         export PACKAGE
26564         echo "package: $PACKAGE"
26565 fi
26566
26567 UNALTERED_SYMS=
26568 cf_filter_syms=no
26569
26570 if test -n "$RESULTING_SYMS"
26571 then
26572         cf_filter_syms=$cf_dft_filter_syms
26573         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26574
26575 echo "${as_me:-configure}:26575: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26576
26577 fi
26578
26579 if test "x$WILDCARD_SYMS" = xno
26580 then
26581         cf_filter_syms=yes
26582 fi
26583
26584 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26585
26586 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26587 if test $cf_filter_syms = yes
26588 then
26589         RESULTING_SYMS=resulting.map
26590 fi
26591
26592 if test "x$cross_compiling" = xyes ; then
26593         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26594         CHECK_BUILD="#"
26595 else
26596         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26597         CHECK_BUILD=
26598 fi
26599
26600 # This is used for the *-config script and *.pc data files.
26601
26602 echo "$as_me:26602: checking for linker search path" >&5
26603 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26604 if test "${cf_cv_ld_searchpath+set}" = set; then
26605   echo $ECHO_N "(cached) $ECHO_C" >&6
26606 else
26607
26608 if test "$cross_compiling" != yes ; then
26609
26610 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26611 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26612
26613 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26614 # update the cache, which makes it run faster.
26615 test -z "$cf_pathlist" && \
26616         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26617
26618 test -z "$cf_pathlist" &&
26619         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26620
26621 # This works with OpenBSD 6.5, which lists only filenames
26622 test -z "$cf_pathlist" &&
26623         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26624
26625 if test -z "$cf_pathlist"
26626 then
26627         # dyld default path with MacOS
26628         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26629         then
26630                 # do this to bypass check
26631                 cf_cv_ld_searchpath='$HOME/lib'
26632                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26633         fi
26634 fi
26635
26636 if test -z "$cf_pathlist"
26637 then
26638         # Solaris is hardcoded
26639         if test -d /opt/SUNWspro/lib
26640         then
26641                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26642         elif test -d /usr/ccs/lib
26643         then
26644                 cf_pathlist="/usr/ccs/lib /usr/lib"
26645         fi
26646 fi
26647
26648 fi
26649
26650 # If nothing else, assume it is conventional
26651 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26652
26653 # Finally, check that this is only directories
26654 for cf_path in $0 $cf_pathlist
26655 do
26656         if test -d "$cf_path"; then
26657                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26658                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26659         fi
26660 done
26661
26662 # Ensure that it is nonempty
26663 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26664
26665 fi
26666 echo "$as_me:26666: result: $cf_cv_ld_searchpath" >&5
26667 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26668
26669 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26670
26671 cat >>confdefs.h <<\EOF
26672 #define HAVE_CURSES_DATA_BOOLNAMES 1
26673 EOF
26674
26675 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
26676 ac_config_commands="$ac_config_commands default"
26677 cat >confcache <<\_ACEOF
26678 # This file is a shell script that caches the results of configure
26679 # tests run on this system so they can be shared between configure
26680 # scripts and configure runs, see configure's option --config-cache.
26681 # It is not useful on other systems.  If it contains results you don't
26682 # want to keep, you may remove or edit it.
26683 #
26684 # config.status only pays attention to the cache file if you give it
26685 # the --recheck option to rerun configure.
26686 #
26687 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26688 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26689 # following values.
26690
26691 _ACEOF
26692
26693 # The following way of writing the cache mishandles newlines in values,
26694 # but we know of no workaround that is simple, portable, and efficient.
26695 # So, don't put newlines in cache variables' values.
26696 # Ultrix sh set writes to stderr and can't be redirected directly,
26697 # and sets the high bit in the cache file unless we assign to the vars.
26698 {
26699   (set) 2>&1 |
26700     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26701     *ac_space=\ *)
26702       # `set' does not quote correctly, so add quotes (double-quote
26703       # substitution turns \\\\ into \\, and sed turns \\ into \).
26704       sed -n \
26705         "s/'/'\\\\''/g;
26706           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26707       ;;
26708     *)
26709       # `set' quotes correctly as required by POSIX, so do not add quotes.
26710       sed -n \
26711         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26712       ;;
26713     esac;
26714 } |
26715   sed '
26716      t clear
26717      : clear
26718      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26719      t end
26720      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26721      : end' >>confcache
26722 if cmp -s $cache_file confcache; then :; else
26723   if test -w $cache_file; then
26724     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26725     cat confcache >$cache_file
26726   else
26727     echo "not updating unwritable cache $cache_file"
26728   fi
26729 fi
26730 rm -f confcache
26731
26732 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26733 # Let make expand exec_prefix.
26734 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26735
26736 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26737 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26738 # trailing colons and then remove the whole line if VPATH becomes empty
26739 # (actually we leave an empty line to preserve line numbers).
26740 if test "x$srcdir" = x.; then
26741   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26742 s/:*\$(srcdir):*/:/;
26743 s/:*\${srcdir}:*/:/;
26744 s/:*@srcdir@:*/:/;
26745 s/^\([^=]*=[    ]*\):*/\1/;
26746 s/:*$//;
26747 s/^[^=]*=[      ]*$//;
26748 }'
26749 fi
26750
26751 DEFS=-DHAVE_CONFIG_H
26752
26753 : ${CONFIG_STATUS=./config.status}
26754 ac_clean_files_save=$ac_clean_files
26755 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26756 { echo "$as_me:26756: creating $CONFIG_STATUS" >&5
26757 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26758 cat >$CONFIG_STATUS <<_ACEOF
26759 #! $SHELL
26760 # Generated automatically by configure.
26761 # Run this file to recreate the current configuration.
26762 # Compiler output produced by configure, useful for debugging
26763 # configure, is in config.log if it exists.
26764
26765 debug=false
26766 SHELL=\${CONFIG_SHELL-$SHELL}
26767 ac_cs_invocation="\$0 \$@"
26768
26769 _ACEOF
26770
26771 cat >>$CONFIG_STATUS <<\_ACEOF
26772 # Be Bourne compatible
26773 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26774   emulate sh
26775   NULLCMD=:
26776 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26777   set -o posix
26778 fi
26779
26780 # Name of the executable.
26781 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26782
26783 if expr a : '\(a\)' >/dev/null 2>&1; then
26784   as_expr=expr
26785 else
26786   as_expr=false
26787 fi
26788
26789 rm -f conf$$ conf$$.exe conf$$.file
26790 echo >conf$$.file
26791 if ln -s conf$$.file conf$$ 2>/dev/null; then
26792   # We could just check for DJGPP; but this test a) works b) is more generic
26793   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26794   if test -f conf$$.exe; then
26795     # Don't use ln at all; we don't have any links
26796     as_ln_s='cp -p'
26797   else
26798     as_ln_s='ln -s'
26799   fi
26800 elif ln conf$$.file conf$$ 2>/dev/null; then
26801   as_ln_s=ln
26802 else
26803   as_ln_s='cp -p'
26804 fi
26805 rm -f conf$$ conf$$.exe conf$$.file
26806
26807 as_executable_p="test -f"
26808
26809 # Support unset when possible.
26810 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26811   as_unset=unset
26812 else
26813   as_unset=false
26814 fi
26815
26816 # NLS nuisances.
26817 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26818 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26819 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26820 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26821 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26822 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26823 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26824 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26825
26826 # IFS
26827 # We need space, tab and new line, in precisely that order.
26828 as_nl='
26829 '
26830 IFS="   $as_nl"
26831
26832 # CDPATH.
26833 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26834
26835 exec 6>&1
26836
26837 _ACEOF
26838
26839 # Files that config.status was made for.
26840 if test -n "$ac_config_files"; then
26841   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26842 fi
26843
26844 if test -n "$ac_config_headers"; then
26845   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26846 fi
26847
26848 if test -n "$ac_config_links"; then
26849   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26850 fi
26851
26852 if test -n "$ac_config_commands"; then
26853   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26854 fi
26855
26856 cat >>$CONFIG_STATUS <<\EOF
26857
26858 ac_cs_usage="\
26859 \`$as_me' instantiates files from templates according to the
26860 current configuration.
26861
26862 Usage: $0 [OPTIONS] [FILE]...
26863
26864   -h, --help       print this help, then exit
26865   -V, --version    print version number, then exit
26866   -d, --debug      don't remove temporary files
26867       --recheck    update $as_me by reconfiguring in the same conditions
26868   --file=FILE[:TEMPLATE]
26869                    instantiate the configuration file FILE
26870   --header=FILE[:TEMPLATE]
26871                    instantiate the configuration header FILE
26872
26873 Configuration files:
26874 $config_files
26875
26876 Configuration headers:
26877 $config_headers
26878
26879 Configuration commands:
26880 $config_commands
26881
26882 Report bugs to <dickey@invisible-island.net>."
26883 EOF
26884
26885 cat >>$CONFIG_STATUS <<EOF
26886 ac_cs_version="\\
26887 config.status
26888 configured by $0, generated by GNU Autoconf 2.52.20200111,
26889   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26890
26891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26892 Free Software Foundation, Inc.
26893 This config.status script is free software; the Free Software Foundation
26894 gives unlimited permission to copy, distribute and modify it."
26895 srcdir=$srcdir
26896 INSTALL="$INSTALL"
26897 EOF
26898
26899 cat >>$CONFIG_STATUS <<\EOF
26900 # If no file are specified by the user, then we need to provide default
26901 # value.  By we need to know if files were specified by the user.
26902 ac_need_defaults=:
26903 while test $# != 0
26904 do
26905   case $1 in
26906   --*=*)
26907     ac_option=`expr "x$1" : 'x\([^=]*\)='`
26908     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
26909     shift
26910     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
26911     shift
26912     ;;
26913   -*);;
26914   *) # This is not an option, so the user has probably given explicit
26915      # arguments.
26916      ac_need_defaults=false;;
26917   esac
26918
26919   case $1 in
26920   # Handling of the options.
26921 EOF
26922 cat >>$CONFIG_STATUS <<EOF
26923   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26924     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
26925     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
26926 EOF
26927 cat >>$CONFIG_STATUS <<\EOF
26928   --version | --vers* | -V )
26929     echo "$ac_cs_version"; exit 0 ;;
26930   --he | --h)
26931     # Conflict between --help and --header
26932     { { echo "$as_me:26932: error: ambiguous option: $1
26933 Try \`$0 --help' for more information." >&5
26934 echo "$as_me: error: ambiguous option: $1
26935 Try \`$0 --help' for more information." >&2;}
26936    { (exit 1); exit 1; }; };;
26937   --help | --hel | -h )
26938     echo "$ac_cs_usage"; exit 0 ;;
26939   --debug | --d* | -d )
26940     debug=: ;;
26941   --file | --fil | --fi | --f )
26942     shift
26943     CONFIG_FILES="$CONFIG_FILES $1"
26944     ac_need_defaults=false;;
26945   --header | --heade | --head | --hea )
26946     shift
26947     CONFIG_HEADERS="$CONFIG_HEADERS $1"
26948     ac_need_defaults=false;;
26949
26950   # This is an error.
26951   -*) { { echo "$as_me:26951: error: unrecognized option: $1
26952 Try \`$0 --help' for more information." >&5
26953 echo "$as_me: error: unrecognized option: $1
26954 Try \`$0 --help' for more information." >&2;}
26955    { (exit 1); exit 1; }; } ;;
26956
26957   *) ac_config_targets="$ac_config_targets $1" ;;
26958
26959   esac
26960   shift
26961 done
26962
26963 exec 5>>config.log
26964 cat >&5 << _ACEOF
26965
26966 ## ----------------------- ##
26967 ## Running config.status.  ##
26968 ## ----------------------- ##
26969
26970 This file was extended by $as_me 2.52.20200111, executed with
26971   CONFIG_FILES    = $CONFIG_FILES
26972   CONFIG_HEADERS  = $CONFIG_HEADERS
26973   CONFIG_LINKS    = $CONFIG_LINKS
26974   CONFIG_COMMANDS = $CONFIG_COMMANDS
26975   > $ac_cs_invocation
26976 on `(hostname || uname -n) 2>/dev/null | sed 1q`
26977
26978 _ACEOF
26979 EOF
26980
26981 cat >>$CONFIG_STATUS <<EOF
26982 #
26983 # INIT-COMMANDS section.
26984 #
26985
26986 ### Special initialization commands, used to pass information from the
26987 ### configuration-run into config.status
26988
26989 ALTERNATE_SYMS="$ALTERNATE_SYMS"
26990 AWK="$AWK"
26991 CXX_NAME="$CXX_NAME"
26992 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
26993 DFT_LWR_MODEL="$DFT_LWR_MODEL"
26994 ECHO_LD="$ECHO_LD"
26995 EXTRA_SUFFIX="$EXTRA_SUFFIX"
26996 FORM_NAME="$FORM_NAME"
26997 LDCONFIG="$LDCONFIG"
26998 LIBTOOL_VERSION="$LIBTOOL_VERSION"
26999 LIB_NAME="$LIB_NAME"
27000 LIB_PREFIX="$LIB_PREFIX"
27001 LIB_SUBSETS="$LIB_SUBSETS"
27002 LIB_SUFFIX="$LIB_SUFFIX"
27003 LIB_TRACING="$LIB_TRACING"
27004 LN_S="$LN_S"
27005 MAKE_TERMINFO="$MAKE_TERMINFO"
27006 MENU_NAME="$MENU_NAME"
27007 NCURSES_MAJOR="$NCURSES_MAJOR"
27008 NCURSES_MINOR="$NCURSES_MINOR"
27009 NCURSES_OSPEED="$NCURSES_OSPEED"
27010 NCURSES_PATCH="$NCURSES_PATCH"
27011 PANEL_NAME="$PANEL_NAME"
27012 SRC_SUBDIRS="$SRC_SUBDIRS"
27013 TERMINFO="$TERMINFO"
27014 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27015 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27016 TICS_NAME="$TICS_NAME"
27017 TICS_SUFFIX="$TICS_SUFFIX"
27018 TIC_PATH="$TIC_PATH"
27019 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27020 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27021 TINFO_NAME="$TINFO_NAME"
27022 TINFO_SUFFIX="$TINFO_SUFFIX"
27023 UNALTERED_SYMS="$UNALTERED_SYMS"
27024 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27025 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27026 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27027 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27028 WILDCARD_SYMS="$WILDCARD_SYMS"
27029 WITH_CURSES_H="$with_curses_h"
27030 WITH_ECHO="${enable_echo:=yes}"
27031 WITH_OVERWRITE="$with_overwrite"
27032 cf_LIST_MODELS="$cf_list_models"
27033 cf_cv_abi_version="$cf_cv_abi_version"
27034 cf_cv_do_relink="$cf_cv_do_relink"
27035 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27036 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27037 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27038 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27039 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27040 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27041 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27042 cf_cv_rel_version="$cf_cv_rel_version"
27043 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27044 cf_cv_shared_soname='$cf_cv_shared_soname'
27045 cf_cv_shlib_version="$cf_cv_shlib_version"
27046 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27047 cf_cv_system_name="$cf_cv_system_name"
27048 cf_cv_term_driver="$with_term_driver"
27049 cf_with_ada="$cf_with_ada"
27050 cf_with_cxx_binding="$cf_with_cxx_binding"
27051 cf_with_db_install="$cf_with_db_install"
27052 cf_with_manpages="$cf_with_manpages"
27053 cf_with_tests="$cf_with_tests"
27054 host="$host"
27055 target="$target"
27056 with_shared_cxx="$with_shared_cxx"
27057
27058 EOF
27059
27060 cat >>$CONFIG_STATUS <<\EOF
27061 for ac_config_target in $ac_config_targets
27062 do
27063   case "$ac_config_target" in
27064   # Handling of arguments.
27065   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27066   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27067   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27068   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27069   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27070   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27071   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27072   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27073   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27074   *) { { echo "$as_me:27074: error: invalid argument: $ac_config_target" >&5
27075 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27076    { (exit 1); exit 1; }; };;
27077   esac
27078 done
27079
27080 # If the user did not use the arguments to specify the items to instantiate,
27081 # then the envvar interface is used.  Set only those that are not.
27082 # We use the long form for the default assignment because of an extremely
27083 # bizarre bug on SunOS 4.1.3.
27084 if $ac_need_defaults; then
27085   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27086   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27087   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27088 fi
27089
27090 # Create a temporary directory, and hook for its removal unless debugging.
27091 $debug ||
27092 {
27093   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27094   trap '{ (exit 1); exit 1; }' 1 2 13 15
27095 }
27096
27097 # Create a (secure) tmp directory for tmp files.
27098 : ${TMPDIR=/tmp}
27099 {
27100   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27101   test -n "$tmp" && test -d "$tmp"
27102 }  ||
27103 {
27104   tmp=$TMPDIR/cs$$-$RANDOM
27105   (umask 077 && mkdir $tmp)
27106 } ||
27107 {
27108    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27109    { (exit 1); exit 1; }
27110 }
27111
27112 EOF
27113
27114 cat >>$CONFIG_STATUS <<EOF
27115
27116 #
27117 # CONFIG_FILES section.
27118 #
27119
27120 # No need to generate the scripts if there are no CONFIG_FILES.
27121 # This happens for instance when ./config.status config.h
27122 if test -n "\$CONFIG_FILES"; then
27123   # Protect against being on the right side of a sed subst in config.status.
27124   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27125    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27126 s,@SHELL@,$SHELL,;t t
27127 s,@exec_prefix@,$exec_prefix,;t t
27128 s,@prefix@,$prefix,;t t
27129 s,@program_transform_name@,$program_transform_name,;t t
27130 s,@bindir@,$bindir,;t t
27131 s,@sbindir@,$sbindir,;t t
27132 s,@libexecdir@,$libexecdir,;t t
27133 s,@datarootdir@,$datarootdir,;t t
27134 s,@datadir@,$datadir,;t t
27135 s,@sysconfdir@,$sysconfdir,;t t
27136 s,@sharedstatedir@,$sharedstatedir,;t t
27137 s,@localstatedir@,$localstatedir,;t t
27138 s,@runstatedir@,$runstatedir,;t t
27139 s,@libdir@,$libdir,;t t
27140 s,@includedir@,$includedir,;t t
27141 s,@oldincludedir@,$oldincludedir,;t t
27142 s,@infodir@,$infodir,;t t
27143 s,@mandir@,$mandir,;t t
27144 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27145 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27146 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27147 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27148 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27149 s,@build_alias@,$build_alias,;t t
27150 s,@host_alias@,$host_alias,;t t
27151 s,@target_alias@,$target_alias,;t t
27152 s,@ECHO_C@,$ECHO_C,;t t
27153 s,@ECHO_N@,$ECHO_N,;t t
27154 s,@ECHO_T@,$ECHO_T,;t t
27155 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27156 s,@DEFS@,$DEFS,;t t
27157 s,@LIBS@,$LIBS,;t t
27158 s,@top_builddir@,$top_builddir,;t t
27159 s,@EGREP@,$EGREP,;t t
27160 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27161 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27162 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27163 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27164 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27165 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27166 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27167 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27168 s,@VERSION@,$VERSION,;t t
27169 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27170 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27171 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27172 s,@PACKAGE@,$PACKAGE,;t t
27173 s,@build@,$build,;t t
27174 s,@build_cpu@,$build_cpu,;t t
27175 s,@build_vendor@,$build_vendor,;t t
27176 s,@build_os@,$build_os,;t t
27177 s,@host@,$host,;t t
27178 s,@host_cpu@,$host_cpu,;t t
27179 s,@host_vendor@,$host_vendor,;t t
27180 s,@host_os@,$host_os,;t t
27181 s,@target@,$target,;t t
27182 s,@target_cpu@,$target_cpu,;t t
27183 s,@target_vendor@,$target_vendor,;t t
27184 s,@target_os@,$target_os,;t t
27185 s,@CC@,$CC,;t t
27186 s,@CFLAGS@,$CFLAGS,;t t
27187 s,@LDFLAGS@,$LDFLAGS,;t t
27188 s,@CPPFLAGS@,$CPPFLAGS,;t t
27189 s,@ac_ct_CC@,$ac_ct_CC,;t t
27190 s,@EXEEXT@,$EXEEXT,;t t
27191 s,@OBJEXT@,$OBJEXT,;t t
27192 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27193 s,@CPP@,$CPP,;t t
27194 s,@LDCONFIG@,$LDCONFIG,;t t
27195 s,@CXX@,$CXX,;t t
27196 s,@CXXFLAGS@,$CXXFLAGS,;t t
27197 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27198 s,@AWK@,$AWK,;t t
27199 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27200 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27201 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27202 s,@LINT@,$LINT,;t t
27203 s,@LINT_OPTS@,$LINT_OPTS,;t t
27204 s,@LN_S@,$LN_S,;t t
27205 s,@cf_config_suffix@,$cf_config_suffix,;t t
27206 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27207 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27208 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27209 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27210 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27211 s,@SET_MAKE@,$SET_MAKE,;t t
27212 s,@CTAGS@,$CTAGS,;t t
27213 s,@ETAGS@,$ETAGS,;t t
27214 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27215 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27216 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27217 s,@RANLIB@,$RANLIB,;t t
27218 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27219 s,@LD@,$LD,;t t
27220 s,@ac_ct_LD@,$ac_ct_LD,;t t
27221 s,@AR@,$AR,;t t
27222 s,@ac_ct_AR@,$ac_ct_AR,;t t
27223 s,@NM@,$NM,;t t
27224 s,@ac_ct_NM@,$ac_ct_NM,;t t
27225 s,@ARFLAGS@,$ARFLAGS,;t t
27226 s,@DESTDIR@,$DESTDIR,;t t
27227 s,@BUILD_CC@,$BUILD_CC,;t t
27228 s,@BUILD_CPP@,$BUILD_CPP,;t t
27229 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27230 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27231 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27232 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27233 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27234 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27235 s,@cf_list_models@,$cf_list_models,;t t
27236 s,@ABI_VERSION@,$ABI_VERSION,;t t
27237 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27238 s,@LIBTOOL@,$LIBTOOL,;t t
27239 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27240 s,@LT_UNDEF@,$LT_UNDEF,;t t
27241 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27242 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27243 s,@LIB_CREATE@,$LIB_CREATE,;t t
27244 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27245 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27246 s,@LIB_PREP@,$LIB_PREP,;t t
27247 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27248 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27249 s,@LIB_LINK@,$LIB_LINK,;t t
27250 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27251 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27252 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27253 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27254 s,@TICS_NAME@,$TICS_NAME,;t t
27255 s,@TINFO_NAME@,$TINFO_NAME,;t t
27256 s,@LIB_NAME@,$LIB_NAME,;t t
27257 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27258 s,@CC_G_OPT@,$CC_G_OPT,;t t
27259 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27260 s,@LD_MODEL@,$LD_MODEL,;t t
27261 s,@shlibdir@,$shlibdir,;t t
27262 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27263 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27264 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27265 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27266 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27267 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27268 s,@LINK_PROGS@,$LINK_PROGS,;t t
27269 s,@LINK_TESTS@,$LINK_TESTS,;t t
27270 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27271 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27272 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27273 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27274 s,@RPATH_LIST@,$RPATH_LIST,;t t
27275 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27276 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27277 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27278 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27279 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27280 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27281 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27282 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27283 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27284 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27285 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27286 s,@TIC@,$TIC,;t t
27287 s,@INFOCMP@,$INFOCMP,;t t
27288 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27289 s,@XTERM_KBS@,$XTERM_KBS,;t t
27290 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27291 s,@TERMINFO@,$TERMINFO,;t t
27292 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27293 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27294 s,@TERMPATH@,$TERMPATH,;t t
27295 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27296 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27297 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27298 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27299 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27300 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27301 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27302 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27303 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27304 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27305 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27306 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27307 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27308 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27309 s,@RGB_PATH@,$RGB_PATH,;t t
27310 s,@no_x11_rgb@,$no_x11_rgb,;t t
27311 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27312 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27313 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27314 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27315 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27316 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27317 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27318 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27319 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27320 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27321 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27322 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27323 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27324 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27325 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27326 s,@PTHREAD@,$PTHREAD,;t t
27327 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27328 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27329 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27330 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27331 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27332 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27333 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27334 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27335 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27336 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27337 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27338 s,@ECHO_LT@,$ECHO_LT,;t t
27339 s,@ECHO_LD@,$ECHO_LD,;t t
27340 s,@RULE_CC@,$RULE_CC,;t t
27341 s,@SHOW_CC@,$SHOW_CC,;t t
27342 s,@ECHO_CC@,$ECHO_CC,;t t
27343 s,@ECHO_LINK@,$ECHO_LINK,;t t
27344 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27345 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27346 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27347 s,@ADAFLAGS@,$ADAFLAGS,;t t
27348 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27349 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27350 s,@ADA_TRACE@,$ADA_TRACE,;t t
27351 s,@MATH_LIB@,$MATH_LIB,;t t
27352 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27353 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27354 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27355 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27356 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27357 s,@TEST_LIBS@,$TEST_LIBS,;t t
27358 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27359 s,@CXXCPP@,$CXXCPP,;t t
27360 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27361 s,@CXX_AR@,$CXX_AR,;t t
27362 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27363 s,@CXXLIBS@,$CXXLIBS,;t t
27364 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27365 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27366 s,@M4_exists@,$M4_exists,;t t
27367 s,@cf_ada_make@,$cf_ada_make,;t t
27368 s,@cf_ada_config@,$cf_ada_config,;t t
27369 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27370 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27371 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27372 s,@cf_compile_generics@,$cf_compile_generics,;t t
27373 s,@cf_generic_objects@,$cf_generic_objects,;t t
27374 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27375 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27376 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27377 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27378 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27379 s,@cf_ada_package@,$cf_ada_package,;t t
27380 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27381 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27382 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27383 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27384 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27385 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27386 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27387 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27388 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27389 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27390 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27391 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27392 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27393 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27394 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27395 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27396 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27397 s,@TICS_LIBS@,$TICS_LIBS,;t t
27398 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27399 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27400 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27401 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27402 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27403 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27404 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27405 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27406 s,@includesubdir@,$includesubdir,;t t
27407 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27408 s,@TICS_LIST@,$TICS_LIST,;t t
27409 s,@TINFO_LIST@,$TINFO_LIST,;t t
27410 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27411 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27412 s,@FORM_NAME@,$FORM_NAME,;t t
27413 s,@MENU_NAME@,$MENU_NAME,;t t
27414 s,@PANEL_NAME@,$PANEL_NAME,;t t
27415 s,@CXX_NAME@,$CXX_NAME,;t t
27416 s,@TEST_ARGS@,$TEST_ARGS,;t t
27417 s,@TEST_DEPS@,$TEST_DEPS,;t t
27418 s,@TEST_ARG2@,$TEST_ARG2,;t t
27419 s,@TEST_DEP2@,$TEST_DEP2,;t t
27420 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27421 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27422 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27423 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27424 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27425 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27426 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27427 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27428 s,@cross_compiling@,$cross_compiling,;t t
27429 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27430 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27431 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27432 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27433 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27434 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27435 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27436 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27437 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27438 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27439 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27440 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27441 CEOF
27442
27443 EOF
27444
27445   cat >>$CONFIG_STATUS <<\EOF
27446   # Split the substitutions into bite-sized pieces for seds with
27447   # small command number limits, like on Digital OSF/1 and HP-UX.
27448   ac_max_sed_lines=48
27449   ac_sed_frag=1 # Number of current file.
27450   ac_beg=1 # First line for current file.
27451   ac_end=$ac_max_sed_lines # Line after last line for current file.
27452   ac_more_lines=:
27453   ac_sed_cmds=
27454   while $ac_more_lines; do
27455     if test $ac_beg -gt 1; then
27456       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27457     else
27458       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27459     fi
27460     if test ! -s $tmp/subs.frag; then
27461       ac_more_lines=false
27462     else
27463       # The purpose of the label and of the branching condition is to
27464       # speed up the sed processing (if there are no `@' at all, there
27465       # is no need to browse any of the substitutions).
27466       # These are the two extra sed commands mentioned above.
27467       (echo ':t
27468   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27469       # It is possible to make a multiline substitution using escaped newlines.
27470       # Ensure that we do not split the substitution between script fragments.
27471       ac_BEG=$ac_end
27472       ac_END=`expr $ac_end + $ac_max_sed_lines`
27473       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27474       if test -s $tmp/subs.next; then
27475         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27476         if test ! -s $tmp/subs.edit; then
27477           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27478           if test ! -s $tmp/subs.edit; then
27479             if test $ac_beg -gt 1; then
27480               ac_end=`expr $ac_end - 1`
27481               continue
27482             fi
27483           fi
27484         fi
27485       fi
27486
27487       if test -z "$ac_sed_cmds"; then
27488         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27489       else
27490         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27491       fi
27492       ac_sed_frag=`expr $ac_sed_frag + 1`
27493       ac_beg=$ac_end
27494       ac_end=`expr $ac_end + $ac_max_sed_lines`
27495     fi
27496   done
27497   if test -z "$ac_sed_cmds"; then
27498     ac_sed_cmds=cat
27499   fi
27500 fi # test -n "$CONFIG_FILES"
27501
27502 EOF
27503 cat >>$CONFIG_STATUS <<\EOF
27504 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27505   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27506   case $ac_file in
27507   - | *:- | *:-:* ) # input from stdin
27508         cat >$tmp/stdin
27509         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27510         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27511   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27512         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27513   * )   ac_file_in=$ac_file.in ;;
27514   esac
27515
27516   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27517   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27518          X"$ac_file" : 'X\(//\)[^/]' \| \
27519          X"$ac_file" : 'X\(//\)$' \| \
27520          X"$ac_file" : 'X\(/\)' \| \
27521          .     : '\(.\)' 2>/dev/null ||
27522 echo X"$ac_file" |
27523     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27524           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27525           /^X\(\/\/\)$/{ s//\1/; q; }
27526           /^X\(\/\).*/{ s//\1/; q; }
27527           s/.*/./; q'`
27528   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27529     { case "$ac_dir" in
27530   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27531   *)                      as_incr_dir=.;;
27532 esac
27533 as_dummy="$ac_dir"
27534 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27535   case $as_mkdir_dir in
27536     # Skip DOS drivespec
27537     ?:) as_incr_dir=$as_mkdir_dir ;;
27538     *)
27539       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27540       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27541     ;;
27542   esac
27543 done; }
27544
27545     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27546     # A "../" for each directory in $ac_dir_suffix.
27547     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27548   else
27549     ac_dir_suffix= ac_dots=
27550   fi
27551
27552   case $srcdir in
27553   .)  ac_srcdir=.
27554       if test -z "$ac_dots"; then
27555          ac_top_srcdir=.
27556       else
27557          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27558       fi ;;
27559   [\\/]* | ?:[\\/]* )
27560       ac_srcdir=$srcdir$ac_dir_suffix;
27561       ac_top_srcdir=$srcdir ;;
27562   *) # Relative path.
27563     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27564     ac_top_srcdir=$ac_dots$srcdir ;;
27565   esac
27566
27567   case $INSTALL in
27568   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27569   *) ac_INSTALL=$ac_dots$INSTALL ;;
27570   esac
27571
27572   if test x"$ac_file" != x-; then
27573     { echo "$as_me:27573: creating $ac_file" >&5
27574 echo "$as_me: creating $ac_file" >&6;}
27575     rm -f "$ac_file"
27576   fi
27577   # Let's still pretend it is `configure' which instantiates (i.e., don't
27578   # use $as_me), people would be surprised to read:
27579   #    /* config.h.  Generated automatically by config.status.  */
27580   configure_input="Generated automatically from `echo $ac_file_in |
27581                                                  sed 's,.*/,,'` by configure."
27582
27583   # First look for the input files in the build tree, otherwise in the
27584   # src tree.
27585   ac_file_inputs=`IFS=:
27586     for f in $ac_file_in; do
27587       case $f in
27588       -) echo $tmp/stdin ;;
27589       [\\/$]*)
27590          # Absolute (can't be DOS-style, as IFS=:)
27591          test -f "$f" || { { echo "$as_me:27591: error: cannot find input file: $f" >&5
27592 echo "$as_me: error: cannot find input file: $f" >&2;}
27593    { (exit 1); exit 1; }; }
27594          echo $f;;
27595       *) # Relative
27596          if test -f "$f"; then
27597            # Build tree
27598            echo $f
27599          elif test -f "$srcdir/$f"; then
27600            # Source tree
27601            echo $srcdir/$f
27602          else
27603            # /dev/null tree
27604            { { echo "$as_me:27604: error: cannot find input file: $f" >&5
27605 echo "$as_me: error: cannot find input file: $f" >&2;}
27606    { (exit 1); exit 1; }; }
27607          fi;;
27608       esac
27609     done` || { (exit 1); exit 1; }
27610 EOF
27611 cat >>$CONFIG_STATUS <<\EOF
27612   ac_warn_datarootdir=no
27613   if test x"$ac_file" != x-; then
27614     for ac_item in $ac_file_inputs
27615     do
27616       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27617       if test -n "$ac_seen"; then
27618         ac_used=`grep '@datarootdir@' $ac_item`
27619         if test -z "$ac_used"; then
27620           { echo "$as_me:27620: WARNING: datarootdir was used implicitly but not set:
27621 $ac_seen" >&5
27622 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27623 $ac_seen" >&2;}
27624           ac_warn_datarootdir=yes
27625         fi
27626       fi
27627       ac_seen=`grep '${datarootdir}' $ac_item`
27628       if test -n "$ac_seen"; then
27629         { echo "$as_me:27629: WARNING: datarootdir was used explicitly but not set:
27630 $ac_seen" >&5
27631 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27632 $ac_seen" >&2;}
27633         ac_warn_datarootdir=yes
27634       fi
27635     done
27636   fi
27637
27638 if test "x$ac_warn_datarootdir" = xyes; then
27639   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27640 fi
27641
27642 EOF
27643 cat >>$CONFIG_STATUS <<EOF
27644   sed "$ac_vpsub
27645 $extrasub
27646 EOF
27647 cat >>$CONFIG_STATUS <<\EOF
27648 :t
27649 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27650 s,@configure_input@,$configure_input,;t t
27651 s,@srcdir@,$ac_srcdir,;t t
27652 s,@top_srcdir@,$ac_top_srcdir,;t t
27653 s,@INSTALL@,$ac_INSTALL,;t t
27654 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27655   rm -f $tmp/stdin
27656   if test x"$ac_file" != x-; then
27657     cp $tmp/out $ac_file
27658
27659     for ac_name in prefix exec_prefix datarootdir
27660     do
27661         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27662         if test -n "$ac_seen"; then
27663             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27664             if test -z "$ac_init"; then
27665               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27666               { echo "$as_me:27666: WARNING: Variable $ac_name is used but was not set:
27667 $ac_seen" >&5
27668 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27669 $ac_seen" >&2;}
27670             fi
27671         fi
27672     done
27673     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27674     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27675     if test -s $tmp/out; then
27676       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27677       { echo "$as_me:27677: WARNING: Some variables may not be substituted:
27678 $ac_seen" >&5
27679 echo "$as_me: WARNING: Some variables may not be substituted:
27680 $ac_seen" >&2;}
27681     fi
27682   else
27683     cat $tmp/out
27684   fi
27685   rm -f $tmp/out
27686
27687 done
27688 EOF
27689 cat >>$CONFIG_STATUS <<\EOF
27690
27691 #
27692 # CONFIG_HEADER section.
27693 #
27694
27695 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27696 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27697 #
27698 # ac_d sets the value in "#define NAME VALUE" lines.
27699 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27700 ac_dB='[        ].*$,\1#\2'
27701 ac_dC=' '
27702 ac_dD=',;t'
27703 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27704 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27705 ac_iB='\([      ]\),\1#\2define\3'
27706 ac_iC=' '
27707 ac_iD='\4,;t'
27708 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27709 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27710 ac_uB='$,\1#\2define\3'
27711 ac_uC=' '
27712 ac_uD=',;t'
27713
27714 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27715   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27716   case $ac_file in
27717   - | *:- | *:-:* ) # input from stdin
27718         cat >$tmp/stdin
27719         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27720         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27721   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27722         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27723   * )   ac_file_in=$ac_file.in ;;
27724   esac
27725
27726   test x"$ac_file" != x- && { echo "$as_me:27726: creating $ac_file" >&5
27727 echo "$as_me: creating $ac_file" >&6;}
27728
27729   # First look for the input files in the build tree, otherwise in the
27730   # src tree.
27731   ac_file_inputs=`IFS=:
27732     for f in $ac_file_in; do
27733       case $f in
27734       -) echo $tmp/stdin ;;
27735       [\\/$]*)
27736          # Absolute (can't be DOS-style, as IFS=:)
27737          test -f "$f" || { { echo "$as_me:27737: error: cannot find input file: $f" >&5
27738 echo "$as_me: error: cannot find input file: $f" >&2;}
27739    { (exit 1); exit 1; }; }
27740          echo $f;;
27741       *) # Relative
27742          if test -f "$f"; then
27743            # Build tree
27744            echo $f
27745          elif test -f "$srcdir/$f"; then
27746            # Source tree
27747            echo $srcdir/$f
27748          else
27749            # /dev/null tree
27750            { { echo "$as_me:27750: error: cannot find input file: $f" >&5
27751 echo "$as_me: error: cannot find input file: $f" >&2;}
27752    { (exit 1); exit 1; }; }
27753          fi;;
27754       esac
27755     done` || { (exit 1); exit 1; }
27756   # Remove the trailing spaces.
27757   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27758
27759 EOF
27760
27761 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27762 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27763 # be either 'cat' or 'sort'.
27764 cat confdefs.h | uniq >conftest.vals
27765
27766 # Break up conftest.vals because some shells have a limit on
27767 # the size of here documents, and old seds have small limits too.
27768
27769 rm -f conftest.tail
27770 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27771 while grep . conftest.vals >/dev/null
27772 do
27773   # Write chunks of a limited-size here document to conftest.frag.
27774   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27775   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27776   echo 'CEOF' >> $CONFIG_STATUS
27777   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27778   rm -f conftest.vals
27779   mv conftest.tail conftest.vals
27780 done
27781 rm -f conftest.vals
27782
27783 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27784 # marker @DEFS@.
27785 echo '  cat >> conftest.edit <<CEOF
27786 /@DEFS@/r conftest.frag
27787 /@DEFS@/d
27788 CEOF
27789 sed -f conftest.edit $tmp/in > $tmp/out
27790 rm -f $tmp/in
27791 mv $tmp/out $tmp/in
27792 rm -f conftest.edit conftest.frag
27793 ' >> $CONFIG_STATUS
27794
27795 cat >>$CONFIG_STATUS <<\EOF
27796   # Let's still pretend it is `configure' which instantiates (i.e., don't
27797   # use $as_me), people would be surprised to read:
27798   #    /* config.h.  Generated automatically by config.status.  */
27799   if test x"$ac_file" = x-; then
27800     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27801   else
27802     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27803   fi
27804   cat $tmp/in >>$tmp/config.h
27805   rm -f $tmp/in
27806   if test x"$ac_file" != x-; then
27807     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27808       { echo "$as_me:27808: $ac_file is unchanged" >&5
27809 echo "$as_me: $ac_file is unchanged" >&6;}
27810     else
27811       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27812          X"$ac_file" : 'X\(//\)[^/]' \| \
27813          X"$ac_file" : 'X\(//\)$' \| \
27814          X"$ac_file" : 'X\(/\)' \| \
27815          .     : '\(.\)' 2>/dev/null ||
27816 echo X"$ac_file" |
27817     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27818           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27819           /^X\(\/\/\)$/{ s//\1/; q; }
27820           /^X\(\/\).*/{ s//\1/; q; }
27821           s/.*/./; q'`
27822       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27823         { case "$ac_dir" in
27824   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27825   *)                      as_incr_dir=.;;
27826 esac
27827 as_dummy="$ac_dir"
27828 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27829   case $as_mkdir_dir in
27830     # Skip DOS drivespec
27831     ?:) as_incr_dir=$as_mkdir_dir ;;
27832     *)
27833       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27834       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27835     ;;
27836   esac
27837 done; }
27838
27839       fi
27840       rm -f $ac_file
27841       mv $tmp/config.h $ac_file
27842     fi
27843   else
27844     cat $tmp/config.h
27845     rm -f $tmp/config.h
27846   fi
27847 done
27848 EOF
27849 cat >>$CONFIG_STATUS <<\EOF
27850 #
27851 # CONFIG_COMMANDS section.
27852 #
27853 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27854   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27855   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27856
27857   case $ac_dest in
27858     default )
27859 if test "x$cf_with_tests" != xno ; then
27860
27861 for cf_dir in test
27862 do
27863         if test ! -d $srcdir/$cf_dir; then
27864                 continue
27865         elif test -f $srcdir/$cf_dir/programs; then
27866                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27867         fi
27868 done
27869
27870 fi
27871
27872 cf_prefix=$LIB_PREFIX
27873
27874 case $cf_cv_shlib_version in
27875 (cygdll|msysdll|mingw|msvcdll)
27876         TINFO_NAME=$TINFO_ARG_SUFFIX
27877         TINFO_SUFFIX=.dll
27878         ;;
27879 esac
27880
27881 if test -n "$TINFO_SUFFIX" ; then
27882         case $TINFO_SUFFIX in
27883         (tw*)
27884                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27885                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27886                 ;;
27887         (t*)
27888                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27889                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27890                 ;;
27891         (w*)
27892                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27893                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
27894                 ;;
27895         esac
27896 fi
27897
27898 for cf_dir in $SRC_SUBDIRS
27899 do
27900         if test ! -d $srcdir/$cf_dir ; then
27901                 continue
27902         elif test -f $srcdir/$cf_dir/modules; then
27903
27904                 SHARED_LIB=
27905                 Libs_To_Make=
27906                 cf_awk_program=
27907                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
27908                 then
27909                         cf_awk_program="$cf_awk_program\
27910 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
27911 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
27912 "
27913                 fi
27914
27915                 if test "x$WILDCARD_SYMS" = xno
27916                 then
27917                         cf_awk_program="$cf_awk_program\
27918 /[      ]_\\*;/ { skip=1; next; }\
27919 "
27920                 fi
27921
27922                 if test "x$cf_awk_program" != "x"
27923                 then
27924                         cat >>$cf_dir/Makefile <<CF_EOF
27925
27926 # Generated by CF_LIB_RULES
27927 resulting.map: $UNALTERED_SYMS
27928         $AWK 'BEGIN { skip = 1; last=""; } \
27929 $cf_awk_program \
27930 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
27931  skip = 0; last = \$\$0; } \
27932 END { print last; }' < $UNALTERED_SYMS >\$@
27933
27934 distclean::
27935         rm -f resulting.map
27936 CF_EOF
27937                 fi
27938
27939                 for cf_item in $cf_LIST_MODELS
27940                 do
27941
27942         case X$cf_item in
27943         (Xlibtool)
27944                 cf_suffix='.la'
27945                 cf_depsuf=$cf_suffix
27946                 ;;
27947         (Xdebug)
27948                 case $cf_cv_system_name in
27949                 (*-msvc*)
27950                         cf_suffix='_g.lib'
27951                         ;;
27952                 (*)
27953                         cf_suffix='_g.a'
27954                         ;;
27955                 esac
27956                 cf_depsuf=$cf_suffix
27957                 ;;
27958         (Xprofile)
27959                 case $cf_cv_system_name in
27960                 (*-msvc*)
27961                         cf_suffix='_p.lib'
27962                         ;;
27963                 (*)
27964                         cf_suffix='_p.a'
27965                         ;;
27966                 esac
27967                 cf_depsuf=$cf_suffix
27968                 ;;
27969         (Xshared)
27970                 case $cf_cv_system_name in
27971                 (aix[5-7]*)
27972                         cf_suffix='.so'
27973                         cf_depsuf=$cf_suffix
27974                         ;;
27975                 (*-msvc*)
27976                         cf_suffix='.dll'
27977                         cf_depsuf='.dll.lib'
27978                         ;;
27979                 (cygwin*|msys*|mingw*)
27980                         cf_suffix='.dll'
27981                         cf_depsuf='.dll.a'
27982                         ;;
27983                 (darwin*)
27984                         cf_suffix='.dylib'
27985                         cf_depsuf=$cf_suffix
27986                         ;;
27987                 (hpux*)
27988                         case $target in
27989                         (ia64*)
27990                                 cf_suffix='.so'
27991                                 cf_depsuf=$cf_suffix
27992                                 ;;
27993                         (*)
27994                                 cf_suffix='.sl'
27995                                 cf_depsuf=$cf_suffix
27996                                 ;;
27997                         esac
27998                         ;;
27999                 (*)
28000                         cf_suffix='.so'
28001                         cf_depsuf=$cf_suffix
28002                         ;;
28003                 esac
28004                 ;;
28005         (*)
28006                 case $target in
28007                 (*-msvc*)
28008                         cf_suffix='.lib'
28009                         ;;
28010                 (*)
28011                         cf_suffix='.a'
28012                         ;;
28013                 esac
28014                 cf_depsuf=$cf_suffix
28015                 ;;
28016         esac
28017         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28018         then
28019                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28020                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28021         fi
28022
28023                         if test "$cf_dir" = "c++"
28024                         then
28025
28026 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28027
28028 eval cf_libname=\$${cf_map_lib_basename}_NAME
28029
28030                         else
28031
28032 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28033
28034 eval cf_libname=\$${cf_map_lib_basename}_NAME
28035
28036                         fi
28037                         test -z "$cf_libname" && cf_libname="$cf_dir"
28038                         if test $cf_item = shared ; then
28039                                 if test -n "${LIB_SUFFIX}"
28040                                 then
28041                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28042                                 else
28043                                         cf_shared_suffix="$cf_suffix"
28044                                 fi
28045                                 if test "$cf_cv_do_symlinks" = yes ; then
28046                                         cf_version_name=
28047
28048                                         case "$cf_cv_shlib_version" in
28049                                         (rel)
28050                                                 cf_version_name=REL_VERSION
28051                                                 ;;
28052                                         (abi)
28053                                                 cf_version_name=ABI_VERSION
28054                                                 ;;
28055                                         esac
28056
28057                                         if test -n "$cf_version_name"
28058                                         then
28059                                                 case "$cf_cv_system_name" in
28060                                                 (darwin*)
28061                                                         # "w", etc?
28062                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28063                                                         ;;
28064                                                 (*)
28065                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28066                                                         ;;
28067                                                 esac
28068                                         fi
28069                                         if test -n "${USE_LIB_SUFFIX}"
28070                                         then
28071                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28072                                         else
28073                                                 cf_shared_suffix="$cf_suffix"
28074                                         fi
28075                                 fi
28076                                 # cygwin needs import library, and has unique naming convention
28077                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28078                                 # use 'cyg' prefix for shared lib.
28079                                 case $cf_cv_shlib_version in
28080                                 (cygdll)
28081                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28082                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28083                                         ;;
28084                                 (msysdll)
28085                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28086                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28087                                         ;;
28088                                 (mingw)
28089                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28090                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28091                                         ;;
28092                                 (msvcdll)
28093                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28094                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28095                                         ;;
28096                                 (*)
28097                                         cf_add_lib=
28098                                         ;;
28099                                 esac
28100                                 if test -n "$cf_add_lib"
28101                                 then
28102                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28103                                         continue
28104                                 fi
28105                         fi
28106                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28107                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28108                 done
28109
28110                 if test $cf_dir = ncurses ; then
28111                         cf_subsets="$LIB_SUBSETS"
28112                         cf_r_parts="$cf_subsets"
28113                         cf_liblist="$Libs_To_Make"
28114
28115                         while test -n "$cf_r_parts"
28116                         do
28117                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28118                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28119                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28120                                         cf_add_lib=
28121                                         case $cf_l_parts in
28122                                         (*termlib*)
28123                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28124                                                 ;;
28125                                         (*ticlib*)
28126                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28127                                                 ;;
28128                                         (*)
28129                                                 break
28130                                                 ;;
28131                                         esac
28132                                         if test -n "$cf_add_lib"; then
28133                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28134                                         fi
28135                                 else
28136                                         break
28137                                 fi
28138                         done
28139                 else
28140                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28141                 fi
28142
28143                 if test $cf_dir = c++; then
28144                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28145                                 cf_list=
28146                                 for cf_item in $Libs_To_Make
28147                                 do
28148                                         case $cf_item in
28149                                         (*.a)
28150                                                 ;;
28151                                         (*)
28152                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28153                                                 ;;
28154                                         esac
28155                                         for cf_test in $cf_list
28156                                         do
28157                                                 if test "$cf_test" = "$cf_item"
28158                                                 then
28159                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28160                                                         cf_item=
28161                                                         break
28162                                                 fi
28163                                         done
28164                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28165                                 done
28166                                 Libs_To_Make="$cf_list"
28167                         fi
28168                 fi
28169
28170                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28171                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28172                         $cf_dir/Makefile >$cf_dir/Makefile.out
28173                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28174
28175                 $AWK -f $srcdir/mk-0th.awk \
28176                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28177                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28178
28179                 for cf_subset in $cf_subsets
28180                 do
28181                         cf_subdirs=
28182                         for cf_item in $cf_LIST_MODELS
28183                         do
28184
28185                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28186
28187 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28188
28189                         CXX_MODEL=$cf_ITEM
28190                         if test "$CXX_MODEL" = SHARED; then
28191                                 case $cf_cv_shlib_version in
28192                                 (cygdll|msysdll|mingw|msvcdll)
28193                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28194
28195 echo "${as_me:-configure}:28195: testing overriding CXX_MODEL to SHARED ..." 1>&5
28196
28197                                         with_shared_cxx=yes
28198                                         ;;
28199                                 (*)
28200                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28201                                         ;;
28202                                 esac
28203                         fi
28204
28205         case X$cf_item in
28206         (Xlibtool)
28207                 cf_suffix='.la'
28208                 cf_depsuf=$cf_suffix
28209                 ;;
28210         (Xdebug)
28211                 case $cf_cv_system_name in
28212                 (*-msvc*)
28213                         cf_suffix='_g.lib'
28214                         ;;
28215                 (*)
28216                         cf_suffix='_g.a'
28217                         ;;
28218                 esac
28219                 cf_depsuf=$cf_suffix
28220                 ;;
28221         (Xprofile)
28222                 case $cf_cv_system_name in
28223                 (*-msvc*)
28224                         cf_suffix='_p.lib'
28225                         ;;
28226                 (*)
28227                         cf_suffix='_p.a'
28228                         ;;
28229                 esac
28230                 cf_depsuf=$cf_suffix
28231                 ;;
28232         (Xshared)
28233                 case $cf_cv_system_name in
28234                 (aix[5-7]*)
28235                         cf_suffix='.so'
28236                         cf_depsuf=$cf_suffix
28237                         ;;
28238                 (*-msvc*)
28239                         cf_suffix='.dll'
28240                         cf_depsuf='.dll.lib'
28241                         ;;
28242                 (cygwin*|msys*|mingw*)
28243                         cf_suffix='.dll'
28244                         cf_depsuf='.dll.a'
28245                         ;;
28246                 (darwin*)
28247                         cf_suffix='.dylib'
28248                         cf_depsuf=$cf_suffix
28249                         ;;
28250                 (hpux*)
28251                         case $target in
28252                         (ia64*)
28253                                 cf_suffix='.so'
28254                                 cf_depsuf=$cf_suffix
28255                                 ;;
28256                         (*)
28257                                 cf_suffix='.sl'
28258                                 cf_depsuf=$cf_suffix
28259                                 ;;
28260                         esac
28261                         ;;
28262                 (*)
28263                         cf_suffix='.so'
28264                         cf_depsuf=$cf_suffix
28265                         ;;
28266                 esac
28267                 ;;
28268         (*)
28269                 case $target in
28270                 (*-msvc*)
28271                         cf_suffix='.lib'
28272                         ;;
28273                 (*)
28274                         cf_suffix='.a'
28275                         ;;
28276                 esac
28277                 cf_depsuf=$cf_suffix
28278                 ;;
28279         esac
28280         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28281         then
28282                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28283                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28284         fi
28285
28286         case $cf_item in
28287         (libtool) cf_subdir='obj_lo'  ;;
28288         (normal)  cf_subdir='objects' ;;
28289         (debug)   cf_subdir='obj_g' ;;
28290         (profile) cf_subdir='obj_p' ;;
28291         (shared)
28292                 case $cf_cv_system_name in
28293                 (cygwin|msys)
28294                         cf_subdir='objects' ;;
28295                 (*)
28296                         cf_subdir='obj_s' ;;
28297                 esac
28298         esac
28299
28300                         # Test for case where we build libtinfo with a different name.
28301                         cf_libname=$cf_dir
28302                         if test $cf_dir = ncurses ; then
28303                                 case $cf_subset in
28304                                 (*base*)
28305                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28306                                         ;;
28307                                 (*termlib*)
28308                                         cf_libname=$TINFO_LIB_SUFFIX
28309                                         ;;
28310                                 (ticlib*)
28311                                         cf_libname=$TICS_LIB_SUFFIX
28312                                         ;;
28313                                 esac
28314                         elif test $cf_dir = c++ ; then
28315
28316 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28317
28318 eval cf_libname=\$${cf_map_lib_basename}_NAME
28319
28320                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28321                         else
28322
28323 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28324
28325 eval cf_libname=\$${cf_map_lib_basename}_NAME
28326
28327                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28328                         fi
28329                         if test -n "${USE_ARG_SUFFIX}" ; then
28330                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28331                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28332                         fi
28333
28334                         # These dependencies really are for development, not
28335                         # builds, but they are useful in porting, too.
28336                         cf_depend="../include/ncurses_cfg.h"
28337                         if test "$srcdir" = "."; then
28338                                 cf_reldir="."
28339                         else
28340                                 cf_reldir="\${srcdir}"
28341                         fi
28342
28343                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28344                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28345                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28346                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28347                         fi
28348
28349                         cf_dir_suffix=
28350                         old_cf_suffix="$cf_suffix"
28351                         if test "$cf_cv_shlib_version_infix" = yes ; then
28352                         if test -n "$USE_LIB_SUFFIX" ; then
28353                                 case $USE_LIB_SUFFIX in
28354                                 (tw*)
28355                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28356                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28357                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28358                                         ;;
28359                                 (t*)
28360                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28361                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28362                                         cf_dir_suffix=t$EXTRA_SUFFIX
28363                                         ;;
28364                                 (w*)
28365                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28366                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28367                                         cf_dir_suffix=w$EXTRA_SUFFIX
28368                                         ;;
28369                                 (*)
28370                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28371                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28372                                         cf_dir_suffix=$EXTRA_SUFFIX
28373                                         ;;
28374                                 esac
28375                         fi
28376                         fi
28377
28378                         $AWK -f $srcdir/mk-1st.awk \
28379                                 name=${cf_libname}${cf_dir_suffix} \
28380                                 traces=$LIB_TRACING \
28381                                 MODEL=$cf_ITEM \
28382                                 CXX_MODEL=$CXX_MODEL \
28383                                 model=$cf_subdir \
28384                                 prefix=$cf_prefix \
28385                                 suffix=$cf_suffix \
28386                                 subset=$cf_subset \
28387                                 driver=$cf_cv_term_driver \
28388                                 SymLink="$LN_S" \
28389                                 TermlibRoot=$TINFO_NAME \
28390                                 TermlibSuffix=$TINFO_SUFFIX \
28391                                 ShlibVer=$cf_cv_shlib_version \
28392                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28393                                 ReLink=${cf_cv_do_relink:-no} \
28394                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28395                                 DoLinks=$cf_cv_do_symlinks \
28396                                 rmSoLocs=$cf_cv_rm_so_locs \
28397                                 ldconfig="$LDCONFIG" \
28398                                 overwrite=$WITH_OVERWRITE \
28399                                 depend="$cf_depend" \
28400                                 host="$host" \
28401                                 libtool_version="$LIBTOOL_VERSION" \
28402                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28403
28404                         cf_suffix="$old_cf_suffix"
28405
28406                         for cf_subdir2 in $cf_subdirs lib
28407                         do
28408                                 test $cf_subdir = $cf_subdir2 && break
28409                         done
28410                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28411                         $AWK -f $srcdir/mk-2nd.awk \
28412                                 name=$cf_dir \
28413                                 traces=$LIB_TRACING \
28414                                 MODEL=$cf_ITEM \
28415                                 model=$cf_subdir \
28416                                 subset=$cf_subset \
28417                                 srcdir=$srcdir \
28418                                 echo=$WITH_ECHO \
28419                                 crenames=$cf_cv_prog_CC_c_o \
28420                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28421                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28422                         cf_subdirs="$cf_subdirs $cf_subdir"
28423                         done
28424                 done
28425         fi
28426
28427         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28428 done
28429
28430 for cf_dir in $SRC_SUBDIRS
28431 do
28432         if test ! -d $srcdir/$cf_dir ; then
28433                 continue
28434         fi
28435
28436         if test -f $cf_dir/Makefile ; then
28437                 case "$cf_dir" in
28438                 (Ada95)
28439                         echo 'libs \' >> Makefile
28440                         echo 'install.libs \' >> Makefile
28441                         echo 'uninstall.libs ::' >> Makefile
28442                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28443                         ;;
28444                 esac
28445         fi
28446
28447         if test -f $srcdir/$cf_dir/modules; then
28448                 echo >> Makefile
28449                 if test -f $srcdir/$cf_dir/headers; then
28450 cat >> Makefile <<CF_EOF
28451 install.includes \\
28452 uninstall.includes \\
28453 CF_EOF
28454                 fi
28455 if test "$cf_dir" != "c++" ; then
28456 echo 'lint \' >> Makefile
28457 fi
28458 cat >> Makefile <<CF_EOF
28459 libs \\
28460 lintlib \\
28461 install.libs \\
28462 uninstall.libs \\
28463 install.$cf_dir \\
28464 uninstall.$cf_dir ::
28465         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28466 CF_EOF
28467         elif test -f $srcdir/$cf_dir/headers; then
28468 cat >> Makefile <<CF_EOF
28469
28470 libs \\
28471 install.libs \\
28472 uninstall.libs \\
28473 install.includes \\
28474 uninstall.includes ::
28475         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28476 CF_EOF
28477 fi
28478 done
28479
28480 if test "x$cf_with_db_install" = xyes; then
28481 cat >> Makefile <<CF_EOF
28482
28483 install.libs uninstall.libs \\
28484 install.data uninstall.data ::
28485 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28486 CF_EOF
28487 else
28488 cat >> Makefile <<CF_EOF
28489
28490 install.libs uninstall.libs ::
28491         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28492 CF_EOF
28493 fi
28494
28495 if test "x$cf_with_manpages" = xyes; then
28496 cat >> Makefile <<CF_EOF
28497
28498 install.man \\
28499 uninstall.man ::
28500         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28501 CF_EOF
28502 fi
28503
28504 cat >> Makefile <<CF_EOF
28505
28506 distclean ::
28507         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28508         rm -f headers.sh headers.sed mk_shared_lib.sh
28509         rm -f edit_man.* man_alias.*
28510         rm -rf \${DIRS_TO_MAKE}
28511 CF_EOF
28512
28513 # Special case: tack's manpage lives in its own directory.
28514 if test "x$cf_with_manpages" = xyes; then
28515 if test "x$cf_with_tack" = "xyes"; then
28516 cat >> Makefile <<CF_EOF
28517
28518 install.man \\
28519 uninstall.man ::
28520         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28521 CF_EOF
28522 fi
28523 fi
28524
28525 rm -f headers.sed headers.sh
28526
28527 echo creating headers.sh
28528 cat >headers.sh <<CF_EOF
28529 #! $SHELL
28530 # This shell script is generated by the 'configure' script.  It is invoked in a
28531 # subdirectory of the build tree.  It generates a sed-script in the parent
28532 # directory that is used to adjust includes for header files that reside in a
28533 # subdirectory of /usr/include, etc.
28534 PRG=""
28535 while test \$# != 3
28536 do
28537 PRG="\$PRG \$1"; shift
28538 done
28539 DST=\$1
28540 REF=\$2
28541 SRC=\$3
28542 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28543 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28544 echo installing \$SRC in \$DST
28545 CF_EOF
28546
28547 if test $WITH_CURSES_H = yes; then
28548         cat >>headers.sh <<CF_EOF
28549 case \$DST in
28550 (/*/include/*)
28551         END=\`basename \$DST\`
28552         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28553         do
28554                 NAME=\`basename \$i\`
28555                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28556         done
28557         ;;
28558 (*)
28559         echo "" >> \$TMPSED
28560         ;;
28561 esac
28562 CF_EOF
28563
28564 else
28565         cat >>headers.sh <<CF_EOF
28566 case \$DST in
28567 (/*/include/*)
28568         END=\`basename \$DST\`
28569         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28570         do
28571                 NAME=\`basename \$i\`
28572                 if test "\$NAME" = "curses.h"
28573                 then
28574                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28575                         NAME=ncurses.h
28576                 fi
28577                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28578         done
28579         ;;
28580 (*)
28581         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28582         ;;
28583 esac
28584 CF_EOF
28585 fi
28586 cat >>headers.sh <<CF_EOF
28587 rm -f \$TMPSRC
28588 sed -f \$TMPSED \$SRC > \$TMPSRC
28589 NAME=\`basename \$SRC\`
28590 CF_EOF
28591 if test $WITH_CURSES_H != yes; then
28592         cat >>headers.sh <<CF_EOF
28593 test "\$NAME" = "curses.h" && NAME=ncurses.h
28594 CF_EOF
28595 fi
28596 cat >>headers.sh <<CF_EOF
28597 # Just in case someone gzip'd manpages, remove the conflicting copy.
28598 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28599
28600 eval \$PRG \$TMPSRC \$DST/\$NAME
28601 rm -f \$TMPSRC \$TMPSED
28602 CF_EOF
28603
28604 chmod 0755 headers.sh
28605
28606 for cf_dir in $SRC_SUBDIRS
28607 do
28608         if test ! -d $srcdir/$cf_dir ; then
28609                 continue
28610         fi
28611
28612         if test -f $srcdir/$cf_dir/headers; then
28613                 $AWK -f $srcdir/mk-hdr.awk \
28614                         subset="$LIB_SUBSETS" \
28615                         compat="$WITH_CURSES_H" \
28616                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28617         fi
28618
28619         if test -f $srcdir/$cf_dir/modules; then
28620                 if test "$cf_dir" != "c++" ; then
28621                         cat >>$cf_dir/Makefile <<"CF_EOF"
28622 depend : ${AUTO_SRC}
28623         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28624
28625 # DO NOT DELETE THIS LINE -- make depend depends on it.
28626 CF_EOF
28627                 fi
28628         fi
28629 done
28630
28631 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28632 if test -z "$USE_OLD_MAKERULES" ; then
28633         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28634 fi
28635 fi
28636  ;;
28637   esac
28638 done
28639 EOF
28640
28641 cat >>$CONFIG_STATUS <<\EOF
28642
28643 { (exit 0); exit 0; }
28644 EOF
28645 chmod +x $CONFIG_STATUS
28646 ac_clean_files=$ac_clean_files_save
28647
28648 # configure is writing to config.log, and then calls config.status.
28649 # config.status does its own redirection, appending to config.log.
28650 # Unfortunately, on DOS this fails, as config.log is still kept open
28651 # by configure, so config.status won't be able to write to it; its
28652 # output is simply discarded.  So we exec the FD to /dev/null,
28653 # effectively closing config.log, so it can be properly (re)opened and
28654 # appended to by config.status.  When coming back to configure, we
28655 # need to make the FD available again.
28656 if test "$no_create" != yes; then
28657   ac_cs_success=:
28658   exec 5>/dev/null
28659   $SHELL $CONFIG_STATUS || ac_cs_success=false
28660   exec 5>>config.log
28661   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28662   # would make configure fail if this is the last instruction.
28663   $ac_cs_success || { (exit 1); exit 1; }
28664 fi
28665 ${MAKE:-make} preinstall