]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.2 - patch 20201121
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.725 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200802.
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   --enable-exp-win32      compile with experimental-Windows driver
846 Testing/development Options:
847   --disable-echo          do not display "compiling" commands
848   --disable-stripping     do not strip (debug info) installed executables
849   --enable-warnings       test: turn on gcc compiler warnings
850   --enable-string-hacks   work around bogus compiler/loader warnings
851   --enable-assertions     test: turn on generation of assertion code
852   --with-dmalloc          test: use Gray Watson's dmalloc library
853   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
854   --with-valgrind         test: use valgrind
855   --disable-leaks         test: free permanent memory, analyze leaks
856   --enable-expanded       test: generate functions for certain macros
857   --disable-macros        test: use functions rather than macros
858   --with-trace            test: add trace() function to all models of ncurses
859   --disable-gnat-projects test: disable GNAT projects even if usable
860 Ada Binding Options:
861   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
862   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
863   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
864   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
865   --with-ada-libname=XXX  override default Ada library-name
866   --with-form-libname=XXX override form basename of library
867   --with-menu-libname=XXX override menu basename of library
868   --with-panel-libname=XXX override panel basename of library
869   --with-cxx-libname=XXX override ncurses++ basename of library
870
871 Some influential environment variables:
872   CC          C compiler command
873   CFLAGS      C compiler flags
874   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
875               nonstandard directory <lib dir>
876   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
877               headers in a nonstandard directory <include dir>
878   CPP         C preprocessor
879   CXX         C++ compiler command
880   CXXFLAGS    C++ compiler flags
881   CXXCPP      C++ preprocessor
882
883 Use these variables to override the choices made by `configure' or to help
884 it to find libraries and programs with nonstandard names/locations.
885
886 EOF
887 fi
888
889 if test "$ac_init_help" = "recursive"; then
890   # If there are subdirs, report their specific --help.
891   ac_popdir=`pwd`
892   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
893     cd $ac_subdir
894     # A "../" for each directory in /$ac_subdir.
895     ac_dots=`echo $ac_subdir |
896              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
897
898     case $srcdir in
899     .) # No --srcdir option.  We are building in place.
900       ac_sub_srcdir=$srcdir ;;
901     [\\/]* | ?:[\\/]* ) # Absolute path.
902       ac_sub_srcdir=$srcdir/$ac_subdir ;;
903     *) # Relative path.
904       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
905     esac
906
907     # Check for guested configure; otherwise get Cygnus style configure.
908     if test -f $ac_sub_srcdir/configure.gnu; then
909       echo
910       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
911     elif test -f $ac_sub_srcdir/configure; then
912       echo
913       $SHELL $ac_sub_srcdir/configure  --help=recursive
914     elif test -f $ac_sub_srcdir/configure.ac ||
915            test -f $ac_sub_srcdir/configure.in; then
916       echo
917       $ac_configure --help
918     else
919       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
920     fi
921     cd $ac_popdir
922   done
923 fi
924
925 test -n "$ac_init_help" && exit 0
926 if $ac_init_version; then
927   cat <<\EOF
928
929 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
930 Free Software Foundation, Inc.
931 This configure script is free software; the Free Software Foundation
932 gives unlimited permission to copy, distribute and modify it.
933 EOF
934   exit 0
935 fi
936 exec 5>config.log
937 cat >&5 <<EOF
938 This file contains any messages produced by compilers while
939 running configure, to aid debugging if configure makes a mistake.
940
941 It was created by $as_me, which was
942 generated by GNU Autoconf 2.52.20200802.  Invocation command line was
943
944   $ $0 $@
945
946 EOF
947 {
948 cat <<_ASUNAME
949 ## ---------- ##
950 ## Platform.  ##
951 ## ---------- ##
952
953 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
954 uname -m = `(uname -m) 2>/dev/null || echo unknown`
955 uname -r = `(uname -r) 2>/dev/null || echo unknown`
956 uname -s = `(uname -s) 2>/dev/null || echo unknown`
957 uname -v = `(uname -v) 2>/dev/null || echo unknown`
958
959 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
960 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
961
962 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
963 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
964 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
965 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
966 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
967 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
968 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
969
970 PATH = $PATH
971
972 _ASUNAME
973 } >&5
974
975 cat >&5 <<EOF
976 ## ------------ ##
977 ## Core tests.  ##
978 ## ------------ ##
979
980 EOF
981
982 # Keep a trace of the command line.
983 # Strip out --no-create and --no-recursion so they do not pile up.
984 # Also quote any args containing shell meta-characters.
985 ac_configure_args=
986 ac_sep=
987 for ac_arg
988 do
989   case $ac_arg in
990   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
991   | --no-cr | --no-c) ;;
992   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
993   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
994   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
995     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
996     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
997     ac_sep=" " ;;
998   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
999      ac_sep=" " ;;
1000   esac
1001   # Get rid of the leading space.
1002 done
1003
1004 # When interrupted or exit'd, cleanup temporary files, and complete
1005 # config.log.  We remove comments because anyway the quotes in there
1006 # would cause problems or look ugly.
1007 trap 'exit_status=$?
1008   # Save into config.log some information that might help in debugging.
1009   echo >&5
1010   echo "## ----------------- ##" >&5
1011   echo "## Cache variables.  ##" >&5
1012   echo "## ----------------- ##" >&5
1013   echo >&5
1014   # The following way of writing the cache mishandles newlines in values,
1015 {
1016   (set) 2>&1 |
1017     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1018     *ac_space=\ *)
1019       sed -n \
1020         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1021           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1022       ;;
1023     *)
1024       sed -n \
1025         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1026       ;;
1027     esac;
1028 } >&5
1029   sed "/^$/d" confdefs.h >conftest.log
1030   if test -s conftest.log; then
1031     echo >&5
1032     echo "## ------------ ##" >&5
1033     echo "## confdefs.h.  ##" >&5
1034     echo "## ------------ ##" >&5
1035     echo >&5
1036     cat conftest.log >&5
1037   fi
1038   (echo; echo) >&5
1039   test "$ac_signal" != 0 &&
1040     echo "$as_me: caught signal $ac_signal" >&5
1041   echo "$as_me: exit $exit_status" >&5
1042   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1043     exit $exit_status
1044      ' 0
1045 for ac_signal in 1 2 13 15; do
1046   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1047 done
1048 ac_signal=0
1049
1050 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1051 rm -rf conftest* confdefs.h
1052 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1053 echo >confdefs.h
1054
1055 # Let the site file select an alternate cache file if it wants to.
1056 # Prefer explicitly selected file to automatically selected ones.
1057 if test -z "$CONFIG_SITE"; then
1058   if test "x$prefix" != xNONE; then
1059     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1060   else
1061     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1062   fi
1063 fi
1064 for ac_site_file in $CONFIG_SITE; do
1065   if test -r "$ac_site_file"; then
1066     { echo "$as_me:1066: loading site script $ac_site_file" >&5
1067 echo "$as_me: loading site script $ac_site_file" >&6;}
1068     cat "$ac_site_file" >&5
1069     . "$ac_site_file"
1070   fi
1071 done
1072
1073 if test -r "$cache_file"; then
1074   # Some versions of bash will fail to source /dev/null (special
1075   # files actually), so we avoid doing that.
1076   if test -f "$cache_file"; then
1077     { echo "$as_me:1077: loading cache $cache_file" >&5
1078 echo "$as_me: loading cache $cache_file" >&6;}
1079     case $cache_file in
1080       [\\/]* | ?:[\\/]* ) . $cache_file;;
1081       *)                      . ./$cache_file;;
1082     esac
1083   fi
1084 else
1085   { echo "$as_me:1085: creating cache $cache_file" >&5
1086 echo "$as_me: creating cache $cache_file" >&6;}
1087   >$cache_file
1088 fi
1089
1090 # Check that the precious variables saved in the cache have kept the same
1091 # value.
1092 ac_cache_corrupted=false
1093 for ac_var in `(set) 2>&1 |
1094                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1095   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1096   eval ac_new_set=\$ac_env_${ac_var}_set
1097   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1098   eval ac_new_val="\$ac_env_${ac_var}_value"
1099   case $ac_old_set,$ac_new_set in
1100     set,)
1101       { echo "$as_me:1101: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1102 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1103       ac_cache_corrupted=: ;;
1104     ,set)
1105       { echo "$as_me:1105: error: \`$ac_var' was not set in the previous run" >&5
1106 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1107       ac_cache_corrupted=: ;;
1108     ,);;
1109     *)
1110       if test "x$ac_old_val" != "x$ac_new_val"; then
1111         { echo "$as_me:1111: error: \`$ac_var' has changed since the previous run:" >&5
1112 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1113         { echo "$as_me:1113:   former value:  $ac_old_val" >&5
1114 echo "$as_me:   former value:  $ac_old_val" >&2;}
1115         { echo "$as_me:1115:   current value: $ac_new_val" >&5
1116 echo "$as_me:   current value: $ac_new_val" >&2;}
1117         ac_cache_corrupted=:
1118       fi;;
1119   esac
1120   # Pass precious variables to config.status.  It doesn't matter if
1121   # we pass some twice (in addition to the command line arguments).
1122   if test "$ac_new_set" = set; then
1123     case $ac_new_val in
1124     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1125       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1126       ac_configure_args="$ac_configure_args '$ac_arg'"
1127       ;;
1128     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1129        ;;
1130     esac
1131   fi
1132 done
1133 if $ac_cache_corrupted; then
1134   { echo "$as_me:1134: error: changes in the environment can compromise the build" >&5
1135 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1136   { { echo "$as_me:1136: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1137 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1138    { (exit 1); exit 1; }; }
1139 fi
1140
1141 ac_ext=c
1142 ac_cpp='$CPP $CPPFLAGS'
1143 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1144 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1145 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1146 ac_main_return=return
1147
1148 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1149   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1150                    ECHO_T='     ' ;;
1151   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1152   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1153 esac
1154 echo "#! $SHELL" >conftest.sh
1155 echo  "exit 0"   >>conftest.sh
1156 chmod +x conftest.sh
1157 if { (echo "$as_me:1157: PATH=\".;.\"; conftest.sh") >&5
1158   (PATH=".;."; conftest.sh) 2>&5
1159   ac_status=$?
1160   echo "$as_me:1160: \$? = $ac_status" >&5
1161   (exit $ac_status); }; then
1162   ac_path_separator=';'
1163 else
1164   ac_path_separator=:
1165 fi
1166 PATH_SEPARATOR="$ac_path_separator"
1167 rm -f conftest.sh
1168
1169 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1170
1171 top_builddir=`pwd`
1172
1173 echo "$as_me:1173: checking for egrep" >&5
1174 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1175 if test "${ac_cv_prog_egrep+set}" = set; then
1176   echo $ECHO_N "(cached) $ECHO_C" >&6
1177 else
1178   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1179                 then ac_cv_prog_egrep='grep -E'
1180                 else ac_cv_prog_egrep='egrep'
1181         fi
1182 fi
1183 echo "$as_me:1183: result: $ac_cv_prog_egrep" >&5
1184 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1185         EGREP=$ac_cv_prog_egrep
1186
1187         test -z "$EGREP" && { { echo "$as_me:1187: error: No egrep program found" >&5
1188 echo "$as_me: error: No egrep program found" >&2;}
1189    { (exit 1); exit 1; }; }
1190
1191 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1194 cf_cv_abi_version=${NCURSES_MAJOR}
1195 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1196 cf_cv_timestamp=`date`
1197 echo "$as_me:1197: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1198 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1199
1200 if test -f $srcdir/VERSION ; then
1201         echo "$as_me:1201: checking for package version" >&5
1202 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1203
1204         # if there are not enough fields, cut returns the last one...
1205         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1206         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1207         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1208
1209         # this is how CF_BUNDLED_INTL uses $VERSION:
1210         VERSION="$cf_field1"
1211
1212         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1213         test -z "$VERSION_MAJOR" && { { echo "$as_me:1213: error: missing major-version" >&5
1214 echo "$as_me: error: missing major-version" >&2;}
1215    { (exit 1); exit 1; }; }
1216
1217         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1218         test -z "$VERSION_MINOR" && { { echo "$as_me:1218: error: missing minor-version" >&5
1219 echo "$as_me: error: missing minor-version" >&2;}
1220    { (exit 1); exit 1; }; }
1221
1222         echo "$as_me:1222: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1223 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1224
1225         echo "$as_me:1225: checking for package patch date" >&5
1226 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1227         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1228         case .$VERSION_PATCH in
1229         (.)
1230                 { { echo "$as_me:1230: error: missing patch-date $VERSION_PATCH" >&5
1231 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1232    { (exit 1); exit 1; }; }
1233                 ;;
1234         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1235                 ;;
1236         (*)
1237                 { { echo "$as_me:1237: error: illegal patch-date $VERSION_PATCH" >&5
1238 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1239    { (exit 1); exit 1; }; }
1240                 ;;
1241         esac
1242         echo "$as_me:1242: result: $VERSION_PATCH" >&5
1243 echo "${ECHO_T}$VERSION_PATCH" >&6
1244 else
1245         { { echo "$as_me:1245: error: did not find $srcdir/VERSION" >&5
1246 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1247    { (exit 1); exit 1; }; }
1248 fi
1249
1250 # show the actual data that we have for versions:
1251 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1252
1253 echo "${as_me:-configure}:1253: testing ABI VERSION $VERSION ..." 1>&5
1254
1255 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1256
1257 echo "${as_me:-configure}:1257: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1258
1259 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1260
1261 echo "${as_me:-configure}:1261: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1262
1263 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1264
1265 echo "${as_me:-configure}:1265: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1266
1267         cf_PACKAGE=NCURSES
1268         PACKAGE=ncurses
1269
1270 cat >>confdefs.h <<EOF
1271 #define PACKAGE "$PACKAGE"
1272 EOF
1273
1274 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1275
1276         cat >>confdefs.h <<EOF
1277 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1278 EOF
1279
1280         cat >>confdefs.h <<EOF
1281 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1282 EOF
1283
1284 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1285
1286 # Check whether --with-rel-version or --without-rel-version was given.
1287 if test "${with_rel_version+set}" = set; then
1288   withval="$with_rel_version"
1289   { echo "$as_me:1289: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1290 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1291  cf_cv_rel_version=$withval
1292 fi;
1293
1294  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1295  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1296
1297 if test -n "$NCURSES_MAJOR" ; then
1298   case $NCURSES_MAJOR in
1299   ([0-9]*)
1300         ;;
1301   (*)
1302         { { echo "$as_me:1302: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1303 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1304    { (exit 1); exit 1; }; }
1305         ;;
1306   esac
1307 else
1308   { { echo "$as_me:1308: error: Release major-version value is empty" >&5
1309 echo "$as_me: error: Release major-version value is empty" >&2;}
1310    { (exit 1); exit 1; }; }
1311 fi
1312
1313 if test -n "$NCURSES_MINOR" ; then
1314   case $NCURSES_MINOR in
1315   ([0-9]*)
1316         ;;
1317   (*)
1318         { { echo "$as_me:1318: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1319 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1320    { (exit 1); exit 1; }; }
1321         ;;
1322   esac
1323 else
1324   { { echo "$as_me:1324: error: Release minor-version value is empty" >&5
1325 echo "$as_me: error: Release minor-version value is empty" >&2;}
1326    { (exit 1); exit 1; }; }
1327 fi
1328
1329 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1330
1331 # Check whether --with-abi-version or --without-abi-version was given.
1332 if test "${with_abi_version+set}" = set; then
1333   withval="$with_abi_version"
1334
1335         if test "x$cf_cv_abi_version" != "x$withval"
1336         then
1337                 { echo "$as_me:1337: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1338 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1339                 case $cf_cv_rel_version in
1340                 (5.*)
1341                         cf_cv_rel_version=$withval.0
1342                         ;;
1343                 (6.*)
1344                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1345                         ;;
1346                 esac
1347         fi
1348         cf_cv_abi_version=$withval
1349 fi;
1350
1351 if test -n "$cf_cv_abi_version" ; then
1352   case $cf_cv_abi_version in
1353   ([0-9]*)
1354         ;;
1355   (*)
1356         { { echo "$as_me:1356: error: ABI version is not a number: $cf_cv_abi_version" >&5
1357 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1358    { (exit 1); exit 1; }; }
1359         ;;
1360   esac
1361 else
1362   { { echo "$as_me:1362: error: ABI version value is empty" >&5
1363 echo "$as_me: error: ABI version value is empty" >&2;}
1364    { (exit 1); exit 1; }; }
1365 fi
1366
1367 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1368 then
1369         case $cf_cv_rel_version in
1370         (5.*)
1371                 cf_cv_rel_version=$with_abi_version.0
1372                 ;;
1373         esac
1374 fi
1375
1376 ac_aux_dir=
1377 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1378   if test -f $ac_dir/install-sh; then
1379     ac_aux_dir=$ac_dir
1380     ac_install_sh="$ac_aux_dir/install-sh -c"
1381     break
1382   elif test -f $ac_dir/install.sh; then
1383     ac_aux_dir=$ac_dir
1384     ac_install_sh="$ac_aux_dir/install.sh -c"
1385     break
1386   elif test -f $ac_dir/shtool; then
1387     ac_aux_dir=$ac_dir
1388     ac_install_sh="$ac_aux_dir/shtool install -c"
1389     break
1390   fi
1391 done
1392 if test -z "$ac_aux_dir"; then
1393   { { echo "$as_me:1393: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1394 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1395    { (exit 1); exit 1; }; }
1396 fi
1397 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1398 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1399 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1400
1401 # Make sure we can run config.sub.
1402 $ac_config_sub sun4 >/dev/null 2>&1 ||
1403   { { echo "$as_me:1403: error: cannot run $ac_config_sub" >&5
1404 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1405    { (exit 1); exit 1; }; }
1406
1407 echo "$as_me:1407: checking build system type" >&5
1408 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1409 if test "${ac_cv_build+set}" = set; then
1410   echo $ECHO_N "(cached) $ECHO_C" >&6
1411 else
1412   ac_cv_build_alias=$build_alias
1413 test -z "$ac_cv_build_alias" &&
1414   ac_cv_build_alias=`$ac_config_guess`
1415 test -z "$ac_cv_build_alias" &&
1416   { { echo "$as_me:1416: error: cannot guess build type; you must specify one" >&5
1417 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1418    { (exit 1); exit 1; }; }
1419 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1420   { { echo "$as_me:1420: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1421 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1422    { (exit 1); exit 1; }; }
1423
1424 fi
1425 echo "$as_me:1425: result: $ac_cv_build" >&5
1426 echo "${ECHO_T}$ac_cv_build" >&6
1427 build=$ac_cv_build
1428 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1429 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1430 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1431
1432 echo "$as_me:1432: checking host system type" >&5
1433 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1434 if test "${ac_cv_host+set}" = set; then
1435   echo $ECHO_N "(cached) $ECHO_C" >&6
1436 else
1437   ac_cv_host_alias=$host_alias
1438 test -z "$ac_cv_host_alias" &&
1439   ac_cv_host_alias=$ac_cv_build_alias
1440 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1441   { { echo "$as_me:1441: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1442 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1443    { (exit 1); exit 1; }; }
1444
1445 fi
1446 echo "$as_me:1446: result: $ac_cv_host" >&5
1447 echo "${ECHO_T}$ac_cv_host" >&6
1448 host=$ac_cv_host
1449 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1450 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1451 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1452
1453 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1454         echo "$as_me:1454: checking target system type" >&5
1455 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1456 if test "${ac_cv_target+set}" = set; then
1457   echo $ECHO_N "(cached) $ECHO_C" >&6
1458 else
1459   ac_cv_target_alias=$target_alias
1460 test "x$ac_cv_target_alias" = "x" &&
1461   ac_cv_target_alias=$ac_cv_host_alias
1462 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1463   { { echo "$as_me:1463: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1464 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1465    { (exit 1); exit 1; }; }
1466
1467 fi
1468 echo "$as_me:1468: result: $ac_cv_target" >&5
1469 echo "${ECHO_T}$ac_cv_target" >&6
1470 target=$ac_cv_target
1471 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1472 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1473 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1474
1475 # The aliases save the names the user supplied, while $host etc.
1476 # will get canonicalized.
1477 test -n "$target_alias" &&
1478   test "$program_prefix$program_suffix$program_transform_name" = \
1479     NONENONEs,x,x, &&
1480   program_prefix=${target_alias}-
1481         system_name="$host_os"
1482 else
1483         system_name="`(uname -s -r) 2>/dev/null`"
1484         if test -z "$system_name" ; then
1485                 system_name="`(hostname) 2>/dev/null`"
1486         fi
1487 fi
1488 test -n "$system_name" &&
1489 cat >>confdefs.h <<EOF
1490 #define SYSTEM_NAME "$system_name"
1491 EOF
1492
1493 if test "${cf_cv_system_name+set}" = set; then
1494   echo $ECHO_N "(cached) $ECHO_C" >&6
1495 else
1496   cf_cv_system_name="$system_name"
1497 fi
1498
1499 test -z "$system_name" && system_name="$cf_cv_system_name"
1500 test -n "$cf_cv_system_name" && echo "$as_me:1500: result: Configuring for $cf_cv_system_name" >&5
1501 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1502
1503 if test ".$system_name" != ".$cf_cv_system_name" ; then
1504         echo "$as_me:1504: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1505 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1506         { { echo "$as_me:1506: error: \"Please remove config.cache and try again.\"" >&5
1507 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1508    { (exit 1); exit 1; }; }
1509 fi
1510
1511 # Check whether --with-system-type or --without-system-type was given.
1512 if test "${with_system_type+set}" = set; then
1513   withval="$with_system_type"
1514   { echo "$as_me:1514: WARNING: overriding system type to $withval" >&5
1515 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1516         cf_cv_system_name=$withval
1517         host_os=$withval
1518
1519 fi;
1520
1521 ###     Save the given $CFLAGS to allow user-override.
1522 cf_user_CFLAGS="$CFLAGS"
1523
1524 ###     Default install-location
1525
1526 echo "$as_me:1526: checking for prefix" >&5
1527 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1528 if test "x$prefix" = "xNONE" ; then
1529         case "$cf_cv_system_name" in
1530                 # non-vendor systems don't have a conflict
1531         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1532                 prefix=/usr
1533                 ;;
1534         (*)     prefix=$ac_default_prefix
1535                 ;;
1536         esac
1537 fi
1538 echo "$as_me:1538: result: $prefix" >&5
1539 echo "${ECHO_T}$prefix" >&6
1540
1541 if test "x$prefix" = "xNONE" ; then
1542 echo "$as_me:1542: checking for default include-directory" >&5
1543 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1544 test -n "$verbose" && echo 1>&6
1545 for cf_symbol in \
1546         $includedir \
1547         $includedir/ncurses \
1548         $prefix/include \
1549         $prefix/include/ncurses \
1550         /usr/local/include \
1551         /usr/local/include/ncurses \
1552         /usr/include \
1553         /usr/include/ncurses
1554 do
1555         cf_dir=`eval echo $cf_symbol`
1556         if test -f $cf_dir/curses.h ; then
1557         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1558                 includedir="$cf_symbol"
1559                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1560                 break
1561         fi
1562         fi
1563         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1564 done
1565 echo "$as_me:1565: result: $includedir" >&5
1566 echo "${ECHO_T}$includedir" >&6
1567 fi
1568
1569 ### Defaults for ncurses ABI
1570
1571 case x$cf_cv_abi_version in
1572 (x[6789])
1573         cf_dft_ext_colors=yes
1574         cf_dft_ext_const=yes
1575         cf_dft_ext_mouse=yes
1576         cf_dft_ext_putwin=yes
1577         cf_dft_ext_spfuncs=yes
1578         cf_dft_filter_syms=yes
1579         cf_dft_chtype=uint32_t
1580         cf_dft_mmask_t=uint32_t
1581         cf_dft_interop=yes
1582         cf_dft_tparm_arg=intptr_t
1583         cf_dft_with_lp64=yes
1584         ;;
1585 (*)
1586         cf_dft_ext_colors=no
1587         cf_dft_ext_const=no
1588         cf_dft_ext_mouse=no
1589         cf_dft_ext_putwin=no
1590         cf_dft_ext_spfuncs=no
1591         cf_dft_filter_syms=no
1592         cf_dft_chtype=auto
1593         cf_dft_mmask_t=auto
1594         cf_dft_interop=no
1595         cf_dft_tparm_arg=long
1596         cf_dft_with_lp64=no
1597         ;;
1598 esac
1599
1600 ###     Checks for programs.
1601
1602 # Check whether --with-ada or --without-ada was given.
1603 if test "${with_ada+set}" = set; then
1604   withval="$with_ada"
1605   cf_with_ada=$withval
1606 else
1607   cf_with_ada=yes
1608 fi;
1609
1610 if test "x$cf_with_ada" = xyes
1611 then
1612         cf_prog_cc="gnatgcc gcc cc"
1613 else
1614         cf_prog_cc="gcc cc"
1615 fi
1616
1617 ac_ext=c
1618 ac_cpp='$CPP $CPPFLAGS'
1619 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1620 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1621 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1622 ac_main_return=return
1623 if test -n "$ac_tool_prefix"; then
1624   for ac_prog in $cf_prog_cc
1625   do
1626     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1627 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1628 echo "$as_me:1628: checking for $ac_word" >&5
1629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1630 if test "${ac_cv_prog_CC+set}" = set; then
1631   echo $ECHO_N "(cached) $ECHO_C" >&6
1632 else
1633   if test -n "$CC"; then
1634   ac_cv_prog_CC="$CC" # Let the user override the test.
1635 else
1636   ac_save_IFS=$IFS; IFS=$ac_path_separator
1637 ac_dummy="$PATH"
1638 for ac_dir in $ac_dummy; do
1639   IFS=$ac_save_IFS
1640   test -z "$ac_dir" && ac_dir=.
1641   $as_executable_p "$ac_dir/$ac_word" || continue
1642 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1643 echo "$as_me:1643: found $ac_dir/$ac_word" >&5
1644 break
1645 done
1646
1647 fi
1648 fi
1649 CC=$ac_cv_prog_CC
1650 if test -n "$CC"; then
1651   echo "$as_me:1651: result: $CC" >&5
1652 echo "${ECHO_T}$CC" >&6
1653 else
1654   echo "$as_me:1654: result: no" >&5
1655 echo "${ECHO_T}no" >&6
1656 fi
1657
1658     test -n "$CC" && break
1659   done
1660 fi
1661 if test -z "$CC"; then
1662   ac_ct_CC=$CC
1663   for ac_prog in $cf_prog_cc
1664 do
1665   # Extract the first word of "$ac_prog", so it can be a program name with args.
1666 set dummy $ac_prog; ac_word=$2
1667 echo "$as_me:1667: checking for $ac_word" >&5
1668 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1669 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1670   echo $ECHO_N "(cached) $ECHO_C" >&6
1671 else
1672   if test -n "$ac_ct_CC"; then
1673   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1674 else
1675   ac_save_IFS=$IFS; IFS=$ac_path_separator
1676 ac_dummy="$PATH"
1677 for ac_dir in $ac_dummy; do
1678   IFS=$ac_save_IFS
1679   test -z "$ac_dir" && ac_dir=.
1680   $as_executable_p "$ac_dir/$ac_word" || continue
1681 ac_cv_prog_ac_ct_CC="$ac_prog"
1682 echo "$as_me:1682: found $ac_dir/$ac_word" >&5
1683 break
1684 done
1685
1686 fi
1687 fi
1688 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1689 if test -n "$ac_ct_CC"; then
1690   echo "$as_me:1690: result: $ac_ct_CC" >&5
1691 echo "${ECHO_T}$ac_ct_CC" >&6
1692 else
1693   echo "$as_me:1693: result: no" >&5
1694 echo "${ECHO_T}no" >&6
1695 fi
1696
1697   test -n "$ac_ct_CC" && break
1698 done
1699
1700   CC=$ac_ct_CC
1701 fi
1702
1703 test -z "$CC" && { { echo "$as_me:1703: error: no acceptable cc found in \$PATH" >&5
1704 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1705    { (exit 1); exit 1; }; }
1706
1707 # Provide some information about the compiler.
1708 echo "$as_me:1708:" \
1709      "checking for C compiler version" >&5
1710 ac_compiler=`set X $ac_compile; echo $2`
1711 { (eval echo "$as_me:1711: \"$ac_compiler --version </dev/null >&5\"") >&5
1712   (eval $ac_compiler --version </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716 { (eval echo "$as_me:1716: \"$ac_compiler -v </dev/null >&5\"") >&5
1717   (eval $ac_compiler -v </dev/null >&5) 2>&5
1718   ac_status=$?
1719   echo "$as_me:1719: \$? = $ac_status" >&5
1720   (exit $ac_status); }
1721 { (eval echo "$as_me:1721: \"$ac_compiler -V </dev/null >&5\"") >&5
1722   (eval $ac_compiler -V </dev/null >&5) 2>&5
1723   ac_status=$?
1724   echo "$as_me:1724: \$? = $ac_status" >&5
1725   (exit $ac_status); }
1726
1727 cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main (void)
1733 {
1734
1735   ;
1736   return 0;
1737 }
1738 _ACEOF
1739 ac_clean_files_save=$ac_clean_files
1740 ac_clean_files="$ac_clean_files a.out a.exe"
1741 # Try to create an executable without -o first, disregard a.out.
1742 # It will help us diagnose broken compilers, and finding out an intuition
1743 # of exeext.
1744 echo "$as_me:1744: checking for C compiler default output" >&5
1745 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1746 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1747 if { (eval echo "$as_me:1747: \"$ac_link_default\"") >&5
1748   (eval $ac_link_default) 2>&5
1749   ac_status=$?
1750   echo "$as_me:1750: \$? = $ac_status" >&5
1751   (exit $ac_status); }; then
1752   # Find the output, starting from the most likely.  This scheme is
1753 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1754 # resort.
1755 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1756                 ls a.out conftest 2>/dev/null;
1757                 ls a.* conftest.* 2>/dev/null`; do
1758   case $ac_file in
1759     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1760     a.out ) # We found the default executable, but exeext='' is most
1761             # certainly right.
1762             break;;
1763     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1764           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1765           export ac_cv_exeext
1766           break;;
1767     * ) break;;
1768   esac
1769 done
1770 else
1771   echo "$as_me: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1773 { { echo "$as_me:1773: error: C compiler cannot create executables" >&5
1774 echo "$as_me: error: C compiler cannot create executables" >&2;}
1775    { (exit 77); exit 77; }; }
1776 fi
1777
1778 ac_exeext=$ac_cv_exeext
1779 echo "$as_me:1779: result: $ac_file" >&5
1780 echo "${ECHO_T}$ac_file" >&6
1781
1782 # Check the compiler produces executables we can run.  If not, either
1783 # the compiler is broken, or we cross compile.
1784 echo "$as_me:1784: checking whether the C compiler works" >&5
1785 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1786 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1787 # If not cross compiling, check that we can run a simple program.
1788 if test "$cross_compiling" != yes; then
1789   if { ac_try='./$ac_file'
1790   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791   (eval $ac_try) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; }; then
1795     cross_compiling=no
1796   else
1797     if test "$cross_compiling" = maybe; then
1798         cross_compiling=yes
1799     else
1800         { { echo "$as_me:1800: error: cannot run C compiled programs.
1801 If you meant to cross compile, use \`--host'." >&5
1802 echo "$as_me: error: cannot run C compiled programs.
1803 If you meant to cross compile, use \`--host'." >&2;}
1804    { (exit 1); exit 1; }; }
1805     fi
1806   fi
1807 fi
1808 echo "$as_me:1808: result: yes" >&5
1809 echo "${ECHO_T}yes" >&6
1810
1811 rm -f a.out a.exe conftest$ac_cv_exeext
1812 ac_clean_files=$ac_clean_files_save
1813 # Check the compiler produces executables we can run.  If not, either
1814 # the compiler is broken, or we cross compile.
1815 echo "$as_me:1815: checking whether we are cross compiling" >&5
1816 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1817 echo "$as_me:1817: result: $cross_compiling" >&5
1818 echo "${ECHO_T}$cross_compiling" >&6
1819
1820 echo "$as_me:1820: checking for executable suffix" >&5
1821 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1822 if { (eval echo "$as_me:1822: \"$ac_link\"") >&5
1823   (eval $ac_link) 2>&5
1824   ac_status=$?
1825   echo "$as_me:1825: \$? = $ac_status" >&5
1826   (exit $ac_status); }; then
1827   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1828 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1829 # work properly (i.e., refer to `conftest.exe'), while it won't with
1830 # `rm'.
1831 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1832   case $ac_file in
1833     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1834     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1835           export ac_cv_exeext
1836           break;;
1837     * ) break;;
1838   esac
1839 done
1840 else
1841   { { echo "$as_me:1841: error: cannot compute EXEEXT: cannot compile and link" >&5
1842 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1843    { (exit 1); exit 1; }; }
1844 fi
1845
1846 rm -f conftest$ac_cv_exeext
1847 echo "$as_me:1847: result: $ac_cv_exeext" >&5
1848 echo "${ECHO_T}$ac_cv_exeext" >&6
1849
1850 rm -f conftest.$ac_ext
1851 EXEEXT=$ac_cv_exeext
1852 ac_exeext=$EXEEXT
1853 echo "$as_me:1853: checking for object suffix" >&5
1854 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1855 if test "${ac_cv_objext+set}" = set; then
1856   echo $ECHO_N "(cached) $ECHO_C" >&6
1857 else
1858   cat >conftest.$ac_ext <<_ACEOF
1859 #line 1859 "configure"
1860 #include "confdefs.h"
1861
1862 int
1863 main (void)
1864 {
1865
1866   ;
1867   return 0;
1868 }
1869 _ACEOF
1870 rm -f conftest.o conftest.obj
1871 if { (eval echo "$as_me:1871: \"$ac_compile\"") >&5
1872   (eval $ac_compile) 2>&5
1873   ac_status=$?
1874   echo "$as_me:1874: \$? = $ac_status" >&5
1875   (exit $ac_status); }; then
1876   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1877   case $ac_file in
1878     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1879     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1880        break;;
1881   esac
1882 done
1883 else
1884   echo "$as_me: failed program was:" >&5
1885 cat conftest.$ac_ext >&5
1886 { { echo "$as_me:1886: error: cannot compute OBJEXT: cannot compile" >&5
1887 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1888    { (exit 1); exit 1; }; }
1889 fi
1890
1891 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1892 fi
1893 echo "$as_me:1893: result: $ac_cv_objext" >&5
1894 echo "${ECHO_T}$ac_cv_objext" >&6
1895 OBJEXT=$ac_cv_objext
1896 ac_objext=$OBJEXT
1897 echo "$as_me:1897: checking whether we are using the GNU C compiler" >&5
1898 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1899 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1900   echo $ECHO_N "(cached) $ECHO_C" >&6
1901 else
1902   cat >conftest.$ac_ext <<_ACEOF
1903 #line 1903 "configure"
1904 #include "confdefs.h"
1905
1906 int
1907 main (void)
1908 {
1909 #ifndef __GNUC__
1910        choke me
1911 #endif
1912
1913   ;
1914   return 0;
1915 }
1916 _ACEOF
1917 rm -f conftest.$ac_objext
1918 if { (eval echo "$as_me:1918: \"$ac_compile\"") >&5
1919   (eval $ac_compile) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit $ac_status); } &&
1923          { ac_try='test -s conftest.$ac_objext'
1924   { (eval echo "$as_me:1924: \"$ac_try\"") >&5
1925   (eval $ac_try) 2>&5
1926   ac_status=$?
1927   echo "$as_me:1927: \$? = $ac_status" >&5
1928   (exit $ac_status); }; }; then
1929   ac_compiler_gnu=yes
1930 else
1931   echo "$as_me: failed program was:" >&5
1932 cat conftest.$ac_ext >&5
1933 ac_compiler_gnu=no
1934 fi
1935 rm -f conftest.$ac_objext conftest.$ac_ext
1936 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1937
1938 fi
1939 echo "$as_me:1939: result: $ac_cv_c_compiler_gnu" >&5
1940 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1941 GCC=`test $ac_compiler_gnu = yes && echo yes`
1942 ac_test_CFLAGS=${CFLAGS+set}
1943 ac_save_CFLAGS=$CFLAGS
1944 CFLAGS="-g"
1945 echo "$as_me:1945: checking whether $CC accepts -g" >&5
1946 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1947 if test "${ac_cv_prog_cc_g+set}" = set; then
1948   echo $ECHO_N "(cached) $ECHO_C" >&6
1949 else
1950   cat >conftest.$ac_ext <<_ACEOF
1951 #line 1951 "configure"
1952 #include "confdefs.h"
1953
1954 int
1955 main (void)
1956 {
1957
1958   ;
1959   return 0;
1960 }
1961 _ACEOF
1962 rm -f conftest.$ac_objext
1963 if { (eval echo "$as_me:1963: \"$ac_compile\"") >&5
1964   (eval $ac_compile) 2>&5
1965   ac_status=$?
1966   echo "$as_me:1966: \$? = $ac_status" >&5
1967   (exit $ac_status); } &&
1968          { ac_try='test -s conftest.$ac_objext'
1969   { (eval echo "$as_me:1969: \"$ac_try\"") >&5
1970   (eval $ac_try) 2>&5
1971   ac_status=$?
1972   echo "$as_me:1972: \$? = $ac_status" >&5
1973   (exit $ac_status); }; }; then
1974   ac_cv_prog_cc_g=yes
1975 else
1976   echo "$as_me: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1978 ac_cv_prog_cc_g=no
1979 fi
1980 rm -f conftest.$ac_objext conftest.$ac_ext
1981 fi
1982 echo "$as_me:1982: result: $ac_cv_prog_cc_g" >&5
1983 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1984 if test "$ac_test_CFLAGS" = set; then
1985   CFLAGS=$ac_save_CFLAGS
1986 elif test $ac_cv_prog_cc_g = yes; then
1987   if test "$GCC" = yes; then
1988     CFLAGS="-g -O2"
1989   else
1990     CFLAGS="-g"
1991   fi
1992 else
1993   if test "$GCC" = yes; then
1994     CFLAGS="-O2"
1995   else
1996     CFLAGS=
1997   fi
1998 fi
1999 # Some people use a C++ compiler to compile C.  Since we use `exit',
2000 # in C++ we need to declare it.  In case someone uses the same compiler
2001 # for both compiling C and C++ we need to have the C++ compiler decide
2002 # the declaration of exit, since it's the most demanding environment.
2003 cat >conftest.$ac_ext <<_ACEOF
2004 #ifndef __cplusplus
2005   choke me
2006 #endif
2007 _ACEOF
2008 rm -f conftest.$ac_objext
2009 if { (eval echo "$as_me:2009: \"$ac_compile\"") >&5
2010   (eval $ac_compile) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); } &&
2014          { ac_try='test -s conftest.$ac_objext'
2015   { (eval echo "$as_me:2015: \"$ac_try\"") >&5
2016   (eval $ac_try) 2>&5
2017   ac_status=$?
2018   echo "$as_me:2018: \$? = $ac_status" >&5
2019   (exit $ac_status); }; }; then
2020   for ac_declaration in \
2021    ''\
2022    '#include <stdlib.h>' \
2023    'extern "C" void std::exit (int) throw (); using std::exit;' \
2024    'extern "C" void std::exit (int); using std::exit;' \
2025    'extern "C" void exit (int) throw ();' \
2026    'extern "C" void exit (int);' \
2027    'void exit (int);'
2028 do
2029   cat >conftest.$ac_ext <<_ACEOF
2030 #line 2030 "configure"
2031 #include "confdefs.h"
2032 #include <stdlib.h>
2033 $ac_declaration
2034 int
2035 main (void)
2036 {
2037 exit (42);
2038   ;
2039   return 0;
2040 }
2041 _ACEOF
2042 rm -f conftest.$ac_objext
2043 if { (eval echo "$as_me:2043: \"$ac_compile\"") >&5
2044   (eval $ac_compile) 2>&5
2045   ac_status=$?
2046   echo "$as_me:2046: \$? = $ac_status" >&5
2047   (exit $ac_status); } &&
2048          { ac_try='test -s conftest.$ac_objext'
2049   { (eval echo "$as_me:2049: \"$ac_try\"") >&5
2050   (eval $ac_try) 2>&5
2051   ac_status=$?
2052   echo "$as_me:2052: \$? = $ac_status" >&5
2053   (exit $ac_status); }; }; then
2054   :
2055 else
2056   echo "$as_me: failed program was:" >&5
2057 cat conftest.$ac_ext >&5
2058 continue
2059 fi
2060 rm -f conftest.$ac_objext conftest.$ac_ext
2061   cat >conftest.$ac_ext <<_ACEOF
2062 #line 2062 "configure"
2063 #include "confdefs.h"
2064 $ac_declaration
2065 int
2066 main (void)
2067 {
2068 exit (42);
2069   ;
2070   return 0;
2071 }
2072 _ACEOF
2073 rm -f conftest.$ac_objext
2074 if { (eval echo "$as_me:2074: \"$ac_compile\"") >&5
2075   (eval $ac_compile) 2>&5
2076   ac_status=$?
2077   echo "$as_me:2077: \$? = $ac_status" >&5
2078   (exit $ac_status); } &&
2079          { ac_try='test -s conftest.$ac_objext'
2080   { (eval echo "$as_me:2080: \"$ac_try\"") >&5
2081   (eval $ac_try) 2>&5
2082   ac_status=$?
2083   echo "$as_me:2083: \$? = $ac_status" >&5
2084   (exit $ac_status); }; }; then
2085   break
2086 else
2087   echo "$as_me: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
2089 fi
2090 rm -f conftest.$ac_objext conftest.$ac_ext
2091 done
2092 rm -rf conftest*
2093 if test -n "$ac_declaration"; then
2094   echo '#ifdef __cplusplus' >>confdefs.h
2095   echo $ac_declaration      >>confdefs.h
2096   echo '#endif'             >>confdefs.h
2097 fi
2098
2099 else
2100   echo "$as_me: failed program was:" >&5
2101 cat conftest.$ac_ext >&5
2102 fi
2103 rm -f conftest.$ac_objext conftest.$ac_ext
2104 ac_ext=c
2105 ac_cpp='$CPP $CPPFLAGS'
2106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109 ac_main_return=return
2110
2111 GCC_VERSION=none
2112 if test "$GCC" = yes ; then
2113         echo "$as_me:2113: checking version of $CC" >&5
2114 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2115         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.].*//'`"
2116         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2117         echo "$as_me:2117: result: $GCC_VERSION" >&5
2118 echo "${ECHO_T}$GCC_VERSION" >&6
2119 fi
2120
2121 INTEL_COMPILER=no
2122
2123 if test "$GCC" = yes ; then
2124         case $host_os in
2125         (linux*|gnu*)
2126                 echo "$as_me:2126: checking if this is really Intel C compiler" >&5
2127 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2128                 cf_save_CFLAGS="$CFLAGS"
2129                 CFLAGS="$CFLAGS -no-gcc"
2130                 cat >conftest.$ac_ext <<_ACEOF
2131 #line 2131 "configure"
2132 #include "confdefs.h"
2133
2134 int
2135 main (void)
2136 {
2137
2138 #ifdef __INTEL_COMPILER
2139 #else
2140 make an error
2141 #endif
2142
2143   ;
2144   return 0;
2145 }
2146 _ACEOF
2147 rm -f conftest.$ac_objext
2148 if { (eval echo "$as_me:2148: \"$ac_compile\"") >&5
2149   (eval $ac_compile) 2>&5
2150   ac_status=$?
2151   echo "$as_me:2151: \$? = $ac_status" >&5
2152   (exit $ac_status); } &&
2153          { ac_try='test -s conftest.$ac_objext'
2154   { (eval echo "$as_me:2154: \"$ac_try\"") >&5
2155   (eval $ac_try) 2>&5
2156   ac_status=$?
2157   echo "$as_me:2157: \$? = $ac_status" >&5
2158   (exit $ac_status); }; }; then
2159   INTEL_COMPILER=yes
2160 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2161
2162 else
2163   echo "$as_me: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
2165 fi
2166 rm -f conftest.$ac_objext conftest.$ac_ext
2167                 CFLAGS="$cf_save_CFLAGS"
2168                 echo "$as_me:2168: result: $INTEL_COMPILER" >&5
2169 echo "${ECHO_T}$INTEL_COMPILER" >&6
2170                 ;;
2171         esac
2172 fi
2173
2174 CLANG_COMPILER=no
2175
2176 if test "$GCC" = yes ; then
2177         echo "$as_me:2177: checking if this is really Clang C compiler" >&5
2178 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2179         cf_save_CFLAGS="$CFLAGS"
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
2211 else
2212   echo "$as_me: failed program was:" >&5
2213 cat conftest.$ac_ext >&5
2214 fi
2215 rm -f conftest.$ac_objext conftest.$ac_ext
2216         CFLAGS="$cf_save_CFLAGS"
2217         echo "$as_me:2217: result: $CLANG_COMPILER" >&5
2218 echo "${ECHO_T}$CLANG_COMPILER" >&6
2219 fi
2220
2221 if test "x$CLANG_COMPILER" = "xyes" ; then
2222         for cf_clang_opt in \
2223                 -Qunused-arguments \
2224                 -Wno-error=implicit-function-declaration
2225         do
2226                 echo "$as_me:2226: checking if option $cf_clang_opt works" >&5
2227 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2228                 cf_save_CFLAGS="$CFLAGS"
2229                 CFLAGS="$CFLAGS $cf_clang_opt"
2230                 cat >conftest.$ac_ext <<_ACEOF
2231 #line 2231 "configure"
2232 #include "confdefs.h"
2233
2234                         #include <stdio.h>
2235 int
2236 main (void)
2237 {
2238
2239                         printf("hello!\n");
2240   ;
2241   return 0;
2242 }
2243 _ACEOF
2244 rm -f conftest.$ac_objext conftest$ac_exeext
2245 if { (eval echo "$as_me:2245: \"$ac_link\"") >&5
2246   (eval $ac_link) 2>&5
2247   ac_status=$?
2248   echo "$as_me:2248: \$? = $ac_status" >&5
2249   (exit $ac_status); } &&
2250          { ac_try='test -s conftest$ac_exeext'
2251   { (eval echo "$as_me:2251: \"$ac_try\"") >&5
2252   (eval $ac_try) 2>&5
2253   ac_status=$?
2254   echo "$as_me:2254: \$? = $ac_status" >&5
2255   (exit $ac_status); }; }; then
2256
2257                         cf_clang_optok=yes
2258 else
2259   echo "$as_me: failed program was:" >&5
2260 cat conftest.$ac_ext >&5
2261
2262                         cf_clang_optok=no
2263 fi
2264 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2265                 echo "$as_me:2265: result: $cf_clang_optok" >&5
2266 echo "${ECHO_T}$cf_clang_optok" >&6
2267                 CFLAGS="$cf_save_CFLAGS"
2268                 if test $cf_clang_optok = yes; then
2269                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2270
2271 echo "${as_me:-configure}:2271: testing adding option $cf_clang_opt ..." 1>&5
2272
2273         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2274         CFLAGS="${CFLAGS}$cf_clang_opt"
2275
2276                 fi
2277         done
2278 fi
2279
2280 echo "$as_me:2280: checking for $CC option to accept ANSI C" >&5
2281 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2282 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2283   echo $ECHO_N "(cached) $ECHO_C" >&6
2284 else
2285   ac_cv_prog_cc_stdc=no
2286 ac_save_CC=$CC
2287 cat >conftest.$ac_ext <<_ACEOF
2288 #line 2288 "configure"
2289 #include "confdefs.h"
2290 #include <stdarg.h>
2291 #include <stdio.h>
2292 #include <sys/types.h>
2293 #include <sys/stat.h>
2294 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2295 struct buf { int x; };
2296 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2297 static char *e (p, i)
2298      char **p;
2299      int i;
2300 {
2301   return p[i];
2302 }
2303 static char *f (char * (*g) (char **, int), char **p, ...)
2304 {
2305   char *s;
2306   va_list v;
2307   va_start (v,p);
2308   s = g (p, va_arg (v,int));
2309   va_end (v);
2310   return s;
2311 }
2312 int test (int i, double x);
2313 struct s1 {int (*f) (int a);};
2314 struct s2 {int (*f) (double a);};
2315 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2316 int argc;
2317 char **argv;
2318 int
2319 main (void)
2320 {
2321 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2322   ;
2323   return 0;
2324 }
2325 _ACEOF
2326 # Don't try gcc -ansi; that turns off useful extensions and
2327 # breaks some systems' header files.
2328 # AIX                   -qlanglvl=ansi
2329 # Ultrix and OSF/1      -std1
2330 # HP-UX 10.20 and later -Ae
2331 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2332 # SVR4                  -Xc -D__EXTENSIONS__
2333 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2334 do
2335   CC="$ac_save_CC $ac_arg"
2336   rm -f conftest.$ac_objext
2337 if { (eval echo "$as_me:2337: \"$ac_compile\"") >&5
2338   (eval $ac_compile) 2>&5
2339   ac_status=$?
2340   echo "$as_me:2340: \$? = $ac_status" >&5
2341   (exit $ac_status); } &&
2342          { ac_try='test -s conftest.$ac_objext'
2343   { (eval echo "$as_me:2343: \"$ac_try\"") >&5
2344   (eval $ac_try) 2>&5
2345   ac_status=$?
2346   echo "$as_me:2346: \$? = $ac_status" >&5
2347   (exit $ac_status); }; }; then
2348   ac_cv_prog_cc_stdc=$ac_arg
2349 break
2350 else
2351   echo "$as_me: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2353 fi
2354 rm -f conftest.$ac_objext
2355 done
2356 rm -f conftest.$ac_ext conftest.$ac_objext
2357 CC=$ac_save_CC
2358
2359 fi
2360
2361 case "x$ac_cv_prog_cc_stdc" in
2362   x|xno)
2363     echo "$as_me:2363: result: none needed" >&5
2364 echo "${ECHO_T}none needed" >&6 ;;
2365   *)
2366     echo "$as_me:2366: result: $ac_cv_prog_cc_stdc" >&5
2367 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2368     CC="$CC $ac_cv_prog_cc_stdc" ;;
2369 esac
2370
2371 # This should have been defined by AC_PROG_CC
2372 : ${CC:=cc}
2373
2374 echo "$as_me:2374: checking \$CFLAGS variable" >&5
2375 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2376 case "x$CFLAGS" in
2377 (*-[IUD]*)
2378         echo "$as_me:2378: result: broken" >&5
2379 echo "${ECHO_T}broken" >&6
2380         { echo "$as_me:2380: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2381 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2382         cf_flags="$CFLAGS"
2383         CFLAGS=
2384         for cf_arg in $cf_flags
2385         do
2386
2387 cf_fix_cppflags=no
2388 cf_new_cflags=
2389 cf_new_cppflags=
2390 cf_new_extra_cppflags=
2391
2392 for cf_add_cflags in $cf_arg
2393 do
2394 case $cf_fix_cppflags in
2395 (no)
2396         case $cf_add_cflags in
2397         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2398                 case $cf_add_cflags in
2399                 (-D*)
2400                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2401
2402                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2403                                 && test -z "${cf_tst_cflags}" \
2404                                 && cf_fix_cppflags=yes
2405
2406                         if test $cf_fix_cppflags = yes ; then
2407
2408         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2409         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2410
2411                                 continue
2412                         elif test "${cf_tst_cflags}" = "\"'" ; then
2413
2414         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2415         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2416
2417                                 continue
2418                         fi
2419                         ;;
2420                 esac
2421                 case "$CPPFLAGS" in
2422                 (*$cf_add_cflags)
2423                         ;;
2424                 (*)
2425                         case $cf_add_cflags in
2426                         (-D*)
2427                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2428
2429 CPPFLAGS=`echo "$CPPFLAGS" | \
2430         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2431                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2432
2433                                 ;;
2434                         esac
2435
2436         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2437         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2438
2439                         ;;
2440                 esac
2441                 ;;
2442         (*)
2443
2444         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2445         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2446
2447                 ;;
2448         esac
2449         ;;
2450 (yes)
2451
2452         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2453         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2454
2455         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2456
2457         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2458                 && test -z "${cf_tst_cflags}" \
2459                 && cf_fix_cppflags=no
2460         ;;
2461 esac
2462 done
2463
2464 if test -n "$cf_new_cflags" ; then
2465
2466         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2467         CFLAGS="${CFLAGS}$cf_new_cflags"
2468
2469 fi
2470
2471 if test -n "$cf_new_cppflags" ; then
2472
2473         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2474         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2475
2476 fi
2477
2478 if test -n "$cf_new_extra_cppflags" ; then
2479
2480         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2481         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2482
2483 fi
2484
2485         done
2486         ;;
2487 (*)
2488         echo "$as_me:2488: result: ok" >&5
2489 echo "${ECHO_T}ok" >&6
2490         ;;
2491 esac
2492
2493 echo "$as_me:2493: checking \$CC variable" >&5
2494 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2495 case "$CC" in
2496 (*[\ \  ]-*)
2497         echo "$as_me:2497: result: broken" >&5
2498 echo "${ECHO_T}broken" >&6
2499         { echo "$as_me:2499: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2500 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2501         # humor him...
2502         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2503         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2504         CC="$cf_prog"
2505         for cf_arg in $cf_flags
2506         do
2507                 case "x$cf_arg" in
2508                 (x-[IUDfgOW]*)
2509
2510 cf_fix_cppflags=no
2511 cf_new_cflags=
2512 cf_new_cppflags=
2513 cf_new_extra_cppflags=
2514
2515 for cf_add_cflags in $cf_arg
2516 do
2517 case $cf_fix_cppflags in
2518 (no)
2519         case $cf_add_cflags in
2520         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2521                 case $cf_add_cflags in
2522                 (-D*)
2523                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2524
2525                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2526                                 && test -z "${cf_tst_cflags}" \
2527                                 && cf_fix_cppflags=yes
2528
2529                         if test $cf_fix_cppflags = yes ; then
2530
2531         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2532         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2533
2534                                 continue
2535                         elif test "${cf_tst_cflags}" = "\"'" ; then
2536
2537         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2538         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2539
2540                                 continue
2541                         fi
2542                         ;;
2543                 esac
2544                 case "$CPPFLAGS" in
2545                 (*$cf_add_cflags)
2546                         ;;
2547                 (*)
2548                         case $cf_add_cflags in
2549                         (-D*)
2550                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2551
2552 CPPFLAGS=`echo "$CPPFLAGS" | \
2553         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2554                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2555
2556                                 ;;
2557                         esac
2558
2559         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2560         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2561
2562                         ;;
2563                 esac
2564                 ;;
2565         (*)
2566
2567         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2568         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2569
2570                 ;;
2571         esac
2572         ;;
2573 (yes)
2574
2575         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2576         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2577
2578         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2579
2580         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2581                 && test -z "${cf_tst_cflags}" \
2582                 && cf_fix_cppflags=no
2583         ;;
2584 esac
2585 done
2586
2587 if test -n "$cf_new_cflags" ; then
2588
2589         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2590         CFLAGS="${CFLAGS}$cf_new_cflags"
2591
2592 fi
2593
2594 if test -n "$cf_new_cppflags" ; then
2595
2596         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2597         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2598
2599 fi
2600
2601 if test -n "$cf_new_extra_cppflags" ; then
2602
2603         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2604         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2605
2606 fi
2607
2608                         ;;
2609                 (*)
2610                         CC="$CC $cf_arg"
2611                         ;;
2612                 esac
2613         done
2614         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2615
2616 echo "${as_me:-configure}:2616: testing resulting CC: '$CC' ..." 1>&5
2617
2618         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2619
2620 echo "${as_me:-configure}:2620: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2621
2622         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2623
2624 echo "${as_me:-configure}:2624: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2625
2626         ;;
2627 (*)
2628         echo "$as_me:2628: result: ok" >&5
2629 echo "${ECHO_T}ok" >&6
2630         ;;
2631 esac
2632
2633 ac_ext=c
2634 ac_cpp='$CPP $CPPFLAGS'
2635 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2636 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2637 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2638 ac_main_return=return
2639 echo "$as_me:2639: checking how to run the C preprocessor" >&5
2640 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2641 # On Suns, sometimes $CPP names a directory.
2642 if test -n "$CPP" && test -d "$CPP"; then
2643   CPP=
2644 fi
2645 if test -z "$CPP"; then
2646   if test "${ac_cv_prog_CPP+set}" = set; then
2647   echo $ECHO_N "(cached) $ECHO_C" >&6
2648 else
2649       # Double quotes because CPP needs to be expanded
2650     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2651     do
2652       ac_preproc_ok=false
2653 for ac_c_preproc_warn_flag in '' yes
2654 do
2655   # Use a header file that comes with gcc, so configuring glibc
2656   # with a fresh cross-compiler works.
2657   # On the NeXT, cc -E runs the code through the compiler's parser,
2658   # not just through cpp. "Syntax error" is here to catch this case.
2659   cat >conftest.$ac_ext <<_ACEOF
2660 #line 2660 "configure"
2661 #include "confdefs.h"
2662 #include <assert.h>
2663                      Syntax error
2664 _ACEOF
2665 if { (eval echo "$as_me:2665: \"$ac_cpp conftest.$ac_ext\"") >&5
2666   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2667   ac_status=$?
2668   egrep -v '^ *\+' conftest.er1 >conftest.err
2669   rm -f conftest.er1
2670   cat conftest.err >&5
2671   echo "$as_me:2671: \$? = $ac_status" >&5
2672   (exit $ac_status); } >/dev/null; then
2673   if test -s conftest.err; then
2674     ac_cpp_err=$ac_c_preproc_warn_flag
2675   else
2676     ac_cpp_err=
2677   fi
2678 else
2679   ac_cpp_err=yes
2680 fi
2681 if test -z "$ac_cpp_err"; then
2682   :
2683 else
2684   echo "$as_me: failed program was:" >&5
2685   cat conftest.$ac_ext >&5
2686   # Broken: fails on valid input.
2687 continue
2688 fi
2689 rm -f conftest.err conftest.$ac_ext
2690
2691   # OK, works on sane cases.  Now check whether non-existent headers
2692   # can be detected and how.
2693   cat >conftest.$ac_ext <<_ACEOF
2694 #line 2694 "configure"
2695 #include "confdefs.h"
2696 #include <ac_nonexistent.h>
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   # Broken: success on invalid input.
2716 continue
2717 else
2718   echo "$as_me: failed program was:" >&5
2719   cat conftest.$ac_ext >&5
2720   # Passes both tests.
2721 ac_preproc_ok=:
2722 break
2723 fi
2724 rm -f conftest.err conftest.$ac_ext
2725
2726 done
2727 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2728 rm -f conftest.err conftest.$ac_ext
2729 if $ac_preproc_ok; then
2730   break
2731 fi
2732
2733     done
2734     ac_cv_prog_CPP=$CPP
2735
2736 fi
2737   CPP=$ac_cv_prog_CPP
2738 else
2739   ac_cv_prog_CPP=$CPP
2740 fi
2741 echo "$as_me:2741: result: $CPP" >&5
2742 echo "${ECHO_T}$CPP" >&6
2743 ac_preproc_ok=false
2744 for ac_c_preproc_warn_flag in '' yes
2745 do
2746   # Use a header file that comes with gcc, so configuring glibc
2747   # with a fresh cross-compiler works.
2748   # On the NeXT, cc -E runs the code through the compiler's parser,
2749   # not just through cpp. "Syntax error" is here to catch this case.
2750   cat >conftest.$ac_ext <<_ACEOF
2751 #line 2751 "configure"
2752 #include "confdefs.h"
2753 #include <assert.h>
2754                      Syntax error
2755 _ACEOF
2756 if { (eval echo "$as_me:2756: \"$ac_cpp conftest.$ac_ext\"") >&5
2757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2758   ac_status=$?
2759   egrep -v '^ *\+' conftest.er1 >conftest.err
2760   rm -f conftest.er1
2761   cat conftest.err >&5
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); } >/dev/null; then
2764   if test -s conftest.err; then
2765     ac_cpp_err=$ac_c_preproc_warn_flag
2766   else
2767     ac_cpp_err=
2768   fi
2769 else
2770   ac_cpp_err=yes
2771 fi
2772 if test -z "$ac_cpp_err"; then
2773   :
2774 else
2775   echo "$as_me: failed program was:" >&5
2776   cat conftest.$ac_ext >&5
2777   # Broken: fails on valid input.
2778 continue
2779 fi
2780 rm -f conftest.err conftest.$ac_ext
2781
2782   # OK, works on sane cases.  Now check whether non-existent headers
2783   # can be detected and how.
2784   cat >conftest.$ac_ext <<_ACEOF
2785 #line 2785 "configure"
2786 #include "confdefs.h"
2787 #include <ac_nonexistent.h>
2788 _ACEOF
2789 if { (eval echo "$as_me:2789: \"$ac_cpp conftest.$ac_ext\"") >&5
2790   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2791   ac_status=$?
2792   egrep -v '^ *\+' conftest.er1 >conftest.err
2793   rm -f conftest.er1
2794   cat conftest.err >&5
2795   echo "$as_me:2795: \$? = $ac_status" >&5
2796   (exit $ac_status); } >/dev/null; then
2797   if test -s conftest.err; then
2798     ac_cpp_err=$ac_c_preproc_warn_flag
2799   else
2800     ac_cpp_err=
2801   fi
2802 else
2803   ac_cpp_err=yes
2804 fi
2805 if test -z "$ac_cpp_err"; then
2806   # Broken: success on invalid input.
2807 continue
2808 else
2809   echo "$as_me: failed program was:" >&5
2810   cat conftest.$ac_ext >&5
2811   # Passes both tests.
2812 ac_preproc_ok=:
2813 break
2814 fi
2815 rm -f conftest.err conftest.$ac_ext
2816
2817 done
2818 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2819 rm -f conftest.err conftest.$ac_ext
2820 if $ac_preproc_ok; then
2821   :
2822 else
2823   { { echo "$as_me:2823: error: C preprocessor \"$CPP\" fails sanity check" >&5
2824 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2825    { (exit 1); exit 1; }; }
2826 fi
2827
2828 ac_ext=c
2829 ac_cpp='$CPP $CPPFLAGS'
2830 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2831 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2833 ac_main_return=return
2834
2835 if test $ac_cv_c_compiler_gnu = yes; then
2836     echo "$as_me:2836: checking whether $CC needs -traditional" >&5
2837 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2838 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2839   echo $ECHO_N "(cached) $ECHO_C" >&6
2840 else
2841     ac_pattern="Autoconf.*'x'"
2842   cat >conftest.$ac_ext <<_ACEOF
2843 #line 2843 "configure"
2844 #include "confdefs.h"
2845 #include <sgtty.h>
2846 int Autoconf = TIOCGETP;
2847 _ACEOF
2848 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2849   egrep "$ac_pattern" >/dev/null 2>&1; then
2850   ac_cv_prog_gcc_traditional=yes
2851 else
2852   ac_cv_prog_gcc_traditional=no
2853 fi
2854 rm -rf conftest*
2855
2856   if test $ac_cv_prog_gcc_traditional = no; then
2857     cat >conftest.$ac_ext <<_ACEOF
2858 #line 2858 "configure"
2859 #include "confdefs.h"
2860 #include <termio.h>
2861 int Autoconf = TCGETA;
2862 _ACEOF
2863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2864   egrep "$ac_pattern" >/dev/null 2>&1; then
2865   ac_cv_prog_gcc_traditional=yes
2866 fi
2867 rm -rf conftest*
2868
2869   fi
2870 fi
2871 echo "$as_me:2871: result: $ac_cv_prog_gcc_traditional" >&5
2872 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2873   if test $ac_cv_prog_gcc_traditional = yes; then
2874     CC="$CC -traditional"
2875   fi
2876 fi
2877
2878 echo "$as_me:2878: checking whether $CC understands -c and -o together" >&5
2879 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2880 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2881   echo $ECHO_N "(cached) $ECHO_C" >&6
2882 else
2883
2884 cat > conftest.$ac_ext <<CF_EOF
2885 int main(void)
2886 {
2887         ${cf_cv_main_return:-return}(0);
2888 }
2889 CF_EOF
2890 # We do the test twice because some compilers refuse to overwrite an
2891 # existing .o file with -o, though they will create one.
2892 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2893 if { (eval echo "$as_me:2893: \"$ac_try\"") >&5
2894   (eval $ac_try) 2>&5
2895   ac_status=$?
2896   echo "$as_me:2896: \$? = $ac_status" >&5
2897   (exit $ac_status); } &&
2898   test -f conftest2.$ac_objext && { (eval echo "$as_me:2898: \"$ac_try\"") >&5
2899   (eval $ac_try) 2>&5
2900   ac_status=$?
2901   echo "$as_me:2901: \$? = $ac_status" >&5
2902   (exit $ac_status); };
2903 then
2904   eval cf_cv_prog_CC_c_o=yes
2905 else
2906   eval cf_cv_prog_CC_c_o=no
2907 fi
2908 rm -rf conftest*
2909
2910 fi
2911 if test $cf_cv_prog_CC_c_o = yes; then
2912   echo "$as_me:2912: result: yes" >&5
2913 echo "${ECHO_T}yes" >&6
2914 else
2915   echo "$as_me:2915: result: no" >&5
2916 echo "${ECHO_T}no" >&6
2917 fi
2918
2919 if test "$cross_compiling" = yes ; then
2920         LDCONFIG=:
2921 else
2922         case "$cf_cv_system_name" in
2923         (dragonfly*|mirbsd*|freebsd*)
2924                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2925                 ;;
2926         (*) LDPATH=$PATH:/sbin:/usr/sbin
2927                 # Extract the first word of "ldconfig", so it can be a program name with args.
2928 set dummy ldconfig; ac_word=$2
2929 echo "$as_me:2929: checking for $ac_word" >&5
2930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2931 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2932   echo $ECHO_N "(cached) $ECHO_C" >&6
2933 else
2934   case $LDCONFIG in
2935   [\\/]* | ?:[\\/]*)
2936   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2937   ;;
2938   *)
2939   ac_save_IFS=$IFS; IFS=$ac_path_separator
2940 ac_dummy="$LDPATH"
2941 for ac_dir in $ac_dummy; do
2942   IFS=$ac_save_IFS
2943   test -z "$ac_dir" && ac_dir=.
2944   if $as_executable_p "$ac_dir/$ac_word"; then
2945    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2946    echo "$as_me:2946: found $ac_dir/$ac_word" >&5
2947    break
2948 fi
2949 done
2950
2951   ;;
2952 esac
2953 fi
2954 LDCONFIG=$ac_cv_path_LDCONFIG
2955
2956 if test -n "$LDCONFIG"; then
2957   echo "$as_me:2957: result: $LDCONFIG" >&5
2958 echo "${ECHO_T}$LDCONFIG" >&6
2959 else
2960   echo "$as_me:2960: result: no" >&5
2961 echo "${ECHO_T}no" >&6
2962 fi
2963
2964                 ;;
2965         esac
2966 fi
2967
2968 echo "$as_me:2968: checking if you want to ensure bool is consistent with C++" >&5
2969 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2970
2971 # Check whether --with-cxx or --without-cxx was given.
2972 if test "${with_cxx+set}" = set; then
2973   withval="$with_cxx"
2974   cf_with_cxx=$withval
2975 else
2976   cf_with_cxx=yes
2977 fi;
2978 echo "$as_me:2978: result: $cf_with_cxx" >&5
2979 echo "${ECHO_T}$cf_with_cxx" >&6
2980 if test "X$cf_with_cxx" = Xno ; then
2981         CXX=""
2982         GXX=""
2983 else
2984         # with autoconf 2.13, we can change the error to a warning:
2985                 ac_ext=cc
2986 ac_cpp='$CXXCPP $CPPFLAGS'
2987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2990 ac_main_return=return
2991 if test -n "$ac_tool_prefix"; then
2992   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2993   do
2994     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2995 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2996 echo "$as_me:2996: checking for $ac_word" >&5
2997 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2998 if test "${ac_cv_prog_CXX+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if test -n "$CXX"; then
3002   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3003 else
3004   ac_save_IFS=$IFS; IFS=$ac_path_separator
3005 ac_dummy="$PATH"
3006 for ac_dir in $ac_dummy; do
3007   IFS=$ac_save_IFS
3008   test -z "$ac_dir" && ac_dir=.
3009   $as_executable_p "$ac_dir/$ac_word" || continue
3010 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3011 echo "$as_me:3011: found $ac_dir/$ac_word" >&5
3012 break
3013 done
3014
3015 fi
3016 fi
3017 CXX=$ac_cv_prog_CXX
3018 if test -n "$CXX"; then
3019   echo "$as_me:3019: result: $CXX" >&5
3020 echo "${ECHO_T}$CXX" >&6
3021 else
3022   echo "$as_me:3022: result: no" >&5
3023 echo "${ECHO_T}no" >&6
3024 fi
3025
3026     test -n "$CXX" && break
3027   done
3028 fi
3029 if test -z "$CXX"; then
3030   ac_ct_CXX=$CXX
3031   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3032 do
3033   # Extract the first word of "$ac_prog", so it can be a program name with args.
3034 set dummy $ac_prog; ac_word=$2
3035 echo "$as_me:3035: checking for $ac_word" >&5
3036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3037 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040   if test -n "$ac_ct_CXX"; then
3041   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3042 else
3043   ac_save_IFS=$IFS; IFS=$ac_path_separator
3044 ac_dummy="$PATH"
3045 for ac_dir in $ac_dummy; do
3046   IFS=$ac_save_IFS
3047   test -z "$ac_dir" && ac_dir=.
3048   $as_executable_p "$ac_dir/$ac_word" || continue
3049 ac_cv_prog_ac_ct_CXX="$ac_prog"
3050 echo "$as_me:3050: found $ac_dir/$ac_word" >&5
3051 break
3052 done
3053
3054 fi
3055 fi
3056 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3057 if test -n "$ac_ct_CXX"; then
3058   echo "$as_me:3058: result: $ac_ct_CXX" >&5
3059 echo "${ECHO_T}$ac_ct_CXX" >&6
3060 else
3061   echo "$as_me:3061: result: no" >&5
3062 echo "${ECHO_T}no" >&6
3063 fi
3064
3065   test -n "$ac_ct_CXX" && break
3066 done
3067 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3068
3069   CXX=$ac_ct_CXX
3070 fi
3071
3072 # Provide some information about the compiler.
3073 echo "$as_me:3073:" \
3074      "checking for C++ compiler version" >&5
3075 ac_compiler=`set X $ac_compile; echo $2`
3076 { (eval echo "$as_me:3076: \"$ac_compiler --version </dev/null >&5\"") >&5
3077   (eval $ac_compiler --version </dev/null >&5) 2>&5
3078   ac_status=$?
3079   echo "$as_me:3079: \$? = $ac_status" >&5
3080   (exit $ac_status); }
3081 { (eval echo "$as_me:3081: \"$ac_compiler -v </dev/null >&5\"") >&5
3082   (eval $ac_compiler -v </dev/null >&5) 2>&5
3083   ac_status=$?
3084   echo "$as_me:3084: \$? = $ac_status" >&5
3085   (exit $ac_status); }
3086 { (eval echo "$as_me:3086: \"$ac_compiler -V </dev/null >&5\"") >&5
3087   (eval $ac_compiler -V </dev/null >&5) 2>&5
3088   ac_status=$?
3089   echo "$as_me:3089: \$? = $ac_status" >&5
3090   (exit $ac_status); }
3091
3092 echo "$as_me:3092: checking whether we are using the GNU C++ compiler" >&5
3093 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3094 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3095   echo $ECHO_N "(cached) $ECHO_C" >&6
3096 else
3097   cat >conftest.$ac_ext <<_ACEOF
3098 #line 3098 "configure"
3099 #include "confdefs.h"
3100
3101 int
3102 main (void)
3103 {
3104 #ifndef __GNUC__
3105        choke me
3106 #endif
3107
3108   ;
3109   return 0;
3110 }
3111 _ACEOF
3112 rm -f conftest.$ac_objext
3113 if { (eval echo "$as_me:3113: \"$ac_compile\"") >&5
3114   (eval $ac_compile) 2>&5
3115   ac_status=$?
3116   echo "$as_me:3116: \$? = $ac_status" >&5
3117   (exit $ac_status); } &&
3118          { ac_try='test -s conftest.$ac_objext'
3119   { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit $ac_status); }; }; then
3124   ac_compiler_gnu=yes
3125 else
3126   echo "$as_me: failed program was:" >&5
3127 cat conftest.$ac_ext >&5
3128 ac_compiler_gnu=no
3129 fi
3130 rm -f conftest.$ac_objext conftest.$ac_ext
3131 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3132
3133 fi
3134 echo "$as_me:3134: result: $ac_cv_cxx_compiler_gnu" >&5
3135 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3136 GXX=`test $ac_compiler_gnu = yes && echo yes`
3137 ac_test_CXXFLAGS=${CXXFLAGS+set}
3138 ac_save_CXXFLAGS=$CXXFLAGS
3139 CXXFLAGS="-g"
3140 echo "$as_me:3140: checking whether $CXX accepts -g" >&5
3141 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3142 if test "${ac_cv_prog_cxx_g+set}" = set; then
3143   echo $ECHO_N "(cached) $ECHO_C" >&6
3144 else
3145   cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148
3149 int
3150 main (void)
3151 {
3152
3153   ;
3154   return 0;
3155 }
3156 _ACEOF
3157 rm -f conftest.$ac_objext
3158 if { (eval echo "$as_me:3158: \"$ac_compile\"") >&5
3159   (eval $ac_compile) 2>&5
3160   ac_status=$?
3161   echo "$as_me:3161: \$? = $ac_status" >&5
3162   (exit $ac_status); } &&
3163          { ac_try='test -s conftest.$ac_objext'
3164   { (eval echo "$as_me:3164: \"$ac_try\"") >&5
3165   (eval $ac_try) 2>&5
3166   ac_status=$?
3167   echo "$as_me:3167: \$? = $ac_status" >&5
3168   (exit $ac_status); }; }; then
3169   ac_cv_prog_cxx_g=yes
3170 else
3171   echo "$as_me: failed program was:" >&5
3172 cat conftest.$ac_ext >&5
3173 ac_cv_prog_cxx_g=no
3174 fi
3175 rm -f conftest.$ac_objext conftest.$ac_ext
3176 fi
3177 echo "$as_me:3177: result: $ac_cv_prog_cxx_g" >&5
3178 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3179 if test "$ac_test_CXXFLAGS" = set; then
3180   CXXFLAGS=$ac_save_CXXFLAGS
3181 elif test $ac_cv_prog_cxx_g = yes; then
3182   if test "$GXX" = yes; then
3183     CXXFLAGS="-g -O2"
3184   else
3185     CXXFLAGS="-g"
3186   fi
3187 else
3188   if test "$GXX" = yes; then
3189     CXXFLAGS="-O2"
3190   else
3191     CXXFLAGS=
3192   fi
3193 fi
3194 for ac_declaration in \
3195    ''\
3196    '#include <stdlib.h>' \
3197    'extern "C" void std::exit (int) throw (); using std::exit;' \
3198    'extern "C" void std::exit (int); using std::exit;' \
3199    'extern "C" void exit (int) throw ();' \
3200    'extern "C" void exit (int);' \
3201    'void exit (int);'
3202 do
3203   cat >conftest.$ac_ext <<_ACEOF
3204 #line 3204 "configure"
3205 #include "confdefs.h"
3206 #include <stdlib.h>
3207 $ac_declaration
3208 int
3209 main (void)
3210 {
3211 exit (42);
3212   ;
3213   return 0;
3214 }
3215 _ACEOF
3216 rm -f conftest.$ac_objext
3217 if { (eval echo "$as_me:3217: \"$ac_compile\"") >&5
3218   (eval $ac_compile) 2>&5
3219   ac_status=$?
3220   echo "$as_me:3220: \$? = $ac_status" >&5
3221   (exit $ac_status); } &&
3222          { ac_try='test -s conftest.$ac_objext'
3223   { (eval echo "$as_me:3223: \"$ac_try\"") >&5
3224   (eval $ac_try) 2>&5
3225   ac_status=$?
3226   echo "$as_me:3226: \$? = $ac_status" >&5
3227   (exit $ac_status); }; }; then
3228   :
3229 else
3230   echo "$as_me: failed program was:" >&5
3231 cat conftest.$ac_ext >&5
3232 continue
3233 fi
3234 rm -f conftest.$ac_objext conftest.$ac_ext
3235   cat >conftest.$ac_ext <<_ACEOF
3236 #line 3236 "configure"
3237 #include "confdefs.h"
3238 $ac_declaration
3239 int
3240 main (void)
3241 {
3242 exit (42);
3243   ;
3244   return 0;
3245 }
3246 _ACEOF
3247 rm -f conftest.$ac_objext
3248 if { (eval echo "$as_me:3248: \"$ac_compile\"") >&5
3249   (eval $ac_compile) 2>&5
3250   ac_status=$?
3251   echo "$as_me:3251: \$? = $ac_status" >&5
3252   (exit $ac_status); } &&
3253          { ac_try='test -s conftest.$ac_objext'
3254   { (eval echo "$as_me:3254: \"$ac_try\"") >&5
3255   (eval $ac_try) 2>&5
3256   ac_status=$?
3257   echo "$as_me:3257: \$? = $ac_status" >&5
3258   (exit $ac_status); }; }; then
3259   break
3260 else
3261   echo "$as_me: failed program was:" >&5
3262 cat conftest.$ac_ext >&5
3263 fi
3264 rm -f conftest.$ac_objext conftest.$ac_ext
3265 done
3266 rm -rf conftest*
3267 if test -n "$ac_declaration"; then
3268   echo '#ifdef __cplusplus' >>confdefs.h
3269   echo $ac_declaration      >>confdefs.h
3270   echo '#endif'             >>confdefs.h
3271 fi
3272
3273 ac_ext=c
3274 ac_cpp='$CPP $CPPFLAGS'
3275 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3276 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3277 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3278 ac_main_return=return
3279
3280         ac_ext=cc
3281 ac_cpp='$CXXCPP $CPPFLAGS'
3282 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3283 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3284 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3285 ac_main_return=return
3286
3287         if test "x$cf_with_cxx" != xno
3288         then
3289                 # Several of the C++ configurations do not work, particularly when
3290                 # cross-compiling (20140913 -TD)
3291                 echo "$as_me:3291: checking if $CXX works" >&5
3292 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3293
3294                 save_CPPFLAGS="$CPPFLAGS"
3295                 eval cf_includedir=${includedir}
3296                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3297
3298 cat >conftest.$ac_ext <<_ACEOF
3299 #line 3299 "configure"
3300 #include "confdefs.h"
3301
3302 #include <stdlib.h>
3303 #include <stdio.h>
3304
3305 int
3306 main (void)
3307 {
3308
3309                 printf("Hello world!\n")
3310
3311   ;
3312   return 0;
3313 }
3314 _ACEOF
3315 rm -f conftest.$ac_objext
3316 if { (eval echo "$as_me:3316: \"$ac_compile\"") >&5
3317   (eval $ac_compile) 2>&5
3318   ac_status=$?
3319   echo "$as_me:3319: \$? = $ac_status" >&5
3320   (exit $ac_status); } &&
3321          { ac_try='test -s conftest.$ac_objext'
3322   { (eval echo "$as_me:3322: \"$ac_try\"") >&5
3323   (eval $ac_try) 2>&5
3324   ac_status=$?
3325   echo "$as_me:3325: \$? = $ac_status" >&5
3326   (exit $ac_status); }; }; then
3327   cf_cxx_works=yes
3328 else
3329   echo "$as_me: failed program was:" >&5
3330 cat conftest.$ac_ext >&5
3331 cf_cxx_works=no
3332 fi
3333 rm -f conftest.$ac_objext conftest.$ac_ext
3334                 CPPFLAGS="$save_CPPFLAGS"
3335
3336                 echo "$as_me:3336: result: $cf_cxx_works" >&5
3337 echo "${ECHO_T}$cf_cxx_works" >&6
3338                 if test "x$cf_cxx_works" = xno
3339                 then
3340                         { echo "$as_me:3340: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3341 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3342                         cf_with_cxx=no; CXX=""; GXX="";
3343                 fi
3344         fi
3345         ac_ext=c
3346 ac_cpp='$CPP $CPPFLAGS'
3347 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3348 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3349 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3350 ac_main_return=return
3351
3352         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3353         if test "$CXX" = "g++" ; then
3354                 # Extract the first word of "g++", so it can be a program name with args.
3355 set dummy g++; ac_word=$2
3356 echo "$as_me:3356: checking for $ac_word" >&5
3357 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3358 if test "${ac_cv_path_CXX+set}" = set; then
3359   echo $ECHO_N "(cached) $ECHO_C" >&6
3360 else
3361   case $CXX in
3362   [\\/]* | ?:[\\/]*)
3363   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3364   ;;
3365   *)
3366   ac_save_IFS=$IFS; IFS=$ac_path_separator
3367 ac_dummy="$PATH"
3368 for ac_dir in $ac_dummy; do
3369   IFS=$ac_save_IFS
3370   test -z "$ac_dir" && ac_dir=.
3371   if $as_executable_p "$ac_dir/$ac_word"; then
3372    ac_cv_path_CXX="$ac_dir/$ac_word"
3373    echo "$as_me:3373: found $ac_dir/$ac_word" >&5
3374    break
3375 fi
3376 done
3377
3378   ;;
3379 esac
3380 fi
3381 CXX=$ac_cv_path_CXX
3382
3383 if test -n "$CXX"; then
3384   echo "$as_me:3384: result: $CXX" >&5
3385 echo "${ECHO_T}$CXX" >&6
3386 else
3387   echo "$as_me:3387: result: no" >&5
3388 echo "${ECHO_T}no" >&6
3389 fi
3390
3391         fi
3392         case "x$CXX" in
3393         (x|xg++)
3394                 { echo "$as_me:3394: WARNING: You don't have any C++ compiler, too bad" >&5
3395 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3396                 cf_with_cxx=no; CXX=""; GXX="";
3397                 ;;
3398         esac
3399 fi
3400
3401 GXX_VERSION=none
3402 if test "$GXX" = yes; then
3403         echo "$as_me:3403: checking version of ${CXX:-g++}" >&5
3404 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3405         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3406         if test -z "$GXX_VERSION"
3407         then
3408                 GXX_VERSION=unknown
3409                 GXX=no
3410         fi
3411         echo "$as_me:3411: result: $GXX_VERSION" >&5
3412 echo "${ECHO_T}$GXX_VERSION" >&6
3413 fi
3414
3415 case $GXX_VERSION in
3416 ([1-9][0-9].*)
3417         ;;
3418 (1.*|2.[0-6]*)
3419         { echo "$as_me:3419: WARNING: templates do not work" >&5
3420 echo "$as_me: WARNING: templates do not work" >&2;}
3421         ;;
3422 esac
3423
3424 echo "$as_me:3424: checking if you want to build C++ binding and demo" >&5
3425 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3426
3427 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3428 if test "${with_cxx_binding+set}" = set; then
3429   withval="$with_cxx_binding"
3430   cf_with_cxx_binding=$withval
3431 else
3432   cf_with_cxx_binding=$cf_with_cxx
3433 fi;
3434 echo "$as_me:3434: result: $cf_with_cxx_binding" >&5
3435 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3436
3437 echo "$as_me:3437: checking if you want to build with Ada" >&5
3438 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3439 echo "$as_me:3439: result: $cf_with_ada" >&5
3440 echo "${ECHO_T}$cf_with_ada" >&6
3441
3442 echo "$as_me:3442: checking if you want to install terminal database" >&5
3443 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3444
3445 # Check whether --enable-db-install or --disable-db-install was given.
3446 if test "${enable_db_install+set}" = set; then
3447   enableval="$enable_db_install"
3448   cf_with_db_install=$enableval
3449 else
3450   cf_with_db_install=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_with_db_install" >&5
3453 echo "${ECHO_T}$cf_with_db_install" >&6
3454
3455 echo "$as_me:3455: checking if you want to install manpages" >&5
3456 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3457
3458 # Check whether --with-manpages or --without-manpages was given.
3459 if test "${with_manpages+set}" = set; then
3460   withval="$with_manpages"
3461   cf_with_manpages=$withval
3462 else
3463   cf_with_manpages=yes
3464 fi;
3465 echo "$as_me:3465: result: $cf_with_manpages" >&5
3466 echo "${ECHO_T}$cf_with_manpages" >&6
3467
3468 echo "$as_me:3468: checking if you want to build programs such as tic" >&5
3469 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3470
3471 # Check whether --with-progs or --without-progs was given.
3472 if test "${with_progs+set}" = set; then
3473   withval="$with_progs"
3474   cf_with_progs=$withval
3475 else
3476   cf_with_progs=yes
3477 fi;
3478 echo "$as_me:3478: result: $cf_with_progs" >&5
3479 echo "${ECHO_T}$cf_with_progs" >&6
3480
3481 if test -f $srcdir/tack/tack.h; then
3482         if test "x$cross_compiling" = xyes ; then
3483                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3484
3485 echo "${as_me:-configure}:3485: testing ignoring tack because we are cross-compiling ..." 1>&5
3486
3487                 cf_with_tack=no
3488         else
3489                 echo "$as_me:3489: checking if you want to build the tack program" >&5
3490 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3491
3492 # Check whether --with-tack or --without-tack was given.
3493 if test "${with_tack+set}" = set; then
3494   withval="$with_tack"
3495   cf_with_tack=$withval
3496 else
3497   cf_with_tack=$cf_with_progs
3498 fi;
3499                 echo "$as_me:3499: result: $cf_with_tack" >&5
3500 echo "${ECHO_T}$cf_with_tack" >&6
3501         fi
3502 else
3503         cf_with_tack=no
3504 fi
3505
3506 echo "$as_me:3506: checking if you want to build test-programs" >&5
3507 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3508
3509 # Check whether --with-tests or --without-tests was given.
3510 if test "${with_tests+set}" = set; then
3511   withval="$with_tests"
3512   cf_with_tests=$withval
3513 else
3514   cf_with_tests=yes
3515 fi;
3516 echo "$as_me:3516: result: $cf_with_tests" >&5
3517 echo "${ECHO_T}$cf_with_tests" >&6
3518
3519 echo "$as_me:3519: checking if you wish to install curses.h" >&5
3520 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3521
3522 # Check whether --with-curses-h or --without-curses-h was given.
3523 if test "${with_curses_h+set}" = set; then
3524   withval="$with_curses_h"
3525   with_curses_h=$withval
3526 else
3527   with_curses_h=yes
3528 fi;
3529 echo "$as_me:3529: result: $with_curses_h" >&5
3530 echo "${ECHO_T}$with_curses_h" >&6
3531
3532 modules_to_build="ncurses"
3533 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3534 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3535 modules_to_build="$modules_to_build panel menu form"
3536
3537 test "$program_prefix" != NONE &&
3538   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3539 # Use a double $ so make ignores it.
3540 test "$program_suffix" != NONE &&
3541   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3542 # Double any \ or $.  echo might interpret backslashes.
3543 # By default was `s,x,x', remove it if useless.
3544 cat <<\_ACEOF >conftest.sed
3545 s/[\\$]/&&/g;s/;s,x,x,$//
3546 _ACEOF
3547 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3548 rm conftest.sed
3549
3550 for ac_prog in mawk gawk nawk awk
3551 do
3552   # Extract the first word of "$ac_prog", so it can be a program name with args.
3553 set dummy $ac_prog; ac_word=$2
3554 echo "$as_me:3554: checking for $ac_word" >&5
3555 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3556 if test "${ac_cv_prog_AWK+set}" = set; then
3557   echo $ECHO_N "(cached) $ECHO_C" >&6
3558 else
3559   if test -n "$AWK"; then
3560   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3561 else
3562   ac_save_IFS=$IFS; IFS=$ac_path_separator
3563 ac_dummy="$PATH"
3564 for ac_dir in $ac_dummy; do
3565   IFS=$ac_save_IFS
3566   test -z "$ac_dir" && ac_dir=.
3567   $as_executable_p "$ac_dir/$ac_word" || continue
3568 ac_cv_prog_AWK="$ac_prog"
3569 echo "$as_me:3569: found $ac_dir/$ac_word" >&5
3570 break
3571 done
3572
3573 fi
3574 fi
3575 AWK=$ac_cv_prog_AWK
3576 if test -n "$AWK"; then
3577   echo "$as_me:3577: result: $AWK" >&5
3578 echo "${ECHO_T}$AWK" >&6
3579 else
3580   echo "$as_me:3580: result: no" >&5
3581 echo "${ECHO_T}no" >&6
3582 fi
3583
3584   test -n "$AWK" && break
3585 done
3586
3587 test -z "$AWK" && { { echo "$as_me:3587: error: No awk program found" >&5
3588 echo "$as_me: error: No awk program found" >&2;}
3589    { (exit 1); exit 1; }; }
3590
3591 echo "$as_me:3591: checking for egrep" >&5
3592 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3593 if test "${ac_cv_prog_egrep+set}" = set; then
3594   echo $ECHO_N "(cached) $ECHO_C" >&6
3595 else
3596   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3597                 then ac_cv_prog_egrep='grep -E'
3598                 else ac_cv_prog_egrep='egrep'
3599         fi
3600 fi
3601 echo "$as_me:3601: result: $ac_cv_prog_egrep" >&5
3602 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3603         EGREP=$ac_cv_prog_egrep
3604
3605         test -z "$EGREP" && { { echo "$as_me:3605: error: No egrep program found" >&5
3606 echo "$as_me: error: No egrep program found" >&2;}
3607    { (exit 1); exit 1; }; }
3608
3609 # Find a good install program.  We prefer a C program (faster),
3610 # so one script is as good as another.  But avoid the broken or
3611 # incompatible versions:
3612 # SysV /etc/install, /usr/sbin/install
3613 # SunOS /usr/etc/install
3614 # IRIX /sbin/install
3615 # AIX /bin/install
3616 # AmigaOS /C/install, which installs bootblocks on floppy discs
3617 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3618 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3619 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3620 # ./install, which can be erroneously created by make from ./install.sh.
3621 echo "$as_me:3621: checking for a BSD compatible install" >&5
3622 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3623 if test -z "$INSTALL"; then
3624 if test "${ac_cv_path_install+set}" = set; then
3625   echo $ECHO_N "(cached) $ECHO_C" >&6
3626 else
3627     ac_save_IFS=$IFS; IFS=$ac_path_separator
3628   for ac_dir in $PATH; do
3629     IFS=$ac_save_IFS
3630     # Account for people who put trailing slashes in PATH elements.
3631     case $ac_dir/ in
3632     / | ./ | .// | /cC/* \
3633     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3634     | /usr/ucb/* ) ;;
3635     *)
3636       # OSF1 and SCO ODT 3.0 have their own names for install.
3637       # Don't use installbsd from OSF since it installs stuff as root
3638       # by default.
3639       for ac_prog in ginstall scoinst install; do
3640         if $as_executable_p "$ac_dir/$ac_prog"; then
3641           if test $ac_prog = install &&
3642             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3643             # AIX install.  It has an incompatible calling convention.
3644             :
3645           elif test $ac_prog = install &&
3646             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3647             # program-specific install script used by HP pwplus--don't use.
3648             :
3649           else
3650             ac_cv_path_install="$ac_dir/$ac_prog -c"
3651             break 2
3652           fi
3653         fi
3654       done
3655       ;;
3656     esac
3657   done
3658
3659 fi
3660   if test "${ac_cv_path_install+set}" = set; then
3661     INSTALL=$ac_cv_path_install
3662   else
3663     # As a last resort, use the slow shell script.  We don't cache a
3664     # path for INSTALL within a source directory, because that will
3665     # break other packages using the cache if that directory is
3666     # removed, or if the path is relative.
3667     INSTALL=$ac_install_sh
3668   fi
3669 fi
3670 echo "$as_me:3670: result: $INSTALL" >&5
3671 echo "${ECHO_T}$INSTALL" >&6
3672
3673 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3674 # It thinks the first close brace ends the variable substitution.
3675 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3676
3677 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3678
3679 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3680
3681 case $INSTALL in
3682 (/*)
3683         ;;
3684 (*)
3685         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3686         test -z "$cf_dir" && cf_dir=.
3687         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3688         ;;
3689 esac
3690
3691 for ac_prog in lint cppcheck splint
3692 do
3693   # Extract the first word of "$ac_prog", so it can be a program name with args.
3694 set dummy $ac_prog; ac_word=$2
3695 echo "$as_me:3695: checking for $ac_word" >&5
3696 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3697 if test "${ac_cv_prog_LINT+set}" = set; then
3698   echo $ECHO_N "(cached) $ECHO_C" >&6
3699 else
3700   if test -n "$LINT"; then
3701   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3702 else
3703   ac_save_IFS=$IFS; IFS=$ac_path_separator
3704 ac_dummy="$PATH"
3705 for ac_dir in $ac_dummy; do
3706   IFS=$ac_save_IFS
3707   test -z "$ac_dir" && ac_dir=.
3708   $as_executable_p "$ac_dir/$ac_word" || continue
3709 ac_cv_prog_LINT="$ac_prog"
3710 echo "$as_me:3710: found $ac_dir/$ac_word" >&5
3711 break
3712 done
3713
3714 fi
3715 fi
3716 LINT=$ac_cv_prog_LINT
3717 if test -n "$LINT"; then
3718   echo "$as_me:3718: result: $LINT" >&5
3719 echo "${ECHO_T}$LINT" >&6
3720 else
3721   echo "$as_me:3721: result: no" >&5
3722 echo "${ECHO_T}no" >&6
3723 fi
3724
3725   test -n "$LINT" && break
3726 done
3727
3728 case "x$LINT" in
3729 (xcppcheck|x*/cppcheck)
3730         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3731         ;;
3732 esac
3733
3734 echo "$as_me:3734: checking whether ln -s works" >&5
3735 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3736 LN_S=$as_ln_s
3737 if test "$LN_S" = "ln -s"; then
3738   echo "$as_me:3738: result: yes" >&5
3739 echo "${ECHO_T}yes" >&6
3740 else
3741   echo "$as_me:3741: result: no, using $LN_S" >&5
3742 echo "${ECHO_T}no, using $LN_S" >&6
3743 fi
3744
3745 echo "$as_me:3745: checking if $LN_S -f options work" >&5
3746 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3747
3748 rm -f conf$$.src conf$$dst
3749 echo >conf$$.dst
3750 echo first >conf$$.src
3751 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3752         cf_prog_ln_sf=yes
3753 else
3754         cf_prog_ln_sf=no
3755 fi
3756 rm -f conf$$.dst conf$$src
3757 echo "$as_me:3757: result: $cf_prog_ln_sf" >&5
3758 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3759
3760 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3761
3762 echo "$as_me:3762: checking for long file names" >&5
3763 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3764 if test "${ac_cv_sys_long_file_names+set}" = set; then
3765   echo $ECHO_N "(cached) $ECHO_C" >&6
3766 else
3767   ac_cv_sys_long_file_names=yes
3768 # Test for long file names in all the places we know might matter:
3769 #      .                the current directory, where building will happen
3770 #      $prefix/lib      where we will be installing things
3771 #      $exec_prefix/lib likewise
3772 # eval it to expand exec_prefix.
3773 #      $TMPDIR          if set, where it might want to write temporary files
3774 # if $TMPDIR is not set:
3775 #      /tmp             where it might want to write temporary files
3776 #      /var/tmp         likewise
3777 #      /usr/tmp         likewise
3778 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3779   ac_tmpdirs=$TMPDIR
3780 else
3781   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3782 fi
3783 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3784   test -d $ac_dir || continue
3785   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3786   ac_xdir=$ac_dir/cf$$
3787   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3788   ac_tf1=$ac_xdir/conftest9012345
3789   ac_tf2=$ac_xdir/conftest9012346
3790   (echo 1 >$ac_tf1) 2>/dev/null
3791   (echo 2 >$ac_tf2) 2>/dev/null
3792   ac_val=`cat $ac_tf1 2>/dev/null`
3793   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3794     ac_cv_sys_long_file_names=no
3795     rm -rf $ac_xdir 2>/dev/null
3796     break
3797   fi
3798   rm -rf $ac_xdir 2>/dev/null
3799 done
3800 fi
3801 echo "$as_me:3801: result: $ac_cv_sys_long_file_names" >&5
3802 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3803 if test $ac_cv_sys_long_file_names = yes; then
3804
3805 cat >>confdefs.h <<\EOF
3806 #define HAVE_LONG_FILE_NAMES 1
3807 EOF
3808
3809 fi
3810
3811 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3812 # of package conflict.
3813 cf_config_suffix=
3814
3815 # Check whether --with-config-suffix or --without-config-suffix was given.
3816 if test "${with_config_suffix+set}" = set; then
3817   withval="$with_config_suffix"
3818   case "x$withval" in
3819         (xyes|xno)
3820                 { echo "$as_me:3820: WARNING: expected a value for config-suffix option" >&5
3821 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3822                 ;;
3823         (*)     cf_config_suffix="$withval"
3824                 ;;
3825         esac
3826 fi;
3827
3828 # If we find pkg-config, check if we should install the ".pc" files.
3829
3830 echo "$as_me:3830: checking if you want to use pkg-config" >&5
3831 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3832
3833 # Check whether --with-pkg-config or --without-pkg-config was given.
3834 if test "${with_pkg_config+set}" = set; then
3835   withval="$with_pkg_config"
3836   cf_pkg_config=$withval
3837 else
3838   cf_pkg_config=yes
3839 fi;
3840 echo "$as_me:3840: result: $cf_pkg_config" >&5
3841 echo "${ECHO_T}$cf_pkg_config" >&6
3842
3843 case $cf_pkg_config in
3844 (no)
3845         PKG_CONFIG=none
3846         ;;
3847 (yes)
3848
3849 if test -n "$ac_tool_prefix"; then
3850   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3851 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3852 echo "$as_me:3852: checking for $ac_word" >&5
3853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3854 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   case $PKG_CONFIG in
3858   [\\/]* | ?:[\\/]*)
3859   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3860   ;;
3861   *)
3862   ac_save_IFS=$IFS; IFS=$ac_path_separator
3863 ac_dummy="$PATH"
3864 for ac_dir in $ac_dummy; do
3865   IFS=$ac_save_IFS
3866   test -z "$ac_dir" && ac_dir=.
3867   if $as_executable_p "$ac_dir/$ac_word"; then
3868    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3869    echo "$as_me:3869: found $ac_dir/$ac_word" >&5
3870    break
3871 fi
3872 done
3873
3874   ;;
3875 esac
3876 fi
3877 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3878
3879 if test -n "$PKG_CONFIG"; then
3880   echo "$as_me:3880: result: $PKG_CONFIG" >&5
3881 echo "${ECHO_T}$PKG_CONFIG" >&6
3882 else
3883   echo "$as_me:3883: result: no" >&5
3884 echo "${ECHO_T}no" >&6
3885 fi
3886
3887 fi
3888 if test -z "$ac_cv_path_PKG_CONFIG"; then
3889   ac_pt_PKG_CONFIG=$PKG_CONFIG
3890   # Extract the first word of "pkg-config", so it can be a program name with args.
3891 set dummy pkg-config; ac_word=$2
3892 echo "$as_me:3892: checking for $ac_word" >&5
3893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3894 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3895   echo $ECHO_N "(cached) $ECHO_C" >&6
3896 else
3897   case $ac_pt_PKG_CONFIG in
3898   [\\/]* | ?:[\\/]*)
3899   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3900   ;;
3901   *)
3902   ac_save_IFS=$IFS; IFS=$ac_path_separator
3903 ac_dummy="$PATH"
3904 for ac_dir in $ac_dummy; do
3905   IFS=$ac_save_IFS
3906   test -z "$ac_dir" && ac_dir=.
3907   if $as_executable_p "$ac_dir/$ac_word"; then
3908    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3909    echo "$as_me:3909: found $ac_dir/$ac_word" >&5
3910    break
3911 fi
3912 done
3913
3914   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3915   ;;
3916 esac
3917 fi
3918 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3919
3920 if test -n "$ac_pt_PKG_CONFIG"; then
3921   echo "$as_me:3921: result: $ac_pt_PKG_CONFIG" >&5
3922 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3923 else
3924   echo "$as_me:3924: result: no" >&5
3925 echo "${ECHO_T}no" >&6
3926 fi
3927
3928   PKG_CONFIG=$ac_pt_PKG_CONFIG
3929 else
3930   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3931 fi
3932
3933         ;;
3934 (*)
3935         PKG_CONFIG=$withval
3936         ;;
3937 esac
3938
3939 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3940 if test "$PKG_CONFIG" != none ; then
3941
3942 if test "x$prefix" != xNONE; then
3943         cf_path_syntax="$prefix"
3944 else
3945         cf_path_syntax="$ac_default_prefix"
3946 fi
3947
3948 case ".$PKG_CONFIG" in
3949 (.\$\(*\)*|.\'*\'*)
3950         ;;
3951 (..|./*|.\\*)
3952         ;;
3953 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3954         ;;
3955 (.\${*prefix}*|.\${*dir}*)
3956         eval PKG_CONFIG="$PKG_CONFIG"
3957         case ".$PKG_CONFIG" in
3958         (.NONE/*)
3959                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3960                 ;;
3961         esac
3962         ;;
3963 (.no|.NONE/*)
3964         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3965         ;;
3966 (*)
3967         { { echo "$as_me:3967: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3968 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3969    { (exit 1); exit 1; }; }
3970         ;;
3971 esac
3972
3973 elif test "x$cf_pkg_config" != xno ; then
3974         { echo "$as_me:3974: WARNING: pkg-config is not installed" >&5
3975 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3976 fi
3977
3978 case $PKG_CONFIG in
3979 (no|none|yes)
3980         echo "$as_me:3980: checking for pkg-config library directory" >&5
3981 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3982         ;;
3983 (*)
3984         echo "$as_me:3984: checking for $PKG_CONFIG library directory" >&5
3985 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3986         ;;
3987 esac
3988
3989 PKG_CONFIG_LIBDIR=no
3990
3991 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3992 if test "${with_pkg_config_libdir+set}" = set; then
3993   withval="$with_pkg_config_libdir"
3994   PKG_CONFIG_LIBDIR=$withval
3995 else
3996   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3997 fi;
3998
3999 case x$PKG_CONFIG_LIBDIR in
4000 (x/*)
4001         ;;
4002 (xyes)
4003         # Look for the library directory using the same prefix as the executable
4004         if test "x$PKG_CONFIG" = xnone
4005         then
4006                 cf_path=$prefix
4007         else
4008                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
4009         fi
4010
4011         # If you don't like using the default architecture, you have to specify the
4012         # intended library directory and corresponding compiler/linker options.
4013         #
4014         # This case allows for Debian's 2014-flavor of multiarch, along with the
4015         # most common variations before that point.  Some other variants spell the
4016         # directory differently, e.g., "pkg-config", and put it in unusual places.
4017         # pkg-config has always been poorly standardized, which is ironic...
4018         case x`(arch) 2>/dev/null` in
4019         (*64)
4020                 cf_search_path="\
4021                         $cf_path/lib/*64-linux-gnu \
4022                         $cf_path/share \
4023                         $cf_path/lib64 \
4024                         $cf_path/lib32 \
4025                         $cf_path/lib"
4026                 ;;
4027         (*)
4028                 cf_search_path="\
4029                         $cf_path/lib/*-linux-gnu \
4030                         $cf_path/share \
4031                         $cf_path/lib32 \
4032                         $cf_path/lib \
4033                         $cf_path/libdata"
4034                 ;;
4035         esac
4036
4037         test -n "$verbose" && echo "    list..." 1>&6
4038
4039 echo "${as_me:-configure}:4039: testing list... ..." 1>&5
4040
4041         for cf_config in $cf_search_path
4042         do
4043                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
4044
4045 echo "${as_me:-configure}:4045: testing checking $cf_config/pkgconfig ..." 1>&5
4046
4047                 if test -d $cf_config/pkgconfig
4048                 then
4049                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
4050                         echo "$as_me:4050: checking done" >&5
4051 echo $ECHO_N "checking done... $ECHO_C" >&6
4052                         break
4053                 fi
4054         done
4055         ;;
4056 (*)
4057         ;;
4058 esac
4059
4060 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4061         echo "$as_me:4061: result: $PKG_CONFIG_LIBDIR" >&5
4062 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4063 fi
4064
4065 if test "x$PKG_CONFIG" != xnone
4066 then
4067         echo "$as_me:4067: checking if we should install .pc files for $PKG_CONFIG" >&5
4068 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4069 else
4070         echo "$as_me:4070: checking if we should install .pc files" >&5
4071 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4072 fi
4073
4074 # Check whether --enable-pc-files or --disable-pc-files was given.
4075 if test "${enable_pc_files+set}" = set; then
4076   enableval="$enable_pc_files"
4077   enable_pc_files=$enableval
4078 else
4079   enable_pc_files=no
4080 fi;
4081 echo "$as_me:4081: result: $enable_pc_files" >&5
4082 echo "${ECHO_T}$enable_pc_files" >&6
4083
4084 if test "x$enable_pc_files" != xno
4085 then
4086         MAKE_PC_FILES=
4087         case "x$PKG_CONFIG_LIBDIR" in
4088         (xno|xyes)
4089                 { echo "$as_me:4089: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4090 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4091                 ;;
4092         (*)
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG_LIBDIR" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\${*prefix}*|.\${*dir}*)
4108         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4109         case ".$PKG_CONFIG_LIBDIR" in
4110         (.NONE/*)
4111                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125                 ;;
4126         esac
4127 else
4128         MAKE_PC_FILES="#"
4129 fi
4130
4131 if test -z "$MAKE_PC_FILES"
4132 then
4133         echo "$as_me:4133: checking for suffix to add to pc-files" >&5
4134 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4135
4136 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4137 if test "${with_pc_suffix+set}" = set; then
4138   withval="$with_pc_suffix"
4139   case "x$withval" in
4140         (xyes|xno)
4141                 PC_MODULE_SUFFIX=
4142                 ;;
4143         (*)     PC_MODULE_SUFFIX="$withval"
4144                 ;;
4145         esac
4146 fi;
4147         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4148         echo "$as_me:4148: result: $PC_MODULE_SUFFIX" >&5
4149 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4150         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4151
4152 fi
4153
4154 echo "$as_me:4154: checking if we should assume mixed-case filenames" >&5
4155 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4156
4157 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4158 if test "${enable_mixed_case+set}" = set; then
4159   enableval="$enable_mixed_case"
4160   enable_mixedcase=$enableval
4161 else
4162   enable_mixedcase=auto
4163 fi;
4164 echo "$as_me:4164: result: $enable_mixedcase" >&5
4165 echo "${ECHO_T}$enable_mixedcase" >&6
4166 if test "$enable_mixedcase" = "auto" ; then
4167
4168 echo "$as_me:4168: checking if filesystem supports mixed-case filenames" >&5
4169 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4170 if test "${cf_cv_mixedcase+set}" = set; then
4171   echo $ECHO_N "(cached) $ECHO_C" >&6
4172 else
4173
4174 if test "$cross_compiling" = yes ; then
4175         case $target_alias in
4176         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4177                 cf_cv_mixedcase=no
4178                 ;;
4179         (*)
4180                 cf_cv_mixedcase=yes
4181                 ;;
4182         esac
4183 else
4184         rm -f conftest CONFTEST
4185         echo test >conftest
4186         if test -f CONFTEST ; then
4187                 cf_cv_mixedcase=no
4188         else
4189                 cf_cv_mixedcase=yes
4190         fi
4191         rm -f conftest CONFTEST
4192 fi
4193
4194 fi
4195 echo "$as_me:4195: result: $cf_cv_mixedcase" >&5
4196 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4197 test "$cf_cv_mixedcase" = yes &&
4198 cat >>confdefs.h <<\EOF
4199 #define MIXEDCASE_FILENAMES 1
4200 EOF
4201
4202 else
4203         cf_cv_mixedcase=$enable_mixedcase
4204         if test "x$enable_mixedcase" = "xyes" ; then
4205
4206 cat >>confdefs.h <<\EOF
4207 #define MIXEDCASE_FILENAMES 1
4208 EOF
4209
4210         fi
4211 fi
4212
4213 # do this after mixed-case option (tags/TAGS is not as important as tic).
4214 echo "$as_me:4214: checking whether ${MAKE-make} sets \${MAKE}" >&5
4215 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4216 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4217 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4218   echo $ECHO_N "(cached) $ECHO_C" >&6
4219 else
4220   cat >conftest.make <<\EOF
4221 all:
4222         @echo 'ac_maketemp="${MAKE}"'
4223 EOF
4224 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4225 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4226 if test -n "$ac_maketemp"; then
4227   eval ac_cv_prog_make_${ac_make}_set=yes
4228 else
4229   eval ac_cv_prog_make_${ac_make}_set=no
4230 fi
4231 rm -f conftest.make
4232 fi
4233 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4234   echo "$as_me:4234: result: yes" >&5
4235 echo "${ECHO_T}yes" >&6
4236   SET_MAKE=
4237 else
4238   echo "$as_me:4238: result: no" >&5
4239 echo "${ECHO_T}no" >&6
4240   SET_MAKE="MAKE=${MAKE-make}"
4241 fi
4242
4243 for ac_prog in exctags ctags
4244 do
4245   # Extract the first word of "$ac_prog", so it can be a program name with args.
4246 set dummy $ac_prog; ac_word=$2
4247 echo "$as_me:4247: checking for $ac_word" >&5
4248 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4249 if test "${ac_cv_prog_CTAGS+set}" = set; then
4250   echo $ECHO_N "(cached) $ECHO_C" >&6
4251 else
4252   if test -n "$CTAGS"; then
4253   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4254 else
4255   ac_save_IFS=$IFS; IFS=$ac_path_separator
4256 ac_dummy="$PATH"
4257 for ac_dir in $ac_dummy; do
4258   IFS=$ac_save_IFS
4259   test -z "$ac_dir" && ac_dir=.
4260   $as_executable_p "$ac_dir/$ac_word" || continue
4261 ac_cv_prog_CTAGS="$ac_prog"
4262 echo "$as_me:4262: found $ac_dir/$ac_word" >&5
4263 break
4264 done
4265
4266 fi
4267 fi
4268 CTAGS=$ac_cv_prog_CTAGS
4269 if test -n "$CTAGS"; then
4270   echo "$as_me:4270: result: $CTAGS" >&5
4271 echo "${ECHO_T}$CTAGS" >&6
4272 else
4273   echo "$as_me:4273: result: no" >&5
4274 echo "${ECHO_T}no" >&6
4275 fi
4276
4277   test -n "$CTAGS" && break
4278 done
4279
4280 for ac_prog in exetags etags
4281 do
4282   # Extract the first word of "$ac_prog", so it can be a program name with args.
4283 set dummy $ac_prog; ac_word=$2
4284 echo "$as_me:4284: checking for $ac_word" >&5
4285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4286 if test "${ac_cv_prog_ETAGS+set}" = set; then
4287   echo $ECHO_N "(cached) $ECHO_C" >&6
4288 else
4289   if test -n "$ETAGS"; then
4290   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4291 else
4292   ac_save_IFS=$IFS; IFS=$ac_path_separator
4293 ac_dummy="$PATH"
4294 for ac_dir in $ac_dummy; do
4295   IFS=$ac_save_IFS
4296   test -z "$ac_dir" && ac_dir=.
4297   $as_executable_p "$ac_dir/$ac_word" || continue
4298 ac_cv_prog_ETAGS="$ac_prog"
4299 echo "$as_me:4299: found $ac_dir/$ac_word" >&5
4300 break
4301 done
4302
4303 fi
4304 fi
4305 ETAGS=$ac_cv_prog_ETAGS
4306 if test -n "$ETAGS"; then
4307   echo "$as_me:4307: result: $ETAGS" >&5
4308 echo "${ECHO_T}$ETAGS" >&6
4309 else
4310   echo "$as_me:4310: result: no" >&5
4311 echo "${ECHO_T}no" >&6
4312 fi
4313
4314   test -n "$ETAGS" && break
4315 done
4316
4317 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4318 set dummy ${CTAGS:-ctags}; ac_word=$2
4319 echo "$as_me:4319: checking for $ac_word" >&5
4320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4321 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4322   echo $ECHO_N "(cached) $ECHO_C" >&6
4323 else
4324   if test -n "$MAKE_LOWER_TAGS"; then
4325   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4326 else
4327   ac_save_IFS=$IFS; IFS=$ac_path_separator
4328 ac_dummy="$PATH"
4329 for ac_dir in $ac_dummy; do
4330   IFS=$ac_save_IFS
4331   test -z "$ac_dir" && ac_dir=.
4332   $as_executable_p "$ac_dir/$ac_word" || continue
4333 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4334 echo "$as_me:4334: found $ac_dir/$ac_word" >&5
4335 break
4336 done
4337
4338   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4339 fi
4340 fi
4341 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4342 if test -n "$MAKE_LOWER_TAGS"; then
4343   echo "$as_me:4343: result: $MAKE_LOWER_TAGS" >&5
4344 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4345 else
4346   echo "$as_me:4346: result: no" >&5
4347 echo "${ECHO_T}no" >&6
4348 fi
4349
4350 if test "$cf_cv_mixedcase" = yes ; then
4351         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4352 set dummy ${ETAGS:-etags}; ac_word=$2
4353 echo "$as_me:4353: checking for $ac_word" >&5
4354 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4355 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4356   echo $ECHO_N "(cached) $ECHO_C" >&6
4357 else
4358   if test -n "$MAKE_UPPER_TAGS"; then
4359   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4360 else
4361   ac_save_IFS=$IFS; IFS=$ac_path_separator
4362 ac_dummy="$PATH"
4363 for ac_dir in $ac_dummy; do
4364   IFS=$ac_save_IFS
4365   test -z "$ac_dir" && ac_dir=.
4366   $as_executable_p "$ac_dir/$ac_word" || continue
4367 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4368 echo "$as_me:4368: found $ac_dir/$ac_word" >&5
4369 break
4370 done
4371
4372   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4373 fi
4374 fi
4375 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4376 if test -n "$MAKE_UPPER_TAGS"; then
4377   echo "$as_me:4377: result: $MAKE_UPPER_TAGS" >&5
4378 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384 else
4385         MAKE_UPPER_TAGS=no
4386 fi
4387
4388 if test "$MAKE_UPPER_TAGS" = yes ; then
4389         MAKE_UPPER_TAGS=
4390 else
4391         MAKE_UPPER_TAGS="#"
4392 fi
4393
4394 if test "$MAKE_LOWER_TAGS" = yes ; then
4395         MAKE_LOWER_TAGS=
4396 else
4397         MAKE_LOWER_TAGS="#"
4398 fi
4399
4400 echo "$as_me:4400: checking for makeflags variable" >&5
4401 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4402 if test "${cf_cv_makeflags+set}" = set; then
4403   echo $ECHO_N "(cached) $ECHO_C" >&6
4404 else
4405
4406         cf_cv_makeflags=''
4407         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4408         do
4409                 cat >cf_makeflags.tmp <<CF_EOF
4410 SHELL = $SHELL
4411 all :
4412         @ echo '.$cf_option'
4413 CF_EOF
4414                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4415                 case "$cf_result" in
4416                 (.*k|.*kw)
4417                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4418                         case "$cf_result" in
4419                         (.*CC=*)        cf_cv_makeflags=
4420                                 ;;
4421                         (*)     cf_cv_makeflags=$cf_option
4422                                 ;;
4423                         esac
4424                         break
4425                         ;;
4426                 (.-)
4427                         ;;
4428                 (*)
4429
4430 echo "${as_me:-configure}:4430: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4431
4432                         ;;
4433                 esac
4434         done
4435         rm -f cf_makeflags.tmp
4436
4437 fi
4438 echo "$as_me:4438: result: $cf_cv_makeflags" >&5
4439 echo "${ECHO_T}$cf_cv_makeflags" >&6
4440
4441 if test -n "$ac_tool_prefix"; then
4442   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4443 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4444 echo "$as_me:4444: checking for $ac_word" >&5
4445 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4446 if test "${ac_cv_prog_RANLIB+set}" = set; then
4447   echo $ECHO_N "(cached) $ECHO_C" >&6
4448 else
4449   if test -n "$RANLIB"; then
4450   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4451 else
4452   ac_save_IFS=$IFS; IFS=$ac_path_separator
4453 ac_dummy="$PATH"
4454 for ac_dir in $ac_dummy; do
4455   IFS=$ac_save_IFS
4456   test -z "$ac_dir" && ac_dir=.
4457   $as_executable_p "$ac_dir/$ac_word" || continue
4458 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4459 echo "$as_me:4459: found $ac_dir/$ac_word" >&5
4460 break
4461 done
4462
4463 fi
4464 fi
4465 RANLIB=$ac_cv_prog_RANLIB
4466 if test -n "$RANLIB"; then
4467   echo "$as_me:4467: result: $RANLIB" >&5
4468 echo "${ECHO_T}$RANLIB" >&6
4469 else
4470   echo "$as_me:4470: result: no" >&5
4471 echo "${ECHO_T}no" >&6
4472 fi
4473
4474 fi
4475 if test -z "$ac_cv_prog_RANLIB"; then
4476   ac_ct_RANLIB=$RANLIB
4477   # Extract the first word of "ranlib", so it can be a program name with args.
4478 set dummy ranlib; ac_word=$2
4479 echo "$as_me:4479: checking for $ac_word" >&5
4480 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4481 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4482   echo $ECHO_N "(cached) $ECHO_C" >&6
4483 else
4484   if test -n "$ac_ct_RANLIB"; then
4485   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4486 else
4487   ac_save_IFS=$IFS; IFS=$ac_path_separator
4488 ac_dummy="$PATH"
4489 for ac_dir in $ac_dummy; do
4490   IFS=$ac_save_IFS
4491   test -z "$ac_dir" && ac_dir=.
4492   $as_executable_p "$ac_dir/$ac_word" || continue
4493 ac_cv_prog_ac_ct_RANLIB="ranlib"
4494 echo "$as_me:4494: found $ac_dir/$ac_word" >&5
4495 break
4496 done
4497
4498   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4499 fi
4500 fi
4501 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4502 if test -n "$ac_ct_RANLIB"; then
4503   echo "$as_me:4503: result: $ac_ct_RANLIB" >&5
4504 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4505 else
4506   echo "$as_me:4506: result: no" >&5
4507 echo "${ECHO_T}no" >&6
4508 fi
4509
4510   RANLIB=$ac_ct_RANLIB
4511 else
4512   RANLIB="$ac_cv_prog_RANLIB"
4513 fi
4514
4515 if test -n "$ac_tool_prefix"; then
4516   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4517 set dummy ${ac_tool_prefix}ld; ac_word=$2
4518 echo "$as_me:4518: checking for $ac_word" >&5
4519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4520 if test "${ac_cv_prog_LD+set}" = set; then
4521   echo $ECHO_N "(cached) $ECHO_C" >&6
4522 else
4523   if test -n "$LD"; then
4524   ac_cv_prog_LD="$LD" # Let the user override the test.
4525 else
4526   ac_save_IFS=$IFS; IFS=$ac_path_separator
4527 ac_dummy="$PATH"
4528 for ac_dir in $ac_dummy; do
4529   IFS=$ac_save_IFS
4530   test -z "$ac_dir" && ac_dir=.
4531   $as_executable_p "$ac_dir/$ac_word" || continue
4532 ac_cv_prog_LD="${ac_tool_prefix}ld"
4533 echo "$as_me:4533: found $ac_dir/$ac_word" >&5
4534 break
4535 done
4536
4537 fi
4538 fi
4539 LD=$ac_cv_prog_LD
4540 if test -n "$LD"; then
4541   echo "$as_me:4541: result: $LD" >&5
4542 echo "${ECHO_T}$LD" >&6
4543 else
4544   echo "$as_me:4544: result: no" >&5
4545 echo "${ECHO_T}no" >&6
4546 fi
4547
4548 fi
4549 if test -z "$ac_cv_prog_LD"; then
4550   ac_ct_LD=$LD
4551   # Extract the first word of "ld", so it can be a program name with args.
4552 set dummy ld; ac_word=$2
4553 echo "$as_me:4553: checking for $ac_word" >&5
4554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4555 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4556   echo $ECHO_N "(cached) $ECHO_C" >&6
4557 else
4558   if test -n "$ac_ct_LD"; then
4559   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4560 else
4561   ac_save_IFS=$IFS; IFS=$ac_path_separator
4562 ac_dummy="$PATH"
4563 for ac_dir in $ac_dummy; do
4564   IFS=$ac_save_IFS
4565   test -z "$ac_dir" && ac_dir=.
4566   $as_executable_p "$ac_dir/$ac_word" || continue
4567 ac_cv_prog_ac_ct_LD="ld"
4568 echo "$as_me:4568: found $ac_dir/$ac_word" >&5
4569 break
4570 done
4571
4572   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4573 fi
4574 fi
4575 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4576 if test -n "$ac_ct_LD"; then
4577   echo "$as_me:4577: result: $ac_ct_LD" >&5
4578 echo "${ECHO_T}$ac_ct_LD" >&6
4579 else
4580   echo "$as_me:4580: result: no" >&5
4581 echo "${ECHO_T}no" >&6
4582 fi
4583
4584   LD=$ac_ct_LD
4585 else
4586   LD="$ac_cv_prog_LD"
4587 fi
4588
4589 if test -n "$ac_tool_prefix"; then
4590   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}ar; ac_word=$2
4592 echo "$as_me:4592: checking for $ac_word" >&5
4593 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4594 if test "${ac_cv_prog_AR+set}" = set; then
4595   echo $ECHO_N "(cached) $ECHO_C" >&6
4596 else
4597   if test -n "$AR"; then
4598   ac_cv_prog_AR="$AR" # Let the user override the test.
4599 else
4600   ac_save_IFS=$IFS; IFS=$ac_path_separator
4601 ac_dummy="$PATH"
4602 for ac_dir in $ac_dummy; do
4603   IFS=$ac_save_IFS
4604   test -z "$ac_dir" && ac_dir=.
4605   $as_executable_p "$ac_dir/$ac_word" || continue
4606 ac_cv_prog_AR="${ac_tool_prefix}ar"
4607 echo "$as_me:4607: found $ac_dir/$ac_word" >&5
4608 break
4609 done
4610
4611 fi
4612 fi
4613 AR=$ac_cv_prog_AR
4614 if test -n "$AR"; then
4615   echo "$as_me:4615: result: $AR" >&5
4616 echo "${ECHO_T}$AR" >&6
4617 else
4618   echo "$as_me:4618: result: no" >&5
4619 echo "${ECHO_T}no" >&6
4620 fi
4621
4622 fi
4623 if test -z "$ac_cv_prog_AR"; then
4624   ac_ct_AR=$AR
4625   # Extract the first word of "ar", so it can be a program name with args.
4626 set dummy ar; ac_word=$2
4627 echo "$as_me:4627: checking for $ac_word" >&5
4628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4629 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4630   echo $ECHO_N "(cached) $ECHO_C" >&6
4631 else
4632   if test -n "$ac_ct_AR"; then
4633   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4634 else
4635   ac_save_IFS=$IFS; IFS=$ac_path_separator
4636 ac_dummy="$PATH"
4637 for ac_dir in $ac_dummy; do
4638   IFS=$ac_save_IFS
4639   test -z "$ac_dir" && ac_dir=.
4640   $as_executable_p "$ac_dir/$ac_word" || continue
4641 ac_cv_prog_ac_ct_AR="ar"
4642 echo "$as_me:4642: found $ac_dir/$ac_word" >&5
4643 break
4644 done
4645
4646   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4647 fi
4648 fi
4649 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4650 if test -n "$ac_ct_AR"; then
4651   echo "$as_me:4651: result: $ac_ct_AR" >&5
4652 echo "${ECHO_T}$ac_ct_AR" >&6
4653 else
4654   echo "$as_me:4654: result: no" >&5
4655 echo "${ECHO_T}no" >&6
4656 fi
4657
4658   AR=$ac_ct_AR
4659 else
4660   AR="$ac_cv_prog_AR"
4661 fi
4662
4663 if test -n "$ac_tool_prefix"; then
4664   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4665 set dummy ${ac_tool_prefix}nm; ac_word=$2
4666 echo "$as_me:4666: checking for $ac_word" >&5
4667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4668 if test "${ac_cv_prog_NM+set}" = set; then
4669   echo $ECHO_N "(cached) $ECHO_C" >&6
4670 else
4671   if test -n "$NM"; then
4672   ac_cv_prog_NM="$NM" # Let the user override the test.
4673 else
4674   ac_save_IFS=$IFS; IFS=$ac_path_separator
4675 ac_dummy="$PATH"
4676 for ac_dir in $ac_dummy; do
4677   IFS=$ac_save_IFS
4678   test -z "$ac_dir" && ac_dir=.
4679   $as_executable_p "$ac_dir/$ac_word" || continue
4680 ac_cv_prog_NM="${ac_tool_prefix}nm"
4681 echo "$as_me:4681: found $ac_dir/$ac_word" >&5
4682 break
4683 done
4684
4685 fi
4686 fi
4687 NM=$ac_cv_prog_NM
4688 if test -n "$NM"; then
4689   echo "$as_me:4689: result: $NM" >&5
4690 echo "${ECHO_T}$NM" >&6
4691 else
4692   echo "$as_me:4692: result: no" >&5
4693 echo "${ECHO_T}no" >&6
4694 fi
4695
4696 fi
4697 if test -z "$ac_cv_prog_NM"; then
4698   ac_ct_NM=$NM
4699   # Extract the first word of "nm", so it can be a program name with args.
4700 set dummy nm; ac_word=$2
4701 echo "$as_me:4701: checking for $ac_word" >&5
4702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4703 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4704   echo $ECHO_N "(cached) $ECHO_C" >&6
4705 else
4706   if test -n "$ac_ct_NM"; then
4707   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4708 else
4709   ac_save_IFS=$IFS; IFS=$ac_path_separator
4710 ac_dummy="$PATH"
4711 for ac_dir in $ac_dummy; do
4712   IFS=$ac_save_IFS
4713   test -z "$ac_dir" && ac_dir=.
4714   $as_executable_p "$ac_dir/$ac_word" || continue
4715 ac_cv_prog_ac_ct_NM="nm"
4716 echo "$as_me:4716: found $ac_dir/$ac_word" >&5
4717 break
4718 done
4719
4720   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4721 fi
4722 fi
4723 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4724 if test -n "$ac_ct_NM"; then
4725   echo "$as_me:4725: result: $ac_ct_NM" >&5
4726 echo "${ECHO_T}$ac_ct_NM" >&6
4727 else
4728   echo "$as_me:4728: result: no" >&5
4729 echo "${ECHO_T}no" >&6
4730 fi
4731
4732   NM=$ac_ct_NM
4733 else
4734   NM="$ac_cv_prog_NM"
4735 fi
4736
4737 if test -n "$ac_tool_prefix"; then
4738   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4739 set dummy ${ac_tool_prefix}ar; ac_word=$2
4740 echo "$as_me:4740: checking for $ac_word" >&5
4741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4742 if test "${ac_cv_prog_AR+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745   if test -n "$AR"; then
4746   ac_cv_prog_AR="$AR" # Let the user override the test.
4747 else
4748   ac_save_IFS=$IFS; IFS=$ac_path_separator
4749 ac_dummy="$PATH"
4750 for ac_dir in $ac_dummy; do
4751   IFS=$ac_save_IFS
4752   test -z "$ac_dir" && ac_dir=.
4753   $as_executable_p "$ac_dir/$ac_word" || continue
4754 ac_cv_prog_AR="${ac_tool_prefix}ar"
4755 echo "$as_me:4755: found $ac_dir/$ac_word" >&5
4756 break
4757 done
4758
4759 fi
4760 fi
4761 AR=$ac_cv_prog_AR
4762 if test -n "$AR"; then
4763   echo "$as_me:4763: result: $AR" >&5
4764 echo "${ECHO_T}$AR" >&6
4765 else
4766   echo "$as_me:4766: result: no" >&5
4767 echo "${ECHO_T}no" >&6
4768 fi
4769
4770 fi
4771 if test -z "$ac_cv_prog_AR"; then
4772   ac_ct_AR=$AR
4773   # Extract the first word of "ar", so it can be a program name with args.
4774 set dummy ar; ac_word=$2
4775 echo "$as_me:4775: checking for $ac_word" >&5
4776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4777 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4778   echo $ECHO_N "(cached) $ECHO_C" >&6
4779 else
4780   if test -n "$ac_ct_AR"; then
4781   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4782 else
4783   ac_save_IFS=$IFS; IFS=$ac_path_separator
4784 ac_dummy="$PATH"
4785 for ac_dir in $ac_dummy; do
4786   IFS=$ac_save_IFS
4787   test -z "$ac_dir" && ac_dir=.
4788   $as_executable_p "$ac_dir/$ac_word" || continue
4789 ac_cv_prog_ac_ct_AR="ar"
4790 echo "$as_me:4790: found $ac_dir/$ac_word" >&5
4791 break
4792 done
4793
4794   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4795 fi
4796 fi
4797 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4798 if test -n "$ac_ct_AR"; then
4799   echo "$as_me:4799: result: $ac_ct_AR" >&5
4800 echo "${ECHO_T}$ac_ct_AR" >&6
4801 else
4802   echo "$as_me:4802: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   AR=$ac_ct_AR
4807 else
4808   AR="$ac_cv_prog_AR"
4809 fi
4810
4811 echo "$as_me:4811: checking for options to update archives" >&5
4812 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4813 if test "${cf_cv_ar_flags+set}" = set; then
4814   echo $ECHO_N "(cached) $ECHO_C" >&6
4815 else
4816
4817         case $cf_cv_system_name in
4818         (*-msvc*)
4819                 cf_cv_ar_flags=''
4820                 cat >mk_static_lib.sh <<-EOF
4821                 #!$SHELL
4822                 MSVC_BIN="$AR"
4823                 out="\$1"
4824                 shift
4825                 exec \$MSVC_BIN -out:"\$out" \$@
4826                 EOF
4827                 chmod +x mk_static_lib.sh
4828                 AR=`pwd`/mk_static_lib.sh
4829                 ;;
4830         (*)
4831                 cf_cv_ar_flags=unknown
4832                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4833                 do
4834
4835                         # check if $ARFLAGS already contains this choice
4836                         if test "x$ARFLAGS" != "x" ; then
4837                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4838                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4839                                         cf_cv_ar_flags=
4840                                         break
4841                                 fi
4842                         fi
4843
4844                         rm -f conftest.$ac_cv_objext
4845                         rm -f conftest.a
4846
4847                         cat >conftest.$ac_ext <<EOF
4848 #line 4848 "configure"
4849 int     testdata[3] = { 123, 456, 789 };
4850 EOF
4851                         if { (eval echo "$as_me:4851: \"$ac_compile\"") >&5
4852   (eval $ac_compile) 2>&5
4853   ac_status=$?
4854   echo "$as_me:4854: \$? = $ac_status" >&5
4855   (exit $ac_status); } ; then
4856                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4857                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4858                                 if test -f conftest.a ; then
4859                                         cf_cv_ar_flags=$cf_ar_flags
4860                                         break
4861                                 fi
4862                         else
4863                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4864
4865 echo "${as_me:-configure}:4865: testing cannot compile test-program ..." 1>&5
4866
4867                                 break
4868                         fi
4869                 done
4870                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4871                 ;;
4872         esac
4873
4874 fi
4875 echo "$as_me:4875: result: $cf_cv_ar_flags" >&5
4876 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4877
4878 if test -n "$ARFLAGS" ; then
4879         if test -n "$cf_cv_ar_flags" ; then
4880                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4881         fi
4882 else
4883         ARFLAGS=$cf_cv_ar_flags
4884 fi
4885
4886 echo "$as_me:4886: checking if you have specified an install-prefix" >&5
4887 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4888
4889 # Check whether --with-install-prefix or --without-install-prefix was given.
4890 if test "${with_install_prefix+set}" = set; then
4891   withval="$with_install_prefix"
4892   case "x$withval" in
4893         (xyes|xno)
4894                 ;;
4895         (*)     DESTDIR="$withval"
4896                 ;;
4897         esac
4898 fi;
4899 echo "$as_me:4899: result: $DESTDIR" >&5
4900 echo "${ECHO_T}$DESTDIR" >&6
4901
4902 ###############################################################################
4903
4904 # If we're cross-compiling, allow the user to override the tools and their
4905 # options.  The configure script is oriented toward identifying the host
4906 # compiler, etc., but we need a build compiler to generate parts of the source.
4907
4908 case $cf_cv_system_name in
4909 (*-msvc*)
4910         LDFLAGS="$LDFLAGS user32.lib"
4911         export LDFLAGS
4912         ;;
4913 esac
4914
4915 if test "$cross_compiling" = yes ; then
4916
4917         # defaults that we might want to override
4918         : ${BUILD_CFLAGS:=''}
4919         : ${BUILD_CPPFLAGS:=''}
4920         : ${BUILD_LDFLAGS:=''}
4921         : ${BUILD_LIBS:=''}
4922         : ${BUILD_EXEEXT:='$x'}
4923         : ${BUILD_OBJEXT:='o'}
4924
4925 # Check whether --with-build-cc or --without-build-cc was given.
4926 if test "${with_build_cc+set}" = set; then
4927   withval="$with_build_cc"
4928   BUILD_CC="$withval"
4929 else
4930   for ac_prog in gcc clang c99 c89 cc cl
4931 do
4932   # Extract the first word of "$ac_prog", so it can be a program name with args.
4933 set dummy $ac_prog; ac_word=$2
4934 echo "$as_me:4934: checking for $ac_word" >&5
4935 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4936 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4937   echo $ECHO_N "(cached) $ECHO_C" >&6
4938 else
4939   if test -n "$BUILD_CC"; then
4940   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4941 else
4942   ac_save_IFS=$IFS; IFS=$ac_path_separator
4943 ac_dummy="$PATH"
4944 for ac_dir in $ac_dummy; do
4945   IFS=$ac_save_IFS
4946   test -z "$ac_dir" && ac_dir=.
4947   $as_executable_p "$ac_dir/$ac_word" || continue
4948 ac_cv_prog_BUILD_CC="$ac_prog"
4949 echo "$as_me:4949: found $ac_dir/$ac_word" >&5
4950 break
4951 done
4952
4953 fi
4954 fi
4955 BUILD_CC=$ac_cv_prog_BUILD_CC
4956 if test -n "$BUILD_CC"; then
4957   echo "$as_me:4957: result: $BUILD_CC" >&5
4958 echo "${ECHO_T}$BUILD_CC" >&6
4959 else
4960   echo "$as_me:4960: result: no" >&5
4961 echo "${ECHO_T}no" >&6
4962 fi
4963
4964   test -n "$BUILD_CC" && break
4965 done
4966 test -n "$BUILD_CC" || BUILD_CC="none"
4967
4968 fi;
4969         echo "$as_me:4969: checking for native build C compiler" >&5
4970 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4971         echo "$as_me:4971: result: $BUILD_CC" >&5
4972 echo "${ECHO_T}$BUILD_CC" >&6
4973
4974         echo "$as_me:4974: checking for native build C preprocessor" >&5
4975 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4976
4977 # Check whether --with-build-cpp or --without-build-cpp was given.
4978 if test "${with_build_cpp+set}" = set; then
4979   withval="$with_build_cpp"
4980   BUILD_CPP="$withval"
4981 else
4982   BUILD_CPP='${BUILD_CC} -E'
4983 fi;
4984         echo "$as_me:4984: result: $BUILD_CPP" >&5
4985 echo "${ECHO_T}$BUILD_CPP" >&6
4986
4987         echo "$as_me:4987: checking for native build C flags" >&5
4988 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4989
4990 # Check whether --with-build-cflags or --without-build-cflags was given.
4991 if test "${with_build_cflags+set}" = set; then
4992   withval="$with_build_cflags"
4993   BUILD_CFLAGS="$withval"
4994 fi;
4995         echo "$as_me:4995: result: $BUILD_CFLAGS" >&5
4996 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4997
4998         echo "$as_me:4998: checking for native build C preprocessor-flags" >&5
4999 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5000
5001 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5002 if test "${with_build_cppflags+set}" = set; then
5003   withval="$with_build_cppflags"
5004   BUILD_CPPFLAGS="$withval"
5005 fi;
5006         echo "$as_me:5006: result: $BUILD_CPPFLAGS" >&5
5007 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5008
5009         echo "$as_me:5009: checking for native build linker-flags" >&5
5010 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5011
5012 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5013 if test "${with_build_ldflags+set}" = set; then
5014   withval="$with_build_ldflags"
5015   BUILD_LDFLAGS="$withval"
5016 fi;
5017         echo "$as_me:5017: result: $BUILD_LDFLAGS" >&5
5018 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5019
5020         echo "$as_me:5020: checking for native build linker-libraries" >&5
5021 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5022
5023 # Check whether --with-build-libs or --without-build-libs was given.
5024 if test "${with_build_libs+set}" = set; then
5025   withval="$with_build_libs"
5026   BUILD_LIBS="$withval"
5027 fi;
5028         echo "$as_me:5028: result: $BUILD_LIBS" >&5
5029 echo "${ECHO_T}$BUILD_LIBS" >&6
5030
5031         # this assumes we're on Unix.
5032         BUILD_EXEEXT=
5033         BUILD_OBJEXT=o
5034
5035         : ${BUILD_CC:='${CC}'}
5036
5037         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
5038                 { { echo "$as_me:5038: error: Cross-build requires two compilers.
5039 Use --with-build-cc to specify the native compiler." >&5
5040 echo "$as_me: error: Cross-build requires two compilers.
5041 Use --with-build-cc to specify the native compiler." >&2;}
5042    { (exit 1); exit 1; }; }
5043         fi
5044
5045 else
5046         : ${BUILD_CC:='${CC}'}
5047         : ${BUILD_CPP:='${CPP}'}
5048         : ${BUILD_CFLAGS:='${CFLAGS}'}
5049         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5050         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5051         : ${BUILD_LIBS:='${LIBS}'}
5052         : ${BUILD_EXEEXT:='$x'}
5053         : ${BUILD_OBJEXT:='o'}
5054 fi
5055
5056 ###############################################################################
5057
5058 ### Options to allow the user to specify the set of libraries which are used.
5059 ### Use "--without-normal --with-shared" to allow the default model to be
5060 ### shared, for example.
5061 cf_list_models=""
5062
5063 echo "$as_me:5063: checking if libtool -version-number should be used" >&5
5064 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5065
5066 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5067 if test "${enable_libtool_version+set}" = set; then
5068   enableval="$enable_libtool_version"
5069   test "$enableval" != no && enableval=yes
5070         if test "$enableval" != "yes" ; then
5071     cf_libtool_version=no
5072         else
5073                 cf_libtool_version=yes
5074         fi
5075 else
5076   enableval=yes
5077         cf_libtool_version=yes
5078
5079 fi;
5080 echo "$as_me:5080: result: $cf_libtool_version" >&5
5081 echo "${ECHO_T}$cf_libtool_version" >&6
5082
5083 if test "$cf_libtool_version" = yes ; then
5084         LIBTOOL_VERSION="-version-number"
5085 else
5086         LIBTOOL_VERSION="-version-info"
5087         case "x$VERSION" in
5088         (x)
5089                 { echo "$as_me:5089: WARNING: VERSION was not set" >&5
5090 echo "$as_me: WARNING: VERSION was not set" >&2;}
5091                 ;;
5092         (x*.*.*)
5093                 ABI_VERSION="$VERSION"
5094                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5095
5096 echo "${as_me:-configure}:5096: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5097
5098                 ;;
5099         (x*:*:*)
5100                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5101                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5102
5103 echo "${as_me:-configure}:5103: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5104
5105                 ;;
5106         (*)
5107                 { echo "$as_me:5107: WARNING: unexpected VERSION value: $VERSION" >&5
5108 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5109                 ;;
5110         esac
5111 fi
5112
5113 LIBTOOL=
5114
5115 # common library maintenance symbols that are convenient for libtool scripts:
5116 LIB_CREATE='${AR} -cr'
5117 LIB_OBJECT='${OBJECTS}'
5118 LIB_SUFFIX=.a
5119 LIB_PREP="$RANLIB"
5120
5121 # symbols used to prop libtool up to enable it to determine what it should be
5122 # doing:
5123 LIB_CLEAN=
5124 LIB_COMPILE=
5125 LIB_LINK='${CC}'
5126 LIB_INSTALL=
5127 LIB_UNINSTALL=
5128
5129 echo "$as_me:5129: checking if you want to build libraries with libtool" >&5
5130 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5131
5132 # Check whether --with-libtool or --without-libtool was given.
5133 if test "${with_libtool+set}" = set; then
5134   withval="$with_libtool"
5135   with_libtool=$withval
5136 else
5137   with_libtool=no
5138 fi;
5139 echo "$as_me:5139: result: $with_libtool" >&5
5140 echo "${ECHO_T}$with_libtool" >&6
5141 if test "$with_libtool" != "no"; then
5142
5143         if test "$with_libtool" != "yes" ; then
5144
5145 if test "x$prefix" != xNONE; then
5146         cf_path_syntax="$prefix"
5147 else
5148         cf_path_syntax="$ac_default_prefix"
5149 fi
5150
5151 case ".$with_libtool" in
5152 (.\$\(*\)*|.\'*\'*)
5153         ;;
5154 (..|./*|.\\*)
5155         ;;
5156 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5157         ;;
5158 (.\${*prefix}*|.\${*dir}*)
5159         eval with_libtool="$with_libtool"
5160         case ".$with_libtool" in
5161         (.NONE/*)
5162                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5163                 ;;
5164         esac
5165         ;;
5166 (.no|.NONE/*)
5167         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5168         ;;
5169 (*)
5170         { { echo "$as_me:5170: error: expected a pathname, not \"$with_libtool\"" >&5
5171 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5172    { (exit 1); exit 1; }; }
5173         ;;
5174 esac
5175
5176                 LIBTOOL=$with_libtool
5177         else
5178                 if test -n "$ac_tool_prefix"; then
5179   for ac_prog in libtool glibtool
5180   do
5181     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5182 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5183 echo "$as_me:5183: checking for $ac_word" >&5
5184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5185 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5186   echo $ECHO_N "(cached) $ECHO_C" >&6
5187 else
5188   if test -n "$LIBTOOL"; then
5189   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5190 else
5191   ac_save_IFS=$IFS; IFS=$ac_path_separator
5192 ac_dummy="$PATH"
5193 for ac_dir in $ac_dummy; do
5194   IFS=$ac_save_IFS
5195   test -z "$ac_dir" && ac_dir=.
5196   $as_executable_p "$ac_dir/$ac_word" || continue
5197 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5198 echo "$as_me:5198: found $ac_dir/$ac_word" >&5
5199 break
5200 done
5201
5202 fi
5203 fi
5204 LIBTOOL=$ac_cv_prog_LIBTOOL
5205 if test -n "$LIBTOOL"; then
5206   echo "$as_me:5206: result: $LIBTOOL" >&5
5207 echo "${ECHO_T}$LIBTOOL" >&6
5208 else
5209   echo "$as_me:5209: result: no" >&5
5210 echo "${ECHO_T}no" >&6
5211 fi
5212
5213     test -n "$LIBTOOL" && break
5214   done
5215 fi
5216 if test -z "$LIBTOOL"; then
5217   ac_ct_LIBTOOL=$LIBTOOL
5218   for ac_prog in libtool glibtool
5219 do
5220   # Extract the first word of "$ac_prog", so it can be a program name with args.
5221 set dummy $ac_prog; ac_word=$2
5222 echo "$as_me:5222: checking for $ac_word" >&5
5223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5224 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5225   echo $ECHO_N "(cached) $ECHO_C" >&6
5226 else
5227   if test -n "$ac_ct_LIBTOOL"; then
5228   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5229 else
5230   ac_save_IFS=$IFS; IFS=$ac_path_separator
5231 ac_dummy="$PATH"
5232 for ac_dir in $ac_dummy; do
5233   IFS=$ac_save_IFS
5234   test -z "$ac_dir" && ac_dir=.
5235   $as_executable_p "$ac_dir/$ac_word" || continue
5236 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5237 echo "$as_me:5237: found $ac_dir/$ac_word" >&5
5238 break
5239 done
5240
5241 fi
5242 fi
5243 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5244 if test -n "$ac_ct_LIBTOOL"; then
5245   echo "$as_me:5245: result: $ac_ct_LIBTOOL" >&5
5246 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5247 else
5248   echo "$as_me:5248: result: no" >&5
5249 echo "${ECHO_T}no" >&6
5250 fi
5251
5252   test -n "$ac_ct_LIBTOOL" && break
5253 done
5254 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5255
5256   LIBTOOL=$ac_ct_LIBTOOL
5257 fi
5258
5259 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5260 then
5261         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.].*//'`
5262 else
5263         cf_cv_libtool_version=
5264 fi
5265 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5266
5267                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5268                 then
5269
5270 unset ac_cv_prog_ac_ct_LIBTOOL
5271 unset ac_ct_LIBTOOL
5272 unset LIBTOOL
5273
5274                         if test -n "$ac_tool_prefix"; then
5275   for ac_prog in glibtool
5276   do
5277     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5278 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5279 echo "$as_me:5279: checking for $ac_word" >&5
5280 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5281 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5282   echo $ECHO_N "(cached) $ECHO_C" >&6
5283 else
5284   if test -n "$LIBTOOL"; then
5285   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5286 else
5287   ac_save_IFS=$IFS; IFS=$ac_path_separator
5288 ac_dummy="$PATH"
5289 for ac_dir in $ac_dummy; do
5290   IFS=$ac_save_IFS
5291   test -z "$ac_dir" && ac_dir=.
5292   $as_executable_p "$ac_dir/$ac_word" || continue
5293 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5294 echo "$as_me:5294: found $ac_dir/$ac_word" >&5
5295 break
5296 done
5297
5298 fi
5299 fi
5300 LIBTOOL=$ac_cv_prog_LIBTOOL
5301 if test -n "$LIBTOOL"; then
5302   echo "$as_me:5302: result: $LIBTOOL" >&5
5303 echo "${ECHO_T}$LIBTOOL" >&6
5304 else
5305   echo "$as_me:5305: result: no" >&5
5306 echo "${ECHO_T}no" >&6
5307 fi
5308
5309     test -n "$LIBTOOL" && break
5310   done
5311 fi
5312 if test -z "$LIBTOOL"; then
5313   ac_ct_LIBTOOL=$LIBTOOL
5314   for ac_prog in glibtool
5315 do
5316   # Extract the first word of "$ac_prog", so it can be a program name with args.
5317 set dummy $ac_prog; ac_word=$2
5318 echo "$as_me:5318: checking for $ac_word" >&5
5319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5320 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5321   echo $ECHO_N "(cached) $ECHO_C" >&6
5322 else
5323   if test -n "$ac_ct_LIBTOOL"; then
5324   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5325 else
5326   ac_save_IFS=$IFS; IFS=$ac_path_separator
5327 ac_dummy="$PATH"
5328 for ac_dir in $ac_dummy; do
5329   IFS=$ac_save_IFS
5330   test -z "$ac_dir" && ac_dir=.
5331   $as_executable_p "$ac_dir/$ac_word" || continue
5332 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5333 echo "$as_me:5333: found $ac_dir/$ac_word" >&5
5334 break
5335 done
5336
5337 fi
5338 fi
5339 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5340 if test -n "$ac_ct_LIBTOOL"; then
5341   echo "$as_me:5341: result: $ac_ct_LIBTOOL" >&5
5342 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5343 else
5344   echo "$as_me:5344: result: no" >&5
5345 echo "${ECHO_T}no" >&6
5346 fi
5347
5348   test -n "$ac_ct_LIBTOOL" && break
5349 done
5350 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5351
5352   LIBTOOL=$ac_ct_LIBTOOL
5353 fi
5354
5355 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5356 then
5357         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.].*//'`
5358 else
5359         cf_cv_libtool_version=
5360 fi
5361 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5362
5363                 fi
5364         fi
5365         if test -z "$LIBTOOL" ; then
5366                 { { echo "$as_me:5366: error: Cannot find libtool" >&5
5367 echo "$as_me: error: Cannot find libtool" >&2;}
5368    { (exit 1); exit 1; }; }
5369         fi
5370         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5371         LIB_OBJECT='${OBJECTS:.o=.lo}'
5372         LIB_SUFFIX=.la
5373         LIB_CLEAN='${LIBTOOL} --mode=clean'
5374         LIB_COMPILE='${LIBTOOL} --mode=compile'
5375         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5376         LIB_INSTALL='${LIBTOOL} --mode=install'
5377         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5378         LIB_PREP=:
5379
5380 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5381 then
5382         echo "$as_me:5382: checking version of $LIBTOOL" >&5
5383 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5384
5385 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5386 then
5387         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.].*//'`
5388 else
5389         cf_cv_libtool_version=
5390 fi
5391 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5392
5393         echo "$as_me:5393: result: $cf_cv_libtool_version" >&5
5394 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5395         if test -z "$cf_cv_libtool_version" ; then
5396                 { { echo "$as_me:5396: error: This is not GNU libtool" >&5
5397 echo "$as_me: error: This is not GNU libtool" >&2;}
5398    { (exit 1); exit 1; }; }
5399         fi
5400 else
5401         { { echo "$as_me:5401: error: GNU libtool has not been found" >&5
5402 echo "$as_me: error: GNU libtool has not been found" >&2;}
5403    { (exit 1); exit 1; }; }
5404 fi
5405
5406         # special hack to add -no-undefined (which libtool should do for itself)
5407         LT_UNDEF=
5408         case "$cf_cv_system_name" in
5409         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5410                 LT_UNDEF=-no-undefined
5411                 ;;
5412         esac
5413
5414         # special hack to add --tag option for C++ compiler
5415         case $cf_cv_libtool_version in
5416         (1.[5-9]*|[2-9].[0-9.a-z]*)
5417                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5418                 LIBTOOL="$LIBTOOL --tag=CC"
5419                 ;;
5420         (*)
5421                 LIBTOOL_CXX="$LIBTOOL"
5422                 ;;
5423         esac
5424 else
5425         LIBTOOL=""
5426         LIBTOOL_CXX=""
5427 fi
5428
5429 test -z "$LIBTOOL" && ECHO_LT=
5430
5431 if test "$with_libtool" != "no" ; then
5432
5433 cf_list_models="$cf_list_models libtool"
5434
5435 else
5436
5437 echo "$as_me:5437: checking if you want to build shared libraries" >&5
5438 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5439
5440 # Check whether --with-shared or --without-shared was given.
5441 if test "${with_shared+set}" = set; then
5442   withval="$with_shared"
5443   with_shared=$withval
5444 else
5445   with_shared=no
5446 fi;
5447 echo "$as_me:5447: result: $with_shared" >&5
5448 echo "${ECHO_T}$with_shared" >&6
5449 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5450
5451 echo "$as_me:5451: checking if you want to build static libraries" >&5
5452 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5453
5454 # Check whether --with-normal or --without-normal was given.
5455 if test "${with_normal+set}" = set; then
5456   withval="$with_normal"
5457   with_normal=$withval
5458 else
5459   with_normal=yes
5460 fi;
5461 echo "$as_me:5461: result: $with_normal" >&5
5462 echo "${ECHO_T}$with_normal" >&6
5463 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5464
5465 echo "$as_me:5465: checking if you want to build debug libraries" >&5
5466 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5467
5468 # Check whether --with-debug or --without-debug was given.
5469 if test "${with_debug+set}" = set; then
5470   withval="$with_debug"
5471   with_debug=$withval
5472 else
5473   with_debug=yes
5474 fi;
5475 echo "$as_me:5475: result: $with_debug" >&5
5476 echo "${ECHO_T}$with_debug" >&6
5477 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5478
5479 echo "$as_me:5479: checking if you want to build profiling libraries" >&5
5480 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5481
5482 # Check whether --with-profile or --without-profile was given.
5483 if test "${with_profile+set}" = set; then
5484   withval="$with_profile"
5485   with_profile=$withval
5486 else
5487   with_profile=no
5488 fi;
5489 echo "$as_me:5489: result: $with_profile" >&5
5490 echo "${ECHO_T}$with_profile" >&6
5491 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5492
5493 fi
5494
5495 if test "X$cf_with_cxx_binding" != Xno; then
5496 if test "x$with_shared" = "xyes"; then
5497 echo "$as_me:5497: checking if you want to build C++ shared libraries" >&5
5498 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5499
5500 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5501 if test "${with_cxx_shared+set}" = set; then
5502   withval="$with_cxx_shared"
5503   with_shared_cxx=$withval
5504 else
5505   with_shared_cxx=no
5506 fi;
5507 echo "$as_me:5507: result: $with_shared_cxx" >&5
5508 echo "${ECHO_T}$with_shared_cxx" >&6
5509 fi
5510 fi
5511
5512 ###############################################################################
5513
5514 echo "$as_me:5514: checking for specified models" >&5
5515 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5516 test -z "$cf_list_models" && cf_list_models=normal
5517 test "$with_libtool" != "no" && cf_list_models=libtool
5518 echo "$as_me:5518: result: $cf_list_models" >&5
5519 echo "${ECHO_T}$cf_list_models" >&6
5520
5521 ### Use the first model as the default, and save its suffix for use in building
5522 ### up test-applications.
5523 echo "$as_me:5523: checking for default model" >&5
5524 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5525 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5526 echo "$as_me:5526: result: $DFT_LWR_MODEL" >&5
5527 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5528
5529 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5530
5531 TICS_NAME=tic
5532
5533 TINFO_NAME=tinfo
5534
5535 LIB_NAME=ncurses
5536
5537 LIB_DIR=../lib
5538 LIB_2ND=../../lib
5539
5540 echo "$as_me:5540: checking if you want to have a library-prefix" >&5
5541 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5542
5543 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5544 if test "${with_lib_prefix+set}" = set; then
5545   withval="$with_lib_prefix"
5546   with_lib_prefix=$withval
5547 else
5548   with_lib_prefix=auto
5549 fi;
5550 echo "$as_me:5550: result: $with_lib_prefix" >&5
5551 echo "${ECHO_T}$with_lib_prefix" >&6
5552
5553 if test $with_lib_prefix = auto
5554 then
5555
5556         case $cf_cv_system_name in
5557         (OS/2*|os2*)
5558                 if test "$DFT_LWR_MODEL" = libtool; then
5559                         LIB_PREFIX='lib'
5560                 else
5561                         LIB_PREFIX=''
5562                 fi
5563                 ;;
5564         (*-msvc*)
5565                 LIB_PREFIX=''
5566                 ;;
5567         (*)     LIB_PREFIX='lib'
5568                 ;;
5569         esac
5570 cf_prefix=$LIB_PREFIX
5571
5572 elif test $with_lib_prefix = no
5573 then
5574         LIB_PREFIX=
5575 else
5576         LIB_PREFIX=$with_lib_prefix
5577 fi
5578
5579 LIB_SUFFIX=
5580
5581         echo "$as_me:5581: checking for PATH separator" >&5
5582 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5583         case $cf_cv_system_name in
5584         (os2*)  PATH_SEPARATOR=';'  ;;
5585         (*)     ${PATH_SEPARATOR:=':'}  ;;
5586         esac
5587
5588         echo "$as_me:5588: result: $PATH_SEPARATOR" >&5
5589 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5590
5591 ###############################################################################
5592
5593 echo "$as_me:5593: checking if you want to build a separate terminfo library" >&5
5594 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5595
5596 # Check whether --with-termlib or --without-termlib was given.
5597 if test "${with_termlib+set}" = set; then
5598   withval="$with_termlib"
5599   with_termlib=$withval
5600 else
5601   with_termlib=no
5602 fi;
5603 echo "$as_me:5603: result: $with_termlib" >&5
5604 echo "${ECHO_T}$with_termlib" >&6
5605
5606 echo "$as_me:5606: checking if you want to build a separate tic library" >&5
5607 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5608
5609 # Check whether --with-ticlib or --without-ticlib was given.
5610 if test "${with_ticlib+set}" = set; then
5611   withval="$with_ticlib"
5612   with_ticlib=$withval
5613 else
5614   with_ticlib=no
5615 fi;
5616 echo "$as_me:5616: result: $with_ticlib" >&5
5617 echo "${ECHO_T}$with_ticlib" >&6
5618
5619 if test X"$CC_G_OPT" = X"" ; then
5620         CC_G_OPT='-g'
5621         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5622 fi
5623
5624 if test X"$CXX_G_OPT" = X"" ; then
5625         CXX_G_OPT='-g'
5626         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5627 fi
5628
5629 echo "$as_me:5629: checking for default loader flags" >&5
5630 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5631 case $DFT_LWR_MODEL in
5632 (libtool) LD_MODEL=''   ;;
5633 (normal)  LD_MODEL=''   ;;
5634 (debug)   LD_MODEL=$CC_G_OPT ;;
5635 (profile) LD_MODEL='-pg';;
5636 (shared)  LD_MODEL=''   ;;
5637 esac
5638 echo "$as_me:5638: result: $LD_MODEL" >&5
5639 echo "${ECHO_T}$LD_MODEL" >&6
5640
5641 case $DFT_LWR_MODEL in
5642 (shared)
5643
5644 echo "$as_me:5644: checking if rpath option should be used" >&5
5645 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5646
5647 # Check whether --enable-rpath or --disable-rpath was given.
5648 if test "${enable_rpath+set}" = set; then
5649   enableval="$enable_rpath"
5650   cf_cv_enable_rpath=$enableval
5651 else
5652   cf_cv_enable_rpath=no
5653 fi;
5654 echo "$as_me:5654: result: $cf_cv_enable_rpath" >&5
5655 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5656
5657 echo "$as_me:5657: checking if shared libraries should be relinked during install" >&5
5658 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5659
5660 # Check whether --enable-relink or --disable-relink was given.
5661 if test "${enable_relink+set}" = set; then
5662   enableval="$enable_relink"
5663   cf_cv_do_relink=$enableval
5664 else
5665   cf_cv_do_relink=yes
5666 fi;
5667 echo "$as_me:5667: result: $cf_cv_do_relink" >&5
5668 echo "${ECHO_T}$cf_cv_do_relink" >&6
5669         ;;
5670 esac
5671
5672 # we will build libraries one-level down.
5673 rel_builddir=..
5674
5675 LD_RPATH_OPT=
5676 if test "x$cf_cv_enable_rpath" != xno
5677 then
5678         echo "$as_me:5678: checking for an rpath option" >&5
5679 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5680         case $cf_cv_system_name in
5681         (irix*)
5682                 if test "$GCC" = yes; then
5683                         LD_RPATH_OPT="-Wl,-rpath,"
5684                 else
5685                         LD_RPATH_OPT="-rpath "
5686                 fi
5687                 ;;
5688         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5689                 LD_RPATH_OPT="-Wl,-rpath,"
5690                 ;;
5691         (openbsd[2-9].*|mirbsd*)
5692                 LD_RPATH_OPT="-Wl,-rpath,"
5693                 ;;
5694         (dragonfly*)
5695                 LD_RPATH_OPT="-rpath "
5696                 ;;
5697         (netbsd*)
5698                 LD_RPATH_OPT="-Wl,-rpath,"
5699                 ;;
5700         (osf*|mls+*)
5701                 LD_RPATH_OPT="-rpath "
5702                 ;;
5703         (solaris2*)
5704                 LD_RPATH_OPT="-R"
5705                 ;;
5706         (*)
5707                 ;;
5708         esac
5709         echo "$as_me:5709: result: $LD_RPATH_OPT" >&5
5710 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5711
5712         case "x$LD_RPATH_OPT" in
5713         (x-R*)
5714                 echo "$as_me:5714: checking if we need a space after rpath option" >&5
5715 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5716                 cf_save_LIBS="$LIBS"
5717
5718 cf_add_libs="$LIBS"
5719 # reverse order
5720 cf_add_0lib=
5721 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5722 # filter duplicates
5723 for cf_add_1lib in $cf_add_0lib; do
5724         for cf_add_2lib in $cf_add_libs; do
5725                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5726                         cf_add_1lib=
5727                         break
5728                 fi
5729         done
5730         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5731 done
5732 LIBS="$cf_add_libs"
5733
5734                 cat >conftest.$ac_ext <<_ACEOF
5735 #line 5735 "configure"
5736 #include "confdefs.h"
5737
5738 int
5739 main (void)
5740 {
5741
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 rm -f conftest.$ac_objext conftest$ac_exeext
5747 if { (eval echo "$as_me:5747: \"$ac_link\"") >&5
5748   (eval $ac_link) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); } &&
5752          { ac_try='test -s conftest$ac_exeext'
5753   { (eval echo "$as_me:5753: \"$ac_try\"") >&5
5754   (eval $ac_try) 2>&5
5755   ac_status=$?
5756   echo "$as_me:5756: \$? = $ac_status" >&5
5757   (exit $ac_status); }; }; then
5758   cf_rpath_space=no
5759 else
5760   echo "$as_me: failed program was:" >&5
5761 cat conftest.$ac_ext >&5
5762 cf_rpath_space=yes
5763 fi
5764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5765                 LIBS="$cf_save_LIBS"
5766                 echo "$as_me:5766: result: $cf_rpath_space" >&5
5767 echo "${ECHO_T}$cf_rpath_space" >&6
5768                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5769                 ;;
5770         esac
5771 fi
5772
5773         RM_SHARED_OPTS=
5774         LOCAL_LDFLAGS=
5775         LOCAL_LDFLAGS2=
5776         LD_SHARED_OPTS=
5777         INSTALL_LIB="-m 644"
5778         : ${rel_builddir:=.}
5779
5780         shlibdir=$libdir
5781
5782         MAKE_DLLS="#"
5783
5784         cf_cv_do_symlinks=no
5785         cf_ld_rpath_opt=
5786         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5787
5788         echo "$as_me:5788: checking if release/abi version should be used for shared libs" >&5
5789 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5790
5791 # Check whether --with-shlib-version or --without-shlib-version was given.
5792 if test "${with_shlib_version+set}" = set; then
5793   withval="$with_shlib_version"
5794   test -z "$withval" && withval=auto
5795         case $withval in
5796         (yes)
5797                 cf_cv_shlib_version=auto
5798                 ;;
5799         (rel|abi|auto)
5800                 cf_cv_shlib_version=$withval
5801                 ;;
5802         (*)
5803                 echo "$as_me:5803: result: $withval" >&5
5804 echo "${ECHO_T}$withval" >&6
5805                 { { echo "$as_me:5805: error: option value must be one of: rel, abi, or auto" >&5
5806 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5807    { (exit 1); exit 1; }; }
5808                 ;;
5809         esac
5810
5811 else
5812   cf_cv_shlib_version=auto
5813 fi;
5814         echo "$as_me:5814: result: $cf_cv_shlib_version" >&5
5815 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5816
5817         cf_cv_rm_so_locs=no
5818         cf_try_cflags=
5819
5820         # Some less-capable ports of gcc support only -fpic
5821         CC_SHARED_OPTS=
5822
5823         cf_try_fPIC=no
5824         if test "$GCC" = yes
5825         then
5826                 cf_try_fPIC=yes
5827         else
5828                 case $cf_cv_system_name in
5829                 (*linux*)       # e.g., PGI compiler
5830                         cf_try_fPIC=yes
5831                         ;;
5832                 esac
5833         fi
5834
5835         if test "$cf_try_fPIC" = yes
5836         then
5837                 echo "$as_me:5837: checking which $CC option to use" >&5
5838 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5839                 cf_save_CFLAGS="$CFLAGS"
5840                 for CC_SHARED_OPTS in -fPIC -fpic ''
5841                 do
5842                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5843                         cat >conftest.$ac_ext <<_ACEOF
5844 #line 5844 "configure"
5845 #include "confdefs.h"
5846 #include <stdio.h>
5847 int
5848 main (void)
5849 {
5850 int x = 1
5851   ;
5852   return 0;
5853 }
5854 _ACEOF
5855 rm -f conftest.$ac_objext
5856 if { (eval echo "$as_me:5856: \"$ac_compile\"") >&5
5857   (eval $ac_compile) 2>&5
5858   ac_status=$?
5859   echo "$as_me:5859: \$? = $ac_status" >&5
5860   (exit $ac_status); } &&
5861          { ac_try='test -s conftest.$ac_objext'
5862   { (eval echo "$as_me:5862: \"$ac_try\"") >&5
5863   (eval $ac_try) 2>&5
5864   ac_status=$?
5865   echo "$as_me:5865: \$? = $ac_status" >&5
5866   (exit $ac_status); }; }; then
5867   break
5868 else
5869   echo "$as_me: failed program was:" >&5
5870 cat conftest.$ac_ext >&5
5871 fi
5872 rm -f conftest.$ac_objext conftest.$ac_ext
5873                 done
5874                 echo "$as_me:5874: result: $CC_SHARED_OPTS" >&5
5875 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5876                 CFLAGS="$cf_save_CFLAGS"
5877         fi
5878
5879         cf_cv_shlib_version_infix=no
5880
5881         case $cf_cv_system_name in
5882         (aix4.3-9*|aix[5-7]*)
5883                 if test "$GCC" = yes; then
5884                         CC_SHARED_OPTS='-Wl,-brtl'
5885                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5886                 else
5887                         CC_SHARED_OPTS='-brtl'
5888                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5889                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5890                 fi
5891                 ;;
5892         (beos*)
5893                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5894                 ;;
5895         (cygwin*)
5896                 CC_SHARED_OPTS=
5897                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5898                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5899                 cf_cv_shlib_version=cygdll
5900                 cf_cv_shlib_version_infix=cygdll
5901                 shlibdir=$bindir
5902                 MAKE_DLLS=
5903                 cat >mk_shared_lib.sh <<-CF_EOF
5904                 #!$SHELL
5905                 SHARED_LIB=\$1
5906                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5907                 shift
5908                 cat <<-EOF
5909                 Linking shared library
5910                 ** SHARED_LIB \$SHARED_LIB
5911                 ** IMPORT_LIB \$IMPORT_LIB
5912 EOF
5913                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5914 CF_EOF
5915                 chmod +x mk_shared_lib.sh
5916                 ;;
5917         (msys*)
5918                 CC_SHARED_OPTS=
5919                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5920                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5921                 cf_cv_shlib_version=msysdll
5922                 cf_cv_shlib_version_infix=msysdll
5923                 shlibdir=$bindir
5924                 MAKE_DLLS=
5925                 cat >mk_shared_lib.sh <<-CF_EOF
5926                 #!$SHELL
5927                 SHARED_LIB=\$1
5928                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5929                 shift
5930                 cat <<-EOF
5931                 Linking shared library
5932                 ** SHARED_LIB \$SHARED_LIB
5933                 ** IMPORT_LIB \$IMPORT_LIB
5934 EOF
5935                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5936 CF_EOF
5937                 chmod +x mk_shared_lib.sh
5938                 ;;
5939         (darwin*)
5940                 cf_try_cflags="no-cpp-precomp"
5941                 CC_SHARED_OPTS="-dynamic"
5942                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5943                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5944                 cf_cv_shlib_version_infix=yes
5945                 echo "$as_me:5945: checking if ld -search_paths_first works" >&5
5946 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5947 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5948   echo $ECHO_N "(cached) $ECHO_C" >&6
5949 else
5950
5951                         cf_save_LDFLAGS=$LDFLAGS
5952                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5953                         cat >conftest.$ac_ext <<_ACEOF
5954 #line 5954 "configure"
5955 #include "confdefs.h"
5956
5957 int
5958 main (void)
5959 {
5960 int i;
5961   ;
5962   return 0;
5963 }
5964 _ACEOF
5965 rm -f conftest.$ac_objext conftest$ac_exeext
5966 if { (eval echo "$as_me:5966: \"$ac_link\"") >&5
5967   (eval $ac_link) 2>&5
5968   ac_status=$?
5969   echo "$as_me:5969: \$? = $ac_status" >&5
5970   (exit $ac_status); } &&
5971          { ac_try='test -s conftest$ac_exeext'
5972   { (eval echo "$as_me:5972: \"$ac_try\"") >&5
5973   (eval $ac_try) 2>&5
5974   ac_status=$?
5975   echo "$as_me:5975: \$? = $ac_status" >&5
5976   (exit $ac_status); }; }; then
5977   cf_cv_ldflags_search_paths_first=yes
5978 else
5979   echo "$as_me: failed program was:" >&5
5980 cat conftest.$ac_ext >&5
5981 cf_cv_ldflags_search_paths_first=no
5982 fi
5983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5984                                 LDFLAGS=$cf_save_LDFLAGS
5985 fi
5986 echo "$as_me:5986: result: $cf_cv_ldflags_search_paths_first" >&5
5987 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5988                 if test $cf_cv_ldflags_search_paths_first = yes; then
5989                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5990                 fi
5991                 ;;
5992         (hpux[7-8]*)
5993                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5994                 if test "$GCC" != yes; then
5995                         CC_SHARED_OPTS='+Z'
5996                 fi
5997                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5998                 INSTALL_LIB="-m 555"
5999                 ;;
6000         (hpux*)
6001                 # (tested with gcc 2.7.2 -- I don't have c89)
6002                 if test "$GCC" = yes; then
6003                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6004                 else
6005                         CC_SHARED_OPTS='+Z'
6006                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6007                 fi
6008                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6009                 # HP-UX shared libraries must be executable, and should be
6010                 # readonly to exploit a quirk in the memory manager.
6011                 INSTALL_LIB="-m 555"
6012                 ;;
6013         (interix*)
6014                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6015                 if test "$cf_cv_shlib_version" = rel; then
6016                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6017                 else
6018                         cf_shared_soname='`basename $@`'
6019                 fi
6020                 CC_SHARED_OPTS=
6021                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6022                 ;;
6023         (irix*)
6024                 if test "$cf_cv_enable_rpath" = yes ; then
6025                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6026                 fi
6027                 # tested with IRIX 5.2 and 'cc'.
6028                 if test "$GCC" != yes; then
6029                         CC_SHARED_OPTS='-KPIC'
6030                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6031                 else
6032                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6033                 fi
6034                 cf_cv_rm_so_locs=yes
6035                 ;;
6036         (linux*|gnu*|k*bsd*-gnu)
6037                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6038                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6039                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6040                 fi
6041                 if test "$cf_cv_enable_rpath" = yes ; then
6042                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6043                 fi
6044
6045         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6046         if test "$cf_cv_shlib_version" = rel; then
6047                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6048         else
6049                 cf_cv_shared_soname='`basename $@`'
6050         fi
6051
6052                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6053                 ;;
6054         (mingw*msvc*)
6055                 cf_cv_shlib_version=msvcdll
6056                 cf_cv_shlib_version_infix=msvcdll
6057                 shlibdir=$bindir
6058                 MAKE_DLLS=
6059                 if test "$DFT_LWR_MODEL" = "shared" ; then
6060                         LOCAL_LDFLAGS="-link -dll"
6061                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6062                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6063                 fi
6064                 CC_SHARED_OPTS=
6065                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6066                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6067                 cat >mk_shared_lib.sh <<-CF_EOF
6068                 #!$SHELL
6069                 SHARED_LIB=\$1
6070                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6071                 shift
6072                 my_ld=\$1
6073                 shift
6074                 cat <<-EOF
6075                 Linking shared library
6076                 ** SHARED LIB \$SHARED_LIB
6077                 ** IMPORT_LIB \$IMPORT_LIB
6078 EOF
6079                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6080                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6081                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6082 CF_EOF
6083                 chmod +x mk_shared_lib.sh
6084                 cat >mk_prog.sh <<-CF_EOF
6085                 #!$SHELL
6086                 shift
6087                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6088                 LD="$LD"
6089                 clopts=()
6090                 ldopts=("/subsystem:console")
6091                 libs=()
6092                 isdll=0
6093                 while test \$# -gt 0; do
6094                         case "\$1" in
6095                                 -link)
6096                                         # ignore -link argument
6097                                         ;;
6098                                 -M[TD] | -M[TD]d)
6099                                         # ignore runtime-library option
6100                                         ;;
6101                                 -dll)
6102                                         isdll=1
6103                                         ;;
6104                                 -W* | -w*)
6105                                         # ignore warnings
6106                                         ;;
6107                                 -D*)
6108                                         clopts+=("\$1")
6109                                         ;;
6110                                 -I*)
6111                                         clopts+=("\$1")
6112                                         ;;
6113                                 -l*)
6114                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6115                                         ;;
6116                                 -L*)
6117                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6118                                         ;;
6119                                 *.obj | *.o)
6120                                         ldopts+=("\$1")
6121                                         ;;
6122                                 -Wl,*)
6123                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6124                                                 ldopts+=("\${linkarg}")
6125                                         done
6126                                         ;;
6127                                 *.lib)
6128                                         ldopts+=("\$1")
6129                                         ;;
6130                                 -o)
6131                                         shift
6132                                         ldopts+=("-out:\$1")
6133                                         ;;
6134                                 *)
6135                                         clopts+=("\$1")
6136                                         ldopts+=("\$1")
6137                                         ;;
6138                         esac
6139                         shift
6140                 done
6141                 if [ "\$isdll" -ne 0 ]; then
6142                         for lib in \${libs[*]}; do
6143                                 ldopts+=("\$lib.dll.lib")
6144                         done
6145                 else
6146                         for lib in \${libs[*]}; do
6147                                 ldopts+=("\$lib.lib")
6148                         done
6149                 fi
6150                 cat <<-EOF
6151                 Creating program
6152                 ** ld options:   "\${ldopts[@]}"
6153 EOF
6154                 exec \$LD \${ldopts[@]}
6155 CF_EOF
6156                 chmod +x mk_prog.sh
6157                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6158                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6159                 ;;
6160         (mingw*)
6161                 cf_cv_shlib_version=mingw
6162                 cf_cv_shlib_version_infix=mingw
6163                 shlibdir=$bindir
6164                 MAKE_DLLS=
6165                 if test "$DFT_LWR_MODEL" = "shared" ; then
6166                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6167                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6168                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6169                 fi
6170                 CC_SHARED_OPTS=
6171                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6172                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6173                 cat >mk_shared_lib.sh <<-CF_EOF
6174                 #!$SHELL
6175                 SHARED_LIB=\$1
6176                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6177                 shift
6178                 cat <<-EOF
6179                 Linking shared library
6180                 ** SHARED_LIB \$SHARED_LIB
6181                 ** IMPORT_LIB \$IMPORT_LIB
6182 EOF
6183                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6184 CF_EOF
6185                 chmod +x mk_shared_lib.sh
6186                 ;;
6187         (openbsd[2-9].*|mirbsd*)
6188                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6189                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6190                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6191                 fi
6192                 if test "$cf_cv_enable_rpath" = yes ; then
6193                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6194                 fi
6195                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6196
6197         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6198         if test "$cf_cv_shlib_version" = rel; then
6199                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6200         else
6201                 cf_cv_shared_soname='`basename $@`'
6202         fi
6203
6204                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6205                 ;;
6206         (nskJ*)
6207                 CC_SHARED_OPTS=
6208                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6209                 ;;
6210         (nskL*)
6211                 CC_SHARED_OPTS=
6212                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6213                 ;;
6214         (nto-qnx*|openbsd*|freebsd[12].*)
6215                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6216                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6217                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6218                 ;;
6219         (dragonfly*|freebsd*)
6220                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6221                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6222                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6223                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6224                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6225                 fi
6226
6227         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6228         if test "$cf_cv_shlib_version" = rel; then
6229                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6230         else
6231                 cf_cv_shared_soname='`basename $@`'
6232         fi
6233
6234                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6235                 ;;
6236         (netbsd*)
6237                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6238                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6239                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6240                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6241                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6242                         if test "$cf_cv_shlib_version" = auto; then
6243                         if test -f /usr/libexec/ld.elf_so; then
6244                                 cf_cv_shlib_version=abi
6245                         else
6246                                 cf_cv_shlib_version=rel
6247                         fi
6248                         fi
6249
6250         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6251         if test "$cf_cv_shlib_version" = rel; then
6252                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6253         else
6254                 cf_cv_shared_soname='`basename $@`'
6255         fi
6256
6257                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6258                 else
6259                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6260                 fi
6261                 ;;
6262         (osf*|mls+*)
6263                 # tested with OSF/1 V3.2 and 'cc'
6264                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6265                 # link with shared libs).
6266                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6267                 case $host_os in
6268                 (osf4*)
6269                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6270                         ;;
6271                 esac
6272                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6273                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6274                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6275                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6276                 fi
6277                 cf_cv_rm_so_locs=yes
6278                 ;;
6279         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6280                 # tested with osr5.0.5
6281                 if test "$GCC" != yes; then
6282                         CC_SHARED_OPTS='-belf -KPIC'
6283                 fi
6284                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6285                 if test "$cf_cv_enable_rpath" = yes ; then
6286                         # only way is to set LD_RUN_PATH but no switch for it
6287                         RUN_PATH=$libdir
6288                 fi
6289                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6290                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6291                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6292                 ;;
6293         (sunos4*)
6294                 # tested with SunOS 4.1.1 and gcc 2.7.0
6295                 if test "$GCC" != yes; then
6296                         CC_SHARED_OPTS='-KPIC'
6297                 fi
6298                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6299                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6300                 ;;
6301         (solaris2*)
6302                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6303                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6304                 if test "$DFT_LWR_MODEL" = "shared" ; then
6305                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6306                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6307                 fi
6308                 if test "$cf_cv_enable_rpath" = yes ; then
6309                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6310                 fi
6311
6312         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6313         if test "$cf_cv_shlib_version" = rel; then
6314                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6315         else
6316                 cf_cv_shared_soname='`basename $@`'
6317         fi
6318
6319                 if test "$GCC" != yes; then
6320                         cf_save_CFLAGS="$CFLAGS"
6321                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6322                         do
6323                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6324                                 cat >conftest.$ac_ext <<_ACEOF
6325 #line 6325 "configure"
6326 #include "confdefs.h"
6327 #include <stdio.h>
6328 int
6329 main (void)
6330 {
6331 printf("Hello\n");
6332   ;
6333   return 0;
6334 }
6335 _ACEOF
6336 rm -f conftest.$ac_objext
6337 if { (eval echo "$as_me:6337: \"$ac_compile\"") >&5
6338   (eval $ac_compile) 2>&5
6339   ac_status=$?
6340   echo "$as_me:6340: \$? = $ac_status" >&5
6341   (exit $ac_status); } &&
6342          { ac_try='test -s conftest.$ac_objext'
6343   { (eval echo "$as_me:6343: \"$ac_try\"") >&5
6344   (eval $ac_try) 2>&5
6345   ac_status=$?
6346   echo "$as_me:6346: \$? = $ac_status" >&5
6347   (exit $ac_status); }; }; then
6348   break
6349 else
6350   echo "$as_me: failed program was:" >&5
6351 cat conftest.$ac_ext >&5
6352 fi
6353 rm -f conftest.$ac_objext conftest.$ac_ext
6354                         done
6355                         CFLAGS="$cf_save_CFLAGS"
6356                         CC_SHARED_OPTS=$cf_shared_opts
6357                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6358                 else
6359                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6360                 fi
6361                 ;;
6362         (sysv5uw7*|unix_sv*)
6363                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6364                 if test "$GCC" != yes; then
6365                         CC_SHARED_OPTS='-KPIC'
6366                 fi
6367                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6368                 ;;
6369         (*)
6370                 CC_SHARED_OPTS='unknown'
6371                 MK_SHARED_LIB='echo unknown'
6372                 ;;
6373         esac
6374
6375         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6376         case "$cf_cv_shlib_version" in
6377         (rel|abi)
6378                 case "$MK_SHARED_LIB" in
6379                 (*'-o $@')
6380                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6381                         ;;
6382                 (*)
6383                         { echo "$as_me:6383: WARNING: ignored --with-shlib-version" >&5
6384 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6385                         ;;
6386                 esac
6387                 ;;
6388         esac
6389
6390         if test -n "$cf_try_cflags"
6391         then
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6393 "${as_me:-configure}"
6394 #include <stdio.h>
6395 int main(int argc, char *argv[])
6396 {
6397         printf("hello\n");
6398         return (argv[argc-1] == 0) ;
6399 }
6400 EOF
6401                 cf_save_CFLAGS="$CFLAGS"
6402                 for cf_opt in $cf_try_cflags
6403                 do
6404                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6405                         echo "$as_me:6405: checking if CFLAGS option -$cf_opt works" >&5
6406 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6407                         if { (eval echo "$as_me:6407: \"$ac_compile\"") >&5
6408   (eval $ac_compile) 2>&5
6409   ac_status=$?
6410   echo "$as_me:6410: \$? = $ac_status" >&5
6411   (exit $ac_status); }; then
6412                                 echo "$as_me:6412: result: yes" >&5
6413 echo "${ECHO_T}yes" >&6
6414                                 cf_save_CFLAGS="$CFLAGS"
6415                         else
6416                                 echo "$as_me:6416: result: no" >&5
6417 echo "${ECHO_T}no" >&6
6418                         fi
6419                 done
6420                 CFLAGS="$cf_save_CFLAGS"
6421         fi
6422
6423         # RPATH_LIST is a colon-separated list of directories
6424         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6425         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6426
6427         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6428
6429         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6430
6431 echo "${as_me:-configure}:6431: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6432
6433         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6434
6435 echo "${as_me:-configure}:6435: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6436
6437 for model in $cf_list_models; do
6438         case $model in
6439         (libtool)
6440
6441 echo "$as_me:6441: checking for additional libtool options" >&5
6442 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6443
6444 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6445 if test "${with_libtool_opts+set}" = set; then
6446   withval="$with_libtool_opts"
6447   with_libtool_opts=$withval
6448 else
6449   with_libtool_opts=no
6450 fi;
6451 echo "$as_me:6451: result: $with_libtool_opts" >&5
6452 echo "${ECHO_T}$with_libtool_opts" >&6
6453
6454 case .$with_libtool_opts in
6455 (.yes|.no|.)
6456         ;;
6457 (*)
6458         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6459         ;;
6460 esac
6461
6462 echo "$as_me:6462: checking if exported-symbols file should be used" >&5
6463 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6464
6465 # Check whether --with-export-syms or --without-export-syms was given.
6466 if test "${with_export_syms+set}" = set; then
6467   withval="$with_export_syms"
6468   with_export_syms=$withval
6469 else
6470   with_export_syms=no
6471 fi;
6472 if test "x$with_export_syms" = xyes
6473 then
6474         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6475
6476 fi
6477 echo "$as_me:6477: result: $with_export_syms" >&5
6478 echo "${ECHO_T}$with_export_syms" >&6
6479 if test "x$with_export_syms" != xno
6480 then
6481         EXPORT_SYMS="-export-symbols $with_export_syms"
6482
6483 fi
6484
6485                 ;;
6486         (shared)
6487                 if test "$CC_SHARED_OPTS" = "unknown"; then
6488                         { { echo "$as_me:6488: error: Shared libraries are not supported in this version" >&5
6489 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6490    { (exit 1); exit 1; }; }
6491                 fi
6492                 # workaround for inept transition to PIE vs PIC...
6493                 echo "$as_me:6493: checking if current CFLAGS link properly" >&5
6494 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6495                 cat >conftest.$ac_ext <<_ACEOF
6496 #line 6496 "configure"
6497 #include "confdefs.h"
6498 #include <stdio.h>
6499 int
6500 main (void)
6501 {
6502 printf("Hello work\n");
6503   ;
6504   return 0;
6505 }
6506 _ACEOF
6507 rm -f conftest.$ac_objext conftest$ac_exeext
6508 if { (eval echo "$as_me:6508: \"$ac_link\"") >&5
6509   (eval $ac_link) 2>&5
6510   ac_status=$?
6511   echo "$as_me:6511: \$? = $ac_status" >&5
6512   (exit $ac_status); } &&
6513          { ac_try='test -s conftest$ac_exeext'
6514   { (eval echo "$as_me:6514: \"$ac_try\"") >&5
6515   (eval $ac_try) 2>&5
6516   ac_status=$?
6517   echo "$as_me:6517: \$? = $ac_status" >&5
6518   (exit $ac_status); }; }; then
6519   cf_cflags_work=yes
6520 else
6521   echo "$as_me: failed program was:" >&5
6522 cat conftest.$ac_ext >&5
6523 cf_cflags_work=no
6524 fi
6525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6526                 echo "$as_me:6526: result: $cf_cflags_work" >&5
6527 echo "${ECHO_T}$cf_cflags_work" >&6
6528                 if test "$cf_cflags_work" = no
6529                 then
6530                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6531
6532 echo "${as_me:-configure}:6532: testing try to work around by appending shared-options ..." 1>&5
6533
6534                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6535                 fi
6536
6537 echo "$as_me:6537: checking if versioned-symbols file should be used" >&5
6538 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6539
6540 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6541 if test "${with_versioned_syms+set}" = set; then
6542   withval="$with_versioned_syms"
6543   with_versioned_syms=$withval
6544 else
6545   with_versioned_syms=no
6546 fi;
6547 case "x$with_versioned_syms" in
6548 (xyes)
6549         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6550
6551         ;;
6552 (xno)
6553         ;;
6554 (x/*)
6555         test -f "$with_versioned_syms" || { { echo "$as_me:6555: error: expected a filename: $with_versioned_syms" >&5
6556 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6557    { (exit 1); exit 1; }; }
6558         ;;
6559 (*)
6560         test -f "$with_versioned_syms" || { { echo "$as_me:6560: error: expected a filename: $with_versioned_syms" >&5
6561 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6562    { (exit 1); exit 1; }; }
6563         with_versioned_syms=`pwd`/"$with_versioned_syms"
6564         ;;
6565 esac
6566 echo "$as_me:6566: result: $with_versioned_syms" >&5
6567 echo "${ECHO_T}$with_versioned_syms" >&6
6568
6569 RESULTING_SYMS=
6570 VERSIONED_SYMS=
6571 WILDCARD_SYMS=
6572
6573 if test "x$with_versioned_syms" != xno
6574 then
6575         RESULTING_SYMS=$with_versioned_syms
6576         case "x$MK_SHARED_LIB" in
6577         (*-Wl,*)
6578                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6579                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6580                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6581
6582 echo "${as_me:-configure}:6582: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6583
6584                 ;;
6585         (*-dy\ *)
6586                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6587                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6588                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6589
6590 echo "${as_me:-configure}:6590: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6591
6592                 ;;
6593         (*)
6594                 { echo "$as_me:6594: WARNING: this system does not support versioned-symbols" >&5
6595 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6596                 ;;
6597         esac
6598
6599         # Linux ld can selectively override scope, e.g., of symbols beginning with
6600         # "_" by first declaring some as global, and then using a wildcard to
6601         # declare the others as local.  Some other loaders cannot do this.  Check
6602         # by constructing a (very) simple shared library and inspecting its
6603         # symbols.
6604         if test "x$VERSIONED_SYMS" != "x"
6605         then
6606                 echo "$as_me:6606: checking if wildcards can be used to selectively omit symbols" >&5
6607 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6608                 WILDCARD_SYMS=no
6609
6610                 # make sources
6611                 rm -f conftest.*
6612
6613                 cat >conftest.ver <<EOF
6614 module_1.0 {
6615 global:
6616         globalf1;
6617 local:
6618         localf1;
6619 };
6620 module_2.0 {
6621 global:
6622         globalf2;
6623 local:
6624         localf2;
6625         _*;
6626 } module_1.0;
6627 submodule_1.0 {
6628 global:
6629         subglobalf1;
6630         _ismissing;
6631 local:
6632         sublocalf1;
6633 };
6634 submodule_2.0 {
6635 global:
6636         subglobalf2;
6637 local:
6638         sublocalf2;
6639         _*;
6640 } submodule_1.0;
6641 EOF
6642                 cat >conftest.$ac_ext <<EOF
6643 #line 6643 "configure"
6644 int     _ismissing(void) { return 1; }
6645 int     _localf1(void) { return 1; }
6646 int     _localf2(void) { return 2; }
6647 int     globalf1(void) { return 1; }
6648 int     globalf2(void) { return 2; }
6649 int     _sublocalf1(void) { return 1; }
6650 int     _sublocalf2(void) { return 2; }
6651 int     subglobalf1(void) { return 1; }
6652 int     subglobalf2(void) { return 2; }
6653 EOF
6654                 cat >conftest.mk <<EOF
6655 CC=${CC}
6656 CFLAGS=${CFLAGS}
6657 CPPFLAGS=${CPPFLAGS}
6658 LDFLAGS=${LDFLAGS}
6659 LIBS=${LIBS}
6660 VERSIONED_SYMS=${VERSIONED_SYMS}
6661 RESULTING_SYMS=conftest.ver
6662 MK_SHARED_LIB=${MK_SHARED_LIB}
6663 conftest.so: conftest.$ac_cv_objext
6664                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6665 EOF
6666
6667                 # compile source, make library
6668                 if make -f conftest.mk 2>&5 >/dev/null
6669                 then
6670                         # test for missing symbol in either Data or Text section
6671                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6672                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6673                 fi
6674                 echo "$as_me:6674: result: $WILDCARD_SYMS" >&5
6675 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6676                 rm -f conftest.*
6677         fi
6678 fi
6679
6680                 ;;
6681         esac
6682 done
6683
6684 ### Checks for special libraries, must be done up-front.
6685 SHLIB_LIST=""
6686
6687 echo "$as_me:6687: checking if you want to link with the GPM mouse library" >&5
6688 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6689
6690 # Check whether --with-gpm or --without-gpm was given.
6691 if test "${with_gpm+set}" = set; then
6692   withval="$with_gpm"
6693   with_gpm=$withval
6694 else
6695   with_gpm=maybe
6696 fi;
6697 echo "$as_me:6697: result: $with_gpm" >&5
6698 echo "${ECHO_T}$with_gpm" >&6
6699
6700 if test "$with_gpm" != no ; then
6701         echo "$as_me:6701: checking for gpm.h" >&5
6702 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6703 if test "${ac_cv_header_gpm_h+set}" = set; then
6704   echo $ECHO_N "(cached) $ECHO_C" >&6
6705 else
6706   cat >conftest.$ac_ext <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6709 #include <gpm.h>
6710 _ACEOF
6711 if { (eval echo "$as_me:6711: \"$ac_cpp conftest.$ac_ext\"") >&5
6712   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6713   ac_status=$?
6714   egrep -v '^ *\+' conftest.er1 >conftest.err
6715   rm -f conftest.er1
6716   cat conftest.err >&5
6717   echo "$as_me:6717: \$? = $ac_status" >&5
6718   (exit $ac_status); } >/dev/null; then
6719   if test -s conftest.err; then
6720     ac_cpp_err=$ac_c_preproc_warn_flag
6721   else
6722     ac_cpp_err=
6723   fi
6724 else
6725   ac_cpp_err=yes
6726 fi
6727 if test -z "$ac_cpp_err"; then
6728   ac_cv_header_gpm_h=yes
6729 else
6730   echo "$as_me: failed program was:" >&5
6731   cat conftest.$ac_ext >&5
6732   ac_cv_header_gpm_h=no
6733 fi
6734 rm -f conftest.err conftest.$ac_ext
6735 fi
6736 echo "$as_me:6736: result: $ac_cv_header_gpm_h" >&5
6737 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6738 if test $ac_cv_header_gpm_h = yes; then
6739
6740 cat >>confdefs.h <<\EOF
6741 #define HAVE_GPM_H 1
6742 EOF
6743
6744                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6745                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6746
6747 echo "${as_me:-configure}:6747: testing assuming we really have GPM library ..." 1>&5
6748
6749 cat >>confdefs.h <<\EOF
6750 #define HAVE_LIBGPM 1
6751 EOF
6752
6753                         with_gpm=yes
6754                 else
6755                         echo "$as_me:6755: checking for Gpm_Open in -lgpm" >&5
6756 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6757 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6758   echo $ECHO_N "(cached) $ECHO_C" >&6
6759 else
6760   ac_check_lib_save_LIBS=$LIBS
6761 LIBS="-lgpm  $LIBS"
6762 cat >conftest.$ac_ext <<_ACEOF
6763 #line 6763 "configure"
6764 #include "confdefs.h"
6765
6766 /* Override any gcc2 internal prototype to avoid an error.  */
6767 #ifdef __cplusplus
6768 extern "C"
6769 #endif
6770 /* We use char because int might match the return type of a gcc2
6771    builtin and then its argument prototype would still apply.  */
6772 char Gpm_Open ();
6773 int
6774 main (void)
6775 {
6776 Gpm_Open ();
6777   ;
6778   return 0;
6779 }
6780 _ACEOF
6781 rm -f conftest.$ac_objext conftest$ac_exeext
6782 if { (eval echo "$as_me:6782: \"$ac_link\"") >&5
6783   (eval $ac_link) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); } &&
6787          { ac_try='test -s conftest$ac_exeext'
6788   { (eval echo "$as_me:6788: \"$ac_try\"") >&5
6789   (eval $ac_try) 2>&5
6790   ac_status=$?
6791   echo "$as_me:6791: \$? = $ac_status" >&5
6792   (exit $ac_status); }; }; then
6793   ac_cv_lib_gpm_Gpm_Open=yes
6794 else
6795   echo "$as_me: failed program was:" >&5
6796 cat conftest.$ac_ext >&5
6797 ac_cv_lib_gpm_Gpm_Open=no
6798 fi
6799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6800 LIBS=$ac_check_lib_save_LIBS
6801 fi
6802 echo "$as_me:6802: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6803 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6804 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6805   with_gpm=yes
6806 else
6807
6808                                 if test "$with_gpm" = maybe; then
6809                                         { echo "$as_me:6809: WARNING: Cannot link with GPM library" >&5
6810 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6811                                         with_gpm=no
6812                                 else
6813                                         { { echo "$as_me:6813: error: Cannot link with GPM library" >&5
6814 echo "$as_me: error: Cannot link with GPM library" >&2;}
6815    { (exit 1); exit 1; }; }
6816                                 fi
6817
6818 fi
6819
6820                 fi
6821
6822 else
6823
6824                 test "$with_gpm" != maybe && { echo "$as_me:6824: WARNING: Cannot find GPM header" >&5
6825 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6826                 with_gpm=no
6827
6828 fi
6829
6830 fi
6831
6832 if test "$with_gpm" != no ; then
6833         echo "$as_me:6833: checking if you want to load GPM dynamically" >&5
6834 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6835
6836 # Check whether --with-dlsym or --without-dlsym was given.
6837 if test "${with_dlsym+set}" = set; then
6838   withval="$with_dlsym"
6839   with_dlsym=$withval
6840 else
6841   with_dlsym=yes
6842 fi;
6843         echo "$as_me:6843: result: $with_dlsym" >&5
6844 echo "${ECHO_T}$with_dlsym" >&6
6845         if test "x$with_dlsym" = xyes ; then
6846
6847 cf_have_dlsym=no
6848 echo "$as_me:6848: checking for dlsym" >&5
6849 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6850 if test "${ac_cv_func_dlsym+set}" = set; then
6851   echo $ECHO_N "(cached) $ECHO_C" >&6
6852 else
6853   cat >conftest.$ac_ext <<_ACEOF
6854 #line 6854 "configure"
6855 #include "confdefs.h"
6856 #define dlsym autoconf_temporary
6857 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6858 #undef dlsym
6859
6860 #ifdef __cplusplus
6861 extern "C"
6862 #endif
6863
6864 /* We use char because int might match the return type of a gcc2
6865    builtin and then its argument prototype would still apply.  */
6866 char dlsym (void);
6867
6868 int
6869 main (void)
6870 {
6871
6872 /* The GNU C library defines stubs for functions which it implements
6873     to always fail with ENOSYS.  Some functions are actually named
6874     something starting with __ and the normal name is an alias.  */
6875 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6876 #error found stub for dlsym
6877 #endif
6878
6879         return dlsym ();
6880   ;
6881   return 0;
6882 }
6883 _ACEOF
6884 rm -f conftest.$ac_objext conftest$ac_exeext
6885 if { (eval echo "$as_me:6885: \"$ac_link\"") >&5
6886   (eval $ac_link) 2>&5
6887   ac_status=$?
6888   echo "$as_me:6888: \$? = $ac_status" >&5
6889   (exit $ac_status); } &&
6890          { ac_try='test -s conftest$ac_exeext'
6891   { (eval echo "$as_me:6891: \"$ac_try\"") >&5
6892   (eval $ac_try) 2>&5
6893   ac_status=$?
6894   echo "$as_me:6894: \$? = $ac_status" >&5
6895   (exit $ac_status); }; }; then
6896   ac_cv_func_dlsym=yes
6897 else
6898   echo "$as_me: failed program was:" >&5
6899 cat conftest.$ac_ext >&5
6900 ac_cv_func_dlsym=no
6901 fi
6902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6903 fi
6904 echo "$as_me:6904: result: $ac_cv_func_dlsym" >&5
6905 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6906 if test $ac_cv_func_dlsym = yes; then
6907   cf_have_dlsym=yes
6908 else
6909
6910 cf_have_libdl=no
6911 echo "$as_me:6911: checking for dlsym in -ldl" >&5
6912 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6913 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6914   echo $ECHO_N "(cached) $ECHO_C" >&6
6915 else
6916   ac_check_lib_save_LIBS=$LIBS
6917 LIBS="-ldl  $LIBS"
6918 cat >conftest.$ac_ext <<_ACEOF
6919 #line 6919 "configure"
6920 #include "confdefs.h"
6921
6922 /* Override any gcc2 internal prototype to avoid an error.  */
6923 #ifdef __cplusplus
6924 extern "C"
6925 #endif
6926 /* We use char because int might match the return type of a gcc2
6927    builtin and then its argument prototype would still apply.  */
6928 char dlsym ();
6929 int
6930 main (void)
6931 {
6932 dlsym ();
6933   ;
6934   return 0;
6935 }
6936 _ACEOF
6937 rm -f conftest.$ac_objext conftest$ac_exeext
6938 if { (eval echo "$as_me:6938: \"$ac_link\"") >&5
6939   (eval $ac_link) 2>&5
6940   ac_status=$?
6941   echo "$as_me:6941: \$? = $ac_status" >&5
6942   (exit $ac_status); } &&
6943          { ac_try='test -s conftest$ac_exeext'
6944   { (eval echo "$as_me:6944: \"$ac_try\"") >&5
6945   (eval $ac_try) 2>&5
6946   ac_status=$?
6947   echo "$as_me:6947: \$? = $ac_status" >&5
6948   (exit $ac_status); }; }; then
6949   ac_cv_lib_dl_dlsym=yes
6950 else
6951   echo "$as_me: failed program was:" >&5
6952 cat conftest.$ac_ext >&5
6953 ac_cv_lib_dl_dlsym=no
6954 fi
6955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6956 LIBS=$ac_check_lib_save_LIBS
6957 fi
6958 echo "$as_me:6958: result: $ac_cv_lib_dl_dlsym" >&5
6959 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6960 if test $ac_cv_lib_dl_dlsym = yes; then
6961
6962         cf_have_dlsym=yes
6963         cf_have_libdl=yes
6964 fi
6965
6966 fi
6967
6968 if test "$cf_have_dlsym" = yes ; then
6969         test "$cf_have_libdl" = yes && {
6970 cf_add_libs="$LIBS"
6971 # reverse order
6972 cf_add_0lib=
6973 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6974 # filter duplicates
6975 for cf_add_1lib in $cf_add_0lib; do
6976         for cf_add_2lib in $cf_add_libs; do
6977                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6978                         cf_add_1lib=
6979                         break
6980                 fi
6981         done
6982         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6983 done
6984 LIBS="$cf_add_libs"
6985  }
6986
6987         echo "$as_me:6987: checking whether able to link to dl*() functions" >&5
6988 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6989         cat >conftest.$ac_ext <<_ACEOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6992 #include <dlfcn.h>
6993 int
6994 main (void)
6995 {
6996
6997                 void *obj;
6998                 if ((obj = dlopen("filename", 0)) != 0) {
6999                         if (dlsym(obj, "symbolname") == 0) {
7000                         dlclose(obj);
7001                         }
7002                 }
7003   ;
7004   return 0;
7005 }
7006 _ACEOF
7007 rm -f conftest.$ac_objext conftest$ac_exeext
7008 if { (eval echo "$as_me:7008: \"$ac_link\"") >&5
7009   (eval $ac_link) 2>&5
7010   ac_status=$?
7011   echo "$as_me:7011: \$? = $ac_status" >&5
7012   (exit $ac_status); } &&
7013          { ac_try='test -s conftest$ac_exeext'
7014   { (eval echo "$as_me:7014: \"$ac_try\"") >&5
7015   (eval $ac_try) 2>&5
7016   ac_status=$?
7017   echo "$as_me:7017: \$? = $ac_status" >&5
7018   (exit $ac_status); }; }; then
7019
7020 cat >>confdefs.h <<\EOF
7021 #define HAVE_LIBDL 1
7022 EOF
7023
7024 else
7025   echo "$as_me: failed program was:" >&5
7026 cat conftest.$ac_ext >&5
7027
7028                 { { echo "$as_me:7028: error: Cannot link test program for libdl" >&5
7029 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7030    { (exit 1); exit 1; }; }
7031 fi
7032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7033         echo "$as_me:7033: result: ok" >&5
7034 echo "${ECHO_T}ok" >&6
7035 else
7036         { { echo "$as_me:7036: error: Cannot find dlsym function" >&5
7037 echo "$as_me: error: Cannot find dlsym function" >&2;}
7038    { (exit 1); exit 1; }; }
7039 fi
7040
7041                 if test "x$with_gpm" != xyes ; then
7042                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7043
7044 echo "${as_me:-configure}:7044: testing assuming soname for gpm is $with_gpm ..." 1>&5
7045
7046                         cf_cv_gpm_soname="$with_gpm"
7047                 else
7048
7049 echo "$as_me:7049: checking for soname of gpm library" >&5
7050 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7051 if test "${cf_cv_gpm_soname+set}" = set; then
7052   echo $ECHO_N "(cached) $ECHO_C" >&6
7053 else
7054
7055 cf_cv_gpm_soname=unknown
7056 if test "$cross_compiling" != yes ; then
7057 cat >conftest.$ac_ext <<CF_EOF
7058 #include <gpm.h>
7059 int main(void)
7060 {
7061 if (Gpm_Open(0,0)) Gpm_Close();
7062         ${cf_cv_main_return:-return}(0);
7063 }
7064 CF_EOF
7065 cf_save_LIBS="$LIBS"
7066
7067 cf_add_libs="$LIBS"
7068 # reverse order
7069 cf_add_0lib=
7070 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7071 # filter duplicates
7072 for cf_add_1lib in $cf_add_0lib; do
7073         for cf_add_2lib in $cf_add_libs; do
7074                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7075                         cf_add_1lib=
7076                         break
7077                 fi
7078         done
7079         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7080 done
7081 LIBS="$cf_add_libs"
7082
7083         if { (eval echo "$as_me:7083: \"$ac_compile\"") >&5
7084   (eval $ac_compile) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); } ; then
7088                 if { (eval echo "$as_me:7088: \"$ac_link\"") >&5
7089   (eval $ac_link) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit $ac_status); } ; then
7093                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7094                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7095                 fi
7096         fi
7097 rm -rf conftest*
7098 LIBS="$cf_save_LIBS"
7099 fi
7100
7101 fi
7102 echo "$as_me:7102: result: $cf_cv_gpm_soname" >&5
7103 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7104
7105                 fi
7106                 test "$cf_cv_gpm_soname" != "unknown" &&
7107 cat >>confdefs.h <<EOF
7108 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7109 EOF
7110
7111                 SHLIB_LIST="-ldl $SHLIB_LIST"
7112
7113 cf_add_libs="$PRIVATE_LIBS"
7114 # reverse order
7115 cf_add_0lib=
7116 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7117 # filter duplicates
7118 for cf_add_1lib in $cf_add_0lib; do
7119         for cf_add_2lib in $cf_add_libs; do
7120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7121                         cf_add_1lib=
7122                         break
7123                 fi
7124         done
7125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7126 done
7127 PRIVATE_LIBS="$cf_add_libs"
7128
7129         else
7130                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7131
7132 cf_add_libs="$TEST_LIBS"
7133 # reverse order
7134 cf_add_0lib=
7135 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7136 # filter duplicates
7137 for cf_add_1lib in $cf_add_0lib; do
7138         for cf_add_2lib in $cf_add_libs; do
7139                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7140                         cf_add_1lib=
7141                         break
7142                 fi
7143         done
7144         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7145 done
7146 TEST_LIBS="$cf_add_libs"
7147
7148 cf_add_libs="$PRIVATE_LIBS"
7149 # reverse order
7150 cf_add_0lib=
7151 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7152 # filter duplicates
7153 for cf_add_1lib in $cf_add_0lib; do
7154         for cf_add_2lib in $cf_add_libs; do
7155                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7156                         cf_add_1lib=
7157                         break
7158                 fi
7159         done
7160         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7161 done
7162 PRIVATE_LIBS="$cf_add_libs"
7163
7164         fi
7165
7166 cat >>confdefs.h <<\EOF
7167 #define HAVE_LIBGPM 1
7168 EOF
7169
7170 echo "$as_me:7170: checking for Gpm_Wgetch in -lgpm" >&5
7171 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7172 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7173   echo $ECHO_N "(cached) $ECHO_C" >&6
7174 else
7175   ac_check_lib_save_LIBS=$LIBS
7176 LIBS="-lgpm  $LIBS"
7177 cat >conftest.$ac_ext <<_ACEOF
7178 #line 7178 "configure"
7179 #include "confdefs.h"
7180
7181 /* Override any gcc2 internal prototype to avoid an error.  */
7182 #ifdef __cplusplus
7183 extern "C"
7184 #endif
7185 /* We use char because int might match the return type of a gcc2
7186    builtin and then its argument prototype would still apply.  */
7187 char Gpm_Wgetch ();
7188 int
7189 main (void)
7190 {
7191 Gpm_Wgetch ();
7192   ;
7193   return 0;
7194 }
7195 _ACEOF
7196 rm -f conftest.$ac_objext conftest$ac_exeext
7197 if { (eval echo "$as_me:7197: \"$ac_link\"") >&5
7198   (eval $ac_link) 2>&5
7199   ac_status=$?
7200   echo "$as_me:7200: \$? = $ac_status" >&5
7201   (exit $ac_status); } &&
7202          { ac_try='test -s conftest$ac_exeext'
7203   { (eval echo "$as_me:7203: \"$ac_try\"") >&5
7204   (eval $ac_try) 2>&5
7205   ac_status=$?
7206   echo "$as_me:7206: \$? = $ac_status" >&5
7207   (exit $ac_status); }; }; then
7208   ac_cv_lib_gpm_Gpm_Wgetch=yes
7209 else
7210   echo "$as_me: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7212 ac_cv_lib_gpm_Gpm_Wgetch=no
7213 fi
7214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7215 LIBS=$ac_check_lib_save_LIBS
7216 fi
7217 echo "$as_me:7217: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7218 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7219 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7220
7221 echo "$as_me:7221: checking if GPM is weakly bound to curses library" >&5
7222 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7223 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7224   echo $ECHO_N "(cached) $ECHO_C" >&6
7225 else
7226
7227 cf_cv_check_gpm_wgetch=unknown
7228 if test "$cross_compiling" != yes ; then
7229
7230 cat >conftest.$ac_ext <<CF_EOF
7231 #include <gpm.h>
7232 int main(void)
7233 {
7234         Gpm_Wgetch();
7235         ${cf_cv_main_return:-return}(0);
7236 }
7237 CF_EOF
7238
7239         cf_save_LIBS="$LIBS"
7240         # This only works if we can look at the symbol table.  If a shared
7241         # library is stripped for install, we cannot use that.  So we're forced
7242         # to rely on the static library, noting that some packagers may not
7243         # include it.
7244         LIBS="-static -lgpm -dynamic $LIBS"
7245         if { (eval echo "$as_me:7245: \"$ac_compile\"") >&5
7246   (eval $ac_compile) 2>&5
7247   ac_status=$?
7248   echo "$as_me:7248: \$? = $ac_status" >&5
7249   (exit $ac_status); } ; then
7250                 if { (eval echo "$as_me:7250: \"$ac_link\"") >&5
7251   (eval $ac_link) 2>&5
7252   ac_status=$?
7253   echo "$as_me:7253: \$? = $ac_status" >&5
7254   (exit $ac_status); } ; then
7255                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7256                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7257                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7258                 fi
7259         fi
7260         rm -rf conftest*
7261         LIBS="$cf_save_LIBS"
7262 fi
7263
7264 fi
7265 echo "$as_me:7265: result: $cf_cv_check_gpm_wgetch" >&5
7266 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7267
7268 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7269         { echo "$as_me:7269: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7270 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7271 fi
7272
7273 fi
7274
7275 fi
7276
7277 echo "$as_me:7277: checking if you want to use PCRE2 for regular-expressions" >&5
7278 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7279
7280 # Check whether --with-pcre2 or --without-pcre2 was given.
7281 if test "${with_pcre2+set}" = set; then
7282   withval="$with_pcre2"
7283
7284 fi;
7285 test -z "$with_pcre2" && with_pcre2=no
7286 echo "$as_me:7286: result: $with_pcre2" >&5
7287 echo "${ECHO_T}$with_pcre2" >&6
7288
7289 if test "x$with_pcre2" != xno ; then
7290
7291 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7292         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7293
7294 echo "${as_me:-configure}:7294: testing found package libpcre2 ..." 1>&5
7295
7296         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7297         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7298         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7299
7300 echo "${as_me:-configure}:7300: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7301
7302         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7303
7304 echo "${as_me:-configure}:7304: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7305
7306 cf_fix_cppflags=no
7307 cf_new_cflags=
7308 cf_new_cppflags=
7309 cf_new_extra_cppflags=
7310
7311 for cf_add_cflags in $cf_pkgconfig_incs
7312 do
7313 case $cf_fix_cppflags in
7314 (no)
7315         case $cf_add_cflags in
7316         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7317                 case $cf_add_cflags in
7318                 (-D*)
7319                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7320
7321                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7322                                 && test -z "${cf_tst_cflags}" \
7323                                 && cf_fix_cppflags=yes
7324
7325                         if test $cf_fix_cppflags = yes ; then
7326
7327         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7328         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7329
7330                                 continue
7331                         elif test "${cf_tst_cflags}" = "\"'" ; then
7332
7333         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7334         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7335
7336                                 continue
7337                         fi
7338                         ;;
7339                 esac
7340                 case "$CPPFLAGS" in
7341                 (*$cf_add_cflags)
7342                         ;;
7343                 (*)
7344                         case $cf_add_cflags in
7345                         (-D*)
7346                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7347
7348 CPPFLAGS=`echo "$CPPFLAGS" | \
7349         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7350                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7351
7352                                 ;;
7353                         esac
7354
7355         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7356         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7357
7358                         ;;
7359                 esac
7360                 ;;
7361         (*)
7362
7363         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7364         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7365
7366                 ;;
7367         esac
7368         ;;
7369 (yes)
7370
7371         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7372         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7373
7374         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7375
7376         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7377                 && test -z "${cf_tst_cflags}" \
7378                 && cf_fix_cppflags=no
7379         ;;
7380 esac
7381 done
7382
7383 if test -n "$cf_new_cflags" ; then
7384
7385         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7386         CFLAGS="${CFLAGS}$cf_new_cflags"
7387
7388 fi
7389
7390 if test -n "$cf_new_cppflags" ; then
7391
7392         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7393         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7394
7395 fi
7396
7397 if test -n "$cf_new_extra_cppflags" ; then
7398
7399         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7400         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7401
7402 fi
7403
7404 cf_add_libs="$LIBS"
7405 # reverse order
7406 cf_add_0lib=
7407 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7408 # filter duplicates
7409 for cf_add_1lib in $cf_add_0lib; do
7410         for cf_add_2lib in $cf_add_libs; do
7411                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7412                         cf_add_1lib=
7413                         break
7414                 fi
7415         done
7416         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7417 done
7418 LIBS="$cf_add_libs"
7419
7420         :
7421 else
7422         cf_pkgconfig_incs=
7423         cf_pkgconfig_libs=
7424
7425 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7426         test -n "$verbose" && echo "    found package libpcre" 1>&6
7427
7428 echo "${as_me:-configure}:7428: testing found package libpcre ..." 1>&5
7429
7430         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7431         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7432         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7433
7434 echo "${as_me:-configure}:7434: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7435
7436         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7437
7438 echo "${as_me:-configure}:7438: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7439
7440 cf_fix_cppflags=no
7441 cf_new_cflags=
7442 cf_new_cppflags=
7443 cf_new_extra_cppflags=
7444
7445 for cf_add_cflags in $cf_pkgconfig_incs
7446 do
7447 case $cf_fix_cppflags in
7448 (no)
7449         case $cf_add_cflags in
7450         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7451                 case $cf_add_cflags in
7452                 (-D*)
7453                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7454
7455                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7456                                 && test -z "${cf_tst_cflags}" \
7457                                 && cf_fix_cppflags=yes
7458
7459                         if test $cf_fix_cppflags = yes ; then
7460
7461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7463
7464                                 continue
7465                         elif test "${cf_tst_cflags}" = "\"'" ; then
7466
7467         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7468         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7469
7470                                 continue
7471                         fi
7472                         ;;
7473                 esac
7474                 case "$CPPFLAGS" in
7475                 (*$cf_add_cflags)
7476                         ;;
7477                 (*)
7478                         case $cf_add_cflags in
7479                         (-D*)
7480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7481
7482 CPPFLAGS=`echo "$CPPFLAGS" | \
7483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7485
7486                                 ;;
7487                         esac
7488
7489         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7490         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7491
7492                         ;;
7493                 esac
7494                 ;;
7495         (*)
7496
7497         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7498         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7499
7500                 ;;
7501         esac
7502         ;;
7503 (yes)
7504
7505         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7506         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7507
7508         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7509
7510         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7511                 && test -z "${cf_tst_cflags}" \
7512                 && cf_fix_cppflags=no
7513         ;;
7514 esac
7515 done
7516
7517 if test -n "$cf_new_cflags" ; then
7518
7519         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7520         CFLAGS="${CFLAGS}$cf_new_cflags"
7521
7522 fi
7523
7524 if test -n "$cf_new_cppflags" ; then
7525
7526         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7527         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7528
7529 fi
7530
7531 if test -n "$cf_new_extra_cppflags" ; then
7532
7533         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7534         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7535
7536 fi
7537
7538 cf_add_libs="$LIBS"
7539 # reverse order
7540 cf_add_0lib=
7541 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7542 # filter duplicates
7543 for cf_add_1lib in $cf_add_0lib; do
7544         for cf_add_2lib in $cf_add_libs; do
7545                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7546                         cf_add_1lib=
7547                         break
7548                 fi
7549         done
7550         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7551 done
7552 LIBS="$cf_add_libs"
7553
7554         :
7555 else
7556         cf_pkgconfig_incs=
7557         cf_pkgconfig_libs=
7558
7559                         { { echo "$as_me:7559: error: Cannot find PCRE2 library" >&5
7560 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7561    { (exit 1); exit 1; }; }
7562 fi
7563
7564 fi
7565
7566 cat >>confdefs.h <<\EOF
7567 #define HAVE_LIB_PCRE2 1
7568 EOF
7569
7570         # if pkgconfig gave no results, look for the libraries directly
7571         case $LIBS in
7572         (*pcre2-posix*|*pcreposix*)
7573                 ;;
7574         (*)
7575                 echo "$as_me:7575: checking for regcomp in -lpcre2-posix" >&5
7576 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7577 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7578   echo $ECHO_N "(cached) $ECHO_C" >&6
7579 else
7580   ac_check_lib_save_LIBS=$LIBS
7581 LIBS="-lpcre2-posix  $LIBS"
7582 cat >conftest.$ac_ext <<_ACEOF
7583 #line 7583 "configure"
7584 #include "confdefs.h"
7585
7586 /* Override any gcc2 internal prototype to avoid an error.  */
7587 #ifdef __cplusplus
7588 extern "C"
7589 #endif
7590 /* We use char because int might match the return type of a gcc2
7591    builtin and then its argument prototype would still apply.  */
7592 char regcomp ();
7593 int
7594 main (void)
7595 {
7596 regcomp ();
7597   ;
7598   return 0;
7599 }
7600 _ACEOF
7601 rm -f conftest.$ac_objext conftest$ac_exeext
7602 if { (eval echo "$as_me:7602: \"$ac_link\"") >&5
7603   (eval $ac_link) 2>&5
7604   ac_status=$?
7605   echo "$as_me:7605: \$? = $ac_status" >&5
7606   (exit $ac_status); } &&
7607          { ac_try='test -s conftest$ac_exeext'
7608   { (eval echo "$as_me:7608: \"$ac_try\"") >&5
7609   (eval $ac_try) 2>&5
7610   ac_status=$?
7611   echo "$as_me:7611: \$? = $ac_status" >&5
7612   (exit $ac_status); }; }; then
7613   ac_cv_lib_pcre2_posix_regcomp=yes
7614 else
7615   echo "$as_me: failed program was:" >&5
7616 cat conftest.$ac_ext >&5
7617 ac_cv_lib_pcre2_posix_regcomp=no
7618 fi
7619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7620 LIBS=$ac_check_lib_save_LIBS
7621 fi
7622 echo "$as_me:7622: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7623 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7624 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7625
7626 cf_add_libs="$LIBS"
7627 # reverse order
7628 cf_add_0lib=
7629 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7630 # filter duplicates
7631 for cf_add_1lib in $cf_add_0lib; do
7632         for cf_add_2lib in $cf_add_libs; do
7633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7634                         cf_add_1lib=
7635                         break
7636                 fi
7637         done
7638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7639 done
7640 LIBS="$cf_add_libs"
7641
7642 else
7643   echo "$as_me:7643: checking for regcomp in -lpcreposix" >&5
7644 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7645 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7646   echo $ECHO_N "(cached) $ECHO_C" >&6
7647 else
7648   ac_check_lib_save_LIBS=$LIBS
7649 LIBS="-lpcreposix  $LIBS"
7650 cat >conftest.$ac_ext <<_ACEOF
7651 #line 7651 "configure"
7652 #include "confdefs.h"
7653
7654 /* Override any gcc2 internal prototype to avoid an error.  */
7655 #ifdef __cplusplus
7656 extern "C"
7657 #endif
7658 /* We use char because int might match the return type of a gcc2
7659    builtin and then its argument prototype would still apply.  */
7660 char regcomp ();
7661 int
7662 main (void)
7663 {
7664 regcomp ();
7665   ;
7666   return 0;
7667 }
7668 _ACEOF
7669 rm -f conftest.$ac_objext conftest$ac_exeext
7670 if { (eval echo "$as_me:7670: \"$ac_link\"") >&5
7671   (eval $ac_link) 2>&5
7672   ac_status=$?
7673   echo "$as_me:7673: \$? = $ac_status" >&5
7674   (exit $ac_status); } &&
7675          { ac_try='test -s conftest$ac_exeext'
7676   { (eval echo "$as_me:7676: \"$ac_try\"") >&5
7677   (eval $ac_try) 2>&5
7678   ac_status=$?
7679   echo "$as_me:7679: \$? = $ac_status" >&5
7680   (exit $ac_status); }; }; then
7681   ac_cv_lib_pcreposix_regcomp=yes
7682 else
7683   echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7685 ac_cv_lib_pcreposix_regcomp=no
7686 fi
7687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7688 LIBS=$ac_check_lib_save_LIBS
7689 fi
7690 echo "$as_me:7690: result: $ac_cv_lib_pcreposix_regcomp" >&5
7691 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7692 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7693
7694 cf_add_libs="$LIBS"
7695 # reverse order
7696 cf_add_0lib=
7697 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7698 # filter duplicates
7699 for cf_add_1lib in $cf_add_0lib; do
7700         for cf_add_2lib in $cf_add_libs; do
7701                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7702                         cf_add_1lib=
7703                         break
7704                 fi
7705         done
7706         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7707 done
7708 LIBS="$cf_add_libs"
7709
7710 else
7711   { { echo "$as_me:7711: error: Cannot find PCRE2 POSIX library" >&5
7712 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7713    { (exit 1); exit 1; }; }
7714 fi
7715
7716 fi
7717
7718                 ;;
7719         esac
7720
7721         # either way, check for the library header files
7722
7723 for ac_header in pcre2posix.h pcreposix.h
7724 do
7725 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7726 echo "$as_me:7726: checking for $ac_header" >&5
7727 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7729   echo $ECHO_N "(cached) $ECHO_C" >&6
7730 else
7731   cat >conftest.$ac_ext <<_ACEOF
7732 #line 7732 "configure"
7733 #include "confdefs.h"
7734 #include <$ac_header>
7735 _ACEOF
7736 if { (eval echo "$as_me:7736: \"$ac_cpp conftest.$ac_ext\"") >&5
7737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7738   ac_status=$?
7739   egrep -v '^ *\+' conftest.er1 >conftest.err
7740   rm -f conftest.er1
7741   cat conftest.err >&5
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); } >/dev/null; then
7744   if test -s conftest.err; then
7745     ac_cpp_err=$ac_c_preproc_warn_flag
7746   else
7747     ac_cpp_err=
7748   fi
7749 else
7750   ac_cpp_err=yes
7751 fi
7752 if test -z "$ac_cpp_err"; then
7753   eval "$as_ac_Header=yes"
7754 else
7755   echo "$as_me: failed program was:" >&5
7756   cat conftest.$ac_ext >&5
7757   eval "$as_ac_Header=no"
7758 fi
7759 rm -f conftest.err conftest.$ac_ext
7760 fi
7761 echo "$as_me:7761: result: `eval echo '${'$as_ac_Header'}'`" >&5
7762 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7763 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7764   cat >>confdefs.h <<EOF
7765 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7766 EOF
7767
7768 fi
7769 done
7770
7771 fi
7772
7773 # not everyone has "test -c"
7774 if test -c /dev/sysmouse 2>/dev/null ; then
7775 echo "$as_me:7775: checking if you want to use sysmouse" >&5
7776 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7777
7778 # Check whether --with-sysmouse or --without-sysmouse was given.
7779 if test "${with_sysmouse+set}" = set; then
7780   withval="$with_sysmouse"
7781   cf_with_sysmouse=$withval
7782 else
7783   cf_with_sysmouse=maybe
7784 fi;
7785         if test "$cf_with_sysmouse" != no ; then
7786         cat >conftest.$ac_ext <<_ACEOF
7787 #line 7787 "configure"
7788 #include "confdefs.h"
7789
7790 #include <osreldate.h>
7791 #if (__FreeBSD_version >= 400017)
7792 #include <sys/consio.h>
7793 #include <sys/fbio.h>
7794 #else
7795 #include <machine/console.h>
7796 #endif
7797
7798 int
7799 main (void)
7800 {
7801
7802         struct mouse_info the_mouse;
7803         ioctl(0, CONS_MOUSECTL, &the_mouse);
7804
7805   ;
7806   return 0;
7807 }
7808 _ACEOF
7809 rm -f conftest.$ac_objext
7810 if { (eval echo "$as_me:7810: \"$ac_compile\"") >&5
7811   (eval $ac_compile) 2>&5
7812   ac_status=$?
7813   echo "$as_me:7813: \$? = $ac_status" >&5
7814   (exit $ac_status); } &&
7815          { ac_try='test -s conftest.$ac_objext'
7816   { (eval echo "$as_me:7816: \"$ac_try\"") >&5
7817   (eval $ac_try) 2>&5
7818   ac_status=$?
7819   echo "$as_me:7819: \$? = $ac_status" >&5
7820   (exit $ac_status); }; }; then
7821   cf_with_sysmouse=yes
7822 else
7823   echo "$as_me: failed program was:" >&5
7824 cat conftest.$ac_ext >&5
7825 cf_with_sysmouse=no
7826 fi
7827 rm -f conftest.$ac_objext conftest.$ac_ext
7828         fi
7829 echo "$as_me:7829: result: $cf_with_sysmouse" >&5
7830 echo "${ECHO_T}$cf_with_sysmouse" >&6
7831 test "$cf_with_sysmouse" = yes &&
7832 cat >>confdefs.h <<\EOF
7833 #define USE_SYSMOUSE 1
7834 EOF
7835
7836 fi
7837
7838 # pretend that ncurses==ncursesw==ncursest
7839 echo "$as_me:7839: checking if you want to disable library suffixes" >&5
7840 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7841
7842 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7843 if test "${enable_lib_suffixes+set}" = set; then
7844   enableval="$enable_lib_suffixes"
7845   test "$enableval" != no && enableval=yes
7846         if test "$enableval" != "yes" ; then
7847     disable_lib_suffixes=yes
7848         else
7849                 disable_lib_suffixes=no
7850         fi
7851 else
7852   enableval=yes
7853         disable_lib_suffixes=no
7854
7855 fi;
7856 echo "$as_me:7856: result: $disable_lib_suffixes" >&5
7857 echo "${ECHO_T}$disable_lib_suffixes" >&6
7858
7859 ### If we're building with rpath, try to link non-standard libs that way too.
7860 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7861
7862 echo "$as_me:7862: checking if rpath-hack should be disabled" >&5
7863 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7864
7865 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7866 if test "${enable_rpath_hack+set}" = set; then
7867   enableval="$enable_rpath_hack"
7868   test "$enableval" != no && enableval=yes
7869         if test "$enableval" != "yes" ; then
7870     cf_disable_rpath_hack=yes
7871         else
7872                 cf_disable_rpath_hack=no
7873         fi
7874 else
7875   enableval=yes
7876         cf_disable_rpath_hack=no
7877
7878 fi;
7879 echo "$as_me:7879: result: $cf_disable_rpath_hack" >&5
7880 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7881 if test "$cf_disable_rpath_hack" = no ; then
7882
7883 echo "$as_me:7883: checking for updated LDFLAGS" >&5
7884 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7885 if test -n "$LD_RPATH_OPT" ; then
7886         echo "$as_me:7886: result: maybe" >&5
7887 echo "${ECHO_T}maybe" >&6
7888
7889         for ac_prog in ldd
7890 do
7891   # Extract the first word of "$ac_prog", so it can be a program name with args.
7892 set dummy $ac_prog; ac_word=$2
7893 echo "$as_me:7893: checking for $ac_word" >&5
7894 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7895 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7896   echo $ECHO_N "(cached) $ECHO_C" >&6
7897 else
7898   if test -n "$cf_ldd_prog"; then
7899   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7900 else
7901   ac_save_IFS=$IFS; IFS=$ac_path_separator
7902 ac_dummy="$PATH"
7903 for ac_dir in $ac_dummy; do
7904   IFS=$ac_save_IFS
7905   test -z "$ac_dir" && ac_dir=.
7906   $as_executable_p "$ac_dir/$ac_word" || continue
7907 ac_cv_prog_cf_ldd_prog="$ac_prog"
7908 echo "$as_me:7908: found $ac_dir/$ac_word" >&5
7909 break
7910 done
7911
7912 fi
7913 fi
7914 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7915 if test -n "$cf_ldd_prog"; then
7916   echo "$as_me:7916: result: $cf_ldd_prog" >&5
7917 echo "${ECHO_T}$cf_ldd_prog" >&6
7918 else
7919   echo "$as_me:7919: result: no" >&5
7920 echo "${ECHO_T}no" >&6
7921 fi
7922
7923   test -n "$cf_ldd_prog" && break
7924 done
7925 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7926
7927         cf_rpath_list="/usr/lib /lib"
7928         if test "$cf_ldd_prog" != no
7929         then
7930                 cf_rpath_oops=
7931
7932 cat >conftest.$ac_ext <<_ACEOF
7933 #line 7933 "configure"
7934 #include "confdefs.h"
7935 #include <stdio.h>
7936 int
7937 main (void)
7938 {
7939 printf("Hello");
7940   ;
7941   return 0;
7942 }
7943 _ACEOF
7944 rm -f conftest.$ac_objext conftest$ac_exeext
7945 if { (eval echo "$as_me:7945: \"$ac_link\"") >&5
7946   (eval $ac_link) 2>&5
7947   ac_status=$?
7948   echo "$as_me:7948: \$? = $ac_status" >&5
7949   (exit $ac_status); } &&
7950          { ac_try='test -s conftest$ac_exeext'
7951   { (eval echo "$as_me:7951: \"$ac_try\"") >&5
7952   (eval $ac_try) 2>&5
7953   ac_status=$?
7954   echo "$as_me:7954: \$? = $ac_status" >&5
7955   (exit $ac_status); }; }; then
7956   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7957                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7958 else
7959   echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961 fi
7962 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7963
7964                 # If we passed the link-test, but get a "not found" on a given library,
7965                 # this could be due to inept reconfiguration of gcc to make it only
7966                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7967                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7968                 # /usr/local libraries.
7969                 if test -n "$cf_rpath_oops"
7970                 then
7971                         for cf_rpath_src in $cf_rpath_oops
7972                         do
7973                                 for cf_rpath_dir in \
7974                                         /usr/local \
7975                                         /usr/pkg \
7976                                         /opt/sfw
7977                                 do
7978                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7979                                         then
7980                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7981
7982 echo "${as_me:-configure}:7982: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7983
7984                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7985                                                 break
7986                                         fi
7987                                 done
7988                         done
7989                 fi
7990         fi
7991
7992         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7993
7994 echo "${as_me:-configure}:7994: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7995
7996 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7997
7998 echo "${as_me:-configure}:7998: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7999
8000 cf_rpath_dst=
8001 for cf_rpath_src in $LDFLAGS
8002 do
8003         case $cf_rpath_src in
8004         (-L*)
8005
8006                 # check if this refers to a directory which we will ignore
8007                 cf_rpath_skip=no
8008                 if test -n "$cf_rpath_list"
8009                 then
8010                         for cf_rpath_item in $cf_rpath_list
8011                         do
8012                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8013                                 then
8014                                         cf_rpath_skip=yes
8015                                         break
8016                                 fi
8017                         done
8018                 fi
8019
8020                 if test "$cf_rpath_skip" = no
8021                 then
8022                         # transform the option
8023                         if test "$LD_RPATH_OPT" = "-R " ; then
8024                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8025                         else
8026                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8027                         fi
8028
8029                         # if we have not already added this, add it now
8030                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8031                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8032                         then
8033                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8034
8035 echo "${as_me:-configure}:8035: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8036
8037                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8038                         fi
8039                 fi
8040                 ;;
8041         esac
8042         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8043 done
8044 LDFLAGS=$cf_rpath_dst
8045
8046 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8047
8048 echo "${as_me:-configure}:8048: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8049
8050 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8051
8052 echo "${as_me:-configure}:8052: testing ...checking LIBS $LIBS ..." 1>&5
8053
8054 cf_rpath_dst=
8055 for cf_rpath_src in $LIBS
8056 do
8057         case $cf_rpath_src in
8058         (-L*)
8059
8060                 # check if this refers to a directory which we will ignore
8061                 cf_rpath_skip=no
8062                 if test -n "$cf_rpath_list"
8063                 then
8064                         for cf_rpath_item in $cf_rpath_list
8065                         do
8066                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8067                                 then
8068                                         cf_rpath_skip=yes
8069                                         break
8070                                 fi
8071                         done
8072                 fi
8073
8074                 if test "$cf_rpath_skip" = no
8075                 then
8076                         # transform the option
8077                         if test "$LD_RPATH_OPT" = "-R " ; then
8078                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8079                         else
8080                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8081                         fi
8082
8083                         # if we have not already added this, add it now
8084                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8085                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8086                         then
8087                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8088
8089 echo "${as_me:-configure}:8089: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8090
8091                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8092                         fi
8093                 fi
8094                 ;;
8095         esac
8096         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8097 done
8098 LIBS=$cf_rpath_dst
8099
8100 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8101
8102 echo "${as_me:-configure}:8102: testing ...checked LIBS $LIBS ..." 1>&5
8103
8104         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8105
8106 echo "${as_me:-configure}:8106: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8107
8108 else
8109         echo "$as_me:8109: result: no" >&5
8110 echo "${ECHO_T}no" >&6
8111 fi
8112
8113 fi
8114
8115 fi
8116
8117 ### Depending on the system, someone may use rpath to build ncurses but not
8118 # want users of the package to rely upon that feature.  Give those people an
8119 # option to suppress that detail from EXTRA_LDFLAGS.
8120 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8121 if test -n "$EXTRA_PKG_LDFLAGS"
8122 then
8123         echo "$as_me:8123: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8124 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8125
8126 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8127 if test "${enable_pkg_ldflags+set}" = set; then
8128   enableval="$enable_pkg_ldflags"
8129   test "$enableval" != no && enableval=yes
8130         if test "$enableval" != "yes" ; then
8131     disable_pkg_ldflags=yes
8132         else
8133                 disable_pkg_ldflags=no
8134         fi
8135 else
8136   enableval=yes
8137         disable_pkg_ldflags=no
8138
8139 fi;
8140         echo "$as_me:8140: result: $disable_pkg_ldflags" >&5
8141 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8142         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8143 fi
8144
8145 ###############################################################################
8146
8147 ###     use option --with-extra-suffix to append suffix to headers and libraries
8148 echo "$as_me:8148: checking if you wish to append extra suffix to header/library paths" >&5
8149 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8150 EXTRA_SUFFIX=
8151
8152 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8153 if test "${with_extra_suffix+set}" = set; then
8154   withval="$with_extra_suffix"
8155   case x$withval in
8156         (no)
8157                 ;;
8158         (xyes|x)
8159                 EXTRA_SUFFIX=$cf_cv_abi_version
8160                 ;;
8161         (*)
8162                 EXTRA_SUFFIX=$withval
8163                 ;;
8164         esac
8165
8166 fi;
8167 echo "$as_me:8167: result: $EXTRA_SUFFIX" >&5
8168 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8169
8170 ###     use option --disable-overwrite to leave out the link to -lcurses
8171 echo "$as_me:8171: checking if you wish to install ncurses overwriting curses" >&5
8172 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8173
8174 # Check whether --enable-overwrite or --disable-overwrite was given.
8175 if test "${enable_overwrite+set}" = set; then
8176   enableval="$enable_overwrite"
8177   with_overwrite=$enableval
8178 else
8179   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8180 fi;
8181 echo "$as_me:8181: result: $with_overwrite" >&5
8182 echo "${ECHO_T}$with_overwrite" >&6
8183
8184 echo "$as_me:8184: checking if external terminfo-database is used" >&5
8185 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8186
8187 # Check whether --enable-database or --disable-database was given.
8188 if test "${enable_database+set}" = set; then
8189   enableval="$enable_database"
8190   use_database=$enableval
8191 else
8192   use_database=yes
8193 fi;
8194 echo "$as_me:8194: result: $use_database" >&5
8195 echo "${ECHO_T}$use_database" >&6
8196
8197 case $host_os in
8198 (os2*)
8199         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8200         ;;
8201 (*)
8202         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8203         ;;
8204 esac
8205
8206 NCURSES_USE_DATABASE=0
8207 if test "$use_database" != no ; then
8208         NCURSES_USE_DATABASE=1
8209
8210         echo "$as_me:8210: checking which terminfo source-file will be installed" >&5
8211 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8212
8213 # Check whether --with-database or --without-database was given.
8214 if test "${with_database+set}" = set; then
8215   withval="$with_database"
8216   TERMINFO_SRC=$withval
8217 fi;
8218         echo "$as_me:8218: result: $TERMINFO_SRC" >&5
8219 echo "${ECHO_T}$TERMINFO_SRC" >&6
8220
8221         echo "$as_me:8221: checking whether to use hashed database instead of directory/tree" >&5
8222 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8223
8224 # Check whether --with-hashed-db or --without-hashed-db was given.
8225 if test "${with_hashed_db+set}" = set; then
8226   withval="$with_hashed_db"
8227
8228 else
8229   with_hashed_db=no
8230 fi;
8231         echo "$as_me:8231: result: $with_hashed_db" >&5
8232 echo "${ECHO_T}$with_hashed_db" >&6
8233 else
8234         with_hashed_db=no
8235 fi
8236
8237 echo "$as_me:8237: checking for list of fallback descriptions" >&5
8238 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8239
8240 # Check whether --with-fallbacks or --without-fallbacks was given.
8241 if test "${with_fallbacks+set}" = set; then
8242   withval="$with_fallbacks"
8243   with_fallback=$withval
8244 else
8245   with_fallback=
8246 fi;
8247 echo "$as_me:8247: result: $with_fallback" >&5
8248 echo "${ECHO_T}$with_fallback" >&6
8249
8250 case ".$with_fallback" in
8251 (.|.no)
8252         FALLBACK_LIST=
8253         ;;
8254 (.yes)
8255         { echo "$as_me:8255: WARNING: expected a list of terminal descriptions" >&5
8256 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8257         ;;
8258 (*)
8259         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8260         ;;
8261 esac
8262
8263 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8264 # tree for generating the terminal descriptions that will be compiled into the
8265 # library.  If your toolchain is old, it may not handle current terminal
8266 # databases.  Use configure-options to point to the tools which will be used,
8267 # rather than the first ones found on the $PATH.
8268 if test -n "$ac_tool_prefix"; then
8269   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8270 set dummy ${ac_tool_prefix}tic; ac_word=$2
8271 echo "$as_me:8271: checking for $ac_word" >&5
8272 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8273 if test "${ac_cv_prog_TIC+set}" = set; then
8274   echo $ECHO_N "(cached) $ECHO_C" >&6
8275 else
8276   if test -n "$TIC"; then
8277   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8278 else
8279   ac_save_IFS=$IFS; IFS=$ac_path_separator
8280 ac_dummy="$PATH"
8281 for ac_dir in $ac_dummy; do
8282   IFS=$ac_save_IFS
8283   test -z "$ac_dir" && ac_dir=.
8284   $as_executable_p "$ac_dir/$ac_word" || continue
8285 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8286 echo "$as_me:8286: found $ac_dir/$ac_word" >&5
8287 break
8288 done
8289
8290 fi
8291 fi
8292 TIC=$ac_cv_prog_TIC
8293 if test -n "$TIC"; then
8294   echo "$as_me:8294: result: $TIC" >&5
8295 echo "${ECHO_T}$TIC" >&6
8296 else
8297   echo "$as_me:8297: result: no" >&5
8298 echo "${ECHO_T}no" >&6
8299 fi
8300
8301 fi
8302 if test -z "$ac_cv_prog_TIC"; then
8303   ac_ct_TIC=$TIC
8304   # Extract the first word of "tic", so it can be a program name with args.
8305 set dummy tic; ac_word=$2
8306 echo "$as_me:8306: checking for $ac_word" >&5
8307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8308 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8309   echo $ECHO_N "(cached) $ECHO_C" >&6
8310 else
8311   if test -n "$ac_ct_TIC"; then
8312   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8313 else
8314   ac_save_IFS=$IFS; IFS=$ac_path_separator
8315 ac_dummy="$PATH"
8316 for ac_dir in $ac_dummy; do
8317   IFS=$ac_save_IFS
8318   test -z "$ac_dir" && ac_dir=.
8319   $as_executable_p "$ac_dir/$ac_word" || continue
8320 ac_cv_prog_ac_ct_TIC="tic"
8321 echo "$as_me:8321: found $ac_dir/$ac_word" >&5
8322 break
8323 done
8324
8325 fi
8326 fi
8327 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8328 if test -n "$ac_ct_TIC"; then
8329   echo "$as_me:8329: result: $ac_ct_TIC" >&5
8330 echo "${ECHO_T}$ac_ct_TIC" >&6
8331 else
8332   echo "$as_me:8332: result: no" >&5
8333 echo "${ECHO_T}no" >&6
8334 fi
8335
8336   TIC=$ac_ct_TIC
8337 else
8338   TIC="$ac_cv_prog_TIC"
8339 fi
8340
8341 if test -n "$ac_tool_prefix"; then
8342   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8343 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8344 echo "$as_me:8344: checking for $ac_word" >&5
8345 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8346 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8347   echo $ECHO_N "(cached) $ECHO_C" >&6
8348 else
8349   if test -n "$INFOCMP"; then
8350   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8351 else
8352   ac_save_IFS=$IFS; IFS=$ac_path_separator
8353 ac_dummy="$PATH"
8354 for ac_dir in $ac_dummy; do
8355   IFS=$ac_save_IFS
8356   test -z "$ac_dir" && ac_dir=.
8357   $as_executable_p "$ac_dir/$ac_word" || continue
8358 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8359 echo "$as_me:8359: found $ac_dir/$ac_word" >&5
8360 break
8361 done
8362
8363 fi
8364 fi
8365 INFOCMP=$ac_cv_prog_INFOCMP
8366 if test -n "$INFOCMP"; then
8367   echo "$as_me:8367: result: $INFOCMP" >&5
8368 echo "${ECHO_T}$INFOCMP" >&6
8369 else
8370   echo "$as_me:8370: result: no" >&5
8371 echo "${ECHO_T}no" >&6
8372 fi
8373
8374 fi
8375 if test -z "$ac_cv_prog_INFOCMP"; then
8376   ac_ct_INFOCMP=$INFOCMP
8377   # Extract the first word of "infocmp", so it can be a program name with args.
8378 set dummy infocmp; ac_word=$2
8379 echo "$as_me:8379: checking for $ac_word" >&5
8380 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8381 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   if test -n "$ac_ct_INFOCMP"; then
8385   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8386 else
8387   ac_save_IFS=$IFS; IFS=$ac_path_separator
8388 ac_dummy="$PATH"
8389 for ac_dir in $ac_dummy; do
8390   IFS=$ac_save_IFS
8391   test -z "$ac_dir" && ac_dir=.
8392   $as_executable_p "$ac_dir/$ac_word" || continue
8393 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8394 echo "$as_me:8394: found $ac_dir/$ac_word" >&5
8395 break
8396 done
8397
8398 fi
8399 fi
8400 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8401 if test -n "$ac_ct_INFOCMP"; then
8402   echo "$as_me:8402: result: $ac_ct_INFOCMP" >&5
8403 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8404 else
8405   echo "$as_me:8405: result: no" >&5
8406 echo "${ECHO_T}no" >&6
8407 fi
8408
8409   INFOCMP=$ac_ct_INFOCMP
8410 else
8411   INFOCMP="$ac_cv_prog_INFOCMP"
8412 fi
8413
8414 if test -n "$FALLBACK_LIST"
8415 then
8416
8417 # Check whether --with-tic-path or --without-tic-path was given.
8418 if test "${with_tic_path+set}" = set; then
8419   withval="$with_tic_path"
8420   echo "$as_me:8420: checking for tic program for fallbacks" >&5
8421 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8422                 TIC=$withval
8423                 echo "$as_me:8423: result: $TIC" >&5
8424 echo "${ECHO_T}$TIC" >&6
8425
8426 if test "x$prefix" != xNONE; then
8427         cf_path_syntax="$prefix"
8428 else
8429         cf_path_syntax="$ac_default_prefix"
8430 fi
8431
8432 case ".$TIC" in
8433 (.\$\(*\)*|.\'*\'*)
8434         ;;
8435 (..|./*|.\\*)
8436         ;;
8437 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8438         ;;
8439 (.\${*prefix}*|.\${*dir}*)
8440         eval TIC="$TIC"
8441         case ".$TIC" in
8442         (.NONE/*)
8443                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8444                 ;;
8445         esac
8446         ;;
8447 (.no|.NONE/*)
8448         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8449         ;;
8450 (*)
8451         { { echo "$as_me:8451: error: expected a pathname, not \"$TIC\"" >&5
8452 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8453    { (exit 1); exit 1; }; }
8454         ;;
8455 esac
8456
8457 else
8458
8459 test -z "$TIC" && TIC=tic
8460 for ac_prog in $TIC tic
8461 do
8462   # Extract the first word of "$ac_prog", so it can be a program name with args.
8463 set dummy $ac_prog; ac_word=$2
8464 echo "$as_me:8464: checking for $ac_word" >&5
8465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8466 if test "${ac_cv_path_TIC+set}" = set; then
8467   echo $ECHO_N "(cached) $ECHO_C" >&6
8468 else
8469   case $TIC in
8470   [\\/]* | ?:[\\/]*)
8471   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8472   ;;
8473   *)
8474   ac_save_IFS=$IFS; IFS=$ac_path_separator
8475 ac_dummy="$PATH:/usr/local/ncurses/bin"
8476 for ac_dir in $ac_dummy; do
8477   IFS=$ac_save_IFS
8478   test -z "$ac_dir" && ac_dir=.
8479   if $as_executable_p "$ac_dir/$ac_word"; then
8480    ac_cv_path_TIC="$ac_dir/$ac_word"
8481    echo "$as_me:8481: found $ac_dir/$ac_word" >&5
8482    break
8483 fi
8484 done
8485
8486   ;;
8487 esac
8488 fi
8489 TIC=$ac_cv_path_TIC
8490
8491 if test -n "$TIC"; then
8492   echo "$as_me:8492: result: $TIC" >&5
8493 echo "${ECHO_T}$TIC" >&6
8494 else
8495   echo "$as_me:8495: result: no" >&5
8496 echo "${ECHO_T}no" >&6
8497 fi
8498
8499   test -n "$TIC" && break
8500 done
8501 test -n "$TIC" || TIC="$TIC"
8502
8503 cf_path_prog=""
8504 cf_path_args=""
8505 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8506 for cf_temp in $ac_cv_path_TIC
8507 do
8508         if test -z "$cf_path_prog" ; then
8509                 if test "$with_full_paths" = yes ; then
8510
8511 if test "x$prefix" != xNONE; then
8512         cf_path_syntax="$prefix"
8513 else
8514         cf_path_syntax="$ac_default_prefix"
8515 fi
8516
8517 case ".$cf_temp" in
8518 (.\$\(*\)*|.\'*\'*)
8519         ;;
8520 (..|./*|.\\*)
8521         ;;
8522 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8523         ;;
8524 (.\${*prefix}*|.\${*dir}*)
8525         eval cf_temp="$cf_temp"
8526         case ".$cf_temp" in
8527         (.NONE/*)
8528                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8529                 ;;
8530         esac
8531         ;;
8532 (.no|.NONE/*)
8533         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8534         ;;
8535 (*)
8536         break
8537         ;;
8538 esac
8539
8540                         cf_path_prog="$cf_temp"
8541                 else
8542                         cf_path_prog="`basename $cf_temp`"
8543                 fi
8544         elif test -z "$cf_path_args" ; then
8545                 cf_path_args="$cf_temp"
8546         else
8547                 cf_path_args="$cf_path_args $cf_temp"
8548         fi
8549 done
8550 IFS="$cf_save_ifs"
8551
8552 if test -n "$cf_path_prog" ; then
8553
8554 echo "${as_me:-configure}:8554: testing defining path for ${cf_path_prog} ..." 1>&5
8555
8556 cat >>confdefs.h <<EOF
8557 #define TIC_PATH "$cf_path_prog"
8558 EOF
8559
8560         test -n "$cf_path_args" &&
8561 cat >>confdefs.h <<EOF
8562 #define TIC_ARGS "$cf_path_args"
8563 EOF
8564
8565 fi
8566
8567                 if test -z "$TIC"
8568                 then
8569                         { echo "$as_me:8569: WARNING: no tic program found for fallbacks" >&5
8570 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8571                 fi
8572
8573 fi;
8574
8575 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8576 if test "${with_infocmp_path+set}" = set; then
8577   withval="$with_infocmp_path"
8578   echo "$as_me:8578: checking for infocmp program for fallbacks" >&5
8579 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8580                 INFOCMP=$withval
8581                 echo "$as_me:8581: result: $INFOCMP" >&5
8582 echo "${ECHO_T}$INFOCMP" >&6
8583
8584 if test "x$prefix" != xNONE; then
8585         cf_path_syntax="$prefix"
8586 else
8587         cf_path_syntax="$ac_default_prefix"
8588 fi
8589
8590 case ".$INFOCMP" in
8591 (.\$\(*\)*|.\'*\'*)
8592         ;;
8593 (..|./*|.\\*)
8594         ;;
8595 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8596         ;;
8597 (.\${*prefix}*|.\${*dir}*)
8598         eval INFOCMP="$INFOCMP"
8599         case ".$INFOCMP" in
8600         (.NONE/*)
8601                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8602                 ;;
8603         esac
8604         ;;
8605 (.no|.NONE/*)
8606         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8607         ;;
8608 (*)
8609         { { echo "$as_me:8609: error: expected a pathname, not \"$INFOCMP\"" >&5
8610 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8611    { (exit 1); exit 1; }; }
8612         ;;
8613 esac
8614
8615 else
8616
8617 test -z "$INFOCMP" && INFOCMP=infocmp
8618 for ac_prog in $INFOCMP infocmp
8619 do
8620   # Extract the first word of "$ac_prog", so it can be a program name with args.
8621 set dummy $ac_prog; ac_word=$2
8622 echo "$as_me:8622: checking for $ac_word" >&5
8623 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8624 if test "${ac_cv_path_INFOCMP+set}" = set; then
8625   echo $ECHO_N "(cached) $ECHO_C" >&6
8626 else
8627   case $INFOCMP in
8628   [\\/]* | ?:[\\/]*)
8629   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8630   ;;
8631   *)
8632   ac_save_IFS=$IFS; IFS=$ac_path_separator
8633 ac_dummy="$PATH:/usr/local/ncurses/bin"
8634 for ac_dir in $ac_dummy; do
8635   IFS=$ac_save_IFS
8636   test -z "$ac_dir" && ac_dir=.
8637   if $as_executable_p "$ac_dir/$ac_word"; then
8638    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8639    echo "$as_me:8639: found $ac_dir/$ac_word" >&5
8640    break
8641 fi
8642 done
8643
8644   ;;
8645 esac
8646 fi
8647 INFOCMP=$ac_cv_path_INFOCMP
8648
8649 if test -n "$INFOCMP"; then
8650   echo "$as_me:8650: result: $INFOCMP" >&5
8651 echo "${ECHO_T}$INFOCMP" >&6
8652 else
8653   echo "$as_me:8653: result: no" >&5
8654 echo "${ECHO_T}no" >&6
8655 fi
8656
8657   test -n "$INFOCMP" && break
8658 done
8659 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8660
8661 cf_path_prog=""
8662 cf_path_args=""
8663 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8664 for cf_temp in $ac_cv_path_INFOCMP
8665 do
8666         if test -z "$cf_path_prog" ; then
8667                 if test "$with_full_paths" = yes ; then
8668
8669 if test "x$prefix" != xNONE; then
8670         cf_path_syntax="$prefix"
8671 else
8672         cf_path_syntax="$ac_default_prefix"
8673 fi
8674
8675 case ".$cf_temp" in
8676 (.\$\(*\)*|.\'*\'*)
8677         ;;
8678 (..|./*|.\\*)
8679         ;;
8680 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8681         ;;
8682 (.\${*prefix}*|.\${*dir}*)
8683         eval cf_temp="$cf_temp"
8684         case ".$cf_temp" in
8685         (.NONE/*)
8686                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8687                 ;;
8688         esac
8689         ;;
8690 (.no|.NONE/*)
8691         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8692         ;;
8693 (*)
8694         break
8695         ;;
8696 esac
8697
8698                         cf_path_prog="$cf_temp"
8699                 else
8700                         cf_path_prog="`basename $cf_temp`"
8701                 fi
8702         elif test -z "$cf_path_args" ; then
8703                 cf_path_args="$cf_temp"
8704         else
8705                 cf_path_args="$cf_path_args $cf_temp"
8706         fi
8707 done
8708 IFS="$cf_save_ifs"
8709
8710 if test -n "$cf_path_prog" ; then
8711
8712 echo "${as_me:-configure}:8712: testing defining path for ${cf_path_prog} ..." 1>&5
8713
8714 cat >>confdefs.h <<EOF
8715 #define INFOCMP_PATH "$cf_path_prog"
8716 EOF
8717
8718         test -n "$cf_path_args" &&
8719 cat >>confdefs.h <<EOF
8720 #define INFOCMP_ARGS "$cf_path_args"
8721 EOF
8722
8723 fi
8724
8725                 if test -z "$INFOCMP"
8726                 then
8727                         { echo "$as_me:8727: WARNING: no infocmp program found for fallbacks" >&5
8728 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8729                 fi
8730
8731 fi;
8732
8733         test -z "$TIC" && FALLBACK_LIST=
8734         test -z "$INFOCMP" && FALLBACK_LIST=
8735         if test -z "$FALLBACK_LIST"
8736         then
8737                 { echo "$as_me:8737: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8738 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8739         fi
8740 fi
8741
8742 USE_FALLBACKS=
8743 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8744
8745 echo "$as_me:8745: checking if you want modern xterm or antique" >&5
8746 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8747
8748 # Check whether --with-xterm-new or --without-xterm-new was given.
8749 if test "${with_xterm_new+set}" = set; then
8750   withval="$with_xterm_new"
8751   with_xterm_new=$withval
8752 else
8753   with_xterm_new=yes
8754 fi;
8755 case $with_xterm_new in
8756 (no) with_xterm_new=xterm-old;;
8757 (*)      with_xterm_new=xterm-new;;
8758 esac
8759 echo "$as_me:8759: result: $with_xterm_new" >&5
8760 echo "${ECHO_T}$with_xterm_new" >&6
8761 WHICH_XTERM=$with_xterm_new
8762
8763 echo "$as_me:8763: checking if xterm backspace sends BS or DEL" >&5
8764 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8765
8766 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8767 if test "${with_xterm_kbs+set}" = set; then
8768   withval="$with_xterm_kbs"
8769   with_xterm_kbs=$withval
8770 else
8771   with_xterm_kbs=BS
8772 fi;
8773 case x$with_xterm_kbs in
8774 (xyes|xno|xBS|xbs|x8)
8775         with_xterm_kbs=BS
8776         ;;
8777 (xDEL|xdel|x127)
8778         with_xterm_kbs=DEL
8779         ;;
8780 (*)
8781         with_xterm_kbs=$withval
8782         ;;
8783 esac
8784 echo "$as_me:8784: result: $with_xterm_kbs" >&5
8785 echo "${ECHO_T}$with_xterm_kbs" >&6
8786 XTERM_KBS=$with_xterm_kbs
8787
8788 MAKE_TERMINFO=
8789 if test "$use_database" = no ; then
8790         TERMINFO="${datadir}/terminfo"
8791         MAKE_TERMINFO="#"
8792 else
8793
8794 echo "$as_me:8794: checking for list of terminfo directories" >&5
8795 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8796
8797 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8798 if test "${with_terminfo_dirs+set}" = set; then
8799   withval="$with_terminfo_dirs"
8800
8801 else
8802   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8803 fi;
8804 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8805 cf_dst_path=
8806 for cf_src_path in $withval
8807 do
8808
8809 if test "x$prefix" != xNONE; then
8810         cf_path_syntax="$prefix"
8811 else
8812         cf_path_syntax="$ac_default_prefix"
8813 fi
8814
8815 case ".$cf_src_path" in
8816 (.\$\(*\)*|.\'*\'*)
8817         ;;
8818 (..|./*|.\\*)
8819         ;;
8820 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8821         ;;
8822 (.\${*prefix}*|.\${*dir}*)
8823         eval cf_src_path="$cf_src_path"
8824         case ".$cf_src_path" in
8825         (.NONE/*)
8826                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8827                 ;;
8828         esac
8829         ;;
8830 (.no|.NONE/*)
8831         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8832         ;;
8833 (*)
8834         { { echo "$as_me:8834: error: expected a pathname, not \"$cf_src_path\"" >&5
8835 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8836    { (exit 1); exit 1; }; }
8837         ;;
8838 esac
8839
8840   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8841   cf_dst_path="${cf_dst_path}${cf_src_path}"
8842 done
8843 IFS="$ac_save_ifs"
8844
8845 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8846 # so we have to check/work around.  We do prefer the result of "eval"...
8847 eval cf_dst_eval="$cf_dst_path"
8848 case "x$cf_dst_eval" in
8849 (xNONE*)
8850         TERMINFO_DIRS=$cf_dst_path
8851         ;;
8852 (*)
8853         TERMINFO_DIRS="$cf_dst_eval"
8854         ;;
8855 esac
8856
8857 echo "$as_me:8857: result: $TERMINFO_DIRS" >&5
8858 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8859 test -n "$TERMINFO_DIRS" &&
8860 cat >>confdefs.h <<EOF
8861 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8862 EOF
8863
8864 case "x$TERMINFO" in
8865 x???:*)
8866         { echo "$as_me:8866: WARNING: ignoring non-directory/file TERMINFO value" >&5
8867 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8868         unset TERMINFO
8869         ;;
8870 esac
8871
8872 echo "$as_me:8872: checking for default terminfo directory" >&5
8873 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8874
8875 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8876 if test "${with_default_terminfo_dir+set}" = set; then
8877   withval="$with_default_terminfo_dir"
8878
8879 else
8880   withval="${TERMINFO:-${datadir}/terminfo}"
8881 fi; if test -n "${datadir}/terminfo" ; then
8882
8883 if test "x$prefix" != xNONE; then
8884         cf_path_syntax="$prefix"
8885 else
8886         cf_path_syntax="$ac_default_prefix"
8887 fi
8888
8889 case ".$withval" in
8890 (.\$\(*\)*|.\'*\'*)
8891         ;;
8892 (..|./*|.\\*)
8893         ;;
8894 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8895         ;;
8896 (.\${*prefix}*|.\${*dir}*)
8897         eval withval="$withval"
8898         case ".$withval" in
8899         (.NONE/*)
8900                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8901                 ;;
8902         esac
8903         ;;
8904 (.no|.NONE/*)
8905         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8906         ;;
8907 (*)
8908         { { echo "$as_me:8908: error: expected a pathname, not \"$withval\"" >&5
8909 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8910    { (exit 1); exit 1; }; }
8911         ;;
8912 esac
8913
8914 fi
8915 eval TERMINFO="$withval"
8916
8917 echo "$as_me:8917: result: $TERMINFO" >&5
8918 echo "${ECHO_T}$TERMINFO" >&6
8919
8920 cat >>confdefs.h <<EOF
8921 #define TERMINFO "$TERMINFO"
8922 EOF
8923
8924 fi
8925
8926 ###     use option --disable-big-core to make tic run on small machines
8927 ###     We need 4Mb, check if we can allocate 50% more than that.
8928 echo "$as_me:8928: checking if big-core option selected" >&5
8929 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8930
8931 # Check whether --enable-big-core or --disable-big-core was given.
8932 if test "${enable_big_core+set}" = set; then
8933   enableval="$enable_big_core"
8934   with_big_core=$enableval
8935 else
8936   if test "$cross_compiling" = yes; then
8937   with_big_core=no
8938 else
8939   cat >conftest.$ac_ext <<_ACEOF
8940 #line 8940 "configure"
8941 #include "confdefs.h"
8942
8943 #include <stdlib.h>
8944 #include <string.h>
8945 int main() {
8946         unsigned long n = 6000000L;
8947         char *s = malloc(n);
8948         if (s != 0)
8949                 s[0] = s[n-1] = 0;
8950         ${cf_cv_main_return:-return}(s == 0);
8951 }
8952 _ACEOF
8953 rm -f conftest$ac_exeext
8954 if { (eval echo "$as_me:8954: \"$ac_link\"") >&5
8955   (eval $ac_link) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8959   { (eval echo "$as_me:8959: \"$ac_try\"") >&5
8960   (eval $ac_try) 2>&5
8961   ac_status=$?
8962   echo "$as_me:8962: \$? = $ac_status" >&5
8963   (exit $ac_status); }; }; then
8964   with_big_core=yes
8965 else
8966   echo "$as_me: program exited with status $ac_status" >&5
8967 echo "$as_me: failed program was:" >&5
8968 cat conftest.$ac_ext >&5
8969 with_big_core=no
8970 fi
8971 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8972 fi
8973 fi;
8974 echo "$as_me:8974: result: $with_big_core" >&5
8975 echo "${ECHO_T}$with_big_core" >&6
8976 test "x$with_big_core" = "xyes" &&
8977 cat >>confdefs.h <<\EOF
8978 #define HAVE_BIG_CORE 1
8979 EOF
8980
8981 ### ISO C only guarantees 512-char strings, we have tables which load faster
8982 ### when constructed using "big" strings.  More than the C compiler, the awk
8983 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8984 echo "$as_me:8984: checking if big-strings option selected" >&5
8985 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8986
8987 # Check whether --enable-big-strings or --disable-big-strings was given.
8988 if test "${enable_big_strings+set}" = set; then
8989   enableval="$enable_big_strings"
8990   with_big_strings=$enableval
8991 else
8992
8993         case x$AWK in
8994         (x)
8995                 eval with_big_strings=no
8996                 ;;
8997         (*)
8998                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8999                         | $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
9000                         eval with_big_strings=yes
9001                 else
9002                         eval with_big_strings=no
9003                 fi
9004                 ;;
9005         esac
9006
9007 fi;
9008 echo "$as_me:9008: result: $with_big_strings" >&5
9009 echo "${ECHO_T}$with_big_strings" >&6
9010
9011 USE_BIG_STRINGS=0
9012 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9013
9014 ###     use option --enable-termcap to compile in the termcap fallback support
9015 echo "$as_me:9015: checking if you want termcap-fallback support" >&5
9016 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9017
9018 # Check whether --enable-termcap or --disable-termcap was given.
9019 if test "${enable_termcap+set}" = set; then
9020   enableval="$enable_termcap"
9021   with_termcap=$enableval
9022 else
9023   with_termcap=no
9024 fi;
9025 echo "$as_me:9025: result: $with_termcap" >&5
9026 echo "${ECHO_T}$with_termcap" >&6
9027
9028 NCURSES_USE_TERMCAP=0
9029 if test "x$with_termcap" != "xyes" ; then
9030         if test "$use_database" = no ; then
9031                 if test -z "$with_fallback" ; then
9032                         { { echo "$as_me:9032: error: You have disabled the database w/o specifying fallbacks" >&5
9033 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9034    { (exit 1); exit 1; }; }
9035                 fi
9036         fi
9037
9038 cat >>confdefs.h <<\EOF
9039 #define PURE_TERMINFO 1
9040 EOF
9041
9042 else
9043
9044         if test "$with_ticlib" != no ; then
9045                 { { echo "$as_me:9045: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9046 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9047    { (exit 1); exit 1; }; }
9048         fi
9049
9050         NCURSES_USE_TERMCAP=1
9051         echo "$as_me:9051: checking for list of termcap files" >&5
9052 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9053
9054 # Check whether --with-termpath or --without-termpath was given.
9055 if test "${with_termpath+set}" = set; then
9056   withval="$with_termpath"
9057
9058 else
9059   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9060 fi;
9061 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9062 cf_dst_path=
9063 for cf_src_path in $withval
9064 do
9065
9066 if test "x$prefix" != xNONE; then
9067         cf_path_syntax="$prefix"
9068 else
9069         cf_path_syntax="$ac_default_prefix"
9070 fi
9071
9072 case ".$cf_src_path" in
9073 (.\$\(*\)*|.\'*\'*)
9074         ;;
9075 (..|./*|.\\*)
9076         ;;
9077 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9078         ;;
9079 (.\${*prefix}*|.\${*dir}*)
9080         eval cf_src_path="$cf_src_path"
9081         case ".$cf_src_path" in
9082         (.NONE/*)
9083                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9084                 ;;
9085         esac
9086         ;;
9087 (.no|.NONE/*)
9088         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
9089         ;;
9090 (*)
9091         { { echo "$as_me:9091: error: expected a pathname, not \"$cf_src_path\"" >&5
9092 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9093    { (exit 1); exit 1; }; }
9094         ;;
9095 esac
9096
9097   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9098   cf_dst_path="${cf_dst_path}${cf_src_path}"
9099 done
9100 IFS="$ac_save_ifs"
9101
9102 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9103 # so we have to check/work around.  We do prefer the result of "eval"...
9104 eval cf_dst_eval="$cf_dst_path"
9105 case "x$cf_dst_eval" in
9106 (xNONE*)
9107         TERMPATH=$cf_dst_path
9108         ;;
9109 (*)
9110         TERMPATH="$cf_dst_eval"
9111         ;;
9112 esac
9113
9114         echo "$as_me:9114: result: $TERMPATH" >&5
9115 echo "${ECHO_T}$TERMPATH" >&6
9116         test -n "$TERMPATH" &&
9117 cat >>confdefs.h <<EOF
9118 #define TERMPATH "$TERMPATH"
9119 EOF
9120
9121         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9122         echo "$as_me:9122: checking if fast termcap-loader is needed" >&5
9123 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9124
9125 # Check whether --enable-getcap or --disable-getcap was given.
9126 if test "${enable_getcap+set}" = set; then
9127   enableval="$enable_getcap"
9128   with_getcap=$enableval
9129 else
9130   with_getcap=no
9131 fi;
9132         echo "$as_me:9132: result: $with_getcap" >&5
9133 echo "${ECHO_T}$with_getcap" >&6
9134         test "x$with_getcap" = "xyes" &&
9135 cat >>confdefs.h <<\EOF
9136 #define USE_GETCAP 1
9137 EOF
9138
9139         echo "$as_me:9139: checking if translated termcaps will be cached in ~/.terminfo" >&5
9140 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9141
9142 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9143 if test "${enable_getcap_cache+set}" = set; then
9144   enableval="$enable_getcap_cache"
9145   with_getcap_cache=$enableval
9146 else
9147   with_getcap_cache=no
9148 fi;
9149         echo "$as_me:9149: result: $with_getcap_cache" >&5
9150 echo "${ECHO_T}$with_getcap_cache" >&6
9151         test "x$with_getcap_cache" = "xyes" &&
9152 cat >>confdefs.h <<\EOF
9153 #define USE_GETCAP_CACHE 1
9154 EOF
9155
9156 fi
9157
9158 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9159 echo "$as_me:9159: checking if ~/.terminfo is wanted" >&5
9160 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9161
9162 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9163 if test "${enable_home_terminfo+set}" = set; then
9164   enableval="$enable_home_terminfo"
9165   with_home_terminfo=$enableval
9166 else
9167   with_home_terminfo=yes
9168 fi;
9169 echo "$as_me:9169: result: $with_home_terminfo" >&5
9170 echo "${ECHO_T}$with_home_terminfo" >&6
9171 test "x$with_home_terminfo" = "xyes" &&
9172 cat >>confdefs.h <<\EOF
9173 #define USE_HOME_TERMINFO 1
9174 EOF
9175
9176 echo "$as_me:9176: checking if you want to use restricted environment when running as root" >&5
9177 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
9178
9179 # Check whether --enable-root-environ or --disable-root-environ was given.
9180 if test "${enable_root_environ+set}" = set; then
9181   enableval="$enable_root_environ"
9182   with_root_environ=$enableval
9183 else
9184   with_root_environ=yes
9185 fi;
9186 echo "$as_me:9186: result: $with_root_environ" >&5
9187 echo "${ECHO_T}$with_root_environ" >&6
9188 test "x$with_root_environ" = xyes &&
9189 cat >>confdefs.h <<\EOF
9190 #define USE_ROOT_ENVIRON 1
9191 EOF
9192
9193 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9194 ###   to reduce storage requirements for the terminfo database.
9195
9196 for ac_header in \
9197 unistd.h \
9198
9199 do
9200 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9201 echo "$as_me:9201: checking for $ac_header" >&5
9202 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9203 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9204   echo $ECHO_N "(cached) $ECHO_C" >&6
9205 else
9206   cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9209 #include <$ac_header>
9210 _ACEOF
9211 if { (eval echo "$as_me:9211: \"$ac_cpp conftest.$ac_ext\"") >&5
9212   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9213   ac_status=$?
9214   egrep -v '^ *\+' conftest.er1 >conftest.err
9215   rm -f conftest.er1
9216   cat conftest.err >&5
9217   echo "$as_me:9217: \$? = $ac_status" >&5
9218   (exit $ac_status); } >/dev/null; then
9219   if test -s conftest.err; then
9220     ac_cpp_err=$ac_c_preproc_warn_flag
9221   else
9222     ac_cpp_err=
9223   fi
9224 else
9225   ac_cpp_err=yes
9226 fi
9227 if test -z "$ac_cpp_err"; then
9228   eval "$as_ac_Header=yes"
9229 else
9230   echo "$as_me: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   eval "$as_ac_Header=no"
9233 fi
9234 rm -f conftest.err conftest.$ac_ext
9235 fi
9236 echo "$as_me:9236: result: `eval echo '${'$as_ac_Header'}'`" >&5
9237 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9238 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9239   cat >>confdefs.h <<EOF
9240 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9241 EOF
9242
9243 fi
9244 done
9245
9246 for ac_func in \
9247         remove \
9248         unlink
9249 do
9250 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9251 echo "$as_me:9251: checking for $ac_func" >&5
9252 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9253 if eval "test \"\${$as_ac_var+set}\" = set"; then
9254   echo $ECHO_N "(cached) $ECHO_C" >&6
9255 else
9256   cat >conftest.$ac_ext <<_ACEOF
9257 #line 9257 "configure"
9258 #include "confdefs.h"
9259 #define $ac_func autoconf_temporary
9260 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9261 #undef $ac_func
9262
9263 #ifdef __cplusplus
9264 extern "C"
9265 #endif
9266
9267 /* We use char because int might match the return type of a gcc2
9268    builtin and then its argument prototype would still apply.  */
9269 char $ac_func (void);
9270
9271 int
9272 main (void)
9273 {
9274
9275 /* The GNU C library defines stubs for functions which it implements
9276     to always fail with ENOSYS.  Some functions are actually named
9277     something starting with __ and the normal name is an alias.  */
9278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9279 #error found stub for $ac_func
9280 #endif
9281
9282         return $ac_func ();
9283   ;
9284   return 0;
9285 }
9286 _ACEOF
9287 rm -f conftest.$ac_objext conftest$ac_exeext
9288 if { (eval echo "$as_me:9288: \"$ac_link\"") >&5
9289   (eval $ac_link) 2>&5
9290   ac_status=$?
9291   echo "$as_me:9291: \$? = $ac_status" >&5
9292   (exit $ac_status); } &&
9293          { ac_try='test -s conftest$ac_exeext'
9294   { (eval echo "$as_me:9294: \"$ac_try\"") >&5
9295   (eval $ac_try) 2>&5
9296   ac_status=$?
9297   echo "$as_me:9297: \$? = $ac_status" >&5
9298   (exit $ac_status); }; }; then
9299   eval "$as_ac_var=yes"
9300 else
9301   echo "$as_me: failed program was:" >&5
9302 cat conftest.$ac_ext >&5
9303 eval "$as_ac_var=no"
9304 fi
9305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9306 fi
9307 echo "$as_me:9307: result: `eval echo '${'$as_ac_var'}'`" >&5
9308 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9309 if test `eval echo '${'$as_ac_var'}'` = yes; then
9310   cat >>confdefs.h <<EOF
9311 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9312 EOF
9313
9314 fi
9315 done
9316
9317 if test "$cross_compiling" = yes ; then
9318
9319 for ac_func in \
9320                 link \
9321                 symlink
9322 do
9323 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9324 echo "$as_me:9324: checking for $ac_func" >&5
9325 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9326 if eval "test \"\${$as_ac_var+set}\" = set"; then
9327   echo $ECHO_N "(cached) $ECHO_C" >&6
9328 else
9329   cat >conftest.$ac_ext <<_ACEOF
9330 #line 9330 "configure"
9331 #include "confdefs.h"
9332 #define $ac_func autoconf_temporary
9333 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9334 #undef $ac_func
9335
9336 #ifdef __cplusplus
9337 extern "C"
9338 #endif
9339
9340 /* We use char because int might match the return type of a gcc2
9341    builtin and then its argument prototype would still apply.  */
9342 char $ac_func (void);
9343
9344 int
9345 main (void)
9346 {
9347
9348 /* The GNU C library defines stubs for functions which it implements
9349     to always fail with ENOSYS.  Some functions are actually named
9350     something starting with __ and the normal name is an alias.  */
9351 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9352 #error found stub for $ac_func
9353 #endif
9354
9355         return $ac_func ();
9356   ;
9357   return 0;
9358 }
9359 _ACEOF
9360 rm -f conftest.$ac_objext conftest$ac_exeext
9361 if { (eval echo "$as_me:9361: \"$ac_link\"") >&5
9362   (eval $ac_link) 2>&5
9363   ac_status=$?
9364   echo "$as_me:9364: \$? = $ac_status" >&5
9365   (exit $ac_status); } &&
9366          { ac_try='test -s conftest$ac_exeext'
9367   { (eval echo "$as_me:9367: \"$ac_try\"") >&5
9368   (eval $ac_try) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); }; }; then
9372   eval "$as_ac_var=yes"
9373 else
9374   echo "$as_me: failed program was:" >&5
9375 cat conftest.$ac_ext >&5
9376 eval "$as_ac_var=no"
9377 fi
9378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9379 fi
9380 echo "$as_me:9380: result: `eval echo '${'$as_ac_var'}'`" >&5
9381 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9382 if test `eval echo '${'$as_ac_var'}'` = yes; then
9383   cat >>confdefs.h <<EOF
9384 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9385 EOF
9386
9387 fi
9388 done
9389
9390 else
9391         echo "$as_me:9391: checking if link/symlink functions work" >&5
9392 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9393 if test "${cf_cv_link_funcs+set}" = set; then
9394   echo $ECHO_N "(cached) $ECHO_C" >&6
9395 else
9396
9397                 cf_cv_link_funcs=
9398                 for cf_func in link symlink ; do
9399                         if test "$cross_compiling" = yes; then
9400
9401                         eval 'ac_cv_func_'$cf_func'=error'
9402 else
9403   cat >conftest.$ac_ext <<_ACEOF
9404 #line 9404 "configure"
9405 #include "confdefs.h"
9406
9407 #include <sys/types.h>
9408 #include <sys/stat.h>
9409 #ifdef HAVE_UNISTD_H
9410 #include <unistd.h>
9411 #endif
9412 int main(void)
9413 {
9414         int fail = 0;
9415         char *src = "config.log";
9416         char *dst = "conftest.chk";
9417         struct stat src_sb;
9418         struct stat dst_sb;
9419
9420         stat(src, &src_sb);
9421         fail = ($cf_func("config.log", "conftest.chk") < 0)
9422             || (stat(dst, &dst_sb) < 0)
9423             || (dst_sb.st_mtime != src_sb.st_mtime);
9424 #ifdef HAVE_UNLINK
9425         unlink(dst);
9426 #else
9427         remove(dst);
9428 #endif
9429         ${cf_cv_main_return:-return} (fail);
9430 }
9431
9432 _ACEOF
9433 rm -f conftest$ac_exeext
9434 if { (eval echo "$as_me:9434: \"$ac_link\"") >&5
9435   (eval $ac_link) 2>&5
9436   ac_status=$?
9437   echo "$as_me:9437: \$? = $ac_status" >&5
9438   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9439   { (eval echo "$as_me:9439: \"$ac_try\"") >&5
9440   (eval $ac_try) 2>&5
9441   ac_status=$?
9442   echo "$as_me:9442: \$? = $ac_status" >&5
9443   (exit $ac_status); }; }; then
9444
9445                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9446                         eval 'ac_cv_func_'$cf_func'=yes'
9447 else
9448   echo "$as_me: program exited with status $ac_status" >&5
9449 echo "$as_me: failed program was:" >&5
9450 cat conftest.$ac_ext >&5
9451
9452                         eval 'ac_cv_func_'$cf_func'=no'
9453 fi
9454 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9455 fi
9456                 done
9457                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9458
9459 fi
9460 echo "$as_me:9460: result: $cf_cv_link_funcs" >&5
9461 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9462         test "$ac_cv_func_link"    = yes &&
9463 cat >>confdefs.h <<\EOF
9464 #define HAVE_LINK 1
9465 EOF
9466
9467         test "$ac_cv_func_symlink" = yes &&
9468 cat >>confdefs.h <<\EOF
9469 #define HAVE_SYMLINK 1
9470 EOF
9471
9472 fi
9473
9474 with_links=no
9475 with_symlinks=no
9476
9477 # soft links (symbolic links) are useful for some systems where hard links do
9478 # not work, or to make it simpler to copy terminfo trees around.
9479 if test "x$ac_cv_func_symlink" = xyes ; then
9480         echo "$as_me:9480: checking if tic should use symbolic links" >&5
9481 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9482
9483 # Check whether --enable-symlinks or --disable-symlinks was given.
9484 if test "${enable_symlinks+set}" = set; then
9485   enableval="$enable_symlinks"
9486   with_symlinks=$enableval
9487 else
9488   with_symlinks=no
9489 fi;
9490         echo "$as_me:9490: result: $with_symlinks" >&5
9491 echo "${ECHO_T}$with_symlinks" >&6
9492 fi
9493
9494 # If we have hard links and did not choose to use soft links instead, there is
9495 # no reason to make this choice optional - use the hard links.
9496 if test "$with_symlinks" = no ; then
9497         echo "$as_me:9497: checking if tic should use hard links" >&5
9498 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9499         if test "x$ac_cv_func_link" = xyes ; then
9500                 with_links=yes
9501         else
9502                 with_links=no
9503         fi
9504         echo "$as_me:9504: result: $with_links" >&5
9505 echo "${ECHO_T}$with_links" >&6
9506 fi
9507
9508 test "x$with_links" = xyes &&
9509 cat >>confdefs.h <<\EOF
9510 #define USE_LINKS 1
9511 EOF
9512
9513 test "x$with_symlinks" = xyes &&
9514 cat >>confdefs.h <<\EOF
9515 #define USE_SYMLINKS 1
9516 EOF
9517
9518 ###   use option --enable-broken-linker to force on use of broken-linker support
9519
9520 echo "$as_me:9520: checking if you want broken-linker support code" >&5
9521 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9522
9523 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9524 if test "${enable_broken_linker+set}" = set; then
9525   enableval="$enable_broken_linker"
9526   with_broken_linker=$enableval
9527 else
9528   with_broken_linker=no
9529 fi;
9530 echo "$as_me:9530: result: $with_broken_linker" >&5
9531 echo "${ECHO_T}$with_broken_linker" >&6
9532
9533 : ${BROKEN_LINKER:=0}
9534 if test "x$with_broken_linker" = xyes ; then
9535
9536 cat >>confdefs.h <<\EOF
9537 #define BROKEN_LINKER 1
9538 EOF
9539
9540         BROKEN_LINKER=1
9541 fi
9542
9543 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9544 echo "$as_me:9544: checking if tputs should process BSD-style prefix padding" >&5
9545 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9546
9547 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9548 if test "${enable_bsdpad+set}" = set; then
9549   enableval="$enable_bsdpad"
9550   with_bsdpad=$enableval
9551 else
9552   with_bsdpad=no
9553 fi;
9554 echo "$as_me:9554: result: $with_bsdpad" >&5
9555 echo "${ECHO_T}$with_bsdpad" >&6
9556 test "x$with_bsdpad" = xyes &&
9557 cat >>confdefs.h <<\EOF
9558 #define BSD_TPUTS 1
9559 EOF
9560
9561 ###   use option --enable-widec to turn on use of wide-character support
9562 NCURSES_CH_T=chtype
9563 NCURSES_LIBUTF8=0
9564
9565 NEED_WCHAR_H=0
9566 NCURSES_MBSTATE_T=0
9567 NCURSES_WCHAR_T=0
9568 NCURSES_WINT_T=0
9569
9570 # Check to define _XOPEN_SOURCE "automatically"
9571 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9572
9573 echo "$as_me:9573: checking if the POSIX test-macros are already defined" >&5
9574 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9575 if test "${cf_cv_posix_visible+set}" = set; then
9576   echo $ECHO_N "(cached) $ECHO_C" >&6
9577 else
9578
9579 cat >conftest.$ac_ext <<_ACEOF
9580 #line 9580 "configure"
9581 #include "confdefs.h"
9582 #include <stdio.h>
9583 int
9584 main (void)
9585 {
9586
9587 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9588         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9589         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9590         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9591 #error conflicting symbols found
9592 #endif
9593
9594   ;
9595   return 0;
9596 }
9597 _ACEOF
9598 rm -f conftest.$ac_objext
9599 if { (eval echo "$as_me:9599: \"$ac_compile\"") >&5
9600   (eval $ac_compile) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); } &&
9604          { ac_try='test -s conftest.$ac_objext'
9605   { (eval echo "$as_me:9605: \"$ac_try\"") >&5
9606   (eval $ac_try) 2>&5
9607   ac_status=$?
9608   echo "$as_me:9608: \$? = $ac_status" >&5
9609   (exit $ac_status); }; }; then
9610   cf_cv_posix_visible=no
9611 else
9612   echo "$as_me: failed program was:" >&5
9613 cat conftest.$ac_ext >&5
9614 cf_cv_posix_visible=yes
9615 fi
9616 rm -f conftest.$ac_objext conftest.$ac_ext
9617
9618 fi
9619 echo "$as_me:9619: result: $cf_cv_posix_visible" >&5
9620 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9621
9622 if test "$cf_cv_posix_visible" = no; then
9623
9624 cf_XOPEN_SOURCE=600
9625 cf_POSIX_C_SOURCE=199506L
9626 cf_xopen_source=
9627
9628 case $host_os in
9629 (aix[4-7]*)
9630         cf_xopen_source="-D_ALL_SOURCE"
9631         ;;
9632 (msys)
9633         cf_XOPEN_SOURCE=600
9634         ;;
9635 (darwin[0-8].*)
9636         cf_xopen_source="-D_APPLE_C_SOURCE"
9637         ;;
9638 (darwin*)
9639         cf_xopen_source="-D_DARWIN_C_SOURCE"
9640         cf_XOPEN_SOURCE=
9641         ;;
9642 (freebsd*|dragonfly*|midnightbsd*)
9643         # 5.x headers associate
9644         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9645         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9646         cf_POSIX_C_SOURCE=200112L
9647         cf_XOPEN_SOURCE=600
9648         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9649         ;;
9650 (hpux11*)
9651         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9652         ;;
9653 (hpux*)
9654         cf_xopen_source="-D_HPUX_SOURCE"
9655         ;;
9656 (irix[56].*)
9657         cf_xopen_source="-D_SGI_SOURCE"
9658         cf_XOPEN_SOURCE=
9659         ;;
9660 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9661
9662 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9663
9664 echo "$as_me:9664: checking if this is the GNU C library" >&5
9665 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9666 if test "${cf_cv_gnu_library+set}" = set; then
9667   echo $ECHO_N "(cached) $ECHO_C" >&6
9668 else
9669
9670 cat >conftest.$ac_ext <<_ACEOF
9671 #line 9671 "configure"
9672 #include "confdefs.h"
9673 #include <sys/types.h>
9674 int
9675 main (void)
9676 {
9677
9678         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9679                 return 0;
9680         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9681                 return 0;
9682         #else
9683         #       error not GNU C library
9684         #endif
9685   ;
9686   return 0;
9687 }
9688 _ACEOF
9689 rm -f conftest.$ac_objext
9690 if { (eval echo "$as_me:9690: \"$ac_compile\"") >&5
9691   (eval $ac_compile) 2>&5
9692   ac_status=$?
9693   echo "$as_me:9693: \$? = $ac_status" >&5
9694   (exit $ac_status); } &&
9695          { ac_try='test -s conftest.$ac_objext'
9696   { (eval echo "$as_me:9696: \"$ac_try\"") >&5
9697   (eval $ac_try) 2>&5
9698   ac_status=$?
9699   echo "$as_me:9699: \$? = $ac_status" >&5
9700   (exit $ac_status); }; }; then
9701   cf_cv_gnu_library=yes
9702 else
9703   echo "$as_me: failed program was:" >&5
9704 cat conftest.$ac_ext >&5
9705 cf_cv_gnu_library=no
9706 fi
9707 rm -f conftest.$ac_objext conftest.$ac_ext
9708
9709 fi
9710 echo "$as_me:9710: result: $cf_cv_gnu_library" >&5
9711 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9712
9713 if test x$cf_cv_gnu_library = xyes; then
9714
9715         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9716         # was changed to help a little.  newlib incorporated the change about 4
9717         # years later.
9718         echo "$as_me:9718: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9719 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9720 if test "${cf_cv_gnu_library_219+set}" = set; then
9721   echo $ECHO_N "(cached) $ECHO_C" >&6
9722 else
9723
9724                 cf_save="$CPPFLAGS"
9725
9726         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9727         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9728
9729                 cat >conftest.$ac_ext <<_ACEOF
9730 #line 9730 "configure"
9731 #include "confdefs.h"
9732 #include <sys/types.h>
9733 int
9734 main (void)
9735 {
9736
9737                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9738                                 return 0;
9739                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9740                                 return 0;
9741                         #else
9742                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9743                         #endif
9744   ;
9745   return 0;
9746 }
9747 _ACEOF
9748 rm -f conftest.$ac_objext
9749 if { (eval echo "$as_me:9749: \"$ac_compile\"") >&5
9750   (eval $ac_compile) 2>&5
9751   ac_status=$?
9752   echo "$as_me:9752: \$? = $ac_status" >&5
9753   (exit $ac_status); } &&
9754          { ac_try='test -s conftest.$ac_objext'
9755   { (eval echo "$as_me:9755: \"$ac_try\"") >&5
9756   (eval $ac_try) 2>&5
9757   ac_status=$?
9758   echo "$as_me:9758: \$? = $ac_status" >&5
9759   (exit $ac_status); }; }; then
9760   cf_cv_gnu_library_219=yes
9761 else
9762   echo "$as_me: failed program was:" >&5
9763 cat conftest.$ac_ext >&5
9764 cf_cv_gnu_library_219=no
9765 fi
9766 rm -f conftest.$ac_objext conftest.$ac_ext
9767                 CPPFLAGS="$cf_save"
9768
9769 fi
9770 echo "$as_me:9770: result: $cf_cv_gnu_library_219" >&5
9771 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9772
9773         if test "x$cf_cv_gnu_library_219" = xyes; then
9774                 cf_save="$CPPFLAGS"
9775                 echo "$as_me:9775: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9776 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9777 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9778   echo $ECHO_N "(cached) $ECHO_C" >&6
9779 else
9780
9781 cf_fix_cppflags=no
9782 cf_new_cflags=
9783 cf_new_cppflags=
9784 cf_new_extra_cppflags=
9785
9786 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9787 do
9788 case $cf_fix_cppflags in
9789 (no)
9790         case $cf_add_cflags in
9791         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9792                 case $cf_add_cflags in
9793                 (-D*)
9794                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9795
9796                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9797                                 && test -z "${cf_tst_cflags}" \
9798                                 && cf_fix_cppflags=yes
9799
9800                         if test $cf_fix_cppflags = yes ; then
9801
9802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9804
9805                                 continue
9806                         elif test "${cf_tst_cflags}" = "\"'" ; then
9807
9808         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9809         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9810
9811                                 continue
9812                         fi
9813                         ;;
9814                 esac
9815                 case "$CPPFLAGS" in
9816                 (*$cf_add_cflags)
9817                         ;;
9818                 (*)
9819                         case $cf_add_cflags in
9820                         (-D*)
9821                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9822
9823 CPPFLAGS=`echo "$CPPFLAGS" | \
9824         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9825                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9826
9827                                 ;;
9828                         esac
9829
9830         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9831         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9832
9833                         ;;
9834                 esac
9835                 ;;
9836         (*)
9837
9838         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9839         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9840
9841                 ;;
9842         esac
9843         ;;
9844 (yes)
9845
9846         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9847         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9848
9849         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9850
9851         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9852                 && test -z "${cf_tst_cflags}" \
9853                 && cf_fix_cppflags=no
9854         ;;
9855 esac
9856 done
9857
9858 if test -n "$cf_new_cflags" ; then
9859
9860         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9861         CFLAGS="${CFLAGS}$cf_new_cflags"
9862
9863 fi
9864
9865 if test -n "$cf_new_cppflags" ; then
9866
9867         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9868         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9869
9870 fi
9871
9872 if test -n "$cf_new_extra_cppflags" ; then
9873
9874         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9875         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9876
9877 fi
9878
9879                         cat >conftest.$ac_ext <<_ACEOF
9880 #line 9880 "configure"
9881 #include "confdefs.h"
9882
9883                                 #include <limits.h>
9884                                 #include <sys/types.h>
9885
9886 int
9887 main (void)
9888 {
9889
9890                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9891                                         return 0;
9892                                 #else
9893                                 #       error GNU C library is too old
9894                                 #endif
9895   ;
9896   return 0;
9897 }
9898 _ACEOF
9899 rm -f conftest.$ac_objext
9900 if { (eval echo "$as_me:9900: \"$ac_compile\"") >&5
9901   (eval $ac_compile) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); } &&
9905          { ac_try='test -s conftest.$ac_objext'
9906   { (eval echo "$as_me:9906: \"$ac_try\"") >&5
9907   (eval $ac_try) 2>&5
9908   ac_status=$?
9909   echo "$as_me:9909: \$? = $ac_status" >&5
9910   (exit $ac_status); }; }; then
9911   cf_cv_gnu_dftsrc_219=yes
9912 else
9913   echo "$as_me: failed program was:" >&5
9914 cat conftest.$ac_ext >&5
9915 cf_cv_gnu_dftsrc_219=no
9916 fi
9917 rm -f conftest.$ac_objext conftest.$ac_ext
9918
9919 fi
9920 echo "$as_me:9920: result: $cf_cv_gnu_dftsrc_219" >&5
9921 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9922                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9923         else
9924                 cf_cv_gnu_dftsrc_219=maybe
9925         fi
9926
9927         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9928
9929                 echo "$as_me:9929: checking if we must define _GNU_SOURCE" >&5
9930 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9931 if test "${cf_cv_gnu_source+set}" = set; then
9932   echo $ECHO_N "(cached) $ECHO_C" >&6
9933 else
9934
9935                 cat >conftest.$ac_ext <<_ACEOF
9936 #line 9936 "configure"
9937 #include "confdefs.h"
9938 #include <sys/types.h>
9939 int
9940 main (void)
9941 {
9942
9943                         #ifndef _XOPEN_SOURCE
9944                         #error  expected _XOPEN_SOURCE to be defined
9945                         #endif
9946   ;
9947   return 0;
9948 }
9949 _ACEOF
9950 rm -f conftest.$ac_objext
9951 if { (eval echo "$as_me:9951: \"$ac_compile\"") >&5
9952   (eval $ac_compile) 2>&5
9953   ac_status=$?
9954   echo "$as_me:9954: \$? = $ac_status" >&5
9955   (exit $ac_status); } &&
9956          { ac_try='test -s conftest.$ac_objext'
9957   { (eval echo "$as_me:9957: \"$ac_try\"") >&5
9958   (eval $ac_try) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); }; }; then
9962   cf_cv_gnu_source=no
9963 else
9964   echo "$as_me: failed program was:" >&5
9965 cat conftest.$ac_ext >&5
9966 cf_save="$CPPFLAGS"
9967
9968 cf_fix_cppflags=no
9969 cf_new_cflags=
9970 cf_new_cppflags=
9971 cf_new_extra_cppflags=
9972
9973 for cf_add_cflags in -D_GNU_SOURCE
9974 do
9975 case $cf_fix_cppflags in
9976 (no)
9977         case $cf_add_cflags in
9978         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9979                 case $cf_add_cflags in
9980                 (-D*)
9981                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9982
9983                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9984                                 && test -z "${cf_tst_cflags}" \
9985                                 && cf_fix_cppflags=yes
9986
9987                         if test $cf_fix_cppflags = yes ; then
9988
9989         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9990         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9991
9992                                 continue
9993                         elif test "${cf_tst_cflags}" = "\"'" ; then
9994
9995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9997
9998                                 continue
9999                         fi
10000                         ;;
10001                 esac
10002                 case "$CPPFLAGS" in
10003                 (*$cf_add_cflags)
10004                         ;;
10005                 (*)
10006                         case $cf_add_cflags in
10007                         (-D*)
10008                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10009
10010 CPPFLAGS=`echo "$CPPFLAGS" | \
10011         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10012                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10013
10014                                 ;;
10015                         esac
10016
10017         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10018         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10019
10020                         ;;
10021                 esac
10022                 ;;
10023         (*)
10024
10025         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10026         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10027
10028                 ;;
10029         esac
10030         ;;
10031 (yes)
10032
10033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10035
10036         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10037
10038         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10039                 && test -z "${cf_tst_cflags}" \
10040                 && cf_fix_cppflags=no
10041         ;;
10042 esac
10043 done
10044
10045 if test -n "$cf_new_cflags" ; then
10046
10047         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10048         CFLAGS="${CFLAGS}$cf_new_cflags"
10049
10050 fi
10051
10052 if test -n "$cf_new_cppflags" ; then
10053
10054         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10055         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10056
10057 fi
10058
10059 if test -n "$cf_new_extra_cppflags" ; then
10060
10061         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10062         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10063
10064 fi
10065
10066                          cat >conftest.$ac_ext <<_ACEOF
10067 #line 10067 "configure"
10068 #include "confdefs.h"
10069 #include <sys/types.h>
10070 int
10071 main (void)
10072 {
10073
10074                                 #ifdef _XOPEN_SOURCE
10075                                 #error  expected _XOPEN_SOURCE to be undefined
10076                                 #endif
10077   ;
10078   return 0;
10079 }
10080 _ACEOF
10081 rm -f conftest.$ac_objext
10082 if { (eval echo "$as_me:10082: \"$ac_compile\"") >&5
10083   (eval $ac_compile) 2>&5
10084   ac_status=$?
10085   echo "$as_me:10085: \$? = $ac_status" >&5
10086   (exit $ac_status); } &&
10087          { ac_try='test -s conftest.$ac_objext'
10088   { (eval echo "$as_me:10088: \"$ac_try\"") >&5
10089   (eval $ac_try) 2>&5
10090   ac_status=$?
10091   echo "$as_me:10091: \$? = $ac_status" >&5
10092   (exit $ac_status); }; }; then
10093   cf_cv_gnu_source=no
10094 else
10095   echo "$as_me: failed program was:" >&5
10096 cat conftest.$ac_ext >&5
10097 cf_cv_gnu_source=yes
10098 fi
10099 rm -f conftest.$ac_objext conftest.$ac_ext
10100                         CPPFLAGS="$cf_save"
10101
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104
10105 fi
10106 echo "$as_me:10106: result: $cf_cv_gnu_source" >&5
10107 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10108
10109                 if test "$cf_cv_gnu_source" = yes
10110                 then
10111                 echo "$as_me:10111: checking if we should also define _DEFAULT_SOURCE" >&5
10112 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10113 if test "${cf_cv_default_source+set}" = set; then
10114   echo $ECHO_N "(cached) $ECHO_C" >&6
10115 else
10116
10117         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10118         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10119
10120                         cat >conftest.$ac_ext <<_ACEOF
10121 #line 10121 "configure"
10122 #include "confdefs.h"
10123 #include <sys/types.h>
10124 int
10125 main (void)
10126 {
10127
10128                                 #ifdef _DEFAULT_SOURCE
10129                                 #error  expected _DEFAULT_SOURCE to be undefined
10130                                 #endif
10131   ;
10132   return 0;
10133 }
10134 _ACEOF
10135 rm -f conftest.$ac_objext
10136 if { (eval echo "$as_me:10136: \"$ac_compile\"") >&5
10137   (eval $ac_compile) 2>&5
10138   ac_status=$?
10139   echo "$as_me:10139: \$? = $ac_status" >&5
10140   (exit $ac_status); } &&
10141          { ac_try='test -s conftest.$ac_objext'
10142   { (eval echo "$as_me:10142: \"$ac_try\"") >&5
10143   (eval $ac_try) 2>&5
10144   ac_status=$?
10145   echo "$as_me:10145: \$? = $ac_status" >&5
10146   (exit $ac_status); }; }; then
10147   cf_cv_default_source=no
10148 else
10149   echo "$as_me: failed program was:" >&5
10150 cat conftest.$ac_ext >&5
10151 cf_cv_default_source=yes
10152 fi
10153 rm -f conftest.$ac_objext conftest.$ac_ext
10154
10155 fi
10156 echo "$as_me:10156: result: $cf_cv_default_source" >&5
10157 echo "${ECHO_T}$cf_cv_default_source" >&6
10158                         if test "$cf_cv_default_source" = yes
10159                         then
10160
10161         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10162         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10163
10164                         fi
10165                 fi
10166         fi
10167
10168 fi
10169
10170         ;;
10171 (minix*)
10172         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10173         ;;
10174 (mirbsd*)
10175         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10176         cf_XOPEN_SOURCE=
10177
10178 if test "$cf_cv_posix_visible" = no; then
10179
10180 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10181
10182 cf_save_CFLAGS="$CFLAGS"
10183 cf_save_CPPFLAGS="$CPPFLAGS"
10184
10185 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10186         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10187                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10188
10189 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10190         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10191                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10192
10193 echo "$as_me:10193: checking if we should define _POSIX_C_SOURCE" >&5
10194 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10195 if test "${cf_cv_posix_c_source+set}" = set; then
10196   echo $ECHO_N "(cached) $ECHO_C" >&6
10197 else
10198
10199 echo "${as_me:-configure}:10199: testing if the symbol is already defined go no further ..." 1>&5
10200
10201         cat >conftest.$ac_ext <<_ACEOF
10202 #line 10202 "configure"
10203 #include "confdefs.h"
10204 #include <sys/types.h>
10205 int
10206 main (void)
10207 {
10208
10209 #ifndef _POSIX_C_SOURCE
10210 make an error
10211 #endif
10212   ;
10213   return 0;
10214 }
10215 _ACEOF
10216 rm -f conftest.$ac_objext
10217 if { (eval echo "$as_me:10217: \"$ac_compile\"") >&5
10218   (eval $ac_compile) 2>&5
10219   ac_status=$?
10220   echo "$as_me:10220: \$? = $ac_status" >&5
10221   (exit $ac_status); } &&
10222          { ac_try='test -s conftest.$ac_objext'
10223   { (eval echo "$as_me:10223: \"$ac_try\"") >&5
10224   (eval $ac_try) 2>&5
10225   ac_status=$?
10226   echo "$as_me:10226: \$? = $ac_status" >&5
10227   (exit $ac_status); }; }; then
10228   cf_cv_posix_c_source=no
10229 else
10230   echo "$as_me: failed program was:" >&5
10231 cat conftest.$ac_ext >&5
10232 cf_want_posix_source=no
10233          case .$cf_POSIX_C_SOURCE in
10234          (.[12]??*)
10235                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10236                 ;;
10237          (.2)
10238                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10239                 cf_want_posix_source=yes
10240                 ;;
10241          (.*)
10242                 cf_want_posix_source=yes
10243                 ;;
10244          esac
10245          if test "$cf_want_posix_source" = yes ; then
10246                 cat >conftest.$ac_ext <<_ACEOF
10247 #line 10247 "configure"
10248 #include "confdefs.h"
10249 #include <sys/types.h>
10250 int
10251 main (void)
10252 {
10253
10254 #ifdef _POSIX_SOURCE
10255 make an error
10256 #endif
10257   ;
10258   return 0;
10259 }
10260 _ACEOF
10261 rm -f conftest.$ac_objext
10262 if { (eval echo "$as_me:10262: \"$ac_compile\"") >&5
10263   (eval $ac_compile) 2>&5
10264   ac_status=$?
10265   echo "$as_me:10265: \$? = $ac_status" >&5
10266   (exit $ac_status); } &&
10267          { ac_try='test -s conftest.$ac_objext'
10268   { (eval echo "$as_me:10268: \"$ac_try\"") >&5
10269   (eval $ac_try) 2>&5
10270   ac_status=$?
10271   echo "$as_me:10271: \$? = $ac_status" >&5
10272   (exit $ac_status); }; }; then
10273   :
10274 else
10275   echo "$as_me: failed program was:" >&5
10276 cat conftest.$ac_ext >&5
10277 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10278 fi
10279 rm -f conftest.$ac_objext conftest.$ac_ext
10280          fi
10281
10282 echo "${as_me:-configure}:10282: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10283
10284          CFLAGS="$cf_trim_CFLAGS"
10285          CPPFLAGS="$cf_trim_CPPFLAGS"
10286
10287         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10288         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10289
10290 echo "${as_me:-configure}:10290: testing if the second compile does not leave our definition intact error ..." 1>&5
10291
10292          cat >conftest.$ac_ext <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295 #include <sys/types.h>
10296 int
10297 main (void)
10298 {
10299
10300 #ifndef _POSIX_C_SOURCE
10301 make an error
10302 #endif
10303   ;
10304   return 0;
10305 }
10306 _ACEOF
10307 rm -f conftest.$ac_objext
10308 if { (eval echo "$as_me:10308: \"$ac_compile\"") >&5
10309   (eval $ac_compile) 2>&5
10310   ac_status=$?
10311   echo "$as_me:10311: \$? = $ac_status" >&5
10312   (exit $ac_status); } &&
10313          { ac_try='test -s conftest.$ac_objext'
10314   { (eval echo "$as_me:10314: \"$ac_try\"") >&5
10315   (eval $ac_try) 2>&5
10316   ac_status=$?
10317   echo "$as_me:10317: \$? = $ac_status" >&5
10318   (exit $ac_status); }; }; then
10319   :
10320 else
10321   echo "$as_me: failed program was:" >&5
10322 cat conftest.$ac_ext >&5
10323 cf_cv_posix_c_source=no
10324 fi
10325 rm -f conftest.$ac_objext conftest.$ac_ext
10326          CFLAGS="$cf_save_CFLAGS"
10327          CPPFLAGS="$cf_save_CPPFLAGS"
10328
10329 fi
10330 rm -f conftest.$ac_objext conftest.$ac_ext
10331
10332 fi
10333 echo "$as_me:10333: result: $cf_cv_posix_c_source" >&5
10334 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10335
10336 if test "$cf_cv_posix_c_source" != no ; then
10337         CFLAGS="$cf_trim_CFLAGS"
10338         CPPFLAGS="$cf_trim_CPPFLAGS"
10339
10340 cf_fix_cppflags=no
10341 cf_new_cflags=
10342 cf_new_cppflags=
10343 cf_new_extra_cppflags=
10344
10345 for cf_add_cflags in $cf_cv_posix_c_source
10346 do
10347 case $cf_fix_cppflags in
10348 (no)
10349         case $cf_add_cflags in
10350         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10351                 case $cf_add_cflags in
10352                 (-D*)
10353                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10354
10355                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10356                                 && test -z "${cf_tst_cflags}" \
10357                                 && cf_fix_cppflags=yes
10358
10359                         if test $cf_fix_cppflags = yes ; then
10360
10361         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10362         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10363
10364                                 continue
10365                         elif test "${cf_tst_cflags}" = "\"'" ; then
10366
10367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10369
10370                                 continue
10371                         fi
10372                         ;;
10373                 esac
10374                 case "$CPPFLAGS" in
10375                 (*$cf_add_cflags)
10376                         ;;
10377                 (*)
10378                         case $cf_add_cflags in
10379                         (-D*)
10380                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10381
10382 CPPFLAGS=`echo "$CPPFLAGS" | \
10383         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10384                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10385
10386                                 ;;
10387                         esac
10388
10389         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10390         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10391
10392                         ;;
10393                 esac
10394                 ;;
10395         (*)
10396
10397         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10398         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10399
10400                 ;;
10401         esac
10402         ;;
10403 (yes)
10404
10405         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10406         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10407
10408         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10409
10410         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10411                 && test -z "${cf_tst_cflags}" \
10412                 && cf_fix_cppflags=no
10413         ;;
10414 esac
10415 done
10416
10417 if test -n "$cf_new_cflags" ; then
10418
10419         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10420         CFLAGS="${CFLAGS}$cf_new_cflags"
10421
10422 fi
10423
10424 if test -n "$cf_new_cppflags" ; then
10425
10426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10427         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10428
10429 fi
10430
10431 if test -n "$cf_new_extra_cppflags" ; then
10432
10433         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10434         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10435
10436 fi
10437
10438 fi
10439
10440 fi # cf_cv_posix_visible
10441
10442         ;;
10443 (netbsd*)
10444         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10445         ;;
10446 (openbsd[4-9]*)
10447         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10448         cf_xopen_source="-D_BSD_SOURCE"
10449         cf_XOPEN_SOURCE=600
10450         ;;
10451 (openbsd*)
10452         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10453         ;;
10454 (osf[45]*)
10455         cf_xopen_source="-D_OSF_SOURCE"
10456         ;;
10457 (nto-qnx*)
10458         cf_xopen_source="-D_QNX_SOURCE"
10459         ;;
10460 (sco*)
10461         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10462         ;;
10463 (solaris2.*)
10464         cf_xopen_source="-D__EXTENSIONS__"
10465         cf_cv_xopen_source=broken
10466         ;;
10467 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10468         cf_XOPEN_SOURCE=
10469         cf_POSIX_C_SOURCE=
10470         ;;
10471 (*)
10472
10473 echo "$as_me:10473: checking if we should define _XOPEN_SOURCE" >&5
10474 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10475 if test "${cf_cv_xopen_source+set}" = set; then
10476   echo $ECHO_N "(cached) $ECHO_C" >&6
10477 else
10478
10479         cat >conftest.$ac_ext <<_ACEOF
10480 #line 10480 "configure"
10481 #include "confdefs.h"
10482
10483 #include <stdlib.h>
10484 #include <string.h>
10485 #include <sys/types.h>
10486
10487 int
10488 main (void)
10489 {
10490
10491 #ifndef _XOPEN_SOURCE
10492 make an error
10493 #endif
10494   ;
10495   return 0;
10496 }
10497 _ACEOF
10498 rm -f conftest.$ac_objext
10499 if { (eval echo "$as_me:10499: \"$ac_compile\"") >&5
10500   (eval $ac_compile) 2>&5
10501   ac_status=$?
10502   echo "$as_me:10502: \$? = $ac_status" >&5
10503   (exit $ac_status); } &&
10504          { ac_try='test -s conftest.$ac_objext'
10505   { (eval echo "$as_me:10505: \"$ac_try\"") >&5
10506   (eval $ac_try) 2>&5
10507   ac_status=$?
10508   echo "$as_me:10508: \$? = $ac_status" >&5
10509   (exit $ac_status); }; }; then
10510   cf_cv_xopen_source=no
10511 else
10512   echo "$as_me: failed program was:" >&5
10513 cat conftest.$ac_ext >&5
10514 cf_save="$CPPFLAGS"
10515
10516         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10517         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10518
10519          cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522
10523 #include <stdlib.h>
10524 #include <string.h>
10525 #include <sys/types.h>
10526
10527 int
10528 main (void)
10529 {
10530
10531 #ifdef _XOPEN_SOURCE
10532 make an error
10533 #endif
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 rm -f conftest.$ac_objext
10539 if { (eval echo "$as_me:10539: \"$ac_compile\"") >&5
10540   (eval $ac_compile) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit $ac_status); } &&
10544          { ac_try='test -s conftest.$ac_objext'
10545   { (eval echo "$as_me:10545: \"$ac_try\"") >&5
10546   (eval $ac_try) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit $ac_status); }; }; then
10550   cf_cv_xopen_source=no
10551 else
10552   echo "$as_me: failed program was:" >&5
10553 cat conftest.$ac_ext >&5
10554 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10555 fi
10556 rm -f conftest.$ac_objext conftest.$ac_ext
10557         CPPFLAGS="$cf_save"
10558
10559 fi
10560 rm -f conftest.$ac_objext conftest.$ac_ext
10561
10562 fi
10563 echo "$as_me:10563: result: $cf_cv_xopen_source" >&5
10564 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10565
10566 if test "$cf_cv_xopen_source" != no ; then
10567
10568 CFLAGS=`echo "$CFLAGS" | \
10569         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10570                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10571
10572 CPPFLAGS=`echo "$CPPFLAGS" | \
10573         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10574                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10575
10576         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10577
10578 cf_fix_cppflags=no
10579 cf_new_cflags=
10580 cf_new_cppflags=
10581 cf_new_extra_cppflags=
10582
10583 for cf_add_cflags in $cf_temp_xopen_source
10584 do
10585 case $cf_fix_cppflags in
10586 (no)
10587         case $cf_add_cflags in
10588         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10589                 case $cf_add_cflags in
10590                 (-D*)
10591                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10592
10593                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10594                                 && test -z "${cf_tst_cflags}" \
10595                                 && cf_fix_cppflags=yes
10596
10597                         if test $cf_fix_cppflags = yes ; then
10598
10599         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10600         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10601
10602                                 continue
10603                         elif test "${cf_tst_cflags}" = "\"'" ; then
10604
10605         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10606         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10607
10608                                 continue
10609                         fi
10610                         ;;
10611                 esac
10612                 case "$CPPFLAGS" in
10613                 (*$cf_add_cflags)
10614                         ;;
10615                 (*)
10616                         case $cf_add_cflags in
10617                         (-D*)
10618                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10619
10620 CPPFLAGS=`echo "$CPPFLAGS" | \
10621         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10622                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10623
10624                                 ;;
10625                         esac
10626
10627         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10628         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10629
10630                         ;;
10631                 esac
10632                 ;;
10633         (*)
10634
10635         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10636         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10637
10638                 ;;
10639         esac
10640         ;;
10641 (yes)
10642
10643         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10644         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10645
10646         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10647
10648         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10649                 && test -z "${cf_tst_cflags}" \
10650                 && cf_fix_cppflags=no
10651         ;;
10652 esac
10653 done
10654
10655 if test -n "$cf_new_cflags" ; then
10656
10657         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10658         CFLAGS="${CFLAGS}$cf_new_cflags"
10659
10660 fi
10661
10662 if test -n "$cf_new_cppflags" ; then
10663
10664         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10665         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10666
10667 fi
10668
10669 if test -n "$cf_new_extra_cppflags" ; then
10670
10671         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10672         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10673
10674 fi
10675
10676 fi
10677
10678 if test "$cf_cv_posix_visible" = no; then
10679
10680 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10681
10682 cf_save_CFLAGS="$CFLAGS"
10683 cf_save_CPPFLAGS="$CPPFLAGS"
10684
10685 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10686         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10687                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10688
10689 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10690         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10691                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10692
10693 echo "$as_me:10693: checking if we should define _POSIX_C_SOURCE" >&5
10694 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10695 if test "${cf_cv_posix_c_source+set}" = set; then
10696   echo $ECHO_N "(cached) $ECHO_C" >&6
10697 else
10698
10699 echo "${as_me:-configure}:10699: testing if the symbol is already defined go no further ..." 1>&5
10700
10701         cat >conftest.$ac_ext <<_ACEOF
10702 #line 10702 "configure"
10703 #include "confdefs.h"
10704 #include <sys/types.h>
10705 int
10706 main (void)
10707 {
10708
10709 #ifndef _POSIX_C_SOURCE
10710 make an error
10711 #endif
10712   ;
10713   return 0;
10714 }
10715 _ACEOF
10716 rm -f conftest.$ac_objext
10717 if { (eval echo "$as_me:10717: \"$ac_compile\"") >&5
10718   (eval $ac_compile) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit $ac_status); } &&
10722          { ac_try='test -s conftest.$ac_objext'
10723   { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724   (eval $ac_try) 2>&5
10725   ac_status=$?
10726   echo "$as_me:10726: \$? = $ac_status" >&5
10727   (exit $ac_status); }; }; then
10728   cf_cv_posix_c_source=no
10729 else
10730   echo "$as_me: failed program was:" >&5
10731 cat conftest.$ac_ext >&5
10732 cf_want_posix_source=no
10733          case .$cf_POSIX_C_SOURCE in
10734          (.[12]??*)
10735                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10736                 ;;
10737          (.2)
10738                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10739                 cf_want_posix_source=yes
10740                 ;;
10741          (.*)
10742                 cf_want_posix_source=yes
10743                 ;;
10744          esac
10745          if test "$cf_want_posix_source" = yes ; then
10746                 cat >conftest.$ac_ext <<_ACEOF
10747 #line 10747 "configure"
10748 #include "confdefs.h"
10749 #include <sys/types.h>
10750 int
10751 main (void)
10752 {
10753
10754 #ifdef _POSIX_SOURCE
10755 make an error
10756 #endif
10757   ;
10758   return 0;
10759 }
10760 _ACEOF
10761 rm -f conftest.$ac_objext
10762 if { (eval echo "$as_me:10762: \"$ac_compile\"") >&5
10763   (eval $ac_compile) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit $ac_status); } &&
10767          { ac_try='test -s conftest.$ac_objext'
10768   { (eval echo "$as_me:10768: \"$ac_try\"") >&5
10769   (eval $ac_try) 2>&5
10770   ac_status=$?
10771   echo "$as_me:10771: \$? = $ac_status" >&5
10772   (exit $ac_status); }; }; then
10773   :
10774 else
10775   echo "$as_me: failed program was:" >&5
10776 cat conftest.$ac_ext >&5
10777 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10778 fi
10779 rm -f conftest.$ac_objext conftest.$ac_ext
10780          fi
10781
10782 echo "${as_me:-configure}:10782: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10783
10784          CFLAGS="$cf_trim_CFLAGS"
10785          CPPFLAGS="$cf_trim_CPPFLAGS"
10786
10787         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10788         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10789
10790 echo "${as_me:-configure}:10790: testing if the second compile does not leave our definition intact error ..." 1>&5
10791
10792          cat >conftest.$ac_ext <<_ACEOF
10793 #line 10793 "configure"
10794 #include "confdefs.h"
10795 #include <sys/types.h>
10796 int
10797 main (void)
10798 {
10799
10800 #ifndef _POSIX_C_SOURCE
10801 make an error
10802 #endif
10803   ;
10804   return 0;
10805 }
10806 _ACEOF
10807 rm -f conftest.$ac_objext
10808 if { (eval echo "$as_me:10808: \"$ac_compile\"") >&5
10809   (eval $ac_compile) 2>&5
10810   ac_status=$?
10811   echo "$as_me:10811: \$? = $ac_status" >&5
10812   (exit $ac_status); } &&
10813          { ac_try='test -s conftest.$ac_objext'
10814   { (eval echo "$as_me:10814: \"$ac_try\"") >&5
10815   (eval $ac_try) 2>&5
10816   ac_status=$?
10817   echo "$as_me:10817: \$? = $ac_status" >&5
10818   (exit $ac_status); }; }; then
10819   :
10820 else
10821   echo "$as_me: failed program was:" >&5
10822 cat conftest.$ac_ext >&5
10823 cf_cv_posix_c_source=no
10824 fi
10825 rm -f conftest.$ac_objext conftest.$ac_ext
10826          CFLAGS="$cf_save_CFLAGS"
10827          CPPFLAGS="$cf_save_CPPFLAGS"
10828
10829 fi
10830 rm -f conftest.$ac_objext conftest.$ac_ext
10831
10832 fi
10833 echo "$as_me:10833: result: $cf_cv_posix_c_source" >&5
10834 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10835
10836 if test "$cf_cv_posix_c_source" != no ; then
10837         CFLAGS="$cf_trim_CFLAGS"
10838         CPPFLAGS="$cf_trim_CPPFLAGS"
10839
10840 cf_fix_cppflags=no
10841 cf_new_cflags=
10842 cf_new_cppflags=
10843 cf_new_extra_cppflags=
10844
10845 for cf_add_cflags in $cf_cv_posix_c_source
10846 do
10847 case $cf_fix_cppflags in
10848 (no)
10849         case $cf_add_cflags in
10850         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10851                 case $cf_add_cflags in
10852                 (-D*)
10853                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10854
10855                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10856                                 && test -z "${cf_tst_cflags}" \
10857                                 && cf_fix_cppflags=yes
10858
10859                         if test $cf_fix_cppflags = yes ; then
10860
10861         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10862         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10863
10864                                 continue
10865                         elif test "${cf_tst_cflags}" = "\"'" ; then
10866
10867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10869
10870                                 continue
10871                         fi
10872                         ;;
10873                 esac
10874                 case "$CPPFLAGS" in
10875                 (*$cf_add_cflags)
10876                         ;;
10877                 (*)
10878                         case $cf_add_cflags in
10879                         (-D*)
10880                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10881
10882 CPPFLAGS=`echo "$CPPFLAGS" | \
10883         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10884                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10885
10886                                 ;;
10887                         esac
10888
10889         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10890         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10891
10892                         ;;
10893                 esac
10894                 ;;
10895         (*)
10896
10897         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10898         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10899
10900                 ;;
10901         esac
10902         ;;
10903 (yes)
10904
10905         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10906         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10907
10908         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10909
10910         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10911                 && test -z "${cf_tst_cflags}" \
10912                 && cf_fix_cppflags=no
10913         ;;
10914 esac
10915 done
10916
10917 if test -n "$cf_new_cflags" ; then
10918
10919         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10920         CFLAGS="${CFLAGS}$cf_new_cflags"
10921
10922 fi
10923
10924 if test -n "$cf_new_cppflags" ; then
10925
10926         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10927         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10928
10929 fi
10930
10931 if test -n "$cf_new_extra_cppflags" ; then
10932
10933         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10934         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10935
10936 fi
10937
10938 fi
10939
10940 fi # cf_cv_posix_visible
10941
10942         ;;
10943 esac
10944
10945 if test -n "$cf_xopen_source" ; then
10946
10947 cf_fix_cppflags=no
10948 cf_new_cflags=
10949 cf_new_cppflags=
10950 cf_new_extra_cppflags=
10951
10952 for cf_add_cflags in $cf_xopen_source
10953 do
10954 case $cf_fix_cppflags in
10955 (no)
10956         case $cf_add_cflags in
10957         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10958                 case $cf_add_cflags in
10959                 (-D*)
10960                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10961
10962                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10963                                 && test -z "${cf_tst_cflags}" \
10964                                 && cf_fix_cppflags=yes
10965
10966                         if test $cf_fix_cppflags = yes ; then
10967
10968         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10969         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10970
10971                                 continue
10972                         elif test "${cf_tst_cflags}" = "\"'" ; then
10973
10974         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977                                 continue
10978                         fi
10979                         ;;
10980                 esac
10981                 case "$CPPFLAGS" in
10982                 (*$cf_add_cflags)
10983                         ;;
10984                 (*)
10985                         case $cf_add_cflags in
10986                         (-D*)
10987                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10988
10989 CPPFLAGS=`echo "$CPPFLAGS" | \
10990         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10991                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10992
10993                                 ;;
10994                         esac
10995
10996         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10997         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10998
10999                         ;;
11000                 esac
11001                 ;;
11002         (*)
11003
11004         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11005         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11006
11007                 ;;
11008         esac
11009         ;;
11010 (yes)
11011
11012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11014
11015         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11016
11017         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11018                 && test -z "${cf_tst_cflags}" \
11019                 && cf_fix_cppflags=no
11020         ;;
11021 esac
11022 done
11023
11024 if test -n "$cf_new_cflags" ; then
11025         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11026
11027 echo "${as_me:-configure}:11027: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11028
11029         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11030         CFLAGS="${CFLAGS}$cf_new_cflags"
11031
11032 fi
11033
11034 if test -n "$cf_new_cppflags" ; then
11035         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11036
11037 echo "${as_me:-configure}:11037: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11038
11039         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11040         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11041
11042 fi
11043
11044 if test -n "$cf_new_extra_cppflags" ; then
11045         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11046
11047 echo "${as_me:-configure}:11047: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11048
11049         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11050         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11051
11052 fi
11053
11054 fi
11055
11056 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11057         echo "$as_me:11057: checking if _XOPEN_SOURCE really is set" >&5
11058 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11059         cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062 #include <stdlib.h>
11063 int
11064 main (void)
11065 {
11066
11067 #ifndef _XOPEN_SOURCE
11068 make an error
11069 #endif
11070   ;
11071   return 0;
11072 }
11073 _ACEOF
11074 rm -f conftest.$ac_objext
11075 if { (eval echo "$as_me:11075: \"$ac_compile\"") >&5
11076   (eval $ac_compile) 2>&5
11077   ac_status=$?
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit $ac_status); } &&
11080          { ac_try='test -s conftest.$ac_objext'
11081   { (eval echo "$as_me:11081: \"$ac_try\"") >&5
11082   (eval $ac_try) 2>&5
11083   ac_status=$?
11084   echo "$as_me:11084: \$? = $ac_status" >&5
11085   (exit $ac_status); }; }; then
11086   cf_XOPEN_SOURCE_set=yes
11087 else
11088   echo "$as_me: failed program was:" >&5
11089 cat conftest.$ac_ext >&5
11090 cf_XOPEN_SOURCE_set=no
11091 fi
11092 rm -f conftest.$ac_objext conftest.$ac_ext
11093         echo "$as_me:11093: result: $cf_XOPEN_SOURCE_set" >&5
11094 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11095         if test $cf_XOPEN_SOURCE_set = yes
11096         then
11097                 cat >conftest.$ac_ext <<_ACEOF
11098 #line 11098 "configure"
11099 #include "confdefs.h"
11100 #include <stdlib.h>
11101 int
11102 main (void)
11103 {
11104
11105 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11106 make an error
11107 #endif
11108   ;
11109   return 0;
11110 }
11111 _ACEOF
11112 rm -f conftest.$ac_objext
11113 if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114   (eval $ac_compile) 2>&5
11115   ac_status=$?
11116   echo "$as_me:11116: \$? = $ac_status" >&5
11117   (exit $ac_status); } &&
11118          { ac_try='test -s conftest.$ac_objext'
11119   { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120   (eval $ac_try) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit $ac_status); }; }; then
11124   cf_XOPEN_SOURCE_set_ok=yes
11125 else
11126   echo "$as_me: failed program was:" >&5
11127 cat conftest.$ac_ext >&5
11128 cf_XOPEN_SOURCE_set_ok=no
11129 fi
11130 rm -f conftest.$ac_objext conftest.$ac_ext
11131                 if test $cf_XOPEN_SOURCE_set_ok = no
11132                 then
11133                         { echo "$as_me:11133: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11134 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11135                 fi
11136         else
11137
11138 echo "$as_me:11138: checking if we should define _XOPEN_SOURCE" >&5
11139 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11140 if test "${cf_cv_xopen_source+set}" = set; then
11141   echo $ECHO_N "(cached) $ECHO_C" >&6
11142 else
11143
11144         cat >conftest.$ac_ext <<_ACEOF
11145 #line 11145 "configure"
11146 #include "confdefs.h"
11147
11148 #include <stdlib.h>
11149 #include <string.h>
11150 #include <sys/types.h>
11151
11152 int
11153 main (void)
11154 {
11155
11156 #ifndef _XOPEN_SOURCE
11157 make an error
11158 #endif
11159   ;
11160   return 0;
11161 }
11162 _ACEOF
11163 rm -f conftest.$ac_objext
11164 if { (eval echo "$as_me:11164: \"$ac_compile\"") >&5
11165   (eval $ac_compile) 2>&5
11166   ac_status=$?
11167   echo "$as_me:11167: \$? = $ac_status" >&5
11168   (exit $ac_status); } &&
11169          { ac_try='test -s conftest.$ac_objext'
11170   { (eval echo "$as_me:11170: \"$ac_try\"") >&5
11171   (eval $ac_try) 2>&5
11172   ac_status=$?
11173   echo "$as_me:11173: \$? = $ac_status" >&5
11174   (exit $ac_status); }; }; then
11175   cf_cv_xopen_source=no
11176 else
11177   echo "$as_me: failed program was:" >&5
11178 cat conftest.$ac_ext >&5
11179 cf_save="$CPPFLAGS"
11180
11181         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11182         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11183
11184          cat >conftest.$ac_ext <<_ACEOF
11185 #line 11185 "configure"
11186 #include "confdefs.h"
11187
11188 #include <stdlib.h>
11189 #include <string.h>
11190 #include <sys/types.h>
11191
11192 int
11193 main (void)
11194 {
11195
11196 #ifdef _XOPEN_SOURCE
11197 make an error
11198 #endif
11199   ;
11200   return 0;
11201 }
11202 _ACEOF
11203 rm -f conftest.$ac_objext
11204 if { (eval echo "$as_me:11204: \"$ac_compile\"") >&5
11205   (eval $ac_compile) 2>&5
11206   ac_status=$?
11207   echo "$as_me:11207: \$? = $ac_status" >&5
11208   (exit $ac_status); } &&
11209          { ac_try='test -s conftest.$ac_objext'
11210   { (eval echo "$as_me:11210: \"$ac_try\"") >&5
11211   (eval $ac_try) 2>&5
11212   ac_status=$?
11213   echo "$as_me:11213: \$? = $ac_status" >&5
11214   (exit $ac_status); }; }; then
11215   cf_cv_xopen_source=no
11216 else
11217   echo "$as_me: failed program was:" >&5
11218 cat conftest.$ac_ext >&5
11219 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11220 fi
11221 rm -f conftest.$ac_objext conftest.$ac_ext
11222         CPPFLAGS="$cf_save"
11223
11224 fi
11225 rm -f conftest.$ac_objext conftest.$ac_ext
11226
11227 fi
11228 echo "$as_me:11228: result: $cf_cv_xopen_source" >&5
11229 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11230
11231 if test "$cf_cv_xopen_source" != no ; then
11232
11233 CFLAGS=`echo "$CFLAGS" | \
11234         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11235                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11236
11237 CPPFLAGS=`echo "$CPPFLAGS" | \
11238         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11239                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11240
11241         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11242
11243 cf_fix_cppflags=no
11244 cf_new_cflags=
11245 cf_new_cppflags=
11246 cf_new_extra_cppflags=
11247
11248 for cf_add_cflags in $cf_temp_xopen_source
11249 do
11250 case $cf_fix_cppflags in
11251 (no)
11252         case $cf_add_cflags in
11253         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11254                 case $cf_add_cflags in
11255                 (-D*)
11256                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11257
11258                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11259                                 && test -z "${cf_tst_cflags}" \
11260                                 && cf_fix_cppflags=yes
11261
11262                         if test $cf_fix_cppflags = yes ; then
11263
11264         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11265         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11266
11267                                 continue
11268                         elif test "${cf_tst_cflags}" = "\"'" ; then
11269
11270         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11271         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11272
11273                                 continue
11274                         fi
11275                         ;;
11276                 esac
11277                 case "$CPPFLAGS" in
11278                 (*$cf_add_cflags)
11279                         ;;
11280                 (*)
11281                         case $cf_add_cflags in
11282                         (-D*)
11283                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11284
11285 CPPFLAGS=`echo "$CPPFLAGS" | \
11286         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11287                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11288
11289                                 ;;
11290                         esac
11291
11292         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11293         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11294
11295                         ;;
11296                 esac
11297                 ;;
11298         (*)
11299
11300         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11301         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11302
11303                 ;;
11304         esac
11305         ;;
11306 (yes)
11307
11308         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11309         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11310
11311         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11312
11313         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11314                 && test -z "${cf_tst_cflags}" \
11315                 && cf_fix_cppflags=no
11316         ;;
11317 esac
11318 done
11319
11320 if test -n "$cf_new_cflags" ; then
11321
11322         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11323         CFLAGS="${CFLAGS}$cf_new_cflags"
11324
11325 fi
11326
11327 if test -n "$cf_new_cppflags" ; then
11328
11329         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11330         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11331
11332 fi
11333
11334 if test -n "$cf_new_extra_cppflags" ; then
11335
11336         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11337         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11338
11339 fi
11340
11341 fi
11342
11343         fi
11344 fi
11345 fi # cf_cv_posix_visible
11346
11347 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11348
11349 # Work around breakage on OS X
11350
11351 echo "$as_me:11351: checking if SIGWINCH is defined" >&5
11352 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11353 if test "${cf_cv_define_sigwinch+set}" = set; then
11354   echo $ECHO_N "(cached) $ECHO_C" >&6
11355 else
11356
11357         cat >conftest.$ac_ext <<_ACEOF
11358 #line 11358 "configure"
11359 #include "confdefs.h"
11360
11361 #include <sys/types.h>
11362 #include <sys/signal.h>
11363
11364 int
11365 main (void)
11366 {
11367 int x = SIGWINCH; (void)x
11368   ;
11369   return 0;
11370 }
11371 _ACEOF
11372 rm -f conftest.$ac_objext
11373 if { (eval echo "$as_me:11373: \"$ac_compile\"") >&5
11374   (eval $ac_compile) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit $ac_status); } &&
11378          { ac_try='test -s conftest.$ac_objext'
11379   { (eval echo "$as_me:11379: \"$ac_try\"") >&5
11380   (eval $ac_try) 2>&5
11381   ac_status=$?
11382   echo "$as_me:11382: \$? = $ac_status" >&5
11383   (exit $ac_status); }; }; then
11384   cf_cv_define_sigwinch=yes
11385 else
11386   echo "$as_me: failed program was:" >&5
11387 cat conftest.$ac_ext >&5
11388 cat >conftest.$ac_ext <<_ACEOF
11389 #line 11389 "configure"
11390 #include "confdefs.h"
11391
11392 #undef _XOPEN_SOURCE
11393 #undef _POSIX_SOURCE
11394 #undef _POSIX_C_SOURCE
11395 #include <sys/types.h>
11396 #include <sys/signal.h>
11397
11398 int
11399 main (void)
11400 {
11401 int x = SIGWINCH; (void)x
11402   ;
11403   return 0;
11404 }
11405 _ACEOF
11406 rm -f conftest.$ac_objext
11407 if { (eval echo "$as_me:11407: \"$ac_compile\"") >&5
11408   (eval $ac_compile) 2>&5
11409   ac_status=$?
11410   echo "$as_me:11410: \$? = $ac_status" >&5
11411   (exit $ac_status); } &&
11412          { ac_try='test -s conftest.$ac_objext'
11413   { (eval echo "$as_me:11413: \"$ac_try\"") >&5
11414   (eval $ac_try) 2>&5
11415   ac_status=$?
11416   echo "$as_me:11416: \$? = $ac_status" >&5
11417   (exit $ac_status); }; }; then
11418   cf_cv_define_sigwinch=maybe
11419 else
11420   echo "$as_me: failed program was:" >&5
11421 cat conftest.$ac_ext >&5
11422 cf_cv_define_sigwinch=no
11423 fi
11424 rm -f conftest.$ac_objext conftest.$ac_ext
11425
11426 fi
11427 rm -f conftest.$ac_objext conftest.$ac_ext
11428
11429 fi
11430 echo "$as_me:11430: result: $cf_cv_define_sigwinch" >&5
11431 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11432
11433 if test "$cf_cv_define_sigwinch" = maybe ; then
11434 echo "$as_me:11434: checking for actual SIGWINCH definition" >&5
11435 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11436 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11437   echo $ECHO_N "(cached) $ECHO_C" >&6
11438 else
11439
11440 cf_cv_fixup_sigwinch=unknown
11441 cf_sigwinch=32
11442 while test $cf_sigwinch != 1
11443 do
11444         cat >conftest.$ac_ext <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11447
11448 #undef _XOPEN_SOURCE
11449 #undef _POSIX_SOURCE
11450 #undef _POSIX_C_SOURCE
11451 #include <sys/types.h>
11452 #include <sys/signal.h>
11453
11454 int
11455 main (void)
11456 {
11457
11458 #if SIGWINCH != $cf_sigwinch
11459 make an error
11460 #endif
11461 int x = SIGWINCH; (void)x
11462   ;
11463   return 0;
11464 }
11465 _ACEOF
11466 rm -f conftest.$ac_objext
11467 if { (eval echo "$as_me:11467: \"$ac_compile\"") >&5
11468   (eval $ac_compile) 2>&5
11469   ac_status=$?
11470   echo "$as_me:11470: \$? = $ac_status" >&5
11471   (exit $ac_status); } &&
11472          { ac_try='test -s conftest.$ac_objext'
11473   { (eval echo "$as_me:11473: \"$ac_try\"") >&5
11474   (eval $ac_try) 2>&5
11475   ac_status=$?
11476   echo "$as_me:11476: \$? = $ac_status" >&5
11477   (exit $ac_status); }; }; then
11478   cf_cv_fixup_sigwinch=$cf_sigwinch
11479          break
11480 else
11481   echo "$as_me: failed program was:" >&5
11482 cat conftest.$ac_ext >&5
11483 fi
11484 rm -f conftest.$ac_objext conftest.$ac_ext
11485
11486 cf_sigwinch=`expr $cf_sigwinch - 1`
11487 done
11488
11489 fi
11490 echo "$as_me:11490: result: $cf_cv_fixup_sigwinch" >&5
11491 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11492
11493         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11494                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11495         fi
11496 fi
11497
11498 # Checks for CODESET support.
11499
11500 echo "$as_me:11500: checking for nl_langinfo and CODESET" >&5
11501 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11502 if test "${am_cv_langinfo_codeset+set}" = set; then
11503   echo $ECHO_N "(cached) $ECHO_C" >&6
11504 else
11505   cat >conftest.$ac_ext <<_ACEOF
11506 #line 11506 "configure"
11507 #include "confdefs.h"
11508 #include <langinfo.h>
11509 int
11510 main (void)
11511 {
11512 char* cs = nl_langinfo(CODESET); (void)cs
11513   ;
11514   return 0;
11515 }
11516 _ACEOF
11517 rm -f conftest.$ac_objext conftest$ac_exeext
11518 if { (eval echo "$as_me:11518: \"$ac_link\"") >&5
11519   (eval $ac_link) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit $ac_status); } &&
11523          { ac_try='test -s conftest$ac_exeext'
11524   { (eval echo "$as_me:11524: \"$ac_try\"") >&5
11525   (eval $ac_try) 2>&5
11526   ac_status=$?
11527   echo "$as_me:11527: \$? = $ac_status" >&5
11528   (exit $ac_status); }; }; then
11529   am_cv_langinfo_codeset=yes
11530 else
11531   echo "$as_me: failed program was:" >&5
11532 cat conftest.$ac_ext >&5
11533 am_cv_langinfo_codeset=no
11534 fi
11535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11536
11537 fi
11538 echo "$as_me:11538: result: $am_cv_langinfo_codeset" >&5
11539 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11540         if test $am_cv_langinfo_codeset = yes; then
11541
11542 cat >>confdefs.h <<\EOF
11543 #define HAVE_LANGINFO_CODESET 1
11544 EOF
11545
11546         fi
11547
11548 # use these variables to work around a defect in gcc's fixincludes.
11549 NCURSES_OK_WCHAR_T=
11550 NCURSES_OK_WINT_T=
11551
11552 echo "$as_me:11552: checking if you want wide-character code" >&5
11553 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11554
11555 # Check whether --enable-widec or --disable-widec was given.
11556 if test "${enable_widec+set}" = set; then
11557   enableval="$enable_widec"
11558   with_widec=$enableval
11559 else
11560   with_widec=no
11561 fi;
11562 echo "$as_me:11562: result: $with_widec" >&5
11563 echo "${ECHO_T}$with_widec" >&6
11564
11565 NCURSES_WCWIDTH_GRAPHICS=1
11566
11567 if test "x$with_widec" = xyes ; then
11568         if test "x$disable_lib_suffixes" = xno ; then
11569                 LIB_SUFFIX="w${LIB_SUFFIX}"
11570         fi
11571
11572 cat >>confdefs.h <<\EOF
11573 #define USE_WIDEC_SUPPORT 1
11574 EOF
11575
11576 cat >>confdefs.h <<\EOF
11577 #define NCURSES_WIDECHAR 1
11578 EOF
11579
11580 for ac_header in \
11581 wchar.h \
11582 wctype.h \
11583
11584 do
11585 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11586 echo "$as_me:11586: checking for $ac_header" >&5
11587 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11588 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11589   echo $ECHO_N "(cached) $ECHO_C" >&6
11590 else
11591   cat >conftest.$ac_ext <<_ACEOF
11592 #line 11592 "configure"
11593 #include "confdefs.h"
11594 #include <$ac_header>
11595 _ACEOF
11596 if { (eval echo "$as_me:11596: \"$ac_cpp conftest.$ac_ext\"") >&5
11597   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11598   ac_status=$?
11599   egrep -v '^ *\+' conftest.er1 >conftest.err
11600   rm -f conftest.er1
11601   cat conftest.err >&5
11602   echo "$as_me:11602: \$? = $ac_status" >&5
11603   (exit $ac_status); } >/dev/null; then
11604   if test -s conftest.err; then
11605     ac_cpp_err=$ac_c_preproc_warn_flag
11606   else
11607     ac_cpp_err=
11608   fi
11609 else
11610   ac_cpp_err=yes
11611 fi
11612 if test -z "$ac_cpp_err"; then
11613   eval "$as_ac_Header=yes"
11614 else
11615   echo "$as_me: failed program was:" >&5
11616   cat conftest.$ac_ext >&5
11617   eval "$as_ac_Header=no"
11618 fi
11619 rm -f conftest.err conftest.$ac_ext
11620 fi
11621 echo "$as_me:11621: result: `eval echo '${'$as_ac_Header'}'`" >&5
11622 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11623 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11624   cat >>confdefs.h <<EOF
11625 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11626 EOF
11627
11628 fi
11629 done
11630
11631 echo "$as_me:11631: checking if wchar.h can be used as is" >&5
11632 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11633 if test "${cf_cv_wchar_h_okay+set}" = set; then
11634   echo $ECHO_N "(cached) $ECHO_C" >&6
11635 else
11636
11637 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640
11641 #include <stdlib.h>
11642 #ifdef HAVE_WCHAR_H
11643 #include <wchar.h>
11644 #endif
11645 #ifdef HAVE_WCTYPE_H
11646 #include <wctype.h>
11647 #endif
11648
11649 int
11650 main (void)
11651 {
11652
11653         wint_t foo = 0;
11654         int bar = iswpunct(foo)
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 rm -f conftest.$ac_objext
11660 if { (eval echo "$as_me:11660: \"$ac_compile\"") >&5
11661   (eval $ac_compile) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit $ac_status); } &&
11665          { ac_try='test -s conftest.$ac_objext'
11666   { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); }; }; then
11671   cf_cv_wchar_h_okay=yes
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 cat conftest.$ac_ext >&5
11675 cf_cv_wchar_h_okay=no
11676 fi
11677 rm -f conftest.$ac_objext conftest.$ac_ext
11678 fi
11679 echo "$as_me:11679: result: $cf_cv_wchar_h_okay" >&5
11680 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11681
11682 if test $cf_cv_wchar_h_okay = no
11683 then
11684
11685 echo "$as_me:11685: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11686 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11687 cat >conftest.$ac_ext <<_ACEOF
11688 #line 11688 "configure"
11689 #include "confdefs.h"
11690 #include <sys/types.h>
11691
11692 int
11693 main (void)
11694 {
11695
11696 #ifndef _XOPEN_SOURCE_EXTENDED
11697 make an error
11698 #endif
11699   ;
11700   return 0;
11701 }
11702 _ACEOF
11703 rm -f conftest.$ac_objext
11704 if { (eval echo "$as_me:11704: \"$ac_compile\"") >&5
11705   (eval $ac_compile) 2>&5
11706   ac_status=$?
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit $ac_status); } &&
11709          { ac_try='test -s conftest.$ac_objext'
11710   { (eval echo "$as_me:11710: \"$ac_try\"") >&5
11711   (eval $ac_try) 2>&5
11712   ac_status=$?
11713   echo "$as_me:11713: \$? = $ac_status" >&5
11714   (exit $ac_status); }; }; then
11715   cf_result=no
11716 else
11717   echo "$as_me: failed program was:" >&5
11718 cat conftest.$ac_ext >&5
11719 cf_result=yes
11720 fi
11721 rm -f conftest.$ac_objext conftest.$ac_ext
11722 echo "$as_me:11722: result: $cf_result" >&5
11723 echo "${ECHO_T}$cf_result" >&6
11724
11725 if test "$cf_result" = yes ; then
11726         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11727 elif test "x" != "x" ; then
11728         echo "$as_me:11728: checking checking for compatible value versus " >&5
11729 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11730         cat >conftest.$ac_ext <<_ACEOF
11731 #line 11731 "configure"
11732 #include "confdefs.h"
11733 #include <sys/types.h>
11734
11735 int
11736 main (void)
11737 {
11738
11739 #if _XOPEN_SOURCE_EXTENDED- < 0
11740 make an error
11741 #endif
11742   ;
11743   return 0;
11744 }
11745 _ACEOF
11746 rm -f conftest.$ac_objext
11747 if { (eval echo "$as_me:11747: \"$ac_compile\"") >&5
11748   (eval $ac_compile) 2>&5
11749   ac_status=$?
11750   echo "$as_me:11750: \$? = $ac_status" >&5
11751   (exit $ac_status); } &&
11752          { ac_try='test -s conftest.$ac_objext'
11753   { (eval echo "$as_me:11753: \"$ac_try\"") >&5
11754   (eval $ac_try) 2>&5
11755   ac_status=$?
11756   echo "$as_me:11756: \$? = $ac_status" >&5
11757   (exit $ac_status); }; }; then
11758   cf_result=yes
11759 else
11760   echo "$as_me: failed program was:" >&5
11761 cat conftest.$ac_ext >&5
11762 cf_result=no
11763 fi
11764 rm -f conftest.$ac_objext conftest.$ac_ext
11765         echo "$as_me:11765: result: $cf_result" >&5
11766 echo "${ECHO_T}$cf_result" >&6
11767         if test "$cf_result" = no ; then
11768                 # perhaps we can override it - try...
11769                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11770         fi
11771 fi
11772
11773 fi
11774
11775 echo "$as_me:11775: checking if wcwidth agrees graphics are single-width" >&5
11776 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11777 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11778   echo $ECHO_N "(cached) $ECHO_C" >&6
11779 else
11780
11781 cat >conftest.in <<CF_EOF
11782 -       VT100 symbols
11783 0x250c  upper left corner
11784 0x2514  lower left corner
11785 0x2510  upper right corner
11786 0x2518  lower right corner
11787 0x251c  tee pointing left
11788 0x2524  tee pointing right
11789 0x2534  tee pointing up
11790 0x252c  tee pointing down
11791 0x2500  horizontal line
11792 0x2502  vertical line
11793 0x253c  large plus or crossover
11794 0x23ba  scan line 1
11795 0x23bd  scan line 9
11796 0x25c6  diamond
11797 0x2592  checker board (stipple)
11798 0x00b0  degree symbol
11799 0x00b1  plus/minus
11800 0x00b7  bullet
11801 -       Teletype 5410v1 symbols
11802 0x2190  arrow pointing left
11803 0x2192  arrow pointing right
11804 0x2193  arrow pointing down
11805 0x2191  arrow pointing up
11806 0x2592  board of squares
11807 0x2603  lantern symbol
11808 0x25ae  solid square block
11809 -       these defaults were invented for ncurses
11810 0x23bb  scan line 3
11811 0x23bc  scan line 7
11812 0x2264  less-than-or-equal-to
11813 0x2265  greater-than-or-equal-to
11814 0x03c0  greek pi
11815 0x2260  not-equal
11816 0x00a3  pound-sterling symbol
11817 -       thick-line-drawing
11818 0x250f  upper left corner
11819 0x2517  lower left corner
11820 0x2513  upper right corner
11821 0x251b  lower right corner
11822 0x2523  tee pointing left
11823 0x252b  tee pointing right
11824 0x253b  tee pointing up
11825 0x2533  tee pointing down
11826 0x2501  horizontal line
11827 0x2503  vertical line
11828 0x254b  large plus or crossover
11829 -       double-line-drawing
11830 0x2554  upper left corner
11831 0x255a  lower left corner
11832 0x2557  upper right corner
11833 0x255d  lower right corner
11834 0x2563  tee pointing left
11835 0x2560  tee pointing right
11836 0x2569  tee pointing up
11837 0x2566  tee pointing down
11838 0x2550  horizontal line
11839 0x2551  vertical line
11840 0x256c  large plus or crossover
11841 CF_EOF
11842 if test "$cross_compiling" = yes; then
11843   cf_cv_wcwidth_graphics=unknown
11844 else
11845   cat >conftest.$ac_ext <<_ACEOF
11846 #line 11846 "configure"
11847 #include "confdefs.h"
11848
11849 #include <locale.h>
11850 #include <stdio.h>
11851 #include <wchar.h>
11852
11853 #define MY_LEN 80
11854
11855 int
11856 main(void)
11857 {
11858         FILE *fp;
11859         int value;
11860         char buffer[MY_LEN + 1];
11861         char notes[MY_LEN + 1];
11862         int totals = 0;
11863         int passed = 0;
11864
11865         if (setlocale(LC_ALL, "en_US.UTF8") ||
11866                 setlocale(LC_ALL, "en_US.UTF-8") ||
11867                 setlocale(LC_ALL, "en_US.utf8") ||
11868                 setlocale(LC_ALL, "en_US.utf-8")) {
11869                 if ((fp = fopen("conftest.in", "r")) != 0) {
11870                         while (fgets(buffer, MY_LEN, fp) != 0) {
11871                                 if (*buffer == '-') {
11872                                         fprintf(stderr, "\t%s", buffer);
11873                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11874                                         ++totals;
11875                                         if (wcwidth(value) == 1)
11876                                                 ++passed;
11877                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11878                                 } else {
11879                                         fprintf(stderr, "?\t%s", buffer);
11880                                 }
11881                         }
11882                 }
11883         }
11884         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11885         return (totals == passed) ? 0 : 1;
11886 }
11887
11888 _ACEOF
11889 rm -f conftest$ac_exeext
11890 if { (eval echo "$as_me:11890: \"$ac_link\"") >&5
11891   (eval $ac_link) 2>&5
11892   ac_status=$?
11893   echo "$as_me:11893: \$? = $ac_status" >&5
11894   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11895   { (eval echo "$as_me:11895: \"$ac_try\"") >&5
11896   (eval $ac_try) 2>&5
11897   ac_status=$?
11898   echo "$as_me:11898: \$? = $ac_status" >&5
11899   (exit $ac_status); }; }; then
11900   cf_cv_wcwidth_graphics=yes
11901 else
11902   echo "$as_me: program exited with status $ac_status" >&5
11903 echo "$as_me: failed program was:" >&5
11904 cat conftest.$ac_ext >&5
11905 cf_cv_wcwidth_graphics=no
11906 fi
11907 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11908 fi
11909
11910 fi
11911 echo "$as_me:11911: result: $cf_cv_wcwidth_graphics" >&5
11912 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11913
11914         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11915
11916         # with_overwrite=no
11917         NCURSES_CH_T=cchar_t
11918
11919 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11920 do
11921 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11922 echo "$as_me:11922: checking for $ac_func" >&5
11923 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11924 if eval "test \"\${$as_ac_var+set}\" = set"; then
11925   echo $ECHO_N "(cached) $ECHO_C" >&6
11926 else
11927   cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930 #define $ac_func autoconf_temporary
11931 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11932 #undef $ac_func
11933
11934 #ifdef __cplusplus
11935 extern "C"
11936 #endif
11937
11938 /* We use char because int might match the return type of a gcc2
11939    builtin and then its argument prototype would still apply.  */
11940 char $ac_func (void);
11941
11942 int
11943 main (void)
11944 {
11945
11946 /* The GNU C library defines stubs for functions which it implements
11947     to always fail with ENOSYS.  Some functions are actually named
11948     something starting with __ and the normal name is an alias.  */
11949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11950 #error found stub for $ac_func
11951 #endif
11952
11953         return $ac_func ();
11954   ;
11955   return 0;
11956 }
11957 _ACEOF
11958 rm -f conftest.$ac_objext conftest$ac_exeext
11959 if { (eval echo "$as_me:11959: \"$ac_link\"") >&5
11960   (eval $ac_link) 2>&5
11961   ac_status=$?
11962   echo "$as_me:11962: \$? = $ac_status" >&5
11963   (exit $ac_status); } &&
11964          { ac_try='test -s conftest$ac_exeext'
11965   { (eval echo "$as_me:11965: \"$ac_try\"") >&5
11966   (eval $ac_try) 2>&5
11967   ac_status=$?
11968   echo "$as_me:11968: \$? = $ac_status" >&5
11969   (exit $ac_status); }; }; then
11970   eval "$as_ac_var=yes"
11971 else
11972   echo "$as_me: failed program was:" >&5
11973 cat conftest.$ac_ext >&5
11974 eval "$as_ac_var=no"
11975 fi
11976 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11977 fi
11978 echo "$as_me:11978: result: `eval echo '${'$as_ac_var'}'`" >&5
11979 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11980 if test `eval echo '${'$as_ac_var'}'` = yes; then
11981   cat >>confdefs.h <<EOF
11982 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11983 EOF
11984
11985 fi
11986 done
11987
11988         if test "x$ac_cv_func_putwc" != xyes ; then
11989
11990 echo "$as_me:11990: checking for multibyte character support" >&5
11991 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11992 if test "${cf_cv_utf8_lib+set}" = set; then
11993   echo $ECHO_N "(cached) $ECHO_C" >&6
11994 else
11995
11996         cf_save_LIBS="$LIBS"
11997         cat >conftest.$ac_ext <<_ACEOF
11998 #line 11998 "configure"
11999 #include "confdefs.h"
12000
12001 #include <stdlib.h>
12002 int
12003 main (void)
12004 {
12005 putwc(0,0);
12006   ;
12007   return 0;
12008 }
12009 _ACEOF
12010 rm -f conftest.$ac_objext conftest$ac_exeext
12011 if { (eval echo "$as_me:12011: \"$ac_link\"") >&5
12012   (eval $ac_link) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); } &&
12016          { ac_try='test -s conftest$ac_exeext'
12017   { (eval echo "$as_me:12017: \"$ac_try\"") >&5
12018   (eval $ac_try) 2>&5
12019   ac_status=$?
12020   echo "$as_me:12020: \$? = $ac_status" >&5
12021   (exit $ac_status); }; }; then
12022   cf_cv_utf8_lib=yes
12023 else
12024   echo "$as_me: failed program was:" >&5
12025 cat conftest.$ac_ext >&5
12026
12027 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12028 # will be set on completion of the AC_TRY_LINK below.
12029 cf_cv_header_path_utf8=
12030 cf_cv_library_path_utf8=
12031
12032 echo "${as_me:-configure}:12032: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12033
12034 cf_save_LIBS="$LIBS"
12035
12036 cat >conftest.$ac_ext <<_ACEOF
12037 #line 12037 "configure"
12038 #include "confdefs.h"
12039
12040 #include <libutf8.h>
12041 int
12042 main (void)
12043 {
12044 putwc(0,0);
12045   ;
12046   return 0;
12047 }
12048 _ACEOF
12049 rm -f conftest.$ac_objext conftest$ac_exeext
12050 if { (eval echo "$as_me:12050: \"$ac_link\"") >&5
12051   (eval $ac_link) 2>&5
12052   ac_status=$?
12053   echo "$as_me:12053: \$? = $ac_status" >&5
12054   (exit $ac_status); } &&
12055          { ac_try='test -s conftest$ac_exeext'
12056   { (eval echo "$as_me:12056: \"$ac_try\"") >&5
12057   (eval $ac_try) 2>&5
12058   ac_status=$?
12059   echo "$as_me:12059: \$? = $ac_status" >&5
12060   (exit $ac_status); }; }; then
12061
12062         cf_cv_find_linkage_utf8=yes
12063         cf_cv_header_path_utf8=/usr/include
12064         cf_cv_library_path_utf8=/usr/lib
12065
12066 else
12067   echo "$as_me: failed program was:" >&5
12068 cat conftest.$ac_ext >&5
12069
12070 LIBS="-lutf8  $cf_save_LIBS"
12071
12072 cat >conftest.$ac_ext <<_ACEOF
12073 #line 12073 "configure"
12074 #include "confdefs.h"
12075
12076 #include <libutf8.h>
12077 int
12078 main (void)
12079 {
12080 putwc(0,0);
12081   ;
12082   return 0;
12083 }
12084 _ACEOF
12085 rm -f conftest.$ac_objext conftest$ac_exeext
12086 if { (eval echo "$as_me:12086: \"$ac_link\"") >&5
12087   (eval $ac_link) 2>&5
12088   ac_status=$?
12089   echo "$as_me:12089: \$? = $ac_status" >&5
12090   (exit $ac_status); } &&
12091          { ac_try='test -s conftest$ac_exeext'
12092   { (eval echo "$as_me:12092: \"$ac_try\"") >&5
12093   (eval $ac_try) 2>&5
12094   ac_status=$?
12095   echo "$as_me:12095: \$? = $ac_status" >&5
12096   (exit $ac_status); }; }; then
12097
12098         cf_cv_find_linkage_utf8=yes
12099         cf_cv_header_path_utf8=/usr/include
12100         cf_cv_library_path_utf8=/usr/lib
12101         cf_cv_library_file_utf8="-lutf8"
12102
12103 else
12104   echo "$as_me: failed program was:" >&5
12105 cat conftest.$ac_ext >&5
12106
12107         cf_cv_find_linkage_utf8=no
12108         LIBS="$cf_save_LIBS"
12109
12110         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12111
12112 echo "${as_me:-configure}:12112: testing find linkage for utf8 library ..." 1>&5
12113
12114 echo "${as_me:-configure}:12114: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12115
12116         cf_save_CPPFLAGS="$CPPFLAGS"
12117         cf_test_CPPFLAGS="$CPPFLAGS"
12118
12119 cf_search=
12120
12121 # collect the current set of include-directories from compiler flags
12122 cf_header_path_list=""
12123 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12124         for cf_header_path in $CPPFLAGS $CFLAGS
12125         do
12126                 case $cf_header_path in
12127                 (-I*)
12128                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12129
12130 test "x$cf_header_path" != "xNONE" && \
12131 test -d "$cf_header_path" && \
12132  {
12133         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12134         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12135         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
12136         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12137         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
12138         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12139 }
12140
12141                         cf_header_path_list="$cf_header_path_list $cf_search"
12142                         ;;
12143                 esac
12144         done
12145 fi
12146
12147 # add the variations for the package we are looking for
12148
12149 cf_search=
12150
12151 test "x$prefix" != "xNONE" && \
12152 test -d "$prefix" && \
12153  {
12154         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12155         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12156         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
12157         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
12158         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
12159         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12160 }
12161
12162 for cf_subdir_prefix in \
12163         /usr \
12164         /usr/local \
12165         /usr/pkg \
12166         /opt \
12167         /opt/local \
12168         $HOME
12169 do
12170
12171 test "x$cf_subdir_prefix" != "x$prefix" && \
12172 test -d "$cf_subdir_prefix" && \
12173 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12174         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12175         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12176         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12177         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12178         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12179         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12180 }
12181
12182 done
12183
12184 test "$includedir" != NONE && \
12185 test "$includedir" != "/usr/include" && \
12186 test -d "$includedir" && {
12187         test -d $includedir &&    cf_search="$cf_search $includedir"
12188         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
12189 }
12190
12191 test "$oldincludedir" != NONE && \
12192 test "$oldincludedir" != "/usr/include" && \
12193 test -d "$oldincludedir" && {
12194         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12195         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
12196 }
12197
12198 cf_search="$cf_search $cf_header_path_list"
12199
12200         for cf_cv_header_path_utf8 in $cf_search
12201         do
12202                 if test -d $cf_cv_header_path_utf8 ; then
12203                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12204
12205 echo "${as_me:-configure}:12205: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12206
12207                         CPPFLAGS="$cf_save_CPPFLAGS"
12208
12209         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12210         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12211
12212                         cat >conftest.$ac_ext <<_ACEOF
12213 #line 12213 "configure"
12214 #include "confdefs.h"
12215
12216 #include <libutf8.h>
12217 int
12218 main (void)
12219 {
12220 putwc(0,0);
12221   ;
12222   return 0;
12223 }
12224 _ACEOF
12225 rm -f conftest.$ac_objext
12226 if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
12227   (eval $ac_compile) 2>&5
12228   ac_status=$?
12229   echo "$as_me:12229: \$? = $ac_status" >&5
12230   (exit $ac_status); } &&
12231          { ac_try='test -s conftest.$ac_objext'
12232   { (eval echo "$as_me:12232: \"$ac_try\"") >&5
12233   (eval $ac_try) 2>&5
12234   ac_status=$?
12235   echo "$as_me:12235: \$? = $ac_status" >&5
12236   (exit $ac_status); }; }; then
12237
12238                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12239
12240 echo "${as_me:-configure}:12240: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12241
12242                                 cf_cv_find_linkage_utf8=maybe
12243                                 cf_test_CPPFLAGS="$CPPFLAGS"
12244                                 break
12245 else
12246   echo "$as_me: failed program was:" >&5
12247 cat conftest.$ac_ext >&5
12248
12249                                 CPPFLAGS="$cf_save_CPPFLAGS"
12250
12251 fi
12252 rm -f conftest.$ac_objext conftest.$ac_ext
12253                 fi
12254         done
12255
12256         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12257
12258 echo "${as_me:-configure}:12258: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12259
12260                 cf_save_LIBS="$LIBS"
12261                 cf_save_LDFLAGS="$LDFLAGS"
12262
12263                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12264
12265 cf_search=
12266 cf_library_path_list=""
12267 if test -n "${LDFLAGS}${LIBS}" ; then
12268         for cf_library_path in $LDFLAGS $LIBS
12269         do
12270                 case $cf_library_path in
12271                 (-L*)
12272                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12273
12274 test "x$cf_library_path" != "xNONE" && \
12275 test -d "$cf_library_path" && \
12276  {
12277         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12278         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12279         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12280         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12281         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12282         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12283 }
12284
12285                         cf_library_path_list="$cf_library_path_list $cf_search"
12286                         ;;
12287                 esac
12288         done
12289 fi
12290
12291 cf_search=
12292
12293 test "x$prefix" != "xNONE" && \
12294 test -d "$prefix" && \
12295  {
12296         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12297         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12298         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12299         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12300         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12301         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12302 }
12303
12304 for cf_subdir_prefix in \
12305         /usr \
12306         /usr/local \
12307         /usr/pkg \
12308         /opt \
12309         /opt/local \
12310         $HOME
12311 do
12312
12313 test "x$cf_subdir_prefix" != "x$prefix" && \
12314 test -d "$cf_subdir_prefix" && \
12315 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12316         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12317         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12318         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12319         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12320         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12321         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12322 }
12323
12324 done
12325
12326 cf_search="$cf_library_path_list $cf_search"
12327
12328                         for cf_cv_library_path_utf8 in $cf_search
12329                         do
12330                                 if test -d $cf_cv_library_path_utf8 ; then
12331                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12332
12333 echo "${as_me:-configure}:12333: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12334
12335                                         CPPFLAGS="$cf_test_CPPFLAGS"
12336                                         LIBS="-lutf8  $cf_save_LIBS"
12337                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12338                                         cat >conftest.$ac_ext <<_ACEOF
12339 #line 12339 "configure"
12340 #include "confdefs.h"
12341
12342 #include <libutf8.h>
12343 int
12344 main (void)
12345 {
12346 putwc(0,0);
12347   ;
12348   return 0;
12349 }
12350 _ACEOF
12351 rm -f conftest.$ac_objext conftest$ac_exeext
12352 if { (eval echo "$as_me:12352: \"$ac_link\"") >&5
12353   (eval $ac_link) 2>&5
12354   ac_status=$?
12355   echo "$as_me:12355: \$? = $ac_status" >&5
12356   (exit $ac_status); } &&
12357          { ac_try='test -s conftest$ac_exeext'
12358   { (eval echo "$as_me:12358: \"$ac_try\"") >&5
12359   (eval $ac_try) 2>&5
12360   ac_status=$?
12361   echo "$as_me:12361: \$? = $ac_status" >&5
12362   (exit $ac_status); }; }; then
12363
12364                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12365
12366 echo "${as_me:-configure}:12366: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12367
12368                                         cf_cv_find_linkage_utf8=yes
12369                                         cf_cv_library_file_utf8="-lutf8"
12370                                         break
12371 else
12372   echo "$as_me: failed program was:" >&5
12373 cat conftest.$ac_ext >&5
12374
12375                                         CPPFLAGS="$cf_save_CPPFLAGS"
12376                                         LIBS="$cf_save_LIBS"
12377                                         LDFLAGS="$cf_save_LDFLAGS"
12378
12379 fi
12380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12381                                 fi
12382                         done
12383                         CPPFLAGS="$cf_save_CPPFLAGS"
12384                         LDFLAGS="$cf_save_LDFLAGS"
12385                 fi
12386
12387         else
12388                 cf_cv_find_linkage_utf8=no
12389         fi
12390
12391 fi
12392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12393
12394 fi
12395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12396
12397 LIBS="$cf_save_LIBS"
12398
12399 if test "$cf_cv_find_linkage_utf8" = yes ; then
12400 cf_cv_utf8_lib=add-on
12401 else
12402 cf_cv_utf8_lib=no
12403 fi
12404
12405 fi
12406 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12407 fi
12408 echo "$as_me:12408: result: $cf_cv_utf8_lib" >&5
12409 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12410
12411 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12412 # ncurses/ncursesw:
12413 if test "$cf_cv_utf8_lib" = "add-on" ; then
12414
12415 cat >>confdefs.h <<\EOF
12416 #define HAVE_LIBUTF8_H 1
12417 EOF
12418
12419 if test -n "$cf_cv_header_path_utf8" ; then
12420   for cf_add_incdir in $cf_cv_header_path_utf8
12421   do
12422         while test $cf_add_incdir != /usr/include
12423         do
12424           if test -d $cf_add_incdir
12425           then
12426                 cf_have_incdir=no
12427                 if test -n "$CFLAGS$CPPFLAGS" ; then
12428                   # a loop is needed to ensure we can add subdirs of existing dirs
12429                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12430                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12431                           cf_have_incdir=yes; break
12432                         fi
12433                   done
12434                 fi
12435
12436                 if test "$cf_have_incdir" = no ; then
12437                   if test "$cf_add_incdir" = /usr/local/include ; then
12438                         if test "$GCC" = yes
12439                         then
12440                           cf_save_CPPFLAGS=$CPPFLAGS
12441
12442         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12443         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12444
12445                           cat >conftest.$ac_ext <<_ACEOF
12446 #line 12446 "configure"
12447 #include "confdefs.h"
12448 #include <stdio.h>
12449 int
12450 main (void)
12451 {
12452 printf("Hello")
12453   ;
12454   return 0;
12455 }
12456 _ACEOF
12457 rm -f conftest.$ac_objext
12458 if { (eval echo "$as_me:12458: \"$ac_compile\"") >&5
12459   (eval $ac_compile) 2>&5
12460   ac_status=$?
12461   echo "$as_me:12461: \$? = $ac_status" >&5
12462   (exit $ac_status); } &&
12463          { ac_try='test -s conftest.$ac_objext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   :
12470 else
12471   echo "$as_me: failed program was:" >&5
12472 cat conftest.$ac_ext >&5
12473 cf_have_incdir=yes
12474 fi
12475 rm -f conftest.$ac_objext conftest.$ac_ext
12476                           CPPFLAGS=$cf_save_CPPFLAGS
12477                         fi
12478                   fi
12479                 fi
12480
12481                 if test "$cf_have_incdir" = no ; then
12482                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12483
12484 echo "${as_me:-configure}:12484: testing adding $cf_add_incdir to include-path ..." 1>&5
12485
12486                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12487
12488                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12489                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12490                   cf_add_incdir="$cf_top_incdir"
12491                 else
12492                   break
12493                 fi
12494           else
12495                 break
12496           fi
12497         done
12498   done
12499 fi
12500
12501 if test -n "$cf_cv_library_path_utf8" ; then
12502         for cf_add_libdir in $cf_cv_library_path_utf8
12503         do
12504                 if test $cf_add_libdir = /usr/lib ; then
12505                         :
12506                 elif test -d $cf_add_libdir
12507                 then
12508                         cf_have_libdir=no
12509                         if test -n "$LDFLAGS$LIBS" ; then
12510                                 # a loop is needed to ensure we can add subdirs of existing dirs
12511                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12512                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12513                                                 cf_have_libdir=yes; break
12514                                         fi
12515                                 done
12516                         fi
12517                         if test "$cf_have_libdir" = no ; then
12518                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12519
12520 echo "${as_me:-configure}:12520: testing adding $cf_add_libdir to library-path ..." 1>&5
12521
12522                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12523                         fi
12524                 fi
12525         done
12526 fi
12527
12528 cf_add_libs="$LIBS"
12529 # reverse order
12530 cf_add_0lib=
12531 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12532 # filter duplicates
12533 for cf_add_1lib in $cf_add_0lib; do
12534         for cf_add_2lib in $cf_add_libs; do
12535                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12536                         cf_add_1lib=
12537                         break
12538                 fi
12539         done
12540         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12541 done
12542 LIBS="$cf_add_libs"
12543
12544 fi
12545
12546                 if test "$cf_cv_utf8_lib" != no ; then
12547                         NCURSES_LIBUTF8=1
12548                 fi
12549         fi
12550
12551 # This is needed on Tru64 5.0 to declare mbstate_t
12552 echo "$as_me:12552: checking if we must include wchar.h to declare mbstate_t" >&5
12553 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12554 if test "${cf_cv_mbstate_t+set}" = set; then
12555   echo $ECHO_N "(cached) $ECHO_C" >&6
12556 else
12557
12558 cat >conftest.$ac_ext <<_ACEOF
12559 #line 12559 "configure"
12560 #include "confdefs.h"
12561
12562 #include <stdlib.h>
12563 #include <stdarg.h>
12564 #include <stdio.h>
12565 #ifdef HAVE_LIBUTF8_H
12566 #include <libutf8.h>
12567 #endif
12568 int
12569 main (void)
12570 {
12571 mbstate_t state
12572   ;
12573   return 0;
12574 }
12575 _ACEOF
12576 rm -f conftest.$ac_objext
12577 if { (eval echo "$as_me:12577: \"$ac_compile\"") >&5
12578   (eval $ac_compile) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit $ac_status); } &&
12582          { ac_try='test -s conftest.$ac_objext'
12583   { (eval echo "$as_me:12583: \"$ac_try\"") >&5
12584   (eval $ac_try) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit $ac_status); }; }; then
12588   cf_cv_mbstate_t=no
12589 else
12590   echo "$as_me: failed program was:" >&5
12591 cat conftest.$ac_ext >&5
12592 cat >conftest.$ac_ext <<_ACEOF
12593 #line 12593 "configure"
12594 #include "confdefs.h"
12595
12596 #include <stdlib.h>
12597 #include <stdarg.h>
12598 #include <stdio.h>
12599 #include <wchar.h>
12600 #ifdef HAVE_LIBUTF8_H
12601 #include <libutf8.h>
12602 #endif
12603 int
12604 main (void)
12605 {
12606 mbstate_t value
12607   ;
12608   return 0;
12609 }
12610 _ACEOF
12611 rm -f conftest.$ac_objext
12612 if { (eval echo "$as_me:12612: \"$ac_compile\"") >&5
12613   (eval $ac_compile) 2>&5
12614   ac_status=$?
12615   echo "$as_me:12615: \$? = $ac_status" >&5
12616   (exit $ac_status); } &&
12617          { ac_try='test -s conftest.$ac_objext'
12618   { (eval echo "$as_me:12618: \"$ac_try\"") >&5
12619   (eval $ac_try) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit $ac_status); }; }; then
12623   cf_cv_mbstate_t=yes
12624 else
12625   echo "$as_me: failed program was:" >&5
12626 cat conftest.$ac_ext >&5
12627 cf_cv_mbstate_t=unknown
12628 fi
12629 rm -f conftest.$ac_objext conftest.$ac_ext
12630 fi
12631 rm -f conftest.$ac_objext conftest.$ac_ext
12632 fi
12633 echo "$as_me:12633: result: $cf_cv_mbstate_t" >&5
12634 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12635
12636 if test "$cf_cv_mbstate_t" = yes ; then
12637
12638 cat >>confdefs.h <<\EOF
12639 #define NEED_WCHAR_H 1
12640 EOF
12641
12642         NEED_WCHAR_H=1
12643 fi
12644
12645 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12646 if test "$cf_cv_mbstate_t" = unknown ; then
12647         NCURSES_MBSTATE_T=1
12648 fi
12649
12650 # This is needed on Tru64 5.0 to declare wchar_t
12651 echo "$as_me:12651: checking if we must include wchar.h to declare wchar_t" >&5
12652 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12653 if test "${cf_cv_wchar_t+set}" = set; then
12654   echo $ECHO_N "(cached) $ECHO_C" >&6
12655 else
12656
12657 cat >conftest.$ac_ext <<_ACEOF
12658 #line 12658 "configure"
12659 #include "confdefs.h"
12660
12661 #include <stdlib.h>
12662 #include <stdarg.h>
12663 #include <stdio.h>
12664 #ifdef HAVE_LIBUTF8_H
12665 #include <libutf8.h>
12666 #endif
12667 int
12668 main (void)
12669 {
12670 wchar_t state
12671   ;
12672   return 0;
12673 }
12674 _ACEOF
12675 rm -f conftest.$ac_objext
12676 if { (eval echo "$as_me:12676: \"$ac_compile\"") >&5
12677   (eval $ac_compile) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit $ac_status); } &&
12681          { ac_try='test -s conftest.$ac_objext'
12682   { (eval echo "$as_me:12682: \"$ac_try\"") >&5
12683   (eval $ac_try) 2>&5
12684   ac_status=$?
12685   echo "$as_me:12685: \$? = $ac_status" >&5
12686   (exit $ac_status); }; }; then
12687   cf_cv_wchar_t=no
12688 else
12689   echo "$as_me: failed program was:" >&5
12690 cat conftest.$ac_ext >&5
12691 cat >conftest.$ac_ext <<_ACEOF
12692 #line 12692 "configure"
12693 #include "confdefs.h"
12694
12695 #include <stdlib.h>
12696 #include <stdarg.h>
12697 #include <stdio.h>
12698 #include <wchar.h>
12699 #ifdef HAVE_LIBUTF8_H
12700 #include <libutf8.h>
12701 #endif
12702 int
12703 main (void)
12704 {
12705 wchar_t value
12706   ;
12707   return 0;
12708 }
12709 _ACEOF
12710 rm -f conftest.$ac_objext
12711 if { (eval echo "$as_me:12711: \"$ac_compile\"") >&5
12712   (eval $ac_compile) 2>&5
12713   ac_status=$?
12714   echo "$as_me:12714: \$? = $ac_status" >&5
12715   (exit $ac_status); } &&
12716          { ac_try='test -s conftest.$ac_objext'
12717   { (eval echo "$as_me:12717: \"$ac_try\"") >&5
12718   (eval $ac_try) 2>&5
12719   ac_status=$?
12720   echo "$as_me:12720: \$? = $ac_status" >&5
12721   (exit $ac_status); }; }; then
12722   cf_cv_wchar_t=yes
12723 else
12724   echo "$as_me: failed program was:" >&5
12725 cat conftest.$ac_ext >&5
12726 cf_cv_wchar_t=unknown
12727 fi
12728 rm -f conftest.$ac_objext conftest.$ac_ext
12729 fi
12730 rm -f conftest.$ac_objext conftest.$ac_ext
12731 fi
12732 echo "$as_me:12732: result: $cf_cv_wchar_t" >&5
12733 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12734
12735 if test "$cf_cv_wchar_t" = yes ; then
12736
12737 cat >>confdefs.h <<\EOF
12738 #define NEED_WCHAR_H 1
12739 EOF
12740
12741         NEED_WCHAR_H=1
12742 fi
12743
12744 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12745 if test "$cf_cv_wchar_t" = unknown ; then
12746         NCURSES_WCHAR_T=1
12747 fi
12748
12749 # if we find wchar_t in either place, use substitution to provide a fallback.
12750 if test "$cf_cv_wchar_t" != unknown ; then
12751         NCURSES_OK_WCHAR_T=1
12752 fi
12753
12754 # This is needed on Tru64 5.0 to declare wint_t
12755 echo "$as_me:12755: checking if we must include wchar.h to declare wint_t" >&5
12756 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12757 if test "${cf_cv_wint_t+set}" = set; then
12758   echo $ECHO_N "(cached) $ECHO_C" >&6
12759 else
12760
12761 cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764
12765 #include <stdlib.h>
12766 #include <stdarg.h>
12767 #include <stdio.h>
12768 #ifdef HAVE_LIBUTF8_H
12769 #include <libutf8.h>
12770 #endif
12771 int
12772 main (void)
12773 {
12774 wint_t state
12775   ;
12776   return 0;
12777 }
12778 _ACEOF
12779 rm -f conftest.$ac_objext
12780 if { (eval echo "$as_me:12780: \"$ac_compile\"") >&5
12781   (eval $ac_compile) 2>&5
12782   ac_status=$?
12783   echo "$as_me:12783: \$? = $ac_status" >&5
12784   (exit $ac_status); } &&
12785          { ac_try='test -s conftest.$ac_objext'
12786   { (eval echo "$as_me:12786: \"$ac_try\"") >&5
12787   (eval $ac_try) 2>&5
12788   ac_status=$?
12789   echo "$as_me:12789: \$? = $ac_status" >&5
12790   (exit $ac_status); }; }; then
12791   cf_cv_wint_t=no
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 cat conftest.$ac_ext >&5
12795 cat >conftest.$ac_ext <<_ACEOF
12796 #line 12796 "configure"
12797 #include "confdefs.h"
12798
12799 #include <stdlib.h>
12800 #include <stdarg.h>
12801 #include <stdio.h>
12802 #include <wchar.h>
12803 #ifdef HAVE_LIBUTF8_H
12804 #include <libutf8.h>
12805 #endif
12806 int
12807 main (void)
12808 {
12809 wint_t value
12810   ;
12811   return 0;
12812 }
12813 _ACEOF
12814 rm -f conftest.$ac_objext
12815 if { (eval echo "$as_me:12815: \"$ac_compile\"") >&5
12816   (eval $ac_compile) 2>&5
12817   ac_status=$?
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit $ac_status); } &&
12820          { ac_try='test -s conftest.$ac_objext'
12821   { (eval echo "$as_me:12821: \"$ac_try\"") >&5
12822   (eval $ac_try) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit $ac_status); }; }; then
12826   cf_cv_wint_t=yes
12827 else
12828   echo "$as_me: failed program was:" >&5
12829 cat conftest.$ac_ext >&5
12830 cf_cv_wint_t=unknown
12831 fi
12832 rm -f conftest.$ac_objext conftest.$ac_ext
12833 fi
12834 rm -f conftest.$ac_objext conftest.$ac_ext
12835 fi
12836 echo "$as_me:12836: result: $cf_cv_wint_t" >&5
12837 echo "${ECHO_T}$cf_cv_wint_t" >&6
12838
12839 if test "$cf_cv_wint_t" = yes ; then
12840
12841 cat >>confdefs.h <<\EOF
12842 #define NEED_WCHAR_H 1
12843 EOF
12844
12845         NEED_WCHAR_H=1
12846 fi
12847
12848 # if we do not find wint_t in either place, use substitution to provide a fallback.
12849 if test "$cf_cv_wint_t" = unknown ; then
12850         NCURSES_WINT_T=1
12851 fi
12852
12853 # if we find wint_t in either place, use substitution to provide a fallback.
12854 if test "$cf_cv_wint_t" != unknown ; then
12855         NCURSES_OK_WINT_T=1
12856 fi
12857
12858         if test "$NCURSES_MBSTATE_T" != 0; then
12859
12860 cat >>confdefs.h <<\EOF
12861 #define NEED_MBSTATE_T_DEF 1
12862 EOF
12863
12864         fi
12865 fi
12866
12867 ###   use option --disable-lp64 to allow long chtype
12868 echo "$as_me:12868: checking whether to enable _LP64 definition in curses.h" >&5
12869 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12870
12871 # Check whether --enable-lp64 or --disable-lp64 was given.
12872 if test "${enable_lp64+set}" = set; then
12873   enableval="$enable_lp64"
12874   with_lp64=$enableval
12875 else
12876   with_lp64=$cf_dft_with_lp64
12877 fi;
12878 echo "$as_me:12878: result: $with_lp64" >&5
12879 echo "${ECHO_T}$with_lp64" >&6
12880
12881 if test "x$with_lp64" = xyes ; then
12882         cf_cv_enable_lp64=1
12883 else
12884         cf_cv_enable_lp64=0
12885 fi
12886
12887 # Check whether --enable-largefile or --disable-largefile was given.
12888 if test "${enable_largefile+set}" = set; then
12889   enableval="$enable_largefile"
12890
12891 fi;
12892 if test "$enable_largefile" != no; then
12893
12894   echo "$as_me:12894: checking for special C compiler options needed for large files" >&5
12895 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12896 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12897   echo $ECHO_N "(cached) $ECHO_C" >&6
12898 else
12899   ac_cv_sys_largefile_CC=no
12900      if test "$GCC" != yes; then
12901        ac_save_CC=$CC
12902        while :; do
12903          # IRIX 6.2 and later do not support large files by default,
12904          # so use the C compiler's -n32 option if that helps.
12905          cat >conftest.$ac_ext <<_ACEOF
12906 #line 12906 "configure"
12907 #include "confdefs.h"
12908 #include <sys/types.h>
12909  /* Check that off_t can represent 2**63 - 1 correctly.
12910     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12911     since some C++ compilers masquerading as C compilers
12912     incorrectly reject 9223372036854775807.  */
12913 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12914   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12915                        && LARGE_OFF_T % 2147483647 == 1)
12916                       ? 1 : -1];
12917 int
12918 main (void)
12919 {
12920
12921   ;
12922   return 0;
12923 }
12924 _ACEOF
12925          rm -f conftest.$ac_objext
12926 if { (eval echo "$as_me:12926: \"$ac_compile\"") >&5
12927   (eval $ac_compile) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit $ac_status); } &&
12931          { ac_try='test -s conftest.$ac_objext'
12932   { (eval echo "$as_me:12932: \"$ac_try\"") >&5
12933   (eval $ac_try) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; }; then
12937   break
12938 else
12939   echo "$as_me: failed program was:" >&5
12940 cat conftest.$ac_ext >&5
12941 fi
12942 rm -f conftest.$ac_objext
12943          CC="$CC -n32"
12944          rm -f conftest.$ac_objext
12945 if { (eval echo "$as_me:12945: \"$ac_compile\"") >&5
12946   (eval $ac_compile) 2>&5
12947   ac_status=$?
12948   echo "$as_me:12948: \$? = $ac_status" >&5
12949   (exit $ac_status); } &&
12950          { ac_try='test -s conftest.$ac_objext'
12951   { (eval echo "$as_me:12951: \"$ac_try\"") >&5
12952   (eval $ac_try) 2>&5
12953   ac_status=$?
12954   echo "$as_me:12954: \$? = $ac_status" >&5
12955   (exit $ac_status); }; }; then
12956   ac_cv_sys_largefile_CC=' -n32'; break
12957 else
12958   echo "$as_me: failed program was:" >&5
12959 cat conftest.$ac_ext >&5
12960 fi
12961 rm -f conftest.$ac_objext
12962          break
12963        done
12964        CC=$ac_save_CC
12965        rm -f conftest.$ac_ext
12966     fi
12967 fi
12968 echo "$as_me:12968: result: $ac_cv_sys_largefile_CC" >&5
12969 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12970   if test "$ac_cv_sys_largefile_CC" != no; then
12971     CC=$CC$ac_cv_sys_largefile_CC
12972   fi
12973
12974   echo "$as_me:12974: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12975 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12976 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12977   echo $ECHO_N "(cached) $ECHO_C" >&6
12978 else
12979   while :; do
12980   ac_cv_sys_file_offset_bits=no
12981   cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984 #include <sys/types.h>
12985  /* Check that off_t can represent 2**63 - 1 correctly.
12986     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12987     since some C++ compilers masquerading as C compilers
12988     incorrectly reject 9223372036854775807.  */
12989 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12990   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12991                        && LARGE_OFF_T % 2147483647 == 1)
12992                       ? 1 : -1];
12993 int
12994 main (void)
12995 {
12996
12997   ;
12998   return 0;
12999 }
13000 _ACEOF
13001 rm -f conftest.$ac_objext
13002 if { (eval echo "$as_me:13002: \"$ac_compile\"") >&5
13003   (eval $ac_compile) 2>&5
13004   ac_status=$?
13005   echo "$as_me:13005: \$? = $ac_status" >&5
13006   (exit $ac_status); } &&
13007          { ac_try='test -s conftest.$ac_objext'
13008   { (eval echo "$as_me:13008: \"$ac_try\"") >&5
13009   (eval $ac_try) 2>&5
13010   ac_status=$?
13011   echo "$as_me:13011: \$? = $ac_status" >&5
13012   (exit $ac_status); }; }; then
13013   break
13014 else
13015   echo "$as_me: failed program was:" >&5
13016 cat conftest.$ac_ext >&5
13017 fi
13018 rm -f conftest.$ac_objext conftest.$ac_ext
13019   cat >conftest.$ac_ext <<_ACEOF
13020 #line 13020 "configure"
13021 #include "confdefs.h"
13022 #define _FILE_OFFSET_BITS 64
13023 #include <sys/types.h>
13024  /* Check that off_t can represent 2**63 - 1 correctly.
13025     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13026     since some C++ compilers masquerading as C compilers
13027     incorrectly reject 9223372036854775807.  */
13028 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13029   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13030                        && LARGE_OFF_T % 2147483647 == 1)
13031                       ? 1 : -1];
13032 int
13033 main (void)
13034 {
13035
13036   ;
13037   return 0;
13038 }
13039 _ACEOF
13040 rm -f conftest.$ac_objext
13041 if { (eval echo "$as_me:13041: \"$ac_compile\"") >&5
13042   (eval $ac_compile) 2>&5
13043   ac_status=$?
13044   echo "$as_me:13044: \$? = $ac_status" >&5
13045   (exit $ac_status); } &&
13046          { ac_try='test -s conftest.$ac_objext'
13047   { (eval echo "$as_me:13047: \"$ac_try\"") >&5
13048   (eval $ac_try) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit $ac_status); }; }; then
13052   ac_cv_sys_file_offset_bits=64; break
13053 else
13054   echo "$as_me: failed program was:" >&5
13055 cat conftest.$ac_ext >&5
13056 fi
13057 rm -f conftest.$ac_objext conftest.$ac_ext
13058   break
13059 done
13060 fi
13061 echo "$as_me:13061: result: $ac_cv_sys_file_offset_bits" >&5
13062 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13063 if test "$ac_cv_sys_file_offset_bits" != no; then
13064
13065 cat >>confdefs.h <<EOF
13066 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13067 EOF
13068
13069 fi
13070 rm -rf conftest*
13071   echo "$as_me:13071: checking for _LARGE_FILES value needed for large files" >&5
13072 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13073 if test "${ac_cv_sys_large_files+set}" = set; then
13074   echo $ECHO_N "(cached) $ECHO_C" >&6
13075 else
13076   while :; do
13077   ac_cv_sys_large_files=no
13078   cat >conftest.$ac_ext <<_ACEOF
13079 #line 13079 "configure"
13080 #include "confdefs.h"
13081 #include <sys/types.h>
13082  /* Check that off_t can represent 2**63 - 1 correctly.
13083     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13084     since some C++ compilers masquerading as C compilers
13085     incorrectly reject 9223372036854775807.  */
13086 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13087   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13088                        && LARGE_OFF_T % 2147483647 == 1)
13089                       ? 1 : -1];
13090 int
13091 main (void)
13092 {
13093
13094   ;
13095   return 0;
13096 }
13097 _ACEOF
13098 rm -f conftest.$ac_objext
13099 if { (eval echo "$as_me:13099: \"$ac_compile\"") >&5
13100   (eval $ac_compile) 2>&5
13101   ac_status=$?
13102   echo "$as_me:13102: \$? = $ac_status" >&5
13103   (exit $ac_status); } &&
13104          { ac_try='test -s conftest.$ac_objext'
13105   { (eval echo "$as_me:13105: \"$ac_try\"") >&5
13106   (eval $ac_try) 2>&5
13107   ac_status=$?
13108   echo "$as_me:13108: \$? = $ac_status" >&5
13109   (exit $ac_status); }; }; then
13110   break
13111 else
13112   echo "$as_me: failed program was:" >&5
13113 cat conftest.$ac_ext >&5
13114 fi
13115 rm -f conftest.$ac_objext conftest.$ac_ext
13116   cat >conftest.$ac_ext <<_ACEOF
13117 #line 13117 "configure"
13118 #include "confdefs.h"
13119 #define _LARGE_FILES 1
13120 #include <sys/types.h>
13121  /* Check that off_t can represent 2**63 - 1 correctly.
13122     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13123     since some C++ compilers masquerading as C compilers
13124     incorrectly reject 9223372036854775807.  */
13125 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13126   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13127                        && LARGE_OFF_T % 2147483647 == 1)
13128                       ? 1 : -1];
13129 int
13130 main (void)
13131 {
13132
13133   ;
13134   return 0;
13135 }
13136 _ACEOF
13137 rm -f conftest.$ac_objext
13138 if { (eval echo "$as_me:13138: \"$ac_compile\"") >&5
13139   (eval $ac_compile) 2>&5
13140   ac_status=$?
13141   echo "$as_me:13141: \$? = $ac_status" >&5
13142   (exit $ac_status); } &&
13143          { ac_try='test -s conftest.$ac_objext'
13144   { (eval echo "$as_me:13144: \"$ac_try\"") >&5
13145   (eval $ac_try) 2>&5
13146   ac_status=$?
13147   echo "$as_me:13147: \$? = $ac_status" >&5
13148   (exit $ac_status); }; }; then
13149   ac_cv_sys_large_files=1; break
13150 else
13151   echo "$as_me: failed program was:" >&5
13152 cat conftest.$ac_ext >&5
13153 fi
13154 rm -f conftest.$ac_objext conftest.$ac_ext
13155   break
13156 done
13157 fi
13158 echo "$as_me:13158: result: $ac_cv_sys_large_files" >&5
13159 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13160 if test "$ac_cv_sys_large_files" != no; then
13161
13162 cat >>confdefs.h <<EOF
13163 #define _LARGE_FILES $ac_cv_sys_large_files
13164 EOF
13165
13166 fi
13167 rm -rf conftest*
13168 fi
13169
13170         if test "$enable_largefile" != no ; then
13171         echo "$as_me:13171: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13172 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13173 if test "${ac_cv_sys_largefile_source+set}" = set; then
13174   echo $ECHO_N "(cached) $ECHO_C" >&6
13175 else
13176   while :; do
13177   ac_cv_sys_largefile_source=no
13178   cat >conftest.$ac_ext <<_ACEOF
13179 #line 13179 "configure"
13180 #include "confdefs.h"
13181 #include <stdio.h>
13182 int
13183 main (void)
13184 {
13185 return !fseeko;
13186   ;
13187   return 0;
13188 }
13189 _ACEOF
13190 rm -f conftest.$ac_objext
13191 if { (eval echo "$as_me:13191: \"$ac_compile\"") >&5
13192   (eval $ac_compile) 2>&5
13193   ac_status=$?
13194   echo "$as_me:13194: \$? = $ac_status" >&5
13195   (exit $ac_status); } &&
13196          { ac_try='test -s conftest.$ac_objext'
13197   { (eval echo "$as_me:13197: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   break
13203 else
13204   echo "$as_me: failed program was:" >&5
13205 cat conftest.$ac_ext >&5
13206 fi
13207 rm -f conftest.$ac_objext conftest.$ac_ext
13208   cat >conftest.$ac_ext <<_ACEOF
13209 #line 13209 "configure"
13210 #include "confdefs.h"
13211 #define _LARGEFILE_SOURCE 1
13212 #include <stdio.h>
13213 int
13214 main (void)
13215 {
13216 return !fseeko;
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 rm -f conftest.$ac_objext
13222 if { (eval echo "$as_me:13222: \"$ac_compile\"") >&5
13223   (eval $ac_compile) 2>&5
13224   ac_status=$?
13225   echo "$as_me:13225: \$? = $ac_status" >&5
13226   (exit $ac_status); } &&
13227          { ac_try='test -s conftest.$ac_objext'
13228   { (eval echo "$as_me:13228: \"$ac_try\"") >&5
13229   (eval $ac_try) 2>&5
13230   ac_status=$?
13231   echo "$as_me:13231: \$? = $ac_status" >&5
13232   (exit $ac_status); }; }; then
13233   ac_cv_sys_largefile_source=1; break
13234 else
13235   echo "$as_me: failed program was:" >&5
13236 cat conftest.$ac_ext >&5
13237 fi
13238 rm -f conftest.$ac_objext conftest.$ac_ext
13239   break
13240 done
13241 fi
13242 echo "$as_me:13242: result: $ac_cv_sys_largefile_source" >&5
13243 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13244 if test "$ac_cv_sys_largefile_source" != no; then
13245
13246 cat >>confdefs.h <<EOF
13247 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13248 EOF
13249
13250 fi
13251 rm -rf conftest*
13252
13253 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13254 # in glibc 2.1.3, but that breaks too many other things.
13255 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13256 echo "$as_me:13256: checking for fseeko" >&5
13257 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13258 if test "${ac_cv_func_fseeko+set}" = set; then
13259   echo $ECHO_N "(cached) $ECHO_C" >&6
13260 else
13261   cat >conftest.$ac_ext <<_ACEOF
13262 #line 13262 "configure"
13263 #include "confdefs.h"
13264 #include <stdio.h>
13265 int
13266 main (void)
13267 {
13268 return fseeko && fseeko (stdin, 0, 0);
13269   ;
13270   return 0;
13271 }
13272 _ACEOF
13273 rm -f conftest.$ac_objext conftest$ac_exeext
13274 if { (eval echo "$as_me:13274: \"$ac_link\"") >&5
13275   (eval $ac_link) 2>&5
13276   ac_status=$?
13277   echo "$as_me:13277: \$? = $ac_status" >&5
13278   (exit $ac_status); } &&
13279          { ac_try='test -s conftest$ac_exeext'
13280   { (eval echo "$as_me:13280: \"$ac_try\"") >&5
13281   (eval $ac_try) 2>&5
13282   ac_status=$?
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit $ac_status); }; }; then
13285   ac_cv_func_fseeko=yes
13286 else
13287   echo "$as_me: failed program was:" >&5
13288 cat conftest.$ac_ext >&5
13289 ac_cv_func_fseeko=no
13290 fi
13291 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13292 fi
13293 echo "$as_me:13293: result: $ac_cv_func_fseeko" >&5
13294 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13295 if test $ac_cv_func_fseeko = yes; then
13296
13297 cat >>confdefs.h <<\EOF
13298 #define HAVE_FSEEKO 1
13299 EOF
13300
13301 fi
13302
13303         # Normally we would collect these definitions in the config.h,
13304         # but (like _XOPEN_SOURCE), some environments rely on having these
13305         # defined before any of the system headers are included.  Another
13306         # case comes up with C++, e.g., on AIX the compiler compiles the
13307         # header files by themselves before looking at the body files it is
13308         # told to compile.  For ncurses, those header files do not include
13309         # the config.h
13310         if test "$ac_cv_sys_large_files" != no
13311         then
13312
13313         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13314         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13315
13316         fi
13317         if test "$ac_cv_sys_largefile_source" != no
13318         then
13319
13320         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13321         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13322
13323         fi
13324         if test "$ac_cv_sys_file_offset_bits" != no
13325         then
13326
13327         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13328         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13329
13330         fi
13331
13332         echo "$as_me:13332: checking whether to use struct dirent64" >&5
13333 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13334 if test "${cf_cv_struct_dirent64+set}" = set; then
13335   echo $ECHO_N "(cached) $ECHO_C" >&6
13336 else
13337
13338                 cat >conftest.$ac_ext <<_ACEOF
13339 #line 13339 "configure"
13340 #include "confdefs.h"
13341
13342 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13343 #include <sys/types.h>
13344 #include <dirent.h>
13345
13346 int
13347 main (void)
13348 {
13349
13350                 /* if transitional largefile support is setup, this is true */
13351                 extern struct dirent64 * readdir(DIR *);
13352                 struct dirent64 *x = readdir((DIR *)0);
13353                 struct dirent *y = readdir((DIR *)0);
13354                 int z = x - y;
13355                 (void)z;
13356
13357   ;
13358   return 0;
13359 }
13360 _ACEOF
13361 rm -f conftest.$ac_objext
13362 if { (eval echo "$as_me:13362: \"$ac_compile\"") >&5
13363   (eval $ac_compile) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); } &&
13367          { ac_try='test -s conftest.$ac_objext'
13368   { (eval echo "$as_me:13368: \"$ac_try\"") >&5
13369   (eval $ac_try) 2>&5
13370   ac_status=$?
13371   echo "$as_me:13371: \$? = $ac_status" >&5
13372   (exit $ac_status); }; }; then
13373   cf_cv_struct_dirent64=yes
13374 else
13375   echo "$as_me: failed program was:" >&5
13376 cat conftest.$ac_ext >&5
13377 cf_cv_struct_dirent64=no
13378 fi
13379 rm -f conftest.$ac_objext conftest.$ac_ext
13380
13381 fi
13382 echo "$as_me:13382: result: $cf_cv_struct_dirent64" >&5
13383 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13384         test "$cf_cv_struct_dirent64" = yes &&
13385 cat >>confdefs.h <<\EOF
13386 #define HAVE_STRUCT_DIRENT64 1
13387 EOF
13388
13389         fi
13390
13391 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13392 echo "$as_me:13392: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13393 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13394
13395 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13396 if test "${enable_tparm_varargs+set}" = set; then
13397   enableval="$enable_tparm_varargs"
13398   with_tparm_varargs=$enableval
13399 else
13400   with_tparm_varargs=yes
13401 fi;
13402 echo "$as_me:13402: result: $with_tparm_varargs" >&5
13403 echo "${ECHO_T}$with_tparm_varargs" >&6
13404 NCURSES_TPARM_VARARGS=0
13405 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13406
13407 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13408 if test "$with_ticlib" != no ; then
13409 echo "$as_me:13409: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13410 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13411
13412 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13413 if test "${enable_tic_depends+set}" = set; then
13414   enableval="$enable_tic_depends"
13415   with_tic_depends=$enableval
13416 else
13417   with_tic_depends=yes
13418 fi;
13419 echo "$as_me:13419: result: $with_tic_depends" >&5
13420 echo "${ECHO_T}$with_tic_depends" >&6
13421 else
13422         with_tic_depends=no
13423 fi
13424
13425 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13426 echo "$as_me:13426: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13427 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13428
13429 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13430 if test "${enable_wattr_macros+set}" = set; then
13431   enableval="$enable_wattr_macros"
13432   with_wattr_macros=$enableval
13433 else
13434   with_wattr_macros=yes
13435 fi;
13436 if [ "x$with_wattr_macros" != xyes ]; then
13437         NCURSES_WATTR_MACROS=0
13438         echo "$as_me:13438: result: yes" >&5
13439 echo "${ECHO_T}yes" >&6
13440 else
13441         NCURSES_WATTR_MACROS=1
13442         echo "$as_me:13442: result: no" >&5
13443 echo "${ECHO_T}no" >&6
13444 fi
13445
13446 echo "$as_me:13446: checking for X11 rgb file" >&5
13447 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13448
13449 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13450 if test "${with_x11_rgb+set}" = set; then
13451   withval="$with_x11_rgb"
13452   RGB_PATH=$withval
13453 else
13454   RGB_PATH=auto
13455 fi;
13456
13457 if test "x$RGB_PATH" = xauto
13458 then
13459         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13460         for cf_path in \
13461                 /opt/local/share/X11/rgb.txt \
13462                 /opt/X11/share/X11/rgb.txt \
13463                 /usr/share/X11/rgb.txt \
13464                 /usr/X11/share/X11/rgb.txt \
13465                 /usr/X11/lib/X11/rgb.txt \
13466                 /usr/lib/X11/rgb.txt \
13467                 /etc/X11/rgb.txt \
13468                 /usr/pkg/lib/X11/rgb.txt \
13469                 /usr/X11R7/lib/X11/rgb.txt \
13470                 /usr/X11R6/lib/X11/rgb.txt \
13471                 /usr/X11R5/lib/X11/rgb.txt \
13472                 /usr/X11R4/lib/X11/rgb.txt \
13473                 /usr/local/lib/X11/rgb.txt \
13474                 /usr/local/share/X11/rgb.txt \
13475                 /usr/lib64/X11/rgb.txt
13476         do
13477                 if test -f "$cf_path" ; then
13478                         RGB_PATH="$cf_path"
13479                         break
13480                 fi
13481         done
13482 else
13483         cf_path=$RGB_PATH
13484
13485 if test "x$prefix" != xNONE; then
13486         cf_path_syntax="$prefix"
13487 else
13488         cf_path_syntax="$ac_default_prefix"
13489 fi
13490
13491 case ".$cf_path" in
13492 (.\$\(*\)*|.\'*\'*)
13493         ;;
13494 (..|./*|.\\*)
13495         ;;
13496 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13497         ;;
13498 (.\${*prefix}*|.\${*dir}*)
13499         eval cf_path="$cf_path"
13500         case ".$cf_path" in
13501         (.NONE/*)
13502                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13503                 ;;
13504         esac
13505         ;;
13506 (.no|.NONE/*)
13507         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13508         ;;
13509 (*)
13510         { { echo "$as_me:13510: error: expected a pathname, not \"$cf_path\"" >&5
13511 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13512    { (exit 1); exit 1; }; }
13513         ;;
13514 esac
13515
13516 fi
13517
13518 echo "$as_me:13518: result: $RGB_PATH" >&5
13519 echo "${ECHO_T}$RGB_PATH" >&6
13520
13521 cat >>confdefs.h <<EOF
13522 #define RGB_PATH "$cf_path"
13523 EOF
13524
13525 no_x11_rgb=
13526 if test "$RGB_PATH" = no
13527 then
13528         no_x11_rgb="#"
13529 fi
13530
13531 ###   use option --with-bool to override bool's type
13532 echo "$as_me:13532: checking for type of bool" >&5
13533 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13534
13535 # Check whether --with-bool or --without-bool was given.
13536 if test "${with_bool+set}" = set; then
13537   withval="$with_bool"
13538   NCURSES_BOOL="$withval"
13539 else
13540   NCURSES_BOOL=auto
13541 fi;
13542 echo "$as_me:13542: result: $NCURSES_BOOL" >&5
13543 echo "${ECHO_T}$NCURSES_BOOL" >&6
13544
13545 echo "$as_me:13545: checking for alternate terminal capabilities file" >&5
13546 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13547
13548 # Check whether --with-caps or --without-caps was given.
13549 if test "${with_caps+set}" = set; then
13550   withval="$with_caps"
13551   TERMINFO_CAPS=Caps.$withval
13552 else
13553   TERMINFO_CAPS=Caps
13554 fi;
13555 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13556 echo "$as_me:13556: result: $TERMINFO_CAPS" >&5
13557 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13558
13559 ###   use option --with-chtype to override chtype's type
13560 echo "$as_me:13560: checking for type of chtype" >&5
13561 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13562
13563 # Check whether --with-chtype or --without-chtype was given.
13564 if test "${with_chtype+set}" = set; then
13565   withval="$with_chtype"
13566   NCURSES_CHTYPE="$withval"
13567 else
13568   NCURSES_CHTYPE=$cf_dft_chtype
13569 fi;
13570 echo "$as_me:13570: result: $NCURSES_CHTYPE" >&5
13571 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13572
13573 ###   use option --with-ospeed to override ospeed's type
13574 echo "$as_me:13574: checking for type of ospeed" >&5
13575 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13576
13577 # Check whether --with-ospeed or --without-ospeed was given.
13578 if test "${with_ospeed+set}" = set; then
13579   withval="$with_ospeed"
13580   NCURSES_OSPEED="$withval"
13581 else
13582   NCURSES_OSPEED=short
13583 fi;
13584 echo "$as_me:13584: result: $NCURSES_OSPEED" >&5
13585 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13586
13587 ###   use option --with-mmask-t to override mmask_t's type
13588 echo "$as_me:13588: checking for type of mmask_t" >&5
13589 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13590
13591 # Check whether --with-mmask-t or --without-mmask-t was given.
13592 if test "${with_mmask_t+set}" = set; then
13593   withval="$with_mmask_t"
13594   NCURSES_MMASK_T="$withval"
13595 else
13596   NCURSES_MMASK_T=$cf_dft_mmask_t
13597 fi;
13598 echo "$as_me:13598: result: $NCURSES_MMASK_T" >&5
13599 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13600
13601 ###   use option --with-ccharw-max to override CCHARW_MAX size
13602 echo "$as_me:13602: checking for size CCHARW_MAX" >&5
13603 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13604
13605 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13606 if test "${with_ccharw_max+set}" = set; then
13607   withval="$with_ccharw_max"
13608   NCURSES_CCHARW_MAX="$withval"
13609 else
13610   NCURSES_CCHARW_MAX=5
13611 fi;
13612 echo "$as_me:13612: result: $NCURSES_CCHARW_MAX" >&5
13613 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13614
13615 echo "$as_me:13615: checking for ANSI C header files" >&5
13616 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13617 if test "${ac_cv_header_stdc+set}" = set; then
13618   echo $ECHO_N "(cached) $ECHO_C" >&6
13619 else
13620   cat >conftest.$ac_ext <<_ACEOF
13621 #line 13621 "configure"
13622 #include "confdefs.h"
13623 #include <stdlib.h>
13624 #include <stdarg.h>
13625 #include <string.h>
13626 #include <float.h>
13627
13628 _ACEOF
13629 if { (eval echo "$as_me:13629: \"$ac_cpp conftest.$ac_ext\"") >&5
13630   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13631   ac_status=$?
13632   egrep -v '^ *\+' conftest.er1 >conftest.err
13633   rm -f conftest.er1
13634   cat conftest.err >&5
13635   echo "$as_me:13635: \$? = $ac_status" >&5
13636   (exit $ac_status); } >/dev/null; then
13637   if test -s conftest.err; then
13638     ac_cpp_err=$ac_c_preproc_warn_flag
13639   else
13640     ac_cpp_err=
13641   fi
13642 else
13643   ac_cpp_err=yes
13644 fi
13645 if test -z "$ac_cpp_err"; then
13646   ac_cv_header_stdc=yes
13647 else
13648   echo "$as_me: failed program was:" >&5
13649   cat conftest.$ac_ext >&5
13650   ac_cv_header_stdc=no
13651 fi
13652 rm -f conftest.err conftest.$ac_ext
13653
13654 if test $ac_cv_header_stdc = yes; then
13655   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13656   cat >conftest.$ac_ext <<_ACEOF
13657 #line 13657 "configure"
13658 #include "confdefs.h"
13659 #include <string.h>
13660
13661 _ACEOF
13662 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13663   egrep "memchr" >/dev/null 2>&1; then
13664   :
13665 else
13666   ac_cv_header_stdc=no
13667 fi
13668 rm -rf conftest*
13669
13670 fi
13671
13672 if test $ac_cv_header_stdc = yes; then
13673   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13674   cat >conftest.$ac_ext <<_ACEOF
13675 #line 13675 "configure"
13676 #include "confdefs.h"
13677 #include <stdlib.h>
13678
13679 _ACEOF
13680 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13681   egrep "free" >/dev/null 2>&1; then
13682   :
13683 else
13684   ac_cv_header_stdc=no
13685 fi
13686 rm -rf conftest*
13687
13688 fi
13689
13690 if test $ac_cv_header_stdc = yes; then
13691   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13692   if test "$cross_compiling" = yes; then
13693   :
13694 else
13695   cat >conftest.$ac_ext <<_ACEOF
13696 #line 13696 "configure"
13697 #include "confdefs.h"
13698 #include <ctype.h>
13699 #if ((' ' & 0x0FF) == 0x020)
13700 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13701 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13702 #else
13703 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13704                      || ('j' <= (c) && (c) <= 'r') \
13705                      || ('s' <= (c) && (c) <= 'z'))
13706 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13707 #endif
13708
13709 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13710 int
13711 main (void)
13712 {
13713   int i;
13714   for (i = 0; i < 256; i++)
13715     if (XOR (islower (i), ISLOWER (i))
13716         || toupper (i) != TOUPPER (i))
13717       $ac_main_return(2);
13718   $ac_main_return (0);
13719 }
13720 _ACEOF
13721 rm -f conftest$ac_exeext
13722 if { (eval echo "$as_me:13722: \"$ac_link\"") >&5
13723   (eval $ac_link) 2>&5
13724   ac_status=$?
13725   echo "$as_me:13725: \$? = $ac_status" >&5
13726   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13727   { (eval echo "$as_me:13727: \"$ac_try\"") >&5
13728   (eval $ac_try) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit $ac_status); }; }; then
13732   :
13733 else
13734   echo "$as_me: program exited with status $ac_status" >&5
13735 echo "$as_me: failed program was:" >&5
13736 cat conftest.$ac_ext >&5
13737 ac_cv_header_stdc=no
13738 fi
13739 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13740 fi
13741 fi
13742 fi
13743 echo "$as_me:13743: result: $ac_cv_header_stdc" >&5
13744 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13745 if test $ac_cv_header_stdc = yes; then
13746
13747 cat >>confdefs.h <<\EOF
13748 #define STDC_HEADERS 1
13749 EOF
13750
13751 fi
13752
13753 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13754
13755 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13756                   inttypes.h stdint.h unistd.h
13757 do
13758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13759 echo "$as_me:13759: checking for $ac_header" >&5
13760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13762   echo $ECHO_N "(cached) $ECHO_C" >&6
13763 else
13764   cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767 $ac_includes_default
13768 #include <$ac_header>
13769 _ACEOF
13770 rm -f conftest.$ac_objext
13771 if { (eval echo "$as_me:13771: \"$ac_compile\"") >&5
13772   (eval $ac_compile) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); } &&
13776          { ac_try='test -s conftest.$ac_objext'
13777   { (eval echo "$as_me:13777: \"$ac_try\"") >&5
13778   (eval $ac_try) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); }; }; then
13782   eval "$as_ac_Header=yes"
13783 else
13784   echo "$as_me: failed program was:" >&5
13785 cat conftest.$ac_ext >&5
13786 eval "$as_ac_Header=no"
13787 fi
13788 rm -f conftest.$ac_objext conftest.$ac_ext
13789 fi
13790 echo "$as_me:13790: result: `eval echo '${'$as_ac_Header'}'`" >&5
13791 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13792 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13793   cat >>confdefs.h <<EOF
13794 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13795 EOF
13796
13797 fi
13798 done
13799
13800 echo "$as_me:13800: checking for signed char" >&5
13801 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13802 if test "${ac_cv_type_signed_char+set}" = set; then
13803   echo $ECHO_N "(cached) $ECHO_C" >&6
13804 else
13805   cat >conftest.$ac_ext <<_ACEOF
13806 #line 13806 "configure"
13807 #include "confdefs.h"
13808 $ac_includes_default
13809 int
13810 main (void)
13811 {
13812 if ((signed char *) 0)
13813   return 0;
13814 if (sizeof (signed char))
13815   return 0;
13816   ;
13817   return 0;
13818 }
13819 _ACEOF
13820 rm -f conftest.$ac_objext
13821 if { (eval echo "$as_me:13821: \"$ac_compile\"") >&5
13822   (eval $ac_compile) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); } &&
13826          { ac_try='test -s conftest.$ac_objext'
13827   { (eval echo "$as_me:13827: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:13830: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_type_signed_char=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 cat conftest.$ac_ext >&5
13836 ac_cv_type_signed_char=no
13837 fi
13838 rm -f conftest.$ac_objext conftest.$ac_ext
13839 fi
13840 echo "$as_me:13840: result: $ac_cv_type_signed_char" >&5
13841 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13842
13843 echo "$as_me:13843: checking size of signed char" >&5
13844 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13845 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13846   echo $ECHO_N "(cached) $ECHO_C" >&6
13847 else
13848   if test "$ac_cv_type_signed_char" = yes; then
13849   if test "$cross_compiling" = yes; then
13850   # Depending upon the size, compute the lo and hi bounds.
13851 cat >conftest.$ac_ext <<_ACEOF
13852 #line 13852 "configure"
13853 #include "confdefs.h"
13854 $ac_includes_default
13855 int
13856 main (void)
13857 {
13858 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13859   ;
13860   return 0;
13861 }
13862 _ACEOF
13863 rm -f conftest.$ac_objext
13864 if { (eval echo "$as_me:13864: \"$ac_compile\"") >&5
13865   (eval $ac_compile) 2>&5
13866   ac_status=$?
13867   echo "$as_me:13867: \$? = $ac_status" >&5
13868   (exit $ac_status); } &&
13869          { ac_try='test -s conftest.$ac_objext'
13870   { (eval echo "$as_me:13870: \"$ac_try\"") >&5
13871   (eval $ac_try) 2>&5
13872   ac_status=$?
13873   echo "$as_me:13873: \$? = $ac_status" >&5
13874   (exit $ac_status); }; }; then
13875   ac_lo=0 ac_mid=0
13876   while :; do
13877     cat >conftest.$ac_ext <<_ACEOF
13878 #line 13878 "configure"
13879 #include "confdefs.h"
13880 $ac_includes_default
13881 int
13882 main (void)
13883 {
13884 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13885   ;
13886   return 0;
13887 }
13888 _ACEOF
13889 rm -f conftest.$ac_objext
13890 if { (eval echo "$as_me:13890: \"$ac_compile\"") >&5
13891   (eval $ac_compile) 2>&5
13892   ac_status=$?
13893   echo "$as_me:13893: \$? = $ac_status" >&5
13894   (exit $ac_status); } &&
13895          { ac_try='test -s conftest.$ac_objext'
13896   { (eval echo "$as_me:13896: \"$ac_try\"") >&5
13897   (eval $ac_try) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit $ac_status); }; }; then
13901   ac_hi=$ac_mid; break
13902 else
13903   echo "$as_me: failed program was:" >&5
13904 cat conftest.$ac_ext >&5
13905 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13906 fi
13907 rm -f conftest.$ac_objext conftest.$ac_ext
13908   done
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 cat conftest.$ac_ext >&5
13912 ac_hi=-1 ac_mid=-1
13913   while :; do
13914     cat >conftest.$ac_ext <<_ACEOF
13915 #line 13915 "configure"
13916 #include "confdefs.h"
13917 $ac_includes_default
13918 int
13919 main (void)
13920 {
13921 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13922   ;
13923   return 0;
13924 }
13925 _ACEOF
13926 rm -f conftest.$ac_objext
13927 if { (eval echo "$as_me:13927: \"$ac_compile\"") >&5
13928   (eval $ac_compile) 2>&5
13929   ac_status=$?
13930   echo "$as_me:13930: \$? = $ac_status" >&5
13931   (exit $ac_status); } &&
13932          { ac_try='test -s conftest.$ac_objext'
13933   { (eval echo "$as_me:13933: \"$ac_try\"") >&5
13934   (eval $ac_try) 2>&5
13935   ac_status=$?
13936   echo "$as_me:13936: \$? = $ac_status" >&5
13937   (exit $ac_status); }; }; then
13938   ac_lo=$ac_mid; break
13939 else
13940   echo "$as_me: failed program was:" >&5
13941 cat conftest.$ac_ext >&5
13942 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13943 fi
13944 rm -f conftest.$ac_objext conftest.$ac_ext
13945   done
13946 fi
13947 rm -f conftest.$ac_objext conftest.$ac_ext
13948 # Binary search between lo and hi bounds.
13949 while test "x$ac_lo" != "x$ac_hi"; do
13950   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13951   cat >conftest.$ac_ext <<_ACEOF
13952 #line 13952 "configure"
13953 #include "confdefs.h"
13954 $ac_includes_default
13955 int
13956 main (void)
13957 {
13958 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13959   ;
13960   return 0;
13961 }
13962 _ACEOF
13963 rm -f conftest.$ac_objext
13964 if { (eval echo "$as_me:13964: \"$ac_compile\"") >&5
13965   (eval $ac_compile) 2>&5
13966   ac_status=$?
13967   echo "$as_me:13967: \$? = $ac_status" >&5
13968   (exit $ac_status); } &&
13969          { ac_try='test -s conftest.$ac_objext'
13970   { (eval echo "$as_me:13970: \"$ac_try\"") >&5
13971   (eval $ac_try) 2>&5
13972   ac_status=$?
13973   echo "$as_me:13973: \$? = $ac_status" >&5
13974   (exit $ac_status); }; }; then
13975   ac_hi=$ac_mid
13976 else
13977   echo "$as_me: failed program was:" >&5
13978 cat conftest.$ac_ext >&5
13979 ac_lo=`expr $ac_mid + 1`
13980 fi
13981 rm -f conftest.$ac_objext conftest.$ac_ext
13982 done
13983 ac_cv_sizeof_signed_char=$ac_lo
13984 else
13985   if test "$cross_compiling" = yes; then
13986   { { echo "$as_me:13986: error: cannot run test program while cross compiling" >&5
13987 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13988    { (exit 1); exit 1; }; }
13989 else
13990   cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 $ac_includes_default
13994 int
13995 main (void)
13996 {
13997 FILE *f = fopen ("conftest.val", "w");
13998 if (!f)
13999   $ac_main_return (1);
14000 fprintf (f, "%d", (sizeof (signed char)));
14001 fclose (f);
14002   ;
14003   return 0;
14004 }
14005 _ACEOF
14006 rm -f conftest$ac_exeext
14007 if { (eval echo "$as_me:14007: \"$ac_link\"") >&5
14008   (eval $ac_link) 2>&5
14009   ac_status=$?
14010   echo "$as_me:14010: \$? = $ac_status" >&5
14011   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14012   { (eval echo "$as_me:14012: \"$ac_try\"") >&5
14013   (eval $ac_try) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit $ac_status); }; }; then
14017   ac_cv_sizeof_signed_char=`cat conftest.val`
14018 else
14019   echo "$as_me: program exited with status $ac_status" >&5
14020 echo "$as_me: failed program was:" >&5
14021 cat conftest.$ac_ext >&5
14022 fi
14023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14024 fi
14025 fi
14026 rm -f conftest.val
14027 else
14028   ac_cv_sizeof_signed_char=0
14029 fi
14030 fi
14031 echo "$as_me:14031: result: $ac_cv_sizeof_signed_char" >&5
14032 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14033 cat >>confdefs.h <<EOF
14034 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14035 EOF
14036
14037 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14038         NCURSES_SBOOL="signed char"
14039 else
14040         NCURSES_SBOOL="char"
14041 fi
14042 echo "$as_me:14042: checking if you want to use signed Boolean array in term.h" >&5
14043 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14044
14045 # Check whether --enable-signed-char or --disable-signed-char was given.
14046 if test "${enable_signed_char+set}" = set; then
14047   enableval="$enable_signed_char"
14048   with_signed_char=$enableval
14049 else
14050   with_signed_char=no
14051 fi;
14052 echo "$as_me:14052: result: $with_signed_char" >&5
14053 echo "${ECHO_T}$with_signed_char" >&6
14054 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14055
14056 ###   use option --with-tparm-arg to override tparm's argument type
14057 echo "$as_me:14057: checking for type of tparm args" >&5
14058 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14059
14060 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14061 if test "${with_tparm_arg+set}" = set; then
14062   withval="$with_tparm_arg"
14063   NCURSES_TPARM_ARG="$withval"
14064 else
14065   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14066 fi;
14067 echo "$as_me:14067: result: $NCURSES_TPARM_ARG" >&5
14068 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14069
14070 ### Enable compiling-in rcs id's
14071 echo "$as_me:14071: checking if RCS identifiers should be compiled-in" >&5
14072 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14073
14074 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14075 if test "${with_rcs_ids+set}" = set; then
14076   withval="$with_rcs_ids"
14077   with_rcs_ids=$withval
14078 else
14079   with_rcs_ids=no
14080 fi;
14081 echo "$as_me:14081: result: $with_rcs_ids" >&5
14082 echo "${ECHO_T}$with_rcs_ids" >&6
14083 test "x$with_rcs_ids" = xyes &&
14084 cat >>confdefs.h <<\EOF
14085 #define USE_RCS_IDS 1
14086 EOF
14087
14088 ###############################################################################
14089
14090 echo "$as_me:14090: checking format of man-pages" >&5
14091 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14092
14093 # Check whether --with-manpage-format or --without-manpage-format was given.
14094 if test "${with_manpage_format+set}" = set; then
14095   withval="$with_manpage_format"
14096   MANPAGE_FORMAT=$withval
14097 else
14098   MANPAGE_FORMAT=unknown
14099 fi;
14100
14101 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14102 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14103
14104 cf_unknown=
14105
14106 case $MANPAGE_FORMAT in
14107 (unknown)
14108         if test -z "$MANPATH" ; then
14109                 MANPATH="/usr/man:/usr/share/man"
14110         fi
14111
14112         # look for the 'date' man-page (it's most likely to be installed!)
14113         MANPAGE_FORMAT=
14114         cf_preform=no
14115         cf_catonly=yes
14116         cf_example=date
14117
14118         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14119         for cf_dir in $MANPATH; do
14120                 test -z "$cf_dir" && cf_dir=/usr/man
14121                 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
14122                 do
14123                         cf_test=`echo $cf_name | sed -e 's/*//'`
14124                         if test "x$cf_test" = "x$cf_name" ; then
14125
14126                                 case "$cf_name" in
14127                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14128                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14129                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14130                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14131                                 esac
14132
14133                                 case "$cf_name" in
14134                                 ($cf_dir/man*)
14135                                         cf_catonly=no
14136                                         ;;
14137                                 ($cf_dir/cat*)
14138                                         cf_preform=yes
14139                                         ;;
14140                                 esac
14141                                 break
14142                         fi
14143
14144                         # if we found a match in either man* or cat*, stop looking
14145                         if test -n "$MANPAGE_FORMAT" ; then
14146                                 cf_found=no
14147                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14148                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14149                                 case "$cf_name" in
14150                                 ($cf_dir/cat*)
14151                                         cf_found=yes
14152                                         ;;
14153                                 esac
14154                                 test $cf_found=yes && break
14155                         fi
14156                 done
14157                 # only check the first directory in $MANPATH where we find manpages
14158                 if test -n "$MANPAGE_FORMAT" ; then
14159                         break
14160                 fi
14161         done
14162         # if we did not find the example, just assume it is normal
14163         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14164         IFS="$ac_save_ifs"
14165         ;;
14166 (*)
14167         for cf_option in $MANPAGE_FORMAT; do
14168         case $cf_option in
14169         (gzip|compress|BSDI|normal|formatted|catonly)
14170                 ;;
14171         (*)
14172                 cf_unknown="$cf_unknown $cf_option"
14173                 ;;
14174         esac
14175         done
14176         ;;
14177 esac
14178
14179 echo "$as_me:14179: result: $MANPAGE_FORMAT" >&5
14180 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14181 if test -n "$cf_unknown" ; then
14182         { echo "$as_me:14182: WARNING: Unexpected manpage-format $cf_unknown" >&5
14183 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14184 fi
14185
14186 echo "$as_me:14186: checking for manpage renaming" >&5
14187 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14188
14189 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14190 if test "${with_manpage_renames+set}" = set; then
14191   withval="$with_manpage_renames"
14192   MANPAGE_RENAMES=$withval
14193 else
14194   MANPAGE_RENAMES=yes
14195 fi;
14196
14197 case ".$MANPAGE_RENAMES" in
14198 (.no)
14199         ;;
14200 (.|.yes)
14201         # Debian 'man' program?
14202         if test -f /etc/debian_version ; then
14203                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
14204         else
14205                 MANPAGE_RENAMES=no
14206         fi
14207         ;;
14208 esac
14209
14210 if test "$MANPAGE_RENAMES" != no ; then
14211         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
14212                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
14213         elif test ! -f $MANPAGE_RENAMES ; then
14214                 { { echo "$as_me:14214: error: not a filename: $MANPAGE_RENAMES" >&5
14215 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14216    { (exit 1); exit 1; }; }
14217         fi
14218
14219         test ! -d man && mkdir man
14220
14221         # Construct a sed-script to perform renaming within man-pages
14222         if test -n "$MANPAGE_RENAMES" ; then
14223                 test ! -d man && mkdir man
14224                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
14225         fi
14226 fi
14227
14228 echo "$as_me:14228: result: $MANPAGE_RENAMES" >&5
14229 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14230
14231 echo "$as_me:14231: checking if manpage aliases will be installed" >&5
14232 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14233
14234 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14235 if test "${with_manpage_aliases+set}" = set; then
14236   withval="$with_manpage_aliases"
14237   MANPAGE_ALIASES=$withval
14238 else
14239   MANPAGE_ALIASES=yes
14240 fi;
14241
14242 echo "$as_me:14242: result: $MANPAGE_ALIASES" >&5
14243 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14244
14245 case "x$LN_S" in
14246 (xln*)
14247         cf_use_symlinks=yes
14248         ;;
14249 (*)
14250         cf_use_symlinks=no
14251         ;;
14252 esac
14253
14254 MANPAGE_SYMLINKS=no
14255 if test "$MANPAGE_ALIASES" = yes ; then
14256 echo "$as_me:14256: checking if manpage symlinks should be used" >&5
14257 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14258
14259 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14260 if test "${with_manpage_symlinks+set}" = set; then
14261   withval="$with_manpage_symlinks"
14262   MANPAGE_SYMLINKS=$withval
14263 else
14264   MANPAGE_SYMLINKS=$cf_use_symlinks
14265 fi;
14266
14267 if test "$$cf_use_symlinks" = no; then
14268 if test "$MANPAGE_SYMLINKS" = yes ; then
14269         { echo "$as_me:14269: WARNING: cannot make symlinks" >&5
14270 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14271         MANPAGE_SYMLINKS=no
14272 fi
14273 fi
14274
14275 echo "$as_me:14275: result: $MANPAGE_SYMLINKS" >&5
14276 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14277 fi
14278
14279 echo "$as_me:14279: checking for manpage tbl" >&5
14280 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14281
14282 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14283 if test "${with_manpage_tbl+set}" = set; then
14284   withval="$with_manpage_tbl"
14285   MANPAGE_TBL=$withval
14286 else
14287   MANPAGE_TBL=no
14288 fi;
14289
14290 echo "$as_me:14290: result: $MANPAGE_TBL" >&5
14291 echo "${ECHO_T}$MANPAGE_TBL" >&6
14292
14293 if test "$prefix" = "NONE" ; then
14294         cf_prefix="$ac_default_prefix"
14295 else
14296         cf_prefix="$prefix"
14297 fi
14298
14299 case "$MANPAGE_FORMAT" in
14300 (*catonly*)
14301         cf_format=yes
14302         cf_inboth=no
14303         ;;
14304 (*formatted*)
14305         cf_format=yes
14306         cf_inboth=yes
14307         ;;
14308 (*)
14309         cf_format=no
14310         cf_inboth=no
14311         ;;
14312 esac
14313
14314 test ! -d man && mkdir man
14315
14316 cf_so_strip=
14317 cf_compress=
14318 case "$MANPAGE_FORMAT" in
14319 (*compress*)
14320         cf_so_strip="Z"
14321         cf_compress=compress
14322         ;;
14323 (*gzip*)
14324         cf_so_strip="gz"
14325         cf_compress=gzip
14326         ;;
14327 esac
14328
14329 cf_edit_man=./edit_man.sh
14330 cf_man_alias=`pwd`/man_alias.sed
14331
14332 cat >$cf_edit_man <<CF_EOF
14333 #! $SHELL
14334 # this script is generated by the configure-script CF_MAN_PAGES macro.
14335
14336 prefix="$cf_prefix"
14337 datarootdir="$datarootdir"
14338 datadir="$datadir"
14339
14340 NCURSES_MAJOR="$NCURSES_MAJOR"
14341 NCURSES_MINOR="$NCURSES_MINOR"
14342 NCURSES_PATCH="$NCURSES_PATCH"
14343
14344 NCURSES_OSPEED="$NCURSES_OSPEED"
14345 TERMINFO="$TERMINFO"
14346
14347 INSTALL="$INSTALL"
14348 INSTALL_DATA="$INSTALL_DATA"
14349
14350 transform="$program_transform_name"
14351
14352 TMP=\${TMPDIR:=/tmp}/man\$\$
14353 trap "rm -f \$TMP" 0 1 2 3 15
14354
14355 form=\$1
14356 shift || exit 1
14357
14358 verb=\$1
14359 shift || exit 1
14360
14361 mandir=\$1
14362 shift || exit 1
14363
14364 srcdir=\$1
14365 top_srcdir=\$srcdir/..
14366 shift || exit 1
14367
14368 if test "\$form" = normal ; then
14369         if test "$cf_format" = yes ; then
14370         if test "$cf_inboth" = no ; then
14371                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14372                 exit $?
14373         fi
14374         fi
14375         cf_subdir=\$mandir/man
14376         cf_tables=$MANPAGE_TBL
14377 else
14378         cf_subdir=\$mandir/cat
14379         cf_tables=yes
14380 fi
14381
14382 # process the list of source-files
14383 for i in \$* ; do
14384 case \$i in
14385 (*.orig|*.rej) ;;
14386 (*.[0-9]*)
14387         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14388         if test \$verb = installing ; then
14389         if test ! -d \$cf_subdir\${section} ; then
14390                 mkdir -p \$cf_subdir\$section
14391         fi
14392         fi
14393
14394         # replace variables in man page
14395         if test ! -f $cf_man_alias ; then
14396 cat >>$cf_man_alias <<-CF_EOF2
14397                 s,@DATADIR@,\$datadir,g
14398                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14399                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14400                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14401                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14402                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14403                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14404 CF_EOF
14405
14406         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14407         do
14408                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14409                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14410 cat >>$cf_edit_man <<-CF_EOF
14411                 s,@$cf_NAME@,$cf_name,g
14412 CF_EOF
14413         done
14414
14415 cat >>$cf_edit_man <<CF_EOF
14416 CF_EOF2
14417                 echo "...made $cf_man_alias"
14418         fi
14419
14420         aliases=
14421         cf_source=\`basename \$i\`
14422         inalias=\$cf_source
14423         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14424         if test ! -f \$inalias ; then
14425                 echo .. skipped \$cf_source
14426                 continue
14427         fi
14428 CF_EOF
14429
14430 if test "$MANPAGE_ALIASES" != no ; then
14431 cat >>$cf_edit_man <<CF_EOF
14432         nCurses=ignore.3x
14433         test $with_curses_h = yes && nCurses=ncurses.3x
14434         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14435 CF_EOF
14436 fi
14437
14438 if test "$MANPAGE_RENAMES" = no ; then
14439 cat >>$cf_edit_man <<CF_EOF
14440         # perform program transformations for section 1 man pages
14441         if test \$section = 1 ; then
14442                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14443         else
14444                 cf_target=\$cf_subdir\${section}/\$cf_source
14445         fi
14446 CF_EOF
14447 else
14448 cat >>$cf_edit_man <<CF_EOF
14449         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14450         if test -z "\$cf_target" ; then
14451                 echo '? missing rename for '\$cf_source
14452                 cf_target="\$cf_source"
14453         fi
14454         cf_target="\$cf_subdir\${section}/\${cf_target}"
14455
14456 CF_EOF
14457 fi
14458
14459 cat >>$cf_edit_man <<CF_EOF
14460         sed     -f $cf_man_alias \\
14461 CF_EOF
14462
14463 if test -f $MANPAGE_RENAMES ; then
14464 cat >>$cf_edit_man <<CF_EOF
14465                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14466 CF_EOF
14467 else
14468 cat >>$cf_edit_man <<CF_EOF
14469                 < \$i >\$TMP
14470 CF_EOF
14471 fi
14472
14473 cat >>$cf_edit_man <<CF_EOF
14474 if test \$cf_tables = yes ; then
14475         tbl \$TMP >\$TMP.out
14476         mv \$TMP.out \$TMP
14477 fi
14478 CF_EOF
14479
14480 if test $with_overwrite != yes ; then
14481 cat >>$cf_edit_man <<CF_EOF
14482         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14483         mv \$TMP.out \$TMP
14484 CF_EOF
14485 fi
14486
14487 if test $with_curses_h != yes ; then
14488 cat >>$cf_edit_man <<CF_EOF
14489         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14490         mv \$TMP.out \$TMP
14491 CF_EOF
14492 fi
14493
14494 cat >>$cf_edit_man <<CF_EOF
14495         if test \$form = format ; then
14496                 nroff -man \$TMP >\$TMP.out
14497                 mv \$TMP.out \$TMP
14498         fi
14499 CF_EOF
14500
14501 if test -n "$cf_compress" ; then
14502 cat >>$cf_edit_man <<CF_EOF
14503         if test \$verb = installing ; then
14504         if ( $cf_compress -f \$TMP )
14505         then
14506                 mv \$TMP.$cf_so_strip \$TMP
14507         fi
14508         fi
14509         cf_target="\$cf_target.$cf_so_strip"
14510 CF_EOF
14511 fi
14512
14513 case "$MANPAGE_FORMAT" in
14514 (*BSDI*)
14515 cat >>$cf_edit_man <<CF_EOF
14516         if test \$form = format ; then
14517                 # BSDI installs only .0 suffixes in the cat directories
14518                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14519         fi
14520 CF_EOF
14521   ;;
14522 esac
14523
14524 cat >>$cf_edit_man <<CF_EOF
14525         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14526         if test \$verb = installing ; then
14527                 echo \$verb \$cf_target
14528                 \$INSTALL_DATA \$TMP \$cf_target
14529                 test -d \$cf_subdir\${section} &&
14530                 test -n "\$aliases" && (
14531                         cd \$cf_subdir\${section} && (
14532                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14533                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14534                                 cf_target=\`basename \$cf_target\`
14535                                 for cf_alias in \$aliases
14536                                 do
14537                                         if test \$section = 1 ; then
14538                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14539                                         fi
14540
14541                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14542                                                 if test -f \$cf_alias\${suffix} ; then
14543                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14544                                                         then
14545                                                                 continue
14546                                                         fi
14547                                                 fi
14548                                                 echo .. \$verb alias \$cf_alias\${suffix}
14549 CF_EOF
14550 case "x$LN_S" in
14551 (*-f)
14552 cat >>$cf_edit_man <<CF_EOF
14553                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14554 CF_EOF
14555         ;;
14556 (*)
14557 cat >>$cf_edit_man <<CF_EOF
14558                                                 rm -f \$cf_alias\${suffix}
14559                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14560 CF_EOF
14561         ;;
14562 esac
14563 cat >>$cf_edit_man <<CF_EOF
14564                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14565                                                 echo ".so \$cf_source" >\$TMP
14566 CF_EOF
14567 if test -n "$cf_compress" ; then
14568 cat >>$cf_edit_man <<CF_EOF
14569                                                 if test -n "$cf_so_strip" ; then
14570                                                         $cf_compress -f \$TMP
14571                                                         mv \$TMP.$cf_so_strip \$TMP
14572                                                 fi
14573 CF_EOF
14574 fi
14575 cat >>$cf_edit_man <<CF_EOF
14576                                                 echo .. \$verb alias \$cf_alias\${suffix}
14577                                                 rm -f \$cf_alias\${suffix}
14578                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14579                                         fi
14580                                 done
14581                         )
14582                 )
14583         elif test \$verb = removing ; then
14584                 test -f \$cf_target && (
14585                         echo \$verb \$cf_target
14586                         rm -f \$cf_target
14587                 )
14588                 test -d \$cf_subdir\${section} &&
14589                 test -n "\$aliases" && (
14590                         cd \$cf_subdir\${section} && (
14591                                 for cf_alias in \$aliases
14592                                 do
14593                                         if test \$section = 1 ; then
14594                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14595                                         fi
14596
14597                                         echo .. \$verb alias \$cf_alias\${suffix}
14598                                         rm -f \$cf_alias\${suffix}
14599                                 done
14600                         )
14601                 )
14602         else
14603 #               echo ".hy 0"
14604                 cat \$TMP
14605         fi
14606         ;;
14607 esac
14608 done
14609
14610 if test $cf_inboth = yes ; then
14611 if test \$form != format ; then
14612         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14613 fi
14614 fi
14615
14616 exit 0
14617 CF_EOF
14618 chmod 755 $cf_edit_man
14619
14620 ###############################################################################
14621
14622 ### Note that some functions (such as const) are normally disabled anyway.
14623 echo "$as_me:14623: checking if you want to build with function extensions" >&5
14624 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14625
14626 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14627 if test "${enable_ext_funcs+set}" = set; then
14628   enableval="$enable_ext_funcs"
14629   with_ext_funcs=$enableval
14630 else
14631   with_ext_funcs=yes
14632 fi;
14633 echo "$as_me:14633: result: $with_ext_funcs" >&5
14634 echo "${ECHO_T}$with_ext_funcs" >&6
14635 if test "x$with_ext_funcs" = xyes ; then
14636         NCURSES_EXT_FUNCS=1
14637
14638 cat >>confdefs.h <<\EOF
14639 #define NCURSES_EXT_FUNCS 1
14640 EOF
14641
14642 cat >>confdefs.h <<\EOF
14643 #define HAVE_ASSUME_DEFAULT_COLORS 1
14644 EOF
14645
14646 cat >>confdefs.h <<\EOF
14647 #define HAVE_CURSES_VERSION 1
14648 EOF
14649
14650 cat >>confdefs.h <<\EOF
14651 #define HAVE_HAS_KEY 1
14652 EOF
14653
14654 cat >>confdefs.h <<\EOF
14655 #define HAVE_RESIZETERM 1
14656 EOF
14657
14658 cat >>confdefs.h <<\EOF
14659 #define HAVE_RESIZE_TERM 1
14660 EOF
14661
14662 cat >>confdefs.h <<\EOF
14663 #define HAVE_TERM_ENTRY_H 1
14664 EOF
14665
14666 cat >>confdefs.h <<\EOF
14667 #define HAVE_USE_DEFAULT_COLORS 1
14668 EOF
14669
14670 cat >>confdefs.h <<\EOF
14671 #define HAVE_USE_EXTENDED_NAMES 1
14672 EOF
14673
14674 cat >>confdefs.h <<\EOF
14675 #define HAVE_USE_SCREEN 1
14676 EOF
14677
14678 cat >>confdefs.h <<\EOF
14679 #define HAVE_USE_WINDOW 1
14680 EOF
14681
14682 cat >>confdefs.h <<\EOF
14683 #define HAVE_WRESIZE 1
14684 EOF
14685
14686         GENERATED_EXT_FUNCS=generated
14687         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14688 else
14689         NCURSES_EXT_FUNCS=0
14690         GENERATED_EXT_FUNCS=
14691 fi
14692
14693 echo "$as_me:14693: checking if you want to build with SCREEN extensions" >&5
14694 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14695
14696 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14697 if test "${enable_sp_funcs+set}" = set; then
14698   enableval="$enable_sp_funcs"
14699   with_sp_funcs=$enableval
14700 else
14701   with_sp_funcs=$cf_dft_ext_spfuncs
14702 fi;
14703 echo "$as_me:14703: result: $with_sp_funcs" >&5
14704 echo "${ECHO_T}$with_sp_funcs" >&6
14705 if test "x$with_sp_funcs" = xyes ; then
14706         NCURSES_SP_FUNCS=1
14707
14708 cat >>confdefs.h <<\EOF
14709 #define NCURSES_SP_FUNCS 1
14710 EOF
14711
14712 cat >>confdefs.h <<\EOF
14713 #define HAVE_TPUTS_SP 1
14714 EOF
14715
14716         GENERATED_SP_FUNCS=generated
14717 else
14718         NCURSES_SP_FUNCS=0
14719         GENERATED_SP_FUNCS=
14720 fi
14721
14722 echo "$as_me:14722: checking if you want to build with terminal-driver" >&5
14723 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14724
14725 # Check whether --enable-term-driver or --disable-term-driver was given.
14726 if test "${enable_term_driver+set}" = set; then
14727   enableval="$enable_term_driver"
14728   with_term_driver=$enableval
14729 else
14730   with_term_driver=no
14731 fi;
14732 echo "$as_me:14732: result: $with_term_driver" >&5
14733 echo "${ECHO_T}$with_term_driver" >&6
14734 if test "x$with_term_driver" = xyes ; then
14735
14736 cat >>confdefs.h <<\EOF
14737 #define USE_TERM_DRIVER 1
14738 EOF
14739
14740         if test "x$with_termlib" != xno ; then
14741                 { { echo "$as_me:14741: error: The term-driver option conflicts with the termlib option" >&5
14742 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14743    { (exit 1); exit 1; }; }
14744         fi
14745         if test "x$with_sp_funcs" != xyes ; then
14746                 { { echo "$as_me:14746: error: The term-driver option relies upon sp-funcs" >&5
14747 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14748    { (exit 1); exit 1; }; }
14749         fi
14750 fi
14751
14752 ###   use option --enable-const to turn on use of const beyond that in XSI.
14753 echo "$as_me:14753: checking for extended use of const keyword" >&5
14754 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14755
14756 # Check whether --enable-const or --disable-const was given.
14757 if test "${enable_const+set}" = set; then
14758   enableval="$enable_const"
14759   with_ext_const=$enableval
14760 else
14761   with_ext_const=$cf_dft_ext_const
14762 fi;
14763 echo "$as_me:14763: result: $with_ext_const" >&5
14764 echo "${ECHO_T}$with_ext_const" >&6
14765 NCURSES_CONST='/*nothing*/'
14766 if test "x$with_ext_const" = xyes ; then
14767         NCURSES_CONST=const
14768 fi
14769
14770 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14771 echo "$as_me:14771: checking if you want to use extended colors" >&5
14772 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14773
14774 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14775 if test "${enable_ext_colors+set}" = set; then
14776   enableval="$enable_ext_colors"
14777   with_ext_colors=$enableval
14778 else
14779   with_ext_colors=$cf_dft_ext_colors
14780 fi;
14781 echo "$as_me:14781: result: $with_ext_colors" >&5
14782 echo "${ECHO_T}$with_ext_colors" >&6
14783 NCURSES_EXT_COLORS=0
14784 if test "x$with_ext_colors" = xyes ; then
14785         if test "x$with_widec" != xyes ; then
14786                 { echo "$as_me:14786: WARNING: This option applies only to wide-character library" >&5
14787 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14788         else
14789                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14790
14791 if test "${with_abi_version+set}" != set; then
14792         case $cf_cv_rel_version in
14793         (5.*)
14794                 cf_cv_rel_version=6.0
14795                 cf_cv_abi_version=6
14796                 { echo "$as_me:14796: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14797 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14798                 ;;
14799         esac
14800 fi
14801
14802                 NCURSES_EXT_COLORS=1
14803
14804 cat >>confdefs.h <<\EOF
14805 #define NCURSES_EXT_COLORS 1
14806 EOF
14807
14808 cat >>confdefs.h <<\EOF
14809 #define HAVE_ALLOC_PAIR 1
14810 EOF
14811
14812 cat >>confdefs.h <<\EOF
14813 #define HAVE_INIT_EXTENDED_COLOR 1
14814 EOF
14815
14816 cat >>confdefs.h <<\EOF
14817 #define HAVE_RESET_COLOR_PAIRS 1
14818 EOF
14819
14820         fi
14821 fi
14822
14823 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14824 echo "$as_me:14824: checking if you want to use extended mouse encoding" >&5
14825 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14826
14827 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14828 if test "${enable_ext_mouse+set}" = set; then
14829   enableval="$enable_ext_mouse"
14830   with_ext_mouse=$enableval
14831 else
14832   with_ext_mouse=$cf_dft_ext_mouse
14833 fi;
14834 echo "$as_me:14834: result: $with_ext_mouse" >&5
14835 echo "${ECHO_T}$with_ext_mouse" >&6
14836 NCURSES_MOUSE_VERSION=1
14837 if test "x$with_ext_mouse" = xyes ; then
14838         NCURSES_MOUSE_VERSION=2
14839
14840 if test "${with_abi_version+set}" != set; then
14841         case $cf_cv_rel_version in
14842         (5.*)
14843                 cf_cv_rel_version=6.0
14844                 cf_cv_abi_version=6
14845                 { echo "$as_me:14845: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14846 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14847                 ;;
14848         esac
14849 fi
14850
14851 fi
14852
14853 ###   use option --enable-ext-putwin to turn on extended screendumps
14854 echo "$as_me:14854: checking if you want to use extended putwin/screendump" >&5
14855 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14856
14857 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14858 if test "${enable_ext_putwin+set}" = set; then
14859   enableval="$enable_ext_putwin"
14860   with_ext_putwin=$enableval
14861 else
14862   with_ext_putwin=$cf_dft_ext_putwin
14863 fi;
14864 echo "$as_me:14864: result: $with_ext_putwin" >&5
14865 echo "${ECHO_T}$with_ext_putwin" >&6
14866 if test "x$with_ext_putwin" = xyes ; then
14867
14868 cat >>confdefs.h <<\EOF
14869 #define NCURSES_EXT_PUTWIN 1
14870 EOF
14871
14872 fi
14873
14874 echo "$as_me:14874: checking if you want \$NCURSES_NO_PADDING code" >&5
14875 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14876
14877 # Check whether --enable-no-padding or --disable-no-padding was given.
14878 if test "${enable_no_padding+set}" = set; then
14879   enableval="$enable_no_padding"
14880   with_no_padding=$enableval
14881 else
14882   with_no_padding=$with_ext_funcs
14883 fi;
14884 echo "$as_me:14884: result: $with_no_padding" >&5
14885 echo "${ECHO_T}$with_no_padding" >&6
14886 test "x$with_no_padding" = xyes &&
14887 cat >>confdefs.h <<\EOF
14888 #define NCURSES_NO_PADDING 1
14889 EOF
14890
14891 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14892 echo "$as_me:14892: checking if you want SIGWINCH handler" >&5
14893 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14894
14895 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14896 if test "${enable_sigwinch+set}" = set; then
14897   enableval="$enable_sigwinch"
14898   with_sigwinch=$enableval
14899 else
14900   with_sigwinch=$with_ext_funcs
14901 fi;
14902 echo "$as_me:14902: result: $with_sigwinch" >&5
14903 echo "${ECHO_T}$with_sigwinch" >&6
14904 test "x$with_sigwinch" = xyes &&
14905 cat >>confdefs.h <<\EOF
14906 #define USE_SIGWINCH 1
14907 EOF
14908
14909 ###   use option --enable-tcap-names to allow user to define new capabilities
14910 echo "$as_me:14910: checking if you want user-definable terminal capabilities like termcap" >&5
14911 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14912
14913 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14914 if test "${enable_tcap_names+set}" = set; then
14915   enableval="$enable_tcap_names"
14916   with_tcap_names=$enableval
14917 else
14918   with_tcap_names=$with_ext_funcs
14919 fi;
14920 echo "$as_me:14920: result: $with_tcap_names" >&5
14921 echo "${ECHO_T}$with_tcap_names" >&6
14922 NCURSES_XNAMES=0
14923 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14924
14925 ##############################################################################
14926
14927 echo "$as_me:14927: checking if you want to link with the pthread library" >&5
14928 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14929
14930 # Check whether --with-pthread or --without-pthread was given.
14931 if test "${with_pthread+set}" = set; then
14932   withval="$with_pthread"
14933   with_pthread=$withval
14934 else
14935   with_pthread=no
14936 fi;
14937 echo "$as_me:14937: result: $with_pthread" >&5
14938 echo "${ECHO_T}$with_pthread" >&6
14939
14940 if test "$with_pthread" != no ; then
14941         echo "$as_me:14941: checking for pthread.h" >&5
14942 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14943 if test "${ac_cv_header_pthread_h+set}" = set; then
14944   echo $ECHO_N "(cached) $ECHO_C" >&6
14945 else
14946   cat >conftest.$ac_ext <<_ACEOF
14947 #line 14947 "configure"
14948 #include "confdefs.h"
14949 #include <pthread.h>
14950 _ACEOF
14951 if { (eval echo "$as_me:14951: \"$ac_cpp conftest.$ac_ext\"") >&5
14952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14953   ac_status=$?
14954   egrep -v '^ *\+' conftest.er1 >conftest.err
14955   rm -f conftest.er1
14956   cat conftest.err >&5
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit $ac_status); } >/dev/null; then
14959   if test -s conftest.err; then
14960     ac_cpp_err=$ac_c_preproc_warn_flag
14961   else
14962     ac_cpp_err=
14963   fi
14964 else
14965   ac_cpp_err=yes
14966 fi
14967 if test -z "$ac_cpp_err"; then
14968   ac_cv_header_pthread_h=yes
14969 else
14970   echo "$as_me: failed program was:" >&5
14971   cat conftest.$ac_ext >&5
14972   ac_cv_header_pthread_h=no
14973 fi
14974 rm -f conftest.err conftest.$ac_ext
14975 fi
14976 echo "$as_me:14976: result: $ac_cv_header_pthread_h" >&5
14977 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14978 if test $ac_cv_header_pthread_h = yes; then
14979
14980 cat >>confdefs.h <<\EOF
14981 #define HAVE_PTHREADS_H 1
14982 EOF
14983
14984         for cf_lib_pthread in pthread c_r
14985         do
14986             echo "$as_me:14986: checking if we can link with the $cf_lib_pthread library" >&5
14987 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14988             cf_save_LIBS="$LIBS"
14989
14990 cf_add_libs="$LIBS"
14991 # reverse order
14992 cf_add_0lib=
14993 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14994 # filter duplicates
14995 for cf_add_1lib in $cf_add_0lib; do
14996         for cf_add_2lib in $cf_add_libs; do
14997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14998                         cf_add_1lib=
14999                         break
15000                 fi
15001         done
15002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15003 done
15004 LIBS="$cf_add_libs"
15005
15006             cat >conftest.$ac_ext <<_ACEOF
15007 #line 15007 "configure"
15008 #include "confdefs.h"
15009
15010 #include <pthread.h>
15011
15012 int
15013 main (void)
15014 {
15015
15016                 int rc = pthread_create(0,0,0,0);
15017                 int r2 = pthread_mutexattr_settype(0, 0);
15018
15019   ;
15020   return 0;
15021 }
15022 _ACEOF
15023 rm -f conftest.$ac_objext conftest$ac_exeext
15024 if { (eval echo "$as_me:15024: \"$ac_link\"") >&5
15025   (eval $ac_link) 2>&5
15026   ac_status=$?
15027   echo "$as_me:15027: \$? = $ac_status" >&5
15028   (exit $ac_status); } &&
15029          { ac_try='test -s conftest$ac_exeext'
15030   { (eval echo "$as_me:15030: \"$ac_try\"") >&5
15031   (eval $ac_try) 2>&5
15032   ac_status=$?
15033   echo "$as_me:15033: \$? = $ac_status" >&5
15034   (exit $ac_status); }; }; then
15035   with_pthread=yes
15036 else
15037   echo "$as_me: failed program was:" >&5
15038 cat conftest.$ac_ext >&5
15039 with_pthread=no
15040 fi
15041 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15042             LIBS="$cf_save_LIBS"
15043             echo "$as_me:15043: result: $with_pthread" >&5
15044 echo "${ECHO_T}$with_pthread" >&6
15045             test "$with_pthread" = yes && break
15046         done
15047
15048         if test "$with_pthread" = yes ; then
15049
15050 cf_add_libs="$LIBS"
15051 # reverse order
15052 cf_add_0lib=
15053 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15054 # filter duplicates
15055 for cf_add_1lib in $cf_add_0lib; do
15056         for cf_add_2lib in $cf_add_libs; do
15057                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15058                         cf_add_1lib=
15059                         break
15060                 fi
15061         done
15062         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15063 done
15064 LIBS="$cf_add_libs"
15065
15066 cat >>confdefs.h <<\EOF
15067 #define HAVE_LIBPTHREADS 1
15068 EOF
15069
15070         else
15071             { { echo "$as_me:15071: error: Cannot link with pthread library" >&5
15072 echo "$as_me: error: Cannot link with pthread library" >&2;}
15073    { (exit 1); exit 1; }; }
15074         fi
15075
15076 fi
15077
15078 fi
15079
15080 if test "x$with_pthread" != xno; then
15081         echo "$as_me:15081: checking for pthread_kill" >&5
15082 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15083 if test "${ac_cv_func_pthread_kill+set}" = set; then
15084   echo $ECHO_N "(cached) $ECHO_C" >&6
15085 else
15086   cat >conftest.$ac_ext <<_ACEOF
15087 #line 15087 "configure"
15088 #include "confdefs.h"
15089 #define pthread_kill autoconf_temporary
15090 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15091 #undef pthread_kill
15092
15093 #ifdef __cplusplus
15094 extern "C"
15095 #endif
15096
15097 /* We use char because int might match the return type of a gcc2
15098    builtin and then its argument prototype would still apply.  */
15099 char pthread_kill (void);
15100
15101 int
15102 main (void)
15103 {
15104
15105 /* The GNU C library defines stubs for functions which it implements
15106     to always fail with ENOSYS.  Some functions are actually named
15107     something starting with __ and the normal name is an alias.  */
15108 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15109 #error found stub for pthread_kill
15110 #endif
15111
15112         return pthread_kill ();
15113   ;
15114   return 0;
15115 }
15116 _ACEOF
15117 rm -f conftest.$ac_objext conftest$ac_exeext
15118 if { (eval echo "$as_me:15118: \"$ac_link\"") >&5
15119   (eval $ac_link) 2>&5
15120   ac_status=$?
15121   echo "$as_me:15121: \$? = $ac_status" >&5
15122   (exit $ac_status); } &&
15123          { ac_try='test -s conftest$ac_exeext'
15124   { (eval echo "$as_me:15124: \"$ac_try\"") >&5
15125   (eval $ac_try) 2>&5
15126   ac_status=$?
15127   echo "$as_me:15127: \$? = $ac_status" >&5
15128   (exit $ac_status); }; }; then
15129   ac_cv_func_pthread_kill=yes
15130 else
15131   echo "$as_me: failed program was:" >&5
15132 cat conftest.$ac_ext >&5
15133 ac_cv_func_pthread_kill=no
15134 fi
15135 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15136 fi
15137 echo "$as_me:15137: result: $ac_cv_func_pthread_kill" >&5
15138 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15139 if test $ac_cv_func_pthread_kill = yes; then
15140
15141                 echo "$as_me:15141: checking if you want to allow EINTR in wgetch with pthreads" >&5
15142 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15143
15144 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15145 if test "${enable_pthreads_eintr+set}" = set; then
15146   enableval="$enable_pthreads_eintr"
15147   use_pthreads_eintr=$enableval
15148 else
15149   use_pthreads_eintr=no
15150 fi;
15151                 echo "$as_me:15151: result: $use_pthreads_eintr" >&5
15152 echo "${ECHO_T}$use_pthreads_eintr" >&6
15153                 if test "x$use_pthreads_eintr" = xyes ; then
15154
15155 cat >>confdefs.h <<\EOF
15156 #define USE_PTHREADS_EINTR 1
15157 EOF
15158
15159                 fi
15160 fi
15161
15162         echo "$as_me:15162: checking if you want to use weak-symbols for pthreads" >&5
15163 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15164
15165 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15166 if test "${enable_weak_symbols+set}" = set; then
15167   enableval="$enable_weak_symbols"
15168   use_weak_symbols=$enableval
15169 else
15170   use_weak_symbols=no
15171 fi;
15172         echo "$as_me:15172: result: $use_weak_symbols" >&5
15173 echo "${ECHO_T}$use_weak_symbols" >&6
15174         if test "x$use_weak_symbols" = xyes ; then
15175
15176 echo "$as_me:15176: checking if $CC supports weak symbols" >&5
15177 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15178 if test "${cf_cv_weak_symbols+set}" = set; then
15179   echo $ECHO_N "(cached) $ECHO_C" >&6
15180 else
15181
15182 cat >conftest.$ac_ext <<_ACEOF
15183 #line 15183 "configure"
15184 #include "confdefs.h"
15185
15186 #include <stdio.h>
15187 int
15188 main (void)
15189 {
15190
15191 #if defined(__GNUC__)
15192 #  if defined __USE_ISOC99
15193 #    define _cat_pragma(exp)    _Pragma(#exp)
15194 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15195 #  else
15196 #    define _weak_pragma(exp)
15197 #  endif
15198 #  define _declare(name)        __extension__ extern __typeof__(name) name
15199 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15200 #endif
15201
15202 weak_symbol(fopen);
15203
15204   ;
15205   return 0;
15206 }
15207 _ACEOF
15208 rm -f conftest.$ac_objext
15209 if { (eval echo "$as_me:15209: \"$ac_compile\"") >&5
15210   (eval $ac_compile) 2>&5
15211   ac_status=$?
15212   echo "$as_me:15212: \$? = $ac_status" >&5
15213   (exit $ac_status); } &&
15214          { ac_try='test -s conftest.$ac_objext'
15215   { (eval echo "$as_me:15215: \"$ac_try\"") >&5
15216   (eval $ac_try) 2>&5
15217   ac_status=$?
15218   echo "$as_me:15218: \$? = $ac_status" >&5
15219   (exit $ac_status); }; }; then
15220   cf_cv_weak_symbols=yes
15221 else
15222   echo "$as_me: failed program was:" >&5
15223 cat conftest.$ac_ext >&5
15224 cf_cv_weak_symbols=no
15225 fi
15226 rm -f conftest.$ac_objext conftest.$ac_ext
15227
15228 fi
15229 echo "$as_me:15229: result: $cf_cv_weak_symbols" >&5
15230 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15231
15232         else
15233                 cf_cv_weak_symbols=no
15234         fi
15235
15236         if test "x$cf_cv_weak_symbols" = xyes ; then
15237
15238 cat >>confdefs.h <<\EOF
15239 #define USE_WEAK_SYMBOLS 1
15240 EOF
15241
15242         fi
15243 fi
15244
15245 PTHREAD=
15246 if test "x$with_pthread" = "xyes" ; then
15247
15248 cat >>confdefs.h <<\EOF
15249 #define USE_PTHREADS 1
15250 EOF
15251
15252         enable_reentrant=yes
15253         if test "x$cf_cv_weak_symbols" = xyes ; then
15254                 PTHREAD=-lpthread
15255
15256 cf_add_libs="$PRIVATE_LIBS"
15257 # reverse order
15258 cf_add_0lib=
15259 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15260 # filter duplicates
15261 for cf_add_1lib in $cf_add_0lib; do
15262         for cf_add_2lib in $cf_add_libs; do
15263                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15264                         cf_add_1lib=
15265                         break
15266                 fi
15267         done
15268         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15269 done
15270 PRIVATE_LIBS="$cf_add_libs"
15271
15272         fi
15273 fi
15274
15275 # Reentrant code has to be opaque; there's little advantage to making ncurses
15276 # opaque outside of that, so there is no --enable-opaque option.  We can use
15277 # this option without --with-pthreads, but this will be always set for
15278 # pthreads.
15279 echo "$as_me:15279: checking if you want reentrant code" >&5
15280 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15281
15282 # Check whether --enable-reentrant or --disable-reentrant was given.
15283 if test "${enable_reentrant+set}" = set; then
15284   enableval="$enable_reentrant"
15285   with_reentrant=$enableval
15286 else
15287   with_reentrant=no
15288 fi;
15289 echo "$as_me:15289: result: $with_reentrant" >&5
15290 echo "${ECHO_T}$with_reentrant" >&6
15291 if test "x$with_reentrant" = xyes ; then
15292         cf_cv_enable_reentrant=1
15293         cf_cv_enable_opaque="NCURSES_INTERNALS"
15294         NCURSES_SIZE_T=int
15295         if test "x$cf_cv_weak_symbols" = xyes ; then
15296
15297 # remove pthread library from $LIBS
15298 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15299
15300 cf_add_libs="$TEST_LIBS"
15301 # reverse order
15302 cf_add_0lib=
15303 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15304 # filter duplicates
15305 for cf_add_1lib in $cf_add_0lib; do
15306         for cf_add_2lib in $cf_add_libs; do
15307                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15308                         cf_add_1lib=
15309                         break
15310                 fi
15311         done
15312         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15313 done
15314 TEST_LIBS="$cf_add_libs"
15315
15316 cf_add_libs="$TEST_LIBS2"
15317 # reverse order
15318 cf_add_0lib=
15319 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15320 # filter duplicates
15321 for cf_add_1lib in $cf_add_0lib; do
15322         for cf_add_2lib in $cf_add_libs; do
15323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15324                         cf_add_1lib=
15325                         break
15326                 fi
15327         done
15328         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15329 done
15330 TEST_LIBS2="$cf_add_libs"
15331
15332 cf_add_libs="$PRIVATE_LIBS"
15333 # reverse order
15334 cf_add_0lib=
15335 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15336 # filter duplicates
15337 for cf_add_1lib in $cf_add_0lib; do
15338         for cf_add_2lib in $cf_add_libs; do
15339                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15340                         cf_add_1lib=
15341                         break
15342                 fi
15343         done
15344         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15345 done
15346 PRIVATE_LIBS="$cf_add_libs"
15347
15348         else
15349                 # when not using weak symbols but with_reentrant,
15350                 # add 't' to the library suffix on all platforms
15351                 # except cygwin, where we only do that if ALSO
15352                 # compiling with full thread support.
15353                 case "$host" in
15354                 (*cygwin* | *msys*)
15355                         if test "$with_pthread" = "yes" ; then
15356                                 if test "x$disable_lib_suffixes" = "xno" ; then
15357                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15358                                 fi
15359                         fi ;;
15360                 (*)
15361                         if test "x$disable_lib_suffixes" = "xno" ; then
15362                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15363                         fi
15364                         ;;
15365                 esac
15366         fi
15367
15368 cat >>confdefs.h <<\EOF
15369 #define USE_REENTRANT 1
15370 EOF
15371
15372 if test "${with_abi_version+set}" != set; then
15373         case $cf_cv_rel_version in
15374         (5.*)
15375                 cf_cv_rel_version=6.0
15376                 cf_cv_abi_version=6
15377                 { echo "$as_me:15377: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15378 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15379                 ;;
15380         esac
15381 fi
15382
15383 else
15384         cf_cv_enable_reentrant=0
15385         cf_cv_enable_opaque="NCURSES_OPAQUE"
15386         NCURSES_SIZE_T=short
15387 fi
15388
15389 echo "$as_me:15389: checking if you want opaque curses-library structures" >&5
15390 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15391
15392 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15393 if test "${enable_opaque_curses+set}" = set; then
15394   enableval="$enable_opaque_curses"
15395   test "$enableval" != yes && enableval=no
15396         if test "$enableval" != "no" ; then
15397     enable_opaque_curses=yes
15398         else
15399
15400          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15401          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15402
15403         fi
15404 else
15405   enableval=no
15406
15407          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15408          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15409
15410 fi;
15411 echo "$as_me:15411: result: $enable_opaque_curses" >&5
15412 echo "${ECHO_T}$enable_opaque_curses" >&6
15413
15414 test "$cf_cv_enable_reentrant" = 1 && \
15415 test "$enable_opaque_curses" = no && \
15416 { { echo "$as_me:15416: error: reentrant configuration requires opaque library" >&5
15417 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15418    { (exit 1); exit 1; }; }
15419
15420 echo "$as_me:15420: checking if you want opaque form-library structures" >&5
15421 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15422
15423 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15424 if test "${enable_opaque_form+set}" = set; then
15425   enableval="$enable_opaque_form"
15426   enable_opaque_form=yes
15427 else
15428   enable_opaque_form=no
15429 fi;
15430 echo "$as_me:15430: result: $enable_opaque_form" >&5
15431 echo "${ECHO_T}$enable_opaque_form" >&6
15432
15433 echo "$as_me:15433: checking if you want opaque menu-library structures" >&5
15434 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15435
15436 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15437 if test "${enable_opaque_menu+set}" = set; then
15438   enableval="$enable_opaque_menu"
15439   enable_opaque_menu=yes
15440 else
15441   enable_opaque_menu=no
15442 fi;
15443 echo "$as_me:15443: result: $enable_opaque_menu" >&5
15444 echo "${ECHO_T}$enable_opaque_menu" >&6
15445
15446 echo "$as_me:15446: checking if you want opaque panel-library structures" >&5
15447 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15448
15449 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15450 if test "${enable_opaque_panel+set}" = set; then
15451   enableval="$enable_opaque_panel"
15452   enable_opaque_panel=yes
15453 else
15454   enable_opaque_panel=no
15455 fi;
15456 echo "$as_me:15456: result: $enable_opaque_panel" >&5
15457 echo "${ECHO_T}$enable_opaque_panel" >&6
15458
15459 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15460 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15461 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15462 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15463
15464 ### Allow using a different wrap-prefix
15465 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15466         echo "$as_me:15466: checking for prefix used to wrap public variables" >&5
15467 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15468
15469 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15470 if test "${with_wrap_prefix+set}" = set; then
15471   withval="$with_wrap_prefix"
15472   NCURSES_WRAP_PREFIX=$withval
15473 else
15474   NCURSES_WRAP_PREFIX=_nc_
15475 fi;
15476         echo "$as_me:15476: result: $NCURSES_WRAP_PREFIX" >&5
15477 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15478 else
15479         NCURSES_WRAP_PREFIX=_nc_
15480 fi
15481
15482 cat >>confdefs.h <<EOF
15483 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15484 EOF
15485
15486 ###############################################################################
15487 # These options are relatively safe to experiment with.
15488
15489 echo "$as_me:15489: checking if you want all development code" >&5
15490 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15491
15492 # Check whether --with-develop or --without-develop was given.
15493 if test "${with_develop+set}" = set; then
15494   withval="$with_develop"
15495   with_develop=$withval
15496 else
15497   with_develop=no
15498 fi;
15499 echo "$as_me:15499: result: $with_develop" >&5
15500 echo "${ECHO_T}$with_develop" >&6
15501
15502 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15503 echo "$as_me:15503: checking if you want hard-tabs code" >&5
15504 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15505
15506 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15507 if test "${enable_hard_tabs+set}" = set; then
15508   enableval="$enable_hard_tabs"
15509
15510 else
15511   enable_hard_tabs=$with_develop
15512 fi;
15513 echo "$as_me:15513: result: $enable_hard_tabs" >&5
15514 echo "${ECHO_T}$enable_hard_tabs" >&6
15515 test "x$enable_hard_tabs" = xyes &&
15516 cat >>confdefs.h <<\EOF
15517 #define USE_HARD_TABS 1
15518 EOF
15519
15520 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15521 echo "$as_me:15521: checking if you want limited support for xmc" >&5
15522 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15523
15524 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15525 if test "${enable_xmc_glitch+set}" = set; then
15526   enableval="$enable_xmc_glitch"
15527
15528 else
15529   enable_xmc_glitch=$with_develop
15530 fi;
15531 echo "$as_me:15531: result: $enable_xmc_glitch" >&5
15532 echo "${ECHO_T}$enable_xmc_glitch" >&6
15533 test "x$enable_xmc_glitch" = xyes &&
15534 cat >>confdefs.h <<\EOF
15535 #define USE_XMC_SUPPORT 1
15536 EOF
15537
15538 ###############################################################################
15539 # These are just experimental, probably should not be in a package:
15540
15541 echo "$as_me:15541: checking if you do not want to assume colors are white-on-black" >&5
15542 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15543
15544 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15545 if test "${enable_assumed_color+set}" = set; then
15546   enableval="$enable_assumed_color"
15547   with_assumed_color=$enableval
15548 else
15549   with_assumed_color=yes
15550 fi;
15551 echo "$as_me:15551: result: $with_assumed_color" >&5
15552 echo "${ECHO_T}$with_assumed_color" >&6
15553 test "x$with_assumed_color" = xyes &&
15554 cat >>confdefs.h <<\EOF
15555 #define USE_ASSUMED_COLOR 1
15556 EOF
15557
15558 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15559 echo "$as_me:15559: checking if you want hashmap scrolling-optimization code" >&5
15560 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15561
15562 # Check whether --enable-hashmap or --disable-hashmap was given.
15563 if test "${enable_hashmap+set}" = set; then
15564   enableval="$enable_hashmap"
15565   with_hashmap=$enableval
15566 else
15567   with_hashmap=yes
15568 fi;
15569 echo "$as_me:15569: result: $with_hashmap" >&5
15570 echo "${ECHO_T}$with_hashmap" >&6
15571 test "x$with_hashmap" = xyes &&
15572 cat >>confdefs.h <<\EOF
15573 #define USE_HASHMAP 1
15574 EOF
15575
15576 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15577 echo "$as_me:15577: checking if you want colorfgbg code" >&5
15578 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15579
15580 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15581 if test "${enable_colorfgbg+set}" = set; then
15582   enableval="$enable_colorfgbg"
15583   with_colorfgbg=$enableval
15584 else
15585   with_colorfgbg=no
15586 fi;
15587 echo "$as_me:15587: result: $with_colorfgbg" >&5
15588 echo "${ECHO_T}$with_colorfgbg" >&6
15589 test "x$with_colorfgbg" = xyes &&
15590 cat >>confdefs.h <<\EOF
15591 #define USE_COLORFGBG 1
15592 EOF
15593
15594 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15595 echo "$as_me:15595: checking if you want to use gcc -fvisibility option" >&5
15596 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15597
15598 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15599 if test "${enable_fvisibility+set}" = set; then
15600   enableval="$enable_fvisibility"
15601   cf_with_fvisibility=$enableval
15602 else
15603   cf_with_fvisibility=no
15604 fi;
15605 echo "$as_me:15605: result: $cf_with_fvisibility" >&5
15606 echo "${ECHO_T}$cf_with_fvisibility" >&6
15607
15608 NCURSES_IMPEXP=
15609 NCURSES_CXX_IMPEXP=
15610 if test "x$cf_with_fvisibility" = xyes; then
15611
15612 echo "$as_me:15612: checking if $CC -fvisibility=hidden option works" >&5
15613 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15614 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617
15618     cf_save_cflags="$CFLAGS"
15619     CFLAGS="$CFLAGS -fvisibility=hidden"
15620     cat >conftest.$ac_ext <<_ACEOF
15621 #line 15621 "configure"
15622 #include "confdefs.h"
15623
15624 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15625
15626 int
15627 main (void)
15628 {
15629
15630         if (somefunc()) return 1;
15631
15632   ;
15633   return 0;
15634 }
15635 _ACEOF
15636 rm -f conftest.$ac_objext conftest$ac_exeext
15637 if { (eval echo "$as_me:15637: \"$ac_link\"") >&5
15638   (eval $ac_link) 2>&5
15639   ac_status=$?
15640   echo "$as_me:15640: \$? = $ac_status" >&5
15641   (exit $ac_status); } &&
15642          { ac_try='test -s conftest$ac_exeext'
15643   { (eval echo "$as_me:15643: \"$ac_try\"") >&5
15644   (eval $ac_try) 2>&5
15645   ac_status=$?
15646   echo "$as_me:15646: \$? = $ac_status" >&5
15647   (exit $ac_status); }; }; then
15648   cf_cv_fvisibility_hidden=yes
15649 else
15650   echo "$as_me: failed program was:" >&5
15651 cat conftest.$ac_ext >&5
15652 cf_cv_fvisibility_hidden=no
15653 fi
15654 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15655     CFLAGS=$cf_save_cflags
15656
15657 fi
15658 echo "$as_me:15658: result: $cf_cv_fvisibility_hidden" >&5
15659 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15660
15661         if test "x$cf_cv_fvisibility_hidden" = xyes
15662         then
15663
15664 cf_fix_cppflags=no
15665 cf_new_cflags=
15666 cf_new_cppflags=
15667 cf_new_extra_cppflags=
15668
15669 for cf_add_cflags in -fvisibility=hidden
15670 do
15671 case $cf_fix_cppflags in
15672 (no)
15673         case $cf_add_cflags in
15674         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15675                 case $cf_add_cflags in
15676                 (-D*)
15677                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15678
15679                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15680                                 && test -z "${cf_tst_cflags}" \
15681                                 && cf_fix_cppflags=yes
15682
15683                         if test $cf_fix_cppflags = yes ; then
15684
15685         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15686         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15687
15688                                 continue
15689                         elif test "${cf_tst_cflags}" = "\"'" ; then
15690
15691         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15692         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15693
15694                                 continue
15695                         fi
15696                         ;;
15697                 esac
15698                 case "$CPPFLAGS" in
15699                 (*$cf_add_cflags)
15700                         ;;
15701                 (*)
15702                         case $cf_add_cflags in
15703                         (-D*)
15704                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15705
15706 CPPFLAGS=`echo "$CPPFLAGS" | \
15707         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15708                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15709
15710                                 ;;
15711                         esac
15712
15713         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15714         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15715
15716                         ;;
15717                 esac
15718                 ;;
15719         (*)
15720
15721         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15722         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15723
15724                 ;;
15725         esac
15726         ;;
15727 (yes)
15728
15729         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15730         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15731
15732         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15733
15734         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15735                 && test -z "${cf_tst_cflags}" \
15736                 && cf_fix_cppflags=no
15737         ;;
15738 esac
15739 done
15740
15741 if test -n "$cf_new_cflags" ; then
15742
15743         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15744         CFLAGS="${CFLAGS}$cf_new_cflags"
15745
15746 fi
15747
15748 if test -n "$cf_new_cppflags" ; then
15749
15750         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15751         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15752
15753 fi
15754
15755 if test -n "$cf_new_extra_cppflags" ; then
15756
15757         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15758         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15759
15760 fi
15761
15762                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15763         fi
15764         if test -n "$CXX"
15765         then
15766                 ac_ext=cc
15767 ac_cpp='$CXXCPP $CPPFLAGS'
15768 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15769 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15770 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15771 ac_main_return=return
15772
15773 echo "$as_me:15773: checking if $CXX -fvisibility=hidden option works" >&5
15774 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15775 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15776   echo $ECHO_N "(cached) $ECHO_C" >&6
15777 else
15778
15779     cf_save_cflags="$CXXFLAGS"
15780     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15781     cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15784
15785 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15786
15787 int
15788 main (void)
15789 {
15790
15791         if (somefunc()) return 1;
15792
15793   ;
15794   return 0;
15795 }
15796 _ACEOF
15797 rm -f conftest.$ac_objext conftest$ac_exeext
15798 if { (eval echo "$as_me:15798: \"$ac_link\"") >&5
15799   (eval $ac_link) 2>&5
15800   ac_status=$?
15801   echo "$as_me:15801: \$? = $ac_status" >&5
15802   (exit $ac_status); } &&
15803          { ac_try='test -s conftest$ac_exeext'
15804   { (eval echo "$as_me:15804: \"$ac_try\"") >&5
15805   (eval $ac_try) 2>&5
15806   ac_status=$?
15807   echo "$as_me:15807: \$? = $ac_status" >&5
15808   (exit $ac_status); }; }; then
15809   cf_cv_fvisibility_hidden2=yes
15810 else
15811   echo "$as_me: failed program was:" >&5
15812 cat conftest.$ac_ext >&5
15813 cf_cv_fvisibility_hidden2=no
15814 fi
15815 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15816     CXXFLAGS=$cf_save_cflags
15817
15818 fi
15819 echo "$as_me:15819: result: $cf_cv_fvisibility_hidden2" >&5
15820 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15821
15822                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15823                 then
15824
15825 cf_save_CXXFLAGS="$CFLAGS"
15826 CFLAGS="$CXXFLAGS"
15827
15828 cf_fix_cppflags=no
15829 cf_new_cflags=
15830 cf_new_cppflags=
15831 cf_new_extra_cppflags=
15832
15833 for cf_add_cflags in -fvisibility=hidden
15834 do
15835 case $cf_fix_cppflags in
15836 (no)
15837         case $cf_add_cflags in
15838         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15839                 case $cf_add_cflags in
15840                 (-D*)
15841                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15842
15843                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15844                                 && test -z "${cf_tst_cflags}" \
15845                                 && cf_fix_cppflags=yes
15846
15847                         if test $cf_fix_cppflags = yes ; then
15848
15849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15851
15852                                 continue
15853                         elif test "${cf_tst_cflags}" = "\"'" ; then
15854
15855         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15856         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15857
15858                                 continue
15859                         fi
15860                         ;;
15861                 esac
15862                 case "$CPPFLAGS" in
15863                 (*$cf_add_cflags)
15864                         ;;
15865                 (*)
15866                         case $cf_add_cflags in
15867                         (-D*)
15868                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15869
15870 CPPFLAGS=`echo "$CPPFLAGS" | \
15871         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15872                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15873
15874                                 ;;
15875                         esac
15876
15877         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15878         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15879
15880                         ;;
15881                 esac
15882                 ;;
15883         (*)
15884
15885         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15886         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15887
15888                 ;;
15889         esac
15890         ;;
15891 (yes)
15892
15893         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15894         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15895
15896         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15897
15898         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15899                 && test -z "${cf_tst_cflags}" \
15900                 && cf_fix_cppflags=no
15901         ;;
15902 esac
15903 done
15904
15905 if test -n "$cf_new_cflags" ; then
15906
15907         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15908         CFLAGS="${CFLAGS}$cf_new_cflags"
15909
15910 fi
15911
15912 if test -n "$cf_new_cppflags" ; then
15913
15914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15915         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15916
15917 fi
15918
15919 if test -n "$cf_new_extra_cppflags" ; then
15920
15921         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15922         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15923
15924 fi
15925
15926 CXXFLAGS="$CFLAGS"
15927 CFLAGS="$cf_save_CXXFLAGS"
15928
15929                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15930                 fi
15931                 ac_ext=c
15932 ac_cpp='$CPP $CPPFLAGS'
15933 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15934 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15935 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15936 ac_main_return=return
15937
15938         fi
15939 fi
15940
15941 ###   use option --enable-interop to turn on use of bindings used for interop
15942 echo "$as_me:15942: checking if you want interop bindings" >&5
15943 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15944
15945 # Check whether --enable-interop or --disable-interop was given.
15946 if test "${enable_interop+set}" = set; then
15947   enableval="$enable_interop"
15948   with_exp_interop=$enableval
15949 else
15950   with_exp_interop=$cf_dft_interop
15951 fi;
15952 echo "$as_me:15952: result: $with_exp_interop" >&5
15953 echo "${ECHO_T}$with_exp_interop" >&6
15954
15955 NCURSES_INTEROP_FUNCS=0
15956 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15957
15958 echo "$as_me:15958: checking if you want experimental safe-sprintf code" >&5
15959 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15960
15961 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15962 if test "${enable_safe_sprintf+set}" = set; then
15963   enableval="$enable_safe_sprintf"
15964   with_safe_sprintf=$enableval
15965 else
15966   with_safe_sprintf=no
15967 fi;
15968 echo "$as_me:15968: result: $with_safe_sprintf" >&5
15969 echo "${ECHO_T}$with_safe_sprintf" >&6
15970
15971 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15972 # when hashmap is used scroll hints are useless
15973 if test "$with_hashmap" = no ; then
15974 echo "$as_me:15974: checking if you want to experiment without scrolling-hints code" >&5
15975 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15976
15977 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15978 if test "${enable_scroll_hints+set}" = set; then
15979   enableval="$enable_scroll_hints"
15980   with_scroll_hints=$enableval
15981 else
15982   with_scroll_hints=yes
15983 fi;
15984 echo "$as_me:15984: result: $with_scroll_hints" >&5
15985 echo "${ECHO_T}$with_scroll_hints" >&6
15986 test "x$with_scroll_hints" = xyes &&
15987 cat >>confdefs.h <<\EOF
15988 #define USE_SCROLL_HINTS 1
15989 EOF
15990
15991 fi
15992
15993 echo "$as_me:15993: checking if you want wgetch-events code" >&5
15994 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15995
15996 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15997 if test "${enable_wgetch_events+set}" = set; then
15998   enableval="$enable_wgetch_events"
15999   with_wgetch_events=$enableval
16000 else
16001   with_wgetch_events=no
16002 fi;
16003 echo "$as_me:16003: result: $with_wgetch_events" >&5
16004 echo "${ECHO_T}$with_wgetch_events" >&6
16005 if test "x$with_wgetch_events" = xyes ; then
16006
16007 cat >>confdefs.h <<\EOF
16008 #define NCURSES_WGETCH_EVENTS 1
16009 EOF
16010
16011         NCURSES_WGETCH_EVENTS=1
16012 else
16013         NCURSES_WGETCH_EVENTS=0
16014 fi
16015
16016 case $cf_cv_system_name in
16017 (*mingw32*|*mingw64*|*-msvc*)
16018         echo "$as_me:16018: checking if you want experimental-Windows driver" >&5
16019 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16020
16021 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16022 if test "${enable_exp_win32+set}" = set; then
16023   enableval="$enable_exp_win32"
16024   with_exp_win32=$enableval
16025 else
16026   with_exp_win32=no
16027 fi;
16028         echo "$as_me:16028: result: $with_exp_win32" >&5
16029 echo "${ECHO_T}$with_exp_win32" >&6
16030         if test "x$with_exp_win32" = xyes
16031         then
16032
16033 cat >>confdefs.h <<\EOF
16034 #define EXP_WIN32_DRIVER 1
16035 EOF
16036
16037                 EXP_WIN32_DRIVER=1
16038                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16039         else
16040                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16041                 EXP_WIN32_DRIVER=0
16042         fi
16043         ;;
16044 (*)
16045         EXP_WIN32_DRIVER=0
16046         INTERNALS_HDR=
16047         ;;
16048 esac
16049
16050 ###############################################################################
16051
16052 ###     use option --disable-echo to suppress full display compiling commands
16053
16054 echo "$as_me:16054: checking if you want to see long compiling messages" >&5
16055 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16056
16057 # Check whether --enable-echo or --disable-echo was given.
16058 if test "${enable_echo+set}" = set; then
16059   enableval="$enable_echo"
16060   test "$enableval" != no && enableval=yes
16061         if test "$enableval" != "yes" ; then
16062
16063         ECHO_LT='--silent'
16064         ECHO_LD='@echo linking $@;'
16065         RULE_CC='@echo compiling $<'
16066         SHOW_CC='@echo compiling $@'
16067         ECHO_CC='@'
16068
16069         else
16070
16071         ECHO_LT=''
16072         ECHO_LD=''
16073         RULE_CC=''
16074         SHOW_CC=''
16075         ECHO_CC=''
16076
16077         fi
16078 else
16079   enableval=yes
16080
16081         ECHO_LT=''
16082         ECHO_LD=''
16083         RULE_CC=''
16084         SHOW_CC=''
16085         ECHO_CC=''
16086
16087 fi;
16088 echo "$as_me:16088: result: $enableval" >&5
16089 echo "${ECHO_T}$enableval" >&6
16090
16091 if test "x$enable_echo" = xyes; then
16092         ECHO_LINK=
16093 else
16094         ECHO_LINK='@ echo linking $@ ... ;'
16095         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16096         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16097 fi
16098
16099 # --disable-stripping is used for debugging
16100
16101 echo "$as_me:16101: checking if you want to install stripped executables" >&5
16102 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16103
16104 # Check whether --enable-stripping or --disable-stripping was given.
16105 if test "${enable_stripping+set}" = set; then
16106   enableval="$enable_stripping"
16107   test "$enableval" != no && enableval=yes
16108         if test "$enableval" != "yes" ; then
16109     with_stripping=no
16110         else
16111                 with_stripping=yes
16112         fi
16113 else
16114   enableval=yes
16115         with_stripping=yes
16116
16117 fi;
16118 echo "$as_me:16118: result: $with_stripping" >&5
16119 echo "${ECHO_T}$with_stripping" >&6
16120
16121 if test "$with_stripping" = yes
16122 then
16123         INSTALL_OPT_S="-s"
16124 else
16125         INSTALL_OPT_S=
16126 fi
16127
16128 : ${INSTALL:=install}
16129 echo "$as_me:16129: checking if install accepts -p option" >&5
16130 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16131 if test "${cf_cv_install_p+set}" = set; then
16132   echo $ECHO_N "(cached) $ECHO_C" >&6
16133 else
16134
16135         rm -rf conftest*
16136         date >conftest.in
16137         mkdir conftest.out
16138         sleep 3
16139         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16140         then
16141                 if test -f conftest.out/conftest.in
16142                 then
16143                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16144                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16145                         if test -s conftest.err
16146                         then
16147                                 cf_cv_install_p=no
16148                         else
16149                                 cf_cv_install_p=yes
16150                         fi
16151                 else
16152                         cf_cv_install_p=no
16153                 fi
16154         else
16155                 cf_cv_install_p=no
16156         fi
16157         rm -rf conftest*
16158
16159 fi
16160 echo "$as_me:16160: result: $cf_cv_install_p" >&5
16161 echo "${ECHO_T}$cf_cv_install_p" >&6
16162
16163 echo "$as_me:16163: checking if install needs to be told about ownership" >&5
16164 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16165 case `$ac_config_guess` in
16166 (*minix)
16167         with_install_o=yes
16168         ;;
16169 (*)
16170         with_install_o=no
16171         ;;
16172 esac
16173
16174 echo "$as_me:16174: result: $with_install_o" >&5
16175 echo "${ECHO_T}$with_install_o" >&6
16176 if test "x$with_install_o" = xyes
16177 then
16178         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'`
16179 else
16180         INSTALL_OPT_O=
16181 fi
16182
16183 # If we're avoiding relinking of shared libraries during install, that is to
16184 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16185 # the install program has "-p" (for preserving timestamps).
16186 cf_cv_do_reranlib=yes
16187 if test "x$cf_cv_install_p" = xyes
16188 then
16189         if test "x$cf_cv_do_relink" != xyes
16190         then
16191                 cf_cv_do_reranlib=no
16192                 INSTALL_OPT_P="-p"
16193                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16194         fi
16195 fi
16196
16197 ###     use option --enable-warnings to turn on all gcc warnings
16198
16199 if ( test "$GCC" = yes || test "$GXX" = yes )
16200 then
16201
16202 if ( test "$GCC" = yes || test "$GXX" = yes )
16203 then
16204         case $CFLAGS in
16205         (*-Werror=*)
16206                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16207
16208 echo "${as_me:-configure}:16208: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16209
16210                 cf_temp_flags=
16211                 for cf_temp_scan in $CFLAGS
16212                 do
16213                         case "x$cf_temp_scan" in
16214                         (x-Werror=*)
16215
16216         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16217         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16218
16219                                 ;;
16220                         (*)
16221
16222         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16223         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16224
16225                                 ;;
16226                         esac
16227                 done
16228                 CFLAGS="$cf_temp_flags"
16229                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16230
16231 echo "${as_me:-configure}:16231: testing ... fixed $CFLAGS ..." 1>&5
16232
16233                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16234
16235 echo "${as_me:-configure}:16235: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16236
16237                 ;;
16238         esac
16239 fi
16240
16241 if ( test "$GCC" = yes || test "$GXX" = yes )
16242 then
16243         case $CPPFLAGS in
16244         (*-Werror=*)
16245                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16246
16247 echo "${as_me:-configure}:16247: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16248
16249                 cf_temp_flags=
16250                 for cf_temp_scan in $CPPFLAGS
16251                 do
16252                         case "x$cf_temp_scan" in
16253                         (x-Werror=*)
16254
16255         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16256         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16257
16258                                 ;;
16259                         (*)
16260
16261         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16262         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16263
16264                                 ;;
16265                         esac
16266                 done
16267                 CPPFLAGS="$cf_temp_flags"
16268                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16269
16270 echo "${as_me:-configure}:16270: testing ... fixed $CPPFLAGS ..." 1>&5
16271
16272                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16273
16274 echo "${as_me:-configure}:16274: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16275
16276                 ;;
16277         esac
16278 fi
16279
16280 if ( test "$GCC" = yes || test "$GXX" = yes )
16281 then
16282         case $LDFLAGS in
16283         (*-Werror=*)
16284                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16285
16286 echo "${as_me:-configure}:16286: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16287
16288                 cf_temp_flags=
16289                 for cf_temp_scan in $LDFLAGS
16290                 do
16291                         case "x$cf_temp_scan" in
16292                         (x-Werror=*)
16293
16294         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16295         EXTRA_CFLAGS="${EXTRA_CFLAGS}"$cf_temp_scan""
16296
16297                                 ;;
16298                         (*)
16299
16300         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16301         cf_temp_flags="${cf_temp_flags}"$cf_temp_scan""
16302
16303                                 ;;
16304                         esac
16305                 done
16306                 LDFLAGS="$cf_temp_flags"
16307                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16308
16309 echo "${as_me:-configure}:16309: testing ... fixed $LDFLAGS ..." 1>&5
16310
16311                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16312
16313 echo "${as_me:-configure}:16313: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16314
16315                 ;;
16316         esac
16317 fi
16318
16319 echo "$as_me:16319: checking if you want to turn on gcc warnings" >&5
16320 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16321
16322 # Check whether --enable-warnings or --disable-warnings was given.
16323 if test "${enable_warnings+set}" = set; then
16324   enableval="$enable_warnings"
16325   test "$enableval" != yes && enableval=no
16326         if test "$enableval" != "no" ; then
16327     with_warnings=yes
16328         else
16329                 with_warnings=no
16330         fi
16331 else
16332   enableval=no
16333         with_warnings=no
16334
16335 fi;
16336 echo "$as_me:16336: result: $with_warnings" >&5
16337 echo "${ECHO_T}$with_warnings" >&6
16338 if test "$with_warnings" = "yes"
16339 then
16340
16341 if test "x$have_x" = xyes; then
16342
16343 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16344 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16345 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16346 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16347 for cf_X_CFLAGS in $X_CFLAGS
16348 do
16349         case "x$cf_X_CFLAGS" in
16350         x-[IUD]*)
16351                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16352                 ;;
16353         *)
16354                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16355                 ;;
16356         esac
16357 done
16358
16359 cat >conftest.$ac_ext <<_ACEOF
16360 #line 16360 "configure"
16361 #include "confdefs.h"
16362
16363 #include <stdlib.h>
16364 #include <X11/Intrinsic.h>
16365
16366 int
16367 main (void)
16368 {
16369 String foo = malloc(1); (void)foo
16370   ;
16371   return 0;
16372 }
16373 _ACEOF
16374 rm -f conftest.$ac_objext
16375 if { (eval echo "$as_me:16375: \"$ac_compile\"") >&5
16376   (eval $ac_compile) 2>&5
16377   ac_status=$?
16378   echo "$as_me:16378: \$? = $ac_status" >&5
16379   (exit $ac_status); } &&
16380          { ac_try='test -s conftest.$ac_objext'
16381   { (eval echo "$as_me:16381: \"$ac_try\"") >&5
16382   (eval $ac_try) 2>&5
16383   ac_status=$?
16384   echo "$as_me:16384: \$? = $ac_status" >&5
16385   (exit $ac_status); }; }; then
16386
16387 echo "$as_me:16387: checking for X11/Xt const-feature" >&5
16388 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16389 if test "${cf_cv_const_x_string+set}" = set; then
16390   echo $ECHO_N "(cached) $ECHO_C" >&6
16391 else
16392
16393         cat >conftest.$ac_ext <<_ACEOF
16394 #line 16394 "configure"
16395 #include "confdefs.h"
16396
16397 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16398 #undef  XTSTRINGDEFINES /* X11R5 and later */
16399 #include <stdlib.h>
16400 #include <X11/Intrinsic.h>
16401
16402 int
16403 main (void)
16404 {
16405 String foo = malloc(1); *foo = 0
16406   ;
16407   return 0;
16408 }
16409 _ACEOF
16410 rm -f conftest.$ac_objext
16411 if { (eval echo "$as_me:16411: \"$ac_compile\"") >&5
16412   (eval $ac_compile) 2>&5
16413   ac_status=$?
16414   echo "$as_me:16414: \$? = $ac_status" >&5
16415   (exit $ac_status); } &&
16416          { ac_try='test -s conftest.$ac_objext'
16417   { (eval echo "$as_me:16417: \"$ac_try\"") >&5
16418   (eval $ac_try) 2>&5
16419   ac_status=$?
16420   echo "$as_me:16420: \$? = $ac_status" >&5
16421   (exit $ac_status); }; }; then
16422
16423                         cf_cv_const_x_string=no
16424
16425 else
16426   echo "$as_me: failed program was:" >&5
16427 cat conftest.$ac_ext >&5
16428
16429                         cf_cv_const_x_string=yes
16430
16431 fi
16432 rm -f conftest.$ac_objext conftest.$ac_ext
16433
16434 fi
16435 echo "$as_me:16435: result: $cf_cv_const_x_string" >&5
16436 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16437
16438 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16439 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16440 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16441
16442 case $cf_cv_const_x_string in
16443 (no)
16444
16445         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16446         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16447
16448         ;;
16449 (*)
16450
16451         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16452         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16453
16454         ;;
16455 esac
16456
16457 else
16458   echo "$as_me: failed program was:" >&5
16459 cat conftest.$ac_ext >&5
16460 fi
16461 rm -f conftest.$ac_objext conftest.$ac_ext
16462  fi
16463 cat > conftest.$ac_ext <<EOF
16464 #line 16464 "${as_me:-configure}"
16465 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16466 EOF
16467 if test "$INTEL_COMPILER" = yes
16468 then
16469 # The "-wdXXX" options suppress warnings:
16470 # remark #1419: external declaration in primary source file
16471 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16472 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16473 # remark #193: zero used for undefined preprocessing identifier
16474 # remark #593: variable "curs_sb_left_arrow" was set but never used
16475 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16476 # remark #869: parameter "tw" was never referenced
16477 # remark #981: operands are evaluated in unspecified order
16478 # warning #279: controlling expression is constant
16479
16480         { echo "$as_me:16480: checking for $CC warning options..." >&5
16481 echo "$as_me: checking for $CC warning options..." >&6;}
16482         cf_save_CFLAGS="$CFLAGS"
16483         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16484         for cf_opt in \
16485                 wd1419 \
16486                 wd1683 \
16487                 wd1684 \
16488                 wd193 \
16489                 wd593 \
16490                 wd279 \
16491                 wd810 \
16492                 wd869 \
16493                 wd981
16494         do
16495                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16496                 if { (eval echo "$as_me:16496: \"$ac_compile\"") >&5
16497   (eval $ac_compile) 2>&5
16498   ac_status=$?
16499   echo "$as_me:16499: \$? = $ac_status" >&5
16500   (exit $ac_status); }; then
16501                         test -n "$verbose" && echo "$as_me:16501: result: ... -$cf_opt" >&5
16502 echo "${ECHO_T}... -$cf_opt" >&6
16503                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16504                 fi
16505         done
16506         CFLAGS="$cf_save_CFLAGS"
16507 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16508 then
16509         { echo "$as_me:16509: checking for $CC warning options..." >&5
16510 echo "$as_me: checking for $CC warning options..." >&6;}
16511         cf_save_CFLAGS="$CFLAGS"
16512         cf_warn_CONST=""
16513         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16514         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16515         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16516         for cf_opt in W Wall \
16517                 Wbad-function-cast \
16518                 Wcast-align \
16519                 Wcast-qual \
16520                 Wdeclaration-after-statement \
16521                 Wextra \
16522                 Winline \
16523                 Wmissing-declarations \
16524                 Wmissing-prototypes \
16525                 Wnested-externs \
16526                 Wpointer-arith \
16527                 Wshadow \
16528                 Wstrict-prototypes \
16529                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16530         do
16531                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16532                 if { (eval echo "$as_me:16532: \"$ac_compile\"") >&5
16533   (eval $ac_compile) 2>&5
16534   ac_status=$?
16535   echo "$as_me:16535: \$? = $ac_status" >&5
16536   (exit $ac_status); }; then
16537                         test -n "$verbose" && echo "$as_me:16537: result: ... -$cf_opt" >&5
16538 echo "${ECHO_T}... -$cf_opt" >&6
16539                         case $cf_opt in
16540                         (Winline)
16541                                 case $GCC_VERSION in
16542                                 ([34].*)
16543                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16544
16545 echo "${as_me:-configure}:16545: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16546
16547                                         continue;;
16548                                 esac
16549                                 ;;
16550                         (Wpointer-arith)
16551                                 case $GCC_VERSION in
16552                                 ([12].*)
16553                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16554
16555 echo "${as_me:-configure}:16555: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16556
16557                                         continue;;
16558                                 esac
16559                                 ;;
16560                         esac
16561                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16562                 fi
16563         done
16564         CFLAGS="$cf_save_CFLAGS"
16565 fi
16566 rm -rf conftest*
16567
16568 fi
16569
16570 if ( test "$GCC" = yes || test "$GXX" = yes )
16571 then
16572 cat > conftest.i <<EOF
16573 #ifndef GCC_PRINTF
16574 #define GCC_PRINTF 0
16575 #endif
16576 #ifndef GCC_SCANF
16577 #define GCC_SCANF 0
16578 #endif
16579 #ifndef GCC_NORETURN
16580 #define GCC_NORETURN /* nothing */
16581 #endif
16582 #ifndef GCC_UNUSED
16583 #define GCC_UNUSED /* nothing */
16584 #endif
16585 EOF
16586 if test "$GCC" = yes
16587 then
16588         { echo "$as_me:16588: checking for $CC __attribute__ directives..." >&5
16589 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16590 cat > conftest.$ac_ext <<EOF
16591 #line 16591 "${as_me:-configure}"
16592 #include "confdefs.h"
16593 #include "conftest.h"
16594 #include "conftest.i"
16595 #if     GCC_PRINTF
16596 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16597 #else
16598 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16599 #endif
16600 #if     GCC_SCANF
16601 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16602 #else
16603 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16604 #endif
16605 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16606 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16607 extern void foo(void) GCC_NORETURN;
16608 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16609 EOF
16610         cf_printf_attribute=no
16611         cf_scanf_attribute=no
16612         for cf_attribute in scanf printf unused noreturn
16613         do
16614
16615 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16616
16617                 cf_directive="__attribute__(($cf_attribute))"
16618                 echo "checking for $CC $cf_directive" 1>&5
16619
16620                 case $cf_attribute in
16621                 (printf)
16622                         cf_printf_attribute=yes
16623                         cat >conftest.h <<EOF
16624 #define GCC_$cf_ATTRIBUTE 1
16625 EOF
16626                         ;;
16627                 (scanf)
16628                         cf_scanf_attribute=yes
16629                         cat >conftest.h <<EOF
16630 #define GCC_$cf_ATTRIBUTE 1
16631 EOF
16632                         ;;
16633                 (*)
16634                         cat >conftest.h <<EOF
16635 #define GCC_$cf_ATTRIBUTE $cf_directive
16636 EOF
16637                         ;;
16638                 esac
16639
16640                 if { (eval echo "$as_me:16640: \"$ac_compile\"") >&5
16641   (eval $ac_compile) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); }; then
16645                         test -n "$verbose" && echo "$as_me:16645: result: ... $cf_attribute" >&5
16646 echo "${ECHO_T}... $cf_attribute" >&6
16647                         cat conftest.h >>confdefs.h
16648                         case $cf_attribute in
16649                         (noreturn)
16650
16651 cat >>confdefs.h <<EOF
16652 #define GCC_NORETURN $cf_directive
16653 EOF
16654
16655                                 ;;
16656                         (printf)
16657                                 cf_value='/* nothing */'
16658                                 if test "$cf_printf_attribute" != no ; then
16659                                         cf_value='__attribute__((format(printf,fmt,var)))'
16660
16661 cat >>confdefs.h <<\EOF
16662 #define GCC_PRINTF 1
16663 EOF
16664
16665                                 fi
16666
16667 cat >>confdefs.h <<EOF
16668 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16669 EOF
16670
16671                                 ;;
16672                         (scanf)
16673                                 cf_value='/* nothing */'
16674                                 if test "$cf_scanf_attribute" != no ; then
16675                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16676
16677 cat >>confdefs.h <<\EOF
16678 #define GCC_SCANF 1
16679 EOF
16680
16681                                 fi
16682
16683 cat >>confdefs.h <<EOF
16684 #define GCC_SCANFLIKE(fmt,var) $cf_value
16685 EOF
16686
16687                                 ;;
16688                         (unused)
16689
16690 cat >>confdefs.h <<EOF
16691 #define GCC_UNUSED $cf_directive
16692 EOF
16693
16694                                 ;;
16695                         esac
16696                 fi
16697         done
16698 else
16699         fgrep define conftest.i >>confdefs.h
16700 fi
16701 rm -rf conftest*
16702 fi
16703
16704 fi
16705
16706 if test "x$with_warnings" = "xyes"; then
16707
16708         ADAFLAGS="$ADAFLAGS -gnatg"
16709
16710         if test "x$cf_with_cxx" = xyes ; then
16711
16712 INTEL_CPLUSPLUS=no
16713
16714 if test "$GCC" = yes ; then
16715         case $host_os in
16716         (linux*|gnu*)
16717                 echo "$as_me:16717: checking if this is really Intel C++ compiler" >&5
16718 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16719                 cf_save_CFLAGS="$CXXFLAGS"
16720                 CXXFLAGS="$CXXFLAGS -no-gcc"
16721                 cat >conftest.$ac_ext <<_ACEOF
16722 #line 16722 "configure"
16723 #include "confdefs.h"
16724
16725 int
16726 main (void)
16727 {
16728
16729 #ifdef __INTEL_COMPILER
16730 #else
16731 make an error
16732 #endif
16733
16734   ;
16735   return 0;
16736 }
16737 _ACEOF
16738 rm -f conftest.$ac_objext
16739 if { (eval echo "$as_me:16739: \"$ac_compile\"") >&5
16740   (eval $ac_compile) 2>&5
16741   ac_status=$?
16742   echo "$as_me:16742: \$? = $ac_status" >&5
16743   (exit $ac_status); } &&
16744          { ac_try='test -s conftest.$ac_objext'
16745   { (eval echo "$as_me:16745: \"$ac_try\"") >&5
16746   (eval $ac_try) 2>&5
16747   ac_status=$?
16748   echo "$as_me:16748: \$? = $ac_status" >&5
16749   (exit $ac_status); }; }; then
16750   INTEL_CPLUSPLUS=yes
16751 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16752
16753 else
16754   echo "$as_me: failed program was:" >&5
16755 cat conftest.$ac_ext >&5
16756 fi
16757 rm -f conftest.$ac_objext conftest.$ac_ext
16758                 CXXFLAGS="$cf_save_CFLAGS"
16759                 echo "$as_me:16759: result: $INTEL_CPLUSPLUS" >&5
16760 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16761                 ;;
16762         esac
16763 fi
16764
16765 CLANG_CPLUSPLUS=no
16766
16767 if test "$GCC" = yes ; then
16768         echo "$as_me:16768: checking if this is really Clang C++ compiler" >&5
16769 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16770         cf_save_CFLAGS="$CXXFLAGS"
16771         cat >conftest.$ac_ext <<_ACEOF
16772 #line 16772 "configure"
16773 #include "confdefs.h"
16774
16775 int
16776 main (void)
16777 {
16778
16779 #ifdef __clang__
16780 #else
16781 make an error
16782 #endif
16783
16784   ;
16785   return 0;
16786 }
16787 _ACEOF
16788 rm -f conftest.$ac_objext
16789 if { (eval echo "$as_me:16789: \"$ac_compile\"") >&5
16790   (eval $ac_compile) 2>&5
16791   ac_status=$?
16792   echo "$as_me:16792: \$? = $ac_status" >&5
16793   (exit $ac_status); } &&
16794          { ac_try='test -s conftest.$ac_objext'
16795   { (eval echo "$as_me:16795: \"$ac_try\"") >&5
16796   (eval $ac_try) 2>&5
16797   ac_status=$?
16798   echo "$as_me:16798: \$? = $ac_status" >&5
16799   (exit $ac_status); }; }; then
16800   CLANG_CPLUSPLUS=yes
16801
16802 else
16803   echo "$as_me: failed program was:" >&5
16804 cat conftest.$ac_ext >&5
16805 fi
16806 rm -f conftest.$ac_objext conftest.$ac_ext
16807         CXXFLAGS="$cf_save_CFLAGS"
16808         echo "$as_me:16808: result: $CLANG_CPLUSPLUS" >&5
16809 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16810 fi
16811
16812 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
16813         for cf_clang_opt in \
16814                 -Qunused-arguments \
16815                 -Wno-error=implicit-function-declaration
16816         do
16817                 echo "$as_me:16817: checking if option $cf_clang_opt works" >&5
16818 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
16819                 cf_save_CFLAGS="$CFLAGS"
16820                 CFLAGS="$CFLAGS $cf_clang_opt"
16821                 cat >conftest.$ac_ext <<_ACEOF
16822 #line 16822 "configure"
16823 #include "confdefs.h"
16824
16825                         #include <stdio.h>
16826 int
16827 main (void)
16828 {
16829
16830                         printf("hello!\n");
16831   ;
16832   return 0;
16833 }
16834 _ACEOF
16835 rm -f conftest.$ac_objext conftest$ac_exeext
16836 if { (eval echo "$as_me:16836: \"$ac_link\"") >&5
16837   (eval $ac_link) 2>&5
16838   ac_status=$?
16839   echo "$as_me:16839: \$? = $ac_status" >&5
16840   (exit $ac_status); } &&
16841          { ac_try='test -s conftest$ac_exeext'
16842   { (eval echo "$as_me:16842: \"$ac_try\"") >&5
16843   (eval $ac_try) 2>&5
16844   ac_status=$?
16845   echo "$as_me:16845: \$? = $ac_status" >&5
16846   (exit $ac_status); }; }; then
16847
16848                         cf_clang_optok=yes
16849 else
16850   echo "$as_me: failed program was:" >&5
16851 cat conftest.$ac_ext >&5
16852
16853                         cf_clang_optok=no
16854 fi
16855 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16856                 echo "$as_me:16856: result: $cf_clang_optok" >&5
16857 echo "${ECHO_T}$cf_clang_optok" >&6
16858                 CFLAGS="$cf_save_CFLAGS"
16859                 if test $cf_clang_optok = yes; then
16860                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
16861
16862 echo "${as_me:-configure}:16862: testing adding option $cf_clang_opt ..." 1>&5
16863
16864         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16865         CFLAGS="${CFLAGS}$cf_clang_opt"
16866
16867                 fi
16868         done
16869 fi
16870
16871 ac_ext=cc
16872 ac_cpp='$CXXCPP $CPPFLAGS'
16873 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16874 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16875 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16876 ac_main_return=return
16877
16878 cat > conftest.$ac_ext <<EOF
16879 #line 16879 "configure"
16880 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16881 EOF
16882
16883 if test "$INTEL_CPLUSPLUS" = yes
16884 then
16885 # The "-wdXXX" options suppress warnings:
16886 # remark #1419: external declaration in primary source file
16887 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16888 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16889 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16890 # remark #193: zero used for undefined preprocessing identifier
16891 # remark #593: variable "curs_sb_left_arrow" was set but never used
16892 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16893 # remark #869: parameter "tw" was never referenced
16894 # remark #981: operands are evaluated in unspecified order
16895 # warning #269: invalid format string conversion
16896
16897         { echo "$as_me:16897: checking for $CC warning options..." >&5
16898 echo "$as_me: checking for $CC warning options..." >&6;}
16899         cf_save_CXXFLAGS="$CXXFLAGS"
16900         EXTRA_CXXFLAGS="-Wall"
16901         for cf_opt in \
16902                 wd1419 \
16903                 wd1682 \
16904                 wd1683 \
16905                 wd1684 \
16906                 wd193 \
16907                 wd279 \
16908                 wd593 \
16909                 wd810 \
16910                 wd869 \
16911                 wd981
16912         do
16913                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16914                 if { (eval echo "$as_me:16914: \"$ac_compile\"") >&5
16915   (eval $ac_compile) 2>&5
16916   ac_status=$?
16917   echo "$as_me:16917: \$? = $ac_status" >&5
16918   (exit $ac_status); }; then
16919                         test -n "$verbose" && echo "$as_me:16919: result: ... -$cf_opt" >&5
16920 echo "${ECHO_T}... -$cf_opt" >&6
16921                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16922                 fi
16923         done
16924         CXXFLAGS="$cf_save_CXXFLAGS"
16925
16926 elif test "$GXX" = yes
16927 then
16928         { echo "$as_me:16928: checking for $CXX warning options..." >&5
16929 echo "$as_me: checking for $CXX warning options..." >&6;}
16930         cf_save_CXXFLAGS="$CXXFLAGS"
16931         EXTRA_CXXFLAGS="-W -Wall"
16932         cf_gxx_extra_warnings=""
16933         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16934         case "$GCC_VERSION" in
16935         ([1-2].*)
16936                 ;;
16937         (*)
16938                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16939                 ;;
16940         esac
16941         for cf_opt in \
16942                 Wabi \
16943                 fabi-version=0 \
16944                 Wextra \
16945                 Wignored-qualifiers \
16946                 Wlogical-op \
16947                 Woverloaded-virtual \
16948                 Wsign-promo \
16949                 Wsynth \
16950                 Wold-style-cast \
16951                 Wcast-align \
16952                 Wcast-qual \
16953                 Wpointer-arith \
16954                 Wshadow \
16955                 Wundef $cf_gxx_extra_warnings Wno-unused
16956         do
16957                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16958                 if { (eval echo "$as_me:16958: \"$ac_compile\"") >&5
16959   (eval $ac_compile) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit $ac_status); }; then
16963                         test -n "$verbose" && echo "$as_me:16963: result: ... -$cf_opt" >&5
16964 echo "${ECHO_T}... -$cf_opt" >&6
16965                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16966                 else
16967                         test -n "$verbose" && echo "$as_me:16967: result: ... no -$cf_opt" >&5
16968 echo "${ECHO_T}... no -$cf_opt" >&6
16969                 fi
16970         done
16971         CXXFLAGS="$cf_save_CXXFLAGS"
16972 fi
16973
16974 rm -rf conftest*
16975 ac_ext=c
16976 ac_cpp='$CPP $CPPFLAGS'
16977 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16978 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16979 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16980 ac_main_return=return
16981
16982         fi
16983 fi
16984
16985 echo "$as_me:16985: checking if you want to work around bogus compiler/loader warnings" >&5
16986 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16987
16988 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16989 if test "${enable_string_hacks+set}" = set; then
16990   enableval="$enable_string_hacks"
16991   with_string_hacks=$enableval
16992 else
16993   with_string_hacks=no
16994 fi;
16995 echo "$as_me:16995: result: $with_string_hacks" >&5
16996 echo "${ECHO_T}$with_string_hacks" >&6
16997
16998 if test "x$with_string_hacks" = "xyes"; then
16999
17000 cat >>confdefs.h <<\EOF
17001 #define USE_STRING_HACKS 1
17002 EOF
17003
17004         { echo "$as_me:17004: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17005 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17006         echo "$as_me:17006: checking for strlcat" >&5
17007 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17008 if test "${ac_cv_func_strlcat+set}" = set; then
17009   echo $ECHO_N "(cached) $ECHO_C" >&6
17010 else
17011   cat >conftest.$ac_ext <<_ACEOF
17012 #line 17012 "configure"
17013 #include "confdefs.h"
17014 #define strlcat autoconf_temporary
17015 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17016 #undef strlcat
17017
17018 #ifdef __cplusplus
17019 extern "C"
17020 #endif
17021
17022 /* We use char because int might match the return type of a gcc2
17023    builtin and then its argument prototype would still apply.  */
17024 char strlcat (void);
17025
17026 int
17027 main (void)
17028 {
17029
17030 /* The GNU C library defines stubs for functions which it implements
17031     to always fail with ENOSYS.  Some functions are actually named
17032     something starting with __ and the normal name is an alias.  */
17033 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17034 #error found stub for strlcat
17035 #endif
17036
17037         return strlcat ();
17038   ;
17039   return 0;
17040 }
17041 _ACEOF
17042 rm -f conftest.$ac_objext conftest$ac_exeext
17043 if { (eval echo "$as_me:17043: \"$ac_link\"") >&5
17044   (eval $ac_link) 2>&5
17045   ac_status=$?
17046   echo "$as_me:17046: \$? = $ac_status" >&5
17047   (exit $ac_status); } &&
17048          { ac_try='test -s conftest$ac_exeext'
17049   { (eval echo "$as_me:17049: \"$ac_try\"") >&5
17050   (eval $ac_try) 2>&5
17051   ac_status=$?
17052   echo "$as_me:17052: \$? = $ac_status" >&5
17053   (exit $ac_status); }; }; then
17054   ac_cv_func_strlcat=yes
17055 else
17056   echo "$as_me: failed program was:" >&5
17057 cat conftest.$ac_ext >&5
17058 ac_cv_func_strlcat=no
17059 fi
17060 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17061 fi
17062 echo "$as_me:17062: result: $ac_cv_func_strlcat" >&5
17063 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17064 if test $ac_cv_func_strlcat = yes; then
17065
17066 cat >>confdefs.h <<\EOF
17067 #define HAVE_STRLCAT 1
17068 EOF
17069
17070 else
17071
17072                 echo "$as_me:17072: checking for strlcat in -lbsd" >&5
17073 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17074 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17075   echo $ECHO_N "(cached) $ECHO_C" >&6
17076 else
17077   ac_check_lib_save_LIBS=$LIBS
17078 LIBS="-lbsd  $LIBS"
17079 cat >conftest.$ac_ext <<_ACEOF
17080 #line 17080 "configure"
17081 #include "confdefs.h"
17082
17083 /* Override any gcc2 internal prototype to avoid an error.  */
17084 #ifdef __cplusplus
17085 extern "C"
17086 #endif
17087 /* We use char because int might match the return type of a gcc2
17088    builtin and then its argument prototype would still apply.  */
17089 char strlcat ();
17090 int
17091 main (void)
17092 {
17093 strlcat ();
17094   ;
17095   return 0;
17096 }
17097 _ACEOF
17098 rm -f conftest.$ac_objext conftest$ac_exeext
17099 if { (eval echo "$as_me:17099: \"$ac_link\"") >&5
17100   (eval $ac_link) 2>&5
17101   ac_status=$?
17102   echo "$as_me:17102: \$? = $ac_status" >&5
17103   (exit $ac_status); } &&
17104          { ac_try='test -s conftest$ac_exeext'
17105   { (eval echo "$as_me:17105: \"$ac_try\"") >&5
17106   (eval $ac_try) 2>&5
17107   ac_status=$?
17108   echo "$as_me:17108: \$? = $ac_status" >&5
17109   (exit $ac_status); }; }; then
17110   ac_cv_lib_bsd_strlcat=yes
17111 else
17112   echo "$as_me: failed program was:" >&5
17113 cat conftest.$ac_ext >&5
17114 ac_cv_lib_bsd_strlcat=no
17115 fi
17116 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17117 LIBS=$ac_check_lib_save_LIBS
17118 fi
17119 echo "$as_me:17119: result: $ac_cv_lib_bsd_strlcat" >&5
17120 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17121 if test $ac_cv_lib_bsd_strlcat = yes; then
17122
17123 cf_add_libs="$LIBS"
17124 # reverse order
17125 cf_add_0lib=
17126 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17127 # filter duplicates
17128 for cf_add_1lib in $cf_add_0lib; do
17129         for cf_add_2lib in $cf_add_libs; do
17130                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17131                         cf_add_1lib=
17132                         break
17133                 fi
17134         done
17135         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17136 done
17137 LIBS="$cf_add_libs"
17138
17139 for ac_header in bsd/string.h
17140 do
17141 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17142 echo "$as_me:17142: checking for $ac_header" >&5
17143 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17144 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17145   echo $ECHO_N "(cached) $ECHO_C" >&6
17146 else
17147   cat >conftest.$ac_ext <<_ACEOF
17148 #line 17148 "configure"
17149 #include "confdefs.h"
17150 #include <$ac_header>
17151 _ACEOF
17152 if { (eval echo "$as_me:17152: \"$ac_cpp conftest.$ac_ext\"") >&5
17153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17154   ac_status=$?
17155   egrep -v '^ *\+' conftest.er1 >conftest.err
17156   rm -f conftest.er1
17157   cat conftest.err >&5
17158   echo "$as_me:17158: \$? = $ac_status" >&5
17159   (exit $ac_status); } >/dev/null; then
17160   if test -s conftest.err; then
17161     ac_cpp_err=$ac_c_preproc_warn_flag
17162   else
17163     ac_cpp_err=
17164   fi
17165 else
17166   ac_cpp_err=yes
17167 fi
17168 if test -z "$ac_cpp_err"; then
17169   eval "$as_ac_Header=yes"
17170 else
17171   echo "$as_me: failed program was:" >&5
17172   cat conftest.$ac_ext >&5
17173   eval "$as_ac_Header=no"
17174 fi
17175 rm -f conftest.err conftest.$ac_ext
17176 fi
17177 echo "$as_me:17177: result: `eval echo '${'$as_ac_Header'}'`" >&5
17178 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17179 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17180   cat >>confdefs.h <<EOF
17181 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17182 EOF
17183
17184 fi
17185 done
17186
17187 cat >>confdefs.h <<\EOF
17188 #define HAVE_STRLCAT 1
17189 EOF
17190
17191 fi
17192
17193 fi
17194
17195 for ac_func in strlcpy snprintf
17196 do
17197 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17198 echo "$as_me:17198: checking for $ac_func" >&5
17199 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17200 if eval "test \"\${$as_ac_var+set}\" = set"; then
17201   echo $ECHO_N "(cached) $ECHO_C" >&6
17202 else
17203   cat >conftest.$ac_ext <<_ACEOF
17204 #line 17204 "configure"
17205 #include "confdefs.h"
17206 #define $ac_func autoconf_temporary
17207 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17208 #undef $ac_func
17209
17210 #ifdef __cplusplus
17211 extern "C"
17212 #endif
17213
17214 /* We use char because int might match the return type of a gcc2
17215    builtin and then its argument prototype would still apply.  */
17216 char $ac_func (void);
17217
17218 int
17219 main (void)
17220 {
17221
17222 /* The GNU C library defines stubs for functions which it implements
17223     to always fail with ENOSYS.  Some functions are actually named
17224     something starting with __ and the normal name is an alias.  */
17225 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17226 #error found stub for $ac_func
17227 #endif
17228
17229         return $ac_func ();
17230   ;
17231   return 0;
17232 }
17233 _ACEOF
17234 rm -f conftest.$ac_objext conftest$ac_exeext
17235 if { (eval echo "$as_me:17235: \"$ac_link\"") >&5
17236   (eval $ac_link) 2>&5
17237   ac_status=$?
17238   echo "$as_me:17238: \$? = $ac_status" >&5
17239   (exit $ac_status); } &&
17240          { ac_try='test -s conftest$ac_exeext'
17241   { (eval echo "$as_me:17241: \"$ac_try\"") >&5
17242   (eval $ac_try) 2>&5
17243   ac_status=$?
17244   echo "$as_me:17244: \$? = $ac_status" >&5
17245   (exit $ac_status); }; }; then
17246   eval "$as_ac_var=yes"
17247 else
17248   echo "$as_me: failed program was:" >&5
17249 cat conftest.$ac_ext >&5
17250 eval "$as_ac_var=no"
17251 fi
17252 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17253 fi
17254 echo "$as_me:17254: result: `eval echo '${'$as_ac_var'}'`" >&5
17255 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17256 if test `eval echo '${'$as_ac_var'}'` = yes; then
17257   cat >>confdefs.h <<EOF
17258 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17259 EOF
17260
17261 fi
17262 done
17263
17264 fi
17265
17266 ###     use option --enable-assertions to turn on generation of assertion code
17267 echo "$as_me:17267: checking if you want to enable runtime assertions" >&5
17268 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17269
17270 # Check whether --enable-assertions or --disable-assertions was given.
17271 if test "${enable_assertions+set}" = set; then
17272   enableval="$enable_assertions"
17273   with_assertions=$enableval
17274 else
17275   with_assertions=no
17276 fi;
17277 echo "$as_me:17277: result: $with_assertions" >&5
17278 echo "${ECHO_T}$with_assertions" >&6
17279 if test -n "$GCC"
17280 then
17281         if test "$with_assertions" = no
17282         then
17283                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17284         else
17285
17286         ADAFLAGS="$ADAFLAGS -gnata"
17287
17288         fi
17289 fi
17290
17291 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17292
17293 echo "$as_me:17293: checking if you want to use dmalloc for testing" >&5
17294 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17295
17296 # Check whether --with-dmalloc or --without-dmalloc was given.
17297 if test "${with_dmalloc+set}" = set; then
17298   withval="$with_dmalloc"
17299
17300 cat >>confdefs.h <<EOF
17301 #define USE_DMALLOC 1
17302 EOF
17303
17304         : ${with_cflags:=-g}
17305         : ${with_no_leaks:=yes}
17306          with_dmalloc=yes
17307 else
17308   with_dmalloc=
17309 fi;
17310 echo "$as_me:17310: result: ${with_dmalloc:-no}" >&5
17311 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17312
17313 case .$with_cflags in
17314 (.*-g*)
17315         case .$CFLAGS in
17316         (.*-g*)
17317                 ;;
17318         (*)
17319
17320 cf_fix_cppflags=no
17321 cf_new_cflags=
17322 cf_new_cppflags=
17323 cf_new_extra_cppflags=
17324
17325 for cf_add_cflags in -g
17326 do
17327 case $cf_fix_cppflags in
17328 (no)
17329         case $cf_add_cflags in
17330         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17331                 case $cf_add_cflags in
17332                 (-D*)
17333                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17334
17335                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17336                                 && test -z "${cf_tst_cflags}" \
17337                                 && cf_fix_cppflags=yes
17338
17339                         if test $cf_fix_cppflags = yes ; then
17340
17341         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17342         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17343
17344                                 continue
17345                         elif test "${cf_tst_cflags}" = "\"'" ; then
17346
17347         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17348         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17349
17350                                 continue
17351                         fi
17352                         ;;
17353                 esac
17354                 case "$CPPFLAGS" in
17355                 (*$cf_add_cflags)
17356                         ;;
17357                 (*)
17358                         case $cf_add_cflags in
17359                         (-D*)
17360                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17361
17362 CPPFLAGS=`echo "$CPPFLAGS" | \
17363         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17364                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17365
17366                                 ;;
17367                         esac
17368
17369         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17370         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17371
17372                         ;;
17373                 esac
17374                 ;;
17375         (*)
17376
17377         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17378         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17379
17380                 ;;
17381         esac
17382         ;;
17383 (yes)
17384
17385         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17386         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17387
17388         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17389
17390         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17391                 && test -z "${cf_tst_cflags}" \
17392                 && cf_fix_cppflags=no
17393         ;;
17394 esac
17395 done
17396
17397 if test -n "$cf_new_cflags" ; then
17398
17399         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17400         CFLAGS="${CFLAGS}$cf_new_cflags"
17401
17402 fi
17403
17404 if test -n "$cf_new_cppflags" ; then
17405
17406         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17407         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17408
17409 fi
17410
17411 if test -n "$cf_new_extra_cppflags" ; then
17412
17413         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17414         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17415
17416 fi
17417
17418                 ;;
17419         esac
17420         ;;
17421 esac
17422
17423 if test "$with_dmalloc" = yes ; then
17424         echo "$as_me:17424: checking for dmalloc.h" >&5
17425 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17426 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17427   echo $ECHO_N "(cached) $ECHO_C" >&6
17428 else
17429   cat >conftest.$ac_ext <<_ACEOF
17430 #line 17430 "configure"
17431 #include "confdefs.h"
17432 #include <dmalloc.h>
17433 _ACEOF
17434 if { (eval echo "$as_me:17434: \"$ac_cpp conftest.$ac_ext\"") >&5
17435   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17436   ac_status=$?
17437   egrep -v '^ *\+' conftest.er1 >conftest.err
17438   rm -f conftest.er1
17439   cat conftest.err >&5
17440   echo "$as_me:17440: \$? = $ac_status" >&5
17441   (exit $ac_status); } >/dev/null; then
17442   if test -s conftest.err; then
17443     ac_cpp_err=$ac_c_preproc_warn_flag
17444   else
17445     ac_cpp_err=
17446   fi
17447 else
17448   ac_cpp_err=yes
17449 fi
17450 if test -z "$ac_cpp_err"; then
17451   ac_cv_header_dmalloc_h=yes
17452 else
17453   echo "$as_me: failed program was:" >&5
17454   cat conftest.$ac_ext >&5
17455   ac_cv_header_dmalloc_h=no
17456 fi
17457 rm -f conftest.err conftest.$ac_ext
17458 fi
17459 echo "$as_me:17459: result: $ac_cv_header_dmalloc_h" >&5
17460 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17461 if test $ac_cv_header_dmalloc_h = yes; then
17462
17463 echo "$as_me:17463: checking for dmalloc_debug in -ldmalloc" >&5
17464 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17465 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17466   echo $ECHO_N "(cached) $ECHO_C" >&6
17467 else
17468   ac_check_lib_save_LIBS=$LIBS
17469 LIBS="-ldmalloc  $LIBS"
17470 cat >conftest.$ac_ext <<_ACEOF
17471 #line 17471 "configure"
17472 #include "confdefs.h"
17473
17474 /* Override any gcc2 internal prototype to avoid an error.  */
17475 #ifdef __cplusplus
17476 extern "C"
17477 #endif
17478 /* We use char because int might match the return type of a gcc2
17479    builtin and then its argument prototype would still apply.  */
17480 char dmalloc_debug ();
17481 int
17482 main (void)
17483 {
17484 dmalloc_debug ();
17485   ;
17486   return 0;
17487 }
17488 _ACEOF
17489 rm -f conftest.$ac_objext conftest$ac_exeext
17490 if { (eval echo "$as_me:17490: \"$ac_link\"") >&5
17491   (eval $ac_link) 2>&5
17492   ac_status=$?
17493   echo "$as_me:17493: \$? = $ac_status" >&5
17494   (exit $ac_status); } &&
17495          { ac_try='test -s conftest$ac_exeext'
17496   { (eval echo "$as_me:17496: \"$ac_try\"") >&5
17497   (eval $ac_try) 2>&5
17498   ac_status=$?
17499   echo "$as_me:17499: \$? = $ac_status" >&5
17500   (exit $ac_status); }; }; then
17501   ac_cv_lib_dmalloc_dmalloc_debug=yes
17502 else
17503   echo "$as_me: failed program was:" >&5
17504 cat conftest.$ac_ext >&5
17505 ac_cv_lib_dmalloc_dmalloc_debug=no
17506 fi
17507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17508 LIBS=$ac_check_lib_save_LIBS
17509 fi
17510 echo "$as_me:17510: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17511 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17512 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17513   cat >>confdefs.h <<EOF
17514 #define HAVE_LIBDMALLOC 1
17515 EOF
17516
17517   LIBS="-ldmalloc $LIBS"
17518
17519 fi
17520
17521 fi
17522
17523 fi
17524
17525 echo "$as_me:17525: checking if you want to use dbmalloc for testing" >&5
17526 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17527
17528 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17529 if test "${with_dbmalloc+set}" = set; then
17530   withval="$with_dbmalloc"
17531
17532 cat >>confdefs.h <<EOF
17533 #define USE_DBMALLOC 1
17534 EOF
17535
17536         : ${with_cflags:=-g}
17537         : ${with_no_leaks:=yes}
17538          with_dbmalloc=yes
17539 else
17540   with_dbmalloc=
17541 fi;
17542 echo "$as_me:17542: result: ${with_dbmalloc:-no}" >&5
17543 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17544
17545 case .$with_cflags in
17546 (.*-g*)
17547         case .$CFLAGS in
17548         (.*-g*)
17549                 ;;
17550         (*)
17551
17552 cf_fix_cppflags=no
17553 cf_new_cflags=
17554 cf_new_cppflags=
17555 cf_new_extra_cppflags=
17556
17557 for cf_add_cflags in -g
17558 do
17559 case $cf_fix_cppflags in
17560 (no)
17561         case $cf_add_cflags in
17562         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17563                 case $cf_add_cflags in
17564                 (-D*)
17565                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17566
17567                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17568                                 && test -z "${cf_tst_cflags}" \
17569                                 && cf_fix_cppflags=yes
17570
17571                         if test $cf_fix_cppflags = yes ; then
17572
17573         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17574         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17575
17576                                 continue
17577                         elif test "${cf_tst_cflags}" = "\"'" ; then
17578
17579         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17580         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17581
17582                                 continue
17583                         fi
17584                         ;;
17585                 esac
17586                 case "$CPPFLAGS" in
17587                 (*$cf_add_cflags)
17588                         ;;
17589                 (*)
17590                         case $cf_add_cflags in
17591                         (-D*)
17592                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17593
17594 CPPFLAGS=`echo "$CPPFLAGS" | \
17595         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17596                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17597
17598                                 ;;
17599                         esac
17600
17601         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17602         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17603
17604                         ;;
17605                 esac
17606                 ;;
17607         (*)
17608
17609         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17610         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17611
17612                 ;;
17613         esac
17614         ;;
17615 (yes)
17616
17617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17619
17620         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17621
17622         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17623                 && test -z "${cf_tst_cflags}" \
17624                 && cf_fix_cppflags=no
17625         ;;
17626 esac
17627 done
17628
17629 if test -n "$cf_new_cflags" ; then
17630
17631         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17632         CFLAGS="${CFLAGS}$cf_new_cflags"
17633
17634 fi
17635
17636 if test -n "$cf_new_cppflags" ; then
17637
17638         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17639         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17640
17641 fi
17642
17643 if test -n "$cf_new_extra_cppflags" ; then
17644
17645         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17646         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17647
17648 fi
17649
17650                 ;;
17651         esac
17652         ;;
17653 esac
17654
17655 if test "$with_dbmalloc" = yes ; then
17656         echo "$as_me:17656: checking for dbmalloc.h" >&5
17657 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17658 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17659   echo $ECHO_N "(cached) $ECHO_C" >&6
17660 else
17661   cat >conftest.$ac_ext <<_ACEOF
17662 #line 17662 "configure"
17663 #include "confdefs.h"
17664 #include <dbmalloc.h>
17665 _ACEOF
17666 if { (eval echo "$as_me:17666: \"$ac_cpp conftest.$ac_ext\"") >&5
17667   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17668   ac_status=$?
17669   egrep -v '^ *\+' conftest.er1 >conftest.err
17670   rm -f conftest.er1
17671   cat conftest.err >&5
17672   echo "$as_me:17672: \$? = $ac_status" >&5
17673   (exit $ac_status); } >/dev/null; then
17674   if test -s conftest.err; then
17675     ac_cpp_err=$ac_c_preproc_warn_flag
17676   else
17677     ac_cpp_err=
17678   fi
17679 else
17680   ac_cpp_err=yes
17681 fi
17682 if test -z "$ac_cpp_err"; then
17683   ac_cv_header_dbmalloc_h=yes
17684 else
17685   echo "$as_me: failed program was:" >&5
17686   cat conftest.$ac_ext >&5
17687   ac_cv_header_dbmalloc_h=no
17688 fi
17689 rm -f conftest.err conftest.$ac_ext
17690 fi
17691 echo "$as_me:17691: result: $ac_cv_header_dbmalloc_h" >&5
17692 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17693 if test $ac_cv_header_dbmalloc_h = yes; then
17694
17695 echo "$as_me:17695: checking for debug_malloc in -ldbmalloc" >&5
17696 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17697 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17698   echo $ECHO_N "(cached) $ECHO_C" >&6
17699 else
17700   ac_check_lib_save_LIBS=$LIBS
17701 LIBS="-ldbmalloc  $LIBS"
17702 cat >conftest.$ac_ext <<_ACEOF
17703 #line 17703 "configure"
17704 #include "confdefs.h"
17705
17706 /* Override any gcc2 internal prototype to avoid an error.  */
17707 #ifdef __cplusplus
17708 extern "C"
17709 #endif
17710 /* We use char because int might match the return type of a gcc2
17711    builtin and then its argument prototype would still apply.  */
17712 char debug_malloc ();
17713 int
17714 main (void)
17715 {
17716 debug_malloc ();
17717   ;
17718   return 0;
17719 }
17720 _ACEOF
17721 rm -f conftest.$ac_objext conftest$ac_exeext
17722 if { (eval echo "$as_me:17722: \"$ac_link\"") >&5
17723   (eval $ac_link) 2>&5
17724   ac_status=$?
17725   echo "$as_me:17725: \$? = $ac_status" >&5
17726   (exit $ac_status); } &&
17727          { ac_try='test -s conftest$ac_exeext'
17728   { (eval echo "$as_me:17728: \"$ac_try\"") >&5
17729   (eval $ac_try) 2>&5
17730   ac_status=$?
17731   echo "$as_me:17731: \$? = $ac_status" >&5
17732   (exit $ac_status); }; }; then
17733   ac_cv_lib_dbmalloc_debug_malloc=yes
17734 else
17735   echo "$as_me: failed program was:" >&5
17736 cat conftest.$ac_ext >&5
17737 ac_cv_lib_dbmalloc_debug_malloc=no
17738 fi
17739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17740 LIBS=$ac_check_lib_save_LIBS
17741 fi
17742 echo "$as_me:17742: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17743 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17744 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17745   cat >>confdefs.h <<EOF
17746 #define HAVE_LIBDBMALLOC 1
17747 EOF
17748
17749   LIBS="-ldbmalloc $LIBS"
17750
17751 fi
17752
17753 fi
17754
17755 fi
17756
17757 echo "$as_me:17757: checking if you want to use valgrind for testing" >&5
17758 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17759
17760 # Check whether --with-valgrind or --without-valgrind was given.
17761 if test "${with_valgrind+set}" = set; then
17762   withval="$with_valgrind"
17763
17764 cat >>confdefs.h <<EOF
17765 #define USE_VALGRIND 1
17766 EOF
17767
17768         : ${with_cflags:=-g}
17769         : ${with_no_leaks:=yes}
17770          with_valgrind=yes
17771 else
17772   with_valgrind=
17773 fi;
17774 echo "$as_me:17774: result: ${with_valgrind:-no}" >&5
17775 echo "${ECHO_T}${with_valgrind:-no}" >&6
17776
17777 case .$with_cflags in
17778 (.*-g*)
17779         case .$CFLAGS in
17780         (.*-g*)
17781                 ;;
17782         (*)
17783
17784 cf_fix_cppflags=no
17785 cf_new_cflags=
17786 cf_new_cppflags=
17787 cf_new_extra_cppflags=
17788
17789 for cf_add_cflags in -g
17790 do
17791 case $cf_fix_cppflags in
17792 (no)
17793         case $cf_add_cflags in
17794         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17795                 case $cf_add_cflags in
17796                 (-D*)
17797                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17798
17799                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17800                                 && test -z "${cf_tst_cflags}" \
17801                                 && cf_fix_cppflags=yes
17802
17803                         if test $cf_fix_cppflags = yes ; then
17804
17805         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17806         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17807
17808                                 continue
17809                         elif test "${cf_tst_cflags}" = "\"'" ; then
17810
17811         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17812         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17813
17814                                 continue
17815                         fi
17816                         ;;
17817                 esac
17818                 case "$CPPFLAGS" in
17819                 (*$cf_add_cflags)
17820                         ;;
17821                 (*)
17822                         case $cf_add_cflags in
17823                         (-D*)
17824                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17825
17826 CPPFLAGS=`echo "$CPPFLAGS" | \
17827         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17828                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17829
17830                                 ;;
17831                         esac
17832
17833         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17834         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17835
17836                         ;;
17837                 esac
17838                 ;;
17839         (*)
17840
17841         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17842         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17843
17844                 ;;
17845         esac
17846         ;;
17847 (yes)
17848
17849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17851
17852         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17853
17854         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17855                 && test -z "${cf_tst_cflags}" \
17856                 && cf_fix_cppflags=no
17857         ;;
17858 esac
17859 done
17860
17861 if test -n "$cf_new_cflags" ; then
17862
17863         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17864         CFLAGS="${CFLAGS}$cf_new_cflags"
17865
17866 fi
17867
17868 if test -n "$cf_new_cppflags" ; then
17869
17870         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17871         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17872
17873 fi
17874
17875 if test -n "$cf_new_extra_cppflags" ; then
17876
17877         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17878         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17879
17880 fi
17881
17882                 ;;
17883         esac
17884         ;;
17885 esac
17886
17887 echo "$as_me:17887: checking if you want to perform memory-leak testing" >&5
17888 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17889
17890 # Check whether --enable-leaks or --disable-leaks was given.
17891 if test "${enable_leaks+set}" = set; then
17892   enableval="$enable_leaks"
17893   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17894 else
17895   : ${with_no_leaks:=no}
17896 fi;
17897 echo "$as_me:17897: result: $with_no_leaks" >&5
17898 echo "${ECHO_T}$with_no_leaks" >&6
17899
17900 if test "$with_no_leaks" = yes ; then
17901
17902 cat >>confdefs.h <<\EOF
17903 #define NO_LEAKS 1
17904 EOF
17905
17906 cat >>confdefs.h <<\EOF
17907 #define YY_NO_LEAKS 1
17908 EOF
17909
17910 fi
17911
17912 cat >>confdefs.h <<\EOF
17913 #define HAVE_NC_ALLOC_H 1
17914 EOF
17915
17916 ###     use option --enable-expanded to generate certain macros as functions
17917
17918 # Check whether --enable-expanded or --disable-expanded was given.
17919 if test "${enable_expanded+set}" = set; then
17920   enableval="$enable_expanded"
17921   test "x$enableval" = xyes &&
17922 cat >>confdefs.h <<\EOF
17923 #define NCURSES_EXPANDED 1
17924 EOF
17925
17926 fi;
17927
17928 ###     use option --disable-macros to suppress macros in favor of functions
17929
17930 # Check whether --enable-macros or --disable-macros was given.
17931 if test "${enable_macros+set}" = set; then
17932   enableval="$enable_macros"
17933   test "$enableval" = no &&
17934 cat >>confdefs.h <<\EOF
17935 #define NCURSES_NOMACROS 1
17936 EOF
17937
17938 fi;
17939
17940 # Normally we only add trace() to the debug-library.  Allow this to be
17941 # extended to all models of the ncurses library:
17942 cf_all_traces=no
17943 case "$CFLAGS $CPPFLAGS" in
17944 (*-DTRACE*)
17945         cf_all_traces=yes
17946         ;;
17947 esac
17948
17949 echo "$as_me:17949: checking whether to add trace feature to all models" >&5
17950 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17951
17952 # Check whether --with-trace or --without-trace was given.
17953 if test "${with_trace+set}" = set; then
17954   withval="$with_trace"
17955   cf_with_trace=$withval
17956 else
17957   cf_with_trace=$cf_all_traces
17958 fi;
17959 echo "$as_me:17959: result: $cf_with_trace" >&5
17960 echo "${ECHO_T}$cf_with_trace" >&6
17961
17962 if test "x$cf_with_trace" = xyes ; then
17963         LIB_TRACING=all
17964         ADA_TRACE=TRUE
17965
17966 cf_fix_cppflags=no
17967 cf_new_cflags=
17968 cf_new_cppflags=
17969 cf_new_extra_cppflags=
17970
17971 for cf_add_cflags in -DTRACE
17972 do
17973 case $cf_fix_cppflags in
17974 (no)
17975         case $cf_add_cflags in
17976         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17977                 case $cf_add_cflags in
17978                 (-D*)
17979                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17980
17981                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17982                                 && test -z "${cf_tst_cflags}" \
17983                                 && cf_fix_cppflags=yes
17984
17985                         if test $cf_fix_cppflags = yes ; then
17986
17987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17989
17990                                 continue
17991                         elif test "${cf_tst_cflags}" = "\"'" ; then
17992
17993         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17994         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17995
17996                                 continue
17997                         fi
17998                         ;;
17999                 esac
18000                 case "$CPPFLAGS" in
18001                 (*$cf_add_cflags)
18002                         ;;
18003                 (*)
18004                         case $cf_add_cflags in
18005                         (-D*)
18006                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18007
18008 CPPFLAGS=`echo "$CPPFLAGS" | \
18009         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18010                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18011
18012                                 ;;
18013                         esac
18014
18015         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18016         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18017
18018                         ;;
18019                 esac
18020                 ;;
18021         (*)
18022
18023         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18024         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18025
18026                 ;;
18027         esac
18028         ;;
18029 (yes)
18030
18031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18033
18034         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18035
18036         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18037                 && test -z "${cf_tst_cflags}" \
18038                 && cf_fix_cppflags=no
18039         ;;
18040 esac
18041 done
18042
18043 if test -n "$cf_new_cflags" ; then
18044
18045         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18046         CFLAGS="${CFLAGS}$cf_new_cflags"
18047
18048 fi
18049
18050 if test -n "$cf_new_cppflags" ; then
18051
18052         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18053         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18054
18055 fi
18056
18057 if test -n "$cf_new_extra_cppflags" ; then
18058
18059         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18060         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18061
18062 fi
18063
18064 cat >>confdefs.h <<\EOF
18065 #define HAVE__TRACEF 1
18066 EOF
18067
18068 else
18069         LIB_TRACING=DEBUG
18070         ADA_TRACE=FALSE
18071 fi
18072
18073 echo "$as_me:18073: checking if we want to use GNAT projects" >&5
18074 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18075
18076 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18077 if test "${enable_gnat_projects+set}" = set; then
18078   enableval="$enable_gnat_projects"
18079   test "$enableval" != no && enableval=yes
18080         if test "$enableval" != "yes" ; then
18081     enable_gnat_projects=no
18082         else
18083                 enable_gnat_projects=yes
18084         fi
18085 else
18086   enableval=yes
18087         enable_gnat_projects=yes
18088
18089 fi;
18090 echo "$as_me:18090: result: $enable_gnat_projects" >&5
18091 echo "${ECHO_T}$enable_gnat_projects" >&6
18092
18093 ###     Checks for libraries.
18094 case $cf_cv_system_name in
18095 (*mingw32*|*mingw64*)
18096         if test "x$with_exp_win32" = xyes ; then
18097         CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18098         else
18099         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18100         fi
18101         # Note: WINVER may be a problem with Windows 10
18102         ;;
18103 (*)
18104 echo "$as_me:18104: checking for gettimeofday" >&5
18105 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18106 if test "${ac_cv_func_gettimeofday+set}" = set; then
18107   echo $ECHO_N "(cached) $ECHO_C" >&6
18108 else
18109   cat >conftest.$ac_ext <<_ACEOF
18110 #line 18110 "configure"
18111 #include "confdefs.h"
18112 #define gettimeofday autoconf_temporary
18113 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18114 #undef gettimeofday
18115
18116 #ifdef __cplusplus
18117 extern "C"
18118 #endif
18119
18120 /* We use char because int might match the return type of a gcc2
18121    builtin and then its argument prototype would still apply.  */
18122 char gettimeofday (void);
18123
18124 int
18125 main (void)
18126 {
18127
18128 /* The GNU C library defines stubs for functions which it implements
18129     to always fail with ENOSYS.  Some functions are actually named
18130     something starting with __ and the normal name is an alias.  */
18131 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18132 #error found stub for gettimeofday
18133 #endif
18134
18135         return gettimeofday ();
18136   ;
18137   return 0;
18138 }
18139 _ACEOF
18140 rm -f conftest.$ac_objext conftest$ac_exeext
18141 if { (eval echo "$as_me:18141: \"$ac_link\"") >&5
18142   (eval $ac_link) 2>&5
18143   ac_status=$?
18144   echo "$as_me:18144: \$? = $ac_status" >&5
18145   (exit $ac_status); } &&
18146          { ac_try='test -s conftest$ac_exeext'
18147   { (eval echo "$as_me:18147: \"$ac_try\"") >&5
18148   (eval $ac_try) 2>&5
18149   ac_status=$?
18150   echo "$as_me:18150: \$? = $ac_status" >&5
18151   (exit $ac_status); }; }; then
18152   ac_cv_func_gettimeofday=yes
18153 else
18154   echo "$as_me: failed program was:" >&5
18155 cat conftest.$ac_ext >&5
18156 ac_cv_func_gettimeofday=no
18157 fi
18158 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18159 fi
18160 echo "$as_me:18160: result: $ac_cv_func_gettimeofday" >&5
18161 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18162 if test $ac_cv_func_gettimeofday = yes; then
18163
18164 cat >>confdefs.h <<\EOF
18165 #define HAVE_GETTIMEOFDAY 1
18166 EOF
18167
18168 else
18169
18170 echo "$as_me:18170: checking for gettimeofday in -lbsd" >&5
18171 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18172 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18173   echo $ECHO_N "(cached) $ECHO_C" >&6
18174 else
18175   ac_check_lib_save_LIBS=$LIBS
18176 LIBS="-lbsd  $LIBS"
18177 cat >conftest.$ac_ext <<_ACEOF
18178 #line 18178 "configure"
18179 #include "confdefs.h"
18180
18181 /* Override any gcc2 internal prototype to avoid an error.  */
18182 #ifdef __cplusplus
18183 extern "C"
18184 #endif
18185 /* We use char because int might match the return type of a gcc2
18186    builtin and then its argument prototype would still apply.  */
18187 char gettimeofday ();
18188 int
18189 main (void)
18190 {
18191 gettimeofday ();
18192   ;
18193   return 0;
18194 }
18195 _ACEOF
18196 rm -f conftest.$ac_objext conftest$ac_exeext
18197 if { (eval echo "$as_me:18197: \"$ac_link\"") >&5
18198   (eval $ac_link) 2>&5
18199   ac_status=$?
18200   echo "$as_me:18200: \$? = $ac_status" >&5
18201   (exit $ac_status); } &&
18202          { ac_try='test -s conftest$ac_exeext'
18203   { (eval echo "$as_me:18203: \"$ac_try\"") >&5
18204   (eval $ac_try) 2>&5
18205   ac_status=$?
18206   echo "$as_me:18206: \$? = $ac_status" >&5
18207   (exit $ac_status); }; }; then
18208   ac_cv_lib_bsd_gettimeofday=yes
18209 else
18210   echo "$as_me: failed program was:" >&5
18211 cat conftest.$ac_ext >&5
18212 ac_cv_lib_bsd_gettimeofday=no
18213 fi
18214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18215 LIBS=$ac_check_lib_save_LIBS
18216 fi
18217 echo "$as_me:18217: result: $ac_cv_lib_bsd_gettimeofday" >&5
18218 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18219 if test $ac_cv_lib_bsd_gettimeofday = yes; then
18220
18221 cat >>confdefs.h <<\EOF
18222 #define HAVE_GETTIMEOFDAY 1
18223 EOF
18224
18225 cf_add_libs="$LIBS"
18226 # reverse order
18227 cf_add_0lib=
18228 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18229 # filter duplicates
18230 for cf_add_1lib in $cf_add_0lib; do
18231         for cf_add_2lib in $cf_add_libs; do
18232                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18233                         cf_add_1lib=
18234                         break
18235                 fi
18236         done
18237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18238 done
18239 LIBS="$cf_add_libs"
18240
18241 fi
18242
18243 fi
18244         ;;
18245 esac
18246
18247 echo "$as_me:18247: checking if -lm needed for math functions" >&5
18248 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18249 if test "${cf_cv_need_libm+set}" = set; then
18250   echo $ECHO_N "(cached) $ECHO_C" >&6
18251 else
18252
18253         cat >conftest.$ac_ext <<_ACEOF
18254 #line 18254 "configure"
18255 #include "confdefs.h"
18256
18257         #include <stdio.h>
18258         #include <stdlib.h>
18259         #include <math.h>
18260
18261 int
18262 main (void)
18263 {
18264 double x = rand(); printf("result = %g\n", pow(sin(x),x))
18265   ;
18266   return 0;
18267 }
18268 _ACEOF
18269 rm -f conftest.$ac_objext conftest$ac_exeext
18270 if { (eval echo "$as_me:18270: \"$ac_link\"") >&5
18271   (eval $ac_link) 2>&5
18272   ac_status=$?
18273   echo "$as_me:18273: \$? = $ac_status" >&5
18274   (exit $ac_status); } &&
18275          { ac_try='test -s conftest$ac_exeext'
18276   { (eval echo "$as_me:18276: \"$ac_try\"") >&5
18277   (eval $ac_try) 2>&5
18278   ac_status=$?
18279   echo "$as_me:18279: \$? = $ac_status" >&5
18280   (exit $ac_status); }; }; then
18281   cf_cv_need_libm=no
18282 else
18283   echo "$as_me: failed program was:" >&5
18284 cat conftest.$ac_ext >&5
18285 cf_cv_need_libm=yes
18286 fi
18287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18288 fi
18289 echo "$as_me:18289: result: $cf_cv_need_libm" >&5
18290 echo "${ECHO_T}$cf_cv_need_libm" >&6
18291 if test "$cf_cv_need_libm" = yes
18292 then
18293 MATH_LIB=-lm
18294 fi
18295
18296 ###     Checks for header files.
18297 echo "$as_me:18297: checking for ANSI C header files" >&5
18298 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18299 if test "${ac_cv_header_stdc+set}" = set; then
18300   echo $ECHO_N "(cached) $ECHO_C" >&6
18301 else
18302   cat >conftest.$ac_ext <<_ACEOF
18303 #line 18303 "configure"
18304 #include "confdefs.h"
18305 #include <stdlib.h>
18306 #include <stdarg.h>
18307 #include <string.h>
18308 #include <float.h>
18309
18310 _ACEOF
18311 if { (eval echo "$as_me:18311: \"$ac_cpp conftest.$ac_ext\"") >&5
18312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18313   ac_status=$?
18314   egrep -v '^ *\+' conftest.er1 >conftest.err
18315   rm -f conftest.er1
18316   cat conftest.err >&5
18317   echo "$as_me:18317: \$? = $ac_status" >&5
18318   (exit $ac_status); } >/dev/null; then
18319   if test -s conftest.err; then
18320     ac_cpp_err=$ac_c_preproc_warn_flag
18321   else
18322     ac_cpp_err=
18323   fi
18324 else
18325   ac_cpp_err=yes
18326 fi
18327 if test -z "$ac_cpp_err"; then
18328   ac_cv_header_stdc=yes
18329 else
18330   echo "$as_me: failed program was:" >&5
18331   cat conftest.$ac_ext >&5
18332   ac_cv_header_stdc=no
18333 fi
18334 rm -f conftest.err conftest.$ac_ext
18335
18336 if test $ac_cv_header_stdc = yes; then
18337   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18338   cat >conftest.$ac_ext <<_ACEOF
18339 #line 18339 "configure"
18340 #include "confdefs.h"
18341 #include <string.h>
18342
18343 _ACEOF
18344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18345   egrep "memchr" >/dev/null 2>&1; then
18346   :
18347 else
18348   ac_cv_header_stdc=no
18349 fi
18350 rm -rf conftest*
18351
18352 fi
18353
18354 if test $ac_cv_header_stdc = yes; then
18355   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18356   cat >conftest.$ac_ext <<_ACEOF
18357 #line 18357 "configure"
18358 #include "confdefs.h"
18359 #include <stdlib.h>
18360
18361 _ACEOF
18362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18363   egrep "free" >/dev/null 2>&1; then
18364   :
18365 else
18366   ac_cv_header_stdc=no
18367 fi
18368 rm -rf conftest*
18369
18370 fi
18371
18372 if test $ac_cv_header_stdc = yes; then
18373   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
18374   if test "$cross_compiling" = yes; then
18375   :
18376 else
18377   cat >conftest.$ac_ext <<_ACEOF
18378 #line 18378 "configure"
18379 #include "confdefs.h"
18380 #include <ctype.h>
18381 #if ((' ' & 0x0FF) == 0x020)
18382 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
18383 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
18384 #else
18385 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
18386                      || ('j' <= (c) && (c) <= 'r') \
18387                      || ('s' <= (c) && (c) <= 'z'))
18388 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
18389 #endif
18390
18391 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
18392 int
18393 main (void)
18394 {
18395   int i;
18396   for (i = 0; i < 256; i++)
18397     if (XOR (islower (i), ISLOWER (i))
18398         || toupper (i) != TOUPPER (i))
18399       $ac_main_return(2);
18400   $ac_main_return (0);
18401 }
18402 _ACEOF
18403 rm -f conftest$ac_exeext
18404 if { (eval echo "$as_me:18404: \"$ac_link\"") >&5
18405   (eval $ac_link) 2>&5
18406   ac_status=$?
18407   echo "$as_me:18407: \$? = $ac_status" >&5
18408   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18409   { (eval echo "$as_me:18409: \"$ac_try\"") >&5
18410   (eval $ac_try) 2>&5
18411   ac_status=$?
18412   echo "$as_me:18412: \$? = $ac_status" >&5
18413   (exit $ac_status); }; }; then
18414   :
18415 else
18416   echo "$as_me: program exited with status $ac_status" >&5
18417 echo "$as_me: failed program was:" >&5
18418 cat conftest.$ac_ext >&5
18419 ac_cv_header_stdc=no
18420 fi
18421 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18422 fi
18423 fi
18424 fi
18425 echo "$as_me:18425: result: $ac_cv_header_stdc" >&5
18426 echo "${ECHO_T}$ac_cv_header_stdc" >&6
18427 if test $ac_cv_header_stdc = yes; then
18428
18429 cat >>confdefs.h <<\EOF
18430 #define STDC_HEADERS 1
18431 EOF
18432
18433 fi
18434
18435 ac_header_dirent=no
18436 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
18437   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
18438 echo "$as_me:18438: checking for $ac_hdr that defines DIR" >&5
18439 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
18440 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18441   echo $ECHO_N "(cached) $ECHO_C" >&6
18442 else
18443   cat >conftest.$ac_ext <<_ACEOF
18444 #line 18444 "configure"
18445 #include "confdefs.h"
18446 #include <sys/types.h>
18447 #include <$ac_hdr>
18448
18449 int
18450 main (void)
18451 {
18452 if ((DIR *) 0)
18453 return 0;
18454   ;
18455   return 0;
18456 }
18457 _ACEOF
18458 rm -f conftest.$ac_objext
18459 if { (eval echo "$as_me:18459: \"$ac_compile\"") >&5
18460   (eval $ac_compile) 2>&5
18461   ac_status=$?
18462   echo "$as_me:18462: \$? = $ac_status" >&5
18463   (exit $ac_status); } &&
18464          { ac_try='test -s conftest.$ac_objext'
18465   { (eval echo "$as_me:18465: \"$ac_try\"") >&5
18466   (eval $ac_try) 2>&5
18467   ac_status=$?
18468   echo "$as_me:18468: \$? = $ac_status" >&5
18469   (exit $ac_status); }; }; then
18470   eval "$as_ac_Header=yes"
18471 else
18472   echo "$as_me: failed program was:" >&5
18473 cat conftest.$ac_ext >&5
18474 eval "$as_ac_Header=no"
18475 fi
18476 rm -f conftest.$ac_objext conftest.$ac_ext
18477 fi
18478 echo "$as_me:18478: result: `eval echo '${'$as_ac_Header'}'`" >&5
18479 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18480 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18481   cat >>confdefs.h <<EOF
18482 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18483 EOF
18484
18485 ac_header_dirent=$ac_hdr; break
18486 fi
18487
18488 done
18489 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18490 if test $ac_header_dirent = dirent.h; then
18491   echo "$as_me:18491: checking for opendir in -ldir" >&5
18492 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18493 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18494   echo $ECHO_N "(cached) $ECHO_C" >&6
18495 else
18496   ac_check_lib_save_LIBS=$LIBS
18497 LIBS="-ldir  $LIBS"
18498 cat >conftest.$ac_ext <<_ACEOF
18499 #line 18499 "configure"
18500 #include "confdefs.h"
18501
18502 /* Override any gcc2 internal prototype to avoid an error.  */
18503 #ifdef __cplusplus
18504 extern "C"
18505 #endif
18506 /* We use char because int might match the return type of a gcc2
18507    builtin and then its argument prototype would still apply.  */
18508 char opendir ();
18509 int
18510 main (void)
18511 {
18512 opendir ();
18513   ;
18514   return 0;
18515 }
18516 _ACEOF
18517 rm -f conftest.$ac_objext conftest$ac_exeext
18518 if { (eval echo "$as_me:18518: \"$ac_link\"") >&5
18519   (eval $ac_link) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); } &&
18523          { ac_try='test -s conftest$ac_exeext'
18524   { (eval echo "$as_me:18524: \"$ac_try\"") >&5
18525   (eval $ac_try) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit $ac_status); }; }; then
18529   ac_cv_lib_dir_opendir=yes
18530 else
18531   echo "$as_me: failed program was:" >&5
18532 cat conftest.$ac_ext >&5
18533 ac_cv_lib_dir_opendir=no
18534 fi
18535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18536 LIBS=$ac_check_lib_save_LIBS
18537 fi
18538 echo "$as_me:18538: result: $ac_cv_lib_dir_opendir" >&5
18539 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18540 if test $ac_cv_lib_dir_opendir = yes; then
18541   LIBS="$LIBS -ldir"
18542 fi
18543
18544 else
18545   echo "$as_me:18545: checking for opendir in -lx" >&5
18546 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18547 if test "${ac_cv_lib_x_opendir+set}" = set; then
18548   echo $ECHO_N "(cached) $ECHO_C" >&6
18549 else
18550   ac_check_lib_save_LIBS=$LIBS
18551 LIBS="-lx  $LIBS"
18552 cat >conftest.$ac_ext <<_ACEOF
18553 #line 18553 "configure"
18554 #include "confdefs.h"
18555
18556 /* Override any gcc2 internal prototype to avoid an error.  */
18557 #ifdef __cplusplus
18558 extern "C"
18559 #endif
18560 /* We use char because int might match the return type of a gcc2
18561    builtin and then its argument prototype would still apply.  */
18562 char opendir ();
18563 int
18564 main (void)
18565 {
18566 opendir ();
18567   ;
18568   return 0;
18569 }
18570 _ACEOF
18571 rm -f conftest.$ac_objext conftest$ac_exeext
18572 if { (eval echo "$as_me:18572: \"$ac_link\"") >&5
18573   (eval $ac_link) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit $ac_status); } &&
18577          { ac_try='test -s conftest$ac_exeext'
18578   { (eval echo "$as_me:18578: \"$ac_try\"") >&5
18579   (eval $ac_try) 2>&5
18580   ac_status=$?
18581   echo "$as_me:18581: \$? = $ac_status" >&5
18582   (exit $ac_status); }; }; then
18583   ac_cv_lib_x_opendir=yes
18584 else
18585   echo "$as_me: failed program was:" >&5
18586 cat conftest.$ac_ext >&5
18587 ac_cv_lib_x_opendir=no
18588 fi
18589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18590 LIBS=$ac_check_lib_save_LIBS
18591 fi
18592 echo "$as_me:18592: result: $ac_cv_lib_x_opendir" >&5
18593 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18594 if test $ac_cv_lib_x_opendir = yes; then
18595   LIBS="$LIBS -lx"
18596 fi
18597
18598 fi
18599
18600 echo "$as_me:18600: checking whether time.h and sys/time.h may both be included" >&5
18601 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18602 if test "${ac_cv_header_time+set}" = set; then
18603   echo $ECHO_N "(cached) $ECHO_C" >&6
18604 else
18605   cat >conftest.$ac_ext <<_ACEOF
18606 #line 18606 "configure"
18607 #include "confdefs.h"
18608 #include <sys/types.h>
18609 #include <sys/time.h>
18610 #include <time.h>
18611
18612 int
18613 main (void)
18614 {
18615 if ((struct tm *) 0)
18616 return 0;
18617   ;
18618   return 0;
18619 }
18620 _ACEOF
18621 rm -f conftest.$ac_objext
18622 if { (eval echo "$as_me:18622: \"$ac_compile\"") >&5
18623   (eval $ac_compile) 2>&5
18624   ac_status=$?
18625   echo "$as_me:18625: \$? = $ac_status" >&5
18626   (exit $ac_status); } &&
18627          { ac_try='test -s conftest.$ac_objext'
18628   { (eval echo "$as_me:18628: \"$ac_try\"") >&5
18629   (eval $ac_try) 2>&5
18630   ac_status=$?
18631   echo "$as_me:18631: \$? = $ac_status" >&5
18632   (exit $ac_status); }; }; then
18633   ac_cv_header_time=yes
18634 else
18635   echo "$as_me: failed program was:" >&5
18636 cat conftest.$ac_ext >&5
18637 ac_cv_header_time=no
18638 fi
18639 rm -f conftest.$ac_objext conftest.$ac_ext
18640 fi
18641 echo "$as_me:18641: result: $ac_cv_header_time" >&5
18642 echo "${ECHO_T}$ac_cv_header_time" >&6
18643 if test $ac_cv_header_time = yes; then
18644
18645 cat >>confdefs.h <<\EOF
18646 #define TIME_WITH_SYS_TIME 1
18647 EOF
18648
18649 fi
18650
18651 cf_regex_func=no
18652 cf_regex_libs=
18653 case $host_os in
18654 (mingw*)
18655         # -lsystre -ltre -lintl -liconv
18656         echo "$as_me:18656: checking for regcomp in -lsystre" >&5
18657 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
18658 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
18659   echo $ECHO_N "(cached) $ECHO_C" >&6
18660 else
18661   ac_check_lib_save_LIBS=$LIBS
18662 LIBS="-lsystre  $LIBS"
18663 cat >conftest.$ac_ext <<_ACEOF
18664 #line 18664 "configure"
18665 #include "confdefs.h"
18666
18667 /* Override any gcc2 internal prototype to avoid an error.  */
18668 #ifdef __cplusplus
18669 extern "C"
18670 #endif
18671 /* We use char because int might match the return type of a gcc2
18672    builtin and then its argument prototype would still apply.  */
18673 char regcomp ();
18674 int
18675 main (void)
18676 {
18677 regcomp ();
18678   ;
18679   return 0;
18680 }
18681 _ACEOF
18682 rm -f conftest.$ac_objext conftest$ac_exeext
18683 if { (eval echo "$as_me:18683: \"$ac_link\"") >&5
18684   (eval $ac_link) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } &&
18688          { ac_try='test -s conftest$ac_exeext'
18689   { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); }; }; then
18694   ac_cv_lib_systre_regcomp=yes
18695 else
18696   echo "$as_me: failed program was:" >&5
18697 cat conftest.$ac_ext >&5
18698 ac_cv_lib_systre_regcomp=no
18699 fi
18700 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18701 LIBS=$ac_check_lib_save_LIBS
18702 fi
18703 echo "$as_me:18703: result: $ac_cv_lib_systre_regcomp" >&5
18704 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
18705 if test $ac_cv_lib_systre_regcomp = yes; then
18706
18707                 echo "$as_me:18707: checking for libiconv_open in -liconv" >&5
18708 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
18709 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
18710   echo $ECHO_N "(cached) $ECHO_C" >&6
18711 else
18712   ac_check_lib_save_LIBS=$LIBS
18713 LIBS="-liconv  $LIBS"
18714 cat >conftest.$ac_ext <<_ACEOF
18715 #line 18715 "configure"
18716 #include "confdefs.h"
18717
18718 /* Override any gcc2 internal prototype to avoid an error.  */
18719 #ifdef __cplusplus
18720 extern "C"
18721 #endif
18722 /* We use char because int might match the return type of a gcc2
18723    builtin and then its argument prototype would still apply.  */
18724 char libiconv_open ();
18725 int
18726 main (void)
18727 {
18728 libiconv_open ();
18729   ;
18730   return 0;
18731 }
18732 _ACEOF
18733 rm -f conftest.$ac_objext conftest$ac_exeext
18734 if { (eval echo "$as_me:18734: \"$ac_link\"") >&5
18735   (eval $ac_link) 2>&5
18736   ac_status=$?
18737   echo "$as_me:18737: \$? = $ac_status" >&5
18738   (exit $ac_status); } &&
18739          { ac_try='test -s conftest$ac_exeext'
18740   { (eval echo "$as_me:18740: \"$ac_try\"") >&5
18741   (eval $ac_try) 2>&5
18742   ac_status=$?
18743   echo "$as_me:18743: \$? = $ac_status" >&5
18744   (exit $ac_status); }; }; then
18745   ac_cv_lib_iconv_libiconv_open=yes
18746 else
18747   echo "$as_me: failed program was:" >&5
18748 cat conftest.$ac_ext >&5
18749 ac_cv_lib_iconv_libiconv_open=no
18750 fi
18751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18752 LIBS=$ac_check_lib_save_LIBS
18753 fi
18754 echo "$as_me:18754: result: $ac_cv_lib_iconv_libiconv_open" >&5
18755 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
18756 if test $ac_cv_lib_iconv_libiconv_open = yes; then
18757
18758 cf_add_libs="$LIBS"
18759 # reverse order
18760 cf_add_0lib=
18761 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18762 # filter duplicates
18763 for cf_add_1lib in $cf_add_0lib; do
18764         for cf_add_2lib in $cf_add_libs; do
18765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18766                         cf_add_1lib=
18767                         break
18768                 fi
18769         done
18770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18771 done
18772 LIBS="$cf_add_libs"
18773
18774 fi
18775
18776                 echo "$as_me:18776: checking for libintl_gettext in -lintl" >&5
18777 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
18778 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
18779   echo $ECHO_N "(cached) $ECHO_C" >&6
18780 else
18781   ac_check_lib_save_LIBS=$LIBS
18782 LIBS="-lintl  $LIBS"
18783 cat >conftest.$ac_ext <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787 /* Override any gcc2 internal prototype to avoid an error.  */
18788 #ifdef __cplusplus
18789 extern "C"
18790 #endif
18791 /* We use char because int might match the return type of a gcc2
18792    builtin and then its argument prototype would still apply.  */
18793 char libintl_gettext ();
18794 int
18795 main (void)
18796 {
18797 libintl_gettext ();
18798   ;
18799   return 0;
18800 }
18801 _ACEOF
18802 rm -f conftest.$ac_objext conftest$ac_exeext
18803 if { (eval echo "$as_me:18803: \"$ac_link\"") >&5
18804   (eval $ac_link) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit $ac_status); } &&
18808          { ac_try='test -s conftest$ac_exeext'
18809   { (eval echo "$as_me:18809: \"$ac_try\"") >&5
18810   (eval $ac_try) 2>&5
18811   ac_status=$?
18812   echo "$as_me:18812: \$? = $ac_status" >&5
18813   (exit $ac_status); }; }; then
18814   ac_cv_lib_intl_libintl_gettext=yes
18815 else
18816   echo "$as_me: failed program was:" >&5
18817 cat conftest.$ac_ext >&5
18818 ac_cv_lib_intl_libintl_gettext=no
18819 fi
18820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18821 LIBS=$ac_check_lib_save_LIBS
18822 fi
18823 echo "$as_me:18823: result: $ac_cv_lib_intl_libintl_gettext" >&5
18824 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
18825 if test $ac_cv_lib_intl_libintl_gettext = yes; then
18826
18827 cf_add_libs="$LIBS"
18828 # reverse order
18829 cf_add_0lib=
18830 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18831 # filter duplicates
18832 for cf_add_1lib in $cf_add_0lib; do
18833         for cf_add_2lib in $cf_add_libs; do
18834                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18835                         cf_add_1lib=
18836                         break
18837                 fi
18838         done
18839         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18840 done
18841 LIBS="$cf_add_libs"
18842
18843 fi
18844
18845                 echo "$as_me:18845: checking for tre_regcomp in -ltre" >&5
18846 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
18847 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
18848   echo $ECHO_N "(cached) $ECHO_C" >&6
18849 else
18850   ac_check_lib_save_LIBS=$LIBS
18851 LIBS="-ltre  $LIBS"
18852 cat >conftest.$ac_ext <<_ACEOF
18853 #line 18853 "configure"
18854 #include "confdefs.h"
18855
18856 /* Override any gcc2 internal prototype to avoid an error.  */
18857 #ifdef __cplusplus
18858 extern "C"
18859 #endif
18860 /* We use char because int might match the return type of a gcc2
18861    builtin and then its argument prototype would still apply.  */
18862 char tre_regcomp ();
18863 int
18864 main (void)
18865 {
18866 tre_regcomp ();
18867   ;
18868   return 0;
18869 }
18870 _ACEOF
18871 rm -f conftest.$ac_objext conftest$ac_exeext
18872 if { (eval echo "$as_me:18872: \"$ac_link\"") >&5
18873   (eval $ac_link) 2>&5
18874   ac_status=$?
18875   echo "$as_me:18875: \$? = $ac_status" >&5
18876   (exit $ac_status); } &&
18877          { ac_try='test -s conftest$ac_exeext'
18878   { (eval echo "$as_me:18878: \"$ac_try\"") >&5
18879   (eval $ac_try) 2>&5
18880   ac_status=$?
18881   echo "$as_me:18881: \$? = $ac_status" >&5
18882   (exit $ac_status); }; }; then
18883   ac_cv_lib_tre_tre_regcomp=yes
18884 else
18885   echo "$as_me: failed program was:" >&5
18886 cat conftest.$ac_ext >&5
18887 ac_cv_lib_tre_tre_regcomp=no
18888 fi
18889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18890 LIBS=$ac_check_lib_save_LIBS
18891 fi
18892 echo "$as_me:18892: result: $ac_cv_lib_tre_tre_regcomp" >&5
18893 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
18894 if test $ac_cv_lib_tre_tre_regcomp = yes; then
18895
18896 cf_add_libs="$LIBS"
18897 # reverse order
18898 cf_add_0lib=
18899 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18900 # filter duplicates
18901 for cf_add_1lib in $cf_add_0lib; do
18902         for cf_add_2lib in $cf_add_libs; do
18903                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18904                         cf_add_1lib=
18905                         break
18906                 fi
18907         done
18908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18909 done
18910 LIBS="$cf_add_libs"
18911
18912 fi
18913
18914 cf_add_libs="$LIBS"
18915 # reverse order
18916 cf_add_0lib=
18917 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18918 # filter duplicates
18919 for cf_add_1lib in $cf_add_0lib; do
18920         for cf_add_2lib in $cf_add_libs; do
18921                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18922                         cf_add_1lib=
18923                         break
18924                 fi
18925         done
18926         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18927 done
18928 LIBS="$cf_add_libs"
18929
18930                 cf_regex_func=regcomp
18931
18932 else
18933
18934                 echo "$as_me:18934: checking for regcomp in -lgnurx" >&5
18935 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
18936 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
18937   echo $ECHO_N "(cached) $ECHO_C" >&6
18938 else
18939   ac_check_lib_save_LIBS=$LIBS
18940 LIBS="-lgnurx  $LIBS"
18941 cat >conftest.$ac_ext <<_ACEOF
18942 #line 18942 "configure"
18943 #include "confdefs.h"
18944
18945 /* Override any gcc2 internal prototype to avoid an error.  */
18946 #ifdef __cplusplus
18947 extern "C"
18948 #endif
18949 /* We use char because int might match the return type of a gcc2
18950    builtin and then its argument prototype would still apply.  */
18951 char regcomp ();
18952 int
18953 main (void)
18954 {
18955 regcomp ();
18956   ;
18957   return 0;
18958 }
18959 _ACEOF
18960 rm -f conftest.$ac_objext conftest$ac_exeext
18961 if { (eval echo "$as_me:18961: \"$ac_link\"") >&5
18962   (eval $ac_link) 2>&5
18963   ac_status=$?
18964   echo "$as_me:18964: \$? = $ac_status" >&5
18965   (exit $ac_status); } &&
18966          { ac_try='test -s conftest$ac_exeext'
18967   { (eval echo "$as_me:18967: \"$ac_try\"") >&5
18968   (eval $ac_try) 2>&5
18969   ac_status=$?
18970   echo "$as_me:18970: \$? = $ac_status" >&5
18971   (exit $ac_status); }; }; then
18972   ac_cv_lib_gnurx_regcomp=yes
18973 else
18974   echo "$as_me: failed program was:" >&5
18975 cat conftest.$ac_ext >&5
18976 ac_cv_lib_gnurx_regcomp=no
18977 fi
18978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18979 LIBS=$ac_check_lib_save_LIBS
18980 fi
18981 echo "$as_me:18981: result: $ac_cv_lib_gnurx_regcomp" >&5
18982 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
18983 if test $ac_cv_lib_gnurx_regcomp = yes; then
18984
18985 cf_add_libs="$LIBS"
18986 # reverse order
18987 cf_add_0lib=
18988 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18989 # filter duplicates
18990 for cf_add_1lib in $cf_add_0lib; do
18991         for cf_add_2lib in $cf_add_libs; do
18992                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18993                         cf_add_1lib=
18994                         break
18995                 fi
18996         done
18997         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18998 done
18999 LIBS="$cf_add_libs"
19000
19001                         cf_regex_func=regcomp
19002 fi
19003
19004 fi
19005
19006         ;;
19007 (*)
19008         cf_regex_libs="regex re"
19009         echo "$as_me:19009: checking for regcomp" >&5
19010 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19011 if test "${ac_cv_func_regcomp+set}" = set; then
19012   echo $ECHO_N "(cached) $ECHO_C" >&6
19013 else
19014   cat >conftest.$ac_ext <<_ACEOF
19015 #line 19015 "configure"
19016 #include "confdefs.h"
19017 #define regcomp autoconf_temporary
19018 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19019 #undef regcomp
19020
19021 #ifdef __cplusplus
19022 extern "C"
19023 #endif
19024
19025 /* We use char because int might match the return type of a gcc2
19026    builtin and then its argument prototype would still apply.  */
19027 char regcomp (void);
19028
19029 int
19030 main (void)
19031 {
19032
19033 /* The GNU C library defines stubs for functions which it implements
19034     to always fail with ENOSYS.  Some functions are actually named
19035     something starting with __ and the normal name is an alias.  */
19036 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19037 #error found stub for regcomp
19038 #endif
19039
19040         return regcomp ();
19041   ;
19042   return 0;
19043 }
19044 _ACEOF
19045 rm -f conftest.$ac_objext conftest$ac_exeext
19046 if { (eval echo "$as_me:19046: \"$ac_link\"") >&5
19047   (eval $ac_link) 2>&5
19048   ac_status=$?
19049   echo "$as_me:19049: \$? = $ac_status" >&5
19050   (exit $ac_status); } &&
19051          { ac_try='test -s conftest$ac_exeext'
19052   { (eval echo "$as_me:19052: \"$ac_try\"") >&5
19053   (eval $ac_try) 2>&5
19054   ac_status=$?
19055   echo "$as_me:19055: \$? = $ac_status" >&5
19056   (exit $ac_status); }; }; then
19057   ac_cv_func_regcomp=yes
19058 else
19059   echo "$as_me: failed program was:" >&5
19060 cat conftest.$ac_ext >&5
19061 ac_cv_func_regcomp=no
19062 fi
19063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19064 fi
19065 echo "$as_me:19065: result: $ac_cv_func_regcomp" >&5
19066 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19067 if test $ac_cv_func_regcomp = yes; then
19068   cf_regex_func=regcomp
19069 else
19070
19071                 for cf_regex_lib in $cf_regex_libs
19072                 do
19073                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19074 echo "$as_me:19074: checking for regcomp in -l$cf_regex_lib" >&5
19075 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19076 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19077   echo $ECHO_N "(cached) $ECHO_C" >&6
19078 else
19079   ac_check_lib_save_LIBS=$LIBS
19080 LIBS="-l$cf_regex_lib  $LIBS"
19081 cat >conftest.$ac_ext <<_ACEOF
19082 #line 19082 "configure"
19083 #include "confdefs.h"
19084
19085 /* Override any gcc2 internal prototype to avoid an error.  */
19086 #ifdef __cplusplus
19087 extern "C"
19088 #endif
19089 /* We use char because int might match the return type of a gcc2
19090    builtin and then its argument prototype would still apply.  */
19091 char regcomp ();
19092 int
19093 main (void)
19094 {
19095 regcomp ();
19096   ;
19097   return 0;
19098 }
19099 _ACEOF
19100 rm -f conftest.$ac_objext conftest$ac_exeext
19101 if { (eval echo "$as_me:19101: \"$ac_link\"") >&5
19102   (eval $ac_link) 2>&5
19103   ac_status=$?
19104   echo "$as_me:19104: \$? = $ac_status" >&5
19105   (exit $ac_status); } &&
19106          { ac_try='test -s conftest$ac_exeext'
19107   { (eval echo "$as_me:19107: \"$ac_try\"") >&5
19108   (eval $ac_try) 2>&5
19109   ac_status=$?
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); }; }; then
19112   eval "$as_ac_Lib=yes"
19113 else
19114   echo "$as_me: failed program was:" >&5
19115 cat conftest.$ac_ext >&5
19116 eval "$as_ac_Lib=no"
19117 fi
19118 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19119 LIBS=$ac_check_lib_save_LIBS
19120 fi
19121 echo "$as_me:19121: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19122 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19123 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19124
19125 cf_add_libs="$LIBS"
19126 # reverse order
19127 cf_add_0lib=
19128 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19129 # filter duplicates
19130 for cf_add_1lib in $cf_add_0lib; do
19131         for cf_add_2lib in $cf_add_libs; do
19132                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19133                         cf_add_1lib=
19134                         break
19135                 fi
19136         done
19137         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19138 done
19139 LIBS="$cf_add_libs"
19140
19141                                         cf_regex_func=regcomp
19142                                         break
19143 fi
19144
19145                 done
19146
19147 fi
19148
19149         ;;
19150 esac
19151
19152 if test "$cf_regex_func" = no ; then
19153         echo "$as_me:19153: checking for compile" >&5
19154 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19155 if test "${ac_cv_func_compile+set}" = set; then
19156   echo $ECHO_N "(cached) $ECHO_C" >&6
19157 else
19158   cat >conftest.$ac_ext <<_ACEOF
19159 #line 19159 "configure"
19160 #include "confdefs.h"
19161 #define compile autoconf_temporary
19162 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19163 #undef compile
19164
19165 #ifdef __cplusplus
19166 extern "C"
19167 #endif
19168
19169 /* We use char because int might match the return type of a gcc2
19170    builtin and then its argument prototype would still apply.  */
19171 char compile (void);
19172
19173 int
19174 main (void)
19175 {
19176
19177 /* The GNU C library defines stubs for functions which it implements
19178     to always fail with ENOSYS.  Some functions are actually named
19179     something starting with __ and the normal name is an alias.  */
19180 #if defined (__stub_compile) || defined (__stub___compile)
19181 #error found stub for compile
19182 #endif
19183
19184         return compile ();
19185   ;
19186   return 0;
19187 }
19188 _ACEOF
19189 rm -f conftest.$ac_objext conftest$ac_exeext
19190 if { (eval echo "$as_me:19190: \"$ac_link\"") >&5
19191   (eval $ac_link) 2>&5
19192   ac_status=$?
19193   echo "$as_me:19193: \$? = $ac_status" >&5
19194   (exit $ac_status); } &&
19195          { ac_try='test -s conftest$ac_exeext'
19196   { (eval echo "$as_me:19196: \"$ac_try\"") >&5
19197   (eval $ac_try) 2>&5
19198   ac_status=$?
19199   echo "$as_me:19199: \$? = $ac_status" >&5
19200   (exit $ac_status); }; }; then
19201   ac_cv_func_compile=yes
19202 else
19203   echo "$as_me: failed program was:" >&5
19204 cat conftest.$ac_ext >&5
19205 ac_cv_func_compile=no
19206 fi
19207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19208 fi
19209 echo "$as_me:19209: result: $ac_cv_func_compile" >&5
19210 echo "${ECHO_T}$ac_cv_func_compile" >&6
19211 if test $ac_cv_func_compile = yes; then
19212   cf_regex_func=compile
19213 else
19214
19215                 echo "$as_me:19215: checking for compile in -lgen" >&5
19216 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19217 if test "${ac_cv_lib_gen_compile+set}" = set; then
19218   echo $ECHO_N "(cached) $ECHO_C" >&6
19219 else
19220   ac_check_lib_save_LIBS=$LIBS
19221 LIBS="-lgen  $LIBS"
19222 cat >conftest.$ac_ext <<_ACEOF
19223 #line 19223 "configure"
19224 #include "confdefs.h"
19225
19226 /* Override any gcc2 internal prototype to avoid an error.  */
19227 #ifdef __cplusplus
19228 extern "C"
19229 #endif
19230 /* We use char because int might match the return type of a gcc2
19231    builtin and then its argument prototype would still apply.  */
19232 char compile ();
19233 int
19234 main (void)
19235 {
19236 compile ();
19237   ;
19238   return 0;
19239 }
19240 _ACEOF
19241 rm -f conftest.$ac_objext conftest$ac_exeext
19242 if { (eval echo "$as_me:19242: \"$ac_link\"") >&5
19243   (eval $ac_link) 2>&5
19244   ac_status=$?
19245   echo "$as_me:19245: \$? = $ac_status" >&5
19246   (exit $ac_status); } &&
19247          { ac_try='test -s conftest$ac_exeext'
19248   { (eval echo "$as_me:19248: \"$ac_try\"") >&5
19249   (eval $ac_try) 2>&5
19250   ac_status=$?
19251   echo "$as_me:19251: \$? = $ac_status" >&5
19252   (exit $ac_status); }; }; then
19253   ac_cv_lib_gen_compile=yes
19254 else
19255   echo "$as_me: failed program was:" >&5
19256 cat conftest.$ac_ext >&5
19257 ac_cv_lib_gen_compile=no
19258 fi
19259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19260 LIBS=$ac_check_lib_save_LIBS
19261 fi
19262 echo "$as_me:19262: result: $ac_cv_lib_gen_compile" >&5
19263 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19264 if test $ac_cv_lib_gen_compile = yes; then
19265
19266 cf_add_libs="$LIBS"
19267 # reverse order
19268 cf_add_0lib=
19269 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19270 # filter duplicates
19271 for cf_add_1lib in $cf_add_0lib; do
19272         for cf_add_2lib in $cf_add_libs; do
19273                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19274                         cf_add_1lib=
19275                         break
19276                 fi
19277         done
19278         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19279 done
19280 LIBS="$cf_add_libs"
19281
19282                                 cf_regex_func=compile
19283 fi
19284
19285 fi
19286
19287 fi
19288
19289 if test "$cf_regex_func" = no ; then
19290         { echo "$as_me:19290: WARNING: cannot find regular expression library" >&5
19291 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19292 fi
19293
19294 echo "$as_me:19294: checking for regular-expression headers" >&5
19295 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19296 if test "${cf_cv_regex_hdrs+set}" = set; then
19297   echo $ECHO_N "(cached) $ECHO_C" >&6
19298 else
19299
19300 cf_cv_regex_hdrs=no
19301 case $cf_regex_func in
19302 (compile)
19303         for cf_regex_hdr in regexp.h regexpr.h
19304         do
19305                 cat >conftest.$ac_ext <<_ACEOF
19306 #line 19306 "configure"
19307 #include "confdefs.h"
19308 #include <$cf_regex_hdr>
19309 int
19310 main (void)
19311 {
19312
19313                         char *p = compile("", "", "", 0);
19314                         int x = step("", "");
19315                         (void)p;
19316                         (void)x;
19317
19318   ;
19319   return 0;
19320 }
19321 _ACEOF
19322 rm -f conftest.$ac_objext conftest$ac_exeext
19323 if { (eval echo "$as_me:19323: \"$ac_link\"") >&5
19324   (eval $ac_link) 2>&5
19325   ac_status=$?
19326   echo "$as_me:19326: \$? = $ac_status" >&5
19327   (exit $ac_status); } &&
19328          { ac_try='test -s conftest$ac_exeext'
19329   { (eval echo "$as_me:19329: \"$ac_try\"") >&5
19330   (eval $ac_try) 2>&5
19331   ac_status=$?
19332   echo "$as_me:19332: \$? = $ac_status" >&5
19333   (exit $ac_status); }; }; then
19334
19335                         cf_cv_regex_hdrs=$cf_regex_hdr
19336                         break
19337
19338 else
19339   echo "$as_me: failed program was:" >&5
19340 cat conftest.$ac_ext >&5
19341 fi
19342 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19343         done
19344         ;;
19345 (*)
19346         for cf_regex_hdr in regex.h
19347         do
19348                 cat >conftest.$ac_ext <<_ACEOF
19349 #line 19349 "configure"
19350 #include "confdefs.h"
19351 #include <sys/types.h>
19352 #include <$cf_regex_hdr>
19353 int
19354 main (void)
19355 {
19356
19357                         regex_t *p = 0;
19358                         int x = regcomp(p, "", 0);
19359                         int y = regexec(p, "", 0, 0, 0);
19360                         (void)x;
19361                         (void)y;
19362                         regfree(p);
19363
19364   ;
19365   return 0;
19366 }
19367 _ACEOF
19368 rm -f conftest.$ac_objext conftest$ac_exeext
19369 if { (eval echo "$as_me:19369: \"$ac_link\"") >&5
19370   (eval $ac_link) 2>&5
19371   ac_status=$?
19372   echo "$as_me:19372: \$? = $ac_status" >&5
19373   (exit $ac_status); } &&
19374          { ac_try='test -s conftest$ac_exeext'
19375   { (eval echo "$as_me:19375: \"$ac_try\"") >&5
19376   (eval $ac_try) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit $ac_status); }; }; then
19380
19381                         cf_cv_regex_hdrs=$cf_regex_hdr
19382                         break
19383
19384 else
19385   echo "$as_me: failed program was:" >&5
19386 cat conftest.$ac_ext >&5
19387 fi
19388 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19389         done
19390         ;;
19391 esac
19392
19393 fi
19394 echo "$as_me:19394: result: $cf_cv_regex_hdrs" >&5
19395 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19396
19397 case $cf_cv_regex_hdrs in
19398         (no)            { echo "$as_me:19398: WARNING: no regular expression header found" >&5
19399 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19400         (regex.h)
19401 cat >>confdefs.h <<\EOF
19402 #define HAVE_REGEX_H_FUNCS 1
19403 EOF
19404  ;;
19405         (regexp.h)
19406 cat >>confdefs.h <<\EOF
19407 #define HAVE_REGEXP_H_FUNCS 1
19408 EOF
19409  ;;
19410         (regexpr.h)
19411 cat >>confdefs.h <<\EOF
19412 #define HAVE_REGEXPR_H_FUNCS 1
19413 EOF
19414  ;;
19415 esac
19416
19417 for ac_header in \
19418 fcntl.h \
19419 getopt.h \
19420 limits.h \
19421 locale.h \
19422 math.h \
19423 poll.h \
19424 sys/ioctl.h \
19425 sys/param.h \
19426 sys/poll.h \
19427 sys/select.h \
19428 sys/time.h \
19429 sys/times.h \
19430 ttyent.h \
19431 unistd.h \
19432 wctype.h \
19433
19434 do
19435 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19436 echo "$as_me:19436: checking for $ac_header" >&5
19437 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19438 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19439   echo $ECHO_N "(cached) $ECHO_C" >&6
19440 else
19441   cat >conftest.$ac_ext <<_ACEOF
19442 #line 19442 "configure"
19443 #include "confdefs.h"
19444 #include <$ac_header>
19445 _ACEOF
19446 if { (eval echo "$as_me:19446: \"$ac_cpp conftest.$ac_ext\"") >&5
19447   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19448   ac_status=$?
19449   egrep -v '^ *\+' conftest.er1 >conftest.err
19450   rm -f conftest.er1
19451   cat conftest.err >&5
19452   echo "$as_me:19452: \$? = $ac_status" >&5
19453   (exit $ac_status); } >/dev/null; then
19454   if test -s conftest.err; then
19455     ac_cpp_err=$ac_c_preproc_warn_flag
19456   else
19457     ac_cpp_err=
19458   fi
19459 else
19460   ac_cpp_err=yes
19461 fi
19462 if test -z "$ac_cpp_err"; then
19463   eval "$as_ac_Header=yes"
19464 else
19465   echo "$as_me: failed program was:" >&5
19466   cat conftest.$ac_ext >&5
19467   eval "$as_ac_Header=no"
19468 fi
19469 rm -f conftest.err conftest.$ac_ext
19470 fi
19471 echo "$as_me:19471: result: `eval echo '${'$as_ac_Header'}'`" >&5
19472 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19473 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19474   cat >>confdefs.h <<EOF
19475 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19476 EOF
19477
19478 fi
19479 done
19480
19481 for ac_header in unistd.h getopt.h
19482 do
19483 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19484 echo "$as_me:19484: checking for $ac_header" >&5
19485 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19487   echo $ECHO_N "(cached) $ECHO_C" >&6
19488 else
19489   cat >conftest.$ac_ext <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492 #include <$ac_header>
19493 _ACEOF
19494 if { (eval echo "$as_me:19494: \"$ac_cpp conftest.$ac_ext\"") >&5
19495   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19496   ac_status=$?
19497   egrep -v '^ *\+' conftest.er1 >conftest.err
19498   rm -f conftest.er1
19499   cat conftest.err >&5
19500   echo "$as_me:19500: \$? = $ac_status" >&5
19501   (exit $ac_status); } >/dev/null; then
19502   if test -s conftest.err; then
19503     ac_cpp_err=$ac_c_preproc_warn_flag
19504   else
19505     ac_cpp_err=
19506   fi
19507 else
19508   ac_cpp_err=yes
19509 fi
19510 if test -z "$ac_cpp_err"; then
19511   eval "$as_ac_Header=yes"
19512 else
19513   echo "$as_me: failed program was:" >&5
19514   cat conftest.$ac_ext >&5
19515   eval "$as_ac_Header=no"
19516 fi
19517 rm -f conftest.err conftest.$ac_ext
19518 fi
19519 echo "$as_me:19519: result: `eval echo '${'$as_ac_Header'}'`" >&5
19520 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19521 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19522   cat >>confdefs.h <<EOF
19523 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19524 EOF
19525
19526 fi
19527 done
19528
19529 echo "$as_me:19529: checking for header declaring getopt variables" >&5
19530 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
19531 if test "${cf_cv_getopt_header+set}" = set; then
19532   echo $ECHO_N "(cached) $ECHO_C" >&6
19533 else
19534
19535 cf_cv_getopt_header=none
19536 for cf_header in stdio.h stdlib.h unistd.h getopt.h
19537 do
19538 cat >conftest.$ac_ext <<_ACEOF
19539 #line 19539 "configure"
19540 #include "confdefs.h"
19541
19542 #include <$cf_header>
19543 int
19544 main (void)
19545 {
19546 int x = optind; char *y = optarg
19547   ;
19548   return 0;
19549 }
19550 _ACEOF
19551 rm -f conftest.$ac_objext
19552 if { (eval echo "$as_me:19552: \"$ac_compile\"") >&5
19553   (eval $ac_compile) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit $ac_status); } &&
19557          { ac_try='test -s conftest.$ac_objext'
19558   { (eval echo "$as_me:19558: \"$ac_try\"") >&5
19559   (eval $ac_try) 2>&5
19560   ac_status=$?
19561   echo "$as_me:19561: \$? = $ac_status" >&5
19562   (exit $ac_status); }; }; then
19563   cf_cv_getopt_header=$cf_header
19564  break
19565 else
19566   echo "$as_me: failed program was:" >&5
19567 cat conftest.$ac_ext >&5
19568 fi
19569 rm -f conftest.$ac_objext conftest.$ac_ext
19570 done
19571
19572 fi
19573 echo "$as_me:19573: result: $cf_cv_getopt_header" >&5
19574 echo "${ECHO_T}$cf_cv_getopt_header" >&6
19575 if test $cf_cv_getopt_header != none ; then
19576
19577 cat >>confdefs.h <<\EOF
19578 #define HAVE_GETOPT_HEADER 1
19579 EOF
19580
19581 fi
19582 if test $cf_cv_getopt_header = getopt.h ; then
19583
19584 cat >>confdefs.h <<\EOF
19585 #define NEED_GETOPT_H 1
19586 EOF
19587
19588 fi
19589
19590 echo "$as_me:19590: checking if external environ is declared" >&5
19591 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
19592 if test "${cf_cv_dcl_environ+set}" = set; then
19593   echo $ECHO_N "(cached) $ECHO_C" >&6
19594 else
19595
19596     cat >conftest.$ac_ext <<_ACEOF
19597 #line 19597 "configure"
19598 #include "confdefs.h"
19599
19600 #ifdef HAVE_STDLIB_H
19601 #include <stdlib.h>
19602 #endif
19603 #include <unistd.h>
19604 int
19605 main (void)
19606 {
19607 int x = (int) environ
19608   ;
19609   return 0;
19610 }
19611 _ACEOF
19612 rm -f conftest.$ac_objext
19613 if { (eval echo "$as_me:19613: \"$ac_compile\"") >&5
19614   (eval $ac_compile) 2>&5
19615   ac_status=$?
19616   echo "$as_me:19616: \$? = $ac_status" >&5
19617   (exit $ac_status); } &&
19618          { ac_try='test -s conftest.$ac_objext'
19619   { (eval echo "$as_me:19619: \"$ac_try\"") >&5
19620   (eval $ac_try) 2>&5
19621   ac_status=$?
19622   echo "$as_me:19622: \$? = $ac_status" >&5
19623   (exit $ac_status); }; }; then
19624   cf_cv_dcl_environ=yes
19625 else
19626   echo "$as_me: failed program was:" >&5
19627 cat conftest.$ac_ext >&5
19628 cf_cv_dcl_environ=no
19629 fi
19630 rm -f conftest.$ac_objext conftest.$ac_ext
19631
19632 fi
19633 echo "$as_me:19633: result: $cf_cv_dcl_environ" >&5
19634 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
19635
19636 if test "$cf_cv_dcl_environ" = no ; then
19637
19638 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19639
19640     cat >>confdefs.h <<EOF
19641 #define $cf_result 1
19642 EOF
19643
19644 fi
19645
19646 # It's possible (for near-UNIX clones) that the data doesn't exist
19647
19648 echo "$as_me:19648: checking if external environ exists" >&5
19649 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
19650 if test "${cf_cv_have_environ+set}" = set; then
19651   echo $ECHO_N "(cached) $ECHO_C" >&6
19652 else
19653
19654         cat >conftest.$ac_ext <<_ACEOF
19655 #line 19655 "configure"
19656 #include "confdefs.h"
19657
19658 #undef environ
19659 extern int environ;
19660
19661 int
19662 main (void)
19663 {
19664 environ = 2
19665   ;
19666   return 0;
19667 }
19668 _ACEOF
19669 rm -f conftest.$ac_objext conftest$ac_exeext
19670 if { (eval echo "$as_me:19670: \"$ac_link\"") >&5
19671   (eval $ac_link) 2>&5
19672   ac_status=$?
19673   echo "$as_me:19673: \$? = $ac_status" >&5
19674   (exit $ac_status); } &&
19675          { ac_try='test -s conftest$ac_exeext'
19676   { (eval echo "$as_me:19676: \"$ac_try\"") >&5
19677   (eval $ac_try) 2>&5
19678   ac_status=$?
19679   echo "$as_me:19679: \$? = $ac_status" >&5
19680   (exit $ac_status); }; }; then
19681   cf_cv_have_environ=yes
19682 else
19683   echo "$as_me: failed program was:" >&5
19684 cat conftest.$ac_ext >&5
19685 cf_cv_have_environ=no
19686 fi
19687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19688
19689 fi
19690 echo "$as_me:19690: result: $cf_cv_have_environ" >&5
19691 echo "${ECHO_T}$cf_cv_have_environ" >&6
19692
19693 if test "$cf_cv_have_environ" = yes ; then
19694
19695 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19696
19697         cat >>confdefs.h <<EOF
19698 #define $cf_result 1
19699 EOF
19700
19701 fi
19702
19703 echo "$as_me:19703: checking for getenv" >&5
19704 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
19705 if test "${ac_cv_func_getenv+set}" = set; then
19706   echo $ECHO_N "(cached) $ECHO_C" >&6
19707 else
19708   cat >conftest.$ac_ext <<_ACEOF
19709 #line 19709 "configure"
19710 #include "confdefs.h"
19711 #define getenv autoconf_temporary
19712 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19713 #undef getenv
19714
19715 #ifdef __cplusplus
19716 extern "C"
19717 #endif
19718
19719 /* We use char because int might match the return type of a gcc2
19720    builtin and then its argument prototype would still apply.  */
19721 char getenv (void);
19722
19723 int
19724 main (void)
19725 {
19726
19727 /* The GNU C library defines stubs for functions which it implements
19728     to always fail with ENOSYS.  Some functions are actually named
19729     something starting with __ and the normal name is an alias.  */
19730 #if defined (__stub_getenv) || defined (__stub___getenv)
19731 #error found stub for getenv
19732 #endif
19733
19734         return getenv ();
19735   ;
19736   return 0;
19737 }
19738 _ACEOF
19739 rm -f conftest.$ac_objext conftest$ac_exeext
19740 if { (eval echo "$as_me:19740: \"$ac_link\"") >&5
19741   (eval $ac_link) 2>&5
19742   ac_status=$?
19743   echo "$as_me:19743: \$? = $ac_status" >&5
19744   (exit $ac_status); } &&
19745          { ac_try='test -s conftest$ac_exeext'
19746   { (eval echo "$as_me:19746: \"$ac_try\"") >&5
19747   (eval $ac_try) 2>&5
19748   ac_status=$?
19749   echo "$as_me:19749: \$? = $ac_status" >&5
19750   (exit $ac_status); }; }; then
19751   ac_cv_func_getenv=yes
19752 else
19753   echo "$as_me: failed program was:" >&5
19754 cat conftest.$ac_ext >&5
19755 ac_cv_func_getenv=no
19756 fi
19757 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19758 fi
19759 echo "$as_me:19759: result: $ac_cv_func_getenv" >&5
19760 echo "${ECHO_T}$ac_cv_func_getenv" >&6
19761
19762 for ac_func in putenv setenv strdup
19763 do
19764 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19765 echo "$as_me:19765: checking for $ac_func" >&5
19766 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19767 if eval "test \"\${$as_ac_var+set}\" = set"; then
19768   echo $ECHO_N "(cached) $ECHO_C" >&6
19769 else
19770   cat >conftest.$ac_ext <<_ACEOF
19771 #line 19771 "configure"
19772 #include "confdefs.h"
19773 #define $ac_func autoconf_temporary
19774 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19775 #undef $ac_func
19776
19777 #ifdef __cplusplus
19778 extern "C"
19779 #endif
19780
19781 /* We use char because int might match the return type of a gcc2
19782    builtin and then its argument prototype would still apply.  */
19783 char $ac_func (void);
19784
19785 int
19786 main (void)
19787 {
19788
19789 /* The GNU C library defines stubs for functions which it implements
19790     to always fail with ENOSYS.  Some functions are actually named
19791     something starting with __ and the normal name is an alias.  */
19792 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19793 #error found stub for $ac_func
19794 #endif
19795
19796         return $ac_func ();
19797   ;
19798   return 0;
19799 }
19800 _ACEOF
19801 rm -f conftest.$ac_objext conftest$ac_exeext
19802 if { (eval echo "$as_me:19802: \"$ac_link\"") >&5
19803   (eval $ac_link) 2>&5
19804   ac_status=$?
19805   echo "$as_me:19805: \$? = $ac_status" >&5
19806   (exit $ac_status); } &&
19807          { ac_try='test -s conftest$ac_exeext'
19808   { (eval echo "$as_me:19808: \"$ac_try\"") >&5
19809   (eval $ac_try) 2>&5
19810   ac_status=$?
19811   echo "$as_me:19811: \$? = $ac_status" >&5
19812   (exit $ac_status); }; }; then
19813   eval "$as_ac_var=yes"
19814 else
19815   echo "$as_me: failed program was:" >&5
19816 cat conftest.$ac_ext >&5
19817 eval "$as_ac_var=no"
19818 fi
19819 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19820 fi
19821 echo "$as_me:19821: result: `eval echo '${'$as_ac_var'}'`" >&5
19822 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19823 if test `eval echo '${'$as_ac_var'}'` = yes; then
19824   cat >>confdefs.h <<EOF
19825 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19826 EOF
19827
19828 fi
19829 done
19830
19831 echo "$as_me:19831: checking if getenv returns consistent values" >&5
19832 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19833 if test "${cf_cv_consistent_getenv+set}" = set; then
19834   echo $ECHO_N "(cached) $ECHO_C" >&6
19835 else
19836
19837 if test "$cross_compiling" = yes; then
19838   cf_cv_consistent_getenv=unknown
19839 else
19840   cat >conftest.$ac_ext <<_ACEOF
19841 #line 19841 "configure"
19842 #include "confdefs.h"
19843
19844 #include <stdlib.h>
19845 #include <unistd.h>
19846 #include <stdio.h>
19847 #include <string.h>
19848 #include <sys/types.h>
19849
19850 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19851 extern char **environ;  /* POSIX, but some systems are not... */
19852 #endif
19853
19854 #if defined(HAVE_STRDUP)
19855 #define str_alloc(s) strdup(s)
19856 #else
19857 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19858 #endif
19859
19860 static void set_value(const char *name, const char *value)
19861 {
19862 #if defined(HAVE_SETENV)
19863         setenv(name, value, 1);
19864 #elif defined(HAVE_PUTENV)
19865         char buffer[1024];
19866         sprintf(buffer, "%s=%s", name, value);
19867         putenv(str_alloc(buffer));
19868 #else
19869 #error neither putenv/setenv found
19870 #endif
19871 }
19872 int main(void)
19873 {
19874         int pass;
19875         size_t numenv, limit, j;
19876         char **mynames;
19877         char **myvalues;
19878         char **mypointer;
19879         char *equals;
19880         for (numenv = 0; environ[numenv]; ++numenv) ;
19881         limit = numenv + 10;
19882         mynames = (char **) calloc(limit + 1, sizeof(char *));
19883         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19884         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19885 #if defined(HAVE_ENVIRON)
19886         for (j = 0; environ[j]; ++j) {
19887                 mynames[j] = str_alloc(environ[j]);
19888                 equals = strchr(mynames[j], '=');
19889                 if (equals != 0) {
19890                         *equals++ = '\0';
19891                         myvalues[j] = str_alloc(equals);
19892                 } else {
19893                         myvalues[j] = str_alloc("");
19894                 }
19895         }
19896 #endif
19897         for (j = numenv; j < limit; ++j) {
19898                 char name[80];
19899                 char value[80];
19900                 size_t found;
19901                 size_t k = 0;
19902                 do {
19903                         size_t jk;
19904                         found = 0;
19905                         sprintf(name, "TERM%lu", (unsigned long) k);
19906                         for (jk = 0; jk < j; ++jk) {
19907                                 if (!strcmp(name, mynames[jk])) {
19908                                         found = 1;
19909                                         ++k;
19910                                         break;
19911                                 }
19912                         }
19913                 } while (found);
19914                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19915                 set_value(name, value);
19916                 mynames[j] = str_alloc(name);
19917                 myvalues[j] = str_alloc(value);
19918         }
19919         for (pass = 0; pass < 3; ++pass) {
19920                 for (j = 0; j < limit; ++j) {
19921                         char *value = getenv(mynames[j]);
19922                         if (pass) {
19923                                 if (value == 0) {
19924                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19925                                         ${cf_cv_main_return:-return}(1);
19926                                 } else if (value != mypointer[j]) {
19927                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19928                                         ${cf_cv_main_return:-return}(1);
19929                                 } else if (strcmp(value, myvalues[j])) {
19930                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19931                                         ${cf_cv_main_return:-return}(1);
19932                                 }
19933                         } else {
19934                                 size_t k;
19935                                 mypointer[j] = value;
19936                                 for (k = 0; k < j; ++k) {
19937                                         if (mypointer[j] == mypointer[k]) {
19938                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19939                                                 ${cf_cv_main_return:-return}(1);
19940                                         }
19941                                 }
19942                         }
19943                 }
19944         }
19945         ${cf_cv_main_return:-return}(0);
19946 }
19947
19948 _ACEOF
19949 rm -f conftest$ac_exeext
19950 if { (eval echo "$as_me:19950: \"$ac_link\"") >&5
19951   (eval $ac_link) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19955   { (eval echo "$as_me:19955: \"$ac_try\"") >&5
19956   (eval $ac_try) 2>&5
19957   ac_status=$?
19958   echo "$as_me:19958: \$? = $ac_status" >&5
19959   (exit $ac_status); }; }; then
19960   cf_cv_consistent_getenv=yes
19961 else
19962   echo "$as_me: program exited with status $ac_status" >&5
19963 echo "$as_me: failed program was:" >&5
19964 cat conftest.$ac_ext >&5
19965 cf_cv_consistent_getenv=no
19966 fi
19967 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19968 fi
19969
19970 fi
19971 echo "$as_me:19971: result: $cf_cv_consistent_getenv" >&5
19972 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19973
19974 if test "x$cf_cv_consistent_getenv" = xno
19975 then
19976
19977 cat >>confdefs.h <<\EOF
19978 #define HAVE_CONSISTENT_GETENV 1
19979 EOF
19980
19981 fi
19982
19983 if test "x$cf_cv_consistent_getenv" = xno && \
19984         test "x$cf_with_trace" = xyes
19985 then
19986         { echo "$as_me:19986: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19987 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19988 fi
19989
19990 echo "$as_me:19990: checking if sys/time.h works with sys/select.h" >&5
19991 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19992 if test "${cf_cv_sys_time_select+set}" = set; then
19993   echo $ECHO_N "(cached) $ECHO_C" >&6
19994 else
19995
19996 cat >conftest.$ac_ext <<_ACEOF
19997 #line 19997 "configure"
19998 #include "confdefs.h"
19999
20000 #include <sys/types.h>
20001 #ifdef HAVE_SYS_TIME_H
20002 #include <sys/time.h>
20003 #endif
20004 #ifdef HAVE_SYS_SELECT_H
20005 #include <sys/select.h>
20006 #endif
20007
20008 int
20009 main (void)
20010 {
20011
20012   ;
20013   return 0;
20014 }
20015 _ACEOF
20016 rm -f conftest.$ac_objext
20017 if { (eval echo "$as_me:20017: \"$ac_compile\"") >&5
20018   (eval $ac_compile) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit $ac_status); } &&
20022          { ac_try='test -s conftest.$ac_objext'
20023   { (eval echo "$as_me:20023: \"$ac_try\"") >&5
20024   (eval $ac_try) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit $ac_status); }; }; then
20028   cf_cv_sys_time_select=yes
20029 else
20030   echo "$as_me: failed program was:" >&5
20031 cat conftest.$ac_ext >&5
20032 cf_cv_sys_time_select=no
20033 fi
20034 rm -f conftest.$ac_objext conftest.$ac_ext
20035
20036 fi
20037
20038 echo "$as_me:20038: result: $cf_cv_sys_time_select" >&5
20039 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20040 test "$cf_cv_sys_time_select" = yes &&
20041 cat >>confdefs.h <<\EOF
20042 #define HAVE_SYS_TIME_SELECT 1
20043 EOF
20044
20045 ###     checks for compiler characteristics
20046 ac_ext=c
20047 ac_cpp='$CPP $CPPFLAGS'
20048 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20049 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20051 ac_main_return=return
20052
20053 echo "$as_me:20053: checking for an ANSI C-conforming const" >&5
20054 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20055 if test "${ac_cv_c_const+set}" = set; then
20056   echo $ECHO_N "(cached) $ECHO_C" >&6
20057 else
20058   cat >conftest.$ac_ext <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061
20062 int
20063 main (void)
20064 {
20065 /* FIXME: Include the comments suggested by Paul. */
20066 #ifndef __cplusplus
20067   /* Ultrix mips cc rejects this.  */
20068   typedef int charset[2];
20069   const charset x;
20070   /* SunOS 4.1.1 cc rejects this.  */
20071   char const *const *ccp;
20072   char **p;
20073   /* NEC SVR4.0.2 mips cc rejects this.  */
20074   struct point {int x, y;};
20075   static struct point const zero = {0,0};
20076   /* AIX XL C 1.02.0.0 rejects this.
20077      It does not let you subtract one const X* pointer from another in
20078      an arm of an if-expression whose if-part is not a constant
20079      expression */
20080   const char *g = "string";
20081   ccp = &g + (g ? g-g : 0);
20082   /* HPUX 7.0 cc rejects these. */
20083   ++ccp;
20084   p = (char**) ccp;
20085   ccp = (char const *const *) p;
20086   { /* SCO 3.2v4 cc rejects this.  */
20087     char *t;
20088     char const *s = 0 ? (char *) 0 : (char const *) 0;
20089
20090     *t++ = 0;
20091   }
20092   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20093     int x[] = {25, 17};
20094     const int *foo = &x[0];
20095     ++foo;
20096   }
20097   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20098     typedef const int *iptr;
20099     iptr p = 0;
20100     ++p;
20101   }
20102   { /* AIX XL C 1.02.0.0 rejects this saying
20103        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20104     struct s { int j; const int *ap[3]; };
20105     struct s *b; b->j = 5;
20106   }
20107   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20108     const int foo = 10;
20109   }
20110 #endif
20111
20112   ;
20113   return 0;
20114 }
20115 _ACEOF
20116 rm -f conftest.$ac_objext
20117 if { (eval echo "$as_me:20117: \"$ac_compile\"") >&5
20118   (eval $ac_compile) 2>&5
20119   ac_status=$?
20120   echo "$as_me:20120: \$? = $ac_status" >&5
20121   (exit $ac_status); } &&
20122          { ac_try='test -s conftest.$ac_objext'
20123   { (eval echo "$as_me:20123: \"$ac_try\"") >&5
20124   (eval $ac_try) 2>&5
20125   ac_status=$?
20126   echo "$as_me:20126: \$? = $ac_status" >&5
20127   (exit $ac_status); }; }; then
20128   ac_cv_c_const=yes
20129 else
20130   echo "$as_me: failed program was:" >&5
20131 cat conftest.$ac_ext >&5
20132 ac_cv_c_const=no
20133 fi
20134 rm -f conftest.$ac_objext conftest.$ac_ext
20135 fi
20136 echo "$as_me:20136: result: $ac_cv_c_const" >&5
20137 echo "${ECHO_T}$ac_cv_c_const" >&6
20138 if test $ac_cv_c_const = no; then
20139
20140 cat >>confdefs.h <<\EOF
20141 #define const
20142 EOF
20143
20144 fi
20145
20146 echo "$as_me:20146: checking for inline" >&5
20147 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20148 if test "${ac_cv_c_inline+set}" = set; then
20149   echo $ECHO_N "(cached) $ECHO_C" >&6
20150 else
20151   ac_cv_c_inline=no
20152 for ac_kw in inline __inline__ __inline; do
20153   cat >conftest.$ac_ext <<_ACEOF
20154 #line 20154 "configure"
20155 #include "confdefs.h"
20156 #ifndef __cplusplus
20157 static $ac_kw int static_foo () {return 0; }
20158 $ac_kw int foo () {return 0; }
20159 #endif
20160
20161 _ACEOF
20162 rm -f conftest.$ac_objext
20163 if { (eval echo "$as_me:20163: \"$ac_compile\"") >&5
20164   (eval $ac_compile) 2>&5
20165   ac_status=$?
20166   echo "$as_me:20166: \$? = $ac_status" >&5
20167   (exit $ac_status); } &&
20168          { ac_try='test -s conftest.$ac_objext'
20169   { (eval echo "$as_me:20169: \"$ac_try\"") >&5
20170   (eval $ac_try) 2>&5
20171   ac_status=$?
20172   echo "$as_me:20172: \$? = $ac_status" >&5
20173   (exit $ac_status); }; }; then
20174   ac_cv_c_inline=$ac_kw; break
20175 else
20176   echo "$as_me: failed program was:" >&5
20177 cat conftest.$ac_ext >&5
20178 fi
20179 rm -f conftest.$ac_objext conftest.$ac_ext
20180 done
20181
20182 fi
20183 echo "$as_me:20183: result: $ac_cv_c_inline" >&5
20184 echo "${ECHO_T}$ac_cv_c_inline" >&6
20185 case $ac_cv_c_inline in
20186   inline | yes) ;;
20187   no)
20188 cat >>confdefs.h <<\EOF
20189 #define inline
20190 EOF
20191  ;;
20192   *)  cat >>confdefs.h <<EOF
20193 #define inline $ac_cv_c_inline
20194 EOF
20195  ;;
20196 esac
20197
20198 NCURSES_INLINE=
20199 if test "$ac_cv_c_inline" != no ; then
20200         NCURSES_INLINE=inline
20201         if test "$INTEL_COMPILER" = yes
20202         then
20203                 :
20204         elif test "$CLANG_COMPILER" = yes
20205         then
20206                 :
20207         elif test "$GCC" = yes
20208         then
20209                 echo "$as_me:20209: checking if $CC supports options to tune inlining" >&5
20210 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20211 if test "${cf_cv_gcc_inline+set}" = set; then
20212   echo $ECHO_N "(cached) $ECHO_C" >&6
20213 else
20214
20215                 cf_save_CFLAGS=$CFLAGS
20216                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20217                 cat >conftest.$ac_ext <<_ACEOF
20218 #line 20218 "configure"
20219 #include "confdefs.h"
20220 inline int foo(void) { return 1; }
20221 int
20222 main (void)
20223 {
20224 ${cf_cv_main_return:-return} foo()
20225   ;
20226   return 0;
20227 }
20228 _ACEOF
20229 rm -f conftest.$ac_objext
20230 if { (eval echo "$as_me:20230: \"$ac_compile\"") >&5
20231   (eval $ac_compile) 2>&5
20232   ac_status=$?
20233   echo "$as_me:20233: \$? = $ac_status" >&5
20234   (exit $ac_status); } &&
20235          { ac_try='test -s conftest.$ac_objext'
20236   { (eval echo "$as_me:20236: \"$ac_try\"") >&5
20237   (eval $ac_try) 2>&5
20238   ac_status=$?
20239   echo "$as_me:20239: \$? = $ac_status" >&5
20240   (exit $ac_status); }; }; then
20241   cf_cv_gcc_inline=yes
20242 else
20243   echo "$as_me: failed program was:" >&5
20244 cat conftest.$ac_ext >&5
20245 cf_cv_gcc_inline=no
20246 fi
20247 rm -f conftest.$ac_objext conftest.$ac_ext
20248                 CFLAGS=$cf_save_CFLAGS
20249
20250 fi
20251 echo "$as_me:20251: result: $cf_cv_gcc_inline" >&5
20252 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20253                 if test "$cf_cv_gcc_inline" = yes ; then
20254
20255 cf_fix_cppflags=no
20256 cf_new_cflags=
20257 cf_new_cppflags=
20258 cf_new_extra_cppflags=
20259
20260 for cf_add_cflags in --param max-inline-insns-single=1200
20261 do
20262 case $cf_fix_cppflags in
20263 (no)
20264         case $cf_add_cflags in
20265         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20266                 case $cf_add_cflags in
20267                 (-D*)
20268                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20269
20270                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20271                                 && test -z "${cf_tst_cflags}" \
20272                                 && cf_fix_cppflags=yes
20273
20274                         if test $cf_fix_cppflags = yes ; then
20275
20276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20278
20279                                 continue
20280                         elif test "${cf_tst_cflags}" = "\"'" ; then
20281
20282         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20283         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20284
20285                                 continue
20286                         fi
20287                         ;;
20288                 esac
20289                 case "$CPPFLAGS" in
20290                 (*$cf_add_cflags)
20291                         ;;
20292                 (*)
20293                         case $cf_add_cflags in
20294                         (-D*)
20295                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20296
20297 CPPFLAGS=`echo "$CPPFLAGS" | \
20298         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20299                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20300
20301                                 ;;
20302                         esac
20303
20304         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20305         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20306
20307                         ;;
20308                 esac
20309                 ;;
20310         (*)
20311
20312         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20313         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20314
20315                 ;;
20316         esac
20317         ;;
20318 (yes)
20319
20320         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20321         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20322
20323         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20324
20325         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20326                 && test -z "${cf_tst_cflags}" \
20327                 && cf_fix_cppflags=no
20328         ;;
20329 esac
20330 done
20331
20332 if test -n "$cf_new_cflags" ; then
20333
20334         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20335         CFLAGS="${CFLAGS}$cf_new_cflags"
20336
20337 fi
20338
20339 if test -n "$cf_new_cppflags" ; then
20340
20341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20342         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20343
20344 fi
20345
20346 if test -n "$cf_new_extra_cppflags" ; then
20347
20348         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20349         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20350
20351 fi
20352
20353                 fi
20354         fi
20355 fi
20356
20357 echo "$as_me:20357: checking for signal global datatype" >&5
20358 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20359 if test "${cf_cv_sig_atomic_t+set}" = set; then
20360   echo $ECHO_N "(cached) $ECHO_C" >&6
20361 else
20362
20363         for cf_type in \
20364                 "volatile sig_atomic_t" \
20365                 "sig_atomic_t" \
20366                 "int"
20367         do
20368         cat >conftest.$ac_ext <<_ACEOF
20369 #line 20369 "configure"
20370 #include "confdefs.h"
20371
20372 #include <sys/types.h>
20373 #include <signal.h>
20374 #include <stdio.h>
20375
20376 extern $cf_type x;
20377 $cf_type x;
20378 static void handler(int sig)
20379 {
20380         (void)sig;
20381         x = 5;
20382 }
20383 int
20384 main (void)
20385 {
20386 signal(SIGINT, handler);
20387                  x = 1
20388   ;
20389   return 0;
20390 }
20391 _ACEOF
20392 rm -f conftest.$ac_objext
20393 if { (eval echo "$as_me:20393: \"$ac_compile\"") >&5
20394   (eval $ac_compile) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit $ac_status); } &&
20398          { ac_try='test -s conftest.$ac_objext'
20399   { (eval echo "$as_me:20399: \"$ac_try\"") >&5
20400   (eval $ac_try) 2>&5
20401   ac_status=$?
20402   echo "$as_me:20402: \$? = $ac_status" >&5
20403   (exit $ac_status); }; }; then
20404   cf_cv_sig_atomic_t=$cf_type
20405 else
20406   echo "$as_me: failed program was:" >&5
20407 cat conftest.$ac_ext >&5
20408 cf_cv_sig_atomic_t=no
20409 fi
20410 rm -f conftest.$ac_objext conftest.$ac_ext
20411                 test "$cf_cv_sig_atomic_t" != no && break
20412         done
20413
20414 fi
20415
20416 echo "$as_me:20416: result: $cf_cv_sig_atomic_t" >&5
20417 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
20418 test "$cf_cv_sig_atomic_t" != no &&
20419 cat >>confdefs.h <<EOF
20420 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
20421 EOF
20422
20423 if test $NCURSES_CHTYPE = auto ; then
20424
20425 echo "$as_me:20425: checking for type of chtype" >&5
20426 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
20427 if test "${cf_cv_typeof_chtype+set}" = set; then
20428   echo $ECHO_N "(cached) $ECHO_C" >&6
20429 else
20430
20431                 if test "$cross_compiling" = yes; then
20432   cf_cv_typeof_chtype=long
20433 else
20434   cat >conftest.$ac_ext <<_ACEOF
20435 #line 20435 "configure"
20436 #include "confdefs.h"
20437
20438 #define WANT_BITS 31
20439 #include <stdio.h>
20440 int main(void)
20441 {
20442         FILE *fp = fopen("cf_test.out", "w");
20443         if (fp != 0) {
20444                 char *result = "long";
20445                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
20446                         int n;
20447                         unsigned int x, y;
20448                         for (n = 0; n < WANT_BITS; n++) {
20449                                 x = (1 << n);
20450                                 y = (x >> n);
20451                                 if (y != 1 || x == 0) {
20452                                         x = 0;
20453                                         break;
20454                                 }
20455                         }
20456                         /*
20457                          * If x is nonzero, an int is big enough for the bits
20458                          * that we want.
20459                          */
20460                         result = (x != 0) ? "int" : "long";
20461                 }
20462                 fputs(result, fp);
20463                 fclose(fp);
20464         }
20465         ${cf_cv_main_return:-return}(0);
20466 }
20467
20468 _ACEOF
20469 rm -f conftest$ac_exeext
20470 if { (eval echo "$as_me:20470: \"$ac_link\"") >&5
20471   (eval $ac_link) 2>&5
20472   ac_status=$?
20473   echo "$as_me:20473: \$? = $ac_status" >&5
20474   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20475   { (eval echo "$as_me:20475: \"$ac_try\"") >&5
20476   (eval $ac_try) 2>&5
20477   ac_status=$?
20478   echo "$as_me:20478: \$? = $ac_status" >&5
20479   (exit $ac_status); }; }; then
20480   cf_cv_typeof_chtype=`cat cf_test.out`
20481 else
20482   echo "$as_me: program exited with status $ac_status" >&5
20483 echo "$as_me: failed program was:" >&5
20484 cat conftest.$ac_ext >&5
20485 cf_cv_typeof_chtype=long
20486 fi
20487 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20488 fi
20489                 rm -f cf_test.out
20490
20491 fi
20492
20493 echo "$as_me:20493: result: $cf_cv_typeof_chtype" >&5
20494 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
20495
20496 cat >>confdefs.h <<EOF
20497 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
20498 EOF
20499
20500 else
20501         cf_cv_typeof_chtype=$NCURSES_CHTYPE
20502 fi
20503 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
20504
20505 echo "$as_me:20505: checking if unsigned literals are legal" >&5
20506 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
20507 if test "${cf_cv_unsigned_literals+set}" = set; then
20508   echo $ECHO_N "(cached) $ECHO_C" >&6
20509 else
20510
20511         cat >conftest.$ac_ext <<_ACEOF
20512 #line 20512 "configure"
20513 #include "confdefs.h"
20514
20515 int
20516 main (void)
20517 {
20518 long x = 1L + 1UL + 1U + 1
20519   ;
20520   return 0;
20521 }
20522 _ACEOF
20523 rm -f conftest.$ac_objext
20524 if { (eval echo "$as_me:20524: \"$ac_compile\"") >&5
20525   (eval $ac_compile) 2>&5
20526   ac_status=$?
20527   echo "$as_me:20527: \$? = $ac_status" >&5
20528   (exit $ac_status); } &&
20529          { ac_try='test -s conftest.$ac_objext'
20530   { (eval echo "$as_me:20530: \"$ac_try\"") >&5
20531   (eval $ac_try) 2>&5
20532   ac_status=$?
20533   echo "$as_me:20533: \$? = $ac_status" >&5
20534   (exit $ac_status); }; }; then
20535   cf_cv_unsigned_literals=yes
20536 else
20537   echo "$as_me: failed program was:" >&5
20538 cat conftest.$ac_ext >&5
20539 cf_cv_unsigned_literals=no
20540 fi
20541 rm -f conftest.$ac_objext conftest.$ac_ext
20542
20543 fi
20544
20545 echo "$as_me:20545: result: $cf_cv_unsigned_literals" >&5
20546 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
20547
20548 cf_cv_1UL="1"
20549 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
20550 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
20551
20552 if test $NCURSES_MMASK_T = auto ; then
20553         cf_cv_typeof_mmask_t=long
20554 else
20555         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
20556 fi
20557 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
20558
20559 ###     Checks for external-data
20560
20561 echo "$as_me:20561: checking if external errno is declared" >&5
20562 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
20563 if test "${cf_cv_dcl_errno+set}" = set; then
20564   echo $ECHO_N "(cached) $ECHO_C" >&6
20565 else
20566
20567         cat >conftest.$ac_ext <<_ACEOF
20568 #line 20568 "configure"
20569 #include "confdefs.h"
20570
20571 #ifdef HAVE_STDLIB_H
20572 #include <stdlib.h>
20573 #endif
20574 #include <stdio.h>
20575 #include <sys/types.h>
20576 #include <errno.h>
20577 int
20578 main (void)
20579 {
20580 int x = (int) errno; (void)x
20581   ;
20582   return 0;
20583 }
20584 _ACEOF
20585 rm -f conftest.$ac_objext
20586 if { (eval echo "$as_me:20586: \"$ac_compile\"") >&5
20587   (eval $ac_compile) 2>&5
20588   ac_status=$?
20589   echo "$as_me:20589: \$? = $ac_status" >&5
20590   (exit $ac_status); } &&
20591          { ac_try='test -s conftest.$ac_objext'
20592   { (eval echo "$as_me:20592: \"$ac_try\"") >&5
20593   (eval $ac_try) 2>&5
20594   ac_status=$?
20595   echo "$as_me:20595: \$? = $ac_status" >&5
20596   (exit $ac_status); }; }; then
20597   cf_cv_dcl_errno=yes
20598 else
20599   echo "$as_me: failed program was:" >&5
20600 cat conftest.$ac_ext >&5
20601 cf_cv_dcl_errno=no
20602 fi
20603 rm -f conftest.$ac_objext conftest.$ac_ext
20604
20605 fi
20606 echo "$as_me:20606: result: $cf_cv_dcl_errno" >&5
20607 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
20608
20609 if test "$cf_cv_dcl_errno" = no ; then
20610
20611 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20612
20613         cat >>confdefs.h <<EOF
20614 #define $cf_result 1
20615 EOF
20616
20617 fi
20618
20619 # It's possible (for near-UNIX clones) that the data doesn't exist
20620
20621 echo "$as_me:20621: checking if external errno exists" >&5
20622 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
20623 if test "${cf_cv_have_errno+set}" = set; then
20624   echo $ECHO_N "(cached) $ECHO_C" >&6
20625 else
20626
20627         cat >conftest.$ac_ext <<_ACEOF
20628 #line 20628 "configure"
20629 #include "confdefs.h"
20630
20631 #undef errno
20632 extern int errno;
20633
20634 int
20635 main (void)
20636 {
20637 errno = 2
20638   ;
20639   return 0;
20640 }
20641 _ACEOF
20642 rm -f conftest.$ac_objext conftest$ac_exeext
20643 if { (eval echo "$as_me:20643: \"$ac_link\"") >&5
20644   (eval $ac_link) 2>&5
20645   ac_status=$?
20646   echo "$as_me:20646: \$? = $ac_status" >&5
20647   (exit $ac_status); } &&
20648          { ac_try='test -s conftest$ac_exeext'
20649   { (eval echo "$as_me:20649: \"$ac_try\"") >&5
20650   (eval $ac_try) 2>&5
20651   ac_status=$?
20652   echo "$as_me:20652: \$? = $ac_status" >&5
20653   (exit $ac_status); }; }; then
20654   cf_cv_have_errno=yes
20655 else
20656   echo "$as_me: failed program was:" >&5
20657 cat conftest.$ac_ext >&5
20658 cf_cv_have_errno=no
20659 fi
20660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20661
20662 fi
20663 echo "$as_me:20663: result: $cf_cv_have_errno" >&5
20664 echo "${ECHO_T}$cf_cv_have_errno" >&6
20665
20666 if test "$cf_cv_have_errno" = yes ; then
20667
20668 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20669
20670         cat >>confdefs.h <<EOF
20671 #define $cf_result 1
20672 EOF
20673
20674 fi
20675
20676 echo "$as_me:20676: checking if data-only library module links" >&5
20677 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
20678 if test "${cf_cv_link_dataonly+set}" = set; then
20679   echo $ECHO_N "(cached) $ECHO_C" >&6
20680 else
20681
20682         rm -f conftest.a
20683         cat >conftest.$ac_ext <<EOF
20684 #line 20684 "configure"
20685 int     testdata[3] = { 123, 456, 789 };
20686 EOF
20687         if { (eval echo "$as_me:20687: \"$ac_compile\"") >&5
20688   (eval $ac_compile) 2>&5
20689   ac_status=$?
20690   echo "$as_me:20690: \$? = $ac_status" >&5
20691   (exit $ac_status); } ; then
20692                 mv conftest.o data.o && \
20693                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20694         fi
20695         rm -f conftest.$ac_ext data.o
20696         cat >conftest.$ac_ext <<EOF
20697 #line 20697 "configure"
20698 int     testfunc(void)
20699 {
20700 #if defined(NeXT)
20701         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20702 #else
20703         extern int testdata[3];
20704         return testdata[0] == 123
20705            &&  testdata[1] == 456
20706            &&  testdata[2] == 789;
20707 #endif
20708 }
20709 EOF
20710         if { (eval echo "$as_me:20710: \"$ac_compile\"") >&5
20711   (eval $ac_compile) 2>&5
20712   ac_status=$?
20713   echo "$as_me:20713: \$? = $ac_status" >&5
20714   (exit $ac_status); }; then
20715                 mv conftest.o func.o && \
20716                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20717         fi
20718         rm -f conftest.$ac_ext func.o
20719         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20720         cf_saveLIBS="$LIBS"
20721         LIBS="conftest.a $LIBS"
20722         if test "$cross_compiling" = yes; then
20723   cf_cv_link_dataonly=unknown
20724 else
20725   cat >conftest.$ac_ext <<_ACEOF
20726 #line 20726 "configure"
20727 #include "confdefs.h"
20728
20729         int main(void)
20730         {
20731                 extern int testfunc();
20732                 ${cf_cv_main_return:-return} (!testfunc());
20733         }
20734
20735 _ACEOF
20736 rm -f conftest$ac_exeext
20737 if { (eval echo "$as_me:20737: \"$ac_link\"") >&5
20738   (eval $ac_link) 2>&5
20739   ac_status=$?
20740   echo "$as_me:20740: \$? = $ac_status" >&5
20741   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20742   { (eval echo "$as_me:20742: \"$ac_try\"") >&5
20743   (eval $ac_try) 2>&5
20744   ac_status=$?
20745   echo "$as_me:20745: \$? = $ac_status" >&5
20746   (exit $ac_status); }; }; then
20747   cf_cv_link_dataonly=yes
20748 else
20749   echo "$as_me: program exited with status $ac_status" >&5
20750 echo "$as_me: failed program was:" >&5
20751 cat conftest.$ac_ext >&5
20752 cf_cv_link_dataonly=no
20753 fi
20754 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20755 fi
20756         LIBS="$cf_saveLIBS"
20757
20758 fi
20759
20760 echo "$as_me:20760: result: $cf_cv_link_dataonly" >&5
20761 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20762
20763 if test "$cf_cv_link_dataonly" = no ; then
20764
20765 cat >>confdefs.h <<\EOF
20766 #define BROKEN_LINKER 1
20767 EOF
20768
20769         BROKEN_LINKER=1
20770 fi
20771
20772 ###     Checks for library functions.
20773
20774 for ac_func in \
20775 getcwd \
20776 getegid \
20777 geteuid \
20778 getopt \
20779 getttynam \
20780 issetugid \
20781 localeconv \
20782 poll \
20783 putenv \
20784 remove \
20785 select \
20786 setbuf \
20787 setbuffer \
20788 setenv \
20789 setvbuf \
20790 sigaction \
20791 sigvec \
20792 snprintf \
20793 strdup \
20794 strstr \
20795 sysconf \
20796 tcgetpgrp \
20797 times \
20798 tsearch \
20799 vsnprintf \
20800
20801 do
20802 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20803 echo "$as_me:20803: checking for $ac_func" >&5
20804 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20805 if eval "test \"\${$as_ac_var+set}\" = set"; then
20806   echo $ECHO_N "(cached) $ECHO_C" >&6
20807 else
20808   cat >conftest.$ac_ext <<_ACEOF
20809 #line 20809 "configure"
20810 #include "confdefs.h"
20811 #define $ac_func autoconf_temporary
20812 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20813 #undef $ac_func
20814
20815 #ifdef __cplusplus
20816 extern "C"
20817 #endif
20818
20819 /* We use char because int might match the return type of a gcc2
20820    builtin and then its argument prototype would still apply.  */
20821 char $ac_func (void);
20822
20823 int
20824 main (void)
20825 {
20826
20827 /* The GNU C library defines stubs for functions which it implements
20828     to always fail with ENOSYS.  Some functions are actually named
20829     something starting with __ and the normal name is an alias.  */
20830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20831 #error found stub for $ac_func
20832 #endif
20833
20834         return $ac_func ();
20835   ;
20836   return 0;
20837 }
20838 _ACEOF
20839 rm -f conftest.$ac_objext conftest$ac_exeext
20840 if { (eval echo "$as_me:20840: \"$ac_link\"") >&5
20841   (eval $ac_link) 2>&5
20842   ac_status=$?
20843   echo "$as_me:20843: \$? = $ac_status" >&5
20844   (exit $ac_status); } &&
20845          { ac_try='test -s conftest$ac_exeext'
20846   { (eval echo "$as_me:20846: \"$ac_try\"") >&5
20847   (eval $ac_try) 2>&5
20848   ac_status=$?
20849   echo "$as_me:20849: \$? = $ac_status" >&5
20850   (exit $ac_status); }; }; then
20851   eval "$as_ac_var=yes"
20852 else
20853   echo "$as_me: failed program was:" >&5
20854 cat conftest.$ac_ext >&5
20855 eval "$as_ac_var=no"
20856 fi
20857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20858 fi
20859 echo "$as_me:20859: result: `eval echo '${'$as_ac_var'}'`" >&5
20860 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20861 if test `eval echo '${'$as_ac_var'}'` = yes; then
20862   cat >>confdefs.h <<EOF
20863 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20864 EOF
20865
20866 fi
20867 done
20868
20869 if test "x$ac_cv_func_getopt" = xno && \
20870    test "x$cf_with_progs$cf_with_tests" != xnono; then
20871         { { echo "$as_me:20871: error: getopt is required for building programs" >&5
20872 echo "$as_me: error: getopt is required for building programs" >&2;}
20873    { (exit 1); exit 1; }; }
20874 fi
20875
20876 if test "x$with_safe_sprintf" = xyes
20877 then
20878         if test "x$ac_cv_func_vsnprintf" = xyes
20879         then
20880                 { echo "$as_me:20880: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20881 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20882         else
20883
20884 cat >>confdefs.h <<\EOF
20885 #define USE_SAFE_SPRINTF 1
20886 EOF
20887
20888         fi
20889 fi
20890
20891 if test "x$with_getcap" = "xyes" ; then
20892
20893 echo "$as_me:20893: checking for terminal-capability database functions" >&5
20894 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20895 if test "${cf_cv_cgetent+set}" = set; then
20896   echo $ECHO_N "(cached) $ECHO_C" >&6
20897 else
20898
20899 cat >conftest.$ac_ext <<_ACEOF
20900 #line 20900 "configure"
20901 #include "confdefs.h"
20902
20903 #include <stdlib.h>
20904 int
20905 main (void)
20906 {
20907
20908         char temp[128];
20909         char *buf = temp;
20910         char *db_array = temp;
20911         cgetent(&buf, &db_array, "vt100");
20912         cgetcap(buf, "tc", '=');
20913         cgetmatch(buf, "tc");
20914
20915   ;
20916   return 0;
20917 }
20918 _ACEOF
20919 rm -f conftest.$ac_objext conftest$ac_exeext
20920 if { (eval echo "$as_me:20920: \"$ac_link\"") >&5
20921   (eval $ac_link) 2>&5
20922   ac_status=$?
20923   echo "$as_me:20923: \$? = $ac_status" >&5
20924   (exit $ac_status); } &&
20925          { ac_try='test -s conftest$ac_exeext'
20926   { (eval echo "$as_me:20926: \"$ac_try\"") >&5
20927   (eval $ac_try) 2>&5
20928   ac_status=$?
20929   echo "$as_me:20929: \$? = $ac_status" >&5
20930   (exit $ac_status); }; }; then
20931   cf_cv_cgetent=yes
20932 else
20933   echo "$as_me: failed program was:" >&5
20934 cat conftest.$ac_ext >&5
20935 cf_cv_cgetent=no
20936 fi
20937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20938
20939 fi
20940 echo "$as_me:20940: result: $cf_cv_cgetent" >&5
20941 echo "${ECHO_T}$cf_cv_cgetent" >&6
20942
20943 if test "$cf_cv_cgetent" = yes
20944 then
20945
20946 cat >>confdefs.h <<\EOF
20947 #define HAVE_BSD_CGETENT 1
20948 EOF
20949
20950 echo "$as_me:20950: checking if cgetent uses const parameter" >&5
20951 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20952 if test "${cf_cv_cgetent_const+set}" = set; then
20953   echo $ECHO_N "(cached) $ECHO_C" >&6
20954 else
20955
20956 cat >conftest.$ac_ext <<_ACEOF
20957 #line 20957 "configure"
20958 #include "confdefs.h"
20959
20960 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20961 #include <stdlib.h>
20962 int
20963 main (void)
20964 {
20965
20966         char temp[128];
20967         char *buf = temp;
20968 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20969         const char *db_array = temp;
20970         cgetent(&buf, &db_array, "vt100");
20971 #endif
20972         cgetcap(buf, "tc", '=');
20973         cgetmatch(buf, "tc");
20974
20975   ;
20976   return 0;
20977 }
20978 _ACEOF
20979 rm -f conftest.$ac_objext conftest$ac_exeext
20980 if { (eval echo "$as_me:20980: \"$ac_link\"") >&5
20981   (eval $ac_link) 2>&5
20982   ac_status=$?
20983   echo "$as_me:20983: \$? = $ac_status" >&5
20984   (exit $ac_status); } &&
20985          { ac_try='test -s conftest$ac_exeext'
20986   { (eval echo "$as_me:20986: \"$ac_try\"") >&5
20987   (eval $ac_try) 2>&5
20988   ac_status=$?
20989   echo "$as_me:20989: \$? = $ac_status" >&5
20990   (exit $ac_status); }; }; then
20991   cf_cv_cgetent_const=yes
20992 else
20993   echo "$as_me: failed program was:" >&5
20994 cat conftest.$ac_ext >&5
20995 cf_cv_cgetent_const=no
20996 fi
20997 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20998
20999 fi
21000 echo "$as_me:21000: result: $cf_cv_cgetent_const" >&5
21001 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21002         if test "$cf_cv_cgetent_const" = yes
21003         then
21004
21005 cat >>confdefs.h <<EOF
21006 #define CGETENT_CONST const
21007 EOF
21008
21009         fi
21010 fi
21011
21012 fi
21013
21014 echo "$as_me:21014: checking for isascii" >&5
21015 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21016 if test "${cf_cv_have_isascii+set}" = set; then
21017   echo $ECHO_N "(cached) $ECHO_C" >&6
21018 else
21019
21020         cat >conftest.$ac_ext <<_ACEOF
21021 #line 21021 "configure"
21022 #include "confdefs.h"
21023 #include <ctype.h>
21024 int
21025 main (void)
21026 {
21027 int x = isascii(' ')
21028   ;
21029   return 0;
21030 }
21031 _ACEOF
21032 rm -f conftest.$ac_objext conftest$ac_exeext
21033 if { (eval echo "$as_me:21033: \"$ac_link\"") >&5
21034   (eval $ac_link) 2>&5
21035   ac_status=$?
21036   echo "$as_me:21036: \$? = $ac_status" >&5
21037   (exit $ac_status); } &&
21038          { ac_try='test -s conftest$ac_exeext'
21039   { (eval echo "$as_me:21039: \"$ac_try\"") >&5
21040   (eval $ac_try) 2>&5
21041   ac_status=$?
21042   echo "$as_me:21042: \$? = $ac_status" >&5
21043   (exit $ac_status); }; }; then
21044   cf_cv_have_isascii=yes
21045 else
21046   echo "$as_me: failed program was:" >&5
21047 cat conftest.$ac_ext >&5
21048 cf_cv_have_isascii=no
21049 fi
21050 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21051
21052 fi
21053 echo "$as_me:21053: result: $cf_cv_have_isascii" >&5
21054 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21055 test "$cf_cv_have_isascii" = yes &&
21056 cat >>confdefs.h <<\EOF
21057 #define HAVE_ISASCII 1
21058 EOF
21059
21060 if test "$ac_cv_func_sigaction" = yes; then
21061 echo "$as_me:21061: checking whether sigaction needs _POSIX_SOURCE" >&5
21062 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21063 cat >conftest.$ac_ext <<_ACEOF
21064 #line 21064 "configure"
21065 #include "confdefs.h"
21066
21067 #include <sys/types.h>
21068 #include <signal.h>
21069 int
21070 main (void)
21071 {
21072 struct sigaction act
21073   ;
21074   return 0;
21075 }
21076 _ACEOF
21077 rm -f conftest.$ac_objext
21078 if { (eval echo "$as_me:21078: \"$ac_compile\"") >&5
21079   (eval $ac_compile) 2>&5
21080   ac_status=$?
21081   echo "$as_me:21081: \$? = $ac_status" >&5
21082   (exit $ac_status); } &&
21083          { ac_try='test -s conftest.$ac_objext'
21084   { (eval echo "$as_me:21084: \"$ac_try\"") >&5
21085   (eval $ac_try) 2>&5
21086   ac_status=$?
21087   echo "$as_me:21087: \$? = $ac_status" >&5
21088   (exit $ac_status); }; }; then
21089   sigact_bad=no
21090 else
21091   echo "$as_me: failed program was:" >&5
21092 cat conftest.$ac_ext >&5
21093
21094 cat >conftest.$ac_ext <<_ACEOF
21095 #line 21095 "configure"
21096 #include "confdefs.h"
21097
21098 #define _POSIX_SOURCE
21099 #include <sys/types.h>
21100 #include <signal.h>
21101 int
21102 main (void)
21103 {
21104 struct sigaction act
21105   ;
21106   return 0;
21107 }
21108 _ACEOF
21109 rm -f conftest.$ac_objext
21110 if { (eval echo "$as_me:21110: \"$ac_compile\"") >&5
21111   (eval $ac_compile) 2>&5
21112   ac_status=$?
21113   echo "$as_me:21113: \$? = $ac_status" >&5
21114   (exit $ac_status); } &&
21115          { ac_try='test -s conftest.$ac_objext'
21116   { (eval echo "$as_me:21116: \"$ac_try\"") >&5
21117   (eval $ac_try) 2>&5
21118   ac_status=$?
21119   echo "$as_me:21119: \$? = $ac_status" >&5
21120   (exit $ac_status); }; }; then
21121   sigact_bad=yes
21122
21123 cat >>confdefs.h <<\EOF
21124 #define _POSIX_SOURCE 1
21125 EOF
21126
21127 else
21128   echo "$as_me: failed program was:" >&5
21129 cat conftest.$ac_ext >&5
21130 sigact_bad=unknown
21131 fi
21132 rm -f conftest.$ac_objext conftest.$ac_ext
21133 fi
21134 rm -f conftest.$ac_objext conftest.$ac_ext
21135 echo "$as_me:21135: result: $sigact_bad" >&5
21136 echo "${ECHO_T}$sigact_bad" >&6
21137 fi
21138
21139 echo "$as_me:21139: checking if nanosleep really works" >&5
21140 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21141 if test "${cf_cv_func_nanosleep+set}" = set; then
21142   echo $ECHO_N "(cached) $ECHO_C" >&6
21143 else
21144
21145 if test "$cross_compiling" = yes; then
21146   cf_cv_func_nanosleep=unknown
21147 else
21148   cat >conftest.$ac_ext <<_ACEOF
21149 #line 21149 "configure"
21150 #include "confdefs.h"
21151
21152 #include <stdio.h>
21153 #include <errno.h>
21154 #include <time.h>
21155
21156 #ifdef HAVE_SYS_TIME_H
21157 #include <sys/time.h>
21158 #endif
21159
21160 int main(void) {
21161         struct timespec ts1, ts2;
21162         int code;
21163         ts1.tv_sec  = 0;
21164         ts1.tv_nsec = 750000000;
21165         ts2.tv_sec  = 0;
21166         ts2.tv_nsec = 0;
21167         errno = 0;
21168         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21169         ${cf_cv_main_return:-return}(code != 0);
21170 }
21171
21172 _ACEOF
21173 rm -f conftest$ac_exeext
21174 if { (eval echo "$as_me:21174: \"$ac_link\"") >&5
21175   (eval $ac_link) 2>&5
21176   ac_status=$?
21177   echo "$as_me:21177: \$? = $ac_status" >&5
21178   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21179   { (eval echo "$as_me:21179: \"$ac_try\"") >&5
21180   (eval $ac_try) 2>&5
21181   ac_status=$?
21182   echo "$as_me:21182: \$? = $ac_status" >&5
21183   (exit $ac_status); }; }; then
21184   cf_cv_func_nanosleep=yes
21185 else
21186   echo "$as_me: program exited with status $ac_status" >&5
21187 echo "$as_me: failed program was:" >&5
21188 cat conftest.$ac_ext >&5
21189 cf_cv_func_nanosleep=no
21190 fi
21191 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21192 fi
21193 fi
21194 echo "$as_me:21194: result: $cf_cv_func_nanosleep" >&5
21195 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21196
21197 test "$cf_cv_func_nanosleep" = "yes" &&
21198 cat >>confdefs.h <<\EOF
21199 #define HAVE_NANOSLEEP 1
21200 EOF
21201
21202 for ac_header in \
21203 termio.h \
21204 termios.h \
21205 unistd.h \
21206 sys/ioctl.h \
21207 sys/termio.h \
21208
21209 do
21210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21211 echo "$as_me:21211: checking for $ac_header" >&5
21212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21214   echo $ECHO_N "(cached) $ECHO_C" >&6
21215 else
21216   cat >conftest.$ac_ext <<_ACEOF
21217 #line 21217 "configure"
21218 #include "confdefs.h"
21219 #include <$ac_header>
21220 _ACEOF
21221 if { (eval echo "$as_me:21221: \"$ac_cpp conftest.$ac_ext\"") >&5
21222   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21223   ac_status=$?
21224   egrep -v '^ *\+' conftest.er1 >conftest.err
21225   rm -f conftest.er1
21226   cat conftest.err >&5
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit $ac_status); } >/dev/null; then
21229   if test -s conftest.err; then
21230     ac_cpp_err=$ac_c_preproc_warn_flag
21231   else
21232     ac_cpp_err=
21233   fi
21234 else
21235   ac_cpp_err=yes
21236 fi
21237 if test -z "$ac_cpp_err"; then
21238   eval "$as_ac_Header=yes"
21239 else
21240   echo "$as_me: failed program was:" >&5
21241   cat conftest.$ac_ext >&5
21242   eval "$as_ac_Header=no"
21243 fi
21244 rm -f conftest.err conftest.$ac_ext
21245 fi
21246 echo "$as_me:21246: result: `eval echo '${'$as_ac_Header'}'`" >&5
21247 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21248 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21249   cat >>confdefs.h <<EOF
21250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21251 EOF
21252
21253 fi
21254 done
21255
21256 if test "$ac_cv_header_termios_h" = yes ; then
21257         case "$CFLAGS $CPPFLAGS" in
21258         (*-D_POSIX_SOURCE*)
21259                 termios_bad=dunno ;;
21260         (*)     termios_bad=maybe ;;
21261         esac
21262         if test "$termios_bad" = maybe ; then
21263         echo "$as_me:21263: checking whether termios.h needs _POSIX_SOURCE" >&5
21264 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21265         cat >conftest.$ac_ext <<_ACEOF
21266 #line 21266 "configure"
21267 #include "confdefs.h"
21268 #include <termios.h>
21269 int
21270 main (void)
21271 {
21272 struct termios foo; int x = foo.c_iflag = 1; (void)x
21273   ;
21274   return 0;
21275 }
21276 _ACEOF
21277 rm -f conftest.$ac_objext
21278 if { (eval echo "$as_me:21278: \"$ac_compile\"") >&5
21279   (eval $ac_compile) 2>&5
21280   ac_status=$?
21281   echo "$as_me:21281: \$? = $ac_status" >&5
21282   (exit $ac_status); } &&
21283          { ac_try='test -s conftest.$ac_objext'
21284   { (eval echo "$as_me:21284: \"$ac_try\"") >&5
21285   (eval $ac_try) 2>&5
21286   ac_status=$?
21287   echo "$as_me:21287: \$? = $ac_status" >&5
21288   (exit $ac_status); }; }; then
21289   termios_bad=no
21290 else
21291   echo "$as_me: failed program was:" >&5
21292 cat conftest.$ac_ext >&5
21293
21294                 cat >conftest.$ac_ext <<_ACEOF
21295 #line 21295 "configure"
21296 #include "confdefs.h"
21297
21298 #define _POSIX_SOURCE
21299 #include <termios.h>
21300 int
21301 main (void)
21302 {
21303 struct termios foo; int x = foo.c_iflag = 2; (void)x
21304   ;
21305   return 0;
21306 }
21307 _ACEOF
21308 rm -f conftest.$ac_objext
21309 if { (eval echo "$as_me:21309: \"$ac_compile\"") >&5
21310   (eval $ac_compile) 2>&5
21311   ac_status=$?
21312   echo "$as_me:21312: \$? = $ac_status" >&5
21313   (exit $ac_status); } &&
21314          { ac_try='test -s conftest.$ac_objext'
21315   { (eval echo "$as_me:21315: \"$ac_try\"") >&5
21316   (eval $ac_try) 2>&5
21317   ac_status=$?
21318   echo "$as_me:21318: \$? = $ac_status" >&5
21319   (exit $ac_status); }; }; then
21320   termios_bad=unknown
21321 else
21322   echo "$as_me: failed program was:" >&5
21323 cat conftest.$ac_ext >&5
21324 termios_bad=yes
21325 cat >>confdefs.h <<\EOF
21326 #define _POSIX_SOURCE 1
21327 EOF
21328
21329 fi
21330 rm -f conftest.$ac_objext conftest.$ac_ext
21331
21332 fi
21333 rm -f conftest.$ac_objext conftest.$ac_ext
21334         echo "$as_me:21334: result: $termios_bad" >&5
21335 echo "${ECHO_T}$termios_bad" >&6
21336         fi
21337 fi
21338
21339 echo "$as_me:21339: checking for tcgetattr" >&5
21340 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21341 if test "${cf_cv_have_tcgetattr+set}" = set; then
21342   echo $ECHO_N "(cached) $ECHO_C" >&6
21343 else
21344
21345 cat >conftest.$ac_ext <<_ACEOF
21346 #line 21346 "configure"
21347 #include "confdefs.h"
21348
21349 #include <sys/types.h>
21350 #ifdef HAVE_UNISTD_H
21351 #include <unistd.h>
21352 #endif
21353 #ifdef HAVE_TERMIOS_H
21354 #include <termios.h>
21355 #define TTY struct termios
21356 #else
21357 #ifdef HAVE_TERMIO_H
21358 #include <termio.h>
21359 #define TTY struct termio
21360 #endif
21361 #endif
21362
21363 int
21364 main (void)
21365 {
21366
21367 TTY foo;
21368 tcgetattr(1, &foo);
21369   ;
21370   return 0;
21371 }
21372 _ACEOF
21373 rm -f conftest.$ac_objext conftest$ac_exeext
21374 if { (eval echo "$as_me:21374: \"$ac_link\"") >&5
21375   (eval $ac_link) 2>&5
21376   ac_status=$?
21377   echo "$as_me:21377: \$? = $ac_status" >&5
21378   (exit $ac_status); } &&
21379          { ac_try='test -s conftest$ac_exeext'
21380   { (eval echo "$as_me:21380: \"$ac_try\"") >&5
21381   (eval $ac_try) 2>&5
21382   ac_status=$?
21383   echo "$as_me:21383: \$? = $ac_status" >&5
21384   (exit $ac_status); }; }; then
21385   cf_cv_have_tcgetattr=yes
21386 else
21387   echo "$as_me: failed program was:" >&5
21388 cat conftest.$ac_ext >&5
21389 cf_cv_have_tcgetattr=no
21390 fi
21391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21392 fi
21393 echo "$as_me:21393: result: $cf_cv_have_tcgetattr" >&5
21394 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
21395 test "$cf_cv_have_tcgetattr" = yes &&
21396 cat >>confdefs.h <<\EOF
21397 #define HAVE_TCGETATTR 1
21398 EOF
21399
21400 echo "$as_me:21400: checking for vsscanf function or workaround" >&5
21401 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
21402 if test "${cf_cv_func_vsscanf+set}" = set; then
21403   echo $ECHO_N "(cached) $ECHO_C" >&6
21404 else
21405
21406 cat >conftest.$ac_ext <<_ACEOF
21407 #line 21407 "configure"
21408 #include "confdefs.h"
21409
21410 #include <stdarg.h>
21411 #include <stdio.h>
21412 int
21413 main (void)
21414 {
21415
21416         va_list ap;
21417         vsscanf("from", "%d", ap)
21418   ;
21419   return 0;
21420 }
21421 _ACEOF
21422 rm -f conftest.$ac_objext conftest$ac_exeext
21423 if { (eval echo "$as_me:21423: \"$ac_link\"") >&5
21424   (eval $ac_link) 2>&5
21425   ac_status=$?
21426   echo "$as_me:21426: \$? = $ac_status" >&5
21427   (exit $ac_status); } &&
21428          { ac_try='test -s conftest$ac_exeext'
21429   { (eval echo "$as_me:21429: \"$ac_try\"") >&5
21430   (eval $ac_try) 2>&5
21431   ac_status=$?
21432   echo "$as_me:21432: \$? = $ac_status" >&5
21433   (exit $ac_status); }; }; then
21434   cf_cv_func_vsscanf=vsscanf
21435 else
21436   echo "$as_me: failed program was:" >&5
21437 cat conftest.$ac_ext >&5
21438
21439 cat >conftest.$ac_ext <<_ACEOF
21440 #line 21440 "configure"
21441 #include "confdefs.h"
21442
21443 #include <stdarg.h>
21444 #include <stdio.h>
21445 int
21446 main (void)
21447 {
21448
21449         FILE strbuf;
21450         char *str = "from";
21451
21452         strbuf._flag = _IOREAD;
21453         strbuf._ptr = strbuf._base = (unsigned char *) str;
21454         strbuf._cnt = strlen(str);
21455         strbuf._file = _NFILE;
21456         return (vfscanf(&strbuf, "%d", ap))
21457   ;
21458   return 0;
21459 }
21460 _ACEOF
21461 rm -f conftest.$ac_objext conftest$ac_exeext
21462 if { (eval echo "$as_me:21462: \"$ac_link\"") >&5
21463   (eval $ac_link) 2>&5
21464   ac_status=$?
21465   echo "$as_me:21465: \$? = $ac_status" >&5
21466   (exit $ac_status); } &&
21467          { ac_try='test -s conftest$ac_exeext'
21468   { (eval echo "$as_me:21468: \"$ac_try\"") >&5
21469   (eval $ac_try) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit $ac_status); }; }; then
21473   cf_cv_func_vsscanf=vfscanf
21474 else
21475   echo "$as_me: failed program was:" >&5
21476 cat conftest.$ac_ext >&5
21477
21478 cat >conftest.$ac_ext <<_ACEOF
21479 #line 21479 "configure"
21480 #include "confdefs.h"
21481
21482 #include <stdarg.h>
21483 #include <stdio.h>
21484 int
21485 main (void)
21486 {
21487
21488         FILE strbuf;
21489         char *str = "from";
21490
21491         strbuf._flag = _IOREAD;
21492         strbuf._ptr = strbuf._base = (unsigned char *) str;
21493         strbuf._cnt = strlen(str);
21494         strbuf._file = _NFILE;
21495         return (_doscan(&strbuf, "%d", ap))
21496   ;
21497   return 0;
21498 }
21499 _ACEOF
21500 rm -f conftest.$ac_objext conftest$ac_exeext
21501 if { (eval echo "$as_me:21501: \"$ac_link\"") >&5
21502   (eval $ac_link) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit $ac_status); } &&
21506          { ac_try='test -s conftest$ac_exeext'
21507   { (eval echo "$as_me:21507: \"$ac_try\"") >&5
21508   (eval $ac_try) 2>&5
21509   ac_status=$?
21510   echo "$as_me:21510: \$? = $ac_status" >&5
21511   (exit $ac_status); }; }; then
21512   cf_cv_func_vsscanf=_doscan
21513 else
21514   echo "$as_me: failed program was:" >&5
21515 cat conftest.$ac_ext >&5
21516
21517 cf_cv_func_vsscanf=no
21518 fi
21519 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21520 fi
21521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21522 fi
21523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21524 fi
21525 echo "$as_me:21525: result: $cf_cv_func_vsscanf" >&5
21526 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
21527
21528 case $cf_cv_func_vsscanf in
21529 (vsscanf)
21530 cat >>confdefs.h <<\EOF
21531 #define HAVE_VSSCANF 1
21532 EOF
21533 ;;
21534 (vfscanf)
21535 cat >>confdefs.h <<\EOF
21536 #define HAVE_VFSCANF 1
21537 EOF
21538 ;;
21539 (_doscan)
21540 cat >>confdefs.h <<\EOF
21541 #define HAVE__DOSCAN 1
21542 EOF
21543 ;;
21544 esac
21545
21546 for ac_header in \
21547 unistd.h \
21548
21549 do
21550 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21551 echo "$as_me:21551: checking for $ac_header" >&5
21552 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21553 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21554   echo $ECHO_N "(cached) $ECHO_C" >&6
21555 else
21556   cat >conftest.$ac_ext <<_ACEOF
21557 #line 21557 "configure"
21558 #include "confdefs.h"
21559 #include <$ac_header>
21560 _ACEOF
21561 if { (eval echo "$as_me:21561: \"$ac_cpp conftest.$ac_ext\"") >&5
21562   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21563   ac_status=$?
21564   egrep -v '^ *\+' conftest.er1 >conftest.err
21565   rm -f conftest.er1
21566   cat conftest.err >&5
21567   echo "$as_me:21567: \$? = $ac_status" >&5
21568   (exit $ac_status); } >/dev/null; then
21569   if test -s conftest.err; then
21570     ac_cpp_err=$ac_c_preproc_warn_flag
21571   else
21572     ac_cpp_err=
21573   fi
21574 else
21575   ac_cpp_err=yes
21576 fi
21577 if test -z "$ac_cpp_err"; then
21578   eval "$as_ac_Header=yes"
21579 else
21580   echo "$as_me: failed program was:" >&5
21581   cat conftest.$ac_ext >&5
21582   eval "$as_ac_Header=no"
21583 fi
21584 rm -f conftest.err conftest.$ac_ext
21585 fi
21586 echo "$as_me:21586: result: `eval echo '${'$as_ac_Header'}'`" >&5
21587 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21588 if test `eval echo '${'$as_ac_Header'}'` = yes; then
21589   cat >>confdefs.h <<EOF
21590 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21591 EOF
21592
21593 fi
21594 done
21595
21596 echo "$as_me:21596: checking for working mkstemp" >&5
21597 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
21598 if test "${cf_cv_func_mkstemp+set}" = set; then
21599   echo $ECHO_N "(cached) $ECHO_C" >&6
21600 else
21601
21602 rm -rf conftest*
21603 if test "$cross_compiling" = yes; then
21604   cf_cv_func_mkstemp=maybe
21605 else
21606   cat >conftest.$ac_ext <<_ACEOF
21607 #line 21607 "configure"
21608 #include "confdefs.h"
21609
21610 #include <sys/types.h>
21611 #ifdef HAVE_UNISTD_H
21612 #include <unistd.h>
21613 #endif
21614 #include <stdlib.h>
21615 #include <stdio.h>
21616 #include <string.h>
21617 #include <sys/stat.h>
21618 int main(void)
21619 {
21620         char *tmpl = "conftestXXXXXX";
21621         char name[2][80];
21622         int n;
21623         int result = 0;
21624         int fd;
21625         struct stat sb;
21626
21627         umask(077);
21628         for (n = 0; n < 2; ++n) {
21629                 strcpy(name[n], tmpl);
21630                 if ((fd = mkstemp(name[n])) >= 0) {
21631                         if (!strcmp(name[n], tmpl)
21632                          || stat(name[n], &sb) != 0
21633                          || (sb.st_mode & S_IFMT) != S_IFREG
21634                          || (sb.st_mode & 077) != 0) {
21635                                 result = 1;
21636                         }
21637                         close(fd);
21638                 }
21639         }
21640         if (result == 0
21641          && !strcmp(name[0], name[1]))
21642                 result = 1;
21643         ${cf_cv_main_return:-return}(result);
21644 }
21645
21646 _ACEOF
21647 rm -f conftest$ac_exeext
21648 if { (eval echo "$as_me:21648: \"$ac_link\"") >&5
21649   (eval $ac_link) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21653   { (eval echo "$as_me:21653: \"$ac_try\"") >&5
21654   (eval $ac_try) 2>&5
21655   ac_status=$?
21656   echo "$as_me:21656: \$? = $ac_status" >&5
21657   (exit $ac_status); }; }; then
21658   cf_cv_func_mkstemp=yes
21659
21660 else
21661   echo "$as_me: program exited with status $ac_status" >&5
21662 echo "$as_me: failed program was:" >&5
21663 cat conftest.$ac_ext >&5
21664 cf_cv_func_mkstemp=no
21665
21666 fi
21667 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21668 fi
21669
21670 fi
21671 echo "$as_me:21671: result: $cf_cv_func_mkstemp" >&5
21672 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
21673 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
21674         echo "$as_me:21674: checking for mkstemp" >&5
21675 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
21676 if test "${ac_cv_func_mkstemp+set}" = set; then
21677   echo $ECHO_N "(cached) $ECHO_C" >&6
21678 else
21679   cat >conftest.$ac_ext <<_ACEOF
21680 #line 21680 "configure"
21681 #include "confdefs.h"
21682 #define mkstemp autoconf_temporary
21683 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21684 #undef mkstemp
21685
21686 #ifdef __cplusplus
21687 extern "C"
21688 #endif
21689
21690 /* We use char because int might match the return type of a gcc2
21691    builtin and then its argument prototype would still apply.  */
21692 char mkstemp (void);
21693
21694 int
21695 main (void)
21696 {
21697
21698 /* The GNU C library defines stubs for functions which it implements
21699     to always fail with ENOSYS.  Some functions are actually named
21700     something starting with __ and the normal name is an alias.  */
21701 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21702 #error found stub for mkstemp
21703 #endif
21704
21705         return mkstemp ();
21706   ;
21707   return 0;
21708 }
21709 _ACEOF
21710 rm -f conftest.$ac_objext conftest$ac_exeext
21711 if { (eval echo "$as_me:21711: \"$ac_link\"") >&5
21712   (eval $ac_link) 2>&5
21713   ac_status=$?
21714   echo "$as_me:21714: \$? = $ac_status" >&5
21715   (exit $ac_status); } &&
21716          { ac_try='test -s conftest$ac_exeext'
21717   { (eval echo "$as_me:21717: \"$ac_try\"") >&5
21718   (eval $ac_try) 2>&5
21719   ac_status=$?
21720   echo "$as_me:21720: \$? = $ac_status" >&5
21721   (exit $ac_status); }; }; then
21722   ac_cv_func_mkstemp=yes
21723 else
21724   echo "$as_me: failed program was:" >&5
21725 cat conftest.$ac_ext >&5
21726 ac_cv_func_mkstemp=no
21727 fi
21728 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21729 fi
21730 echo "$as_me:21730: result: $ac_cv_func_mkstemp" >&5
21731 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21732
21733 fi
21734 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21735
21736 cat >>confdefs.h <<\EOF
21737 #define HAVE_MKSTEMP 1
21738 EOF
21739
21740 fi
21741
21742 # setup for prototype of fallback for vsscanf()
21743
21744 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21745         HAVE_VSSCANF=1
21746 else
21747         HAVE_VSSCANF=0
21748 fi
21749
21750 if test "x$cross_compiling" = xyes ; then
21751         { echo "$as_me:21751: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21752 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21753 else
21754         echo "$as_me:21754: checking whether setvbuf arguments are reversed" >&5
21755 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21756 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21757   echo $ECHO_N "(cached) $ECHO_C" >&6
21758 else
21759   if test "$cross_compiling" = yes; then
21760   { { echo "$as_me:21760: error: cannot run test program while cross compiling" >&5
21761 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21762    { (exit 1); exit 1; }; }
21763 else
21764   cat >conftest.$ac_ext <<_ACEOF
21765 #line 21765 "configure"
21766 #include "confdefs.h"
21767 #include <stdio.h>
21768 /* If setvbuf has the reversed format, exit 0. */
21769 int
21770 main (void)
21771 {
21772   /* This call has the arguments reversed.
21773      A reversed system may check and see that the address of main
21774      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21775   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21776     $ac_main_return(1);
21777   putc('\r', stdout);
21778   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21779 }
21780 _ACEOF
21781 rm -f conftest$ac_exeext
21782 if { (eval echo "$as_me:21782: \"$ac_link\"") >&5
21783   (eval $ac_link) 2>&5
21784   ac_status=$?
21785   echo "$as_me:21785: \$? = $ac_status" >&5
21786   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21787   { (eval echo "$as_me:21787: \"$ac_try\"") >&5
21788   (eval $ac_try) 2>&5
21789   ac_status=$?
21790   echo "$as_me:21790: \$? = $ac_status" >&5
21791   (exit $ac_status); }; }; then
21792   ac_cv_func_setvbuf_reversed=yes
21793 else
21794   echo "$as_me: program exited with status $ac_status" >&5
21795 echo "$as_me: failed program was:" >&5
21796 cat conftest.$ac_ext >&5
21797 ac_cv_func_setvbuf_reversed=no
21798 fi
21799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21800 fi
21801 rm -f core core.* *.core
21802 fi
21803 echo "$as_me:21803: result: $ac_cv_func_setvbuf_reversed" >&5
21804 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21805 if test $ac_cv_func_setvbuf_reversed = yes; then
21806
21807 cat >>confdefs.h <<\EOF
21808 #define SETVBUF_REVERSED 1
21809 EOF
21810
21811 fi
21812
21813 fi
21814 echo "$as_me:21814: checking for intptr_t" >&5
21815 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21816 if test "${ac_cv_type_intptr_t+set}" = set; then
21817   echo $ECHO_N "(cached) $ECHO_C" >&6
21818 else
21819   cat >conftest.$ac_ext <<_ACEOF
21820 #line 21820 "configure"
21821 #include "confdefs.h"
21822 $ac_includes_default
21823 int
21824 main (void)
21825 {
21826 if ((intptr_t *) 0)
21827   return 0;
21828 if (sizeof (intptr_t))
21829   return 0;
21830   ;
21831   return 0;
21832 }
21833 _ACEOF
21834 rm -f conftest.$ac_objext
21835 if { (eval echo "$as_me:21835: \"$ac_compile\"") >&5
21836   (eval $ac_compile) 2>&5
21837   ac_status=$?
21838   echo "$as_me:21838: \$? = $ac_status" >&5
21839   (exit $ac_status); } &&
21840          { ac_try='test -s conftest.$ac_objext'
21841   { (eval echo "$as_me:21841: \"$ac_try\"") >&5
21842   (eval $ac_try) 2>&5
21843   ac_status=$?
21844   echo "$as_me:21844: \$? = $ac_status" >&5
21845   (exit $ac_status); }; }; then
21846   ac_cv_type_intptr_t=yes
21847 else
21848   echo "$as_me: failed program was:" >&5
21849 cat conftest.$ac_ext >&5
21850 ac_cv_type_intptr_t=no
21851 fi
21852 rm -f conftest.$ac_objext conftest.$ac_ext
21853 fi
21854 echo "$as_me:21854: result: $ac_cv_type_intptr_t" >&5
21855 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21856 if test $ac_cv_type_intptr_t = yes; then
21857   :
21858 else
21859
21860 cat >>confdefs.h <<EOF
21861 #define intptr_t long
21862 EOF
21863
21864 fi
21865
21866 echo "$as_me:21866: checking for ssize_t" >&5
21867 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21868 if test "${ac_cv_type_ssize_t+set}" = set; then
21869   echo $ECHO_N "(cached) $ECHO_C" >&6
21870 else
21871   cat >conftest.$ac_ext <<_ACEOF
21872 #line 21872 "configure"
21873 #include "confdefs.h"
21874 $ac_includes_default
21875 int
21876 main (void)
21877 {
21878 if ((ssize_t *) 0)
21879   return 0;
21880 if (sizeof (ssize_t))
21881   return 0;
21882   ;
21883   return 0;
21884 }
21885 _ACEOF
21886 rm -f conftest.$ac_objext
21887 if { (eval echo "$as_me:21887: \"$ac_compile\"") >&5
21888   (eval $ac_compile) 2>&5
21889   ac_status=$?
21890   echo "$as_me:21890: \$? = $ac_status" >&5
21891   (exit $ac_status); } &&
21892          { ac_try='test -s conftest.$ac_objext'
21893   { (eval echo "$as_me:21893: \"$ac_try\"") >&5
21894   (eval $ac_try) 2>&5
21895   ac_status=$?
21896   echo "$as_me:21896: \$? = $ac_status" >&5
21897   (exit $ac_status); }; }; then
21898   ac_cv_type_ssize_t=yes
21899 else
21900   echo "$as_me: failed program was:" >&5
21901 cat conftest.$ac_ext >&5
21902 ac_cv_type_ssize_t=no
21903 fi
21904 rm -f conftest.$ac_objext conftest.$ac_ext
21905 fi
21906 echo "$as_me:21906: result: $ac_cv_type_ssize_t" >&5
21907 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21908 if test $ac_cv_type_ssize_t = yes; then
21909   :
21910 else
21911
21912 cat >>confdefs.h <<EOF
21913 #define ssize_t int
21914 EOF
21915
21916 fi
21917
21918 echo "$as_me:21918: checking for type sigaction_t" >&5
21919 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21920 if test "${cf_cv_type_sigaction+set}" = set; then
21921   echo $ECHO_N "(cached) $ECHO_C" >&6
21922 else
21923
21924         cat >conftest.$ac_ext <<_ACEOF
21925 #line 21925 "configure"
21926 #include "confdefs.h"
21927
21928 #include <signal.h>
21929 int
21930 main (void)
21931 {
21932 sigaction_t x
21933   ;
21934   return 0;
21935 }
21936 _ACEOF
21937 rm -f conftest.$ac_objext
21938 if { (eval echo "$as_me:21938: \"$ac_compile\"") >&5
21939   (eval $ac_compile) 2>&5
21940   ac_status=$?
21941   echo "$as_me:21941: \$? = $ac_status" >&5
21942   (exit $ac_status); } &&
21943          { ac_try='test -s conftest.$ac_objext'
21944   { (eval echo "$as_me:21944: \"$ac_try\"") >&5
21945   (eval $ac_try) 2>&5
21946   ac_status=$?
21947   echo "$as_me:21947: \$? = $ac_status" >&5
21948   (exit $ac_status); }; }; then
21949   cf_cv_type_sigaction=yes
21950 else
21951   echo "$as_me: failed program was:" >&5
21952 cat conftest.$ac_ext >&5
21953 cf_cv_type_sigaction=no
21954 fi
21955 rm -f conftest.$ac_objext conftest.$ac_ext
21956 fi
21957
21958 echo "$as_me:21958: result: $cf_cv_type_sigaction" >&5
21959 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21960 test "$cf_cv_type_sigaction" = yes &&
21961 cat >>confdefs.h <<\EOF
21962 #define HAVE_TYPE_SIGACTION 1
21963 EOF
21964
21965 echo "$as_me:21965: checking declaration of size-change" >&5
21966 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21967 if test "${cf_cv_sizechange+set}" = set; then
21968   echo $ECHO_N "(cached) $ECHO_C" >&6
21969 else
21970
21971         cf_cv_sizechange=unknown
21972         cf_save_CPPFLAGS="$CPPFLAGS"
21973
21974 for cf_opts in "" "NEED_PTEM_H"
21975 do
21976
21977         CPPFLAGS="$cf_save_CPPFLAGS"
21978         if test -n "$cf_opts"
21979         then
21980
21981         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21982         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21983
21984         fi
21985         cat >conftest.$ac_ext <<_ACEOF
21986 #line 21986 "configure"
21987 #include "confdefs.h"
21988 #include <sys/types.h>
21989 #ifdef HAVE_TERMIOS_H
21990 #include <termios.h>
21991 #else
21992 #ifdef HAVE_TERMIO_H
21993 #include <termio.h>
21994 #endif
21995 #endif
21996
21997 #ifdef NEED_PTEM_H
21998 /* This is a workaround for SCO:  they neglected to define struct winsize in
21999  * termios.h -- it's only in termio.h and ptem.h
22000  */
22001 #include <sys/stream.h>
22002 #include <sys/ptem.h>
22003 #endif
22004
22005 #ifdef HAVE_SYS_IOCTL_H
22006 #include <sys/ioctl.h>
22007 #endif
22008
22009 int
22010 main (void)
22011 {
22012
22013 #ifdef TIOCGSIZE
22014         struct ttysize win;     /* SunOS 3.0... */
22015         int y = win.ts_lines = 2;
22016         int x = win.ts_cols = 1;
22017         (void)y;
22018         (void)x;
22019 #else
22020 #ifdef TIOCGWINSZ
22021         struct winsize win;     /* everything else */
22022         int y = win.ws_row = 2;
22023         int x = win.ws_col = 1;
22024         (void)y;
22025         (void)x;
22026 #else
22027         no TIOCGSIZE or TIOCGWINSZ
22028 #endif /* TIOCGWINSZ */
22029 #endif /* TIOCGSIZE */
22030
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   cf_cv_sizechange=yes
22048 else
22049   echo "$as_me: failed program was:" >&5
22050 cat conftest.$ac_ext >&5
22051 cf_cv_sizechange=no
22052 fi
22053 rm -f conftest.$ac_objext conftest.$ac_ext
22054
22055         CPPFLAGS="$cf_save_CPPFLAGS"
22056         if test "$cf_cv_sizechange" = yes ; then
22057                 echo "size-change succeeded ($cf_opts)" >&5
22058                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22059                 break
22060         fi
22061 done
22062
22063 fi
22064 echo "$as_me:22064: result: $cf_cv_sizechange" >&5
22065 echo "${ECHO_T}$cf_cv_sizechange" >&6
22066 if test "$cf_cv_sizechange" != no ; then
22067
22068 cat >>confdefs.h <<\EOF
22069 #define HAVE_SIZECHANGE 1
22070 EOF
22071
22072         case $cf_cv_sizechange in
22073         (NEED*)
22074                 cat >>confdefs.h <<EOF
22075 #define $cf_cv_sizechange  1
22076 EOF
22077
22078                 ;;
22079         esac
22080 fi
22081
22082 echo "$as_me:22082: checking for memmove" >&5
22083 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22084 if test "${ac_cv_func_memmove+set}" = set; then
22085   echo $ECHO_N "(cached) $ECHO_C" >&6
22086 else
22087   cat >conftest.$ac_ext <<_ACEOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090 #define memmove autoconf_temporary
22091 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22092 #undef memmove
22093
22094 #ifdef __cplusplus
22095 extern "C"
22096 #endif
22097
22098 /* We use char because int might match the return type of a gcc2
22099    builtin and then its argument prototype would still apply.  */
22100 char memmove (void);
22101
22102 int
22103 main (void)
22104 {
22105
22106 /* The GNU C library defines stubs for functions which it implements
22107     to always fail with ENOSYS.  Some functions are actually named
22108     something starting with __ and the normal name is an alias.  */
22109 #if defined (__stub_memmove) || defined (__stub___memmove)
22110 #error found stub for memmove
22111 #endif
22112
22113         return memmove ();
22114   ;
22115   return 0;
22116 }
22117 _ACEOF
22118 rm -f conftest.$ac_objext conftest$ac_exeext
22119 if { (eval echo "$as_me:22119: \"$ac_link\"") >&5
22120   (eval $ac_link) 2>&5
22121   ac_status=$?
22122   echo "$as_me:22122: \$? = $ac_status" >&5
22123   (exit $ac_status); } &&
22124          { ac_try='test -s conftest$ac_exeext'
22125   { (eval echo "$as_me:22125: \"$ac_try\"") >&5
22126   (eval $ac_try) 2>&5
22127   ac_status=$?
22128   echo "$as_me:22128: \$? = $ac_status" >&5
22129   (exit $ac_status); }; }; then
22130   ac_cv_func_memmove=yes
22131 else
22132   echo "$as_me: failed program was:" >&5
22133 cat conftest.$ac_ext >&5
22134 ac_cv_func_memmove=no
22135 fi
22136 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22137 fi
22138 echo "$as_me:22138: result: $ac_cv_func_memmove" >&5
22139 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22140 if test $ac_cv_func_memmove = yes; then
22141   :
22142 else
22143
22144 echo "$as_me:22144: checking for bcopy" >&5
22145 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22146 if test "${ac_cv_func_bcopy+set}" = set; then
22147   echo $ECHO_N "(cached) $ECHO_C" >&6
22148 else
22149   cat >conftest.$ac_ext <<_ACEOF
22150 #line 22150 "configure"
22151 #include "confdefs.h"
22152 #define bcopy autoconf_temporary
22153 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22154 #undef bcopy
22155
22156 #ifdef __cplusplus
22157 extern "C"
22158 #endif
22159
22160 /* We use char because int might match the return type of a gcc2
22161    builtin and then its argument prototype would still apply.  */
22162 char bcopy (void);
22163
22164 int
22165 main (void)
22166 {
22167
22168 /* The GNU C library defines stubs for functions which it implements
22169     to always fail with ENOSYS.  Some functions are actually named
22170     something starting with __ and the normal name is an alias.  */
22171 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22172 #error found stub for bcopy
22173 #endif
22174
22175         return bcopy ();
22176   ;
22177   return 0;
22178 }
22179 _ACEOF
22180 rm -f conftest.$ac_objext conftest$ac_exeext
22181 if { (eval echo "$as_me:22181: \"$ac_link\"") >&5
22182   (eval $ac_link) 2>&5
22183   ac_status=$?
22184   echo "$as_me:22184: \$? = $ac_status" >&5
22185   (exit $ac_status); } &&
22186          { ac_try='test -s conftest$ac_exeext'
22187   { (eval echo "$as_me:22187: \"$ac_try\"") >&5
22188   (eval $ac_try) 2>&5
22189   ac_status=$?
22190   echo "$as_me:22190: \$? = $ac_status" >&5
22191   (exit $ac_status); }; }; then
22192   ac_cv_func_bcopy=yes
22193 else
22194   echo "$as_me: failed program was:" >&5
22195 cat conftest.$ac_ext >&5
22196 ac_cv_func_bcopy=no
22197 fi
22198 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22199 fi
22200 echo "$as_me:22200: result: $ac_cv_func_bcopy" >&5
22201 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22202 if test $ac_cv_func_bcopy = yes; then
22203
22204         echo "$as_me:22204: checking if bcopy does overlapping moves" >&5
22205 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22206 if test "${cf_cv_good_bcopy+set}" = set; then
22207   echo $ECHO_N "(cached) $ECHO_C" >&6
22208 else
22209
22210                 if test "$cross_compiling" = yes; then
22211   cf_cv_good_bcopy=unknown
22212 else
22213   cat >conftest.$ac_ext <<_ACEOF
22214 #line 22214 "configure"
22215 #include "confdefs.h"
22216
22217 int main(void) {
22218         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22219         char temp[40];
22220         bcopy(data, temp, sizeof(data));
22221         bcopy(temp+10, temp, 15);
22222         bcopy(temp+5, temp+15, 10);
22223         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22224 }
22225
22226 _ACEOF
22227 rm -f conftest$ac_exeext
22228 if { (eval echo "$as_me:22228: \"$ac_link\"") >&5
22229   (eval $ac_link) 2>&5
22230   ac_status=$?
22231   echo "$as_me:22231: \$? = $ac_status" >&5
22232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22233   { (eval echo "$as_me:22233: \"$ac_try\"") >&5
22234   (eval $ac_try) 2>&5
22235   ac_status=$?
22236   echo "$as_me:22236: \$? = $ac_status" >&5
22237   (exit $ac_status); }; }; then
22238   cf_cv_good_bcopy=yes
22239 else
22240   echo "$as_me: program exited with status $ac_status" >&5
22241 echo "$as_me: failed program was:" >&5
22242 cat conftest.$ac_ext >&5
22243 cf_cv_good_bcopy=no
22244 fi
22245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22246 fi
22247
22248 fi
22249 echo "$as_me:22249: result: $cf_cv_good_bcopy" >&5
22250 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22251
22252 else
22253   cf_cv_good_bcopy=no
22254 fi
22255
22256         if test "$cf_cv_good_bcopy" = yes ; then
22257
22258 cat >>confdefs.h <<\EOF
22259 #define USE_OK_BCOPY 1
22260 EOF
22261
22262         else
22263
22264 cat >>confdefs.h <<\EOF
22265 #define USE_MY_MEMMOVE 1
22266 EOF
22267
22268         fi
22269
22270 fi
22271
22272 tty 2>&1 >/dev/null || {
22273 for ac_func in posix_openpt
22274 do
22275 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22276 echo "$as_me:22276: checking for $ac_func" >&5
22277 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22278 if eval "test \"\${$as_ac_var+set}\" = set"; then
22279   echo $ECHO_N "(cached) $ECHO_C" >&6
22280 else
22281   cat >conftest.$ac_ext <<_ACEOF
22282 #line 22282 "configure"
22283 #include "confdefs.h"
22284 #define $ac_func autoconf_temporary
22285 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22286 #undef $ac_func
22287
22288 #ifdef __cplusplus
22289 extern "C"
22290 #endif
22291
22292 /* We use char because int might match the return type of a gcc2
22293    builtin and then its argument prototype would still apply.  */
22294 char $ac_func (void);
22295
22296 int
22297 main (void)
22298 {
22299
22300 /* The GNU C library defines stubs for functions which it implements
22301     to always fail with ENOSYS.  Some functions are actually named
22302     something starting with __ and the normal name is an alias.  */
22303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22304 #error found stub for $ac_func
22305 #endif
22306
22307         return $ac_func ();
22308   ;
22309   return 0;
22310 }
22311 _ACEOF
22312 rm -f conftest.$ac_objext conftest$ac_exeext
22313 if { (eval echo "$as_me:22313: \"$ac_link\"") >&5
22314   (eval $ac_link) 2>&5
22315   ac_status=$?
22316   echo "$as_me:22316: \$? = $ac_status" >&5
22317   (exit $ac_status); } &&
22318          { ac_try='test -s conftest$ac_exeext'
22319   { (eval echo "$as_me:22319: \"$ac_try\"") >&5
22320   (eval $ac_try) 2>&5
22321   ac_status=$?
22322   echo "$as_me:22322: \$? = $ac_status" >&5
22323   (exit $ac_status); }; }; then
22324   eval "$as_ac_var=yes"
22325 else
22326   echo "$as_me: failed program was:" >&5
22327 cat conftest.$ac_ext >&5
22328 eval "$as_ac_var=no"
22329 fi
22330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22331 fi
22332 echo "$as_me:22332: result: `eval echo '${'$as_ac_var'}'`" >&5
22333 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22334 if test `eval echo '${'$as_ac_var'}'` = yes; then
22335   cat >>confdefs.h <<EOF
22336 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22337 EOF
22338
22339 fi
22340 done
22341  }
22342 echo "$as_me:22342: checking if poll really works" >&5
22343 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22344 if test "${cf_cv_working_poll+set}" = set; then
22345   echo $ECHO_N "(cached) $ECHO_C" >&6
22346 else
22347
22348 if test "$cross_compiling" = yes; then
22349   cf_cv_working_poll=unknown
22350 else
22351   cat >conftest.$ac_ext <<_ACEOF
22352 #line 22352 "configure"
22353 #include "confdefs.h"
22354
22355 #include <stdlib.h>
22356 #include <stdio.h>
22357 #include <unistd.h>
22358 #include <fcntl.h>
22359 #ifdef HAVE_POLL_H
22360 #include <poll.h>
22361 #else
22362 #include <sys/poll.h>
22363 #endif
22364 int main(void) {
22365         struct pollfd myfds;
22366         int ret;
22367
22368         /* check for Darwin bug with respect to "devices" */
22369         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22370         if (myfds.fd < 0)
22371                 myfds.fd = 0;
22372         myfds.events = POLLIN;
22373         myfds.revents = 0;
22374
22375         ret = poll(&myfds, 1, 100);
22376
22377         if (ret < 0 || (myfds.revents & POLLNVAL)) {
22378                 ret = -1;
22379         } else {
22380                 int fd = 0;
22381                 if (!isatty(fd)) {
22382                         fd = open("/dev/tty", 2);       /* O_RDWR */
22383                 }
22384 #ifdef HAVE_POSIX_OPENPT
22385                 if (fd < 0) {
22386                         fd = posix_openpt(O_RDWR);
22387                 }
22388 #endif
22389
22390                 if (fd >= 0) {
22391                         /* also check with standard input */
22392                         myfds.fd = fd;
22393                         myfds.events = POLLIN;
22394                         myfds.revents = 0;
22395                         ret = poll(&myfds, 1, 100);
22396                 } else {
22397                         ret = -1;
22398                 }
22399         }
22400         ${cf_cv_main_return:-return}(ret < 0);
22401 }
22402 _ACEOF
22403 rm -f conftest$ac_exeext
22404 if { (eval echo "$as_me:22404: \"$ac_link\"") >&5
22405   (eval $ac_link) 2>&5
22406   ac_status=$?
22407   echo "$as_me:22407: \$? = $ac_status" >&5
22408   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22409   { (eval echo "$as_me:22409: \"$ac_try\"") >&5
22410   (eval $ac_try) 2>&5
22411   ac_status=$?
22412   echo "$as_me:22412: \$? = $ac_status" >&5
22413   (exit $ac_status); }; }; then
22414   cf_cv_working_poll=yes
22415 else
22416   echo "$as_me: program exited with status $ac_status" >&5
22417 echo "$as_me: failed program was:" >&5
22418 cat conftest.$ac_ext >&5
22419 cf_cv_working_poll=no
22420 fi
22421 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22422 fi
22423 fi
22424 echo "$as_me:22424: result: $cf_cv_working_poll" >&5
22425 echo "${ECHO_T}$cf_cv_working_poll" >&6
22426 test "$cf_cv_working_poll" = "yes" &&
22427 cat >>confdefs.h <<\EOF
22428 #define HAVE_WORKING_POLL 1
22429 EOF
22430
22431 echo "$as_me:22431: checking for va_copy" >&5
22432 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
22433 if test "${cf_cv_have_va_copy+set}" = set; then
22434   echo $ECHO_N "(cached) $ECHO_C" >&6
22435 else
22436
22437 cat >conftest.$ac_ext <<_ACEOF
22438 #line 22438 "configure"
22439 #include "confdefs.h"
22440
22441 #include <stdarg.h>
22442
22443 int
22444 main (void)
22445 {
22446
22447         static va_list dst;
22448         static va_list src;
22449         va_copy(dst, src)
22450   ;
22451   return 0;
22452 }
22453 _ACEOF
22454 rm -f conftest.$ac_objext conftest$ac_exeext
22455 if { (eval echo "$as_me:22455: \"$ac_link\"") >&5
22456   (eval $ac_link) 2>&5
22457   ac_status=$?
22458   echo "$as_me:22458: \$? = $ac_status" >&5
22459   (exit $ac_status); } &&
22460          { ac_try='test -s conftest$ac_exeext'
22461   { (eval echo "$as_me:22461: \"$ac_try\"") >&5
22462   (eval $ac_try) 2>&5
22463   ac_status=$?
22464   echo "$as_me:22464: \$? = $ac_status" >&5
22465   (exit $ac_status); }; }; then
22466   cf_cv_have_va_copy=yes
22467 else
22468   echo "$as_me: failed program was:" >&5
22469 cat conftest.$ac_ext >&5
22470 cf_cv_have_va_copy=no
22471 fi
22472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22473 fi
22474 echo "$as_me:22474: result: $cf_cv_have_va_copy" >&5
22475 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
22476
22477 if test "$cf_cv_have_va_copy" = yes;
22478 then
22479
22480 cat >>confdefs.h <<\EOF
22481 #define HAVE_VA_COPY 1
22482 EOF
22483
22484 else # !cf_cv_have_va_copy
22485
22486 echo "$as_me:22486: checking for __va_copy" >&5
22487 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
22488 if test "${cf_cv_have___va_copy+set}" = set; then
22489   echo $ECHO_N "(cached) $ECHO_C" >&6
22490 else
22491
22492 cat >conftest.$ac_ext <<_ACEOF
22493 #line 22493 "configure"
22494 #include "confdefs.h"
22495
22496 #include <stdarg.h>
22497
22498 int
22499 main (void)
22500 {
22501
22502         static va_list dst;
22503         static va_list src;
22504         __va_copy(dst, src)
22505   ;
22506   return 0;
22507 }
22508 _ACEOF
22509 rm -f conftest.$ac_objext conftest$ac_exeext
22510 if { (eval echo "$as_me:22510: \"$ac_link\"") >&5
22511   (eval $ac_link) 2>&5
22512   ac_status=$?
22513   echo "$as_me:22513: \$? = $ac_status" >&5
22514   (exit $ac_status); } &&
22515          { ac_try='test -s conftest$ac_exeext'
22516   { (eval echo "$as_me:22516: \"$ac_try\"") >&5
22517   (eval $ac_try) 2>&5
22518   ac_status=$?
22519   echo "$as_me:22519: \$? = $ac_status" >&5
22520   (exit $ac_status); }; }; then
22521   cf_cv_have___va_copy=yes
22522 else
22523   echo "$as_me: failed program was:" >&5
22524 cat conftest.$ac_ext >&5
22525 cf_cv_have___va_copy=no
22526 fi
22527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22528 fi
22529 echo "$as_me:22529: result: $cf_cv_have___va_copy" >&5
22530 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
22531
22532 if test "$cf_cv_have___va_copy" = yes
22533 then
22534
22535 cat >>confdefs.h <<\EOF
22536 #define HAVE___VA_COPY 1
22537 EOF
22538
22539 else # !cf_cv_have___va_copy
22540
22541 echo "$as_me:22541: checking for __builtin_va_copy" >&5
22542 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
22543 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
22544   echo $ECHO_N "(cached) $ECHO_C" >&6
22545 else
22546
22547 cat >conftest.$ac_ext <<_ACEOF
22548 #line 22548 "configure"
22549 #include "confdefs.h"
22550
22551 #include <stdarg.h>
22552
22553 int
22554 main (void)
22555 {
22556
22557         static va_list dst;
22558         static va_list src;
22559         __builtin_va_copy(dst, src)
22560   ;
22561   return 0;
22562 }
22563 _ACEOF
22564 rm -f conftest.$ac_objext conftest$ac_exeext
22565 if { (eval echo "$as_me:22565: \"$ac_link\"") >&5
22566   (eval $ac_link) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit $ac_status); } &&
22570          { ac_try='test -s conftest$ac_exeext'
22571   { (eval echo "$as_me:22571: \"$ac_try\"") >&5
22572   (eval $ac_try) 2>&5
22573   ac_status=$?
22574   echo "$as_me:22574: \$? = $ac_status" >&5
22575   (exit $ac_status); }; }; then
22576   cf_cv_have___builtin_va_copy=yes
22577 else
22578   echo "$as_me: failed program was:" >&5
22579 cat conftest.$ac_ext >&5
22580 cf_cv_have___builtin_va_copy=no
22581 fi
22582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22583 fi
22584 echo "$as_me:22584: result: $cf_cv_have___builtin_va_copy" >&5
22585 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22586
22587 test "$cf_cv_have___builtin_va_copy" = yes &&
22588
22589 cat >>confdefs.h <<\EOF
22590 #define HAVE___BUILTIN_VA_COPY 1
22591 EOF
22592
22593 fi # cf_cv_have___va_copy
22594
22595 fi # cf_cv_have_va_copy
22596
22597 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22598 (*yes*)
22599         ;;
22600
22601 (*)
22602         echo "$as_me:22602: checking if we can simply copy va_list" >&5
22603 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22604 if test "${cf_cv_pointer_va_list+set}" = set; then
22605   echo $ECHO_N "(cached) $ECHO_C" >&6
22606 else
22607
22608 cat >conftest.$ac_ext <<_ACEOF
22609 #line 22609 "configure"
22610 #include "confdefs.h"
22611
22612 #include <stdarg.h>
22613
22614 int
22615 main (void)
22616 {
22617
22618         va_list dst;
22619         va_list src;
22620         dst = src
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f conftest.$ac_objext conftest$ac_exeext
22626 if { (eval echo "$as_me:22626: \"$ac_link\"") >&5
22627   (eval $ac_link) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit $ac_status); } &&
22631          { ac_try='test -s conftest$ac_exeext'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit $ac_status); }; }; then
22637   cf_cv_pointer_va_list=yes
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat conftest.$ac_ext >&5
22641 cf_cv_pointer_va_list=no
22642 fi
22643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22644 fi
22645 echo "$as_me:22645: result: $cf_cv_pointer_va_list" >&5
22646 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22647
22648         if test "$cf_cv_pointer_va_list" = no
22649         then
22650                 echo "$as_me:22650: checking if we can copy va_list indirectly" >&5
22651 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22652 if test "${cf_cv_array_va_list+set}" = set; then
22653   echo $ECHO_N "(cached) $ECHO_C" >&6
22654 else
22655
22656 cat >conftest.$ac_ext <<_ACEOF
22657 #line 22657 "configure"
22658 #include "confdefs.h"
22659
22660 #include <stdarg.h>
22661
22662 int
22663 main (void)
22664 {
22665
22666         va_list dst;
22667         va_list src;
22668         *dst = *src
22669   ;
22670   return 0;
22671 }
22672 _ACEOF
22673 rm -f conftest.$ac_objext conftest$ac_exeext
22674 if { (eval echo "$as_me:22674: \"$ac_link\"") >&5
22675   (eval $ac_link) 2>&5
22676   ac_status=$?
22677   echo "$as_me:22677: \$? = $ac_status" >&5
22678   (exit $ac_status); } &&
22679          { ac_try='test -s conftest$ac_exeext'
22680   { (eval echo "$as_me:22680: \"$ac_try\"") >&5
22681   (eval $ac_try) 2>&5
22682   ac_status=$?
22683   echo "$as_me:22683: \$? = $ac_status" >&5
22684   (exit $ac_status); }; }; then
22685   cf_cv_array_va_list=yes
22686 else
22687   echo "$as_me: failed program was:" >&5
22688 cat conftest.$ac_ext >&5
22689 cf_cv_array_va_list=no
22690 fi
22691 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22692 fi
22693 echo "$as_me:22693: result: $cf_cv_array_va_list" >&5
22694 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22695                 test "$cf_cv_array_va_list" = yes &&
22696 cat >>confdefs.h <<\EOF
22697 #define ARRAY_VA_LIST 1
22698 EOF
22699
22700         fi
22701         ;;
22702 esac
22703
22704 echo "$as_me:22704: checking for pid_t" >&5
22705 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22706 if test "${ac_cv_type_pid_t+set}" = set; then
22707   echo $ECHO_N "(cached) $ECHO_C" >&6
22708 else
22709   cat >conftest.$ac_ext <<_ACEOF
22710 #line 22710 "configure"
22711 #include "confdefs.h"
22712 $ac_includes_default
22713 int
22714 main (void)
22715 {
22716 if ((pid_t *) 0)
22717   return 0;
22718 if (sizeof (pid_t))
22719   return 0;
22720   ;
22721   return 0;
22722 }
22723 _ACEOF
22724 rm -f conftest.$ac_objext
22725 if { (eval echo "$as_me:22725: \"$ac_compile\"") >&5
22726   (eval $ac_compile) 2>&5
22727   ac_status=$?
22728   echo "$as_me:22728: \$? = $ac_status" >&5
22729   (exit $ac_status); } &&
22730          { ac_try='test -s conftest.$ac_objext'
22731   { (eval echo "$as_me:22731: \"$ac_try\"") >&5
22732   (eval $ac_try) 2>&5
22733   ac_status=$?
22734   echo "$as_me:22734: \$? = $ac_status" >&5
22735   (exit $ac_status); }; }; then
22736   ac_cv_type_pid_t=yes
22737 else
22738   echo "$as_me: failed program was:" >&5
22739 cat conftest.$ac_ext >&5
22740 ac_cv_type_pid_t=no
22741 fi
22742 rm -f conftest.$ac_objext conftest.$ac_ext
22743 fi
22744 echo "$as_me:22744: result: $ac_cv_type_pid_t" >&5
22745 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22746 if test $ac_cv_type_pid_t = yes; then
22747   :
22748 else
22749
22750 cat >>confdefs.h <<EOF
22751 #define pid_t int
22752 EOF
22753
22754 fi
22755
22756 for ac_header in unistd.h vfork.h
22757 do
22758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22759 echo "$as_me:22759: checking for $ac_header" >&5
22760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22762   echo $ECHO_N "(cached) $ECHO_C" >&6
22763 else
22764   cat >conftest.$ac_ext <<_ACEOF
22765 #line 22765 "configure"
22766 #include "confdefs.h"
22767 #include <$ac_header>
22768 _ACEOF
22769 if { (eval echo "$as_me:22769: \"$ac_cpp conftest.$ac_ext\"") >&5
22770   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22771   ac_status=$?
22772   egrep -v '^ *\+' conftest.er1 >conftest.err
22773   rm -f conftest.er1
22774   cat conftest.err >&5
22775   echo "$as_me:22775: \$? = $ac_status" >&5
22776   (exit $ac_status); } >/dev/null; then
22777   if test -s conftest.err; then
22778     ac_cpp_err=$ac_c_preproc_warn_flag
22779   else
22780     ac_cpp_err=
22781   fi
22782 else
22783   ac_cpp_err=yes
22784 fi
22785 if test -z "$ac_cpp_err"; then
22786   eval "$as_ac_Header=yes"
22787 else
22788   echo "$as_me: failed program was:" >&5
22789   cat conftest.$ac_ext >&5
22790   eval "$as_ac_Header=no"
22791 fi
22792 rm -f conftest.err conftest.$ac_ext
22793 fi
22794 echo "$as_me:22794: result: `eval echo '${'$as_ac_Header'}'`" >&5
22795 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22796 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22797   cat >>confdefs.h <<EOF
22798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22799 EOF
22800
22801 fi
22802 done
22803
22804 for ac_func in fork vfork
22805 do
22806 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22807 echo "$as_me:22807: checking for $ac_func" >&5
22808 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22809 if eval "test \"\${$as_ac_var+set}\" = set"; then
22810   echo $ECHO_N "(cached) $ECHO_C" >&6
22811 else
22812   cat >conftest.$ac_ext <<_ACEOF
22813 #line 22813 "configure"
22814 #include "confdefs.h"
22815 #define $ac_func autoconf_temporary
22816 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22817 #undef $ac_func
22818
22819 #ifdef __cplusplus
22820 extern "C"
22821 #endif
22822
22823 /* We use char because int might match the return type of a gcc2
22824    builtin and then its argument prototype would still apply.  */
22825 char $ac_func (void);
22826
22827 int
22828 main (void)
22829 {
22830
22831 /* The GNU C library defines stubs for functions which it implements
22832     to always fail with ENOSYS.  Some functions are actually named
22833     something starting with __ and the normal name is an alias.  */
22834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22835 #error found stub for $ac_func
22836 #endif
22837
22838         return $ac_func ();
22839   ;
22840   return 0;
22841 }
22842 _ACEOF
22843 rm -f conftest.$ac_objext conftest$ac_exeext
22844 if { (eval echo "$as_me:22844: \"$ac_link\"") >&5
22845   (eval $ac_link) 2>&5
22846   ac_status=$?
22847   echo "$as_me:22847: \$? = $ac_status" >&5
22848   (exit $ac_status); } &&
22849          { ac_try='test -s conftest$ac_exeext'
22850   { (eval echo "$as_me:22850: \"$ac_try\"") >&5
22851   (eval $ac_try) 2>&5
22852   ac_status=$?
22853   echo "$as_me:22853: \$? = $ac_status" >&5
22854   (exit $ac_status); }; }; then
22855   eval "$as_ac_var=yes"
22856 else
22857   echo "$as_me: failed program was:" >&5
22858 cat conftest.$ac_ext >&5
22859 eval "$as_ac_var=no"
22860 fi
22861 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22862 fi
22863 echo "$as_me:22863: result: `eval echo '${'$as_ac_var'}'`" >&5
22864 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22865 if test `eval echo '${'$as_ac_var'}'` = yes; then
22866   cat >>confdefs.h <<EOF
22867 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22868 EOF
22869
22870 fi
22871 done
22872
22873 ac_cv_func_fork_works=$ac_cv_func_fork
22874 if test "x$ac_cv_func_fork" = xyes; then
22875   echo "$as_me:22875: checking for working fork" >&5
22876 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22877 if test "${ac_cv_func_fork_works+set}" = set; then
22878   echo $ECHO_N "(cached) $ECHO_C" >&6
22879 else
22880   if test "$cross_compiling" = yes; then
22881   ac_cv_func_fork_works=cross
22882 else
22883   cat >conftest.$ac_ext <<_ACEOF
22884 /* By Rüdiger Kuhlmann. */
22885       #include <sys/types.h>
22886       #if HAVE_UNISTD_H
22887       # include <unistd.h>
22888       #endif
22889       /* Some systems only have a dummy stub for fork() */
22890       int main (void)
22891       {
22892         if (fork() < 0)
22893           $ac_main_return (1);
22894         $ac_main_return (0);
22895       }
22896 _ACEOF
22897 rm -f conftest$ac_exeext
22898 if { (eval echo "$as_me:22898: \"$ac_link\"") >&5
22899   (eval $ac_link) 2>&5
22900   ac_status=$?
22901   echo "$as_me:22901: \$? = $ac_status" >&5
22902   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22903   { (eval echo "$as_me:22903: \"$ac_try\"") >&5
22904   (eval $ac_try) 2>&5
22905   ac_status=$?
22906   echo "$as_me:22906: \$? = $ac_status" >&5
22907   (exit $ac_status); }; }; then
22908   ac_cv_func_fork_works=yes
22909 else
22910   echo "$as_me: program exited with status $ac_status" >&5
22911 echo "$as_me: failed program was:" >&5
22912 cat conftest.$ac_ext >&5
22913 ac_cv_func_fork_works=no
22914 fi
22915 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22916 fi
22917 fi
22918 echo "$as_me:22918: result: $ac_cv_func_fork_works" >&5
22919 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22920
22921 fi
22922 if test "x$ac_cv_func_fork_works" = xcross; then
22923   case $host in
22924     *-*-amigaos* | *-*-msdosdjgpp*)
22925       # Override, as these systems have only a dummy fork() stub
22926       ac_cv_func_fork_works=no
22927       ;;
22928     *)
22929       ac_cv_func_fork_works=yes
22930       ;;
22931   esac
22932   { echo "$as_me:22932: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22933 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22934 fi
22935 ac_cv_func_vfork_works=$ac_cv_func_vfork
22936 if test "x$ac_cv_func_vfork" = xyes; then
22937   echo "$as_me:22937: checking for working vfork" >&5
22938 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22939 if test "${ac_cv_func_vfork_works+set}" = set; then
22940   echo $ECHO_N "(cached) $ECHO_C" >&6
22941 else
22942   if test "$cross_compiling" = yes; then
22943   ac_cv_func_vfork_works=cross
22944 else
22945   cat >conftest.$ac_ext <<_ACEOF
22946 #line 22946 "configure"
22947 #include "confdefs.h"
22948 /* Thanks to Paul Eggert for this test.  */
22949 #include <stdio.h>
22950 #include <sys/types.h>
22951 #include <sys/stat.h>
22952 #if HAVE_UNISTD_H
22953 # include <unistd.h>
22954 #endif
22955 #if HAVE_VFORK_H
22956 # include <vfork.h>
22957 #endif
22958 /* On some sparc systems, changes by the child to local and incoming
22959    argument registers are propagated back to the parent.  The compiler
22960    is told about this with #include <vfork.h>, but some compilers
22961    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22962    static variable whose address is put into a register that is
22963    clobbered by the vfork.  */
22964 static
22965 #ifdef __cplusplus
22966 sparc_address_test (int arg)
22967 # else
22968 sparc_address_test (arg) int arg;
22969 #endif
22970 {
22971   static pid_t child;
22972   if (!child) {
22973     child = vfork ();
22974     if (child < 0) {
22975       perror ("vfork");
22976       _exit(2);
22977     }
22978     if (!child) {
22979       arg = getpid();
22980       write(-1, "", 0);
22981       _exit (arg);
22982     }
22983   }
22984 }
22985
22986 int
22987 main (void)
22988 {
22989   pid_t parent = getpid ();
22990   pid_t child;
22991
22992   sparc_address_test ();
22993
22994   child = vfork ();
22995
22996   if (child == 0) {
22997     /* Here is another test for sparc vfork register problems.  This
22998        test uses lots of local variables, at least as many local
22999        variables as main has allocated so far including compiler
23000        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23001        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23002        reuse the register of parent for one of the local variables,
23003        since it will think that parent can't possibly be used any more
23004        in this routine.  Assigning to the local variable will thus
23005        munge parent in the parent process.  */
23006     pid_t
23007       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23008       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23009     /* Convince the compiler that p..p7 are live; otherwise, it might
23010        use the same hardware register for all 8 local variables.  */
23011     if (p != p1 || p != p2 || p != p3 || p != p4
23012         || p != p5 || p != p6 || p != p7)
23013       _exit(1);
23014
23015     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23016        from child file descriptors.  If the child closes a descriptor
23017        before it execs or exits, this munges the parent's descriptor
23018        as well.  Test for this by closing stdout in the child.  */
23019     _exit(close(fileno(stdout)) != 0);
23020   } else {
23021     int status;
23022     struct stat st;
23023
23024     while (wait(&status) != child)
23025       ;
23026     $ac_main_return(
23027          /* Was there some problem with vforking?  */
23028          child < 0
23029
23030          /* Did the child fail?  (This shouldn't happen.)  */
23031          || status
23032
23033          /* Did the vfork/compiler bug occur?  */
23034          || parent != getpid()
23035
23036          /* Did the file descriptor bug occur?  */
23037          || fstat(fileno(stdout), &st) != 0
23038          );
23039   }
23040 }
23041 _ACEOF
23042 rm -f conftest$ac_exeext
23043 if { (eval echo "$as_me:23043: \"$ac_link\"") >&5
23044   (eval $ac_link) 2>&5
23045   ac_status=$?
23046   echo "$as_me:23046: \$? = $ac_status" >&5
23047   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23048   { (eval echo "$as_me:23048: \"$ac_try\"") >&5
23049   (eval $ac_try) 2>&5
23050   ac_status=$?
23051   echo "$as_me:23051: \$? = $ac_status" >&5
23052   (exit $ac_status); }; }; then
23053   ac_cv_func_vfork_works=yes
23054 else
23055   echo "$as_me: program exited with status $ac_status" >&5
23056 echo "$as_me: failed program was:" >&5
23057 cat conftest.$ac_ext >&5
23058 ac_cv_func_vfork_works=no
23059 fi
23060 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23061 fi
23062 fi
23063 echo "$as_me:23063: result: $ac_cv_func_vfork_works" >&5
23064 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23065
23066 fi;
23067 if test "x$ac_cv_func_fork_works" = xcross; then
23068   ac_cv_func_vfork_works=ac_cv_func_vfork
23069   { echo "$as_me:23069: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23070 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23071 fi
23072
23073 if test "x$ac_cv_func_vfork_works" = xyes; then
23074
23075 cat >>confdefs.h <<\EOF
23076 #define HAVE_WORKING_VFORK 1
23077 EOF
23078
23079 else
23080
23081 cat >>confdefs.h <<\EOF
23082 #define vfork fork
23083 EOF
23084
23085 fi
23086 if test "x$ac_cv_func_fork_works" = xyes; then
23087
23088 cat >>confdefs.h <<\EOF
23089 #define HAVE_WORKING_FORK 1
23090 EOF
23091
23092 fi
23093
23094 echo "$as_me:23094: checking if fopen accepts explicit binary mode" >&5
23095 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23096 if test "${cf_cv_fopen_bin_r+set}" = set; then
23097   echo $ECHO_N "(cached) $ECHO_C" >&6
23098 else
23099
23100         if test "$cross_compiling" = yes; then
23101   cf_cv_fopen_bin_r=unknown
23102 else
23103   cat >conftest.$ac_ext <<_ACEOF
23104 #line 23104 "configure"
23105 #include "confdefs.h"
23106
23107 #include <stdio.h>
23108 int main(void) {
23109         FILE *fp = fopen("conftest.tmp", "wb");
23110         int rc = 0;
23111         if (fp != 0) {
23112                 int p, q;
23113                 for (p = 0; p < 256; ++p) {
23114                         fputc(p, fp);
23115                 }
23116                 fclose(fp);
23117                 fp = fopen("conftest.tmp", "rb");
23118                 if (fp != 0) {
23119                         for (p = 0; p < 256; ++p) {
23120                                 q = fgetc(fp);
23121                                 if (q != p) {
23122                                         rc = 1;
23123                                         break;
23124                                 }
23125                         }
23126                 } else {
23127                         rc = 1;
23128                 }
23129         } else {
23130                 rc = 1;
23131         }
23132         ${cf_cv_main_return:-return} (rc);
23133 }
23134
23135 _ACEOF
23136 rm -f conftest$ac_exeext
23137 if { (eval echo "$as_me:23137: \"$ac_link\"") >&5
23138   (eval $ac_link) 2>&5
23139   ac_status=$?
23140   echo "$as_me:23140: \$? = $ac_status" >&5
23141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23142   { (eval echo "$as_me:23142: \"$ac_try\"") >&5
23143   (eval $ac_try) 2>&5
23144   ac_status=$?
23145   echo "$as_me:23145: \$? = $ac_status" >&5
23146   (exit $ac_status); }; }; then
23147   cf_cv_fopen_bin_r=yes
23148 else
23149   echo "$as_me: program exited with status $ac_status" >&5
23150 echo "$as_me: failed program was:" >&5
23151 cat conftest.$ac_ext >&5
23152 cf_cv_fopen_bin_r=no
23153 fi
23154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23155 fi
23156
23157 fi
23158 echo "$as_me:23158: result: $cf_cv_fopen_bin_r" >&5
23159 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23160 test "x$cf_cv_fopen_bin_r" != xno &&
23161 cat >>confdefs.h <<\EOF
23162 #define USE_FOPEN_BIN_R 1
23163 EOF
23164
23165 # special check for test/ditto.c
23166
23167 echo "$as_me:23167: checking for openpty in -lutil" >&5
23168 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23169 if test "${ac_cv_lib_util_openpty+set}" = set; then
23170   echo $ECHO_N "(cached) $ECHO_C" >&6
23171 else
23172   ac_check_lib_save_LIBS=$LIBS
23173 LIBS="-lutil  $LIBS"
23174 cat >conftest.$ac_ext <<_ACEOF
23175 #line 23175 "configure"
23176 #include "confdefs.h"
23177
23178 /* Override any gcc2 internal prototype to avoid an error.  */
23179 #ifdef __cplusplus
23180 extern "C"
23181 #endif
23182 /* We use char because int might match the return type of a gcc2
23183    builtin and then its argument prototype would still apply.  */
23184 char openpty ();
23185 int
23186 main (void)
23187 {
23188 openpty ();
23189   ;
23190   return 0;
23191 }
23192 _ACEOF
23193 rm -f conftest.$ac_objext conftest$ac_exeext
23194 if { (eval echo "$as_me:23194: \"$ac_link\"") >&5
23195   (eval $ac_link) 2>&5
23196   ac_status=$?
23197   echo "$as_me:23197: \$? = $ac_status" >&5
23198   (exit $ac_status); } &&
23199          { ac_try='test -s conftest$ac_exeext'
23200   { (eval echo "$as_me:23200: \"$ac_try\"") >&5
23201   (eval $ac_try) 2>&5
23202   ac_status=$?
23203   echo "$as_me:23203: \$? = $ac_status" >&5
23204   (exit $ac_status); }; }; then
23205   ac_cv_lib_util_openpty=yes
23206 else
23207   echo "$as_me: failed program was:" >&5
23208 cat conftest.$ac_ext >&5
23209 ac_cv_lib_util_openpty=no
23210 fi
23211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23212 LIBS=$ac_check_lib_save_LIBS
23213 fi
23214 echo "$as_me:23214: result: $ac_cv_lib_util_openpty" >&5
23215 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23216 if test $ac_cv_lib_util_openpty = yes; then
23217   cf_cv_lib_util=yes
23218 else
23219   cf_cv_lib_util=no
23220 fi
23221
23222 echo "$as_me:23222: checking for openpty header" >&5
23223 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23224 if test "${cf_cv_func_openpty+set}" = set; then
23225   echo $ECHO_N "(cached) $ECHO_C" >&6
23226 else
23227
23228         cf_save_LIBS="$LIBS"
23229         test $cf_cv_lib_util = yes && {
23230 cf_add_libs="$LIBS"
23231 # reverse order
23232 cf_add_0lib=
23233 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23234 # filter duplicates
23235 for cf_add_1lib in $cf_add_0lib; do
23236         for cf_add_2lib in $cf_add_libs; do
23237                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23238                         cf_add_1lib=
23239                         break
23240                 fi
23241         done
23242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23243 done
23244 LIBS="$cf_add_libs"
23245  }
23246         for cf_header in pty.h libutil.h util.h
23247         do
23248         cat >conftest.$ac_ext <<_ACEOF
23249 #line 23249 "configure"
23250 #include "confdefs.h"
23251
23252 #include <$cf_header>
23253
23254 int
23255 main (void)
23256 {
23257
23258         int x = openpty((int *)0, (int *)0, (char *)0,
23259                                    (struct termios *)0, (struct winsize *)0);
23260
23261   ;
23262   return 0;
23263 }
23264 _ACEOF
23265 rm -f conftest.$ac_objext conftest$ac_exeext
23266 if { (eval echo "$as_me:23266: \"$ac_link\"") >&5
23267   (eval $ac_link) 2>&5
23268   ac_status=$?
23269   echo "$as_me:23269: \$? = $ac_status" >&5
23270   (exit $ac_status); } &&
23271          { ac_try='test -s conftest$ac_exeext'
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
23278                 cf_cv_func_openpty=$cf_header
23279                 break
23280
23281 else
23282   echo "$as_me: failed program was:" >&5
23283 cat conftest.$ac_ext >&5
23284
23285                 cf_cv_func_openpty=no
23286
23287 fi
23288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23289         done
23290         LIBS="$cf_save_LIBS"
23291
23292 fi
23293 echo "$as_me:23293: result: $cf_cv_func_openpty" >&5
23294 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23295
23296 if test "$cf_cv_func_openpty" != no ; then
23297
23298 cat >>confdefs.h <<EOF
23299 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23300 EOF
23301
23302 cat >>confdefs.h <<\EOF
23303 #define USE_XTERM_PTY 1
23304 EOF
23305
23306         if test "x$cf_cv_lib_util" = xyes ; then
23307
23308 cf_add_libs="$TEST_LIBS"
23309 # reverse order
23310 cf_add_0lib=
23311 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23312 # filter duplicates
23313 for cf_add_1lib in $cf_add_0lib; do
23314         for cf_add_2lib in $cf_add_libs; do
23315                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23316                         cf_add_1lib=
23317                         break
23318                 fi
23319         done
23320         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23321 done
23322 TEST_LIBS="$cf_add_libs"
23323
23324         fi
23325 fi
23326
23327 if test "$with_hashed_db" != no ; then
23328
23329 cat >>confdefs.h <<\EOF
23330 #define USE_HASHED_DB 1
23331 EOF
23332
23333 case $with_hashed_db in
23334 (yes|*able*)
23335         ;;
23336 (*)
23337         if test -d "$with_hashed_db" ; then
23338
23339 if test -n "$with_hashed_db/include" ; then
23340   for cf_add_incdir in $with_hashed_db/include
23341   do
23342         while test $cf_add_incdir != /usr/include
23343         do
23344           if test -d $cf_add_incdir
23345           then
23346                 cf_have_incdir=no
23347                 if test -n "$CFLAGS$CPPFLAGS" ; then
23348                   # a loop is needed to ensure we can add subdirs of existing dirs
23349                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23350                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23351                           cf_have_incdir=yes; break
23352                         fi
23353                   done
23354                 fi
23355
23356                 if test "$cf_have_incdir" = no ; then
23357                   if test "$cf_add_incdir" = /usr/local/include ; then
23358                         if test "$GCC" = yes
23359                         then
23360                           cf_save_CPPFLAGS=$CPPFLAGS
23361
23362         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23363         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23364
23365                           cat >conftest.$ac_ext <<_ACEOF
23366 #line 23366 "configure"
23367 #include "confdefs.h"
23368 #include <stdio.h>
23369 int
23370 main (void)
23371 {
23372 printf("Hello")
23373   ;
23374   return 0;
23375 }
23376 _ACEOF
23377 rm -f conftest.$ac_objext
23378 if { (eval echo "$as_me:23378: \"$ac_compile\"") >&5
23379   (eval $ac_compile) 2>&5
23380   ac_status=$?
23381   echo "$as_me:23381: \$? = $ac_status" >&5
23382   (exit $ac_status); } &&
23383          { ac_try='test -s conftest.$ac_objext'
23384   { (eval echo "$as_me:23384: \"$ac_try\"") >&5
23385   (eval $ac_try) 2>&5
23386   ac_status=$?
23387   echo "$as_me:23387: \$? = $ac_status" >&5
23388   (exit $ac_status); }; }; then
23389   :
23390 else
23391   echo "$as_me: failed program was:" >&5
23392 cat conftest.$ac_ext >&5
23393 cf_have_incdir=yes
23394 fi
23395 rm -f conftest.$ac_objext conftest.$ac_ext
23396                           CPPFLAGS=$cf_save_CPPFLAGS
23397                         fi
23398                   fi
23399                 fi
23400
23401                 if test "$cf_have_incdir" = no ; then
23402                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23403
23404 echo "${as_me:-configure}:23404: testing adding $cf_add_incdir to include-path ..." 1>&5
23405
23406                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23407
23408                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23409                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23410                   cf_add_incdir="$cf_top_incdir"
23411                 else
23412                   break
23413                 fi
23414           else
23415                 break
23416           fi
23417         done
23418   done
23419 fi
23420
23421 if test -n "$with_hashed_db/lib" ; then
23422         for cf_add_libdir in $with_hashed_db/lib
23423         do
23424                 if test $cf_add_libdir = /usr/lib ; then
23425                         :
23426                 elif test -d $cf_add_libdir
23427                 then
23428                         cf_have_libdir=no
23429                         if test -n "$LDFLAGS$LIBS" ; then
23430                                 # a loop is needed to ensure we can add subdirs of existing dirs
23431                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23432                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23433                                                 cf_have_libdir=yes; break
23434                                         fi
23435                                 done
23436                         fi
23437                         if test "$cf_have_libdir" = no ; then
23438                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23439
23440 echo "${as_me:-configure}:23440: testing adding $cf_add_libdir to library-path ..." 1>&5
23441
23442                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23443                         fi
23444                 fi
23445         done
23446 fi
23447
23448         else
23449                 case "$with_hashed_db" in
23450                 (./*|../*|/*)
23451                         { echo "$as_me:23451: WARNING: no such directory $with_hashed_db" >&5
23452 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
23453                         ;;
23454                 (*)
23455
23456 cf_search=
23457
23458 test "x$prefix" != "xNONE" && \
23459 test -d "$prefix" && \
23460  {
23461         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
23462         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
23463         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
23464         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
23465         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
23466         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
23467 }
23468
23469 for cf_subdir_prefix in \
23470         /usr \
23471         /usr/local \
23472         /usr/pkg \
23473         /opt \
23474         /opt/local \
23475         $HOME
23476 do
23477
23478 test "x$cf_subdir_prefix" != "x$prefix" && \
23479 test -d "$cf_subdir_prefix" && \
23480 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23481         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
23482         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
23483         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
23484         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
23485         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
23486         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"
23487 }
23488
23489 done
23490
23491         for cf_item in $cf_search
23492         do
23493                 case $cf_item in
23494                 (*/$with_hashed_db)
23495
23496 if test -n "$cf_item" ; then
23497   for cf_add_incdir in $cf_item
23498   do
23499         while test $cf_add_incdir != /usr/include
23500         do
23501           if test -d $cf_add_incdir
23502           then
23503                 cf_have_incdir=no
23504                 if test -n "$CFLAGS$CPPFLAGS" ; then
23505                   # a loop is needed to ensure we can add subdirs of existing dirs
23506                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23507                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23508                           cf_have_incdir=yes; break
23509                         fi
23510                   done
23511                 fi
23512
23513                 if test "$cf_have_incdir" = no ; then
23514                   if test "$cf_add_incdir" = /usr/local/include ; then
23515                         if test "$GCC" = yes
23516                         then
23517                           cf_save_CPPFLAGS=$CPPFLAGS
23518
23519         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23520         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23521
23522                           cat >conftest.$ac_ext <<_ACEOF
23523 #line 23523 "configure"
23524 #include "confdefs.h"
23525 #include <stdio.h>
23526 int
23527 main (void)
23528 {
23529 printf("Hello")
23530   ;
23531   return 0;
23532 }
23533 _ACEOF
23534 rm -f conftest.$ac_objext
23535 if { (eval echo "$as_me:23535: \"$ac_compile\"") >&5
23536   (eval $ac_compile) 2>&5
23537   ac_status=$?
23538   echo "$as_me:23538: \$? = $ac_status" >&5
23539   (exit $ac_status); } &&
23540          { ac_try='test -s conftest.$ac_objext'
23541   { (eval echo "$as_me:23541: \"$ac_try\"") >&5
23542   (eval $ac_try) 2>&5
23543   ac_status=$?
23544   echo "$as_me:23544: \$? = $ac_status" >&5
23545   (exit $ac_status); }; }; then
23546   :
23547 else
23548   echo "$as_me: failed program was:" >&5
23549 cat conftest.$ac_ext >&5
23550 cf_have_incdir=yes
23551 fi
23552 rm -f conftest.$ac_objext conftest.$ac_ext
23553                           CPPFLAGS=$cf_save_CPPFLAGS
23554                         fi
23555                   fi
23556                 fi
23557
23558                 if test "$cf_have_incdir" = no ; then
23559                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
23560
23561 echo "${as_me:-configure}:23561: testing adding $cf_add_incdir to include-path ..." 1>&5
23562
23563                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23564
23565                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
23566                   test "$cf_top_incdir" = "$cf_add_incdir" && break
23567                   cf_add_incdir="$cf_top_incdir"
23568                 else
23569                   break
23570                 fi
23571           else
23572                 break
23573           fi
23574         done
23575   done
23576 fi
23577
23578                         ;;
23579                 esac
23580         done
23581
23582 cf_search=
23583
23584 test "x$prefix" != "xNONE" && \
23585 test -d "$prefix" && \
23586  {
23587         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
23588         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
23589         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
23590         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
23591         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
23592         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
23593 }
23594
23595 for cf_subdir_prefix in \
23596         /usr \
23597         /usr/local \
23598         /usr/pkg \
23599         /opt \
23600         /opt/local \
23601         $HOME
23602 do
23603
23604 test "x$cf_subdir_prefix" != "x$prefix" && \
23605 test -d "$cf_subdir_prefix" && \
23606 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
23607         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
23608         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23609         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
23610         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
23611         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
23612         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"
23613 }
23614
23615 done
23616
23617         for cf_item in $cf_search
23618         do
23619                 case $cf_item in
23620                 (*/$with_hashed_db)
23621
23622 if test -n "$cf_item" ; then
23623         for cf_add_libdir in $cf_item
23624         do
23625                 if test $cf_add_libdir = /usr/lib ; then
23626                         :
23627                 elif test -d $cf_add_libdir
23628                 then
23629                         cf_have_libdir=no
23630                         if test -n "$LDFLAGS$LIBS" ; then
23631                                 # a loop is needed to ensure we can add subdirs of existing dirs
23632                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
23633                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23634                                                 cf_have_libdir=yes; break
23635                                         fi
23636                                 done
23637                         fi
23638                         if test "$cf_have_libdir" = no ; then
23639                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
23640
23641 echo "${as_me:-configure}:23641: testing adding $cf_add_libdir to library-path ..." 1>&5
23642
23643                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23644                         fi
23645                 fi
23646         done
23647 fi
23648
23649                         ;;
23650                 esac
23651         done
23652
23653                         ;;
23654                 esac
23655         fi
23656 esac
23657
23658 echo "$as_me:23658: checking for db.h" >&5
23659 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
23660 if test "${ac_cv_header_db_h+set}" = set; then
23661   echo $ECHO_N "(cached) $ECHO_C" >&6
23662 else
23663   cat >conftest.$ac_ext <<_ACEOF
23664 #line 23664 "configure"
23665 #include "confdefs.h"
23666 #include <db.h>
23667 _ACEOF
23668 if { (eval echo "$as_me:23668: \"$ac_cpp conftest.$ac_ext\"") >&5
23669   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23670   ac_status=$?
23671   egrep -v '^ *\+' conftest.er1 >conftest.err
23672   rm -f conftest.er1
23673   cat conftest.err >&5
23674   echo "$as_me:23674: \$? = $ac_status" >&5
23675   (exit $ac_status); } >/dev/null; then
23676   if test -s conftest.err; then
23677     ac_cpp_err=$ac_c_preproc_warn_flag
23678   else
23679     ac_cpp_err=
23680   fi
23681 else
23682   ac_cpp_err=yes
23683 fi
23684 if test -z "$ac_cpp_err"; then
23685   ac_cv_header_db_h=yes
23686 else
23687   echo "$as_me: failed program was:" >&5
23688   cat conftest.$ac_ext >&5
23689   ac_cv_header_db_h=no
23690 fi
23691 rm -f conftest.err conftest.$ac_ext
23692 fi
23693 echo "$as_me:23693: result: $ac_cv_header_db_h" >&5
23694 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23695 if test $ac_cv_header_db_h = yes; then
23696
23697 echo "$as_me:23697: checking for version of db" >&5
23698 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23699 if test "${cf_cv_hashed_db_version+set}" = set; then
23700   echo $ECHO_N "(cached) $ECHO_C" >&6
23701 else
23702
23703 cf_cv_hashed_db_version=unknown
23704
23705 for cf_db_version in 1 2 3 4 5 6
23706 do
23707
23708 echo "${as_me:-configure}:23708: testing checking for db version $cf_db_version ..." 1>&5
23709
23710         cat >conftest.$ac_ext <<_ACEOF
23711 #line 23711 "configure"
23712 #include "confdefs.h"
23713
23714 $ac_includes_default
23715 #include <db.h>
23716
23717 #ifdef DB_VERSION_MAJOR
23718         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23719 #if $cf_db_version == DB_VERSION_MAJOR
23720         /* ok */
23721 #else
23722         make an error
23723 #endif
23724 #else
23725 #if $cf_db_version == 1
23726         /* ok: assuming this is DB 1.8.5 */
23727 #else
23728         make an error
23729 #endif
23730 #endif
23731
23732 int
23733 main (void)
23734 {
23735 DBT *foo = 0
23736   ;
23737   return 0;
23738 }
23739 _ACEOF
23740 rm -f conftest.$ac_objext
23741 if { (eval echo "$as_me:23741: \"$ac_compile\"") >&5
23742   (eval $ac_compile) 2>&5
23743   ac_status=$?
23744   echo "$as_me:23744: \$? = $ac_status" >&5
23745   (exit $ac_status); } &&
23746          { ac_try='test -s conftest.$ac_objext'
23747   { (eval echo "$as_me:23747: \"$ac_try\"") >&5
23748   (eval $ac_try) 2>&5
23749   ac_status=$?
23750   echo "$as_me:23750: \$? = $ac_status" >&5
23751   (exit $ac_status); }; }; then
23752
23753         cf_cv_hashed_db_version=$cf_db_version
23754         break
23755
23756 else
23757   echo "$as_me: failed program was:" >&5
23758 cat conftest.$ac_ext >&5
23759 fi
23760 rm -f conftest.$ac_objext conftest.$ac_ext
23761 done
23762
23763 fi
23764 echo "$as_me:23764: result: $cf_cv_hashed_db_version" >&5
23765 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23766
23767 if test "$cf_cv_hashed_db_version" = unknown ; then
23768         { { echo "$as_me:23768: error: Cannot determine version of db" >&5
23769 echo "$as_me: error: Cannot determine version of db" >&2;}
23770    { (exit 1); exit 1; }; }
23771 else
23772
23773 echo "$as_me:23773: checking for db libraries" >&5
23774 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23775 if test "${cf_cv_hashed_db_libs+set}" = set; then
23776   echo $ECHO_N "(cached) $ECHO_C" >&6
23777 else
23778
23779 cf_cv_hashed_db_libs=unknown
23780 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23781 do
23782         cf_save_libs="$LIBS"
23783         if test -n "$cf_db_libs"; then
23784
23785 cf_add_libs="$LIBS"
23786 # reverse order
23787 cf_add_0lib=
23788 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23789 # filter duplicates
23790 for cf_add_1lib in $cf_add_0lib; do
23791         for cf_add_2lib in $cf_add_libs; do
23792                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23793                         cf_add_1lib=
23794                         break
23795                 fi
23796         done
23797         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23798 done
23799 LIBS="$cf_add_libs"
23800
23801         fi
23802
23803 echo "${as_me:-configure}:23803: testing checking for library "$cf_db_libs" ..." 1>&5
23804
23805         cat >conftest.$ac_ext <<_ACEOF
23806 #line 23806 "configure"
23807 #include "confdefs.h"
23808
23809 $ac_includes_default
23810 #include <db.h>
23811
23812 int
23813 main (void)
23814 {
23815
23816         char *path = "/tmp/foo";
23817 #ifdef DB_VERSION_MAJOR
23818 #if DB_VERSION_MAJOR >= 4
23819         DB *result = 0;
23820         db_create(&result, NULL, 0);
23821         result->open(result,
23822                 NULL,
23823                 path,
23824                 path,
23825                 DB_HASH,
23826                 DB_CREATE,
23827                 0644);
23828 #elif DB_VERSION_MAJOR >= 3
23829         DB *result = 0;
23830         db_create(&result, NULL, 0);
23831         result->open(result,
23832                 path,
23833                 path,
23834                 DB_HASH,
23835                 DB_CREATE,
23836                 0644);
23837 #elif DB_VERSION_MAJOR >= 2
23838         DB *result = 0;
23839         db_open(path,
23840                 DB_HASH,
23841                 DB_CREATE,
23842                 0644,
23843                 (DB_ENV *) 0,
23844                 (DB_INFO *) 0,
23845                 &result);
23846 #endif /* DB_VERSION_MAJOR */
23847 #else
23848         DB *result = dbopen(path,
23849                      2,
23850                      0644,
23851                      DB_HASH,
23852                      0);
23853 #endif
23854         ${cf_cv_main_return:-return}(result != 0)
23855
23856   ;
23857   return 0;
23858 }
23859 _ACEOF
23860 rm -f conftest.$ac_objext conftest$ac_exeext
23861 if { (eval echo "$as_me:23861: \"$ac_link\"") >&5
23862   (eval $ac_link) 2>&5
23863   ac_status=$?
23864   echo "$as_me:23864: \$? = $ac_status" >&5
23865   (exit $ac_status); } &&
23866          { ac_try='test -s conftest$ac_exeext'
23867   { (eval echo "$as_me:23867: \"$ac_try\"") >&5
23868   (eval $ac_try) 2>&5
23869   ac_status=$?
23870   echo "$as_me:23870: \$? = $ac_status" >&5
23871   (exit $ac_status); }; }; then
23872
23873         if test -n "$cf_db_libs" ; then
23874                 cf_cv_hashed_db_libs=$cf_db_libs
23875         else
23876                 cf_cv_hashed_db_libs=default
23877         fi
23878         LIBS="$cf_save_libs"
23879         break
23880
23881 else
23882   echo "$as_me: failed program was:" >&5
23883 cat conftest.$ac_ext >&5
23884 fi
23885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23886         LIBS="$cf_save_libs"
23887 done
23888
23889 fi
23890 echo "$as_me:23890: result: $cf_cv_hashed_db_libs" >&5
23891 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23892
23893         if test "$cf_cv_hashed_db_libs" = unknown ; then
23894                 { { echo "$as_me:23894: error: Cannot determine library for db" >&5
23895 echo "$as_me: error: Cannot determine library for db" >&2;}
23896    { (exit 1); exit 1; }; }
23897         elif test "$cf_cv_hashed_db_libs" != default ; then
23898
23899 cf_add_libs="$LIBS"
23900 # reverse order
23901 cf_add_0lib=
23902 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23903 # filter duplicates
23904 for cf_add_1lib in $cf_add_0lib; do
23905         for cf_add_2lib in $cf_add_libs; do
23906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23907                         cf_add_1lib=
23908                         break
23909                 fi
23910         done
23911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23912 done
23913 LIBS="$cf_add_libs"
23914
23915         fi
23916 fi
23917
23918 else
23919
23920         { { echo "$as_me:23920: error: Cannot find db.h" >&5
23921 echo "$as_me: error: Cannot find db.h" >&2;}
23922    { (exit 1); exit 1; }; }
23923
23924 fi
23925
23926 fi
23927
23928 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23929         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23930         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23931 fi
23932
23933 # Just in case, check if the C compiler has a bool type.
23934
23935 echo "$as_me:23935: checking if we should include stdbool.h" >&5
23936 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23937
23938 if test "${cf_cv_header_stdbool_h+set}" = set; then
23939   echo $ECHO_N "(cached) $ECHO_C" >&6
23940 else
23941
23942         cat >conftest.$ac_ext <<_ACEOF
23943 #line 23943 "configure"
23944 #include "confdefs.h"
23945
23946 int
23947 main (void)
23948 {
23949 bool foo = false
23950   ;
23951   return 0;
23952 }
23953 _ACEOF
23954 rm -f conftest.$ac_objext
23955 if { (eval echo "$as_me:23955: \"$ac_compile\"") >&5
23956   (eval $ac_compile) 2>&5
23957   ac_status=$?
23958   echo "$as_me:23958: \$? = $ac_status" >&5
23959   (exit $ac_status); } &&
23960          { ac_try='test -s conftest.$ac_objext'
23961   { (eval echo "$as_me:23961: \"$ac_try\"") >&5
23962   (eval $ac_try) 2>&5
23963   ac_status=$?
23964   echo "$as_me:23964: \$? = $ac_status" >&5
23965   (exit $ac_status); }; }; then
23966   cf_cv_header_stdbool_h=0
23967 else
23968   echo "$as_me: failed program was:" >&5
23969 cat conftest.$ac_ext >&5
23970 cat >conftest.$ac_ext <<_ACEOF
23971 #line 23971 "configure"
23972 #include "confdefs.h"
23973
23974 #ifndef __BEOS__
23975 #include <stdbool.h>
23976 #endif
23977
23978 int
23979 main (void)
23980 {
23981 bool foo = false
23982   ;
23983   return 0;
23984 }
23985 _ACEOF
23986 rm -f conftest.$ac_objext
23987 if { (eval echo "$as_me:23987: \"$ac_compile\"") >&5
23988   (eval $ac_compile) 2>&5
23989   ac_status=$?
23990   echo "$as_me:23990: \$? = $ac_status" >&5
23991   (exit $ac_status); } &&
23992          { ac_try='test -s conftest.$ac_objext'
23993   { (eval echo "$as_me:23993: \"$ac_try\"") >&5
23994   (eval $ac_try) 2>&5
23995   ac_status=$?
23996   echo "$as_me:23996: \$? = $ac_status" >&5
23997   (exit $ac_status); }; }; then
23998   cf_cv_header_stdbool_h=1
23999 else
24000   echo "$as_me: failed program was:" >&5
24001 cat conftest.$ac_ext >&5
24002 cf_cv_header_stdbool_h=0
24003 fi
24004 rm -f conftest.$ac_objext conftest.$ac_ext
24005 fi
24006 rm -f conftest.$ac_objext conftest.$ac_ext
24007 fi
24008
24009 if test "$cf_cv_header_stdbool_h" = 1
24010 then    echo "$as_me:24010: result: yes" >&5
24011 echo "${ECHO_T}yes" >&6
24012 else    echo "$as_me:24012: result: no" >&5
24013 echo "${ECHO_T}no" >&6
24014 fi
24015
24016 echo "$as_me:24016: checking for builtin bool type" >&5
24017 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24018
24019 if test "${cf_cv_cc_bool_type+set}" = set; then
24020   echo $ECHO_N "(cached) $ECHO_C" >&6
24021 else
24022
24023         cat >conftest.$ac_ext <<_ACEOF
24024 #line 24024 "configure"
24025 #include "confdefs.h"
24026
24027 #include <stdio.h>
24028 #include <sys/types.h>
24029
24030 int
24031 main (void)
24032 {
24033 bool x = false
24034   ;
24035   return 0;
24036 }
24037 _ACEOF
24038 rm -f conftest.$ac_objext
24039 if { (eval echo "$as_me:24039: \"$ac_compile\"") >&5
24040   (eval $ac_compile) 2>&5
24041   ac_status=$?
24042   echo "$as_me:24042: \$? = $ac_status" >&5
24043   (exit $ac_status); } &&
24044          { ac_try='test -s conftest.$ac_objext'
24045   { (eval echo "$as_me:24045: \"$ac_try\"") >&5
24046   (eval $ac_try) 2>&5
24047   ac_status=$?
24048   echo "$as_me:24048: \$? = $ac_status" >&5
24049   (exit $ac_status); }; }; then
24050   cf_cv_cc_bool_type=1
24051 else
24052   echo "$as_me: failed program was:" >&5
24053 cat conftest.$ac_ext >&5
24054 cf_cv_cc_bool_type=0
24055 fi
24056 rm -f conftest.$ac_objext conftest.$ac_ext
24057
24058 fi
24059
24060 if test "$cf_cv_cc_bool_type" = 1
24061 then    echo "$as_me:24061: result: yes" >&5
24062 echo "${ECHO_T}yes" >&6
24063 else    echo "$as_me:24063: result: no" >&5
24064 echo "${ECHO_T}no" >&6
24065 fi
24066
24067 # Check for C++ compiler characteristics (and ensure that it's there!)
24068 if test -n "$CXX" ; then
24069         ac_ext=cc
24070 ac_cpp='$CXXCPP $CPPFLAGS'
24071 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24072 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24073 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24074 ac_main_return=return
24075
24076 if test -n "$GXX" ; then
24077
24078         cf_save="$LIBS"
24079         LIBS="$LIBS $CXXLIBS"
24080         echo "$as_me:24080: checking if we already have C++ library" >&5
24081 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24082         cat >conftest.$ac_ext <<_ACEOF
24083 #line 24083 "configure"
24084 #include "confdefs.h"
24085
24086                         #include <iostream>
24087 int
24088 main (void)
24089 {
24090
24091                         std::cout << "Hello World!" << std::endl;
24092   ;
24093   return 0;
24094 }
24095 _ACEOF
24096 rm -f conftest.$ac_objext conftest$ac_exeext
24097 if { (eval echo "$as_me:24097: \"$ac_link\"") >&5
24098   (eval $ac_link) 2>&5
24099   ac_status=$?
24100   echo "$as_me:24100: \$? = $ac_status" >&5
24101   (exit $ac_status); } &&
24102          { ac_try='test -s conftest$ac_exeext'
24103   { (eval echo "$as_me:24103: \"$ac_try\"") >&5
24104   (eval $ac_try) 2>&5
24105   ac_status=$?
24106   echo "$as_me:24106: \$? = $ac_status" >&5
24107   (exit $ac_status); }; }; then
24108   cf_have_libstdcpp=yes
24109 else
24110   echo "$as_me: failed program was:" >&5
24111 cat conftest.$ac_ext >&5
24112 cf_have_libstdcpp=no
24113 fi
24114 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24115         echo "$as_me:24115: result: $cf_have_libstdcpp" >&5
24116 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24117         LIBS="$cf_save"
24118
24119         if test $cf_have_libstdcpp != yes
24120         then
24121                 case $cf_cv_system_name in
24122                 (os2*)
24123                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24124                                 cf_stdcpp_libname=stdcpp
24125                         else
24126                                 cf_stdcpp_libname=stdc++
24127                         fi
24128                         ;;
24129                 (*)
24130                         cf_stdcpp_libname=stdc++
24131                         ;;
24132                 esac
24133
24134                 echo "$as_me:24134: checking for library $cf_stdcpp_libname" >&5
24135 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24136 if test "${cf_cv_libstdcpp+set}" = set; then
24137   echo $ECHO_N "(cached) $ECHO_C" >&6
24138 else
24139
24140                         cf_save="$LIBS"
24141                         LIBS="$LIBS $CXXLIBS"
24142
24143 cf_add_libs="$LIBS"
24144 # reverse order
24145 cf_add_0lib=
24146 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24147 # filter duplicates
24148 for cf_add_1lib in $cf_add_0lib; do
24149         for cf_add_2lib in $cf_add_libs; do
24150                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24151                         cf_add_1lib=
24152                         break
24153                 fi
24154         done
24155         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24156 done
24157 LIBS="$cf_add_libs"
24158
24159                 cat >conftest.$ac_ext <<_ACEOF
24160 #line 24160 "configure"
24161 #include "confdefs.h"
24162
24163                                 #include <iostream>
24164 int
24165 main (void)
24166 {
24167
24168                                 std::cout << "Hello World!" << std::endl;
24169   ;
24170   return 0;
24171 }
24172 _ACEOF
24173 rm -f conftest.$ac_objext conftest$ac_exeext
24174 if { (eval echo "$as_me:24174: \"$ac_link\"") >&5
24175   (eval $ac_link) 2>&5
24176   ac_status=$?
24177   echo "$as_me:24177: \$? = $ac_status" >&5
24178   (exit $ac_status); } &&
24179          { ac_try='test -s conftest$ac_exeext'
24180   { (eval echo "$as_me:24180: \"$ac_try\"") >&5
24181   (eval $ac_try) 2>&5
24182   ac_status=$?
24183   echo "$as_me:24183: \$? = $ac_status" >&5
24184   (exit $ac_status); }; }; then
24185   cf_cv_libstdcpp=yes
24186 else
24187   echo "$as_me: failed program was:" >&5
24188 cat conftest.$ac_ext >&5
24189 cf_cv_libstdcpp=no
24190 fi
24191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24192                         LIBS="$cf_save"
24193
24194 fi
24195 echo "$as_me:24195: result: $cf_cv_libstdcpp" >&5
24196 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24197                 test "$cf_cv_libstdcpp" = yes && {
24198 cf_add_libs="$CXXLIBS"
24199 # reverse order
24200 cf_add_0lib=
24201 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24202 # filter duplicates
24203 for cf_add_1lib in $cf_add_0lib; do
24204         for cf_add_2lib in $cf_add_libs; do
24205                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24206                         cf_add_1lib=
24207                         break
24208                 fi
24209         done
24210         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24211 done
24212 CXXLIBS="$cf_add_libs"
24213  }
24214         fi
24215 fi
24216
24217         echo "$as_me:24217: checking whether $CXX understands -c and -o together" >&5
24218 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24219 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24220   echo $ECHO_N "(cached) $ECHO_C" >&6
24221 else
24222
24223 cat > conftest.$ac_ext <<CF_EOF
24224 int main(void)
24225 {
24226         ${cf_cv_main_return:-return}(0);
24227 }
24228 CF_EOF
24229 # We do the test twice because some compilers refuse to overwrite an
24230 # existing .o file with -o, though they will create one.
24231 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24232 if { (eval echo "$as_me:24232: \"$ac_try\"") >&5
24233   (eval $ac_try) 2>&5
24234   ac_status=$?
24235   echo "$as_me:24235: \$? = $ac_status" >&5
24236   (exit $ac_status); } &&
24237   test -f conftest2.$ac_objext && { (eval echo "$as_me:24237: \"$ac_try\"") >&5
24238   (eval $ac_try) 2>&5
24239   ac_status=$?
24240   echo "$as_me:24240: \$? = $ac_status" >&5
24241   (exit $ac_status); };
24242 then
24243   eval cf_cv_prog_CXX_c_o=yes
24244 else
24245   eval cf_cv_prog_CXX_c_o=no
24246 fi
24247 rm -rf conftest*
24248
24249 fi
24250 if test $cf_cv_prog_CXX_c_o = yes; then
24251   echo "$as_me:24251: result: yes" >&5
24252 echo "${ECHO_T}yes" >&6
24253 else
24254   echo "$as_me:24254: result: no" >&5
24255 echo "${ECHO_T}no" >&6
24256 fi
24257
24258         case $GXX_VERSION in
24259         (1.*|2.[0-6]*|[1-9][0-9].*)
24260                 cf_cxx_library=yes
24261                 ;;
24262         (*-2.7*|2.7*)
24263
24264 cf_cxx_library=unknown
24265 case $cf_cv_system_name in
24266 (os2*)
24267         cf_gpp_libname=gpp
24268         ;;
24269 (*)
24270         cf_gpp_libname=g++
24271         ;;
24272 esac
24273 if test "$GXX" = yes; then
24274         echo "$as_me:24274: checking for lib$cf_gpp_libname" >&5
24275 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24276         cf_save="$LIBS"
24277
24278 cf_add_libs="$LIBS"
24279 # reverse order
24280 cf_add_0lib=
24281 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24282 # filter duplicates
24283 for cf_add_1lib in $cf_add_0lib; do
24284         for cf_add_2lib in $cf_add_libs; do
24285                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24286                         cf_add_1lib=
24287                         break
24288                 fi
24289         done
24290         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24291 done
24292 LIBS="$cf_add_libs"
24293
24294         cat >conftest.$ac_ext <<_ACEOF
24295 #line 24295 "configure"
24296 #include "confdefs.h"
24297
24298 #include <$cf_gpp_libname/builtin.h>
24299
24300 int
24301 main (void)
24302 {
24303 two_arg_error_handler_t foo2 = lib_error_handler
24304   ;
24305   return 0;
24306 }
24307 _ACEOF
24308 rm -f conftest.$ac_objext conftest$ac_exeext
24309 if { (eval echo "$as_me:24309: \"$ac_link\"") >&5
24310   (eval $ac_link) 2>&5
24311   ac_status=$?
24312   echo "$as_me:24312: \$? = $ac_status" >&5
24313   (exit $ac_status); } &&
24314          { ac_try='test -s conftest$ac_exeext'
24315   { (eval echo "$as_me:24315: \"$ac_try\"") >&5
24316   (eval $ac_try) 2>&5
24317   ac_status=$?
24318   echo "$as_me:24318: \$? = $ac_status" >&5
24319   (exit $ac_status); }; }; then
24320   cf_cxx_library=yes
24321
24322 cf_add_libs="$CXXLIBS"
24323 # reverse order
24324 cf_add_0lib=
24325 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24326 # filter duplicates
24327 for cf_add_1lib in $cf_add_0lib; do
24328         for cf_add_2lib in $cf_add_libs; do
24329                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24330                         cf_add_1lib=
24331                         break
24332                 fi
24333         done
24334         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24335 done
24336 CXXLIBS="$cf_add_libs"
24337
24338          if test "$cf_gpp_libname" = cpp ; then
24339
24340 cat >>confdefs.h <<\EOF
24341 #define HAVE_GPP_BUILTIN_H 1
24342 EOF
24343
24344          else
24345
24346 cat >>confdefs.h <<\EOF
24347 #define HAVE_GXX_BUILTIN_H 1
24348 EOF
24349
24350          fi
24351 else
24352   echo "$as_me: failed program was:" >&5
24353 cat conftest.$ac_ext >&5
24354 cat >conftest.$ac_ext <<_ACEOF
24355 #line 24355 "configure"
24356 #include "confdefs.h"
24357
24358 #include <builtin.h>
24359
24360 int
24361 main (void)
24362 {
24363 two_arg_error_handler_t foo2 = lib_error_handler
24364   ;
24365   return 0;
24366 }
24367 _ACEOF
24368 rm -f conftest.$ac_objext conftest$ac_exeext
24369 if { (eval echo "$as_me:24369: \"$ac_link\"") >&5
24370   (eval $ac_link) 2>&5
24371   ac_status=$?
24372   echo "$as_me:24372: \$? = $ac_status" >&5
24373   (exit $ac_status); } &&
24374          { ac_try='test -s conftest$ac_exeext'
24375   { (eval echo "$as_me:24375: \"$ac_try\"") >&5
24376   (eval $ac_try) 2>&5
24377   ac_status=$?
24378   echo "$as_me:24378: \$? = $ac_status" >&5
24379   (exit $ac_status); }; }; then
24380   cf_cxx_library=yes
24381
24382 cf_add_libs="$CXXLIBS"
24383 # reverse order
24384 cf_add_0lib=
24385 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24386 # filter duplicates
24387 for cf_add_1lib in $cf_add_0lib; do
24388         for cf_add_2lib in $cf_add_libs; do
24389                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24390                         cf_add_1lib=
24391                         break
24392                 fi
24393         done
24394         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24395 done
24396 CXXLIBS="$cf_add_libs"
24397
24398 cat >>confdefs.h <<\EOF
24399 #define HAVE_BUILTIN_H 1
24400 EOF
24401
24402 else
24403   echo "$as_me: failed program was:" >&5
24404 cat conftest.$ac_ext >&5
24405 cf_cxx_library=no
24406 fi
24407 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24408 fi
24409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24410         LIBS="$cf_save"
24411         echo "$as_me:24411: result: $cf_cxx_library" >&5
24412 echo "${ECHO_T}$cf_cxx_library" >&6
24413 fi
24414
24415                 ;;
24416         (*)
24417                 cf_cxx_library=no
24418                 ;;
24419         esac
24420
24421         ac_ext=cc
24422 ac_cpp='$CXXCPP $CPPFLAGS'
24423 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24424 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24425 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24426 ac_main_return=return
24427 echo "$as_me:24427: checking how to run the C++ preprocessor" >&5
24428 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
24429 if test -z "$CXXCPP"; then
24430   if test "${ac_cv_prog_CXXCPP+set}" = set; then
24431   echo $ECHO_N "(cached) $ECHO_C" >&6
24432 else
24433       # Double quotes because CXXCPP needs to be expanded
24434     for CXXCPP in "$CXX -E" "/lib/cpp"
24435     do
24436       ac_preproc_ok=false
24437 for ac_cxx_preproc_warn_flag in '' yes
24438 do
24439   # Use a header file that comes with gcc, so configuring glibc
24440   # with a fresh cross-compiler works.
24441   # On the NeXT, cc -E runs the code through the compiler's parser,
24442   # not just through cpp. "Syntax error" is here to catch this case.
24443   cat >conftest.$ac_ext <<_ACEOF
24444 #line 24444 "configure"
24445 #include "confdefs.h"
24446 #include <assert.h>
24447                      Syntax error
24448 _ACEOF
24449 if { (eval echo "$as_me:24449: \"$ac_cpp conftest.$ac_ext\"") >&5
24450   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24451   ac_status=$?
24452   egrep -v '^ *\+' conftest.er1 >conftest.err
24453   rm -f conftest.er1
24454   cat conftest.err >&5
24455   echo "$as_me:24455: \$? = $ac_status" >&5
24456   (exit $ac_status); } >/dev/null; then
24457   if test -s conftest.err; then
24458     ac_cpp_err=$ac_cxx_preproc_warn_flag
24459   else
24460     ac_cpp_err=
24461   fi
24462 else
24463   ac_cpp_err=yes
24464 fi
24465 if test -z "$ac_cpp_err"; then
24466   :
24467 else
24468   echo "$as_me: failed program was:" >&5
24469   cat conftest.$ac_ext >&5
24470   # Broken: fails on valid input.
24471 continue
24472 fi
24473 rm -f conftest.err conftest.$ac_ext
24474
24475   # OK, works on sane cases.  Now check whether non-existent headers
24476   # can be detected and how.
24477   cat >conftest.$ac_ext <<_ACEOF
24478 #line 24478 "configure"
24479 #include "confdefs.h"
24480 #include <ac_nonexistent.h>
24481 _ACEOF
24482 if { (eval echo "$as_me:24482: \"$ac_cpp conftest.$ac_ext\"") >&5
24483   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24484   ac_status=$?
24485   egrep -v '^ *\+' conftest.er1 >conftest.err
24486   rm -f conftest.er1
24487   cat conftest.err >&5
24488   echo "$as_me:24488: \$? = $ac_status" >&5
24489   (exit $ac_status); } >/dev/null; then
24490   if test -s conftest.err; then
24491     ac_cpp_err=$ac_cxx_preproc_warn_flag
24492   else
24493     ac_cpp_err=
24494   fi
24495 else
24496   ac_cpp_err=yes
24497 fi
24498 if test -z "$ac_cpp_err"; then
24499   # Broken: success on invalid input.
24500 continue
24501 else
24502   echo "$as_me: failed program was:" >&5
24503   cat conftest.$ac_ext >&5
24504   # Passes both tests.
24505 ac_preproc_ok=:
24506 break
24507 fi
24508 rm -f conftest.err conftest.$ac_ext
24509
24510 done
24511 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24512 rm -f conftest.err conftest.$ac_ext
24513 if $ac_preproc_ok; then
24514   break
24515 fi
24516
24517     done
24518     ac_cv_prog_CXXCPP=$CXXCPP
24519
24520 fi
24521   CXXCPP=$ac_cv_prog_CXXCPP
24522 else
24523   ac_cv_prog_CXXCPP=$CXXCPP
24524 fi
24525 echo "$as_me:24525: result: $CXXCPP" >&5
24526 echo "${ECHO_T}$CXXCPP" >&6
24527 ac_preproc_ok=false
24528 for ac_cxx_preproc_warn_flag in '' yes
24529 do
24530   # Use a header file that comes with gcc, so configuring glibc
24531   # with a fresh cross-compiler works.
24532   # On the NeXT, cc -E runs the code through the compiler's parser,
24533   # not just through cpp. "Syntax error" is here to catch this case.
24534   cat >conftest.$ac_ext <<_ACEOF
24535 #line 24535 "configure"
24536 #include "confdefs.h"
24537 #include <assert.h>
24538                      Syntax error
24539 _ACEOF
24540 if { (eval echo "$as_me:24540: \"$ac_cpp conftest.$ac_ext\"") >&5
24541   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24542   ac_status=$?
24543   egrep -v '^ *\+' conftest.er1 >conftest.err
24544   rm -f conftest.er1
24545   cat conftest.err >&5
24546   echo "$as_me:24546: \$? = $ac_status" >&5
24547   (exit $ac_status); } >/dev/null; then
24548   if test -s conftest.err; then
24549     ac_cpp_err=$ac_cxx_preproc_warn_flag
24550   else
24551     ac_cpp_err=
24552   fi
24553 else
24554   ac_cpp_err=yes
24555 fi
24556 if test -z "$ac_cpp_err"; then
24557   :
24558 else
24559   echo "$as_me: failed program was:" >&5
24560   cat conftest.$ac_ext >&5
24561   # Broken: fails on valid input.
24562 continue
24563 fi
24564 rm -f conftest.err conftest.$ac_ext
24565
24566   # OK, works on sane cases.  Now check whether non-existent headers
24567   # can be detected and how.
24568   cat >conftest.$ac_ext <<_ACEOF
24569 #line 24569 "configure"
24570 #include "confdefs.h"
24571 #include <ac_nonexistent.h>
24572 _ACEOF
24573 if { (eval echo "$as_me:24573: \"$ac_cpp conftest.$ac_ext\"") >&5
24574   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24575   ac_status=$?
24576   egrep -v '^ *\+' conftest.er1 >conftest.err
24577   rm -f conftest.er1
24578   cat conftest.err >&5
24579   echo "$as_me:24579: \$? = $ac_status" >&5
24580   (exit $ac_status); } >/dev/null; then
24581   if test -s conftest.err; then
24582     ac_cpp_err=$ac_cxx_preproc_warn_flag
24583   else
24584     ac_cpp_err=
24585   fi
24586 else
24587   ac_cpp_err=yes
24588 fi
24589 if test -z "$ac_cpp_err"; then
24590   # Broken: success on invalid input.
24591 continue
24592 else
24593   echo "$as_me: failed program was:" >&5
24594   cat conftest.$ac_ext >&5
24595   # Passes both tests.
24596 ac_preproc_ok=:
24597 break
24598 fi
24599 rm -f conftest.err conftest.$ac_ext
24600
24601 done
24602 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
24603 rm -f conftest.err conftest.$ac_ext
24604 if $ac_preproc_ok; then
24605   :
24606 else
24607   { { echo "$as_me:24607: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
24608 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
24609    { (exit 1); exit 1; }; }
24610 fi
24611
24612 ac_ext=cc
24613 ac_cpp='$CXXCPP $CPPFLAGS'
24614 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24615 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24616 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24617 ac_main_return=return
24618
24619 for ac_header in typeinfo
24620 do
24621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24622 echo "$as_me:24622: checking for $ac_header" >&5
24623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24625   echo $ECHO_N "(cached) $ECHO_C" >&6
24626 else
24627   cat >conftest.$ac_ext <<_ACEOF
24628 #line 24628 "configure"
24629 #include "confdefs.h"
24630 #include <$ac_header>
24631 _ACEOF
24632 if { (eval echo "$as_me:24632: \"$ac_cpp conftest.$ac_ext\"") >&5
24633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24634   ac_status=$?
24635   egrep -v '^ *\+' conftest.er1 >conftest.err
24636   rm -f conftest.er1
24637   cat conftest.err >&5
24638   echo "$as_me:24638: \$? = $ac_status" >&5
24639   (exit $ac_status); } >/dev/null; then
24640   if test -s conftest.err; then
24641     ac_cpp_err=$ac_cxx_preproc_warn_flag
24642   else
24643     ac_cpp_err=
24644   fi
24645 else
24646   ac_cpp_err=yes
24647 fi
24648 if test -z "$ac_cpp_err"; then
24649   eval "$as_ac_Header=yes"
24650 else
24651   echo "$as_me: failed program was:" >&5
24652   cat conftest.$ac_ext >&5
24653   eval "$as_ac_Header=no"
24654 fi
24655 rm -f conftest.err conftest.$ac_ext
24656 fi
24657 echo "$as_me:24657: result: `eval echo '${'$as_ac_Header'}'`" >&5
24658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24660   cat >>confdefs.h <<EOF
24661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24662 EOF
24663
24664 fi
24665 done
24666
24667 for ac_header in iostream
24668 do
24669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24670 echo "$as_me:24670: checking for $ac_header" >&5
24671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24673   echo $ECHO_N "(cached) $ECHO_C" >&6
24674 else
24675   cat >conftest.$ac_ext <<_ACEOF
24676 #line 24676 "configure"
24677 #include "confdefs.h"
24678 #include <$ac_header>
24679 _ACEOF
24680 if { (eval echo "$as_me:24680: \"$ac_cpp conftest.$ac_ext\"") >&5
24681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
24682   ac_status=$?
24683   egrep -v '^ *\+' conftest.er1 >conftest.err
24684   rm -f conftest.er1
24685   cat conftest.err >&5
24686   echo "$as_me:24686: \$? = $ac_status" >&5
24687   (exit $ac_status); } >/dev/null; then
24688   if test -s conftest.err; then
24689     ac_cpp_err=$ac_cxx_preproc_warn_flag
24690   else
24691     ac_cpp_err=
24692   fi
24693 else
24694   ac_cpp_err=yes
24695 fi
24696 if test -z "$ac_cpp_err"; then
24697   eval "$as_ac_Header=yes"
24698 else
24699   echo "$as_me: failed program was:" >&5
24700   cat conftest.$ac_ext >&5
24701   eval "$as_ac_Header=no"
24702 fi
24703 rm -f conftest.err conftest.$ac_ext
24704 fi
24705 echo "$as_me:24705: result: `eval echo '${'$as_ac_Header'}'`" >&5
24706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24708   cat >>confdefs.h <<EOF
24709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24710 EOF
24711
24712 fi
24713 done
24714
24715 if test x"$ac_cv_header_iostream" = xyes ; then
24716         echo "$as_me:24716: checking if iostream uses std-namespace" >&5
24717 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24718         cat >conftest.$ac_ext <<_ACEOF
24719 #line 24719 "configure"
24720 #include "confdefs.h"
24721
24722 #include <iostream>
24723 using std::endl;
24724 using std::cerr;
24725 int
24726 main (void)
24727 {
24728
24729 cerr << "testing" << endl;
24730
24731   ;
24732   return 0;
24733 }
24734 _ACEOF
24735 rm -f conftest.$ac_objext
24736 if { (eval echo "$as_me:24736: \"$ac_compile\"") >&5
24737   (eval $ac_compile) 2>&5
24738   ac_status=$?
24739   echo "$as_me:24739: \$? = $ac_status" >&5
24740   (exit $ac_status); } &&
24741          { ac_try='test -s conftest.$ac_objext'
24742   { (eval echo "$as_me:24742: \"$ac_try\"") >&5
24743   (eval $ac_try) 2>&5
24744   ac_status=$?
24745   echo "$as_me:24745: \$? = $ac_status" >&5
24746   (exit $ac_status); }; }; then
24747   cf_iostream_namespace=yes
24748 else
24749   echo "$as_me: failed program was:" >&5
24750 cat conftest.$ac_ext >&5
24751 cf_iostream_namespace=no
24752 fi
24753 rm -f conftest.$ac_objext conftest.$ac_ext
24754         echo "$as_me:24754: result: $cf_iostream_namespace" >&5
24755 echo "${ECHO_T}$cf_iostream_namespace" >&6
24756         if test "$cf_iostream_namespace" = yes ; then
24757
24758 cat >>confdefs.h <<\EOF
24759 #define IOSTREAM_NAMESPACE 1
24760 EOF
24761
24762         fi
24763 fi
24764
24765 echo "$as_me:24765: checking if we should include stdbool.h" >&5
24766 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24767
24768 if test "${cf_cv_header_stdbool_h+set}" = set; then
24769   echo $ECHO_N "(cached) $ECHO_C" >&6
24770 else
24771
24772         cat >conftest.$ac_ext <<_ACEOF
24773 #line 24773 "configure"
24774 #include "confdefs.h"
24775
24776 int
24777 main (void)
24778 {
24779 bool foo = false
24780   ;
24781   return 0;
24782 }
24783 _ACEOF
24784 rm -f conftest.$ac_objext
24785 if { (eval echo "$as_me:24785: \"$ac_compile\"") >&5
24786   (eval $ac_compile) 2>&5
24787   ac_status=$?
24788   echo "$as_me:24788: \$? = $ac_status" >&5
24789   (exit $ac_status); } &&
24790          { ac_try='test -s conftest.$ac_objext'
24791   { (eval echo "$as_me:24791: \"$ac_try\"") >&5
24792   (eval $ac_try) 2>&5
24793   ac_status=$?
24794   echo "$as_me:24794: \$? = $ac_status" >&5
24795   (exit $ac_status); }; }; then
24796   cf_cv_header_stdbool_h=0
24797 else
24798   echo "$as_me: failed program was:" >&5
24799 cat conftest.$ac_ext >&5
24800 cat >conftest.$ac_ext <<_ACEOF
24801 #line 24801 "configure"
24802 #include "confdefs.h"
24803
24804 #ifndef __BEOS__
24805 #include <stdbool.h>
24806 #endif
24807
24808 int
24809 main (void)
24810 {
24811 bool foo = false
24812   ;
24813   return 0;
24814 }
24815 _ACEOF
24816 rm -f conftest.$ac_objext
24817 if { (eval echo "$as_me:24817: \"$ac_compile\"") >&5
24818   (eval $ac_compile) 2>&5
24819   ac_status=$?
24820   echo "$as_me:24820: \$? = $ac_status" >&5
24821   (exit $ac_status); } &&
24822          { ac_try='test -s conftest.$ac_objext'
24823   { (eval echo "$as_me:24823: \"$ac_try\"") >&5
24824   (eval $ac_try) 2>&5
24825   ac_status=$?
24826   echo "$as_me:24826: \$? = $ac_status" >&5
24827   (exit $ac_status); }; }; then
24828   cf_cv_header_stdbool_h=1
24829 else
24830   echo "$as_me: failed program was:" >&5
24831 cat conftest.$ac_ext >&5
24832 cf_cv_header_stdbool_h=0
24833 fi
24834 rm -f conftest.$ac_objext conftest.$ac_ext
24835 fi
24836 rm -f conftest.$ac_objext conftest.$ac_ext
24837 fi
24838
24839 if test "$cf_cv_header_stdbool_h" = 1
24840 then    echo "$as_me:24840: result: yes" >&5
24841 echo "${ECHO_T}yes" >&6
24842 else    echo "$as_me:24842: result: no" >&5
24843 echo "${ECHO_T}no" >&6
24844 fi
24845
24846 echo "$as_me:24846: checking for builtin bool type" >&5
24847 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24848
24849 if test "${cf_cv_builtin_bool+set}" = set; then
24850   echo $ECHO_N "(cached) $ECHO_C" >&6
24851 else
24852
24853         cat >conftest.$ac_ext <<_ACEOF
24854 #line 24854 "configure"
24855 #include "confdefs.h"
24856
24857 #include <stdio.h>
24858 #include <sys/types.h>
24859
24860 int
24861 main (void)
24862 {
24863 bool x = false
24864   ;
24865   return 0;
24866 }
24867 _ACEOF
24868 rm -f conftest.$ac_objext
24869 if { (eval echo "$as_me:24869: \"$ac_compile\"") >&5
24870   (eval $ac_compile) 2>&5
24871   ac_status=$?
24872   echo "$as_me:24872: \$? = $ac_status" >&5
24873   (exit $ac_status); } &&
24874          { ac_try='test -s conftest.$ac_objext'
24875   { (eval echo "$as_me:24875: \"$ac_try\"") >&5
24876   (eval $ac_try) 2>&5
24877   ac_status=$?
24878   echo "$as_me:24878: \$? = $ac_status" >&5
24879   (exit $ac_status); }; }; then
24880   cf_cv_builtin_bool=1
24881 else
24882   echo "$as_me: failed program was:" >&5
24883 cat conftest.$ac_ext >&5
24884 cf_cv_builtin_bool=0
24885 fi
24886 rm -f conftest.$ac_objext conftest.$ac_ext
24887
24888 fi
24889
24890 if test "$cf_cv_builtin_bool" = 1
24891 then    echo "$as_me:24891: result: yes" >&5
24892 echo "${ECHO_T}yes" >&6
24893 else    echo "$as_me:24893: result: no" >&5
24894 echo "${ECHO_T}no" >&6
24895 fi
24896
24897 echo "$as_me:24897: checking for bool" >&5
24898 echo $ECHO_N "checking for bool... $ECHO_C" >&6
24899 if test "${ac_cv_type_bool+set}" = set; then
24900   echo $ECHO_N "(cached) $ECHO_C" >&6
24901 else
24902   cat >conftest.$ac_ext <<_ACEOF
24903 #line 24903 "configure"
24904 #include "confdefs.h"
24905
24906 #include <stdlib.h>
24907 #include <stdio.h>
24908
24909 #if defined(__cplusplus)
24910
24911 #ifdef HAVE_GXX_BUILTIN_H
24912 #include <g++/builtin.h>
24913 #elif HAVE_GPP_BUILTIN_H
24914 #include <gpp/builtin.h>
24915 #elif HAVE_BUILTIN_H
24916 #include <builtin.h>
24917 #endif
24918
24919 #else
24920
24921 #if $cf_cv_header_stdbool_h
24922 #include <stdbool.h>
24923 #endif
24924
24925 #endif
24926
24927 int
24928 main (void)
24929 {
24930 if ((bool *) 0)
24931   return 0;
24932 if (sizeof (bool))
24933   return 0;
24934   ;
24935   return 0;
24936 }
24937 _ACEOF
24938 rm -f conftest.$ac_objext
24939 if { (eval echo "$as_me:24939: \"$ac_compile\"") >&5
24940   (eval $ac_compile) 2>&5
24941   ac_status=$?
24942   echo "$as_me:24942: \$? = $ac_status" >&5
24943   (exit $ac_status); } &&
24944          { ac_try='test -s conftest.$ac_objext'
24945   { (eval echo "$as_me:24945: \"$ac_try\"") >&5
24946   (eval $ac_try) 2>&5
24947   ac_status=$?
24948   echo "$as_me:24948: \$? = $ac_status" >&5
24949   (exit $ac_status); }; }; then
24950   ac_cv_type_bool=yes
24951 else
24952   echo "$as_me: failed program was:" >&5
24953 cat conftest.$ac_ext >&5
24954 ac_cv_type_bool=no
24955 fi
24956 rm -f conftest.$ac_objext conftest.$ac_ext
24957 fi
24958 echo "$as_me:24958: result: $ac_cv_type_bool" >&5
24959 echo "${ECHO_T}$ac_cv_type_bool" >&6
24960
24961 echo "$as_me:24961: checking size of bool" >&5
24962 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
24963 if test "${ac_cv_sizeof_bool+set}" = set; then
24964   echo $ECHO_N "(cached) $ECHO_C" >&6
24965 else
24966   if test "$ac_cv_type_bool" = yes; then
24967   if test "$cross_compiling" = yes; then
24968   # Depending upon the size, compute the lo and hi bounds.
24969 cat >conftest.$ac_ext <<_ACEOF
24970 #line 24970 "configure"
24971 #include "confdefs.h"
24972
24973 #include <stdlib.h>
24974 #include <stdio.h>
24975
24976 #if defined(__cplusplus)
24977
24978 #ifdef HAVE_GXX_BUILTIN_H
24979 #include <g++/builtin.h>
24980 #elif HAVE_GPP_BUILTIN_H
24981 #include <gpp/builtin.h>
24982 #elif HAVE_BUILTIN_H
24983 #include <builtin.h>
24984 #endif
24985
24986 #else
24987
24988 #if $cf_cv_header_stdbool_h
24989 #include <stdbool.h>
24990 #endif
24991
24992 #endif
24993
24994 int
24995 main (void)
24996 {
24997 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
24998   ;
24999   return 0;
25000 }
25001 _ACEOF
25002 rm -f conftest.$ac_objext
25003 if { (eval echo "$as_me:25003: \"$ac_compile\"") >&5
25004   (eval $ac_compile) 2>&5
25005   ac_status=$?
25006   echo "$as_me:25006: \$? = $ac_status" >&5
25007   (exit $ac_status); } &&
25008          { ac_try='test -s conftest.$ac_objext'
25009   { (eval echo "$as_me:25009: \"$ac_try\"") >&5
25010   (eval $ac_try) 2>&5
25011   ac_status=$?
25012   echo "$as_me:25012: \$? = $ac_status" >&5
25013   (exit $ac_status); }; }; then
25014   ac_lo=0 ac_mid=0
25015   while :; do
25016     cat >conftest.$ac_ext <<_ACEOF
25017 #line 25017 "configure"
25018 #include "confdefs.h"
25019
25020 #include <stdlib.h>
25021 #include <stdio.h>
25022
25023 #if defined(__cplusplus)
25024
25025 #ifdef HAVE_GXX_BUILTIN_H
25026 #include <g++/builtin.h>
25027 #elif HAVE_GPP_BUILTIN_H
25028 #include <gpp/builtin.h>
25029 #elif HAVE_BUILTIN_H
25030 #include <builtin.h>
25031 #endif
25032
25033 #else
25034
25035 #if $cf_cv_header_stdbool_h
25036 #include <stdbool.h>
25037 #endif
25038
25039 #endif
25040
25041 int
25042 main (void)
25043 {
25044 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25045   ;
25046   return 0;
25047 }
25048 _ACEOF
25049 rm -f conftest.$ac_objext
25050 if { (eval echo "$as_me:25050: \"$ac_compile\"") >&5
25051   (eval $ac_compile) 2>&5
25052   ac_status=$?
25053   echo "$as_me:25053: \$? = $ac_status" >&5
25054   (exit $ac_status); } &&
25055          { ac_try='test -s conftest.$ac_objext'
25056   { (eval echo "$as_me:25056: \"$ac_try\"") >&5
25057   (eval $ac_try) 2>&5
25058   ac_status=$?
25059   echo "$as_me:25059: \$? = $ac_status" >&5
25060   (exit $ac_status); }; }; then
25061   ac_hi=$ac_mid; break
25062 else
25063   echo "$as_me: failed program was:" >&5
25064 cat conftest.$ac_ext >&5
25065 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25066 fi
25067 rm -f conftest.$ac_objext conftest.$ac_ext
25068   done
25069 else
25070   echo "$as_me: failed program was:" >&5
25071 cat conftest.$ac_ext >&5
25072 ac_hi=-1 ac_mid=-1
25073   while :; do
25074     cat >conftest.$ac_ext <<_ACEOF
25075 #line 25075 "configure"
25076 #include "confdefs.h"
25077
25078 #include <stdlib.h>
25079 #include <stdio.h>
25080
25081 #if defined(__cplusplus)
25082
25083 #ifdef HAVE_GXX_BUILTIN_H
25084 #include <g++/builtin.h>
25085 #elif HAVE_GPP_BUILTIN_H
25086 #include <gpp/builtin.h>
25087 #elif HAVE_BUILTIN_H
25088 #include <builtin.h>
25089 #endif
25090
25091 #else
25092
25093 #if $cf_cv_header_stdbool_h
25094 #include <stdbool.h>
25095 #endif
25096
25097 #endif
25098
25099 int
25100 main (void)
25101 {
25102 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25103   ;
25104   return 0;
25105 }
25106 _ACEOF
25107 rm -f conftest.$ac_objext
25108 if { (eval echo "$as_me:25108: \"$ac_compile\"") >&5
25109   (eval $ac_compile) 2>&5
25110   ac_status=$?
25111   echo "$as_me:25111: \$? = $ac_status" >&5
25112   (exit $ac_status); } &&
25113          { ac_try='test -s conftest.$ac_objext'
25114   { (eval echo "$as_me:25114: \"$ac_try\"") >&5
25115   (eval $ac_try) 2>&5
25116   ac_status=$?
25117   echo "$as_me:25117: \$? = $ac_status" >&5
25118   (exit $ac_status); }; }; then
25119   ac_lo=$ac_mid; break
25120 else
25121   echo "$as_me: failed program was:" >&5
25122 cat conftest.$ac_ext >&5
25123 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25124 fi
25125 rm -f conftest.$ac_objext conftest.$ac_ext
25126   done
25127 fi
25128 rm -f conftest.$ac_objext conftest.$ac_ext
25129 # Binary search between lo and hi bounds.
25130 while test "x$ac_lo" != "x$ac_hi"; do
25131   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25132   cat >conftest.$ac_ext <<_ACEOF
25133 #line 25133 "configure"
25134 #include "confdefs.h"
25135
25136 #include <stdlib.h>
25137 #include <stdio.h>
25138
25139 #if defined(__cplusplus)
25140
25141 #ifdef HAVE_GXX_BUILTIN_H
25142 #include <g++/builtin.h>
25143 #elif HAVE_GPP_BUILTIN_H
25144 #include <gpp/builtin.h>
25145 #elif HAVE_BUILTIN_H
25146 #include <builtin.h>
25147 #endif
25148
25149 #else
25150
25151 #if $cf_cv_header_stdbool_h
25152 #include <stdbool.h>
25153 #endif
25154
25155 #endif
25156
25157 int
25158 main (void)
25159 {
25160 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25161   ;
25162   return 0;
25163 }
25164 _ACEOF
25165 rm -f conftest.$ac_objext
25166 if { (eval echo "$as_me:25166: \"$ac_compile\"") >&5
25167   (eval $ac_compile) 2>&5
25168   ac_status=$?
25169   echo "$as_me:25169: \$? = $ac_status" >&5
25170   (exit $ac_status); } &&
25171          { ac_try='test -s conftest.$ac_objext'
25172   { (eval echo "$as_me:25172: \"$ac_try\"") >&5
25173   (eval $ac_try) 2>&5
25174   ac_status=$?
25175   echo "$as_me:25175: \$? = $ac_status" >&5
25176   (exit $ac_status); }; }; then
25177   ac_hi=$ac_mid
25178 else
25179   echo "$as_me: failed program was:" >&5
25180 cat conftest.$ac_ext >&5
25181 ac_lo=`expr $ac_mid + 1`
25182 fi
25183 rm -f conftest.$ac_objext conftest.$ac_ext
25184 done
25185 ac_cv_sizeof_bool=$ac_lo
25186 else
25187   if test "$cross_compiling" = yes; then
25188   { { echo "$as_me:25188: error: cannot run test program while cross compiling" >&5
25189 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25190    { (exit 1); exit 1; }; }
25191 else
25192   cat >conftest.$ac_ext <<_ACEOF
25193 #line 25193 "configure"
25194 #include "confdefs.h"
25195
25196 #include <stdlib.h>
25197 #include <stdio.h>
25198
25199 #if defined(__cplusplus)
25200
25201 #ifdef HAVE_GXX_BUILTIN_H
25202 #include <g++/builtin.h>
25203 #elif HAVE_GPP_BUILTIN_H
25204 #include <gpp/builtin.h>
25205 #elif HAVE_BUILTIN_H
25206 #include <builtin.h>
25207 #endif
25208
25209 #else
25210
25211 #if $cf_cv_header_stdbool_h
25212 #include <stdbool.h>
25213 #endif
25214
25215 #endif
25216
25217 int
25218 main (void)
25219 {
25220 FILE *f = fopen ("conftest.val", "w");
25221 if (!f)
25222   $ac_main_return (1);
25223 fprintf (f, "%d", (sizeof (bool)));
25224 fclose (f);
25225   ;
25226   return 0;
25227 }
25228 _ACEOF
25229 rm -f conftest$ac_exeext
25230 if { (eval echo "$as_me:25230: \"$ac_link\"") >&5
25231   (eval $ac_link) 2>&5
25232   ac_status=$?
25233   echo "$as_me:25233: \$? = $ac_status" >&5
25234   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25235   { (eval echo "$as_me:25235: \"$ac_try\"") >&5
25236   (eval $ac_try) 2>&5
25237   ac_status=$?
25238   echo "$as_me:25238: \$? = $ac_status" >&5
25239   (exit $ac_status); }; }; then
25240   ac_cv_sizeof_bool=`cat conftest.val`
25241 else
25242   echo "$as_me: program exited with status $ac_status" >&5
25243 echo "$as_me: failed program was:" >&5
25244 cat conftest.$ac_ext >&5
25245 fi
25246 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25247 fi
25248 fi
25249 rm -f conftest.val
25250 else
25251   ac_cv_sizeof_bool=0
25252 fi
25253 fi
25254 echo "$as_me:25254: result: $ac_cv_sizeof_bool" >&5
25255 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25256 cat >>confdefs.h <<EOF
25257 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25258 EOF
25259
25260 echo "$as_me:25260: checking for type of bool" >&5
25261 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25262 if test "${cf_cv_type_of_bool+set}" = set; then
25263   echo $ECHO_N "(cached) $ECHO_C" >&6
25264 else
25265
25266         rm -f cf_test.out
25267         if test "$cross_compiling" = yes; then
25268
25269                 case x$ac_cv_sizeof_bool in
25270                 (x1) cf_cv_type_of_bool="unsigned char";;
25271                 (x2) cf_cv_type_of_bool="unsigned short";;
25272                 (x4) cf_cv_type_of_bool="unsigned int";;
25273                 (x8) cf_cv_type_of_bool="unsigned long";;
25274                 (*)  cf_cv_type_of_bool=unknown;;
25275                 esac
25276
25277 else
25278   cat >conftest.$ac_ext <<_ACEOF
25279 #line 25279 "configure"
25280 #include "confdefs.h"
25281
25282 #include <stdlib.h>
25283 #include <stdio.h>
25284
25285 #if defined(__cplusplus)
25286
25287 #ifdef HAVE_GXX_BUILTIN_H
25288 #include <g++/builtin.h>
25289 #elif HAVE_GPP_BUILTIN_H
25290 #include <gpp/builtin.h>
25291 #elif HAVE_BUILTIN_H
25292 #include <builtin.h>
25293 #endif
25294
25295 #else
25296
25297 #if $cf_cv_header_stdbool_h
25298 #include <stdbool.h>
25299 #endif
25300
25301 #endif
25302
25303 int main(void)
25304 {
25305         FILE *fp = fopen("cf_test.out", "w");
25306         if (fp != 0) {
25307                 bool x = true;
25308                 if ((bool)(-x) >= 0)
25309                         fputs("unsigned ", fp);
25310                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25311                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25312                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25313                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25314                 fclose(fp);
25315         }
25316         ${cf_cv_main_return:-return}(0);
25317 }
25318
25319 _ACEOF
25320 rm -f conftest$ac_exeext
25321 if { (eval echo "$as_me:25321: \"$ac_link\"") >&5
25322   (eval $ac_link) 2>&5
25323   ac_status=$?
25324   echo "$as_me:25324: \$? = $ac_status" >&5
25325   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25326   { (eval echo "$as_me:25326: \"$ac_try\"") >&5
25327   (eval $ac_try) 2>&5
25328   ac_status=$?
25329   echo "$as_me:25329: \$? = $ac_status" >&5
25330   (exit $ac_status); }; }; then
25331   cf_cv_type_of_bool=`cat cf_test.out`
25332                  if test -z "$cf_cv_type_of_bool"; then
25333                    cf_cv_type_of_bool=unknown
25334                  fi
25335 else
25336   echo "$as_me: program exited with status $ac_status" >&5
25337 echo "$as_me: failed program was:" >&5
25338 cat conftest.$ac_ext >&5
25339 cf_cv_type_of_bool=unknown
25340 fi
25341 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25342 fi
25343         rm -f cf_test.out
25344
25345 fi
25346 echo "$as_me:25346: result: $cf_cv_type_of_bool" >&5
25347 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25348
25349 if test "$cf_cv_type_of_bool" = unknown ; then
25350         case .$NCURSES_BOOL in
25351         (.auto|.) NCURSES_BOOL=unsigned;;
25352         esac
25353         { echo "$as_me:25353: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25354 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25355         cf_cv_type_of_bool=$NCURSES_BOOL
25356 fi
25357
25358 echo "$as_me:25358: checking for special defines needed for etip.h" >&5
25359 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25360 cf_save_CXXFLAGS="$CXXFLAGS"
25361 cf_result="none"
25362
25363 # etip.h includes ncurses.h which includes ncurses_dll.h
25364 # But ncurses_dll.h is generated - fix here.
25365 test -d include || mkdir include
25366 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
25367
25368 for cf_math in "" MATH_H
25369 do
25370 for cf_excp in "" MATH_EXCEPTION
25371 do
25372         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
25373         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
25374         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
25375 cat >conftest.$ac_ext <<_ACEOF
25376 #line 25376 "configure"
25377 #include "confdefs.h"
25378
25379 #include <etip.h.in>
25380
25381 int
25382 main (void)
25383 {
25384
25385   ;
25386   return 0;
25387 }
25388 _ACEOF
25389 rm -f conftest.$ac_objext
25390 if { (eval echo "$as_me:25390: \"$ac_compile\"") >&5
25391   (eval $ac_compile) 2>&5
25392   ac_status=$?
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit $ac_status); } &&
25395          { ac_try='test -s conftest.$ac_objext'
25396   { (eval echo "$as_me:25396: \"$ac_try\"") >&5
25397   (eval $ac_try) 2>&5
25398   ac_status=$?
25399   echo "$as_me:25399: \$? = $ac_status" >&5
25400   (exit $ac_status); }; }; then
25401
25402         test -n "$cf_math" && cat >>confdefs.h <<EOF
25403 #define ETIP_NEEDS_${cf_math} 1
25404 EOF
25405
25406         test -n "$cf_excp" && cat >>confdefs.h <<EOF
25407 #define ETIP_NEEDS_${cf_excp} 1
25408 EOF
25409
25410         cf_result="$cf_math $cf_excp"
25411         break 2
25412
25413 else
25414   echo "$as_me: failed program was:" >&5
25415 cat conftest.$ac_ext >&5
25416 fi
25417 rm -f conftest.$ac_objext conftest.$ac_ext
25418 done
25419 done
25420 echo "$as_me:25420: result: $cf_result" >&5
25421 echo "${ECHO_T}$cf_result" >&6
25422 CXXFLAGS="$cf_save_CXXFLAGS"
25423
25424 if test -n "$CXX"; then
25425 echo "$as_me:25425: checking if $CXX accepts parameter initialization" >&5
25426 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
25427 if test "${cf_cv_cpp_param_init+set}" = set; then
25428   echo $ECHO_N "(cached) $ECHO_C" >&6
25429 else
25430
25431         ac_ext=cc
25432 ac_cpp='$CXXCPP $CPPFLAGS'
25433 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25434 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25435 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25436 ac_main_return=return
25437
25438         if test "$cross_compiling" = yes; then
25439   cf_cv_cpp_param_init=unknown
25440 else
25441   cat >conftest.$ac_ext <<_ACEOF
25442 #line 25442 "configure"
25443 #include "confdefs.h"
25444
25445 class TEST {
25446 private:
25447         int value;
25448 public:
25449         TEST(int x = 1);
25450         ~TEST();
25451 };
25452
25453 TEST::TEST(int x = 1)   // some compilers do not like second initializer
25454 {
25455         value = x;
25456 }
25457 int main(void) { }
25458
25459 _ACEOF
25460 rm -f conftest$ac_exeext
25461 if { (eval echo "$as_me:25461: \"$ac_link\"") >&5
25462   (eval $ac_link) 2>&5
25463   ac_status=$?
25464   echo "$as_me:25464: \$? = $ac_status" >&5
25465   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25466   { (eval echo "$as_me:25466: \"$ac_try\"") >&5
25467   (eval $ac_try) 2>&5
25468   ac_status=$?
25469   echo "$as_me:25469: \$? = $ac_status" >&5
25470   (exit $ac_status); }; }; then
25471   cf_cv_cpp_param_init=yes
25472 else
25473   echo "$as_me: program exited with status $ac_status" >&5
25474 echo "$as_me: failed program was:" >&5
25475 cat conftest.$ac_ext >&5
25476 cf_cv_cpp_param_init=no
25477 fi
25478 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25479 fi
25480         ac_ext=cc
25481 ac_cpp='$CXXCPP $CPPFLAGS'
25482 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25483 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25484 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25485 ac_main_return=return
25486
25487 fi
25488 echo "$as_me:25488: result: $cf_cv_cpp_param_init" >&5
25489 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
25490 fi
25491 test "$cf_cv_cpp_param_init" = yes &&
25492 cat >>confdefs.h <<\EOF
25493 #define CPP_HAS_PARAM_INIT 1
25494 EOF
25495
25496 if test -n "$CXX"; then
25497
25498 echo "$as_me:25498: checking if $CXX accepts static_cast" >&5
25499 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
25500 if test "${cf_cv_cpp_static_cast+set}" = set; then
25501   echo $ECHO_N "(cached) $ECHO_C" >&6
25502 else
25503
25504         ac_ext=cc
25505 ac_cpp='$CXXCPP $CPPFLAGS'
25506 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25507 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25508 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25509 ac_main_return=return
25510
25511         cat >conftest.$ac_ext <<_ACEOF
25512 #line 25512 "configure"
25513 #include "confdefs.h"
25514
25515 class NCursesPanel
25516 {
25517 public:
25518   NCursesPanel(int nlines,
25519                int ncols,
25520                int begin_y = 0,
25521                int begin_x = 0)
25522   {
25523   }
25524   NCursesPanel();
25525   ~NCursesPanel();
25526 };
25527
25528 template<class T> class NCursesUserPanel : public NCursesPanel
25529 {
25530 public:
25531   NCursesUserPanel (int nlines,
25532                     int ncols,
25533                     int begin_y = 0,
25534                     int begin_x = 0,
25535                     const T* p_UserData = static_cast<T*>(0))
25536     : NCursesPanel (nlines, ncols, begin_y, begin_x)
25537   {
25538   };
25539   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
25540   {
25541   };
25542
25543   virtual ~NCursesUserPanel() {};
25544 };
25545
25546 int
25547 main (void)
25548 {
25549
25550         const char* p_UserData = static_cast<char*>(0)
25551   ;
25552   return 0;
25553 }
25554 _ACEOF
25555 rm -f conftest.$ac_objext
25556 if { (eval echo "$as_me:25556: \"$ac_compile\"") >&5
25557   (eval $ac_compile) 2>&5
25558   ac_status=$?
25559   echo "$as_me:25559: \$? = $ac_status" >&5
25560   (exit $ac_status); } &&
25561          { ac_try='test -s conftest.$ac_objext'
25562   { (eval echo "$as_me:25562: \"$ac_try\"") >&5
25563   (eval $ac_try) 2>&5
25564   ac_status=$?
25565   echo "$as_me:25565: \$? = $ac_status" >&5
25566   (exit $ac_status); }; }; then
25567   cf_cv_cpp_static_cast=yes
25568 else
25569   echo "$as_me: failed program was:" >&5
25570 cat conftest.$ac_ext >&5
25571 cf_cv_cpp_static_cast=no
25572 fi
25573 rm -f conftest.$ac_objext conftest.$ac_ext
25574
25575         ac_ext=cc
25576 ac_cpp='$CXXCPP $CPPFLAGS'
25577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
25578 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
25579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25580 ac_main_return=return
25581
25582 fi
25583 echo "$as_me:25583: result: $cf_cv_cpp_static_cast" >&5
25584 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
25585
25586 fi
25587
25588 test "$cf_cv_cpp_static_cast" = yes &&
25589 cat >>confdefs.h <<\EOF
25590 #define CPP_HAS_STATIC_CAST 1
25591 EOF
25592
25593         CXX_AR='$(AR)'
25594         CXX_ARFLAGS='$(ARFLAGS)'
25595         case $cf_cv_system_name in
25596         (irix*)
25597             if test "$GXX" != yes ; then
25598                 CXX_AR='$(CXX)'
25599                 CXX_ARFLAGS='-ar -o'
25600             fi
25601             ;;
25602         (sco3.2v5*)
25603             CXXLDFLAGS="-u main"
25604             ;;
25605         (solaris2*)
25606             if test "$GXX" != yes ; then
25607                 CXX_AR='$(CXX)'
25608                 CXX_ARFLAGS='-xar -o'
25609             fi
25610             ;;
25611         esac
25612
25613 else
25614         cf_cxx_library=no
25615         cf_cv_builtin_bool=1
25616
25617         # Just because we are not configuring against C++ right now does not
25618         # mean that a user will not want to use C++.  Some distributors disable
25619         # the C++ portion of this configuration as a shortcut (or just to avoid
25620         # compiling the demo in the c++ directory).  So we need a reasonable
25621         # default for the 'bool' type.
25622         #
25623         # Caveat: since the storage of the bool type is not standardized, it
25624         # may change.
25625
25626         if test "$NCURSES_BOOL" != auto ; then
25627                 cf_cv_type_of_bool=$NCURSES_BOOL
25628                 cf_cv_header_stdbool_h=0
25629         else
25630                 if test "$cf_cv_header_stdbool_h" = 1 ; then
25631
25632 echo "$as_me:25632: checking for bool" >&5
25633 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25634 if test "${ac_cv_type_bool+set}" = set; then
25635   echo $ECHO_N "(cached) $ECHO_C" >&6
25636 else
25637   cat >conftest.$ac_ext <<_ACEOF
25638 #line 25638 "configure"
25639 #include "confdefs.h"
25640
25641 #include <stdlib.h>
25642 #include <stdio.h>
25643
25644 #if defined(__cplusplus)
25645
25646 #ifdef HAVE_GXX_BUILTIN_H
25647 #include <g++/builtin.h>
25648 #elif HAVE_GPP_BUILTIN_H
25649 #include <gpp/builtin.h>
25650 #elif HAVE_BUILTIN_H
25651 #include <builtin.h>
25652 #endif
25653
25654 #else
25655
25656 #if $cf_cv_header_stdbool_h
25657 #include <stdbool.h>
25658 #endif
25659
25660 #endif
25661
25662 int
25663 main (void)
25664 {
25665 if ((bool *) 0)
25666   return 0;
25667 if (sizeof (bool))
25668   return 0;
25669   ;
25670   return 0;
25671 }
25672 _ACEOF
25673 rm -f conftest.$ac_objext
25674 if { (eval echo "$as_me:25674: \"$ac_compile\"") >&5
25675   (eval $ac_compile) 2>&5
25676   ac_status=$?
25677   echo "$as_me:25677: \$? = $ac_status" >&5
25678   (exit $ac_status); } &&
25679          { ac_try='test -s conftest.$ac_objext'
25680   { (eval echo "$as_me:25680: \"$ac_try\"") >&5
25681   (eval $ac_try) 2>&5
25682   ac_status=$?
25683   echo "$as_me:25683: \$? = $ac_status" >&5
25684   (exit $ac_status); }; }; then
25685   ac_cv_type_bool=yes
25686 else
25687   echo "$as_me: failed program was:" >&5
25688 cat conftest.$ac_ext >&5
25689 ac_cv_type_bool=no
25690 fi
25691 rm -f conftest.$ac_objext conftest.$ac_ext
25692 fi
25693 echo "$as_me:25693: result: $ac_cv_type_bool" >&5
25694 echo "${ECHO_T}$ac_cv_type_bool" >&6
25695
25696 echo "$as_me:25696: checking size of bool" >&5
25697 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25698 if test "${ac_cv_sizeof_bool+set}" = set; then
25699   echo $ECHO_N "(cached) $ECHO_C" >&6
25700 else
25701   if test "$ac_cv_type_bool" = yes; then
25702   if test "$cross_compiling" = yes; then
25703   # Depending upon the size, compute the lo and hi bounds.
25704 cat >conftest.$ac_ext <<_ACEOF
25705 #line 25705 "configure"
25706 #include "confdefs.h"
25707
25708 #include <stdlib.h>
25709 #include <stdio.h>
25710
25711 #if defined(__cplusplus)
25712
25713 #ifdef HAVE_GXX_BUILTIN_H
25714 #include <g++/builtin.h>
25715 #elif HAVE_GPP_BUILTIN_H
25716 #include <gpp/builtin.h>
25717 #elif HAVE_BUILTIN_H
25718 #include <builtin.h>
25719 #endif
25720
25721 #else
25722
25723 #if $cf_cv_header_stdbool_h
25724 #include <stdbool.h>
25725 #endif
25726
25727 #endif
25728
25729 int
25730 main (void)
25731 {
25732 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25733   ;
25734   return 0;
25735 }
25736 _ACEOF
25737 rm -f conftest.$ac_objext
25738 if { (eval echo "$as_me:25738: \"$ac_compile\"") >&5
25739   (eval $ac_compile) 2>&5
25740   ac_status=$?
25741   echo "$as_me:25741: \$? = $ac_status" >&5
25742   (exit $ac_status); } &&
25743          { ac_try='test -s conftest.$ac_objext'
25744   { (eval echo "$as_me:25744: \"$ac_try\"") >&5
25745   (eval $ac_try) 2>&5
25746   ac_status=$?
25747   echo "$as_me:25747: \$? = $ac_status" >&5
25748   (exit $ac_status); }; }; then
25749   ac_lo=0 ac_mid=0
25750   while :; do
25751     cat >conftest.$ac_ext <<_ACEOF
25752 #line 25752 "configure"
25753 #include "confdefs.h"
25754
25755 #include <stdlib.h>
25756 #include <stdio.h>
25757
25758 #if defined(__cplusplus)
25759
25760 #ifdef HAVE_GXX_BUILTIN_H
25761 #include <g++/builtin.h>
25762 #elif HAVE_GPP_BUILTIN_H
25763 #include <gpp/builtin.h>
25764 #elif HAVE_BUILTIN_H
25765 #include <builtin.h>
25766 #endif
25767
25768 #else
25769
25770 #if $cf_cv_header_stdbool_h
25771 #include <stdbool.h>
25772 #endif
25773
25774 #endif
25775
25776 int
25777 main (void)
25778 {
25779 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25780   ;
25781   return 0;
25782 }
25783 _ACEOF
25784 rm -f conftest.$ac_objext
25785 if { (eval echo "$as_me:25785: \"$ac_compile\"") >&5
25786   (eval $ac_compile) 2>&5
25787   ac_status=$?
25788   echo "$as_me:25788: \$? = $ac_status" >&5
25789   (exit $ac_status); } &&
25790          { ac_try='test -s conftest.$ac_objext'
25791   { (eval echo "$as_me:25791: \"$ac_try\"") >&5
25792   (eval $ac_try) 2>&5
25793   ac_status=$?
25794   echo "$as_me:25794: \$? = $ac_status" >&5
25795   (exit $ac_status); }; }; then
25796   ac_hi=$ac_mid; break
25797 else
25798   echo "$as_me: failed program was:" >&5
25799 cat conftest.$ac_ext >&5
25800 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25801 fi
25802 rm -f conftest.$ac_objext conftest.$ac_ext
25803   done
25804 else
25805   echo "$as_me: failed program was:" >&5
25806 cat conftest.$ac_ext >&5
25807 ac_hi=-1 ac_mid=-1
25808   while :; do
25809     cat >conftest.$ac_ext <<_ACEOF
25810 #line 25810 "configure"
25811 #include "confdefs.h"
25812
25813 #include <stdlib.h>
25814 #include <stdio.h>
25815
25816 #if defined(__cplusplus)
25817
25818 #ifdef HAVE_GXX_BUILTIN_H
25819 #include <g++/builtin.h>
25820 #elif HAVE_GPP_BUILTIN_H
25821 #include <gpp/builtin.h>
25822 #elif HAVE_BUILTIN_H
25823 #include <builtin.h>
25824 #endif
25825
25826 #else
25827
25828 #if $cf_cv_header_stdbool_h
25829 #include <stdbool.h>
25830 #endif
25831
25832 #endif
25833
25834 int
25835 main (void)
25836 {
25837 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25838   ;
25839   return 0;
25840 }
25841 _ACEOF
25842 rm -f conftest.$ac_objext
25843 if { (eval echo "$as_me:25843: \"$ac_compile\"") >&5
25844   (eval $ac_compile) 2>&5
25845   ac_status=$?
25846   echo "$as_me:25846: \$? = $ac_status" >&5
25847   (exit $ac_status); } &&
25848          { ac_try='test -s conftest.$ac_objext'
25849   { (eval echo "$as_me:25849: \"$ac_try\"") >&5
25850   (eval $ac_try) 2>&5
25851   ac_status=$?
25852   echo "$as_me:25852: \$? = $ac_status" >&5
25853   (exit $ac_status); }; }; then
25854   ac_lo=$ac_mid; break
25855 else
25856   echo "$as_me: failed program was:" >&5
25857 cat conftest.$ac_ext >&5
25858 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25859 fi
25860 rm -f conftest.$ac_objext conftest.$ac_ext
25861   done
25862 fi
25863 rm -f conftest.$ac_objext conftest.$ac_ext
25864 # Binary search between lo and hi bounds.
25865 while test "x$ac_lo" != "x$ac_hi"; do
25866   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25867   cat >conftest.$ac_ext <<_ACEOF
25868 #line 25868 "configure"
25869 #include "confdefs.h"
25870
25871 #include <stdlib.h>
25872 #include <stdio.h>
25873
25874 #if defined(__cplusplus)
25875
25876 #ifdef HAVE_GXX_BUILTIN_H
25877 #include <g++/builtin.h>
25878 #elif HAVE_GPP_BUILTIN_H
25879 #include <gpp/builtin.h>
25880 #elif HAVE_BUILTIN_H
25881 #include <builtin.h>
25882 #endif
25883
25884 #else
25885
25886 #if $cf_cv_header_stdbool_h
25887 #include <stdbool.h>
25888 #endif
25889
25890 #endif
25891
25892 int
25893 main (void)
25894 {
25895 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25896   ;
25897   return 0;
25898 }
25899 _ACEOF
25900 rm -f conftest.$ac_objext
25901 if { (eval echo "$as_me:25901: \"$ac_compile\"") >&5
25902   (eval $ac_compile) 2>&5
25903   ac_status=$?
25904   echo "$as_me:25904: \$? = $ac_status" >&5
25905   (exit $ac_status); } &&
25906          { ac_try='test -s conftest.$ac_objext'
25907   { (eval echo "$as_me:25907: \"$ac_try\"") >&5
25908   (eval $ac_try) 2>&5
25909   ac_status=$?
25910   echo "$as_me:25910: \$? = $ac_status" >&5
25911   (exit $ac_status); }; }; then
25912   ac_hi=$ac_mid
25913 else
25914   echo "$as_me: failed program was:" >&5
25915 cat conftest.$ac_ext >&5
25916 ac_lo=`expr $ac_mid + 1`
25917 fi
25918 rm -f conftest.$ac_objext conftest.$ac_ext
25919 done
25920 ac_cv_sizeof_bool=$ac_lo
25921 else
25922   if test "$cross_compiling" = yes; then
25923   { { echo "$as_me:25923: error: cannot run test program while cross compiling" >&5
25924 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25925    { (exit 1); exit 1; }; }
25926 else
25927   cat >conftest.$ac_ext <<_ACEOF
25928 #line 25928 "configure"
25929 #include "confdefs.h"
25930
25931 #include <stdlib.h>
25932 #include <stdio.h>
25933
25934 #if defined(__cplusplus)
25935
25936 #ifdef HAVE_GXX_BUILTIN_H
25937 #include <g++/builtin.h>
25938 #elif HAVE_GPP_BUILTIN_H
25939 #include <gpp/builtin.h>
25940 #elif HAVE_BUILTIN_H
25941 #include <builtin.h>
25942 #endif
25943
25944 #else
25945
25946 #if $cf_cv_header_stdbool_h
25947 #include <stdbool.h>
25948 #endif
25949
25950 #endif
25951
25952 int
25953 main (void)
25954 {
25955 FILE *f = fopen ("conftest.val", "w");
25956 if (!f)
25957   $ac_main_return (1);
25958 fprintf (f, "%d", (sizeof (bool)));
25959 fclose (f);
25960   ;
25961   return 0;
25962 }
25963 _ACEOF
25964 rm -f conftest$ac_exeext
25965 if { (eval echo "$as_me:25965: \"$ac_link\"") >&5
25966   (eval $ac_link) 2>&5
25967   ac_status=$?
25968   echo "$as_me:25968: \$? = $ac_status" >&5
25969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25970   { (eval echo "$as_me:25970: \"$ac_try\"") >&5
25971   (eval $ac_try) 2>&5
25972   ac_status=$?
25973   echo "$as_me:25973: \$? = $ac_status" >&5
25974   (exit $ac_status); }; }; then
25975   ac_cv_sizeof_bool=`cat conftest.val`
25976 else
25977   echo "$as_me: program exited with status $ac_status" >&5
25978 echo "$as_me: failed program was:" >&5
25979 cat conftest.$ac_ext >&5
25980 fi
25981 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25982 fi
25983 fi
25984 rm -f conftest.val
25985 else
25986   ac_cv_sizeof_bool=0
25987 fi
25988 fi
25989 echo "$as_me:25989: result: $ac_cv_sizeof_bool" >&5
25990 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25991 cat >>confdefs.h <<EOF
25992 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25993 EOF
25994
25995 echo "$as_me:25995: checking for type of bool" >&5
25996 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25997 if test "${cf_cv_type_of_bool+set}" = set; then
25998   echo $ECHO_N "(cached) $ECHO_C" >&6
25999 else
26000
26001         rm -f cf_test.out
26002         if test "$cross_compiling" = yes; then
26003
26004                 case x$ac_cv_sizeof_bool in
26005                 (x1) cf_cv_type_of_bool="unsigned char";;
26006                 (x2) cf_cv_type_of_bool="unsigned short";;
26007                 (x4) cf_cv_type_of_bool="unsigned int";;
26008                 (x8) cf_cv_type_of_bool="unsigned long";;
26009                 (*)  cf_cv_type_of_bool=unknown;;
26010                 esac
26011
26012 else
26013   cat >conftest.$ac_ext <<_ACEOF
26014 #line 26014 "configure"
26015 #include "confdefs.h"
26016
26017 #include <stdlib.h>
26018 #include <stdio.h>
26019
26020 #if defined(__cplusplus)
26021
26022 #ifdef HAVE_GXX_BUILTIN_H
26023 #include <g++/builtin.h>
26024 #elif HAVE_GPP_BUILTIN_H
26025 #include <gpp/builtin.h>
26026 #elif HAVE_BUILTIN_H
26027 #include <builtin.h>
26028 #endif
26029
26030 #else
26031
26032 #if $cf_cv_header_stdbool_h
26033 #include <stdbool.h>
26034 #endif
26035
26036 #endif
26037
26038 int main(void)
26039 {
26040         FILE *fp = fopen("cf_test.out", "w");
26041         if (fp != 0) {
26042                 bool x = true;
26043                 if ((bool)(-x) >= 0)
26044                         fputs("unsigned ", fp);
26045                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26046                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26047                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26048                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26049                 fclose(fp);
26050         }
26051         ${cf_cv_main_return:-return}(0);
26052 }
26053
26054 _ACEOF
26055 rm -f conftest$ac_exeext
26056 if { (eval echo "$as_me:26056: \"$ac_link\"") >&5
26057   (eval $ac_link) 2>&5
26058   ac_status=$?
26059   echo "$as_me:26059: \$? = $ac_status" >&5
26060   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26061   { (eval echo "$as_me:26061: \"$ac_try\"") >&5
26062   (eval $ac_try) 2>&5
26063   ac_status=$?
26064   echo "$as_me:26064: \$? = $ac_status" >&5
26065   (exit $ac_status); }; }; then
26066   cf_cv_type_of_bool=`cat cf_test.out`
26067                  if test -z "$cf_cv_type_of_bool"; then
26068                    cf_cv_type_of_bool=unknown
26069                  fi
26070 else
26071   echo "$as_me: program exited with status $ac_status" >&5
26072 echo "$as_me: failed program was:" >&5
26073 cat conftest.$ac_ext >&5
26074 cf_cv_type_of_bool=unknown
26075 fi
26076 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26077 fi
26078         rm -f cf_test.out
26079
26080 fi
26081 echo "$as_me:26081: result: $cf_cv_type_of_bool" >&5
26082 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26083
26084 if test "$cf_cv_type_of_bool" = unknown ; then
26085         case .$NCURSES_BOOL in
26086         (.auto|.) NCURSES_BOOL=unsigned;;
26087         esac
26088         { echo "$as_me:26088: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26089 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26090         cf_cv_type_of_bool=$NCURSES_BOOL
26091 fi
26092
26093                 else
26094                         echo "$as_me:26094: checking for fallback type of bool" >&5
26095 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26096                         case "$host_cpu" in
26097                         (i?86)  cf_cv_type_of_bool=char ;;
26098                         (*)     cf_cv_type_of_bool=int  ;;
26099                         esac
26100                         echo "$as_me:26100: result: $cf_cv_type_of_bool" >&5
26101 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26102                 fi
26103         fi
26104 fi
26105
26106 # If the C compiler did not declare bool, and we did not determine that the C++
26107 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26108 # ncurses library use the same type as C++ bool.  Note that this allows one to
26109 # specify the type of bool in a configure-script option and postpone
26110 # integration with the C++ compiler provided that the types are compatible.
26111 USE_CXX_BOOL=1
26112 if test $cf_cv_cc_bool_type = 1
26113 then
26114         # oops: C has a bool.  Unlikely, but C++ could differ.
26115         USE_CXX_BOOL=0
26116 elif test $cf_cv_builtin_bool = 0
26117 then
26118         # C++ has no bool
26119         USE_CXX_BOOL=0
26120 else
26121         # this is the normal case
26122         USE_CXX_BOOL='defined(__cplusplus)'
26123 fi
26124
26125 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26126
26127         if test "$cf_with_ada" != "no" ; then
26128                 if test "$with_libtool" != "no"; then
26129                         { echo "$as_me:26129: WARNING: libtool does not support Ada - disabling feature" >&5
26130 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26131                         cf_with_ada=no
26132                 fi
26133         fi
26134
26135         if test "$cf_with_ada" != "no" ; then
26136
26137 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26138 do
26139
26140 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26141
26142         unset ac_cv_path_cf_TEMP_gnat
26143         unset cf_TEMP_gnat
26144         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26145 set dummy $cf_prog_gnat; ac_word=$2
26146 echo "$as_me:26146: checking for $ac_word" >&5
26147 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26148 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26149   echo $ECHO_N "(cached) $ECHO_C" >&6
26150 else
26151   case $cf_TEMP_gnat in
26152   [\\/]* | ?:[\\/]*)
26153   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26154   ;;
26155   *)
26156   ac_save_IFS=$IFS; IFS=$ac_path_separator
26157 ac_dummy="$PATH"
26158 for ac_dir in $ac_dummy; do
26159   IFS=$ac_save_IFS
26160   test -z "$ac_dir" && ac_dir=.
26161   if $as_executable_p "$ac_dir/$ac_word"; then
26162    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26163    echo "$as_me:26163: found $ac_dir/$ac_word" >&5
26164    break
26165 fi
26166 done
26167
26168   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26169   ;;
26170 esac
26171 fi
26172 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26173
26174 if test -n "$cf_TEMP_gnat"; then
26175   echo "$as_me:26175: result: $cf_TEMP_gnat" >&5
26176 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26177 else
26178   echo "$as_me:26178: result: no" >&5
26179 echo "${ECHO_T}no" >&6
26180 fi
26181
26182         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
26183
26184         if test "x$cf_TEMP_gnat" != xno; then
26185                 unset cf_cv_gnat_version
26186                 unset cf_TEMP_gnat
26187
26188 echo "$as_me:26188: checking for $cf_prog_gnat version" >&5
26189 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26190 if test "${cf_cv_gnat_version+set}" = set; then
26191   echo $ECHO_N "(cached) $ECHO_C" >&6
26192 else
26193
26194 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26195         grep '[0-9].[0-9][0-9]*' |\
26196         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26197
26198 fi
26199 echo "$as_me:26199: result: $cf_cv_gnat_version" >&5
26200 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26201 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26202 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26203
26204         fi
26205         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
26206
26207         unset cf_TEMP_gnat
26208         unset cf_cv_gnat_version
26209         unset ac_cv_path_cf_TEMP_gnat
26210 done
26211
26212 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26213         cf_ada_make=
26214         cf_cv_prog_gnat_correct=no
26215 else
26216         cf_ada_make=gnatmake
26217         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26218                 # gprconfig is newer than gnatmake; we can continue...
26219                 cf_ada_config="##"
26220         else
26221                 rm -rf conftest* *~conftest*
26222                 if mkdir conftest.src
26223                 then
26224                         cf_ada_config=""
26225                         cd conftest.src
26226                         for cf_gprconfig in Ada C
26227                         do
26228                                 echo "$as_me:26228: checking for gprconfig name for $cf_gprconfig" >&5
26229 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26230                                 if test $cf_gprconfig = C
26231                                 then
26232                                         for cf_gprconfig_param in \
26233                                                 $cf_gprconfig,,,,GNATGCC \
26234                                                 $cf_gprconfig,,,,GCC \
26235                                                 $cf_gprconfig
26236                                         do
26237                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26238                                                 test -n "$cf_gprconfig_value" && break
26239                                         done
26240                                 else
26241                                         cf_gprconfig_param=$cf_gprconfig
26242                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26243                                 fi
26244                                 if test -n "$cf_gprconfig_value"
26245                                 then
26246                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
26247                                         echo "$as_me:26247: result: $cf_gprconfig_value" >&5
26248 echo "${ECHO_T}$cf_gprconfig_value" >&6
26249                                 else
26250                                         echo "$as_me:26250: result: missing" >&5
26251 echo "${ECHO_T}missing" >&6
26252                                         cf_ada_config="#"
26253                                         break
26254                                 fi
26255                         done
26256                         cd ..
26257                         rm -rf conftest* *~conftest*
26258                 fi
26259         fi
26260         if test "x$cf_ada_config" != "x#"
26261         then
26262
26263 echo "$as_me:26263: checking for gnat version" >&5
26264 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26265 if test "${cf_cv_gnat_version+set}" = set; then
26266   echo $ECHO_N "(cached) $ECHO_C" >&6
26267 else
26268
26269 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26270         grep '[0-9].[0-9][0-9]*' |\
26271         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26272
26273 fi
26274 echo "$as_me:26274: result: $cf_cv_gnat_version" >&5
26275 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26276 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26277
26278 case $cf_cv_gnat_version in
26279 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26280         cf_cv_prog_gnat_correct=yes
26281         ;;
26282 (*)
26283         { echo "$as_me:26283: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26284 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26285         cf_cv_prog_gnat_correct=no
26286         ;;
26287 esac
26288
26289                 # Extract the first word of "m4", so it can be a program name with args.
26290 set dummy m4; ac_word=$2
26291 echo "$as_me:26291: checking for $ac_word" >&5
26292 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26293 if test "${ac_cv_prog_M4_exists+set}" = set; then
26294   echo $ECHO_N "(cached) $ECHO_C" >&6
26295 else
26296   if test -n "$M4_exists"; then
26297   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26298 else
26299   ac_save_IFS=$IFS; IFS=$ac_path_separator
26300 ac_dummy="$PATH"
26301 for ac_dir in $ac_dummy; do
26302   IFS=$ac_save_IFS
26303   test -z "$ac_dir" && ac_dir=.
26304   $as_executable_p "$ac_dir/$ac_word" || continue
26305 ac_cv_prog_M4_exists="yes"
26306 echo "$as_me:26306: found $ac_dir/$ac_word" >&5
26307 break
26308 done
26309
26310   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26311 fi
26312 fi
26313 M4_exists=$ac_cv_prog_M4_exists
26314 if test -n "$M4_exists"; then
26315   echo "$as_me:26315: result: $M4_exists" >&5
26316 echo "${ECHO_T}$M4_exists" >&6
26317 else
26318   echo "$as_me:26318: result: no" >&5
26319 echo "${ECHO_T}no" >&6
26320 fi
26321
26322                 if test "$ac_cv_prog_M4_exists" = no; then
26323                         cf_cv_prog_gnat_correct=no
26324                         { echo "$as_me:26324: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26325 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26326                 fi
26327                 if test "$cf_cv_prog_gnat_correct" = yes; then
26328                         echo "$as_me:26328: checking if GNAT works" >&5
26329 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26330
26331 rm -rf conftest* *~conftest*
26332 cat >>conftest.ads <<CF_EOF
26333 procedure conftest;
26334 CF_EOF
26335 cat >>conftest.adb <<CF_EOF
26336 with Text_IO;
26337 with GNAT.OS_Lib;
26338 procedure conftest is
26339 begin
26340    Text_IO.Put ("Hello World");
26341    Text_IO.New_Line;
26342    GNAT.OS_Lib.OS_Exit (0);
26343 end conftest;
26344 CF_EOF
26345 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26346    if ( ./conftest 1>&5 2>&1 ) ; then
26347       cf_cv_prog_gnat_correct=yes
26348    else
26349       cf_cv_prog_gnat_correct=no
26350    fi
26351 else
26352    cf_cv_prog_gnat_correct=no
26353 fi
26354 rm -rf conftest* *~conftest*
26355
26356                         echo "$as_me:26356: result: $cf_cv_prog_gnat_correct" >&5
26357 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26358                 fi
26359         else
26360                 cf_cv_prog_gnat_correct=no
26361         fi
26362 fi
26363
26364                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26365
26366         ADAFLAGS="$ADAFLAGS -gnatpn"
26367
26368         echo "$as_me:26368: checking optimization options for ADAFLAGS" >&5
26369 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26370         case "$CFLAGS" in
26371         (*-g*)
26372
26373         ADAFLAGS="$ADAFLAGS -g"
26374
26375                 ;;
26376         esac
26377         case "$CFLAGS" in
26378         (*-O*)
26379                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
26380
26381         ADAFLAGS="$ADAFLAGS $cf_O_flag"
26382
26383                 ;;
26384         esac
26385         echo "$as_me:26385: result: $ADAFLAGS" >&5
26386 echo "${ECHO_T}$ADAFLAGS" >&6
26387
26388 echo "$as_me:26388: checking if GNATPREP supports -T option" >&5
26389 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
26390 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
26391   echo $ECHO_N "(cached) $ECHO_C" >&6
26392 else
26393
26394 cf_cv_gnatprep_opt_t=no
26395 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
26396
26397 fi
26398 echo "$as_me:26398: result: $cf_cv_gnatprep_opt_t" >&5
26399 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
26400 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
26401
26402 echo "$as_me:26402: checking if GNAT supports generics" >&5
26403 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
26404 case $cf_cv_gnat_version in
26405 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26406         cf_gnat_generics=yes
26407         ;;
26408 (*)
26409         cf_gnat_generics=no
26410         ;;
26411 esac
26412 echo "$as_me:26412: result: $cf_gnat_generics" >&5
26413 echo "${ECHO_T}$cf_gnat_generics" >&6
26414
26415 if test "$cf_gnat_generics" = yes
26416 then
26417         cf_compile_generics=generics
26418         cf_generic_objects="\${GENOBJS}"
26419 else
26420         cf_compile_generics=
26421         cf_generic_objects=
26422 fi
26423
26424 echo "$as_me:26424: checking if GNAT supports SIGINT" >&5
26425 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
26426 if test "${cf_cv_gnat_sigint+set}" = set; then
26427   echo $ECHO_N "(cached) $ECHO_C" >&6
26428 else
26429
26430 rm -rf conftest* *~conftest*
26431 cat >>conftest.ads <<CF_EOF
26432 with Ada.Interrupts.Names;
26433
26434 package ConfTest is
26435
26436    pragma Warnings (Off);  --  the next pragma exists since 3.11p
26437    pragma Unreserve_All_Interrupts;
26438    pragma Warnings (On);
26439
26440    protected Process is
26441       procedure Stop;
26442       function Continue return Boolean;
26443       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
26444    private
26445       Done : Boolean := False;
26446    end Process;
26447
26448 end ConfTest;
26449 CF_EOF
26450 cat >>conftest.adb <<CF_EOF
26451 package body ConfTest is
26452    protected body Process is
26453       procedure Stop is
26454       begin
26455          Done := True;
26456       end Stop;
26457       function Continue return Boolean is
26458       begin
26459          return not Done;
26460       end Continue;
26461    end Process;
26462 end ConfTest;
26463 CF_EOF
26464 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26465       cf_cv_gnat_sigint=yes
26466 else
26467    cf_cv_gnat_sigint=no
26468 fi
26469 rm -rf conftest* *~conftest*
26470
26471 fi
26472 echo "$as_me:26472: result: $cf_cv_gnat_sigint" >&5
26473 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
26474
26475 if test $cf_cv_gnat_sigint = yes ; then
26476         USE_GNAT_SIGINT=""
26477 else
26478         USE_GNAT_SIGINT="#"
26479 fi
26480
26481 cf_gnat_libraries=no
26482 cf_gnat_projects=no
26483
26484 if test "$enable_gnat_projects" != no ; then
26485 echo "$as_me:26485: checking if GNAT supports project files" >&5
26486 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
26487 case $cf_cv_gnat_version in
26488 (3.[0-9]*)
26489         ;;
26490 (*)
26491         case $cf_cv_system_name in
26492         (cygwin*|msys*)
26493                 ;;
26494         (*)
26495                 rm -rf conftest* *~conftest*
26496                 if mkdir conftest.src conftest.bin conftest.lib
26497                 then
26498                         cd conftest.src
26499                         rm -rf conftest* *~conftest*
26500                         cat >>library.gpr <<CF_EOF
26501 project Library is
26502   Kind := External ("LIB_KIND");
26503   for Library_Name use "ConfTest";
26504   for Object_Dir use ".";
26505   for Library_ALI_Dir use External("LIBRARY_DIR");
26506   for Library_Version use External ("SONAME");
26507   for Library_Kind use Kind;
26508   for Library_Dir use External("BUILD_DIR");
26509   Source_Dir := External ("SOURCE_DIR");
26510   for Source_Dirs use (Source_Dir);
26511 end Library;
26512 CF_EOF
26513                         cat >>confpackage.ads <<CF_EOF
26514 package ConfPackage is
26515    procedure conftest;
26516 end ConfPackage;
26517 CF_EOF
26518                         cat >>confpackage.adb <<CF_EOF
26519 with Text_IO;
26520 package body ConfPackage is
26521    procedure conftest is
26522    begin
26523       Text_IO.Put ("Hello World");
26524       Text_IO.New_Line;
26525    end conftest;
26526 end ConfPackage;
26527 CF_EOF
26528                         if ( $cf_ada_make $ADAFLAGS \
26529                                         -Plibrary.gpr \
26530                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
26531                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
26532                                         -XSOURCE_DIR=`pwd` \
26533                                         -XSONAME=libConfTest.so.1 \
26534                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
26535                                 cf_gnat_projects=yes
26536                         fi
26537                         cd ..
26538                 fi
26539                 if test -f conftest.lib/confpackage.ali
26540                 then
26541                         cf_gnat_libraries=yes
26542                 fi
26543                 rm -rf conftest* *~conftest*
26544                 ;;
26545         esac
26546         ;;
26547 esac
26548 echo "$as_me:26548: result: $cf_gnat_projects" >&5
26549 echo "${ECHO_T}$cf_gnat_projects" >&6
26550 fi # enable_gnat_projects
26551
26552 if test $cf_gnat_projects = yes
26553 then
26554         echo "$as_me:26554: checking if GNAT supports libraries" >&5
26555 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
26556         echo "$as_me:26556: result: $cf_gnat_libraries" >&5
26557 echo "${ECHO_T}$cf_gnat_libraries" >&6
26558 fi
26559
26560 if test "$cf_gnat_projects" = yes
26561 then
26562         USE_OLD_MAKERULES="#"
26563         USE_GNAT_PROJECTS=""
26564 else
26565         USE_OLD_MAKERULES=""
26566         USE_GNAT_PROJECTS="#"
26567 fi
26568
26569 if test "$cf_gnat_libraries" = yes
26570 then
26571         USE_GNAT_LIBRARIES=""
26572 else
26573         USE_GNAT_LIBRARIES="#"
26574 fi
26575
26576 echo "$as_me:26576: checking for ada-compiler" >&5
26577 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
26578
26579 # Check whether --with-ada-compiler or --without-ada-compiler was given.
26580 if test "${with_ada_compiler+set}" = set; then
26581   withval="$with_ada_compiler"
26582   cf_ada_compiler=$withval
26583 else
26584   cf_ada_compiler=gnatmake
26585 fi;
26586
26587 echo "$as_me:26587: result: $cf_ada_compiler" >&5
26588 echo "${ECHO_T}$cf_ada_compiler" >&6
26589
26590                         cf_ada_package=terminal_interface
26591
26592 echo "$as_me:26592: checking for ada-include" >&5
26593 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
26594
26595 # Check whether --with-ada-include or --without-ada-include was given.
26596 if test "${with_ada_include+set}" = set; then
26597   withval="$with_ada_include"
26598
26599 else
26600   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
26601 fi; if test -n "$prefix/share/ada/adainclude" ; then
26602
26603 if test "x$prefix" != xNONE; then
26604         cf_path_syntax="$prefix"
26605 else
26606         cf_path_syntax="$ac_default_prefix"
26607 fi
26608
26609 case ".$withval" in
26610 (.\$\(*\)*|.\'*\'*)
26611         ;;
26612 (..|./*|.\\*)
26613         ;;
26614 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26615         ;;
26616 (.\${*prefix}*|.\${*dir}*)
26617         eval withval="$withval"
26618         case ".$withval" in
26619         (.NONE/*)
26620                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26621                 ;;
26622         esac
26623         ;;
26624 (.no|.NONE/*)
26625         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26626         ;;
26627 (*)
26628         { { echo "$as_me:26628: error: expected a pathname, not \"$withval\"" >&5
26629 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26630    { (exit 1); exit 1; }; }
26631         ;;
26632 esac
26633
26634 fi
26635 eval ADA_INCLUDE="$withval"
26636
26637 echo "$as_me:26637: result: $ADA_INCLUDE" >&5
26638 echo "${ECHO_T}$ADA_INCLUDE" >&6
26639
26640 echo "$as_me:26640: checking for ada-objects" >&5
26641 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
26642
26643 # Check whether --with-ada-objects or --without-ada-objects was given.
26644 if test "${with_ada_objects+set}" = set; then
26645   withval="$with_ada_objects"
26646
26647 else
26648   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
26649 fi; if test -n "$prefix/lib/ada/adalib" ; then
26650
26651 if test "x$prefix" != xNONE; then
26652         cf_path_syntax="$prefix"
26653 else
26654         cf_path_syntax="$ac_default_prefix"
26655 fi
26656
26657 case ".$withval" in
26658 (.\$\(*\)*|.\'*\'*)
26659         ;;
26660 (..|./*|.\\*)
26661         ;;
26662 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
26663         ;;
26664 (.\${*prefix}*|.\${*dir}*)
26665         eval withval="$withval"
26666         case ".$withval" in
26667         (.NONE/*)
26668                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26669                 ;;
26670         esac
26671         ;;
26672 (.no|.NONE/*)
26673         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
26674         ;;
26675 (*)
26676         { { echo "$as_me:26676: error: expected a pathname, not \"$withval\"" >&5
26677 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
26678    { (exit 1); exit 1; }; }
26679         ;;
26680 esac
26681
26682 fi
26683 eval ADA_OBJECTS="$withval"
26684
26685 echo "$as_me:26685: result: $ADA_OBJECTS" >&5
26686 echo "${ECHO_T}$ADA_OBJECTS" >&6
26687
26688 echo "$as_me:26688: checking if an Ada95 shared-library should be built" >&5
26689 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
26690
26691 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
26692 if test "${with_ada_sharedlib+set}" = set; then
26693   withval="$with_ada_sharedlib"
26694   with_ada_sharedlib=$withval
26695 else
26696   with_ada_sharedlib=no
26697 fi;
26698 echo "$as_me:26698: result: $with_ada_sharedlib" >&5
26699 echo "${ECHO_T}$with_ada_sharedlib" >&6
26700
26701 if test "x$with_ada_sharedlib" != xno
26702 then
26703         if test "x$cf_gnat_projects" != xyes
26704         then
26705                 { echo "$as_me:26705: WARNING: disabling shared-library since GNAT projects are not supported" >&5
26706 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
26707                 with_ada_sharedlib=no
26708         fi
26709 fi
26710
26711 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
26712 MAKE_ADA_SHAREDLIB="#"
26713
26714 if test "x$with_ada_sharedlib" != xno
26715 then
26716         MAKE_ADA_SHAREDLIB=
26717         if test "x$with_ada_sharedlib" != xyes
26718         then
26719                 ADA_SHAREDLIB="$with_ada_sharedlib"
26720         fi
26721 fi
26722
26723                         # allow the Ada binding to be renamed
26724
26725 echo "$as_me:26725: checking for ada-libname" >&5
26726 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
26727
26728 # Check whether --with-ada-libname or --without-ada-libname was given.
26729 if test "${with_ada_libname+set}" = set; then
26730   withval="$with_ada_libname"
26731   ADA_LIBNAME=$withval
26732 else
26733   ADA_LIBNAME=AdaCurses
26734 fi;
26735 case "x$ADA_LIBNAME" in
26736 (x|xyes|xno)
26737         ADA_LIBNAME=AdaCurses
26738         ;;
26739 esac
26740
26741 echo "$as_me:26741: result: $ADA_LIBNAME" >&5
26742 echo "${ECHO_T}$ADA_LIBNAME" >&6
26743
26744                 fi
26745         fi
26746 else
26747         cf_with_ada=no
26748 fi
26749
26750 # do this "late" to avoid conflict with header-checks
26751 if test "x$with_widec" = xyes ; then
26752         echo "$as_me:26752: checking for wchar_t" >&5
26753 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
26754 if test "${ac_cv_type_wchar_t+set}" = set; then
26755   echo $ECHO_N "(cached) $ECHO_C" >&6
26756 else
26757   cat >conftest.$ac_ext <<_ACEOF
26758 #line 26758 "configure"
26759 #include "confdefs.h"
26760 $ac_includes_default
26761 int
26762 main (void)
26763 {
26764 if ((wchar_t *) 0)
26765   return 0;
26766 if (sizeof (wchar_t))
26767   return 0;
26768   ;
26769   return 0;
26770 }
26771 _ACEOF
26772 rm -f conftest.$ac_objext
26773 if { (eval echo "$as_me:26773: \"$ac_compile\"") >&5
26774   (eval $ac_compile) 2>&5
26775   ac_status=$?
26776   echo "$as_me:26776: \$? = $ac_status" >&5
26777   (exit $ac_status); } &&
26778          { ac_try='test -s conftest.$ac_objext'
26779   { (eval echo "$as_me:26779: \"$ac_try\"") >&5
26780   (eval $ac_try) 2>&5
26781   ac_status=$?
26782   echo "$as_me:26782: \$? = $ac_status" >&5
26783   (exit $ac_status); }; }; then
26784   ac_cv_type_wchar_t=yes
26785 else
26786   echo "$as_me: failed program was:" >&5
26787 cat conftest.$ac_ext >&5
26788 ac_cv_type_wchar_t=no
26789 fi
26790 rm -f conftest.$ac_objext conftest.$ac_ext
26791 fi
26792 echo "$as_me:26792: result: $ac_cv_type_wchar_t" >&5
26793 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
26794
26795 echo "$as_me:26795: checking size of wchar_t" >&5
26796 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
26797 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
26798   echo $ECHO_N "(cached) $ECHO_C" >&6
26799 else
26800   if test "$ac_cv_type_wchar_t" = yes; then
26801   if test "$cross_compiling" = yes; then
26802   # Depending upon the size, compute the lo and hi bounds.
26803 cat >conftest.$ac_ext <<_ACEOF
26804 #line 26804 "configure"
26805 #include "confdefs.h"
26806 $ac_includes_default
26807 int
26808 main (void)
26809 {
26810 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
26811   ;
26812   return 0;
26813 }
26814 _ACEOF
26815 rm -f conftest.$ac_objext
26816 if { (eval echo "$as_me:26816: \"$ac_compile\"") >&5
26817   (eval $ac_compile) 2>&5
26818   ac_status=$?
26819   echo "$as_me:26819: \$? = $ac_status" >&5
26820   (exit $ac_status); } &&
26821          { ac_try='test -s conftest.$ac_objext'
26822   { (eval echo "$as_me:26822: \"$ac_try\"") >&5
26823   (eval $ac_try) 2>&5
26824   ac_status=$?
26825   echo "$as_me:26825: \$? = $ac_status" >&5
26826   (exit $ac_status); }; }; then
26827   ac_lo=0 ac_mid=0
26828   while :; do
26829     cat >conftest.$ac_ext <<_ACEOF
26830 #line 26830 "configure"
26831 #include "confdefs.h"
26832 $ac_includes_default
26833 int
26834 main (void)
26835 {
26836 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26837   ;
26838   return 0;
26839 }
26840 _ACEOF
26841 rm -f conftest.$ac_objext
26842 if { (eval echo "$as_me:26842: \"$ac_compile\"") >&5
26843   (eval $ac_compile) 2>&5
26844   ac_status=$?
26845   echo "$as_me:26845: \$? = $ac_status" >&5
26846   (exit $ac_status); } &&
26847          { ac_try='test -s conftest.$ac_objext'
26848   { (eval echo "$as_me:26848: \"$ac_try\"") >&5
26849   (eval $ac_try) 2>&5
26850   ac_status=$?
26851   echo "$as_me:26851: \$? = $ac_status" >&5
26852   (exit $ac_status); }; }; then
26853   ac_hi=$ac_mid; break
26854 else
26855   echo "$as_me: failed program was:" >&5
26856 cat conftest.$ac_ext >&5
26857 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
26858 fi
26859 rm -f conftest.$ac_objext conftest.$ac_ext
26860   done
26861 else
26862   echo "$as_me: failed program was:" >&5
26863 cat conftest.$ac_ext >&5
26864 ac_hi=-1 ac_mid=-1
26865   while :; do
26866     cat >conftest.$ac_ext <<_ACEOF
26867 #line 26867 "configure"
26868 #include "confdefs.h"
26869 $ac_includes_default
26870 int
26871 main (void)
26872 {
26873 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
26874   ;
26875   return 0;
26876 }
26877 _ACEOF
26878 rm -f conftest.$ac_objext
26879 if { (eval echo "$as_me:26879: \"$ac_compile\"") >&5
26880   (eval $ac_compile) 2>&5
26881   ac_status=$?
26882   echo "$as_me:26882: \$? = $ac_status" >&5
26883   (exit $ac_status); } &&
26884          { ac_try='test -s conftest.$ac_objext'
26885   { (eval echo "$as_me:26885: \"$ac_try\"") >&5
26886   (eval $ac_try) 2>&5
26887   ac_status=$?
26888   echo "$as_me:26888: \$? = $ac_status" >&5
26889   (exit $ac_status); }; }; then
26890   ac_lo=$ac_mid; break
26891 else
26892   echo "$as_me: failed program was:" >&5
26893 cat conftest.$ac_ext >&5
26894 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
26895 fi
26896 rm -f conftest.$ac_objext conftest.$ac_ext
26897   done
26898 fi
26899 rm -f conftest.$ac_objext conftest.$ac_ext
26900 # Binary search between lo and hi bounds.
26901 while test "x$ac_lo" != "x$ac_hi"; do
26902   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
26903   cat >conftest.$ac_ext <<_ACEOF
26904 #line 26904 "configure"
26905 #include "confdefs.h"
26906 $ac_includes_default
26907 int
26908 main (void)
26909 {
26910 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
26911   ;
26912   return 0;
26913 }
26914 _ACEOF
26915 rm -f conftest.$ac_objext
26916 if { (eval echo "$as_me:26916: \"$ac_compile\"") >&5
26917   (eval $ac_compile) 2>&5
26918   ac_status=$?
26919   echo "$as_me:26919: \$? = $ac_status" >&5
26920   (exit $ac_status); } &&
26921          { ac_try='test -s conftest.$ac_objext'
26922   { (eval echo "$as_me:26922: \"$ac_try\"") >&5
26923   (eval $ac_try) 2>&5
26924   ac_status=$?
26925   echo "$as_me:26925: \$? = $ac_status" >&5
26926   (exit $ac_status); }; }; then
26927   ac_hi=$ac_mid
26928 else
26929   echo "$as_me: failed program was:" >&5
26930 cat conftest.$ac_ext >&5
26931 ac_lo=`expr $ac_mid + 1`
26932 fi
26933 rm -f conftest.$ac_objext conftest.$ac_ext
26934 done
26935 ac_cv_sizeof_wchar_t=$ac_lo
26936 else
26937   if test "$cross_compiling" = yes; then
26938   { { echo "$as_me:26938: error: cannot run test program while cross compiling" >&5
26939 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26940    { (exit 1); exit 1; }; }
26941 else
26942   cat >conftest.$ac_ext <<_ACEOF
26943 #line 26943 "configure"
26944 #include "confdefs.h"
26945 $ac_includes_default
26946 int
26947 main (void)
26948 {
26949 FILE *f = fopen ("conftest.val", "w");
26950 if (!f)
26951   $ac_main_return (1);
26952 fprintf (f, "%d", (sizeof (wchar_t)));
26953 fclose (f);
26954   ;
26955   return 0;
26956 }
26957 _ACEOF
26958 rm -f conftest$ac_exeext
26959 if { (eval echo "$as_me:26959: \"$ac_link\"") >&5
26960   (eval $ac_link) 2>&5
26961   ac_status=$?
26962   echo "$as_me:26962: \$? = $ac_status" >&5
26963   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26964   { (eval echo "$as_me:26964: \"$ac_try\"") >&5
26965   (eval $ac_try) 2>&5
26966   ac_status=$?
26967   echo "$as_me:26967: \$? = $ac_status" >&5
26968   (exit $ac_status); }; }; then
26969   ac_cv_sizeof_wchar_t=`cat conftest.val`
26970 else
26971   echo "$as_me: program exited with status $ac_status" >&5
26972 echo "$as_me: failed program was:" >&5
26973 cat conftest.$ac_ext >&5
26974 fi
26975 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26976 fi
26977 fi
26978 rm -f conftest.val
26979 else
26980   ac_cv_sizeof_wchar_t=0
26981 fi
26982 fi
26983 echo "$as_me:26983: result: $ac_cv_sizeof_wchar_t" >&5
26984 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
26985 cat >>confdefs.h <<EOF
26986 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
26987 EOF
26988
26989         # cross-compiling to mingw can run into the problem that attempting to
26990         # link with the regex library fails, causing the test to not set this to
26991         # a number.  "recent" autoconf does not address this problem either -TD
26992         if test -z "$ac_cv_sizeof_wchar_t"
26993         then
26994                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
26995
26996 echo "${as_me:-configure}:26996: testing test failed (assume 2) ..." 1>&5
26997
26998                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
26999                 mv confdefs.tmp confdefs.h
27000                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27001         fi
27002 fi
27003
27004 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27005 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27006 ###
27007 ### ticlib modules may be a separate library, otherwise contained in termlib.
27008 ### termlib modules may be a separate library, otherwise contained in ncurses.
27009 ###
27010 ### The of "+" or " " between the tokens controls the way the script
27011 ### chooses to split module lists into libraries.
27012 ###
27013 ### (see CF_LIB_RULES).
27014 echo "$as_me:27014: checking for library subsets" >&5
27015 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27016 LIB_SUBSETS=
27017
27018 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27019         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27020         if test "$with_ticlib" != no ; then
27021                 LIB_SUBSETS="${LIB_SUBSETS} "
27022         else
27023                 LIB_SUBSETS="${LIB_SUBSETS}+"
27024         fi
27025 fi
27026
27027 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27028 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27029
27030 if test "$with_termlib" != no ; then
27031         LIB_SUBSETS="${LIB_SUBSETS} "
27032 else
27033         LIB_SUBSETS="${LIB_SUBSETS}+"
27034 fi
27035
27036 LIB_SUBSETS="${LIB_SUBSETS}base"
27037
27038 # Most term-driver calls are to tinfo, but some like init_pair are to the
27039 # base library (so it resides in base).
27040 if test "$with_term_driver" != no ; then
27041         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27042         case $cf_cv_system_name in
27043         (*mingw32*|*mingw64*)
27044                 if test "x$with_exp_win32" = xyes ; then
27045                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27046                 else
27047                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27048                 fi
27049                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27050                 ;;
27051         (*)
27052                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27053                 ;;
27054         esac
27055 elif test "x$with_exp_win32" = xyes ; then
27056         case $cf_cv_system_name in
27057         (*mingw32*|*mingw64*)
27058                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27059                 ;;
27060         (*)
27061                 ;;
27062         esac
27063 fi
27064
27065 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27066 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27067
27068 echo "$as_me:27068: result: $LIB_SUBSETS" >&5
27069 echo "${ECHO_T}$LIB_SUBSETS" >&6
27070
27071 ### Construct the list of include-directories to be generated
27072
27073 if test "$srcdir" != "."; then
27074         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27075 fi
27076 CPPFLAGS="-I../include $CPPFLAGS"
27077 if test "$srcdir" != "."; then
27078         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27079 fi
27080 CPPFLAGS="-I. $CPPFLAGS"
27081
27082 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27083 if test "$srcdir" != "."; then
27084         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27085 fi
27086 if test "$GCC" != yes; then
27087         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27088 elif test "$includedir" != "/usr/include"; then
27089         if test "$includedir" = '${prefix}/include' ; then
27090                 if test x$prefix != x/usr ; then
27091                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27092                 fi
27093         else
27094                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27095         fi
27096 fi
27097
27098 ### Build up pieces for makefile rules
27099 echo "$as_me:27099: checking default library suffix" >&5
27100 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27101
27102         case $DFT_LWR_MODEL in
27103         (libtool) DFT_ARG_SUFFIX=''   ;;
27104         (normal)  DFT_ARG_SUFFIX=''   ;;
27105         (debug)   DFT_ARG_SUFFIX='_g' ;;
27106         (profile) DFT_ARG_SUFFIX='_p' ;;
27107         (shared)  DFT_ARG_SUFFIX=''   ;;
27108         esac
27109         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27110 echo "$as_me:27110: result: $DFT_ARG_SUFFIX" >&5
27111 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27112
27113 echo "$as_me:27113: checking default library-dependency suffix" >&5
27114 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27115
27116         case X$DFT_LWR_MODEL in
27117         (Xlibtool)
27118                 DFT_LIB_SUFFIX='.la'
27119                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27120                 ;;
27121         (Xdebug)
27122                 case $cf_cv_system_name in
27123                 (*-msvc*)
27124                         DFT_LIB_SUFFIX='_g.lib'
27125                         ;;
27126                 (*)
27127                         DFT_LIB_SUFFIX='_g.a'
27128                         ;;
27129                 esac
27130                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27131                 ;;
27132         (Xprofile)
27133                 case $cf_cv_system_name in
27134                 (*-msvc*)
27135                         DFT_LIB_SUFFIX='_p.lib'
27136                         ;;
27137                 (*)
27138                         DFT_LIB_SUFFIX='_p.a'
27139                         ;;
27140                 esac
27141                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27142                 ;;
27143         (Xshared)
27144                 case $cf_cv_system_name in
27145                 (aix[5-7]*)
27146                         DFT_LIB_SUFFIX='.so'
27147                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27148                         ;;
27149                 (*-msvc*)
27150                         DFT_LIB_SUFFIX='.dll'
27151                         DFT_DEP_SUFFIX='.dll.lib'
27152                         ;;
27153                 (cygwin*|msys*|mingw*)
27154                         DFT_LIB_SUFFIX='.dll'
27155                         DFT_DEP_SUFFIX='.dll.a'
27156                         ;;
27157                 (darwin*)
27158                         DFT_LIB_SUFFIX='.dylib'
27159                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27160                         ;;
27161                 (hpux*)
27162                         case $target in
27163                         (ia64*)
27164                                 DFT_LIB_SUFFIX='.so'
27165                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27166                                 ;;
27167                         (*)
27168                                 DFT_LIB_SUFFIX='.sl'
27169                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27170                                 ;;
27171                         esac
27172                         ;;
27173                 (*)
27174                         DFT_LIB_SUFFIX='.so'
27175                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27176                         ;;
27177                 esac
27178                 ;;
27179         (*)
27180                 case $target in
27181                 (*-msvc*)
27182                         DFT_LIB_SUFFIX='.lib'
27183                         ;;
27184                 (*)
27185                         DFT_LIB_SUFFIX='.a'
27186                         ;;
27187                 esac
27188                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27189                 ;;
27190         esac
27191         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27192         then
27193                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27194                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27195         fi
27196 echo "$as_me:27196: result: $DFT_DEP_SUFFIX" >&5
27197 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27198
27199 echo "$as_me:27199: checking default object directory" >&5
27200 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27201
27202         case $DFT_LWR_MODEL in
27203         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27204         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27205         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27206         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27207         (shared)
27208                 case $cf_cv_system_name in
27209                 (cygwin|msys)
27210                         DFT_OBJ_SUBDIR='objects' ;;
27211                 (*)
27212                         DFT_OBJ_SUBDIR='obj_s' ;;
27213                 esac
27214         esac
27215 echo "$as_me:27215: result: $DFT_OBJ_SUBDIR" >&5
27216 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27217
27218 if test "x$cf_with_cxx" = xyes ; then
27219 echo "$as_me:27219: checking c++ library-dependency suffix" >&5
27220 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27221 if test "$with_libtool" != "no"; then
27222         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27223         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27224 elif test "$with_shared_cxx" != "no"; then
27225         # also for g++ users...
27226         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27227 else
27228         # we normally make a static library because C/C++ library rules differ
27229
27230         case Xnormal in
27231         (Xlibtool)
27232                 CXX_LIB_SUFFIX='.la'
27233                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27234                 ;;
27235         (Xdebug)
27236                 case $cf_cv_system_name in
27237                 (*-msvc*)
27238                         CXX_LIB_SUFFIX='_g.lib'
27239                         ;;
27240                 (*)
27241                         CXX_LIB_SUFFIX='_g.a'
27242                         ;;
27243                 esac
27244                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27245                 ;;
27246         (Xprofile)
27247                 case $cf_cv_system_name in
27248                 (*-msvc*)
27249                         CXX_LIB_SUFFIX='_p.lib'
27250                         ;;
27251                 (*)
27252                         CXX_LIB_SUFFIX='_p.a'
27253                         ;;
27254                 esac
27255                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27256                 ;;
27257         (Xshared)
27258                 case $cf_cv_system_name in
27259                 (aix[5-7]*)
27260                         CXX_LIB_SUFFIX='.so'
27261                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27262                         ;;
27263                 (*-msvc*)
27264                         CXX_LIB_SUFFIX='.dll'
27265                         CXX_DEP_SUFFIX='.dll.lib'
27266                         ;;
27267                 (cygwin*|msys*|mingw*)
27268                         CXX_LIB_SUFFIX='.dll'
27269                         CXX_DEP_SUFFIX='.dll.a'
27270                         ;;
27271                 (darwin*)
27272                         CXX_LIB_SUFFIX='.dylib'
27273                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27274                         ;;
27275                 (hpux*)
27276                         case $target in
27277                         (ia64*)
27278                                 CXX_LIB_SUFFIX='.so'
27279                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27280                                 ;;
27281                         (*)
27282                                 CXX_LIB_SUFFIX='.sl'
27283                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27284                                 ;;
27285                         esac
27286                         ;;
27287                 (*)
27288                         CXX_LIB_SUFFIX='.so'
27289                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27290                         ;;
27291                 esac
27292                 ;;
27293         (*)
27294                 case $target in
27295                 (*-msvc*)
27296                         CXX_LIB_SUFFIX='.lib'
27297                         ;;
27298                 (*)
27299                         CXX_LIB_SUFFIX='.a'
27300                         ;;
27301                 esac
27302                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27303                 ;;
27304         esac
27305         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27306         then
27307                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27308                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27309         fi
27310
27311 fi
27312 echo "$as_me:27312: result: $CXX_LIB_SUFFIX" >&5
27313 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27314
27315 fi
27316
27317 # do not want -ldl in build except as needed for -lncurses dependency
27318 if test "x$with_dlsym" = xyes ; then
27319 if test $DFT_LWR_MODEL = shared || \
27320    test $DFT_LWR_MODEL = libtool ; then
27321
27322 # remove dl library from $LIBS
27323 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27324
27325 fi
27326 fi
27327 ### Set up low-level terminfo dependencies for makefiles.
27328
27329 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27330 # do not need libdl
27331 TICS_LIST=
27332 if test "x$with_dlsym" = xyes ; then
27333
27334 # remove dl library from $SHLIB_LIST
27335 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27336
27337 fi
27338
27339 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27340 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27341 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27342 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27343 then
27344         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27345 fi
27346
27347 if test "$with_ticlib" != no ; then
27348
27349         if test "x$with_ticlib" != xyes ; then
27350                 TICS_NAME=$with_ticlib
27351                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27352                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27353                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27354                 TICS_LIB_SUFFIX="${with_ticlib}"
27355         else
27356                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27357                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27358                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27359                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
27360         fi
27361         TICS_LDFLAGS="-L${LIB_DIR}"
27362         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
27363 else
27364         TICS_SUFFIX=${DFT_LIB_SUFFIX}
27365         TICS_LDFLAGS="-L${LIB_DIR}"
27366         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27367 fi
27368
27369 if test "$with_termlib" != no ; then
27370
27371         if test "x$with_termlib" != xyes ; then
27372                 TINFO_NAME=$with_termlib
27373                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
27374                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27375                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
27376                 TINFO_LIB_SUFFIX="${with_termlib}"
27377         else
27378                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27379                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
27380                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
27381                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
27382         fi
27383
27384         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27385         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
27386         if test "$DFT_LWR_MODEL" = "libtool"; then
27387                 TEST_ARGS="${TEST_DEPS}"
27388                 TEST_ARG2="${TEST_DEP2}"
27389                 TINFO_LDFLAGS="-L${LIB_DIR}"
27390                 TINFO_LIBS="$TEST_ARGS"
27391                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
27392                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
27393         else
27394                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
27395                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
27396                 if test "x$with_term_driver" != xno ; then
27397                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27398                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
27399                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27400                 else
27401                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27402                         TINFO_LIBS="$TEST_ARGS"
27403                 fi
27404                 TINFO_LDFLAGS="-L${LIB_DIR}"
27405                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
27406         fi
27407 else
27408         # the next lines are needed for linking libtic over libncurses
27409         TINFO_NAME=${LIB_NAME}
27410         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
27411         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
27412         if test "x$with_tic_depends" = xyes ; then
27413                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
27414         else
27415                 TICS_LIST="$SHLIB_LIST"
27416         fi
27417
27418         TINFO_LDFLAGS="-L${LIB_DIR}"
27419         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
27420 fi
27421
27422 if test "$DFT_LWR_MODEL" = shared ; then
27423         case $cf_cv_system_name in
27424         (cygwin*|msys*)
27425                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
27426                 TINFO_SUFFIX=.dll
27427                 ;;
27428         esac
27429 fi
27430
27431 if test "x$with_dlsym" = xyes ; then
27432
27433 # remove dl library from $TICS_LIST
27434 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
27435
27436 fi
27437
27438 if test "$DFT_LWR_MODEL" = "libtool"; then
27439         OBJEXT=lo
27440 fi
27441
27442 # needed for Ada95
27443 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
27444
27445 case $DFT_LWR_MODEL in
27446 (normal|debug|profile)
27447
27448 if test "$GCC" = yes ; then
27449         case $cf_cv_system_name in
27450         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
27451                 LDFLAGS_STATIC=
27452                 LDFLAGS_SHARED=
27453                 ;;
27454         (*)     # normally, except when broken
27455                 LDFLAGS_STATIC=-static
27456                 LDFLAGS_SHARED=-dynamic
27457                 ;;
27458         esac
27459 else
27460         case $cf_cv_system_name in
27461         (aix[4-7]*)     # from ld manpage
27462                 LDFLAGS_STATIC=-bstatic
27463                 LDFLAGS_SHARED=-bdynamic
27464                 ;;
27465         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
27466                 # We could also use just "archive" and "shared".
27467                 LDFLAGS_STATIC=-Wl,-a,archive_shared
27468                 LDFLAGS_SHARED=-Wl,-a,shared_archive
27469                 ;;
27470         (irix*)         # from ld manpage IRIX64
27471                 LDFLAGS_STATIC=-Bstatic
27472                 LDFLAGS_SHARED=-Bdynamic
27473                 ;;
27474         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
27475                 # alternative "-oldstyle_liblookup" (not in cc manpage)
27476                 LDFLAGS_STATIC=-noso
27477                 LDFLAGS_SHARED=-so_archive
27478                 ;;
27479         (solaris2*)
27480                 LDFLAGS_STATIC=-Bstatic
27481                 LDFLAGS_SHARED=-Bdynamic
27482                 ;;
27483         esac
27484 fi
27485
27486 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
27487 then
27488         echo "$as_me:27488: checking if linker supports switching between static/dynamic" >&5
27489 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
27490
27491         rm -f libconftest.a
27492         cat >conftest.$ac_ext <<EOF
27493 #line 27493 "configure"
27494 #include <stdio.h>
27495 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
27496 EOF
27497         if { (eval echo "$as_me:27497: \"$ac_compile\"") >&5
27498   (eval $ac_compile) 2>&5
27499   ac_status=$?
27500   echo "$as_me:27500: \$? = $ac_status" >&5
27501   (exit $ac_status); } ; then
27502                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
27503                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
27504         fi
27505         rm -f conftest.*
27506
27507         cf_save_LIBS="$LIBS"
27508
27509         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
27510         cat >conftest.$ac_ext <<_ACEOF
27511 #line 27511 "configure"
27512 #include "confdefs.h"
27513
27514 #line 27514 "configure"
27515 #include <stdio.h>
27516 int cf_ldflags_static(FILE *fp);
27517
27518 int
27519 main (void)
27520 {
27521
27522         return cf_ldflags_static(stdin);
27523
27524   ;
27525   return 0;
27526 }
27527 _ACEOF
27528 rm -f conftest.$ac_objext conftest$ac_exeext
27529 if { (eval echo "$as_me:27529: \"$ac_link\"") >&5
27530   (eval $ac_link) 2>&5
27531   ac_status=$?
27532   echo "$as_me:27532: \$? = $ac_status" >&5
27533   (exit $ac_status); } &&
27534          { ac_try='test -s conftest$ac_exeext'
27535   { (eval echo "$as_me:27535: \"$ac_try\"") >&5
27536   (eval $ac_try) 2>&5
27537   ac_status=$?
27538   echo "$as_me:27538: \$? = $ac_status" >&5
27539   (exit $ac_status); }; }; then
27540
27541         # some linkers simply ignore the -dynamic
27542         case x`file conftest$ac_exeext 2>/dev/null` in
27543         (*static*)
27544                 cf_ldflags_static=no
27545                 ;;
27546         (*)
27547                 cf_ldflags_static=yes
27548                 ;;
27549         esac
27550
27551 else
27552   echo "$as_me: failed program was:" >&5
27553 cat conftest.$ac_ext >&5
27554 cf_ldflags_static=no
27555 fi
27556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27557
27558         rm -f libconftest.*
27559         LIBS="$cf_save_LIBS"
27560
27561         echo "$as_me:27561: result: $cf_ldflags_static" >&5
27562 echo "${ECHO_T}$cf_ldflags_static" >&6
27563
27564         if test $cf_ldflags_static != yes
27565         then
27566                 LDFLAGS_STATIC=
27567                 LDFLAGS_SHARED=
27568         fi
27569 else
27570         LDFLAGS_STATIC=
27571         LDFLAGS_SHARED=
27572 fi
27573
27574         ;;
27575 esac
27576
27577 echo "$as_me:27577: checking where we will install curses.h" >&5
27578 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
27579
27580 includesubdir=
27581 if test "$with_overwrite" = no && \
27582  ( test "x$includedir" = 'x${prefix}/include' || \
27583    test "x$includedir" = "x${prefix}/include" )
27584 then
27585         includesubdir="/ncurses${USE_LIB_SUFFIX}"
27586 fi
27587 echo "$as_me:27587: result: ${includedir}${includesubdir}" >&5
27588 echo "${ECHO_T}${includedir}${includesubdir}" >&6
27589
27590 ### Resolve a conflict between normal and wide-curses by forcing applications
27591 ### that will need libutf8 to add it to their configure script.
27592 if test "$with_overwrite" != no ; then
27593 if test "$NCURSES_LIBUTF8" = 1 ; then
27594         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
27595         { echo "$as_me:27595: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
27596 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
27597 fi
27598 fi
27599 WITH_OVERWRITE=$with_overwrite
27600
27601 ### At least on MinGW a shared library build without libtool
27602 ### requires adding the additional libs to the link list.
27603 case $cf_cv_system_name in
27604 (*mingw32*|*mingw64*)
27605         if test "$DFT_LWR_MODEL" != "libtool"; then
27606            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
27607         fi
27608         ;;
27609 *)      ;;
27610 esac
27611
27612 # used to separate tack out of the tree
27613 NCURSES_TREE=
27614
27615 ### predefined stuff for the test programs
27616
27617 cat >>confdefs.h <<\EOF
27618 #define HAVE_SLK_COLOR 1
27619 EOF
27620
27621 # pkgsrc uses these
27622
27623 echo "$as_me:27623: checking for desired basename for form library" >&5
27624 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
27625
27626 # Check whether --with-form-libname or --without-form-libname was given.
27627 if test "${with_form_libname+set}" = set; then
27628   withval="$with_form_libname"
27629   with_lib_basename=$withval
27630 else
27631   with_lib_basename=form
27632 fi;
27633 FORM_NAME="$with_lib_basename"
27634
27635 case "x$FORM_NAME" in
27636 (x|xno|xnone|xyes)
27637         FORM_NAME=form
27638         ;;
27639 (*)
27640         ;;
27641 esac
27642
27643 echo "$as_me:27643: result: $FORM_NAME" >&5
27644 echo "${ECHO_T}$FORM_NAME" >&6
27645
27646 echo "$as_me:27646: checking for desired basename for menu library" >&5
27647 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
27648
27649 # Check whether --with-menu-libname or --without-menu-libname was given.
27650 if test "${with_menu_libname+set}" = set; then
27651   withval="$with_menu_libname"
27652   with_lib_basename=$withval
27653 else
27654   with_lib_basename=menu
27655 fi;
27656 MENU_NAME="$with_lib_basename"
27657
27658 case "x$MENU_NAME" in
27659 (x|xno|xnone|xyes)
27660         MENU_NAME=menu
27661         ;;
27662 (*)
27663         ;;
27664 esac
27665
27666 echo "$as_me:27666: result: $MENU_NAME" >&5
27667 echo "${ECHO_T}$MENU_NAME" >&6
27668
27669 echo "$as_me:27669: checking for desired basename for panel library" >&5
27670 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
27671
27672 # Check whether --with-panel-libname or --without-panel-libname was given.
27673 if test "${with_panel_libname+set}" = set; then
27674   withval="$with_panel_libname"
27675   with_lib_basename=$withval
27676 else
27677   with_lib_basename=panel
27678 fi;
27679 PANEL_NAME="$with_lib_basename"
27680
27681 case "x$PANEL_NAME" in
27682 (x|xno|xnone|xyes)
27683         PANEL_NAME=panel
27684         ;;
27685 (*)
27686         ;;
27687 esac
27688
27689 echo "$as_me:27689: result: $PANEL_NAME" >&5
27690 echo "${ECHO_T}$PANEL_NAME" >&6
27691
27692 echo "$as_me:27692: checking for desired basename for cxx library" >&5
27693 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
27694
27695 # Check whether --with-cxx-libname or --without-cxx-libname was given.
27696 if test "${with_cxx_libname+set}" = set; then
27697   withval="$with_cxx_libname"
27698   with_lib_basename=$withval
27699 else
27700   with_lib_basename=ncurses++
27701 fi;
27702 CXX_NAME="$with_lib_basename"
27703
27704 case "x$CXX_NAME" in
27705 (x|xno|xnone|xyes)
27706         CXX_NAME=ncurses++
27707         ;;
27708 (*)
27709         ;;
27710 esac
27711
27712 echo "$as_me:27712: result: $CXX_NAME" >&5
27713 echo "${ECHO_T}$CXX_NAME" >&6
27714
27715 ### Construct the list of subdirectories for which we'll customize makefiles
27716 ### with the appropriate compile-rules.
27717
27718 echo "$as_me:27718: checking for src modules" >&5
27719 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
27720
27721 # dependencies and linker-arguments for test-programs
27722 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
27723 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
27724 if test "$DFT_LWR_MODEL" = "libtool"; then
27725         TEST_ARGS="${TEST_DEPS}"
27726         TEST_ARG2="${TEST_DEP2}"
27727 else
27728         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
27729         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
27730 fi
27731
27732 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
27733 cf_cv_src_modules=
27734 for cf_dir in $modules_to_build
27735 do
27736         if test -f $srcdir/$cf_dir/modules; then
27737
27738                 # We may/may not have tack in the distribution, though the
27739                 # makefile is.
27740                 if test $cf_dir = tack ; then
27741                         if test "x$cf_with_tack" != "xyes"; then
27742                                 continue
27743                         fi
27744                 fi
27745
27746                 if test -z "$cf_cv_src_modules"; then
27747                         cf_cv_src_modules=$cf_dir
27748                 else
27749                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
27750                 fi
27751
27752                 # Make the ncurses_cfg.h file record the library interface files as
27753                 # well.  These are header files that are the same name as their
27754                 # directory.  Ncurses is the only library that does not follow
27755                 # that pattern.
27756                 if test $cf_dir = tack ; then
27757                         continue
27758                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
27759
27760 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27761
27762                         cat >>confdefs.h <<EOF
27763 #define HAVE_${cf_have_include}_H 1
27764 EOF
27765
27766                         cat >>confdefs.h <<EOF
27767 #define HAVE_LIB${cf_have_include} 1
27768 EOF
27769
27770 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27771
27772 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
27773
27774                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
27775                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
27776                         if test "$DFT_LWR_MODEL" = "libtool"; then
27777                                 TEST_ARGS="${TEST_DEPS}"
27778                                 TEST_ARG2="${TEST_DEP2}"
27779                         else
27780                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
27781                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
27782                         fi
27783                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
27784                 fi
27785         fi
27786 done
27787 echo "$as_me:27787: result: $cf_cv_src_modules" >&5
27788 echo "${ECHO_T}$cf_cv_src_modules" >&6
27789
27790 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
27791 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
27792
27793 SRC_SUBDIRS=
27794 if test "x$cf_with_manpages" != xno ; then
27795         SRC_SUBDIRS="$SRC_SUBDIRS man"
27796 fi
27797 SRC_SUBDIRS="$SRC_SUBDIRS include"
27798 for cf_dir in $cf_cv_src_modules
27799 do
27800         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
27801 done
27802 if test "x$cf_with_tests" != "xno" ; then
27803         SRC_SUBDIRS="$SRC_SUBDIRS test"
27804 fi
27805 # always make this, to install the ncurses-config script
27806 SRC_SUBDIRS="$SRC_SUBDIRS misc"
27807 if test "$cf_with_cxx_binding" != no; then
27808         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
27809         SRC_SUBDIRS="$SRC_SUBDIRS c++"
27810 fi
27811
27812 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
27813 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
27814
27815 ADA_SUBDIRS=
27816 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
27817         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
27818         ADA_SUBDIRS="gen src"
27819         if test "x$cf_with_tests" != "xno" ; then
27820                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
27821         fi
27822 fi
27823
27824 SUB_MAKEFILES=
27825 for cf_dir in $SRC_SUBDIRS
27826 do
27827         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
27828 done
27829
27830 if test -n "$ADA_SUBDIRS"; then
27831         for cf_dir in $ADA_SUBDIRS
27832         do
27833                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
27834         done
27835
27836 fi
27837
27838 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
27839    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
27840    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
27841    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
27842 fi
27843
27844 DIRS_TO_MAKE="lib"
27845 for cf_item in $cf_list_models
27846 do
27847
27848         case $cf_item in
27849         (libtool) cf_subdir='obj_lo'  ;;
27850         (normal)  cf_subdir='objects' ;;
27851         (debug)   cf_subdir='obj_g' ;;
27852         (profile) cf_subdir='obj_p' ;;
27853         (shared)
27854                 case $cf_cv_system_name in
27855                 (cygwin|msys)
27856                         cf_subdir='objects' ;;
27857                 (*)
27858                         cf_subdir='obj_s' ;;
27859                 esac
27860         esac
27861
27862         for cf_item2 in $DIRS_TO_MAKE
27863         do
27864                 test $cf_item2 = $cf_subdir && break
27865         done
27866         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
27867 done
27868 for cf_dir in $DIRS_TO_MAKE
27869 do
27870         test ! -d $cf_dir && mkdir $cf_dir
27871 done
27872
27873 # symbols that differ when compiling Ada95 by itself.
27874 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
27875
27876 # values to use as strings
27877
27878 cat >>confdefs.h <<EOF
27879 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
27880 EOF
27881
27882 cat >>confdefs.h <<EOF
27883 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
27884 EOF
27885
27886 ### Define substitutions for header files to avoid name-pollution
27887
27888 if test "x$cf_cv_have_tcgetattr" = xyes ; then
27889         HAVE_TCGETATTR=1
27890 else
27891         HAVE_TCGETATTR=0
27892 fi
27893
27894 if test "x$ac_cv_header_stdint_h" = xyes ; then
27895         HAVE_STDINT_H=1
27896 else
27897         HAVE_STDINT_H=0
27898 fi
27899
27900 if test "x$ac_cv_header_termio_h" = xyes ; then
27901         HAVE_TERMIO_H=1
27902 else
27903         HAVE_TERMIO_H=0
27904 fi
27905
27906 if test "x$ac_cv_header_termios_h" = xyes ; then
27907         HAVE_TERMIOS_H=1
27908 else
27909         HAVE_TERMIOS_H=0
27910 fi
27911
27912 ################################################################################
27913 test "x$use_database" = xyes && \
27914 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
27915
27916 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
27917 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
27918
27919 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
27920 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
27921 fi
27922
27923 if test "x$cf_with_tests" != xno ; then
27924         MAKE_TESTS=
27925 else
27926         MAKE_TESTS="#"
27927 fi
27928
27929 ADAHTML_DIR=../../doc/html/ada
27930
27931 # workaround for OS/2 (20151017)
27932 case $cf_cv_system_name in
27933 (os2*)
27934         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
27935         ;;
27936 (*)
27937         LIBTOOL_OPTS_CXX=
27938         ;;
27939 esac
27940
27941 # workaround for g++ versus Solaris (20131116)
27942 case $cf_cv_system_name in
27943 (solaris2*)
27944         case "x$CPPFLAGS" in
27945         (*-D_XOPEN_SOURCE_EXTENDED*)
27946                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
27947
27948 echo "${as_me:-configure}:27948: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
27949
27950                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
27951                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
27952                 ;;
27953         esac
27954         ;;
27955 esac
27956
27957 # Help to automatically enable the extended curses features when using either
27958 # the *-config or the ".pc" files by adding defines.
27959 echo "$as_me:27959: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
27960 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
27961 PKG_CFLAGS=
27962 for cf_loop1 in $CPPFLAGS_after_XOPEN
27963 do
27964         cf_found=no
27965         for cf_loop2 in $CPPFLAGS_before_XOPEN
27966         do
27967                 if test "x$cf_loop1" = "x$cf_loop2"
27968                 then
27969                         cf_found=yes
27970                         break
27971                 fi
27972         done
27973         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
27974 done
27975 echo "$as_me:27975: result: $PKG_CFLAGS" >&5
27976 echo "${ECHO_T}$PKG_CFLAGS" >&6
27977
27978 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
27979 case "x$NCURSES_OSPEED" in
27980 (*short*)
27981         cf_compatible=1
27982         ;;
27983 (*)
27984         cf_compatible=0
27985         ;;
27986 esac
27987
27988 cat >>confdefs.h <<EOF
27989 #define NCURSES_OSPEED_COMPAT $cf_compatible
27990 EOF
27991
27992 case "x$cf_cv_typeof_chtype" in
27993 (xshort|xint|xlong)
27994         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
27995         ;;
27996 esac
27997
27998 case "x$cf_cv_typeof_mmask_t" in
27999 (xshort|xint|xlong)
28000         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28001         ;;
28002 esac
28003
28004 # substitute into misc/Makefile to suppress
28005 # (un)install.data from the
28006 # (un)install rules.
28007 if test "x$cf_with_db_install" = "xno"; then
28008         MISC_INSTALL_DATA=
28009         MISC_UNINSTALL_DATA=
28010 else
28011         MISC_INSTALL_DATA=install.data
28012         MISC_UNINSTALL_DATA=uninstall.data
28013 fi
28014
28015 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28016         MAKE_DATABASE="#"
28017 else
28018         MAKE_DATABASE="$MAKE_TERMINFO"
28019 fi
28020
28021 if test -n "$PACKAGE"
28022 then
28023         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28024         export PACKAGE
28025         echo "package: $PACKAGE"
28026 fi
28027
28028 UNALTERED_SYMS=
28029 cf_filter_syms=no
28030
28031 if test -n "$RESULTING_SYMS"
28032 then
28033         cf_filter_syms=$cf_dft_filter_syms
28034         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28035
28036 echo "${as_me:-configure}:28036: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28037
28038 fi
28039
28040 if test "x$WILDCARD_SYMS" = xno
28041 then
28042         cf_filter_syms=yes
28043 fi
28044
28045 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28046
28047 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28048 if test $cf_filter_syms = yes
28049 then
28050         RESULTING_SYMS=resulting.map
28051 fi
28052
28053 if test "x$cross_compiling" = xyes ; then
28054         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28055         CHECK_BUILD="#"
28056 else
28057         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28058         CHECK_BUILD=
28059 fi
28060
28061 # This is used for the *-config script and *.pc data files.
28062
28063 echo "$as_me:28063: checking for linker search path" >&5
28064 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28065 if test "${cf_cv_ld_searchpath+set}" = set; then
28066   echo $ECHO_N "(cached) $ECHO_C" >&6
28067 else
28068
28069 if test "$cross_compiling" != yes ; then
28070
28071 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28072 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28073
28074 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28075 # update the cache, which makes it run faster.
28076 test -z "$cf_pathlist" && \
28077         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
28078
28079 test -z "$cf_pathlist" &&
28080         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
28081
28082 # This works with OpenBSD 6.5, which lists only filenames
28083 test -z "$cf_pathlist" &&
28084         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28085
28086 if test -z "$cf_pathlist"
28087 then
28088         # dyld default path with MacOS
28089         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28090         then
28091                 # do this to bypass check
28092                 cf_cv_ld_searchpath='$HOME/lib'
28093                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28094         fi
28095 fi
28096
28097 if test -z "$cf_pathlist"
28098 then
28099         # Solaris is hardcoded
28100         if test -d /opt/SUNWspro/lib
28101         then
28102                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
28103         elif test -d /usr/ccs/lib
28104         then
28105                 cf_pathlist="/usr/ccs/lib /usr/lib"
28106         fi
28107 fi
28108
28109 fi
28110
28111 # If nothing else, assume it is conventional
28112 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28113
28114 # Finally, check that this is only directories
28115 for cf_path in $0 $cf_pathlist
28116 do
28117         if test -d "$cf_path"; then
28118                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28119                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28120         fi
28121 done
28122
28123 # Ensure that it is nonempty
28124 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28125
28126 fi
28127 echo "$as_me:28127: result: $cf_cv_ld_searchpath" >&5
28128 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28129
28130 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28131
28132 cat >>confdefs.h <<\EOF
28133 #define HAVE_CURSES_DATA_BOOLNAMES 1
28134 EOF
28135
28136 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"
28137 ac_config_commands="$ac_config_commands default"
28138 cat >confcache <<\_ACEOF
28139 # This file is a shell script that caches the results of configure
28140 # tests run on this system so they can be shared between configure
28141 # scripts and configure runs, see configure's option --config-cache.
28142 # It is not useful on other systems.  If it contains results you don't
28143 # want to keep, you may remove or edit it.
28144 #
28145 # config.status only pays attention to the cache file if you give it
28146 # the --recheck option to rerun configure.
28147 #
28148 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28149 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28150 # following values.
28151
28152 _ACEOF
28153
28154 # The following way of writing the cache mishandles newlines in values,
28155 # but we know of no workaround that is simple, portable, and efficient.
28156 # So, don't put newlines in cache variables' values.
28157 # Ultrix sh set writes to stderr and can't be redirected directly,
28158 # and sets the high bit in the cache file unless we assign to the vars.
28159 {
28160   (set) 2>&1 |
28161     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28162     *ac_space=\ *)
28163       # `set' does not quote correctly, so add quotes (double-quote
28164       # substitution turns \\\\ into \\, and sed turns \\ into \).
28165       sed -n \
28166         "s/'/'\\\\''/g;
28167           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28168       ;;
28169     *)
28170       # `set' quotes correctly as required by POSIX, so do not add quotes.
28171       sed -n \
28172         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28173       ;;
28174     esac;
28175 } |
28176   sed '
28177      t clear
28178      : clear
28179      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28180      t end
28181      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28182      : end' >>confcache
28183 if cmp -s $cache_file confcache; then :; else
28184   if test -w $cache_file; then
28185     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28186     cat confcache >$cache_file
28187   else
28188     echo "not updating unwritable cache $cache_file"
28189   fi
28190 fi
28191 rm -f confcache
28192
28193 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28194 # Let make expand exec_prefix.
28195 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28196
28197 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28198 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28199 # trailing colons and then remove the whole line if VPATH becomes empty
28200 # (actually we leave an empty line to preserve line numbers).
28201 if test "x$srcdir" = x.; then
28202   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28203 s/:*\$(srcdir):*/:/;
28204 s/:*\${srcdir}:*/:/;
28205 s/:*@srcdir@:*/:/;
28206 s/^\([^=]*=[    ]*\):*/\1/;
28207 s/:*$//;
28208 s/^[^=]*=[      ]*$//;
28209 }'
28210 fi
28211
28212 DEFS=-DHAVE_CONFIG_H
28213
28214 : ${CONFIG_STATUS=./config.status}
28215 ac_clean_files_save=$ac_clean_files
28216 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28217 { echo "$as_me:28217: creating $CONFIG_STATUS" >&5
28218 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28219 cat >$CONFIG_STATUS <<_ACEOF
28220 #! $SHELL
28221 # Generated automatically by configure.
28222 # Run this file to recreate the current configuration.
28223 # Compiler output produced by configure, useful for debugging
28224 # configure, is in config.log if it exists.
28225
28226 debug=false
28227 SHELL=\${CONFIG_SHELL-$SHELL}
28228 ac_cs_invocation="\$0 \$@"
28229
28230 CLICOLOR_FORCE= GREP_OPTIONS=
28231 unset CLICOLOR_FORCE GREP_OPTIONS
28232 _ACEOF
28233
28234 cat >>$CONFIG_STATUS <<\_ACEOF
28235 # Be Bourne compatible
28236 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28237   emulate sh
28238   NULLCMD=:
28239 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28240   set -o posix
28241 fi
28242
28243 # Name of the executable.
28244 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28245
28246 if expr a : '\(a\)' >/dev/null 2>&1; then
28247   as_expr=expr
28248 else
28249   as_expr=false
28250 fi
28251
28252 rm -f conf$$ conf$$.exe conf$$.file
28253 echo >conf$$.file
28254 if ln -s conf$$.file conf$$ 2>/dev/null; then
28255   # We could just check for DJGPP; but this test a) works b) is more generic
28256   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28257   if test -f conf$$.exe; then
28258     # Don't use ln at all; we don't have any links
28259     as_ln_s='cp -p'
28260   else
28261     as_ln_s='ln -s'
28262   fi
28263 elif ln conf$$.file conf$$ 2>/dev/null; then
28264   as_ln_s=ln
28265 else
28266   as_ln_s='cp -p'
28267 fi
28268 rm -f conf$$ conf$$.exe conf$$.file
28269
28270 as_executable_p="test -f"
28271
28272 # Support unset when possible.
28273 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28274   as_unset=unset
28275 else
28276   as_unset=false
28277 fi
28278
28279 # NLS nuisances.
28280 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28281 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28282 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28283 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28284 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28285 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28286 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28287 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28288
28289 # IFS
28290 # We need space, tab and new line, in precisely that order.
28291 as_nl='
28292 '
28293 IFS="   $as_nl"
28294
28295 # CDPATH.
28296 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28297
28298 exec 6>&1
28299
28300 _ACEOF
28301
28302 # Files that config.status was made for.
28303 if test -n "$ac_config_files"; then
28304   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
28305 fi
28306
28307 if test -n "$ac_config_headers"; then
28308   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
28309 fi
28310
28311 if test -n "$ac_config_links"; then
28312   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
28313 fi
28314
28315 if test -n "$ac_config_commands"; then
28316   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
28317 fi
28318
28319 cat >>$CONFIG_STATUS <<\EOF
28320
28321 ac_cs_usage="\
28322 \`$as_me' instantiates files from templates according to the
28323 current configuration.
28324
28325 Usage: $0 [OPTIONS] [FILE]...
28326
28327   -h, --help       print this help, then exit
28328   -V, --version    print version number, then exit
28329   -d, --debug      don't remove temporary files
28330       --recheck    update $as_me by reconfiguring in the same conditions
28331   --file=FILE[:TEMPLATE]
28332                    instantiate the configuration file FILE
28333   --header=FILE[:TEMPLATE]
28334                    instantiate the configuration header FILE
28335
28336 Configuration files:
28337 $config_files
28338
28339 Configuration headers:
28340 $config_headers
28341
28342 Configuration commands:
28343 $config_commands
28344
28345 Report bugs to <dickey@invisible-island.net>."
28346 EOF
28347
28348 cat >>$CONFIG_STATUS <<EOF
28349 ac_cs_version="\\
28350 config.status
28351 configured by $0, generated by GNU Autoconf 2.52.20200802,
28352   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
28353
28354 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
28355 Free Software Foundation, Inc.
28356 This config.status script is free software; the Free Software Foundation
28357 gives unlimited permission to copy, distribute and modify it."
28358 srcdir=$srcdir
28359 INSTALL="$INSTALL"
28360 EOF
28361
28362 cat >>$CONFIG_STATUS <<\EOF
28363 # If no file are specified by the user, then we need to provide default
28364 # value.  By we need to know if files were specified by the user.
28365 ac_need_defaults=:
28366 while test $# != 0
28367 do
28368   case $1 in
28369   --*=*)
28370     ac_option=`expr "x$1" : 'x\([^=]*\)='`
28371     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
28372     shift
28373     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
28374     shift
28375     ;;
28376   -*);;
28377   *) # This is not an option, so the user has probably given explicit
28378      # arguments.
28379      ac_need_defaults=false;;
28380   esac
28381
28382   case $1 in
28383   # Handling of the options.
28384 EOF
28385 cat >>$CONFIG_STATUS <<EOF
28386   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28387     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
28388     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
28389 EOF
28390 cat >>$CONFIG_STATUS <<\EOF
28391   --version | --vers* | -V )
28392     echo "$ac_cs_version"; exit 0 ;;
28393   --he | --h)
28394     # Conflict between --help and --header
28395     { { echo "$as_me:28395: error: ambiguous option: $1
28396 Try \`$0 --help' for more information." >&5
28397 echo "$as_me: error: ambiguous option: $1
28398 Try \`$0 --help' for more information." >&2;}
28399    { (exit 1); exit 1; }; };;
28400   --help | --hel | -h )
28401     echo "$ac_cs_usage"; exit 0 ;;
28402   --debug | --d* | -d )
28403     debug=: ;;
28404   --file | --fil | --fi | --f )
28405     shift
28406     CONFIG_FILES="$CONFIG_FILES $1"
28407     ac_need_defaults=false;;
28408   --header | --heade | --head | --hea )
28409     shift
28410     CONFIG_HEADERS="$CONFIG_HEADERS $1"
28411     ac_need_defaults=false;;
28412
28413   # This is an error.
28414   -*) { { echo "$as_me:28414: error: unrecognized option: $1
28415 Try \`$0 --help' for more information." >&5
28416 echo "$as_me: error: unrecognized option: $1
28417 Try \`$0 --help' for more information." >&2;}
28418    { (exit 1); exit 1; }; } ;;
28419
28420   *) ac_config_targets="$ac_config_targets $1" ;;
28421
28422   esac
28423   shift
28424 done
28425
28426 exec 5>>config.log
28427 cat >&5 << _ACEOF
28428
28429 ## ----------------------- ##
28430 ## Running config.status.  ##
28431 ## ----------------------- ##
28432
28433 This file was extended by $as_me 2.52.20200802, executed with
28434   CONFIG_FILES    = $CONFIG_FILES
28435   CONFIG_HEADERS  = $CONFIG_HEADERS
28436   CONFIG_LINKS    = $CONFIG_LINKS
28437   CONFIG_COMMANDS = $CONFIG_COMMANDS
28438   > $ac_cs_invocation
28439 on `(hostname || uname -n) 2>/dev/null | sed 1q`
28440
28441 _ACEOF
28442 EOF
28443
28444 cat >>$CONFIG_STATUS <<EOF
28445 #
28446 # INIT-COMMANDS section.
28447 #
28448
28449 ### Special initialization commands, used to pass information from the
28450 ### configuration-run into config.status
28451
28452 ALTERNATE_SYMS="$ALTERNATE_SYMS"
28453 AWK="$AWK"
28454 CXX_NAME="$CXX_NAME"
28455 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
28456 DFT_LWR_MODEL="$DFT_LWR_MODEL"
28457 ECHO_LD="$ECHO_LD"
28458 EXTRA_SUFFIX="$EXTRA_SUFFIX"
28459 FORM_NAME="$FORM_NAME"
28460 LDCONFIG="$LDCONFIG"
28461 LIBTOOL_VERSION="$LIBTOOL_VERSION"
28462 LIB_NAME="$LIB_NAME"
28463 LIB_PREFIX="$LIB_PREFIX"
28464 LIB_SUBSETS="$LIB_SUBSETS"
28465 LIB_SUFFIX="$LIB_SUFFIX"
28466 LIB_TRACING="$LIB_TRACING"
28467 LN_S="$LN_S"
28468 MAKE_TERMINFO="$MAKE_TERMINFO"
28469 MENU_NAME="$MENU_NAME"
28470 NCURSES_MAJOR="$NCURSES_MAJOR"
28471 NCURSES_MINOR="$NCURSES_MINOR"
28472 NCURSES_OSPEED="$NCURSES_OSPEED"
28473 NCURSES_PATCH="$NCURSES_PATCH"
28474 PANEL_NAME="$PANEL_NAME"
28475 SRC_SUBDIRS="$SRC_SUBDIRS"
28476 TERMINFO="$TERMINFO"
28477 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
28478 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
28479 TICS_NAME="$TICS_NAME"
28480 TICS_SUFFIX="$TICS_SUFFIX"
28481 TIC_PATH="$TIC_PATH"
28482 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
28483 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
28484 TINFO_NAME="$TINFO_NAME"
28485 TINFO_SUFFIX="$TINFO_SUFFIX"
28486 UNALTERED_SYMS="$UNALTERED_SYMS"
28487 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
28488 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
28489 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
28490 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
28491 WILDCARD_SYMS="$WILDCARD_SYMS"
28492 WITH_CURSES_H="$with_curses_h"
28493 WITH_ECHO="${enable_echo:=yes}"
28494 WITH_OVERWRITE="$with_overwrite"
28495 cf_LIST_MODELS="$cf_list_models"
28496 cf_cv_abi_version="$cf_cv_abi_version"
28497 cf_cv_do_relink="$cf_cv_do_relink"
28498 cf_cv_do_reranlib="$cf_cv_do_reranlib"
28499 cf_cv_do_symlinks="$cf_cv_do_symlinks"
28500 cf_cv_enable_lp64="$cf_cv_enable_lp64"
28501 cf_cv_enable_opaque="$cf_cv_enable_opaque"
28502 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
28503 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
28504 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
28505 cf_cv_rel_version="$cf_cv_rel_version"
28506 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
28507 cf_cv_shared_soname='$cf_cv_shared_soname'
28508 cf_cv_shlib_version="$cf_cv_shlib_version"
28509 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
28510 cf_cv_system_name="$cf_cv_system_name"
28511 cf_cv_term_driver="$with_term_driver"
28512 cf_with_ada="$cf_with_ada"
28513 cf_with_cxx_binding="$cf_with_cxx_binding"
28514 cf_with_db_install="$cf_with_db_install"
28515 cf_with_manpages="$cf_with_manpages"
28516 cf_with_tests="$cf_with_tests"
28517 host="$host"
28518 target="$target"
28519 with_shared_cxx="$with_shared_cxx"
28520
28521 EOF
28522
28523 cat >>$CONFIG_STATUS <<\EOF
28524 for ac_config_target in $ac_config_targets
28525 do
28526   case "$ac_config_target" in
28527   # Handling of arguments.
28528   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
28529   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
28530   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
28531   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
28532   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
28533   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
28534   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
28535   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
28536   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
28537   *) { { echo "$as_me:28537: error: invalid argument: $ac_config_target" >&5
28538 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
28539    { (exit 1); exit 1; }; };;
28540   esac
28541 done
28542
28543 # If the user did not use the arguments to specify the items to instantiate,
28544 # then the envvar interface is used.  Set only those that are not.
28545 # We use the long form for the default assignment because of an extremely
28546 # bizarre bug on SunOS 4.1.3.
28547 if $ac_need_defaults; then
28548   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28549   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28550   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
28551 fi
28552
28553 # Create a temporary directory, and hook for its removal unless debugging.
28554 $debug ||
28555 {
28556   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
28557   trap '{ (exit 1); exit 1; }' 1 2 13 15
28558 }
28559
28560 # Create a (secure) tmp directory for tmp files.
28561 : ${TMPDIR=/tmp}
28562 {
28563   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
28564   test -n "$tmp" && test -d "$tmp"
28565 }  ||
28566 {
28567   tmp=$TMPDIR/cs$$-$RANDOM
28568   (umask 077 && mkdir $tmp)
28569 } ||
28570 {
28571    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
28572    { (exit 1); exit 1; }
28573 }
28574
28575 EOF
28576
28577 cat >>$CONFIG_STATUS <<EOF
28578
28579 #
28580 # CONFIG_FILES section.
28581 #
28582
28583 # No need to generate the scripts if there are no CONFIG_FILES.
28584 # This happens for instance when ./config.status config.h
28585 if test -n "\$CONFIG_FILES"; then
28586   # Protect against being on the right side of a sed subst in config.status.
28587   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
28588    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
28589 s,@SHELL@,$SHELL,;t t
28590 s,@exec_prefix@,$exec_prefix,;t t
28591 s,@prefix@,$prefix,;t t
28592 s,@program_transform_name@,$program_transform_name,;t t
28593 s,@bindir@,$bindir,;t t
28594 s,@sbindir@,$sbindir,;t t
28595 s,@libexecdir@,$libexecdir,;t t
28596 s,@datarootdir@,$datarootdir,;t t
28597 s,@datadir@,$datadir,;t t
28598 s,@sysconfdir@,$sysconfdir,;t t
28599 s,@sharedstatedir@,$sharedstatedir,;t t
28600 s,@localstatedir@,$localstatedir,;t t
28601 s,@runstatedir@,$runstatedir,;t t
28602 s,@libdir@,$libdir,;t t
28603 s,@includedir@,$includedir,;t t
28604 s,@oldincludedir@,$oldincludedir,;t t
28605 s,@infodir@,$infodir,;t t
28606 s,@mandir@,$mandir,;t t
28607 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
28608 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
28609 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
28610 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
28611 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
28612 s,@build_alias@,$build_alias,;t t
28613 s,@host_alias@,$host_alias,;t t
28614 s,@target_alias@,$target_alias,;t t
28615 s,@ECHO_C@,$ECHO_C,;t t
28616 s,@ECHO_N@,$ECHO_N,;t t
28617 s,@ECHO_T@,$ECHO_T,;t t
28618 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
28619 s,@DEFS@,$DEFS,;t t
28620 s,@LIBS@,$LIBS,;t t
28621 s,@top_builddir@,$top_builddir,;t t
28622 s,@EGREP@,$EGREP,;t t
28623 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
28624 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
28625 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
28626 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
28627 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
28628 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
28629 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
28630 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
28631 s,@VERSION@,$VERSION,;t t
28632 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
28633 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
28634 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
28635 s,@PACKAGE@,$PACKAGE,;t t
28636 s,@build@,$build,;t t
28637 s,@build_cpu@,$build_cpu,;t t
28638 s,@build_vendor@,$build_vendor,;t t
28639 s,@build_os@,$build_os,;t t
28640 s,@host@,$host,;t t
28641 s,@host_cpu@,$host_cpu,;t t
28642 s,@host_vendor@,$host_vendor,;t t
28643 s,@host_os@,$host_os,;t t
28644 s,@target@,$target,;t t
28645 s,@target_cpu@,$target_cpu,;t t
28646 s,@target_vendor@,$target_vendor,;t t
28647 s,@target_os@,$target_os,;t t
28648 s,@CC@,$CC,;t t
28649 s,@CFLAGS@,$CFLAGS,;t t
28650 s,@LDFLAGS@,$LDFLAGS,;t t
28651 s,@CPPFLAGS@,$CPPFLAGS,;t t
28652 s,@ac_ct_CC@,$ac_ct_CC,;t t
28653 s,@EXEEXT@,$EXEEXT,;t t
28654 s,@OBJEXT@,$OBJEXT,;t t
28655 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
28656 s,@CPP@,$CPP,;t t
28657 s,@LDCONFIG@,$LDCONFIG,;t t
28658 s,@CXX@,$CXX,;t t
28659 s,@CXXFLAGS@,$CXXFLAGS,;t t
28660 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
28661 s,@AWK@,$AWK,;t t
28662 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
28663 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
28664 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
28665 s,@LINT@,$LINT,;t t
28666 s,@LINT_OPTS@,$LINT_OPTS,;t t
28667 s,@LN_S@,$LN_S,;t t
28668 s,@cf_config_suffix@,$cf_config_suffix,;t t
28669 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
28670 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
28671 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
28672 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
28673 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
28674 s,@SET_MAKE@,$SET_MAKE,;t t
28675 s,@CTAGS@,$CTAGS,;t t
28676 s,@ETAGS@,$ETAGS,;t t
28677 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
28678 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
28679 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
28680 s,@RANLIB@,$RANLIB,;t t
28681 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
28682 s,@LD@,$LD,;t t
28683 s,@ac_ct_LD@,$ac_ct_LD,;t t
28684 s,@AR@,$AR,;t t
28685 s,@ac_ct_AR@,$ac_ct_AR,;t t
28686 s,@NM@,$NM,;t t
28687 s,@ac_ct_NM@,$ac_ct_NM,;t t
28688 s,@ARFLAGS@,$ARFLAGS,;t t
28689 s,@DESTDIR@,$DESTDIR,;t t
28690 s,@BUILD_CC@,$BUILD_CC,;t t
28691 s,@BUILD_CPP@,$BUILD_CPP,;t t
28692 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
28693 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
28694 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
28695 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
28696 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
28697 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
28698 s,@cf_list_models@,$cf_list_models,;t t
28699 s,@ABI_VERSION@,$ABI_VERSION,;t t
28700 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
28701 s,@LIBTOOL@,$LIBTOOL,;t t
28702 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
28703 s,@LT_UNDEF@,$LT_UNDEF,;t t
28704 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
28705 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
28706 s,@LIB_CREATE@,$LIB_CREATE,;t t
28707 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
28708 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
28709 s,@LIB_PREP@,$LIB_PREP,;t t
28710 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
28711 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
28712 s,@LIB_LINK@,$LIB_LINK,;t t
28713 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
28714 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
28715 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
28716 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
28717 s,@TICS_NAME@,$TICS_NAME,;t t
28718 s,@TINFO_NAME@,$TINFO_NAME,;t t
28719 s,@LIB_NAME@,$LIB_NAME,;t t
28720 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
28721 s,@CC_G_OPT@,$CC_G_OPT,;t t
28722 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
28723 s,@LD_MODEL@,$LD_MODEL,;t t
28724 s,@shlibdir@,$shlibdir,;t t
28725 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
28726 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
28727 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
28728 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
28729 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
28730 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
28731 s,@LINK_PROGS@,$LINK_PROGS,;t t
28732 s,@LINK_TESTS@,$LINK_TESTS,;t t
28733 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
28734 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
28735 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
28736 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
28737 s,@RPATH_LIST@,$RPATH_LIST,;t t
28738 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
28739 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
28740 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
28741 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
28742 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
28743 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
28744 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
28745 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
28746 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
28747 s,@TIC@,$TIC,;t t
28748 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
28749 s,@INFOCMP@,$INFOCMP,;t t
28750 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
28751 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
28752 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
28753 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
28754 s,@XTERM_KBS@,$XTERM_KBS,;t t
28755 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
28756 s,@TERMINFO@,$TERMINFO,;t t
28757 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
28758 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
28759 s,@TERMPATH@,$TERMPATH,;t t
28760 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
28761 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
28762 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
28763 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
28764 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
28765 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
28766 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
28767 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
28768 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
28769 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
28770 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
28771 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
28772 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
28773 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
28774 s,@RGB_PATH@,$RGB_PATH,;t t
28775 s,@no_x11_rgb@,$no_x11_rgb,;t t
28776 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
28777 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
28778 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
28779 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
28780 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
28781 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
28782 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
28783 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
28784 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
28785 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
28786 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
28787 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
28788 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
28789 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
28790 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
28791 s,@PTHREAD@,$PTHREAD,;t t
28792 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
28793 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
28794 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
28795 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
28796 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
28797 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
28798 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
28799 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
28800 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
28801 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
28802 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
28803 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
28804 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
28805 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
28806 s,@ECHO_LT@,$ECHO_LT,;t t
28807 s,@ECHO_LD@,$ECHO_LD,;t t
28808 s,@RULE_CC@,$RULE_CC,;t t
28809 s,@SHOW_CC@,$SHOW_CC,;t t
28810 s,@ECHO_CC@,$ECHO_CC,;t t
28811 s,@ECHO_LINK@,$ECHO_LINK,;t t
28812 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
28813 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
28814 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
28815 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
28816 s,@ADAFLAGS@,$ADAFLAGS,;t t
28817 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
28818 s,@ADA_TRACE@,$ADA_TRACE,;t t
28819 s,@MATH_LIB@,$MATH_LIB,;t t
28820 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
28821 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
28822 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
28823 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
28824 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
28825 s,@TEST_LIBS@,$TEST_LIBS,;t t
28826 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
28827 s,@CXXCPP@,$CXXCPP,;t t
28828 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
28829 s,@CXX_AR@,$CXX_AR,;t t
28830 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
28831 s,@CXXLIBS@,$CXXLIBS,;t t
28832 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
28833 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
28834 s,@M4_exists@,$M4_exists,;t t
28835 s,@cf_ada_make@,$cf_ada_make,;t t
28836 s,@cf_ada_config@,$cf_ada_config,;t t
28837 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
28838 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
28839 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
28840 s,@cf_compile_generics@,$cf_compile_generics,;t t
28841 s,@cf_generic_objects@,$cf_generic_objects,;t t
28842 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
28843 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
28844 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
28845 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
28846 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
28847 s,@cf_ada_package@,$cf_ada_package,;t t
28848 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
28849 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
28850 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
28851 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
28852 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
28853 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
28854 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
28855 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
28856 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
28857 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
28858 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
28859 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
28860 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
28861 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
28862 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
28863 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
28864 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
28865 s,@TICS_LIBS@,$TICS_LIBS,;t t
28866 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
28867 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
28868 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
28869 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
28870 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
28871 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
28872 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
28873 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
28874 s,@includesubdir@,$includesubdir,;t t
28875 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
28876 s,@TICS_LIST@,$TICS_LIST,;t t
28877 s,@TINFO_LIST@,$TINFO_LIST,;t t
28878 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
28879 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
28880 s,@FORM_NAME@,$FORM_NAME,;t t
28881 s,@MENU_NAME@,$MENU_NAME,;t t
28882 s,@PANEL_NAME@,$PANEL_NAME,;t t
28883 s,@CXX_NAME@,$CXX_NAME,;t t
28884 s,@TEST_ARGS@,$TEST_ARGS,;t t
28885 s,@TEST_DEPS@,$TEST_DEPS,;t t
28886 s,@TEST_ARG2@,$TEST_ARG2,;t t
28887 s,@TEST_DEP2@,$TEST_DEP2,;t t
28888 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
28889 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
28890 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
28891 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
28892 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
28893 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
28894 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
28895 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
28896 s,@cross_compiling@,$cross_compiling,;t t
28897 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
28898 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
28899 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
28900 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
28901 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
28902 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
28903 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
28904 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
28905 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
28906 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
28907 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
28908 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
28909 CEOF
28910
28911 EOF
28912
28913   cat >>$CONFIG_STATUS <<\EOF
28914   # Split the substitutions into bite-sized pieces for seds with
28915   # small command number limits, like on Digital OSF/1 and HP-UX.
28916   ac_max_sed_lines=48
28917   ac_sed_frag=1 # Number of current file.
28918   ac_beg=1 # First line for current file.
28919   ac_end=$ac_max_sed_lines # Line after last line for current file.
28920   ac_more_lines=:
28921   ac_sed_cmds=
28922   while $ac_more_lines; do
28923     if test $ac_beg -gt 1; then
28924       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28925     else
28926       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
28927     fi
28928     if test ! -s $tmp/subs.frag; then
28929       ac_more_lines=false
28930     else
28931       # The purpose of the label and of the branching condition is to
28932       # speed up the sed processing (if there are no `@' at all, there
28933       # is no need to browse any of the substitutions).
28934       # These are the two extra sed commands mentioned above.
28935       (echo ':t
28936   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
28937       # It is possible to make a multiline substitution using escaped newlines.
28938       # Ensure that we do not split the substitution between script fragments.
28939       ac_BEG=$ac_end
28940       ac_END=`expr $ac_end + $ac_max_sed_lines`
28941       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
28942       if test -s $tmp/subs.next; then
28943         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
28944         if test ! -s $tmp/subs.edit; then
28945           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
28946           if test ! -s $tmp/subs.edit; then
28947             if test $ac_beg -gt 1; then
28948               ac_end=`expr $ac_end - 1`
28949               continue
28950             fi
28951           fi
28952         fi
28953       fi
28954
28955       if test -z "$ac_sed_cmds"; then
28956         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
28957       else
28958         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
28959       fi
28960       ac_sed_frag=`expr $ac_sed_frag + 1`
28961       ac_beg=$ac_end
28962       ac_end=`expr $ac_end + $ac_max_sed_lines`
28963     fi
28964   done
28965   if test -z "$ac_sed_cmds"; then
28966     ac_sed_cmds=cat
28967   fi
28968 fi # test -n "$CONFIG_FILES"
28969
28970 EOF
28971 cat >>$CONFIG_STATUS <<\EOF
28972 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
28973   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
28974   case $ac_file in
28975   - | *:- | *:-:* ) # input from stdin
28976         cat >$tmp/stdin
28977         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
28978         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
28979   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
28980         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
28981   * )   ac_file_in=$ac_file.in ;;
28982   esac
28983
28984   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
28985   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
28986          X"$ac_file" : 'X\(//\)[^/]' \| \
28987          X"$ac_file" : 'X\(//\)$' \| \
28988          X"$ac_file" : 'X\(/\)' \| \
28989          .     : '\(.\)' 2>/dev/null ||
28990 echo X"$ac_file" |
28991     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
28992           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
28993           /^X\(\/\/\)$/{ s//\1/; q; }
28994           /^X\(\/\).*/{ s//\1/; q; }
28995           s/.*/./; q'`
28996   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
28997     { case "$ac_dir" in
28998   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
28999   *)                      as_incr_dir=.;;
29000 esac
29001 as_dummy="$ac_dir"
29002 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29003   case $as_mkdir_dir in
29004     # Skip DOS drivespec
29005     ?:) as_incr_dir=$as_mkdir_dir ;;
29006     *)
29007       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29008       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29009     ;;
29010   esac
29011 done; }
29012
29013     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29014     # A "../" for each directory in $ac_dir_suffix.
29015     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29016   else
29017     ac_dir_suffix= ac_dots=
29018   fi
29019
29020   case $srcdir in
29021   .)  ac_srcdir=.
29022       if test -z "$ac_dots"; then
29023          ac_top_srcdir=.
29024       else
29025          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
29026       fi ;;
29027   [\\/]* | ?:[\\/]* )
29028       ac_srcdir=$srcdir$ac_dir_suffix;
29029       ac_top_srcdir=$srcdir ;;
29030   *) # Relative path.
29031     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
29032     ac_top_srcdir=$ac_dots$srcdir ;;
29033   esac
29034
29035   case $INSTALL in
29036   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29037   *) ac_INSTALL=$ac_dots$INSTALL ;;
29038   esac
29039
29040   if test x"$ac_file" != x-; then
29041     { echo "$as_me:29041: creating $ac_file" >&5
29042 echo "$as_me: creating $ac_file" >&6;}
29043     rm -f "$ac_file"
29044   fi
29045   # Let's still pretend it is `configure' which instantiates (i.e., don't
29046   # use $as_me), people would be surprised to read:
29047   #    /* config.h.  Generated automatically by config.status.  */
29048   configure_input="Generated automatically from `echo $ac_file_in |
29049                                                  sed 's,.*/,,'` by configure."
29050
29051   # First look for the input files in the build tree, otherwise in the
29052   # src tree.
29053   ac_file_inputs=`IFS=:
29054     for f in $ac_file_in; do
29055       case $f in
29056       -) echo $tmp/stdin ;;
29057       [\\/$]*)
29058          # Absolute (can't be DOS-style, as IFS=:)
29059          test -f "$f" || { { echo "$as_me:29059: error: cannot find input file: $f" >&5
29060 echo "$as_me: error: cannot find input file: $f" >&2;}
29061    { (exit 1); exit 1; }; }
29062          echo $f;;
29063       *) # Relative
29064          if test -f "$f"; then
29065            # Build tree
29066            echo $f
29067          elif test -f "$srcdir/$f"; then
29068            # Source tree
29069            echo $srcdir/$f
29070          else
29071            # /dev/null tree
29072            { { echo "$as_me:29072: error: cannot find input file: $f" >&5
29073 echo "$as_me: error: cannot find input file: $f" >&2;}
29074    { (exit 1); exit 1; }; }
29075          fi;;
29076       esac
29077     done` || { (exit 1); exit 1; }
29078 EOF
29079 cat >>$CONFIG_STATUS <<\EOF
29080   ac_warn_datarootdir=no
29081   if test x"$ac_file" != x-; then
29082     for ac_item in $ac_file_inputs
29083     do
29084       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
29085       if test -n "$ac_seen"; then
29086         ac_used=`grep '@datarootdir@' $ac_item`
29087         if test -z "$ac_used"; then
29088           { echo "$as_me:29088: WARNING: datarootdir was used implicitly but not set:
29089 $ac_seen" >&5
29090 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29091 $ac_seen" >&2;}
29092           ac_warn_datarootdir=yes
29093         fi
29094       fi
29095       ac_seen=`grep '${datarootdir}' $ac_item`
29096       if test -n "$ac_seen"; then
29097         { echo "$as_me:29097: WARNING: datarootdir was used explicitly but not set:
29098 $ac_seen" >&5
29099 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29100 $ac_seen" >&2;}
29101         ac_warn_datarootdir=yes
29102       fi
29103     done
29104   fi
29105
29106 if test "x$ac_warn_datarootdir" = xyes; then
29107   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29108 fi
29109
29110 EOF
29111 cat >>$CONFIG_STATUS <<EOF
29112   sed "$ac_vpsub
29113 $extrasub
29114 EOF
29115 cat >>$CONFIG_STATUS <<\EOF
29116 :t
29117 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29118 s,@configure_input@,$configure_input,;t t
29119 s,@srcdir@,$ac_srcdir,;t t
29120 s,@top_srcdir@,$ac_top_srcdir,;t t
29121 s,@INSTALL@,$ac_INSTALL,;t t
29122 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29123   rm -f $tmp/stdin
29124   if test x"$ac_file" != x-; then
29125     cp $tmp/out $ac_file
29126
29127     for ac_name in prefix exec_prefix datarootdir
29128     do
29129         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
29130         if test -n "$ac_seen"; then
29131             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
29132             if test -z "$ac_init"; then
29133               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29134               { echo "$as_me:29134: WARNING: Variable $ac_name is used but was not set:
29135 $ac_seen" >&5
29136 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29137 $ac_seen" >&2;}
29138             fi
29139         fi
29140     done
29141     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
29142     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
29143     if test -s $tmp/out; then
29144       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29145       { echo "$as_me:29145: WARNING: Some variables may not be substituted:
29146 $ac_seen" >&5
29147 echo "$as_me: WARNING: Some variables may not be substituted:
29148 $ac_seen" >&2;}
29149     fi
29150   else
29151     cat $tmp/out
29152   fi
29153   rm -f $tmp/out
29154
29155 done
29156 EOF
29157 cat >>$CONFIG_STATUS <<\EOF
29158
29159 #
29160 # CONFIG_HEADER section.
29161 #
29162
29163 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29164 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29165 #
29166 # ac_d sets the value in "#define NAME VALUE" lines.
29167 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29168 ac_dB='[        ].*$,\1#\2'
29169 ac_dC=' '
29170 ac_dD=',;t'
29171 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29172 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29173 ac_iB='\([      ]\),\1#\2define\3'
29174 ac_iC=' '
29175 ac_iD='\4,;t'
29176 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29177 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29178 ac_uB='$,\1#\2define\3'
29179 ac_uC=' '
29180 ac_uD=',;t'
29181
29182 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29183   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29184   case $ac_file in
29185   - | *:- | *:-:* ) # input from stdin
29186         cat >$tmp/stdin
29187         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29188         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29189   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29190         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29191   * )   ac_file_in=$ac_file.in ;;
29192   esac
29193
29194   test x"$ac_file" != x- && { echo "$as_me:29194: creating $ac_file" >&5
29195 echo "$as_me: creating $ac_file" >&6;}
29196
29197   # First look for the input files in the build tree, otherwise in the
29198   # src tree.
29199   ac_file_inputs=`IFS=:
29200     for f in $ac_file_in; do
29201       case $f in
29202       -) echo $tmp/stdin ;;
29203       [\\/$]*)
29204          # Absolute (can't be DOS-style, as IFS=:)
29205          test -f "$f" || { { echo "$as_me:29205: error: cannot find input file: $f" >&5
29206 echo "$as_me: error: cannot find input file: $f" >&2;}
29207    { (exit 1); exit 1; }; }
29208          echo $f;;
29209       *) # Relative
29210          if test -f "$f"; then
29211            # Build tree
29212            echo $f
29213          elif test -f "$srcdir/$f"; then
29214            # Source tree
29215            echo $srcdir/$f
29216          else
29217            # /dev/null tree
29218            { { echo "$as_me:29218: error: cannot find input file: $f" >&5
29219 echo "$as_me: error: cannot find input file: $f" >&2;}
29220    { (exit 1); exit 1; }; }
29221          fi;;
29222       esac
29223     done` || { (exit 1); exit 1; }
29224   # Remove the trailing spaces.
29225   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29226
29227 EOF
29228
29229 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29230 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29231 # be either 'cat' or 'sort'.
29232 cat confdefs.h | uniq >conftest.vals
29233
29234 # Break up conftest.vals because some shells have a limit on
29235 # the size of here documents, and old seds have small limits too.
29236
29237 rm -f conftest.tail
29238 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
29239 while grep . conftest.vals >/dev/null
29240 do
29241   # Write chunks of a limited-size here document to conftest.frag.
29242   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
29243   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
29244   echo 'CEOF' >> $CONFIG_STATUS
29245   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
29246   rm -f conftest.vals
29247   mv conftest.tail conftest.vals
29248 done
29249 rm -f conftest.vals
29250
29251 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29252 # marker @DEFS@.
29253 echo '  cat >> conftest.edit <<CEOF
29254 /@DEFS@/r conftest.frag
29255 /@DEFS@/d
29256 CEOF
29257 sed -f conftest.edit $tmp/in > $tmp/out
29258 rm -f $tmp/in
29259 mv $tmp/out $tmp/in
29260 rm -f conftest.edit conftest.frag
29261 ' >> $CONFIG_STATUS
29262
29263 cat >>$CONFIG_STATUS <<\EOF
29264   # Let's still pretend it is `configure' which instantiates (i.e., don't
29265   # use $as_me), people would be surprised to read:
29266   #    /* config.h.  Generated automatically by config.status.  */
29267   if test x"$ac_file" = x-; then
29268     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29269   else
29270     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29271   fi
29272   cat $tmp/in >>$tmp/config.h
29273   rm -f $tmp/in
29274   if test x"$ac_file" != x-; then
29275     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
29276       { echo "$as_me:29276: $ac_file is unchanged" >&5
29277 echo "$as_me: $ac_file is unchanged" >&6;}
29278     else
29279       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29280          X"$ac_file" : 'X\(//\)[^/]' \| \
29281          X"$ac_file" : 'X\(//\)$' \| \
29282          X"$ac_file" : 'X\(/\)' \| \
29283          .     : '\(.\)' 2>/dev/null ||
29284 echo X"$ac_file" |
29285     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29286           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29287           /^X\(\/\/\)$/{ s//\1/; q; }
29288           /^X\(\/\).*/{ s//\1/; q; }
29289           s/.*/./; q'`
29290       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29291         { case "$ac_dir" in
29292   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29293   *)                      as_incr_dir=.;;
29294 esac
29295 as_dummy="$ac_dir"
29296 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29297   case $as_mkdir_dir in
29298     # Skip DOS drivespec
29299     ?:) as_incr_dir=$as_mkdir_dir ;;
29300     *)
29301       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29302       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29303     ;;
29304   esac
29305 done; }
29306
29307       fi
29308       rm -f $ac_file
29309       mv $tmp/config.h $ac_file
29310     fi
29311   else
29312     cat $tmp/config.h
29313     rm -f $tmp/config.h
29314   fi
29315 done
29316 EOF
29317 cat >>$CONFIG_STATUS <<\EOF
29318 #
29319 # CONFIG_COMMANDS section.
29320 #
29321 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29322   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
29323   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
29324
29325   case $ac_dest in
29326     default )
29327 if test "x$cf_with_tests" != xno ; then
29328
29329 for cf_dir in test
29330 do
29331         if test ! -d $srcdir/$cf_dir; then
29332                 continue
29333         elif test -f $srcdir/$cf_dir/programs; then
29334                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
29335         fi
29336 done
29337
29338 fi
29339
29340 cf_prefix=$LIB_PREFIX
29341
29342 case $cf_cv_shlib_version in
29343 (cygdll|msysdll|mingw|msvcdll)
29344         TINFO_NAME=$TINFO_ARG_SUFFIX
29345         TINFO_SUFFIX=.dll
29346         ;;
29347 esac
29348
29349 if test -n "$TINFO_SUFFIX" ; then
29350         case $TINFO_SUFFIX in
29351         (tw*)
29352                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
29353                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
29354                 ;;
29355         (t*)
29356                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
29357                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
29358                 ;;
29359         (w*)
29360                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
29361                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
29362                 ;;
29363         esac
29364 fi
29365
29366 for cf_dir in $SRC_SUBDIRS
29367 do
29368         if test ! -d $srcdir/$cf_dir ; then
29369                 continue
29370         elif test -f $srcdir/$cf_dir/modules; then
29371
29372                 SHARED_LIB=
29373                 Libs_To_Make=
29374                 cf_awk_program=
29375                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
29376                 then
29377                         cf_awk_program="$cf_awk_program\
29378 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
29379 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
29380 "
29381                 fi
29382
29383                 if test "x$WILDCARD_SYMS" = xno
29384                 then
29385                         cf_awk_program="$cf_awk_program\
29386 /[      ]_\\*;/ { skip=1; next; }\
29387 "
29388                 fi
29389
29390                 if test "x$cf_awk_program" != "x"
29391                 then
29392                         cat >>$cf_dir/Makefile <<CF_EOF
29393
29394 # Generated by CF_LIB_RULES
29395 resulting.map: $UNALTERED_SYMS
29396         $AWK 'BEGIN { skip = 1; last=""; } \
29397 $cf_awk_program \
29398 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
29399  skip = 0; last = \$\$0; } \
29400 END { print last; }' < $UNALTERED_SYMS >\$@
29401
29402 distclean::
29403         rm -f resulting.map
29404 CF_EOF
29405                 fi
29406
29407                 for cf_item in $cf_LIST_MODELS
29408                 do
29409
29410         case X$cf_item in
29411         (Xlibtool)
29412                 cf_suffix='.la'
29413                 cf_depsuf=$cf_suffix
29414                 ;;
29415         (Xdebug)
29416                 case $cf_cv_system_name in
29417                 (*-msvc*)
29418                         cf_suffix='_g.lib'
29419                         ;;
29420                 (*)
29421                         cf_suffix='_g.a'
29422                         ;;
29423                 esac
29424                 cf_depsuf=$cf_suffix
29425                 ;;
29426         (Xprofile)
29427                 case $cf_cv_system_name in
29428                 (*-msvc*)
29429                         cf_suffix='_p.lib'
29430                         ;;
29431                 (*)
29432                         cf_suffix='_p.a'
29433                         ;;
29434                 esac
29435                 cf_depsuf=$cf_suffix
29436                 ;;
29437         (Xshared)
29438                 case $cf_cv_system_name in
29439                 (aix[5-7]*)
29440                         cf_suffix='.so'
29441                         cf_depsuf=$cf_suffix
29442                         ;;
29443                 (*-msvc*)
29444                         cf_suffix='.dll'
29445                         cf_depsuf='.dll.lib'
29446                         ;;
29447                 (cygwin*|msys*|mingw*)
29448                         cf_suffix='.dll'
29449                         cf_depsuf='.dll.a'
29450                         ;;
29451                 (darwin*)
29452                         cf_suffix='.dylib'
29453                         cf_depsuf=$cf_suffix
29454                         ;;
29455                 (hpux*)
29456                         case $target in
29457                         (ia64*)
29458                                 cf_suffix='.so'
29459                                 cf_depsuf=$cf_suffix
29460                                 ;;
29461                         (*)
29462                                 cf_suffix='.sl'
29463                                 cf_depsuf=$cf_suffix
29464                                 ;;
29465                         esac
29466                         ;;
29467                 (*)
29468                         cf_suffix='.so'
29469                         cf_depsuf=$cf_suffix
29470                         ;;
29471                 esac
29472                 ;;
29473         (*)
29474                 case $target in
29475                 (*-msvc*)
29476                         cf_suffix='.lib'
29477                         ;;
29478                 (*)
29479                         cf_suffix='.a'
29480                         ;;
29481                 esac
29482                 cf_depsuf=$cf_suffix
29483                 ;;
29484         esac
29485         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29486         then
29487                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29488                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29489         fi
29490
29491                         if test "$cf_dir" = "c++"
29492                         then
29493
29494 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29495
29496 eval cf_libname=\$${cf_map_lib_basename}_NAME
29497
29498                         else
29499
29500 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29501
29502 eval cf_libname=\$${cf_map_lib_basename}_NAME
29503
29504                         fi
29505                         test -z "$cf_libname" && cf_libname="$cf_dir"
29506                         if test $cf_item = shared ; then
29507                                 if test -n "${LIB_SUFFIX}"
29508                                 then
29509                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29510                                 else
29511                                         cf_shared_suffix="$cf_suffix"
29512                                 fi
29513                                 if test "$cf_cv_do_symlinks" = yes ; then
29514                                         cf_version_name=
29515
29516                                         case "$cf_cv_shlib_version" in
29517                                         (rel)
29518                                                 cf_version_name=REL_VERSION
29519                                                 ;;
29520                                         (abi)
29521                                                 cf_version_name=ABI_VERSION
29522                                                 ;;
29523                                         esac
29524
29525                                         if test -n "$cf_version_name"
29526                                         then
29527                                                 case "$cf_cv_system_name" in
29528                                                 (darwin*)
29529                                                         # "w", etc?
29530                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
29531                                                         ;;
29532                                                 (*)
29533                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
29534                                                         ;;
29535                                                 esac
29536                                         fi
29537                                         if test -n "${USE_LIB_SUFFIX}"
29538                                         then
29539                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
29540                                         else
29541                                                 cf_shared_suffix="$cf_suffix"
29542                                         fi
29543                                 fi
29544                                 # cygwin needs import library, and has unique naming convention
29545                                 # use autodetected ${cf_prefix} for import lib and static lib, but
29546                                 # use 'cyg' prefix for shared lib.
29547                                 case $cf_cv_shlib_version in
29548                                 (cygdll)
29549                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29550                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
29551                                         ;;
29552                                 (msysdll)
29553                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29554                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
29555                                         ;;
29556                                 (mingw)
29557                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29558                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
29559                                         ;;
29560                                 (msvcdll)
29561                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
29562                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
29563                                         ;;
29564                                 (*)
29565                                         cf_add_lib=
29566                                         ;;
29567                                 esac
29568                                 if test -n "$cf_add_lib"
29569                                 then
29570                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29571                                         continue
29572                                 fi
29573                         fi
29574                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
29575                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
29576                 done
29577
29578                 if test $cf_dir = ncurses ; then
29579                         cf_subsets="$LIB_SUBSETS"
29580                         cf_r_parts="$cf_subsets"
29581                         cf_liblist="$Libs_To_Make"
29582
29583                         while test -n "$cf_r_parts"
29584                         do
29585                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
29586                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
29587                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
29588                                         cf_add_lib=
29589                                         case $cf_l_parts in
29590                                         (*termlib*)
29591                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
29592                                                 ;;
29593                                         (*ticlib*)
29594                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
29595                                                 ;;
29596                                         (*)
29597                                                 break
29598                                                 ;;
29599                                         esac
29600                                         if test -n "$cf_add_lib"; then
29601                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
29602                                         fi
29603                                 else
29604                                         break
29605                                 fi
29606                         done
29607                 else
29608                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
29609                 fi
29610
29611                 if test $cf_dir = c++; then
29612                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
29613                                 cf_list=
29614                                 for cf_item in $Libs_To_Make
29615                                 do
29616                                         case $cf_item in
29617                                         (*.a)
29618                                                 ;;
29619                                         (*)
29620                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
29621                                                 ;;
29622                                         esac
29623                                         for cf_test in $cf_list
29624                                         do
29625                                                 if test "$cf_test" = "$cf_item"
29626                                                 then
29627                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
29628                                                         cf_item=
29629                                                         break
29630                                                 fi
29631                                         done
29632                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
29633                                 done
29634                                 Libs_To_Make="$cf_list"
29635                         fi
29636                 fi
29637
29638                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
29639                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
29640                         $cf_dir/Makefile >$cf_dir/Makefile.out
29641                 mv $cf_dir/Makefile.out $cf_dir/Makefile
29642
29643                 $AWK -f $srcdir/mk-0th.awk \
29644                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
29645                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29646
29647                 for cf_subset in $cf_subsets
29648                 do
29649                         cf_subdirs=
29650                         for cf_item in $cf_LIST_MODELS
29651                         do
29652
29653                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
29654
29655 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29656
29657                         CXX_MODEL=$cf_ITEM
29658                         if test "$CXX_MODEL" = SHARED; then
29659                                 case $cf_cv_shlib_version in
29660                                 (cygdll|msysdll|mingw|msvcdll)
29661                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
29662
29663 echo "${as_me:-configure}:29663: testing overriding CXX_MODEL to SHARED ..." 1>&5
29664
29665                                         with_shared_cxx=yes
29666                                         ;;
29667                                 (*)
29668                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
29669                                         ;;
29670                                 esac
29671                         fi
29672
29673         case X$cf_item in
29674         (Xlibtool)
29675                 cf_suffix='.la'
29676                 cf_depsuf=$cf_suffix
29677                 ;;
29678         (Xdebug)
29679                 case $cf_cv_system_name in
29680                 (*-msvc*)
29681                         cf_suffix='_g.lib'
29682                         ;;
29683                 (*)
29684                         cf_suffix='_g.a'
29685                         ;;
29686                 esac
29687                 cf_depsuf=$cf_suffix
29688                 ;;
29689         (Xprofile)
29690                 case $cf_cv_system_name in
29691                 (*-msvc*)
29692                         cf_suffix='_p.lib'
29693                         ;;
29694                 (*)
29695                         cf_suffix='_p.a'
29696                         ;;
29697                 esac
29698                 cf_depsuf=$cf_suffix
29699                 ;;
29700         (Xshared)
29701                 case $cf_cv_system_name in
29702                 (aix[5-7]*)
29703                         cf_suffix='.so'
29704                         cf_depsuf=$cf_suffix
29705                         ;;
29706                 (*-msvc*)
29707                         cf_suffix='.dll'
29708                         cf_depsuf='.dll.lib'
29709                         ;;
29710                 (cygwin*|msys*|mingw*)
29711                         cf_suffix='.dll'
29712                         cf_depsuf='.dll.a'
29713                         ;;
29714                 (darwin*)
29715                         cf_suffix='.dylib'
29716                         cf_depsuf=$cf_suffix
29717                         ;;
29718                 (hpux*)
29719                         case $target in
29720                         (ia64*)
29721                                 cf_suffix='.so'
29722                                 cf_depsuf=$cf_suffix
29723                                 ;;
29724                         (*)
29725                                 cf_suffix='.sl'
29726                                 cf_depsuf=$cf_suffix
29727                                 ;;
29728                         esac
29729                         ;;
29730                 (*)
29731                         cf_suffix='.so'
29732                         cf_depsuf=$cf_suffix
29733                         ;;
29734                 esac
29735                 ;;
29736         (*)
29737                 case $target in
29738                 (*-msvc*)
29739                         cf_suffix='.lib'
29740                         ;;
29741                 (*)
29742                         cf_suffix='.a'
29743                         ;;
29744                 esac
29745                 cf_depsuf=$cf_suffix
29746                 ;;
29747         esac
29748         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
29749         then
29750                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
29751                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
29752         fi
29753
29754         case $cf_item in
29755         (libtool) cf_subdir='obj_lo'  ;;
29756         (normal)  cf_subdir='objects' ;;
29757         (debug)   cf_subdir='obj_g' ;;
29758         (profile) cf_subdir='obj_p' ;;
29759         (shared)
29760                 case $cf_cv_system_name in
29761                 (cygwin|msys)
29762                         cf_subdir='objects' ;;
29763                 (*)
29764                         cf_subdir='obj_s' ;;
29765                 esac
29766         esac
29767
29768                         # Test for case where we build libtinfo with a different name.
29769                         cf_libname=$cf_dir
29770                         if test $cf_dir = ncurses ; then
29771                                 case $cf_subset in
29772                                 (*base*)
29773                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
29774                                         ;;
29775                                 (*termlib*)
29776                                         cf_libname=$TINFO_LIB_SUFFIX
29777                                         ;;
29778                                 (ticlib*)
29779                                         cf_libname=$TICS_LIB_SUFFIX
29780                                         ;;
29781                                 esac
29782                         elif test $cf_dir = c++ ; then
29783
29784 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29785
29786 eval cf_libname=\$${cf_map_lib_basename}_NAME
29787
29788                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29789                         else
29790
29791 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29792
29793 eval cf_libname=\$${cf_map_lib_basename}_NAME
29794
29795                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
29796                         fi
29797                         if test -n "${USE_ARG_SUFFIX}" ; then
29798                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
29799                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
29800                         fi
29801
29802                         # These dependencies really are for development, not
29803                         # builds, but they are useful in porting, too.
29804                         cf_depend="../include/ncurses_cfg.h"
29805                         if test "$srcdir" = "."; then
29806                                 cf_reldir="."
29807                         else
29808                                 cf_reldir="\${srcdir}"
29809                         fi
29810
29811                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
29812                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
29813                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
29814                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
29815                         fi
29816
29817                         cf_dir_suffix=
29818                         old_cf_suffix="$cf_suffix"
29819                         if test "$cf_cv_shlib_version_infix" = yes ; then
29820                         if test -n "$USE_LIB_SUFFIX" ; then
29821                                 case $USE_LIB_SUFFIX in
29822                                 (tw*)
29823                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
29824                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
29825                                         cf_dir_suffix=tw$EXTRA_SUFFIX
29826                                         ;;
29827                                 (t*)
29828                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
29829                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
29830                                         cf_dir_suffix=t$EXTRA_SUFFIX
29831                                         ;;
29832                                 (w*)
29833                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
29834                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
29835                                         cf_dir_suffix=w$EXTRA_SUFFIX
29836                                         ;;
29837                                 (*)
29838                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
29839                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
29840                                         cf_dir_suffix=$EXTRA_SUFFIX
29841                                         ;;
29842                                 esac
29843                         fi
29844                         fi
29845
29846                         $AWK -f $srcdir/mk-1st.awk \
29847                                 name=${cf_libname}${cf_dir_suffix} \
29848                                 traces=$LIB_TRACING \
29849                                 MODEL=$cf_ITEM \
29850                                 CXX_MODEL=$CXX_MODEL \
29851                                 model=$cf_subdir \
29852                                 prefix=$cf_prefix \
29853                                 suffix=$cf_suffix \
29854                                 subset=$cf_subset \
29855                                 driver=$cf_cv_term_driver \
29856                                 SymLink="$LN_S" \
29857                                 TermlibRoot=$TINFO_NAME \
29858                                 TermlibSuffix=$TINFO_SUFFIX \
29859                                 ShlibVer=$cf_cv_shlib_version \
29860                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
29861                                 ReLink=${cf_cv_do_relink:-no} \
29862                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
29863                                 DoLinks=$cf_cv_do_symlinks \
29864                                 rmSoLocs=$cf_cv_rm_so_locs \
29865                                 ldconfig="$LDCONFIG" \
29866                                 overwrite=$WITH_OVERWRITE \
29867                                 depend="$cf_depend" \
29868                                 host="$host" \
29869                                 libtool_version="$LIBTOOL_VERSION" \
29870                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29871
29872                         cf_suffix="$old_cf_suffix"
29873
29874                         for cf_subdir2 in $cf_subdirs lib
29875                         do
29876                                 test $cf_subdir = $cf_subdir2 && break
29877                         done
29878                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
29879                         $AWK -f $srcdir/mk-2nd.awk \
29880                                 name=$cf_dir \
29881                                 traces=$LIB_TRACING \
29882                                 MODEL=$cf_ITEM \
29883                                 model=$cf_subdir \
29884                                 subset=$cf_subset \
29885                                 srcdir=$srcdir \
29886                                 echo=$WITH_ECHO \
29887                                 crenames=$cf_cv_prog_CC_c_o \
29888                                 cxxrenames=$cf_cv_prog_CXX_c_o \
29889                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
29890                         cf_subdirs="$cf_subdirs $cf_subdir"
29891                         done
29892                 done
29893         fi
29894
29895         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
29896 done
29897
29898 for cf_dir in $SRC_SUBDIRS
29899 do
29900         if test ! -d $srcdir/$cf_dir ; then
29901                 continue
29902         fi
29903
29904         if test -f $cf_dir/Makefile ; then
29905                 case "$cf_dir" in
29906                 (Ada95)
29907                         echo 'libs \' >> Makefile
29908                         echo 'install.libs \' >> Makefile
29909                         echo 'uninstall.libs ::' >> Makefile
29910                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
29911                         ;;
29912                 esac
29913         fi
29914
29915         if test -f $srcdir/$cf_dir/modules; then
29916                 echo >> Makefile
29917                 if test -f $srcdir/$cf_dir/headers; then
29918 cat >> Makefile <<CF_EOF
29919 install.includes \\
29920 uninstall.includes \\
29921 CF_EOF
29922                 fi
29923 if test "$cf_dir" != "c++" ; then
29924 echo 'lint \' >> Makefile
29925 fi
29926 cat >> Makefile <<CF_EOF
29927 libs \\
29928 lintlib \\
29929 install.libs \\
29930 uninstall.libs \\
29931 install.$cf_dir \\
29932 uninstall.$cf_dir ::
29933         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29934 CF_EOF
29935         elif test -f $srcdir/$cf_dir/headers; then
29936 cat >> Makefile <<CF_EOF
29937
29938 libs \\
29939 install.libs \\
29940 uninstall.libs \\
29941 install.includes \\
29942 uninstall.includes ::
29943         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
29944 CF_EOF
29945 fi
29946 done
29947
29948 if test "x$cf_with_db_install" = xyes; then
29949 cat >> Makefile <<CF_EOF
29950
29951 install.libs uninstall.libs \\
29952 install.data uninstall.data ::
29953 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
29954 CF_EOF
29955 else
29956 cat >> Makefile <<CF_EOF
29957
29958 install.libs uninstall.libs ::
29959         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
29960 CF_EOF
29961 fi
29962
29963 if test "x$cf_with_manpages" = xyes; then
29964 cat >> Makefile <<CF_EOF
29965
29966 install.man \\
29967 uninstall.man ::
29968         cd man && \${MAKE} \${TOP_MFLAGS} \$@
29969 CF_EOF
29970 fi
29971
29972 cat >> Makefile <<CF_EOF
29973
29974 distclean ::
29975         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
29976         rm -f headers.sh headers.sed mk_shared_lib.sh
29977         rm -f edit_man.* man_alias.*
29978         rm -rf \${DIRS_TO_MAKE}
29979 CF_EOF
29980
29981 # Special case: tack's manpage lives in its own directory.
29982 if test "x$cf_with_manpages" = xyes; then
29983 if test "x$cf_with_tack" = "xyes"; then
29984 cat >> Makefile <<CF_EOF
29985
29986 install.man \\
29987 uninstall.man ::
29988         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
29989 CF_EOF
29990 fi
29991 fi
29992
29993 rm -f headers.sed headers.sh
29994
29995 echo creating headers.sh
29996 cat >headers.sh <<CF_EOF
29997 #! $SHELL
29998 # This shell script is generated by the 'configure' script.  It is invoked in a
29999 # subdirectory of the build tree.  It generates a sed-script in the parent
30000 # directory that is used to adjust includes for header files that reside in a
30001 # subdirectory of /usr/include, etc.
30002 PRG=""
30003 while test \$# != 3
30004 do
30005 PRG="\$PRG \$1"; shift
30006 done
30007 DST=\$1
30008 REF=\$2
30009 SRC=\$3
30010 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30011 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30012 echo installing \$SRC in \$DST
30013 CF_EOF
30014
30015 if test $WITH_CURSES_H = yes; then
30016         cat >>headers.sh <<CF_EOF
30017 case \$DST in
30018 (/*/include/*)
30019         END=\`basename \$DST\`
30020         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30021         do
30022                 NAME=\`basename \$i\`
30023                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30024         done
30025         ;;
30026 (*)
30027         echo "" >> \$TMPSED
30028         ;;
30029 esac
30030 CF_EOF
30031
30032 else
30033         cat >>headers.sh <<CF_EOF
30034 case \$DST in
30035 (/*/include/*)
30036         END=\`basename \$DST\`
30037         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
30038         do
30039                 NAME=\`basename \$i\`
30040                 if test "\$NAME" = "curses.h"
30041                 then
30042                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30043                         NAME=ncurses.h
30044                 fi
30045                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30046         done
30047         ;;
30048 (*)
30049         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30050         ;;
30051 esac
30052 CF_EOF
30053 fi
30054 cat >>headers.sh <<CF_EOF
30055 rm -f \$TMPSRC
30056 sed -f \$TMPSED \$SRC > \$TMPSRC
30057 NAME=\`basename \$SRC\`
30058 CF_EOF
30059 if test $WITH_CURSES_H != yes; then
30060         cat >>headers.sh <<CF_EOF
30061 test "\$NAME" = "curses.h" && NAME=ncurses.h
30062 CF_EOF
30063 fi
30064 cat >>headers.sh <<CF_EOF
30065 # Just in case someone gzip'd manpages, remove the conflicting copy.
30066 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30067
30068 eval \$PRG \$TMPSRC \$DST/\$NAME
30069 rm -f \$TMPSRC \$TMPSED
30070 CF_EOF
30071
30072 chmod 0755 headers.sh
30073
30074 for cf_dir in $SRC_SUBDIRS
30075 do
30076         if test ! -d $srcdir/$cf_dir ; then
30077                 continue
30078         fi
30079
30080         if test -f $srcdir/$cf_dir/headers; then
30081                 $AWK -f $srcdir/mk-hdr.awk \
30082                         subset="$LIB_SUBSETS" \
30083                         compat="$WITH_CURSES_H" \
30084                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
30085         fi
30086
30087         if test -f $srcdir/$cf_dir/modules; then
30088                 if test "$cf_dir" != "c++" ; then
30089                         cat >>$cf_dir/Makefile <<"CF_EOF"
30090 depend : ${AUTO_SRC}
30091         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30092
30093 # DO NOT DELETE THIS LINE -- make depend depends on it.
30094 CF_EOF
30095                 fi
30096         fi
30097 done
30098
30099 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30100 if test -z "$USE_OLD_MAKERULES" ; then
30101         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
30102 fi
30103 fi
30104  ;;
30105   esac
30106 done
30107 EOF
30108
30109 cat >>$CONFIG_STATUS <<\EOF
30110
30111 { (exit 0); exit 0; }
30112 EOF
30113 chmod +x $CONFIG_STATUS
30114 ac_clean_files=$ac_clean_files_save
30115
30116 # configure is writing to config.log, and then calls config.status.
30117 # config.status does its own redirection, appending to config.log.
30118 # Unfortunately, on DOS this fails, as config.log is still kept open
30119 # by configure, so config.status won't be able to write to it; its
30120 # output is simply discarded.  So we exec the FD to /dev/null,
30121 # effectively closing config.log, so it can be properly (re)opened and
30122 # appended to by config.status.  When coming back to configure, we
30123 # need to make the FD available again.
30124 if test "$no_create" != yes; then
30125   ac_cs_success=:
30126   exec 5>/dev/null
30127   $SHELL $CONFIG_STATUS || ac_cs_success=false
30128   exec 5>>config.log
30129   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30130   # would make configure fail if this is the last instruction.
30131   $ac_cs_success || { (exit 1); exit 1; }
30132 fi
30133 ${MAKE:-make} preinstall