]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20200704
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.709 .
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 if test "$cross_compiling" = yes ; then
4851
4852         # defaults that we might want to override
4853         : ${BUILD_CFLAGS:=''}
4854         : ${BUILD_CPPFLAGS:=''}
4855         : ${BUILD_LDFLAGS:=''}
4856         : ${BUILD_LIBS:=''}
4857         : ${BUILD_EXEEXT:='$x'}
4858         : ${BUILD_OBJEXT:='o'}
4859
4860 # Check whether --with-build-cc or --without-build-cc was given.
4861 if test "${with_build_cc+set}" = set; then
4862   withval="$with_build_cc"
4863   BUILD_CC="$withval"
4864 else
4865   for ac_prog in gcc clang c99 c89 cc cl
4866 do
4867   # Extract the first word of "$ac_prog", so it can be a program name with args.
4868 set dummy $ac_prog; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$BUILD_CC"; then
4875   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_BUILD_CC="$ac_prog"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 BUILD_CC=$ac_cv_prog_BUILD_CC
4891 if test -n "$BUILD_CC"; then
4892   echo "$as_me:4892: result: $BUILD_CC" >&5
4893 echo "${ECHO_T}$BUILD_CC" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899   test -n "$BUILD_CC" && break
4900 done
4901 test -n "$BUILD_CC" || BUILD_CC="none"
4902
4903 fi;
4904         echo "$as_me:4904: checking for native build C compiler" >&5
4905 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4906         echo "$as_me:4906: result: $BUILD_CC" >&5
4907 echo "${ECHO_T}$BUILD_CC" >&6
4908
4909         echo "$as_me:4909: checking for native build C preprocessor" >&5
4910 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4911
4912 # Check whether --with-build-cpp or --without-build-cpp was given.
4913 if test "${with_build_cpp+set}" = set; then
4914   withval="$with_build_cpp"
4915   BUILD_CPP="$withval"
4916 else
4917   BUILD_CPP='${BUILD_CC} -E'
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPP" >&5
4920 echo "${ECHO_T}$BUILD_CPP" >&6
4921
4922         echo "$as_me:4922: checking for native build C flags" >&5
4923 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-cflags or --without-build-cflags was given.
4926 if test "${with_build_cflags+set}" = set; then
4927   withval="$with_build_cflags"
4928   BUILD_CFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_CFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build C preprocessor-flags" >&5
4934 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4935
4936 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4937 if test "${with_build_cppflags+set}" = set; then
4938   withval="$with_build_cppflags"
4939   BUILD_CPPFLAGS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_CPPFLAGS" >&5
4942 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4943
4944         echo "$as_me:4944: checking for native build linker-flags" >&5
4945 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4946
4947 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4948 if test "${with_build_ldflags+set}" = set; then
4949   withval="$with_build_ldflags"
4950   BUILD_LDFLAGS="$withval"
4951 fi;
4952         echo "$as_me:4952: result: $BUILD_LDFLAGS" >&5
4953 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4954
4955         echo "$as_me:4955: checking for native build linker-libraries" >&5
4956 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4957
4958 # Check whether --with-build-libs or --without-build-libs was given.
4959 if test "${with_build_libs+set}" = set; then
4960   withval="$with_build_libs"
4961   BUILD_LIBS="$withval"
4962 fi;
4963         echo "$as_me:4963: result: $BUILD_LIBS" >&5
4964 echo "${ECHO_T}$BUILD_LIBS" >&6
4965
4966         # this assumes we're on Unix.
4967         BUILD_EXEEXT=
4968         BUILD_OBJEXT=o
4969
4970         : ${BUILD_CC:='${CC}'}
4971
4972         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4973                 { { echo "$as_me:4973: error: Cross-build requires two compilers.
4974 Use --with-build-cc to specify the native compiler." >&5
4975 echo "$as_me: error: Cross-build requires two compilers.
4976 Use --with-build-cc to specify the native compiler." >&2;}
4977    { (exit 1); exit 1; }; }
4978         fi
4979
4980 else
4981         : ${BUILD_CC:='${CC}'}
4982         : ${BUILD_CPP:='${CPP}'}
4983         : ${BUILD_CFLAGS:='${CFLAGS}'}
4984         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4985         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4986         : ${BUILD_LIBS:='${LIBS}'}
4987         : ${BUILD_EXEEXT:='$x'}
4988         : ${BUILD_OBJEXT:='o'}
4989 fi
4990
4991 ###############################################################################
4992
4993 ### Options to allow the user to specify the set of libraries which are used.
4994 ### Use "--without-normal --with-shared" to allow the default model to be
4995 ### shared, for example.
4996 cf_list_models=""
4997
4998 echo "$as_me:4998: checking if libtool -version-number should be used" >&5
4999 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5000
5001 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5002 if test "${enable_libtool_version+set}" = set; then
5003   enableval="$enable_libtool_version"
5004   test "$enableval" != no && enableval=yes
5005         if test "$enableval" != "yes" ; then
5006     cf_libtool_version=no
5007         else
5008                 cf_libtool_version=yes
5009         fi
5010 else
5011   enableval=yes
5012         cf_libtool_version=yes
5013
5014 fi;
5015 echo "$as_me:5015: result: $cf_libtool_version" >&5
5016 echo "${ECHO_T}$cf_libtool_version" >&6
5017
5018 if test "$cf_libtool_version" = yes ; then
5019         LIBTOOL_VERSION="-version-number"
5020 else
5021         LIBTOOL_VERSION="-version-info"
5022         case "x$VERSION" in
5023         (x)
5024                 { echo "$as_me:5024: WARNING: VERSION was not set" >&5
5025 echo "$as_me: WARNING: VERSION was not set" >&2;}
5026                 ;;
5027         (x*.*.*)
5028                 ABI_VERSION="$VERSION"
5029                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5030
5031 echo "${as_me:-configure}:5031: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5032
5033                 ;;
5034         (x*:*:*)
5035                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
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         (*)
5042                 { echo "$as_me:5042: WARNING: unexpected VERSION value: $VERSION" >&5
5043 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5044                 ;;
5045         esac
5046 fi
5047
5048 LIBTOOL=
5049
5050 # common library maintenance symbols that are convenient for libtool scripts:
5051 LIB_CREATE='${AR} -cr'
5052 LIB_OBJECT='${OBJECTS}'
5053 LIB_SUFFIX=.a
5054 LIB_PREP="$RANLIB"
5055
5056 # symbols used to prop libtool up to enable it to determine what it should be
5057 # doing:
5058 LIB_CLEAN=
5059 LIB_COMPILE=
5060 LIB_LINK='${CC}'
5061 LIB_INSTALL=
5062 LIB_UNINSTALL=
5063
5064 echo "$as_me:5064: checking if you want to build libraries with libtool" >&5
5065 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5066
5067 # Check whether --with-libtool or --without-libtool was given.
5068 if test "${with_libtool+set}" = set; then
5069   withval="$with_libtool"
5070   with_libtool=$withval
5071 else
5072   with_libtool=no
5073 fi;
5074 echo "$as_me:5074: result: $with_libtool" >&5
5075 echo "${ECHO_T}$with_libtool" >&6
5076 if test "$with_libtool" != "no"; then
5077
5078         if test "$with_libtool" != "yes" ; then
5079
5080 if test "x$prefix" != xNONE; then
5081         cf_path_syntax="$prefix"
5082 else
5083         cf_path_syntax="$ac_default_prefix"
5084 fi
5085
5086 case ".$with_libtool" in
5087 (.\$\(*\)*|.\'*\'*)
5088         ;;
5089 (..|./*|.\\*)
5090         ;;
5091 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5092         ;;
5093 (.\${*prefix}*|.\${*dir}*)
5094         eval with_libtool="$with_libtool"
5095         case ".$with_libtool" in
5096         (.NONE/*)
5097                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5098                 ;;
5099         esac
5100         ;;
5101 (.no|.NONE/*)
5102         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5103         ;;
5104 (*)
5105         { { echo "$as_me:5105: error: expected a pathname, not \"$with_libtool\"" >&5
5106 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5107    { (exit 1); exit 1; }; }
5108         ;;
5109 esac
5110
5111                 LIBTOOL=$with_libtool
5112         else
5113                 if test -n "$ac_tool_prefix"; then
5114   for ac_prog in libtool glibtool
5115   do
5116     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5117 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5118 echo "$as_me:5118: checking for $ac_word" >&5
5119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5120 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5121   echo $ECHO_N "(cached) $ECHO_C" >&6
5122 else
5123   if test -n "$LIBTOOL"; then
5124   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5125 else
5126   ac_save_IFS=$IFS; IFS=$ac_path_separator
5127 ac_dummy="$PATH"
5128 for ac_dir in $ac_dummy; do
5129   IFS=$ac_save_IFS
5130   test -z "$ac_dir" && ac_dir=.
5131   $as_executable_p "$ac_dir/$ac_word" || continue
5132 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5133 echo "$as_me:5133: found $ac_dir/$ac_word" >&5
5134 break
5135 done
5136
5137 fi
5138 fi
5139 LIBTOOL=$ac_cv_prog_LIBTOOL
5140 if test -n "$LIBTOOL"; then
5141   echo "$as_me:5141: result: $LIBTOOL" >&5
5142 echo "${ECHO_T}$LIBTOOL" >&6
5143 else
5144   echo "$as_me:5144: result: no" >&5
5145 echo "${ECHO_T}no" >&6
5146 fi
5147
5148     test -n "$LIBTOOL" && break
5149   done
5150 fi
5151 if test -z "$LIBTOOL"; then
5152   ac_ct_LIBTOOL=$LIBTOOL
5153   for ac_prog in libtool glibtool
5154 do
5155   # Extract the first word of "$ac_prog", so it can be a program name with args.
5156 set dummy $ac_prog; ac_word=$2
5157 echo "$as_me:5157: checking for $ac_word" >&5
5158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5159 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5160   echo $ECHO_N "(cached) $ECHO_C" >&6
5161 else
5162   if test -n "$ac_ct_LIBTOOL"; then
5163   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5164 else
5165   ac_save_IFS=$IFS; IFS=$ac_path_separator
5166 ac_dummy="$PATH"
5167 for ac_dir in $ac_dummy; do
5168   IFS=$ac_save_IFS
5169   test -z "$ac_dir" && ac_dir=.
5170   $as_executable_p "$ac_dir/$ac_word" || continue
5171 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5172 echo "$as_me:5172: found $ac_dir/$ac_word" >&5
5173 break
5174 done
5175
5176 fi
5177 fi
5178 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5179 if test -n "$ac_ct_LIBTOOL"; then
5180   echo "$as_me:5180: result: $ac_ct_LIBTOOL" >&5
5181 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5182 else
5183   echo "$as_me:5183: result: no" >&5
5184 echo "${ECHO_T}no" >&6
5185 fi
5186
5187   test -n "$ac_ct_LIBTOOL" && break
5188 done
5189 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5190
5191   LIBTOOL=$ac_ct_LIBTOOL
5192 fi
5193
5194 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5195 then
5196         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.].*//'`
5197 else
5198         cf_cv_libtool_version=
5199 fi
5200 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5201
5202                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5203                 then
5204
5205 unset ac_cv_prog_ac_ct_LIBTOOL
5206 unset ac_ct_LIBTOOL
5207 unset LIBTOOL
5208
5209                         if test -n "$ac_tool_prefix"; then
5210   for ac_prog in glibtool
5211   do
5212     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$LIBTOOL"; then
5220   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 LIBTOOL=$ac_cv_prog_LIBTOOL
5236 if test -n "$LIBTOOL"; then
5237   echo "$as_me:5237: result: $LIBTOOL" >&5
5238 echo "${ECHO_T}$LIBTOOL" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244     test -n "$LIBTOOL" && break
5245   done
5246 fi
5247 if test -z "$LIBTOOL"; then
5248   ac_ct_LIBTOOL=$LIBTOOL
5249   for ac_prog in glibtool
5250 do
5251   # Extract the first word of "$ac_prog", so it can be a program name with args.
5252 set dummy $ac_prog; ac_word=$2
5253 echo "$as_me:5253: checking for $ac_word" >&5
5254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5255 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   if test -n "$ac_ct_LIBTOOL"; then
5259   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5260 else
5261   ac_save_IFS=$IFS; IFS=$ac_path_separator
5262 ac_dummy="$PATH"
5263 for ac_dir in $ac_dummy; do
5264   IFS=$ac_save_IFS
5265   test -z "$ac_dir" && ac_dir=.
5266   $as_executable_p "$ac_dir/$ac_word" || continue
5267 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5268 echo "$as_me:5268: found $ac_dir/$ac_word" >&5
5269 break
5270 done
5271
5272 fi
5273 fi
5274 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5275 if test -n "$ac_ct_LIBTOOL"; then
5276   echo "$as_me:5276: result: $ac_ct_LIBTOOL" >&5
5277 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5278 else
5279   echo "$as_me:5279: result: no" >&5
5280 echo "${ECHO_T}no" >&6
5281 fi
5282
5283   test -n "$ac_ct_LIBTOOL" && break
5284 done
5285 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5286
5287   LIBTOOL=$ac_ct_LIBTOOL
5288 fi
5289
5290 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5291 then
5292         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.].*//'`
5293 else
5294         cf_cv_libtool_version=
5295 fi
5296 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5297
5298                 fi
5299         fi
5300         if test -z "$LIBTOOL" ; then
5301                 { { echo "$as_me:5301: error: Cannot find libtool" >&5
5302 echo "$as_me: error: Cannot find libtool" >&2;}
5303    { (exit 1); exit 1; }; }
5304         fi
5305         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5306         LIB_OBJECT='${OBJECTS:.o=.lo}'
5307         LIB_SUFFIX=.la
5308         LIB_CLEAN='${LIBTOOL} --mode=clean'
5309         LIB_COMPILE='${LIBTOOL} --mode=compile'
5310         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5311         LIB_INSTALL='${LIBTOOL} --mode=install'
5312         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5313         LIB_PREP=:
5314
5315 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5316 then
5317         echo "$as_me:5317: checking version of $LIBTOOL" >&5
5318 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5319
5320 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5321 then
5322         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.].*//'`
5323 else
5324         cf_cv_libtool_version=
5325 fi
5326 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5327
5328         echo "$as_me:5328: result: $cf_cv_libtool_version" >&5
5329 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5330         if test -z "$cf_cv_libtool_version" ; then
5331                 { { echo "$as_me:5331: error: This is not GNU libtool" >&5
5332 echo "$as_me: error: This is not GNU libtool" >&2;}
5333    { (exit 1); exit 1; }; }
5334         fi
5335 else
5336         { { echo "$as_me:5336: error: GNU libtool has not been found" >&5
5337 echo "$as_me: error: GNU libtool has not been found" >&2;}
5338    { (exit 1); exit 1; }; }
5339 fi
5340
5341         # special hack to add -no-undefined (which libtool should do for itself)
5342         LT_UNDEF=
5343         case "$cf_cv_system_name" in
5344         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5345                 LT_UNDEF=-no-undefined
5346                 ;;
5347         esac
5348
5349         # special hack to add --tag option for C++ compiler
5350         case $cf_cv_libtool_version in
5351         (1.[5-9]*|[2-9].[0-9.a-z]*)
5352                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5353                 LIBTOOL="$LIBTOOL --tag=CC"
5354                 ;;
5355         (*)
5356                 LIBTOOL_CXX="$LIBTOOL"
5357                 ;;
5358         esac
5359 else
5360         LIBTOOL=""
5361         LIBTOOL_CXX=""
5362 fi
5363
5364 test -z "$LIBTOOL" && ECHO_LT=
5365
5366 if test "$with_libtool" != "no" ; then
5367
5368 cf_list_models="$cf_list_models libtool"
5369
5370 else
5371
5372 echo "$as_me:5372: checking if you want to build shared libraries" >&5
5373 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5374
5375 # Check whether --with-shared or --without-shared was given.
5376 if test "${with_shared+set}" = set; then
5377   withval="$with_shared"
5378   with_shared=$withval
5379 else
5380   with_shared=no
5381 fi;
5382 echo "$as_me:5382: result: $with_shared" >&5
5383 echo "${ECHO_T}$with_shared" >&6
5384 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5385
5386 echo "$as_me:5386: checking if you want to build static libraries" >&5
5387 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5388
5389 # Check whether --with-normal or --without-normal was given.
5390 if test "${with_normal+set}" = set; then
5391   withval="$with_normal"
5392   with_normal=$withval
5393 else
5394   with_normal=yes
5395 fi;
5396 echo "$as_me:5396: result: $with_normal" >&5
5397 echo "${ECHO_T}$with_normal" >&6
5398 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5399
5400 echo "$as_me:5400: checking if you want to build debug libraries" >&5
5401 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5402
5403 # Check whether --with-debug or --without-debug was given.
5404 if test "${with_debug+set}" = set; then
5405   withval="$with_debug"
5406   with_debug=$withval
5407 else
5408   with_debug=yes
5409 fi;
5410 echo "$as_me:5410: result: $with_debug" >&5
5411 echo "${ECHO_T}$with_debug" >&6
5412 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5413
5414 echo "$as_me:5414: checking if you want to build profiling libraries" >&5
5415 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5416
5417 # Check whether --with-profile or --without-profile was given.
5418 if test "${with_profile+set}" = set; then
5419   withval="$with_profile"
5420   with_profile=$withval
5421 else
5422   with_profile=no
5423 fi;
5424 echo "$as_me:5424: result: $with_profile" >&5
5425 echo "${ECHO_T}$with_profile" >&6
5426 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5427
5428 fi
5429
5430 if test "X$cf_with_cxx_binding" != Xno; then
5431 if test "x$with_shared" = "xyes"; then
5432 echo "$as_me:5432: checking if you want to build C++ shared libraries" >&5
5433 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5434
5435 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5436 if test "${with_cxx_shared+set}" = set; then
5437   withval="$with_cxx_shared"
5438   with_shared_cxx=$withval
5439 else
5440   with_shared_cxx=no
5441 fi;
5442 echo "$as_me:5442: result: $with_shared_cxx" >&5
5443 echo "${ECHO_T}$with_shared_cxx" >&6
5444 fi
5445 fi
5446
5447 ###############################################################################
5448
5449 echo "$as_me:5449: checking for specified models" >&5
5450 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5451 test -z "$cf_list_models" && cf_list_models=normal
5452 test "$with_libtool" != "no" && cf_list_models=libtool
5453 echo "$as_me:5453: result: $cf_list_models" >&5
5454 echo "${ECHO_T}$cf_list_models" >&6
5455
5456 ### Use the first model as the default, and save its suffix for use in building
5457 ### up test-applications.
5458 echo "$as_me:5458: checking for default model" >&5
5459 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5460 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5461 echo "$as_me:5461: result: $DFT_LWR_MODEL" >&5
5462 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5463
5464 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5465
5466 TICS_NAME=tic
5467
5468 TINFO_NAME=tinfo
5469
5470 LIB_NAME=ncurses
5471
5472 LIB_DIR=../lib
5473 LIB_2ND=../../lib
5474
5475 echo "$as_me:5475: checking if you want to have a library-prefix" >&5
5476 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5477
5478 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5479 if test "${with_lib_prefix+set}" = set; then
5480   withval="$with_lib_prefix"
5481   with_lib_prefix=$withval
5482 else
5483   with_lib_prefix=auto
5484 fi;
5485 echo "$as_me:5485: result: $with_lib_prefix" >&5
5486 echo "${ECHO_T}$with_lib_prefix" >&6
5487
5488 if test $with_lib_prefix = auto
5489 then
5490
5491         case $cf_cv_system_name in
5492         (OS/2*|os2*)
5493                 if test "$DFT_LWR_MODEL" = libtool; then
5494                         LIB_PREFIX='lib'
5495                 else
5496                         LIB_PREFIX=''
5497                 fi
5498                 ;;
5499         (*-msvc*)
5500                 LIB_PREFIX=''
5501                 ;;
5502         (*)     LIB_PREFIX='lib'
5503                 ;;
5504         esac
5505 cf_prefix=$LIB_PREFIX
5506
5507 elif test $with_lib_prefix = no
5508 then
5509         LIB_PREFIX=
5510 else
5511         LIB_PREFIX=$with_lib_prefix
5512 fi
5513
5514 LIB_SUFFIX=
5515
5516         echo "$as_me:5516: checking for PATH separator" >&5
5517 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5518         case $cf_cv_system_name in
5519         (os2*)  PATH_SEPARATOR=';'  ;;
5520         (*)     ${PATH_SEPARATOR:=':'}  ;;
5521         esac
5522
5523         echo "$as_me:5523: result: $PATH_SEPARATOR" >&5
5524 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5525
5526 ###############################################################################
5527
5528 echo "$as_me:5528: checking if you want to build a separate terminfo library" >&5
5529 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5530
5531 # Check whether --with-termlib or --without-termlib was given.
5532 if test "${with_termlib+set}" = set; then
5533   withval="$with_termlib"
5534   with_termlib=$withval
5535 else
5536   with_termlib=no
5537 fi;
5538 echo "$as_me:5538: result: $with_termlib" >&5
5539 echo "${ECHO_T}$with_termlib" >&6
5540
5541 echo "$as_me:5541: checking if you want to build a separate tic library" >&5
5542 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5543
5544 # Check whether --with-ticlib or --without-ticlib was given.
5545 if test "${with_ticlib+set}" = set; then
5546   withval="$with_ticlib"
5547   with_ticlib=$withval
5548 else
5549   with_ticlib=no
5550 fi;
5551 echo "$as_me:5551: result: $with_ticlib" >&5
5552 echo "${ECHO_T}$with_ticlib" >&6
5553
5554 if test X"$CC_G_OPT" = X"" ; then
5555         CC_G_OPT='-g'
5556         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5557 fi
5558
5559 if test X"$CXX_G_OPT" = X"" ; then
5560         CXX_G_OPT='-g'
5561         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5562 fi
5563
5564 echo "$as_me:5564: checking for default loader flags" >&5
5565 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5566 case $DFT_LWR_MODEL in
5567 (libtool) LD_MODEL=''   ;;
5568 (normal)  LD_MODEL=''   ;;
5569 (debug)   LD_MODEL=$CC_G_OPT ;;
5570 (profile) LD_MODEL='-pg';;
5571 (shared)  LD_MODEL=''   ;;
5572 esac
5573 echo "$as_me:5573: result: $LD_MODEL" >&5
5574 echo "${ECHO_T}$LD_MODEL" >&6
5575
5576 case $DFT_LWR_MODEL in
5577 (shared)
5578
5579 echo "$as_me:5579: checking if rpath option should be used" >&5
5580 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5581
5582 # Check whether --enable-rpath or --disable-rpath was given.
5583 if test "${enable_rpath+set}" = set; then
5584   enableval="$enable_rpath"
5585   cf_cv_enable_rpath=$enableval
5586 else
5587   cf_cv_enable_rpath=no
5588 fi;
5589 echo "$as_me:5589: result: $cf_cv_enable_rpath" >&5
5590 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5591
5592 echo "$as_me:5592: checking if shared libraries should be relinked during install" >&5
5593 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5594
5595 # Check whether --enable-relink or --disable-relink was given.
5596 if test "${enable_relink+set}" = set; then
5597   enableval="$enable_relink"
5598   cf_cv_do_relink=$enableval
5599 else
5600   cf_cv_do_relink=yes
5601 fi;
5602 echo "$as_me:5602: result: $cf_cv_do_relink" >&5
5603 echo "${ECHO_T}$cf_cv_do_relink" >&6
5604         ;;
5605 esac
5606
5607 # we will build libraries one-level down.
5608 rel_builddir=..
5609
5610 LD_RPATH_OPT=
5611 if test "x$cf_cv_enable_rpath" != xno
5612 then
5613         echo "$as_me:5613: checking for an rpath option" >&5
5614 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5615         case $cf_cv_system_name in
5616         (irix*)
5617                 if test "$GCC" = yes; then
5618                         LD_RPATH_OPT="-Wl,-rpath,"
5619                 else
5620                         LD_RPATH_OPT="-rpath "
5621                 fi
5622                 ;;
5623         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5624                 LD_RPATH_OPT="-Wl,-rpath,"
5625                 ;;
5626         (openbsd[2-9].*|mirbsd*)
5627                 LD_RPATH_OPT="-Wl,-rpath,"
5628                 ;;
5629         (dragonfly*)
5630                 LD_RPATH_OPT="-rpath "
5631                 ;;
5632         (netbsd*)
5633                 LD_RPATH_OPT="-Wl,-rpath,"
5634                 ;;
5635         (osf*|mls+*)
5636                 LD_RPATH_OPT="-rpath "
5637                 ;;
5638         (solaris2*)
5639                 LD_RPATH_OPT="-R"
5640                 ;;
5641         (*)
5642                 ;;
5643         esac
5644         echo "$as_me:5644: result: $LD_RPATH_OPT" >&5
5645 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5646
5647         case "x$LD_RPATH_OPT" in
5648         (x-R*)
5649                 echo "$as_me:5649: checking if we need a space after rpath option" >&5
5650 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5651                 cf_save_LIBS="$LIBS"
5652
5653 cf_add_libs="$LIBS"
5654 # reverse order
5655 cf_add_0lib=
5656 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5657 # filter duplicates
5658 for cf_add_1lib in $cf_add_0lib; do
5659         for cf_add_2lib in $cf_add_libs; do
5660                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5661                         cf_add_1lib=
5662                         break
5663                 fi
5664         done
5665         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5666 done
5667 LIBS="$cf_add_libs"
5668
5669                 cat >conftest.$ac_ext <<_ACEOF
5670 #line 5670 "configure"
5671 #include "confdefs.h"
5672
5673 int
5674 main (void)
5675 {
5676
5677   ;
5678   return 0;
5679 }
5680 _ACEOF
5681 rm -f conftest.$ac_objext conftest$ac_exeext
5682 if { (eval echo "$as_me:5682: \"$ac_link\"") >&5
5683   (eval $ac_link) 2>&5
5684   ac_status=$?
5685   echo "$as_me:5685: \$? = $ac_status" >&5
5686   (exit $ac_status); } &&
5687          { ac_try='test -s conftest$ac_exeext'
5688   { (eval echo "$as_me:5688: \"$ac_try\"") >&5
5689   (eval $ac_try) 2>&5
5690   ac_status=$?
5691   echo "$as_me:5691: \$? = $ac_status" >&5
5692   (exit $ac_status); }; }; then
5693   cf_rpath_space=no
5694 else
5695   echo "$as_me: failed program was:" >&5
5696 cat conftest.$ac_ext >&5
5697 cf_rpath_space=yes
5698 fi
5699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5700                 LIBS="$cf_save_LIBS"
5701                 echo "$as_me:5701: result: $cf_rpath_space" >&5
5702 echo "${ECHO_T}$cf_rpath_space" >&6
5703                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5704                 ;;
5705         esac
5706 fi
5707
5708         RM_SHARED_OPTS=
5709         LOCAL_LDFLAGS=
5710         LOCAL_LDFLAGS2=
5711         LD_SHARED_OPTS=
5712         INSTALL_LIB="-m 644"
5713         : ${rel_builddir:=.}
5714
5715         shlibdir=$libdir
5716
5717         MAKE_DLLS="#"
5718
5719         cf_cv_do_symlinks=no
5720         cf_ld_rpath_opt=
5721         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5722
5723         echo "$as_me:5723: checking if release/abi version should be used for shared libs" >&5
5724 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5725
5726 # Check whether --with-shlib-version or --without-shlib-version was given.
5727 if test "${with_shlib_version+set}" = set; then
5728   withval="$with_shlib_version"
5729   test -z "$withval" && withval=auto
5730         case $withval in
5731         (yes)
5732                 cf_cv_shlib_version=auto
5733                 ;;
5734         (rel|abi|auto)
5735                 cf_cv_shlib_version=$withval
5736                 ;;
5737         (*)
5738                 echo "$as_me:5738: result: $withval" >&5
5739 echo "${ECHO_T}$withval" >&6
5740                 { { echo "$as_me:5740: error: option value must be one of: rel, abi, or auto" >&5
5741 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5742    { (exit 1); exit 1; }; }
5743                 ;;
5744         esac
5745
5746 else
5747   cf_cv_shlib_version=auto
5748 fi;
5749         echo "$as_me:5749: result: $cf_cv_shlib_version" >&5
5750 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5751
5752         cf_cv_rm_so_locs=no
5753         cf_try_cflags=
5754
5755         # Some less-capable ports of gcc support only -fpic
5756         CC_SHARED_OPTS=
5757
5758         cf_try_fPIC=no
5759         if test "$GCC" = yes
5760         then
5761                 cf_try_fPIC=yes
5762         else
5763                 case $cf_cv_system_name in
5764                 (*linux*)       # e.g., PGI compiler
5765                         cf_try_fPIC=yes
5766                         ;;
5767                 esac
5768         fi
5769
5770         if test "$cf_try_fPIC" = yes
5771         then
5772                 echo "$as_me:5772: checking which $CC option to use" >&5
5773 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5774                 cf_save_CFLAGS="$CFLAGS"
5775                 for CC_SHARED_OPTS in -fPIC -fpic ''
5776                 do
5777                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5778                         cat >conftest.$ac_ext <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781 #include <stdio.h>
5782 int
5783 main (void)
5784 {
5785 int x = 1
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 rm -f conftest.$ac_objext
5791 if { (eval echo "$as_me:5791: \"$ac_compile\"") >&5
5792   (eval $ac_compile) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); } &&
5796          { ac_try='test -s conftest.$ac_objext'
5797   { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:5800: \$? = $ac_status" >&5
5801   (exit $ac_status); }; }; then
5802   break
5803 else
5804   echo "$as_me: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5806 fi
5807 rm -f conftest.$ac_objext conftest.$ac_ext
5808                 done
5809                 echo "$as_me:5809: result: $CC_SHARED_OPTS" >&5
5810 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5811                 CFLAGS="$cf_save_CFLAGS"
5812         fi
5813
5814         cf_cv_shlib_version_infix=no
5815
5816         case $cf_cv_system_name in
5817         (aix4.3-9*|aix[5-7]*)
5818                 if test "$GCC" = yes; then
5819                         CC_SHARED_OPTS='-Wl,-brtl'
5820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5821                 else
5822                         CC_SHARED_OPTS='-brtl'
5823                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5824                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5825                 fi
5826                 ;;
5827         (beos*)
5828                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5829                 ;;
5830         (cygwin*)
5831                 CC_SHARED_OPTS=
5832                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5833                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5834                 cf_cv_shlib_version=cygdll
5835                 cf_cv_shlib_version_infix=cygdll
5836                 shlibdir=$bindir
5837                 MAKE_DLLS=
5838                 cat >mk_shared_lib.sh <<-CF_EOF
5839                 #!$SHELL
5840                 SHARED_LIB=\$1
5841                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5842                 shift
5843                 cat <<-EOF
5844                 Linking shared library
5845                 ** SHARED_LIB \$SHARED_LIB
5846                 ** IMPORT_LIB \$IMPORT_LIB
5847 EOF
5848                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5849 CF_EOF
5850                 chmod +x mk_shared_lib.sh
5851                 ;;
5852         (msys*)
5853                 CC_SHARED_OPTS=
5854                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5855                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5856                 cf_cv_shlib_version=msysdll
5857                 cf_cv_shlib_version_infix=msysdll
5858                 shlibdir=$bindir
5859                 MAKE_DLLS=
5860                 cat >mk_shared_lib.sh <<-CF_EOF
5861                 #!$SHELL
5862                 SHARED_LIB=\$1
5863                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5864                 shift
5865                 cat <<-EOF
5866                 Linking shared library
5867                 ** SHARED_LIB \$SHARED_LIB
5868                 ** IMPORT_LIB \$IMPORT_LIB
5869 EOF
5870                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5871 CF_EOF
5872                 chmod +x mk_shared_lib.sh
5873                 ;;
5874         (darwin*)
5875                 cf_try_cflags="no-cpp-precomp"
5876                 CC_SHARED_OPTS="-dynamic"
5877                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5878                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5879                 cf_cv_shlib_version_infix=yes
5880                 echo "$as_me:5880: checking if ld -search_paths_first works" >&5
5881 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5882 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5883   echo $ECHO_N "(cached) $ECHO_C" >&6
5884 else
5885
5886                         cf_save_LDFLAGS=$LDFLAGS
5887                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5888                         cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891
5892 int
5893 main (void)
5894 {
5895 int i;
5896   ;
5897   return 0;
5898 }
5899 _ACEOF
5900 rm -f conftest.$ac_objext conftest$ac_exeext
5901 if { (eval echo "$as_me:5901: \"$ac_link\"") >&5
5902   (eval $ac_link) 2>&5
5903   ac_status=$?
5904   echo "$as_me:5904: \$? = $ac_status" >&5
5905   (exit $ac_status); } &&
5906          { ac_try='test -s conftest$ac_exeext'
5907   { (eval echo "$as_me:5907: \"$ac_try\"") >&5
5908   (eval $ac_try) 2>&5
5909   ac_status=$?
5910   echo "$as_me:5910: \$? = $ac_status" >&5
5911   (exit $ac_status); }; }; then
5912   cf_cv_ldflags_search_paths_first=yes
5913 else
5914   echo "$as_me: failed program was:" >&5
5915 cat conftest.$ac_ext >&5
5916 cf_cv_ldflags_search_paths_first=no
5917 fi
5918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5919                                 LDFLAGS=$cf_save_LDFLAGS
5920 fi
5921 echo "$as_me:5921: result: $cf_cv_ldflags_search_paths_first" >&5
5922 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5923                 if test $cf_cv_ldflags_search_paths_first = yes; then
5924                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5925                 fi
5926                 ;;
5927         (hpux[7-8]*)
5928                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5929                 if test "$GCC" != yes; then
5930                         CC_SHARED_OPTS='+Z'
5931                 fi
5932                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5933                 INSTALL_LIB="-m 555"
5934                 ;;
5935         (hpux*)
5936                 # (tested with gcc 2.7.2 -- I don't have c89)
5937                 if test "$GCC" = yes; then
5938                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5939                 else
5940                         CC_SHARED_OPTS='+Z'
5941                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5942                 fi
5943                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5944                 # HP-UX shared libraries must be executable, and should be
5945                 # readonly to exploit a quirk in the memory manager.
5946                 INSTALL_LIB="-m 555"
5947                 ;;
5948         (interix*)
5949                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5950                 if test "$cf_cv_shlib_version" = rel; then
5951                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5952                 else
5953                         cf_shared_soname='`basename $@`'
5954                 fi
5955                 CC_SHARED_OPTS=
5956                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5957                 ;;
5958         (irix*)
5959                 if test "$cf_cv_enable_rpath" = yes ; then
5960                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5961                 fi
5962                 # tested with IRIX 5.2 and 'cc'.
5963                 if test "$GCC" != yes; then
5964                         CC_SHARED_OPTS='-KPIC'
5965                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5966                 else
5967                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5968                 fi
5969                 cf_cv_rm_so_locs=yes
5970                 ;;
5971         (linux*|gnu*|k*bsd*-gnu)
5972                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5973                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5974                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5975                 fi
5976                 if test "$cf_cv_enable_rpath" = yes ; then
5977                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5978                 fi
5979
5980         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5981         if test "$cf_cv_shlib_version" = rel; then
5982                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5983         else
5984                 cf_cv_shared_soname='`basename $@`'
5985         fi
5986
5987                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5988                 ;;
5989         (mingw*msvc*)
5990                 cf_cv_shlib_version=msvcdll
5991                 cf_cv_shlib_version_infix=msvcdll
5992                 shlibdir=$bindir
5993                 MAKE_DLLS=
5994                 if test "$DFT_LWR_MODEL" = "shared" ; then
5995                         LOCAL_LDFLAGS="-link -dll"
5996                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5997                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5998                 fi
5999                 CC_SHARED_OPTS=
6000                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6001                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6002                 cat >mk_shared_lib.sh <<-CF_EOF
6003                 #!$SHELL
6004                 SHARED_LIB=\$1
6005                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6006                 shift
6007                 my_ld=\$1
6008                 shift
6009                 cat <<-EOF
6010                 Linking shared library
6011                 ** SHARED LIB \$SHARED_LIB
6012                 ** IMPORT_LIB \$IMPORT_LIB
6013 EOF
6014                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6015                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6016                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6017 CF_EOF
6018                 chmod +x mk_shared_lib.sh
6019                 cat >mk_prog.sh <<-CF_EOF
6020                 #!$SHELL
6021                 shift
6022                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6023                 LD="$LD"
6024                 clopts=()
6025                 ldopts=()
6026                 libs=()
6027                 isdll=0
6028                 while test \$# -gt 0; do
6029                         case "\$1" in
6030                                 -link)
6031                                         # ignore -link argument
6032                                         ;;
6033                                 -dll)
6034                                         isdll=1
6035                                         ;;
6036                                 -W* | -w*)
6037                                         # ignore warnings
6038                                         ;;
6039                                 -D*)
6040                                         clopts+=("\$1")
6041                                         ;;
6042                                 -I*)
6043                                         clopts+=("\$1")
6044                                         ;;
6045                                 -l*)
6046                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6047                                         ;;
6048                                 -L*)
6049                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6050                                         ;;
6051                                 *.obj | *.o)
6052                                         ldopts+=("\$1")
6053                                         ;;
6054                                 -Wl,*)
6055                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6056                                                 ldopts+=("\${linkarg}")
6057                                         done
6058                                         ;;
6059                                 *.lib)
6060                                         ldopts+=("\$1")
6061                                         ;;
6062                                 -o)
6063                                         shift
6064                                         ldopts+=("-out:\$1")
6065                                         ;;
6066                                 *)
6067                                         clopts+=("\$1")
6068                                         ldopts+=("\$1")
6069                                         ;;
6070                         esac
6071                         shift
6072                 done
6073                 if [ "\$isdll" -ne 0 ]; then
6074                         for lib in \${libs[*]}; do
6075                                 ldopts+=("\$lib.dll.lib")
6076                         done
6077                 else
6078                         for lib in \${libs[*]}; do
6079                                 ldopts+=("\$lib.lib")
6080                         done
6081                 fi
6082                 cat <<-EOF
6083                 Creating program
6084                 ** ld options:   "\${ldopts[@]}"
6085 EOF
6086                 exec \$LD \${ldopts[@]}
6087 CF_EOF
6088                 chmod +x mk_prog.sh
6089                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6090                 ;;
6091         (mingw*)
6092                 cf_cv_shlib_version=mingw
6093                 cf_cv_shlib_version_infix=mingw
6094                 shlibdir=$bindir
6095                 MAKE_DLLS=
6096                 if test "$DFT_LWR_MODEL" = "shared" ; then
6097                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6098                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6099                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6100                 fi
6101                 CC_SHARED_OPTS=
6102                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6103                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6104                 cat >mk_shared_lib.sh <<-CF_EOF
6105                 #!$SHELL
6106                 SHARED_LIB=\$1
6107                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6108                 shift
6109                 cat <<-EOF
6110                 Linking shared library
6111                 ** SHARED_LIB \$SHARED_LIB
6112                 ** IMPORT_LIB \$IMPORT_LIB
6113 EOF
6114                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6115 CF_EOF
6116                 chmod +x mk_shared_lib.sh
6117                 ;;
6118         (openbsd[2-9].*|mirbsd*)
6119                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6120                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6121                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6122                 fi
6123                 if test "$cf_cv_enable_rpath" = yes ; then
6124                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6125                 fi
6126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6127
6128         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6129         if test "$cf_cv_shlib_version" = rel; then
6130                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6131         else
6132                 cf_cv_shared_soname='`basename $@`'
6133         fi
6134
6135                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6136                 ;;
6137         (nto-qnx*|openbsd*|freebsd[12].*)
6138                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6139                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6140                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141                 ;;
6142         (dragonfly*|freebsd*)
6143                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6144                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6145                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6146                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6147                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6148                 fi
6149
6150         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6151         if test "$cf_cv_shlib_version" = rel; then
6152                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6153         else
6154                 cf_cv_shared_soname='`basename $@`'
6155         fi
6156
6157                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6158                 ;;
6159         (netbsd*)
6160                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6161                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6162                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6163                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6164                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6165                         if test "$cf_cv_shlib_version" = auto; then
6166                         if test -f /usr/libexec/ld.elf_so; then
6167                                 cf_cv_shlib_version=abi
6168                         else
6169                                 cf_cv_shlib_version=rel
6170                         fi
6171                         fi
6172
6173         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6174         if test "$cf_cv_shlib_version" = rel; then
6175                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6176         else
6177                 cf_cv_shared_soname='`basename $@`'
6178         fi
6179
6180                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6181                 else
6182                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6183                 fi
6184                 ;;
6185         (osf*|mls+*)
6186                 # tested with OSF/1 V3.2 and 'cc'
6187                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6188                 # link with shared libs).
6189                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6190                 case $host_os in
6191                 (osf4*)
6192                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6193                         ;;
6194                 esac
6195                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6196                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6197                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6198                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6199                 fi
6200                 cf_cv_rm_so_locs=yes
6201                 ;;
6202         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6203                 # tested with osr5.0.5
6204                 if test "$GCC" != yes; then
6205                         CC_SHARED_OPTS='-belf -KPIC'
6206                 fi
6207                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6208                 if test "$cf_cv_enable_rpath" = yes ; then
6209                         # only way is to set LD_RUN_PATH but no switch for it
6210                         RUN_PATH=$libdir
6211                 fi
6212                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6213                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6214                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6215                 ;;
6216         (sunos4*)
6217                 # tested with SunOS 4.1.1 and gcc 2.7.0
6218                 if test "$GCC" != yes; then
6219                         CC_SHARED_OPTS='-KPIC'
6220                 fi
6221                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6222                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6223                 ;;
6224         (solaris2*)
6225                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6226                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6227                 if test "$DFT_LWR_MODEL" = "shared" ; then
6228                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6229                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6230                 fi
6231                 if test "$cf_cv_enable_rpath" = yes ; then
6232                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6233                 fi
6234
6235         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6236         if test "$cf_cv_shlib_version" = rel; then
6237                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6238         else
6239                 cf_cv_shared_soname='`basename $@`'
6240         fi
6241
6242                 if test "$GCC" != yes; then
6243                         cf_save_CFLAGS="$CFLAGS"
6244                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6245                         do
6246                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6247                                 cat >conftest.$ac_ext <<_ACEOF
6248 #line 6248 "configure"
6249 #include "confdefs.h"
6250 #include <stdio.h>
6251 int
6252 main (void)
6253 {
6254 printf("Hello\n");
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f conftest.$ac_objext
6260 if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
6261   (eval $ac_compile) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit $ac_status); } &&
6265          { ac_try='test -s conftest.$ac_objext'
6266   { (eval echo "$as_me:6266: \"$ac_try\"") >&5
6267   (eval $ac_try) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit $ac_status); }; }; then
6271   break
6272 else
6273   echo "$as_me: failed program was:" >&5
6274 cat conftest.$ac_ext >&5
6275 fi
6276 rm -f conftest.$ac_objext conftest.$ac_ext
6277                         done
6278                         CFLAGS="$cf_save_CFLAGS"
6279                         CC_SHARED_OPTS=$cf_shared_opts
6280                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6281                 else
6282                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6283                 fi
6284                 ;;
6285         (sysv5uw7*|unix_sv*)
6286                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6287                 if test "$GCC" != yes; then
6288                         CC_SHARED_OPTS='-KPIC'
6289                 fi
6290                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6291                 ;;
6292         (*)
6293                 CC_SHARED_OPTS='unknown'
6294                 MK_SHARED_LIB='echo unknown'
6295                 ;;
6296         esac
6297
6298         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6299         case "$cf_cv_shlib_version" in
6300         (rel|abi)
6301                 case "$MK_SHARED_LIB" in
6302                 (*'-o $@')
6303                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6304                         ;;
6305                 (*)
6306                         { echo "$as_me:6306: WARNING: ignored --with-shlib-version" >&5
6307 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6308                         ;;
6309                 esac
6310                 ;;
6311         esac
6312
6313         if test -n "$cf_try_cflags"
6314         then
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6316 "${as_me:-configure}"
6317 #include <stdio.h>
6318 int main(int argc, char *argv[])
6319 {
6320         printf("hello\n");
6321         return (argv[argc-1] == 0) ;
6322 }
6323 EOF
6324                 cf_save_CFLAGS="$CFLAGS"
6325                 for cf_opt in $cf_try_cflags
6326                 do
6327                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6328                         echo "$as_me:6328: checking if CFLAGS option -$cf_opt works" >&5
6329 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6330                         if { (eval echo "$as_me:6330: \"$ac_compile\"") >&5
6331   (eval $ac_compile) 2>&5
6332   ac_status=$?
6333   echo "$as_me:6333: \$? = $ac_status" >&5
6334   (exit $ac_status); }; then
6335                                 echo "$as_me:6335: result: yes" >&5
6336 echo "${ECHO_T}yes" >&6
6337                                 cf_save_CFLAGS="$CFLAGS"
6338                         else
6339                                 echo "$as_me:6339: result: no" >&5
6340 echo "${ECHO_T}no" >&6
6341                         fi
6342                 done
6343                 CFLAGS="$cf_save_CFLAGS"
6344         fi
6345
6346         # RPATH_LIST is a colon-separated list of directories
6347         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6348         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6349
6350         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6351
6352         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6353
6354 echo "${as_me:-configure}:6354: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6355
6356         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6357
6358 echo "${as_me:-configure}:6358: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6359
6360 for model in $cf_list_models; do
6361         case $model in
6362         (libtool)
6363
6364 echo "$as_me:6364: checking for additional libtool options" >&5
6365 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6366
6367 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6368 if test "${with_libtool_opts+set}" = set; then
6369   withval="$with_libtool_opts"
6370   with_libtool_opts=$withval
6371 else
6372   with_libtool_opts=no
6373 fi;
6374 echo "$as_me:6374: result: $with_libtool_opts" >&5
6375 echo "${ECHO_T}$with_libtool_opts" >&6
6376
6377 case .$with_libtool_opts in
6378 (.yes|.no|.)
6379         ;;
6380 (*)
6381         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6382         ;;
6383 esac
6384
6385 echo "$as_me:6385: checking if exported-symbols file should be used" >&5
6386 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6387
6388 # Check whether --with-export-syms or --without-export-syms was given.
6389 if test "${with_export_syms+set}" = set; then
6390   withval="$with_export_syms"
6391   with_export_syms=$withval
6392 else
6393   with_export_syms=no
6394 fi;
6395 if test "x$with_export_syms" = xyes
6396 then
6397         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6398
6399 fi
6400 echo "$as_me:6400: result: $with_export_syms" >&5
6401 echo "${ECHO_T}$with_export_syms" >&6
6402 if test "x$with_export_syms" != xno
6403 then
6404         EXPORT_SYMS="-export-symbols $with_export_syms"
6405
6406 fi
6407
6408                 ;;
6409         (shared)
6410                 if test "$CC_SHARED_OPTS" = "unknown"; then
6411                         { { echo "$as_me:6411: error: Shared libraries are not supported in this version" >&5
6412 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6413    { (exit 1); exit 1; }; }
6414                 fi
6415                 # workaround for inept transition to PIE vs PIC...
6416                 echo "$as_me:6416: checking if current CFLAGS link properly" >&5
6417 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6418                 cat >conftest.$ac_ext <<_ACEOF
6419 #line 6419 "configure"
6420 #include "confdefs.h"
6421 #include <stdio.h>
6422 int
6423 main (void)
6424 {
6425 printf("Hello work\n");
6426   ;
6427   return 0;
6428 }
6429 _ACEOF
6430 rm -f conftest.$ac_objext conftest$ac_exeext
6431 if { (eval echo "$as_me:6431: \"$ac_link\"") >&5
6432   (eval $ac_link) 2>&5
6433   ac_status=$?
6434   echo "$as_me:6434: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -s conftest$ac_exeext'
6437   { (eval echo "$as_me:6437: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   cf_cflags_work=yes
6443 else
6444   echo "$as_me: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 cf_cflags_work=no
6447 fi
6448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6449                 echo "$as_me:6449: result: $cf_cflags_work" >&5
6450 echo "${ECHO_T}$cf_cflags_work" >&6
6451                 if test "$cf_cflags_work" = no
6452                 then
6453                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6454
6455 echo "${as_me:-configure}:6455: testing try to work around by appending shared-options ..." 1>&5
6456
6457                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6458                 fi
6459
6460 echo "$as_me:6460: checking if versioned-symbols file should be used" >&5
6461 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6462
6463 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6464 if test "${with_versioned_syms+set}" = set; then
6465   withval="$with_versioned_syms"
6466   with_versioned_syms=$withval
6467 else
6468   with_versioned_syms=no
6469 fi;
6470 case "x$with_versioned_syms" in
6471 (xyes)
6472         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6473
6474         ;;
6475 (xno)
6476         ;;
6477 (x/*)
6478         test -f "$with_versioned_syms" || { { echo "$as_me:6478: error: expected a filename: $with_versioned_syms" >&5
6479 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6480    { (exit 1); exit 1; }; }
6481         ;;
6482 (*)
6483         test -f "$with_versioned_syms" || { { echo "$as_me:6483: error: expected a filename: $with_versioned_syms" >&5
6484 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6485    { (exit 1); exit 1; }; }
6486         with_versioned_syms=`pwd`/"$with_versioned_syms"
6487         ;;
6488 esac
6489 echo "$as_me:6489: result: $with_versioned_syms" >&5
6490 echo "${ECHO_T}$with_versioned_syms" >&6
6491
6492 RESULTING_SYMS=
6493 VERSIONED_SYMS=
6494 WILDCARD_SYMS=
6495
6496 if test "x$with_versioned_syms" != xno
6497 then
6498         RESULTING_SYMS=$with_versioned_syms
6499         case "x$MK_SHARED_LIB" in
6500         (*-Wl,*)
6501                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6502                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6503                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6504
6505 echo "${as_me:-configure}:6505: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6506
6507                 ;;
6508         (*-dy\ *)
6509                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
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         (*)
6517                 { echo "$as_me:6517: WARNING: this system does not support versioned-symbols" >&5
6518 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6519                 ;;
6520         esac
6521
6522         # Linux ld can selectively override scope, e.g., of symbols beginning with
6523         # "_" by first declaring some as global, and then using a wildcard to
6524         # declare the others as local.  Some other loaders cannot do this.  Check
6525         # by constructing a (very) simple shared library and inspecting its
6526         # symbols.
6527         if test "x$VERSIONED_SYMS" != "x"
6528         then
6529                 echo "$as_me:6529: checking if wildcards can be used to selectively omit symbols" >&5
6530 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6531                 WILDCARD_SYMS=no
6532
6533                 # make sources
6534                 rm -f conftest.*
6535
6536                 cat >conftest.ver <<EOF
6537 module_1.0 {
6538 global:
6539         globalf1;
6540 local:
6541         localf1;
6542 };
6543 module_2.0 {
6544 global:
6545         globalf2;
6546 local:
6547         localf2;
6548         _*;
6549 } module_1.0;
6550 submodule_1.0 {
6551 global:
6552         subglobalf1;
6553         _ismissing;
6554 local:
6555         sublocalf1;
6556 };
6557 submodule_2.0 {
6558 global:
6559         subglobalf2;
6560 local:
6561         sublocalf2;
6562         _*;
6563 } submodule_1.0;
6564 EOF
6565                 cat >conftest.$ac_ext <<EOF
6566 #line 6566 "configure"
6567 int     _ismissing(void) { return 1; }
6568 int     _localf1(void) { return 1; }
6569 int     _localf2(void) { return 2; }
6570 int     globalf1(void) { return 1; }
6571 int     globalf2(void) { return 2; }
6572 int     _sublocalf1(void) { return 1; }
6573 int     _sublocalf2(void) { return 2; }
6574 int     subglobalf1(void) { return 1; }
6575 int     subglobalf2(void) { return 2; }
6576 EOF
6577                 cat >conftest.mk <<EOF
6578 CC=${CC}
6579 CFLAGS=${CFLAGS}
6580 CPPFLAGS=${CPPFLAGS}
6581 LDFLAGS=${LDFLAGS}
6582 LIBS=${LIBS}
6583 VERSIONED_SYMS=${VERSIONED_SYMS}
6584 RESULTING_SYMS=conftest.ver
6585 MK_SHARED_LIB=${MK_SHARED_LIB}
6586 conftest.so: conftest.$ac_cv_objext
6587                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6588 EOF
6589
6590                 # compile source, make library
6591                 if make -f conftest.mk 2>&5 >/dev/null
6592                 then
6593                         # test for missing symbol in either Data or Text section
6594                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6595                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6596                 fi
6597                 echo "$as_me:6597: result: $WILDCARD_SYMS" >&5
6598 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6599                 rm -f conftest.*
6600         fi
6601 fi
6602
6603                 ;;
6604         esac
6605 done
6606
6607 ### Checks for special libraries, must be done up-front.
6608 SHLIB_LIST=""
6609
6610 echo "$as_me:6610: checking if you want to link with the GPM mouse library" >&5
6611 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6612
6613 # Check whether --with-gpm or --without-gpm was given.
6614 if test "${with_gpm+set}" = set; then
6615   withval="$with_gpm"
6616   with_gpm=$withval
6617 else
6618   with_gpm=maybe
6619 fi;
6620 echo "$as_me:6620: result: $with_gpm" >&5
6621 echo "${ECHO_T}$with_gpm" >&6
6622
6623 if test "$with_gpm" != no ; then
6624         echo "$as_me:6624: checking for gpm.h" >&5
6625 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6626 if test "${ac_cv_header_gpm_h+set}" = set; then
6627   echo $ECHO_N "(cached) $ECHO_C" >&6
6628 else
6629   cat >conftest.$ac_ext <<_ACEOF
6630 #line 6630 "configure"
6631 #include "confdefs.h"
6632 #include <gpm.h>
6633 _ACEOF
6634 if { (eval echo "$as_me:6634: \"$ac_cpp conftest.$ac_ext\"") >&5
6635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6636   ac_status=$?
6637   egrep -v '^ *\+' conftest.er1 >conftest.err
6638   rm -f conftest.er1
6639   cat conftest.err >&5
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit $ac_status); } >/dev/null; then
6642   if test -s conftest.err; then
6643     ac_cpp_err=$ac_c_preproc_warn_flag
6644   else
6645     ac_cpp_err=
6646   fi
6647 else
6648   ac_cpp_err=yes
6649 fi
6650 if test -z "$ac_cpp_err"; then
6651   ac_cv_header_gpm_h=yes
6652 else
6653   echo "$as_me: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   ac_cv_header_gpm_h=no
6656 fi
6657 rm -f conftest.err conftest.$ac_ext
6658 fi
6659 echo "$as_me:6659: result: $ac_cv_header_gpm_h" >&5
6660 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6661 if test $ac_cv_header_gpm_h = yes; then
6662
6663 cat >>confdefs.h <<\EOF
6664 #define HAVE_GPM_H 1
6665 EOF
6666
6667                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6668                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6669
6670 echo "${as_me:-configure}:6670: testing assuming we really have GPM library ..." 1>&5
6671
6672 cat >>confdefs.h <<\EOF
6673 #define HAVE_LIBGPM 1
6674 EOF
6675
6676                         with_gpm=yes
6677                 else
6678                         echo "$as_me:6678: checking for Gpm_Open in -lgpm" >&5
6679 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6680 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6681   echo $ECHO_N "(cached) $ECHO_C" >&6
6682 else
6683   ac_check_lib_save_LIBS=$LIBS
6684 LIBS="-lgpm  $LIBS"
6685 cat >conftest.$ac_ext <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 #ifdef __cplusplus
6691 extern "C"
6692 #endif
6693 /* We use char because int might match the return type of a gcc2
6694    builtin and then its argument prototype would still apply.  */
6695 char Gpm_Open ();
6696 int
6697 main (void)
6698 {
6699 Gpm_Open ();
6700   ;
6701   return 0;
6702 }
6703 _ACEOF
6704 rm -f conftest.$ac_objext conftest$ac_exeext
6705 if { (eval echo "$as_me:6705: \"$ac_link\"") >&5
6706   (eval $ac_link) 2>&5
6707   ac_status=$?
6708   echo "$as_me:6708: \$? = $ac_status" >&5
6709   (exit $ac_status); } &&
6710          { ac_try='test -s conftest$ac_exeext'
6711   { (eval echo "$as_me:6711: \"$ac_try\"") >&5
6712   (eval $ac_try) 2>&5
6713   ac_status=$?
6714   echo "$as_me:6714: \$? = $ac_status" >&5
6715   (exit $ac_status); }; }; then
6716   ac_cv_lib_gpm_Gpm_Open=yes
6717 else
6718   echo "$as_me: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6720 ac_cv_lib_gpm_Gpm_Open=no
6721 fi
6722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6723 LIBS=$ac_check_lib_save_LIBS
6724 fi
6725 echo "$as_me:6725: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6726 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6727 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6728   with_gpm=yes
6729 else
6730
6731                                 if test "$with_gpm" = maybe; then
6732                                         { echo "$as_me:6732: WARNING: Cannot link with GPM library" >&5
6733 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6734                                         with_gpm=no
6735                                 else
6736                                         { { echo "$as_me:6736: error: Cannot link with GPM library" >&5
6737 echo "$as_me: error: Cannot link with GPM library" >&2;}
6738    { (exit 1); exit 1; }; }
6739                                 fi
6740
6741 fi
6742
6743                 fi
6744
6745 else
6746
6747                 test "$with_gpm" != maybe && { echo "$as_me:6747: WARNING: Cannot find GPM header" >&5
6748 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6749                 with_gpm=no
6750
6751 fi
6752
6753 fi
6754
6755 if test "$with_gpm" != no ; then
6756         echo "$as_me:6756: checking if you want to load GPM dynamically" >&5
6757 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6758
6759 # Check whether --with-dlsym or --without-dlsym was given.
6760 if test "${with_dlsym+set}" = set; then
6761   withval="$with_dlsym"
6762   with_dlsym=$withval
6763 else
6764   with_dlsym=yes
6765 fi;
6766         echo "$as_me:6766: result: $with_dlsym" >&5
6767 echo "${ECHO_T}$with_dlsym" >&6
6768         if test "x$with_dlsym" = xyes ; then
6769
6770 cf_have_dlsym=no
6771 echo "$as_me:6771: checking for dlsym" >&5
6772 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6773 if test "${ac_cv_func_dlsym+set}" = set; then
6774   echo $ECHO_N "(cached) $ECHO_C" >&6
6775 else
6776   cat >conftest.$ac_ext <<_ACEOF
6777 #line 6777 "configure"
6778 #include "confdefs.h"
6779 #define dlsym autoconf_temporary
6780 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6781 #undef dlsym
6782
6783 #ifdef __cplusplus
6784 extern "C"
6785 #endif
6786
6787 /* We use char because int might match the return type of a gcc2
6788    builtin and then its argument prototype would still apply.  */
6789 char dlsym (void);
6790
6791 int
6792 main (void)
6793 {
6794
6795 /* The GNU C library defines stubs for functions which it implements
6796     to always fail with ENOSYS.  Some functions are actually named
6797     something starting with __ and the normal name is an alias.  */
6798 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6799 #error found stub for dlsym
6800 #endif
6801
6802         return dlsym ();
6803   ;
6804   return 0;
6805 }
6806 _ACEOF
6807 rm -f conftest.$ac_objext conftest$ac_exeext
6808 if { (eval echo "$as_me:6808: \"$ac_link\"") >&5
6809   (eval $ac_link) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit $ac_status); } &&
6813          { ac_try='test -s conftest$ac_exeext'
6814   { (eval echo "$as_me:6814: \"$ac_try\"") >&5
6815   (eval $ac_try) 2>&5
6816   ac_status=$?
6817   echo "$as_me:6817: \$? = $ac_status" >&5
6818   (exit $ac_status); }; }; then
6819   ac_cv_func_dlsym=yes
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6823 ac_cv_func_dlsym=no
6824 fi
6825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6826 fi
6827 echo "$as_me:6827: result: $ac_cv_func_dlsym" >&5
6828 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6829 if test $ac_cv_func_dlsym = yes; then
6830   cf_have_dlsym=yes
6831 else
6832
6833 cf_have_libdl=no
6834 echo "$as_me:6834: checking for dlsym in -ldl" >&5
6835 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6836 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6837   echo $ECHO_N "(cached) $ECHO_C" >&6
6838 else
6839   ac_check_lib_save_LIBS=$LIBS
6840 LIBS="-ldl  $LIBS"
6841 cat >conftest.$ac_ext <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6844
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 /* We use char because int might match the return type of a gcc2
6850    builtin and then its argument prototype would still apply.  */
6851 char dlsym ();
6852 int
6853 main (void)
6854 {
6855 dlsym ();
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 rm -f conftest.$ac_objext conftest$ac_exeext
6861 if { (eval echo "$as_me:6861: \"$ac_link\"") >&5
6862   (eval $ac_link) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit $ac_status); } &&
6866          { ac_try='test -s conftest$ac_exeext'
6867   { (eval echo "$as_me:6867: \"$ac_try\"") >&5
6868   (eval $ac_try) 2>&5
6869   ac_status=$?
6870   echo "$as_me:6870: \$? = $ac_status" >&5
6871   (exit $ac_status); }; }; then
6872   ac_cv_lib_dl_dlsym=yes
6873 else
6874   echo "$as_me: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 ac_cv_lib_dl_dlsym=no
6877 fi
6878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6879 LIBS=$ac_check_lib_save_LIBS
6880 fi
6881 echo "$as_me:6881: result: $ac_cv_lib_dl_dlsym" >&5
6882 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6883 if test $ac_cv_lib_dl_dlsym = yes; then
6884
6885         cf_have_dlsym=yes
6886         cf_have_libdl=yes
6887 fi
6888
6889 fi
6890
6891 if test "$cf_have_dlsym" = yes ; then
6892         test "$cf_have_libdl" = yes && {
6893 cf_add_libs="$LIBS"
6894 # reverse order
6895 cf_add_0lib=
6896 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6897 # filter duplicates
6898 for cf_add_1lib in $cf_add_0lib; do
6899         for cf_add_2lib in $cf_add_libs; do
6900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6901                         cf_add_1lib=
6902                         break
6903                 fi
6904         done
6905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6906 done
6907 LIBS="$cf_add_libs"
6908  }
6909
6910         echo "$as_me:6910: checking whether able to link to dl*() functions" >&5
6911 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6912         cat >conftest.$ac_ext <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 #include <dlfcn.h>
6916 int
6917 main (void)
6918 {
6919
6920                 void *obj;
6921                 if ((obj = dlopen("filename", 0)) != 0) {
6922                         if (dlsym(obj, "symbolname") == 0) {
6923                         dlclose(obj);
6924                         }
6925                 }
6926   ;
6927   return 0;
6928 }
6929 _ACEOF
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932   (eval $ac_link) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); } &&
6936          { ac_try='test -s conftest$ac_exeext'
6937   { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938   (eval $ac_try) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); }; }; then
6942
6943 cat >>confdefs.h <<\EOF
6944 #define HAVE_LIBDL 1
6945 EOF
6946
6947 else
6948   echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950
6951                 { { echo "$as_me:6951: error: Cannot link test program for libdl" >&5
6952 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6953    { (exit 1); exit 1; }; }
6954 fi
6955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6956         echo "$as_me:6956: result: ok" >&5
6957 echo "${ECHO_T}ok" >&6
6958 else
6959         { { echo "$as_me:6959: error: Cannot find dlsym function" >&5
6960 echo "$as_me: error: Cannot find dlsym function" >&2;}
6961    { (exit 1); exit 1; }; }
6962 fi
6963
6964                 if test "x$with_gpm" != xyes ; then
6965                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6966
6967 echo "${as_me:-configure}:6967: testing assuming soname for gpm is $with_gpm ..." 1>&5
6968
6969                         cf_cv_gpm_soname="$with_gpm"
6970                 else
6971
6972 echo "$as_me:6972: checking for soname of gpm library" >&5
6973 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6974 if test "${cf_cv_gpm_soname+set}" = set; then
6975   echo $ECHO_N "(cached) $ECHO_C" >&6
6976 else
6977
6978 cf_cv_gpm_soname=unknown
6979 if test "$cross_compiling" != yes ; then
6980 cat >conftest.$ac_ext <<CF_EOF
6981 #include <gpm.h>
6982 int main(void)
6983 {
6984 if (Gpm_Open(0,0)) Gpm_Close();
6985         ${cf_cv_main_return:-return}(0);
6986 }
6987 CF_EOF
6988 cf_save_LIBS="$LIBS"
6989
6990 cf_add_libs="$LIBS"
6991 # reverse order
6992 cf_add_0lib=
6993 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6994 # filter duplicates
6995 for cf_add_1lib in $cf_add_0lib; do
6996         for cf_add_2lib in $cf_add_libs; do
6997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6998                         cf_add_1lib=
6999                         break
7000                 fi
7001         done
7002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7003 done
7004 LIBS="$cf_add_libs"
7005
7006         if { (eval echo "$as_me:7006: \"$ac_compile\"") >&5
7007   (eval $ac_compile) 2>&5
7008   ac_status=$?
7009   echo "$as_me:7009: \$? = $ac_status" >&5
7010   (exit $ac_status); } ; then
7011                 if { (eval echo "$as_me:7011: \"$ac_link\"") >&5
7012   (eval $ac_link) 2>&5
7013   ac_status=$?
7014   echo "$as_me:7014: \$? = $ac_status" >&5
7015   (exit $ac_status); } ; then
7016                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7017                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7018                 fi
7019         fi
7020 rm -rf conftest*
7021 LIBS="$cf_save_LIBS"
7022 fi
7023
7024 fi
7025 echo "$as_me:7025: result: $cf_cv_gpm_soname" >&5
7026 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7027
7028                 fi
7029                 test "$cf_cv_gpm_soname" != "unknown" &&
7030 cat >>confdefs.h <<EOF
7031 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7032 EOF
7033
7034                 SHLIB_LIST="-ldl $SHLIB_LIST"
7035
7036 cf_add_libs="$PRIVATE_LIBS"
7037 # reverse order
7038 cf_add_0lib=
7039 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7040 # filter duplicates
7041 for cf_add_1lib in $cf_add_0lib; do
7042         for cf_add_2lib in $cf_add_libs; do
7043                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7044                         cf_add_1lib=
7045                         break
7046                 fi
7047         done
7048         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7049 done
7050 PRIVATE_LIBS="$cf_add_libs"
7051
7052         else
7053                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7054
7055 cf_add_libs="$TEST_LIBS"
7056 # reverse order
7057 cf_add_0lib=
7058 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7059 # filter duplicates
7060 for cf_add_1lib in $cf_add_0lib; do
7061         for cf_add_2lib in $cf_add_libs; do
7062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7063                         cf_add_1lib=
7064                         break
7065                 fi
7066         done
7067         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7068 done
7069 TEST_LIBS="$cf_add_libs"
7070
7071 cf_add_libs="$PRIVATE_LIBS"
7072 # reverse order
7073 cf_add_0lib=
7074 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7075 # filter duplicates
7076 for cf_add_1lib in $cf_add_0lib; do
7077         for cf_add_2lib in $cf_add_libs; do
7078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7079                         cf_add_1lib=
7080                         break
7081                 fi
7082         done
7083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7084 done
7085 PRIVATE_LIBS="$cf_add_libs"
7086
7087         fi
7088
7089 cat >>confdefs.h <<\EOF
7090 #define HAVE_LIBGPM 1
7091 EOF
7092
7093 echo "$as_me:7093: checking for Gpm_Wgetch in -lgpm" >&5
7094 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7095 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7096   echo $ECHO_N "(cached) $ECHO_C" >&6
7097 else
7098   ac_check_lib_save_LIBS=$LIBS
7099 LIBS="-lgpm  $LIBS"
7100 cat >conftest.$ac_ext <<_ACEOF
7101 #line 7101 "configure"
7102 #include "confdefs.h"
7103
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 #ifdef __cplusplus
7106 extern "C"
7107 #endif
7108 /* We use char because int might match the return type of a gcc2
7109    builtin and then its argument prototype would still apply.  */
7110 char Gpm_Wgetch ();
7111 int
7112 main (void)
7113 {
7114 Gpm_Wgetch ();
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 rm -f conftest.$ac_objext conftest$ac_exeext
7120 if { (eval echo "$as_me:7120: \"$ac_link\"") >&5
7121   (eval $ac_link) 2>&5
7122   ac_status=$?
7123   echo "$as_me:7123: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest$ac_exeext'
7126   { (eval echo "$as_me:7126: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:7129: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   ac_cv_lib_gpm_Gpm_Wgetch=yes
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7135 ac_cv_lib_gpm_Gpm_Wgetch=no
7136 fi
7137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7138 LIBS=$ac_check_lib_save_LIBS
7139 fi
7140 echo "$as_me:7140: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7141 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7142 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7143
7144 echo "$as_me:7144: checking if GPM is weakly bound to curses library" >&5
7145 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7146 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7147   echo $ECHO_N "(cached) $ECHO_C" >&6
7148 else
7149
7150 cf_cv_check_gpm_wgetch=unknown
7151 if test "$cross_compiling" != yes ; then
7152
7153 cat >conftest.$ac_ext <<CF_EOF
7154 #include <gpm.h>
7155 int main(void)
7156 {
7157         Gpm_Wgetch();
7158         ${cf_cv_main_return:-return}(0);
7159 }
7160 CF_EOF
7161
7162         cf_save_LIBS="$LIBS"
7163         # This only works if we can look at the symbol table.  If a shared
7164         # library is stripped for install, we cannot use that.  So we're forced
7165         # to rely on the static library, noting that some packagers may not
7166         # include it.
7167         LIBS="-static -lgpm -dynamic $LIBS"
7168         if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } ; then
7173                 if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
7174   (eval $ac_link) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } ; then
7178                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7179                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7180                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7181                 fi
7182         fi
7183         rm -rf conftest*
7184         LIBS="$cf_save_LIBS"
7185 fi
7186
7187 fi
7188 echo "$as_me:7188: result: $cf_cv_check_gpm_wgetch" >&5
7189 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7190
7191 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7192         { echo "$as_me:7192: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7193 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7194 fi
7195
7196 fi
7197
7198 fi
7199
7200 echo "$as_me:7200: checking if you want to use PCRE2 for regular-expressions" >&5
7201 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7202
7203 # Check whether --with-pcre2 or --without-pcre2 was given.
7204 if test "${with_pcre2+set}" = set; then
7205   withval="$with_pcre2"
7206
7207 fi;
7208 test -z "$with_pcre2" && with_pcre2=no
7209 echo "$as_me:7209: result: $with_pcre2" >&5
7210 echo "${ECHO_T}$with_pcre2" >&6
7211
7212 if test "x$with_pcre2" != xno ; then
7213
7214 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7215         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7216
7217 echo "${as_me:-configure}:7217: testing found package libpcre2 ..." 1>&5
7218
7219         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7220         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7221         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7222
7223 echo "${as_me:-configure}:7223: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7224
7225         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7226
7227 echo "${as_me:-configure}:7227: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7228
7229 cf_fix_cppflags=no
7230 cf_new_cflags=
7231 cf_new_cppflags=
7232 cf_new_extra_cppflags=
7233
7234 for cf_add_cflags in $cf_pkgconfig_incs
7235 do
7236 case $cf_fix_cppflags in
7237 (no)
7238         case $cf_add_cflags in
7239         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7240                 case $cf_add_cflags in
7241                 (-D*)
7242                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7243
7244                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7245                                 && test -z "${cf_tst_cflags}" \
7246                                 && cf_fix_cppflags=yes
7247
7248                         if test $cf_fix_cppflags = yes ; then
7249
7250         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7251         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7252
7253                                 continue
7254                         elif test "${cf_tst_cflags}" = "\"'" ; then
7255
7256         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7257         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7258
7259                                 continue
7260                         fi
7261                         ;;
7262                 esac
7263                 case "$CPPFLAGS" in
7264                 (*$cf_add_cflags)
7265                         ;;
7266                 (*)
7267                         case $cf_add_cflags in
7268                         (-D*)
7269                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7270
7271 CPPFLAGS=`echo "$CPPFLAGS" | \
7272         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7273                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7274
7275                                 ;;
7276                         esac
7277
7278         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7279         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7280
7281                         ;;
7282                 esac
7283                 ;;
7284         (*)
7285
7286         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7287         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7288
7289                 ;;
7290         esac
7291         ;;
7292 (yes)
7293
7294         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7295         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7296
7297         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7298
7299         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7300                 && test -z "${cf_tst_cflags}" \
7301                 && cf_fix_cppflags=no
7302         ;;
7303 esac
7304 done
7305
7306 if test -n "$cf_new_cflags" ; then
7307
7308         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7309         CFLAGS="${CFLAGS}$cf_new_cflags"
7310
7311 fi
7312
7313 if test -n "$cf_new_cppflags" ; then
7314
7315         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7316         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7317
7318 fi
7319
7320 if test -n "$cf_new_extra_cppflags" ; then
7321
7322         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7323         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7324
7325 fi
7326
7327 cf_add_libs="$LIBS"
7328 # reverse order
7329 cf_add_0lib=
7330 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7331 # filter duplicates
7332 for cf_add_1lib in $cf_add_0lib; do
7333         for cf_add_2lib in $cf_add_libs; do
7334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7335                         cf_add_1lib=
7336                         break
7337                 fi
7338         done
7339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7340 done
7341 LIBS="$cf_add_libs"
7342
7343         :
7344 else
7345         cf_pkgconfig_incs=
7346         cf_pkgconfig_libs=
7347
7348 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7349         test -n "$verbose" && echo "    found package libpcre" 1>&6
7350
7351 echo "${as_me:-configure}:7351: testing found package libpcre ..." 1>&5
7352
7353         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7354         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7355         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7356
7357 echo "${as_me:-configure}:7357: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7358
7359         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7360
7361 echo "${as_me:-configure}:7361: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7362
7363 cf_fix_cppflags=no
7364 cf_new_cflags=
7365 cf_new_cppflags=
7366 cf_new_extra_cppflags=
7367
7368 for cf_add_cflags in $cf_pkgconfig_incs
7369 do
7370 case $cf_fix_cppflags in
7371 (no)
7372         case $cf_add_cflags in
7373         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7374                 case $cf_add_cflags in
7375                 (-D*)
7376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7377
7378                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7379                                 && test -z "${cf_tst_cflags}" \
7380                                 && cf_fix_cppflags=yes
7381
7382                         if test $cf_fix_cppflags = yes ; then
7383
7384         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7385         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7386
7387                                 continue
7388                         elif test "${cf_tst_cflags}" = "\"'" ; then
7389
7390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7392
7393                                 continue
7394                         fi
7395                         ;;
7396                 esac
7397                 case "$CPPFLAGS" in
7398                 (*$cf_add_cflags)
7399                         ;;
7400                 (*)
7401                         case $cf_add_cflags in
7402                         (-D*)
7403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7404
7405 CPPFLAGS=`echo "$CPPFLAGS" | \
7406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7408
7409                                 ;;
7410                         esac
7411
7412         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7413         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7414
7415                         ;;
7416                 esac
7417                 ;;
7418         (*)
7419
7420         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7421         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7422
7423                 ;;
7424         esac
7425         ;;
7426 (yes)
7427
7428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7430
7431         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7432
7433         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7434                 && test -z "${cf_tst_cflags}" \
7435                 && cf_fix_cppflags=no
7436         ;;
7437 esac
7438 done
7439
7440 if test -n "$cf_new_cflags" ; then
7441
7442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7443         CFLAGS="${CFLAGS}$cf_new_cflags"
7444
7445 fi
7446
7447 if test -n "$cf_new_cppflags" ; then
7448
7449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7450         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7451
7452 fi
7453
7454 if test -n "$cf_new_extra_cppflags" ; then
7455
7456         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7457         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7458
7459 fi
7460
7461 cf_add_libs="$LIBS"
7462 # reverse order
7463 cf_add_0lib=
7464 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7465 # filter duplicates
7466 for cf_add_1lib in $cf_add_0lib; do
7467         for cf_add_2lib in $cf_add_libs; do
7468                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7469                         cf_add_1lib=
7470                         break
7471                 fi
7472         done
7473         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7474 done
7475 LIBS="$cf_add_libs"
7476
7477         :
7478 else
7479         cf_pkgconfig_incs=
7480         cf_pkgconfig_libs=
7481
7482                         { { echo "$as_me:7482: error: Cannot find PCRE2 library" >&5
7483 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7484    { (exit 1); exit 1; }; }
7485 fi
7486
7487 fi
7488
7489 cat >>confdefs.h <<\EOF
7490 #define HAVE_LIB_PCRE2 1
7491 EOF
7492
7493         # if pkgconfig gave no results, look for the libraries directly
7494         case $LIBS in
7495         (*pcre2-posix*|*pcreposix*)
7496                 ;;
7497         (*)
7498                 echo "$as_me:7498: checking for regcomp in -lpcre2-posix" >&5
7499 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7500 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7501   echo $ECHO_N "(cached) $ECHO_C" >&6
7502 else
7503   ac_check_lib_save_LIBS=$LIBS
7504 LIBS="-lpcre2-posix  $LIBS"
7505 cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508
7509 /* Override any gcc2 internal prototype to avoid an error.  */
7510 #ifdef __cplusplus
7511 extern "C"
7512 #endif
7513 /* We use char because int might match the return type of a gcc2
7514    builtin and then its argument prototype would still apply.  */
7515 char regcomp ();
7516 int
7517 main (void)
7518 {
7519 regcomp ();
7520   ;
7521   return 0;
7522 }
7523 _ACEOF
7524 rm -f conftest.$ac_objext conftest$ac_exeext
7525 if { (eval echo "$as_me:7525: \"$ac_link\"") >&5
7526   (eval $ac_link) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); } &&
7530          { ac_try='test -s conftest$ac_exeext'
7531   { (eval echo "$as_me:7531: \"$ac_try\"") >&5
7532   (eval $ac_try) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); }; }; then
7536   ac_cv_lib_pcre2_posix_regcomp=yes
7537 else
7538   echo "$as_me: failed program was:" >&5
7539 cat conftest.$ac_ext >&5
7540 ac_cv_lib_pcre2_posix_regcomp=no
7541 fi
7542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7543 LIBS=$ac_check_lib_save_LIBS
7544 fi
7545 echo "$as_me:7545: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7546 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7547 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7548
7549 cf_add_libs="$LIBS"
7550 # reverse order
7551 cf_add_0lib=
7552 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7553 # filter duplicates
7554 for cf_add_1lib in $cf_add_0lib; do
7555         for cf_add_2lib in $cf_add_libs; do
7556                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7557                         cf_add_1lib=
7558                         break
7559                 fi
7560         done
7561         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7562 done
7563 LIBS="$cf_add_libs"
7564
7565 else
7566   echo "$as_me:7566: checking for regcomp in -lpcreposix" >&5
7567 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7568 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7569   echo $ECHO_N "(cached) $ECHO_C" >&6
7570 else
7571   ac_check_lib_save_LIBS=$LIBS
7572 LIBS="-lpcreposix  $LIBS"
7573 cat >conftest.$ac_ext <<_ACEOF
7574 #line 7574 "configure"
7575 #include "confdefs.h"
7576
7577 /* Override any gcc2 internal prototype to avoid an error.  */
7578 #ifdef __cplusplus
7579 extern "C"
7580 #endif
7581 /* We use char because int might match the return type of a gcc2
7582    builtin and then its argument prototype would still apply.  */
7583 char regcomp ();
7584 int
7585 main (void)
7586 {
7587 regcomp ();
7588   ;
7589   return 0;
7590 }
7591 _ACEOF
7592 rm -f conftest.$ac_objext conftest$ac_exeext
7593 if { (eval echo "$as_me:7593: \"$ac_link\"") >&5
7594   (eval $ac_link) 2>&5
7595   ac_status=$?
7596   echo "$as_me:7596: \$? = $ac_status" >&5
7597   (exit $ac_status); } &&
7598          { ac_try='test -s conftest$ac_exeext'
7599   { (eval echo "$as_me:7599: \"$ac_try\"") >&5
7600   (eval $ac_try) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); }; }; then
7604   ac_cv_lib_pcreposix_regcomp=yes
7605 else
7606   echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 ac_cv_lib_pcreposix_regcomp=no
7609 fi
7610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7611 LIBS=$ac_check_lib_save_LIBS
7612 fi
7613 echo "$as_me:7613: result: $ac_cv_lib_pcreposix_regcomp" >&5
7614 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7615 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7616
7617 cf_add_libs="$LIBS"
7618 # reverse order
7619 cf_add_0lib=
7620 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7621 # filter duplicates
7622 for cf_add_1lib in $cf_add_0lib; do
7623         for cf_add_2lib in $cf_add_libs; do
7624                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7625                         cf_add_1lib=
7626                         break
7627                 fi
7628         done
7629         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7630 done
7631 LIBS="$cf_add_libs"
7632
7633 else
7634   { { echo "$as_me:7634: error: Cannot find PCRE2 POSIX library" >&5
7635 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7636    { (exit 1); exit 1; }; }
7637 fi
7638
7639 fi
7640
7641                 ;;
7642         esac
7643
7644         # either way, check for the library header files
7645
7646 for ac_header in pcre2posix.h pcreposix.h
7647 do
7648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7649 echo "$as_me:7649: checking for $ac_header" >&5
7650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7652   echo $ECHO_N "(cached) $ECHO_C" >&6
7653 else
7654   cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657 #include <$ac_header>
7658 _ACEOF
7659 if { (eval echo "$as_me:7659: \"$ac_cpp conftest.$ac_ext\"") >&5
7660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7661   ac_status=$?
7662   egrep -v '^ *\+' conftest.er1 >conftest.err
7663   rm -f conftest.er1
7664   cat conftest.err >&5
7665   echo "$as_me:7665: \$? = $ac_status" >&5
7666   (exit $ac_status); } >/dev/null; then
7667   if test -s conftest.err; then
7668     ac_cpp_err=$ac_c_preproc_warn_flag
7669   else
7670     ac_cpp_err=
7671   fi
7672 else
7673   ac_cpp_err=yes
7674 fi
7675 if test -z "$ac_cpp_err"; then
7676   eval "$as_ac_Header=yes"
7677 else
7678   echo "$as_me: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   eval "$as_ac_Header=no"
7681 fi
7682 rm -f conftest.err conftest.$ac_ext
7683 fi
7684 echo "$as_me:7684: result: `eval echo '${'$as_ac_Header'}'`" >&5
7685 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7686 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7687   cat >>confdefs.h <<EOF
7688 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7689 EOF
7690
7691 fi
7692 done
7693
7694 fi
7695
7696 # not everyone has "test -c"
7697 if test -c /dev/sysmouse 2>/dev/null ; then
7698 echo "$as_me:7698: checking if you want to use sysmouse" >&5
7699 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7700
7701 # Check whether --with-sysmouse or --without-sysmouse was given.
7702 if test "${with_sysmouse+set}" = set; then
7703   withval="$with_sysmouse"
7704   cf_with_sysmouse=$withval
7705 else
7706   cf_with_sysmouse=maybe
7707 fi;
7708         if test "$cf_with_sysmouse" != no ; then
7709         cat >conftest.$ac_ext <<_ACEOF
7710 #line 7710 "configure"
7711 #include "confdefs.h"
7712
7713 #include <osreldate.h>
7714 #if (__FreeBSD_version >= 400017)
7715 #include <sys/consio.h>
7716 #include <sys/fbio.h>
7717 #else
7718 #include <machine/console.h>
7719 #endif
7720
7721 int
7722 main (void)
7723 {
7724
7725         struct mouse_info the_mouse;
7726         ioctl(0, CONS_MOUSECTL, &the_mouse);
7727
7728   ;
7729   return 0;
7730 }
7731 _ACEOF
7732 rm -f conftest.$ac_objext
7733 if { (eval echo "$as_me:7733: \"$ac_compile\"") >&5
7734   (eval $ac_compile) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); } &&
7738          { ac_try='test -s conftest.$ac_objext'
7739   { (eval echo "$as_me:7739: \"$ac_try\"") >&5
7740   (eval $ac_try) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); }; }; then
7744   cf_with_sysmouse=yes
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 cat conftest.$ac_ext >&5
7748 cf_with_sysmouse=no
7749 fi
7750 rm -f conftest.$ac_objext conftest.$ac_ext
7751         fi
7752 echo "$as_me:7752: result: $cf_with_sysmouse" >&5
7753 echo "${ECHO_T}$cf_with_sysmouse" >&6
7754 test "$cf_with_sysmouse" = yes &&
7755 cat >>confdefs.h <<\EOF
7756 #define USE_SYSMOUSE 1
7757 EOF
7758
7759 fi
7760
7761 # pretend that ncurses==ncursesw==ncursest
7762 echo "$as_me:7762: checking if you want to disable library suffixes" >&5
7763 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7764
7765 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7766 if test "${enable_lib_suffixes+set}" = set; then
7767   enableval="$enable_lib_suffixes"
7768   test "$enableval" != no && enableval=yes
7769         if test "$enableval" != "yes" ; then
7770     disable_lib_suffixes=yes
7771         else
7772                 disable_lib_suffixes=no
7773         fi
7774 else
7775   enableval=yes
7776         disable_lib_suffixes=no
7777
7778 fi;
7779 echo "$as_me:7779: result: $disable_lib_suffixes" >&5
7780 echo "${ECHO_T}$disable_lib_suffixes" >&6
7781
7782 ### If we're building with rpath, try to link non-standard libs that way too.
7783 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7784
7785 echo "$as_me:7785: checking if rpath-hack should be disabled" >&5
7786 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7787
7788 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7789 if test "${enable_rpath_hack+set}" = set; then
7790   enableval="$enable_rpath_hack"
7791   test "$enableval" != no && enableval=yes
7792         if test "$enableval" != "yes" ; then
7793     cf_disable_rpath_hack=yes
7794         else
7795                 cf_disable_rpath_hack=no
7796         fi
7797 else
7798   enableval=yes
7799         cf_disable_rpath_hack=no
7800
7801 fi;
7802 echo "$as_me:7802: result: $cf_disable_rpath_hack" >&5
7803 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7804 if test "$cf_disable_rpath_hack" = no ; then
7805
7806 echo "$as_me:7806: checking for updated LDFLAGS" >&5
7807 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7808 if test -n "$LD_RPATH_OPT" ; then
7809         echo "$as_me:7809: result: maybe" >&5
7810 echo "${ECHO_T}maybe" >&6
7811
7812         for ac_prog in ldd
7813 do
7814   # Extract the first word of "$ac_prog", so it can be a program name with args.
7815 set dummy $ac_prog; ac_word=$2
7816 echo "$as_me:7816: checking for $ac_word" >&5
7817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7818 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7819   echo $ECHO_N "(cached) $ECHO_C" >&6
7820 else
7821   if test -n "$cf_ldd_prog"; then
7822   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7823 else
7824   ac_save_IFS=$IFS; IFS=$ac_path_separator
7825 ac_dummy="$PATH"
7826 for ac_dir in $ac_dummy; do
7827   IFS=$ac_save_IFS
7828   test -z "$ac_dir" && ac_dir=.
7829   $as_executable_p "$ac_dir/$ac_word" || continue
7830 ac_cv_prog_cf_ldd_prog="$ac_prog"
7831 echo "$as_me:7831: found $ac_dir/$ac_word" >&5
7832 break
7833 done
7834
7835 fi
7836 fi
7837 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7838 if test -n "$cf_ldd_prog"; then
7839   echo "$as_me:7839: result: $cf_ldd_prog" >&5
7840 echo "${ECHO_T}$cf_ldd_prog" >&6
7841 else
7842   echo "$as_me:7842: result: no" >&5
7843 echo "${ECHO_T}no" >&6
7844 fi
7845
7846   test -n "$cf_ldd_prog" && break
7847 done
7848 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7849
7850         cf_rpath_list="/usr/lib /lib"
7851         if test "$cf_ldd_prog" != no
7852         then
7853                 cf_rpath_oops=
7854
7855 cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858 #include <stdio.h>
7859 int
7860 main (void)
7861 {
7862 printf("Hello");
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 rm -f conftest.$ac_objext conftest$ac_exeext
7868 if { (eval echo "$as_me:7868: \"$ac_link\"") >&5
7869   (eval $ac_link) 2>&5
7870   ac_status=$?
7871   echo "$as_me:7871: \$? = $ac_status" >&5
7872   (exit $ac_status); } &&
7873          { ac_try='test -s conftest$ac_exeext'
7874   { (eval echo "$as_me:7874: \"$ac_try\"") >&5
7875   (eval $ac_try) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); }; }; then
7879   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7880                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 fi
7885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7886
7887                 # If we passed the link-test, but get a "not found" on a given library,
7888                 # this could be due to inept reconfiguration of gcc to make it only
7889                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7890                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7891                 # /usr/local libraries.
7892                 if test -n "$cf_rpath_oops"
7893                 then
7894                         for cf_rpath_src in $cf_rpath_oops
7895                         do
7896                                 for cf_rpath_dir in \
7897                                         /usr/local \
7898                                         /usr/pkg \
7899                                         /opt/sfw
7900                                 do
7901                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7902                                         then
7903                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7904
7905 echo "${as_me:-configure}:7905: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7906
7907                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7908                                                 break
7909                                         fi
7910                                 done
7911                         done
7912                 fi
7913         fi
7914
7915         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7916
7917 echo "${as_me:-configure}:7917: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7918
7919 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7920
7921 echo "${as_me:-configure}:7921: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7922
7923 cf_rpath_dst=
7924 for cf_rpath_src in $LDFLAGS
7925 do
7926         case $cf_rpath_src in
7927         (-L*)
7928
7929                 # check if this refers to a directory which we will ignore
7930                 cf_rpath_skip=no
7931                 if test -n "$cf_rpath_list"
7932                 then
7933                         for cf_rpath_item in $cf_rpath_list
7934                         do
7935                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7936                                 then
7937                                         cf_rpath_skip=yes
7938                                         break
7939                                 fi
7940                         done
7941                 fi
7942
7943                 if test "$cf_rpath_skip" = no
7944                 then
7945                         # transform the option
7946                         if test "$LD_RPATH_OPT" = "-R " ; then
7947                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7948                         else
7949                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7950                         fi
7951
7952                         # if we have not already added this, add it now
7953                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7954                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7955                         then
7956                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7957
7958 echo "${as_me:-configure}:7958: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7959
7960                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7961                         fi
7962                 fi
7963                 ;;
7964         esac
7965         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7966 done
7967 LDFLAGS=$cf_rpath_dst
7968
7969 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7970
7971 echo "${as_me:-configure}:7971: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7972
7973 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7974
7975 echo "${as_me:-configure}:7975: testing ...checking LIBS $LIBS ..." 1>&5
7976
7977 cf_rpath_dst=
7978 for cf_rpath_src in $LIBS
7979 do
7980         case $cf_rpath_src in
7981         (-L*)
7982
7983                 # check if this refers to a directory which we will ignore
7984                 cf_rpath_skip=no
7985                 if test -n "$cf_rpath_list"
7986                 then
7987                         for cf_rpath_item in $cf_rpath_list
7988                         do
7989                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7990                                 then
7991                                         cf_rpath_skip=yes
7992                                         break
7993                                 fi
7994                         done
7995                 fi
7996
7997                 if test "$cf_rpath_skip" = no
7998                 then
7999                         # transform the option
8000                         if test "$LD_RPATH_OPT" = "-R " ; then
8001                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8002                         else
8003                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8004                         fi
8005
8006                         # if we have not already added this, add it now
8007                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8008                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8009                         then
8010                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8011
8012 echo "${as_me:-configure}:8012: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8013
8014                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8015                         fi
8016                 fi
8017                 ;;
8018         esac
8019         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8020 done
8021 LIBS=$cf_rpath_dst
8022
8023 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8024
8025 echo "${as_me:-configure}:8025: testing ...checked LIBS $LIBS ..." 1>&5
8026
8027         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8028
8029 echo "${as_me:-configure}:8029: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8030
8031 else
8032         echo "$as_me:8032: result: no" >&5
8033 echo "${ECHO_T}no" >&6
8034 fi
8035
8036 fi
8037
8038 fi
8039
8040 ### Depending on the system, someone may use rpath to build ncurses but not
8041 # want users of the package to rely upon that feature.  Give those people an
8042 # option to suppress that detail from EXTRA_LDFLAGS.
8043 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8044 if test -n "$EXTRA_PKG_LDFLAGS"
8045 then
8046         echo "$as_me:8046: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8047 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8048
8049 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8050 if test "${enable_pkg_ldflags+set}" = set; then
8051   enableval="$enable_pkg_ldflags"
8052   test "$enableval" != no && enableval=yes
8053         if test "$enableval" != "yes" ; then
8054     disable_pkg_ldflags=yes
8055         else
8056                 disable_pkg_ldflags=no
8057         fi
8058 else
8059   enableval=yes
8060         disable_pkg_ldflags=no
8061
8062 fi;
8063         echo "$as_me:8063: result: $disable_pkg_ldflags" >&5
8064 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8065         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8066 fi
8067
8068 ###############################################################################
8069
8070 ###     use option --with-extra-suffix to append suffix to headers and libraries
8071 echo "$as_me:8071: checking if you wish to append extra suffix to header/library paths" >&5
8072 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8073 EXTRA_SUFFIX=
8074
8075 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8076 if test "${with_extra_suffix+set}" = set; then
8077   withval="$with_extra_suffix"
8078   case x$withval in
8079         (no)
8080                 ;;
8081         (xyes|x)
8082                 EXTRA_SUFFIX=$cf_cv_abi_version
8083                 ;;
8084         (*)
8085                 EXTRA_SUFFIX=$withval
8086                 ;;
8087         esac
8088
8089 fi;
8090 echo "$as_me:8090: result: $EXTRA_SUFFIX" >&5
8091 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8092
8093 ###     use option --disable-overwrite to leave out the link to -lcurses
8094 echo "$as_me:8094: checking if you wish to install ncurses overwriting curses" >&5
8095 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8096
8097 # Check whether --enable-overwrite or --disable-overwrite was given.
8098 if test "${enable_overwrite+set}" = set; then
8099   enableval="$enable_overwrite"
8100   with_overwrite=$enableval
8101 else
8102   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8103 fi;
8104 echo "$as_me:8104: result: $with_overwrite" >&5
8105 echo "${ECHO_T}$with_overwrite" >&6
8106
8107 echo "$as_me:8107: checking if external terminfo-database is used" >&5
8108 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8109
8110 # Check whether --enable-database or --disable-database was given.
8111 if test "${enable_database+set}" = set; then
8112   enableval="$enable_database"
8113   use_database=$enableval
8114 else
8115   use_database=yes
8116 fi;
8117 echo "$as_me:8117: result: $use_database" >&5
8118 echo "${ECHO_T}$use_database" >&6
8119
8120 case $host_os in
8121 (os2*)
8122         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8123         ;;
8124 (*)
8125         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8126         ;;
8127 esac
8128
8129 NCURSES_USE_DATABASE=0
8130 if test "$use_database" != no ; then
8131         NCURSES_USE_DATABASE=1
8132
8133         echo "$as_me:8133: checking which terminfo source-file will be installed" >&5
8134 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8135
8136 # Check whether --with-database or --without-database was given.
8137 if test "${with_database+set}" = set; then
8138   withval="$with_database"
8139   TERMINFO_SRC=$withval
8140 fi;
8141         echo "$as_me:8141: result: $TERMINFO_SRC" >&5
8142 echo "${ECHO_T}$TERMINFO_SRC" >&6
8143
8144         echo "$as_me:8144: checking whether to use hashed database instead of directory/tree" >&5
8145 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8146
8147 # Check whether --with-hashed-db or --without-hashed-db was given.
8148 if test "${with_hashed_db+set}" = set; then
8149   withval="$with_hashed_db"
8150
8151 else
8152   with_hashed_db=no
8153 fi;
8154         echo "$as_me:8154: result: $with_hashed_db" >&5
8155 echo "${ECHO_T}$with_hashed_db" >&6
8156 else
8157         with_hashed_db=no
8158 fi
8159
8160 echo "$as_me:8160: checking for list of fallback descriptions" >&5
8161 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8162
8163 # Check whether --with-fallbacks or --without-fallbacks was given.
8164 if test "${with_fallbacks+set}" = set; then
8165   withval="$with_fallbacks"
8166   with_fallback=$withval
8167 else
8168   with_fallback=
8169 fi;
8170 echo "$as_me:8170: result: $with_fallback" >&5
8171 echo "${ECHO_T}$with_fallback" >&6
8172
8173 case ".$with_fallback" in
8174 (.|.no)
8175         FALLBACK_LIST=
8176         ;;
8177 (.yes)
8178         { echo "$as_me:8178: WARNING: expected a list of terminal descriptions" >&5
8179 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8180         ;;
8181 (*)
8182         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8183         ;;
8184 esac
8185
8186 USE_FALLBACKS=
8187 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8188
8189 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8190 # tree for generating the terminal descriptions that will be compiled into the
8191 # library.  If your toolchain is old, it may not handle current terminal
8192 # databases.  Use configure-options to point to the tools which will be used,
8193 # rather than the first ones found on the $PATH.
8194 if test -n "$FALLBACK_LIST"
8195 then
8196
8197 # Check whether --with-tic-path or --without-tic-path was given.
8198 if test "${with_tic_path+set}" = set; then
8199   withval="$with_tic_path"
8200   echo "$as_me:8200: checking for tic program for fallbacks" >&5
8201 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8202                 TIC=$withval
8203                 echo "$as_me:8203: result: $TIC" >&5
8204 echo "${ECHO_T}$TIC" >&6
8205
8206 if test "x$prefix" != xNONE; then
8207         cf_path_syntax="$prefix"
8208 else
8209         cf_path_syntax="$ac_default_prefix"
8210 fi
8211
8212 case ".$TIC" in
8213 (.\$\(*\)*|.\'*\'*)
8214         ;;
8215 (..|./*|.\\*)
8216         ;;
8217 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8218         ;;
8219 (.\${*prefix}*|.\${*dir}*)
8220         eval TIC="$TIC"
8221         case ".$TIC" in
8222         (.NONE/*)
8223                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8224                 ;;
8225         esac
8226         ;;
8227 (.no|.NONE/*)
8228         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8229         ;;
8230 (*)
8231         { { echo "$as_me:8231: error: expected a pathname, not \"$TIC\"" >&5
8232 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8233    { (exit 1); exit 1; }; }
8234         ;;
8235 esac
8236
8237 else
8238
8239 test -z "$TIC" && TIC=tic
8240 for ac_prog in $TIC tic
8241 do
8242   # Extract the first word of "$ac_prog", so it can be a program name with args.
8243 set dummy $ac_prog; ac_word=$2
8244 echo "$as_me:8244: checking for $ac_word" >&5
8245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8246 if test "${ac_cv_path_TIC+set}" = set; then
8247   echo $ECHO_N "(cached) $ECHO_C" >&6
8248 else
8249   case $TIC in
8250   [\\/]* | ?:[\\/]*)
8251   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8252   ;;
8253   *)
8254   ac_save_IFS=$IFS; IFS=$ac_path_separator
8255 ac_dummy="$PATH:/usr/local/ncurses/bin"
8256 for ac_dir in $ac_dummy; do
8257   IFS=$ac_save_IFS
8258   test -z "$ac_dir" && ac_dir=.
8259   if $as_executable_p "$ac_dir/$ac_word"; then
8260    ac_cv_path_TIC="$ac_dir/$ac_word"
8261    echo "$as_me:8261: found $ac_dir/$ac_word" >&5
8262    break
8263 fi
8264 done
8265
8266   ;;
8267 esac
8268 fi
8269 TIC=$ac_cv_path_TIC
8270
8271 if test -n "$TIC"; then
8272   echo "$as_me:8272: result: $TIC" >&5
8273 echo "${ECHO_T}$TIC" >&6
8274 else
8275   echo "$as_me:8275: result: no" >&5
8276 echo "${ECHO_T}no" >&6
8277 fi
8278
8279   test -n "$TIC" && break
8280 done
8281 test -n "$TIC" || TIC="$TIC"
8282
8283 cf_path_prog=""
8284 cf_path_args=""
8285 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8286 for cf_temp in $ac_cv_path_TIC
8287 do
8288         if test -z "$cf_path_prog" ; then
8289                 if test "$with_full_paths" = yes ; then
8290
8291 if test "x$prefix" != xNONE; then
8292         cf_path_syntax="$prefix"
8293 else
8294         cf_path_syntax="$ac_default_prefix"
8295 fi
8296
8297 case ".$cf_temp" in
8298 (.\$\(*\)*|.\'*\'*)
8299         ;;
8300 (..|./*|.\\*)
8301         ;;
8302 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8303         ;;
8304 (.\${*prefix}*|.\${*dir}*)
8305         eval cf_temp="$cf_temp"
8306         case ".$cf_temp" in
8307         (.NONE/*)
8308                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8309                 ;;
8310         esac
8311         ;;
8312 (.no|.NONE/*)
8313         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8314         ;;
8315 (*)
8316         break
8317         ;;
8318 esac
8319
8320                         cf_path_prog="$cf_temp"
8321                 else
8322                         cf_path_prog="`basename $cf_temp`"
8323                 fi
8324         elif test -z "$cf_path_args" ; then
8325                 cf_path_args="$cf_temp"
8326         else
8327                 cf_path_args="$cf_path_args $cf_temp"
8328         fi
8329 done
8330 IFS="$cf_save_ifs"
8331
8332 if test -n "$cf_path_prog" ; then
8333
8334 echo "${as_me:-configure}:8334: testing defining path for ${cf_path_prog} ..." 1>&5
8335
8336 cat >>confdefs.h <<EOF
8337 #define TIC_PATH "$cf_path_prog"
8338 EOF
8339
8340         test -n "$cf_path_args" &&
8341 cat >>confdefs.h <<EOF
8342 #define TIC_ARGS "$cf_path_args"
8343 EOF
8344
8345 fi
8346
8347                 if test -z "$TIC"
8348                 then
8349                         { echo "$as_me:8349: WARNING: no tic program found for fallbacks" >&5
8350 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8351                 fi
8352
8353 fi;
8354
8355 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8356 if test "${with_infocmp_path+set}" = set; then
8357   withval="$with_infocmp_path"
8358   echo "$as_me:8358: checking for infocmp program for fallbacks" >&5
8359 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8360                 INFOCMP=$withval
8361                 echo "$as_me:8361: result: $INFOCMP" >&5
8362 echo "${ECHO_T}$INFOCMP" >&6
8363
8364 if test "x$prefix" != xNONE; then
8365         cf_path_syntax="$prefix"
8366 else
8367         cf_path_syntax="$ac_default_prefix"
8368 fi
8369
8370 case ".$INFOCMP" in
8371 (.\$\(*\)*|.\'*\'*)
8372         ;;
8373 (..|./*|.\\*)
8374         ;;
8375 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8376         ;;
8377 (.\${*prefix}*|.\${*dir}*)
8378         eval INFOCMP="$INFOCMP"
8379         case ".$INFOCMP" in
8380         (.NONE/*)
8381                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8382                 ;;
8383         esac
8384         ;;
8385 (.no|.NONE/*)
8386         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8387         ;;
8388 (*)
8389         { { echo "$as_me:8389: error: expected a pathname, not \"$INFOCMP\"" >&5
8390 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8391    { (exit 1); exit 1; }; }
8392         ;;
8393 esac
8394
8395 else
8396
8397 test -z "$INFOCMP" && INFOCMP=infocmp
8398 for ac_prog in $INFOCMP infocmp
8399 do
8400   # Extract the first word of "$ac_prog", so it can be a program name with args.
8401 set dummy $ac_prog; ac_word=$2
8402 echo "$as_me:8402: checking for $ac_word" >&5
8403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8404 if test "${ac_cv_path_INFOCMP+set}" = set; then
8405   echo $ECHO_N "(cached) $ECHO_C" >&6
8406 else
8407   case $INFOCMP in
8408   [\\/]* | ?:[\\/]*)
8409   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8410   ;;
8411   *)
8412   ac_save_IFS=$IFS; IFS=$ac_path_separator
8413 ac_dummy="$PATH:/usr/local/ncurses/bin"
8414 for ac_dir in $ac_dummy; do
8415   IFS=$ac_save_IFS
8416   test -z "$ac_dir" && ac_dir=.
8417   if $as_executable_p "$ac_dir/$ac_word"; then
8418    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8419    echo "$as_me:8419: found $ac_dir/$ac_word" >&5
8420    break
8421 fi
8422 done
8423
8424   ;;
8425 esac
8426 fi
8427 INFOCMP=$ac_cv_path_INFOCMP
8428
8429 if test -n "$INFOCMP"; then
8430   echo "$as_me:8430: result: $INFOCMP" >&5
8431 echo "${ECHO_T}$INFOCMP" >&6
8432 else
8433   echo "$as_me:8433: result: no" >&5
8434 echo "${ECHO_T}no" >&6
8435 fi
8436
8437   test -n "$INFOCMP" && break
8438 done
8439 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8440
8441 cf_path_prog=""
8442 cf_path_args=""
8443 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8444 for cf_temp in $ac_cv_path_INFOCMP
8445 do
8446         if test -z "$cf_path_prog" ; then
8447                 if test "$with_full_paths" = yes ; then
8448
8449 if test "x$prefix" != xNONE; then
8450         cf_path_syntax="$prefix"
8451 else
8452         cf_path_syntax="$ac_default_prefix"
8453 fi
8454
8455 case ".$cf_temp" in
8456 (.\$\(*\)*|.\'*\'*)
8457         ;;
8458 (..|./*|.\\*)
8459         ;;
8460 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8461         ;;
8462 (.\${*prefix}*|.\${*dir}*)
8463         eval cf_temp="$cf_temp"
8464         case ".$cf_temp" in
8465         (.NONE/*)
8466                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8467                 ;;
8468         esac
8469         ;;
8470 (.no|.NONE/*)
8471         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8472         ;;
8473 (*)
8474         break
8475         ;;
8476 esac
8477
8478                         cf_path_prog="$cf_temp"
8479                 else
8480                         cf_path_prog="`basename $cf_temp`"
8481                 fi
8482         elif test -z "$cf_path_args" ; then
8483                 cf_path_args="$cf_temp"
8484         else
8485                 cf_path_args="$cf_path_args $cf_temp"
8486         fi
8487 done
8488 IFS="$cf_save_ifs"
8489
8490 if test -n "$cf_path_prog" ; then
8491
8492 echo "${as_me:-configure}:8492: testing defining path for ${cf_path_prog} ..." 1>&5
8493
8494 cat >>confdefs.h <<EOF
8495 #define INFOCMP_PATH "$cf_path_prog"
8496 EOF
8497
8498         test -n "$cf_path_args" &&
8499 cat >>confdefs.h <<EOF
8500 #define INFOCMP_ARGS "$cf_path_args"
8501 EOF
8502
8503 fi
8504
8505                 if test -z "$INFOCMP"
8506                 then
8507                         { echo "$as_me:8507: WARNING: no infocmp program found for fallbacks" >&5
8508 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8509                 fi
8510
8511 fi;
8512
8513 else
8514         : ${TIC:=tic}
8515         : ${INFOCMP:=infocmp}
8516 fi
8517
8518 echo "$as_me:8518: checking if you want modern xterm or antique" >&5
8519 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8520
8521 # Check whether --with-xterm-new or --without-xterm-new was given.
8522 if test "${with_xterm_new+set}" = set; then
8523   withval="$with_xterm_new"
8524   with_xterm_new=$withval
8525 else
8526   with_xterm_new=yes
8527 fi;
8528 case $with_xterm_new in
8529 (no) with_xterm_new=xterm-old;;
8530 (*)      with_xterm_new=xterm-new;;
8531 esac
8532 echo "$as_me:8532: result: $with_xterm_new" >&5
8533 echo "${ECHO_T}$with_xterm_new" >&6
8534 WHICH_XTERM=$with_xterm_new
8535
8536 echo "$as_me:8536: checking if xterm backspace sends BS or DEL" >&5
8537 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8538
8539 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8540 if test "${with_xterm_kbs+set}" = set; then
8541   withval="$with_xterm_kbs"
8542   with_xterm_kbs=$withval
8543 else
8544   with_xterm_kbs=BS
8545 fi;
8546 case x$with_xterm_kbs in
8547 (xyes|xno|xBS|xbs|x8)
8548         with_xterm_kbs=BS
8549         ;;
8550 (xDEL|xdel|x127)
8551         with_xterm_kbs=DEL
8552         ;;
8553 (*)
8554         with_xterm_kbs=$withval
8555         ;;
8556 esac
8557 echo "$as_me:8557: result: $with_xterm_kbs" >&5
8558 echo "${ECHO_T}$with_xterm_kbs" >&6
8559 XTERM_KBS=$with_xterm_kbs
8560
8561 MAKE_TERMINFO=
8562 if test "$use_database" = no ; then
8563         TERMINFO="${datadir}/terminfo"
8564         MAKE_TERMINFO="#"
8565 else
8566
8567 echo "$as_me:8567: checking for list of terminfo directories" >&5
8568 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8569
8570 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8571 if test "${with_terminfo_dirs+set}" = set; then
8572   withval="$with_terminfo_dirs"
8573
8574 else
8575   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8576 fi;
8577 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8578 cf_dst_path=
8579 for cf_src_path in $withval
8580 do
8581
8582 if test "x$prefix" != xNONE; then
8583         cf_path_syntax="$prefix"
8584 else
8585         cf_path_syntax="$ac_default_prefix"
8586 fi
8587
8588 case ".$cf_src_path" in
8589 (.\$\(*\)*|.\'*\'*)
8590         ;;
8591 (..|./*|.\\*)
8592         ;;
8593 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8594         ;;
8595 (.\${*prefix}*|.\${*dir}*)
8596         eval cf_src_path="$cf_src_path"
8597         case ".$cf_src_path" in
8598         (.NONE/*)
8599                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8600                 ;;
8601         esac
8602         ;;
8603 (.no|.NONE/*)
8604         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8605         ;;
8606 (*)
8607         { { echo "$as_me:8607: error: expected a pathname, not \"$cf_src_path\"" >&5
8608 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8609    { (exit 1); exit 1; }; }
8610         ;;
8611 esac
8612
8613   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8614   cf_dst_path="${cf_dst_path}${cf_src_path}"
8615 done
8616 IFS="$ac_save_ifs"
8617
8618 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8619 # so we have to check/work around.  We do prefer the result of "eval"...
8620 eval cf_dst_eval="$cf_dst_path"
8621 case "x$cf_dst_eval" in
8622 (xNONE*)
8623         TERMINFO_DIRS=$cf_dst_path
8624         ;;
8625 (*)
8626         TERMINFO_DIRS="$cf_dst_eval"
8627         ;;
8628 esac
8629
8630 echo "$as_me:8630: result: $TERMINFO_DIRS" >&5
8631 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8632 test -n "$TERMINFO_DIRS" &&
8633 cat >>confdefs.h <<EOF
8634 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8635 EOF
8636
8637 case "x$TERMINFO" in
8638 x???:*)
8639         { echo "$as_me:8639: WARNING: ignoring non-directory/file TERMINFO value" >&5
8640 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8641         unset TERMINFO
8642         ;;
8643 esac
8644
8645 echo "$as_me:8645: checking for default terminfo directory" >&5
8646 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8647
8648 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8649 if test "${with_default_terminfo_dir+set}" = set; then
8650   withval="$with_default_terminfo_dir"
8651
8652 else
8653   withval="${TERMINFO:-${datadir}/terminfo}"
8654 fi; if test -n "${datadir}/terminfo" ; then
8655
8656 if test "x$prefix" != xNONE; then
8657         cf_path_syntax="$prefix"
8658 else
8659         cf_path_syntax="$ac_default_prefix"
8660 fi
8661
8662 case ".$withval" in
8663 (.\$\(*\)*|.\'*\'*)
8664         ;;
8665 (..|./*|.\\*)
8666         ;;
8667 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8668         ;;
8669 (.\${*prefix}*|.\${*dir}*)
8670         eval withval="$withval"
8671         case ".$withval" in
8672         (.NONE/*)
8673                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8674                 ;;
8675         esac
8676         ;;
8677 (.no|.NONE/*)
8678         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8679         ;;
8680 (*)
8681         { { echo "$as_me:8681: error: expected a pathname, not \"$withval\"" >&5
8682 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8683    { (exit 1); exit 1; }; }
8684         ;;
8685 esac
8686
8687 fi
8688 eval TERMINFO="$withval"
8689
8690 echo "$as_me:8690: result: $TERMINFO" >&5
8691 echo "${ECHO_T}$TERMINFO" >&6
8692
8693 cat >>confdefs.h <<EOF
8694 #define TERMINFO "$TERMINFO"
8695 EOF
8696
8697 fi
8698
8699 ###     use option --disable-big-core to make tic run on small machines
8700 ###     We need 4Mb, check if we can allocate 50% more than that.
8701 echo "$as_me:8701: checking if big-core option selected" >&5
8702 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8703
8704 # Check whether --enable-big-core or --disable-big-core was given.
8705 if test "${enable_big_core+set}" = set; then
8706   enableval="$enable_big_core"
8707   with_big_core=$enableval
8708 else
8709   if test "$cross_compiling" = yes; then
8710   with_big_core=no
8711 else
8712   cat >conftest.$ac_ext <<_ACEOF
8713 #line 8713 "configure"
8714 #include "confdefs.h"
8715
8716 #include <stdlib.h>
8717 #include <string.h>
8718 int main() {
8719         unsigned long n = 6000000L;
8720         char *s = malloc(n);
8721         if (s != 0)
8722                 s[0] = s[n-1] = 0;
8723         ${cf_cv_main_return:-return}(s == 0);
8724 }
8725 _ACEOF
8726 rm -f conftest$ac_exeext
8727 if { (eval echo "$as_me:8727: \"$ac_link\"") >&5
8728   (eval $ac_link) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8732   { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733   (eval $ac_try) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); }; }; then
8737   with_big_core=yes
8738 else
8739   echo "$as_me: program exited with status $ac_status" >&5
8740 echo "$as_me: failed program was:" >&5
8741 cat conftest.$ac_ext >&5
8742 with_big_core=no
8743 fi
8744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8745 fi
8746 fi;
8747 echo "$as_me:8747: result: $with_big_core" >&5
8748 echo "${ECHO_T}$with_big_core" >&6
8749 test "x$with_big_core" = "xyes" &&
8750 cat >>confdefs.h <<\EOF
8751 #define HAVE_BIG_CORE 1
8752 EOF
8753
8754 ### ISO C only guarantees 512-char strings, we have tables which load faster
8755 ### when constructed using "big" strings.  More than the C compiler, the awk
8756 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8757 echo "$as_me:8757: checking if big-strings option selected" >&5
8758 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8759
8760 # Check whether --enable-big-strings or --disable-big-strings was given.
8761 if test "${enable_big_strings+set}" = set; then
8762   enableval="$enable_big_strings"
8763   with_big_strings=$enableval
8764 else
8765
8766         case x$AWK in
8767         (x)
8768                 eval with_big_strings=no
8769                 ;;
8770         (*)
8771                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8772                         | $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
8773                         eval with_big_strings=yes
8774                 else
8775                         eval with_big_strings=no
8776                 fi
8777                 ;;
8778         esac
8779
8780 fi;
8781 echo "$as_me:8781: result: $with_big_strings" >&5
8782 echo "${ECHO_T}$with_big_strings" >&6
8783
8784 USE_BIG_STRINGS=0
8785 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8786
8787 ###     use option --enable-termcap to compile in the termcap fallback support
8788 echo "$as_me:8788: checking if you want termcap-fallback support" >&5
8789 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8790
8791 # Check whether --enable-termcap or --disable-termcap was given.
8792 if test "${enable_termcap+set}" = set; then
8793   enableval="$enable_termcap"
8794   with_termcap=$enableval
8795 else
8796   with_termcap=no
8797 fi;
8798 echo "$as_me:8798: result: $with_termcap" >&5
8799 echo "${ECHO_T}$with_termcap" >&6
8800
8801 NCURSES_USE_TERMCAP=0
8802 if test "x$with_termcap" != "xyes" ; then
8803         if test "$use_database" = no ; then
8804                 if test -z "$with_fallback" ; then
8805                         { { echo "$as_me:8805: error: You have disabled the database w/o specifying fallbacks" >&5
8806 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8807    { (exit 1); exit 1; }; }
8808                 fi
8809         fi
8810
8811 cat >>confdefs.h <<\EOF
8812 #define PURE_TERMINFO 1
8813 EOF
8814
8815 else
8816
8817         if test "$with_ticlib" != no ; then
8818                 { { echo "$as_me:8818: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8819 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8820    { (exit 1); exit 1; }; }
8821         fi
8822
8823         NCURSES_USE_TERMCAP=1
8824         echo "$as_me:8824: checking for list of termcap files" >&5
8825 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8826
8827 # Check whether --with-termpath or --without-termpath was given.
8828 if test "${with_termpath+set}" = set; then
8829   withval="$with_termpath"
8830
8831 else
8832   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8833 fi;
8834 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8835 cf_dst_path=
8836 for cf_src_path in $withval
8837 do
8838
8839 if test "x$prefix" != xNONE; then
8840         cf_path_syntax="$prefix"
8841 else
8842         cf_path_syntax="$ac_default_prefix"
8843 fi
8844
8845 case ".$cf_src_path" in
8846 (.\$\(*\)*|.\'*\'*)
8847         ;;
8848 (..|./*|.\\*)
8849         ;;
8850 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8851         ;;
8852 (.\${*prefix}*|.\${*dir}*)
8853         eval cf_src_path="$cf_src_path"
8854         case ".$cf_src_path" in
8855         (.NONE/*)
8856                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8857                 ;;
8858         esac
8859         ;;
8860 (.no|.NONE/*)
8861         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8862         ;;
8863 (*)
8864         { { echo "$as_me:8864: error: expected a pathname, not \"$cf_src_path\"" >&5
8865 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8866    { (exit 1); exit 1; }; }
8867         ;;
8868 esac
8869
8870   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8871   cf_dst_path="${cf_dst_path}${cf_src_path}"
8872 done
8873 IFS="$ac_save_ifs"
8874
8875 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8876 # so we have to check/work around.  We do prefer the result of "eval"...
8877 eval cf_dst_eval="$cf_dst_path"
8878 case "x$cf_dst_eval" in
8879 (xNONE*)
8880         TERMPATH=$cf_dst_path
8881         ;;
8882 (*)
8883         TERMPATH="$cf_dst_eval"
8884         ;;
8885 esac
8886
8887         echo "$as_me:8887: result: $TERMPATH" >&5
8888 echo "${ECHO_T}$TERMPATH" >&6
8889         test -n "$TERMPATH" &&
8890 cat >>confdefs.h <<EOF
8891 #define TERMPATH "$TERMPATH"
8892 EOF
8893
8894         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8895         echo "$as_me:8895: checking if fast termcap-loader is needed" >&5
8896 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8897
8898 # Check whether --enable-getcap or --disable-getcap was given.
8899 if test "${enable_getcap+set}" = set; then
8900   enableval="$enable_getcap"
8901   with_getcap=$enableval
8902 else
8903   with_getcap=no
8904 fi;
8905         echo "$as_me:8905: result: $with_getcap" >&5
8906 echo "${ECHO_T}$with_getcap" >&6
8907         test "x$with_getcap" = "xyes" &&
8908 cat >>confdefs.h <<\EOF
8909 #define USE_GETCAP 1
8910 EOF
8911
8912         echo "$as_me:8912: checking if translated termcaps will be cached in ~/.terminfo" >&5
8913 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8914
8915 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8916 if test "${enable_getcap_cache+set}" = set; then
8917   enableval="$enable_getcap_cache"
8918   with_getcap_cache=$enableval
8919 else
8920   with_getcap_cache=no
8921 fi;
8922         echo "$as_me:8922: result: $with_getcap_cache" >&5
8923 echo "${ECHO_T}$with_getcap_cache" >&6
8924         test "x$with_getcap_cache" = "xyes" &&
8925 cat >>confdefs.h <<\EOF
8926 #define USE_GETCAP_CACHE 1
8927 EOF
8928
8929 fi
8930
8931 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8932 echo "$as_me:8932: checking if ~/.terminfo is wanted" >&5
8933 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8934
8935 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8936 if test "${enable_home_terminfo+set}" = set; then
8937   enableval="$enable_home_terminfo"
8938   with_home_terminfo=$enableval
8939 else
8940   with_home_terminfo=yes
8941 fi;
8942 echo "$as_me:8942: result: $with_home_terminfo" >&5
8943 echo "${ECHO_T}$with_home_terminfo" >&6
8944 test "x$with_home_terminfo" = "xyes" &&
8945 cat >>confdefs.h <<\EOF
8946 #define USE_HOME_TERMINFO 1
8947 EOF
8948
8949 echo "$as_me:8949: checking if you want to use restricted environment when running as root" >&5
8950 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8951
8952 # Check whether --enable-root-environ or --disable-root-environ was given.
8953 if test "${enable_root_environ+set}" = set; then
8954   enableval="$enable_root_environ"
8955   with_root_environ=$enableval
8956 else
8957   with_root_environ=yes
8958 fi;
8959 echo "$as_me:8959: result: $with_root_environ" >&5
8960 echo "${ECHO_T}$with_root_environ" >&6
8961 test "x$with_root_environ" = xyes &&
8962 cat >>confdefs.h <<\EOF
8963 #define USE_ROOT_ENVIRON 1
8964 EOF
8965
8966 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8967 ###   to reduce storage requirements for the terminfo database.
8968
8969 for ac_header in \
8970 unistd.h \
8971
8972 do
8973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8974 echo "$as_me:8974: checking for $ac_header" >&5
8975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8977   echo $ECHO_N "(cached) $ECHO_C" >&6
8978 else
8979   cat >conftest.$ac_ext <<_ACEOF
8980 #line 8980 "configure"
8981 #include "confdefs.h"
8982 #include <$ac_header>
8983 _ACEOF
8984 if { (eval echo "$as_me:8984: \"$ac_cpp conftest.$ac_ext\"") >&5
8985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8986   ac_status=$?
8987   egrep -v '^ *\+' conftest.er1 >conftest.err
8988   rm -f conftest.er1
8989   cat conftest.err >&5
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } >/dev/null; then
8992   if test -s conftest.err; then
8993     ac_cpp_err=$ac_c_preproc_warn_flag
8994   else
8995     ac_cpp_err=
8996   fi
8997 else
8998   ac_cpp_err=yes
8999 fi
9000 if test -z "$ac_cpp_err"; then
9001   eval "$as_ac_Header=yes"
9002 else
9003   echo "$as_me: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   eval "$as_ac_Header=no"
9006 fi
9007 rm -f conftest.err conftest.$ac_ext
9008 fi
9009 echo "$as_me:9009: result: `eval echo '${'$as_ac_Header'}'`" >&5
9010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9012   cat >>confdefs.h <<EOF
9013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9014 EOF
9015
9016 fi
9017 done
9018
9019 for ac_func in \
9020         remove \
9021         unlink
9022 do
9023 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9024 echo "$as_me:9024: checking for $ac_func" >&5
9025 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9026 if eval "test \"\${$as_ac_var+set}\" = set"; then
9027   echo $ECHO_N "(cached) $ECHO_C" >&6
9028 else
9029   cat >conftest.$ac_ext <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032 #define $ac_func autoconf_temporary
9033 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9034 #undef $ac_func
9035
9036 #ifdef __cplusplus
9037 extern "C"
9038 #endif
9039
9040 /* We use char because int might match the return type of a gcc2
9041    builtin and then its argument prototype would still apply.  */
9042 char $ac_func (void);
9043
9044 int
9045 main (void)
9046 {
9047
9048 /* The GNU C library defines stubs for functions which it implements
9049     to always fail with ENOSYS.  Some functions are actually named
9050     something starting with __ and the normal name is an alias.  */
9051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9052 #error found stub for $ac_func
9053 #endif
9054
9055         return $ac_func ();
9056   ;
9057   return 0;
9058 }
9059 _ACEOF
9060 rm -f conftest.$ac_objext conftest$ac_exeext
9061 if { (eval echo "$as_me:9061: \"$ac_link\"") >&5
9062   (eval $ac_link) 2>&5
9063   ac_status=$?
9064   echo "$as_me:9064: \$? = $ac_status" >&5
9065   (exit $ac_status); } &&
9066          { ac_try='test -s conftest$ac_exeext'
9067   { (eval echo "$as_me:9067: \"$ac_try\"") >&5
9068   (eval $ac_try) 2>&5
9069   ac_status=$?
9070   echo "$as_me:9070: \$? = $ac_status" >&5
9071   (exit $ac_status); }; }; then
9072   eval "$as_ac_var=yes"
9073 else
9074   echo "$as_me: failed program was:" >&5
9075 cat conftest.$ac_ext >&5
9076 eval "$as_ac_var=no"
9077 fi
9078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9079 fi
9080 echo "$as_me:9080: result: `eval echo '${'$as_ac_var'}'`" >&5
9081 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9082 if test `eval echo '${'$as_ac_var'}'` = yes; then
9083   cat >>confdefs.h <<EOF
9084 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9085 EOF
9086
9087 fi
9088 done
9089
9090 if test "$cross_compiling" = yes ; then
9091
9092 for ac_func in \
9093                 link \
9094                 symlink
9095 do
9096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9097 echo "$as_me:9097: checking for $ac_func" >&5
9098 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9099 if eval "test \"\${$as_ac_var+set}\" = set"; then
9100   echo $ECHO_N "(cached) $ECHO_C" >&6
9101 else
9102   cat >conftest.$ac_ext <<_ACEOF
9103 #line 9103 "configure"
9104 #include "confdefs.h"
9105 #define $ac_func autoconf_temporary
9106 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9107 #undef $ac_func
9108
9109 #ifdef __cplusplus
9110 extern "C"
9111 #endif
9112
9113 /* We use char because int might match the return type of a gcc2
9114    builtin and then its argument prototype would still apply.  */
9115 char $ac_func (void);
9116
9117 int
9118 main (void)
9119 {
9120
9121 /* The GNU C library defines stubs for functions which it implements
9122     to always fail with ENOSYS.  Some functions are actually named
9123     something starting with __ and the normal name is an alias.  */
9124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9125 #error found stub for $ac_func
9126 #endif
9127
9128         return $ac_func ();
9129   ;
9130   return 0;
9131 }
9132 _ACEOF
9133 rm -f conftest.$ac_objext conftest$ac_exeext
9134 if { (eval echo "$as_me:9134: \"$ac_link\"") >&5
9135   (eval $ac_link) 2>&5
9136   ac_status=$?
9137   echo "$as_me:9137: \$? = $ac_status" >&5
9138   (exit $ac_status); } &&
9139          { ac_try='test -s conftest$ac_exeext'
9140   { (eval echo "$as_me:9140: \"$ac_try\"") >&5
9141   (eval $ac_try) 2>&5
9142   ac_status=$?
9143   echo "$as_me:9143: \$? = $ac_status" >&5
9144   (exit $ac_status); }; }; then
9145   eval "$as_ac_var=yes"
9146 else
9147   echo "$as_me: failed program was:" >&5
9148 cat conftest.$ac_ext >&5
9149 eval "$as_ac_var=no"
9150 fi
9151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9152 fi
9153 echo "$as_me:9153: result: `eval echo '${'$as_ac_var'}'`" >&5
9154 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9155 if test `eval echo '${'$as_ac_var'}'` = yes; then
9156   cat >>confdefs.h <<EOF
9157 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9158 EOF
9159
9160 fi
9161 done
9162
9163 else
9164         echo "$as_me:9164: checking if link/symlink functions work" >&5
9165 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9166 if test "${cf_cv_link_funcs+set}" = set; then
9167   echo $ECHO_N "(cached) $ECHO_C" >&6
9168 else
9169
9170                 cf_cv_link_funcs=
9171                 for cf_func in link symlink ; do
9172                         if test "$cross_compiling" = yes; then
9173
9174                         eval 'ac_cv_func_'$cf_func'=error'
9175 else
9176   cat >conftest.$ac_ext <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179
9180 #include <sys/types.h>
9181 #include <sys/stat.h>
9182 #ifdef HAVE_UNISTD_H
9183 #include <unistd.h>
9184 #endif
9185 int main(void)
9186 {
9187         int fail = 0;
9188         char *src = "config.log";
9189         char *dst = "conftest.chk";
9190         struct stat src_sb;
9191         struct stat dst_sb;
9192
9193         stat(src, &src_sb);
9194         fail = ($cf_func("config.log", "conftest.chk") < 0)
9195             || (stat(dst, &dst_sb) < 0)
9196             || (dst_sb.st_mtime != src_sb.st_mtime);
9197 #ifdef HAVE_UNLINK
9198         unlink(dst);
9199 #else
9200         remove(dst);
9201 #endif
9202         ${cf_cv_main_return:-return} (fail);
9203 }
9204
9205 _ACEOF
9206 rm -f conftest$ac_exeext
9207 if { (eval echo "$as_me:9207: \"$ac_link\"") >&5
9208   (eval $ac_link) 2>&5
9209   ac_status=$?
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217
9218                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9219                         eval 'ac_cv_func_'$cf_func'=yes'
9220 else
9221   echo "$as_me: program exited with status $ac_status" >&5
9222 echo "$as_me: failed program was:" >&5
9223 cat conftest.$ac_ext >&5
9224
9225                         eval 'ac_cv_func_'$cf_func'=no'
9226 fi
9227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9228 fi
9229                 done
9230                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9231
9232 fi
9233 echo "$as_me:9233: result: $cf_cv_link_funcs" >&5
9234 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9235         test "$ac_cv_func_link"    = yes &&
9236 cat >>confdefs.h <<\EOF
9237 #define HAVE_LINK 1
9238 EOF
9239
9240         test "$ac_cv_func_symlink" = yes &&
9241 cat >>confdefs.h <<\EOF
9242 #define HAVE_SYMLINK 1
9243 EOF
9244
9245 fi
9246
9247 with_links=no
9248 with_symlinks=no
9249
9250 # soft links (symbolic links) are useful for some systems where hard links do
9251 # not work, or to make it simpler to copy terminfo trees around.
9252 if test "x$ac_cv_func_symlink" = xyes ; then
9253         echo "$as_me:9253: checking if tic should use symbolic links" >&5
9254 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9255
9256 # Check whether --enable-symlinks or --disable-symlinks was given.
9257 if test "${enable_symlinks+set}" = set; then
9258   enableval="$enable_symlinks"
9259   with_symlinks=$enableval
9260 else
9261   with_symlinks=no
9262 fi;
9263         echo "$as_me:9263: result: $with_symlinks" >&5
9264 echo "${ECHO_T}$with_symlinks" >&6
9265 fi
9266
9267 # If we have hard links and did not choose to use soft links instead, there is
9268 # no reason to make this choice optional - use the hard links.
9269 if test "$with_symlinks" = no ; then
9270         echo "$as_me:9270: checking if tic should use hard links" >&5
9271 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9272         if test "x$ac_cv_func_link" = xyes ; then
9273                 with_links=yes
9274         else
9275                 with_links=no
9276         fi
9277         echo "$as_me:9277: result: $with_links" >&5
9278 echo "${ECHO_T}$with_links" >&6
9279 fi
9280
9281 test "x$with_links" = xyes &&
9282 cat >>confdefs.h <<\EOF
9283 #define USE_LINKS 1
9284 EOF
9285
9286 test "x$with_symlinks" = xyes &&
9287 cat >>confdefs.h <<\EOF
9288 #define USE_SYMLINKS 1
9289 EOF
9290
9291 ###   use option --enable-broken-linker to force on use of broken-linker support
9292
9293 echo "$as_me:9293: checking if you want broken-linker support code" >&5
9294 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9295
9296 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9297 if test "${enable_broken_linker+set}" = set; then
9298   enableval="$enable_broken_linker"
9299   with_broken_linker=$enableval
9300 else
9301   with_broken_linker=no
9302 fi;
9303 echo "$as_me:9303: result: $with_broken_linker" >&5
9304 echo "${ECHO_T}$with_broken_linker" >&6
9305
9306 : ${BROKEN_LINKER:=0}
9307 if test "x$with_broken_linker" = xyes ; then
9308
9309 cat >>confdefs.h <<\EOF
9310 #define BROKEN_LINKER 1
9311 EOF
9312
9313         BROKEN_LINKER=1
9314 fi
9315
9316 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9317 echo "$as_me:9317: checking if tputs should process BSD-style prefix padding" >&5
9318 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9319
9320 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9321 if test "${enable_bsdpad+set}" = set; then
9322   enableval="$enable_bsdpad"
9323   with_bsdpad=$enableval
9324 else
9325   with_bsdpad=no
9326 fi;
9327 echo "$as_me:9327: result: $with_bsdpad" >&5
9328 echo "${ECHO_T}$with_bsdpad" >&6
9329 test "x$with_bsdpad" = xyes &&
9330 cat >>confdefs.h <<\EOF
9331 #define BSD_TPUTS 1
9332 EOF
9333
9334 ###   use option --enable-widec to turn on use of wide-character support
9335 NCURSES_CH_T=chtype
9336 NCURSES_LIBUTF8=0
9337
9338 NEED_WCHAR_H=0
9339 NCURSES_MBSTATE_T=0
9340 NCURSES_WCHAR_T=0
9341 NCURSES_WINT_T=0
9342
9343 # Check to define _XOPEN_SOURCE "automatically"
9344 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9345
9346 echo "$as_me:9346: checking if the POSIX test-macros are already defined" >&5
9347 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9348 if test "${cf_cv_posix_visible+set}" = set; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351
9352 cat >conftest.$ac_ext <<_ACEOF
9353 #line 9353 "configure"
9354 #include "confdefs.h"
9355 #include <stdio.h>
9356 int
9357 main (void)
9358 {
9359
9360 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9361         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9362         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9363         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9364 #error conflicting symbols found
9365 #endif
9366
9367   ;
9368   return 0;
9369 }
9370 _ACEOF
9371 rm -f conftest.$ac_objext
9372 if { (eval echo "$as_me:9372: \"$ac_compile\"") >&5
9373   (eval $ac_compile) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -s conftest.$ac_objext'
9378   { (eval echo "$as_me:9378: \"$ac_try\"") >&5
9379   (eval $ac_try) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); }; }; then
9383   cf_cv_posix_visible=no
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387 cf_cv_posix_visible=yes
9388 fi
9389 rm -f conftest.$ac_objext conftest.$ac_ext
9390
9391 fi
9392 echo "$as_me:9392: result: $cf_cv_posix_visible" >&5
9393 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9394
9395 if test "$cf_cv_posix_visible" = no; then
9396
9397 cf_XOPEN_SOURCE=600
9398 cf_POSIX_C_SOURCE=199506L
9399 cf_xopen_source=
9400
9401 case $host_os in
9402 (aix[4-7]*)
9403         cf_xopen_source="-D_ALL_SOURCE"
9404         ;;
9405 (msys)
9406         cf_XOPEN_SOURCE=600
9407         ;;
9408 (darwin[0-8].*)
9409         cf_xopen_source="-D_APPLE_C_SOURCE"
9410         ;;
9411 (darwin*)
9412         cf_xopen_source="-D_DARWIN_C_SOURCE"
9413         cf_XOPEN_SOURCE=
9414         ;;
9415 (freebsd*|dragonfly*|midnightbsd*)
9416         # 5.x headers associate
9417         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9418         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9419         cf_POSIX_C_SOURCE=200112L
9420         cf_XOPEN_SOURCE=600
9421         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9422         ;;
9423 (hpux11*)
9424         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9425         ;;
9426 (hpux*)
9427         cf_xopen_source="-D_HPUX_SOURCE"
9428         ;;
9429 (irix[56].*)
9430         cf_xopen_source="-D_SGI_SOURCE"
9431         cf_XOPEN_SOURCE=
9432         ;;
9433 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9434
9435 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9436
9437 echo "$as_me:9437: checking if this is the GNU C library" >&5
9438 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9439 if test "${cf_cv_gnu_library+set}" = set; then
9440   echo $ECHO_N "(cached) $ECHO_C" >&6
9441 else
9442
9443 cat >conftest.$ac_ext <<_ACEOF
9444 #line 9444 "configure"
9445 #include "confdefs.h"
9446 #include <sys/types.h>
9447 int
9448 main (void)
9449 {
9450
9451         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9452                 return 0;
9453         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9454                 return 0;
9455         #else
9456         #       error not GNU C library
9457         #endif
9458   ;
9459   return 0;
9460 }
9461 _ACEOF
9462 rm -f conftest.$ac_objext
9463 if { (eval echo "$as_me:9463: \"$ac_compile\"") >&5
9464   (eval $ac_compile) 2>&5
9465   ac_status=$?
9466   echo "$as_me:9466: \$? = $ac_status" >&5
9467   (exit $ac_status); } &&
9468          { ac_try='test -s conftest.$ac_objext'
9469   { (eval echo "$as_me:9469: \"$ac_try\"") >&5
9470   (eval $ac_try) 2>&5
9471   ac_status=$?
9472   echo "$as_me:9472: \$? = $ac_status" >&5
9473   (exit $ac_status); }; }; then
9474   cf_cv_gnu_library=yes
9475 else
9476   echo "$as_me: failed program was:" >&5
9477 cat conftest.$ac_ext >&5
9478 cf_cv_gnu_library=no
9479 fi
9480 rm -f conftest.$ac_objext conftest.$ac_ext
9481
9482 fi
9483 echo "$as_me:9483: result: $cf_cv_gnu_library" >&5
9484 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9485
9486 if test x$cf_cv_gnu_library = xyes; then
9487
9488         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9489         # was changed to help a little.  newlib incorporated the change about 4
9490         # years later.
9491         echo "$as_me:9491: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9492 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9493 if test "${cf_cv_gnu_library_219+set}" = set; then
9494   echo $ECHO_N "(cached) $ECHO_C" >&6
9495 else
9496
9497                 cf_save="$CPPFLAGS"
9498
9499         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9500         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9501
9502                 cat >conftest.$ac_ext <<_ACEOF
9503 #line 9503 "configure"
9504 #include "confdefs.h"
9505 #include <sys/types.h>
9506 int
9507 main (void)
9508 {
9509
9510                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9511                                 return 0;
9512                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9513                                 return 0;
9514                         #else
9515                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9516                         #endif
9517   ;
9518   return 0;
9519 }
9520 _ACEOF
9521 rm -f conftest.$ac_objext
9522 if { (eval echo "$as_me:9522: \"$ac_compile\"") >&5
9523   (eval $ac_compile) 2>&5
9524   ac_status=$?
9525   echo "$as_me:9525: \$? = $ac_status" >&5
9526   (exit $ac_status); } &&
9527          { ac_try='test -s conftest.$ac_objext'
9528   { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9529   (eval $ac_try) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit $ac_status); }; }; then
9533   cf_cv_gnu_library_219=yes
9534 else
9535   echo "$as_me: failed program was:" >&5
9536 cat conftest.$ac_ext >&5
9537 cf_cv_gnu_library_219=no
9538 fi
9539 rm -f conftest.$ac_objext conftest.$ac_ext
9540                 CPPFLAGS="$cf_save"
9541
9542 fi
9543 echo "$as_me:9543: result: $cf_cv_gnu_library_219" >&5
9544 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9545
9546         if test "x$cf_cv_gnu_library_219" = xyes; then
9547                 cf_save="$CPPFLAGS"
9548                 echo "$as_me:9548: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9549 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9550 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9551   echo $ECHO_N "(cached) $ECHO_C" >&6
9552 else
9553
9554 cf_fix_cppflags=no
9555 cf_new_cflags=
9556 cf_new_cppflags=
9557 cf_new_extra_cppflags=
9558
9559 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9560 do
9561 case $cf_fix_cppflags in
9562 (no)
9563         case $cf_add_cflags in
9564         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9565                 case $cf_add_cflags in
9566                 (-D*)
9567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9568
9569                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9570                                 && test -z "${cf_tst_cflags}" \
9571                                 && cf_fix_cppflags=yes
9572
9573                         if test $cf_fix_cppflags = yes ; then
9574
9575         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9576         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9577
9578                                 continue
9579                         elif test "${cf_tst_cflags}" = "\"'" ; then
9580
9581         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9582         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9583
9584                                 continue
9585                         fi
9586                         ;;
9587                 esac
9588                 case "$CPPFLAGS" in
9589                 (*$cf_add_cflags)
9590                         ;;
9591                 (*)
9592                         case $cf_add_cflags in
9593                         (-D*)
9594                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9595
9596 CPPFLAGS=`echo "$CPPFLAGS" | \
9597         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9598                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9599
9600                                 ;;
9601                         esac
9602
9603         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9604         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9605
9606                         ;;
9607                 esac
9608                 ;;
9609         (*)
9610
9611         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9612         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9613
9614                 ;;
9615         esac
9616         ;;
9617 (yes)
9618
9619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9621
9622         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9623
9624         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9625                 && test -z "${cf_tst_cflags}" \
9626                 && cf_fix_cppflags=no
9627         ;;
9628 esac
9629 done
9630
9631 if test -n "$cf_new_cflags" ; then
9632
9633         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9634         CFLAGS="${CFLAGS}$cf_new_cflags"
9635
9636 fi
9637
9638 if test -n "$cf_new_cppflags" ; then
9639
9640         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9641         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9642
9643 fi
9644
9645 if test -n "$cf_new_extra_cppflags" ; then
9646
9647         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9648         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9649
9650 fi
9651
9652                         cat >conftest.$ac_ext <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9655
9656                                 #include <limits.h>
9657                                 #include <sys/types.h>
9658
9659 int
9660 main (void)
9661 {
9662
9663                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9664                                         return 0;
9665                                 #else
9666                                 #       error GNU C library is too old
9667                                 #endif
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:9673: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   cf_cv_gnu_dftsrc_219=yes
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 cf_cv_gnu_dftsrc_219=no
9689 fi
9690 rm -f conftest.$ac_objext conftest.$ac_ext
9691
9692 fi
9693 echo "$as_me:9693: result: $cf_cv_gnu_dftsrc_219" >&5
9694 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9695                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9696         else
9697                 cf_cv_gnu_dftsrc_219=maybe
9698         fi
9699
9700         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9701
9702                 echo "$as_me:9702: checking if we must define _GNU_SOURCE" >&5
9703 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9704 if test "${cf_cv_gnu_source+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 else
9707
9708                 cat >conftest.$ac_ext <<_ACEOF
9709 #line 9709 "configure"
9710 #include "confdefs.h"
9711 #include <sys/types.h>
9712 int
9713 main (void)
9714 {
9715
9716                         #ifndef _XOPEN_SOURCE
9717                         #error  expected _XOPEN_SOURCE to be defined
9718                         #endif
9719   ;
9720   return 0;
9721 }
9722 _ACEOF
9723 rm -f conftest.$ac_objext
9724 if { (eval echo "$as_me:9724: \"$ac_compile\"") >&5
9725   (eval $ac_compile) 2>&5
9726   ac_status=$?
9727   echo "$as_me:9727: \$? = $ac_status" >&5
9728   (exit $ac_status); } &&
9729          { ac_try='test -s conftest.$ac_objext'
9730   { (eval echo "$as_me:9730: \"$ac_try\"") >&5
9731   (eval $ac_try) 2>&5
9732   ac_status=$?
9733   echo "$as_me:9733: \$? = $ac_status" >&5
9734   (exit $ac_status); }; }; then
9735   cf_cv_gnu_source=no
9736 else
9737   echo "$as_me: failed program was:" >&5
9738 cat conftest.$ac_ext >&5
9739 cf_save="$CPPFLAGS"
9740
9741 cf_fix_cppflags=no
9742 cf_new_cflags=
9743 cf_new_cppflags=
9744 cf_new_extra_cppflags=
9745
9746 for cf_add_cflags in -D_GNU_SOURCE
9747 do
9748 case $cf_fix_cppflags in
9749 (no)
9750         case $cf_add_cflags in
9751         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9752                 case $cf_add_cflags in
9753                 (-D*)
9754                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9755
9756                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9757                                 && test -z "${cf_tst_cflags}" \
9758                                 && cf_fix_cppflags=yes
9759
9760                         if test $cf_fix_cppflags = yes ; then
9761
9762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9764
9765                                 continue
9766                         elif test "${cf_tst_cflags}" = "\"'" ; then
9767
9768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9770
9771                                 continue
9772                         fi
9773                         ;;
9774                 esac
9775                 case "$CPPFLAGS" in
9776                 (*$cf_add_cflags)
9777                         ;;
9778                 (*)
9779                         case $cf_add_cflags in
9780                         (-D*)
9781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9782
9783 CPPFLAGS=`echo "$CPPFLAGS" | \
9784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9786
9787                                 ;;
9788                         esac
9789
9790         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9791         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9792
9793                         ;;
9794                 esac
9795                 ;;
9796         (*)
9797
9798         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9799         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9800
9801                 ;;
9802         esac
9803         ;;
9804 (yes)
9805
9806         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9807         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9808
9809         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9810
9811         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9812                 && test -z "${cf_tst_cflags}" \
9813                 && cf_fix_cppflags=no
9814         ;;
9815 esac
9816 done
9817
9818 if test -n "$cf_new_cflags" ; then
9819
9820         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9821         CFLAGS="${CFLAGS}$cf_new_cflags"
9822
9823 fi
9824
9825 if test -n "$cf_new_cppflags" ; then
9826
9827         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9828         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9829
9830 fi
9831
9832 if test -n "$cf_new_extra_cppflags" ; then
9833
9834         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9835         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9836
9837 fi
9838
9839                          cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9842 #include <sys/types.h>
9843 int
9844 main (void)
9845 {
9846
9847                                 #ifdef _XOPEN_SOURCE
9848                                 #error  expected _XOPEN_SOURCE to be undefined
9849                                 #endif
9850   ;
9851   return 0;
9852 }
9853 _ACEOF
9854 rm -f conftest.$ac_objext
9855 if { (eval echo "$as_me:9855: \"$ac_compile\"") >&5
9856   (eval $ac_compile) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); } &&
9860          { ac_try='test -s conftest.$ac_objext'
9861   { (eval echo "$as_me:9861: \"$ac_try\"") >&5
9862   (eval $ac_try) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); }; }; then
9866   cf_cv_gnu_source=no
9867 else
9868   echo "$as_me: failed program was:" >&5
9869 cat conftest.$ac_ext >&5
9870 cf_cv_gnu_source=yes
9871 fi
9872 rm -f conftest.$ac_objext conftest.$ac_ext
9873                         CPPFLAGS="$cf_save"
9874
9875 fi
9876 rm -f conftest.$ac_objext conftest.$ac_ext
9877
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_gnu_source" >&5
9880 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9881
9882                 if test "$cf_cv_gnu_source" = yes
9883                 then
9884                 echo "$as_me:9884: checking if we should also define _DEFAULT_SOURCE" >&5
9885 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9886 if test "${cf_cv_default_source+set}" = set; then
9887   echo $ECHO_N "(cached) $ECHO_C" >&6
9888 else
9889
9890         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9891         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9892
9893                         cat >conftest.$ac_ext <<_ACEOF
9894 #line 9894 "configure"
9895 #include "confdefs.h"
9896 #include <sys/types.h>
9897 int
9898 main (void)
9899 {
9900
9901                                 #ifdef _DEFAULT_SOURCE
9902                                 #error  expected _DEFAULT_SOURCE to be undefined
9903                                 #endif
9904   ;
9905   return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext
9909 if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910   (eval $ac_compile) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   cf_cv_default_source=no
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924 cf_cv_default_source=yes
9925 fi
9926 rm -f conftest.$ac_objext conftest.$ac_ext
9927
9928 fi
9929 echo "$as_me:9929: result: $cf_cv_default_source" >&5
9930 echo "${ECHO_T}$cf_cv_default_source" >&6
9931                         if test "$cf_cv_default_source" = yes
9932                         then
9933
9934         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9935         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9936
9937                         fi
9938                 fi
9939         fi
9940
9941 fi
9942
9943         ;;
9944 (minix*)
9945         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9946         ;;
9947 (mirbsd*)
9948         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9949         cf_XOPEN_SOURCE=
9950
9951 if test "$cf_cv_posix_visible" = no; then
9952
9953 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9954
9955 cf_save_CFLAGS="$CFLAGS"
9956 cf_save_CPPFLAGS="$CPPFLAGS"
9957
9958 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9959         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9960                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9961
9962 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9963         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9964                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9965
9966 echo "$as_me:9966: checking if we should define _POSIX_C_SOURCE" >&5
9967 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9968 if test "${cf_cv_posix_c_source+set}" = set; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 else
9971
9972 echo "${as_me:-configure}:9972: testing if the symbol is already defined go no further ..." 1>&5
9973
9974         cat >conftest.$ac_ext <<_ACEOF
9975 #line 9975 "configure"
9976 #include "confdefs.h"
9977 #include <sys/types.h>
9978 int
9979 main (void)
9980 {
9981
9982 #ifndef _POSIX_C_SOURCE
9983 make an error
9984 #endif
9985   ;
9986   return 0;
9987 }
9988 _ACEOF
9989 rm -f conftest.$ac_objext
9990 if { (eval echo "$as_me:9990: \"$ac_compile\"") >&5
9991   (eval $ac_compile) 2>&5
9992   ac_status=$?
9993   echo "$as_me:9993: \$? = $ac_status" >&5
9994   (exit $ac_status); } &&
9995          { ac_try='test -s conftest.$ac_objext'
9996   { (eval echo "$as_me:9996: \"$ac_try\"") >&5
9997   (eval $ac_try) 2>&5
9998   ac_status=$?
9999   echo "$as_me:9999: \$? = $ac_status" >&5
10000   (exit $ac_status); }; }; then
10001   cf_cv_posix_c_source=no
10002 else
10003   echo "$as_me: failed program was:" >&5
10004 cat conftest.$ac_ext >&5
10005 cf_want_posix_source=no
10006          case .$cf_POSIX_C_SOURCE in
10007          (.[12]??*)
10008                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10009                 ;;
10010          (.2)
10011                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10012                 cf_want_posix_source=yes
10013                 ;;
10014          (.*)
10015                 cf_want_posix_source=yes
10016                 ;;
10017          esac
10018          if test "$cf_want_posix_source" = yes ; then
10019                 cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022 #include <sys/types.h>
10023 int
10024 main (void)
10025 {
10026
10027 #ifdef _POSIX_SOURCE
10028 make an error
10029 #endif
10030   ;
10031   return 0;
10032 }
10033 _ACEOF
10034 rm -f conftest.$ac_objext
10035 if { (eval echo "$as_me:10035: \"$ac_compile\"") >&5
10036   (eval $ac_compile) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); } &&
10040          { ac_try='test -s conftest.$ac_objext'
10041   { (eval echo "$as_me:10041: \"$ac_try\"") >&5
10042   (eval $ac_try) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit $ac_status); }; }; then
10046   :
10047 else
10048   echo "$as_me: failed program was:" >&5
10049 cat conftest.$ac_ext >&5
10050 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10051 fi
10052 rm -f conftest.$ac_objext conftest.$ac_ext
10053          fi
10054
10055 echo "${as_me:-configure}:10055: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10056
10057          CFLAGS="$cf_trim_CFLAGS"
10058          CPPFLAGS="$cf_trim_CPPFLAGS"
10059
10060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10061         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10062
10063 echo "${as_me:-configure}:10063: testing if the second compile does not leave our definition intact error ..." 1>&5
10064
10065          cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068 #include <sys/types.h>
10069 int
10070 main (void)
10071 {
10072
10073 #ifndef _POSIX_C_SOURCE
10074 make an error
10075 #endif
10076   ;
10077   return 0;
10078 }
10079 _ACEOF
10080 rm -f conftest.$ac_objext
10081 if { (eval echo "$as_me:10081: \"$ac_compile\"") >&5
10082   (eval $ac_compile) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); } &&
10086          { ac_try='test -s conftest.$ac_objext'
10087   { (eval echo "$as_me:10087: \"$ac_try\"") >&5
10088   (eval $ac_try) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); }; }; then
10092   :
10093 else
10094   echo "$as_me: failed program was:" >&5
10095 cat conftest.$ac_ext >&5
10096 cf_cv_posix_c_source=no
10097 fi
10098 rm -f conftest.$ac_objext conftest.$ac_ext
10099          CFLAGS="$cf_save_CFLAGS"
10100          CPPFLAGS="$cf_save_CPPFLAGS"
10101
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104
10105 fi
10106 echo "$as_me:10106: result: $cf_cv_posix_c_source" >&5
10107 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10108
10109 if test "$cf_cv_posix_c_source" != no ; then
10110         CFLAGS="$cf_trim_CFLAGS"
10111         CPPFLAGS="$cf_trim_CPPFLAGS"
10112
10113 cf_fix_cppflags=no
10114 cf_new_cflags=
10115 cf_new_cppflags=
10116 cf_new_extra_cppflags=
10117
10118 for cf_add_cflags in $cf_cv_posix_c_source
10119 do
10120 case $cf_fix_cppflags in
10121 (no)
10122         case $cf_add_cflags in
10123         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10124                 case $cf_add_cflags in
10125                 (-D*)
10126                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10127
10128                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10129                                 && test -z "${cf_tst_cflags}" \
10130                                 && cf_fix_cppflags=yes
10131
10132                         if test $cf_fix_cppflags = yes ; then
10133
10134         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10135         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10136
10137                                 continue
10138                         elif test "${cf_tst_cflags}" = "\"'" ; then
10139
10140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10142
10143                                 continue
10144                         fi
10145                         ;;
10146                 esac
10147                 case "$CPPFLAGS" in
10148                 (*$cf_add_cflags)
10149                         ;;
10150                 (*)
10151                         case $cf_add_cflags in
10152                         (-D*)
10153                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10154
10155 CPPFLAGS=`echo "$CPPFLAGS" | \
10156         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10157                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10158
10159                                 ;;
10160                         esac
10161
10162         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10163         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10164
10165                         ;;
10166                 esac
10167                 ;;
10168         (*)
10169
10170         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10171         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10172
10173                 ;;
10174         esac
10175         ;;
10176 (yes)
10177
10178         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10179         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10180
10181         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10182
10183         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10184                 && test -z "${cf_tst_cflags}" \
10185                 && cf_fix_cppflags=no
10186         ;;
10187 esac
10188 done
10189
10190 if test -n "$cf_new_cflags" ; then
10191
10192         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10193         CFLAGS="${CFLAGS}$cf_new_cflags"
10194
10195 fi
10196
10197 if test -n "$cf_new_cppflags" ; then
10198
10199         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10200         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10201
10202 fi
10203
10204 if test -n "$cf_new_extra_cppflags" ; then
10205
10206         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10207         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10208
10209 fi
10210
10211 fi
10212
10213 fi # cf_cv_posix_visible
10214
10215         ;;
10216 (netbsd*)
10217         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10218         ;;
10219 (openbsd[4-9]*)
10220         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10221         cf_xopen_source="-D_BSD_SOURCE"
10222         cf_XOPEN_SOURCE=600
10223         ;;
10224 (openbsd*)
10225         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10226         ;;
10227 (osf[45]*)
10228         cf_xopen_source="-D_OSF_SOURCE"
10229         ;;
10230 (nto-qnx*)
10231         cf_xopen_source="-D_QNX_SOURCE"
10232         ;;
10233 (sco*)
10234         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10235         ;;
10236 (solaris2.*)
10237         cf_xopen_source="-D__EXTENSIONS__"
10238         cf_cv_xopen_source=broken
10239         ;;
10240 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10241         cf_XOPEN_SOURCE=
10242         cf_POSIX_C_SOURCE=
10243         ;;
10244 (*)
10245
10246 echo "$as_me:10246: checking if we should define _XOPEN_SOURCE" >&5
10247 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10248 if test "${cf_cv_xopen_source+set}" = set; then
10249   echo $ECHO_N "(cached) $ECHO_C" >&6
10250 else
10251
10252         cat >conftest.$ac_ext <<_ACEOF
10253 #line 10253 "configure"
10254 #include "confdefs.h"
10255
10256 #include <stdlib.h>
10257 #include <string.h>
10258 #include <sys/types.h>
10259
10260 int
10261 main (void)
10262 {
10263
10264 #ifndef _XOPEN_SOURCE
10265 make an error
10266 #endif
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext
10272 if { (eval echo "$as_me:10272: \"$ac_compile\"") >&5
10273   (eval $ac_compile) 2>&5
10274   ac_status=$?
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit $ac_status); } &&
10277          { ac_try='test -s conftest.$ac_objext'
10278   { (eval echo "$as_me:10278: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   cf_cv_xopen_source=no
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 cf_save="$CPPFLAGS"
10288
10289         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10290         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10291
10292          cat >conftest.$ac_ext <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295
10296 #include <stdlib.h>
10297 #include <string.h>
10298 #include <sys/types.h>
10299
10300 int
10301 main (void)
10302 {
10303
10304 #ifdef _XOPEN_SOURCE
10305 make an error
10306 #endif
10307   ;
10308   return 0;
10309 }
10310 _ACEOF
10311 rm -f conftest.$ac_objext
10312 if { (eval echo "$as_me:10312: \"$ac_compile\"") >&5
10313   (eval $ac_compile) 2>&5
10314   ac_status=$?
10315   echo "$as_me:10315: \$? = $ac_status" >&5
10316   (exit $ac_status); } &&
10317          { ac_try='test -s conftest.$ac_objext'
10318   { (eval echo "$as_me:10318: \"$ac_try\"") >&5
10319   (eval $ac_try) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); }; }; then
10323   cf_cv_xopen_source=no
10324 else
10325   echo "$as_me: failed program was:" >&5
10326 cat conftest.$ac_ext >&5
10327 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10328 fi
10329 rm -f conftest.$ac_objext conftest.$ac_ext
10330         CPPFLAGS="$cf_save"
10331
10332 fi
10333 rm -f conftest.$ac_objext conftest.$ac_ext
10334
10335 fi
10336 echo "$as_me:10336: result: $cf_cv_xopen_source" >&5
10337 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10338
10339 if test "$cf_cv_xopen_source" != no ; then
10340
10341 CFLAGS=`echo "$CFLAGS" | \
10342         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10343                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10344
10345 CPPFLAGS=`echo "$CPPFLAGS" | \
10346         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10347                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10348
10349         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10350
10351 cf_fix_cppflags=no
10352 cf_new_cflags=
10353 cf_new_cppflags=
10354 cf_new_extra_cppflags=
10355
10356 for cf_add_cflags in $cf_temp_xopen_source
10357 do
10358 case $cf_fix_cppflags in
10359 (no)
10360         case $cf_add_cflags in
10361         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10362                 case $cf_add_cflags in
10363                 (-D*)
10364                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10365
10366                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10367                                 && test -z "${cf_tst_cflags}" \
10368                                 && cf_fix_cppflags=yes
10369
10370                         if test $cf_fix_cppflags = yes ; then
10371
10372         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10373         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10374
10375                                 continue
10376                         elif test "${cf_tst_cflags}" = "\"'" ; then
10377
10378         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10379         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10380
10381                                 continue
10382                         fi
10383                         ;;
10384                 esac
10385                 case "$CPPFLAGS" in
10386                 (*$cf_add_cflags)
10387                         ;;
10388                 (*)
10389                         case $cf_add_cflags in
10390                         (-D*)
10391                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10392
10393 CPPFLAGS=`echo "$CPPFLAGS" | \
10394         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10395                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10396
10397                                 ;;
10398                         esac
10399
10400         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10401         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10402
10403                         ;;
10404                 esac
10405                 ;;
10406         (*)
10407
10408         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10409         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10410
10411                 ;;
10412         esac
10413         ;;
10414 (yes)
10415
10416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10418
10419         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10420
10421         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10422                 && test -z "${cf_tst_cflags}" \
10423                 && cf_fix_cppflags=no
10424         ;;
10425 esac
10426 done
10427
10428 if test -n "$cf_new_cflags" ; then
10429
10430         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10431         CFLAGS="${CFLAGS}$cf_new_cflags"
10432
10433 fi
10434
10435 if test -n "$cf_new_cppflags" ; then
10436
10437         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10438         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10439
10440 fi
10441
10442 if test -n "$cf_new_extra_cppflags" ; then
10443
10444         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10445         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10446
10447 fi
10448
10449 fi
10450
10451 if test "$cf_cv_posix_visible" = no; then
10452
10453 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10454
10455 cf_save_CFLAGS="$CFLAGS"
10456 cf_save_CPPFLAGS="$CPPFLAGS"
10457
10458 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10459         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10460                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10461
10462 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10463         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10464                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10465
10466 echo "$as_me:10466: checking if we should define _POSIX_C_SOURCE" >&5
10467 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10468 if test "${cf_cv_posix_c_source+set}" = set; then
10469   echo $ECHO_N "(cached) $ECHO_C" >&6
10470 else
10471
10472 echo "${as_me:-configure}:10472: testing if the symbol is already defined go no further ..." 1>&5
10473
10474         cat >conftest.$ac_ext <<_ACEOF
10475 #line 10475 "configure"
10476 #include "confdefs.h"
10477 #include <sys/types.h>
10478 int
10479 main (void)
10480 {
10481
10482 #ifndef _POSIX_C_SOURCE
10483 make an error
10484 #endif
10485   ;
10486   return 0;
10487 }
10488 _ACEOF
10489 rm -f conftest.$ac_objext
10490 if { (eval echo "$as_me:10490: \"$ac_compile\"") >&5
10491   (eval $ac_compile) 2>&5
10492   ac_status=$?
10493   echo "$as_me:10493: \$? = $ac_status" >&5
10494   (exit $ac_status); } &&
10495          { ac_try='test -s conftest.$ac_objext'
10496   { (eval echo "$as_me:10496: \"$ac_try\"") >&5
10497   (eval $ac_try) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); }; }; then
10501   cf_cv_posix_c_source=no
10502 else
10503   echo "$as_me: failed program was:" >&5
10504 cat conftest.$ac_ext >&5
10505 cf_want_posix_source=no
10506          case .$cf_POSIX_C_SOURCE in
10507          (.[12]??*)
10508                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10509                 ;;
10510          (.2)
10511                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10512                 cf_want_posix_source=yes
10513                 ;;
10514          (.*)
10515                 cf_want_posix_source=yes
10516                 ;;
10517          esac
10518          if test "$cf_want_posix_source" = yes ; then
10519                 cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522 #include <sys/types.h>
10523 int
10524 main (void)
10525 {
10526
10527 #ifdef _POSIX_SOURCE
10528 make an error
10529 #endif
10530   ;
10531   return 0;
10532 }
10533 _ACEOF
10534 rm -f conftest.$ac_objext
10535 if { (eval echo "$as_me:10535: \"$ac_compile\"") >&5
10536   (eval $ac_compile) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); } &&
10540          { ac_try='test -s conftest.$ac_objext'
10541   { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542   (eval $ac_try) 2>&5
10543   ac_status=$?
10544   echo "$as_me:10544: \$? = $ac_status" >&5
10545   (exit $ac_status); }; }; then
10546   :
10547 else
10548   echo "$as_me: failed program was:" >&5
10549 cat conftest.$ac_ext >&5
10550 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10551 fi
10552 rm -f conftest.$ac_objext conftest.$ac_ext
10553          fi
10554
10555 echo "${as_me:-configure}:10555: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10556
10557          CFLAGS="$cf_trim_CFLAGS"
10558          CPPFLAGS="$cf_trim_CPPFLAGS"
10559
10560         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10561         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10562
10563 echo "${as_me:-configure}:10563: testing if the second compile does not leave our definition intact error ..." 1>&5
10564
10565          cat >conftest.$ac_ext <<_ACEOF
10566 #line 10566 "configure"
10567 #include "confdefs.h"
10568 #include <sys/types.h>
10569 int
10570 main (void)
10571 {
10572
10573 #ifndef _POSIX_C_SOURCE
10574 make an error
10575 #endif
10576   ;
10577   return 0;
10578 }
10579 _ACEOF
10580 rm -f conftest.$ac_objext
10581 if { (eval echo "$as_me:10581: \"$ac_compile\"") >&5
10582   (eval $ac_compile) 2>&5
10583   ac_status=$?
10584   echo "$as_me:10584: \$? = $ac_status" >&5
10585   (exit $ac_status); } &&
10586          { ac_try='test -s conftest.$ac_objext'
10587   { (eval echo "$as_me:10587: \"$ac_try\"") >&5
10588   (eval $ac_try) 2>&5
10589   ac_status=$?
10590   echo "$as_me:10590: \$? = $ac_status" >&5
10591   (exit $ac_status); }; }; then
10592   :
10593 else
10594   echo "$as_me: failed program was:" >&5
10595 cat conftest.$ac_ext >&5
10596 cf_cv_posix_c_source=no
10597 fi
10598 rm -f conftest.$ac_objext conftest.$ac_ext
10599          CFLAGS="$cf_save_CFLAGS"
10600          CPPFLAGS="$cf_save_CPPFLAGS"
10601
10602 fi
10603 rm -f conftest.$ac_objext conftest.$ac_ext
10604
10605 fi
10606 echo "$as_me:10606: result: $cf_cv_posix_c_source" >&5
10607 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10608
10609 if test "$cf_cv_posix_c_source" != no ; then
10610         CFLAGS="$cf_trim_CFLAGS"
10611         CPPFLAGS="$cf_trim_CPPFLAGS"
10612
10613 cf_fix_cppflags=no
10614 cf_new_cflags=
10615 cf_new_cppflags=
10616 cf_new_extra_cppflags=
10617
10618 for cf_add_cflags in $cf_cv_posix_c_source
10619 do
10620 case $cf_fix_cppflags in
10621 (no)
10622         case $cf_add_cflags in
10623         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10624                 case $cf_add_cflags in
10625                 (-D*)
10626                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10627
10628                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10629                                 && test -z "${cf_tst_cflags}" \
10630                                 && cf_fix_cppflags=yes
10631
10632                         if test $cf_fix_cppflags = yes ; then
10633
10634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10636
10637                                 continue
10638                         elif test "${cf_tst_cflags}" = "\"'" ; then
10639
10640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10642
10643                                 continue
10644                         fi
10645                         ;;
10646                 esac
10647                 case "$CPPFLAGS" in
10648                 (*$cf_add_cflags)
10649                         ;;
10650                 (*)
10651                         case $cf_add_cflags in
10652                         (-D*)
10653                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10654
10655 CPPFLAGS=`echo "$CPPFLAGS" | \
10656         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10657                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10658
10659                                 ;;
10660                         esac
10661
10662         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10663         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10664
10665                         ;;
10666                 esac
10667                 ;;
10668         (*)
10669
10670         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10671         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10672
10673                 ;;
10674         esac
10675         ;;
10676 (yes)
10677
10678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10680
10681         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10682
10683         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10684                 && test -z "${cf_tst_cflags}" \
10685                 && cf_fix_cppflags=no
10686         ;;
10687 esac
10688 done
10689
10690 if test -n "$cf_new_cflags" ; then
10691
10692         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10693         CFLAGS="${CFLAGS}$cf_new_cflags"
10694
10695 fi
10696
10697 if test -n "$cf_new_cppflags" ; then
10698
10699         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10700         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10701
10702 fi
10703
10704 if test -n "$cf_new_extra_cppflags" ; then
10705
10706         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10707         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10708
10709 fi
10710
10711 fi
10712
10713 fi # cf_cv_posix_visible
10714
10715         ;;
10716 esac
10717
10718 if test -n "$cf_xopen_source" ; then
10719
10720 cf_fix_cppflags=no
10721 cf_new_cflags=
10722 cf_new_cppflags=
10723 cf_new_extra_cppflags=
10724
10725 for cf_add_cflags in $cf_xopen_source
10726 do
10727 case $cf_fix_cppflags in
10728 (no)
10729         case $cf_add_cflags in
10730         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10731                 case $cf_add_cflags in
10732                 (-D*)
10733                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10734
10735                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10736                                 && test -z "${cf_tst_cflags}" \
10737                                 && cf_fix_cppflags=yes
10738
10739                         if test $cf_fix_cppflags = yes ; then
10740
10741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10743
10744                                 continue
10745                         elif test "${cf_tst_cflags}" = "\"'" ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         fi
10752                         ;;
10753                 esac
10754                 case "$CPPFLAGS" in
10755                 (*$cf_add_cflags)
10756                         ;;
10757                 (*)
10758                         case $cf_add_cflags in
10759                         (-D*)
10760                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761
10762 CPPFLAGS=`echo "$CPPFLAGS" | \
10763         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10764                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10765
10766                                 ;;
10767                         esac
10768
10769         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10770         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10771
10772                         ;;
10773                 esac
10774                 ;;
10775         (*)
10776
10777         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10778         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10779
10780                 ;;
10781         esac
10782         ;;
10783 (yes)
10784
10785         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10786         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10787
10788         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10789
10790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791                 && test -z "${cf_tst_cflags}" \
10792                 && cf_fix_cppflags=no
10793         ;;
10794 esac
10795 done
10796
10797 if test -n "$cf_new_cflags" ; then
10798         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10799
10800 echo "${as_me:-configure}:10800: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10801
10802         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10803         CFLAGS="${CFLAGS}$cf_new_cflags"
10804
10805 fi
10806
10807 if test -n "$cf_new_cppflags" ; then
10808         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10809
10810 echo "${as_me:-configure}:10810: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10811
10812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10813         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10814
10815 fi
10816
10817 if test -n "$cf_new_extra_cppflags" ; then
10818         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10819
10820 echo "${as_me:-configure}:10820: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10821
10822         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825 fi
10826
10827 fi
10828
10829 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10830         echo "$as_me:10830: checking if _XOPEN_SOURCE really is set" >&5
10831 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10832         cat >conftest.$ac_ext <<_ACEOF
10833 #line 10833 "configure"
10834 #include "confdefs.h"
10835 #include <stdlib.h>
10836 int
10837 main (void)
10838 {
10839
10840 #ifndef _XOPEN_SOURCE
10841 make an error
10842 #endif
10843   ;
10844   return 0;
10845 }
10846 _ACEOF
10847 rm -f conftest.$ac_objext
10848 if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849   (eval $ac_compile) 2>&5
10850   ac_status=$?
10851   echo "$as_me:10851: \$? = $ac_status" >&5
10852   (exit $ac_status); } &&
10853          { ac_try='test -s conftest.$ac_objext'
10854   { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855   (eval $ac_try) 2>&5
10856   ac_status=$?
10857   echo "$as_me:10857: \$? = $ac_status" >&5
10858   (exit $ac_status); }; }; then
10859   cf_XOPEN_SOURCE_set=yes
10860 else
10861   echo "$as_me: failed program was:" >&5
10862 cat conftest.$ac_ext >&5
10863 cf_XOPEN_SOURCE_set=no
10864 fi
10865 rm -f conftest.$ac_objext conftest.$ac_ext
10866         echo "$as_me:10866: result: $cf_XOPEN_SOURCE_set" >&5
10867 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10868         if test $cf_XOPEN_SOURCE_set = yes
10869         then
10870                 cat >conftest.$ac_ext <<_ACEOF
10871 #line 10871 "configure"
10872 #include "confdefs.h"
10873 #include <stdlib.h>
10874 int
10875 main (void)
10876 {
10877
10878 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10879 make an error
10880 #endif
10881   ;
10882   return 0;
10883 }
10884 _ACEOF
10885 rm -f conftest.$ac_objext
10886 if { (eval echo "$as_me:10886: \"$ac_compile\"") >&5
10887   (eval $ac_compile) 2>&5
10888   ac_status=$?
10889   echo "$as_me:10889: \$? = $ac_status" >&5
10890   (exit $ac_status); } &&
10891          { ac_try='test -s conftest.$ac_objext'
10892   { (eval echo "$as_me:10892: \"$ac_try\"") >&5
10893   (eval $ac_try) 2>&5
10894   ac_status=$?
10895   echo "$as_me:10895: \$? = $ac_status" >&5
10896   (exit $ac_status); }; }; then
10897   cf_XOPEN_SOURCE_set_ok=yes
10898 else
10899   echo "$as_me: failed program was:" >&5
10900 cat conftest.$ac_ext >&5
10901 cf_XOPEN_SOURCE_set_ok=no
10902 fi
10903 rm -f conftest.$ac_objext conftest.$ac_ext
10904                 if test $cf_XOPEN_SOURCE_set_ok = no
10905                 then
10906                         { echo "$as_me:10906: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10907 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10908                 fi
10909         else
10910
10911 echo "$as_me:10911: checking if we should define _XOPEN_SOURCE" >&5
10912 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10913 if test "${cf_cv_xopen_source+set}" = set; then
10914   echo $ECHO_N "(cached) $ECHO_C" >&6
10915 else
10916
10917         cat >conftest.$ac_ext <<_ACEOF
10918 #line 10918 "configure"
10919 #include "confdefs.h"
10920
10921 #include <stdlib.h>
10922 #include <string.h>
10923 #include <sys/types.h>
10924
10925 int
10926 main (void)
10927 {
10928
10929 #ifndef _XOPEN_SOURCE
10930 make an error
10931 #endif
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936 rm -f conftest.$ac_objext
10937 if { (eval echo "$as_me:10937: \"$ac_compile\"") >&5
10938   (eval $ac_compile) 2>&5
10939   ac_status=$?
10940   echo "$as_me:10940: \$? = $ac_status" >&5
10941   (exit $ac_status); } &&
10942          { ac_try='test -s conftest.$ac_objext'
10943   { (eval echo "$as_me:10943: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:10946: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   cf_cv_xopen_source=no
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 cat conftest.$ac_ext >&5
10952 cf_save="$CPPFLAGS"
10953
10954         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10955         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10956
10957          cat >conftest.$ac_ext <<_ACEOF
10958 #line 10958 "configure"
10959 #include "confdefs.h"
10960
10961 #include <stdlib.h>
10962 #include <string.h>
10963 #include <sys/types.h>
10964
10965 int
10966 main (void)
10967 {
10968
10969 #ifdef _XOPEN_SOURCE
10970 make an error
10971 #endif
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 rm -f conftest.$ac_objext
10977 if { (eval echo "$as_me:10977: \"$ac_compile\"") >&5
10978   (eval $ac_compile) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit $ac_status); } &&
10982          { ac_try='test -s conftest.$ac_objext'
10983   { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit $ac_status); }; }; then
10988   cf_cv_xopen_source=no
10989 else
10990   echo "$as_me: failed program was:" >&5
10991 cat conftest.$ac_ext >&5
10992 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10993 fi
10994 rm -f conftest.$ac_objext conftest.$ac_ext
10995         CPPFLAGS="$cf_save"
10996
10997 fi
10998 rm -f conftest.$ac_objext conftest.$ac_ext
10999
11000 fi
11001 echo "$as_me:11001: result: $cf_cv_xopen_source" >&5
11002 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11003
11004 if test "$cf_cv_xopen_source" != no ; then
11005
11006 CFLAGS=`echo "$CFLAGS" | \
11007         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11008                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11009
11010 CPPFLAGS=`echo "$CPPFLAGS" | \
11011         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11012                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11013
11014         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11015
11016 cf_fix_cppflags=no
11017 cf_new_cflags=
11018 cf_new_cppflags=
11019 cf_new_extra_cppflags=
11020
11021 for cf_add_cflags in $cf_temp_xopen_source
11022 do
11023 case $cf_fix_cppflags in
11024 (no)
11025         case $cf_add_cflags in
11026         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11027                 case $cf_add_cflags in
11028                 (-D*)
11029                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11030
11031                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11032                                 && test -z "${cf_tst_cflags}" \
11033                                 && cf_fix_cppflags=yes
11034
11035                         if test $cf_fix_cppflags = yes ; then
11036
11037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11039
11040                                 continue
11041                         elif test "${cf_tst_cflags}" = "\"'" ; then
11042
11043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11045
11046                                 continue
11047                         fi
11048                         ;;
11049                 esac
11050                 case "$CPPFLAGS" in
11051                 (*$cf_add_cflags)
11052                         ;;
11053                 (*)
11054                         case $cf_add_cflags in
11055                         (-D*)
11056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11057
11058 CPPFLAGS=`echo "$CPPFLAGS" | \
11059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11061
11062                                 ;;
11063                         esac
11064
11065         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11066         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11067
11068                         ;;
11069                 esac
11070                 ;;
11071         (*)
11072
11073         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11074         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11075
11076                 ;;
11077         esac
11078         ;;
11079 (yes)
11080
11081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11083
11084         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11085
11086         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11087                 && test -z "${cf_tst_cflags}" \
11088                 && cf_fix_cppflags=no
11089         ;;
11090 esac
11091 done
11092
11093 if test -n "$cf_new_cflags" ; then
11094
11095         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11096         CFLAGS="${CFLAGS}$cf_new_cflags"
11097
11098 fi
11099
11100 if test -n "$cf_new_cppflags" ; then
11101
11102         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11103         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11104
11105 fi
11106
11107 if test -n "$cf_new_extra_cppflags" ; then
11108
11109         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11110         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11111
11112 fi
11113
11114 fi
11115
11116         fi
11117 fi
11118 fi # cf_cv_posix_visible
11119
11120 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11121
11122 # Work around breakage on OS X
11123
11124 echo "$as_me:11124: checking if SIGWINCH is defined" >&5
11125 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11126 if test "${cf_cv_define_sigwinch+set}" = set; then
11127   echo $ECHO_N "(cached) $ECHO_C" >&6
11128 else
11129
11130         cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133
11134 #include <sys/types.h>
11135 #include <sys/signal.h>
11136
11137 int
11138 main (void)
11139 {
11140 int x = SIGWINCH; (void)x
11141   ;
11142   return 0;
11143 }
11144 _ACEOF
11145 rm -f conftest.$ac_objext
11146 if { (eval echo "$as_me:11146: \"$ac_compile\"") >&5
11147   (eval $ac_compile) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); } &&
11151          { ac_try='test -s conftest.$ac_objext'
11152   { (eval echo "$as_me:11152: \"$ac_try\"") >&5
11153   (eval $ac_try) 2>&5
11154   ac_status=$?
11155   echo "$as_me:11155: \$? = $ac_status" >&5
11156   (exit $ac_status); }; }; then
11157   cf_cv_define_sigwinch=yes
11158 else
11159   echo "$as_me: failed program was:" >&5
11160 cat conftest.$ac_ext >&5
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164
11165 #undef _XOPEN_SOURCE
11166 #undef _POSIX_SOURCE
11167 #undef _POSIX_C_SOURCE
11168 #include <sys/types.h>
11169 #include <sys/signal.h>
11170
11171 int
11172 main (void)
11173 {
11174 int x = SIGWINCH; (void)x
11175   ;
11176   return 0;
11177 }
11178 _ACEOF
11179 rm -f conftest.$ac_objext
11180 if { (eval echo "$as_me:11180: \"$ac_compile\"") >&5
11181   (eval $ac_compile) 2>&5
11182   ac_status=$?
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } &&
11185          { ac_try='test -s conftest.$ac_objext'
11186   { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187   (eval $ac_try) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); }; }; then
11191   cf_cv_define_sigwinch=maybe
11192 else
11193   echo "$as_me: failed program was:" >&5
11194 cat conftest.$ac_ext >&5
11195 cf_cv_define_sigwinch=no
11196 fi
11197 rm -f conftest.$ac_objext conftest.$ac_ext
11198
11199 fi
11200 rm -f conftest.$ac_objext conftest.$ac_ext
11201
11202 fi
11203 echo "$as_me:11203: result: $cf_cv_define_sigwinch" >&5
11204 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11205
11206 if test "$cf_cv_define_sigwinch" = maybe ; then
11207 echo "$as_me:11207: checking for actual SIGWINCH definition" >&5
11208 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11209 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11210   echo $ECHO_N "(cached) $ECHO_C" >&6
11211 else
11212
11213 cf_cv_fixup_sigwinch=unknown
11214 cf_sigwinch=32
11215 while test $cf_sigwinch != 1
11216 do
11217         cat >conftest.$ac_ext <<_ACEOF
11218 #line 11218 "configure"
11219 #include "confdefs.h"
11220
11221 #undef _XOPEN_SOURCE
11222 #undef _POSIX_SOURCE
11223 #undef _POSIX_C_SOURCE
11224 #include <sys/types.h>
11225 #include <sys/signal.h>
11226
11227 int
11228 main (void)
11229 {
11230
11231 #if SIGWINCH != $cf_sigwinch
11232 make an error
11233 #endif
11234 int x = SIGWINCH; (void)x
11235   ;
11236   return 0;
11237 }
11238 _ACEOF
11239 rm -f conftest.$ac_objext
11240 if { (eval echo "$as_me:11240: \"$ac_compile\"") >&5
11241   (eval $ac_compile) 2>&5
11242   ac_status=$?
11243   echo "$as_me:11243: \$? = $ac_status" >&5
11244   (exit $ac_status); } &&
11245          { ac_try='test -s conftest.$ac_objext'
11246   { (eval echo "$as_me:11246: \"$ac_try\"") >&5
11247   (eval $ac_try) 2>&5
11248   ac_status=$?
11249   echo "$as_me:11249: \$? = $ac_status" >&5
11250   (exit $ac_status); }; }; then
11251   cf_cv_fixup_sigwinch=$cf_sigwinch
11252          break
11253 else
11254   echo "$as_me: failed program was:" >&5
11255 cat conftest.$ac_ext >&5
11256 fi
11257 rm -f conftest.$ac_objext conftest.$ac_ext
11258
11259 cf_sigwinch=`expr $cf_sigwinch - 1`
11260 done
11261
11262 fi
11263 echo "$as_me:11263: result: $cf_cv_fixup_sigwinch" >&5
11264 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11265
11266         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11267                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11268         fi
11269 fi
11270
11271 # Checks for CODESET support.
11272
11273 echo "$as_me:11273: checking for nl_langinfo and CODESET" >&5
11274 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11275 if test "${am_cv_langinfo_codeset+set}" = set; then
11276   echo $ECHO_N "(cached) $ECHO_C" >&6
11277 else
11278   cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281 #include <langinfo.h>
11282 int
11283 main (void)
11284 {
11285 char* cs = nl_langinfo(CODESET); (void)cs
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 rm -f conftest.$ac_objext conftest$ac_exeext
11291 if { (eval echo "$as_me:11291: \"$ac_link\"") >&5
11292   (eval $ac_link) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); } &&
11296          { ac_try='test -s conftest$ac_exeext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   am_cv_langinfo_codeset=yes
11303 else
11304   echo "$as_me: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11306 am_cv_langinfo_codeset=no
11307 fi
11308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11309
11310 fi
11311 echo "$as_me:11311: result: $am_cv_langinfo_codeset" >&5
11312 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11313         if test $am_cv_langinfo_codeset = yes; then
11314
11315 cat >>confdefs.h <<\EOF
11316 #define HAVE_LANGINFO_CODESET 1
11317 EOF
11318
11319         fi
11320
11321 # use these variables to work around a defect in gcc's fixincludes.
11322 NCURSES_OK_WCHAR_T=
11323 NCURSES_OK_WINT_T=
11324
11325 echo "$as_me:11325: checking if you want wide-character code" >&5
11326 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11327
11328 # Check whether --enable-widec or --disable-widec was given.
11329 if test "${enable_widec+set}" = set; then
11330   enableval="$enable_widec"
11331   with_widec=$enableval
11332 else
11333   with_widec=no
11334 fi;
11335 echo "$as_me:11335: result: $with_widec" >&5
11336 echo "${ECHO_T}$with_widec" >&6
11337
11338 NCURSES_WCWIDTH_GRAPHICS=1
11339
11340 if test "x$with_widec" = xyes ; then
11341         if test "x$disable_lib_suffixes" = xno ; then
11342                 LIB_SUFFIX="w${LIB_SUFFIX}"
11343         fi
11344
11345 cat >>confdefs.h <<\EOF
11346 #define USE_WIDEC_SUPPORT 1
11347 EOF
11348
11349 cat >>confdefs.h <<\EOF
11350 #define NCURSES_WIDECHAR 1
11351 EOF
11352
11353 for ac_header in \
11354 wchar.h \
11355 wctype.h \
11356
11357 do
11358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11359 echo "$as_me:11359: checking for $ac_header" >&5
11360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11362   echo $ECHO_N "(cached) $ECHO_C" >&6
11363 else
11364   cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367 #include <$ac_header>
11368 _ACEOF
11369 if { (eval echo "$as_me:11369: \"$ac_cpp conftest.$ac_ext\"") >&5
11370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11371   ac_status=$?
11372   egrep -v '^ *\+' conftest.er1 >conftest.err
11373   rm -f conftest.er1
11374   cat conftest.err >&5
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); } >/dev/null; then
11377   if test -s conftest.err; then
11378     ac_cpp_err=$ac_c_preproc_warn_flag
11379   else
11380     ac_cpp_err=
11381   fi
11382 else
11383   ac_cpp_err=yes
11384 fi
11385 if test -z "$ac_cpp_err"; then
11386   eval "$as_ac_Header=yes"
11387 else
11388   echo "$as_me: failed program was:" >&5
11389   cat conftest.$ac_ext >&5
11390   eval "$as_ac_Header=no"
11391 fi
11392 rm -f conftest.err conftest.$ac_ext
11393 fi
11394 echo "$as_me:11394: result: `eval echo '${'$as_ac_Header'}'`" >&5
11395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11396 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11397   cat >>confdefs.h <<EOF
11398 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11399 EOF
11400
11401 fi
11402 done
11403
11404 echo "$as_me:11404: checking if wchar.h can be used as is" >&5
11405 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11406 if test "${cf_cv_wchar_h_okay+set}" = set; then
11407   echo $ECHO_N "(cached) $ECHO_C" >&6
11408 else
11409
11410 cat >conftest.$ac_ext <<_ACEOF
11411 #line 11411 "configure"
11412 #include "confdefs.h"
11413
11414 #include <stdlib.h>
11415 #ifdef HAVE_WCHAR_H
11416 #include <wchar.h>
11417 #endif
11418 #ifdef HAVE_WCTYPE_H
11419 #include <wctype.h>
11420 #endif
11421
11422 int
11423 main (void)
11424 {
11425
11426         wint_t foo = 0;
11427         int bar = iswpunct(foo)
11428   ;
11429   return 0;
11430 }
11431 _ACEOF
11432 rm -f conftest.$ac_objext
11433 if { (eval echo "$as_me:11433: \"$ac_compile\"") >&5
11434   (eval $ac_compile) 2>&5
11435   ac_status=$?
11436   echo "$as_me:11436: \$? = $ac_status" >&5
11437   (exit $ac_status); } &&
11438          { ac_try='test -s conftest.$ac_objext'
11439   { (eval echo "$as_me:11439: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:11442: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   cf_cv_wchar_h_okay=yes
11445 else
11446   echo "$as_me: failed program was:" >&5
11447 cat conftest.$ac_ext >&5
11448 cf_cv_wchar_h_okay=no
11449 fi
11450 rm -f conftest.$ac_objext conftest.$ac_ext
11451 fi
11452 echo "$as_me:11452: result: $cf_cv_wchar_h_okay" >&5
11453 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11454
11455 if test $cf_cv_wchar_h_okay = no
11456 then
11457
11458 echo "$as_me:11458: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11459 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11460 cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11463 #include <sys/types.h>
11464
11465 int
11466 main (void)
11467 {
11468
11469 #ifndef _XOPEN_SOURCE_EXTENDED
11470 make an error
11471 #endif
11472   ;
11473   return 0;
11474 }
11475 _ACEOF
11476 rm -f conftest.$ac_objext
11477 if { (eval echo "$as_me:11477: \"$ac_compile\"") >&5
11478   (eval $ac_compile) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); } &&
11482          { ac_try='test -s conftest.$ac_objext'
11483   { (eval echo "$as_me:11483: \"$ac_try\"") >&5
11484   (eval $ac_try) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit $ac_status); }; }; then
11488   cf_result=no
11489 else
11490   echo "$as_me: failed program was:" >&5
11491 cat conftest.$ac_ext >&5
11492 cf_result=yes
11493 fi
11494 rm -f conftest.$ac_objext conftest.$ac_ext
11495 echo "$as_me:11495: result: $cf_result" >&5
11496 echo "${ECHO_T}$cf_result" >&6
11497
11498 if test "$cf_result" = yes ; then
11499         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11500 elif test "x" != "x" ; then
11501         echo "$as_me:11501: checking checking for compatible value versus " >&5
11502 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11503         cat >conftest.$ac_ext <<_ACEOF
11504 #line 11504 "configure"
11505 #include "confdefs.h"
11506 #include <sys/types.h>
11507
11508 int
11509 main (void)
11510 {
11511
11512 #if _XOPEN_SOURCE_EXTENDED- < 0
11513 make an error
11514 #endif
11515   ;
11516   return 0;
11517 }
11518 _ACEOF
11519 rm -f conftest.$ac_objext
11520 if { (eval echo "$as_me:11520: \"$ac_compile\"") >&5
11521   (eval $ac_compile) 2>&5
11522   ac_status=$?
11523   echo "$as_me:11523: \$? = $ac_status" >&5
11524   (exit $ac_status); } &&
11525          { ac_try='test -s conftest.$ac_objext'
11526   { (eval echo "$as_me:11526: \"$ac_try\"") >&5
11527   (eval $ac_try) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); }; }; then
11531   cf_result=yes
11532 else
11533   echo "$as_me: failed program was:" >&5
11534 cat conftest.$ac_ext >&5
11535 cf_result=no
11536 fi
11537 rm -f conftest.$ac_objext conftest.$ac_ext
11538         echo "$as_me:11538: result: $cf_result" >&5
11539 echo "${ECHO_T}$cf_result" >&6
11540         if test "$cf_result" = no ; then
11541                 # perhaps we can override it - try...
11542                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11543         fi
11544 fi
11545
11546 fi
11547
11548 echo "$as_me:11548: checking if wcwidth agrees graphics are single-width" >&5
11549 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11550 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11551   echo $ECHO_N "(cached) $ECHO_C" >&6
11552 else
11553
11554 cat >conftest.in <<CF_EOF
11555 -       VT100 symbols
11556 0x250c  upper left corner
11557 0x2514  lower left corner
11558 0x2510  upper right corner
11559 0x2518  lower right corner
11560 0x251c  tee pointing left
11561 0x2524  tee pointing right
11562 0x2534  tee pointing up
11563 0x252c  tee pointing down
11564 0x2500  horizontal line
11565 0x2502  vertical line
11566 0x253c  large plus or crossover
11567 0x23ba  scan line 1
11568 0x23bd  scan line 9
11569 0x25c6  diamond
11570 0x2592  checker board (stipple)
11571 0x00b0  degree symbol
11572 0x00b1  plus/minus
11573 0x00b7  bullet
11574 -       Teletype 5410v1 symbols
11575 0x2190  arrow pointing left
11576 0x2192  arrow pointing right
11577 0x2193  arrow pointing down
11578 0x2191  arrow pointing up
11579 0x2592  board of squares
11580 0x2603  lantern symbol
11581 0x25ae  solid square block
11582 -       these defaults were invented for ncurses
11583 0x23bb  scan line 3
11584 0x23bc  scan line 7
11585 0x2264  less-than-or-equal-to
11586 0x2265  greater-than-or-equal-to
11587 0x03c0  greek pi
11588 0x2260  not-equal
11589 0x00a3  pound-sterling symbol
11590 -       thick-line-drawing
11591 0x250f  upper left corner
11592 0x2517  lower left corner
11593 0x2513  upper right corner
11594 0x251b  lower right corner
11595 0x2523  tee pointing left
11596 0x252b  tee pointing right
11597 0x253b  tee pointing up
11598 0x2533  tee pointing down
11599 0x2501  horizontal line
11600 0x2503  vertical line
11601 0x254b  large plus or crossover
11602 -       double-line-drawing
11603 0x2554  upper left corner
11604 0x255a  lower left corner
11605 0x2557  upper right corner
11606 0x255d  lower right corner
11607 0x2563  tee pointing left
11608 0x2560  tee pointing right
11609 0x2569  tee pointing up
11610 0x2566  tee pointing down
11611 0x2550  horizontal line
11612 0x2551  vertical line
11613 0x256c  large plus or crossover
11614 CF_EOF
11615 if test "$cross_compiling" = yes; then
11616   cf_cv_wcwidth_graphics=unknown
11617 else
11618   cat >conftest.$ac_ext <<_ACEOF
11619 #line 11619 "configure"
11620 #include "confdefs.h"
11621
11622 #include <locale.h>
11623 #include <stdio.h>
11624 #include <wchar.h>
11625
11626 #define MY_LEN 80
11627
11628 int
11629 main(void)
11630 {
11631         FILE *fp;
11632         int value;
11633         char buffer[MY_LEN + 1];
11634         char notes[MY_LEN + 1];
11635         int totals = 0;
11636         int passed = 0;
11637
11638         if (setlocale(LC_ALL, "en_US.UTF8") ||
11639                 setlocale(LC_ALL, "en_US.UTF-8") ||
11640                 setlocale(LC_ALL, "en_US.utf8") ||
11641                 setlocale(LC_ALL, "en_US.utf-8")) {
11642                 if ((fp = fopen("conftest.in", "r")) != 0) {
11643                         while (fgets(buffer, MY_LEN, fp) != 0) {
11644                                 if (*buffer == '-') {
11645                                         fprintf(stderr, "\t%s", buffer);
11646                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11647                                         ++totals;
11648                                         if (wcwidth(value) == 1)
11649                                                 ++passed;
11650                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11651                                 } else {
11652                                         fprintf(stderr, "?\t%s", buffer);
11653                                 }
11654                         }
11655                 }
11656         }
11657         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11658         return (totals == passed) ? 0 : 1;
11659 }
11660
11661 _ACEOF
11662 rm -f conftest$ac_exeext
11663 if { (eval echo "$as_me:11663: \"$ac_link\"") >&5
11664   (eval $ac_link) 2>&5
11665   ac_status=$?
11666   echo "$as_me:11666: \$? = $ac_status" >&5
11667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11668   { (eval echo "$as_me:11668: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   cf_cv_wcwidth_graphics=yes
11674 else
11675   echo "$as_me: program exited with status $ac_status" >&5
11676 echo "$as_me: failed program was:" >&5
11677 cat conftest.$ac_ext >&5
11678 cf_cv_wcwidth_graphics=no
11679 fi
11680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11681 fi
11682
11683 fi
11684 echo "$as_me:11684: result: $cf_cv_wcwidth_graphics" >&5
11685 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11686
11687         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11688
11689         # with_overwrite=no
11690         NCURSES_CH_T=cchar_t
11691
11692 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11693 do
11694 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11695 echo "$as_me:11695: checking for $ac_func" >&5
11696 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11697 if eval "test \"\${$as_ac_var+set}\" = set"; then
11698   echo $ECHO_N "(cached) $ECHO_C" >&6
11699 else
11700   cat >conftest.$ac_ext <<_ACEOF
11701 #line 11701 "configure"
11702 #include "confdefs.h"
11703 #define $ac_func autoconf_temporary
11704 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11705 #undef $ac_func
11706
11707 #ifdef __cplusplus
11708 extern "C"
11709 #endif
11710
11711 /* We use char because int might match the return type of a gcc2
11712    builtin and then its argument prototype would still apply.  */
11713 char $ac_func (void);
11714
11715 int
11716 main (void)
11717 {
11718
11719 /* The GNU C library defines stubs for functions which it implements
11720     to always fail with ENOSYS.  Some functions are actually named
11721     something starting with __ and the normal name is an alias.  */
11722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11723 #error found stub for $ac_func
11724 #endif
11725
11726         return $ac_func ();
11727   ;
11728   return 0;
11729 }
11730 _ACEOF
11731 rm -f conftest.$ac_objext conftest$ac_exeext
11732 if { (eval echo "$as_me:11732: \"$ac_link\"") >&5
11733   (eval $ac_link) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit $ac_status); } &&
11737          { ac_try='test -s conftest$ac_exeext'
11738   { (eval echo "$as_me:11738: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:11741: \$? = $ac_status" >&5
11742   (exit $ac_status); }; }; then
11743   eval "$as_ac_var=yes"
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 cat conftest.$ac_ext >&5
11747 eval "$as_ac_var=no"
11748 fi
11749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11750 fi
11751 echo "$as_me:11751: result: `eval echo '${'$as_ac_var'}'`" >&5
11752 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11753 if test `eval echo '${'$as_ac_var'}'` = yes; then
11754   cat >>confdefs.h <<EOF
11755 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11756 EOF
11757
11758 fi
11759 done
11760
11761         if test "x$ac_cv_func_putwc" != xyes ; then
11762
11763 echo "$as_me:11763: checking for multibyte character support" >&5
11764 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11765 if test "${cf_cv_utf8_lib+set}" = set; then
11766   echo $ECHO_N "(cached) $ECHO_C" >&6
11767 else
11768
11769         cf_save_LIBS="$LIBS"
11770         cat >conftest.$ac_ext <<_ACEOF
11771 #line 11771 "configure"
11772 #include "confdefs.h"
11773
11774 #include <stdlib.h>
11775 int
11776 main (void)
11777 {
11778 putwc(0,0);
11779   ;
11780   return 0;
11781 }
11782 _ACEOF
11783 rm -f conftest.$ac_objext conftest$ac_exeext
11784 if { (eval echo "$as_me:11784: \"$ac_link\"") >&5
11785   (eval $ac_link) 2>&5
11786   ac_status=$?
11787   echo "$as_me:11787: \$? = $ac_status" >&5
11788   (exit $ac_status); } &&
11789          { ac_try='test -s conftest$ac_exeext'
11790   { (eval echo "$as_me:11790: \"$ac_try\"") >&5
11791   (eval $ac_try) 2>&5
11792   ac_status=$?
11793   echo "$as_me:11793: \$? = $ac_status" >&5
11794   (exit $ac_status); }; }; then
11795   cf_cv_utf8_lib=yes
11796 else
11797   echo "$as_me: failed program was:" >&5
11798 cat conftest.$ac_ext >&5
11799
11800 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11801 # will be set on completion of the AC_TRY_LINK below.
11802 cf_cv_header_path_utf8=
11803 cf_cv_library_path_utf8=
11804
11805 echo "${as_me:-configure}:11805: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11806
11807 cf_save_LIBS="$LIBS"
11808
11809 cat >conftest.$ac_ext <<_ACEOF
11810 #line 11810 "configure"
11811 #include "confdefs.h"
11812
11813 #include <libutf8.h>
11814 int
11815 main (void)
11816 {
11817 putwc(0,0);
11818   ;
11819   return 0;
11820 }
11821 _ACEOF
11822 rm -f conftest.$ac_objext conftest$ac_exeext
11823 if { (eval echo "$as_me:11823: \"$ac_link\"") >&5
11824   (eval $ac_link) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); } &&
11828          { ac_try='test -s conftest$ac_exeext'
11829   { (eval echo "$as_me:11829: \"$ac_try\"") >&5
11830   (eval $ac_try) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); }; }; then
11834
11835         cf_cv_find_linkage_utf8=yes
11836         cf_cv_header_path_utf8=/usr/include
11837         cf_cv_library_path_utf8=/usr/lib
11838
11839 else
11840   echo "$as_me: failed program was:" >&5
11841 cat conftest.$ac_ext >&5
11842
11843 LIBS="-lutf8  $cf_save_LIBS"
11844
11845 cat >conftest.$ac_ext <<_ACEOF
11846 #line 11846 "configure"
11847 #include "confdefs.h"
11848
11849 #include <libutf8.h>
11850 int
11851 main (void)
11852 {
11853 putwc(0,0);
11854   ;
11855   return 0;
11856 }
11857 _ACEOF
11858 rm -f conftest.$ac_objext conftest$ac_exeext
11859 if { (eval echo "$as_me:11859: \"$ac_link\"") >&5
11860   (eval $ac_link) 2>&5
11861   ac_status=$?
11862   echo "$as_me:11862: \$? = $ac_status" >&5
11863   (exit $ac_status); } &&
11864          { ac_try='test -s conftest$ac_exeext'
11865   { (eval echo "$as_me:11865: \"$ac_try\"") >&5
11866   (eval $ac_try) 2>&5
11867   ac_status=$?
11868   echo "$as_me:11868: \$? = $ac_status" >&5
11869   (exit $ac_status); }; }; then
11870
11871         cf_cv_find_linkage_utf8=yes
11872         cf_cv_header_path_utf8=/usr/include
11873         cf_cv_library_path_utf8=/usr/lib
11874         cf_cv_library_file_utf8="-lutf8"
11875
11876 else
11877   echo "$as_me: failed program was:" >&5
11878 cat conftest.$ac_ext >&5
11879
11880         cf_cv_find_linkage_utf8=no
11881         LIBS="$cf_save_LIBS"
11882
11883         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11884
11885 echo "${as_me:-configure}:11885: testing find linkage for utf8 library ..." 1>&5
11886
11887 echo "${as_me:-configure}:11887: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11888
11889         cf_save_CPPFLAGS="$CPPFLAGS"
11890         cf_test_CPPFLAGS="$CPPFLAGS"
11891
11892 cf_search=
11893
11894 # collect the current set of include-directories from compiler flags
11895 cf_header_path_list=""
11896 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11897         for cf_header_path in $CPPFLAGS $CFLAGS
11898         do
11899                 case $cf_header_path in
11900                 (-I*)
11901                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11902
11903 test "x$cf_header_path" != "xNONE" && \
11904 test -d "$cf_header_path" && \
11905  {
11906         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11907         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11908         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11909         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11910         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11911         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11912 }
11913
11914                         cf_header_path_list="$cf_header_path_list $cf_search"
11915                         ;;
11916                 esac
11917         done
11918 fi
11919
11920 # add the variations for the package we are looking for
11921
11922 cf_search=
11923
11924 test "x$prefix" != "xNONE" && \
11925 test -d "$prefix" && \
11926  {
11927         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11928         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11929         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11930         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11931         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11932         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11933 }
11934
11935 for cf_subdir_prefix in \
11936         /usr \
11937         /usr/local \
11938         /usr/pkg \
11939         /opt \
11940         /opt/local \
11941         $HOME
11942 do
11943
11944 test "x$cf_subdir_prefix" != "x$prefix" && \
11945 test -d "$cf_subdir_prefix" && \
11946 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11947         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11948         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11949         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11950         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11951         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11952         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11953 }
11954
11955 done
11956
11957 test "$includedir" != NONE && \
11958 test "$includedir" != "/usr/include" && \
11959 test -d "$includedir" && {
11960         test -d $includedir &&    cf_search="$cf_search $includedir"
11961         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11962 }
11963
11964 test "$oldincludedir" != NONE && \
11965 test "$oldincludedir" != "/usr/include" && \
11966 test -d "$oldincludedir" && {
11967         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11968         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11969 }
11970
11971 cf_search="$cf_search $cf_header_path_list"
11972
11973         for cf_cv_header_path_utf8 in $cf_search
11974         do
11975                 if test -d $cf_cv_header_path_utf8 ; then
11976                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11977
11978 echo "${as_me:-configure}:11978: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11979
11980                         CPPFLAGS="$cf_save_CPPFLAGS"
11981
11982         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11983         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11984
11985                         cat >conftest.$ac_ext <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11988
11989 #include <libutf8.h>
11990 int
11991 main (void)
11992 {
11993 putwc(0,0);
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext
11999 if { (eval echo "$as_me:11999: \"$ac_compile\"") >&5
12000   (eval $ac_compile) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest.$ac_objext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010
12011                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12012
12013 echo "${as_me:-configure}:12013: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12014
12015                                 cf_cv_find_linkage_utf8=maybe
12016                                 cf_test_CPPFLAGS="$CPPFLAGS"
12017                                 break
12018 else
12019   echo "$as_me: failed program was:" >&5
12020 cat conftest.$ac_ext >&5
12021
12022                                 CPPFLAGS="$cf_save_CPPFLAGS"
12023
12024 fi
12025 rm -f conftest.$ac_objext conftest.$ac_ext
12026                 fi
12027         done
12028
12029         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12030
12031 echo "${as_me:-configure}:12031: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12032
12033                 cf_save_LIBS="$LIBS"
12034                 cf_save_LDFLAGS="$LDFLAGS"
12035
12036                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12037
12038 cf_search=
12039 cf_library_path_list=""
12040 if test -n "${LDFLAGS}${LIBS}" ; then
12041         for cf_library_path in $LDFLAGS $LIBS
12042         do
12043                 case $cf_library_path in
12044                 (-L*)
12045                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12046
12047 test "x$cf_library_path" != "xNONE" && \
12048 test -d "$cf_library_path" && \
12049  {
12050         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12051         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12052         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12053         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12054         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12055         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12056 }
12057
12058                         cf_library_path_list="$cf_library_path_list $cf_search"
12059                         ;;
12060                 esac
12061         done
12062 fi
12063
12064 cf_search=
12065
12066 test "x$prefix" != "xNONE" && \
12067 test -d "$prefix" && \
12068  {
12069         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12070         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12071         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12072         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12073         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12074         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12075 }
12076
12077 for cf_subdir_prefix in \
12078         /usr \
12079         /usr/local \
12080         /usr/pkg \
12081         /opt \
12082         /opt/local \
12083         $HOME
12084 do
12085
12086 test "x$cf_subdir_prefix" != "x$prefix" && \
12087 test -d "$cf_subdir_prefix" && \
12088 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12089         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12090         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12091         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12092         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12093         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12094         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12095 }
12096
12097 done
12098
12099 cf_search="$cf_library_path_list $cf_search"
12100
12101                         for cf_cv_library_path_utf8 in $cf_search
12102                         do
12103                                 if test -d $cf_cv_library_path_utf8 ; then
12104                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12105
12106 echo "${as_me:-configure}:12106: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12107
12108                                         CPPFLAGS="$cf_test_CPPFLAGS"
12109                                         LIBS="-lutf8  $cf_save_LIBS"
12110                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12111                                         cat >conftest.$ac_ext <<_ACEOF
12112 #line 12112 "configure"
12113 #include "confdefs.h"
12114
12115 #include <libutf8.h>
12116 int
12117 main (void)
12118 {
12119 putwc(0,0);
12120   ;
12121   return 0;
12122 }
12123 _ACEOF
12124 rm -f conftest.$ac_objext conftest$ac_exeext
12125 if { (eval echo "$as_me:12125: \"$ac_link\"") >&5
12126   (eval $ac_link) 2>&5
12127   ac_status=$?
12128   echo "$as_me:12128: \$? = $ac_status" >&5
12129   (exit $ac_status); } &&
12130          { ac_try='test -s conftest$ac_exeext'
12131   { (eval echo "$as_me:12131: \"$ac_try\"") >&5
12132   (eval $ac_try) 2>&5
12133   ac_status=$?
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); }; }; then
12136
12137                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12138
12139 echo "${as_me:-configure}:12139: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12140
12141                                         cf_cv_find_linkage_utf8=yes
12142                                         cf_cv_library_file_utf8="-lutf8"
12143                                         break
12144 else
12145   echo "$as_me: failed program was:" >&5
12146 cat conftest.$ac_ext >&5
12147
12148                                         CPPFLAGS="$cf_save_CPPFLAGS"
12149                                         LIBS="$cf_save_LIBS"
12150                                         LDFLAGS="$cf_save_LDFLAGS"
12151
12152 fi
12153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12154                                 fi
12155                         done
12156                         CPPFLAGS="$cf_save_CPPFLAGS"
12157                         LDFLAGS="$cf_save_LDFLAGS"
12158                 fi
12159
12160         else
12161                 cf_cv_find_linkage_utf8=no
12162         fi
12163
12164 fi
12165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12166
12167 fi
12168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12169
12170 LIBS="$cf_save_LIBS"
12171
12172 if test "$cf_cv_find_linkage_utf8" = yes ; then
12173 cf_cv_utf8_lib=add-on
12174 else
12175 cf_cv_utf8_lib=no
12176 fi
12177
12178 fi
12179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12180 fi
12181 echo "$as_me:12181: result: $cf_cv_utf8_lib" >&5
12182 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12183
12184 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12185 # ncurses/ncursesw:
12186 if test "$cf_cv_utf8_lib" = "add-on" ; then
12187
12188 cat >>confdefs.h <<\EOF
12189 #define HAVE_LIBUTF8_H 1
12190 EOF
12191
12192 if test -n "$cf_cv_header_path_utf8" ; then
12193   for cf_add_incdir in $cf_cv_header_path_utf8
12194   do
12195         while test $cf_add_incdir != /usr/include
12196         do
12197           if test -d $cf_add_incdir
12198           then
12199                 cf_have_incdir=no
12200                 if test -n "$CFLAGS$CPPFLAGS" ; then
12201                   # a loop is needed to ensure we can add subdirs of existing dirs
12202                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12203                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12204                           cf_have_incdir=yes; break
12205                         fi
12206                   done
12207                 fi
12208
12209                 if test "$cf_have_incdir" = no ; then
12210                   if test "$cf_add_incdir" = /usr/local/include ; then
12211                         if test "$GCC" = yes
12212                         then
12213                           cf_save_CPPFLAGS=$CPPFLAGS
12214
12215         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12216         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12217
12218                           cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12221 #include <stdio.h>
12222 int
12223 main (void)
12224 {
12225 printf("Hello")
12226   ;
12227   return 0;
12228 }
12229 _ACEOF
12230 rm -f conftest.$ac_objext
12231 if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5
12232   (eval $ac_compile) 2>&5
12233   ac_status=$?
12234   echo "$as_me:12234: \$? = $ac_status" >&5
12235   (exit $ac_status); } &&
12236          { ac_try='test -s conftest.$ac_objext'
12237   { (eval echo "$as_me:12237: \"$ac_try\"") >&5
12238   (eval $ac_try) 2>&5
12239   ac_status=$?
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit $ac_status); }; }; then
12242   :
12243 else
12244   echo "$as_me: failed program was:" >&5
12245 cat conftest.$ac_ext >&5
12246 cf_have_incdir=yes
12247 fi
12248 rm -f conftest.$ac_objext conftest.$ac_ext
12249                           CPPFLAGS=$cf_save_CPPFLAGS
12250                         fi
12251                   fi
12252                 fi
12253
12254                 if test "$cf_have_incdir" = no ; then
12255                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12256
12257 echo "${as_me:-configure}:12257: testing adding $cf_add_incdir to include-path ..." 1>&5
12258
12259                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12260
12261                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12262                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12263                   cf_add_incdir="$cf_top_incdir"
12264                 else
12265                   break
12266                 fi
12267           else
12268                 break
12269           fi
12270         done
12271   done
12272 fi
12273
12274 if test -n "$cf_cv_library_path_utf8" ; then
12275         for cf_add_libdir in $cf_cv_library_path_utf8
12276         do
12277                 if test $cf_add_libdir = /usr/lib ; then
12278                         :
12279                 elif test -d $cf_add_libdir
12280                 then
12281                         cf_have_libdir=no
12282                         if test -n "$LDFLAGS$LIBS" ; then
12283                                 # a loop is needed to ensure we can add subdirs of existing dirs
12284                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12285                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12286                                                 cf_have_libdir=yes; break
12287                                         fi
12288                                 done
12289                         fi
12290                         if test "$cf_have_libdir" = no ; then
12291                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12292
12293 echo "${as_me:-configure}:12293: testing adding $cf_add_libdir to library-path ..." 1>&5
12294
12295                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12296                         fi
12297                 fi
12298         done
12299 fi
12300
12301 cf_add_libs="$LIBS"
12302 # reverse order
12303 cf_add_0lib=
12304 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12305 # filter duplicates
12306 for cf_add_1lib in $cf_add_0lib; do
12307         for cf_add_2lib in $cf_add_libs; do
12308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12309                         cf_add_1lib=
12310                         break
12311                 fi
12312         done
12313         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12314 done
12315 LIBS="$cf_add_libs"
12316
12317 fi
12318
12319                 if test "$cf_cv_utf8_lib" != no ; then
12320                         NCURSES_LIBUTF8=1
12321                 fi
12322         fi
12323
12324 # This is needed on Tru64 5.0 to declare mbstate_t
12325 echo "$as_me:12325: checking if we must include wchar.h to declare mbstate_t" >&5
12326 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12327 if test "${cf_cv_mbstate_t+set}" = set; then
12328   echo $ECHO_N "(cached) $ECHO_C" >&6
12329 else
12330
12331 cat >conftest.$ac_ext <<_ACEOF
12332 #line 12332 "configure"
12333 #include "confdefs.h"
12334
12335 #include <stdlib.h>
12336 #include <stdarg.h>
12337 #include <stdio.h>
12338 #ifdef HAVE_LIBUTF8_H
12339 #include <libutf8.h>
12340 #endif
12341 int
12342 main (void)
12343 {
12344 mbstate_t state
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f conftest.$ac_objext
12350 if { (eval echo "$as_me:12350: \"$ac_compile\"") >&5
12351   (eval $ac_compile) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest.$ac_objext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   cf_cv_mbstate_t=no
12362 else
12363   echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 cat >conftest.$ac_ext <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368
12369 #include <stdlib.h>
12370 #include <stdarg.h>
12371 #include <stdio.h>
12372 #include <wchar.h>
12373 #ifdef HAVE_LIBUTF8_H
12374 #include <libutf8.h>
12375 #endif
12376 int
12377 main (void)
12378 {
12379 mbstate_t value
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest.$ac_objext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   cf_cv_mbstate_t=yes
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 cf_cv_mbstate_t=unknown
12401 fi
12402 rm -f conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 rm -f conftest.$ac_objext conftest.$ac_ext
12405 fi
12406 echo "$as_me:12406: result: $cf_cv_mbstate_t" >&5
12407 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12408
12409 if test "$cf_cv_mbstate_t" = yes ; then
12410
12411 cat >>confdefs.h <<\EOF
12412 #define NEED_WCHAR_H 1
12413 EOF
12414
12415         NEED_WCHAR_H=1
12416 fi
12417
12418 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12419 if test "$cf_cv_mbstate_t" = unknown ; then
12420         NCURSES_MBSTATE_T=1
12421 fi
12422
12423 # This is needed on Tru64 5.0 to declare wchar_t
12424 echo "$as_me:12424: checking if we must include wchar.h to declare wchar_t" >&5
12425 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12426 if test "${cf_cv_wchar_t+set}" = set; then
12427   echo $ECHO_N "(cached) $ECHO_C" >&6
12428 else
12429
12430 cat >conftest.$ac_ext <<_ACEOF
12431 #line 12431 "configure"
12432 #include "confdefs.h"
12433
12434 #include <stdlib.h>
12435 #include <stdarg.h>
12436 #include <stdio.h>
12437 #ifdef HAVE_LIBUTF8_H
12438 #include <libutf8.h>
12439 #endif
12440 int
12441 main (void)
12442 {
12443 wchar_t state
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448 rm -f conftest.$ac_objext
12449 if { (eval echo "$as_me:12449: \"$ac_compile\"") >&5
12450   (eval $ac_compile) 2>&5
12451   ac_status=$?
12452   echo "$as_me:12452: \$? = $ac_status" >&5
12453   (exit $ac_status); } &&
12454          { ac_try='test -s conftest.$ac_objext'
12455   { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456   (eval $ac_try) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); }; }; then
12460   cf_cv_wchar_t=no
12461 else
12462   echo "$as_me: failed program was:" >&5
12463 cat conftest.$ac_ext >&5
12464 cat >conftest.$ac_ext <<_ACEOF
12465 #line 12465 "configure"
12466 #include "confdefs.h"
12467
12468 #include <stdlib.h>
12469 #include <stdarg.h>
12470 #include <stdio.h>
12471 #include <wchar.h>
12472 #ifdef HAVE_LIBUTF8_H
12473 #include <libutf8.h>
12474 #endif
12475 int
12476 main (void)
12477 {
12478 wchar_t value
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483 rm -f conftest.$ac_objext
12484 if { (eval echo "$as_me:12484: \"$ac_compile\"") >&5
12485   (eval $ac_compile) 2>&5
12486   ac_status=$?
12487   echo "$as_me:12487: \$? = $ac_status" >&5
12488   (exit $ac_status); } &&
12489          { ac_try='test -s conftest.$ac_objext'
12490   { (eval echo "$as_me:12490: \"$ac_try\"") >&5
12491   (eval $ac_try) 2>&5
12492   ac_status=$?
12493   echo "$as_me:12493: \$? = $ac_status" >&5
12494   (exit $ac_status); }; }; then
12495   cf_cv_wchar_t=yes
12496 else
12497   echo "$as_me: failed program was:" >&5
12498 cat conftest.$ac_ext >&5
12499 cf_cv_wchar_t=unknown
12500 fi
12501 rm -f conftest.$ac_objext conftest.$ac_ext
12502 fi
12503 rm -f conftest.$ac_objext conftest.$ac_ext
12504 fi
12505 echo "$as_me:12505: result: $cf_cv_wchar_t" >&5
12506 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12507
12508 if test "$cf_cv_wchar_t" = yes ; then
12509
12510 cat >>confdefs.h <<\EOF
12511 #define NEED_WCHAR_H 1
12512 EOF
12513
12514         NEED_WCHAR_H=1
12515 fi
12516
12517 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12518 if test "$cf_cv_wchar_t" = unknown ; then
12519         NCURSES_WCHAR_T=1
12520 fi
12521
12522 # if we find wchar_t in either place, use substitution to provide a fallback.
12523 if test "$cf_cv_wchar_t" != unknown ; then
12524         NCURSES_OK_WCHAR_T=1
12525 fi
12526
12527 # This is needed on Tru64 5.0 to declare wint_t
12528 echo "$as_me:12528: checking if we must include wchar.h to declare wint_t" >&5
12529 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12530 if test "${cf_cv_wint_t+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533
12534 cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 #include <stdlib.h>
12539 #include <stdarg.h>
12540 #include <stdio.h>
12541 #ifdef HAVE_LIBUTF8_H
12542 #include <libutf8.h>
12543 #endif
12544 int
12545 main (void)
12546 {
12547 wint_t state
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 rm -f conftest.$ac_objext
12553 if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12554   (eval $ac_compile) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit $ac_status); } &&
12558          { ac_try='test -s conftest.$ac_objext'
12559   { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12560   (eval $ac_try) 2>&5
12561   ac_status=$?
12562   echo "$as_me:12562: \$? = $ac_status" >&5
12563   (exit $ac_status); }; }; then
12564   cf_cv_wint_t=no
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 cat conftest.$ac_ext >&5
12568 cat >conftest.$ac_ext <<_ACEOF
12569 #line 12569 "configure"
12570 #include "confdefs.h"
12571
12572 #include <stdlib.h>
12573 #include <stdarg.h>
12574 #include <stdio.h>
12575 #include <wchar.h>
12576 #ifdef HAVE_LIBUTF8_H
12577 #include <libutf8.h>
12578 #endif
12579 int
12580 main (void)
12581 {
12582 wint_t value
12583   ;
12584   return 0;
12585 }
12586 _ACEOF
12587 rm -f conftest.$ac_objext
12588 if { (eval echo "$as_me:12588: \"$ac_compile\"") >&5
12589   (eval $ac_compile) 2>&5
12590   ac_status=$?
12591   echo "$as_me:12591: \$? = $ac_status" >&5
12592   (exit $ac_status); } &&
12593          { ac_try='test -s conftest.$ac_objext'
12594   { (eval echo "$as_me:12594: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   cf_cv_wint_t=yes
12600 else
12601   echo "$as_me: failed program was:" >&5
12602 cat conftest.$ac_ext >&5
12603 cf_cv_wint_t=unknown
12604 fi
12605 rm -f conftest.$ac_objext conftest.$ac_ext
12606 fi
12607 rm -f conftest.$ac_objext conftest.$ac_ext
12608 fi
12609 echo "$as_me:12609: result: $cf_cv_wint_t" >&5
12610 echo "${ECHO_T}$cf_cv_wint_t" >&6
12611
12612 if test "$cf_cv_wint_t" = yes ; then
12613
12614 cat >>confdefs.h <<\EOF
12615 #define NEED_WCHAR_H 1
12616 EOF
12617
12618         NEED_WCHAR_H=1
12619 fi
12620
12621 # if we do not find wint_t in either place, use substitution to provide a fallback.
12622 if test "$cf_cv_wint_t" = unknown ; then
12623         NCURSES_WINT_T=1
12624 fi
12625
12626 # if we find wint_t in either place, use substitution to provide a fallback.
12627 if test "$cf_cv_wint_t" != unknown ; then
12628         NCURSES_OK_WINT_T=1
12629 fi
12630
12631         if test "$NCURSES_MBSTATE_T" != 0; then
12632
12633 cat >>confdefs.h <<\EOF
12634 #define NEED_MBSTATE_T_DEF 1
12635 EOF
12636
12637         fi
12638 fi
12639
12640 ###   use option --disable-lp64 to allow long chtype
12641 echo "$as_me:12641: checking whether to enable _LP64 definition in curses.h" >&5
12642 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12643
12644 # Check whether --enable-lp64 or --disable-lp64 was given.
12645 if test "${enable_lp64+set}" = set; then
12646   enableval="$enable_lp64"
12647   with_lp64=$enableval
12648 else
12649   with_lp64=$cf_dft_with_lp64
12650 fi;
12651 echo "$as_me:12651: result: $with_lp64" >&5
12652 echo "${ECHO_T}$with_lp64" >&6
12653
12654 if test "x$with_lp64" = xyes ; then
12655         cf_cv_enable_lp64=1
12656 else
12657         cf_cv_enable_lp64=0
12658 fi
12659
12660 # Check whether --enable-largefile or --disable-largefile was given.
12661 if test "${enable_largefile+set}" = set; then
12662   enableval="$enable_largefile"
12663
12664 fi;
12665 if test "$enable_largefile" != no; then
12666
12667   echo "$as_me:12667: checking for special C compiler options needed for large files" >&5
12668 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12669 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12670   echo $ECHO_N "(cached) $ECHO_C" >&6
12671 else
12672   ac_cv_sys_largefile_CC=no
12673      if test "$GCC" != yes; then
12674        ac_save_CC=$CC
12675        while :; do
12676          # IRIX 6.2 and later do not support large files by default,
12677          # so use the C compiler's -n32 option if that helps.
12678          cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681 #include <sys/types.h>
12682  /* Check that off_t can represent 2**63 - 1 correctly.
12683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12684     since some C++ compilers masquerading as C compilers
12685     incorrectly reject 9223372036854775807.  */
12686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12688                        && LARGE_OFF_T % 2147483647 == 1)
12689                       ? 1 : -1];
12690 int
12691 main (void)
12692 {
12693
12694   ;
12695   return 0;
12696 }
12697 _ACEOF
12698          rm -f conftest.$ac_objext
12699 if { (eval echo "$as_me:12699: \"$ac_compile\"") >&5
12700   (eval $ac_compile) 2>&5
12701   ac_status=$?
12702   echo "$as_me:12702: \$? = $ac_status" >&5
12703   (exit $ac_status); } &&
12704          { ac_try='test -s conftest.$ac_objext'
12705   { (eval echo "$as_me:12705: \"$ac_try\"") >&5
12706   (eval $ac_try) 2>&5
12707   ac_status=$?
12708   echo "$as_me:12708: \$? = $ac_status" >&5
12709   (exit $ac_status); }; }; then
12710   break
12711 else
12712   echo "$as_me: failed program was:" >&5
12713 cat conftest.$ac_ext >&5
12714 fi
12715 rm -f conftest.$ac_objext
12716          CC="$CC -n32"
12717          rm -f conftest.$ac_objext
12718 if { (eval echo "$as_me:12718: \"$ac_compile\"") >&5
12719   (eval $ac_compile) 2>&5
12720   ac_status=$?
12721   echo "$as_me:12721: \$? = $ac_status" >&5
12722   (exit $ac_status); } &&
12723          { ac_try='test -s conftest.$ac_objext'
12724   { (eval echo "$as_me:12724: \"$ac_try\"") >&5
12725   (eval $ac_try) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); }; }; then
12729   ac_cv_sys_largefile_CC=' -n32'; break
12730 else
12731   echo "$as_me: failed program was:" >&5
12732 cat conftest.$ac_ext >&5
12733 fi
12734 rm -f conftest.$ac_objext
12735          break
12736        done
12737        CC=$ac_save_CC
12738        rm -f conftest.$ac_ext
12739     fi
12740 fi
12741 echo "$as_me:12741: result: $ac_cv_sys_largefile_CC" >&5
12742 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12743   if test "$ac_cv_sys_largefile_CC" != no; then
12744     CC=$CC$ac_cv_sys_largefile_CC
12745   fi
12746
12747   echo "$as_me:12747: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12748 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12749 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752   while :; do
12753   ac_cv_sys_file_offset_bits=no
12754   cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757 #include <sys/types.h>
12758  /* Check that off_t can represent 2**63 - 1 correctly.
12759     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12760     since some C++ compilers masquerading as C compilers
12761     incorrectly reject 9223372036854775807.  */
12762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12763   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12764                        && LARGE_OFF_T % 2147483647 == 1)
12765                       ? 1 : -1];
12766 int
12767 main (void)
12768 {
12769
12770   ;
12771   return 0;
12772 }
12773 _ACEOF
12774 rm -f conftest.$ac_objext
12775 if { (eval echo "$as_me:12775: \"$ac_compile\"") >&5
12776   (eval $ac_compile) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit $ac_status); } &&
12780          { ac_try='test -s conftest.$ac_objext'
12781   { (eval echo "$as_me:12781: \"$ac_try\"") >&5
12782   (eval $ac_try) 2>&5
12783   ac_status=$?
12784   echo "$as_me:12784: \$? = $ac_status" >&5
12785   (exit $ac_status); }; }; then
12786   break
12787 else
12788   echo "$as_me: failed program was:" >&5
12789 cat conftest.$ac_ext >&5
12790 fi
12791 rm -f conftest.$ac_objext conftest.$ac_ext
12792   cat >conftest.$ac_ext <<_ACEOF
12793 #line 12793 "configure"
12794 #include "confdefs.h"
12795 #define _FILE_OFFSET_BITS 64
12796 #include <sys/types.h>
12797  /* Check that off_t can represent 2**63 - 1 correctly.
12798     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12799     since some C++ compilers masquerading as C compilers
12800     incorrectly reject 9223372036854775807.  */
12801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12802   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12803                        && LARGE_OFF_T % 2147483647 == 1)
12804                       ? 1 : -1];
12805 int
12806 main (void)
12807 {
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:12814: \"$ac_compile\"") >&5
12815   (eval $ac_compile) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest.$ac_objext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   ac_cv_sys_file_offset_bits=64; break
12826 else
12827   echo "$as_me: failed program was:" >&5
12828 cat conftest.$ac_ext >&5
12829 fi
12830 rm -f conftest.$ac_objext conftest.$ac_ext
12831   break
12832 done
12833 fi
12834 echo "$as_me:12834: result: $ac_cv_sys_file_offset_bits" >&5
12835 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12836 if test "$ac_cv_sys_file_offset_bits" != no; then
12837
12838 cat >>confdefs.h <<EOF
12839 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12840 EOF
12841
12842 fi
12843 rm -rf conftest*
12844   echo "$as_me:12844: checking for _LARGE_FILES value needed for large files" >&5
12845 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12846 if test "${ac_cv_sys_large_files+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849   while :; do
12850   ac_cv_sys_large_files=no
12851   cat >conftest.$ac_ext <<_ACEOF
12852 #line 12852 "configure"
12853 #include "confdefs.h"
12854 #include <sys/types.h>
12855  /* Check that off_t can represent 2**63 - 1 correctly.
12856     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12857     since some C++ compilers masquerading as C compilers
12858     incorrectly reject 9223372036854775807.  */
12859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12860   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12861                        && LARGE_OFF_T % 2147483647 == 1)
12862                       ? 1 : -1];
12863 int
12864 main (void)
12865 {
12866
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 rm -f conftest.$ac_objext
12872 if { (eval echo "$as_me:12872: \"$ac_compile\"") >&5
12873   (eval $ac_compile) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -s conftest.$ac_objext'
12878   { (eval echo "$as_me:12878: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   break
12884 else
12885   echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 fi
12888 rm -f conftest.$ac_objext conftest.$ac_ext
12889   cat >conftest.$ac_ext <<_ACEOF
12890 #line 12890 "configure"
12891 #include "confdefs.h"
12892 #define _LARGE_FILES 1
12893 #include <sys/types.h>
12894  /* Check that off_t can represent 2**63 - 1 correctly.
12895     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12896     since some C++ compilers masquerading as C compilers
12897     incorrectly reject 9223372036854775807.  */
12898 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12899   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12900                        && LARGE_OFF_T % 2147483647 == 1)
12901                       ? 1 : -1];
12902 int
12903 main (void)
12904 {
12905
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -s conftest.$ac_objext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   ac_cv_sys_large_files=1; break
12923 else
12924   echo "$as_me: failed program was:" >&5
12925 cat conftest.$ac_ext >&5
12926 fi
12927 rm -f conftest.$ac_objext conftest.$ac_ext
12928   break
12929 done
12930 fi
12931 echo "$as_me:12931: result: $ac_cv_sys_large_files" >&5
12932 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12933 if test "$ac_cv_sys_large_files" != no; then
12934
12935 cat >>confdefs.h <<EOF
12936 #define _LARGE_FILES $ac_cv_sys_large_files
12937 EOF
12938
12939 fi
12940 rm -rf conftest*
12941 fi
12942
12943         if test "$enable_largefile" != no ; then
12944         echo "$as_me:12944: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12945 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12946 if test "${ac_cv_sys_largefile_source+set}" = set; then
12947   echo $ECHO_N "(cached) $ECHO_C" >&6
12948 else
12949   while :; do
12950   ac_cv_sys_largefile_source=no
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <stdio.h>
12955 int
12956 main (void)
12957 {
12958 return !fseeko;
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext
12964 if { (eval echo "$as_me:12964: \"$ac_compile\"") >&5
12965   (eval $ac_compile) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); } &&
12969          { ac_try='test -s conftest.$ac_objext'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   break
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 fi
12980 rm -f conftest.$ac_objext conftest.$ac_ext
12981   cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984 #define _LARGEFILE_SOURCE 1
12985 #include <stdio.h>
12986 int
12987 main (void)
12988 {
12989 return !fseeko;
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f conftest.$ac_objext
12995 if { (eval echo "$as_me:12995: \"$ac_compile\"") >&5
12996   (eval $ac_compile) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit $ac_status); } &&
13000          { ac_try='test -s conftest.$ac_objext'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); }; }; then
13006   ac_cv_sys_largefile_source=1; break
13007 else
13008   echo "$as_me: failed program was:" >&5
13009 cat conftest.$ac_ext >&5
13010 fi
13011 rm -f conftest.$ac_objext conftest.$ac_ext
13012   break
13013 done
13014 fi
13015 echo "$as_me:13015: result: $ac_cv_sys_largefile_source" >&5
13016 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13017 if test "$ac_cv_sys_largefile_source" != no; then
13018
13019 cat >>confdefs.h <<EOF
13020 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13021 EOF
13022
13023 fi
13024 rm -rf conftest*
13025
13026 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13027 # in glibc 2.1.3, but that breaks too many other things.
13028 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13029 echo "$as_me:13029: checking for fseeko" >&5
13030 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13031 if test "${ac_cv_func_fseeko+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034   cat >conftest.$ac_ext <<_ACEOF
13035 #line 13035 "configure"
13036 #include "confdefs.h"
13037 #include <stdio.h>
13038 int
13039 main (void)
13040 {
13041 return fseeko && fseeko (stdin, 0, 0);
13042   ;
13043   return 0;
13044 }
13045 _ACEOF
13046 rm -f conftest.$ac_objext conftest$ac_exeext
13047 if { (eval echo "$as_me:13047: \"$ac_link\"") >&5
13048   (eval $ac_link) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit $ac_status); } &&
13052          { ac_try='test -s conftest$ac_exeext'
13053   { (eval echo "$as_me:13053: \"$ac_try\"") >&5
13054   (eval $ac_try) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); }; }; then
13058   ac_cv_func_fseeko=yes
13059 else
13060   echo "$as_me: failed program was:" >&5
13061 cat conftest.$ac_ext >&5
13062 ac_cv_func_fseeko=no
13063 fi
13064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13065 fi
13066 echo "$as_me:13066: result: $ac_cv_func_fseeko" >&5
13067 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13068 if test $ac_cv_func_fseeko = yes; then
13069
13070 cat >>confdefs.h <<\EOF
13071 #define HAVE_FSEEKO 1
13072 EOF
13073
13074 fi
13075
13076         # Normally we would collect these definitions in the config.h,
13077         # but (like _XOPEN_SOURCE), some environments rely on having these
13078         # defined before any of the system headers are included.  Another
13079         # case comes up with C++, e.g., on AIX the compiler compiles the
13080         # header files by themselves before looking at the body files it is
13081         # told to compile.  For ncurses, those header files do not include
13082         # the config.h
13083         if test "$ac_cv_sys_large_files" != no
13084         then
13085
13086         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13087         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13088
13089         fi
13090         if test "$ac_cv_sys_largefile_source" != no
13091         then
13092
13093         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13094         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13095
13096         fi
13097         if test "$ac_cv_sys_file_offset_bits" != no
13098         then
13099
13100         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13101         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13102
13103         fi
13104
13105         echo "$as_me:13105: checking whether to use struct dirent64" >&5
13106 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13107 if test "${cf_cv_struct_dirent64+set}" = set; then
13108   echo $ECHO_N "(cached) $ECHO_C" >&6
13109 else
13110
13111                 cat >conftest.$ac_ext <<_ACEOF
13112 #line 13112 "configure"
13113 #include "confdefs.h"
13114
13115 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13116 #include <sys/types.h>
13117 #include <dirent.h>
13118
13119 int
13120 main (void)
13121 {
13122
13123                 /* if transitional largefile support is setup, this is true */
13124                 extern struct dirent64 * readdir(DIR *);
13125                 struct dirent64 *x = readdir((DIR *)0);
13126                 struct dirent *y = readdir((DIR *)0);
13127                 int z = x - y;
13128                 (void)z;
13129
13130   ;
13131   return 0;
13132 }
13133 _ACEOF
13134 rm -f conftest.$ac_objext
13135 if { (eval echo "$as_me:13135: \"$ac_compile\"") >&5
13136   (eval $ac_compile) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit $ac_status); } &&
13140          { ac_try='test -s conftest.$ac_objext'
13141   { (eval echo "$as_me:13141: \"$ac_try\"") >&5
13142   (eval $ac_try) 2>&5
13143   ac_status=$?
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); }; }; then
13146   cf_cv_struct_dirent64=yes
13147 else
13148   echo "$as_me: failed program was:" >&5
13149 cat conftest.$ac_ext >&5
13150 cf_cv_struct_dirent64=no
13151 fi
13152 rm -f conftest.$ac_objext conftest.$ac_ext
13153
13154 fi
13155 echo "$as_me:13155: result: $cf_cv_struct_dirent64" >&5
13156 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13157         test "$cf_cv_struct_dirent64" = yes &&
13158 cat >>confdefs.h <<\EOF
13159 #define HAVE_STRUCT_DIRENT64 1
13160 EOF
13161
13162         fi
13163
13164 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13165 echo "$as_me:13165: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13166 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13167
13168 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13169 if test "${enable_tparm_varargs+set}" = set; then
13170   enableval="$enable_tparm_varargs"
13171   with_tparm_varargs=$enableval
13172 else
13173   with_tparm_varargs=yes
13174 fi;
13175 echo "$as_me:13175: result: $with_tparm_varargs" >&5
13176 echo "${ECHO_T}$with_tparm_varargs" >&6
13177 NCURSES_TPARM_VARARGS=0
13178 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13179
13180 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13181 if test "$with_ticlib" != no ; then
13182 echo "$as_me:13182: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13183 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13184
13185 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13186 if test "${enable_tic_depends+set}" = set; then
13187   enableval="$enable_tic_depends"
13188   with_tic_depends=$enableval
13189 else
13190   with_tic_depends=yes
13191 fi;
13192 echo "$as_me:13192: result: $with_tic_depends" >&5
13193 echo "${ECHO_T}$with_tic_depends" >&6
13194 else
13195         with_tic_depends=no
13196 fi
13197
13198 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13199 echo "$as_me:13199: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13200 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13201
13202 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13203 if test "${enable_wattr_macros+set}" = set; then
13204   enableval="$enable_wattr_macros"
13205   with_wattr_macros=$enableval
13206 else
13207   with_wattr_macros=yes
13208 fi;
13209 if [ "x$with_wattr_macros" != xyes ]; then
13210         NCURSES_WATTR_MACROS=0
13211         echo "$as_me:13211: result: yes" >&5
13212 echo "${ECHO_T}yes" >&6
13213 else
13214         NCURSES_WATTR_MACROS=1
13215         echo "$as_me:13215: result: no" >&5
13216 echo "${ECHO_T}no" >&6
13217 fi
13218
13219 echo "$as_me:13219: checking for X11 rgb file" >&5
13220 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13221
13222 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13223 if test "${with_x11_rgb+set}" = set; then
13224   withval="$with_x11_rgb"
13225   RGB_PATH=$withval
13226 else
13227   RGB_PATH=auto
13228 fi;
13229
13230 if test "x$RGB_PATH" = xauto
13231 then
13232         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13233         for cf_path in \
13234                 /opt/local/share/X11/rgb.txt \
13235                 /opt/X11/share/X11/rgb.txt \
13236                 /usr/share/X11/rgb.txt \
13237                 /usr/X11/share/X11/rgb.txt \
13238                 /usr/X11/lib/X11/rgb.txt \
13239                 /usr/lib/X11/rgb.txt \
13240                 /etc/X11/rgb.txt \
13241                 /usr/pkg/lib/X11/rgb.txt \
13242                 /usr/X11R7/lib/X11/rgb.txt \
13243                 /usr/X11R6/lib/X11/rgb.txt \
13244                 /usr/X11R5/lib/X11/rgb.txt \
13245                 /usr/X11R4/lib/X11/rgb.txt \
13246                 /usr/local/lib/X11/rgb.txt \
13247                 /usr/local/share/X11/rgb.txt \
13248                 /usr/lib64/X11/rgb.txt
13249         do
13250                 if test -f "$cf_path" ; then
13251                         RGB_PATH="$cf_path"
13252                         break
13253                 fi
13254         done
13255 else
13256         cf_path=$RGB_PATH
13257
13258 if test "x$prefix" != xNONE; then
13259         cf_path_syntax="$prefix"
13260 else
13261         cf_path_syntax="$ac_default_prefix"
13262 fi
13263
13264 case ".$cf_path" in
13265 (.\$\(*\)*|.\'*\'*)
13266         ;;
13267 (..|./*|.\\*)
13268         ;;
13269 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13270         ;;
13271 (.\${*prefix}*|.\${*dir}*)
13272         eval cf_path="$cf_path"
13273         case ".$cf_path" in
13274         (.NONE/*)
13275                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13276                 ;;
13277         esac
13278         ;;
13279 (.no|.NONE/*)
13280         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13281         ;;
13282 (*)
13283         { { echo "$as_me:13283: error: expected a pathname, not \"$cf_path\"" >&5
13284 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13285    { (exit 1); exit 1; }; }
13286         ;;
13287 esac
13288
13289 fi
13290
13291 echo "$as_me:13291: result: $RGB_PATH" >&5
13292 echo "${ECHO_T}$RGB_PATH" >&6
13293
13294 cat >>confdefs.h <<EOF
13295 #define RGB_PATH "$cf_path"
13296 EOF
13297
13298 no_x11_rgb=
13299 if test "$RGB_PATH" = no
13300 then
13301         no_x11_rgb="#"
13302 fi
13303
13304 ###   use option --with-bool to override bool's type
13305 echo "$as_me:13305: checking for type of bool" >&5
13306 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13307
13308 # Check whether --with-bool or --without-bool was given.
13309 if test "${with_bool+set}" = set; then
13310   withval="$with_bool"
13311   NCURSES_BOOL="$withval"
13312 else
13313   NCURSES_BOOL=auto
13314 fi;
13315 echo "$as_me:13315: result: $NCURSES_BOOL" >&5
13316 echo "${ECHO_T}$NCURSES_BOOL" >&6
13317
13318 echo "$as_me:13318: checking for alternate terminal capabilities file" >&5
13319 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13320
13321 # Check whether --with-caps or --without-caps was given.
13322 if test "${with_caps+set}" = set; then
13323   withval="$with_caps"
13324   TERMINFO_CAPS=Caps.$withval
13325 else
13326   TERMINFO_CAPS=Caps
13327 fi;
13328 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13329 echo "$as_me:13329: result: $TERMINFO_CAPS" >&5
13330 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13331
13332 ###   use option --with-chtype to override chtype's type
13333 echo "$as_me:13333: checking for type of chtype" >&5
13334 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13335
13336 # Check whether --with-chtype or --without-chtype was given.
13337 if test "${with_chtype+set}" = set; then
13338   withval="$with_chtype"
13339   NCURSES_CHTYPE="$withval"
13340 else
13341   NCURSES_CHTYPE=$cf_dft_chtype
13342 fi;
13343 echo "$as_me:13343: result: $NCURSES_CHTYPE" >&5
13344 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13345
13346 ###   use option --with-ospeed to override ospeed's type
13347 echo "$as_me:13347: checking for type of ospeed" >&5
13348 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13349
13350 # Check whether --with-ospeed or --without-ospeed was given.
13351 if test "${with_ospeed+set}" = set; then
13352   withval="$with_ospeed"
13353   NCURSES_OSPEED="$withval"
13354 else
13355   NCURSES_OSPEED=short
13356 fi;
13357 echo "$as_me:13357: result: $NCURSES_OSPEED" >&5
13358 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13359
13360 ###   use option --with-mmask-t to override mmask_t's type
13361 echo "$as_me:13361: checking for type of mmask_t" >&5
13362 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13363
13364 # Check whether --with-mmask-t or --without-mmask-t was given.
13365 if test "${with_mmask_t+set}" = set; then
13366   withval="$with_mmask_t"
13367   NCURSES_MMASK_T="$withval"
13368 else
13369   NCURSES_MMASK_T=$cf_dft_mmask_t
13370 fi;
13371 echo "$as_me:13371: result: $NCURSES_MMASK_T" >&5
13372 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13373
13374 ###   use option --with-ccharw-max to override CCHARW_MAX size
13375 echo "$as_me:13375: checking for size CCHARW_MAX" >&5
13376 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13377
13378 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13379 if test "${with_ccharw_max+set}" = set; then
13380   withval="$with_ccharw_max"
13381   NCURSES_CCHARW_MAX="$withval"
13382 else
13383   NCURSES_CCHARW_MAX=5
13384 fi;
13385 echo "$as_me:13385: result: $NCURSES_CCHARW_MAX" >&5
13386 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13387
13388 echo "$as_me:13388: checking for ANSI C header files" >&5
13389 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13390 if test "${ac_cv_header_stdc+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393   cat >conftest.$ac_ext <<_ACEOF
13394 #line 13394 "configure"
13395 #include "confdefs.h"
13396 #include <stdlib.h>
13397 #include <stdarg.h>
13398 #include <string.h>
13399 #include <float.h>
13400
13401 _ACEOF
13402 if { (eval echo "$as_me:13402: \"$ac_cpp conftest.$ac_ext\"") >&5
13403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13404   ac_status=$?
13405   egrep -v '^ *\+' conftest.er1 >conftest.err
13406   rm -f conftest.er1
13407   cat conftest.err >&5
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); } >/dev/null; then
13410   if test -s conftest.err; then
13411     ac_cpp_err=$ac_c_preproc_warn_flag
13412   else
13413     ac_cpp_err=
13414   fi
13415 else
13416   ac_cpp_err=yes
13417 fi
13418 if test -z "$ac_cpp_err"; then
13419   ac_cv_header_stdc=yes
13420 else
13421   echo "$as_me: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   ac_cv_header_stdc=no
13424 fi
13425 rm -f conftest.err conftest.$ac_ext
13426
13427 if test $ac_cv_header_stdc = yes; then
13428   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13429   cat >conftest.$ac_ext <<_ACEOF
13430 #line 13430 "configure"
13431 #include "confdefs.h"
13432 #include <string.h>
13433
13434 _ACEOF
13435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13436   egrep "memchr" >/dev/null 2>&1; then
13437   :
13438 else
13439   ac_cv_header_stdc=no
13440 fi
13441 rm -rf conftest*
13442
13443 fi
13444
13445 if test $ac_cv_header_stdc = yes; then
13446   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13447   cat >conftest.$ac_ext <<_ACEOF
13448 #line 13448 "configure"
13449 #include "confdefs.h"
13450 #include <stdlib.h>
13451
13452 _ACEOF
13453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13454   egrep "free" >/dev/null 2>&1; then
13455   :
13456 else
13457   ac_cv_header_stdc=no
13458 fi
13459 rm -rf conftest*
13460
13461 fi
13462
13463 if test $ac_cv_header_stdc = yes; then
13464   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13465   if test "$cross_compiling" = yes; then
13466   :
13467 else
13468   cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471 #include <ctype.h>
13472 #if ((' ' & 0x0FF) == 0x020)
13473 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13474 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13475 #else
13476 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13477                      || ('j' <= (c) && (c) <= 'r') \
13478                      || ('s' <= (c) && (c) <= 'z'))
13479 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13480 #endif
13481
13482 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13483 int
13484 main (void)
13485 {
13486   int i;
13487   for (i = 0; i < 256; i++)
13488     if (XOR (islower (i), ISLOWER (i))
13489         || toupper (i) != TOUPPER (i))
13490       $ac_main_return(2);
13491   $ac_main_return (0);
13492 }
13493 _ACEOF
13494 rm -f conftest$ac_exeext
13495 if { (eval echo "$as_me:13495: \"$ac_link\"") >&5
13496   (eval $ac_link) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13500   { (eval echo "$as_me:13500: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:13503: \$? = $ac_status" >&5
13504   (exit $ac_status); }; }; then
13505   :
13506 else
13507   echo "$as_me: program exited with status $ac_status" >&5
13508 echo "$as_me: failed program was:" >&5
13509 cat conftest.$ac_ext >&5
13510 ac_cv_header_stdc=no
13511 fi
13512 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13513 fi
13514 fi
13515 fi
13516 echo "$as_me:13516: result: $ac_cv_header_stdc" >&5
13517 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13518 if test $ac_cv_header_stdc = yes; then
13519
13520 cat >>confdefs.h <<\EOF
13521 #define STDC_HEADERS 1
13522 EOF
13523
13524 fi
13525
13526 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13527
13528 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13529                   inttypes.h stdint.h unistd.h
13530 do
13531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13532 echo "$as_me:13532: checking for $ac_header" >&5
13533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 $ac_includes_default
13541 #include <$ac_header>
13542 _ACEOF
13543 rm -f conftest.$ac_objext
13544 if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545   (eval $ac_compile) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -s conftest.$ac_objext'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit $ac_status); }; }; then
13555   eval "$as_ac_Header=yes"
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat conftest.$ac_ext >&5
13559 eval "$as_ac_Header=no"
13560 fi
13561 rm -f conftest.$ac_objext conftest.$ac_ext
13562 fi
13563 echo "$as_me:13563: result: `eval echo '${'$as_ac_Header'}'`" >&5
13564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13566   cat >>confdefs.h <<EOF
13567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13568 EOF
13569
13570 fi
13571 done
13572
13573 echo "$as_me:13573: checking for signed char" >&5
13574 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13575 if test "${ac_cv_type_signed_char+set}" = set; then
13576   echo $ECHO_N "(cached) $ECHO_C" >&6
13577 else
13578   cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 $ac_includes_default
13582 int
13583 main (void)
13584 {
13585 if ((signed char *) 0)
13586   return 0;
13587 if (sizeof (signed char))
13588   return 0;
13589   ;
13590   return 0;
13591 }
13592 _ACEOF
13593 rm -f conftest.$ac_objext
13594 if { (eval echo "$as_me:13594: \"$ac_compile\"") >&5
13595   (eval $ac_compile) 2>&5
13596   ac_status=$?
13597   echo "$as_me:13597: \$? = $ac_status" >&5
13598   (exit $ac_status); } &&
13599          { ac_try='test -s conftest.$ac_objext'
13600   { (eval echo "$as_me:13600: \"$ac_try\"") >&5
13601   (eval $ac_try) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit $ac_status); }; }; then
13605   ac_cv_type_signed_char=yes
13606 else
13607   echo "$as_me: failed program was:" >&5
13608 cat conftest.$ac_ext >&5
13609 ac_cv_type_signed_char=no
13610 fi
13611 rm -f conftest.$ac_objext conftest.$ac_ext
13612 fi
13613 echo "$as_me:13613: result: $ac_cv_type_signed_char" >&5
13614 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13615
13616 echo "$as_me:13616: checking size of signed char" >&5
13617 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13618 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13619   echo $ECHO_N "(cached) $ECHO_C" >&6
13620 else
13621   if test "$ac_cv_type_signed_char" = yes; then
13622   if test "$cross_compiling" = yes; then
13623   # Depending upon the size, compute the lo and hi bounds.
13624 cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627 $ac_includes_default
13628 int
13629 main (void)
13630 {
13631 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f conftest.$ac_objext
13637 if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
13638   (eval $ac_compile) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } &&
13642          { ac_try='test -s conftest.$ac_objext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_lo=0 ac_mid=0
13649   while :; do
13650     cat >conftest.$ac_ext <<_ACEOF
13651 #line 13651 "configure"
13652 #include "confdefs.h"
13653 $ac_includes_default
13654 int
13655 main (void)
13656 {
13657 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13658   ;
13659   return 0;
13660 }
13661 _ACEOF
13662 rm -f conftest.$ac_objext
13663 if { (eval echo "$as_me:13663: \"$ac_compile\"") >&5
13664   (eval $ac_compile) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit $ac_status); } &&
13668          { ac_try='test -s conftest.$ac_objext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   ac_hi=$ac_mid; break
13675 else
13676   echo "$as_me: failed program was:" >&5
13677 cat conftest.$ac_ext >&5
13678 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13679 fi
13680 rm -f conftest.$ac_objext conftest.$ac_ext
13681   done
13682 else
13683   echo "$as_me: failed program was:" >&5
13684 cat conftest.$ac_ext >&5
13685 ac_hi=-1 ac_mid=-1
13686   while :; do
13687     cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690 $ac_includes_default
13691 int
13692 main (void)
13693 {
13694 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13695   ;
13696   return 0;
13697 }
13698 _ACEOF
13699 rm -f conftest.$ac_objext
13700 if { (eval echo "$as_me:13700: \"$ac_compile\"") >&5
13701   (eval $ac_compile) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); } &&
13705          { ac_try='test -s conftest.$ac_objext'
13706   { (eval echo "$as_me:13706: \"$ac_try\"") >&5
13707   (eval $ac_try) 2>&5
13708   ac_status=$?
13709   echo "$as_me:13709: \$? = $ac_status" >&5
13710   (exit $ac_status); }; }; then
13711   ac_lo=$ac_mid; break
13712 else
13713   echo "$as_me: failed program was:" >&5
13714 cat conftest.$ac_ext >&5
13715 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13716 fi
13717 rm -f conftest.$ac_objext conftest.$ac_ext
13718   done
13719 fi
13720 rm -f conftest.$ac_objext conftest.$ac_ext
13721 # Binary search between lo and hi bounds.
13722 while test "x$ac_lo" != "x$ac_hi"; do
13723   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13724   cat >conftest.$ac_ext <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727 $ac_includes_default
13728 int
13729 main (void)
13730 {
13731 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13732   ;
13733   return 0;
13734 }
13735 _ACEOF
13736 rm -f conftest.$ac_objext
13737 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); } &&
13742          { ac_try='test -s conftest.$ac_objext'
13743   { (eval echo "$as_me:13743: \"$ac_try\"") >&5
13744   (eval $ac_try) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); }; }; then
13748   ac_hi=$ac_mid
13749 else
13750   echo "$as_me: failed program was:" >&5
13751 cat conftest.$ac_ext >&5
13752 ac_lo=`expr $ac_mid + 1`
13753 fi
13754 rm -f conftest.$ac_objext conftest.$ac_ext
13755 done
13756 ac_cv_sizeof_signed_char=$ac_lo
13757 else
13758   if test "$cross_compiling" = yes; then
13759   { { echo "$as_me:13759: error: cannot run test program while cross compiling" >&5
13760 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13761    { (exit 1); exit 1; }; }
13762 else
13763   cat >conftest.$ac_ext <<_ACEOF
13764 #line 13764 "configure"
13765 #include "confdefs.h"
13766 $ac_includes_default
13767 int
13768 main (void)
13769 {
13770 FILE *f = fopen ("conftest.val", "w");
13771 if (!f)
13772   $ac_main_return (1);
13773 fprintf (f, "%d", (sizeof (signed char)));
13774 fclose (f);
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest$ac_exeext
13780 if { (eval echo "$as_me:13780: \"$ac_link\"") >&5
13781   (eval $ac_link) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit $ac_status); }; }; then
13790   ac_cv_sizeof_signed_char=`cat conftest.val`
13791 else
13792   echo "$as_me: program exited with status $ac_status" >&5
13793 echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 fi
13796 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13797 fi
13798 fi
13799 rm -f conftest.val
13800 else
13801   ac_cv_sizeof_signed_char=0
13802 fi
13803 fi
13804 echo "$as_me:13804: result: $ac_cv_sizeof_signed_char" >&5
13805 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13806 cat >>confdefs.h <<EOF
13807 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13808 EOF
13809
13810 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13811         NCURSES_SBOOL="signed char"
13812 else
13813         NCURSES_SBOOL="char"
13814 fi
13815 echo "$as_me:13815: checking if you want to use signed Boolean array in term.h" >&5
13816 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13817
13818 # Check whether --enable-signed-char or --disable-signed-char was given.
13819 if test "${enable_signed_char+set}" = set; then
13820   enableval="$enable_signed_char"
13821   with_signed_char=$enableval
13822 else
13823   with_signed_char=no
13824 fi;
13825 echo "$as_me:13825: result: $with_signed_char" >&5
13826 echo "${ECHO_T}$with_signed_char" >&6
13827 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13828
13829 ###   use option --with-tparm-arg to override tparm's argument type
13830 echo "$as_me:13830: checking for type of tparm args" >&5
13831 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13832
13833 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13834 if test "${with_tparm_arg+set}" = set; then
13835   withval="$with_tparm_arg"
13836   NCURSES_TPARM_ARG="$withval"
13837 else
13838   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13839 fi;
13840 echo "$as_me:13840: result: $NCURSES_TPARM_ARG" >&5
13841 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13842
13843 ### Enable compiling-in rcs id's
13844 echo "$as_me:13844: checking if RCS identifiers should be compiled-in" >&5
13845 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13846
13847 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13848 if test "${with_rcs_ids+set}" = set; then
13849   withval="$with_rcs_ids"
13850   with_rcs_ids=$withval
13851 else
13852   with_rcs_ids=no
13853 fi;
13854 echo "$as_me:13854: result: $with_rcs_ids" >&5
13855 echo "${ECHO_T}$with_rcs_ids" >&6
13856 test "x$with_rcs_ids" = xyes &&
13857 cat >>confdefs.h <<\EOF
13858 #define USE_RCS_IDS 1
13859 EOF
13860
13861 ###############################################################################
13862
13863 echo "$as_me:13863: checking format of man-pages" >&5
13864 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13865
13866 # Check whether --with-manpage-format or --without-manpage-format was given.
13867 if test "${with_manpage_format+set}" = set; then
13868   withval="$with_manpage_format"
13869   MANPAGE_FORMAT=$withval
13870 else
13871   MANPAGE_FORMAT=unknown
13872 fi;
13873
13874 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13875 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13876
13877 cf_unknown=
13878
13879 case $MANPAGE_FORMAT in
13880 (unknown)
13881         if test -z "$MANPATH" ; then
13882                 MANPATH="/usr/man:/usr/share/man"
13883         fi
13884
13885         # look for the 'date' man-page (it's most likely to be installed!)
13886         MANPAGE_FORMAT=
13887         cf_preform=no
13888         cf_catonly=yes
13889         cf_example=date
13890
13891         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13892         for cf_dir in $MANPATH; do
13893                 test -z "$cf_dir" && cf_dir=/usr/man
13894                 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
13895                 do
13896                         cf_test=`echo $cf_name | sed -e 's/*//'`
13897                         if test "x$cf_test" = "x$cf_name" ; then
13898
13899                                 case "$cf_name" in
13900                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13901                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13902                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13903                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13904                                 esac
13905
13906                                 case "$cf_name" in
13907                                 ($cf_dir/man*)
13908                                         cf_catonly=no
13909                                         ;;
13910                                 ($cf_dir/cat*)
13911                                         cf_preform=yes
13912                                         ;;
13913                                 esac
13914                                 break
13915                         fi
13916
13917                         # if we found a match in either man* or cat*, stop looking
13918                         if test -n "$MANPAGE_FORMAT" ; then
13919                                 cf_found=no
13920                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13921                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13922                                 case "$cf_name" in
13923                                 ($cf_dir/cat*)
13924                                         cf_found=yes
13925                                         ;;
13926                                 esac
13927                                 test $cf_found=yes && break
13928                         fi
13929                 done
13930                 # only check the first directory in $MANPATH where we find manpages
13931                 if test -n "$MANPAGE_FORMAT" ; then
13932                         break
13933                 fi
13934         done
13935         # if we did not find the example, just assume it is normal
13936         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13937         IFS="$ac_save_ifs"
13938         ;;
13939 (*)
13940         for cf_option in $MANPAGE_FORMAT; do
13941         case $cf_option in
13942         (gzip|compress|BSDI|normal|formatted|catonly)
13943                 ;;
13944         (*)
13945                 cf_unknown="$cf_unknown $cf_option"
13946                 ;;
13947         esac
13948         done
13949         ;;
13950 esac
13951
13952 echo "$as_me:13952: result: $MANPAGE_FORMAT" >&5
13953 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13954 if test -n "$cf_unknown" ; then
13955         { echo "$as_me:13955: WARNING: Unexpected manpage-format $cf_unknown" >&5
13956 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13957 fi
13958
13959 echo "$as_me:13959: checking for manpage renaming" >&5
13960 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13961
13962 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13963 if test "${with_manpage_renames+set}" = set; then
13964   withval="$with_manpage_renames"
13965   MANPAGE_RENAMES=$withval
13966 else
13967   MANPAGE_RENAMES=yes
13968 fi;
13969
13970 case ".$MANPAGE_RENAMES" in
13971 (.no)
13972         ;;
13973 (.|.yes)
13974         # Debian 'man' program?
13975         if test -f /etc/debian_version ; then
13976                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13977         else
13978                 MANPAGE_RENAMES=no
13979         fi
13980         ;;
13981 esac
13982
13983 if test "$MANPAGE_RENAMES" != no ; then
13984         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13985                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13986         elif test ! -f $MANPAGE_RENAMES ; then
13987                 { { echo "$as_me:13987: error: not a filename: $MANPAGE_RENAMES" >&5
13988 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13989    { (exit 1); exit 1; }; }
13990         fi
13991
13992         test ! -d man && mkdir man
13993
13994         # Construct a sed-script to perform renaming within man-pages
13995         if test -n "$MANPAGE_RENAMES" ; then
13996                 test ! -d man && mkdir man
13997                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13998         fi
13999 fi
14000
14001 echo "$as_me:14001: result: $MANPAGE_RENAMES" >&5
14002 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14003
14004 echo "$as_me:14004: checking if manpage aliases will be installed" >&5
14005 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14006
14007 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14008 if test "${with_manpage_aliases+set}" = set; then
14009   withval="$with_manpage_aliases"
14010   MANPAGE_ALIASES=$withval
14011 else
14012   MANPAGE_ALIASES=yes
14013 fi;
14014
14015 echo "$as_me:14015: result: $MANPAGE_ALIASES" >&5
14016 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14017
14018 case "x$LN_S" in
14019 (xln*)
14020         cf_use_symlinks=yes
14021         ;;
14022 (*)
14023         cf_use_symlinks=no
14024         ;;
14025 esac
14026
14027 MANPAGE_SYMLINKS=no
14028 if test "$MANPAGE_ALIASES" = yes ; then
14029 echo "$as_me:14029: checking if manpage symlinks should be used" >&5
14030 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14031
14032 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14033 if test "${with_manpage_symlinks+set}" = set; then
14034   withval="$with_manpage_symlinks"
14035   MANPAGE_SYMLINKS=$withval
14036 else
14037   MANPAGE_SYMLINKS=$cf_use_symlinks
14038 fi;
14039
14040 if test "$$cf_use_symlinks" = no; then
14041 if test "$MANPAGE_SYMLINKS" = yes ; then
14042         { echo "$as_me:14042: WARNING: cannot make symlinks" >&5
14043 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14044         MANPAGE_SYMLINKS=no
14045 fi
14046 fi
14047
14048 echo "$as_me:14048: result: $MANPAGE_SYMLINKS" >&5
14049 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14050 fi
14051
14052 echo "$as_me:14052: checking for manpage tbl" >&5
14053 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14054
14055 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14056 if test "${with_manpage_tbl+set}" = set; then
14057   withval="$with_manpage_tbl"
14058   MANPAGE_TBL=$withval
14059 else
14060   MANPAGE_TBL=no
14061 fi;
14062
14063 echo "$as_me:14063: result: $MANPAGE_TBL" >&5
14064 echo "${ECHO_T}$MANPAGE_TBL" >&6
14065
14066 if test "$prefix" = "NONE" ; then
14067         cf_prefix="$ac_default_prefix"
14068 else
14069         cf_prefix="$prefix"
14070 fi
14071
14072 case "$MANPAGE_FORMAT" in
14073 (*catonly*)
14074         cf_format=yes
14075         cf_inboth=no
14076         ;;
14077 (*formatted*)
14078         cf_format=yes
14079         cf_inboth=yes
14080         ;;
14081 (*)
14082         cf_format=no
14083         cf_inboth=no
14084         ;;
14085 esac
14086
14087 test ! -d man && mkdir man
14088
14089 cf_so_strip=
14090 cf_compress=
14091 case "$MANPAGE_FORMAT" in
14092 (*compress*)
14093         cf_so_strip="Z"
14094         cf_compress=compress
14095         ;;
14096 (*gzip*)
14097         cf_so_strip="gz"
14098         cf_compress=gzip
14099         ;;
14100 esac
14101
14102 cf_edit_man=./edit_man.sh
14103 cf_man_alias=`pwd`/man_alias.sed
14104
14105 cat >$cf_edit_man <<CF_EOF
14106 #! $SHELL
14107 # this script is generated by the configure-script CF_MAN_PAGES macro.
14108
14109 prefix="$cf_prefix"
14110 datarootdir="$datarootdir"
14111 datadir="$datadir"
14112
14113 NCURSES_MAJOR="$NCURSES_MAJOR"
14114 NCURSES_MINOR="$NCURSES_MINOR"
14115 NCURSES_PATCH="$NCURSES_PATCH"
14116
14117 NCURSES_OSPEED="$NCURSES_OSPEED"
14118 TERMINFO="$TERMINFO"
14119
14120 INSTALL="$INSTALL"
14121 INSTALL_DATA="$INSTALL_DATA"
14122
14123 transform="$program_transform_name"
14124
14125 TMP=\${TMPDIR:=/tmp}/man\$\$
14126 trap "rm -f \$TMP" 0 1 2 3 15
14127
14128 form=\$1
14129 shift || exit 1
14130
14131 verb=\$1
14132 shift || exit 1
14133
14134 mandir=\$1
14135 shift || exit 1
14136
14137 srcdir=\$1
14138 top_srcdir=\$srcdir/..
14139 shift || exit 1
14140
14141 if test "\$form" = normal ; then
14142         if test "$cf_format" = yes ; then
14143         if test "$cf_inboth" = no ; then
14144                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14145                 exit $?
14146         fi
14147         fi
14148         cf_subdir=\$mandir/man
14149         cf_tables=$MANPAGE_TBL
14150 else
14151         cf_subdir=\$mandir/cat
14152         cf_tables=yes
14153 fi
14154
14155 # process the list of source-files
14156 for i in \$* ; do
14157 case \$i in
14158 (*.orig|*.rej) ;;
14159 (*.[0-9]*)
14160         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14161         if test \$verb = installing ; then
14162         if test ! -d \$cf_subdir\${section} ; then
14163                 mkdir -p \$cf_subdir\$section
14164         fi
14165         fi
14166
14167         # replace variables in man page
14168         if test ! -f $cf_man_alias ; then
14169 cat >>$cf_man_alias <<-CF_EOF2
14170                 s,@DATADIR@,\$datadir,g
14171                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14172                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14173                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14174                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14175                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14176                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14177 CF_EOF
14178
14179         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14180         do
14181                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14182                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14183 cat >>$cf_edit_man <<-CF_EOF
14184                 s,@$cf_NAME@,$cf_name,g
14185 CF_EOF
14186         done
14187
14188 cat >>$cf_edit_man <<CF_EOF
14189 CF_EOF2
14190                 echo "...made $cf_man_alias"
14191         fi
14192
14193         aliases=
14194         cf_source=\`basename \$i\`
14195         inalias=\$cf_source
14196         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14197         if test ! -f \$inalias ; then
14198                 echo .. skipped \$cf_source
14199                 continue
14200         fi
14201 CF_EOF
14202
14203 if test "$MANPAGE_ALIASES" != no ; then
14204 cat >>$cf_edit_man <<CF_EOF
14205         nCurses=ignore.3x
14206         test $with_curses_h = yes && nCurses=ncurses.3x
14207         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14208 CF_EOF
14209 fi
14210
14211 if test "$MANPAGE_RENAMES" = no ; then
14212 cat >>$cf_edit_man <<CF_EOF
14213         # perform program transformations for section 1 man pages
14214         if test \$section = 1 ; then
14215                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14216         else
14217                 cf_target=\$cf_subdir\${section}/\$cf_source
14218         fi
14219 CF_EOF
14220 else
14221 cat >>$cf_edit_man <<CF_EOF
14222         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14223         if test -z "\$cf_target" ; then
14224                 echo '? missing rename for '\$cf_source
14225                 cf_target="\$cf_source"
14226         fi
14227         cf_target="\$cf_subdir\${section}/\${cf_target}"
14228
14229 CF_EOF
14230 fi
14231
14232 cat >>$cf_edit_man <<CF_EOF
14233         sed     -f $cf_man_alias \\
14234 CF_EOF
14235
14236 if test -f $MANPAGE_RENAMES ; then
14237 cat >>$cf_edit_man <<CF_EOF
14238                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14239 CF_EOF
14240 else
14241 cat >>$cf_edit_man <<CF_EOF
14242                 < \$i >\$TMP
14243 CF_EOF
14244 fi
14245
14246 cat >>$cf_edit_man <<CF_EOF
14247 if test \$cf_tables = yes ; then
14248         tbl \$TMP >\$TMP.out
14249         mv \$TMP.out \$TMP
14250 fi
14251 CF_EOF
14252
14253 if test $with_overwrite != yes ; then
14254 cat >>$cf_edit_man <<CF_EOF
14255         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14256         mv \$TMP.out \$TMP
14257 CF_EOF
14258 fi
14259
14260 if test $with_curses_h != yes ; then
14261 cat >>$cf_edit_man <<CF_EOF
14262         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14263         mv \$TMP.out \$TMP
14264 CF_EOF
14265 fi
14266
14267 cat >>$cf_edit_man <<CF_EOF
14268         if test \$form = format ; then
14269                 nroff -man \$TMP >\$TMP.out
14270                 mv \$TMP.out \$TMP
14271         fi
14272 CF_EOF
14273
14274 if test -n "$cf_compress" ; then
14275 cat >>$cf_edit_man <<CF_EOF
14276         if test \$verb = installing ; then
14277         if ( $cf_compress -f \$TMP )
14278         then
14279                 mv \$TMP.$cf_so_strip \$TMP
14280         fi
14281         fi
14282         cf_target="\$cf_target.$cf_so_strip"
14283 CF_EOF
14284 fi
14285
14286 case "$MANPAGE_FORMAT" in
14287 (*BSDI*)
14288 cat >>$cf_edit_man <<CF_EOF
14289         if test \$form = format ; then
14290                 # BSDI installs only .0 suffixes in the cat directories
14291                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14292         fi
14293 CF_EOF
14294   ;;
14295 esac
14296
14297 cat >>$cf_edit_man <<CF_EOF
14298         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14299         if test \$verb = installing ; then
14300                 echo \$verb \$cf_target
14301                 \$INSTALL_DATA \$TMP \$cf_target
14302                 test -d \$cf_subdir\${section} &&
14303                 test -n "\$aliases" && (
14304                         cd \$cf_subdir\${section} && (
14305                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14306                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14307                                 cf_target=\`basename \$cf_target\`
14308                                 for cf_alias in \$aliases
14309                                 do
14310                                         if test \$section = 1 ; then
14311                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14312                                         fi
14313
14314                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14315                                                 if test -f \$cf_alias\${suffix} ; then
14316                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14317                                                         then
14318                                                                 continue
14319                                                         fi
14320                                                 fi
14321                                                 echo .. \$verb alias \$cf_alias\${suffix}
14322 CF_EOF
14323 case "x$LN_S" in
14324 (*-f)
14325 cat >>$cf_edit_man <<CF_EOF
14326                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14327 CF_EOF
14328         ;;
14329 (*)
14330 cat >>$cf_edit_man <<CF_EOF
14331                                                 rm -f \$cf_alias\${suffix}
14332                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14333 CF_EOF
14334         ;;
14335 esac
14336 cat >>$cf_edit_man <<CF_EOF
14337                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14338                                                 echo ".so \$cf_source" >\$TMP
14339 CF_EOF
14340 if test -n "$cf_compress" ; then
14341 cat >>$cf_edit_man <<CF_EOF
14342                                                 if test -n "$cf_so_strip" ; then
14343                                                         $cf_compress -f \$TMP
14344                                                         mv \$TMP.$cf_so_strip \$TMP
14345                                                 fi
14346 CF_EOF
14347 fi
14348 cat >>$cf_edit_man <<CF_EOF
14349                                                 echo .. \$verb alias \$cf_alias\${suffix}
14350                                                 rm -f \$cf_alias\${suffix}
14351                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14352                                         fi
14353                                 done
14354                         )
14355                 )
14356         elif test \$verb = removing ; then
14357                 test -f \$cf_target && (
14358                         echo \$verb \$cf_target
14359                         rm -f \$cf_target
14360                 )
14361                 test -d \$cf_subdir\${section} &&
14362                 test -n "\$aliases" && (
14363                         cd \$cf_subdir\${section} && (
14364                                 for cf_alias in \$aliases
14365                                 do
14366                                         if test \$section = 1 ; then
14367                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14368                                         fi
14369
14370                                         echo .. \$verb alias \$cf_alias\${suffix}
14371                                         rm -f \$cf_alias\${suffix}
14372                                 done
14373                         )
14374                 )
14375         else
14376 #               echo ".hy 0"
14377                 cat \$TMP
14378         fi
14379         ;;
14380 esac
14381 done
14382
14383 if test $cf_inboth = yes ; then
14384 if test \$form != format ; then
14385         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14386 fi
14387 fi
14388
14389 exit 0
14390 CF_EOF
14391 chmod 755 $cf_edit_man
14392
14393 ###############################################################################
14394
14395 ### Note that some functions (such as const) are normally disabled anyway.
14396 echo "$as_me:14396: checking if you want to build with function extensions" >&5
14397 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14398
14399 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14400 if test "${enable_ext_funcs+set}" = set; then
14401   enableval="$enable_ext_funcs"
14402   with_ext_funcs=$enableval
14403 else
14404   with_ext_funcs=yes
14405 fi;
14406 echo "$as_me:14406: result: $with_ext_funcs" >&5
14407 echo "${ECHO_T}$with_ext_funcs" >&6
14408 if test "x$with_ext_funcs" = xyes ; then
14409         NCURSES_EXT_FUNCS=1
14410
14411 cat >>confdefs.h <<\EOF
14412 #define NCURSES_EXT_FUNCS 1
14413 EOF
14414
14415 cat >>confdefs.h <<\EOF
14416 #define HAVE_ASSUME_DEFAULT_COLORS 1
14417 EOF
14418
14419 cat >>confdefs.h <<\EOF
14420 #define HAVE_CURSES_VERSION 1
14421 EOF
14422
14423 cat >>confdefs.h <<\EOF
14424 #define HAVE_HAS_KEY 1
14425 EOF
14426
14427 cat >>confdefs.h <<\EOF
14428 #define HAVE_RESIZETERM 1
14429 EOF
14430
14431 cat >>confdefs.h <<\EOF
14432 #define HAVE_RESIZE_TERM 1
14433 EOF
14434
14435 cat >>confdefs.h <<\EOF
14436 #define HAVE_TERM_ENTRY_H 1
14437 EOF
14438
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_USE_DEFAULT_COLORS 1
14441 EOF
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_USE_EXTENDED_NAMES 1
14445 EOF
14446
14447 cat >>confdefs.h <<\EOF
14448 #define HAVE_USE_SCREEN 1
14449 EOF
14450
14451 cat >>confdefs.h <<\EOF
14452 #define HAVE_USE_WINDOW 1
14453 EOF
14454
14455 cat >>confdefs.h <<\EOF
14456 #define HAVE_WRESIZE 1
14457 EOF
14458
14459         GENERATED_EXT_FUNCS=generated
14460         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14461 else
14462         NCURSES_EXT_FUNCS=0
14463         GENERATED_EXT_FUNCS=
14464 fi
14465
14466 echo "$as_me:14466: checking if you want to build with SCREEN extensions" >&5
14467 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14468
14469 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14470 if test "${enable_sp_funcs+set}" = set; then
14471   enableval="$enable_sp_funcs"
14472   with_sp_funcs=$enableval
14473 else
14474   with_sp_funcs=$cf_dft_ext_spfuncs
14475 fi;
14476 echo "$as_me:14476: result: $with_sp_funcs" >&5
14477 echo "${ECHO_T}$with_sp_funcs" >&6
14478 if test "x$with_sp_funcs" = xyes ; then
14479         NCURSES_SP_FUNCS=1
14480
14481 cat >>confdefs.h <<\EOF
14482 #define NCURSES_SP_FUNCS 1
14483 EOF
14484
14485 cat >>confdefs.h <<\EOF
14486 #define HAVE_TPUTS_SP 1
14487 EOF
14488
14489         GENERATED_SP_FUNCS=generated
14490 else
14491         NCURSES_SP_FUNCS=0
14492         GENERATED_SP_FUNCS=
14493 fi
14494
14495 echo "$as_me:14495: checking if you want to build with terminal-driver" >&5
14496 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14497
14498 # Check whether --enable-term-driver or --disable-term-driver was given.
14499 if test "${enable_term_driver+set}" = set; then
14500   enableval="$enable_term_driver"
14501   with_term_driver=$enableval
14502 else
14503   with_term_driver=no
14504 fi;
14505 echo "$as_me:14505: result: $with_term_driver" >&5
14506 echo "${ECHO_T}$with_term_driver" >&6
14507 if test "x$with_term_driver" = xyes ; then
14508
14509 cat >>confdefs.h <<\EOF
14510 #define USE_TERM_DRIVER 1
14511 EOF
14512
14513         if test "x$with_termlib" != xno ; then
14514                 { { echo "$as_me:14514: error: The term-driver option conflicts with the termlib option" >&5
14515 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14516    { (exit 1); exit 1; }; }
14517         fi
14518         if test "x$with_sp_funcs" != xyes ; then
14519                 { { echo "$as_me:14519: error: The term-driver option relies upon sp-funcs" >&5
14520 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14521    { (exit 1); exit 1; }; }
14522         fi
14523 fi
14524
14525 ###   use option --enable-const to turn on use of const beyond that in XSI.
14526 echo "$as_me:14526: checking for extended use of const keyword" >&5
14527 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14528
14529 # Check whether --enable-const or --disable-const was given.
14530 if test "${enable_const+set}" = set; then
14531   enableval="$enable_const"
14532   with_ext_const=$enableval
14533 else
14534   with_ext_const=$cf_dft_ext_const
14535 fi;
14536 echo "$as_me:14536: result: $with_ext_const" >&5
14537 echo "${ECHO_T}$with_ext_const" >&6
14538 NCURSES_CONST='/*nothing*/'
14539 if test "x$with_ext_const" = xyes ; then
14540         NCURSES_CONST=const
14541 fi
14542
14543 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14544 echo "$as_me:14544: checking if you want to use extended colors" >&5
14545 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14546
14547 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14548 if test "${enable_ext_colors+set}" = set; then
14549   enableval="$enable_ext_colors"
14550   with_ext_colors=$enableval
14551 else
14552   with_ext_colors=$cf_dft_ext_colors
14553 fi;
14554 echo "$as_me:14554: result: $with_ext_colors" >&5
14555 echo "${ECHO_T}$with_ext_colors" >&6
14556 NCURSES_EXT_COLORS=0
14557 if test "x$with_ext_colors" = xyes ; then
14558         if test "x$with_widec" != xyes ; then
14559                 { echo "$as_me:14559: WARNING: This option applies only to wide-character library" >&5
14560 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14561         else
14562                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14563
14564 if test "${with_abi_version+set}" != set; then
14565         case $cf_cv_rel_version in
14566         (5.*)
14567                 cf_cv_rel_version=6.0
14568                 cf_cv_abi_version=6
14569                 { echo "$as_me:14569: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14570 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14571                 ;;
14572         esac
14573 fi
14574
14575                 NCURSES_EXT_COLORS=1
14576
14577 cat >>confdefs.h <<\EOF
14578 #define NCURSES_EXT_COLORS 1
14579 EOF
14580
14581 cat >>confdefs.h <<\EOF
14582 #define HAVE_ALLOC_PAIR 1
14583 EOF
14584
14585 cat >>confdefs.h <<\EOF
14586 #define HAVE_INIT_EXTENDED_COLOR 1
14587 EOF
14588
14589 cat >>confdefs.h <<\EOF
14590 #define HAVE_RESET_COLOR_PAIRS 1
14591 EOF
14592
14593         fi
14594 fi
14595
14596 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14597 echo "$as_me:14597: checking if you want to use extended mouse encoding" >&5
14598 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14599
14600 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14601 if test "${enable_ext_mouse+set}" = set; then
14602   enableval="$enable_ext_mouse"
14603   with_ext_mouse=$enableval
14604 else
14605   with_ext_mouse=$cf_dft_ext_mouse
14606 fi;
14607 echo "$as_me:14607: result: $with_ext_mouse" >&5
14608 echo "${ECHO_T}$with_ext_mouse" >&6
14609 NCURSES_MOUSE_VERSION=1
14610 if test "x$with_ext_mouse" = xyes ; then
14611         NCURSES_MOUSE_VERSION=2
14612
14613 if test "${with_abi_version+set}" != set; then
14614         case $cf_cv_rel_version in
14615         (5.*)
14616                 cf_cv_rel_version=6.0
14617                 cf_cv_abi_version=6
14618                 { echo "$as_me:14618: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14619 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14620                 ;;
14621         esac
14622 fi
14623
14624 fi
14625
14626 ###   use option --enable-ext-putwin to turn on extended screendumps
14627 echo "$as_me:14627: checking if you want to use extended putwin/screendump" >&5
14628 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14629
14630 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14631 if test "${enable_ext_putwin+set}" = set; then
14632   enableval="$enable_ext_putwin"
14633   with_ext_putwin=$enableval
14634 else
14635   with_ext_putwin=$cf_dft_ext_putwin
14636 fi;
14637 echo "$as_me:14637: result: $with_ext_putwin" >&5
14638 echo "${ECHO_T}$with_ext_putwin" >&6
14639 if test "x$with_ext_putwin" = xyes ; then
14640
14641 cat >>confdefs.h <<\EOF
14642 #define NCURSES_EXT_PUTWIN 1
14643 EOF
14644
14645 fi
14646
14647 echo "$as_me:14647: checking if you want \$NCURSES_NO_PADDING code" >&5
14648 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14649
14650 # Check whether --enable-no-padding or --disable-no-padding was given.
14651 if test "${enable_no_padding+set}" = set; then
14652   enableval="$enable_no_padding"
14653   with_no_padding=$enableval
14654 else
14655   with_no_padding=$with_ext_funcs
14656 fi;
14657 echo "$as_me:14657: result: $with_no_padding" >&5
14658 echo "${ECHO_T}$with_no_padding" >&6
14659 test "x$with_no_padding" = xyes &&
14660 cat >>confdefs.h <<\EOF
14661 #define NCURSES_NO_PADDING 1
14662 EOF
14663
14664 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14665 echo "$as_me:14665: checking if you want SIGWINCH handler" >&5
14666 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14667
14668 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14669 if test "${enable_sigwinch+set}" = set; then
14670   enableval="$enable_sigwinch"
14671   with_sigwinch=$enableval
14672 else
14673   with_sigwinch=$with_ext_funcs
14674 fi;
14675 echo "$as_me:14675: result: $with_sigwinch" >&5
14676 echo "${ECHO_T}$with_sigwinch" >&6
14677 test "x$with_sigwinch" = xyes &&
14678 cat >>confdefs.h <<\EOF
14679 #define USE_SIGWINCH 1
14680 EOF
14681
14682 ###   use option --enable-tcap-names to allow user to define new capabilities
14683 echo "$as_me:14683: checking if you want user-definable terminal capabilities like termcap" >&5
14684 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14685
14686 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14687 if test "${enable_tcap_names+set}" = set; then
14688   enableval="$enable_tcap_names"
14689   with_tcap_names=$enableval
14690 else
14691   with_tcap_names=$with_ext_funcs
14692 fi;
14693 echo "$as_me:14693: result: $with_tcap_names" >&5
14694 echo "${ECHO_T}$with_tcap_names" >&6
14695 NCURSES_XNAMES=0
14696 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14697
14698 ##############################################################################
14699
14700 echo "$as_me:14700: checking if you want to link with the pthread library" >&5
14701 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14702
14703 # Check whether --with-pthread or --without-pthread was given.
14704 if test "${with_pthread+set}" = set; then
14705   withval="$with_pthread"
14706   with_pthread=$withval
14707 else
14708   with_pthread=no
14709 fi;
14710 echo "$as_me:14710: result: $with_pthread" >&5
14711 echo "${ECHO_T}$with_pthread" >&6
14712
14713 if test "$with_pthread" != no ; then
14714         echo "$as_me:14714: checking for pthread.h" >&5
14715 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14716 if test "${ac_cv_header_pthread_h+set}" = set; then
14717   echo $ECHO_N "(cached) $ECHO_C" >&6
14718 else
14719   cat >conftest.$ac_ext <<_ACEOF
14720 #line 14720 "configure"
14721 #include "confdefs.h"
14722 #include <pthread.h>
14723 _ACEOF
14724 if { (eval echo "$as_me:14724: \"$ac_cpp conftest.$ac_ext\"") >&5
14725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14726   ac_status=$?
14727   egrep -v '^ *\+' conftest.er1 >conftest.err
14728   rm -f conftest.er1
14729   cat conftest.err >&5
14730   echo "$as_me:14730: \$? = $ac_status" >&5
14731   (exit $ac_status); } >/dev/null; then
14732   if test -s conftest.err; then
14733     ac_cpp_err=$ac_c_preproc_warn_flag
14734   else
14735     ac_cpp_err=
14736   fi
14737 else
14738   ac_cpp_err=yes
14739 fi
14740 if test -z "$ac_cpp_err"; then
14741   ac_cv_header_pthread_h=yes
14742 else
14743   echo "$as_me: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   ac_cv_header_pthread_h=no
14746 fi
14747 rm -f conftest.err conftest.$ac_ext
14748 fi
14749 echo "$as_me:14749: result: $ac_cv_header_pthread_h" >&5
14750 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14751 if test $ac_cv_header_pthread_h = yes; then
14752
14753 cat >>confdefs.h <<\EOF
14754 #define HAVE_PTHREADS_H 1
14755 EOF
14756
14757         for cf_lib_pthread in pthread c_r
14758         do
14759             echo "$as_me:14759: checking if we can link with the $cf_lib_pthread library" >&5
14760 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14761             cf_save_LIBS="$LIBS"
14762
14763 cf_add_libs="$LIBS"
14764 # reverse order
14765 cf_add_0lib=
14766 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14767 # filter duplicates
14768 for cf_add_1lib in $cf_add_0lib; do
14769         for cf_add_2lib in $cf_add_libs; do
14770                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14771                         cf_add_1lib=
14772                         break
14773                 fi
14774         done
14775         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14776 done
14777 LIBS="$cf_add_libs"
14778
14779             cat >conftest.$ac_ext <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782
14783 #include <pthread.h>
14784
14785 int
14786 main (void)
14787 {
14788
14789                 int rc = pthread_create(0,0,0,0);
14790                 int r2 = pthread_mutexattr_settype(0, 0);
14791
14792   ;
14793   return 0;
14794 }
14795 _ACEOF
14796 rm -f conftest.$ac_objext conftest$ac_exeext
14797 if { (eval echo "$as_me:14797: \"$ac_link\"") >&5
14798   (eval $ac_link) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); } &&
14802          { ac_try='test -s conftest$ac_exeext'
14803   { (eval echo "$as_me:14803: \"$ac_try\"") >&5
14804   (eval $ac_try) 2>&5
14805   ac_status=$?
14806   echo "$as_me:14806: \$? = $ac_status" >&5
14807   (exit $ac_status); }; }; then
14808   with_pthread=yes
14809 else
14810   echo "$as_me: failed program was:" >&5
14811 cat conftest.$ac_ext >&5
14812 with_pthread=no
14813 fi
14814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14815             LIBS="$cf_save_LIBS"
14816             echo "$as_me:14816: result: $with_pthread" >&5
14817 echo "${ECHO_T}$with_pthread" >&6
14818             test "$with_pthread" = yes && break
14819         done
14820
14821         if test "$with_pthread" = yes ; then
14822
14823 cf_add_libs="$LIBS"
14824 # reverse order
14825 cf_add_0lib=
14826 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14827 # filter duplicates
14828 for cf_add_1lib in $cf_add_0lib; do
14829         for cf_add_2lib in $cf_add_libs; do
14830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14831                         cf_add_1lib=
14832                         break
14833                 fi
14834         done
14835         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14836 done
14837 LIBS="$cf_add_libs"
14838
14839 cat >>confdefs.h <<\EOF
14840 #define HAVE_LIBPTHREADS 1
14841 EOF
14842
14843         else
14844             { { echo "$as_me:14844: error: Cannot link with pthread library" >&5
14845 echo "$as_me: error: Cannot link with pthread library" >&2;}
14846    { (exit 1); exit 1; }; }
14847         fi
14848
14849 fi
14850
14851 fi
14852
14853 if test "x$with_pthread" != xno; then
14854         echo "$as_me:14854: checking for pthread_kill" >&5
14855 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14856 if test "${ac_cv_func_pthread_kill+set}" = set; then
14857   echo $ECHO_N "(cached) $ECHO_C" >&6
14858 else
14859   cat >conftest.$ac_ext <<_ACEOF
14860 #line 14860 "configure"
14861 #include "confdefs.h"
14862 #define pthread_kill autoconf_temporary
14863 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14864 #undef pthread_kill
14865
14866 #ifdef __cplusplus
14867 extern "C"
14868 #endif
14869
14870 /* We use char because int might match the return type of a gcc2
14871    builtin and then its argument prototype would still apply.  */
14872 char pthread_kill (void);
14873
14874 int
14875 main (void)
14876 {
14877
14878 /* The GNU C library defines stubs for functions which it implements
14879     to always fail with ENOSYS.  Some functions are actually named
14880     something starting with __ and the normal name is an alias.  */
14881 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14882 #error found stub for pthread_kill
14883 #endif
14884
14885         return pthread_kill ();
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 rm -f conftest.$ac_objext conftest$ac_exeext
14891 if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
14892   (eval $ac_link) 2>&5
14893   ac_status=$?
14894   echo "$as_me:14894: \$? = $ac_status" >&5
14895   (exit $ac_status); } &&
14896          { ac_try='test -s conftest$ac_exeext'
14897   { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898   (eval $ac_try) 2>&5
14899   ac_status=$?
14900   echo "$as_me:14900: \$? = $ac_status" >&5
14901   (exit $ac_status); }; }; then
14902   ac_cv_func_pthread_kill=yes
14903 else
14904   echo "$as_me: failed program was:" >&5
14905 cat conftest.$ac_ext >&5
14906 ac_cv_func_pthread_kill=no
14907 fi
14908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14909 fi
14910 echo "$as_me:14910: result: $ac_cv_func_pthread_kill" >&5
14911 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14912 if test $ac_cv_func_pthread_kill = yes; then
14913
14914                 echo "$as_me:14914: checking if you want to allow EINTR in wgetch with pthreads" >&5
14915 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14916
14917 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14918 if test "${enable_pthreads_eintr+set}" = set; then
14919   enableval="$enable_pthreads_eintr"
14920   use_pthreads_eintr=$enableval
14921 else
14922   use_pthreads_eintr=no
14923 fi;
14924                 echo "$as_me:14924: result: $use_pthreads_eintr" >&5
14925 echo "${ECHO_T}$use_pthreads_eintr" >&6
14926                 if test "x$use_pthreads_eintr" = xyes ; then
14927
14928 cat >>confdefs.h <<\EOF
14929 #define USE_PTHREADS_EINTR 1
14930 EOF
14931
14932                 fi
14933 fi
14934
14935         echo "$as_me:14935: checking if you want to use weak-symbols for pthreads" >&5
14936 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14937
14938 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14939 if test "${enable_weak_symbols+set}" = set; then
14940   enableval="$enable_weak_symbols"
14941   use_weak_symbols=$enableval
14942 else
14943   use_weak_symbols=no
14944 fi;
14945         echo "$as_me:14945: result: $use_weak_symbols" >&5
14946 echo "${ECHO_T}$use_weak_symbols" >&6
14947         if test "x$use_weak_symbols" = xyes ; then
14948
14949 echo "$as_me:14949: checking if $CC supports weak symbols" >&5
14950 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14951 if test "${cf_cv_weak_symbols+set}" = set; then
14952   echo $ECHO_N "(cached) $ECHO_C" >&6
14953 else
14954
14955 cat >conftest.$ac_ext <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 #include <stdio.h>
14960 int
14961 main (void)
14962 {
14963
14964 #if defined(__GNUC__)
14965 #  if defined __USE_ISOC99
14966 #    define _cat_pragma(exp)    _Pragma(#exp)
14967 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14968 #  else
14969 #    define _weak_pragma(exp)
14970 #  endif
14971 #  define _declare(name)        __extension__ extern __typeof__(name) name
14972 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14973 #endif
14974
14975 weak_symbol(fopen);
14976
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 rm -f conftest.$ac_objext
14982 if { (eval echo "$as_me:14982: \"$ac_compile\"") >&5
14983   (eval $ac_compile) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -s conftest.$ac_objext'
14988   { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989   (eval $ac_try) 2>&5
14990   ac_status=$?
14991   echo "$as_me:14991: \$? = $ac_status" >&5
14992   (exit $ac_status); }; }; then
14993   cf_cv_weak_symbols=yes
14994 else
14995   echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 cf_cv_weak_symbols=no
14998 fi
14999 rm -f conftest.$ac_objext conftest.$ac_ext
15000
15001 fi
15002 echo "$as_me:15002: result: $cf_cv_weak_symbols" >&5
15003 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15004
15005         else
15006                 cf_cv_weak_symbols=no
15007         fi
15008
15009         if test "x$cf_cv_weak_symbols" = xyes ; then
15010
15011 cat >>confdefs.h <<\EOF
15012 #define USE_WEAK_SYMBOLS 1
15013 EOF
15014
15015         fi
15016 fi
15017
15018 PTHREAD=
15019 if test "x$with_pthread" = "xyes" ; then
15020
15021 cat >>confdefs.h <<\EOF
15022 #define USE_PTHREADS 1
15023 EOF
15024
15025         enable_reentrant=yes
15026         if test "x$cf_cv_weak_symbols" = xyes ; then
15027                 PTHREAD=-lpthread
15028
15029 cf_add_libs="$PRIVATE_LIBS"
15030 # reverse order
15031 cf_add_0lib=
15032 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15033 # filter duplicates
15034 for cf_add_1lib in $cf_add_0lib; do
15035         for cf_add_2lib in $cf_add_libs; do
15036                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15037                         cf_add_1lib=
15038                         break
15039                 fi
15040         done
15041         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15042 done
15043 PRIVATE_LIBS="$cf_add_libs"
15044
15045         fi
15046 fi
15047
15048 # Reentrant code has to be opaque; there's little advantage to making ncurses
15049 # opaque outside of that, so there is no --enable-opaque option.  We can use
15050 # this option without --with-pthreads, but this will be always set for
15051 # pthreads.
15052 echo "$as_me:15052: checking if you want reentrant code" >&5
15053 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15054
15055 # Check whether --enable-reentrant or --disable-reentrant was given.
15056 if test "${enable_reentrant+set}" = set; then
15057   enableval="$enable_reentrant"
15058   with_reentrant=$enableval
15059 else
15060   with_reentrant=no
15061 fi;
15062 echo "$as_me:15062: result: $with_reentrant" >&5
15063 echo "${ECHO_T}$with_reentrant" >&6
15064 if test "x$with_reentrant" = xyes ; then
15065         cf_cv_enable_reentrant=1
15066         cf_cv_enable_opaque="NCURSES_INTERNALS"
15067         NCURSES_SIZE_T=int
15068         if test "x$cf_cv_weak_symbols" = xyes ; then
15069
15070 # remove pthread library from $LIBS
15071 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15072
15073 cf_add_libs="$TEST_LIBS"
15074 # reverse order
15075 cf_add_0lib=
15076 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15077 # filter duplicates
15078 for cf_add_1lib in $cf_add_0lib; do
15079         for cf_add_2lib in $cf_add_libs; do
15080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15081                         cf_add_1lib=
15082                         break
15083                 fi
15084         done
15085         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15086 done
15087 TEST_LIBS="$cf_add_libs"
15088
15089 cf_add_libs="$TEST_LIBS2"
15090 # reverse order
15091 cf_add_0lib=
15092 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15093 # filter duplicates
15094 for cf_add_1lib in $cf_add_0lib; do
15095         for cf_add_2lib in $cf_add_libs; do
15096                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15097                         cf_add_1lib=
15098                         break
15099                 fi
15100         done
15101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15102 done
15103 TEST_LIBS2="$cf_add_libs"
15104
15105 cf_add_libs="$PRIVATE_LIBS"
15106 # reverse order
15107 cf_add_0lib=
15108 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15109 # filter duplicates
15110 for cf_add_1lib in $cf_add_0lib; do
15111         for cf_add_2lib in $cf_add_libs; do
15112                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15113                         cf_add_1lib=
15114                         break
15115                 fi
15116         done
15117         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15118 done
15119 PRIVATE_LIBS="$cf_add_libs"
15120
15121         else
15122                 # when not using weak symbols but with_reentrant,
15123                 # add 't' to the library suffix on all platforms
15124                 # except cygwin, where we only do that if ALSO
15125                 # compiling with full thread support.
15126                 case "$host" in
15127                 (*cygwin* | *msys*)
15128                         if test "$with_pthread" = "yes" ; then
15129                                 if test "x$disable_lib_suffixes" = "xno" ; then
15130                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15131                                 fi
15132                         fi ;;
15133                 (*)
15134                         if test "x$disable_lib_suffixes" = "xno" ; then
15135                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15136                         fi
15137                         ;;
15138                 esac
15139         fi
15140
15141 cat >>confdefs.h <<\EOF
15142 #define USE_REENTRANT 1
15143 EOF
15144
15145 if test "${with_abi_version+set}" != set; then
15146         case $cf_cv_rel_version in
15147         (5.*)
15148                 cf_cv_rel_version=6.0
15149                 cf_cv_abi_version=6
15150                 { echo "$as_me:15150: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15151 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15152                 ;;
15153         esac
15154 fi
15155
15156 else
15157         cf_cv_enable_reentrant=0
15158         cf_cv_enable_opaque="NCURSES_OPAQUE"
15159         NCURSES_SIZE_T=short
15160 fi
15161
15162 echo "$as_me:15162: checking if you want opaque curses-library structures" >&5
15163 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15164
15165 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15166 if test "${enable_opaque_curses+set}" = set; then
15167   enableval="$enable_opaque_curses"
15168   test "$enableval" != yes && enableval=no
15169         if test "$enableval" != "no" ; then
15170     enable_opaque_curses=yes
15171         else
15172
15173          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15174          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15175
15176         fi
15177 else
15178   enableval=no
15179
15180          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15181          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15182
15183 fi;
15184 echo "$as_me:15184: result: $enable_opaque_curses" >&5
15185 echo "${ECHO_T}$enable_opaque_curses" >&6
15186
15187 test "$cf_cv_enable_reentrant" = 1 && \
15188 test "$enable_opaque_curses" = no && \
15189 { { echo "$as_me:15189: error: reentrant configuration requires opaque library" >&5
15190 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15191    { (exit 1); exit 1; }; }
15192
15193 echo "$as_me:15193: checking if you want opaque form-library structures" >&5
15194 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15195
15196 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15197 if test "${enable_opaque_form+set}" = set; then
15198   enableval="$enable_opaque_form"
15199   enable_opaque_form=yes
15200 else
15201   enable_opaque_form=no
15202 fi;
15203 echo "$as_me:15203: result: $enable_opaque_form" >&5
15204 echo "${ECHO_T}$enable_opaque_form" >&6
15205
15206 echo "$as_me:15206: checking if you want opaque menu-library structures" >&5
15207 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15208
15209 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15210 if test "${enable_opaque_menu+set}" = set; then
15211   enableval="$enable_opaque_menu"
15212   enable_opaque_menu=yes
15213 else
15214   enable_opaque_menu=no
15215 fi;
15216 echo "$as_me:15216: result: $enable_opaque_menu" >&5
15217 echo "${ECHO_T}$enable_opaque_menu" >&6
15218
15219 echo "$as_me:15219: checking if you want opaque panel-library structures" >&5
15220 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15221
15222 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15223 if test "${enable_opaque_panel+set}" = set; then
15224   enableval="$enable_opaque_panel"
15225   enable_opaque_panel=yes
15226 else
15227   enable_opaque_panel=no
15228 fi;
15229 echo "$as_me:15229: result: $enable_opaque_panel" >&5
15230 echo "${ECHO_T}$enable_opaque_panel" >&6
15231
15232 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15233 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15234 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15235 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15236
15237 ### Allow using a different wrap-prefix
15238 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15239         echo "$as_me:15239: checking for prefix used to wrap public variables" >&5
15240 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15241
15242 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15243 if test "${with_wrap_prefix+set}" = set; then
15244   withval="$with_wrap_prefix"
15245   NCURSES_WRAP_PREFIX=$withval
15246 else
15247   NCURSES_WRAP_PREFIX=_nc_
15248 fi;
15249         echo "$as_me:15249: result: $NCURSES_WRAP_PREFIX" >&5
15250 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15251 else
15252         NCURSES_WRAP_PREFIX=_nc_
15253 fi
15254
15255 cat >>confdefs.h <<EOF
15256 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15257 EOF
15258
15259 ###############################################################################
15260 # These options are relatively safe to experiment with.
15261
15262 echo "$as_me:15262: checking if you want all development code" >&5
15263 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15264
15265 # Check whether --with-develop or --without-develop was given.
15266 if test "${with_develop+set}" = set; then
15267   withval="$with_develop"
15268   with_develop=$withval
15269 else
15270   with_develop=no
15271 fi;
15272 echo "$as_me:15272: result: $with_develop" >&5
15273 echo "${ECHO_T}$with_develop" >&6
15274
15275 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15276 echo "$as_me:15276: checking if you want hard-tabs code" >&5
15277 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15278
15279 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15280 if test "${enable_hard_tabs+set}" = set; then
15281   enableval="$enable_hard_tabs"
15282
15283 else
15284   enable_hard_tabs=$with_develop
15285 fi;
15286 echo "$as_me:15286: result: $enable_hard_tabs" >&5
15287 echo "${ECHO_T}$enable_hard_tabs" >&6
15288 test "x$enable_hard_tabs" = xyes &&
15289 cat >>confdefs.h <<\EOF
15290 #define USE_HARD_TABS 1
15291 EOF
15292
15293 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15294 echo "$as_me:15294: checking if you want limited support for xmc" >&5
15295 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15296
15297 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15298 if test "${enable_xmc_glitch+set}" = set; then
15299   enableval="$enable_xmc_glitch"
15300
15301 else
15302   enable_xmc_glitch=$with_develop
15303 fi;
15304 echo "$as_me:15304: result: $enable_xmc_glitch" >&5
15305 echo "${ECHO_T}$enable_xmc_glitch" >&6
15306 test "x$enable_xmc_glitch" = xyes &&
15307 cat >>confdefs.h <<\EOF
15308 #define USE_XMC_SUPPORT 1
15309 EOF
15310
15311 ###############################################################################
15312 # These are just experimental, probably should not be in a package:
15313
15314 echo "$as_me:15314: checking if you do not want to assume colors are white-on-black" >&5
15315 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15316
15317 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15318 if test "${enable_assumed_color+set}" = set; then
15319   enableval="$enable_assumed_color"
15320   with_assumed_color=$enableval
15321 else
15322   with_assumed_color=yes
15323 fi;
15324 echo "$as_me:15324: result: $with_assumed_color" >&5
15325 echo "${ECHO_T}$with_assumed_color" >&6
15326 test "x$with_assumed_color" = xyes &&
15327 cat >>confdefs.h <<\EOF
15328 #define USE_ASSUMED_COLOR 1
15329 EOF
15330
15331 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15332 echo "$as_me:15332: checking if you want hashmap scrolling-optimization code" >&5
15333 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15334
15335 # Check whether --enable-hashmap or --disable-hashmap was given.
15336 if test "${enable_hashmap+set}" = set; then
15337   enableval="$enable_hashmap"
15338   with_hashmap=$enableval
15339 else
15340   with_hashmap=yes
15341 fi;
15342 echo "$as_me:15342: result: $with_hashmap" >&5
15343 echo "${ECHO_T}$with_hashmap" >&6
15344 test "x$with_hashmap" = xyes &&
15345 cat >>confdefs.h <<\EOF
15346 #define USE_HASHMAP 1
15347 EOF
15348
15349 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15350 echo "$as_me:15350: checking if you want colorfgbg code" >&5
15351 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15352
15353 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15354 if test "${enable_colorfgbg+set}" = set; then
15355   enableval="$enable_colorfgbg"
15356   with_colorfgbg=$enableval
15357 else
15358   with_colorfgbg=no
15359 fi;
15360 echo "$as_me:15360: result: $with_colorfgbg" >&5
15361 echo "${ECHO_T}$with_colorfgbg" >&6
15362 test "x$with_colorfgbg" = xyes &&
15363 cat >>confdefs.h <<\EOF
15364 #define USE_COLORFGBG 1
15365 EOF
15366
15367 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15368 echo "$as_me:15368: checking if you want to use gcc -fvisibility option" >&5
15369 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15370
15371 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15372 if test "${enable_fvisibility+set}" = set; then
15373   enableval="$enable_fvisibility"
15374   cf_with_fvisibility=$enableval
15375 else
15376   cf_with_fvisibility=no
15377 fi;
15378 echo "$as_me:15378: result: $cf_with_fvisibility" >&5
15379 echo "${ECHO_T}$cf_with_fvisibility" >&6
15380
15381 NCURSES_IMPEXP=
15382 NCURSES_CXX_IMPEXP=
15383 if test "x$cf_with_fvisibility" = xyes; then
15384
15385 echo "$as_me:15385: checking if $CC -fvisibility=hidden option works" >&5
15386 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15387 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15388   echo $ECHO_N "(cached) $ECHO_C" >&6
15389 else
15390
15391     cf_save_cflags="$CFLAGS"
15392     CFLAGS="$CFLAGS -fvisibility=hidden"
15393     cat >conftest.$ac_ext <<_ACEOF
15394 #line 15394 "configure"
15395 #include "confdefs.h"
15396
15397 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15398
15399 int
15400 main (void)
15401 {
15402
15403         if (somefunc()) return 1;
15404
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext conftest$ac_exeext
15410 if { (eval echo "$as_me:15410: \"$ac_link\"") >&5
15411   (eval $ac_link) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest$ac_exeext'
15416   { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   cf_cv_fvisibility_hidden=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_fvisibility_hidden=no
15426 fi
15427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15428     CFLAGS=$cf_save_cflags
15429
15430 fi
15431 echo "$as_me:15431: result: $cf_cv_fvisibility_hidden" >&5
15432 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15433
15434         if test "x$cf_cv_fvisibility_hidden" = xyes
15435         then
15436
15437 cf_fix_cppflags=no
15438 cf_new_cflags=
15439 cf_new_cppflags=
15440 cf_new_extra_cppflags=
15441
15442 for cf_add_cflags in -fvisibility=hidden
15443 do
15444 case $cf_fix_cppflags in
15445 (no)
15446         case $cf_add_cflags in
15447         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15448                 case $cf_add_cflags in
15449                 (-D*)
15450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15451
15452                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15453                                 && test -z "${cf_tst_cflags}" \
15454                                 && cf_fix_cppflags=yes
15455
15456                         if test $cf_fix_cppflags = yes ; then
15457
15458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15460
15461                                 continue
15462                         elif test "${cf_tst_cflags}" = "\"'" ; then
15463
15464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15466
15467                                 continue
15468                         fi
15469                         ;;
15470                 esac
15471                 case "$CPPFLAGS" in
15472                 (*$cf_add_cflags)
15473                         ;;
15474                 (*)
15475                         case $cf_add_cflags in
15476                         (-D*)
15477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15478
15479 CPPFLAGS=`echo "$CPPFLAGS" | \
15480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15482
15483                                 ;;
15484                         esac
15485
15486         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15487         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15488
15489                         ;;
15490                 esac
15491                 ;;
15492         (*)
15493
15494         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15495         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15496
15497                 ;;
15498         esac
15499         ;;
15500 (yes)
15501
15502         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15503         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15504
15505         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15506
15507         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15508                 && test -z "${cf_tst_cflags}" \
15509                 && cf_fix_cppflags=no
15510         ;;
15511 esac
15512 done
15513
15514 if test -n "$cf_new_cflags" ; then
15515
15516         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15517         CFLAGS="${CFLAGS}$cf_new_cflags"
15518
15519 fi
15520
15521 if test -n "$cf_new_cppflags" ; then
15522
15523         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15524         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15525
15526 fi
15527
15528 if test -n "$cf_new_extra_cppflags" ; then
15529
15530         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15531         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15532
15533 fi
15534
15535                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15536         fi
15537         if test -n "$CXX"
15538         then
15539                 ac_ext=cc
15540 ac_cpp='$CXXCPP $CPPFLAGS'
15541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15542 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15544 ac_main_return=return
15545
15546 echo "$as_me:15546: checking if $CXX -fvisibility=hidden option works" >&5
15547 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15548 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551
15552     cf_save_cflags="$CXXFLAGS"
15553     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15554     cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15559
15560 int
15561 main (void)
15562 {
15563
15564         if (somefunc()) return 1;
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 rm -f conftest.$ac_objext conftest$ac_exeext
15571 if { (eval echo "$as_me:15571: \"$ac_link\"") >&5
15572   (eval $ac_link) 2>&5
15573   ac_status=$?
15574   echo "$as_me:15574: \$? = $ac_status" >&5
15575   (exit $ac_status); } &&
15576          { ac_try='test -s conftest$ac_exeext'
15577   { (eval echo "$as_me:15577: \"$ac_try\"") >&5
15578   (eval $ac_try) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); }; }; then
15582   cf_cv_fvisibility_hidden2=yes
15583 else
15584   echo "$as_me: failed program was:" >&5
15585 cat conftest.$ac_ext >&5
15586 cf_cv_fvisibility_hidden2=no
15587 fi
15588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15589     CXXFLAGS=$cf_save_cflags
15590
15591 fi
15592 echo "$as_me:15592: result: $cf_cv_fvisibility_hidden2" >&5
15593 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15594
15595                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15596                 then
15597
15598 cf_save_CXXFLAGS="$CFLAGS"
15599 CFLAGS="$CXXFLAGS"
15600
15601 cf_fix_cppflags=no
15602 cf_new_cflags=
15603 cf_new_cppflags=
15604 cf_new_extra_cppflags=
15605
15606 for cf_add_cflags in -fvisibility=hidden
15607 do
15608 case $cf_fix_cppflags in
15609 (no)
15610         case $cf_add_cflags in
15611         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15612                 case $cf_add_cflags in
15613                 (-D*)
15614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15615
15616                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15617                                 && test -z "${cf_tst_cflags}" \
15618                                 && cf_fix_cppflags=yes
15619
15620                         if test $cf_fix_cppflags = yes ; then
15621
15622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15624
15625                                 continue
15626                         elif test "${cf_tst_cflags}" = "\"'" ; then
15627
15628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15630
15631                                 continue
15632                         fi
15633                         ;;
15634                 esac
15635                 case "$CPPFLAGS" in
15636                 (*$cf_add_cflags)
15637                         ;;
15638                 (*)
15639                         case $cf_add_cflags in
15640                         (-D*)
15641                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15642
15643 CPPFLAGS=`echo "$CPPFLAGS" | \
15644         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15645                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15646
15647                                 ;;
15648                         esac
15649
15650         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15651         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15652
15653                         ;;
15654                 esac
15655                 ;;
15656         (*)
15657
15658         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15659         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15660
15661                 ;;
15662         esac
15663         ;;
15664 (yes)
15665
15666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15668
15669         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15670
15671         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15672                 && test -z "${cf_tst_cflags}" \
15673                 && cf_fix_cppflags=no
15674         ;;
15675 esac
15676 done
15677
15678 if test -n "$cf_new_cflags" ; then
15679
15680         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15681         CFLAGS="${CFLAGS}$cf_new_cflags"
15682
15683 fi
15684
15685 if test -n "$cf_new_cppflags" ; then
15686
15687         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15688         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15689
15690 fi
15691
15692 if test -n "$cf_new_extra_cppflags" ; then
15693
15694         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15695         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15696
15697 fi
15698
15699 CXXFLAGS="$CFLAGS"
15700 CFLAGS="$cf_save_CXXFLAGS"
15701
15702                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15703                 fi
15704                 ac_ext=c
15705 ac_cpp='$CPP $CPPFLAGS'
15706 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15707 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15708 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15709 ac_main_return=return
15710
15711         fi
15712 fi
15713
15714 ###   use option --enable-interop to turn on use of bindings used for interop
15715 echo "$as_me:15715: checking if you want interop bindings" >&5
15716 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15717
15718 # Check whether --enable-interop or --disable-interop was given.
15719 if test "${enable_interop+set}" = set; then
15720   enableval="$enable_interop"
15721   with_exp_interop=$enableval
15722 else
15723   with_exp_interop=$cf_dft_interop
15724 fi;
15725 echo "$as_me:15725: result: $with_exp_interop" >&5
15726 echo "${ECHO_T}$with_exp_interop" >&6
15727
15728 NCURSES_INTEROP_FUNCS=0
15729 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15730
15731 echo "$as_me:15731: checking if you want experimental safe-sprintf code" >&5
15732 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15733
15734 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15735 if test "${enable_safe_sprintf+set}" = set; then
15736   enableval="$enable_safe_sprintf"
15737   with_safe_sprintf=$enableval
15738 else
15739   with_safe_sprintf=no
15740 fi;
15741 echo "$as_me:15741: result: $with_safe_sprintf" >&5
15742 echo "${ECHO_T}$with_safe_sprintf" >&6
15743
15744 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15745 # when hashmap is used scroll hints are useless
15746 if test "$with_hashmap" = no ; then
15747 echo "$as_me:15747: checking if you want to experiment without scrolling-hints code" >&5
15748 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15749
15750 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15751 if test "${enable_scroll_hints+set}" = set; then
15752   enableval="$enable_scroll_hints"
15753   with_scroll_hints=$enableval
15754 else
15755   with_scroll_hints=yes
15756 fi;
15757 echo "$as_me:15757: result: $with_scroll_hints" >&5
15758 echo "${ECHO_T}$with_scroll_hints" >&6
15759 test "x$with_scroll_hints" = xyes &&
15760 cat >>confdefs.h <<\EOF
15761 #define USE_SCROLL_HINTS 1
15762 EOF
15763
15764 fi
15765
15766 echo "$as_me:15766: checking if you want wgetch-events code" >&5
15767 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15768
15769 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15770 if test "${enable_wgetch_events+set}" = set; then
15771   enableval="$enable_wgetch_events"
15772   with_wgetch_events=$enableval
15773 else
15774   with_wgetch_events=no
15775 fi;
15776 echo "$as_me:15776: result: $with_wgetch_events" >&5
15777 echo "${ECHO_T}$with_wgetch_events" >&6
15778 test "x$with_wgetch_events" = xyes &&
15779 cat >>confdefs.h <<\EOF
15780 #define NCURSES_WGETCH_EVENTS 1
15781 EOF
15782
15783 ###############################################################################
15784
15785 ###     use option --disable-echo to suppress full display compiling commands
15786
15787 echo "$as_me:15787: checking if you want to see long compiling messages" >&5
15788 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15789
15790 # Check whether --enable-echo or --disable-echo was given.
15791 if test "${enable_echo+set}" = set; then
15792   enableval="$enable_echo"
15793   test "$enableval" != no && enableval=yes
15794         if test "$enableval" != "yes" ; then
15795
15796         ECHO_LT='--silent'
15797         ECHO_LD='@echo linking $@;'
15798         RULE_CC='@echo compiling $<'
15799         SHOW_CC='@echo compiling $@'
15800         ECHO_CC='@'
15801
15802         else
15803
15804         ECHO_LT=''
15805         ECHO_LD=''
15806         RULE_CC=''
15807         SHOW_CC=''
15808         ECHO_CC=''
15809
15810         fi
15811 else
15812   enableval=yes
15813
15814         ECHO_LT=''
15815         ECHO_LD=''
15816         RULE_CC=''
15817         SHOW_CC=''
15818         ECHO_CC=''
15819
15820 fi;
15821 echo "$as_me:15821: result: $enableval" >&5
15822 echo "${ECHO_T}$enableval" >&6
15823
15824 if test "x$enable_echo" = xyes; then
15825         ECHO_LINK=
15826 else
15827         ECHO_LINK='@ echo linking $@ ... ;'
15828         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15829         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15830 fi
15831
15832 # --disable-stripping is used for debugging
15833
15834 echo "$as_me:15834: checking if you want to install stripped executables" >&5
15835 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15836
15837 # Check whether --enable-stripping or --disable-stripping was given.
15838 if test "${enable_stripping+set}" = set; then
15839   enableval="$enable_stripping"
15840   test "$enableval" != no && enableval=yes
15841         if test "$enableval" != "yes" ; then
15842     with_stripping=no
15843         else
15844                 with_stripping=yes
15845         fi
15846 else
15847   enableval=yes
15848         with_stripping=yes
15849
15850 fi;
15851 echo "$as_me:15851: result: $with_stripping" >&5
15852 echo "${ECHO_T}$with_stripping" >&6
15853
15854 if test "$with_stripping" = yes
15855 then
15856         INSTALL_OPT_S="-s"
15857 else
15858         INSTALL_OPT_S=
15859 fi
15860
15861 : ${INSTALL:=install}
15862 echo "$as_me:15862: checking if install accepts -p option" >&5
15863 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15864 if test "${cf_cv_install_p+set}" = set; then
15865   echo $ECHO_N "(cached) $ECHO_C" >&6
15866 else
15867
15868         rm -rf conftest*
15869         date >conftest.in
15870         mkdir conftest.out
15871         sleep 3
15872         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15873         then
15874                 if test -f conftest.out/conftest.in
15875                 then
15876                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15877                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15878                         if test -s conftest.err
15879                         then
15880                                 cf_cv_install_p=no
15881                         else
15882                                 cf_cv_install_p=yes
15883                         fi
15884                 else
15885                         cf_cv_install_p=no
15886                 fi
15887         else
15888                 cf_cv_install_p=no
15889         fi
15890         rm -rf conftest*
15891
15892 fi
15893 echo "$as_me:15893: result: $cf_cv_install_p" >&5
15894 echo "${ECHO_T}$cf_cv_install_p" >&6
15895
15896 echo "$as_me:15896: checking if install needs to be told about ownership" >&5
15897 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15898 case `$ac_config_guess` in
15899 (*minix)
15900         with_install_o=yes
15901         ;;
15902 (*)
15903         with_install_o=no
15904         ;;
15905 esac
15906
15907 echo "$as_me:15907: result: $with_install_o" >&5
15908 echo "${ECHO_T}$with_install_o" >&6
15909 if test "x$with_install_o" = xyes
15910 then
15911         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'`
15912 else
15913         INSTALL_OPT_O=
15914 fi
15915
15916 # If we're avoiding relinking of shared libraries during install, that is to
15917 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15918 # the install program has "-p" (for preserving timestamps).
15919 cf_cv_do_reranlib=yes
15920 if test "x$cf_cv_install_p" = xyes
15921 then
15922         if test "x$cf_cv_do_relink" != xyes
15923         then
15924                 cf_cv_do_reranlib=no
15925                 INSTALL_OPT_P="-p"
15926                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15927         fi
15928 fi
15929
15930 ###     use option --enable-warnings to turn on all gcc warnings
15931 echo "$as_me:15931: checking if you want to see compiler warnings" >&5
15932 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15933
15934 # Check whether --enable-warnings or --disable-warnings was given.
15935 if test "${enable_warnings+set}" = set; then
15936   enableval="$enable_warnings"
15937   with_warnings=$enableval
15938 fi;
15939 echo "$as_me:15939: result: $with_warnings" >&5
15940 echo "${ECHO_T}$with_warnings" >&6
15941
15942 if test "x$with_warnings" = "xyes"; then
15943
15944         ADAFLAGS="$ADAFLAGS -gnatg"
15945
15946 if test "x$have_x" = xyes; then
15947
15948 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15949 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15950 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15951 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15952 for cf_X_CFLAGS in $X_CFLAGS
15953 do
15954         case "x$cf_X_CFLAGS" in
15955         x-[IUD]*)
15956                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15957                 ;;
15958         *)
15959                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15960                 ;;
15961         esac
15962 done
15963
15964 cat >conftest.$ac_ext <<_ACEOF
15965 #line 15965 "configure"
15966 #include "confdefs.h"
15967
15968 #include <stdlib.h>
15969 #include <X11/Intrinsic.h>
15970
15971 int
15972 main (void)
15973 {
15974 String foo = malloc(1); (void)foo
15975   ;
15976   return 0;
15977 }
15978 _ACEOF
15979 rm -f conftest.$ac_objext
15980 if { (eval echo "$as_me:15980: \"$ac_compile\"") >&5
15981   (eval $ac_compile) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit $ac_status); } &&
15985          { ac_try='test -s conftest.$ac_objext'
15986   { (eval echo "$as_me:15986: \"$ac_try\"") >&5
15987   (eval $ac_try) 2>&5
15988   ac_status=$?
15989   echo "$as_me:15989: \$? = $ac_status" >&5
15990   (exit $ac_status); }; }; then
15991
15992 echo "$as_me:15992: checking for X11/Xt const-feature" >&5
15993 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15994 if test "${cf_cv_const_x_string+set}" = set; then
15995   echo $ECHO_N "(cached) $ECHO_C" >&6
15996 else
15997
15998         cat >conftest.$ac_ext <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16003 #undef  XTSTRINGDEFINES /* X11R5 and later */
16004 #include <stdlib.h>
16005 #include <X11/Intrinsic.h>
16006
16007 int
16008 main (void)
16009 {
16010 String foo = malloc(1); *foo = 0
16011   ;
16012   return 0;
16013 }
16014 _ACEOF
16015 rm -f conftest.$ac_objext
16016 if { (eval echo "$as_me:16016: \"$ac_compile\"") >&5
16017   (eval $ac_compile) 2>&5
16018   ac_status=$?
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); } &&
16021          { ac_try='test -s conftest.$ac_objext'
16022   { (eval echo "$as_me:16022: \"$ac_try\"") >&5
16023   (eval $ac_try) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit $ac_status); }; }; then
16027
16028                         cf_cv_const_x_string=no
16029
16030 else
16031   echo "$as_me: failed program was:" >&5
16032 cat conftest.$ac_ext >&5
16033
16034                         cf_cv_const_x_string=yes
16035
16036 fi
16037 rm -f conftest.$ac_objext conftest.$ac_ext
16038
16039 fi
16040 echo "$as_me:16040: result: $cf_cv_const_x_string" >&5
16041 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16042
16043 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16044 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16045 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16046
16047 case $cf_cv_const_x_string in
16048 (no)
16049
16050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16051         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16052
16053         ;;
16054 (*)
16055
16056         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16057         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16058
16059         ;;
16060 esac
16061
16062 else
16063   echo "$as_me: failed program was:" >&5
16064 cat conftest.$ac_ext >&5
16065 fi
16066 rm -f conftest.$ac_objext conftest.$ac_ext
16067  fi
16068 cat > conftest.$ac_ext <<EOF
16069 #line 16069 "${as_me:-configure}"
16070 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16071 EOF
16072 if test "$INTEL_COMPILER" = yes
16073 then
16074 # The "-wdXXX" options suppress warnings:
16075 # remark #1419: external declaration in primary source file
16076 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16077 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16078 # remark #193: zero used for undefined preprocessing identifier
16079 # remark #593: variable "curs_sb_left_arrow" was set but never used
16080 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16081 # remark #869: parameter "tw" was never referenced
16082 # remark #981: operands are evaluated in unspecified order
16083 # warning #279: controlling expression is constant
16084
16085         { echo "$as_me:16085: checking for $CC warning options..." >&5
16086 echo "$as_me: checking for $CC warning options..." >&6;}
16087         cf_save_CFLAGS="$CFLAGS"
16088         EXTRA_CFLAGS="-Wall"
16089         for cf_opt in \
16090                 wd1419 \
16091                 wd1683 \
16092                 wd1684 \
16093                 wd193 \
16094                 wd593 \
16095                 wd279 \
16096                 wd810 \
16097                 wd869 \
16098                 wd981
16099         do
16100                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16101                 if { (eval echo "$as_me:16101: \"$ac_compile\"") >&5
16102   (eval $ac_compile) 2>&5
16103   ac_status=$?
16104   echo "$as_me:16104: \$? = $ac_status" >&5
16105   (exit $ac_status); }; then
16106                         test -n "$verbose" && echo "$as_me:16106: result: ... -$cf_opt" >&5
16107 echo "${ECHO_T}... -$cf_opt" >&6
16108                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16109                 fi
16110         done
16111         CFLAGS="$cf_save_CFLAGS"
16112 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16113 then
16114         { echo "$as_me:16114: checking for $CC warning options..." >&5
16115 echo "$as_me: checking for $CC warning options..." >&6;}
16116         cf_save_CFLAGS="$CFLAGS"
16117         EXTRA_CFLAGS=
16118         cf_warn_CONST=""
16119         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16120         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16121         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16122         for cf_opt in W Wall \
16123                 Wbad-function-cast \
16124                 Wcast-align \
16125                 Wcast-qual \
16126                 Wdeclaration-after-statement \
16127                 Wextra \
16128                 Winline \
16129                 Wmissing-declarations \
16130                 Wmissing-prototypes \
16131                 Wnested-externs \
16132                 Wpointer-arith \
16133                 Wshadow \
16134                 Wstrict-prototypes \
16135                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16136         do
16137                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16138                 if { (eval echo "$as_me:16138: \"$ac_compile\"") >&5
16139   (eval $ac_compile) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; then
16143                         test -n "$verbose" && echo "$as_me:16143: result: ... -$cf_opt" >&5
16144 echo "${ECHO_T}... -$cf_opt" >&6
16145                         case $cf_opt in
16146                         (Winline)
16147                                 case $GCC_VERSION in
16148                                 ([34].*)
16149                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16150
16151 echo "${as_me:-configure}:16151: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16152
16153                                         continue;;
16154                                 esac
16155                                 ;;
16156                         (Wpointer-arith)
16157                                 case $GCC_VERSION in
16158                                 ([12].*)
16159                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16160
16161 echo "${as_me:-configure}:16161: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16162
16163                                         continue;;
16164                                 esac
16165                                 ;;
16166                         esac
16167                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16168                 fi
16169         done
16170         CFLAGS="$cf_save_CFLAGS"
16171 fi
16172 rm -rf conftest*
16173
16174         if test "x$cf_with_cxx" = xyes ; then
16175
16176 INTEL_CPLUSPLUS=no
16177
16178 if test "$GCC" = yes ; then
16179         case $host_os in
16180         (linux*|gnu*)
16181                 echo "$as_me:16181: checking if this is really Intel C++ compiler" >&5
16182 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16183                 cf_save_CFLAGS="$CXXFLAGS"
16184                 CXXFLAGS="$CXXFLAGS -no-gcc"
16185                 cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188
16189 int
16190 main (void)
16191 {
16192
16193 #ifdef __INTEL_COMPILER
16194 #else
16195 make an error
16196 #endif
16197
16198   ;
16199   return 0;
16200 }
16201 _ACEOF
16202 rm -f conftest.$ac_objext
16203 if { (eval echo "$as_me:16203: \"$ac_compile\"") >&5
16204   (eval $ac_compile) 2>&5
16205   ac_status=$?
16206   echo "$as_me:16206: \$? = $ac_status" >&5
16207   (exit $ac_status); } &&
16208          { ac_try='test -s conftest.$ac_objext'
16209   { (eval echo "$as_me:16209: \"$ac_try\"") >&5
16210   (eval $ac_try) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); }; }; then
16214   INTEL_CPLUSPLUS=yes
16215 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16216
16217 else
16218   echo "$as_me: failed program was:" >&5
16219 cat conftest.$ac_ext >&5
16220 fi
16221 rm -f conftest.$ac_objext conftest.$ac_ext
16222                 CXXFLAGS="$cf_save_CFLAGS"
16223                 echo "$as_me:16223: result: $INTEL_CPLUSPLUS" >&5
16224 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16225                 ;;
16226         esac
16227 fi
16228
16229 CLANG_CPLUSPLUS=no
16230
16231 if test "$GCC" = yes ; then
16232         echo "$as_me:16232: checking if this is really Clang C++ compiler" >&5
16233 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16234         cf_save_CFLAGS="$CXXFLAGS"
16235         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16236         cat >conftest.$ac_ext <<_ACEOF
16237 #line 16237 "configure"
16238 #include "confdefs.h"
16239
16240 int
16241 main (void)
16242 {
16243
16244 #ifdef __clang__
16245 #else
16246 make an error
16247 #endif
16248
16249   ;
16250   return 0;
16251 }
16252 _ACEOF
16253 rm -f conftest.$ac_objext
16254 if { (eval echo "$as_me:16254: \"$ac_compile\"") >&5
16255   (eval $ac_compile) 2>&5
16256   ac_status=$?
16257   echo "$as_me:16257: \$? = $ac_status" >&5
16258   (exit $ac_status); } &&
16259          { ac_try='test -s conftest.$ac_objext'
16260   { (eval echo "$as_me:16260: \"$ac_try\"") >&5
16261   (eval $ac_try) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); }; }; then
16265   CLANG_CPLUSPLUS=yes
16266 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16267
16268 else
16269   echo "$as_me: failed program was:" >&5
16270 cat conftest.$ac_ext >&5
16271 fi
16272 rm -f conftest.$ac_objext conftest.$ac_ext
16273         CXXFLAGS="$cf_save_CFLAGS"
16274         echo "$as_me:16274: result: $CLANG_CPLUSPLUS" >&5
16275 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16276 fi
16277
16278 ac_ext=cc
16279 ac_cpp='$CXXCPP $CPPFLAGS'
16280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16283 ac_main_return=return
16284
16285 cat > conftest.$ac_ext <<EOF
16286 #line 16286 "configure"
16287 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16288 EOF
16289
16290 if test "$INTEL_CPLUSPLUS" = yes
16291 then
16292 # The "-wdXXX" options suppress warnings:
16293 # remark #1419: external declaration in primary source file
16294 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16295 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16296 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16297 # remark #193: zero used for undefined preprocessing identifier
16298 # remark #593: variable "curs_sb_left_arrow" was set but never used
16299 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16300 # remark #869: parameter "tw" was never referenced
16301 # remark #981: operands are evaluated in unspecified order
16302 # warning #269: invalid format string conversion
16303
16304         { echo "$as_me:16304: checking for $CC warning options..." >&5
16305 echo "$as_me: checking for $CC warning options..." >&6;}
16306         cf_save_CXXFLAGS="$CXXFLAGS"
16307         EXTRA_CXXFLAGS="-Wall"
16308         for cf_opt in \
16309                 wd1419 \
16310                 wd1682 \
16311                 wd1683 \
16312                 wd1684 \
16313                 wd193 \
16314                 wd279 \
16315                 wd593 \
16316                 wd810 \
16317                 wd869 \
16318                 wd981
16319         do
16320                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16321                 if { (eval echo "$as_me:16321: \"$ac_compile\"") >&5
16322   (eval $ac_compile) 2>&5
16323   ac_status=$?
16324   echo "$as_me:16324: \$? = $ac_status" >&5
16325   (exit $ac_status); }; then
16326                         test -n "$verbose" && echo "$as_me:16326: result: ... -$cf_opt" >&5
16327 echo "${ECHO_T}... -$cf_opt" >&6
16328                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16329                 fi
16330         done
16331         CXXFLAGS="$cf_save_CXXFLAGS"
16332
16333 elif test "$GXX" = yes
16334 then
16335         { echo "$as_me:16335: checking for $CXX warning options..." >&5
16336 echo "$as_me: checking for $CXX warning options..." >&6;}
16337         cf_save_CXXFLAGS="$CXXFLAGS"
16338         EXTRA_CXXFLAGS="-W -Wall"
16339         cf_gxx_extra_warnings=""
16340         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16341         case "$GCC_VERSION" in
16342         ([1-2].*)
16343                 ;;
16344         (*)
16345                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16346                 ;;
16347         esac
16348         for cf_opt in \
16349                 Wabi \
16350                 fabi-version=0 \
16351                 Wextra \
16352                 Wignored-qualifiers \
16353                 Wlogical-op \
16354                 Woverloaded-virtual \
16355                 Wsign-promo \
16356                 Wsynth \
16357                 Wold-style-cast \
16358                 Wcast-align \
16359                 Wcast-qual \
16360                 Wpointer-arith \
16361                 Wshadow \
16362                 Wundef $cf_gxx_extra_warnings Wno-unused
16363         do
16364                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16365                 if { (eval echo "$as_me:16365: \"$ac_compile\"") >&5
16366   (eval $ac_compile) 2>&5
16367   ac_status=$?
16368   echo "$as_me:16368: \$? = $ac_status" >&5
16369   (exit $ac_status); }; then
16370                         test -n "$verbose" && echo "$as_me:16370: result: ... -$cf_opt" >&5
16371 echo "${ECHO_T}... -$cf_opt" >&6
16372                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16373                 else
16374                         test -n "$verbose" && echo "$as_me:16374: result: ... no -$cf_opt" >&5
16375 echo "${ECHO_T}... no -$cf_opt" >&6
16376                 fi
16377         done
16378         CXXFLAGS="$cf_save_CXXFLAGS"
16379 fi
16380
16381 rm -rf conftest*
16382 ac_ext=c
16383 ac_cpp='$CPP $CPPFLAGS'
16384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16387 ac_main_return=return
16388
16389         fi
16390 fi
16391
16392 if test "$GCC" = yes
16393 then
16394 cat > conftest.i <<EOF
16395 #ifndef GCC_PRINTF
16396 #define GCC_PRINTF 0
16397 #endif
16398 #ifndef GCC_SCANF
16399 #define GCC_SCANF 0
16400 #endif
16401 #ifndef GCC_NORETURN
16402 #define GCC_NORETURN /* nothing */
16403 #endif
16404 #ifndef GCC_UNUSED
16405 #define GCC_UNUSED /* nothing */
16406 #endif
16407 EOF
16408 if test "$GCC" = yes
16409 then
16410         { echo "$as_me:16410: checking for $CC __attribute__ directives..." >&5
16411 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16412 cat > conftest.$ac_ext <<EOF
16413 #line 16413 "${as_me:-configure}"
16414 #include "confdefs.h"
16415 #include "conftest.h"
16416 #include "conftest.i"
16417 #if     GCC_PRINTF
16418 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16419 #else
16420 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16421 #endif
16422 #if     GCC_SCANF
16423 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16424 #else
16425 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16426 #endif
16427 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16428 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16429 extern void foo(void) GCC_NORETURN;
16430 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16431 EOF
16432         cf_printf_attribute=no
16433         cf_scanf_attribute=no
16434         for cf_attribute in scanf printf unused noreturn
16435         do
16436
16437 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16438
16439                 cf_directive="__attribute__(($cf_attribute))"
16440                 echo "checking for $CC $cf_directive" 1>&5
16441
16442                 case $cf_attribute in
16443                 (printf)
16444                         cf_printf_attribute=yes
16445                         cat >conftest.h <<EOF
16446 #define GCC_$cf_ATTRIBUTE 1
16447 EOF
16448                         ;;
16449                 (scanf)
16450                         cf_scanf_attribute=yes
16451                         cat >conftest.h <<EOF
16452 #define GCC_$cf_ATTRIBUTE 1
16453 EOF
16454                         ;;
16455                 (*)
16456                         cat >conftest.h <<EOF
16457 #define GCC_$cf_ATTRIBUTE $cf_directive
16458 EOF
16459                         ;;
16460                 esac
16461
16462                 if { (eval echo "$as_me:16462: \"$ac_compile\"") >&5
16463   (eval $ac_compile) 2>&5
16464   ac_status=$?
16465   echo "$as_me:16465: \$? = $ac_status" >&5
16466   (exit $ac_status); }; then
16467                         test -n "$verbose" && echo "$as_me:16467: result: ... $cf_attribute" >&5
16468 echo "${ECHO_T}... $cf_attribute" >&6
16469                         cat conftest.h >>confdefs.h
16470                         case $cf_attribute in
16471                         (noreturn)
16472
16473 cat >>confdefs.h <<EOF
16474 #define GCC_NORETURN $cf_directive
16475 EOF
16476
16477                                 ;;
16478                         (printf)
16479                                 cf_value='/* nothing */'
16480                                 if test "$cf_printf_attribute" != no ; then
16481                                         cf_value='__attribute__((format(printf,fmt,var)))'
16482
16483 cat >>confdefs.h <<\EOF
16484 #define GCC_PRINTF 1
16485 EOF
16486
16487                                 fi
16488
16489 cat >>confdefs.h <<EOF
16490 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16491 EOF
16492
16493                                 ;;
16494                         (scanf)
16495                                 cf_value='/* nothing */'
16496                                 if test "$cf_scanf_attribute" != no ; then
16497                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16498
16499 cat >>confdefs.h <<\EOF
16500 #define GCC_SCANF 1
16501 EOF
16502
16503                                 fi
16504
16505 cat >>confdefs.h <<EOF
16506 #define GCC_SCANFLIKE(fmt,var) $cf_value
16507 EOF
16508
16509                                 ;;
16510                         (unused)
16511
16512 cat >>confdefs.h <<EOF
16513 #define GCC_UNUSED $cf_directive
16514 EOF
16515
16516                                 ;;
16517                         esac
16518                 fi
16519         done
16520 else
16521         fgrep define conftest.i >>confdefs.h
16522 fi
16523 rm -rf conftest*
16524 fi
16525
16526 echo "$as_me:16526: checking if you want to work around bogus compiler/loader warnings" >&5
16527 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16528
16529 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16530 if test "${enable_string_hacks+set}" = set; then
16531   enableval="$enable_string_hacks"
16532   with_string_hacks=$enableval
16533 else
16534   with_string_hacks=no
16535 fi;
16536 echo "$as_me:16536: result: $with_string_hacks" >&5
16537 echo "${ECHO_T}$with_string_hacks" >&6
16538
16539 if test "x$with_string_hacks" = "xyes"; then
16540
16541 cat >>confdefs.h <<\EOF
16542 #define USE_STRING_HACKS 1
16543 EOF
16544
16545         { echo "$as_me:16545: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16546 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16547         echo "$as_me:16547: checking for strlcat" >&5
16548 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16549 if test "${ac_cv_func_strlcat+set}" = set; then
16550   echo $ECHO_N "(cached) $ECHO_C" >&6
16551 else
16552   cat >conftest.$ac_ext <<_ACEOF
16553 #line 16553 "configure"
16554 #include "confdefs.h"
16555 #define strlcat autoconf_temporary
16556 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16557 #undef strlcat
16558
16559 #ifdef __cplusplus
16560 extern "C"
16561 #endif
16562
16563 /* We use char because int might match the return type of a gcc2
16564    builtin and then its argument prototype would still apply.  */
16565 char strlcat (void);
16566
16567 int
16568 main (void)
16569 {
16570
16571 /* The GNU C library defines stubs for functions which it implements
16572     to always fail with ENOSYS.  Some functions are actually named
16573     something starting with __ and the normal name is an alias.  */
16574 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16575 #error found stub for strlcat
16576 #endif
16577
16578         return strlcat ();
16579   ;
16580   return 0;
16581 }
16582 _ACEOF
16583 rm -f conftest.$ac_objext conftest$ac_exeext
16584 if { (eval echo "$as_me:16584: \"$ac_link\"") >&5
16585   (eval $ac_link) 2>&5
16586   ac_status=$?
16587   echo "$as_me:16587: \$? = $ac_status" >&5
16588   (exit $ac_status); } &&
16589          { ac_try='test -s conftest$ac_exeext'
16590   { (eval echo "$as_me:16590: \"$ac_try\"") >&5
16591   (eval $ac_try) 2>&5
16592   ac_status=$?
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); }; }; then
16595   ac_cv_func_strlcat=yes
16596 else
16597   echo "$as_me: failed program was:" >&5
16598 cat conftest.$ac_ext >&5
16599 ac_cv_func_strlcat=no
16600 fi
16601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16602 fi
16603 echo "$as_me:16603: result: $ac_cv_func_strlcat" >&5
16604 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16605 if test $ac_cv_func_strlcat = yes; then
16606
16607 cat >>confdefs.h <<\EOF
16608 #define HAVE_STRLCAT 1
16609 EOF
16610
16611 else
16612
16613                 echo "$as_me:16613: checking for strlcat in -lbsd" >&5
16614 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16615 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618   ac_check_lib_save_LIBS=$LIBS
16619 LIBS="-lbsd  $LIBS"
16620 cat >conftest.$ac_ext <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623
16624 /* Override any gcc2 internal prototype to avoid an error.  */
16625 #ifdef __cplusplus
16626 extern "C"
16627 #endif
16628 /* We use char because int might match the return type of a gcc2
16629    builtin and then its argument prototype would still apply.  */
16630 char strlcat ();
16631 int
16632 main (void)
16633 {
16634 strlcat ();
16635   ;
16636   return 0;
16637 }
16638 _ACEOF
16639 rm -f conftest.$ac_objext conftest$ac_exeext
16640 if { (eval echo "$as_me:16640: \"$ac_link\"") >&5
16641   (eval $ac_link) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -s conftest$ac_exeext'
16646   { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647   (eval $ac_try) 2>&5
16648   ac_status=$?
16649   echo "$as_me:16649: \$? = $ac_status" >&5
16650   (exit $ac_status); }; }; then
16651   ac_cv_lib_bsd_strlcat=yes
16652 else
16653   echo "$as_me: failed program was:" >&5
16654 cat conftest.$ac_ext >&5
16655 ac_cv_lib_bsd_strlcat=no
16656 fi
16657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16658 LIBS=$ac_check_lib_save_LIBS
16659 fi
16660 echo "$as_me:16660: result: $ac_cv_lib_bsd_strlcat" >&5
16661 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16662 if test $ac_cv_lib_bsd_strlcat = yes; then
16663
16664 cf_add_libs="$LIBS"
16665 # reverse order
16666 cf_add_0lib=
16667 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16668 # filter duplicates
16669 for cf_add_1lib in $cf_add_0lib; do
16670         for cf_add_2lib in $cf_add_libs; do
16671                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16672                         cf_add_1lib=
16673                         break
16674                 fi
16675         done
16676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16677 done
16678 LIBS="$cf_add_libs"
16679
16680 for ac_header in bsd/string.h
16681 do
16682 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16683 echo "$as_me:16683: checking for $ac_header" >&5
16684 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16686   echo $ECHO_N "(cached) $ECHO_C" >&6
16687 else
16688   cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 #include <$ac_header>
16692 _ACEOF
16693 if { (eval echo "$as_me:16693: \"$ac_cpp conftest.$ac_ext\"") >&5
16694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16695   ac_status=$?
16696   egrep -v '^ *\+' conftest.er1 >conftest.err
16697   rm -f conftest.er1
16698   cat conftest.err >&5
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); } >/dev/null; then
16701   if test -s conftest.err; then
16702     ac_cpp_err=$ac_c_preproc_warn_flag
16703   else
16704     ac_cpp_err=
16705   fi
16706 else
16707   ac_cpp_err=yes
16708 fi
16709 if test -z "$ac_cpp_err"; then
16710   eval "$as_ac_Header=yes"
16711 else
16712   echo "$as_me: failed program was:" >&5
16713   cat conftest.$ac_ext >&5
16714   eval "$as_ac_Header=no"
16715 fi
16716 rm -f conftest.err conftest.$ac_ext
16717 fi
16718 echo "$as_me:16718: result: `eval echo '${'$as_ac_Header'}'`" >&5
16719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16721   cat >>confdefs.h <<EOF
16722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16723 EOF
16724
16725 fi
16726 done
16727
16728 cat >>confdefs.h <<\EOF
16729 #define HAVE_STRLCAT 1
16730 EOF
16731
16732 fi
16733
16734 fi
16735
16736 for ac_func in strlcpy snprintf
16737 do
16738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16739 echo "$as_me:16739: checking for $ac_func" >&5
16740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16741 if eval "test \"\${$as_ac_var+set}\" = set"; then
16742   echo $ECHO_N "(cached) $ECHO_C" >&6
16743 else
16744   cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747 #define $ac_func autoconf_temporary
16748 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16749 #undef $ac_func
16750
16751 #ifdef __cplusplus
16752 extern "C"
16753 #endif
16754
16755 /* We use char because int might match the return type of a gcc2
16756    builtin and then its argument prototype would still apply.  */
16757 char $ac_func (void);
16758
16759 int
16760 main (void)
16761 {
16762
16763 /* The GNU C library defines stubs for functions which it implements
16764     to always fail with ENOSYS.  Some functions are actually named
16765     something starting with __ and the normal name is an alias.  */
16766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16767 #error found stub for $ac_func
16768 #endif
16769
16770         return $ac_func ();
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext conftest$ac_exeext
16776 if { (eval echo "$as_me:16776: \"$ac_link\"") >&5
16777   (eval $ac_link) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); } &&
16781          { ac_try='test -s conftest$ac_exeext'
16782   { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783   (eval $ac_try) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); }; }; then
16787   eval "$as_ac_var=yes"
16788 else
16789   echo "$as_me: failed program was:" >&5
16790 cat conftest.$ac_ext >&5
16791 eval "$as_ac_var=no"
16792 fi
16793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16794 fi
16795 echo "$as_me:16795: result: `eval echo '${'$as_ac_var'}'`" >&5
16796 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16797 if test `eval echo '${'$as_ac_var'}'` = yes; then
16798   cat >>confdefs.h <<EOF
16799 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16800 EOF
16801
16802 fi
16803 done
16804
16805 fi
16806
16807 ###     use option --enable-assertions to turn on generation of assertion code
16808 echo "$as_me:16808: checking if you want to enable runtime assertions" >&5
16809 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16810
16811 # Check whether --enable-assertions or --disable-assertions was given.
16812 if test "${enable_assertions+set}" = set; then
16813   enableval="$enable_assertions"
16814   with_assertions=$enableval
16815 else
16816   with_assertions=no
16817 fi;
16818 echo "$as_me:16818: result: $with_assertions" >&5
16819 echo "${ECHO_T}$with_assertions" >&6
16820 if test -n "$GCC"
16821 then
16822         if test "$with_assertions" = no
16823         then
16824                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16825         else
16826
16827         ADAFLAGS="$ADAFLAGS -gnata"
16828
16829         fi
16830 fi
16831
16832 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16833
16834 echo "$as_me:16834: checking if you want to use dmalloc for testing" >&5
16835 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16836
16837 # Check whether --with-dmalloc or --without-dmalloc was given.
16838 if test "${with_dmalloc+set}" = set; then
16839   withval="$with_dmalloc"
16840
16841 cat >>confdefs.h <<EOF
16842 #define USE_DMALLOC 1
16843 EOF
16844
16845         : ${with_cflags:=-g}
16846         : ${with_no_leaks:=yes}
16847          with_dmalloc=yes
16848 else
16849   with_dmalloc=
16850 fi;
16851 echo "$as_me:16851: result: ${with_dmalloc:-no}" >&5
16852 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16853
16854 case .$with_cflags in
16855 (.*-g*)
16856         case .$CFLAGS in
16857         (.*-g*)
16858                 ;;
16859         (*)
16860
16861 cf_fix_cppflags=no
16862 cf_new_cflags=
16863 cf_new_cppflags=
16864 cf_new_extra_cppflags=
16865
16866 for cf_add_cflags in -g
16867 do
16868 case $cf_fix_cppflags in
16869 (no)
16870         case $cf_add_cflags in
16871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16872                 case $cf_add_cflags in
16873                 (-D*)
16874                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16875
16876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16877                                 && test -z "${cf_tst_cflags}" \
16878                                 && cf_fix_cppflags=yes
16879
16880                         if test $cf_fix_cppflags = yes ; then
16881
16882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16884
16885                                 continue
16886                         elif test "${cf_tst_cflags}" = "\"'" ; then
16887
16888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16890
16891                                 continue
16892                         fi
16893                         ;;
16894                 esac
16895                 case "$CPPFLAGS" in
16896                 (*$cf_add_cflags)
16897                         ;;
16898                 (*)
16899                         case $cf_add_cflags in
16900                         (-D*)
16901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16902
16903 CPPFLAGS=`echo "$CPPFLAGS" | \
16904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16906
16907                                 ;;
16908                         esac
16909
16910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16912
16913                         ;;
16914                 esac
16915                 ;;
16916         (*)
16917
16918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16920
16921                 ;;
16922         esac
16923         ;;
16924 (yes)
16925
16926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16928
16929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16930
16931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16932                 && test -z "${cf_tst_cflags}" \
16933                 && cf_fix_cppflags=no
16934         ;;
16935 esac
16936 done
16937
16938 if test -n "$cf_new_cflags" ; then
16939
16940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16941         CFLAGS="${CFLAGS}$cf_new_cflags"
16942
16943 fi
16944
16945 if test -n "$cf_new_cppflags" ; then
16946
16947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16949
16950 fi
16951
16952 if test -n "$cf_new_extra_cppflags" ; then
16953
16954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16956
16957 fi
16958
16959                 ;;
16960         esac
16961         ;;
16962 esac
16963
16964 if test "$with_dmalloc" = yes ; then
16965         echo "$as_me:16965: checking for dmalloc.h" >&5
16966 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16967 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16968   echo $ECHO_N "(cached) $ECHO_C" >&6
16969 else
16970   cat >conftest.$ac_ext <<_ACEOF
16971 #line 16971 "configure"
16972 #include "confdefs.h"
16973 #include <dmalloc.h>
16974 _ACEOF
16975 if { (eval echo "$as_me:16975: \"$ac_cpp conftest.$ac_ext\"") >&5
16976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16977   ac_status=$?
16978   egrep -v '^ *\+' conftest.er1 >conftest.err
16979   rm -f conftest.er1
16980   cat conftest.err >&5
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit $ac_status); } >/dev/null; then
16983   if test -s conftest.err; then
16984     ac_cpp_err=$ac_c_preproc_warn_flag
16985   else
16986     ac_cpp_err=
16987   fi
16988 else
16989   ac_cpp_err=yes
16990 fi
16991 if test -z "$ac_cpp_err"; then
16992   ac_cv_header_dmalloc_h=yes
16993 else
16994   echo "$as_me: failed program was:" >&5
16995   cat conftest.$ac_ext >&5
16996   ac_cv_header_dmalloc_h=no
16997 fi
16998 rm -f conftest.err conftest.$ac_ext
16999 fi
17000 echo "$as_me:17000: result: $ac_cv_header_dmalloc_h" >&5
17001 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17002 if test $ac_cv_header_dmalloc_h = yes; then
17003
17004 echo "$as_me:17004: checking for dmalloc_debug in -ldmalloc" >&5
17005 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17006 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17007   echo $ECHO_N "(cached) $ECHO_C" >&6
17008 else
17009   ac_check_lib_save_LIBS=$LIBS
17010 LIBS="-ldmalloc  $LIBS"
17011 cat >conftest.$ac_ext <<_ACEOF
17012 #line 17012 "configure"
17013 #include "confdefs.h"
17014
17015 /* Override any gcc2 internal prototype to avoid an error.  */
17016 #ifdef __cplusplus
17017 extern "C"
17018 #endif
17019 /* We use char because int might match the return type of a gcc2
17020    builtin and then its argument prototype would still apply.  */
17021 char dmalloc_debug ();
17022 int
17023 main (void)
17024 {
17025 dmalloc_debug ();
17026   ;
17027   return 0;
17028 }
17029 _ACEOF
17030 rm -f conftest.$ac_objext conftest$ac_exeext
17031 if { (eval echo "$as_me:17031: \"$ac_link\"") >&5
17032   (eval $ac_link) 2>&5
17033   ac_status=$?
17034   echo "$as_me:17034: \$? = $ac_status" >&5
17035   (exit $ac_status); } &&
17036          { ac_try='test -s conftest$ac_exeext'
17037   { (eval echo "$as_me:17037: \"$ac_try\"") >&5
17038   (eval $ac_try) 2>&5
17039   ac_status=$?
17040   echo "$as_me:17040: \$? = $ac_status" >&5
17041   (exit $ac_status); }; }; then
17042   ac_cv_lib_dmalloc_dmalloc_debug=yes
17043 else
17044   echo "$as_me: failed program was:" >&5
17045 cat conftest.$ac_ext >&5
17046 ac_cv_lib_dmalloc_dmalloc_debug=no
17047 fi
17048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17049 LIBS=$ac_check_lib_save_LIBS
17050 fi
17051 echo "$as_me:17051: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17052 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17053 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17054   cat >>confdefs.h <<EOF
17055 #define HAVE_LIBDMALLOC 1
17056 EOF
17057
17058   LIBS="-ldmalloc $LIBS"
17059
17060 fi
17061
17062 fi
17063
17064 fi
17065
17066 echo "$as_me:17066: checking if you want to use dbmalloc for testing" >&5
17067 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17068
17069 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17070 if test "${with_dbmalloc+set}" = set; then
17071   withval="$with_dbmalloc"
17072
17073 cat >>confdefs.h <<EOF
17074 #define USE_DBMALLOC 1
17075 EOF
17076
17077         : ${with_cflags:=-g}
17078         : ${with_no_leaks:=yes}
17079          with_dbmalloc=yes
17080 else
17081   with_dbmalloc=
17082 fi;
17083 echo "$as_me:17083: result: ${with_dbmalloc:-no}" >&5
17084 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17085
17086 case .$with_cflags in
17087 (.*-g*)
17088         case .$CFLAGS in
17089         (.*-g*)
17090                 ;;
17091         (*)
17092
17093 cf_fix_cppflags=no
17094 cf_new_cflags=
17095 cf_new_cppflags=
17096 cf_new_extra_cppflags=
17097
17098 for cf_add_cflags in -g
17099 do
17100 case $cf_fix_cppflags in
17101 (no)
17102         case $cf_add_cflags in
17103         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17104                 case $cf_add_cflags in
17105                 (-D*)
17106                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17107
17108                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17109                                 && test -z "${cf_tst_cflags}" \
17110                                 && cf_fix_cppflags=yes
17111
17112                         if test $cf_fix_cppflags = yes ; then
17113
17114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17116
17117                                 continue
17118                         elif test "${cf_tst_cflags}" = "\"'" ; then
17119
17120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17122
17123                                 continue
17124                         fi
17125                         ;;
17126                 esac
17127                 case "$CPPFLAGS" in
17128                 (*$cf_add_cflags)
17129                         ;;
17130                 (*)
17131                         case $cf_add_cflags in
17132                         (-D*)
17133                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17134
17135 CPPFLAGS=`echo "$CPPFLAGS" | \
17136         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17137                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17138
17139                                 ;;
17140                         esac
17141
17142         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17143         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17144
17145                         ;;
17146                 esac
17147                 ;;
17148         (*)
17149
17150         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17151         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17152
17153                 ;;
17154         esac
17155         ;;
17156 (yes)
17157
17158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17160
17161         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17162
17163         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17164                 && test -z "${cf_tst_cflags}" \
17165                 && cf_fix_cppflags=no
17166         ;;
17167 esac
17168 done
17169
17170 if test -n "$cf_new_cflags" ; then
17171
17172         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17173         CFLAGS="${CFLAGS}$cf_new_cflags"
17174
17175 fi
17176
17177 if test -n "$cf_new_cppflags" ; then
17178
17179         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17180         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17181
17182 fi
17183
17184 if test -n "$cf_new_extra_cppflags" ; then
17185
17186         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17187         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17188
17189 fi
17190
17191                 ;;
17192         esac
17193         ;;
17194 esac
17195
17196 if test "$with_dbmalloc" = yes ; then
17197         echo "$as_me:17197: checking for dbmalloc.h" >&5
17198 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17199 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17200   echo $ECHO_N "(cached) $ECHO_C" >&6
17201 else
17202   cat >conftest.$ac_ext <<_ACEOF
17203 #line 17203 "configure"
17204 #include "confdefs.h"
17205 #include <dbmalloc.h>
17206 _ACEOF
17207 if { (eval echo "$as_me:17207: \"$ac_cpp conftest.$ac_ext\"") >&5
17208   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17209   ac_status=$?
17210   egrep -v '^ *\+' conftest.er1 >conftest.err
17211   rm -f conftest.er1
17212   cat conftest.err >&5
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); } >/dev/null; then
17215   if test -s conftest.err; then
17216     ac_cpp_err=$ac_c_preproc_warn_flag
17217   else
17218     ac_cpp_err=
17219   fi
17220 else
17221   ac_cpp_err=yes
17222 fi
17223 if test -z "$ac_cpp_err"; then
17224   ac_cv_header_dbmalloc_h=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227   cat conftest.$ac_ext >&5
17228   ac_cv_header_dbmalloc_h=no
17229 fi
17230 rm -f conftest.err conftest.$ac_ext
17231 fi
17232 echo "$as_me:17232: result: $ac_cv_header_dbmalloc_h" >&5
17233 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17234 if test $ac_cv_header_dbmalloc_h = yes; then
17235
17236 echo "$as_me:17236: checking for debug_malloc in -ldbmalloc" >&5
17237 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17238 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17239   echo $ECHO_N "(cached) $ECHO_C" >&6
17240 else
17241   ac_check_lib_save_LIBS=$LIBS
17242 LIBS="-ldbmalloc  $LIBS"
17243 cat >conftest.$ac_ext <<_ACEOF
17244 #line 17244 "configure"
17245 #include "confdefs.h"
17246
17247 /* Override any gcc2 internal prototype to avoid an error.  */
17248 #ifdef __cplusplus
17249 extern "C"
17250 #endif
17251 /* We use char because int might match the return type of a gcc2
17252    builtin and then its argument prototype would still apply.  */
17253 char debug_malloc ();
17254 int
17255 main (void)
17256 {
17257 debug_malloc ();
17258   ;
17259   return 0;
17260 }
17261 _ACEOF
17262 rm -f conftest.$ac_objext conftest$ac_exeext
17263 if { (eval echo "$as_me:17263: \"$ac_link\"") >&5
17264   (eval $ac_link) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); } &&
17268          { ac_try='test -s conftest$ac_exeext'
17269   { (eval echo "$as_me:17269: \"$ac_try\"") >&5
17270   (eval $ac_try) 2>&5
17271   ac_status=$?
17272   echo "$as_me:17272: \$? = $ac_status" >&5
17273   (exit $ac_status); }; }; then
17274   ac_cv_lib_dbmalloc_debug_malloc=yes
17275 else
17276   echo "$as_me: failed program was:" >&5
17277 cat conftest.$ac_ext >&5
17278 ac_cv_lib_dbmalloc_debug_malloc=no
17279 fi
17280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17281 LIBS=$ac_check_lib_save_LIBS
17282 fi
17283 echo "$as_me:17283: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17284 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17285 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17286   cat >>confdefs.h <<EOF
17287 #define HAVE_LIBDBMALLOC 1
17288 EOF
17289
17290   LIBS="-ldbmalloc $LIBS"
17291
17292 fi
17293
17294 fi
17295
17296 fi
17297
17298 echo "$as_me:17298: checking if you want to use valgrind for testing" >&5
17299 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17300
17301 # Check whether --with-valgrind or --without-valgrind was given.
17302 if test "${with_valgrind+set}" = set; then
17303   withval="$with_valgrind"
17304
17305 cat >>confdefs.h <<EOF
17306 #define USE_VALGRIND 1
17307 EOF
17308
17309         : ${with_cflags:=-g}
17310         : ${with_no_leaks:=yes}
17311          with_valgrind=yes
17312 else
17313   with_valgrind=
17314 fi;
17315 echo "$as_me:17315: result: ${with_valgrind:-no}" >&5
17316 echo "${ECHO_T}${with_valgrind:-no}" >&6
17317
17318 case .$with_cflags in
17319 (.*-g*)
17320         case .$CFLAGS in
17321         (.*-g*)
17322                 ;;
17323         (*)
17324
17325 cf_fix_cppflags=no
17326 cf_new_cflags=
17327 cf_new_cppflags=
17328 cf_new_extra_cppflags=
17329
17330 for cf_add_cflags in -g
17331 do
17332 case $cf_fix_cppflags in
17333 (no)
17334         case $cf_add_cflags in
17335         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17336                 case $cf_add_cflags in
17337                 (-D*)
17338                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17339
17340                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17341                                 && test -z "${cf_tst_cflags}" \
17342                                 && cf_fix_cppflags=yes
17343
17344                         if test $cf_fix_cppflags = yes ; then
17345
17346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17348
17349                                 continue
17350                         elif test "${cf_tst_cflags}" = "\"'" ; then
17351
17352         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17353         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17354
17355                                 continue
17356                         fi
17357                         ;;
17358                 esac
17359                 case "$CPPFLAGS" in
17360                 (*$cf_add_cflags)
17361                         ;;
17362                 (*)
17363                         case $cf_add_cflags in
17364                         (-D*)
17365                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17366
17367 CPPFLAGS=`echo "$CPPFLAGS" | \
17368         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17369                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17370
17371                                 ;;
17372                         esac
17373
17374         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17375         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17376
17377                         ;;
17378                 esac
17379                 ;;
17380         (*)
17381
17382         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17383         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17384
17385                 ;;
17386         esac
17387         ;;
17388 (yes)
17389
17390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17392
17393         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17394
17395         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17396                 && test -z "${cf_tst_cflags}" \
17397                 && cf_fix_cppflags=no
17398         ;;
17399 esac
17400 done
17401
17402 if test -n "$cf_new_cflags" ; then
17403
17404         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17405         CFLAGS="${CFLAGS}$cf_new_cflags"
17406
17407 fi
17408
17409 if test -n "$cf_new_cppflags" ; then
17410
17411         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17412         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17413
17414 fi
17415
17416 if test -n "$cf_new_extra_cppflags" ; then
17417
17418         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17419         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17420
17421 fi
17422
17423                 ;;
17424         esac
17425         ;;
17426 esac
17427
17428 echo "$as_me:17428: checking if you want to perform memory-leak testing" >&5
17429 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17430
17431 # Check whether --enable-leaks or --disable-leaks was given.
17432 if test "${enable_leaks+set}" = set; then
17433   enableval="$enable_leaks"
17434   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17435 else
17436   : ${with_no_leaks:=no}
17437 fi;
17438 echo "$as_me:17438: result: $with_no_leaks" >&5
17439 echo "${ECHO_T}$with_no_leaks" >&6
17440
17441 if test "$with_no_leaks" = yes ; then
17442
17443 cat >>confdefs.h <<\EOF
17444 #define NO_LEAKS 1
17445 EOF
17446
17447 cat >>confdefs.h <<\EOF
17448 #define YY_NO_LEAKS 1
17449 EOF
17450
17451 fi
17452
17453 cat >>confdefs.h <<\EOF
17454 #define HAVE_NC_ALLOC_H 1
17455 EOF
17456
17457 ###     use option --enable-expanded to generate certain macros as functions
17458
17459 # Check whether --enable-expanded or --disable-expanded was given.
17460 if test "${enable_expanded+set}" = set; then
17461   enableval="$enable_expanded"
17462   test "x$enableval" = xyes &&
17463 cat >>confdefs.h <<\EOF
17464 #define NCURSES_EXPANDED 1
17465 EOF
17466
17467 fi;
17468
17469 ###     use option --disable-macros to suppress macros in favor of functions
17470
17471 # Check whether --enable-macros or --disable-macros was given.
17472 if test "${enable_macros+set}" = set; then
17473   enableval="$enable_macros"
17474   test "$enableval" = no &&
17475 cat >>confdefs.h <<\EOF
17476 #define NCURSES_NOMACROS 1
17477 EOF
17478
17479 fi;
17480
17481 # Normally we only add trace() to the debug-library.  Allow this to be
17482 # extended to all models of the ncurses library:
17483 cf_all_traces=no
17484 case "$CFLAGS $CPPFLAGS" in
17485 (*-DTRACE*)
17486         cf_all_traces=yes
17487         ;;
17488 esac
17489
17490 echo "$as_me:17490: checking whether to add trace feature to all models" >&5
17491 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17492
17493 # Check whether --with-trace or --without-trace was given.
17494 if test "${with_trace+set}" = set; then
17495   withval="$with_trace"
17496   cf_with_trace=$withval
17497 else
17498   cf_with_trace=$cf_all_traces
17499 fi;
17500 echo "$as_me:17500: result: $cf_with_trace" >&5
17501 echo "${ECHO_T}$cf_with_trace" >&6
17502
17503 if test "x$cf_with_trace" = xyes ; then
17504         LIB_TRACING=all
17505         ADA_TRACE=TRUE
17506
17507 cf_fix_cppflags=no
17508 cf_new_cflags=
17509 cf_new_cppflags=
17510 cf_new_extra_cppflags=
17511
17512 for cf_add_cflags in -DTRACE
17513 do
17514 case $cf_fix_cppflags in
17515 (no)
17516         case $cf_add_cflags in
17517         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17518                 case $cf_add_cflags in
17519                 (-D*)
17520                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17521
17522                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17523                                 && test -z "${cf_tst_cflags}" \
17524                                 && cf_fix_cppflags=yes
17525
17526                         if test $cf_fix_cppflags = yes ; then
17527
17528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17530
17531                                 continue
17532                         elif test "${cf_tst_cflags}" = "\"'" ; then
17533
17534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17536
17537                                 continue
17538                         fi
17539                         ;;
17540                 esac
17541                 case "$CPPFLAGS" in
17542                 (*$cf_add_cflags)
17543                         ;;
17544                 (*)
17545                         case $cf_add_cflags in
17546                         (-D*)
17547                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17548
17549 CPPFLAGS=`echo "$CPPFLAGS" | \
17550         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17551                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17552
17553                                 ;;
17554                         esac
17555
17556         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17557         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17558
17559                         ;;
17560                 esac
17561                 ;;
17562         (*)
17563
17564         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17565         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17566
17567                 ;;
17568         esac
17569         ;;
17570 (yes)
17571
17572         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17573         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17574
17575         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17576
17577         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17578                 && test -z "${cf_tst_cflags}" \
17579                 && cf_fix_cppflags=no
17580         ;;
17581 esac
17582 done
17583
17584 if test -n "$cf_new_cflags" ; then
17585
17586         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17587         CFLAGS="${CFLAGS}$cf_new_cflags"
17588
17589 fi
17590
17591 if test -n "$cf_new_cppflags" ; then
17592
17593         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17594         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17595
17596 fi
17597
17598 if test -n "$cf_new_extra_cppflags" ; then
17599
17600         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17601         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17602
17603 fi
17604
17605 cat >>confdefs.h <<\EOF
17606 #define HAVE__TRACEF 1
17607 EOF
17608
17609 else
17610         LIB_TRACING=DEBUG
17611         ADA_TRACE=FALSE
17612 fi
17613
17614 echo "$as_me:17614: checking if we want to use GNAT projects" >&5
17615 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17616
17617 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17618 if test "${enable_gnat_projects+set}" = set; then
17619   enableval="$enable_gnat_projects"
17620   test "$enableval" != no && enableval=yes
17621         if test "$enableval" != "yes" ; then
17622     enable_gnat_projects=no
17623         else
17624                 enable_gnat_projects=yes
17625         fi
17626 else
17627   enableval=yes
17628         enable_gnat_projects=yes
17629
17630 fi;
17631 echo "$as_me:17631: result: $enable_gnat_projects" >&5
17632 echo "${ECHO_T}$enable_gnat_projects" >&6
17633
17634 ###     Checks for libraries.
17635 case $cf_cv_system_name in
17636 (*mingw32*|*mingw64*)
17637         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17638         # Note: WINVER may be a problem with Windows 10
17639         ;;
17640 (*)
17641 echo "$as_me:17641: checking for gettimeofday" >&5
17642 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17643 if test "${ac_cv_func_gettimeofday+set}" = set; then
17644   echo $ECHO_N "(cached) $ECHO_C" >&6
17645 else
17646   cat >conftest.$ac_ext <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649 #define gettimeofday autoconf_temporary
17650 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17651 #undef gettimeofday
17652
17653 #ifdef __cplusplus
17654 extern "C"
17655 #endif
17656
17657 /* We use char because int might match the return type of a gcc2
17658    builtin and then its argument prototype would still apply.  */
17659 char gettimeofday (void);
17660
17661 int
17662 main (void)
17663 {
17664
17665 /* The GNU C library defines stubs for functions which it implements
17666     to always fail with ENOSYS.  Some functions are actually named
17667     something starting with __ and the normal name is an alias.  */
17668 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17669 #error found stub for gettimeofday
17670 #endif
17671
17672         return gettimeofday ();
17673   ;
17674   return 0;
17675 }
17676 _ACEOF
17677 rm -f conftest.$ac_objext conftest$ac_exeext
17678 if { (eval echo "$as_me:17678: \"$ac_link\"") >&5
17679   (eval $ac_link) 2>&5
17680   ac_status=$?
17681   echo "$as_me:17681: \$? = $ac_status" >&5
17682   (exit $ac_status); } &&
17683          { ac_try='test -s conftest$ac_exeext'
17684   { (eval echo "$as_me:17684: \"$ac_try\"") >&5
17685   (eval $ac_try) 2>&5
17686   ac_status=$?
17687   echo "$as_me:17687: \$? = $ac_status" >&5
17688   (exit $ac_status); }; }; then
17689   ac_cv_func_gettimeofday=yes
17690 else
17691   echo "$as_me: failed program was:" >&5
17692 cat conftest.$ac_ext >&5
17693 ac_cv_func_gettimeofday=no
17694 fi
17695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17696 fi
17697 echo "$as_me:17697: result: $ac_cv_func_gettimeofday" >&5
17698 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17699 if test $ac_cv_func_gettimeofday = yes; then
17700
17701 cat >>confdefs.h <<\EOF
17702 #define HAVE_GETTIMEOFDAY 1
17703 EOF
17704
17705 else
17706
17707 echo "$as_me:17707: checking for gettimeofday in -lbsd" >&5
17708 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17709 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   ac_check_lib_save_LIBS=$LIBS
17713 LIBS="-lbsd  $LIBS"
17714 cat >conftest.$ac_ext <<_ACEOF
17715 #line 17715 "configure"
17716 #include "confdefs.h"
17717
17718 /* Override any gcc2 internal prototype to avoid an error.  */
17719 #ifdef __cplusplus
17720 extern "C"
17721 #endif
17722 /* We use char because int might match the return type of a gcc2
17723    builtin and then its argument prototype would still apply.  */
17724 char gettimeofday ();
17725 int
17726 main (void)
17727 {
17728 gettimeofday ();
17729   ;
17730   return 0;
17731 }
17732 _ACEOF
17733 rm -f conftest.$ac_objext conftest$ac_exeext
17734 if { (eval echo "$as_me:17734: \"$ac_link\"") >&5
17735   (eval $ac_link) 2>&5
17736   ac_status=$?
17737   echo "$as_me:17737: \$? = $ac_status" >&5
17738   (exit $ac_status); } &&
17739          { ac_try='test -s conftest$ac_exeext'
17740   { (eval echo "$as_me:17740: \"$ac_try\"") >&5
17741   (eval $ac_try) 2>&5
17742   ac_status=$?
17743   echo "$as_me:17743: \$? = $ac_status" >&5
17744   (exit $ac_status); }; }; then
17745   ac_cv_lib_bsd_gettimeofday=yes
17746 else
17747   echo "$as_me: failed program was:" >&5
17748 cat conftest.$ac_ext >&5
17749 ac_cv_lib_bsd_gettimeofday=no
17750 fi
17751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17752 LIBS=$ac_check_lib_save_LIBS
17753 fi
17754 echo "$as_me:17754: result: $ac_cv_lib_bsd_gettimeofday" >&5
17755 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17756 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17757
17758 cat >>confdefs.h <<\EOF
17759 #define HAVE_GETTIMEOFDAY 1
17760 EOF
17761
17762 cf_add_libs="$LIBS"
17763 # reverse order
17764 cf_add_0lib=
17765 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17766 # filter duplicates
17767 for cf_add_1lib in $cf_add_0lib; do
17768         for cf_add_2lib in $cf_add_libs; do
17769                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17770                         cf_add_1lib=
17771                         break
17772                 fi
17773         done
17774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17775 done
17776 LIBS="$cf_add_libs"
17777
17778 fi
17779
17780 fi
17781         ;;
17782 esac
17783
17784 echo "$as_me:17784: checking if -lm needed for math functions" >&5
17785 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17786 if test "${cf_cv_need_libm+set}" = set; then
17787   echo $ECHO_N "(cached) $ECHO_C" >&6
17788 else
17789
17790         cat >conftest.$ac_ext <<_ACEOF
17791 #line 17791 "configure"
17792 #include "confdefs.h"
17793
17794         #include <stdio.h>
17795         #include <stdlib.h>
17796         #include <math.h>
17797
17798 int
17799 main (void)
17800 {
17801 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17802   ;
17803   return 0;
17804 }
17805 _ACEOF
17806 rm -f conftest.$ac_objext conftest$ac_exeext
17807 if { (eval echo "$as_me:17807: \"$ac_link\"") >&5
17808   (eval $ac_link) 2>&5
17809   ac_status=$?
17810   echo "$as_me:17810: \$? = $ac_status" >&5
17811   (exit $ac_status); } &&
17812          { ac_try='test -s conftest$ac_exeext'
17813   { (eval echo "$as_me:17813: \"$ac_try\"") >&5
17814   (eval $ac_try) 2>&5
17815   ac_status=$?
17816   echo "$as_me:17816: \$? = $ac_status" >&5
17817   (exit $ac_status); }; }; then
17818   cf_cv_need_libm=no
17819 else
17820   echo "$as_me: failed program was:" >&5
17821 cat conftest.$ac_ext >&5
17822 cf_cv_need_libm=yes
17823 fi
17824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17825 fi
17826 echo "$as_me:17826: result: $cf_cv_need_libm" >&5
17827 echo "${ECHO_T}$cf_cv_need_libm" >&6
17828 if test "$cf_cv_need_libm" = yes
17829 then
17830 MATH_LIB=-lm
17831 fi
17832
17833 ###     Checks for header files.
17834 echo "$as_me:17834: checking for ANSI C header files" >&5
17835 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17836 if test "${ac_cv_header_stdc+set}" = set; then
17837   echo $ECHO_N "(cached) $ECHO_C" >&6
17838 else
17839   cat >conftest.$ac_ext <<_ACEOF
17840 #line 17840 "configure"
17841 #include "confdefs.h"
17842 #include <stdlib.h>
17843 #include <stdarg.h>
17844 #include <string.h>
17845 #include <float.h>
17846
17847 _ACEOF
17848 if { (eval echo "$as_me:17848: \"$ac_cpp conftest.$ac_ext\"") >&5
17849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17850   ac_status=$?
17851   egrep -v '^ *\+' conftest.er1 >conftest.err
17852   rm -f conftest.er1
17853   cat conftest.err >&5
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit $ac_status); } >/dev/null; then
17856   if test -s conftest.err; then
17857     ac_cpp_err=$ac_c_preproc_warn_flag
17858   else
17859     ac_cpp_err=
17860   fi
17861 else
17862   ac_cpp_err=yes
17863 fi
17864 if test -z "$ac_cpp_err"; then
17865   ac_cv_header_stdc=yes
17866 else
17867   echo "$as_me: failed program was:" >&5
17868   cat conftest.$ac_ext >&5
17869   ac_cv_header_stdc=no
17870 fi
17871 rm -f conftest.err conftest.$ac_ext
17872
17873 if test $ac_cv_header_stdc = yes; then
17874   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17875   cat >conftest.$ac_ext <<_ACEOF
17876 #line 17876 "configure"
17877 #include "confdefs.h"
17878 #include <string.h>
17879
17880 _ACEOF
17881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17882   egrep "memchr" >/dev/null 2>&1; then
17883   :
17884 else
17885   ac_cv_header_stdc=no
17886 fi
17887 rm -rf conftest*
17888
17889 fi
17890
17891 if test $ac_cv_header_stdc = yes; then
17892   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17893   cat >conftest.$ac_ext <<_ACEOF
17894 #line 17894 "configure"
17895 #include "confdefs.h"
17896 #include <stdlib.h>
17897
17898 _ACEOF
17899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17900   egrep "free" >/dev/null 2>&1; then
17901   :
17902 else
17903   ac_cv_header_stdc=no
17904 fi
17905 rm -rf conftest*
17906
17907 fi
17908
17909 if test $ac_cv_header_stdc = yes; then
17910   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17911   if test "$cross_compiling" = yes; then
17912   :
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 #line 17915 "configure"
17916 #include "confdefs.h"
17917 #include <ctype.h>
17918 #if ((' ' & 0x0FF) == 0x020)
17919 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17920 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17921 #else
17922 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17923                      || ('j' <= (c) && (c) <= 'r') \
17924                      || ('s' <= (c) && (c) <= 'z'))
17925 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17926 #endif
17927
17928 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17929 int
17930 main (void)
17931 {
17932   int i;
17933   for (i = 0; i < 256; i++)
17934     if (XOR (islower (i), ISLOWER (i))
17935         || toupper (i) != TOUPPER (i))
17936       $ac_main_return(2);
17937   $ac_main_return (0);
17938 }
17939 _ACEOF
17940 rm -f conftest$ac_exeext
17941 if { (eval echo "$as_me:17941: \"$ac_link\"") >&5
17942   (eval $ac_link) 2>&5
17943   ac_status=$?
17944   echo "$as_me:17944: \$? = $ac_status" >&5
17945   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17946   { (eval echo "$as_me:17946: \"$ac_try\"") >&5
17947   (eval $ac_try) 2>&5
17948   ac_status=$?
17949   echo "$as_me:17949: \$? = $ac_status" >&5
17950   (exit $ac_status); }; }; then
17951   :
17952 else
17953   echo "$as_me: program exited with status $ac_status" >&5
17954 echo "$as_me: failed program was:" >&5
17955 cat conftest.$ac_ext >&5
17956 ac_cv_header_stdc=no
17957 fi
17958 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17959 fi
17960 fi
17961 fi
17962 echo "$as_me:17962: result: $ac_cv_header_stdc" >&5
17963 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17964 if test $ac_cv_header_stdc = yes; then
17965
17966 cat >>confdefs.h <<\EOF
17967 #define STDC_HEADERS 1
17968 EOF
17969
17970 fi
17971
17972 ac_header_dirent=no
17973 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17974   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17975 echo "$as_me:17975: checking for $ac_hdr that defines DIR" >&5
17976 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17978   echo $ECHO_N "(cached) $ECHO_C" >&6
17979 else
17980   cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983 #include <sys/types.h>
17984 #include <$ac_hdr>
17985
17986 int
17987 main (void)
17988 {
17989 if ((DIR *) 0)
17990 return 0;
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext
17996 if { (eval echo "$as_me:17996: \"$ac_compile\"") >&5
17997   (eval $ac_compile) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest.$ac_objext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   eval "$as_ac_Header=yes"
18008 else
18009   echo "$as_me: failed program was:" >&5
18010 cat conftest.$ac_ext >&5
18011 eval "$as_ac_Header=no"
18012 fi
18013 rm -f conftest.$ac_objext conftest.$ac_ext
18014 fi
18015 echo "$as_me:18015: result: `eval echo '${'$as_ac_Header'}'`" >&5
18016 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18017 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18018   cat >>confdefs.h <<EOF
18019 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18020 EOF
18021
18022 ac_header_dirent=$ac_hdr; break
18023 fi
18024
18025 done
18026 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18027 if test $ac_header_dirent = dirent.h; then
18028   echo "$as_me:18028: checking for opendir in -ldir" >&5
18029 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18030 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18031   echo $ECHO_N "(cached) $ECHO_C" >&6
18032 else
18033   ac_check_lib_save_LIBS=$LIBS
18034 LIBS="-ldir  $LIBS"
18035 cat >conftest.$ac_ext <<_ACEOF
18036 #line 18036 "configure"
18037 #include "confdefs.h"
18038
18039 /* Override any gcc2 internal prototype to avoid an error.  */
18040 #ifdef __cplusplus
18041 extern "C"
18042 #endif
18043 /* We use char because int might match the return type of a gcc2
18044    builtin and then its argument prototype would still apply.  */
18045 char opendir ();
18046 int
18047 main (void)
18048 {
18049 opendir ();
18050   ;
18051   return 0;
18052 }
18053 _ACEOF
18054 rm -f conftest.$ac_objext conftest$ac_exeext
18055 if { (eval echo "$as_me:18055: \"$ac_link\"") >&5
18056   (eval $ac_link) 2>&5
18057   ac_status=$?
18058   echo "$as_me:18058: \$? = $ac_status" >&5
18059   (exit $ac_status); } &&
18060          { ac_try='test -s conftest$ac_exeext'
18061   { (eval echo "$as_me:18061: \"$ac_try\"") >&5
18062   (eval $ac_try) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit $ac_status); }; }; then
18066   ac_cv_lib_dir_opendir=yes
18067 else
18068   echo "$as_me: failed program was:" >&5
18069 cat conftest.$ac_ext >&5
18070 ac_cv_lib_dir_opendir=no
18071 fi
18072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18073 LIBS=$ac_check_lib_save_LIBS
18074 fi
18075 echo "$as_me:18075: result: $ac_cv_lib_dir_opendir" >&5
18076 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18077 if test $ac_cv_lib_dir_opendir = yes; then
18078   LIBS="$LIBS -ldir"
18079 fi
18080
18081 else
18082   echo "$as_me:18082: checking for opendir in -lx" >&5
18083 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18084 if test "${ac_cv_lib_x_opendir+set}" = set; then
18085   echo $ECHO_N "(cached) $ECHO_C" >&6
18086 else
18087   ac_check_lib_save_LIBS=$LIBS
18088 LIBS="-lx  $LIBS"
18089 cat >conftest.$ac_ext <<_ACEOF
18090 #line 18090 "configure"
18091 #include "confdefs.h"
18092
18093 /* Override any gcc2 internal prototype to avoid an error.  */
18094 #ifdef __cplusplus
18095 extern "C"
18096 #endif
18097 /* We use char because int might match the return type of a gcc2
18098    builtin and then its argument prototype would still apply.  */
18099 char opendir ();
18100 int
18101 main (void)
18102 {
18103 opendir ();
18104   ;
18105   return 0;
18106 }
18107 _ACEOF
18108 rm -f conftest.$ac_objext conftest$ac_exeext
18109 if { (eval echo "$as_me:18109: \"$ac_link\"") >&5
18110   (eval $ac_link) 2>&5
18111   ac_status=$?
18112   echo "$as_me:18112: \$? = $ac_status" >&5
18113   (exit $ac_status); } &&
18114          { ac_try='test -s conftest$ac_exeext'
18115   { (eval echo "$as_me:18115: \"$ac_try\"") >&5
18116   (eval $ac_try) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); }; }; then
18120   ac_cv_lib_x_opendir=yes
18121 else
18122   echo "$as_me: failed program was:" >&5
18123 cat conftest.$ac_ext >&5
18124 ac_cv_lib_x_opendir=no
18125 fi
18126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18127 LIBS=$ac_check_lib_save_LIBS
18128 fi
18129 echo "$as_me:18129: result: $ac_cv_lib_x_opendir" >&5
18130 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18131 if test $ac_cv_lib_x_opendir = yes; then
18132   LIBS="$LIBS -lx"
18133 fi
18134
18135 fi
18136
18137 echo "$as_me:18137: checking whether time.h and sys/time.h may both be included" >&5
18138 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18139 if test "${ac_cv_header_time+set}" = set; then
18140   echo $ECHO_N "(cached) $ECHO_C" >&6
18141 else
18142   cat >conftest.$ac_ext <<_ACEOF
18143 #line 18143 "configure"
18144 #include "confdefs.h"
18145 #include <sys/types.h>
18146 #include <sys/time.h>
18147 #include <time.h>
18148
18149 int
18150 main (void)
18151 {
18152 if ((struct tm *) 0)
18153 return 0;
18154   ;
18155   return 0;
18156 }
18157 _ACEOF
18158 rm -f conftest.$ac_objext
18159 if { (eval echo "$as_me:18159: \"$ac_compile\"") >&5
18160   (eval $ac_compile) 2>&5
18161   ac_status=$?
18162   echo "$as_me:18162: \$? = $ac_status" >&5
18163   (exit $ac_status); } &&
18164          { ac_try='test -s conftest.$ac_objext'
18165   { (eval echo "$as_me:18165: \"$ac_try\"") >&5
18166   (eval $ac_try) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); }; }; then
18170   ac_cv_header_time=yes
18171 else
18172   echo "$as_me: failed program was:" >&5
18173 cat conftest.$ac_ext >&5
18174 ac_cv_header_time=no
18175 fi
18176 rm -f conftest.$ac_objext conftest.$ac_ext
18177 fi
18178 echo "$as_me:18178: result: $ac_cv_header_time" >&5
18179 echo "${ECHO_T}$ac_cv_header_time" >&6
18180 if test $ac_cv_header_time = yes; then
18181
18182 cat >>confdefs.h <<\EOF
18183 #define TIME_WITH_SYS_TIME 1
18184 EOF
18185
18186 fi
18187
18188 cf_regex_func=no
18189
18190 cf_regex_libs="regex re"
18191 case $host_os in
18192 (mingw*)
18193         cf_regex_libs="gnurx $cf_regex_libs"
18194         ;;
18195 esac
18196
18197 echo "$as_me:18197: checking for regcomp" >&5
18198 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18199 if test "${ac_cv_func_regcomp+set}" = set; then
18200   echo $ECHO_N "(cached) $ECHO_C" >&6
18201 else
18202   cat >conftest.$ac_ext <<_ACEOF
18203 #line 18203 "configure"
18204 #include "confdefs.h"
18205 #define regcomp autoconf_temporary
18206 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18207 #undef regcomp
18208
18209 #ifdef __cplusplus
18210 extern "C"
18211 #endif
18212
18213 /* We use char because int might match the return type of a gcc2
18214    builtin and then its argument prototype would still apply.  */
18215 char regcomp (void);
18216
18217 int
18218 main (void)
18219 {
18220
18221 /* The GNU C library defines stubs for functions which it implements
18222     to always fail with ENOSYS.  Some functions are actually named
18223     something starting with __ and the normal name is an alias.  */
18224 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18225 #error found stub for regcomp
18226 #endif
18227
18228         return regcomp ();
18229   ;
18230   return 0;
18231 }
18232 _ACEOF
18233 rm -f conftest.$ac_objext conftest$ac_exeext
18234 if { (eval echo "$as_me:18234: \"$ac_link\"") >&5
18235   (eval $ac_link) 2>&5
18236   ac_status=$?
18237   echo "$as_me:18237: \$? = $ac_status" >&5
18238   (exit $ac_status); } &&
18239          { ac_try='test -s conftest$ac_exeext'
18240   { (eval echo "$as_me:18240: \"$ac_try\"") >&5
18241   (eval $ac_try) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); }; }; then
18245   ac_cv_func_regcomp=yes
18246 else
18247   echo "$as_me: failed program was:" >&5
18248 cat conftest.$ac_ext >&5
18249 ac_cv_func_regcomp=no
18250 fi
18251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18252 fi
18253 echo "$as_me:18253: result: $ac_cv_func_regcomp" >&5
18254 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18255 if test $ac_cv_func_regcomp = yes; then
18256   cf_regex_func=regcomp
18257 else
18258
18259         for cf_regex_lib in $cf_regex_libs
18260         do
18261                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18262 echo "$as_me:18262: checking for regcomp in -l$cf_regex_lib" >&5
18263 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18264 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18265   echo $ECHO_N "(cached) $ECHO_C" >&6
18266 else
18267   ac_check_lib_save_LIBS=$LIBS
18268 LIBS="-l$cf_regex_lib  $LIBS"
18269 cat >conftest.$ac_ext <<_ACEOF
18270 #line 18270 "configure"
18271 #include "confdefs.h"
18272
18273 /* Override any gcc2 internal prototype to avoid an error.  */
18274 #ifdef __cplusplus
18275 extern "C"
18276 #endif
18277 /* We use char because int might match the return type of a gcc2
18278    builtin and then its argument prototype would still apply.  */
18279 char regcomp ();
18280 int
18281 main (void)
18282 {
18283 regcomp ();
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 rm -f conftest.$ac_objext conftest$ac_exeext
18289 if { (eval echo "$as_me:18289: \"$ac_link\"") >&5
18290   (eval $ac_link) 2>&5
18291   ac_status=$?
18292   echo "$as_me:18292: \$? = $ac_status" >&5
18293   (exit $ac_status); } &&
18294          { ac_try='test -s conftest$ac_exeext'
18295   { (eval echo "$as_me:18295: \"$ac_try\"") >&5
18296   (eval $ac_try) 2>&5
18297   ac_status=$?
18298   echo "$as_me:18298: \$? = $ac_status" >&5
18299   (exit $ac_status); }; }; then
18300   eval "$as_ac_Lib=yes"
18301 else
18302   echo "$as_me: failed program was:" >&5
18303 cat conftest.$ac_ext >&5
18304 eval "$as_ac_Lib=no"
18305 fi
18306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18307 LIBS=$ac_check_lib_save_LIBS
18308 fi
18309 echo "$as_me:18309: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18310 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18311 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18312
18313 cf_add_libs="$LIBS"
18314 # reverse order
18315 cf_add_0lib=
18316 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18317 # filter duplicates
18318 for cf_add_1lib in $cf_add_0lib; do
18319         for cf_add_2lib in $cf_add_libs; do
18320                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18321                         cf_add_1lib=
18322                         break
18323                 fi
18324         done
18325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18326 done
18327 LIBS="$cf_add_libs"
18328
18329                                 cf_regex_func=regcomp
18330                                 break
18331 fi
18332
18333         done
18334
18335 fi
18336
18337 if test "$cf_regex_func" = no ; then
18338         echo "$as_me:18338: checking for compile" >&5
18339 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18340 if test "${ac_cv_func_compile+set}" = set; then
18341   echo $ECHO_N "(cached) $ECHO_C" >&6
18342 else
18343   cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18346 #define compile autoconf_temporary
18347 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18348 #undef compile
18349
18350 #ifdef __cplusplus
18351 extern "C"
18352 #endif
18353
18354 /* We use char because int might match the return type of a gcc2
18355    builtin and then its argument prototype would still apply.  */
18356 char compile (void);
18357
18358 int
18359 main (void)
18360 {
18361
18362 /* The GNU C library defines stubs for functions which it implements
18363     to always fail with ENOSYS.  Some functions are actually named
18364     something starting with __ and the normal name is an alias.  */
18365 #if defined (__stub_compile) || defined (__stub___compile)
18366 #error found stub for compile
18367 #endif
18368
18369         return compile ();
18370   ;
18371   return 0;
18372 }
18373 _ACEOF
18374 rm -f conftest.$ac_objext conftest$ac_exeext
18375 if { (eval echo "$as_me:18375: \"$ac_link\"") >&5
18376   (eval $ac_link) 2>&5
18377   ac_status=$?
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } &&
18380          { ac_try='test -s conftest$ac_exeext'
18381   { (eval echo "$as_me:18381: \"$ac_try\"") >&5
18382   (eval $ac_try) 2>&5
18383   ac_status=$?
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); }; }; then
18386   ac_cv_func_compile=yes
18387 else
18388   echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 ac_cv_func_compile=no
18391 fi
18392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18393 fi
18394 echo "$as_me:18394: result: $ac_cv_func_compile" >&5
18395 echo "${ECHO_T}$ac_cv_func_compile" >&6
18396 if test $ac_cv_func_compile = yes; then
18397   cf_regex_func=compile
18398 else
18399
18400                 echo "$as_me:18400: checking for compile in -lgen" >&5
18401 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18402 if test "${ac_cv_lib_gen_compile+set}" = set; then
18403   echo $ECHO_N "(cached) $ECHO_C" >&6
18404 else
18405   ac_check_lib_save_LIBS=$LIBS
18406 LIBS="-lgen  $LIBS"
18407 cat >conftest.$ac_ext <<_ACEOF
18408 #line 18408 "configure"
18409 #include "confdefs.h"
18410
18411 /* Override any gcc2 internal prototype to avoid an error.  */
18412 #ifdef __cplusplus
18413 extern "C"
18414 #endif
18415 /* We use char because int might match the return type of a gcc2
18416    builtin and then its argument prototype would still apply.  */
18417 char compile ();
18418 int
18419 main (void)
18420 {
18421 compile ();
18422   ;
18423   return 0;
18424 }
18425 _ACEOF
18426 rm -f conftest.$ac_objext conftest$ac_exeext
18427 if { (eval echo "$as_me:18427: \"$ac_link\"") >&5
18428   (eval $ac_link) 2>&5
18429   ac_status=$?
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); } &&
18432          { ac_try='test -s conftest$ac_exeext'
18433   { (eval echo "$as_me:18433: \"$ac_try\"") >&5
18434   (eval $ac_try) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); }; }; then
18438   ac_cv_lib_gen_compile=yes
18439 else
18440   echo "$as_me: failed program was:" >&5
18441 cat conftest.$ac_ext >&5
18442 ac_cv_lib_gen_compile=no
18443 fi
18444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18445 LIBS=$ac_check_lib_save_LIBS
18446 fi
18447 echo "$as_me:18447: result: $ac_cv_lib_gen_compile" >&5
18448 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18449 if test $ac_cv_lib_gen_compile = yes; then
18450
18451 cf_add_libs="$LIBS"
18452 # reverse order
18453 cf_add_0lib=
18454 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18455 # filter duplicates
18456 for cf_add_1lib in $cf_add_0lib; do
18457         for cf_add_2lib in $cf_add_libs; do
18458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18459                         cf_add_1lib=
18460                         break
18461                 fi
18462         done
18463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18464 done
18465 LIBS="$cf_add_libs"
18466
18467                                 cf_regex_func=compile
18468 fi
18469
18470 fi
18471
18472 fi
18473
18474 if test "$cf_regex_func" = no ; then
18475         { echo "$as_me:18475: WARNING: cannot find regular expression library" >&5
18476 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18477 fi
18478
18479 echo "$as_me:18479: checking for regular-expression headers" >&5
18480 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18481 if test "${cf_cv_regex_hdrs+set}" = set; then
18482   echo $ECHO_N "(cached) $ECHO_C" >&6
18483 else
18484
18485 cf_cv_regex_hdrs=no
18486 case $cf_regex_func in
18487 (compile)
18488         for cf_regex_hdr in regexp.h regexpr.h
18489         do
18490                 cat >conftest.$ac_ext <<_ACEOF
18491 #line 18491 "configure"
18492 #include "confdefs.h"
18493 #include <$cf_regex_hdr>
18494 int
18495 main (void)
18496 {
18497
18498                         char *p = compile("", "", "", 0);
18499                         int x = step("", "");
18500                         (void)p;
18501                         (void)x;
18502
18503   ;
18504   return 0;
18505 }
18506 _ACEOF
18507 rm -f conftest.$ac_objext conftest$ac_exeext
18508 if { (eval echo "$as_me:18508: \"$ac_link\"") >&5
18509   (eval $ac_link) 2>&5
18510   ac_status=$?
18511   echo "$as_me:18511: \$? = $ac_status" >&5
18512   (exit $ac_status); } &&
18513          { ac_try='test -s conftest$ac_exeext'
18514   { (eval echo "$as_me:18514: \"$ac_try\"") >&5
18515   (eval $ac_try) 2>&5
18516   ac_status=$?
18517   echo "$as_me:18517: \$? = $ac_status" >&5
18518   (exit $ac_status); }; }; then
18519
18520                         cf_cv_regex_hdrs=$cf_regex_hdr
18521                         break
18522
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 cat conftest.$ac_ext >&5
18526 fi
18527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18528         done
18529         ;;
18530 (*)
18531         for cf_regex_hdr in regex.h
18532         do
18533                 cat >conftest.$ac_ext <<_ACEOF
18534 #line 18534 "configure"
18535 #include "confdefs.h"
18536 #include <sys/types.h>
18537 #include <$cf_regex_hdr>
18538 int
18539 main (void)
18540 {
18541
18542                         regex_t *p = 0;
18543                         int x = regcomp(p, "", 0);
18544                         int y = regexec(p, "", 0, 0, 0);
18545                         (void)x;
18546                         (void)y;
18547                         regfree(p);
18548
18549   ;
18550   return 0;
18551 }
18552 _ACEOF
18553 rm -f conftest.$ac_objext conftest$ac_exeext
18554 if { (eval echo "$as_me:18554: \"$ac_link\"") >&5
18555   (eval $ac_link) 2>&5
18556   ac_status=$?
18557   echo "$as_me:18557: \$? = $ac_status" >&5
18558   (exit $ac_status); } &&
18559          { ac_try='test -s conftest$ac_exeext'
18560   { (eval echo "$as_me:18560: \"$ac_try\"") >&5
18561   (eval $ac_try) 2>&5
18562   ac_status=$?
18563   echo "$as_me:18563: \$? = $ac_status" >&5
18564   (exit $ac_status); }; }; then
18565
18566                         cf_cv_regex_hdrs=$cf_regex_hdr
18567                         break
18568
18569 else
18570   echo "$as_me: failed program was:" >&5
18571 cat conftest.$ac_ext >&5
18572 fi
18573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18574         done
18575         ;;
18576 esac
18577
18578 fi
18579 echo "$as_me:18579: result: $cf_cv_regex_hdrs" >&5
18580 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18581
18582 case $cf_cv_regex_hdrs in
18583         (no)            { echo "$as_me:18583: WARNING: no regular expression header found" >&5
18584 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18585         (regex.h)
18586 cat >>confdefs.h <<\EOF
18587 #define HAVE_REGEX_H_FUNCS 1
18588 EOF
18589  ;;
18590         (regexp.h)
18591 cat >>confdefs.h <<\EOF
18592 #define HAVE_REGEXP_H_FUNCS 1
18593 EOF
18594  ;;
18595         (regexpr.h)
18596 cat >>confdefs.h <<\EOF
18597 #define HAVE_REGEXPR_H_FUNCS 1
18598 EOF
18599  ;;
18600 esac
18601
18602 for ac_header in \
18603 fcntl.h \
18604 getopt.h \
18605 limits.h \
18606 locale.h \
18607 math.h \
18608 poll.h \
18609 sys/bsdtypes.h \
18610 sys/ioctl.h \
18611 sys/param.h \
18612 sys/poll.h \
18613 sys/select.h \
18614 sys/time.h \
18615 sys/times.h \
18616 ttyent.h \
18617 unistd.h \
18618 wctype.h \
18619
18620 do
18621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18622 echo "$as_me:18622: checking for $ac_header" >&5
18623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18625   echo $ECHO_N "(cached) $ECHO_C" >&6
18626 else
18627   cat >conftest.$ac_ext <<_ACEOF
18628 #line 18628 "configure"
18629 #include "confdefs.h"
18630 #include <$ac_header>
18631 _ACEOF
18632 if { (eval echo "$as_me:18632: \"$ac_cpp conftest.$ac_ext\"") >&5
18633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18634   ac_status=$?
18635   egrep -v '^ *\+' conftest.er1 >conftest.err
18636   rm -f conftest.er1
18637   cat conftest.err >&5
18638   echo "$as_me:18638: \$? = $ac_status" >&5
18639   (exit $ac_status); } >/dev/null; then
18640   if test -s conftest.err; then
18641     ac_cpp_err=$ac_c_preproc_warn_flag
18642   else
18643     ac_cpp_err=
18644   fi
18645 else
18646   ac_cpp_err=yes
18647 fi
18648 if test -z "$ac_cpp_err"; then
18649   eval "$as_ac_Header=yes"
18650 else
18651   echo "$as_me: failed program was:" >&5
18652   cat conftest.$ac_ext >&5
18653   eval "$as_ac_Header=no"
18654 fi
18655 rm -f conftest.err conftest.$ac_ext
18656 fi
18657 echo "$as_me:18657: result: `eval echo '${'$as_ac_Header'}'`" >&5
18658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18660   cat >>confdefs.h <<EOF
18661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18662 EOF
18663
18664 fi
18665 done
18666
18667 for ac_header in unistd.h getopt.h
18668 do
18669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18670 echo "$as_me:18670: checking for $ac_header" >&5
18671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675   cat >conftest.$ac_ext <<_ACEOF
18676 #line 18676 "configure"
18677 #include "confdefs.h"
18678 #include <$ac_header>
18679 _ACEOF
18680 if { (eval echo "$as_me:18680: \"$ac_cpp conftest.$ac_ext\"") >&5
18681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18682   ac_status=$?
18683   egrep -v '^ *\+' conftest.er1 >conftest.err
18684   rm -f conftest.er1
18685   cat conftest.err >&5
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } >/dev/null; then
18688   if test -s conftest.err; then
18689     ac_cpp_err=$ac_c_preproc_warn_flag
18690   else
18691     ac_cpp_err=
18692   fi
18693 else
18694   ac_cpp_err=yes
18695 fi
18696 if test -z "$ac_cpp_err"; then
18697   eval "$as_ac_Header=yes"
18698 else
18699   echo "$as_me: failed program was:" >&5
18700   cat conftest.$ac_ext >&5
18701   eval "$as_ac_Header=no"
18702 fi
18703 rm -f conftest.err conftest.$ac_ext
18704 fi
18705 echo "$as_me:18705: result: `eval echo '${'$as_ac_Header'}'`" >&5
18706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18708   cat >>confdefs.h <<EOF
18709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18710 EOF
18711
18712 fi
18713 done
18714
18715 echo "$as_me:18715: checking for header declaring getopt variables" >&5
18716 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18717 if test "${cf_cv_getopt_header+set}" = set; then
18718   echo $ECHO_N "(cached) $ECHO_C" >&6
18719 else
18720
18721 cf_cv_getopt_header=none
18722 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18723 do
18724 cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18727
18728 #include <$cf_header>
18729 int
18730 main (void)
18731 {
18732 int x = optind; char *y = optarg
18733   ;
18734   return 0;
18735 }
18736 _ACEOF
18737 rm -f conftest.$ac_objext
18738 if { (eval echo "$as_me:18738: \"$ac_compile\"") >&5
18739   (eval $ac_compile) 2>&5
18740   ac_status=$?
18741   echo "$as_me:18741: \$? = $ac_status" >&5
18742   (exit $ac_status); } &&
18743          { ac_try='test -s conftest.$ac_objext'
18744   { (eval echo "$as_me:18744: \"$ac_try\"") >&5
18745   (eval $ac_try) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); }; }; then
18749   cf_cv_getopt_header=$cf_header
18750  break
18751 else
18752   echo "$as_me: failed program was:" >&5
18753 cat conftest.$ac_ext >&5
18754 fi
18755 rm -f conftest.$ac_objext conftest.$ac_ext
18756 done
18757
18758 fi
18759 echo "$as_me:18759: result: $cf_cv_getopt_header" >&5
18760 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18761 if test $cf_cv_getopt_header != none ; then
18762
18763 cat >>confdefs.h <<\EOF
18764 #define HAVE_GETOPT_HEADER 1
18765 EOF
18766
18767 fi
18768 if test $cf_cv_getopt_header = getopt.h ; then
18769
18770 cat >>confdefs.h <<\EOF
18771 #define NEED_GETOPT_H 1
18772 EOF
18773
18774 fi
18775
18776 echo "$as_me:18776: checking if external environ is declared" >&5
18777 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18778 if test "${cf_cv_dcl_environ+set}" = set; then
18779   echo $ECHO_N "(cached) $ECHO_C" >&6
18780 else
18781
18782     cat >conftest.$ac_ext <<_ACEOF
18783 #line 18783 "configure"
18784 #include "confdefs.h"
18785
18786 #ifdef HAVE_STDLIB_H
18787 #include <stdlib.h>
18788 #endif
18789 #include <unistd.h>
18790 int
18791 main (void)
18792 {
18793 int x = (int) environ
18794   ;
18795   return 0;
18796 }
18797 _ACEOF
18798 rm -f conftest.$ac_objext
18799 if { (eval echo "$as_me:18799: \"$ac_compile\"") >&5
18800   (eval $ac_compile) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); } &&
18804          { ac_try='test -s conftest.$ac_objext'
18805   { (eval echo "$as_me:18805: \"$ac_try\"") >&5
18806   (eval $ac_try) 2>&5
18807   ac_status=$?
18808   echo "$as_me:18808: \$? = $ac_status" >&5
18809   (exit $ac_status); }; }; then
18810   cf_cv_dcl_environ=yes
18811 else
18812   echo "$as_me: failed program was:" >&5
18813 cat conftest.$ac_ext >&5
18814 cf_cv_dcl_environ=no
18815 fi
18816 rm -f conftest.$ac_objext conftest.$ac_ext
18817
18818 fi
18819 echo "$as_me:18819: result: $cf_cv_dcl_environ" >&5
18820 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18821
18822 if test "$cf_cv_dcl_environ" = no ; then
18823
18824 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18825
18826     cat >>confdefs.h <<EOF
18827 #define $cf_result 1
18828 EOF
18829
18830 fi
18831
18832 # It's possible (for near-UNIX clones) that the data doesn't exist
18833
18834 echo "$as_me:18834: checking if external environ exists" >&5
18835 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18836 if test "${cf_cv_have_environ+set}" = set; then
18837   echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839
18840         cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843
18844 #undef environ
18845 extern int environ;
18846
18847 int
18848 main (void)
18849 {
18850 environ = 2
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext conftest$ac_exeext
18856 if { (eval echo "$as_me:18856: \"$ac_link\"") >&5
18857   (eval $ac_link) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest$ac_exeext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867   cf_cv_have_environ=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 cf_cv_have_environ=no
18872 fi
18873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18874
18875 fi
18876 echo "$as_me:18876: result: $cf_cv_have_environ" >&5
18877 echo "${ECHO_T}$cf_cv_have_environ" >&6
18878
18879 if test "$cf_cv_have_environ" = yes ; then
18880
18881 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18882
18883         cat >>confdefs.h <<EOF
18884 #define $cf_result 1
18885 EOF
18886
18887 fi
18888
18889 echo "$as_me:18889: checking for getenv" >&5
18890 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18891 if test "${ac_cv_func_getenv+set}" = set; then
18892   echo $ECHO_N "(cached) $ECHO_C" >&6
18893 else
18894   cat >conftest.$ac_ext <<_ACEOF
18895 #line 18895 "configure"
18896 #include "confdefs.h"
18897 #define getenv autoconf_temporary
18898 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18899 #undef getenv
18900
18901 #ifdef __cplusplus
18902 extern "C"
18903 #endif
18904
18905 /* We use char because int might match the return type of a gcc2
18906    builtin and then its argument prototype would still apply.  */
18907 char getenv (void);
18908
18909 int
18910 main (void)
18911 {
18912
18913 /* The GNU C library defines stubs for functions which it implements
18914     to always fail with ENOSYS.  Some functions are actually named
18915     something starting with __ and the normal name is an alias.  */
18916 #if defined (__stub_getenv) || defined (__stub___getenv)
18917 #error found stub for getenv
18918 #endif
18919
18920         return getenv ();
18921   ;
18922   return 0;
18923 }
18924 _ACEOF
18925 rm -f conftest.$ac_objext conftest$ac_exeext
18926 if { (eval echo "$as_me:18926: \"$ac_link\"") >&5
18927   (eval $ac_link) 2>&5
18928   ac_status=$?
18929   echo "$as_me:18929: \$? = $ac_status" >&5
18930   (exit $ac_status); } &&
18931          { ac_try='test -s conftest$ac_exeext'
18932   { (eval echo "$as_me:18932: \"$ac_try\"") >&5
18933   (eval $ac_try) 2>&5
18934   ac_status=$?
18935   echo "$as_me:18935: \$? = $ac_status" >&5
18936   (exit $ac_status); }; }; then
18937   ac_cv_func_getenv=yes
18938 else
18939   echo "$as_me: failed program was:" >&5
18940 cat conftest.$ac_ext >&5
18941 ac_cv_func_getenv=no
18942 fi
18943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18944 fi
18945 echo "$as_me:18945: result: $ac_cv_func_getenv" >&5
18946 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18947
18948 for ac_func in putenv setenv strdup
18949 do
18950 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18951 echo "$as_me:18951: checking for $ac_func" >&5
18952 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18953 if eval "test \"\${$as_ac_var+set}\" = set"; then
18954   echo $ECHO_N "(cached) $ECHO_C" >&6
18955 else
18956   cat >conftest.$ac_ext <<_ACEOF
18957 #line 18957 "configure"
18958 #include "confdefs.h"
18959 #define $ac_func autoconf_temporary
18960 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18961 #undef $ac_func
18962
18963 #ifdef __cplusplus
18964 extern "C"
18965 #endif
18966
18967 /* We use char because int might match the return type of a gcc2
18968    builtin and then its argument prototype would still apply.  */
18969 char $ac_func (void);
18970
18971 int
18972 main (void)
18973 {
18974
18975 /* The GNU C library defines stubs for functions which it implements
18976     to always fail with ENOSYS.  Some functions are actually named
18977     something starting with __ and the normal name is an alias.  */
18978 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18979 #error found stub for $ac_func
18980 #endif
18981
18982         return $ac_func ();
18983   ;
18984   return 0;
18985 }
18986 _ACEOF
18987 rm -f conftest.$ac_objext conftest$ac_exeext
18988 if { (eval echo "$as_me:18988: \"$ac_link\"") >&5
18989   (eval $ac_link) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); } &&
18993          { ac_try='test -s conftest$ac_exeext'
18994   { (eval echo "$as_me:18994: \"$ac_try\"") >&5
18995   (eval $ac_try) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); }; }; then
18999   eval "$as_ac_var=yes"
19000 else
19001   echo "$as_me: failed program was:" >&5
19002 cat conftest.$ac_ext >&5
19003 eval "$as_ac_var=no"
19004 fi
19005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19006 fi
19007 echo "$as_me:19007: result: `eval echo '${'$as_ac_var'}'`" >&5
19008 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19009 if test `eval echo '${'$as_ac_var'}'` = yes; then
19010   cat >>confdefs.h <<EOF
19011 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19012 EOF
19013
19014 fi
19015 done
19016
19017 echo "$as_me:19017: checking if getenv returns consistent values" >&5
19018 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19019 if test "${cf_cv_consistent_getenv+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022
19023 if test "$cross_compiling" = yes; then
19024   cf_cv_consistent_getenv=unknown
19025 else
19026   cat >conftest.$ac_ext <<_ACEOF
19027 #line 19027 "configure"
19028 #include "confdefs.h"
19029
19030 #include <stdlib.h>
19031 #include <unistd.h>
19032 #include <stdio.h>
19033 #include <string.h>
19034 #include <sys/types.h>
19035
19036 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19037 extern char **environ;  /* POSIX, but some systems are not... */
19038 #endif
19039
19040 #if defined(HAVE_STRDUP)
19041 #define str_alloc(s) strdup(s)
19042 #else
19043 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19044 #endif
19045
19046 static void set_value(const char *name, const char *value)
19047 {
19048 #if defined(HAVE_SETENV)
19049         setenv(name, value, 1);
19050 #elif defined(HAVE_PUTENV)
19051         char buffer[1024];
19052         sprintf(buffer, "%s=%s", name, value);
19053         putenv(str_alloc(buffer));
19054 #else
19055 #error neither putenv/setenv found
19056 #endif
19057 }
19058 int main(void)
19059 {
19060         int pass;
19061         size_t numenv, limit, j;
19062         char **mynames;
19063         char **myvalues;
19064         char **mypointer;
19065         char *equals;
19066         for (numenv = 0; environ[numenv]; ++numenv) ;
19067         limit = numenv + 10;
19068         mynames = (char **) calloc(limit + 1, sizeof(char *));
19069         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19070         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19071 #if defined(HAVE_ENVIRON)
19072         for (j = 0; environ[j]; ++j) {
19073                 mynames[j] = str_alloc(environ[j]);
19074                 equals = strchr(mynames[j], '=');
19075                 if (equals != 0) {
19076                         *equals++ = '\0';
19077                         myvalues[j] = str_alloc(equals);
19078                 } else {
19079                         myvalues[j] = str_alloc("");
19080                 }
19081         }
19082 #endif
19083         for (j = numenv; j < limit; ++j) {
19084                 char name[80];
19085                 char value[80];
19086                 size_t found;
19087                 size_t k = 0;
19088                 do {
19089                         size_t jk;
19090                         found = 0;
19091                         sprintf(name, "TERM%lu", (unsigned long) k);
19092                         for (jk = 0; jk < j; ++jk) {
19093                                 if (!strcmp(name, mynames[jk])) {
19094                                         found = 1;
19095                                         ++k;
19096                                         break;
19097                                 }
19098                         }
19099                 } while (found);
19100                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19101                 set_value(name, value);
19102                 mynames[j] = str_alloc(name);
19103                 myvalues[j] = str_alloc(value);
19104         }
19105         for (pass = 0; pass < 3; ++pass) {
19106                 for (j = 0; j < limit; ++j) {
19107                         char *value = getenv(mynames[j]);
19108                         if (pass) {
19109                                 if (value == 0) {
19110                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19111                                         ${cf_cv_main_return:-return}(1);
19112                                 } else if (value != mypointer[j]) {
19113                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19114                                         ${cf_cv_main_return:-return}(1);
19115                                 } else if (strcmp(value, myvalues[j])) {
19116                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19117                                         ${cf_cv_main_return:-return}(1);
19118                                 }
19119                         } else {
19120                                 size_t k;
19121                                 mypointer[j] = value;
19122                                 for (k = 0; k < j; ++k) {
19123                                         if (mypointer[j] == mypointer[k]) {
19124                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19125                                                 ${cf_cv_main_return:-return}(1);
19126                                         }
19127                                 }
19128                         }
19129                 }
19130         }
19131         ${cf_cv_main_return:-return}(0);
19132 }
19133
19134 _ACEOF
19135 rm -f conftest$ac_exeext
19136 if { (eval echo "$as_me:19136: \"$ac_link\"") >&5
19137   (eval $ac_link) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19141   { (eval echo "$as_me:19141: \"$ac_try\"") >&5
19142   (eval $ac_try) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); }; }; then
19146   cf_cv_consistent_getenv=yes
19147 else
19148   echo "$as_me: program exited with status $ac_status" >&5
19149 echo "$as_me: failed program was:" >&5
19150 cat conftest.$ac_ext >&5
19151 cf_cv_consistent_getenv=no
19152 fi
19153 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19154 fi
19155
19156 fi
19157 echo "$as_me:19157: result: $cf_cv_consistent_getenv" >&5
19158 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19159
19160 if test "x$cf_cv_consistent_getenv" = xno
19161 then
19162
19163 cat >>confdefs.h <<\EOF
19164 #define HAVE_CONSISTENT_GETENV 1
19165 EOF
19166
19167 fi
19168
19169 if test "x$cf_cv_consistent_getenv" = xno && \
19170         test "x$cf_with_trace" = xyes
19171 then
19172         { echo "$as_me:19172: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19173 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19174 fi
19175
19176 # check for ISC (this may also define _POSIX_SOURCE)
19177 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
19178 if test "x$ISC" = xyes ; then
19179
19180 echo "$as_me:19180: checking for main in -lcposix" >&5
19181 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
19182 if test "${ac_cv_lib_cposix_main+set}" = set; then
19183   echo $ECHO_N "(cached) $ECHO_C" >&6
19184 else
19185   ac_check_lib_save_LIBS=$LIBS
19186 LIBS="-lcposix  $LIBS"
19187 cat >conftest.$ac_ext <<_ACEOF
19188 #line 19188 "configure"
19189 #include "confdefs.h"
19190
19191 int
19192 main (void)
19193 {
19194 main ();
19195   ;
19196   return 0;
19197 }
19198 _ACEOF
19199 rm -f conftest.$ac_objext conftest$ac_exeext
19200 if { (eval echo "$as_me:19200: \"$ac_link\"") >&5
19201   (eval $ac_link) 2>&5
19202   ac_status=$?
19203   echo "$as_me:19203: \$? = $ac_status" >&5
19204   (exit $ac_status); } &&
19205          { ac_try='test -s conftest$ac_exeext'
19206   { (eval echo "$as_me:19206: \"$ac_try\"") >&5
19207   (eval $ac_try) 2>&5
19208   ac_status=$?
19209   echo "$as_me:19209: \$? = $ac_status" >&5
19210   (exit $ac_status); }; }; then
19211   ac_cv_lib_cposix_main=yes
19212 else
19213   echo "$as_me: failed program was:" >&5
19214 cat conftest.$ac_ext >&5
19215 ac_cv_lib_cposix_main=no
19216 fi
19217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19218 LIBS=$ac_check_lib_save_LIBS
19219 fi
19220 echo "$as_me:19220: result: $ac_cv_lib_cposix_main" >&5
19221 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
19222 if test $ac_cv_lib_cposix_main = yes; then
19223   cat >>confdefs.h <<EOF
19224 #define HAVE_LIBCPOSIX 1
19225 EOF
19226
19227   LIBS="-lcposix $LIBS"
19228
19229 fi
19230
19231         echo "$as_me:19231: checking for bzero in -linet" >&5
19232 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
19233 if test "${ac_cv_lib_inet_bzero+set}" = set; then
19234   echo $ECHO_N "(cached) $ECHO_C" >&6
19235 else
19236   ac_check_lib_save_LIBS=$LIBS
19237 LIBS="-linet  $LIBS"
19238 cat >conftest.$ac_ext <<_ACEOF
19239 #line 19239 "configure"
19240 #include "confdefs.h"
19241
19242 /* Override any gcc2 internal prototype to avoid an error.  */
19243 #ifdef __cplusplus
19244 extern "C"
19245 #endif
19246 /* We use char because int might match the return type of a gcc2
19247    builtin and then its argument prototype would still apply.  */
19248 char bzero ();
19249 int
19250 main (void)
19251 {
19252 bzero ();
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f conftest.$ac_objext conftest$ac_exeext
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259   (eval $ac_link) 2>&5
19260   ac_status=$?
19261   echo "$as_me:19261: \$? = $ac_status" >&5
19262   (exit $ac_status); } &&
19263          { ac_try='test -s conftest$ac_exeext'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   ac_cv_lib_inet_bzero=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 cat conftest.$ac_ext >&5
19273 ac_cv_lib_inet_bzero=no
19274 fi
19275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19276 LIBS=$ac_check_lib_save_LIBS
19277 fi
19278 echo "$as_me:19278: result: $ac_cv_lib_inet_bzero" >&5
19279 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
19280 if test $ac_cv_lib_inet_bzero = yes; then
19281
19282 cf_add_libs="$LIBS"
19283 # reverse order
19284 cf_add_0lib=
19285 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19286 # filter duplicates
19287 for cf_add_1lib in $cf_add_0lib; do
19288         for cf_add_2lib in $cf_add_libs; do
19289                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19290                         cf_add_1lib=
19291                         break
19292                 fi
19293         done
19294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19295 done
19296 LIBS="$cf_add_libs"
19297
19298 fi
19299 fi
19300
19301 echo "$as_me:19301: checking if sys/time.h works with sys/select.h" >&5
19302 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19303 if test "${cf_cv_sys_time_select+set}" = set; then
19304   echo $ECHO_N "(cached) $ECHO_C" >&6
19305 else
19306
19307 cat >conftest.$ac_ext <<_ACEOF
19308 #line 19308 "configure"
19309 #include "confdefs.h"
19310
19311 #include <sys/types.h>
19312 #ifdef HAVE_SYS_TIME_H
19313 #include <sys/time.h>
19314 #endif
19315 #ifdef HAVE_SYS_SELECT_H
19316 #include <sys/select.h>
19317 #endif
19318
19319 int
19320 main (void)
19321 {
19322
19323   ;
19324   return 0;
19325 }
19326 _ACEOF
19327 rm -f conftest.$ac_objext
19328 if { (eval echo "$as_me:19328: \"$ac_compile\"") >&5
19329   (eval $ac_compile) 2>&5
19330   ac_status=$?
19331   echo "$as_me:19331: \$? = $ac_status" >&5
19332   (exit $ac_status); } &&
19333          { ac_try='test -s conftest.$ac_objext'
19334   { (eval echo "$as_me:19334: \"$ac_try\"") >&5
19335   (eval $ac_try) 2>&5
19336   ac_status=$?
19337   echo "$as_me:19337: \$? = $ac_status" >&5
19338   (exit $ac_status); }; }; then
19339   cf_cv_sys_time_select=yes
19340 else
19341   echo "$as_me: failed program was:" >&5
19342 cat conftest.$ac_ext >&5
19343 cf_cv_sys_time_select=no
19344 fi
19345 rm -f conftest.$ac_objext conftest.$ac_ext
19346
19347 fi
19348
19349 echo "$as_me:19349: result: $cf_cv_sys_time_select" >&5
19350 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19351 test "$cf_cv_sys_time_select" = yes &&
19352 cat >>confdefs.h <<\EOF
19353 #define HAVE_SYS_TIME_SELECT 1
19354 EOF
19355
19356 ###     checks for compiler characteristics
19357 ac_ext=c
19358 ac_cpp='$CPP $CPPFLAGS'
19359 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19360 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19361 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19362 ac_main_return=return
19363
19364 echo "$as_me:19364: checking for an ANSI C-conforming const" >&5
19365 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19366 if test "${ac_cv_c_const+set}" = set; then
19367   echo $ECHO_N "(cached) $ECHO_C" >&6
19368 else
19369   cat >conftest.$ac_ext <<_ACEOF
19370 #line 19370 "configure"
19371 #include "confdefs.h"
19372
19373 int
19374 main (void)
19375 {
19376 /* FIXME: Include the comments suggested by Paul. */
19377 #ifndef __cplusplus
19378   /* Ultrix mips cc rejects this.  */
19379   typedef int charset[2];
19380   const charset x;
19381   /* SunOS 4.1.1 cc rejects this.  */
19382   char const *const *ccp;
19383   char **p;
19384   /* NEC SVR4.0.2 mips cc rejects this.  */
19385   struct point {int x, y;};
19386   static struct point const zero = {0,0};
19387   /* AIX XL C 1.02.0.0 rejects this.
19388      It does not let you subtract one const X* pointer from another in
19389      an arm of an if-expression whose if-part is not a constant
19390      expression */
19391   const char *g = "string";
19392   ccp = &g + (g ? g-g : 0);
19393   /* HPUX 7.0 cc rejects these. */
19394   ++ccp;
19395   p = (char**) ccp;
19396   ccp = (char const *const *) p;
19397   { /* SCO 3.2v4 cc rejects this.  */
19398     char *t;
19399     char const *s = 0 ? (char *) 0 : (char const *) 0;
19400
19401     *t++ = 0;
19402   }
19403   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19404     int x[] = {25, 17};
19405     const int *foo = &x[0];
19406     ++foo;
19407   }
19408   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19409     typedef const int *iptr;
19410     iptr p = 0;
19411     ++p;
19412   }
19413   { /* AIX XL C 1.02.0.0 rejects this saying
19414        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19415     struct s { int j; const int *ap[3]; };
19416     struct s *b; b->j = 5;
19417   }
19418   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19419     const int foo = 10;
19420   }
19421 #endif
19422
19423   ;
19424   return 0;
19425 }
19426 _ACEOF
19427 rm -f conftest.$ac_objext
19428 if { (eval echo "$as_me:19428: \"$ac_compile\"") >&5
19429   (eval $ac_compile) 2>&5
19430   ac_status=$?
19431   echo "$as_me:19431: \$? = $ac_status" >&5
19432   (exit $ac_status); } &&
19433          { ac_try='test -s conftest.$ac_objext'
19434   { (eval echo "$as_me:19434: \"$ac_try\"") >&5
19435   (eval $ac_try) 2>&5
19436   ac_status=$?
19437   echo "$as_me:19437: \$? = $ac_status" >&5
19438   (exit $ac_status); }; }; then
19439   ac_cv_c_const=yes
19440 else
19441   echo "$as_me: failed program was:" >&5
19442 cat conftest.$ac_ext >&5
19443 ac_cv_c_const=no
19444 fi
19445 rm -f conftest.$ac_objext conftest.$ac_ext
19446 fi
19447 echo "$as_me:19447: result: $ac_cv_c_const" >&5
19448 echo "${ECHO_T}$ac_cv_c_const" >&6
19449 if test $ac_cv_c_const = no; then
19450
19451 cat >>confdefs.h <<\EOF
19452 #define const
19453 EOF
19454
19455 fi
19456
19457 echo "$as_me:19457: checking for inline" >&5
19458 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19459 if test "${ac_cv_c_inline+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462   ac_cv_c_inline=no
19463 for ac_kw in inline __inline__ __inline; do
19464   cat >conftest.$ac_ext <<_ACEOF
19465 #line 19465 "configure"
19466 #include "confdefs.h"
19467 #ifndef __cplusplus
19468 static $ac_kw int static_foo () {return 0; }
19469 $ac_kw int foo () {return 0; }
19470 #endif
19471
19472 _ACEOF
19473 rm -f conftest.$ac_objext
19474 if { (eval echo "$as_me:19474: \"$ac_compile\"") >&5
19475   (eval $ac_compile) 2>&5
19476   ac_status=$?
19477   echo "$as_me:19477: \$? = $ac_status" >&5
19478   (exit $ac_status); } &&
19479          { ac_try='test -s conftest.$ac_objext'
19480   { (eval echo "$as_me:19480: \"$ac_try\"") >&5
19481   (eval $ac_try) 2>&5
19482   ac_status=$?
19483   echo "$as_me:19483: \$? = $ac_status" >&5
19484   (exit $ac_status); }; }; then
19485   ac_cv_c_inline=$ac_kw; break
19486 else
19487   echo "$as_me: failed program was:" >&5
19488 cat conftest.$ac_ext >&5
19489 fi
19490 rm -f conftest.$ac_objext conftest.$ac_ext
19491 done
19492
19493 fi
19494 echo "$as_me:19494: result: $ac_cv_c_inline" >&5
19495 echo "${ECHO_T}$ac_cv_c_inline" >&6
19496 case $ac_cv_c_inline in
19497   inline | yes) ;;
19498   no)
19499 cat >>confdefs.h <<\EOF
19500 #define inline
19501 EOF
19502  ;;
19503   *)  cat >>confdefs.h <<EOF
19504 #define inline $ac_cv_c_inline
19505 EOF
19506  ;;
19507 esac
19508
19509 NCURSES_INLINE=
19510 if test "$ac_cv_c_inline" != no ; then
19511         NCURSES_INLINE=inline
19512         if test "$INTEL_COMPILER" = yes
19513         then
19514                 :
19515         elif test "$CLANG_COMPILER" = yes
19516         then
19517                 :
19518         elif test "$GCC" = yes
19519         then
19520                 echo "$as_me:19520: checking if $CC supports options to tune inlining" >&5
19521 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19522 if test "${cf_cv_gcc_inline+set}" = set; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525
19526                 cf_save_CFLAGS=$CFLAGS
19527                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19528                 cat >conftest.$ac_ext <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531 inline int foo(void) { return 1; }
19532 int
19533 main (void)
19534 {
19535 ${cf_cv_main_return:-return} foo()
19536   ;
19537   return 0;
19538 }
19539 _ACEOF
19540 rm -f conftest.$ac_objext
19541 if { (eval echo "$as_me:19541: \"$ac_compile\"") >&5
19542   (eval $ac_compile) 2>&5
19543   ac_status=$?
19544   echo "$as_me:19544: \$? = $ac_status" >&5
19545   (exit $ac_status); } &&
19546          { ac_try='test -s conftest.$ac_objext'
19547   { (eval echo "$as_me:19547: \"$ac_try\"") >&5
19548   (eval $ac_try) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); }; }; then
19552   cf_cv_gcc_inline=yes
19553 else
19554   echo "$as_me: failed program was:" >&5
19555 cat conftest.$ac_ext >&5
19556 cf_cv_gcc_inline=no
19557 fi
19558 rm -f conftest.$ac_objext conftest.$ac_ext
19559                 CFLAGS=$cf_save_CFLAGS
19560
19561 fi
19562 echo "$as_me:19562: result: $cf_cv_gcc_inline" >&5
19563 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19564                 if test "$cf_cv_gcc_inline" = yes ; then
19565
19566 cf_fix_cppflags=no
19567 cf_new_cflags=
19568 cf_new_cppflags=
19569 cf_new_extra_cppflags=
19570
19571 for cf_add_cflags in --param max-inline-insns-single=1200
19572 do
19573 case $cf_fix_cppflags in
19574 (no)
19575         case $cf_add_cflags in
19576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19577                 case $cf_add_cflags in
19578                 (-D*)
19579                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19580
19581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19582                                 && test -z "${cf_tst_cflags}" \
19583                                 && cf_fix_cppflags=yes
19584
19585                         if test $cf_fix_cppflags = yes ; then
19586
19587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19589
19590                                 continue
19591                         elif test "${cf_tst_cflags}" = "\"'" ; then
19592
19593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19595
19596                                 continue
19597                         fi
19598                         ;;
19599                 esac
19600                 case "$CPPFLAGS" in
19601                 (*$cf_add_cflags)
19602                         ;;
19603                 (*)
19604                         case $cf_add_cflags in
19605                         (-D*)
19606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19607
19608 CPPFLAGS=`echo "$CPPFLAGS" | \
19609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19611
19612                                 ;;
19613                         esac
19614
19615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19617
19618                         ;;
19619                 esac
19620                 ;;
19621         (*)
19622
19623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19625
19626                 ;;
19627         esac
19628         ;;
19629 (yes)
19630
19631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19633
19634         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19635
19636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19637                 && test -z "${cf_tst_cflags}" \
19638                 && cf_fix_cppflags=no
19639         ;;
19640 esac
19641 done
19642
19643 if test -n "$cf_new_cflags" ; then
19644
19645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19646         CFLAGS="${CFLAGS}$cf_new_cflags"
19647
19648 fi
19649
19650 if test -n "$cf_new_cppflags" ; then
19651
19652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19654
19655 fi
19656
19657 if test -n "$cf_new_extra_cppflags" ; then
19658
19659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19661
19662 fi
19663
19664                 fi
19665         fi
19666 fi
19667
19668 echo "$as_me:19668: checking for signal global datatype" >&5
19669 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19670 if test "${cf_cv_sig_atomic_t+set}" = set; then
19671   echo $ECHO_N "(cached) $ECHO_C" >&6
19672 else
19673
19674         for cf_type in \
19675                 "volatile sig_atomic_t" \
19676                 "sig_atomic_t" \
19677                 "int"
19678         do
19679         cat >conftest.$ac_ext <<_ACEOF
19680 #line 19680 "configure"
19681 #include "confdefs.h"
19682
19683 #include <sys/types.h>
19684 #include <signal.h>
19685 #include <stdio.h>
19686
19687 extern $cf_type x;
19688 $cf_type x;
19689 static void handler(int sig)
19690 {
19691         (void)sig;
19692         x = 5;
19693 }
19694 int
19695 main (void)
19696 {
19697 signal(SIGINT, handler);
19698                  x = 1
19699   ;
19700   return 0;
19701 }
19702 _ACEOF
19703 rm -f conftest.$ac_objext
19704 if { (eval echo "$as_me:19704: \"$ac_compile\"") >&5
19705   (eval $ac_compile) 2>&5
19706   ac_status=$?
19707   echo "$as_me:19707: \$? = $ac_status" >&5
19708   (exit $ac_status); } &&
19709          { ac_try='test -s conftest.$ac_objext'
19710   { (eval echo "$as_me:19710: \"$ac_try\"") >&5
19711   (eval $ac_try) 2>&5
19712   ac_status=$?
19713   echo "$as_me:19713: \$? = $ac_status" >&5
19714   (exit $ac_status); }; }; then
19715   cf_cv_sig_atomic_t=$cf_type
19716 else
19717   echo "$as_me: failed program was:" >&5
19718 cat conftest.$ac_ext >&5
19719 cf_cv_sig_atomic_t=no
19720 fi
19721 rm -f conftest.$ac_objext conftest.$ac_ext
19722                 test "$cf_cv_sig_atomic_t" != no && break
19723         done
19724
19725 fi
19726
19727 echo "$as_me:19727: result: $cf_cv_sig_atomic_t" >&5
19728 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19729 test "$cf_cv_sig_atomic_t" != no &&
19730 cat >>confdefs.h <<EOF
19731 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19732 EOF
19733
19734 if test $NCURSES_CHTYPE = auto ; then
19735
19736 echo "$as_me:19736: checking for type of chtype" >&5
19737 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19738 if test "${cf_cv_typeof_chtype+set}" = set; then
19739   echo $ECHO_N "(cached) $ECHO_C" >&6
19740 else
19741
19742                 if test "$cross_compiling" = yes; then
19743   cf_cv_typeof_chtype=long
19744 else
19745   cat >conftest.$ac_ext <<_ACEOF
19746 #line 19746 "configure"
19747 #include "confdefs.h"
19748
19749 #define WANT_BITS 31
19750 #include <stdio.h>
19751 int main(void)
19752 {
19753         FILE *fp = fopen("cf_test.out", "w");
19754         if (fp != 0) {
19755                 char *result = "long";
19756                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19757                         int n;
19758                         unsigned int x, y;
19759                         for (n = 0; n < WANT_BITS; n++) {
19760                                 x = (1 << n);
19761                                 y = (x >> n);
19762                                 if (y != 1 || x == 0) {
19763                                         x = 0;
19764                                         break;
19765                                 }
19766                         }
19767                         /*
19768                          * If x is nonzero, an int is big enough for the bits
19769                          * that we want.
19770                          */
19771                         result = (x != 0) ? "int" : "long";
19772                 }
19773                 fputs(result, fp);
19774                 fclose(fp);
19775         }
19776         ${cf_cv_main_return:-return}(0);
19777 }
19778
19779 _ACEOF
19780 rm -f conftest$ac_exeext
19781 if { (eval echo "$as_me:19781: \"$ac_link\"") >&5
19782   (eval $ac_link) 2>&5
19783   ac_status=$?
19784   echo "$as_me:19784: \$? = $ac_status" >&5
19785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19786   { (eval echo "$as_me:19786: \"$ac_try\"") >&5
19787   (eval $ac_try) 2>&5
19788   ac_status=$?
19789   echo "$as_me:19789: \$? = $ac_status" >&5
19790   (exit $ac_status); }; }; then
19791   cf_cv_typeof_chtype=`cat cf_test.out`
19792 else
19793   echo "$as_me: program exited with status $ac_status" >&5
19794 echo "$as_me: failed program was:" >&5
19795 cat conftest.$ac_ext >&5
19796 cf_cv_typeof_chtype=long
19797 fi
19798 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19799 fi
19800                 rm -f cf_test.out
19801
19802 fi
19803
19804 echo "$as_me:19804: result: $cf_cv_typeof_chtype" >&5
19805 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19806
19807 cat >>confdefs.h <<EOF
19808 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19809 EOF
19810
19811 else
19812         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19813 fi
19814 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19815
19816 echo "$as_me:19816: checking if unsigned literals are legal" >&5
19817 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19818 if test "${cf_cv_unsigned_literals+set}" = set; then
19819   echo $ECHO_N "(cached) $ECHO_C" >&6
19820 else
19821
19822         cat >conftest.$ac_ext <<_ACEOF
19823 #line 19823 "configure"
19824 #include "confdefs.h"
19825
19826 int
19827 main (void)
19828 {
19829 long x = 1L + 1UL + 1U + 1
19830   ;
19831   return 0;
19832 }
19833 _ACEOF
19834 rm -f conftest.$ac_objext
19835 if { (eval echo "$as_me:19835: \"$ac_compile\"") >&5
19836   (eval $ac_compile) 2>&5
19837   ac_status=$?
19838   echo "$as_me:19838: \$? = $ac_status" >&5
19839   (exit $ac_status); } &&
19840          { ac_try='test -s conftest.$ac_objext'
19841   { (eval echo "$as_me:19841: \"$ac_try\"") >&5
19842   (eval $ac_try) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit $ac_status); }; }; then
19846   cf_cv_unsigned_literals=yes
19847 else
19848   echo "$as_me: failed program was:" >&5
19849 cat conftest.$ac_ext >&5
19850 cf_cv_unsigned_literals=no
19851 fi
19852 rm -f conftest.$ac_objext conftest.$ac_ext
19853
19854 fi
19855
19856 echo "$as_me:19856: result: $cf_cv_unsigned_literals" >&5
19857 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19858
19859 cf_cv_1UL="1"
19860 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19861 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19862
19863 if test $NCURSES_MMASK_T = auto ; then
19864         cf_cv_typeof_mmask_t=long
19865 else
19866         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19867 fi
19868 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19869
19870 ###     Checks for external-data
19871
19872 echo "$as_me:19872: checking if external errno is declared" >&5
19873 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19874 if test "${cf_cv_dcl_errno+set}" = set; then
19875   echo $ECHO_N "(cached) $ECHO_C" >&6
19876 else
19877
19878         cat >conftest.$ac_ext <<_ACEOF
19879 #line 19879 "configure"
19880 #include "confdefs.h"
19881
19882 #ifdef HAVE_STDLIB_H
19883 #include <stdlib.h>
19884 #endif
19885 #include <stdio.h>
19886 #include <sys/types.h>
19887 #include <errno.h>
19888 int
19889 main (void)
19890 {
19891 int x = (int) errno; (void)x
19892   ;
19893   return 0;
19894 }
19895 _ACEOF
19896 rm -f conftest.$ac_objext
19897 if { (eval echo "$as_me:19897: \"$ac_compile\"") >&5
19898   (eval $ac_compile) 2>&5
19899   ac_status=$?
19900   echo "$as_me:19900: \$? = $ac_status" >&5
19901   (exit $ac_status); } &&
19902          { ac_try='test -s conftest.$ac_objext'
19903   { (eval echo "$as_me:19903: \"$ac_try\"") >&5
19904   (eval $ac_try) 2>&5
19905   ac_status=$?
19906   echo "$as_me:19906: \$? = $ac_status" >&5
19907   (exit $ac_status); }; }; then
19908   cf_cv_dcl_errno=yes
19909 else
19910   echo "$as_me: failed program was:" >&5
19911 cat conftest.$ac_ext >&5
19912 cf_cv_dcl_errno=no
19913 fi
19914 rm -f conftest.$ac_objext conftest.$ac_ext
19915
19916 fi
19917 echo "$as_me:19917: result: $cf_cv_dcl_errno" >&5
19918 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19919
19920 if test "$cf_cv_dcl_errno" = no ; then
19921
19922 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19923
19924         cat >>confdefs.h <<EOF
19925 #define $cf_result 1
19926 EOF
19927
19928 fi
19929
19930 # It's possible (for near-UNIX clones) that the data doesn't exist
19931
19932 echo "$as_me:19932: checking if external errno exists" >&5
19933 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19934 if test "${cf_cv_have_errno+set}" = set; then
19935   echo $ECHO_N "(cached) $ECHO_C" >&6
19936 else
19937
19938         cat >conftest.$ac_ext <<_ACEOF
19939 #line 19939 "configure"
19940 #include "confdefs.h"
19941
19942 #undef errno
19943 extern int errno;
19944
19945 int
19946 main (void)
19947 {
19948 errno = 2
19949   ;
19950   return 0;
19951 }
19952 _ACEOF
19953 rm -f conftest.$ac_objext conftest$ac_exeext
19954 if { (eval echo "$as_me:19954: \"$ac_link\"") >&5
19955   (eval $ac_link) 2>&5
19956   ac_status=$?
19957   echo "$as_me:19957: \$? = $ac_status" >&5
19958   (exit $ac_status); } &&
19959          { ac_try='test -s conftest$ac_exeext'
19960   { (eval echo "$as_me:19960: \"$ac_try\"") >&5
19961   (eval $ac_try) 2>&5
19962   ac_status=$?
19963   echo "$as_me:19963: \$? = $ac_status" >&5
19964   (exit $ac_status); }; }; then
19965   cf_cv_have_errno=yes
19966 else
19967   echo "$as_me: failed program was:" >&5
19968 cat conftest.$ac_ext >&5
19969 cf_cv_have_errno=no
19970 fi
19971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19972
19973 fi
19974 echo "$as_me:19974: result: $cf_cv_have_errno" >&5
19975 echo "${ECHO_T}$cf_cv_have_errno" >&6
19976
19977 if test "$cf_cv_have_errno" = yes ; then
19978
19979 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19980
19981         cat >>confdefs.h <<EOF
19982 #define $cf_result 1
19983 EOF
19984
19985 fi
19986
19987 echo "$as_me:19987: checking if data-only library module links" >&5
19988 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19989 if test "${cf_cv_link_dataonly+set}" = set; then
19990   echo $ECHO_N "(cached) $ECHO_C" >&6
19991 else
19992
19993         rm -f conftest.a
19994         cat >conftest.$ac_ext <<EOF
19995 #line 19995 "configure"
19996 int     testdata[3] = { 123, 456, 789 };
19997 EOF
19998         if { (eval echo "$as_me:19998: \"$ac_compile\"") >&5
19999   (eval $ac_compile) 2>&5
20000   ac_status=$?
20001   echo "$as_me:20001: \$? = $ac_status" >&5
20002   (exit $ac_status); } ; then
20003                 mv conftest.o data.o && \
20004                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20005         fi
20006         rm -f conftest.$ac_ext data.o
20007         cat >conftest.$ac_ext <<EOF
20008 #line 20008 "configure"
20009 int     testfunc(void)
20010 {
20011 #if defined(NeXT)
20012         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20013 #else
20014         extern int testdata[3];
20015         return testdata[0] == 123
20016            &&  testdata[1] == 456
20017            &&  testdata[2] == 789;
20018 #endif
20019 }
20020 EOF
20021         if { (eval echo "$as_me:20021: \"$ac_compile\"") >&5
20022   (eval $ac_compile) 2>&5
20023   ac_status=$?
20024   echo "$as_me:20024: \$? = $ac_status" >&5
20025   (exit $ac_status); }; then
20026                 mv conftest.o func.o && \
20027                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20028         fi
20029         rm -f conftest.$ac_ext func.o
20030         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20031         cf_saveLIBS="$LIBS"
20032         LIBS="conftest.a $LIBS"
20033         if test "$cross_compiling" = yes; then
20034   cf_cv_link_dataonly=unknown
20035 else
20036   cat >conftest.$ac_ext <<_ACEOF
20037 #line 20037 "configure"
20038 #include "confdefs.h"
20039
20040         int main(void)
20041         {
20042                 extern int testfunc();
20043                 ${cf_cv_main_return:-return} (!testfunc());
20044         }
20045
20046 _ACEOF
20047 rm -f conftest$ac_exeext
20048 if { (eval echo "$as_me:20048: \"$ac_link\"") >&5
20049   (eval $ac_link) 2>&5
20050   ac_status=$?
20051   echo "$as_me:20051: \$? = $ac_status" >&5
20052   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20053   { (eval echo "$as_me:20053: \"$ac_try\"") >&5
20054   (eval $ac_try) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); }; }; then
20058   cf_cv_link_dataonly=yes
20059 else
20060   echo "$as_me: program exited with status $ac_status" >&5
20061 echo "$as_me: failed program was:" >&5
20062 cat conftest.$ac_ext >&5
20063 cf_cv_link_dataonly=no
20064 fi
20065 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20066 fi
20067         LIBS="$cf_saveLIBS"
20068
20069 fi
20070
20071 echo "$as_me:20071: result: $cf_cv_link_dataonly" >&5
20072 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20073
20074 if test "$cf_cv_link_dataonly" = no ; then
20075
20076 cat >>confdefs.h <<\EOF
20077 #define BROKEN_LINKER 1
20078 EOF
20079
20080         BROKEN_LINKER=1
20081 fi
20082
20083 ###     Checks for library functions.
20084
20085 for ac_func in \
20086 getcwd \
20087 getegid \
20088 geteuid \
20089 getopt \
20090 getttynam \
20091 issetugid \
20092 localeconv \
20093 poll \
20094 putenv \
20095 remove \
20096 select \
20097 setbuf \
20098 setbuffer \
20099 setenv \
20100 setvbuf \
20101 sigaction \
20102 sigvec \
20103 snprintf \
20104 strdup \
20105 strstr \
20106 sysconf \
20107 tcgetpgrp \
20108 times \
20109 tsearch \
20110 vsnprintf \
20111
20112 do
20113 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20114 echo "$as_me:20114: checking for $ac_func" >&5
20115 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20116 if eval "test \"\${$as_ac_var+set}\" = set"; then
20117   echo $ECHO_N "(cached) $ECHO_C" >&6
20118 else
20119   cat >conftest.$ac_ext <<_ACEOF
20120 #line 20120 "configure"
20121 #include "confdefs.h"
20122 #define $ac_func autoconf_temporary
20123 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20124 #undef $ac_func
20125
20126 #ifdef __cplusplus
20127 extern "C"
20128 #endif
20129
20130 /* We use char because int might match the return type of a gcc2
20131    builtin and then its argument prototype would still apply.  */
20132 char $ac_func (void);
20133
20134 int
20135 main (void)
20136 {
20137
20138 /* The GNU C library defines stubs for functions which it implements
20139     to always fail with ENOSYS.  Some functions are actually named
20140     something starting with __ and the normal name is an alias.  */
20141 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20142 #error found stub for $ac_func
20143 #endif
20144
20145         return $ac_func ();
20146   ;
20147   return 0;
20148 }
20149 _ACEOF
20150 rm -f conftest.$ac_objext conftest$ac_exeext
20151 if { (eval echo "$as_me:20151: \"$ac_link\"") >&5
20152   (eval $ac_link) 2>&5
20153   ac_status=$?
20154   echo "$as_me:20154: \$? = $ac_status" >&5
20155   (exit $ac_status); } &&
20156          { ac_try='test -s conftest$ac_exeext'
20157   { (eval echo "$as_me:20157: \"$ac_try\"") >&5
20158   (eval $ac_try) 2>&5
20159   ac_status=$?
20160   echo "$as_me:20160: \$? = $ac_status" >&5
20161   (exit $ac_status); }; }; then
20162   eval "$as_ac_var=yes"
20163 else
20164   echo "$as_me: failed program was:" >&5
20165 cat conftest.$ac_ext >&5
20166 eval "$as_ac_var=no"
20167 fi
20168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20169 fi
20170 echo "$as_me:20170: result: `eval echo '${'$as_ac_var'}'`" >&5
20171 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20172 if test `eval echo '${'$as_ac_var'}'` = yes; then
20173   cat >>confdefs.h <<EOF
20174 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20175 EOF
20176
20177 fi
20178 done
20179
20180 if test "x$ac_cv_func_getopt" = xno && \
20181    test "x$cf_with_progs$cf_with_tests" != xnono; then
20182         { { echo "$as_me:20182: error: getopt is required for building programs" >&5
20183 echo "$as_me: error: getopt is required for building programs" >&2;}
20184    { (exit 1); exit 1; }; }
20185 fi
20186
20187 if test "x$with_safe_sprintf" = xyes
20188 then
20189         if test "x$ac_cv_func_vsnprintf" = xyes
20190         then
20191                 { echo "$as_me:20191: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20192 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20193         else
20194
20195 cat >>confdefs.h <<\EOF
20196 #define USE_SAFE_SPRINTF 1
20197 EOF
20198
20199         fi
20200 fi
20201
20202 if test "x$with_getcap" = "xyes" ; then
20203
20204 echo "$as_me:20204: checking for terminal-capability database functions" >&5
20205 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20206 if test "${cf_cv_cgetent+set}" = set; then
20207   echo $ECHO_N "(cached) $ECHO_C" >&6
20208 else
20209
20210 cat >conftest.$ac_ext <<_ACEOF
20211 #line 20211 "configure"
20212 #include "confdefs.h"
20213
20214 #include <stdlib.h>
20215 int
20216 main (void)
20217 {
20218
20219         char temp[128];
20220         char *buf = temp;
20221         char *db_array = temp;
20222         cgetent(&buf, &db_array, "vt100");
20223         cgetcap(buf, "tc", '=');
20224         cgetmatch(buf, "tc");
20225
20226   ;
20227   return 0;
20228 }
20229 _ACEOF
20230 rm -f conftest.$ac_objext conftest$ac_exeext
20231 if { (eval echo "$as_me:20231: \"$ac_link\"") >&5
20232   (eval $ac_link) 2>&5
20233   ac_status=$?
20234   echo "$as_me:20234: \$? = $ac_status" >&5
20235   (exit $ac_status); } &&
20236          { ac_try='test -s conftest$ac_exeext'
20237   { (eval echo "$as_me:20237: \"$ac_try\"") >&5
20238   (eval $ac_try) 2>&5
20239   ac_status=$?
20240   echo "$as_me:20240: \$? = $ac_status" >&5
20241   (exit $ac_status); }; }; then
20242   cf_cv_cgetent=yes
20243 else
20244   echo "$as_me: failed program was:" >&5
20245 cat conftest.$ac_ext >&5
20246 cf_cv_cgetent=no
20247 fi
20248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20249
20250 fi
20251 echo "$as_me:20251: result: $cf_cv_cgetent" >&5
20252 echo "${ECHO_T}$cf_cv_cgetent" >&6
20253
20254 if test "$cf_cv_cgetent" = yes
20255 then
20256
20257 cat >>confdefs.h <<\EOF
20258 #define HAVE_BSD_CGETENT 1
20259 EOF
20260
20261 echo "$as_me:20261: checking if cgetent uses const parameter" >&5
20262 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20263 if test "${cf_cv_cgetent_const+set}" = set; then
20264   echo $ECHO_N "(cached) $ECHO_C" >&6
20265 else
20266
20267 cat >conftest.$ac_ext <<_ACEOF
20268 #line 20268 "configure"
20269 #include "confdefs.h"
20270
20271 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20272 #include <stdlib.h>
20273 int
20274 main (void)
20275 {
20276
20277         char temp[128];
20278         char *buf = temp;
20279 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20280         const char *db_array = temp;
20281         cgetent(&buf, &db_array, "vt100");
20282 #endif
20283         cgetcap(buf, "tc", '=');
20284         cgetmatch(buf, "tc");
20285
20286   ;
20287   return 0;
20288 }
20289 _ACEOF
20290 rm -f conftest.$ac_objext conftest$ac_exeext
20291 if { (eval echo "$as_me:20291: \"$ac_link\"") >&5
20292   (eval $ac_link) 2>&5
20293   ac_status=$?
20294   echo "$as_me:20294: \$? = $ac_status" >&5
20295   (exit $ac_status); } &&
20296          { ac_try='test -s conftest$ac_exeext'
20297   { (eval echo "$as_me:20297: \"$ac_try\"") >&5
20298   (eval $ac_try) 2>&5
20299   ac_status=$?
20300   echo "$as_me:20300: \$? = $ac_status" >&5
20301   (exit $ac_status); }; }; then
20302   cf_cv_cgetent_const=yes
20303 else
20304   echo "$as_me: failed program was:" >&5
20305 cat conftest.$ac_ext >&5
20306 cf_cv_cgetent_const=no
20307 fi
20308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20309
20310 fi
20311 echo "$as_me:20311: result: $cf_cv_cgetent_const" >&5
20312 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20313         if test "$cf_cv_cgetent_const" = yes
20314         then
20315
20316 cat >>confdefs.h <<EOF
20317 #define CGETENT_CONST const
20318 EOF
20319
20320         fi
20321 fi
20322
20323 fi
20324
20325 echo "$as_me:20325: checking for isascii" >&5
20326 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20327 if test "${cf_cv_have_isascii+set}" = set; then
20328   echo $ECHO_N "(cached) $ECHO_C" >&6
20329 else
20330
20331         cat >conftest.$ac_ext <<_ACEOF
20332 #line 20332 "configure"
20333 #include "confdefs.h"
20334 #include <ctype.h>
20335 int
20336 main (void)
20337 {
20338 int x = isascii(' ')
20339   ;
20340   return 0;
20341 }
20342 _ACEOF
20343 rm -f conftest.$ac_objext conftest$ac_exeext
20344 if { (eval echo "$as_me:20344: \"$ac_link\"") >&5
20345   (eval $ac_link) 2>&5
20346   ac_status=$?
20347   echo "$as_me:20347: \$? = $ac_status" >&5
20348   (exit $ac_status); } &&
20349          { ac_try='test -s conftest$ac_exeext'
20350   { (eval echo "$as_me:20350: \"$ac_try\"") >&5
20351   (eval $ac_try) 2>&5
20352   ac_status=$?
20353   echo "$as_me:20353: \$? = $ac_status" >&5
20354   (exit $ac_status); }; }; then
20355   cf_cv_have_isascii=yes
20356 else
20357   echo "$as_me: failed program was:" >&5
20358 cat conftest.$ac_ext >&5
20359 cf_cv_have_isascii=no
20360 fi
20361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20362
20363 fi
20364 echo "$as_me:20364: result: $cf_cv_have_isascii" >&5
20365 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20366 test "$cf_cv_have_isascii" = yes &&
20367 cat >>confdefs.h <<\EOF
20368 #define HAVE_ISASCII 1
20369 EOF
20370
20371 if test "$ac_cv_func_sigaction" = yes; then
20372 echo "$as_me:20372: checking whether sigaction needs _POSIX_SOURCE" >&5
20373 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20374 cat >conftest.$ac_ext <<_ACEOF
20375 #line 20375 "configure"
20376 #include "confdefs.h"
20377
20378 #include <sys/types.h>
20379 #include <signal.h>
20380 int
20381 main (void)
20382 {
20383 struct sigaction act
20384   ;
20385   return 0;
20386 }
20387 _ACEOF
20388 rm -f conftest.$ac_objext
20389 if { (eval echo "$as_me:20389: \"$ac_compile\"") >&5
20390   (eval $ac_compile) 2>&5
20391   ac_status=$?
20392   echo "$as_me:20392: \$? = $ac_status" >&5
20393   (exit $ac_status); } &&
20394          { ac_try='test -s conftest.$ac_objext'
20395   { (eval echo "$as_me:20395: \"$ac_try\"") >&5
20396   (eval $ac_try) 2>&5
20397   ac_status=$?
20398   echo "$as_me:20398: \$? = $ac_status" >&5
20399   (exit $ac_status); }; }; then
20400   sigact_bad=no
20401 else
20402   echo "$as_me: failed program was:" >&5
20403 cat conftest.$ac_ext >&5
20404
20405 cat >conftest.$ac_ext <<_ACEOF
20406 #line 20406 "configure"
20407 #include "confdefs.h"
20408
20409 #define _POSIX_SOURCE
20410 #include <sys/types.h>
20411 #include <signal.h>
20412 int
20413 main (void)
20414 {
20415 struct sigaction act
20416   ;
20417   return 0;
20418 }
20419 _ACEOF
20420 rm -f conftest.$ac_objext
20421 if { (eval echo "$as_me:20421: \"$ac_compile\"") >&5
20422   (eval $ac_compile) 2>&5
20423   ac_status=$?
20424   echo "$as_me:20424: \$? = $ac_status" >&5
20425   (exit $ac_status); } &&
20426          { ac_try='test -s conftest.$ac_objext'
20427   { (eval echo "$as_me:20427: \"$ac_try\"") >&5
20428   (eval $ac_try) 2>&5
20429   ac_status=$?
20430   echo "$as_me:20430: \$? = $ac_status" >&5
20431   (exit $ac_status); }; }; then
20432   sigact_bad=yes
20433
20434 cat >>confdefs.h <<\EOF
20435 #define _POSIX_SOURCE 1
20436 EOF
20437
20438 else
20439   echo "$as_me: failed program was:" >&5
20440 cat conftest.$ac_ext >&5
20441 sigact_bad=unknown
20442 fi
20443 rm -f conftest.$ac_objext conftest.$ac_ext
20444 fi
20445 rm -f conftest.$ac_objext conftest.$ac_ext
20446 echo "$as_me:20446: result: $sigact_bad" >&5
20447 echo "${ECHO_T}$sigact_bad" >&6
20448 fi
20449
20450 echo "$as_me:20450: checking if nanosleep really works" >&5
20451 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20452 if test "${cf_cv_func_nanosleep+set}" = set; then
20453   echo $ECHO_N "(cached) $ECHO_C" >&6
20454 else
20455
20456 if test "$cross_compiling" = yes; then
20457   cf_cv_func_nanosleep=unknown
20458 else
20459   cat >conftest.$ac_ext <<_ACEOF
20460 #line 20460 "configure"
20461 #include "confdefs.h"
20462
20463 #include <stdio.h>
20464 #include <errno.h>
20465 #include <time.h>
20466
20467 #ifdef HAVE_SYS_TIME_H
20468 #include <sys/time.h>
20469 #endif
20470
20471 int main(void) {
20472         struct timespec ts1, ts2;
20473         int code;
20474         ts1.tv_sec  = 0;
20475         ts1.tv_nsec = 750000000;
20476         ts2.tv_sec  = 0;
20477         ts2.tv_nsec = 0;
20478         errno = 0;
20479         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20480         ${cf_cv_main_return:-return}(code != 0);
20481 }
20482
20483 _ACEOF
20484 rm -f conftest$ac_exeext
20485 if { (eval echo "$as_me:20485: \"$ac_link\"") >&5
20486   (eval $ac_link) 2>&5
20487   ac_status=$?
20488   echo "$as_me:20488: \$? = $ac_status" >&5
20489   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20490   { (eval echo "$as_me:20490: \"$ac_try\"") >&5
20491   (eval $ac_try) 2>&5
20492   ac_status=$?
20493   echo "$as_me:20493: \$? = $ac_status" >&5
20494   (exit $ac_status); }; }; then
20495   cf_cv_func_nanosleep=yes
20496 else
20497   echo "$as_me: program exited with status $ac_status" >&5
20498 echo "$as_me: failed program was:" >&5
20499 cat conftest.$ac_ext >&5
20500 cf_cv_func_nanosleep=no
20501 fi
20502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20503 fi
20504 fi
20505 echo "$as_me:20505: result: $cf_cv_func_nanosleep" >&5
20506 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20507
20508 test "$cf_cv_func_nanosleep" = "yes" &&
20509 cat >>confdefs.h <<\EOF
20510 #define HAVE_NANOSLEEP 1
20511 EOF
20512
20513 for ac_header in \
20514 termio.h \
20515 termios.h \
20516 unistd.h \
20517 sys/ioctl.h \
20518 sys/termio.h \
20519
20520 do
20521 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20522 echo "$as_me:20522: checking for $ac_header" >&5
20523 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20524 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20525   echo $ECHO_N "(cached) $ECHO_C" >&6
20526 else
20527   cat >conftest.$ac_ext <<_ACEOF
20528 #line 20528 "configure"
20529 #include "confdefs.h"
20530 #include <$ac_header>
20531 _ACEOF
20532 if { (eval echo "$as_me:20532: \"$ac_cpp conftest.$ac_ext\"") >&5
20533   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20534   ac_status=$?
20535   egrep -v '^ *\+' conftest.er1 >conftest.err
20536   rm -f conftest.er1
20537   cat conftest.err >&5
20538   echo "$as_me:20538: \$? = $ac_status" >&5
20539   (exit $ac_status); } >/dev/null; then
20540   if test -s conftest.err; then
20541     ac_cpp_err=$ac_c_preproc_warn_flag
20542   else
20543     ac_cpp_err=
20544   fi
20545 else
20546   ac_cpp_err=yes
20547 fi
20548 if test -z "$ac_cpp_err"; then
20549   eval "$as_ac_Header=yes"
20550 else
20551   echo "$as_me: failed program was:" >&5
20552   cat conftest.$ac_ext >&5
20553   eval "$as_ac_Header=no"
20554 fi
20555 rm -f conftest.err conftest.$ac_ext
20556 fi
20557 echo "$as_me:20557: result: `eval echo '${'$as_ac_Header'}'`" >&5
20558 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20559 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20560   cat >>confdefs.h <<EOF
20561 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20562 EOF
20563
20564 fi
20565 done
20566
20567 if test "$ac_cv_header_termios_h" = yes ; then
20568         case "$CFLAGS $CPPFLAGS" in
20569         (*-D_POSIX_SOURCE*)
20570                 termios_bad=dunno ;;
20571         (*)     termios_bad=maybe ;;
20572         esac
20573         if test "$termios_bad" = maybe ; then
20574         echo "$as_me:20574: checking whether termios.h needs _POSIX_SOURCE" >&5
20575 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20576         cat >conftest.$ac_ext <<_ACEOF
20577 #line 20577 "configure"
20578 #include "confdefs.h"
20579 #include <termios.h>
20580 int
20581 main (void)
20582 {
20583 struct termios foo; int x = foo.c_iflag = 1; (void)x
20584   ;
20585   return 0;
20586 }
20587 _ACEOF
20588 rm -f conftest.$ac_objext
20589 if { (eval echo "$as_me:20589: \"$ac_compile\"") >&5
20590   (eval $ac_compile) 2>&5
20591   ac_status=$?
20592   echo "$as_me:20592: \$? = $ac_status" >&5
20593   (exit $ac_status); } &&
20594          { ac_try='test -s conftest.$ac_objext'
20595   { (eval echo "$as_me:20595: \"$ac_try\"") >&5
20596   (eval $ac_try) 2>&5
20597   ac_status=$?
20598   echo "$as_me:20598: \$? = $ac_status" >&5
20599   (exit $ac_status); }; }; then
20600   termios_bad=no
20601 else
20602   echo "$as_me: failed program was:" >&5
20603 cat conftest.$ac_ext >&5
20604
20605                 cat >conftest.$ac_ext <<_ACEOF
20606 #line 20606 "configure"
20607 #include "confdefs.h"
20608
20609 #define _POSIX_SOURCE
20610 #include <termios.h>
20611 int
20612 main (void)
20613 {
20614 struct termios foo; int x = foo.c_iflag = 2; (void)x
20615   ;
20616   return 0;
20617 }
20618 _ACEOF
20619 rm -f conftest.$ac_objext
20620 if { (eval echo "$as_me:20620: \"$ac_compile\"") >&5
20621   (eval $ac_compile) 2>&5
20622   ac_status=$?
20623   echo "$as_me:20623: \$? = $ac_status" >&5
20624   (exit $ac_status); } &&
20625          { ac_try='test -s conftest.$ac_objext'
20626   { (eval echo "$as_me:20626: \"$ac_try\"") >&5
20627   (eval $ac_try) 2>&5
20628   ac_status=$?
20629   echo "$as_me:20629: \$? = $ac_status" >&5
20630   (exit $ac_status); }; }; then
20631   termios_bad=unknown
20632 else
20633   echo "$as_me: failed program was:" >&5
20634 cat conftest.$ac_ext >&5
20635 termios_bad=yes
20636 cat >>confdefs.h <<\EOF
20637 #define _POSIX_SOURCE 1
20638 EOF
20639
20640 fi
20641 rm -f conftest.$ac_objext conftest.$ac_ext
20642
20643 fi
20644 rm -f conftest.$ac_objext conftest.$ac_ext
20645         echo "$as_me:20645: result: $termios_bad" >&5
20646 echo "${ECHO_T}$termios_bad" >&6
20647         fi
20648 fi
20649
20650 echo "$as_me:20650: checking for tcgetattr" >&5
20651 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20652 if test "${cf_cv_have_tcgetattr+set}" = set; then
20653   echo $ECHO_N "(cached) $ECHO_C" >&6
20654 else
20655
20656 cat >conftest.$ac_ext <<_ACEOF
20657 #line 20657 "configure"
20658 #include "confdefs.h"
20659
20660 #include <sys/types.h>
20661 #ifdef HAVE_UNISTD_H
20662 #include <unistd.h>
20663 #endif
20664 #ifdef HAVE_TERMIOS_H
20665 #include <termios.h>
20666 #define TTY struct termios
20667 #else
20668 #ifdef HAVE_TERMIO_H
20669 #include <termio.h>
20670 #define TTY struct termio
20671 #endif
20672 #endif
20673
20674 int
20675 main (void)
20676 {
20677
20678 TTY foo;
20679 tcgetattr(1, &foo);
20680   ;
20681   return 0;
20682 }
20683 _ACEOF
20684 rm -f conftest.$ac_objext conftest$ac_exeext
20685 if { (eval echo "$as_me:20685: \"$ac_link\"") >&5
20686   (eval $ac_link) 2>&5
20687   ac_status=$?
20688   echo "$as_me:20688: \$? = $ac_status" >&5
20689   (exit $ac_status); } &&
20690          { ac_try='test -s conftest$ac_exeext'
20691   { (eval echo "$as_me:20691: \"$ac_try\"") >&5
20692   (eval $ac_try) 2>&5
20693   ac_status=$?
20694   echo "$as_me:20694: \$? = $ac_status" >&5
20695   (exit $ac_status); }; }; then
20696   cf_cv_have_tcgetattr=yes
20697 else
20698   echo "$as_me: failed program was:" >&5
20699 cat conftest.$ac_ext >&5
20700 cf_cv_have_tcgetattr=no
20701 fi
20702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20703 fi
20704 echo "$as_me:20704: result: $cf_cv_have_tcgetattr" >&5
20705 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20706 test "$cf_cv_have_tcgetattr" = yes &&
20707 cat >>confdefs.h <<\EOF
20708 #define HAVE_TCGETATTR 1
20709 EOF
20710
20711 echo "$as_me:20711: checking for vsscanf function or workaround" >&5
20712 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20713 if test "${cf_cv_func_vsscanf+set}" = set; then
20714   echo $ECHO_N "(cached) $ECHO_C" >&6
20715 else
20716
20717 cat >conftest.$ac_ext <<_ACEOF
20718 #line 20718 "configure"
20719 #include "confdefs.h"
20720
20721 #include <stdarg.h>
20722 #include <stdio.h>
20723 int
20724 main (void)
20725 {
20726
20727         va_list ap;
20728         vsscanf("from", "%d", ap)
20729   ;
20730   return 0;
20731 }
20732 _ACEOF
20733 rm -f conftest.$ac_objext conftest$ac_exeext
20734 if { (eval echo "$as_me:20734: \"$ac_link\"") >&5
20735   (eval $ac_link) 2>&5
20736   ac_status=$?
20737   echo "$as_me:20737: \$? = $ac_status" >&5
20738   (exit $ac_status); } &&
20739          { ac_try='test -s conftest$ac_exeext'
20740   { (eval echo "$as_me:20740: \"$ac_try\"") >&5
20741   (eval $ac_try) 2>&5
20742   ac_status=$?
20743   echo "$as_me:20743: \$? = $ac_status" >&5
20744   (exit $ac_status); }; }; then
20745   cf_cv_func_vsscanf=vsscanf
20746 else
20747   echo "$as_me: failed program was:" >&5
20748 cat conftest.$ac_ext >&5
20749
20750 cat >conftest.$ac_ext <<_ACEOF
20751 #line 20751 "configure"
20752 #include "confdefs.h"
20753
20754 #include <stdarg.h>
20755 #include <stdio.h>
20756 int
20757 main (void)
20758 {
20759
20760         FILE strbuf;
20761         char *str = "from";
20762
20763         strbuf._flag = _IOREAD;
20764         strbuf._ptr = strbuf._base = (unsigned char *) str;
20765         strbuf._cnt = strlen(str);
20766         strbuf._file = _NFILE;
20767         return (vfscanf(&strbuf, "%d", ap))
20768   ;
20769   return 0;
20770 }
20771 _ACEOF
20772 rm -f conftest.$ac_objext conftest$ac_exeext
20773 if { (eval echo "$as_me:20773: \"$ac_link\"") >&5
20774   (eval $ac_link) 2>&5
20775   ac_status=$?
20776   echo "$as_me:20776: \$? = $ac_status" >&5
20777   (exit $ac_status); } &&
20778          { ac_try='test -s conftest$ac_exeext'
20779   { (eval echo "$as_me:20779: \"$ac_try\"") >&5
20780   (eval $ac_try) 2>&5
20781   ac_status=$?
20782   echo "$as_me:20782: \$? = $ac_status" >&5
20783   (exit $ac_status); }; }; then
20784   cf_cv_func_vsscanf=vfscanf
20785 else
20786   echo "$as_me: failed program was:" >&5
20787 cat conftest.$ac_ext >&5
20788
20789 cat >conftest.$ac_ext <<_ACEOF
20790 #line 20790 "configure"
20791 #include "confdefs.h"
20792
20793 #include <stdarg.h>
20794 #include <stdio.h>
20795 int
20796 main (void)
20797 {
20798
20799         FILE strbuf;
20800         char *str = "from";
20801
20802         strbuf._flag = _IOREAD;
20803         strbuf._ptr = strbuf._base = (unsigned char *) str;
20804         strbuf._cnt = strlen(str);
20805         strbuf._file = _NFILE;
20806         return (_doscan(&strbuf, "%d", ap))
20807   ;
20808   return 0;
20809 }
20810 _ACEOF
20811 rm -f conftest.$ac_objext conftest$ac_exeext
20812 if { (eval echo "$as_me:20812: \"$ac_link\"") >&5
20813   (eval $ac_link) 2>&5
20814   ac_status=$?
20815   echo "$as_me:20815: \$? = $ac_status" >&5
20816   (exit $ac_status); } &&
20817          { ac_try='test -s conftest$ac_exeext'
20818   { (eval echo "$as_me:20818: \"$ac_try\"") >&5
20819   (eval $ac_try) 2>&5
20820   ac_status=$?
20821   echo "$as_me:20821: \$? = $ac_status" >&5
20822   (exit $ac_status); }; }; then
20823   cf_cv_func_vsscanf=_doscan
20824 else
20825   echo "$as_me: failed program was:" >&5
20826 cat conftest.$ac_ext >&5
20827
20828 cf_cv_func_vsscanf=no
20829 fi
20830 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20831 fi
20832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20833 fi
20834 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20835 fi
20836 echo "$as_me:20836: result: $cf_cv_func_vsscanf" >&5
20837 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20838
20839 case $cf_cv_func_vsscanf in
20840 (vsscanf)
20841 cat >>confdefs.h <<\EOF
20842 #define HAVE_VSSCANF 1
20843 EOF
20844 ;;
20845 (vfscanf)
20846 cat >>confdefs.h <<\EOF
20847 #define HAVE_VFSCANF 1
20848 EOF
20849 ;;
20850 (_doscan)
20851 cat >>confdefs.h <<\EOF
20852 #define HAVE__DOSCAN 1
20853 EOF
20854 ;;
20855 esac
20856
20857 for ac_header in \
20858 unistd.h \
20859
20860 do
20861 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20862 echo "$as_me:20862: checking for $ac_header" >&5
20863 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20864 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20865   echo $ECHO_N "(cached) $ECHO_C" >&6
20866 else
20867   cat >conftest.$ac_ext <<_ACEOF
20868 #line 20868 "configure"
20869 #include "confdefs.h"
20870 #include <$ac_header>
20871 _ACEOF
20872 if { (eval echo "$as_me:20872: \"$ac_cpp conftest.$ac_ext\"") >&5
20873   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20874   ac_status=$?
20875   egrep -v '^ *\+' conftest.er1 >conftest.err
20876   rm -f conftest.er1
20877   cat conftest.err >&5
20878   echo "$as_me:20878: \$? = $ac_status" >&5
20879   (exit $ac_status); } >/dev/null; then
20880   if test -s conftest.err; then
20881     ac_cpp_err=$ac_c_preproc_warn_flag
20882   else
20883     ac_cpp_err=
20884   fi
20885 else
20886   ac_cpp_err=yes
20887 fi
20888 if test -z "$ac_cpp_err"; then
20889   eval "$as_ac_Header=yes"
20890 else
20891   echo "$as_me: failed program was:" >&5
20892   cat conftest.$ac_ext >&5
20893   eval "$as_ac_Header=no"
20894 fi
20895 rm -f conftest.err conftest.$ac_ext
20896 fi
20897 echo "$as_me:20897: result: `eval echo '${'$as_ac_Header'}'`" >&5
20898 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20899 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20900   cat >>confdefs.h <<EOF
20901 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20902 EOF
20903
20904 fi
20905 done
20906
20907 echo "$as_me:20907: checking for working mkstemp" >&5
20908 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20909 if test "${cf_cv_func_mkstemp+set}" = set; then
20910   echo $ECHO_N "(cached) $ECHO_C" >&6
20911 else
20912
20913 rm -rf conftest*
20914 if test "$cross_compiling" = yes; then
20915   cf_cv_func_mkstemp=maybe
20916 else
20917   cat >conftest.$ac_ext <<_ACEOF
20918 #line 20918 "configure"
20919 #include "confdefs.h"
20920
20921 #include <sys/types.h>
20922 #ifdef HAVE_UNISTD_H
20923 #include <unistd.h>
20924 #endif
20925 #include <stdlib.h>
20926 #include <stdio.h>
20927 #include <string.h>
20928 #include <sys/stat.h>
20929 int main(void)
20930 {
20931         char *tmpl = "conftestXXXXXX";
20932         char name[2][80];
20933         int n;
20934         int result = 0;
20935         int fd;
20936         struct stat sb;
20937
20938         umask(077);
20939         for (n = 0; n < 2; ++n) {
20940                 strcpy(name[n], tmpl);
20941                 if ((fd = mkstemp(name[n])) >= 0) {
20942                         if (!strcmp(name[n], tmpl)
20943                          || stat(name[n], &sb) != 0
20944                          || (sb.st_mode & S_IFMT) != S_IFREG
20945                          || (sb.st_mode & 077) != 0) {
20946                                 result = 1;
20947                         }
20948                         close(fd);
20949                 }
20950         }
20951         if (result == 0
20952          && !strcmp(name[0], name[1]))
20953                 result = 1;
20954         ${cf_cv_main_return:-return}(result);
20955 }
20956
20957 _ACEOF
20958 rm -f conftest$ac_exeext
20959 if { (eval echo "$as_me:20959: \"$ac_link\"") >&5
20960   (eval $ac_link) 2>&5
20961   ac_status=$?
20962   echo "$as_me:20962: \$? = $ac_status" >&5
20963   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20964   { (eval echo "$as_me:20964: \"$ac_try\"") >&5
20965   (eval $ac_try) 2>&5
20966   ac_status=$?
20967   echo "$as_me:20967: \$? = $ac_status" >&5
20968   (exit $ac_status); }; }; then
20969   cf_cv_func_mkstemp=yes
20970
20971 else
20972   echo "$as_me: program exited with status $ac_status" >&5
20973 echo "$as_me: failed program was:" >&5
20974 cat conftest.$ac_ext >&5
20975 cf_cv_func_mkstemp=no
20976
20977 fi
20978 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20979 fi
20980
20981 fi
20982 echo "$as_me:20982: result: $cf_cv_func_mkstemp" >&5
20983 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20984 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20985         echo "$as_me:20985: checking for mkstemp" >&5
20986 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20987 if test "${ac_cv_func_mkstemp+set}" = set; then
20988   echo $ECHO_N "(cached) $ECHO_C" >&6
20989 else
20990   cat >conftest.$ac_ext <<_ACEOF
20991 #line 20991 "configure"
20992 #include "confdefs.h"
20993 #define mkstemp autoconf_temporary
20994 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20995 #undef mkstemp
20996
20997 #ifdef __cplusplus
20998 extern "C"
20999 #endif
21000
21001 /* We use char because int might match the return type of a gcc2
21002    builtin and then its argument prototype would still apply.  */
21003 char mkstemp (void);
21004
21005 int
21006 main (void)
21007 {
21008
21009 /* The GNU C library defines stubs for functions which it implements
21010     to always fail with ENOSYS.  Some functions are actually named
21011     something starting with __ and the normal name is an alias.  */
21012 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21013 #error found stub for mkstemp
21014 #endif
21015
21016         return mkstemp ();
21017   ;
21018   return 0;
21019 }
21020 _ACEOF
21021 rm -f conftest.$ac_objext conftest$ac_exeext
21022 if { (eval echo "$as_me:21022: \"$ac_link\"") >&5
21023   (eval $ac_link) 2>&5
21024   ac_status=$?
21025   echo "$as_me:21025: \$? = $ac_status" >&5
21026   (exit $ac_status); } &&
21027          { ac_try='test -s conftest$ac_exeext'
21028   { (eval echo "$as_me:21028: \"$ac_try\"") >&5
21029   (eval $ac_try) 2>&5
21030   ac_status=$?
21031   echo "$as_me:21031: \$? = $ac_status" >&5
21032   (exit $ac_status); }; }; then
21033   ac_cv_func_mkstemp=yes
21034 else
21035   echo "$as_me: failed program was:" >&5
21036 cat conftest.$ac_ext >&5
21037 ac_cv_func_mkstemp=no
21038 fi
21039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21040 fi
21041 echo "$as_me:21041: result: $ac_cv_func_mkstemp" >&5
21042 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21043
21044 fi
21045 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21046
21047 cat >>confdefs.h <<\EOF
21048 #define HAVE_MKSTEMP 1
21049 EOF
21050
21051 fi
21052
21053 # setup for prototype of fallback for vsscanf()
21054
21055 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21056         HAVE_VSSCANF=1
21057 else
21058         HAVE_VSSCANF=0
21059 fi
21060
21061 if test "x$cross_compiling" = xyes ; then
21062         { echo "$as_me:21062: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21063 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21064 else
21065         echo "$as_me:21065: checking whether setvbuf arguments are reversed" >&5
21066 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21067 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21068   echo $ECHO_N "(cached) $ECHO_C" >&6
21069 else
21070   if test "$cross_compiling" = yes; then
21071   { { echo "$as_me:21071: error: cannot run test program while cross compiling" >&5
21072 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21073    { (exit 1); exit 1; }; }
21074 else
21075   cat >conftest.$ac_ext <<_ACEOF
21076 #line 21076 "configure"
21077 #include "confdefs.h"
21078 #include <stdio.h>
21079 /* If setvbuf has the reversed format, exit 0. */
21080 int
21081 main (void)
21082 {
21083   /* This call has the arguments reversed.
21084      A reversed system may check and see that the address of main
21085      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21086   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21087     $ac_main_return(1);
21088   putc('\r', stdout);
21089   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21090 }
21091 _ACEOF
21092 rm -f conftest$ac_exeext
21093 if { (eval echo "$as_me:21093: \"$ac_link\"") >&5
21094   (eval $ac_link) 2>&5
21095   ac_status=$?
21096   echo "$as_me:21096: \$? = $ac_status" >&5
21097   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21098   { (eval echo "$as_me:21098: \"$ac_try\"") >&5
21099   (eval $ac_try) 2>&5
21100   ac_status=$?
21101   echo "$as_me:21101: \$? = $ac_status" >&5
21102   (exit $ac_status); }; }; then
21103   ac_cv_func_setvbuf_reversed=yes
21104 else
21105   echo "$as_me: program exited with status $ac_status" >&5
21106 echo "$as_me: failed program was:" >&5
21107 cat conftest.$ac_ext >&5
21108 ac_cv_func_setvbuf_reversed=no
21109 fi
21110 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21111 fi
21112 rm -f core core.* *.core
21113 fi
21114 echo "$as_me:21114: result: $ac_cv_func_setvbuf_reversed" >&5
21115 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21116 if test $ac_cv_func_setvbuf_reversed = yes; then
21117
21118 cat >>confdefs.h <<\EOF
21119 #define SETVBUF_REVERSED 1
21120 EOF
21121
21122 fi
21123
21124 fi
21125 echo "$as_me:21125: checking for intptr_t" >&5
21126 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21127 if test "${ac_cv_type_intptr_t+set}" = set; then
21128   echo $ECHO_N "(cached) $ECHO_C" >&6
21129 else
21130   cat >conftest.$ac_ext <<_ACEOF
21131 #line 21131 "configure"
21132 #include "confdefs.h"
21133 $ac_includes_default
21134 int
21135 main (void)
21136 {
21137 if ((intptr_t *) 0)
21138   return 0;
21139 if (sizeof (intptr_t))
21140   return 0;
21141   ;
21142   return 0;
21143 }
21144 _ACEOF
21145 rm -f conftest.$ac_objext
21146 if { (eval echo "$as_me:21146: \"$ac_compile\"") >&5
21147   (eval $ac_compile) 2>&5
21148   ac_status=$?
21149   echo "$as_me:21149: \$? = $ac_status" >&5
21150   (exit $ac_status); } &&
21151          { ac_try='test -s conftest.$ac_objext'
21152   { (eval echo "$as_me:21152: \"$ac_try\"") >&5
21153   (eval $ac_try) 2>&5
21154   ac_status=$?
21155   echo "$as_me:21155: \$? = $ac_status" >&5
21156   (exit $ac_status); }; }; then
21157   ac_cv_type_intptr_t=yes
21158 else
21159   echo "$as_me: failed program was:" >&5
21160 cat conftest.$ac_ext >&5
21161 ac_cv_type_intptr_t=no
21162 fi
21163 rm -f conftest.$ac_objext conftest.$ac_ext
21164 fi
21165 echo "$as_me:21165: result: $ac_cv_type_intptr_t" >&5
21166 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21167 if test $ac_cv_type_intptr_t = yes; then
21168   :
21169 else
21170
21171 cat >>confdefs.h <<EOF
21172 #define intptr_t long
21173 EOF
21174
21175 fi
21176
21177 echo "$as_me:21177: checking for ssize_t" >&5
21178 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21179 if test "${ac_cv_type_ssize_t+set}" = set; then
21180   echo $ECHO_N "(cached) $ECHO_C" >&6
21181 else
21182   cat >conftest.$ac_ext <<_ACEOF
21183 #line 21183 "configure"
21184 #include "confdefs.h"
21185 $ac_includes_default
21186 int
21187 main (void)
21188 {
21189 if ((ssize_t *) 0)
21190   return 0;
21191 if (sizeof (ssize_t))
21192   return 0;
21193   ;
21194   return 0;
21195 }
21196 _ACEOF
21197 rm -f conftest.$ac_objext
21198 if { (eval echo "$as_me:21198: \"$ac_compile\"") >&5
21199   (eval $ac_compile) 2>&5
21200   ac_status=$?
21201   echo "$as_me:21201: \$? = $ac_status" >&5
21202   (exit $ac_status); } &&
21203          { ac_try='test -s conftest.$ac_objext'
21204   { (eval echo "$as_me:21204: \"$ac_try\"") >&5
21205   (eval $ac_try) 2>&5
21206   ac_status=$?
21207   echo "$as_me:21207: \$? = $ac_status" >&5
21208   (exit $ac_status); }; }; then
21209   ac_cv_type_ssize_t=yes
21210 else
21211   echo "$as_me: failed program was:" >&5
21212 cat conftest.$ac_ext >&5
21213 ac_cv_type_ssize_t=no
21214 fi
21215 rm -f conftest.$ac_objext conftest.$ac_ext
21216 fi
21217 echo "$as_me:21217: result: $ac_cv_type_ssize_t" >&5
21218 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21219 if test $ac_cv_type_ssize_t = yes; then
21220   :
21221 else
21222
21223 cat >>confdefs.h <<EOF
21224 #define ssize_t int
21225 EOF
21226
21227 fi
21228
21229 echo "$as_me:21229: checking for type sigaction_t" >&5
21230 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21231 if test "${cf_cv_type_sigaction+set}" = set; then
21232   echo $ECHO_N "(cached) $ECHO_C" >&6
21233 else
21234
21235         cat >conftest.$ac_ext <<_ACEOF
21236 #line 21236 "configure"
21237 #include "confdefs.h"
21238
21239 #include <signal.h>
21240 int
21241 main (void)
21242 {
21243 sigaction_t x
21244   ;
21245   return 0;
21246 }
21247 _ACEOF
21248 rm -f conftest.$ac_objext
21249 if { (eval echo "$as_me:21249: \"$ac_compile\"") >&5
21250   (eval $ac_compile) 2>&5
21251   ac_status=$?
21252   echo "$as_me:21252: \$? = $ac_status" >&5
21253   (exit $ac_status); } &&
21254          { ac_try='test -s conftest.$ac_objext'
21255   { (eval echo "$as_me:21255: \"$ac_try\"") >&5
21256   (eval $ac_try) 2>&5
21257   ac_status=$?
21258   echo "$as_me:21258: \$? = $ac_status" >&5
21259   (exit $ac_status); }; }; then
21260   cf_cv_type_sigaction=yes
21261 else
21262   echo "$as_me: failed program was:" >&5
21263 cat conftest.$ac_ext >&5
21264 cf_cv_type_sigaction=no
21265 fi
21266 rm -f conftest.$ac_objext conftest.$ac_ext
21267 fi
21268
21269 echo "$as_me:21269: result: $cf_cv_type_sigaction" >&5
21270 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21271 test "$cf_cv_type_sigaction" = yes &&
21272 cat >>confdefs.h <<\EOF
21273 #define HAVE_TYPE_SIGACTION 1
21274 EOF
21275
21276 echo "$as_me:21276: checking declaration of size-change" >&5
21277 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21278 if test "${cf_cv_sizechange+set}" = set; then
21279   echo $ECHO_N "(cached) $ECHO_C" >&6
21280 else
21281
21282         cf_cv_sizechange=unknown
21283         cf_save_CPPFLAGS="$CPPFLAGS"
21284
21285 for cf_opts in "" "NEED_PTEM_H"
21286 do
21287
21288         CPPFLAGS="$cf_save_CPPFLAGS"
21289         if test -n "$cf_opts"
21290         then
21291
21292         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21293         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21294
21295         fi
21296         cat >conftest.$ac_ext <<_ACEOF
21297 #line 21297 "configure"
21298 #include "confdefs.h"
21299 #include <sys/types.h>
21300 #ifdef HAVE_TERMIOS_H
21301 #include <termios.h>
21302 #else
21303 #ifdef HAVE_TERMIO_H
21304 #include <termio.h>
21305 #endif
21306 #endif
21307
21308 #ifdef NEED_PTEM_H
21309 /* This is a workaround for SCO:  they neglected to define struct winsize in
21310  * termios.h -- it's only in termio.h and ptem.h
21311  */
21312 #include <sys/stream.h>
21313 #include <sys/ptem.h>
21314 #endif
21315
21316 #ifdef HAVE_SYS_IOCTL_H
21317 #include <sys/ioctl.h>
21318 #endif
21319
21320 int
21321 main (void)
21322 {
21323
21324 #ifdef TIOCGSIZE
21325         struct ttysize win;     /* SunOS 3.0... */
21326         int y = win.ts_lines = 2;
21327         int x = win.ts_cols = 1;
21328         (void)y;
21329         (void)x;
21330 #else
21331 #ifdef TIOCGWINSZ
21332         struct winsize win;     /* everything else */
21333         int y = win.ws_row = 2;
21334         int x = win.ws_col = 1;
21335         (void)y;
21336         (void)x;
21337 #else
21338         no TIOCGSIZE or TIOCGWINSZ
21339 #endif /* TIOCGWINSZ */
21340 #endif /* TIOCGSIZE */
21341
21342   ;
21343   return 0;
21344 }
21345 _ACEOF
21346 rm -f conftest.$ac_objext
21347 if { (eval echo "$as_me:21347: \"$ac_compile\"") >&5
21348   (eval $ac_compile) 2>&5
21349   ac_status=$?
21350   echo "$as_me:21350: \$? = $ac_status" >&5
21351   (exit $ac_status); } &&
21352          { ac_try='test -s conftest.$ac_objext'
21353   { (eval echo "$as_me:21353: \"$ac_try\"") >&5
21354   (eval $ac_try) 2>&5
21355   ac_status=$?
21356   echo "$as_me:21356: \$? = $ac_status" >&5
21357   (exit $ac_status); }; }; then
21358   cf_cv_sizechange=yes
21359 else
21360   echo "$as_me: failed program was:" >&5
21361 cat conftest.$ac_ext >&5
21362 cf_cv_sizechange=no
21363 fi
21364 rm -f conftest.$ac_objext conftest.$ac_ext
21365
21366         CPPFLAGS="$cf_save_CPPFLAGS"
21367         if test "$cf_cv_sizechange" = yes ; then
21368                 echo "size-change succeeded ($cf_opts)" >&5
21369                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21370                 break
21371         fi
21372 done
21373
21374 fi
21375 echo "$as_me:21375: result: $cf_cv_sizechange" >&5
21376 echo "${ECHO_T}$cf_cv_sizechange" >&6
21377 if test "$cf_cv_sizechange" != no ; then
21378
21379 cat >>confdefs.h <<\EOF
21380 #define HAVE_SIZECHANGE 1
21381 EOF
21382
21383         case $cf_cv_sizechange in
21384         (NEED*)
21385                 cat >>confdefs.h <<EOF
21386 #define $cf_cv_sizechange  1
21387 EOF
21388
21389                 ;;
21390         esac
21391 fi
21392
21393 echo "$as_me:21393: checking for memmove" >&5
21394 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21395 if test "${ac_cv_func_memmove+set}" = set; then
21396   echo $ECHO_N "(cached) $ECHO_C" >&6
21397 else
21398   cat >conftest.$ac_ext <<_ACEOF
21399 #line 21399 "configure"
21400 #include "confdefs.h"
21401 #define memmove autoconf_temporary
21402 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21403 #undef memmove
21404
21405 #ifdef __cplusplus
21406 extern "C"
21407 #endif
21408
21409 /* We use char because int might match the return type of a gcc2
21410    builtin and then its argument prototype would still apply.  */
21411 char memmove (void);
21412
21413 int
21414 main (void)
21415 {
21416
21417 /* The GNU C library defines stubs for functions which it implements
21418     to always fail with ENOSYS.  Some functions are actually named
21419     something starting with __ and the normal name is an alias.  */
21420 #if defined (__stub_memmove) || defined (__stub___memmove)
21421 #error found stub for memmove
21422 #endif
21423
21424         return memmove ();
21425   ;
21426   return 0;
21427 }
21428 _ACEOF
21429 rm -f conftest.$ac_objext conftest$ac_exeext
21430 if { (eval echo "$as_me:21430: \"$ac_link\"") >&5
21431   (eval $ac_link) 2>&5
21432   ac_status=$?
21433   echo "$as_me:21433: \$? = $ac_status" >&5
21434   (exit $ac_status); } &&
21435          { ac_try='test -s conftest$ac_exeext'
21436   { (eval echo "$as_me:21436: \"$ac_try\"") >&5
21437   (eval $ac_try) 2>&5
21438   ac_status=$?
21439   echo "$as_me:21439: \$? = $ac_status" >&5
21440   (exit $ac_status); }; }; then
21441   ac_cv_func_memmove=yes
21442 else
21443   echo "$as_me: failed program was:" >&5
21444 cat conftest.$ac_ext >&5
21445 ac_cv_func_memmove=no
21446 fi
21447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21448 fi
21449 echo "$as_me:21449: result: $ac_cv_func_memmove" >&5
21450 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21451 if test $ac_cv_func_memmove = yes; then
21452   :
21453 else
21454
21455 echo "$as_me:21455: checking for bcopy" >&5
21456 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21457 if test "${ac_cv_func_bcopy+set}" = set; then
21458   echo $ECHO_N "(cached) $ECHO_C" >&6
21459 else
21460   cat >conftest.$ac_ext <<_ACEOF
21461 #line 21461 "configure"
21462 #include "confdefs.h"
21463 #define bcopy autoconf_temporary
21464 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21465 #undef bcopy
21466
21467 #ifdef __cplusplus
21468 extern "C"
21469 #endif
21470
21471 /* We use char because int might match the return type of a gcc2
21472    builtin and then its argument prototype would still apply.  */
21473 char bcopy (void);
21474
21475 int
21476 main (void)
21477 {
21478
21479 /* The GNU C library defines stubs for functions which it implements
21480     to always fail with ENOSYS.  Some functions are actually named
21481     something starting with __ and the normal name is an alias.  */
21482 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21483 #error found stub for bcopy
21484 #endif
21485
21486         return bcopy ();
21487   ;
21488   return 0;
21489 }
21490 _ACEOF
21491 rm -f conftest.$ac_objext conftest$ac_exeext
21492 if { (eval echo "$as_me:21492: \"$ac_link\"") >&5
21493   (eval $ac_link) 2>&5
21494   ac_status=$?
21495   echo "$as_me:21495: \$? = $ac_status" >&5
21496   (exit $ac_status); } &&
21497          { ac_try='test -s conftest$ac_exeext'
21498   { (eval echo "$as_me:21498: \"$ac_try\"") >&5
21499   (eval $ac_try) 2>&5
21500   ac_status=$?
21501   echo "$as_me:21501: \$? = $ac_status" >&5
21502   (exit $ac_status); }; }; then
21503   ac_cv_func_bcopy=yes
21504 else
21505   echo "$as_me: failed program was:" >&5
21506 cat conftest.$ac_ext >&5
21507 ac_cv_func_bcopy=no
21508 fi
21509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21510 fi
21511 echo "$as_me:21511: result: $ac_cv_func_bcopy" >&5
21512 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21513 if test $ac_cv_func_bcopy = yes; then
21514
21515         echo "$as_me:21515: checking if bcopy does overlapping moves" >&5
21516 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21517 if test "${cf_cv_good_bcopy+set}" = set; then
21518   echo $ECHO_N "(cached) $ECHO_C" >&6
21519 else
21520
21521                 if test "$cross_compiling" = yes; then
21522   cf_cv_good_bcopy=unknown
21523 else
21524   cat >conftest.$ac_ext <<_ACEOF
21525 #line 21525 "configure"
21526 #include "confdefs.h"
21527
21528 int main(void) {
21529         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21530         char temp[40];
21531         bcopy(data, temp, sizeof(data));
21532         bcopy(temp+10, temp, 15);
21533         bcopy(temp+5, temp+15, 10);
21534         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21535 }
21536
21537 _ACEOF
21538 rm -f conftest$ac_exeext
21539 if { (eval echo "$as_me:21539: \"$ac_link\"") >&5
21540   (eval $ac_link) 2>&5
21541   ac_status=$?
21542   echo "$as_me:21542: \$? = $ac_status" >&5
21543   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21544   { (eval echo "$as_me:21544: \"$ac_try\"") >&5
21545   (eval $ac_try) 2>&5
21546   ac_status=$?
21547   echo "$as_me:21547: \$? = $ac_status" >&5
21548   (exit $ac_status); }; }; then
21549   cf_cv_good_bcopy=yes
21550 else
21551   echo "$as_me: program exited with status $ac_status" >&5
21552 echo "$as_me: failed program was:" >&5
21553 cat conftest.$ac_ext >&5
21554 cf_cv_good_bcopy=no
21555 fi
21556 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21557 fi
21558
21559 fi
21560 echo "$as_me:21560: result: $cf_cv_good_bcopy" >&5
21561 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21562
21563 else
21564   cf_cv_good_bcopy=no
21565 fi
21566
21567         if test "$cf_cv_good_bcopy" = yes ; then
21568
21569 cat >>confdefs.h <<\EOF
21570 #define USE_OK_BCOPY 1
21571 EOF
21572
21573         else
21574
21575 cat >>confdefs.h <<\EOF
21576 #define USE_MY_MEMMOVE 1
21577 EOF
21578
21579         fi
21580
21581 fi
21582
21583 tty 2>&1 >/dev/null || {
21584 for ac_func in posix_openpt
21585 do
21586 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21587 echo "$as_me:21587: checking for $ac_func" >&5
21588 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21589 if eval "test \"\${$as_ac_var+set}\" = set"; then
21590   echo $ECHO_N "(cached) $ECHO_C" >&6
21591 else
21592   cat >conftest.$ac_ext <<_ACEOF
21593 #line 21593 "configure"
21594 #include "confdefs.h"
21595 #define $ac_func autoconf_temporary
21596 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21597 #undef $ac_func
21598
21599 #ifdef __cplusplus
21600 extern "C"
21601 #endif
21602
21603 /* We use char because int might match the return type of a gcc2
21604    builtin and then its argument prototype would still apply.  */
21605 char $ac_func (void);
21606
21607 int
21608 main (void)
21609 {
21610
21611 /* The GNU C library defines stubs for functions which it implements
21612     to always fail with ENOSYS.  Some functions are actually named
21613     something starting with __ and the normal name is an alias.  */
21614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21615 #error found stub for $ac_func
21616 #endif
21617
21618         return $ac_func ();
21619   ;
21620   return 0;
21621 }
21622 _ACEOF
21623 rm -f conftest.$ac_objext conftest$ac_exeext
21624 if { (eval echo "$as_me:21624: \"$ac_link\"") >&5
21625   (eval $ac_link) 2>&5
21626   ac_status=$?
21627   echo "$as_me:21627: \$? = $ac_status" >&5
21628   (exit $ac_status); } &&
21629          { ac_try='test -s conftest$ac_exeext'
21630   { (eval echo "$as_me:21630: \"$ac_try\"") >&5
21631   (eval $ac_try) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit $ac_status); }; }; then
21635   eval "$as_ac_var=yes"
21636 else
21637   echo "$as_me: failed program was:" >&5
21638 cat conftest.$ac_ext >&5
21639 eval "$as_ac_var=no"
21640 fi
21641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21642 fi
21643 echo "$as_me:21643: result: `eval echo '${'$as_ac_var'}'`" >&5
21644 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21645 if test `eval echo '${'$as_ac_var'}'` = yes; then
21646   cat >>confdefs.h <<EOF
21647 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21648 EOF
21649
21650 fi
21651 done
21652  }
21653 echo "$as_me:21653: checking if poll really works" >&5
21654 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21655 if test "${cf_cv_working_poll+set}" = set; then
21656   echo $ECHO_N "(cached) $ECHO_C" >&6
21657 else
21658
21659 if test "$cross_compiling" = yes; then
21660   cf_cv_working_poll=unknown
21661 else
21662   cat >conftest.$ac_ext <<_ACEOF
21663 #line 21663 "configure"
21664 #include "confdefs.h"
21665
21666 #include <stdlib.h>
21667 #include <stdio.h>
21668 #include <unistd.h>
21669 #include <fcntl.h>
21670 #ifdef HAVE_POLL_H
21671 #include <poll.h>
21672 #else
21673 #include <sys/poll.h>
21674 #endif
21675 int main(void) {
21676         struct pollfd myfds;
21677         int ret;
21678
21679         /* check for Darwin bug with respect to "devices" */
21680         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21681         if (myfds.fd < 0)
21682                 myfds.fd = 0;
21683         myfds.events = POLLIN;
21684         myfds.revents = 0;
21685
21686         ret = poll(&myfds, 1, 100);
21687
21688         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21689                 ret = -1;
21690         } else {
21691                 int fd = 0;
21692                 if (!isatty(fd)) {
21693                         fd = open("/dev/tty", 2);       /* O_RDWR */
21694                 }
21695 #ifdef HAVE_POSIX_OPENPT
21696                 if (fd < 0) {
21697                         fd = posix_openpt(O_RDWR);
21698                 }
21699 #endif
21700
21701                 if (fd >= 0) {
21702                         /* also check with standard input */
21703                         myfds.fd = fd;
21704                         myfds.events = POLLIN;
21705                         myfds.revents = 0;
21706                         ret = poll(&myfds, 1, 100);
21707                 } else {
21708                         ret = -1;
21709                 }
21710         }
21711         ${cf_cv_main_return:-return}(ret < 0);
21712 }
21713 _ACEOF
21714 rm -f conftest$ac_exeext
21715 if { (eval echo "$as_me:21715: \"$ac_link\"") >&5
21716   (eval $ac_link) 2>&5
21717   ac_status=$?
21718   echo "$as_me:21718: \$? = $ac_status" >&5
21719   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21720   { (eval echo "$as_me:21720: \"$ac_try\"") >&5
21721   (eval $ac_try) 2>&5
21722   ac_status=$?
21723   echo "$as_me:21723: \$? = $ac_status" >&5
21724   (exit $ac_status); }; }; then
21725   cf_cv_working_poll=yes
21726 else
21727   echo "$as_me: program exited with status $ac_status" >&5
21728 echo "$as_me: failed program was:" >&5
21729 cat conftest.$ac_ext >&5
21730 cf_cv_working_poll=no
21731 fi
21732 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21733 fi
21734 fi
21735 echo "$as_me:21735: result: $cf_cv_working_poll" >&5
21736 echo "${ECHO_T}$cf_cv_working_poll" >&6
21737 test "$cf_cv_working_poll" = "yes" &&
21738 cat >>confdefs.h <<\EOF
21739 #define HAVE_WORKING_POLL 1
21740 EOF
21741
21742 echo "$as_me:21742: checking for va_copy" >&5
21743 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21744 if test "${cf_cv_have_va_copy+set}" = set; then
21745   echo $ECHO_N "(cached) $ECHO_C" >&6
21746 else
21747
21748 cat >conftest.$ac_ext <<_ACEOF
21749 #line 21749 "configure"
21750 #include "confdefs.h"
21751
21752 #include <stdarg.h>
21753
21754 int
21755 main (void)
21756 {
21757
21758         static va_list dst;
21759         static va_list src;
21760         va_copy(dst, src)
21761   ;
21762   return 0;
21763 }
21764 _ACEOF
21765 rm -f conftest.$ac_objext conftest$ac_exeext
21766 if { (eval echo "$as_me:21766: \"$ac_link\"") >&5
21767   (eval $ac_link) 2>&5
21768   ac_status=$?
21769   echo "$as_me:21769: \$? = $ac_status" >&5
21770   (exit $ac_status); } &&
21771          { ac_try='test -s conftest$ac_exeext'
21772   { (eval echo "$as_me:21772: \"$ac_try\"") >&5
21773   (eval $ac_try) 2>&5
21774   ac_status=$?
21775   echo "$as_me:21775: \$? = $ac_status" >&5
21776   (exit $ac_status); }; }; then
21777   cf_cv_have_va_copy=yes
21778 else
21779   echo "$as_me: failed program was:" >&5
21780 cat conftest.$ac_ext >&5
21781 cf_cv_have_va_copy=no
21782 fi
21783 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21784 fi
21785 echo "$as_me:21785: result: $cf_cv_have_va_copy" >&5
21786 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21787
21788 if test "$cf_cv_have_va_copy" = yes;
21789 then
21790
21791 cat >>confdefs.h <<\EOF
21792 #define HAVE_VA_COPY 1
21793 EOF
21794
21795 else # !cf_cv_have_va_copy
21796
21797 echo "$as_me:21797: checking for __va_copy" >&5
21798 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21799 if test "${cf_cv_have___va_copy+set}" = set; then
21800   echo $ECHO_N "(cached) $ECHO_C" >&6
21801 else
21802
21803 cat >conftest.$ac_ext <<_ACEOF
21804 #line 21804 "configure"
21805 #include "confdefs.h"
21806
21807 #include <stdarg.h>
21808
21809 int
21810 main (void)
21811 {
21812
21813         static va_list dst;
21814         static va_list src;
21815         __va_copy(dst, src)
21816   ;
21817   return 0;
21818 }
21819 _ACEOF
21820 rm -f conftest.$ac_objext conftest$ac_exeext
21821 if { (eval echo "$as_me:21821: \"$ac_link\"") >&5
21822   (eval $ac_link) 2>&5
21823   ac_status=$?
21824   echo "$as_me:21824: \$? = $ac_status" >&5
21825   (exit $ac_status); } &&
21826          { ac_try='test -s conftest$ac_exeext'
21827   { (eval echo "$as_me:21827: \"$ac_try\"") >&5
21828   (eval $ac_try) 2>&5
21829   ac_status=$?
21830   echo "$as_me:21830: \$? = $ac_status" >&5
21831   (exit $ac_status); }; }; then
21832   cf_cv_have___va_copy=yes
21833 else
21834   echo "$as_me: failed program was:" >&5
21835 cat conftest.$ac_ext >&5
21836 cf_cv_have___va_copy=no
21837 fi
21838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21839 fi
21840 echo "$as_me:21840: result: $cf_cv_have___va_copy" >&5
21841 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21842
21843 if test "$cf_cv_have___va_copy" = yes
21844 then
21845
21846 cat >>confdefs.h <<\EOF
21847 #define HAVE___VA_COPY 1
21848 EOF
21849
21850 else # !cf_cv_have___va_copy
21851
21852 echo "$as_me:21852: checking for __builtin_va_copy" >&5
21853 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21854 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21855   echo $ECHO_N "(cached) $ECHO_C" >&6
21856 else
21857
21858 cat >conftest.$ac_ext <<_ACEOF
21859 #line 21859 "configure"
21860 #include "confdefs.h"
21861
21862 #include <stdarg.h>
21863
21864 int
21865 main (void)
21866 {
21867
21868         static va_list dst;
21869         static va_list src;
21870         __builtin_va_copy(dst, src)
21871   ;
21872   return 0;
21873 }
21874 _ACEOF
21875 rm -f conftest.$ac_objext conftest$ac_exeext
21876 if { (eval echo "$as_me:21876: \"$ac_link\"") >&5
21877   (eval $ac_link) 2>&5
21878   ac_status=$?
21879   echo "$as_me:21879: \$? = $ac_status" >&5
21880   (exit $ac_status); } &&
21881          { ac_try='test -s conftest$ac_exeext'
21882   { (eval echo "$as_me:21882: \"$ac_try\"") >&5
21883   (eval $ac_try) 2>&5
21884   ac_status=$?
21885   echo "$as_me:21885: \$? = $ac_status" >&5
21886   (exit $ac_status); }; }; then
21887   cf_cv_have___builtin_va_copy=yes
21888 else
21889   echo "$as_me: failed program was:" >&5
21890 cat conftest.$ac_ext >&5
21891 cf_cv_have___builtin_va_copy=no
21892 fi
21893 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21894 fi
21895 echo "$as_me:21895: result: $cf_cv_have___builtin_va_copy" >&5
21896 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21897
21898 test "$cf_cv_have___builtin_va_copy" = yes &&
21899
21900 cat >>confdefs.h <<\EOF
21901 #define HAVE___BUILTIN_VA_COPY 1
21902 EOF
21903
21904 fi # cf_cv_have___va_copy
21905
21906 fi # cf_cv_have_va_copy
21907
21908 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21909 (*yes*)
21910         ;;
21911
21912 (*)
21913         echo "$as_me:21913: checking if we can simply copy va_list" >&5
21914 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21915 if test "${cf_cv_pointer_va_list+set}" = set; then
21916   echo $ECHO_N "(cached) $ECHO_C" >&6
21917 else
21918
21919 cat >conftest.$ac_ext <<_ACEOF
21920 #line 21920 "configure"
21921 #include "confdefs.h"
21922
21923 #include <stdarg.h>
21924
21925 int
21926 main (void)
21927 {
21928
21929         va_list dst;
21930         va_list src;
21931         dst = src
21932   ;
21933   return 0;
21934 }
21935 _ACEOF
21936 rm -f conftest.$ac_objext conftest$ac_exeext
21937 if { (eval echo "$as_me:21937: \"$ac_link\"") >&5
21938   (eval $ac_link) 2>&5
21939   ac_status=$?
21940   echo "$as_me:21940: \$? = $ac_status" >&5
21941   (exit $ac_status); } &&
21942          { ac_try='test -s conftest$ac_exeext'
21943   { (eval echo "$as_me:21943: \"$ac_try\"") >&5
21944   (eval $ac_try) 2>&5
21945   ac_status=$?
21946   echo "$as_me:21946: \$? = $ac_status" >&5
21947   (exit $ac_status); }; }; then
21948   cf_cv_pointer_va_list=yes
21949 else
21950   echo "$as_me: failed program was:" >&5
21951 cat conftest.$ac_ext >&5
21952 cf_cv_pointer_va_list=no
21953 fi
21954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21955 fi
21956 echo "$as_me:21956: result: $cf_cv_pointer_va_list" >&5
21957 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21958
21959         if test "$cf_cv_pointer_va_list" = no
21960         then
21961                 echo "$as_me:21961: checking if we can copy va_list indirectly" >&5
21962 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21963 if test "${cf_cv_array_va_list+set}" = set; then
21964   echo $ECHO_N "(cached) $ECHO_C" >&6
21965 else
21966
21967 cat >conftest.$ac_ext <<_ACEOF
21968 #line 21968 "configure"
21969 #include "confdefs.h"
21970
21971 #include <stdarg.h>
21972
21973 int
21974 main (void)
21975 {
21976
21977         va_list dst;
21978         va_list src;
21979         *dst = *src
21980   ;
21981   return 0;
21982 }
21983 _ACEOF
21984 rm -f conftest.$ac_objext conftest$ac_exeext
21985 if { (eval echo "$as_me:21985: \"$ac_link\"") >&5
21986   (eval $ac_link) 2>&5
21987   ac_status=$?
21988   echo "$as_me:21988: \$? = $ac_status" >&5
21989   (exit $ac_status); } &&
21990          { ac_try='test -s conftest$ac_exeext'
21991   { (eval echo "$as_me:21991: \"$ac_try\"") >&5
21992   (eval $ac_try) 2>&5
21993   ac_status=$?
21994   echo "$as_me:21994: \$? = $ac_status" >&5
21995   (exit $ac_status); }; }; then
21996   cf_cv_array_va_list=yes
21997 else
21998   echo "$as_me: failed program was:" >&5
21999 cat conftest.$ac_ext >&5
22000 cf_cv_array_va_list=no
22001 fi
22002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22003 fi
22004 echo "$as_me:22004: result: $cf_cv_array_va_list" >&5
22005 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22006                 test "$cf_cv_array_va_list" = yes &&
22007 cat >>confdefs.h <<\EOF
22008 #define ARRAY_VA_LIST 1
22009 EOF
22010
22011         fi
22012         ;;
22013 esac
22014
22015 echo "$as_me:22015: checking for pid_t" >&5
22016 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22017 if test "${ac_cv_type_pid_t+set}" = set; then
22018   echo $ECHO_N "(cached) $ECHO_C" >&6
22019 else
22020   cat >conftest.$ac_ext <<_ACEOF
22021 #line 22021 "configure"
22022 #include "confdefs.h"
22023 $ac_includes_default
22024 int
22025 main (void)
22026 {
22027 if ((pid_t *) 0)
22028   return 0;
22029 if (sizeof (pid_t))
22030   return 0;
22031   ;
22032   return 0;
22033 }
22034 _ACEOF
22035 rm -f conftest.$ac_objext
22036 if { (eval echo "$as_me:22036: \"$ac_compile\"") >&5
22037   (eval $ac_compile) 2>&5
22038   ac_status=$?
22039   echo "$as_me:22039: \$? = $ac_status" >&5
22040   (exit $ac_status); } &&
22041          { ac_try='test -s conftest.$ac_objext'
22042   { (eval echo "$as_me:22042: \"$ac_try\"") >&5
22043   (eval $ac_try) 2>&5
22044   ac_status=$?
22045   echo "$as_me:22045: \$? = $ac_status" >&5
22046   (exit $ac_status); }; }; then
22047   ac_cv_type_pid_t=yes
22048 else
22049   echo "$as_me: failed program was:" >&5
22050 cat conftest.$ac_ext >&5
22051 ac_cv_type_pid_t=no
22052 fi
22053 rm -f conftest.$ac_objext conftest.$ac_ext
22054 fi
22055 echo "$as_me:22055: result: $ac_cv_type_pid_t" >&5
22056 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22057 if test $ac_cv_type_pid_t = yes; then
22058   :
22059 else
22060
22061 cat >>confdefs.h <<EOF
22062 #define pid_t int
22063 EOF
22064
22065 fi
22066
22067 for ac_header in unistd.h vfork.h
22068 do
22069 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22070 echo "$as_me:22070: checking for $ac_header" >&5
22071 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22072 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22073   echo $ECHO_N "(cached) $ECHO_C" >&6
22074 else
22075   cat >conftest.$ac_ext <<_ACEOF
22076 #line 22076 "configure"
22077 #include "confdefs.h"
22078 #include <$ac_header>
22079 _ACEOF
22080 if { (eval echo "$as_me:22080: \"$ac_cpp conftest.$ac_ext\"") >&5
22081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22082   ac_status=$?
22083   egrep -v '^ *\+' conftest.er1 >conftest.err
22084   rm -f conftest.er1
22085   cat conftest.err >&5
22086   echo "$as_me:22086: \$? = $ac_status" >&5
22087   (exit $ac_status); } >/dev/null; then
22088   if test -s conftest.err; then
22089     ac_cpp_err=$ac_c_preproc_warn_flag
22090   else
22091     ac_cpp_err=
22092   fi
22093 else
22094   ac_cpp_err=yes
22095 fi
22096 if test -z "$ac_cpp_err"; then
22097   eval "$as_ac_Header=yes"
22098 else
22099   echo "$as_me: failed program was:" >&5
22100   cat conftest.$ac_ext >&5
22101   eval "$as_ac_Header=no"
22102 fi
22103 rm -f conftest.err conftest.$ac_ext
22104 fi
22105 echo "$as_me:22105: result: `eval echo '${'$as_ac_Header'}'`" >&5
22106 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22107 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22108   cat >>confdefs.h <<EOF
22109 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22110 EOF
22111
22112 fi
22113 done
22114
22115 for ac_func in fork vfork
22116 do
22117 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22118 echo "$as_me:22118: checking for $ac_func" >&5
22119 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22120 if eval "test \"\${$as_ac_var+set}\" = set"; then
22121   echo $ECHO_N "(cached) $ECHO_C" >&6
22122 else
22123   cat >conftest.$ac_ext <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126 #define $ac_func autoconf_temporary
22127 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22128 #undef $ac_func
22129
22130 #ifdef __cplusplus
22131 extern "C"
22132 #endif
22133
22134 /* We use char because int might match the return type of a gcc2
22135    builtin and then its argument prototype would still apply.  */
22136 char $ac_func (void);
22137
22138 int
22139 main (void)
22140 {
22141
22142 /* The GNU C library defines stubs for functions which it implements
22143     to always fail with ENOSYS.  Some functions are actually named
22144     something starting with __ and the normal name is an alias.  */
22145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22146 #error found stub for $ac_func
22147 #endif
22148
22149         return $ac_func ();
22150   ;
22151   return 0;
22152 }
22153 _ACEOF
22154 rm -f conftest.$ac_objext conftest$ac_exeext
22155 if { (eval echo "$as_me:22155: \"$ac_link\"") >&5
22156   (eval $ac_link) 2>&5
22157   ac_status=$?
22158   echo "$as_me:22158: \$? = $ac_status" >&5
22159   (exit $ac_status); } &&
22160          { ac_try='test -s conftest$ac_exeext'
22161   { (eval echo "$as_me:22161: \"$ac_try\"") >&5
22162   (eval $ac_try) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit $ac_status); }; }; then
22166   eval "$as_ac_var=yes"
22167 else
22168   echo "$as_me: failed program was:" >&5
22169 cat conftest.$ac_ext >&5
22170 eval "$as_ac_var=no"
22171 fi
22172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22173 fi
22174 echo "$as_me:22174: result: `eval echo '${'$as_ac_var'}'`" >&5
22175 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22176 if test `eval echo '${'$as_ac_var'}'` = yes; then
22177   cat >>confdefs.h <<EOF
22178 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22179 EOF
22180
22181 fi
22182 done
22183
22184 ac_cv_func_fork_works=$ac_cv_func_fork
22185 if test "x$ac_cv_func_fork" = xyes; then
22186   echo "$as_me:22186: checking for working fork" >&5
22187 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22188 if test "${ac_cv_func_fork_works+set}" = set; then
22189   echo $ECHO_N "(cached) $ECHO_C" >&6
22190 else
22191   if test "$cross_compiling" = yes; then
22192   ac_cv_func_fork_works=cross
22193 else
22194   cat >conftest.$ac_ext <<_ACEOF
22195 /* By Rüdiger Kuhlmann. */
22196       #include <sys/types.h>
22197       #if HAVE_UNISTD_H
22198       # include <unistd.h>
22199       #endif
22200       /* Some systems only have a dummy stub for fork() */
22201       int main (void)
22202       {
22203         if (fork() < 0)
22204           $ac_main_return (1);
22205         $ac_main_return (0);
22206       }
22207 _ACEOF
22208 rm -f conftest$ac_exeext
22209 if { (eval echo "$as_me:22209: \"$ac_link\"") >&5
22210   (eval $ac_link) 2>&5
22211   ac_status=$?
22212   echo "$as_me:22212: \$? = $ac_status" >&5
22213   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22214   { (eval echo "$as_me:22214: \"$ac_try\"") >&5
22215   (eval $ac_try) 2>&5
22216   ac_status=$?
22217   echo "$as_me:22217: \$? = $ac_status" >&5
22218   (exit $ac_status); }; }; then
22219   ac_cv_func_fork_works=yes
22220 else
22221   echo "$as_me: program exited with status $ac_status" >&5
22222 echo "$as_me: failed program was:" >&5
22223 cat conftest.$ac_ext >&5
22224 ac_cv_func_fork_works=no
22225 fi
22226 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22227 fi
22228 fi
22229 echo "$as_me:22229: result: $ac_cv_func_fork_works" >&5
22230 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22231
22232 fi
22233 if test "x$ac_cv_func_fork_works" = xcross; then
22234   case $host in
22235     *-*-amigaos* | *-*-msdosdjgpp*)
22236       # Override, as these systems have only a dummy fork() stub
22237       ac_cv_func_fork_works=no
22238       ;;
22239     *)
22240       ac_cv_func_fork_works=yes
22241       ;;
22242   esac
22243   { echo "$as_me:22243: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22244 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22245 fi
22246 ac_cv_func_vfork_works=$ac_cv_func_vfork
22247 if test "x$ac_cv_func_vfork" = xyes; then
22248   echo "$as_me:22248: checking for working vfork" >&5
22249 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22250 if test "${ac_cv_func_vfork_works+set}" = set; then
22251   echo $ECHO_N "(cached) $ECHO_C" >&6
22252 else
22253   if test "$cross_compiling" = yes; then
22254   ac_cv_func_vfork_works=cross
22255 else
22256   cat >conftest.$ac_ext <<_ACEOF
22257 #line 22257 "configure"
22258 #include "confdefs.h"
22259 /* Thanks to Paul Eggert for this test.  */
22260 #include <stdio.h>
22261 #include <sys/types.h>
22262 #include <sys/stat.h>
22263 #if HAVE_UNISTD_H
22264 # include <unistd.h>
22265 #endif
22266 #if HAVE_VFORK_H
22267 # include <vfork.h>
22268 #endif
22269 /* On some sparc systems, changes by the child to local and incoming
22270    argument registers are propagated back to the parent.  The compiler
22271    is told about this with #include <vfork.h>, but some compilers
22272    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22273    static variable whose address is put into a register that is
22274    clobbered by the vfork.  */
22275 static
22276 #ifdef __cplusplus
22277 sparc_address_test (int arg)
22278 # else
22279 sparc_address_test (arg) int arg;
22280 #endif
22281 {
22282   static pid_t child;
22283   if (!child) {
22284     child = vfork ();
22285     if (child < 0) {
22286       perror ("vfork");
22287       _exit(2);
22288     }
22289     if (!child) {
22290       arg = getpid();
22291       write(-1, "", 0);
22292       _exit (arg);
22293     }
22294   }
22295 }
22296
22297 int
22298 main (void)
22299 {
22300   pid_t parent = getpid ();
22301   pid_t child;
22302
22303   sparc_address_test ();
22304
22305   child = vfork ();
22306
22307   if (child == 0) {
22308     /* Here is another test for sparc vfork register problems.  This
22309        test uses lots of local variables, at least as many local
22310        variables as main has allocated so far including compiler
22311        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22312        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22313        reuse the register of parent for one of the local variables,
22314        since it will think that parent can't possibly be used any more
22315        in this routine.  Assigning to the local variable will thus
22316        munge parent in the parent process.  */
22317     pid_t
22318       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22319       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22320     /* Convince the compiler that p..p7 are live; otherwise, it might
22321        use the same hardware register for all 8 local variables.  */
22322     if (p != p1 || p != p2 || p != p3 || p != p4
22323         || p != p5 || p != p6 || p != p7)
22324       _exit(1);
22325
22326     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22327        from child file descriptors.  If the child closes a descriptor
22328        before it execs or exits, this munges the parent's descriptor
22329        as well.  Test for this by closing stdout in the child.  */
22330     _exit(close(fileno(stdout)) != 0);
22331   } else {
22332     int status;
22333     struct stat st;
22334
22335     while (wait(&status) != child)
22336       ;
22337     $ac_main_return(
22338          /* Was there some problem with vforking?  */
22339          child < 0
22340
22341          /* Did the child fail?  (This shouldn't happen.)  */
22342          || status
22343
22344          /* Did the vfork/compiler bug occur?  */
22345          || parent != getpid()
22346
22347          /* Did the file descriptor bug occur?  */
22348          || fstat(fileno(stdout), &st) != 0
22349          );
22350   }
22351 }
22352 _ACEOF
22353 rm -f conftest$ac_exeext
22354 if { (eval echo "$as_me:22354: \"$ac_link\"") >&5
22355   (eval $ac_link) 2>&5
22356   ac_status=$?
22357   echo "$as_me:22357: \$? = $ac_status" >&5
22358   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22359   { (eval echo "$as_me:22359: \"$ac_try\"") >&5
22360   (eval $ac_try) 2>&5
22361   ac_status=$?
22362   echo "$as_me:22362: \$? = $ac_status" >&5
22363   (exit $ac_status); }; }; then
22364   ac_cv_func_vfork_works=yes
22365 else
22366   echo "$as_me: program exited with status $ac_status" >&5
22367 echo "$as_me: failed program was:" >&5
22368 cat conftest.$ac_ext >&5
22369 ac_cv_func_vfork_works=no
22370 fi
22371 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22372 fi
22373 fi
22374 echo "$as_me:22374: result: $ac_cv_func_vfork_works" >&5
22375 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22376
22377 fi;
22378 if test "x$ac_cv_func_fork_works" = xcross; then
22379   ac_cv_func_vfork_works=ac_cv_func_vfork
22380   { echo "$as_me:22380: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22381 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22382 fi
22383
22384 if test "x$ac_cv_func_vfork_works" = xyes; then
22385
22386 cat >>confdefs.h <<\EOF
22387 #define HAVE_WORKING_VFORK 1
22388 EOF
22389
22390 else
22391
22392 cat >>confdefs.h <<\EOF
22393 #define vfork fork
22394 EOF
22395
22396 fi
22397 if test "x$ac_cv_func_fork_works" = xyes; then
22398
22399 cat >>confdefs.h <<\EOF
22400 #define HAVE_WORKING_FORK 1
22401 EOF
22402
22403 fi
22404
22405 echo "$as_me:22405: checking if fopen accepts explicit binary mode" >&5
22406 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22407 if test "${cf_cv_fopen_bin_r+set}" = set; then
22408   echo $ECHO_N "(cached) $ECHO_C" >&6
22409 else
22410
22411         if test "$cross_compiling" = yes; then
22412   cf_cv_fopen_bin_r=unknown
22413 else
22414   cat >conftest.$ac_ext <<_ACEOF
22415 #line 22415 "configure"
22416 #include "confdefs.h"
22417
22418 #include <stdio.h>
22419 int main(void) {
22420         FILE *fp = fopen("conftest.tmp", "wb");
22421         int rc = 0;
22422         if (fp != 0) {
22423                 int p, q;
22424                 for (p = 0; p < 256; ++p) {
22425                         fputc(p, fp);
22426                 }
22427                 fclose(fp);
22428                 fp = fopen("conftest.tmp", "rb");
22429                 if (fp != 0) {
22430                         for (p = 0; p < 256; ++p) {
22431                                 q = fgetc(fp);
22432                                 if (q != p) {
22433                                         rc = 1;
22434                                         break;
22435                                 }
22436                         }
22437                 } else {
22438                         rc = 1;
22439                 }
22440         } else {
22441                 rc = 1;
22442         }
22443         ${cf_cv_main_return:-return} (rc);
22444 }
22445
22446 _ACEOF
22447 rm -f conftest$ac_exeext
22448 if { (eval echo "$as_me:22448: \"$ac_link\"") >&5
22449   (eval $ac_link) 2>&5
22450   ac_status=$?
22451   echo "$as_me:22451: \$? = $ac_status" >&5
22452   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22453   { (eval echo "$as_me:22453: \"$ac_try\"") >&5
22454   (eval $ac_try) 2>&5
22455   ac_status=$?
22456   echo "$as_me:22456: \$? = $ac_status" >&5
22457   (exit $ac_status); }; }; then
22458   cf_cv_fopen_bin_r=yes
22459 else
22460   echo "$as_me: program exited with status $ac_status" >&5
22461 echo "$as_me: failed program was:" >&5
22462 cat conftest.$ac_ext >&5
22463 cf_cv_fopen_bin_r=no
22464 fi
22465 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22466 fi
22467
22468 fi
22469 echo "$as_me:22469: result: $cf_cv_fopen_bin_r" >&5
22470 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22471 test "x$cf_cv_fopen_bin_r" != xno &&
22472 cat >>confdefs.h <<\EOF
22473 #define USE_FOPEN_BIN_R 1
22474 EOF
22475
22476 # special check for test/ditto.c
22477
22478 echo "$as_me:22478: checking for openpty in -lutil" >&5
22479 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22480 if test "${ac_cv_lib_util_openpty+set}" = set; then
22481   echo $ECHO_N "(cached) $ECHO_C" >&6
22482 else
22483   ac_check_lib_save_LIBS=$LIBS
22484 LIBS="-lutil  $LIBS"
22485 cat >conftest.$ac_ext <<_ACEOF
22486 #line 22486 "configure"
22487 #include "confdefs.h"
22488
22489 /* Override any gcc2 internal prototype to avoid an error.  */
22490 #ifdef __cplusplus
22491 extern "C"
22492 #endif
22493 /* We use char because int might match the return type of a gcc2
22494    builtin and then its argument prototype would still apply.  */
22495 char openpty ();
22496 int
22497 main (void)
22498 {
22499 openpty ();
22500   ;
22501   return 0;
22502 }
22503 _ACEOF
22504 rm -f conftest.$ac_objext conftest$ac_exeext
22505 if { (eval echo "$as_me:22505: \"$ac_link\"") >&5
22506   (eval $ac_link) 2>&5
22507   ac_status=$?
22508   echo "$as_me:22508: \$? = $ac_status" >&5
22509   (exit $ac_status); } &&
22510          { ac_try='test -s conftest$ac_exeext'
22511   { (eval echo "$as_me:22511: \"$ac_try\"") >&5
22512   (eval $ac_try) 2>&5
22513   ac_status=$?
22514   echo "$as_me:22514: \$? = $ac_status" >&5
22515   (exit $ac_status); }; }; then
22516   ac_cv_lib_util_openpty=yes
22517 else
22518   echo "$as_me: failed program was:" >&5
22519 cat conftest.$ac_ext >&5
22520 ac_cv_lib_util_openpty=no
22521 fi
22522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22523 LIBS=$ac_check_lib_save_LIBS
22524 fi
22525 echo "$as_me:22525: result: $ac_cv_lib_util_openpty" >&5
22526 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22527 if test $ac_cv_lib_util_openpty = yes; then
22528   cf_cv_lib_util=yes
22529 else
22530   cf_cv_lib_util=no
22531 fi
22532
22533 echo "$as_me:22533: checking for openpty header" >&5
22534 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22535 if test "${cf_cv_func_openpty+set}" = set; then
22536   echo $ECHO_N "(cached) $ECHO_C" >&6
22537 else
22538
22539         cf_save_LIBS="$LIBS"
22540         test $cf_cv_lib_util = yes && {
22541 cf_add_libs="$LIBS"
22542 # reverse order
22543 cf_add_0lib=
22544 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22545 # filter duplicates
22546 for cf_add_1lib in $cf_add_0lib; do
22547         for cf_add_2lib in $cf_add_libs; do
22548                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22549                         cf_add_1lib=
22550                         break
22551                 fi
22552         done
22553         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22554 done
22555 LIBS="$cf_add_libs"
22556  }
22557         for cf_header in pty.h libutil.h util.h
22558         do
22559         cat >conftest.$ac_ext <<_ACEOF
22560 #line 22560 "configure"
22561 #include "confdefs.h"
22562
22563 #include <$cf_header>
22564
22565 int
22566 main (void)
22567 {
22568
22569         int x = openpty((int *)0, (int *)0, (char *)0,
22570                                    (struct termios *)0, (struct winsize *)0);
22571
22572   ;
22573   return 0;
22574 }
22575 _ACEOF
22576 rm -f conftest.$ac_objext conftest$ac_exeext
22577 if { (eval echo "$as_me:22577: \"$ac_link\"") >&5
22578   (eval $ac_link) 2>&5
22579   ac_status=$?
22580   echo "$as_me:22580: \$? = $ac_status" >&5
22581   (exit $ac_status); } &&
22582          { ac_try='test -s conftest$ac_exeext'
22583   { (eval echo "$as_me:22583: \"$ac_try\"") >&5
22584   (eval $ac_try) 2>&5
22585   ac_status=$?
22586   echo "$as_me:22586: \$? = $ac_status" >&5
22587   (exit $ac_status); }; }; then
22588
22589                 cf_cv_func_openpty=$cf_header
22590                 break
22591
22592 else
22593   echo "$as_me: failed program was:" >&5
22594 cat conftest.$ac_ext >&5
22595
22596                 cf_cv_func_openpty=no
22597
22598 fi
22599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22600         done
22601         LIBS="$cf_save_LIBS"
22602
22603 fi
22604 echo "$as_me:22604: result: $cf_cv_func_openpty" >&5
22605 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22606
22607 if test "$cf_cv_func_openpty" != no ; then
22608
22609 cat >>confdefs.h <<EOF
22610 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22611 EOF
22612
22613 cat >>confdefs.h <<\EOF
22614 #define USE_XTERM_PTY 1
22615 EOF
22616
22617         if test "x$cf_cv_lib_util" = xyes ; then
22618
22619 cf_add_libs="$TEST_LIBS"
22620 # reverse order
22621 cf_add_0lib=
22622 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22623 # filter duplicates
22624 for cf_add_1lib in $cf_add_0lib; do
22625         for cf_add_2lib in $cf_add_libs; do
22626                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22627                         cf_add_1lib=
22628                         break
22629                 fi
22630         done
22631         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22632 done
22633 TEST_LIBS="$cf_add_libs"
22634
22635         fi
22636 fi
22637
22638 if test "$with_hashed_db" != no ; then
22639
22640 cat >>confdefs.h <<\EOF
22641 #define USE_HASHED_DB 1
22642 EOF
22643
22644 case $with_hashed_db in
22645 (yes|*able*)
22646         ;;
22647 (*)
22648         if test -d "$with_hashed_db" ; then
22649
22650 if test -n "$with_hashed_db/include" ; then
22651   for cf_add_incdir in $with_hashed_db/include
22652   do
22653         while test $cf_add_incdir != /usr/include
22654         do
22655           if test -d $cf_add_incdir
22656           then
22657                 cf_have_incdir=no
22658                 if test -n "$CFLAGS$CPPFLAGS" ; then
22659                   # a loop is needed to ensure we can add subdirs of existing dirs
22660                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22661                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22662                           cf_have_incdir=yes; break
22663                         fi
22664                   done
22665                 fi
22666
22667                 if test "$cf_have_incdir" = no ; then
22668                   if test "$cf_add_incdir" = /usr/local/include ; then
22669                         if test "$GCC" = yes
22670                         then
22671                           cf_save_CPPFLAGS=$CPPFLAGS
22672
22673         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22674         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22675
22676                           cat >conftest.$ac_ext <<_ACEOF
22677 #line 22677 "configure"
22678 #include "confdefs.h"
22679 #include <stdio.h>
22680 int
22681 main (void)
22682 {
22683 printf("Hello")
22684   ;
22685   return 0;
22686 }
22687 _ACEOF
22688 rm -f conftest.$ac_objext
22689 if { (eval echo "$as_me:22689: \"$ac_compile\"") >&5
22690   (eval $ac_compile) 2>&5
22691   ac_status=$?
22692   echo "$as_me:22692: \$? = $ac_status" >&5
22693   (exit $ac_status); } &&
22694          { ac_try='test -s conftest.$ac_objext'
22695   { (eval echo "$as_me:22695: \"$ac_try\"") >&5
22696   (eval $ac_try) 2>&5
22697   ac_status=$?
22698   echo "$as_me:22698: \$? = $ac_status" >&5
22699   (exit $ac_status); }; }; then
22700   :
22701 else
22702   echo "$as_me: failed program was:" >&5
22703 cat conftest.$ac_ext >&5
22704 cf_have_incdir=yes
22705 fi
22706 rm -f conftest.$ac_objext conftest.$ac_ext
22707                           CPPFLAGS=$cf_save_CPPFLAGS
22708                         fi
22709                   fi
22710                 fi
22711
22712                 if test "$cf_have_incdir" = no ; then
22713                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22714
22715 echo "${as_me:-configure}:22715: testing adding $cf_add_incdir to include-path ..." 1>&5
22716
22717                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22718
22719                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22720                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22721                   cf_add_incdir="$cf_top_incdir"
22722                 else
22723                   break
22724                 fi
22725           else
22726                 break
22727           fi
22728         done
22729   done
22730 fi
22731
22732 if test -n "$with_hashed_db/lib" ; then
22733         for cf_add_libdir in $with_hashed_db/lib
22734         do
22735                 if test $cf_add_libdir = /usr/lib ; then
22736                         :
22737                 elif test -d $cf_add_libdir
22738                 then
22739                         cf_have_libdir=no
22740                         if test -n "$LDFLAGS$LIBS" ; then
22741                                 # a loop is needed to ensure we can add subdirs of existing dirs
22742                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22743                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22744                                                 cf_have_libdir=yes; break
22745                                         fi
22746                                 done
22747                         fi
22748                         if test "$cf_have_libdir" = no ; then
22749                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22750
22751 echo "${as_me:-configure}:22751: testing adding $cf_add_libdir to library-path ..." 1>&5
22752
22753                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22754                         fi
22755                 fi
22756         done
22757 fi
22758
22759         else
22760                 case "$with_hashed_db" in
22761                 (./*|../*|/*)
22762                         { echo "$as_me:22762: WARNING: no such directory $with_hashed_db" >&5
22763 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22764                         ;;
22765                 (*)
22766
22767 cf_search=
22768
22769 test "x$prefix" != "xNONE" && \
22770 test -d "$prefix" && \
22771  {
22772         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22773         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22774         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22775         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22776         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22777         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22778 }
22779
22780 for cf_subdir_prefix in \
22781         /usr \
22782         /usr/local \
22783         /usr/pkg \
22784         /opt \
22785         /opt/local \
22786         $HOME
22787 do
22788
22789 test "x$cf_subdir_prefix" != "x$prefix" && \
22790 test -d "$cf_subdir_prefix" && \
22791 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22792         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22793         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22794         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22795         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22796         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22797         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"
22798 }
22799
22800 done
22801
22802         for cf_item in $cf_search
22803         do
22804                 case $cf_item in
22805                 (*/$with_hashed_db)
22806
22807 if test -n "$cf_item" ; then
22808   for cf_add_incdir in $cf_item
22809   do
22810         while test $cf_add_incdir != /usr/include
22811         do
22812           if test -d $cf_add_incdir
22813           then
22814                 cf_have_incdir=no
22815                 if test -n "$CFLAGS$CPPFLAGS" ; then
22816                   # a loop is needed to ensure we can add subdirs of existing dirs
22817                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22818                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22819                           cf_have_incdir=yes; break
22820                         fi
22821                   done
22822                 fi
22823
22824                 if test "$cf_have_incdir" = no ; then
22825                   if test "$cf_add_incdir" = /usr/local/include ; then
22826                         if test "$GCC" = yes
22827                         then
22828                           cf_save_CPPFLAGS=$CPPFLAGS
22829
22830         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22831         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22832
22833                           cat >conftest.$ac_ext <<_ACEOF
22834 #line 22834 "configure"
22835 #include "confdefs.h"
22836 #include <stdio.h>
22837 int
22838 main (void)
22839 {
22840 printf("Hello")
22841   ;
22842   return 0;
22843 }
22844 _ACEOF
22845 rm -f conftest.$ac_objext
22846 if { (eval echo "$as_me:22846: \"$ac_compile\"") >&5
22847   (eval $ac_compile) 2>&5
22848   ac_status=$?
22849   echo "$as_me:22849: \$? = $ac_status" >&5
22850   (exit $ac_status); } &&
22851          { ac_try='test -s conftest.$ac_objext'
22852   { (eval echo "$as_me:22852: \"$ac_try\"") >&5
22853   (eval $ac_try) 2>&5
22854   ac_status=$?
22855   echo "$as_me:22855: \$? = $ac_status" >&5
22856   (exit $ac_status); }; }; then
22857   :
22858 else
22859   echo "$as_me: failed program was:" >&5
22860 cat conftest.$ac_ext >&5
22861 cf_have_incdir=yes
22862 fi
22863 rm -f conftest.$ac_objext conftest.$ac_ext
22864                           CPPFLAGS=$cf_save_CPPFLAGS
22865                         fi
22866                   fi
22867                 fi
22868
22869                 if test "$cf_have_incdir" = no ; then
22870                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22871
22872 echo "${as_me:-configure}:22872: testing adding $cf_add_incdir to include-path ..." 1>&5
22873
22874                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22875
22876                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22877                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22878                   cf_add_incdir="$cf_top_incdir"
22879                 else
22880                   break
22881                 fi
22882           else
22883                 break
22884           fi
22885         done
22886   done
22887 fi
22888
22889                         ;;
22890                 esac
22891         done
22892
22893 cf_search=
22894
22895 test "x$prefix" != "xNONE" && \
22896 test -d "$prefix" && \
22897  {
22898         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22899         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22900         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22901         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22902         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22903         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22904 }
22905
22906 for cf_subdir_prefix in \
22907         /usr \
22908         /usr/local \
22909         /usr/pkg \
22910         /opt \
22911         /opt/local \
22912         $HOME
22913 do
22914
22915 test "x$cf_subdir_prefix" != "x$prefix" && \
22916 test -d "$cf_subdir_prefix" && \
22917 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22918         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22919         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22920         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22921         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22922         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22923         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"
22924 }
22925
22926 done
22927
22928         for cf_item in $cf_search
22929         do
22930                 case $cf_item in
22931                 (*/$with_hashed_db)
22932
22933 if test -n "$cf_item" ; then
22934         for cf_add_libdir in $cf_item
22935         do
22936                 if test $cf_add_libdir = /usr/lib ; then
22937                         :
22938                 elif test -d $cf_add_libdir
22939                 then
22940                         cf_have_libdir=no
22941                         if test -n "$LDFLAGS$LIBS" ; then
22942                                 # a loop is needed to ensure we can add subdirs of existing dirs
22943                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22944                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22945                                                 cf_have_libdir=yes; break
22946                                         fi
22947                                 done
22948                         fi
22949                         if test "$cf_have_libdir" = no ; then
22950                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22951
22952 echo "${as_me:-configure}:22952: testing adding $cf_add_libdir to library-path ..." 1>&5
22953
22954                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22955                         fi
22956                 fi
22957         done
22958 fi
22959
22960                         ;;
22961                 esac
22962         done
22963
22964                         ;;
22965                 esac
22966         fi
22967 esac
22968
22969 echo "$as_me:22969: checking for db.h" >&5
22970 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22971 if test "${ac_cv_header_db_h+set}" = set; then
22972   echo $ECHO_N "(cached) $ECHO_C" >&6
22973 else
22974   cat >conftest.$ac_ext <<_ACEOF
22975 #line 22975 "configure"
22976 #include "confdefs.h"
22977 #include <db.h>
22978 _ACEOF
22979 if { (eval echo "$as_me:22979: \"$ac_cpp conftest.$ac_ext\"") >&5
22980   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22981   ac_status=$?
22982   egrep -v '^ *\+' conftest.er1 >conftest.err
22983   rm -f conftest.er1
22984   cat conftest.err >&5
22985   echo "$as_me:22985: \$? = $ac_status" >&5
22986   (exit $ac_status); } >/dev/null; then
22987   if test -s conftest.err; then
22988     ac_cpp_err=$ac_c_preproc_warn_flag
22989   else
22990     ac_cpp_err=
22991   fi
22992 else
22993   ac_cpp_err=yes
22994 fi
22995 if test -z "$ac_cpp_err"; then
22996   ac_cv_header_db_h=yes
22997 else
22998   echo "$as_me: failed program was:" >&5
22999   cat conftest.$ac_ext >&5
23000   ac_cv_header_db_h=no
23001 fi
23002 rm -f conftest.err conftest.$ac_ext
23003 fi
23004 echo "$as_me:23004: result: $ac_cv_header_db_h" >&5
23005 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23006 if test $ac_cv_header_db_h = yes; then
23007
23008 echo "$as_me:23008: checking for version of db" >&5
23009 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23010 if test "${cf_cv_hashed_db_version+set}" = set; then
23011   echo $ECHO_N "(cached) $ECHO_C" >&6
23012 else
23013
23014 cf_cv_hashed_db_version=unknown
23015
23016 for cf_db_version in 1 2 3 4 5 6
23017 do
23018
23019 echo "${as_me:-configure}:23019: testing checking for db version $cf_db_version ..." 1>&5
23020
23021         cat >conftest.$ac_ext <<_ACEOF
23022 #line 23022 "configure"
23023 #include "confdefs.h"
23024
23025 $ac_includes_default
23026 #include <db.h>
23027
23028 #ifdef DB_VERSION_MAJOR
23029         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23030 #if $cf_db_version == DB_VERSION_MAJOR
23031         /* ok */
23032 #else
23033         make an error
23034 #endif
23035 #else
23036 #if $cf_db_version == 1
23037         /* ok: assuming this is DB 1.8.5 */
23038 #else
23039         make an error
23040 #endif
23041 #endif
23042
23043 int
23044 main (void)
23045 {
23046 DBT *foo = 0
23047   ;
23048   return 0;
23049 }
23050 _ACEOF
23051 rm -f conftest.$ac_objext
23052 if { (eval echo "$as_me:23052: \"$ac_compile\"") >&5
23053   (eval $ac_compile) 2>&5
23054   ac_status=$?
23055   echo "$as_me:23055: \$? = $ac_status" >&5
23056   (exit $ac_status); } &&
23057          { ac_try='test -s conftest.$ac_objext'
23058   { (eval echo "$as_me:23058: \"$ac_try\"") >&5
23059   (eval $ac_try) 2>&5
23060   ac_status=$?
23061   echo "$as_me:23061: \$? = $ac_status" >&5
23062   (exit $ac_status); }; }; then
23063
23064         cf_cv_hashed_db_version=$cf_db_version
23065         break
23066
23067 else
23068   echo "$as_me: failed program was:" >&5
23069 cat conftest.$ac_ext >&5
23070 fi
23071 rm -f conftest.$ac_objext conftest.$ac_ext
23072 done
23073
23074 fi
23075 echo "$as_me:23075: result: $cf_cv_hashed_db_version" >&5
23076 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23077
23078 if test "$cf_cv_hashed_db_version" = unknown ; then
23079         { { echo "$as_me:23079: error: Cannot determine version of db" >&5
23080 echo "$as_me: error: Cannot determine version of db" >&2;}
23081    { (exit 1); exit 1; }; }
23082 else
23083
23084 echo "$as_me:23084: checking for db libraries" >&5
23085 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23086 if test "${cf_cv_hashed_db_libs+set}" = set; then
23087   echo $ECHO_N "(cached) $ECHO_C" >&6
23088 else
23089
23090 cf_cv_hashed_db_libs=unknown
23091 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23092 do
23093         cf_save_libs="$LIBS"
23094         if test -n "$cf_db_libs"; then
23095
23096 cf_add_libs="$LIBS"
23097 # reverse order
23098 cf_add_0lib=
23099 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23100 # filter duplicates
23101 for cf_add_1lib in $cf_add_0lib; do
23102         for cf_add_2lib in $cf_add_libs; do
23103                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23104                         cf_add_1lib=
23105                         break
23106                 fi
23107         done
23108         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23109 done
23110 LIBS="$cf_add_libs"
23111
23112         fi
23113
23114 echo "${as_me:-configure}:23114: testing checking for library "$cf_db_libs" ..." 1>&5
23115
23116         cat >conftest.$ac_ext <<_ACEOF
23117 #line 23117 "configure"
23118 #include "confdefs.h"
23119
23120 $ac_includes_default
23121 #include <db.h>
23122
23123 int
23124 main (void)
23125 {
23126
23127         char *path = "/tmp/foo";
23128 #ifdef DB_VERSION_MAJOR
23129 #if DB_VERSION_MAJOR >= 4
23130         DB *result = 0;
23131         db_create(&result, NULL, 0);
23132         result->open(result,
23133                 NULL,
23134                 path,
23135                 path,
23136                 DB_HASH,
23137                 DB_CREATE,
23138                 0644);
23139 #elif DB_VERSION_MAJOR >= 3
23140         DB *result = 0;
23141         db_create(&result, NULL, 0);
23142         result->open(result,
23143                 path,
23144                 path,
23145                 DB_HASH,
23146                 DB_CREATE,
23147                 0644);
23148 #elif DB_VERSION_MAJOR >= 2
23149         DB *result = 0;
23150         db_open(path,
23151                 DB_HASH,
23152                 DB_CREATE,
23153                 0644,
23154                 (DB_ENV *) 0,
23155                 (DB_INFO *) 0,
23156                 &result);
23157 #endif /* DB_VERSION_MAJOR */
23158 #else
23159         DB *result = dbopen(path,
23160                      2,
23161                      0644,
23162                      DB_HASH,
23163                      0);
23164 #endif
23165         ${cf_cv_main_return:-return}(result != 0)
23166
23167   ;
23168   return 0;
23169 }
23170 _ACEOF
23171 rm -f conftest.$ac_objext conftest$ac_exeext
23172 if { (eval echo "$as_me:23172: \"$ac_link\"") >&5
23173   (eval $ac_link) 2>&5
23174   ac_status=$?
23175   echo "$as_me:23175: \$? = $ac_status" >&5
23176   (exit $ac_status); } &&
23177          { ac_try='test -s conftest$ac_exeext'
23178   { (eval echo "$as_me:23178: \"$ac_try\"") >&5
23179   (eval $ac_try) 2>&5
23180   ac_status=$?
23181   echo "$as_me:23181: \$? = $ac_status" >&5
23182   (exit $ac_status); }; }; then
23183
23184         if test -n "$cf_db_libs" ; then
23185                 cf_cv_hashed_db_libs=$cf_db_libs
23186         else
23187                 cf_cv_hashed_db_libs=default
23188         fi
23189         LIBS="$cf_save_libs"
23190         break
23191
23192 else
23193   echo "$as_me: failed program was:" >&5
23194 cat conftest.$ac_ext >&5
23195 fi
23196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23197         LIBS="$cf_save_libs"
23198 done
23199
23200 fi
23201 echo "$as_me:23201: result: $cf_cv_hashed_db_libs" >&5
23202 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23203
23204         if test "$cf_cv_hashed_db_libs" = unknown ; then
23205                 { { echo "$as_me:23205: error: Cannot determine library for db" >&5
23206 echo "$as_me: error: Cannot determine library for db" >&2;}
23207    { (exit 1); exit 1; }; }
23208         elif test "$cf_cv_hashed_db_libs" != default ; then
23209
23210 cf_add_libs="$LIBS"
23211 # reverse order
23212 cf_add_0lib=
23213 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23214 # filter duplicates
23215 for cf_add_1lib in $cf_add_0lib; do
23216         for cf_add_2lib in $cf_add_libs; do
23217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23218                         cf_add_1lib=
23219                         break
23220                 fi
23221         done
23222         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23223 done
23224 LIBS="$cf_add_libs"
23225
23226         fi
23227 fi
23228
23229 else
23230
23231         { { echo "$as_me:23231: error: Cannot find db.h" >&5
23232 echo "$as_me: error: Cannot find db.h" >&2;}
23233    { (exit 1); exit 1; }; }
23234
23235 fi
23236
23237 fi
23238
23239 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23240         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23241         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23242 fi
23243
23244 # Just in case, check if the C compiler has a bool type.
23245
23246 echo "$as_me:23246: checking if we should include stdbool.h" >&5
23247 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23248
23249 if test "${cf_cv_header_stdbool_h+set}" = set; then
23250   echo $ECHO_N "(cached) $ECHO_C" >&6
23251 else
23252
23253         cat >conftest.$ac_ext <<_ACEOF
23254 #line 23254 "configure"
23255 #include "confdefs.h"
23256
23257 int
23258 main (void)
23259 {
23260 bool foo = false
23261   ;
23262   return 0;
23263 }
23264 _ACEOF
23265 rm -f conftest.$ac_objext
23266 if { (eval echo "$as_me:23266: \"$ac_compile\"") >&5
23267   (eval $ac_compile) 2>&5
23268   ac_status=$?
23269   echo "$as_me:23269: \$? = $ac_status" >&5
23270   (exit $ac_status); } &&
23271          { ac_try='test -s conftest.$ac_objext'
23272   { (eval echo "$as_me:23272: \"$ac_try\"") >&5
23273   (eval $ac_try) 2>&5
23274   ac_status=$?
23275   echo "$as_me:23275: \$? = $ac_status" >&5
23276   (exit $ac_status); }; }; then
23277   cf_cv_header_stdbool_h=0
23278 else
23279   echo "$as_me: failed program was:" >&5
23280 cat conftest.$ac_ext >&5
23281 cat >conftest.$ac_ext <<_ACEOF
23282 #line 23282 "configure"
23283 #include "confdefs.h"
23284
23285 #ifndef __BEOS__
23286 #include <stdbool.h>
23287 #endif
23288
23289 int
23290 main (void)
23291 {
23292 bool foo = false
23293   ;
23294   return 0;
23295 }
23296 _ACEOF
23297 rm -f conftest.$ac_objext
23298 if { (eval echo "$as_me:23298: \"$ac_compile\"") >&5
23299   (eval $ac_compile) 2>&5
23300   ac_status=$?
23301   echo "$as_me:23301: \$? = $ac_status" >&5
23302   (exit $ac_status); } &&
23303          { ac_try='test -s conftest.$ac_objext'
23304   { (eval echo "$as_me:23304: \"$ac_try\"") >&5
23305   (eval $ac_try) 2>&5
23306   ac_status=$?
23307   echo "$as_me:23307: \$? = $ac_status" >&5
23308   (exit $ac_status); }; }; then
23309   cf_cv_header_stdbool_h=1
23310 else
23311   echo "$as_me: failed program was:" >&5
23312 cat conftest.$ac_ext >&5
23313 cf_cv_header_stdbool_h=0
23314 fi
23315 rm -f conftest.$ac_objext conftest.$ac_ext
23316 fi
23317 rm -f conftest.$ac_objext conftest.$ac_ext
23318 fi
23319
23320 if test "$cf_cv_header_stdbool_h" = 1
23321 then    echo "$as_me:23321: result: yes" >&5
23322 echo "${ECHO_T}yes" >&6
23323 else    echo "$as_me:23323: result: no" >&5
23324 echo "${ECHO_T}no" >&6
23325 fi
23326
23327 echo "$as_me:23327: checking for builtin bool type" >&5
23328 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23329
23330 if test "${cf_cv_cc_bool_type+set}" = set; then
23331   echo $ECHO_N "(cached) $ECHO_C" >&6
23332 else
23333
23334         cat >conftest.$ac_ext <<_ACEOF
23335 #line 23335 "configure"
23336 #include "confdefs.h"
23337
23338 #include <stdio.h>
23339 #include <sys/types.h>
23340
23341 int
23342 main (void)
23343 {
23344 bool x = false
23345   ;
23346   return 0;
23347 }
23348 _ACEOF
23349 rm -f conftest.$ac_objext
23350 if { (eval echo "$as_me:23350: \"$ac_compile\"") >&5
23351   (eval $ac_compile) 2>&5
23352   ac_status=$?
23353   echo "$as_me:23353: \$? = $ac_status" >&5
23354   (exit $ac_status); } &&
23355          { ac_try='test -s conftest.$ac_objext'
23356   { (eval echo "$as_me:23356: \"$ac_try\"") >&5
23357   (eval $ac_try) 2>&5
23358   ac_status=$?
23359   echo "$as_me:23359: \$? = $ac_status" >&5
23360   (exit $ac_status); }; }; then
23361   cf_cv_cc_bool_type=1
23362 else
23363   echo "$as_me: failed program was:" >&5
23364 cat conftest.$ac_ext >&5
23365 cf_cv_cc_bool_type=0
23366 fi
23367 rm -f conftest.$ac_objext conftest.$ac_ext
23368
23369 fi
23370
23371 if test "$cf_cv_cc_bool_type" = 1
23372 then    echo "$as_me:23372: result: yes" >&5
23373 echo "${ECHO_T}yes" >&6
23374 else    echo "$as_me:23374: result: no" >&5
23375 echo "${ECHO_T}no" >&6
23376 fi
23377
23378 # Check for C++ compiler characteristics (and ensure that it's there!)
23379 if test -n "$CXX" ; then
23380         ac_ext=cc
23381 ac_cpp='$CXXCPP $CPPFLAGS'
23382 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23383 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23384 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23385 ac_main_return=return
23386
23387 if test -n "$GXX" ; then
23388
23389         cf_save="$LIBS"
23390         LIBS="$LIBS $CXXLIBS"
23391         echo "$as_me:23391: checking if we already have C++ library" >&5
23392 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23393         cat >conftest.$ac_ext <<_ACEOF
23394 #line 23394 "configure"
23395 #include "confdefs.h"
23396
23397                         #include <iostream>
23398 int
23399 main (void)
23400 {
23401
23402                         std::cout << "Hello World!" << std::endl;
23403   ;
23404   return 0;
23405 }
23406 _ACEOF
23407 rm -f conftest.$ac_objext conftest$ac_exeext
23408 if { (eval echo "$as_me:23408: \"$ac_link\"") >&5
23409   (eval $ac_link) 2>&5
23410   ac_status=$?
23411   echo "$as_me:23411: \$? = $ac_status" >&5
23412   (exit $ac_status); } &&
23413          { ac_try='test -s conftest$ac_exeext'
23414   { (eval echo "$as_me:23414: \"$ac_try\"") >&5
23415   (eval $ac_try) 2>&5
23416   ac_status=$?
23417   echo "$as_me:23417: \$? = $ac_status" >&5
23418   (exit $ac_status); }; }; then
23419   cf_have_libstdcpp=yes
23420 else
23421   echo "$as_me: failed program was:" >&5
23422 cat conftest.$ac_ext >&5
23423 cf_have_libstdcpp=no
23424 fi
23425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23426         echo "$as_me:23426: result: $cf_have_libstdcpp" >&5
23427 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23428         LIBS="$cf_save"
23429
23430         if test $cf_have_libstdcpp != yes
23431         then
23432                 case $cf_cv_system_name in
23433                 (os2*)
23434                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23435                                 cf_stdcpp_libname=stdcpp
23436                         else
23437                                 cf_stdcpp_libname=stdc++
23438                         fi
23439                         ;;
23440                 (*)
23441                         cf_stdcpp_libname=stdc++
23442                         ;;
23443                 esac
23444
23445                 echo "$as_me:23445: checking for library $cf_stdcpp_libname" >&5
23446 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23447 if test "${cf_cv_libstdcpp+set}" = set; then
23448   echo $ECHO_N "(cached) $ECHO_C" >&6
23449 else
23450
23451                         cf_save="$LIBS"
23452                         LIBS="$LIBS $CXXLIBS"
23453
23454 cf_add_libs="$LIBS"
23455 # reverse order
23456 cf_add_0lib=
23457 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23458 # filter duplicates
23459 for cf_add_1lib in $cf_add_0lib; do
23460         for cf_add_2lib in $cf_add_libs; do
23461                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23462                         cf_add_1lib=
23463                         break
23464                 fi
23465         done
23466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23467 done
23468 LIBS="$cf_add_libs"
23469
23470                 cat >conftest.$ac_ext <<_ACEOF
23471 #line 23471 "configure"
23472 #include "confdefs.h"
23473
23474                                 #include <iostream>
23475 int
23476 main (void)
23477 {
23478
23479                                 std::cout << "Hello World!" << std::endl;
23480   ;
23481   return 0;
23482 }
23483 _ACEOF
23484 rm -f conftest.$ac_objext conftest$ac_exeext
23485 if { (eval echo "$as_me:23485: \"$ac_link\"") >&5
23486   (eval $ac_link) 2>&5
23487   ac_status=$?
23488   echo "$as_me:23488: \$? = $ac_status" >&5
23489   (exit $ac_status); } &&
23490          { ac_try='test -s conftest$ac_exeext'
23491   { (eval echo "$as_me:23491: \"$ac_try\"") >&5
23492   (eval $ac_try) 2>&5
23493   ac_status=$?
23494   echo "$as_me:23494: \$? = $ac_status" >&5
23495   (exit $ac_status); }; }; then
23496   cf_cv_libstdcpp=yes
23497 else
23498   echo "$as_me: failed program was:" >&5
23499 cat conftest.$ac_ext >&5
23500 cf_cv_libstdcpp=no
23501 fi
23502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23503                         LIBS="$cf_save"
23504
23505 fi
23506 echo "$as_me:23506: result: $cf_cv_libstdcpp" >&5
23507 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23508                 test "$cf_cv_libstdcpp" = yes && {
23509 cf_add_libs="$CXXLIBS"
23510 # reverse order
23511 cf_add_0lib=
23512 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23513 # filter duplicates
23514 for cf_add_1lib in $cf_add_0lib; do
23515         for cf_add_2lib in $cf_add_libs; do
23516                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23517                         cf_add_1lib=
23518                         break
23519                 fi
23520         done
23521         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23522 done
23523 CXXLIBS="$cf_add_libs"
23524  }
23525         fi
23526 fi
23527
23528         echo "$as_me:23528: checking whether $CXX understands -c and -o together" >&5
23529 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23530 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23531   echo $ECHO_N "(cached) $ECHO_C" >&6
23532 else
23533
23534 cat > conftest.$ac_ext <<CF_EOF
23535 int main(void)
23536 {
23537         ${cf_cv_main_return:-return}(0);
23538 }
23539 CF_EOF
23540 # We do the test twice because some compilers refuse to overwrite an
23541 # existing .o file with -o, though they will create one.
23542 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23543 if { (eval echo "$as_me:23543: \"$ac_try\"") >&5
23544   (eval $ac_try) 2>&5
23545   ac_status=$?
23546   echo "$as_me:23546: \$? = $ac_status" >&5
23547   (exit $ac_status); } &&
23548   test -f conftest2.$ac_objext && { (eval echo "$as_me:23548: \"$ac_try\"") >&5
23549   (eval $ac_try) 2>&5
23550   ac_status=$?
23551   echo "$as_me:23551: \$? = $ac_status" >&5
23552   (exit $ac_status); };
23553 then
23554   eval cf_cv_prog_CXX_c_o=yes
23555 else
23556   eval cf_cv_prog_CXX_c_o=no
23557 fi
23558 rm -rf conftest*
23559
23560 fi
23561 if test $cf_cv_prog_CXX_c_o = yes; then
23562   echo "$as_me:23562: result: yes" >&5
23563 echo "${ECHO_T}yes" >&6
23564 else
23565   echo "$as_me:23565: result: no" >&5
23566 echo "${ECHO_T}no" >&6
23567 fi
23568
23569         case $GXX_VERSION in
23570         (1.*|2.[0-6]*|[1-9][0-9].*)
23571                 cf_cxx_library=yes
23572                 ;;
23573         (*-2.7*|2.7*)
23574
23575 cf_cxx_library=unknown
23576 case $cf_cv_system_name in
23577 (os2*)
23578         cf_gpp_libname=gpp
23579         ;;
23580 (*)
23581         cf_gpp_libname=g++
23582         ;;
23583 esac
23584 if test "$GXX" = yes; then
23585         echo "$as_me:23585: checking for lib$cf_gpp_libname" >&5
23586 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23587         cf_save="$LIBS"
23588
23589 cf_add_libs="$LIBS"
23590 # reverse order
23591 cf_add_0lib=
23592 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23593 # filter duplicates
23594 for cf_add_1lib in $cf_add_0lib; do
23595         for cf_add_2lib in $cf_add_libs; do
23596                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23597                         cf_add_1lib=
23598                         break
23599                 fi
23600         done
23601         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23602 done
23603 LIBS="$cf_add_libs"
23604
23605         cat >conftest.$ac_ext <<_ACEOF
23606 #line 23606 "configure"
23607 #include "confdefs.h"
23608
23609 #include <$cf_gpp_libname/builtin.h>
23610
23611 int
23612 main (void)
23613 {
23614 two_arg_error_handler_t foo2 = lib_error_handler
23615   ;
23616   return 0;
23617 }
23618 _ACEOF
23619 rm -f conftest.$ac_objext conftest$ac_exeext
23620 if { (eval echo "$as_me:23620: \"$ac_link\"") >&5
23621   (eval $ac_link) 2>&5
23622   ac_status=$?
23623   echo "$as_me:23623: \$? = $ac_status" >&5
23624   (exit $ac_status); } &&
23625          { ac_try='test -s conftest$ac_exeext'
23626   { (eval echo "$as_me:23626: \"$ac_try\"") >&5
23627   (eval $ac_try) 2>&5
23628   ac_status=$?
23629   echo "$as_me:23629: \$? = $ac_status" >&5
23630   (exit $ac_status); }; }; then
23631   cf_cxx_library=yes
23632
23633 cf_add_libs="$CXXLIBS"
23634 # reverse order
23635 cf_add_0lib=
23636 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23637 # filter duplicates
23638 for cf_add_1lib in $cf_add_0lib; do
23639         for cf_add_2lib in $cf_add_libs; do
23640                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23641                         cf_add_1lib=
23642                         break
23643                 fi
23644         done
23645         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23646 done
23647 CXXLIBS="$cf_add_libs"
23648
23649          if test "$cf_gpp_libname" = cpp ; then
23650
23651 cat >>confdefs.h <<\EOF
23652 #define HAVE_GPP_BUILTIN_H 1
23653 EOF
23654
23655          else
23656
23657 cat >>confdefs.h <<\EOF
23658 #define HAVE_GXX_BUILTIN_H 1
23659 EOF
23660
23661          fi
23662 else
23663   echo "$as_me: failed program was:" >&5
23664 cat conftest.$ac_ext >&5
23665 cat >conftest.$ac_ext <<_ACEOF
23666 #line 23666 "configure"
23667 #include "confdefs.h"
23668
23669 #include <builtin.h>
23670
23671 int
23672 main (void)
23673 {
23674 two_arg_error_handler_t foo2 = lib_error_handler
23675   ;
23676   return 0;
23677 }
23678 _ACEOF
23679 rm -f conftest.$ac_objext conftest$ac_exeext
23680 if { (eval echo "$as_me:23680: \"$ac_link\"") >&5
23681   (eval $ac_link) 2>&5
23682   ac_status=$?
23683   echo "$as_me:23683: \$? = $ac_status" >&5
23684   (exit $ac_status); } &&
23685          { ac_try='test -s conftest$ac_exeext'
23686   { (eval echo "$as_me:23686: \"$ac_try\"") >&5
23687   (eval $ac_try) 2>&5
23688   ac_status=$?
23689   echo "$as_me:23689: \$? = $ac_status" >&5
23690   (exit $ac_status); }; }; then
23691   cf_cxx_library=yes
23692
23693 cf_add_libs="$CXXLIBS"
23694 # reverse order
23695 cf_add_0lib=
23696 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23697 # filter duplicates
23698 for cf_add_1lib in $cf_add_0lib; do
23699         for cf_add_2lib in $cf_add_libs; do
23700                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23701                         cf_add_1lib=
23702                         break
23703                 fi
23704         done
23705         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23706 done
23707 CXXLIBS="$cf_add_libs"
23708
23709 cat >>confdefs.h <<\EOF
23710 #define HAVE_BUILTIN_H 1
23711 EOF
23712
23713 else
23714   echo "$as_me: failed program was:" >&5
23715 cat conftest.$ac_ext >&5
23716 cf_cxx_library=no
23717 fi
23718 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23719 fi
23720 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23721         LIBS="$cf_save"
23722         echo "$as_me:23722: result: $cf_cxx_library" >&5
23723 echo "${ECHO_T}$cf_cxx_library" >&6
23724 fi
23725
23726                 ;;
23727         (*)
23728                 cf_cxx_library=no
23729                 ;;
23730         esac
23731
23732         ac_ext=cc
23733 ac_cpp='$CXXCPP $CPPFLAGS'
23734 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23735 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23736 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23737 ac_main_return=return
23738 echo "$as_me:23738: checking how to run the C++ preprocessor" >&5
23739 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23740 if test -z "$CXXCPP"; then
23741   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23742   echo $ECHO_N "(cached) $ECHO_C" >&6
23743 else
23744       # Double quotes because CXXCPP needs to be expanded
23745     for CXXCPP in "$CXX -E" "/lib/cpp"
23746     do
23747       ac_preproc_ok=false
23748 for ac_cxx_preproc_warn_flag in '' yes
23749 do
23750   # Use a header file that comes with gcc, so configuring glibc
23751   # with a fresh cross-compiler works.
23752   # On the NeXT, cc -E runs the code through the compiler's parser,
23753   # not just through cpp. "Syntax error" is here to catch this case.
23754   cat >conftest.$ac_ext <<_ACEOF
23755 #line 23755 "configure"
23756 #include "confdefs.h"
23757 #include <assert.h>
23758                      Syntax error
23759 _ACEOF
23760 if { (eval echo "$as_me:23760: \"$ac_cpp conftest.$ac_ext\"") >&5
23761   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23762   ac_status=$?
23763   egrep -v '^ *\+' conftest.er1 >conftest.err
23764   rm -f conftest.er1
23765   cat conftest.err >&5
23766   echo "$as_me:23766: \$? = $ac_status" >&5
23767   (exit $ac_status); } >/dev/null; then
23768   if test -s conftest.err; then
23769     ac_cpp_err=$ac_cxx_preproc_warn_flag
23770   else
23771     ac_cpp_err=
23772   fi
23773 else
23774   ac_cpp_err=yes
23775 fi
23776 if test -z "$ac_cpp_err"; then
23777   :
23778 else
23779   echo "$as_me: failed program was:" >&5
23780   cat conftest.$ac_ext >&5
23781   # Broken: fails on valid input.
23782 continue
23783 fi
23784 rm -f conftest.err conftest.$ac_ext
23785
23786   # OK, works on sane cases.  Now check whether non-existent headers
23787   # can be detected and how.
23788   cat >conftest.$ac_ext <<_ACEOF
23789 #line 23789 "configure"
23790 #include "confdefs.h"
23791 #include <ac_nonexistent.h>
23792 _ACEOF
23793 if { (eval echo "$as_me:23793: \"$ac_cpp conftest.$ac_ext\"") >&5
23794   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23795   ac_status=$?
23796   egrep -v '^ *\+' conftest.er1 >conftest.err
23797   rm -f conftest.er1
23798   cat conftest.err >&5
23799   echo "$as_me:23799: \$? = $ac_status" >&5
23800   (exit $ac_status); } >/dev/null; then
23801   if test -s conftest.err; then
23802     ac_cpp_err=$ac_cxx_preproc_warn_flag
23803   else
23804     ac_cpp_err=
23805   fi
23806 else
23807   ac_cpp_err=yes
23808 fi
23809 if test -z "$ac_cpp_err"; then
23810   # Broken: success on invalid input.
23811 continue
23812 else
23813   echo "$as_me: failed program was:" >&5
23814   cat conftest.$ac_ext >&5
23815   # Passes both tests.
23816 ac_preproc_ok=:
23817 break
23818 fi
23819 rm -f conftest.err conftest.$ac_ext
23820
23821 done
23822 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23823 rm -f conftest.err conftest.$ac_ext
23824 if $ac_preproc_ok; then
23825   break
23826 fi
23827
23828     done
23829     ac_cv_prog_CXXCPP=$CXXCPP
23830
23831 fi
23832   CXXCPP=$ac_cv_prog_CXXCPP
23833 else
23834   ac_cv_prog_CXXCPP=$CXXCPP
23835 fi
23836 echo "$as_me:23836: result: $CXXCPP" >&5
23837 echo "${ECHO_T}$CXXCPP" >&6
23838 ac_preproc_ok=false
23839 for ac_cxx_preproc_warn_flag in '' yes
23840 do
23841   # Use a header file that comes with gcc, so configuring glibc
23842   # with a fresh cross-compiler works.
23843   # On the NeXT, cc -E runs the code through the compiler's parser,
23844   # not just through cpp. "Syntax error" is here to catch this case.
23845   cat >conftest.$ac_ext <<_ACEOF
23846 #line 23846 "configure"
23847 #include "confdefs.h"
23848 #include <assert.h>
23849                      Syntax error
23850 _ACEOF
23851 if { (eval echo "$as_me:23851: \"$ac_cpp conftest.$ac_ext\"") >&5
23852   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23853   ac_status=$?
23854   egrep -v '^ *\+' conftest.er1 >conftest.err
23855   rm -f conftest.er1
23856   cat conftest.err >&5
23857   echo "$as_me:23857: \$? = $ac_status" >&5
23858   (exit $ac_status); } >/dev/null; then
23859   if test -s conftest.err; then
23860     ac_cpp_err=$ac_cxx_preproc_warn_flag
23861   else
23862     ac_cpp_err=
23863   fi
23864 else
23865   ac_cpp_err=yes
23866 fi
23867 if test -z "$ac_cpp_err"; then
23868   :
23869 else
23870   echo "$as_me: failed program was:" >&5
23871   cat conftest.$ac_ext >&5
23872   # Broken: fails on valid input.
23873 continue
23874 fi
23875 rm -f conftest.err conftest.$ac_ext
23876
23877   # OK, works on sane cases.  Now check whether non-existent headers
23878   # can be detected and how.
23879   cat >conftest.$ac_ext <<_ACEOF
23880 #line 23880 "configure"
23881 #include "confdefs.h"
23882 #include <ac_nonexistent.h>
23883 _ACEOF
23884 if { (eval echo "$as_me:23884: \"$ac_cpp conftest.$ac_ext\"") >&5
23885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23886   ac_status=$?
23887   egrep -v '^ *\+' conftest.er1 >conftest.err
23888   rm -f conftest.er1
23889   cat conftest.err >&5
23890   echo "$as_me:23890: \$? = $ac_status" >&5
23891   (exit $ac_status); } >/dev/null; then
23892   if test -s conftest.err; then
23893     ac_cpp_err=$ac_cxx_preproc_warn_flag
23894   else
23895     ac_cpp_err=
23896   fi
23897 else
23898   ac_cpp_err=yes
23899 fi
23900 if test -z "$ac_cpp_err"; then
23901   # Broken: success on invalid input.
23902 continue
23903 else
23904   echo "$as_me: failed program was:" >&5
23905   cat conftest.$ac_ext >&5
23906   # Passes both tests.
23907 ac_preproc_ok=:
23908 break
23909 fi
23910 rm -f conftest.err conftest.$ac_ext
23911
23912 done
23913 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23914 rm -f conftest.err conftest.$ac_ext
23915 if $ac_preproc_ok; then
23916   :
23917 else
23918   { { echo "$as_me:23918: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23919 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23920    { (exit 1); exit 1; }; }
23921 fi
23922
23923 ac_ext=cc
23924 ac_cpp='$CXXCPP $CPPFLAGS'
23925 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23926 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23927 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23928 ac_main_return=return
23929
23930 for ac_header in typeinfo
23931 do
23932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23933 echo "$as_me:23933: checking for $ac_header" >&5
23934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23936   echo $ECHO_N "(cached) $ECHO_C" >&6
23937 else
23938   cat >conftest.$ac_ext <<_ACEOF
23939 #line 23939 "configure"
23940 #include "confdefs.h"
23941 #include <$ac_header>
23942 _ACEOF
23943 if { (eval echo "$as_me:23943: \"$ac_cpp conftest.$ac_ext\"") >&5
23944   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23945   ac_status=$?
23946   egrep -v '^ *\+' conftest.er1 >conftest.err
23947   rm -f conftest.er1
23948   cat conftest.err >&5
23949   echo "$as_me:23949: \$? = $ac_status" >&5
23950   (exit $ac_status); } >/dev/null; then
23951   if test -s conftest.err; then
23952     ac_cpp_err=$ac_cxx_preproc_warn_flag
23953   else
23954     ac_cpp_err=
23955   fi
23956 else
23957   ac_cpp_err=yes
23958 fi
23959 if test -z "$ac_cpp_err"; then
23960   eval "$as_ac_Header=yes"
23961 else
23962   echo "$as_me: failed program was:" >&5
23963   cat conftest.$ac_ext >&5
23964   eval "$as_ac_Header=no"
23965 fi
23966 rm -f conftest.err conftest.$ac_ext
23967 fi
23968 echo "$as_me:23968: result: `eval echo '${'$as_ac_Header'}'`" >&5
23969 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23970 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23971   cat >>confdefs.h <<EOF
23972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23973 EOF
23974
23975 fi
23976 done
23977
23978 for ac_header in iostream
23979 do
23980 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23981 echo "$as_me:23981: checking for $ac_header" >&5
23982 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23983 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23984   echo $ECHO_N "(cached) $ECHO_C" >&6
23985 else
23986   cat >conftest.$ac_ext <<_ACEOF
23987 #line 23987 "configure"
23988 #include "confdefs.h"
23989 #include <$ac_header>
23990 _ACEOF
23991 if { (eval echo "$as_me:23991: \"$ac_cpp conftest.$ac_ext\"") >&5
23992   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23993   ac_status=$?
23994   egrep -v '^ *\+' conftest.er1 >conftest.err
23995   rm -f conftest.er1
23996   cat conftest.err >&5
23997   echo "$as_me:23997: \$? = $ac_status" >&5
23998   (exit $ac_status); } >/dev/null; then
23999   if test -s conftest.err; then
24000     ac_cpp_err=$ac_cxx_preproc_warn_flag
24001   else
24002     ac_cpp_err=
24003   fi
24004 else
24005   ac_cpp_err=yes
24006 fi
24007 if test -z "$ac_cpp_err"; then
24008   eval "$as_ac_Header=yes"
24009 else
24010   echo "$as_me: failed program was:" >&5
24011   cat conftest.$ac_ext >&5
24012   eval "$as_ac_Header=no"
24013 fi
24014 rm -f conftest.err conftest.$ac_ext
24015 fi
24016 echo "$as_me:24016: result: `eval echo '${'$as_ac_Header'}'`" >&5
24017 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24018 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24019   cat >>confdefs.h <<EOF
24020 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24021 EOF
24022
24023 fi
24024 done
24025
24026 if test x"$ac_cv_header_iostream" = xyes ; then
24027         echo "$as_me:24027: checking if iostream uses std-namespace" >&5
24028 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24029         cat >conftest.$ac_ext <<_ACEOF
24030 #line 24030 "configure"
24031 #include "confdefs.h"
24032
24033 #include <iostream>
24034 using std::endl;
24035 using std::cerr;
24036 int
24037 main (void)
24038 {
24039
24040 cerr << "testing" << endl;
24041
24042   ;
24043   return 0;
24044 }
24045 _ACEOF
24046 rm -f conftest.$ac_objext
24047 if { (eval echo "$as_me:24047: \"$ac_compile\"") >&5
24048   (eval $ac_compile) 2>&5
24049   ac_status=$?
24050   echo "$as_me:24050: \$? = $ac_status" >&5
24051   (exit $ac_status); } &&
24052          { ac_try='test -s conftest.$ac_objext'
24053   { (eval echo "$as_me:24053: \"$ac_try\"") >&5
24054   (eval $ac_try) 2>&5
24055   ac_status=$?
24056   echo "$as_me:24056: \$? = $ac_status" >&5
24057   (exit $ac_status); }; }; then
24058   cf_iostream_namespace=yes
24059 else
24060   echo "$as_me: failed program was:" >&5
24061 cat conftest.$ac_ext >&5
24062 cf_iostream_namespace=no
24063 fi
24064 rm -f conftest.$ac_objext conftest.$ac_ext
24065         echo "$as_me:24065: result: $cf_iostream_namespace" >&5
24066 echo "${ECHO_T}$cf_iostream_namespace" >&6
24067         if test "$cf_iostream_namespace" = yes ; then
24068
24069 cat >>confdefs.h <<\EOF
24070 #define IOSTREAM_NAMESPACE 1
24071 EOF
24072
24073         fi
24074 fi
24075
24076 echo "$as_me:24076: checking if we should include stdbool.h" >&5
24077 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24078
24079 if test "${cf_cv_header_stdbool_h+set}" = set; then
24080   echo $ECHO_N "(cached) $ECHO_C" >&6
24081 else
24082
24083         cat >conftest.$ac_ext <<_ACEOF
24084 #line 24084 "configure"
24085 #include "confdefs.h"
24086
24087 int
24088 main (void)
24089 {
24090 bool foo = false
24091   ;
24092   return 0;
24093 }
24094 _ACEOF
24095 rm -f conftest.$ac_objext
24096 if { (eval echo "$as_me:24096: \"$ac_compile\"") >&5
24097   (eval $ac_compile) 2>&5
24098   ac_status=$?
24099   echo "$as_me:24099: \$? = $ac_status" >&5
24100   (exit $ac_status); } &&
24101          { ac_try='test -s conftest.$ac_objext'
24102   { (eval echo "$as_me:24102: \"$ac_try\"") >&5
24103   (eval $ac_try) 2>&5
24104   ac_status=$?
24105   echo "$as_me:24105: \$? = $ac_status" >&5
24106   (exit $ac_status); }; }; then
24107   cf_cv_header_stdbool_h=0
24108 else
24109   echo "$as_me: failed program was:" >&5
24110 cat conftest.$ac_ext >&5
24111 cat >conftest.$ac_ext <<_ACEOF
24112 #line 24112 "configure"
24113 #include "confdefs.h"
24114
24115 #ifndef __BEOS__
24116 #include <stdbool.h>
24117 #endif
24118
24119 int
24120 main (void)
24121 {
24122 bool foo = false
24123   ;
24124   return 0;
24125 }
24126 _ACEOF
24127 rm -f conftest.$ac_objext
24128 if { (eval echo "$as_me:24128: \"$ac_compile\"") >&5
24129   (eval $ac_compile) 2>&5
24130   ac_status=$?
24131   echo "$as_me:24131: \$? = $ac_status" >&5
24132   (exit $ac_status); } &&
24133          { ac_try='test -s conftest.$ac_objext'
24134   { (eval echo "$as_me:24134: \"$ac_try\"") >&5
24135   (eval $ac_try) 2>&5
24136   ac_status=$?
24137   echo "$as_me:24137: \$? = $ac_status" >&5
24138   (exit $ac_status); }; }; then
24139   cf_cv_header_stdbool_h=1
24140 else
24141   echo "$as_me: failed program was:" >&5
24142 cat conftest.$ac_ext >&5
24143 cf_cv_header_stdbool_h=0
24144 fi
24145 rm -f conftest.$ac_objext conftest.$ac_ext
24146 fi
24147 rm -f conftest.$ac_objext conftest.$ac_ext
24148 fi
24149
24150 if test "$cf_cv_header_stdbool_h" = 1
24151 then    echo "$as_me:24151: result: yes" >&5
24152 echo "${ECHO_T}yes" >&6
24153 else    echo "$as_me:24153: result: no" >&5
24154 echo "${ECHO_T}no" >&6
24155 fi
24156
24157 echo "$as_me:24157: checking for builtin bool type" >&5
24158 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24159
24160 if test "${cf_cv_builtin_bool+set}" = set; then
24161   echo $ECHO_N "(cached) $ECHO_C" >&6
24162 else
24163
24164         cat >conftest.$ac_ext <<_ACEOF
24165 #line 24165 "configure"
24166 #include "confdefs.h"
24167
24168 #include <stdio.h>
24169 #include <sys/types.h>
24170
24171 int
24172 main (void)
24173 {
24174 bool x = false
24175   ;
24176   return 0;
24177 }
24178 _ACEOF
24179 rm -f conftest.$ac_objext
24180 if { (eval echo "$as_me:24180: \"$ac_compile\"") >&5
24181   (eval $ac_compile) 2>&5
24182   ac_status=$?
24183   echo "$as_me:24183: \$? = $ac_status" >&5
24184   (exit $ac_status); } &&
24185          { ac_try='test -s conftest.$ac_objext'
24186   { (eval echo "$as_me:24186: \"$ac_try\"") >&5
24187   (eval $ac_try) 2>&5
24188   ac_status=$?
24189   echo "$as_me:24189: \$? = $ac_status" >&5
24190   (exit $ac_status); }; }; then
24191   cf_cv_builtin_bool=1
24192 else
24193   echo "$as_me: failed program was:" >&5
24194 cat conftest.$ac_ext >&5
24195 cf_cv_builtin_bool=0
24196 fi
24197 rm -f conftest.$ac_objext conftest.$ac_ext
24198
24199 fi
24200
24201 if test "$cf_cv_builtin_bool" = 1
24202 then    echo "$as_me:24202: result: yes" >&5
24203 echo "${ECHO_T}yes" >&6
24204 else    echo "$as_me:24204: result: no" >&5
24205 echo "${ECHO_T}no" >&6
24206 fi
24207
24208 echo "$as_me:24208: checking for size of bool" >&5
24209 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24210 if test "${cf_cv_type_of_bool+set}" = set; then
24211   echo $ECHO_N "(cached) $ECHO_C" >&6
24212 else
24213
24214         rm -f cf_test.out
24215         if test "$cross_compiling" = yes; then
24216   cf_cv_type_of_bool=unknown
24217 else
24218   cat >conftest.$ac_ext <<_ACEOF
24219 #line 24219 "configure"
24220 #include "confdefs.h"
24221
24222 #include <stdlib.h>
24223 #include <stdio.h>
24224
24225 #if defined(__cplusplus)
24226
24227 #ifdef HAVE_GXX_BUILTIN_H
24228 #include <g++/builtin.h>
24229 #elif HAVE_GPP_BUILTIN_H
24230 #include <gpp/builtin.h>
24231 #elif HAVE_BUILTIN_H
24232 #include <builtin.h>
24233 #endif
24234
24235 #else
24236
24237 #if $cf_cv_header_stdbool_h
24238 #include <stdbool.h>
24239 #endif
24240
24241 #endif
24242
24243 int main(void)
24244 {
24245         FILE *fp = fopen("cf_test.out", "w");
24246         if (fp != 0) {
24247                 bool x = true;
24248                 if ((bool)(-x) >= 0)
24249                         fputs("unsigned ", fp);
24250                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24251                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24252                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24253                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24254                 fclose(fp);
24255         }
24256         ${cf_cv_main_return:-return}(0);
24257 }
24258
24259 _ACEOF
24260 rm -f conftest$ac_exeext
24261 if { (eval echo "$as_me:24261: \"$ac_link\"") >&5
24262   (eval $ac_link) 2>&5
24263   ac_status=$?
24264   echo "$as_me:24264: \$? = $ac_status" >&5
24265   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24266   { (eval echo "$as_me:24266: \"$ac_try\"") >&5
24267   (eval $ac_try) 2>&5
24268   ac_status=$?
24269   echo "$as_me:24269: \$? = $ac_status" >&5
24270   (exit $ac_status); }; }; then
24271   cf_cv_type_of_bool=`cat cf_test.out`
24272                  if test -z "$cf_cv_type_of_bool"; then
24273                    cf_cv_type_of_bool=unknown
24274                  fi
24275 else
24276   echo "$as_me: program exited with status $ac_status" >&5
24277 echo "$as_me: failed program was:" >&5
24278 cat conftest.$ac_ext >&5
24279 cf_cv_type_of_bool=unknown
24280 fi
24281 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24282 fi
24283
24284 fi
24285
24286         rm -f cf_test.out
24287 echo "$as_me:24287: result: $cf_cv_type_of_bool" >&5
24288 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24289 if test "$cf_cv_type_of_bool" = unknown ; then
24290         case .$NCURSES_BOOL in
24291         (.auto|.) NCURSES_BOOL=unsigned;;
24292         esac
24293         { echo "$as_me:24293: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24294 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24295         cf_cv_type_of_bool=$NCURSES_BOOL
24296 fi
24297
24298 echo "$as_me:24298: checking for special defines needed for etip.h" >&5
24299 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24300 cf_save_CXXFLAGS="$CXXFLAGS"
24301 cf_result="none"
24302
24303 # etip.h includes ncurses.h which includes ncurses_dll.h
24304 # But ncurses_dll.h is generated - fix here.
24305 test -d include || mkdir include
24306 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
24307
24308 for cf_math in "" MATH_H
24309 do
24310 for cf_excp in "" MATH_EXCEPTION
24311 do
24312         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24313         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24314         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24315 cat >conftest.$ac_ext <<_ACEOF
24316 #line 24316 "configure"
24317 #include "confdefs.h"
24318
24319 #include <etip.h.in>
24320
24321 int
24322 main (void)
24323 {
24324
24325   ;
24326   return 0;
24327 }
24328 _ACEOF
24329 rm -f conftest.$ac_objext
24330 if { (eval echo "$as_me:24330: \"$ac_compile\"") >&5
24331   (eval $ac_compile) 2>&5
24332   ac_status=$?
24333   echo "$as_me:24333: \$? = $ac_status" >&5
24334   (exit $ac_status); } &&
24335          { ac_try='test -s conftest.$ac_objext'
24336   { (eval echo "$as_me:24336: \"$ac_try\"") >&5
24337   (eval $ac_try) 2>&5
24338   ac_status=$?
24339   echo "$as_me:24339: \$? = $ac_status" >&5
24340   (exit $ac_status); }; }; then
24341
24342         test -n "$cf_math" && cat >>confdefs.h <<EOF
24343 #define ETIP_NEEDS_${cf_math} 1
24344 EOF
24345
24346         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24347 #define ETIP_NEEDS_${cf_excp} 1
24348 EOF
24349
24350         cf_result="$cf_math $cf_excp"
24351         break 2
24352
24353 else
24354   echo "$as_me: failed program was:" >&5
24355 cat conftest.$ac_ext >&5
24356 fi
24357 rm -f conftest.$ac_objext conftest.$ac_ext
24358 done
24359 done
24360 echo "$as_me:24360: result: $cf_result" >&5
24361 echo "${ECHO_T}$cf_result" >&6
24362 CXXFLAGS="$cf_save_CXXFLAGS"
24363
24364 if test -n "$CXX"; then
24365 echo "$as_me:24365: checking if $CXX accepts parameter initialization" >&5
24366 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24367 if test "${cf_cv_cpp_param_init+set}" = set; then
24368   echo $ECHO_N "(cached) $ECHO_C" >&6
24369 else
24370
24371         ac_ext=cc
24372 ac_cpp='$CXXCPP $CPPFLAGS'
24373 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24374 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24375 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24376 ac_main_return=return
24377
24378         if test "$cross_compiling" = yes; then
24379   cf_cv_cpp_param_init=unknown
24380 else
24381   cat >conftest.$ac_ext <<_ACEOF
24382 #line 24382 "configure"
24383 #include "confdefs.h"
24384
24385 class TEST {
24386 private:
24387         int value;
24388 public:
24389         TEST(int x = 1);
24390         ~TEST();
24391 };
24392
24393 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24394 {
24395         value = x;
24396 }
24397 int main(void) { }
24398
24399 _ACEOF
24400 rm -f conftest$ac_exeext
24401 if { (eval echo "$as_me:24401: \"$ac_link\"") >&5
24402   (eval $ac_link) 2>&5
24403   ac_status=$?
24404   echo "$as_me:24404: \$? = $ac_status" >&5
24405   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24406   { (eval echo "$as_me:24406: \"$ac_try\"") >&5
24407   (eval $ac_try) 2>&5
24408   ac_status=$?
24409   echo "$as_me:24409: \$? = $ac_status" >&5
24410   (exit $ac_status); }; }; then
24411   cf_cv_cpp_param_init=yes
24412 else
24413   echo "$as_me: program exited with status $ac_status" >&5
24414 echo "$as_me: failed program was:" >&5
24415 cat conftest.$ac_ext >&5
24416 cf_cv_cpp_param_init=no
24417 fi
24418 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24419 fi
24420         ac_ext=cc
24421 ac_cpp='$CXXCPP $CPPFLAGS'
24422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24425 ac_main_return=return
24426
24427 fi
24428 echo "$as_me:24428: result: $cf_cv_cpp_param_init" >&5
24429 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24430 fi
24431 test "$cf_cv_cpp_param_init" = yes &&
24432 cat >>confdefs.h <<\EOF
24433 #define CPP_HAS_PARAM_INIT 1
24434 EOF
24435
24436 if test -n "$CXX"; then
24437
24438 echo "$as_me:24438: checking if $CXX accepts static_cast" >&5
24439 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24440 if test "${cf_cv_cpp_static_cast+set}" = set; then
24441   echo $ECHO_N "(cached) $ECHO_C" >&6
24442 else
24443
24444         ac_ext=cc
24445 ac_cpp='$CXXCPP $CPPFLAGS'
24446 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24447 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24448 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24449 ac_main_return=return
24450
24451         cat >conftest.$ac_ext <<_ACEOF
24452 #line 24452 "configure"
24453 #include "confdefs.h"
24454
24455 class NCursesPanel
24456 {
24457 public:
24458   NCursesPanel(int nlines,
24459                int ncols,
24460                int begin_y = 0,
24461                int begin_x = 0)
24462   {
24463   }
24464   NCursesPanel();
24465   ~NCursesPanel();
24466 };
24467
24468 template<class T> class NCursesUserPanel : public NCursesPanel
24469 {
24470 public:
24471   NCursesUserPanel (int nlines,
24472                     int ncols,
24473                     int begin_y = 0,
24474                     int begin_x = 0,
24475                     const T* p_UserData = static_cast<T*>(0))
24476     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24477   {
24478   };
24479   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24480   {
24481   };
24482
24483   virtual ~NCursesUserPanel() {};
24484 };
24485
24486 int
24487 main (void)
24488 {
24489
24490         const char* p_UserData = static_cast<char*>(0)
24491   ;
24492   return 0;
24493 }
24494 _ACEOF
24495 rm -f conftest.$ac_objext
24496 if { (eval echo "$as_me:24496: \"$ac_compile\"") >&5
24497   (eval $ac_compile) 2>&5
24498   ac_status=$?
24499   echo "$as_me:24499: \$? = $ac_status" >&5
24500   (exit $ac_status); } &&
24501          { ac_try='test -s conftest.$ac_objext'
24502   { (eval echo "$as_me:24502: \"$ac_try\"") >&5
24503   (eval $ac_try) 2>&5
24504   ac_status=$?
24505   echo "$as_me:24505: \$? = $ac_status" >&5
24506   (exit $ac_status); }; }; then
24507   cf_cv_cpp_static_cast=yes
24508 else
24509   echo "$as_me: failed program was:" >&5
24510 cat conftest.$ac_ext >&5
24511 cf_cv_cpp_static_cast=no
24512 fi
24513 rm -f conftest.$ac_objext conftest.$ac_ext
24514
24515         ac_ext=cc
24516 ac_cpp='$CXXCPP $CPPFLAGS'
24517 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24518 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24519 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24520 ac_main_return=return
24521
24522 fi
24523 echo "$as_me:24523: result: $cf_cv_cpp_static_cast" >&5
24524 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24525
24526 fi
24527
24528 test "$cf_cv_cpp_static_cast" = yes &&
24529 cat >>confdefs.h <<\EOF
24530 #define CPP_HAS_STATIC_CAST 1
24531 EOF
24532
24533         CXX_AR='$(AR)'
24534         CXX_ARFLAGS='$(ARFLAGS)'
24535         case $cf_cv_system_name in
24536         (irix*)
24537             if test "$GXX" != yes ; then
24538                 CXX_AR='$(CXX)'
24539                 CXX_ARFLAGS='-ar -o'
24540             fi
24541             ;;
24542         (sco3.2v5*)
24543             CXXLDFLAGS="-u main"
24544             ;;
24545         (solaris2*)
24546             if test "$GXX" != yes ; then
24547                 CXX_AR='$(CXX)'
24548                 CXX_ARFLAGS='-xar -o'
24549             fi
24550             ;;
24551         esac
24552
24553 else
24554         cf_cxx_library=no
24555         cf_cv_builtin_bool=1
24556
24557         # Just because we are not configuring against C++ right now does not
24558         # mean that a user will not want to use C++.  Some distributors disable
24559         # the C++ portion of this configuration as a shortcut (or just to avoid
24560         # compiling the demo in the c++ directory).  So we need a reasonable
24561         # default for the 'bool' type.
24562         #
24563         # Caveat: since the storage of the bool type is not standardized, it
24564         # may change.
24565
24566         if test "$NCURSES_BOOL" != auto ; then
24567                 cf_cv_type_of_bool=$NCURSES_BOOL
24568                 cf_cv_header_stdbool_h=0
24569         else
24570                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24571
24572 echo "$as_me:24572: checking for size of bool" >&5
24573 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24574 if test "${cf_cv_type_of_bool+set}" = set; then
24575   echo $ECHO_N "(cached) $ECHO_C" >&6
24576 else
24577
24578         rm -f cf_test.out
24579         if test "$cross_compiling" = yes; then
24580   cf_cv_type_of_bool=unknown
24581 else
24582   cat >conftest.$ac_ext <<_ACEOF
24583 #line 24583 "configure"
24584 #include "confdefs.h"
24585
24586 #include <stdlib.h>
24587 #include <stdio.h>
24588
24589 #if defined(__cplusplus)
24590
24591 #ifdef HAVE_GXX_BUILTIN_H
24592 #include <g++/builtin.h>
24593 #elif HAVE_GPP_BUILTIN_H
24594 #include <gpp/builtin.h>
24595 #elif HAVE_BUILTIN_H
24596 #include <builtin.h>
24597 #endif
24598
24599 #else
24600
24601 #if $cf_cv_header_stdbool_h
24602 #include <stdbool.h>
24603 #endif
24604
24605 #endif
24606
24607 int main(void)
24608 {
24609         FILE *fp = fopen("cf_test.out", "w");
24610         if (fp != 0) {
24611                 bool x = true;
24612                 if ((bool)(-x) >= 0)
24613                         fputs("unsigned ", fp);
24614                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24615                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24616                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24617                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24618                 fclose(fp);
24619         }
24620         ${cf_cv_main_return:-return}(0);
24621 }
24622
24623 _ACEOF
24624 rm -f conftest$ac_exeext
24625 if { (eval echo "$as_me:24625: \"$ac_link\"") >&5
24626   (eval $ac_link) 2>&5
24627   ac_status=$?
24628   echo "$as_me:24628: \$? = $ac_status" >&5
24629   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24630   { (eval echo "$as_me:24630: \"$ac_try\"") >&5
24631   (eval $ac_try) 2>&5
24632   ac_status=$?
24633   echo "$as_me:24633: \$? = $ac_status" >&5
24634   (exit $ac_status); }; }; then
24635   cf_cv_type_of_bool=`cat cf_test.out`
24636                  if test -z "$cf_cv_type_of_bool"; then
24637                    cf_cv_type_of_bool=unknown
24638                  fi
24639 else
24640   echo "$as_me: program exited with status $ac_status" >&5
24641 echo "$as_me: failed program was:" >&5
24642 cat conftest.$ac_ext >&5
24643 cf_cv_type_of_bool=unknown
24644 fi
24645 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24646 fi
24647
24648 fi
24649
24650         rm -f cf_test.out
24651 echo "$as_me:24651: result: $cf_cv_type_of_bool" >&5
24652 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24653 if test "$cf_cv_type_of_bool" = unknown ; then
24654         case .$NCURSES_BOOL in
24655         (.auto|.) NCURSES_BOOL=unsigned;;
24656         esac
24657         { echo "$as_me:24657: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24658 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24659         cf_cv_type_of_bool=$NCURSES_BOOL
24660 fi
24661
24662                 else
24663                         echo "$as_me:24663: checking for fallback type of bool" >&5
24664 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24665                         case "$host_cpu" in
24666                         (i?86)  cf_cv_type_of_bool=char ;;
24667                         (*)     cf_cv_type_of_bool=int  ;;
24668                         esac
24669                         echo "$as_me:24669: result: $cf_cv_type_of_bool" >&5
24670 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24671                 fi
24672         fi
24673 fi
24674
24675 # If the C compiler did not declare bool, and we did not determine that the C++
24676 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24677 # ncurses library use the same type as C++ bool.  Note that this allows one to
24678 # specify the type of bool in a configure-script option and postpone
24679 # integration with the C++ compiler provided that the types are compatible.
24680 USE_CXX_BOOL=1
24681 if test $cf_cv_cc_bool_type = 1
24682 then
24683         # oops: C has a bool.  Unlikely, but C++ could differ.
24684         USE_CXX_BOOL=0
24685 elif test $cf_cv_builtin_bool = 0
24686 then
24687         # C++ has no bool
24688         USE_CXX_BOOL=0
24689 else
24690         # this is the normal case
24691         USE_CXX_BOOL='defined(__cplusplus)'
24692 fi
24693
24694 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24695
24696         if test "$cf_with_ada" != "no" ; then
24697                 if test "$with_libtool" != "no"; then
24698                         { echo "$as_me:24698: WARNING: libtool does not support Ada - disabling feature" >&5
24699 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24700                         cf_with_ada=no
24701                 fi
24702         fi
24703
24704         if test "$cf_with_ada" != "no" ; then
24705
24706 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24707 do
24708
24709 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24710
24711         unset ac_cv_path_cf_TEMP_gnat
24712         unset cf_TEMP_gnat
24713         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24714 set dummy $cf_prog_gnat; ac_word=$2
24715 echo "$as_me:24715: checking for $ac_word" >&5
24716 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24717 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24718   echo $ECHO_N "(cached) $ECHO_C" >&6
24719 else
24720   case $cf_TEMP_gnat in
24721   [\\/]* | ?:[\\/]*)
24722   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24723   ;;
24724   *)
24725   ac_save_IFS=$IFS; IFS=$ac_path_separator
24726 ac_dummy="$PATH"
24727 for ac_dir in $ac_dummy; do
24728   IFS=$ac_save_IFS
24729   test -z "$ac_dir" && ac_dir=.
24730   if $as_executable_p "$ac_dir/$ac_word"; then
24731    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24732    echo "$as_me:24732: found $ac_dir/$ac_word" >&5
24733    break
24734 fi
24735 done
24736
24737   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24738   ;;
24739 esac
24740 fi
24741 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24742
24743 if test -n "$cf_TEMP_gnat"; then
24744   echo "$as_me:24744: result: $cf_TEMP_gnat" >&5
24745 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24746 else
24747   echo "$as_me:24747: result: no" >&5
24748 echo "${ECHO_T}no" >&6
24749 fi
24750
24751         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24752
24753         if test "x$cf_TEMP_gnat" != xno; then
24754                 unset cf_cv_gnat_version
24755                 unset cf_TEMP_gnat
24756
24757 echo "$as_me:24757: checking for $cf_prog_gnat version" >&5
24758 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24759 if test "${cf_cv_gnat_version+set}" = set; then
24760   echo $ECHO_N "(cached) $ECHO_C" >&6
24761 else
24762
24763 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24764         grep '[0-9].[0-9][0-9]*' |\
24765         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24766
24767 fi
24768 echo "$as_me:24768: result: $cf_cv_gnat_version" >&5
24769 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24770 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24771 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24772
24773         fi
24774         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24775
24776         unset cf_TEMP_gnat
24777         unset cf_cv_gnat_version
24778         unset ac_cv_path_cf_TEMP_gnat
24779 done
24780
24781 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24782         cf_ada_make=
24783         cf_cv_prog_gnat_correct=no
24784 else
24785         cf_ada_make=gnatmake
24786         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24787                 # gprconfig is newer than gnatmake; we can continue...
24788                 cf_ada_config="##"
24789         else
24790                 rm -rf conftest* *~conftest*
24791                 if mkdir conftest.src
24792                 then
24793                         cf_ada_config=""
24794                         cd conftest.src
24795                         for cf_gprconfig in Ada C
24796                         do
24797                                 echo "$as_me:24797: checking for gprconfig name for $cf_gprconfig" >&5
24798 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24799                                 if test $cf_gprconfig = C
24800                                 then
24801                                         for cf_gprconfig_param in \
24802                                                 $cf_gprconfig,,,,GNATGCC \
24803                                                 $cf_gprconfig,,,,GCC \
24804                                                 $cf_gprconfig
24805                                         do
24806                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24807                                                 test -n "$cf_gprconfig_value" && break
24808                                         done
24809                                 else
24810                                         cf_gprconfig_param=$cf_gprconfig
24811                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24812                                 fi
24813                                 if test -n "$cf_gprconfig_value"
24814                                 then
24815                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24816                                         echo "$as_me:24816: result: $cf_gprconfig_value" >&5
24817 echo "${ECHO_T}$cf_gprconfig_value" >&6
24818                                 else
24819                                         echo "$as_me:24819: result: missing" >&5
24820 echo "${ECHO_T}missing" >&6
24821                                         cf_ada_config="#"
24822                                         break
24823                                 fi
24824                         done
24825                         cd ..
24826                         rm -rf conftest* *~conftest*
24827                 fi
24828         fi
24829         if test "x$cf_ada_config" != "x#"
24830         then
24831
24832 echo "$as_me:24832: checking for gnat version" >&5
24833 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24834 if test "${cf_cv_gnat_version+set}" = set; then
24835   echo $ECHO_N "(cached) $ECHO_C" >&6
24836 else
24837
24838 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24839         grep '[0-9].[0-9][0-9]*' |\
24840         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24841
24842 fi
24843 echo "$as_me:24843: result: $cf_cv_gnat_version" >&5
24844 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24845 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24846
24847 case $cf_cv_gnat_version in
24848 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24849         cf_cv_prog_gnat_correct=yes
24850         ;;
24851 (*)
24852         { echo "$as_me:24852: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24853 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24854         cf_cv_prog_gnat_correct=no
24855         ;;
24856 esac
24857
24858                 # Extract the first word of "m4", so it can be a program name with args.
24859 set dummy m4; ac_word=$2
24860 echo "$as_me:24860: checking for $ac_word" >&5
24861 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24862 if test "${ac_cv_prog_M4_exists+set}" = set; then
24863   echo $ECHO_N "(cached) $ECHO_C" >&6
24864 else
24865   if test -n "$M4_exists"; then
24866   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24867 else
24868   ac_save_IFS=$IFS; IFS=$ac_path_separator
24869 ac_dummy="$PATH"
24870 for ac_dir in $ac_dummy; do
24871   IFS=$ac_save_IFS
24872   test -z "$ac_dir" && ac_dir=.
24873   $as_executable_p "$ac_dir/$ac_word" || continue
24874 ac_cv_prog_M4_exists="yes"
24875 echo "$as_me:24875: found $ac_dir/$ac_word" >&5
24876 break
24877 done
24878
24879   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24880 fi
24881 fi
24882 M4_exists=$ac_cv_prog_M4_exists
24883 if test -n "$M4_exists"; then
24884   echo "$as_me:24884: result: $M4_exists" >&5
24885 echo "${ECHO_T}$M4_exists" >&6
24886 else
24887   echo "$as_me:24887: result: no" >&5
24888 echo "${ECHO_T}no" >&6
24889 fi
24890
24891                 if test "$ac_cv_prog_M4_exists" = no; then
24892                         cf_cv_prog_gnat_correct=no
24893                         { echo "$as_me:24893: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24894 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24895                 fi
24896                 if test "$cf_cv_prog_gnat_correct" = yes; then
24897                         echo "$as_me:24897: checking if GNAT works" >&5
24898 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24899
24900 rm -rf conftest* *~conftest*
24901 cat >>conftest.ads <<CF_EOF
24902 procedure conftest;
24903 CF_EOF
24904 cat >>conftest.adb <<CF_EOF
24905 with Text_IO;
24906 with GNAT.OS_Lib;
24907 procedure conftest is
24908 begin
24909    Text_IO.Put ("Hello World");
24910    Text_IO.New_Line;
24911    GNAT.OS_Lib.OS_Exit (0);
24912 end conftest;
24913 CF_EOF
24914 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24915    if ( ./conftest 1>&5 2>&1 ) ; then
24916       cf_cv_prog_gnat_correct=yes
24917    else
24918       cf_cv_prog_gnat_correct=no
24919    fi
24920 else
24921    cf_cv_prog_gnat_correct=no
24922 fi
24923 rm -rf conftest* *~conftest*
24924
24925                         echo "$as_me:24925: result: $cf_cv_prog_gnat_correct" >&5
24926 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24927                 fi
24928         else
24929                 cf_cv_prog_gnat_correct=no
24930         fi
24931 fi
24932
24933                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24934
24935         ADAFLAGS="$ADAFLAGS -gnatpn"
24936
24937         echo "$as_me:24937: checking optimization options for ADAFLAGS" >&5
24938 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24939         case "$CFLAGS" in
24940         (*-g*)
24941
24942         ADAFLAGS="$ADAFLAGS -g"
24943
24944                 ;;
24945         esac
24946         case "$CFLAGS" in
24947         (*-O*)
24948                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24949
24950         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24951
24952                 ;;
24953         esac
24954         echo "$as_me:24954: result: $ADAFLAGS" >&5
24955 echo "${ECHO_T}$ADAFLAGS" >&6
24956
24957 echo "$as_me:24957: checking if GNATPREP supports -T option" >&5
24958 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24959 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24960   echo $ECHO_N "(cached) $ECHO_C" >&6
24961 else
24962
24963 cf_cv_gnatprep_opt_t=no
24964 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24965
24966 fi
24967 echo "$as_me:24967: result: $cf_cv_gnatprep_opt_t" >&5
24968 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24969 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24970
24971 echo "$as_me:24971: checking if GNAT supports generics" >&5
24972 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24973 case $cf_cv_gnat_version in
24974 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24975         cf_gnat_generics=yes
24976         ;;
24977 (*)
24978         cf_gnat_generics=no
24979         ;;
24980 esac
24981 echo "$as_me:24981: result: $cf_gnat_generics" >&5
24982 echo "${ECHO_T}$cf_gnat_generics" >&6
24983
24984 if test "$cf_gnat_generics" = yes
24985 then
24986         cf_compile_generics=generics
24987         cf_generic_objects="\${GENOBJS}"
24988 else
24989         cf_compile_generics=
24990         cf_generic_objects=
24991 fi
24992
24993 echo "$as_me:24993: checking if GNAT supports SIGINT" >&5
24994 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24995 if test "${cf_cv_gnat_sigint+set}" = set; then
24996   echo $ECHO_N "(cached) $ECHO_C" >&6
24997 else
24998
24999 rm -rf conftest* *~conftest*
25000 cat >>conftest.ads <<CF_EOF
25001 with Ada.Interrupts.Names;
25002
25003 package ConfTest is
25004
25005    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25006    pragma Unreserve_All_Interrupts;
25007    pragma Warnings (On);
25008
25009    protected Process is
25010       procedure Stop;
25011       function Continue return Boolean;
25012       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25013    private
25014       Done : Boolean := False;
25015    end Process;
25016
25017 end ConfTest;
25018 CF_EOF
25019 cat >>conftest.adb <<CF_EOF
25020 package body ConfTest is
25021    protected body Process is
25022       procedure Stop is
25023       begin
25024          Done := True;
25025       end Stop;
25026       function Continue return Boolean is
25027       begin
25028          return not Done;
25029       end Continue;
25030    end Process;
25031 end ConfTest;
25032 CF_EOF
25033 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25034       cf_cv_gnat_sigint=yes
25035 else
25036    cf_cv_gnat_sigint=no
25037 fi
25038 rm -rf conftest* *~conftest*
25039
25040 fi
25041 echo "$as_me:25041: result: $cf_cv_gnat_sigint" >&5
25042 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25043
25044 if test $cf_cv_gnat_sigint = yes ; then
25045         USE_GNAT_SIGINT=""
25046 else
25047         USE_GNAT_SIGINT="#"
25048 fi
25049
25050 cf_gnat_libraries=no
25051 cf_gnat_projects=no
25052
25053 if test "$enable_gnat_projects" != no ; then
25054 echo "$as_me:25054: checking if GNAT supports project files" >&5
25055 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25056 case $cf_cv_gnat_version in
25057 (3.[0-9]*)
25058         ;;
25059 (*)
25060         case $cf_cv_system_name in
25061         (cygwin*|msys*)
25062                 ;;
25063         (*)
25064                 rm -rf conftest* *~conftest*
25065                 if mkdir conftest.src conftest.bin conftest.lib
25066                 then
25067                         cd conftest.src
25068                         rm -rf conftest* *~conftest*
25069                         cat >>library.gpr <<CF_EOF
25070 project Library is
25071   Kind := External ("LIB_KIND");
25072   for Library_Name use "ConfTest";
25073   for Object_Dir use ".";
25074   for Library_ALI_Dir use External("LIBRARY_DIR");
25075   for Library_Version use External ("SONAME");
25076   for Library_Kind use Kind;
25077   for Library_Dir use External("BUILD_DIR");
25078   Source_Dir := External ("SOURCE_DIR");
25079   for Source_Dirs use (Source_Dir);
25080 end Library;
25081 CF_EOF
25082                         cat >>confpackage.ads <<CF_EOF
25083 package ConfPackage is
25084    procedure conftest;
25085 end ConfPackage;
25086 CF_EOF
25087                         cat >>confpackage.adb <<CF_EOF
25088 with Text_IO;
25089 package body ConfPackage is
25090    procedure conftest is
25091    begin
25092       Text_IO.Put ("Hello World");
25093       Text_IO.New_Line;
25094    end conftest;
25095 end ConfPackage;
25096 CF_EOF
25097                         if ( $cf_ada_make $ADAFLAGS \
25098                                         -Plibrary.gpr \
25099                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25100                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25101                                         -XSOURCE_DIR=`pwd` \
25102                                         -XSONAME=libConfTest.so.1 \
25103                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25104                                 cf_gnat_projects=yes
25105                         fi
25106                         cd ..
25107                 fi
25108                 if test -f conftest.lib/confpackage.ali
25109                 then
25110                         cf_gnat_libraries=yes
25111                 fi
25112                 rm -rf conftest* *~conftest*
25113                 ;;
25114         esac
25115         ;;
25116 esac
25117 echo "$as_me:25117: result: $cf_gnat_projects" >&5
25118 echo "${ECHO_T}$cf_gnat_projects" >&6
25119 fi # enable_gnat_projects
25120
25121 if test $cf_gnat_projects = yes
25122 then
25123         echo "$as_me:25123: checking if GNAT supports libraries" >&5
25124 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25125         echo "$as_me:25125: result: $cf_gnat_libraries" >&5
25126 echo "${ECHO_T}$cf_gnat_libraries" >&6
25127 fi
25128
25129 if test "$cf_gnat_projects" = yes
25130 then
25131         USE_OLD_MAKERULES="#"
25132         USE_GNAT_PROJECTS=""
25133 else
25134         USE_OLD_MAKERULES=""
25135         USE_GNAT_PROJECTS="#"
25136 fi
25137
25138 if test "$cf_gnat_libraries" = yes
25139 then
25140         USE_GNAT_LIBRARIES=""
25141 else
25142         USE_GNAT_LIBRARIES="#"
25143 fi
25144
25145 echo "$as_me:25145: checking for ada-compiler" >&5
25146 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25147
25148 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25149 if test "${with_ada_compiler+set}" = set; then
25150   withval="$with_ada_compiler"
25151   cf_ada_compiler=$withval
25152 else
25153   cf_ada_compiler=gnatmake
25154 fi;
25155
25156 echo "$as_me:25156: result: $cf_ada_compiler" >&5
25157 echo "${ECHO_T}$cf_ada_compiler" >&6
25158
25159                         cf_ada_package=terminal_interface
25160
25161 echo "$as_me:25161: checking for ada-include" >&5
25162 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25163
25164 # Check whether --with-ada-include or --without-ada-include was given.
25165 if test "${with_ada_include+set}" = set; then
25166   withval="$with_ada_include"
25167
25168 else
25169   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25170 fi; if test -n "$prefix/share/ada/adainclude" ; then
25171
25172 if test "x$prefix" != xNONE; then
25173         cf_path_syntax="$prefix"
25174 else
25175         cf_path_syntax="$ac_default_prefix"
25176 fi
25177
25178 case ".$withval" in
25179 (.\$\(*\)*|.\'*\'*)
25180         ;;
25181 (..|./*|.\\*)
25182         ;;
25183 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25184         ;;
25185 (.\${*prefix}*|.\${*dir}*)
25186         eval withval="$withval"
25187         case ".$withval" in
25188         (.NONE/*)
25189                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25190                 ;;
25191         esac
25192         ;;
25193 (.no|.NONE/*)
25194         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25195         ;;
25196 (*)
25197         { { echo "$as_me:25197: error: expected a pathname, not \"$withval\"" >&5
25198 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25199    { (exit 1); exit 1; }; }
25200         ;;
25201 esac
25202
25203 fi
25204 eval ADA_INCLUDE="$withval"
25205
25206 echo "$as_me:25206: result: $ADA_INCLUDE" >&5
25207 echo "${ECHO_T}$ADA_INCLUDE" >&6
25208
25209 echo "$as_me:25209: checking for ada-objects" >&5
25210 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25211
25212 # Check whether --with-ada-objects or --without-ada-objects was given.
25213 if test "${with_ada_objects+set}" = set; then
25214   withval="$with_ada_objects"
25215
25216 else
25217   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25218 fi; if test -n "$prefix/lib/ada/adalib" ; then
25219
25220 if test "x$prefix" != xNONE; then
25221         cf_path_syntax="$prefix"
25222 else
25223         cf_path_syntax="$ac_default_prefix"
25224 fi
25225
25226 case ".$withval" in
25227 (.\$\(*\)*|.\'*\'*)
25228         ;;
25229 (..|./*|.\\*)
25230         ;;
25231 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25232         ;;
25233 (.\${*prefix}*|.\${*dir}*)
25234         eval withval="$withval"
25235         case ".$withval" in
25236         (.NONE/*)
25237                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25238                 ;;
25239         esac
25240         ;;
25241 (.no|.NONE/*)
25242         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25243         ;;
25244 (*)
25245         { { echo "$as_me:25245: error: expected a pathname, not \"$withval\"" >&5
25246 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25247    { (exit 1); exit 1; }; }
25248         ;;
25249 esac
25250
25251 fi
25252 eval ADA_OBJECTS="$withval"
25253
25254 echo "$as_me:25254: result: $ADA_OBJECTS" >&5
25255 echo "${ECHO_T}$ADA_OBJECTS" >&6
25256
25257 echo "$as_me:25257: checking if an Ada95 shared-library should be built" >&5
25258 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25259
25260 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25261 if test "${with_ada_sharedlib+set}" = set; then
25262   withval="$with_ada_sharedlib"
25263   with_ada_sharedlib=$withval
25264 else
25265   with_ada_sharedlib=no
25266 fi;
25267 echo "$as_me:25267: result: $with_ada_sharedlib" >&5
25268 echo "${ECHO_T}$with_ada_sharedlib" >&6
25269
25270 if test "x$with_ada_sharedlib" != xno
25271 then
25272         if test "x$cf_gnat_projects" != xyes
25273         then
25274                 { echo "$as_me:25274: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25275 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25276                 with_ada_sharedlib=no
25277         fi
25278 fi
25279
25280 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25281 MAKE_ADA_SHAREDLIB="#"
25282
25283 if test "x$with_ada_sharedlib" != xno
25284 then
25285         MAKE_ADA_SHAREDLIB=
25286         if test "x$with_ada_sharedlib" != xyes
25287         then
25288                 ADA_SHAREDLIB="$with_ada_sharedlib"
25289         fi
25290 fi
25291
25292                         # allow the Ada binding to be renamed
25293
25294 echo "$as_me:25294: checking for ada-libname" >&5
25295 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25296
25297 # Check whether --with-ada-libname or --without-ada-libname was given.
25298 if test "${with_ada_libname+set}" = set; then
25299   withval="$with_ada_libname"
25300   ADA_LIBNAME=$withval
25301 else
25302   ADA_LIBNAME=AdaCurses
25303 fi;
25304 case "x$ADA_LIBNAME" in
25305 (x|xyes|xno)
25306         ADA_LIBNAME=AdaCurses
25307         ;;
25308 esac
25309
25310 echo "$as_me:25310: result: $ADA_LIBNAME" >&5
25311 echo "${ECHO_T}$ADA_LIBNAME" >&6
25312
25313                 fi
25314         fi
25315 else
25316         cf_with_ada=no
25317 fi
25318
25319 # do this "late" to avoid conflict with header-checks
25320 if test "x$with_widec" = xyes ; then
25321         echo "$as_me:25321: checking for wchar_t" >&5
25322 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25323 if test "${ac_cv_type_wchar_t+set}" = set; then
25324   echo $ECHO_N "(cached) $ECHO_C" >&6
25325 else
25326   cat >conftest.$ac_ext <<_ACEOF
25327 #line 25327 "configure"
25328 #include "confdefs.h"
25329 $ac_includes_default
25330 int
25331 main (void)
25332 {
25333 if ((wchar_t *) 0)
25334   return 0;
25335 if (sizeof (wchar_t))
25336   return 0;
25337   ;
25338   return 0;
25339 }
25340 _ACEOF
25341 rm -f conftest.$ac_objext
25342 if { (eval echo "$as_me:25342: \"$ac_compile\"") >&5
25343   (eval $ac_compile) 2>&5
25344   ac_status=$?
25345   echo "$as_me:25345: \$? = $ac_status" >&5
25346   (exit $ac_status); } &&
25347          { ac_try='test -s conftest.$ac_objext'
25348   { (eval echo "$as_me:25348: \"$ac_try\"") >&5
25349   (eval $ac_try) 2>&5
25350   ac_status=$?
25351   echo "$as_me:25351: \$? = $ac_status" >&5
25352   (exit $ac_status); }; }; then
25353   ac_cv_type_wchar_t=yes
25354 else
25355   echo "$as_me: failed program was:" >&5
25356 cat conftest.$ac_ext >&5
25357 ac_cv_type_wchar_t=no
25358 fi
25359 rm -f conftest.$ac_objext conftest.$ac_ext
25360 fi
25361 echo "$as_me:25361: result: $ac_cv_type_wchar_t" >&5
25362 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25363
25364 echo "$as_me:25364: checking size of wchar_t" >&5
25365 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25366 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25367   echo $ECHO_N "(cached) $ECHO_C" >&6
25368 else
25369   if test "$ac_cv_type_wchar_t" = yes; then
25370   if test "$cross_compiling" = yes; then
25371   # Depending upon the size, compute the lo and hi bounds.
25372 cat >conftest.$ac_ext <<_ACEOF
25373 #line 25373 "configure"
25374 #include "confdefs.h"
25375 $ac_includes_default
25376 int
25377 main (void)
25378 {
25379 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25380   ;
25381   return 0;
25382 }
25383 _ACEOF
25384 rm -f conftest.$ac_objext
25385 if { (eval echo "$as_me:25385: \"$ac_compile\"") >&5
25386   (eval $ac_compile) 2>&5
25387   ac_status=$?
25388   echo "$as_me:25388: \$? = $ac_status" >&5
25389   (exit $ac_status); } &&
25390          { ac_try='test -s conftest.$ac_objext'
25391   { (eval echo "$as_me:25391: \"$ac_try\"") >&5
25392   (eval $ac_try) 2>&5
25393   ac_status=$?
25394   echo "$as_me:25394: \$? = $ac_status" >&5
25395   (exit $ac_status); }; }; then
25396   ac_lo=0 ac_mid=0
25397   while :; do
25398     cat >conftest.$ac_ext <<_ACEOF
25399 #line 25399 "configure"
25400 #include "confdefs.h"
25401 $ac_includes_default
25402 int
25403 main (void)
25404 {
25405 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25406   ;
25407   return 0;
25408 }
25409 _ACEOF
25410 rm -f conftest.$ac_objext
25411 if { (eval echo "$as_me:25411: \"$ac_compile\"") >&5
25412   (eval $ac_compile) 2>&5
25413   ac_status=$?
25414   echo "$as_me:25414: \$? = $ac_status" >&5
25415   (exit $ac_status); } &&
25416          { ac_try='test -s conftest.$ac_objext'
25417   { (eval echo "$as_me:25417: \"$ac_try\"") >&5
25418   (eval $ac_try) 2>&5
25419   ac_status=$?
25420   echo "$as_me:25420: \$? = $ac_status" >&5
25421   (exit $ac_status); }; }; then
25422   ac_hi=$ac_mid; break
25423 else
25424   echo "$as_me: failed program was:" >&5
25425 cat conftest.$ac_ext >&5
25426 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25427 fi
25428 rm -f conftest.$ac_objext conftest.$ac_ext
25429   done
25430 else
25431   echo "$as_me: failed program was:" >&5
25432 cat conftest.$ac_ext >&5
25433 ac_hi=-1 ac_mid=-1
25434   while :; do
25435     cat >conftest.$ac_ext <<_ACEOF
25436 #line 25436 "configure"
25437 #include "confdefs.h"
25438 $ac_includes_default
25439 int
25440 main (void)
25441 {
25442 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25443   ;
25444   return 0;
25445 }
25446 _ACEOF
25447 rm -f conftest.$ac_objext
25448 if { (eval echo "$as_me:25448: \"$ac_compile\"") >&5
25449   (eval $ac_compile) 2>&5
25450   ac_status=$?
25451   echo "$as_me:25451: \$? = $ac_status" >&5
25452   (exit $ac_status); } &&
25453          { ac_try='test -s conftest.$ac_objext'
25454   { (eval echo "$as_me:25454: \"$ac_try\"") >&5
25455   (eval $ac_try) 2>&5
25456   ac_status=$?
25457   echo "$as_me:25457: \$? = $ac_status" >&5
25458   (exit $ac_status); }; }; then
25459   ac_lo=$ac_mid; break
25460 else
25461   echo "$as_me: failed program was:" >&5
25462 cat conftest.$ac_ext >&5
25463 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25464 fi
25465 rm -f conftest.$ac_objext conftest.$ac_ext
25466   done
25467 fi
25468 rm -f conftest.$ac_objext conftest.$ac_ext
25469 # Binary search between lo and hi bounds.
25470 while test "x$ac_lo" != "x$ac_hi"; do
25471   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25472   cat >conftest.$ac_ext <<_ACEOF
25473 #line 25473 "configure"
25474 #include "confdefs.h"
25475 $ac_includes_default
25476 int
25477 main (void)
25478 {
25479 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25480   ;
25481   return 0;
25482 }
25483 _ACEOF
25484 rm -f conftest.$ac_objext
25485 if { (eval echo "$as_me:25485: \"$ac_compile\"") >&5
25486   (eval $ac_compile) 2>&5
25487   ac_status=$?
25488   echo "$as_me:25488: \$? = $ac_status" >&5
25489   (exit $ac_status); } &&
25490          { ac_try='test -s conftest.$ac_objext'
25491   { (eval echo "$as_me:25491: \"$ac_try\"") >&5
25492   (eval $ac_try) 2>&5
25493   ac_status=$?
25494   echo "$as_me:25494: \$? = $ac_status" >&5
25495   (exit $ac_status); }; }; then
25496   ac_hi=$ac_mid
25497 else
25498   echo "$as_me: failed program was:" >&5
25499 cat conftest.$ac_ext >&5
25500 ac_lo=`expr $ac_mid + 1`
25501 fi
25502 rm -f conftest.$ac_objext conftest.$ac_ext
25503 done
25504 ac_cv_sizeof_wchar_t=$ac_lo
25505 else
25506   if test "$cross_compiling" = yes; then
25507   { { echo "$as_me:25507: error: cannot run test program while cross compiling" >&5
25508 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25509    { (exit 1); exit 1; }; }
25510 else
25511   cat >conftest.$ac_ext <<_ACEOF
25512 #line 25512 "configure"
25513 #include "confdefs.h"
25514 $ac_includes_default
25515 int
25516 main (void)
25517 {
25518 FILE *f = fopen ("conftest.val", "w");
25519 if (!f)
25520   $ac_main_return (1);
25521 fprintf (f, "%d", (sizeof (wchar_t)));
25522 fclose (f);
25523   ;
25524   return 0;
25525 }
25526 _ACEOF
25527 rm -f conftest$ac_exeext
25528 if { (eval echo "$as_me:25528: \"$ac_link\"") >&5
25529   (eval $ac_link) 2>&5
25530   ac_status=$?
25531   echo "$as_me:25531: \$? = $ac_status" >&5
25532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25533   { (eval echo "$as_me:25533: \"$ac_try\"") >&5
25534   (eval $ac_try) 2>&5
25535   ac_status=$?
25536   echo "$as_me:25536: \$? = $ac_status" >&5
25537   (exit $ac_status); }; }; then
25538   ac_cv_sizeof_wchar_t=`cat conftest.val`
25539 else
25540   echo "$as_me: program exited with status $ac_status" >&5
25541 echo "$as_me: failed program was:" >&5
25542 cat conftest.$ac_ext >&5
25543 fi
25544 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25545 fi
25546 fi
25547 rm -f conftest.val
25548 else
25549   ac_cv_sizeof_wchar_t=0
25550 fi
25551 fi
25552 echo "$as_me:25552: result: $ac_cv_sizeof_wchar_t" >&5
25553 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25554 cat >>confdefs.h <<EOF
25555 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25556 EOF
25557
25558         # cross-compiling to mingw can run into the problem that attempting to
25559         # link with the regex library fails, causing the test to not set this to
25560         # a number.  "recent" autoconf does not address this problem either -TD
25561         if test -z "$ac_cv_sizeof_wchar_t"
25562         then
25563                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25564
25565 echo "${as_me:-configure}:25565: testing test failed (assume 2) ..." 1>&5
25566
25567                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25568                 mv confdefs.tmp confdefs.h
25569                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25570         fi
25571 fi
25572
25573 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25574 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25575 ###
25576 ### ticlib modules may be a separate library, otherwise contained in termlib.
25577 ### termlib modules may be a separate library, otherwise contained in ncurses.
25578 ###
25579 ### The of "+" or " " between the tokens controls the way the script
25580 ### chooses to split module lists into libraries.
25581 ###
25582 ### (see CF_LIB_RULES).
25583 echo "$as_me:25583: checking for library subsets" >&5
25584 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25585 LIB_SUBSETS=
25586
25587 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25588         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25589         if test "$with_ticlib" != no ; then
25590                 LIB_SUBSETS="${LIB_SUBSETS} "
25591         else
25592                 LIB_SUBSETS="${LIB_SUBSETS}+"
25593         fi
25594 fi
25595
25596 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25597 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25598
25599 if test "$with_termlib" != no ; then
25600         LIB_SUBSETS="${LIB_SUBSETS} "
25601 else
25602         LIB_SUBSETS="${LIB_SUBSETS}+"
25603 fi
25604
25605 LIB_SUBSETS="${LIB_SUBSETS}base"
25606
25607 # Most term-driver calls are to tinfo, but some like init_pair are to the
25608 # base library (so it resides in base).
25609 if test "$with_term_driver" != no ; then
25610         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25611         case $cf_cv_system_name in
25612         (*mingw32*|*mingw64*)
25613                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25614                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25615                 ;;
25616         (*)
25617                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25618                 ;;
25619         esac
25620 fi
25621
25622 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25623 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25624
25625 echo "$as_me:25625: result: $LIB_SUBSETS" >&5
25626 echo "${ECHO_T}$LIB_SUBSETS" >&6
25627
25628 ### Construct the list of include-directories to be generated
25629
25630 if test "$srcdir" != "."; then
25631         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25632 fi
25633 CPPFLAGS="-I../include $CPPFLAGS"
25634 if test "$srcdir" != "."; then
25635         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25636 fi
25637 CPPFLAGS="-I. $CPPFLAGS"
25638
25639 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25640 if test "$srcdir" != "."; then
25641         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25642 fi
25643 if test "$GCC" != yes; then
25644         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25645 elif test "$includedir" != "/usr/include"; then
25646         if test "$includedir" = '${prefix}/include' ; then
25647                 if test x$prefix != x/usr ; then
25648                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25649                 fi
25650         else
25651                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25652         fi
25653 fi
25654
25655 ### Build up pieces for makefile rules
25656 echo "$as_me:25656: checking default library suffix" >&5
25657 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25658
25659         case $DFT_LWR_MODEL in
25660         (libtool) DFT_ARG_SUFFIX=''   ;;
25661         (normal)  DFT_ARG_SUFFIX=''   ;;
25662         (debug)   DFT_ARG_SUFFIX='_g' ;;
25663         (profile) DFT_ARG_SUFFIX='_p' ;;
25664         (shared)  DFT_ARG_SUFFIX=''   ;;
25665         esac
25666         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25667 echo "$as_me:25667: result: $DFT_ARG_SUFFIX" >&5
25668 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25669
25670 echo "$as_me:25670: checking default library-dependency suffix" >&5
25671 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25672
25673         case X$DFT_LWR_MODEL in
25674         (Xlibtool)
25675                 DFT_LIB_SUFFIX='.la'
25676                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25677                 ;;
25678         (Xdebug)
25679                 case $cf_cv_system_name in
25680                 (*-msvc*)
25681                         DFT_LIB_SUFFIX='_g.lib'
25682                         ;;
25683                 (*)
25684                         DFT_LIB_SUFFIX='_g.a'
25685                         ;;
25686                 esac
25687                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25688                 ;;
25689         (Xprofile)
25690                 case $cf_cv_system_name in
25691                 (*-msvc*)
25692                         DFT_LIB_SUFFIX='_p.lib'
25693                         ;;
25694                 (*)
25695                         DFT_LIB_SUFFIX='_p.a'
25696                         ;;
25697                 esac
25698                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25699                 ;;
25700         (Xshared)
25701                 case $cf_cv_system_name in
25702                 (aix[5-7]*)
25703                         DFT_LIB_SUFFIX='.so'
25704                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25705                         ;;
25706                 (*-msvc*)
25707                         DFT_LIB_SUFFIX='.dll'
25708                         DFT_DEP_SUFFIX='.dll.lib'
25709                         ;;
25710                 (cygwin*|msys*|mingw*)
25711                         DFT_LIB_SUFFIX='.dll'
25712                         DFT_DEP_SUFFIX='.dll.a'
25713                         ;;
25714                 (darwin*)
25715                         DFT_LIB_SUFFIX='.dylib'
25716                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25717                         ;;
25718                 (hpux*)
25719                         case $target in
25720                         (ia64*)
25721                                 DFT_LIB_SUFFIX='.so'
25722                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25723                                 ;;
25724                         (*)
25725                                 DFT_LIB_SUFFIX='.sl'
25726                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25727                                 ;;
25728                         esac
25729                         ;;
25730                 (*)
25731                         DFT_LIB_SUFFIX='.so'
25732                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25733                         ;;
25734                 esac
25735                 ;;
25736         (*)
25737                 case $target in
25738                 (*-msvc*)
25739                         DFT_LIB_SUFFIX='.lib'
25740                         ;;
25741                 (*)
25742                         DFT_LIB_SUFFIX='.a'
25743                         ;;
25744                 esac
25745                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25746                 ;;
25747         esac
25748         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25749         then
25750                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25751                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25752         fi
25753 echo "$as_me:25753: result: $DFT_DEP_SUFFIX" >&5
25754 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25755
25756 echo "$as_me:25756: checking default object directory" >&5
25757 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25758
25759         case $DFT_LWR_MODEL in
25760         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25761         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25762         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25763         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25764         (shared)
25765                 case $cf_cv_system_name in
25766                 (cygwin|msys)
25767                         DFT_OBJ_SUBDIR='objects' ;;
25768                 (*)
25769                         DFT_OBJ_SUBDIR='obj_s' ;;
25770                 esac
25771         esac
25772 echo "$as_me:25772: result: $DFT_OBJ_SUBDIR" >&5
25773 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25774
25775 if test "x$cf_with_cxx" = xyes ; then
25776 echo "$as_me:25776: checking c++ library-dependency suffix" >&5
25777 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25778 if test "$with_libtool" != "no"; then
25779         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25780         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25781 elif test "$with_shared_cxx" != "no"; then
25782         # also for g++ users...
25783         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25784 else
25785         # we normally make a static library because C/C++ library rules differ
25786
25787         case Xnormal in
25788         (Xlibtool)
25789                 CXX_LIB_SUFFIX='.la'
25790                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25791                 ;;
25792         (Xdebug)
25793                 case $cf_cv_system_name in
25794                 (*-msvc*)
25795                         CXX_LIB_SUFFIX='_g.lib'
25796                         ;;
25797                 (*)
25798                         CXX_LIB_SUFFIX='_g.a'
25799                         ;;
25800                 esac
25801                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25802                 ;;
25803         (Xprofile)
25804                 case $cf_cv_system_name in
25805                 (*-msvc*)
25806                         CXX_LIB_SUFFIX='_p.lib'
25807                         ;;
25808                 (*)
25809                         CXX_LIB_SUFFIX='_p.a'
25810                         ;;
25811                 esac
25812                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25813                 ;;
25814         (Xshared)
25815                 case $cf_cv_system_name in
25816                 (aix[5-7]*)
25817                         CXX_LIB_SUFFIX='.so'
25818                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25819                         ;;
25820                 (*-msvc*)
25821                         CXX_LIB_SUFFIX='.dll'
25822                         CXX_DEP_SUFFIX='.dll.lib'
25823                         ;;
25824                 (cygwin*|msys*|mingw*)
25825                         CXX_LIB_SUFFIX='.dll'
25826                         CXX_DEP_SUFFIX='.dll.a'
25827                         ;;
25828                 (darwin*)
25829                         CXX_LIB_SUFFIX='.dylib'
25830                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25831                         ;;
25832                 (hpux*)
25833                         case $target in
25834                         (ia64*)
25835                                 CXX_LIB_SUFFIX='.so'
25836                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25837                                 ;;
25838                         (*)
25839                                 CXX_LIB_SUFFIX='.sl'
25840                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25841                                 ;;
25842                         esac
25843                         ;;
25844                 (*)
25845                         CXX_LIB_SUFFIX='.so'
25846                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25847                         ;;
25848                 esac
25849                 ;;
25850         (*)
25851                 case $target in
25852                 (*-msvc*)
25853                         CXX_LIB_SUFFIX='.lib'
25854                         ;;
25855                 (*)
25856                         CXX_LIB_SUFFIX='.a'
25857                         ;;
25858                 esac
25859                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25860                 ;;
25861         esac
25862         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25863         then
25864                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25865                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25866         fi
25867
25868 fi
25869 echo "$as_me:25869: result: $CXX_LIB_SUFFIX" >&5
25870 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25871
25872 fi
25873
25874 # do not want -ldl in build except as needed for -lncurses dependency
25875 if test "x$with_dlsym" = xyes ; then
25876 if test $DFT_LWR_MODEL = shared || \
25877    test $DFT_LWR_MODEL = libtool ; then
25878
25879 # remove dl library from $LIBS
25880 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25881
25882 fi
25883 fi
25884 ### Set up low-level terminfo dependencies for makefiles.
25885
25886 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25887 # do not need libdl
25888 TICS_LIST=
25889 if test "x$with_dlsym" = xyes ; then
25890
25891 # remove dl library from $SHLIB_LIST
25892 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25893
25894 fi
25895
25896 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25897 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25898 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25899 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25900 then
25901         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25902 fi
25903
25904 if test "$with_ticlib" != no ; then
25905
25906         if test "x$with_ticlib" != xyes ; then
25907                 TICS_NAME=$with_ticlib
25908                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25909                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25910                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25911                 TICS_LIB_SUFFIX="${with_ticlib}"
25912         else
25913                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25914                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25915                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25916                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25917         fi
25918         TICS_LDFLAGS="-L${LIB_DIR}"
25919         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25920 else
25921         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25922         TICS_LDFLAGS="-L${LIB_DIR}"
25923         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25924 fi
25925
25926 if test "$with_termlib" != no ; then
25927
25928         if test "x$with_termlib" != xyes ; then
25929                 TINFO_NAME=$with_termlib
25930                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25931                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25932                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25933                 TINFO_LIB_SUFFIX="${with_termlib}"
25934         else
25935                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25936                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25937                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25938                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25939         fi
25940
25941         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25942         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25943         if test "$DFT_LWR_MODEL" = "libtool"; then
25944                 TEST_ARGS="${TEST_DEPS}"
25945                 TEST_ARG2="${TEST_DEP2}"
25946                 TINFO_LDFLAGS="-L${LIB_DIR}"
25947                 TINFO_LIBS="$TEST_ARGS"
25948                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25949                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25950         else
25951                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25952                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25953                 if test "x$with_term_driver" != xno ; then
25954                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25955                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25956                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25957                 else
25958                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25959                         TINFO_LIBS="$TEST_ARGS"
25960                 fi
25961                 TINFO_LDFLAGS="-L${LIB_DIR}"
25962                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25963         fi
25964 else
25965         # the next lines are needed for linking libtic over libncurses
25966         TINFO_NAME=${LIB_NAME}
25967         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25968         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25969         if test "x$with_tic_depends" = xyes ; then
25970                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25971         else
25972                 TICS_LIST="$SHLIB_LIST"
25973         fi
25974
25975         TINFO_LDFLAGS="-L${LIB_DIR}"
25976         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25977 fi
25978
25979 if test "$DFT_LWR_MODEL" = shared ; then
25980         case $cf_cv_system_name in
25981         (cygwin*|msys*)
25982                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25983                 TINFO_SUFFIX=.dll
25984                 ;;
25985         esac
25986 fi
25987
25988 if test "x$with_dlsym" = xyes ; then
25989
25990 # remove dl library from $TICS_LIST
25991 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25992
25993 fi
25994
25995 if test "$DFT_LWR_MODEL" = "libtool"; then
25996         OBJEXT=lo
25997 fi
25998
25999 # needed for Ada95
26000 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26001
26002 case $DFT_LWR_MODEL in
26003 (normal|debug|profile)
26004
26005 if test "$GCC" = yes ; then
26006         case $cf_cv_system_name in
26007         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26008                 LDFLAGS_STATIC=
26009                 LDFLAGS_SHARED=
26010                 ;;
26011         (*)     # normally, except when broken
26012                 LDFLAGS_STATIC=-static
26013                 LDFLAGS_SHARED=-dynamic
26014                 ;;
26015         esac
26016 else
26017         case $cf_cv_system_name in
26018         (aix[4-7]*)     # from ld manpage
26019                 LDFLAGS_STATIC=-bstatic
26020                 LDFLAGS_SHARED=-bdynamic
26021                 ;;
26022         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26023                 # We could also use just "archive" and "shared".
26024                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26025                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26026                 ;;
26027         (irix*)         # from ld manpage IRIX64
26028                 LDFLAGS_STATIC=-Bstatic
26029                 LDFLAGS_SHARED=-Bdynamic
26030                 ;;
26031         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26032                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26033                 LDFLAGS_STATIC=-noso
26034                 LDFLAGS_SHARED=-so_archive
26035                 ;;
26036         (solaris2*)
26037                 LDFLAGS_STATIC=-Bstatic
26038                 LDFLAGS_SHARED=-Bdynamic
26039                 ;;
26040         esac
26041 fi
26042
26043 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26044 then
26045         echo "$as_me:26045: checking if linker supports switching between static/dynamic" >&5
26046 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26047
26048         rm -f libconftest.a
26049         cat >conftest.$ac_ext <<EOF
26050 #line 26050 "configure"
26051 #include <stdio.h>
26052 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26053 EOF
26054         if { (eval echo "$as_me:26054: \"$ac_compile\"") >&5
26055   (eval $ac_compile) 2>&5
26056   ac_status=$?
26057   echo "$as_me:26057: \$? = $ac_status" >&5
26058   (exit $ac_status); } ; then
26059                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26060                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26061         fi
26062         rm -f conftest.*
26063
26064         cf_save_LIBS="$LIBS"
26065
26066         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26067         cat >conftest.$ac_ext <<_ACEOF
26068 #line 26068 "configure"
26069 #include "confdefs.h"
26070
26071 #line 26071 "configure"
26072 #include <stdio.h>
26073 int cf_ldflags_static(FILE *fp);
26074
26075 int
26076 main (void)
26077 {
26078
26079         return cf_ldflags_static(stdin);
26080
26081   ;
26082   return 0;
26083 }
26084 _ACEOF
26085 rm -f conftest.$ac_objext conftest$ac_exeext
26086 if { (eval echo "$as_me:26086: \"$ac_link\"") >&5
26087   (eval $ac_link) 2>&5
26088   ac_status=$?
26089   echo "$as_me:26089: \$? = $ac_status" >&5
26090   (exit $ac_status); } &&
26091          { ac_try='test -s conftest$ac_exeext'
26092   { (eval echo "$as_me:26092: \"$ac_try\"") >&5
26093   (eval $ac_try) 2>&5
26094   ac_status=$?
26095   echo "$as_me:26095: \$? = $ac_status" >&5
26096   (exit $ac_status); }; }; then
26097
26098         # some linkers simply ignore the -dynamic
26099         case x`file conftest$ac_exeext 2>/dev/null` in
26100         (*static*)
26101                 cf_ldflags_static=no
26102                 ;;
26103         (*)
26104                 cf_ldflags_static=yes
26105                 ;;
26106         esac
26107
26108 else
26109   echo "$as_me: failed program was:" >&5
26110 cat conftest.$ac_ext >&5
26111 cf_ldflags_static=no
26112 fi
26113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26114
26115         rm -f libconftest.*
26116         LIBS="$cf_save_LIBS"
26117
26118         echo "$as_me:26118: result: $cf_ldflags_static" >&5
26119 echo "${ECHO_T}$cf_ldflags_static" >&6
26120
26121         if test $cf_ldflags_static != yes
26122         then
26123                 LDFLAGS_STATIC=
26124                 LDFLAGS_SHARED=
26125         fi
26126 else
26127         LDFLAGS_STATIC=
26128         LDFLAGS_SHARED=
26129 fi
26130
26131         ;;
26132 esac
26133
26134 echo "$as_me:26134: checking where we will install curses.h" >&5
26135 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26136
26137 includesubdir=
26138 if test "$with_overwrite" = no && \
26139  ( test "x$includedir" = 'x${prefix}/include' || \
26140    test "x$includedir" = "x${prefix}/include" )
26141 then
26142         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26143 fi
26144 echo "$as_me:26144: result: ${includedir}${includesubdir}" >&5
26145 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26146
26147 ### Resolve a conflict between normal and wide-curses by forcing applications
26148 ### that will need libutf8 to add it to their configure script.
26149 if test "$with_overwrite" != no ; then
26150 if test "$NCURSES_LIBUTF8" = 1 ; then
26151         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26152         { echo "$as_me:26152: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26153 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26154 fi
26155 fi
26156 WITH_OVERWRITE=$with_overwrite
26157
26158 # used to separate tack out of the tree
26159 NCURSES_TREE=
26160
26161 ### predefined stuff for the test programs
26162
26163 cat >>confdefs.h <<\EOF
26164 #define HAVE_SLK_COLOR 1
26165 EOF
26166
26167 # pkgsrc uses these
26168
26169 echo "$as_me:26169: checking for desired basename for form library" >&5
26170 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26171
26172 # Check whether --with-form-libname or --without-form-libname was given.
26173 if test "${with_form_libname+set}" = set; then
26174   withval="$with_form_libname"
26175   with_lib_basename=$withval
26176 else
26177   with_lib_basename=form
26178 fi;
26179 FORM_NAME="$with_lib_basename"
26180
26181 case "x$FORM_NAME" in
26182 (x|xno|xnone|xyes)
26183         FORM_NAME=form
26184         ;;
26185 (*)
26186         ;;
26187 esac
26188
26189 echo "$as_me:26189: result: $FORM_NAME" >&5
26190 echo "${ECHO_T}$FORM_NAME" >&6
26191
26192 echo "$as_me:26192: checking for desired basename for menu library" >&5
26193 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26194
26195 # Check whether --with-menu-libname or --without-menu-libname was given.
26196 if test "${with_menu_libname+set}" = set; then
26197   withval="$with_menu_libname"
26198   with_lib_basename=$withval
26199 else
26200   with_lib_basename=menu
26201 fi;
26202 MENU_NAME="$with_lib_basename"
26203
26204 case "x$MENU_NAME" in
26205 (x|xno|xnone|xyes)
26206         MENU_NAME=menu
26207         ;;
26208 (*)
26209         ;;
26210 esac
26211
26212 echo "$as_me:26212: result: $MENU_NAME" >&5
26213 echo "${ECHO_T}$MENU_NAME" >&6
26214
26215 echo "$as_me:26215: checking for desired basename for panel library" >&5
26216 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26217
26218 # Check whether --with-panel-libname or --without-panel-libname was given.
26219 if test "${with_panel_libname+set}" = set; then
26220   withval="$with_panel_libname"
26221   with_lib_basename=$withval
26222 else
26223   with_lib_basename=panel
26224 fi;
26225 PANEL_NAME="$with_lib_basename"
26226
26227 case "x$PANEL_NAME" in
26228 (x|xno|xnone|xyes)
26229         PANEL_NAME=panel
26230         ;;
26231 (*)
26232         ;;
26233 esac
26234
26235 echo "$as_me:26235: result: $PANEL_NAME" >&5
26236 echo "${ECHO_T}$PANEL_NAME" >&6
26237
26238 echo "$as_me:26238: checking for desired basename for cxx library" >&5
26239 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26240
26241 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26242 if test "${with_cxx_libname+set}" = set; then
26243   withval="$with_cxx_libname"
26244   with_lib_basename=$withval
26245 else
26246   with_lib_basename=ncurses++
26247 fi;
26248 CXX_NAME="$with_lib_basename"
26249
26250 case "x$CXX_NAME" in
26251 (x|xno|xnone|xyes)
26252         CXX_NAME=ncurses++
26253         ;;
26254 (*)
26255         ;;
26256 esac
26257
26258 echo "$as_me:26258: result: $CXX_NAME" >&5
26259 echo "${ECHO_T}$CXX_NAME" >&6
26260
26261 ### Construct the list of subdirectories for which we'll customize makefiles
26262 ### with the appropriate compile-rules.
26263
26264 echo "$as_me:26264: checking for src modules" >&5
26265 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26266
26267 # dependencies and linker-arguments for test-programs
26268 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26269 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26270 if test "$DFT_LWR_MODEL" = "libtool"; then
26271         TEST_ARGS="${TEST_DEPS}"
26272         TEST_ARG2="${TEST_DEP2}"
26273 else
26274         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26275         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26276 fi
26277
26278 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26279 cf_cv_src_modules=
26280 for cf_dir in $modules_to_build
26281 do
26282         if test -f $srcdir/$cf_dir/modules; then
26283
26284                 # We may/may not have tack in the distribution, though the
26285                 # makefile is.
26286                 if test $cf_dir = tack ; then
26287                         if test "x$cf_with_tack" != "xyes"; then
26288                                 continue
26289                         fi
26290                 fi
26291
26292                 if test -z "$cf_cv_src_modules"; then
26293                         cf_cv_src_modules=$cf_dir
26294                 else
26295                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26296                 fi
26297
26298                 # Make the ncurses_cfg.h file record the library interface files as
26299                 # well.  These are header files that are the same name as their
26300                 # directory.  Ncurses is the only library that does not follow
26301                 # that pattern.
26302                 if test $cf_dir = tack ; then
26303                         continue
26304                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26305
26306 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26307
26308                         cat >>confdefs.h <<EOF
26309 #define HAVE_${cf_have_include}_H 1
26310 EOF
26311
26312                         cat >>confdefs.h <<EOF
26313 #define HAVE_LIB${cf_have_include} 1
26314 EOF
26315
26316 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26317
26318 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26319
26320                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26321                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26322                         if test "$DFT_LWR_MODEL" = "libtool"; then
26323                                 TEST_ARGS="${TEST_DEPS}"
26324                                 TEST_ARG2="${TEST_DEP2}"
26325                         else
26326                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26327                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26328                         fi
26329                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26330                 fi
26331         fi
26332 done
26333 echo "$as_me:26333: result: $cf_cv_src_modules" >&5
26334 echo "${ECHO_T}$cf_cv_src_modules" >&6
26335
26336 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26337 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26338
26339 SRC_SUBDIRS=
26340 if test "x$cf_with_manpages" != xno ; then
26341         SRC_SUBDIRS="$SRC_SUBDIRS man"
26342 fi
26343 SRC_SUBDIRS="$SRC_SUBDIRS include"
26344 for cf_dir in $cf_cv_src_modules
26345 do
26346         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26347 done
26348 if test "x$cf_with_tests" != "xno" ; then
26349         SRC_SUBDIRS="$SRC_SUBDIRS test"
26350 fi
26351 # always make this, to install the ncurses-config script
26352 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26353 if test "$cf_with_cxx_binding" != no; then
26354         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26355         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26356 fi
26357
26358 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26359 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26360
26361 ADA_SUBDIRS=
26362 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26363         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26364         ADA_SUBDIRS="gen src"
26365         if test "x$cf_with_tests" != "xno" ; then
26366                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26367         fi
26368 fi
26369
26370 SUB_MAKEFILES=
26371 for cf_dir in $SRC_SUBDIRS
26372 do
26373         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26374 done
26375
26376 if test -n "$ADA_SUBDIRS"; then
26377         for cf_dir in $ADA_SUBDIRS
26378         do
26379                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26380         done
26381
26382 fi
26383
26384 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26385    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26386    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26387    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26388 fi
26389
26390 DIRS_TO_MAKE="lib"
26391 for cf_item in $cf_list_models
26392 do
26393
26394         case $cf_item in
26395         (libtool) cf_subdir='obj_lo'  ;;
26396         (normal)  cf_subdir='objects' ;;
26397         (debug)   cf_subdir='obj_g' ;;
26398         (profile) cf_subdir='obj_p' ;;
26399         (shared)
26400                 case $cf_cv_system_name in
26401                 (cygwin|msys)
26402                         cf_subdir='objects' ;;
26403                 (*)
26404                         cf_subdir='obj_s' ;;
26405                 esac
26406         esac
26407
26408         for cf_item2 in $DIRS_TO_MAKE
26409         do
26410                 test $cf_item2 = $cf_subdir && break
26411         done
26412         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26413 done
26414 for cf_dir in $DIRS_TO_MAKE
26415 do
26416         test ! -d $cf_dir && mkdir $cf_dir
26417 done
26418
26419 # symbols that differ when compiling Ada95 by itself.
26420 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26421
26422 # values to use as strings
26423
26424 cat >>confdefs.h <<EOF
26425 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26426 EOF
26427
26428 cat >>confdefs.h <<EOF
26429 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26430 EOF
26431
26432 ### Now that we're done running tests, add the compiler-warnings, if any
26433
26434 cf_fix_cppflags=no
26435 cf_new_cflags=
26436 cf_new_cppflags=
26437 cf_new_extra_cppflags=
26438
26439 for cf_add_cflags in $EXTRA_CFLAGS
26440 do
26441 case $cf_fix_cppflags in
26442 (no)
26443         case $cf_add_cflags in
26444         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26445                 case $cf_add_cflags in
26446                 (-D*)
26447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26448
26449                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26450                                 && test -z "${cf_tst_cflags}" \
26451                                 && cf_fix_cppflags=yes
26452
26453                         if test $cf_fix_cppflags = yes ; then
26454
26455         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26456         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26457
26458                                 continue
26459                         elif test "${cf_tst_cflags}" = "\"'" ; then
26460
26461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26463
26464                                 continue
26465                         fi
26466                         ;;
26467                 esac
26468                 case "$CPPFLAGS" in
26469                 (*$cf_add_cflags)
26470                         ;;
26471                 (*)
26472                         case $cf_add_cflags in
26473                         (-D*)
26474                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26475
26476 CPPFLAGS=`echo "$CPPFLAGS" | \
26477         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26478                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26479
26480                                 ;;
26481                         esac
26482
26483         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26484         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26485
26486                         ;;
26487                 esac
26488                 ;;
26489         (*)
26490
26491         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26492         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26493
26494                 ;;
26495         esac
26496         ;;
26497 (yes)
26498
26499         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26500         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26501
26502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26503
26504         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26505                 && test -z "${cf_tst_cflags}" \
26506                 && cf_fix_cppflags=no
26507         ;;
26508 esac
26509 done
26510
26511 if test -n "$cf_new_cflags" ; then
26512
26513         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26514         CFLAGS="${CFLAGS}$cf_new_cflags"
26515
26516 fi
26517
26518 if test -n "$cf_new_cppflags" ; then
26519
26520         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26521         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26522
26523 fi
26524
26525 if test -n "$cf_new_extra_cppflags" ; then
26526
26527         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26528         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26529
26530 fi
26531
26532 ### Define substitutions for header files to avoid name-pollution
26533
26534 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26535         HAVE_TCGETATTR=1
26536 else
26537         HAVE_TCGETATTR=0
26538 fi
26539
26540 if test "x$ac_cv_header_stdint_h" = xyes ; then
26541         HAVE_STDINT_H=1
26542 else
26543         HAVE_STDINT_H=0
26544 fi
26545
26546 if test "x$ac_cv_header_termio_h" = xyes ; then
26547         HAVE_TERMIO_H=1
26548 else
26549         HAVE_TERMIO_H=0
26550 fi
26551
26552 if test "x$ac_cv_header_termios_h" = xyes ; then
26553         HAVE_TERMIOS_H=1
26554 else
26555         HAVE_TERMIOS_H=0
26556 fi
26557
26558 ################################################################################
26559 test "x$use_database" = xyes && \
26560 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26561
26562 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26563 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26564
26565 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26566 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26567 fi
26568
26569 if test "x$cf_with_tests" != xno ; then
26570         MAKE_TESTS=
26571 else
26572         MAKE_TESTS="#"
26573 fi
26574
26575 ADAHTML_DIR=../../doc/html/ada
26576
26577 # workaround for OS/2 (20151017)
26578 case $cf_cv_system_name in
26579 (os2*)
26580         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26581         ;;
26582 (*)
26583         LIBTOOL_OPTS_CXX=
26584         ;;
26585 esac
26586
26587 # workaround for g++ versus Solaris (20131116)
26588 case $cf_cv_system_name in
26589 (solaris2*)
26590         case "x$CPPFLAGS" in
26591         (*-D_XOPEN_SOURCE_EXTENDED*)
26592                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26593
26594 echo "${as_me:-configure}:26594: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26595
26596                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26597                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26598                 ;;
26599         esac
26600         ;;
26601 esac
26602
26603 # Help to automatically enable the extended curses features when using either
26604 # the *-config or the ".pc" files by adding defines.
26605 echo "$as_me:26605: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26606 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26607 PKG_CFLAGS=
26608 for cf_loop1 in $CPPFLAGS_after_XOPEN
26609 do
26610         cf_found=no
26611         for cf_loop2 in $CPPFLAGS_before_XOPEN
26612         do
26613                 if test "x$cf_loop1" = "x$cf_loop2"
26614                 then
26615                         cf_found=yes
26616                         break
26617                 fi
26618         done
26619         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26620 done
26621 echo "$as_me:26621: result: $PKG_CFLAGS" >&5
26622 echo "${ECHO_T}$PKG_CFLAGS" >&6
26623
26624 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26625 case "x$NCURSES_OSPEED" in
26626 (*short*)
26627         cf_compatible=1
26628         ;;
26629 (*)
26630         cf_compatible=0
26631         ;;
26632 esac
26633
26634 cat >>confdefs.h <<EOF
26635 #define NCURSES_OSPEED_COMPAT $cf_compatible
26636 EOF
26637
26638 case "x$cf_cv_typeof_chtype" in
26639 (xshort|xint|xlong)
26640         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26641         ;;
26642 esac
26643
26644 case "x$cf_cv_typeof_mmask_t" in
26645 (xshort|xint|xlong)
26646         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26647         ;;
26648 esac
26649
26650 # substitute into misc/Makefile to suppress
26651 # (un)install.data from the
26652 # (un)install rules.
26653 if test "x$cf_with_db_install" = "xno"; then
26654         MISC_INSTALL_DATA=
26655         MISC_UNINSTALL_DATA=
26656 else
26657         MISC_INSTALL_DATA=install.data
26658         MISC_UNINSTALL_DATA=uninstall.data
26659 fi
26660
26661 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26662         MAKE_DATABASE="#"
26663 else
26664         MAKE_DATABASE="$MAKE_TERMINFO"
26665 fi
26666
26667 if test -n "$PACKAGE"
26668 then
26669         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26670         export PACKAGE
26671         echo "package: $PACKAGE"
26672 fi
26673
26674 UNALTERED_SYMS=
26675 cf_filter_syms=no
26676
26677 if test -n "$RESULTING_SYMS"
26678 then
26679         cf_filter_syms=$cf_dft_filter_syms
26680         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26681
26682 echo "${as_me:-configure}:26682: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26683
26684 fi
26685
26686 if test "x$WILDCARD_SYMS" = xno
26687 then
26688         cf_filter_syms=yes
26689 fi
26690
26691 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26692
26693 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26694 if test $cf_filter_syms = yes
26695 then
26696         RESULTING_SYMS=resulting.map
26697 fi
26698
26699 if test "x$cross_compiling" = xyes ; then
26700         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26701         CHECK_BUILD="#"
26702 else
26703         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26704         CHECK_BUILD=
26705 fi
26706
26707 # This is used for the *-config script and *.pc data files.
26708
26709 echo "$as_me:26709: checking for linker search path" >&5
26710 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26711 if test "${cf_cv_ld_searchpath+set}" = set; then
26712   echo $ECHO_N "(cached) $ECHO_C" >&6
26713 else
26714
26715 if test "$cross_compiling" != yes ; then
26716
26717 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26718 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26719
26720 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26721 # update the cache, which makes it run faster.
26722 test -z "$cf_pathlist" && \
26723         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26724
26725 test -z "$cf_pathlist" &&
26726         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26727
26728 # This works with OpenBSD 6.5, which lists only filenames
26729 test -z "$cf_pathlist" &&
26730         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26731
26732 if test -z "$cf_pathlist"
26733 then
26734         # dyld default path with MacOS
26735         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26736         then
26737                 # do this to bypass check
26738                 cf_cv_ld_searchpath='$HOME/lib'
26739                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26740         fi
26741 fi
26742
26743 if test -z "$cf_pathlist"
26744 then
26745         # Solaris is hardcoded
26746         if test -d /opt/SUNWspro/lib
26747         then
26748                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26749         elif test -d /usr/ccs/lib
26750         then
26751                 cf_pathlist="/usr/ccs/lib /usr/lib"
26752         fi
26753 fi
26754
26755 fi
26756
26757 # If nothing else, assume it is conventional
26758 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26759
26760 # Finally, check that this is only directories
26761 for cf_path in $0 $cf_pathlist
26762 do
26763         if test -d "$cf_path"; then
26764                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26765                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26766         fi
26767 done
26768
26769 # Ensure that it is nonempty
26770 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26771
26772 fi
26773 echo "$as_me:26773: result: $cf_cv_ld_searchpath" >&5
26774 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26775
26776 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26777
26778 cat >>confdefs.h <<\EOF
26779 #define HAVE_CURSES_DATA_BOOLNAMES 1
26780 EOF
26781
26782 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"
26783 ac_config_commands="$ac_config_commands default"
26784 cat >confcache <<\_ACEOF
26785 # This file is a shell script that caches the results of configure
26786 # tests run on this system so they can be shared between configure
26787 # scripts and configure runs, see configure's option --config-cache.
26788 # It is not useful on other systems.  If it contains results you don't
26789 # want to keep, you may remove or edit it.
26790 #
26791 # config.status only pays attention to the cache file if you give it
26792 # the --recheck option to rerun configure.
26793 #
26794 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26795 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26796 # following values.
26797
26798 _ACEOF
26799
26800 # The following way of writing the cache mishandles newlines in values,
26801 # but we know of no workaround that is simple, portable, and efficient.
26802 # So, don't put newlines in cache variables' values.
26803 # Ultrix sh set writes to stderr and can't be redirected directly,
26804 # and sets the high bit in the cache file unless we assign to the vars.
26805 {
26806   (set) 2>&1 |
26807     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26808     *ac_space=\ *)
26809       # `set' does not quote correctly, so add quotes (double-quote
26810       # substitution turns \\\\ into \\, and sed turns \\ into \).
26811       sed -n \
26812         "s/'/'\\\\''/g;
26813           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26814       ;;
26815     *)
26816       # `set' quotes correctly as required by POSIX, so do not add quotes.
26817       sed -n \
26818         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26819       ;;
26820     esac;
26821 } |
26822   sed '
26823      t clear
26824      : clear
26825      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26826      t end
26827      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26828      : end' >>confcache
26829 if cmp -s $cache_file confcache; then :; else
26830   if test -w $cache_file; then
26831     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26832     cat confcache >$cache_file
26833   else
26834     echo "not updating unwritable cache $cache_file"
26835   fi
26836 fi
26837 rm -f confcache
26838
26839 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26840 # Let make expand exec_prefix.
26841 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26842
26843 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26844 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26845 # trailing colons and then remove the whole line if VPATH becomes empty
26846 # (actually we leave an empty line to preserve line numbers).
26847 if test "x$srcdir" = x.; then
26848   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26849 s/:*\$(srcdir):*/:/;
26850 s/:*\${srcdir}:*/:/;
26851 s/:*@srcdir@:*/:/;
26852 s/^\([^=]*=[    ]*\):*/\1/;
26853 s/:*$//;
26854 s/^[^=]*=[      ]*$//;
26855 }'
26856 fi
26857
26858 DEFS=-DHAVE_CONFIG_H
26859
26860 : ${CONFIG_STATUS=./config.status}
26861 ac_clean_files_save=$ac_clean_files
26862 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26863 { echo "$as_me:26863: creating $CONFIG_STATUS" >&5
26864 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26865 cat >$CONFIG_STATUS <<_ACEOF
26866 #! $SHELL
26867 # Generated automatically by configure.
26868 # Run this file to recreate the current configuration.
26869 # Compiler output produced by configure, useful for debugging
26870 # configure, is in config.log if it exists.
26871
26872 debug=false
26873 SHELL=\${CONFIG_SHELL-$SHELL}
26874 ac_cs_invocation="\$0 \$@"
26875
26876 _ACEOF
26877
26878 cat >>$CONFIG_STATUS <<\_ACEOF
26879 # Be Bourne compatible
26880 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26881   emulate sh
26882   NULLCMD=:
26883 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26884   set -o posix
26885 fi
26886
26887 # Name of the executable.
26888 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26889
26890 if expr a : '\(a\)' >/dev/null 2>&1; then
26891   as_expr=expr
26892 else
26893   as_expr=false
26894 fi
26895
26896 rm -f conf$$ conf$$.exe conf$$.file
26897 echo >conf$$.file
26898 if ln -s conf$$.file conf$$ 2>/dev/null; then
26899   # We could just check for DJGPP; but this test a) works b) is more generic
26900   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26901   if test -f conf$$.exe; then
26902     # Don't use ln at all; we don't have any links
26903     as_ln_s='cp -p'
26904   else
26905     as_ln_s='ln -s'
26906   fi
26907 elif ln conf$$.file conf$$ 2>/dev/null; then
26908   as_ln_s=ln
26909 else
26910   as_ln_s='cp -p'
26911 fi
26912 rm -f conf$$ conf$$.exe conf$$.file
26913
26914 as_executable_p="test -f"
26915
26916 # Support unset when possible.
26917 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26918   as_unset=unset
26919 else
26920   as_unset=false
26921 fi
26922
26923 # NLS nuisances.
26924 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26925 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26926 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26927 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26928 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26929 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26930 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26931 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26932
26933 # IFS
26934 # We need space, tab and new line, in precisely that order.
26935 as_nl='
26936 '
26937 IFS="   $as_nl"
26938
26939 # CDPATH.
26940 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26941
26942 exec 6>&1
26943
26944 _ACEOF
26945
26946 # Files that config.status was made for.
26947 if test -n "$ac_config_files"; then
26948   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26949 fi
26950
26951 if test -n "$ac_config_headers"; then
26952   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26953 fi
26954
26955 if test -n "$ac_config_links"; then
26956   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26957 fi
26958
26959 if test -n "$ac_config_commands"; then
26960   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26961 fi
26962
26963 cat >>$CONFIG_STATUS <<\EOF
26964
26965 ac_cs_usage="\
26966 \`$as_me' instantiates files from templates according to the
26967 current configuration.
26968
26969 Usage: $0 [OPTIONS] [FILE]...
26970
26971   -h, --help       print this help, then exit
26972   -V, --version    print version number, then exit
26973   -d, --debug      don't remove temporary files
26974       --recheck    update $as_me by reconfiguring in the same conditions
26975   --file=FILE[:TEMPLATE]
26976                    instantiate the configuration file FILE
26977   --header=FILE[:TEMPLATE]
26978                    instantiate the configuration header FILE
26979
26980 Configuration files:
26981 $config_files
26982
26983 Configuration headers:
26984 $config_headers
26985
26986 Configuration commands:
26987 $config_commands
26988
26989 Report bugs to <dickey@invisible-island.net>."
26990 EOF
26991
26992 cat >>$CONFIG_STATUS <<EOF
26993 ac_cs_version="\\
26994 config.status
26995 configured by $0, generated by GNU Autoconf 2.52.20200111,
26996   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26997
26998 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26999 Free Software Foundation, Inc.
27000 This config.status script is free software; the Free Software Foundation
27001 gives unlimited permission to copy, distribute and modify it."
27002 srcdir=$srcdir
27003 INSTALL="$INSTALL"
27004 EOF
27005
27006 cat >>$CONFIG_STATUS <<\EOF
27007 # If no file are specified by the user, then we need to provide default
27008 # value.  By we need to know if files were specified by the user.
27009 ac_need_defaults=:
27010 while test $# != 0
27011 do
27012   case $1 in
27013   --*=*)
27014     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27015     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27016     shift
27017     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27018     shift
27019     ;;
27020   -*);;
27021   *) # This is not an option, so the user has probably given explicit
27022      # arguments.
27023      ac_need_defaults=false;;
27024   esac
27025
27026   case $1 in
27027   # Handling of the options.
27028 EOF
27029 cat >>$CONFIG_STATUS <<EOF
27030   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27031     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27032     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27033 EOF
27034 cat >>$CONFIG_STATUS <<\EOF
27035   --version | --vers* | -V )
27036     echo "$ac_cs_version"; exit 0 ;;
27037   --he | --h)
27038     # Conflict between --help and --header
27039     { { echo "$as_me:27039: error: ambiguous option: $1
27040 Try \`$0 --help' for more information." >&5
27041 echo "$as_me: error: ambiguous option: $1
27042 Try \`$0 --help' for more information." >&2;}
27043    { (exit 1); exit 1; }; };;
27044   --help | --hel | -h )
27045     echo "$ac_cs_usage"; exit 0 ;;
27046   --debug | --d* | -d )
27047     debug=: ;;
27048   --file | --fil | --fi | --f )
27049     shift
27050     CONFIG_FILES="$CONFIG_FILES $1"
27051     ac_need_defaults=false;;
27052   --header | --heade | --head | --hea )
27053     shift
27054     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27055     ac_need_defaults=false;;
27056
27057   # This is an error.
27058   -*) { { echo "$as_me:27058: error: unrecognized option: $1
27059 Try \`$0 --help' for more information." >&5
27060 echo "$as_me: error: unrecognized option: $1
27061 Try \`$0 --help' for more information." >&2;}
27062    { (exit 1); exit 1; }; } ;;
27063
27064   *) ac_config_targets="$ac_config_targets $1" ;;
27065
27066   esac
27067   shift
27068 done
27069
27070 exec 5>>config.log
27071 cat >&5 << _ACEOF
27072
27073 ## ----------------------- ##
27074 ## Running config.status.  ##
27075 ## ----------------------- ##
27076
27077 This file was extended by $as_me 2.52.20200111, executed with
27078   CONFIG_FILES    = $CONFIG_FILES
27079   CONFIG_HEADERS  = $CONFIG_HEADERS
27080   CONFIG_LINKS    = $CONFIG_LINKS
27081   CONFIG_COMMANDS = $CONFIG_COMMANDS
27082   > $ac_cs_invocation
27083 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27084
27085 _ACEOF
27086 EOF
27087
27088 cat >>$CONFIG_STATUS <<EOF
27089 #
27090 # INIT-COMMANDS section.
27091 #
27092
27093 ### Special initialization commands, used to pass information from the
27094 ### configuration-run into config.status
27095
27096 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27097 AWK="$AWK"
27098 CXX_NAME="$CXX_NAME"
27099 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27100 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27101 ECHO_LD="$ECHO_LD"
27102 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27103 FORM_NAME="$FORM_NAME"
27104 LDCONFIG="$LDCONFIG"
27105 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27106 LIB_NAME="$LIB_NAME"
27107 LIB_PREFIX="$LIB_PREFIX"
27108 LIB_SUBSETS="$LIB_SUBSETS"
27109 LIB_SUFFIX="$LIB_SUFFIX"
27110 LIB_TRACING="$LIB_TRACING"
27111 LN_S="$LN_S"
27112 MAKE_TERMINFO="$MAKE_TERMINFO"
27113 MENU_NAME="$MENU_NAME"
27114 NCURSES_MAJOR="$NCURSES_MAJOR"
27115 NCURSES_MINOR="$NCURSES_MINOR"
27116 NCURSES_OSPEED="$NCURSES_OSPEED"
27117 NCURSES_PATCH="$NCURSES_PATCH"
27118 PANEL_NAME="$PANEL_NAME"
27119 SRC_SUBDIRS="$SRC_SUBDIRS"
27120 TERMINFO="$TERMINFO"
27121 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27122 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27123 TICS_NAME="$TICS_NAME"
27124 TICS_SUFFIX="$TICS_SUFFIX"
27125 TIC_PATH="$TIC_PATH"
27126 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27127 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27128 TINFO_NAME="$TINFO_NAME"
27129 TINFO_SUFFIX="$TINFO_SUFFIX"
27130 UNALTERED_SYMS="$UNALTERED_SYMS"
27131 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27132 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27133 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27134 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27135 WILDCARD_SYMS="$WILDCARD_SYMS"
27136 WITH_CURSES_H="$with_curses_h"
27137 WITH_ECHO="${enable_echo:=yes}"
27138 WITH_OVERWRITE="$with_overwrite"
27139 cf_LIST_MODELS="$cf_list_models"
27140 cf_cv_abi_version="$cf_cv_abi_version"
27141 cf_cv_do_relink="$cf_cv_do_relink"
27142 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27143 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27144 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27145 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27146 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27147 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27148 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27149 cf_cv_rel_version="$cf_cv_rel_version"
27150 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27151 cf_cv_shared_soname='$cf_cv_shared_soname'
27152 cf_cv_shlib_version="$cf_cv_shlib_version"
27153 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27154 cf_cv_system_name="$cf_cv_system_name"
27155 cf_cv_term_driver="$with_term_driver"
27156 cf_with_ada="$cf_with_ada"
27157 cf_with_cxx_binding="$cf_with_cxx_binding"
27158 cf_with_db_install="$cf_with_db_install"
27159 cf_with_manpages="$cf_with_manpages"
27160 cf_with_tests="$cf_with_tests"
27161 host="$host"
27162 target="$target"
27163 with_shared_cxx="$with_shared_cxx"
27164
27165 EOF
27166
27167 cat >>$CONFIG_STATUS <<\EOF
27168 for ac_config_target in $ac_config_targets
27169 do
27170   case "$ac_config_target" in
27171   # Handling of arguments.
27172   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27173   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27174   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27175   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27176   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27177   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27178   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27179   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27180   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27181   *) { { echo "$as_me:27181: error: invalid argument: $ac_config_target" >&5
27182 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27183    { (exit 1); exit 1; }; };;
27184   esac
27185 done
27186
27187 # If the user did not use the arguments to specify the items to instantiate,
27188 # then the envvar interface is used.  Set only those that are not.
27189 # We use the long form for the default assignment because of an extremely
27190 # bizarre bug on SunOS 4.1.3.
27191 if $ac_need_defaults; then
27192   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27193   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27194   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27195 fi
27196
27197 # Create a temporary directory, and hook for its removal unless debugging.
27198 $debug ||
27199 {
27200   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27201   trap '{ (exit 1); exit 1; }' 1 2 13 15
27202 }
27203
27204 # Create a (secure) tmp directory for tmp files.
27205 : ${TMPDIR=/tmp}
27206 {
27207   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27208   test -n "$tmp" && test -d "$tmp"
27209 }  ||
27210 {
27211   tmp=$TMPDIR/cs$$-$RANDOM
27212   (umask 077 && mkdir $tmp)
27213 } ||
27214 {
27215    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27216    { (exit 1); exit 1; }
27217 }
27218
27219 EOF
27220
27221 cat >>$CONFIG_STATUS <<EOF
27222
27223 #
27224 # CONFIG_FILES section.
27225 #
27226
27227 # No need to generate the scripts if there are no CONFIG_FILES.
27228 # This happens for instance when ./config.status config.h
27229 if test -n "\$CONFIG_FILES"; then
27230   # Protect against being on the right side of a sed subst in config.status.
27231   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27232    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27233 s,@SHELL@,$SHELL,;t t
27234 s,@exec_prefix@,$exec_prefix,;t t
27235 s,@prefix@,$prefix,;t t
27236 s,@program_transform_name@,$program_transform_name,;t t
27237 s,@bindir@,$bindir,;t t
27238 s,@sbindir@,$sbindir,;t t
27239 s,@libexecdir@,$libexecdir,;t t
27240 s,@datarootdir@,$datarootdir,;t t
27241 s,@datadir@,$datadir,;t t
27242 s,@sysconfdir@,$sysconfdir,;t t
27243 s,@sharedstatedir@,$sharedstatedir,;t t
27244 s,@localstatedir@,$localstatedir,;t t
27245 s,@runstatedir@,$runstatedir,;t t
27246 s,@libdir@,$libdir,;t t
27247 s,@includedir@,$includedir,;t t
27248 s,@oldincludedir@,$oldincludedir,;t t
27249 s,@infodir@,$infodir,;t t
27250 s,@mandir@,$mandir,;t t
27251 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27252 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27253 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27254 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27255 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27256 s,@build_alias@,$build_alias,;t t
27257 s,@host_alias@,$host_alias,;t t
27258 s,@target_alias@,$target_alias,;t t
27259 s,@ECHO_C@,$ECHO_C,;t t
27260 s,@ECHO_N@,$ECHO_N,;t t
27261 s,@ECHO_T@,$ECHO_T,;t t
27262 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27263 s,@DEFS@,$DEFS,;t t
27264 s,@LIBS@,$LIBS,;t t
27265 s,@top_builddir@,$top_builddir,;t t
27266 s,@EGREP@,$EGREP,;t t
27267 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27268 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27269 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27270 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27271 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27272 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27273 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27274 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27275 s,@VERSION@,$VERSION,;t t
27276 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27277 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27278 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27279 s,@PACKAGE@,$PACKAGE,;t t
27280 s,@build@,$build,;t t
27281 s,@build_cpu@,$build_cpu,;t t
27282 s,@build_vendor@,$build_vendor,;t t
27283 s,@build_os@,$build_os,;t t
27284 s,@host@,$host,;t t
27285 s,@host_cpu@,$host_cpu,;t t
27286 s,@host_vendor@,$host_vendor,;t t
27287 s,@host_os@,$host_os,;t t
27288 s,@target@,$target,;t t
27289 s,@target_cpu@,$target_cpu,;t t
27290 s,@target_vendor@,$target_vendor,;t t
27291 s,@target_os@,$target_os,;t t
27292 s,@CC@,$CC,;t t
27293 s,@CFLAGS@,$CFLAGS,;t t
27294 s,@LDFLAGS@,$LDFLAGS,;t t
27295 s,@CPPFLAGS@,$CPPFLAGS,;t t
27296 s,@ac_ct_CC@,$ac_ct_CC,;t t
27297 s,@EXEEXT@,$EXEEXT,;t t
27298 s,@OBJEXT@,$OBJEXT,;t t
27299 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27300 s,@CPP@,$CPP,;t t
27301 s,@LDCONFIG@,$LDCONFIG,;t t
27302 s,@CXX@,$CXX,;t t
27303 s,@CXXFLAGS@,$CXXFLAGS,;t t
27304 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27305 s,@AWK@,$AWK,;t t
27306 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27307 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27308 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27309 s,@LINT@,$LINT,;t t
27310 s,@LINT_OPTS@,$LINT_OPTS,;t t
27311 s,@LN_S@,$LN_S,;t t
27312 s,@cf_config_suffix@,$cf_config_suffix,;t t
27313 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27314 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27315 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27316 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27317 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27318 s,@SET_MAKE@,$SET_MAKE,;t t
27319 s,@CTAGS@,$CTAGS,;t t
27320 s,@ETAGS@,$ETAGS,;t t
27321 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27322 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27323 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27324 s,@RANLIB@,$RANLIB,;t t
27325 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27326 s,@LD@,$LD,;t t
27327 s,@ac_ct_LD@,$ac_ct_LD,;t t
27328 s,@AR@,$AR,;t t
27329 s,@ac_ct_AR@,$ac_ct_AR,;t t
27330 s,@NM@,$NM,;t t
27331 s,@ac_ct_NM@,$ac_ct_NM,;t t
27332 s,@ARFLAGS@,$ARFLAGS,;t t
27333 s,@DESTDIR@,$DESTDIR,;t t
27334 s,@BUILD_CC@,$BUILD_CC,;t t
27335 s,@BUILD_CPP@,$BUILD_CPP,;t t
27336 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27337 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27338 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27339 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27340 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27341 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27342 s,@cf_list_models@,$cf_list_models,;t t
27343 s,@ABI_VERSION@,$ABI_VERSION,;t t
27344 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27345 s,@LIBTOOL@,$LIBTOOL,;t t
27346 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27347 s,@LT_UNDEF@,$LT_UNDEF,;t t
27348 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27349 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27350 s,@LIB_CREATE@,$LIB_CREATE,;t t
27351 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27352 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27353 s,@LIB_PREP@,$LIB_PREP,;t t
27354 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27355 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27356 s,@LIB_LINK@,$LIB_LINK,;t t
27357 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27358 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27359 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27360 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27361 s,@TICS_NAME@,$TICS_NAME,;t t
27362 s,@TINFO_NAME@,$TINFO_NAME,;t t
27363 s,@LIB_NAME@,$LIB_NAME,;t t
27364 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27365 s,@CC_G_OPT@,$CC_G_OPT,;t t
27366 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27367 s,@LD_MODEL@,$LD_MODEL,;t t
27368 s,@shlibdir@,$shlibdir,;t t
27369 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27370 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27371 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27372 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27373 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27374 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27375 s,@LINK_PROGS@,$LINK_PROGS,;t t
27376 s,@LINK_TESTS@,$LINK_TESTS,;t t
27377 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27378 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27379 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27380 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27381 s,@RPATH_LIST@,$RPATH_LIST,;t t
27382 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27383 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27384 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27385 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27386 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27387 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27388 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27389 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27390 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27391 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27392 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27393 s,@TIC@,$TIC,;t t
27394 s,@INFOCMP@,$INFOCMP,;t t
27395 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27396 s,@XTERM_KBS@,$XTERM_KBS,;t t
27397 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27398 s,@TERMINFO@,$TERMINFO,;t t
27399 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27400 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27401 s,@TERMPATH@,$TERMPATH,;t t
27402 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27403 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27404 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27405 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27406 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27407 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27408 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27409 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27410 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27411 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27412 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27413 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27414 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27415 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27416 s,@RGB_PATH@,$RGB_PATH,;t t
27417 s,@no_x11_rgb@,$no_x11_rgb,;t t
27418 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27419 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27420 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27421 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27422 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27423 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27424 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27425 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27426 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27427 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27428 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27429 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27430 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27431 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27432 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27433 s,@PTHREAD@,$PTHREAD,;t t
27434 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27435 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27436 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27437 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27438 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27439 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27440 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27441 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27442 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27443 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27444 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27445 s,@ECHO_LT@,$ECHO_LT,;t t
27446 s,@ECHO_LD@,$ECHO_LD,;t t
27447 s,@RULE_CC@,$RULE_CC,;t t
27448 s,@SHOW_CC@,$SHOW_CC,;t t
27449 s,@ECHO_CC@,$ECHO_CC,;t t
27450 s,@ECHO_LINK@,$ECHO_LINK,;t t
27451 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27452 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27453 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27454 s,@ADAFLAGS@,$ADAFLAGS,;t t
27455 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27456 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27457 s,@ADA_TRACE@,$ADA_TRACE,;t t
27458 s,@MATH_LIB@,$MATH_LIB,;t t
27459 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27460 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27461 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27462 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27463 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27464 s,@TEST_LIBS@,$TEST_LIBS,;t t
27465 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27466 s,@CXXCPP@,$CXXCPP,;t t
27467 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27468 s,@CXX_AR@,$CXX_AR,;t t
27469 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27470 s,@CXXLIBS@,$CXXLIBS,;t t
27471 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27472 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27473 s,@M4_exists@,$M4_exists,;t t
27474 s,@cf_ada_make@,$cf_ada_make,;t t
27475 s,@cf_ada_config@,$cf_ada_config,;t t
27476 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27477 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27478 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27479 s,@cf_compile_generics@,$cf_compile_generics,;t t
27480 s,@cf_generic_objects@,$cf_generic_objects,;t t
27481 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27482 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27483 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27484 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27485 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27486 s,@cf_ada_package@,$cf_ada_package,;t t
27487 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27488 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27489 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27490 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27491 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27492 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27493 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27494 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27495 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27496 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27497 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27498 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27499 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27500 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27501 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27502 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27503 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27504 s,@TICS_LIBS@,$TICS_LIBS,;t t
27505 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27506 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27507 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27508 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27509 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27510 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27511 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27512 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27513 s,@includesubdir@,$includesubdir,;t t
27514 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27515 s,@TICS_LIST@,$TICS_LIST,;t t
27516 s,@TINFO_LIST@,$TINFO_LIST,;t t
27517 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27518 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27519 s,@FORM_NAME@,$FORM_NAME,;t t
27520 s,@MENU_NAME@,$MENU_NAME,;t t
27521 s,@PANEL_NAME@,$PANEL_NAME,;t t
27522 s,@CXX_NAME@,$CXX_NAME,;t t
27523 s,@TEST_ARGS@,$TEST_ARGS,;t t
27524 s,@TEST_DEPS@,$TEST_DEPS,;t t
27525 s,@TEST_ARG2@,$TEST_ARG2,;t t
27526 s,@TEST_DEP2@,$TEST_DEP2,;t t
27527 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27528 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27529 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27530 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27531 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27532 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27533 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27534 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27535 s,@cross_compiling@,$cross_compiling,;t t
27536 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27537 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27538 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27539 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27540 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27541 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27542 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27543 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27544 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27545 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27546 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27547 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27548 CEOF
27549
27550 EOF
27551
27552   cat >>$CONFIG_STATUS <<\EOF
27553   # Split the substitutions into bite-sized pieces for seds with
27554   # small command number limits, like on Digital OSF/1 and HP-UX.
27555   ac_max_sed_lines=48
27556   ac_sed_frag=1 # Number of current file.
27557   ac_beg=1 # First line for current file.
27558   ac_end=$ac_max_sed_lines # Line after last line for current file.
27559   ac_more_lines=:
27560   ac_sed_cmds=
27561   while $ac_more_lines; do
27562     if test $ac_beg -gt 1; then
27563       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27564     else
27565       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27566     fi
27567     if test ! -s $tmp/subs.frag; then
27568       ac_more_lines=false
27569     else
27570       # The purpose of the label and of the branching condition is to
27571       # speed up the sed processing (if there are no `@' at all, there
27572       # is no need to browse any of the substitutions).
27573       # These are the two extra sed commands mentioned above.
27574       (echo ':t
27575   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27576       # It is possible to make a multiline substitution using escaped newlines.
27577       # Ensure that we do not split the substitution between script fragments.
27578       ac_BEG=$ac_end
27579       ac_END=`expr $ac_end + $ac_max_sed_lines`
27580       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27581       if test -s $tmp/subs.next; then
27582         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27583         if test ! -s $tmp/subs.edit; then
27584           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27585           if test ! -s $tmp/subs.edit; then
27586             if test $ac_beg -gt 1; then
27587               ac_end=`expr $ac_end - 1`
27588               continue
27589             fi
27590           fi
27591         fi
27592       fi
27593
27594       if test -z "$ac_sed_cmds"; then
27595         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27596       else
27597         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27598       fi
27599       ac_sed_frag=`expr $ac_sed_frag + 1`
27600       ac_beg=$ac_end
27601       ac_end=`expr $ac_end + $ac_max_sed_lines`
27602     fi
27603   done
27604   if test -z "$ac_sed_cmds"; then
27605     ac_sed_cmds=cat
27606   fi
27607 fi # test -n "$CONFIG_FILES"
27608
27609 EOF
27610 cat >>$CONFIG_STATUS <<\EOF
27611 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27612   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27613   case $ac_file in
27614   - | *:- | *:-:* ) # input from stdin
27615         cat >$tmp/stdin
27616         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27617         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27618   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27619         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27620   * )   ac_file_in=$ac_file.in ;;
27621   esac
27622
27623   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27624   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27625          X"$ac_file" : 'X\(//\)[^/]' \| \
27626          X"$ac_file" : 'X\(//\)$' \| \
27627          X"$ac_file" : 'X\(/\)' \| \
27628          .     : '\(.\)' 2>/dev/null ||
27629 echo X"$ac_file" |
27630     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27631           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27632           /^X\(\/\/\)$/{ s//\1/; q; }
27633           /^X\(\/\).*/{ s//\1/; q; }
27634           s/.*/./; q'`
27635   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27636     { case "$ac_dir" in
27637   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27638   *)                      as_incr_dir=.;;
27639 esac
27640 as_dummy="$ac_dir"
27641 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27642   case $as_mkdir_dir in
27643     # Skip DOS drivespec
27644     ?:) as_incr_dir=$as_mkdir_dir ;;
27645     *)
27646       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27647       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27648     ;;
27649   esac
27650 done; }
27651
27652     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27653     # A "../" for each directory in $ac_dir_suffix.
27654     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27655   else
27656     ac_dir_suffix= ac_dots=
27657   fi
27658
27659   case $srcdir in
27660   .)  ac_srcdir=.
27661       if test -z "$ac_dots"; then
27662          ac_top_srcdir=.
27663       else
27664          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27665       fi ;;
27666   [\\/]* | ?:[\\/]* )
27667       ac_srcdir=$srcdir$ac_dir_suffix;
27668       ac_top_srcdir=$srcdir ;;
27669   *) # Relative path.
27670     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27671     ac_top_srcdir=$ac_dots$srcdir ;;
27672   esac
27673
27674   case $INSTALL in
27675   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27676   *) ac_INSTALL=$ac_dots$INSTALL ;;
27677   esac
27678
27679   if test x"$ac_file" != x-; then
27680     { echo "$as_me:27680: creating $ac_file" >&5
27681 echo "$as_me: creating $ac_file" >&6;}
27682     rm -f "$ac_file"
27683   fi
27684   # Let's still pretend it is `configure' which instantiates (i.e., don't
27685   # use $as_me), people would be surprised to read:
27686   #    /* config.h.  Generated automatically by config.status.  */
27687   configure_input="Generated automatically from `echo $ac_file_in |
27688                                                  sed 's,.*/,,'` by configure."
27689
27690   # First look for the input files in the build tree, otherwise in the
27691   # src tree.
27692   ac_file_inputs=`IFS=:
27693     for f in $ac_file_in; do
27694       case $f in
27695       -) echo $tmp/stdin ;;
27696       [\\/$]*)
27697          # Absolute (can't be DOS-style, as IFS=:)
27698          test -f "$f" || { { echo "$as_me:27698: error: cannot find input file: $f" >&5
27699 echo "$as_me: error: cannot find input file: $f" >&2;}
27700    { (exit 1); exit 1; }; }
27701          echo $f;;
27702       *) # Relative
27703          if test -f "$f"; then
27704            # Build tree
27705            echo $f
27706          elif test -f "$srcdir/$f"; then
27707            # Source tree
27708            echo $srcdir/$f
27709          else
27710            # /dev/null tree
27711            { { echo "$as_me:27711: error: cannot find input file: $f" >&5
27712 echo "$as_me: error: cannot find input file: $f" >&2;}
27713    { (exit 1); exit 1; }; }
27714          fi;;
27715       esac
27716     done` || { (exit 1); exit 1; }
27717 EOF
27718 cat >>$CONFIG_STATUS <<\EOF
27719   ac_warn_datarootdir=no
27720   if test x"$ac_file" != x-; then
27721     for ac_item in $ac_file_inputs
27722     do
27723       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27724       if test -n "$ac_seen"; then
27725         ac_used=`grep '@datarootdir@' $ac_item`
27726         if test -z "$ac_used"; then
27727           { echo "$as_me:27727: WARNING: datarootdir was used implicitly but not set:
27728 $ac_seen" >&5
27729 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27730 $ac_seen" >&2;}
27731           ac_warn_datarootdir=yes
27732         fi
27733       fi
27734       ac_seen=`grep '${datarootdir}' $ac_item`
27735       if test -n "$ac_seen"; then
27736         { echo "$as_me:27736: WARNING: datarootdir was used explicitly but not set:
27737 $ac_seen" >&5
27738 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27739 $ac_seen" >&2;}
27740         ac_warn_datarootdir=yes
27741       fi
27742     done
27743   fi
27744
27745 if test "x$ac_warn_datarootdir" = xyes; then
27746   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27747 fi
27748
27749 EOF
27750 cat >>$CONFIG_STATUS <<EOF
27751   sed "$ac_vpsub
27752 $extrasub
27753 EOF
27754 cat >>$CONFIG_STATUS <<\EOF
27755 :t
27756 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27757 s,@configure_input@,$configure_input,;t t
27758 s,@srcdir@,$ac_srcdir,;t t
27759 s,@top_srcdir@,$ac_top_srcdir,;t t
27760 s,@INSTALL@,$ac_INSTALL,;t t
27761 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27762   rm -f $tmp/stdin
27763   if test x"$ac_file" != x-; then
27764     cp $tmp/out $ac_file
27765
27766     for ac_name in prefix exec_prefix datarootdir
27767     do
27768         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27769         if test -n "$ac_seen"; then
27770             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27771             if test -z "$ac_init"; then
27772               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27773               { echo "$as_me:27773: WARNING: Variable $ac_name is used but was not set:
27774 $ac_seen" >&5
27775 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27776 $ac_seen" >&2;}
27777             fi
27778         fi
27779     done
27780     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27781     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27782     if test -s $tmp/out; then
27783       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27784       { echo "$as_me:27784: WARNING: Some variables may not be substituted:
27785 $ac_seen" >&5
27786 echo "$as_me: WARNING: Some variables may not be substituted:
27787 $ac_seen" >&2;}
27788     fi
27789   else
27790     cat $tmp/out
27791   fi
27792   rm -f $tmp/out
27793
27794 done
27795 EOF
27796 cat >>$CONFIG_STATUS <<\EOF
27797
27798 #
27799 # CONFIG_HEADER section.
27800 #
27801
27802 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27803 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27804 #
27805 # ac_d sets the value in "#define NAME VALUE" lines.
27806 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27807 ac_dB='[        ].*$,\1#\2'
27808 ac_dC=' '
27809 ac_dD=',;t'
27810 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27811 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27812 ac_iB='\([      ]\),\1#\2define\3'
27813 ac_iC=' '
27814 ac_iD='\4,;t'
27815 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27816 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27817 ac_uB='$,\1#\2define\3'
27818 ac_uC=' '
27819 ac_uD=',;t'
27820
27821 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27822   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27823   case $ac_file in
27824   - | *:- | *:-:* ) # input from stdin
27825         cat >$tmp/stdin
27826         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27827         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27828   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27829         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27830   * )   ac_file_in=$ac_file.in ;;
27831   esac
27832
27833   test x"$ac_file" != x- && { echo "$as_me:27833: creating $ac_file" >&5
27834 echo "$as_me: creating $ac_file" >&6;}
27835
27836   # First look for the input files in the build tree, otherwise in the
27837   # src tree.
27838   ac_file_inputs=`IFS=:
27839     for f in $ac_file_in; do
27840       case $f in
27841       -) echo $tmp/stdin ;;
27842       [\\/$]*)
27843          # Absolute (can't be DOS-style, as IFS=:)
27844          test -f "$f" || { { echo "$as_me:27844: error: cannot find input file: $f" >&5
27845 echo "$as_me: error: cannot find input file: $f" >&2;}
27846    { (exit 1); exit 1; }; }
27847          echo $f;;
27848       *) # Relative
27849          if test -f "$f"; then
27850            # Build tree
27851            echo $f
27852          elif test -f "$srcdir/$f"; then
27853            # Source tree
27854            echo $srcdir/$f
27855          else
27856            # /dev/null tree
27857            { { echo "$as_me:27857: error: cannot find input file: $f" >&5
27858 echo "$as_me: error: cannot find input file: $f" >&2;}
27859    { (exit 1); exit 1; }; }
27860          fi;;
27861       esac
27862     done` || { (exit 1); exit 1; }
27863   # Remove the trailing spaces.
27864   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27865
27866 EOF
27867
27868 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27869 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27870 # be either 'cat' or 'sort'.
27871 cat confdefs.h | uniq >conftest.vals
27872
27873 # Break up conftest.vals because some shells have a limit on
27874 # the size of here documents, and old seds have small limits too.
27875
27876 rm -f conftest.tail
27877 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27878 while grep . conftest.vals >/dev/null
27879 do
27880   # Write chunks of a limited-size here document to conftest.frag.
27881   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27882   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27883   echo 'CEOF' >> $CONFIG_STATUS
27884   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27885   rm -f conftest.vals
27886   mv conftest.tail conftest.vals
27887 done
27888 rm -f conftest.vals
27889
27890 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27891 # marker @DEFS@.
27892 echo '  cat >> conftest.edit <<CEOF
27893 /@DEFS@/r conftest.frag
27894 /@DEFS@/d
27895 CEOF
27896 sed -f conftest.edit $tmp/in > $tmp/out
27897 rm -f $tmp/in
27898 mv $tmp/out $tmp/in
27899 rm -f conftest.edit conftest.frag
27900 ' >> $CONFIG_STATUS
27901
27902 cat >>$CONFIG_STATUS <<\EOF
27903   # Let's still pretend it is `configure' which instantiates (i.e., don't
27904   # use $as_me), people would be surprised to read:
27905   #    /* config.h.  Generated automatically by config.status.  */
27906   if test x"$ac_file" = x-; then
27907     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27908   else
27909     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27910   fi
27911   cat $tmp/in >>$tmp/config.h
27912   rm -f $tmp/in
27913   if test x"$ac_file" != x-; then
27914     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27915       { echo "$as_me:27915: $ac_file is unchanged" >&5
27916 echo "$as_me: $ac_file is unchanged" >&6;}
27917     else
27918       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27919          X"$ac_file" : 'X\(//\)[^/]' \| \
27920          X"$ac_file" : 'X\(//\)$' \| \
27921          X"$ac_file" : 'X\(/\)' \| \
27922          .     : '\(.\)' 2>/dev/null ||
27923 echo X"$ac_file" |
27924     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27925           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27926           /^X\(\/\/\)$/{ s//\1/; q; }
27927           /^X\(\/\).*/{ s//\1/; q; }
27928           s/.*/./; q'`
27929       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27930         { case "$ac_dir" in
27931   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27932   *)                      as_incr_dir=.;;
27933 esac
27934 as_dummy="$ac_dir"
27935 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27936   case $as_mkdir_dir in
27937     # Skip DOS drivespec
27938     ?:) as_incr_dir=$as_mkdir_dir ;;
27939     *)
27940       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27941       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27942     ;;
27943   esac
27944 done; }
27945
27946       fi
27947       rm -f $ac_file
27948       mv $tmp/config.h $ac_file
27949     fi
27950   else
27951     cat $tmp/config.h
27952     rm -f $tmp/config.h
27953   fi
27954 done
27955 EOF
27956 cat >>$CONFIG_STATUS <<\EOF
27957 #
27958 # CONFIG_COMMANDS section.
27959 #
27960 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27961   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27962   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27963
27964   case $ac_dest in
27965     default )
27966 if test "x$cf_with_tests" != xno ; then
27967
27968 for cf_dir in test
27969 do
27970         if test ! -d $srcdir/$cf_dir; then
27971                 continue
27972         elif test -f $srcdir/$cf_dir/programs; then
27973                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27974         fi
27975 done
27976
27977 fi
27978
27979 cf_prefix=$LIB_PREFIX
27980
27981 case $cf_cv_shlib_version in
27982 (cygdll|msysdll|mingw|msvcdll)
27983         TINFO_NAME=$TINFO_ARG_SUFFIX
27984         TINFO_SUFFIX=.dll
27985         ;;
27986 esac
27987
27988 if test -n "$TINFO_SUFFIX" ; then
27989         case $TINFO_SUFFIX in
27990         (tw*)
27991                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27992                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27993                 ;;
27994         (t*)
27995                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27996                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27997                 ;;
27998         (w*)
27999                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
28000                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28001                 ;;
28002         esac
28003 fi
28004
28005 for cf_dir in $SRC_SUBDIRS
28006 do
28007         if test ! -d $srcdir/$cf_dir ; then
28008                 continue
28009         elif test -f $srcdir/$cf_dir/modules; then
28010
28011                 SHARED_LIB=
28012                 Libs_To_Make=
28013                 cf_awk_program=
28014                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28015                 then
28016                         cf_awk_program="$cf_awk_program\
28017 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28018 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28019 "
28020                 fi
28021
28022                 if test "x$WILDCARD_SYMS" = xno
28023                 then
28024                         cf_awk_program="$cf_awk_program\
28025 /[      ]_\\*;/ { skip=1; next; }\
28026 "
28027                 fi
28028
28029                 if test "x$cf_awk_program" != "x"
28030                 then
28031                         cat >>$cf_dir/Makefile <<CF_EOF
28032
28033 # Generated by CF_LIB_RULES
28034 resulting.map: $UNALTERED_SYMS
28035         $AWK 'BEGIN { skip = 1; last=""; } \
28036 $cf_awk_program \
28037 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28038  skip = 0; last = \$\$0; } \
28039 END { print last; }' < $UNALTERED_SYMS >\$@
28040
28041 distclean::
28042         rm -f resulting.map
28043 CF_EOF
28044                 fi
28045
28046                 for cf_item in $cf_LIST_MODELS
28047                 do
28048
28049         case X$cf_item in
28050         (Xlibtool)
28051                 cf_suffix='.la'
28052                 cf_depsuf=$cf_suffix
28053                 ;;
28054         (Xdebug)
28055                 case $cf_cv_system_name in
28056                 (*-msvc*)
28057                         cf_suffix='_g.lib'
28058                         ;;
28059                 (*)
28060                         cf_suffix='_g.a'
28061                         ;;
28062                 esac
28063                 cf_depsuf=$cf_suffix
28064                 ;;
28065         (Xprofile)
28066                 case $cf_cv_system_name in
28067                 (*-msvc*)
28068                         cf_suffix='_p.lib'
28069                         ;;
28070                 (*)
28071                         cf_suffix='_p.a'
28072                         ;;
28073                 esac
28074                 cf_depsuf=$cf_suffix
28075                 ;;
28076         (Xshared)
28077                 case $cf_cv_system_name in
28078                 (aix[5-7]*)
28079                         cf_suffix='.so'
28080                         cf_depsuf=$cf_suffix
28081                         ;;
28082                 (*-msvc*)
28083                         cf_suffix='.dll'
28084                         cf_depsuf='.dll.lib'
28085                         ;;
28086                 (cygwin*|msys*|mingw*)
28087                         cf_suffix='.dll'
28088                         cf_depsuf='.dll.a'
28089                         ;;
28090                 (darwin*)
28091                         cf_suffix='.dylib'
28092                         cf_depsuf=$cf_suffix
28093                         ;;
28094                 (hpux*)
28095                         case $target in
28096                         (ia64*)
28097                                 cf_suffix='.so'
28098                                 cf_depsuf=$cf_suffix
28099                                 ;;
28100                         (*)
28101                                 cf_suffix='.sl'
28102                                 cf_depsuf=$cf_suffix
28103                                 ;;
28104                         esac
28105                         ;;
28106                 (*)
28107                         cf_suffix='.so'
28108                         cf_depsuf=$cf_suffix
28109                         ;;
28110                 esac
28111                 ;;
28112         (*)
28113                 case $target in
28114                 (*-msvc*)
28115                         cf_suffix='.lib'
28116                         ;;
28117                 (*)
28118                         cf_suffix='.a'
28119                         ;;
28120                 esac
28121                 cf_depsuf=$cf_suffix
28122                 ;;
28123         esac
28124         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28125         then
28126                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28127                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28128         fi
28129
28130                         if test "$cf_dir" = "c++"
28131                         then
28132
28133 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28134
28135 eval cf_libname=\$${cf_map_lib_basename}_NAME
28136
28137                         else
28138
28139 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28140
28141 eval cf_libname=\$${cf_map_lib_basename}_NAME
28142
28143                         fi
28144                         test -z "$cf_libname" && cf_libname="$cf_dir"
28145                         if test $cf_item = shared ; then
28146                                 if test -n "${LIB_SUFFIX}"
28147                                 then
28148                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28149                                 else
28150                                         cf_shared_suffix="$cf_suffix"
28151                                 fi
28152                                 if test "$cf_cv_do_symlinks" = yes ; then
28153                                         cf_version_name=
28154
28155                                         case "$cf_cv_shlib_version" in
28156                                         (rel)
28157                                                 cf_version_name=REL_VERSION
28158                                                 ;;
28159                                         (abi)
28160                                                 cf_version_name=ABI_VERSION
28161                                                 ;;
28162                                         esac
28163
28164                                         if test -n "$cf_version_name"
28165                                         then
28166                                                 case "$cf_cv_system_name" in
28167                                                 (darwin*)
28168                                                         # "w", etc?
28169                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28170                                                         ;;
28171                                                 (*)
28172                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28173                                                         ;;
28174                                                 esac
28175                                         fi
28176                                         if test -n "${USE_LIB_SUFFIX}"
28177                                         then
28178                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28179                                         else
28180                                                 cf_shared_suffix="$cf_suffix"
28181                                         fi
28182                                 fi
28183                                 # cygwin needs import library, and has unique naming convention
28184                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28185                                 # use 'cyg' prefix for shared lib.
28186                                 case $cf_cv_shlib_version in
28187                                 (cygdll)
28188                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28189                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28190                                         ;;
28191                                 (msysdll)
28192                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28193                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28194                                         ;;
28195                                 (mingw)
28196                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28197                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28198                                         ;;
28199                                 (msvcdll)
28200                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28201                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28202                                         ;;
28203                                 (*)
28204                                         cf_add_lib=
28205                                         ;;
28206                                 esac
28207                                 if test -n "$cf_add_lib"
28208                                 then
28209                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28210                                         continue
28211                                 fi
28212                         fi
28213                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28214                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28215                 done
28216
28217                 if test $cf_dir = ncurses ; then
28218                         cf_subsets="$LIB_SUBSETS"
28219                         cf_r_parts="$cf_subsets"
28220                         cf_liblist="$Libs_To_Make"
28221
28222                         while test -n "$cf_r_parts"
28223                         do
28224                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28225                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28226                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28227                                         cf_add_lib=
28228                                         case $cf_l_parts in
28229                                         (*termlib*)
28230                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28231                                                 ;;
28232                                         (*ticlib*)
28233                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28234                                                 ;;
28235                                         (*)
28236                                                 break
28237                                                 ;;
28238                                         esac
28239                                         if test -n "$cf_add_lib"; then
28240                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28241                                         fi
28242                                 else
28243                                         break
28244                                 fi
28245                         done
28246                 else
28247                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28248                 fi
28249
28250                 if test $cf_dir = c++; then
28251                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28252                                 cf_list=
28253                                 for cf_item in $Libs_To_Make
28254                                 do
28255                                         case $cf_item in
28256                                         (*.a)
28257                                                 ;;
28258                                         (*)
28259                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28260                                                 ;;
28261                                         esac
28262                                         for cf_test in $cf_list
28263                                         do
28264                                                 if test "$cf_test" = "$cf_item"
28265                                                 then
28266                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28267                                                         cf_item=
28268                                                         break
28269                                                 fi
28270                                         done
28271                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28272                                 done
28273                                 Libs_To_Make="$cf_list"
28274                         fi
28275                 fi
28276
28277                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28278                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28279                         $cf_dir/Makefile >$cf_dir/Makefile.out
28280                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28281
28282                 $AWK -f $srcdir/mk-0th.awk \
28283                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28284                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28285
28286                 for cf_subset in $cf_subsets
28287                 do
28288                         cf_subdirs=
28289                         for cf_item in $cf_LIST_MODELS
28290                         do
28291
28292                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28293
28294 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28295
28296                         CXX_MODEL=$cf_ITEM
28297                         if test "$CXX_MODEL" = SHARED; then
28298                                 case $cf_cv_shlib_version in
28299                                 (cygdll|msysdll|mingw|msvcdll)
28300                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28301
28302 echo "${as_me:-configure}:28302: testing overriding CXX_MODEL to SHARED ..." 1>&5
28303
28304                                         with_shared_cxx=yes
28305                                         ;;
28306                                 (*)
28307                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28308                                         ;;
28309                                 esac
28310                         fi
28311
28312         case X$cf_item in
28313         (Xlibtool)
28314                 cf_suffix='.la'
28315                 cf_depsuf=$cf_suffix
28316                 ;;
28317         (Xdebug)
28318                 case $cf_cv_system_name in
28319                 (*-msvc*)
28320                         cf_suffix='_g.lib'
28321                         ;;
28322                 (*)
28323                         cf_suffix='_g.a'
28324                         ;;
28325                 esac
28326                 cf_depsuf=$cf_suffix
28327                 ;;
28328         (Xprofile)
28329                 case $cf_cv_system_name in
28330                 (*-msvc*)
28331                         cf_suffix='_p.lib'
28332                         ;;
28333                 (*)
28334                         cf_suffix='_p.a'
28335                         ;;
28336                 esac
28337                 cf_depsuf=$cf_suffix
28338                 ;;
28339         (Xshared)
28340                 case $cf_cv_system_name in
28341                 (aix[5-7]*)
28342                         cf_suffix='.so'
28343                         cf_depsuf=$cf_suffix
28344                         ;;
28345                 (*-msvc*)
28346                         cf_suffix='.dll'
28347                         cf_depsuf='.dll.lib'
28348                         ;;
28349                 (cygwin*|msys*|mingw*)
28350                         cf_suffix='.dll'
28351                         cf_depsuf='.dll.a'
28352                         ;;
28353                 (darwin*)
28354                         cf_suffix='.dylib'
28355                         cf_depsuf=$cf_suffix
28356                         ;;
28357                 (hpux*)
28358                         case $target in
28359                         (ia64*)
28360                                 cf_suffix='.so'
28361                                 cf_depsuf=$cf_suffix
28362                                 ;;
28363                         (*)
28364                                 cf_suffix='.sl'
28365                                 cf_depsuf=$cf_suffix
28366                                 ;;
28367                         esac
28368                         ;;
28369                 (*)
28370                         cf_suffix='.so'
28371                         cf_depsuf=$cf_suffix
28372                         ;;
28373                 esac
28374                 ;;
28375         (*)
28376                 case $target in
28377                 (*-msvc*)
28378                         cf_suffix='.lib'
28379                         ;;
28380                 (*)
28381                         cf_suffix='.a'
28382                         ;;
28383                 esac
28384                 cf_depsuf=$cf_suffix
28385                 ;;
28386         esac
28387         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28388         then
28389                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28390                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28391         fi
28392
28393         case $cf_item in
28394         (libtool) cf_subdir='obj_lo'  ;;
28395         (normal)  cf_subdir='objects' ;;
28396         (debug)   cf_subdir='obj_g' ;;
28397         (profile) cf_subdir='obj_p' ;;
28398         (shared)
28399                 case $cf_cv_system_name in
28400                 (cygwin|msys)
28401                         cf_subdir='objects' ;;
28402                 (*)
28403                         cf_subdir='obj_s' ;;
28404                 esac
28405         esac
28406
28407                         # Test for case where we build libtinfo with a different name.
28408                         cf_libname=$cf_dir
28409                         if test $cf_dir = ncurses ; then
28410                                 case $cf_subset in
28411                                 (*base*)
28412                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28413                                         ;;
28414                                 (*termlib*)
28415                                         cf_libname=$TINFO_LIB_SUFFIX
28416                                         ;;
28417                                 (ticlib*)
28418                                         cf_libname=$TICS_LIB_SUFFIX
28419                                         ;;
28420                                 esac
28421                         elif test $cf_dir = c++ ; then
28422
28423 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28424
28425 eval cf_libname=\$${cf_map_lib_basename}_NAME
28426
28427                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28428                         else
28429
28430 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28431
28432 eval cf_libname=\$${cf_map_lib_basename}_NAME
28433
28434                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28435                         fi
28436                         if test -n "${USE_ARG_SUFFIX}" ; then
28437                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28438                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28439                         fi
28440
28441                         # These dependencies really are for development, not
28442                         # builds, but they are useful in porting, too.
28443                         cf_depend="../include/ncurses_cfg.h"
28444                         if test "$srcdir" = "."; then
28445                                 cf_reldir="."
28446                         else
28447                                 cf_reldir="\${srcdir}"
28448                         fi
28449
28450                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28451                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28452                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28453                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28454                         fi
28455
28456                         cf_dir_suffix=
28457                         old_cf_suffix="$cf_suffix"
28458                         if test "$cf_cv_shlib_version_infix" = yes ; then
28459                         if test -n "$USE_LIB_SUFFIX" ; then
28460                                 case $USE_LIB_SUFFIX in
28461                                 (tw*)
28462                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28463                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28464                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28465                                         ;;
28466                                 (t*)
28467                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28468                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28469                                         cf_dir_suffix=t$EXTRA_SUFFIX
28470                                         ;;
28471                                 (w*)
28472                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28473                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28474                                         cf_dir_suffix=w$EXTRA_SUFFIX
28475                                         ;;
28476                                 (*)
28477                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28478                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28479                                         cf_dir_suffix=$EXTRA_SUFFIX
28480                                         ;;
28481                                 esac
28482                         fi
28483                         fi
28484
28485                         $AWK -f $srcdir/mk-1st.awk \
28486                                 name=${cf_libname}${cf_dir_suffix} \
28487                                 traces=$LIB_TRACING \
28488                                 MODEL=$cf_ITEM \
28489                                 CXX_MODEL=$CXX_MODEL \
28490                                 model=$cf_subdir \
28491                                 prefix=$cf_prefix \
28492                                 suffix=$cf_suffix \
28493                                 subset=$cf_subset \
28494                                 driver=$cf_cv_term_driver \
28495                                 SymLink="$LN_S" \
28496                                 TermlibRoot=$TINFO_NAME \
28497                                 TermlibSuffix=$TINFO_SUFFIX \
28498                                 ShlibVer=$cf_cv_shlib_version \
28499                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28500                                 ReLink=${cf_cv_do_relink:-no} \
28501                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28502                                 DoLinks=$cf_cv_do_symlinks \
28503                                 rmSoLocs=$cf_cv_rm_so_locs \
28504                                 ldconfig="$LDCONFIG" \
28505                                 overwrite=$WITH_OVERWRITE \
28506                                 depend="$cf_depend" \
28507                                 host="$host" \
28508                                 libtool_version="$LIBTOOL_VERSION" \
28509                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28510
28511                         cf_suffix="$old_cf_suffix"
28512
28513                         for cf_subdir2 in $cf_subdirs lib
28514                         do
28515                                 test $cf_subdir = $cf_subdir2 && break
28516                         done
28517                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28518                         $AWK -f $srcdir/mk-2nd.awk \
28519                                 name=$cf_dir \
28520                                 traces=$LIB_TRACING \
28521                                 MODEL=$cf_ITEM \
28522                                 model=$cf_subdir \
28523                                 subset=$cf_subset \
28524                                 srcdir=$srcdir \
28525                                 echo=$WITH_ECHO \
28526                                 crenames=$cf_cv_prog_CC_c_o \
28527                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28528                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28529                         cf_subdirs="$cf_subdirs $cf_subdir"
28530                         done
28531                 done
28532         fi
28533
28534         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28535 done
28536
28537 for cf_dir in $SRC_SUBDIRS
28538 do
28539         if test ! -d $srcdir/$cf_dir ; then
28540                 continue
28541         fi
28542
28543         if test -f $cf_dir/Makefile ; then
28544                 case "$cf_dir" in
28545                 (Ada95)
28546                         echo 'libs \' >> Makefile
28547                         echo 'install.libs \' >> Makefile
28548                         echo 'uninstall.libs ::' >> Makefile
28549                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28550                         ;;
28551                 esac
28552         fi
28553
28554         if test -f $srcdir/$cf_dir/modules; then
28555                 echo >> Makefile
28556                 if test -f $srcdir/$cf_dir/headers; then
28557 cat >> Makefile <<CF_EOF
28558 install.includes \\
28559 uninstall.includes \\
28560 CF_EOF
28561                 fi
28562 if test "$cf_dir" != "c++" ; then
28563 echo 'lint \' >> Makefile
28564 fi
28565 cat >> Makefile <<CF_EOF
28566 libs \\
28567 lintlib \\
28568 install.libs \\
28569 uninstall.libs \\
28570 install.$cf_dir \\
28571 uninstall.$cf_dir ::
28572         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28573 CF_EOF
28574         elif test -f $srcdir/$cf_dir/headers; then
28575 cat >> Makefile <<CF_EOF
28576
28577 libs \\
28578 install.libs \\
28579 uninstall.libs \\
28580 install.includes \\
28581 uninstall.includes ::
28582         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28583 CF_EOF
28584 fi
28585 done
28586
28587 if test "x$cf_with_db_install" = xyes; then
28588 cat >> Makefile <<CF_EOF
28589
28590 install.libs uninstall.libs \\
28591 install.data uninstall.data ::
28592 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28593 CF_EOF
28594 else
28595 cat >> Makefile <<CF_EOF
28596
28597 install.libs uninstall.libs ::
28598         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28599 CF_EOF
28600 fi
28601
28602 if test "x$cf_with_manpages" = xyes; then
28603 cat >> Makefile <<CF_EOF
28604
28605 install.man \\
28606 uninstall.man ::
28607         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28608 CF_EOF
28609 fi
28610
28611 cat >> Makefile <<CF_EOF
28612
28613 distclean ::
28614         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28615         rm -f headers.sh headers.sed mk_shared_lib.sh
28616         rm -f edit_man.* man_alias.*
28617         rm -rf \${DIRS_TO_MAKE}
28618 CF_EOF
28619
28620 # Special case: tack's manpage lives in its own directory.
28621 if test "x$cf_with_manpages" = xyes; then
28622 if test "x$cf_with_tack" = "xyes"; then
28623 cat >> Makefile <<CF_EOF
28624
28625 install.man \\
28626 uninstall.man ::
28627         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28628 CF_EOF
28629 fi
28630 fi
28631
28632 rm -f headers.sed headers.sh
28633
28634 echo creating headers.sh
28635 cat >headers.sh <<CF_EOF
28636 #! $SHELL
28637 # This shell script is generated by the 'configure' script.  It is invoked in a
28638 # subdirectory of the build tree.  It generates a sed-script in the parent
28639 # directory that is used to adjust includes for header files that reside in a
28640 # subdirectory of /usr/include, etc.
28641 PRG=""
28642 while test \$# != 3
28643 do
28644 PRG="\$PRG \$1"; shift
28645 done
28646 DST=\$1
28647 REF=\$2
28648 SRC=\$3
28649 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28650 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28651 echo installing \$SRC in \$DST
28652 CF_EOF
28653
28654 if test $WITH_CURSES_H = yes; then
28655         cat >>headers.sh <<CF_EOF
28656 case \$DST in
28657 (/*/include/*)
28658         END=\`basename \$DST\`
28659         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28660         do
28661                 NAME=\`basename \$i\`
28662                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28663         done
28664         ;;
28665 (*)
28666         echo "" >> \$TMPSED
28667         ;;
28668 esac
28669 CF_EOF
28670
28671 else
28672         cat >>headers.sh <<CF_EOF
28673 case \$DST in
28674 (/*/include/*)
28675         END=\`basename \$DST\`
28676         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28677         do
28678                 NAME=\`basename \$i\`
28679                 if test "\$NAME" = "curses.h"
28680                 then
28681                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28682                         NAME=ncurses.h
28683                 fi
28684                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28685         done
28686         ;;
28687 (*)
28688         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28689         ;;
28690 esac
28691 CF_EOF
28692 fi
28693 cat >>headers.sh <<CF_EOF
28694 rm -f \$TMPSRC
28695 sed -f \$TMPSED \$SRC > \$TMPSRC
28696 NAME=\`basename \$SRC\`
28697 CF_EOF
28698 if test $WITH_CURSES_H != yes; then
28699         cat >>headers.sh <<CF_EOF
28700 test "\$NAME" = "curses.h" && NAME=ncurses.h
28701 CF_EOF
28702 fi
28703 cat >>headers.sh <<CF_EOF
28704 # Just in case someone gzip'd manpages, remove the conflicting copy.
28705 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28706
28707 eval \$PRG \$TMPSRC \$DST/\$NAME
28708 rm -f \$TMPSRC \$TMPSED
28709 CF_EOF
28710
28711 chmod 0755 headers.sh
28712
28713 for cf_dir in $SRC_SUBDIRS
28714 do
28715         if test ! -d $srcdir/$cf_dir ; then
28716                 continue
28717         fi
28718
28719         if test -f $srcdir/$cf_dir/headers; then
28720                 $AWK -f $srcdir/mk-hdr.awk \
28721                         subset="$LIB_SUBSETS" \
28722                         compat="$WITH_CURSES_H" \
28723                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28724         fi
28725
28726         if test -f $srcdir/$cf_dir/modules; then
28727                 if test "$cf_dir" != "c++" ; then
28728                         cat >>$cf_dir/Makefile <<"CF_EOF"
28729 depend : ${AUTO_SRC}
28730         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28731
28732 # DO NOT DELETE THIS LINE -- make depend depends on it.
28733 CF_EOF
28734                 fi
28735         fi
28736 done
28737
28738 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28739 if test -z "$USE_OLD_MAKERULES" ; then
28740         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28741 fi
28742 fi
28743  ;;
28744   esac
28745 done
28746 EOF
28747
28748 cat >>$CONFIG_STATUS <<\EOF
28749
28750 { (exit 0); exit 0; }
28751 EOF
28752 chmod +x $CONFIG_STATUS
28753 ac_clean_files=$ac_clean_files_save
28754
28755 # configure is writing to config.log, and then calls config.status.
28756 # config.status does its own redirection, appending to config.log.
28757 # Unfortunately, on DOS this fails, as config.log is still kept open
28758 # by configure, so config.status won't be able to write to it; its
28759 # output is simply discarded.  So we exec the FD to /dev/null,
28760 # effectively closing config.log, so it can be properly (re)opened and
28761 # appended to by config.status.  When coming back to configure, we
28762 # need to make the FD available again.
28763 if test "$no_create" != yes; then
28764   ac_cs_success=:
28765   exec 5>/dev/null
28766   $SHELL $CONFIG_STATUS || ac_cs_success=false
28767   exec 5>>config.log
28768   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28769   # would make configure fail if this is the last instruction.
28770   $ac_cs_success || { (exit 1); exit 1; }
28771 fi
28772 ${MAKE:-make} preinstall