]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
2478a5a17863397dd436662508d779908719159b
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.707 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20200111.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada compiler, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
764 Fine-Tuning Your Configuration:
765   --with-extra-suffix=X   append extra suffix to header/library paths
766   --disable-overwrite     put headers in subdir, omit link to -lcurses
767   --disable-database      do not use terminfo, only fallbacks/termcap
768   --with-database=XXX     specify terminfo source to install
769   --with-hashed-db        specify hashed-database library
770   --with-fallbacks=XXX    specify list of fallback terminal descriptions
771   --with-tic-path=XXX     specify path of tic for fallbacks
772   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
773   --without-xterm-new     specify if xterm terminfo should be old version
774   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
775   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
776   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
777   --disable-big-core      assume machine has little memory
778   --disable-big-strings   assume compiler has only standard-size strings
779   --enable-termcap        compile in termcap fallback support
780   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
781   --enable-getcap         fast termcap load, no xrefs to terminfo
782   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
783   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
784   --disable-root-environ  restrict environment when running as root
785   --enable-symlinks       make tic use symbolic links not hard links
786   --enable-broken_linker  compile with broken-linker support code
787   --enable-bsdpad         recognize BSD-style prefix padding
788   --enable-widec          compile with wide-char/UTF-8 code
789   --disable-lp64          allow chtype to be long (ignore _LP64)
790   --disable-largefile     omit support for large files
791   --disable-tparm-varargs compile tparm() without varargs interface
792   --disable-tic-depends   link tic library without explicit dependency on ncurses library
793   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
794   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
795   --with-bool=TYPE        override fallback type of bool variable
796   --with-caps=alt         compile with alternate Caps file
797   --with-chtype=TYPE      override type of chtype
798   --with-ospeed=TYPE      override type of ospeed variable
799   --with-mmask-t=TYPE     override type of mmask_t
800   --with-ccharw-max=XXX   override size CCHARW_MAX
801   --enable-signed-char    compile using signed Boolean's in term.h
802   --with-tparm-arg=TYPE   override parameter type of tparm
803   --with-rcs-ids          compile-in RCS identifiers
804 Options to Specify How Manpages are Installed:
805   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
806                           optionally formatted/catonly, e.g., gzip,formatted
807   --with-manpage-renames  specify manpage-renaming
808   --with-manpage-aliases  specify manpage-aliases using .so
809   --with-manpage-symlinks specify manpage-aliases using symlinks
810   --with-manpage-tbl      specify manpage processing with tbl
811 Extensions:
812   --disable-ext-funcs     disable function-extensions
813   --enable-sp-funcs       enable SCREEN-extensions
814   --enable-term-driver    enable terminal-driver
815   --enable-const          compile with extra/non-standard const
816   --enable-ext-colors     compile for 256-color support
817   --enable-ext-mouse      compile for extended mouse-encoding
818   --enable-ext-putwin     compile with extended putwin/screendump
819   --enable-no-padding     compile with $NCURSES_NO_PADDING code
820   --enable-sigwinch       compile with SIGWINCH handler
821   --enable-tcap-names     compile with user-definable terminal capabilities
822 Reentrant Code:
823   --with-pthread          use POSIX thread library
824   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
825   --enable-weak-symbols   enable weak-symbols for pthreads
826   --enable-reentrant      compile with reentrant code
827   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
828   --enable-opaque-form    make form-library structures "opaque"
829   --enable-opaque-menu    make menu-library structures "opaque"
830   --enable-opaque-panel   make panel-library structures "opaque"
831   --with-wrap-prefix=XXX  override prefix used for public variables
832 Development Code:
833   --without-develop       disable development options
834   --enable-hard-tabs      compile with hard-tabs code
835   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
836 Experimental Code:
837   --disable-assumed-color do not assume anything about default-colors
838   --disable-hashmap       compile without hashmap scrolling-optimization
839   --enable-colorfgbg      compile-in experimental $COLORFGBG code
840   --enable-fvisibility    compile with -fvisibility=hidden
841   --enable-interop        compile-in interop bindings
842   --enable-safe-sprintf   compile with experimental safe-sprintf code
843   --disable-scroll-hints  compile without scroll-hints code
844   --enable-wgetch-events  compile with wgetch-events code
845 Testing/development Options:
846   --disable-echo          do not display "compiling" commands
847   --disable-stripping     do not strip (debug info) installed executables
848   --enable-warnings       build: turn on GCC compiler warnings
849   --enable-string-hacks   work around bogus compiler/loader warnings
850   --enable-assertions     test: turn on generation of assertion code
851   --with-dmalloc          test: use Gray Watson's dmalloc library
852   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
853   --with-valgrind         test: use valgrind
854   --disable-leaks         test: free permanent memory, analyze leaks
855   --enable-expanded       test: generate functions for certain macros
856   --disable-macros        test: use functions rather than macros
857   --with-trace            test: add trace() function to all models of ncurses
858   --disable-gnat-projects test: disable GNAT projects even if usable
859 Ada Binding Options:
860   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
861   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
862   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
863   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
864   --with-ada-libname=XXX  override default Ada library-name
865   --with-form-libname=XXX override form basename of library
866   --with-menu-libname=XXX override menu basename of library
867   --with-panel-libname=XXX override panel basename of library
868   --with-cxx-libname=XXX override ncurses++ basename of library
869
870 Some influential environment variables:
871   CC          C compiler command
872   CFLAGS      C compiler flags
873   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
874               nonstandard directory <lib dir>
875   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
876               headers in a nonstandard directory <include dir>
877   CPP         C preprocessor
878   CXX         C++ compiler command
879   CXXFLAGS    C++ compiler flags
880   CXXCPP      C++ preprocessor
881
882 Use these variables to override the choices made by `configure' or to help
883 it to find libraries and programs with nonstandard names/locations.
884
885 EOF
886 fi
887
888 if test "$ac_init_help" = "recursive"; then
889   # If there are subdirs, report their specific --help.
890   ac_popdir=`pwd`
891   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
892     cd $ac_subdir
893     # A "../" for each directory in /$ac_subdir.
894     ac_dots=`echo $ac_subdir |
895              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
896
897     case $srcdir in
898     .) # No --srcdir option.  We are building in place.
899       ac_sub_srcdir=$srcdir ;;
900     [\\/]* | ?:[\\/]* ) # Absolute path.
901       ac_sub_srcdir=$srcdir/$ac_subdir ;;
902     *) # Relative path.
903       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
904     esac
905
906     # Check for guested configure; otherwise get Cygnus style configure.
907     if test -f $ac_sub_srcdir/configure.gnu; then
908       echo
909       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
910     elif test -f $ac_sub_srcdir/configure; then
911       echo
912       $SHELL $ac_sub_srcdir/configure  --help=recursive
913     elif test -f $ac_sub_srcdir/configure.ac ||
914            test -f $ac_sub_srcdir/configure.in; then
915       echo
916       $ac_configure --help
917     else
918       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
919     fi
920     cd $ac_popdir
921   done
922 fi
923
924 test -n "$ac_init_help" && exit 0
925 if $ac_init_version; then
926   cat <<\EOF
927
928 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
929 Free Software Foundation, Inc.
930 This configure script is free software; the Free Software Foundation
931 gives unlimited permission to copy, distribute and modify it.
932 EOF
933   exit 0
934 fi
935 exec 5>config.log
936 cat >&5 <<EOF
937 This file contains any messages produced by compilers while
938 running configure, to aid debugging if configure makes a mistake.
939
940 It was created by $as_me, which was
941 generated by GNU Autoconf 2.52.20200111.  Invocation command line was
942
943   $ $0 $@
944
945 EOF
946 {
947 cat <<_ASUNAME
948 ## ---------- ##
949 ## Platform.  ##
950 ## ---------- ##
951
952 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
953 uname -m = `(uname -m) 2>/dev/null || echo unknown`
954 uname -r = `(uname -r) 2>/dev/null || echo unknown`
955 uname -s = `(uname -s) 2>/dev/null || echo unknown`
956 uname -v = `(uname -v) 2>/dev/null || echo unknown`
957
958 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
959 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
960
961 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
962 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
963 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
964 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
965 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
966 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
967 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
968
969 PATH = $PATH
970
971 _ASUNAME
972 } >&5
973
974 cat >&5 <<EOF
975 ## ------------ ##
976 ## Core tests.  ##
977 ## ------------ ##
978
979 EOF
980
981 # Keep a trace of the command line.
982 # Strip out --no-create and --no-recursion so they do not pile up.
983 # Also quote any args containing shell meta-characters.
984 ac_configure_args=
985 ac_sep=
986 for ac_arg
987 do
988   case $ac_arg in
989   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
990   | --no-cr | --no-c) ;;
991   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
992   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
993   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
994     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
995     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
996     ac_sep=" " ;;
997   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
998      ac_sep=" " ;;
999   esac
1000   # Get rid of the leading space.
1001 done
1002
1003 # When interrupted or exit'd, cleanup temporary files, and complete
1004 # config.log.  We remove comments because anyway the quotes in there
1005 # would cause problems or look ugly.
1006 trap 'exit_status=$?
1007   # Save into config.log some information that might help in debugging.
1008   echo >&5
1009   echo "## ----------------- ##" >&5
1010   echo "## Cache variables.  ##" >&5
1011   echo "## ----------------- ##" >&5
1012   echo >&5
1013   # The following way of writing the cache mishandles newlines in values,
1014 {
1015   (set) 2>&1 |
1016     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1017     *ac_space=\ *)
1018       sed -n \
1019         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1020           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1021       ;;
1022     *)
1023       sed -n \
1024         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1025       ;;
1026     esac;
1027 } >&5
1028   sed "/^$/d" confdefs.h >conftest.log
1029   if test -s conftest.log; then
1030     echo >&5
1031     echo "## ------------ ##" >&5
1032     echo "## confdefs.h.  ##" >&5
1033     echo "## ------------ ##" >&5
1034     echo >&5
1035     cat conftest.log >&5
1036   fi
1037   (echo; echo) >&5
1038   test "$ac_signal" != 0 &&
1039     echo "$as_me: caught signal $ac_signal" >&5
1040   echo "$as_me: exit $exit_status" >&5
1041   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1042     exit $exit_status
1043      ' 0
1044 for ac_signal in 1 2 13 15; do
1045   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1046 done
1047 ac_signal=0
1048
1049 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1050 rm -rf conftest* confdefs.h
1051 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1052 echo >confdefs.h
1053
1054 # Let the site file select an alternate cache file if it wants to.
1055 # Prefer explicitly selected file to automatically selected ones.
1056 if test -z "$CONFIG_SITE"; then
1057   if test "x$prefix" != xNONE; then
1058     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1059   else
1060     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1061   fi
1062 fi
1063 for ac_site_file in $CONFIG_SITE; do
1064   if test -r "$ac_site_file"; then
1065     { echo "$as_me:1065: loading site script $ac_site_file" >&5
1066 echo "$as_me: loading site script $ac_site_file" >&6;}
1067     cat "$ac_site_file" >&5
1068     . "$ac_site_file"
1069   fi
1070 done
1071
1072 if test -r "$cache_file"; then
1073   # Some versions of bash will fail to source /dev/null (special
1074   # files actually), so we avoid doing that.
1075   if test -f "$cache_file"; then
1076     { echo "$as_me:1076: loading cache $cache_file" >&5
1077 echo "$as_me: loading cache $cache_file" >&6;}
1078     case $cache_file in
1079       [\\/]* | ?:[\\/]* ) . $cache_file;;
1080       *)                      . ./$cache_file;;
1081     esac
1082   fi
1083 else
1084   { echo "$as_me:1084: creating cache $cache_file" >&5
1085 echo "$as_me: creating cache $cache_file" >&6;}
1086   >$cache_file
1087 fi
1088
1089 # Check that the precious variables saved in the cache have kept the same
1090 # value.
1091 ac_cache_corrupted=false
1092 for ac_var in `(set) 2>&1 |
1093                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1094   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1095   eval ac_new_set=\$ac_env_${ac_var}_set
1096   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1097   eval ac_new_val="\$ac_env_${ac_var}_value"
1098   case $ac_old_set,$ac_new_set in
1099     set,)
1100       { echo "$as_me:1100: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1101 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1102       ac_cache_corrupted=: ;;
1103     ,set)
1104       { echo "$as_me:1104: error: \`$ac_var' was not set in the previous run" >&5
1105 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1106       ac_cache_corrupted=: ;;
1107     ,);;
1108     *)
1109       if test "x$ac_old_val" != "x$ac_new_val"; then
1110         { echo "$as_me:1110: error: \`$ac_var' has changed since the previous run:" >&5
1111 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1112         { echo "$as_me:1112:   former value:  $ac_old_val" >&5
1113 echo "$as_me:   former value:  $ac_old_val" >&2;}
1114         { echo "$as_me:1114:   current value: $ac_new_val" >&5
1115 echo "$as_me:   current value: $ac_new_val" >&2;}
1116         ac_cache_corrupted=:
1117       fi;;
1118   esac
1119   # Pass precious variables to config.status.  It doesn't matter if
1120   # we pass some twice (in addition to the command line arguments).
1121   if test "$ac_new_set" = set; then
1122     case $ac_new_val in
1123     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1124       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1125       ac_configure_args="$ac_configure_args '$ac_arg'"
1126       ;;
1127     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1128        ;;
1129     esac
1130   fi
1131 done
1132 if $ac_cache_corrupted; then
1133   { echo "$as_me:1133: error: changes in the environment can compromise the build" >&5
1134 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1135   { { echo "$as_me:1135: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1136 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1137    { (exit 1); exit 1; }; }
1138 fi
1139
1140 ac_ext=c
1141 ac_cpp='$CPP $CPPFLAGS'
1142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1145 ac_main_return=return
1146
1147 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1148   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1149                    ECHO_T='     ' ;;
1150   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1151   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1152 esac
1153 echo "#! $SHELL" >conftest.sh
1154 echo  "exit 0"   >>conftest.sh
1155 chmod +x conftest.sh
1156 if { (echo "$as_me:1156: PATH=\".;.\"; conftest.sh") >&5
1157   (PATH=".;."; conftest.sh) 2>&5
1158   ac_status=$?
1159   echo "$as_me:1159: \$? = $ac_status" >&5
1160   (exit $ac_status); }; then
1161   ac_path_separator=';'
1162 else
1163   ac_path_separator=:
1164 fi
1165 PATH_SEPARATOR="$ac_path_separator"
1166 rm -f conftest.sh
1167
1168 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1169
1170 top_builddir=`pwd`
1171
1172 echo "$as_me:1172: checking for egrep" >&5
1173 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1174 if test "${ac_cv_prog_egrep+set}" = set; then
1175   echo $ECHO_N "(cached) $ECHO_C" >&6
1176 else
1177   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1178                 then ac_cv_prog_egrep='grep -E'
1179                 else ac_cv_prog_egrep='egrep'
1180         fi
1181 fi
1182 echo "$as_me:1182: result: $ac_cv_prog_egrep" >&5
1183 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1184         EGREP=$ac_cv_prog_egrep
1185
1186         test -z "$EGREP" && { { echo "$as_me:1186: error: No egrep program found" >&5
1187 echo "$as_me: error: No egrep program found" >&2;}
1188    { (exit 1); exit 1; }; }
1189
1190 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1191 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1192 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1193 cf_cv_abi_version=${NCURSES_MAJOR}
1194 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1195 cf_cv_timestamp=`date`
1196 echo "$as_me:1196: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1197 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1198
1199 if test -f $srcdir/VERSION ; then
1200         echo "$as_me:1200: checking for package version" >&5
1201 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1202
1203         # if there are not enough fields, cut returns the last one...
1204         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1205         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1206         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1207
1208         # this is how CF_BUNDLED_INTL uses $VERSION:
1209         VERSION="$cf_field1"
1210
1211         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1212         test -z "$VERSION_MAJOR" && { { echo "$as_me:1212: error: missing major-version" >&5
1213 echo "$as_me: error: missing major-version" >&2;}
1214    { (exit 1); exit 1; }; }
1215
1216         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1217         test -z "$VERSION_MINOR" && { { echo "$as_me:1217: error: missing minor-version" >&5
1218 echo "$as_me: error: missing minor-version" >&2;}
1219    { (exit 1); exit 1; }; }
1220
1221         echo "$as_me:1221: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1222 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1223
1224         echo "$as_me:1224: checking for package patch date" >&5
1225 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1226         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1227         case .$VERSION_PATCH in
1228         (.)
1229                 { { echo "$as_me:1229: error: missing patch-date $VERSION_PATCH" >&5
1230 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1231    { (exit 1); exit 1; }; }
1232                 ;;
1233         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1234                 ;;
1235         (*)
1236                 { { echo "$as_me:1236: error: illegal patch-date $VERSION_PATCH" >&5
1237 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1238    { (exit 1); exit 1; }; }
1239                 ;;
1240         esac
1241         echo "$as_me:1241: result: $VERSION_PATCH" >&5
1242 echo "${ECHO_T}$VERSION_PATCH" >&6
1243 else
1244         { { echo "$as_me:1244: error: did not find $srcdir/VERSION" >&5
1245 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1246    { (exit 1); exit 1; }; }
1247 fi
1248
1249 # show the actual data that we have for versions:
1250 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1251
1252 echo "${as_me:-configure}:1252: testing ABI VERSION $VERSION ..." 1>&5
1253
1254 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1255
1256 echo "${as_me:-configure}:1256: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1257
1258 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1259
1260 echo "${as_me:-configure}:1260: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1261
1262 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1263
1264 echo "${as_me:-configure}:1264: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1265
1266         cf_PACKAGE=NCURSES
1267         PACKAGE=ncurses
1268
1269 cat >>confdefs.h <<EOF
1270 #define PACKAGE "$PACKAGE"
1271 EOF
1272
1273 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1274
1275         cat >>confdefs.h <<EOF
1276 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1277 EOF
1278
1279         cat >>confdefs.h <<EOF
1280 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1281 EOF
1282
1283 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1284
1285 # Check whether --with-rel-version or --without-rel-version was given.
1286 if test "${with_rel_version+set}" = set; then
1287   withval="$with_rel_version"
1288   { echo "$as_me:1288: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1289 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1290  cf_cv_rel_version=$withval
1291 fi;
1292
1293  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1294  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1295
1296 if test -n "$NCURSES_MAJOR" ; then
1297   case $NCURSES_MAJOR in
1298   ([0-9]*)
1299         ;;
1300   (*)
1301         { { echo "$as_me:1301: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1302 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1303    { (exit 1); exit 1; }; }
1304         ;;
1305   esac
1306 else
1307   { { echo "$as_me:1307: error: Release major-version value is empty" >&5
1308 echo "$as_me: error: Release major-version value is empty" >&2;}
1309    { (exit 1); exit 1; }; }
1310 fi
1311
1312 if test -n "$NCURSES_MINOR" ; then
1313   case $NCURSES_MINOR in
1314   ([0-9]*)
1315         ;;
1316   (*)
1317         { { echo "$as_me:1317: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1318 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1319    { (exit 1); exit 1; }; }
1320         ;;
1321   esac
1322 else
1323   { { echo "$as_me:1323: error: Release minor-version value is empty" >&5
1324 echo "$as_me: error: Release minor-version value is empty" >&2;}
1325    { (exit 1); exit 1; }; }
1326 fi
1327
1328 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1329
1330 # Check whether --with-abi-version or --without-abi-version was given.
1331 if test "${with_abi_version+set}" = set; then
1332   withval="$with_abi_version"
1333
1334         if test "x$cf_cv_abi_version" != "x$withval"
1335         then
1336                 { echo "$as_me:1336: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1337 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1338                 case $cf_cv_rel_version in
1339                 (5.*)
1340                         cf_cv_rel_version=$withval.0
1341                         ;;
1342                 (6.*)
1343                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1344                         ;;
1345                 esac
1346         fi
1347         cf_cv_abi_version=$withval
1348 fi;
1349
1350 if test -n "$cf_cv_abi_version" ; then
1351   case $cf_cv_abi_version in
1352   ([0-9]*)
1353         ;;
1354   (*)
1355         { { echo "$as_me:1355: error: ABI version is not a number: $cf_cv_abi_version" >&5
1356 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1357    { (exit 1); exit 1; }; }
1358         ;;
1359   esac
1360 else
1361   { { echo "$as_me:1361: error: ABI version value is empty" >&5
1362 echo "$as_me: error: ABI version value is empty" >&2;}
1363    { (exit 1); exit 1; }; }
1364 fi
1365
1366 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1367 then
1368         case $cf_cv_rel_version in
1369         (5.*)
1370                 cf_cv_rel_version=$with_abi_version.0
1371                 ;;
1372         esac
1373 fi
1374
1375 ac_aux_dir=
1376 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1377   if test -f $ac_dir/install-sh; then
1378     ac_aux_dir=$ac_dir
1379     ac_install_sh="$ac_aux_dir/install-sh -c"
1380     break
1381   elif test -f $ac_dir/install.sh; then
1382     ac_aux_dir=$ac_dir
1383     ac_install_sh="$ac_aux_dir/install.sh -c"
1384     break
1385   elif test -f $ac_dir/shtool; then
1386     ac_aux_dir=$ac_dir
1387     ac_install_sh="$ac_aux_dir/shtool install -c"
1388     break
1389   fi
1390 done
1391 if test -z "$ac_aux_dir"; then
1392   { { echo "$as_me:1392: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1393 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1394    { (exit 1); exit 1; }; }
1395 fi
1396 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1397 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1398 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1399
1400 # Make sure we can run config.sub.
1401 $ac_config_sub sun4 >/dev/null 2>&1 ||
1402   { { echo "$as_me:1402: error: cannot run $ac_config_sub" >&5
1403 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1404    { (exit 1); exit 1; }; }
1405
1406 echo "$as_me:1406: checking build system type" >&5
1407 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1408 if test "${ac_cv_build+set}" = set; then
1409   echo $ECHO_N "(cached) $ECHO_C" >&6
1410 else
1411   ac_cv_build_alias=$build_alias
1412 test -z "$ac_cv_build_alias" &&
1413   ac_cv_build_alias=`$ac_config_guess`
1414 test -z "$ac_cv_build_alias" &&
1415   { { echo "$as_me:1415: error: cannot guess build type; you must specify one" >&5
1416 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1417    { (exit 1); exit 1; }; }
1418 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1419   { { echo "$as_me:1419: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1420 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1421    { (exit 1); exit 1; }; }
1422
1423 fi
1424 echo "$as_me:1424: result: $ac_cv_build" >&5
1425 echo "${ECHO_T}$ac_cv_build" >&6
1426 build=$ac_cv_build
1427 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1428 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1429 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1430
1431 echo "$as_me:1431: checking host system type" >&5
1432 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1433 if test "${ac_cv_host+set}" = set; then
1434   echo $ECHO_N "(cached) $ECHO_C" >&6
1435 else
1436   ac_cv_host_alias=$host_alias
1437 test -z "$ac_cv_host_alias" &&
1438   ac_cv_host_alias=$ac_cv_build_alias
1439 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1440   { { echo "$as_me:1440: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1441 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1442    { (exit 1); exit 1; }; }
1443
1444 fi
1445 echo "$as_me:1445: result: $ac_cv_host" >&5
1446 echo "${ECHO_T}$ac_cv_host" >&6
1447 host=$ac_cv_host
1448 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1449 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1450 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1451
1452 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1453         echo "$as_me:1453: checking target system type" >&5
1454 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1455 if test "${ac_cv_target+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   ac_cv_target_alias=$target_alias
1459 test "x$ac_cv_target_alias" = "x" &&
1460   ac_cv_target_alias=$ac_cv_host_alias
1461 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1462   { { echo "$as_me:1462: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1463 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1464    { (exit 1); exit 1; }; }
1465
1466 fi
1467 echo "$as_me:1467: result: $ac_cv_target" >&5
1468 echo "${ECHO_T}$ac_cv_target" >&6
1469 target=$ac_cv_target
1470 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1471 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1472 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1473
1474 # The aliases save the names the user supplied, while $host etc.
1475 # will get canonicalized.
1476 test -n "$target_alias" &&
1477   test "$program_prefix$program_suffix$program_transform_name" = \
1478     NONENONEs,x,x, &&
1479   program_prefix=${target_alias}-
1480         system_name="$host_os"
1481 else
1482         system_name="`(uname -s -r) 2>/dev/null`"
1483         if test -z "$system_name" ; then
1484                 system_name="`(hostname) 2>/dev/null`"
1485         fi
1486 fi
1487 test -n "$system_name" &&
1488 cat >>confdefs.h <<EOF
1489 #define SYSTEM_NAME "$system_name"
1490 EOF
1491
1492 if test "${cf_cv_system_name+set}" = set; then
1493   echo $ECHO_N "(cached) $ECHO_C" >&6
1494 else
1495   cf_cv_system_name="$system_name"
1496 fi
1497
1498 test -z "$system_name" && system_name="$cf_cv_system_name"
1499 test -n "$cf_cv_system_name" && echo "$as_me:1499: result: Configuring for $cf_cv_system_name" >&5
1500 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1501
1502 if test ".$system_name" != ".$cf_cv_system_name" ; then
1503         echo "$as_me:1503: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1504 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1505         { { echo "$as_me:1505: error: \"Please remove config.cache and try again.\"" >&5
1506 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1507    { (exit 1); exit 1; }; }
1508 fi
1509
1510 # Check whether --with-system-type or --without-system-type was given.
1511 if test "${with_system_type+set}" = set; then
1512   withval="$with_system_type"
1513   { echo "$as_me:1513: WARNING: overriding system type to $withval" >&5
1514 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1515         cf_cv_system_name=$withval
1516         host_os=$withval
1517
1518 fi;
1519
1520 ###     Save the given $CFLAGS to allow user-override.
1521 cf_user_CFLAGS="$CFLAGS"
1522
1523 ###     Default install-location
1524
1525 echo "$as_me:1525: checking for prefix" >&5
1526 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1527 if test "x$prefix" = "xNONE" ; then
1528         case "$cf_cv_system_name" in
1529                 # non-vendor systems don't have a conflict
1530         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1531                 prefix=/usr
1532                 ;;
1533         (*)     prefix=$ac_default_prefix
1534                 ;;
1535         esac
1536 fi
1537 echo "$as_me:1537: result: $prefix" >&5
1538 echo "${ECHO_T}$prefix" >&6
1539
1540 if test "x$prefix" = "xNONE" ; then
1541 echo "$as_me:1541: checking for default include-directory" >&5
1542 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1543 test -n "$verbose" && echo 1>&6
1544 for cf_symbol in \
1545         $includedir \
1546         $includedir/ncurses \
1547         $prefix/include \
1548         $prefix/include/ncurses \
1549         /usr/local/include \
1550         /usr/local/include/ncurses \
1551         /usr/include \
1552         /usr/include/ncurses
1553 do
1554         cf_dir=`eval echo $cf_symbol`
1555         if test -f $cf_dir/curses.h ; then
1556         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1557                 includedir="$cf_symbol"
1558                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1559                 break
1560         fi
1561         fi
1562         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1563 done
1564 echo "$as_me:1564: result: $includedir" >&5
1565 echo "${ECHO_T}$includedir" >&6
1566 fi
1567
1568 ### Defaults for ncurses ABI
1569
1570 case x$cf_cv_abi_version in
1571 (x[6789])
1572         cf_dft_ext_colors=yes
1573         cf_dft_ext_const=yes
1574         cf_dft_ext_mouse=yes
1575         cf_dft_ext_putwin=yes
1576         cf_dft_ext_spfuncs=yes
1577         cf_dft_filter_syms=yes
1578         cf_dft_chtype=uint32_t
1579         cf_dft_mmask_t=uint32_t
1580         cf_dft_interop=yes
1581         cf_dft_tparm_arg=intptr_t
1582         cf_dft_with_lp64=yes
1583         ;;
1584 (*)
1585         cf_dft_ext_colors=no
1586         cf_dft_ext_const=no
1587         cf_dft_ext_mouse=no
1588         cf_dft_ext_putwin=no
1589         cf_dft_ext_spfuncs=no
1590         cf_dft_filter_syms=no
1591         cf_dft_chtype=auto
1592         cf_dft_mmask_t=auto
1593         cf_dft_interop=no
1594         cf_dft_tparm_arg=long
1595         cf_dft_with_lp64=no
1596         ;;
1597 esac
1598
1599 ###     Checks for programs.
1600
1601 # Check whether --with-ada or --without-ada was given.
1602 if test "${with_ada+set}" = set; then
1603   withval="$with_ada"
1604   cf_with_ada=$withval
1605 else
1606   cf_with_ada=yes
1607 fi;
1608
1609 if test "x$cf_with_ada" = xyes
1610 then
1611         cf_prog_cc="gnatgcc gcc cc"
1612 else
1613         cf_prog_cc="gcc cc"
1614 fi
1615
1616 ac_ext=c
1617 ac_cpp='$CPP $CPPFLAGS'
1618 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1619 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1620 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1621 ac_main_return=return
1622 if test -n "$ac_tool_prefix"; then
1623   for ac_prog in $cf_prog_cc
1624   do
1625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1627 echo "$as_me:1627: checking for $ac_word" >&5
1628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1629 if test "${ac_cv_prog_CC+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   ac_save_IFS=$IFS; IFS=$ac_path_separator
1636 ac_dummy="$PATH"
1637 for ac_dir in $ac_dummy; do
1638   IFS=$ac_save_IFS
1639   test -z "$ac_dir" && ac_dir=.
1640   $as_executable_p "$ac_dir/$ac_word" || continue
1641 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1642 echo "$as_me:1642: found $ac_dir/$ac_word" >&5
1643 break
1644 done
1645
1646 fi
1647 fi
1648 CC=$ac_cv_prog_CC
1649 if test -n "$CC"; then
1650   echo "$as_me:1650: result: $CC" >&5
1651 echo "${ECHO_T}$CC" >&6
1652 else
1653   echo "$as_me:1653: result: no" >&5
1654 echo "${ECHO_T}no" >&6
1655 fi
1656
1657     test -n "$CC" && break
1658   done
1659 fi
1660 if test -z "$CC"; then
1661   ac_ct_CC=$CC
1662   for ac_prog in $cf_prog_cc
1663 do
1664   # Extract the first word of "$ac_prog", so it can be a program name with args.
1665 set dummy $ac_prog; ac_word=$2
1666 echo "$as_me:1666: checking for $ac_word" >&5
1667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1668 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1669   echo $ECHO_N "(cached) $ECHO_C" >&6
1670 else
1671   if test -n "$ac_ct_CC"; then
1672   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1673 else
1674   ac_save_IFS=$IFS; IFS=$ac_path_separator
1675 ac_dummy="$PATH"
1676 for ac_dir in $ac_dummy; do
1677   IFS=$ac_save_IFS
1678   test -z "$ac_dir" && ac_dir=.
1679   $as_executable_p "$ac_dir/$ac_word" || continue
1680 ac_cv_prog_ac_ct_CC="$ac_prog"
1681 echo "$as_me:1681: found $ac_dir/$ac_word" >&5
1682 break
1683 done
1684
1685 fi
1686 fi
1687 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1688 if test -n "$ac_ct_CC"; then
1689   echo "$as_me:1689: result: $ac_ct_CC" >&5
1690 echo "${ECHO_T}$ac_ct_CC" >&6
1691 else
1692   echo "$as_me:1692: result: no" >&5
1693 echo "${ECHO_T}no" >&6
1694 fi
1695
1696   test -n "$ac_ct_CC" && break
1697 done
1698
1699   CC=$ac_ct_CC
1700 fi
1701
1702 test -z "$CC" && { { echo "$as_me:1702: error: no acceptable cc found in \$PATH" >&5
1703 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1704    { (exit 1); exit 1; }; }
1705
1706 # Provide some information about the compiler.
1707 echo "$as_me:1707:" \
1708      "checking for C compiler version" >&5
1709 ac_compiler=`set X $ac_compile; echo $2`
1710 { (eval echo "$as_me:1710: \"$ac_compiler --version </dev/null >&5\"") >&5
1711   (eval $ac_compiler --version </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715 { (eval echo "$as_me:1715: \"$ac_compiler -v </dev/null >&5\"") >&5
1716   (eval $ac_compiler -v </dev/null >&5) 2>&5
1717   ac_status=$?
1718   echo "$as_me:1718: \$? = $ac_status" >&5
1719   (exit $ac_status); }
1720 { (eval echo "$as_me:1720: \"$ac_compiler -V </dev/null >&5\"") >&5
1721   (eval $ac_compiler -V </dev/null >&5) 2>&5
1722   ac_status=$?
1723   echo "$as_me:1723: \$? = $ac_status" >&5
1724   (exit $ac_status); }
1725
1726 cat >conftest.$ac_ext <<_ACEOF
1727 #line 1727 "configure"
1728 #include "confdefs.h"
1729
1730 int
1731 main (void)
1732 {
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 ac_clean_files_save=$ac_clean_files
1739 ac_clean_files="$ac_clean_files a.out a.exe"
1740 # Try to create an executable without -o first, disregard a.out.
1741 # It will help us diagnose broken compilers, and finding out an intuition
1742 # of exeext.
1743 echo "$as_me:1743: checking for C compiler default output" >&5
1744 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1745 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1746 if { (eval echo "$as_me:1746: \"$ac_link_default\"") >&5
1747   (eval $ac_link_default) 2>&5
1748   ac_status=$?
1749   echo "$as_me:1749: \$? = $ac_status" >&5
1750   (exit $ac_status); }; then
1751   # Find the output, starting from the most likely.  This scheme is
1752 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1753 # resort.
1754 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1755                 ls a.out conftest 2>/dev/null;
1756                 ls a.* conftest.* 2>/dev/null`; do
1757   case $ac_file in
1758     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1759     a.out ) # We found the default executable, but exeext='' is most
1760             # certainly right.
1761             break;;
1762     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1763           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1764           export ac_cv_exeext
1765           break;;
1766     * ) break;;
1767   esac
1768 done
1769 else
1770   echo "$as_me: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1772 { { echo "$as_me:1772: error: C compiler cannot create executables" >&5
1773 echo "$as_me: error: C compiler cannot create executables" >&2;}
1774    { (exit 77); exit 77; }; }
1775 fi
1776
1777 ac_exeext=$ac_cv_exeext
1778 echo "$as_me:1778: result: $ac_file" >&5
1779 echo "${ECHO_T}$ac_file" >&6
1780
1781 # Check the compiler produces executables we can run.  If not, either
1782 # the compiler is broken, or we cross compile.
1783 echo "$as_me:1783: checking whether the C compiler works" >&5
1784 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1785 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1786 # If not cross compiling, check that we can run a simple program.
1787 if test "$cross_compiling" != yes; then
1788   if { ac_try='./$ac_file'
1789   { (eval echo "$as_me:1789: \"$ac_try\"") >&5
1790   (eval $ac_try) 2>&5
1791   ac_status=$?
1792   echo "$as_me:1792: \$? = $ac_status" >&5
1793   (exit $ac_status); }; }; then
1794     cross_compiling=no
1795   else
1796     if test "$cross_compiling" = maybe; then
1797         cross_compiling=yes
1798     else
1799         { { echo "$as_me:1799: error: cannot run C compiled programs.
1800 If you meant to cross compile, use \`--host'." >&5
1801 echo "$as_me: error: cannot run C compiled programs.
1802 If you meant to cross compile, use \`--host'." >&2;}
1803    { (exit 1); exit 1; }; }
1804     fi
1805   fi
1806 fi
1807 echo "$as_me:1807: result: yes" >&5
1808 echo "${ECHO_T}yes" >&6
1809
1810 rm -f a.out a.exe conftest$ac_cv_exeext
1811 ac_clean_files=$ac_clean_files_save
1812 # Check the compiler produces executables we can run.  If not, either
1813 # the compiler is broken, or we cross compile.
1814 echo "$as_me:1814: checking whether we are cross compiling" >&5
1815 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1816 echo "$as_me:1816: result: $cross_compiling" >&5
1817 echo "${ECHO_T}$cross_compiling" >&6
1818
1819 echo "$as_me:1819: checking for executable suffix" >&5
1820 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1821 if { (eval echo "$as_me:1821: \"$ac_link\"") >&5
1822   (eval $ac_link) 2>&5
1823   ac_status=$?
1824   echo "$as_me:1824: \$? = $ac_status" >&5
1825   (exit $ac_status); }; then
1826   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1827 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1828 # work properly (i.e., refer to `conftest.exe'), while it won't with
1829 # `rm'.
1830 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1831   case $ac_file in
1832     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1833     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1834           export ac_cv_exeext
1835           break;;
1836     * ) break;;
1837   esac
1838 done
1839 else
1840   { { echo "$as_me:1840: error: cannot compute EXEEXT: cannot compile and link" >&5
1841 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1842    { (exit 1); exit 1; }; }
1843 fi
1844
1845 rm -f conftest$ac_cv_exeext
1846 echo "$as_me:1846: result: $ac_cv_exeext" >&5
1847 echo "${ECHO_T}$ac_cv_exeext" >&6
1848
1849 rm -f conftest.$ac_ext
1850 EXEEXT=$ac_cv_exeext
1851 ac_exeext=$EXEEXT
1852 echo "$as_me:1852: checking for object suffix" >&5
1853 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1854 if test "${ac_cv_objext+set}" = set; then
1855   echo $ECHO_N "(cached) $ECHO_C" >&6
1856 else
1857   cat >conftest.$ac_ext <<_ACEOF
1858 #line 1858 "configure"
1859 #include "confdefs.h"
1860
1861 int
1862 main (void)
1863 {
1864
1865   ;
1866   return 0;
1867 }
1868 _ACEOF
1869 rm -f conftest.o conftest.obj
1870 if { (eval echo "$as_me:1870: \"$ac_compile\"") >&5
1871   (eval $ac_compile) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; then
1875   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1876   case $ac_file in
1877     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1878     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1879        break;;
1880   esac
1881 done
1882 else
1883   echo "$as_me: failed program was:" >&5
1884 cat conftest.$ac_ext >&5
1885 { { echo "$as_me:1885: error: cannot compute OBJEXT: cannot compile" >&5
1886 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1887    { (exit 1); exit 1; }; }
1888 fi
1889
1890 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1891 fi
1892 echo "$as_me:1892: result: $ac_cv_objext" >&5
1893 echo "${ECHO_T}$ac_cv_objext" >&6
1894 OBJEXT=$ac_cv_objext
1895 ac_objext=$OBJEXT
1896 echo "$as_me:1896: checking whether we are using the GNU C compiler" >&5
1897 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1898 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1899   echo $ECHO_N "(cached) $ECHO_C" >&6
1900 else
1901   cat >conftest.$ac_ext <<_ACEOF
1902 #line 1902 "configure"
1903 #include "confdefs.h"
1904
1905 int
1906 main (void)
1907 {
1908 #ifndef __GNUC__
1909        choke me
1910 #endif
1911
1912   ;
1913   return 0;
1914 }
1915 _ACEOF
1916 rm -f conftest.$ac_objext
1917 if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918   (eval $ac_compile) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); } &&
1922          { ac_try='test -s conftest.$ac_objext'
1923   { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924   (eval $ac_try) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit $ac_status); }; }; then
1928   ac_compiler_gnu=yes
1929 else
1930   echo "$as_me: failed program was:" >&5
1931 cat conftest.$ac_ext >&5
1932 ac_compiler_gnu=no
1933 fi
1934 rm -f conftest.$ac_objext conftest.$ac_ext
1935 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1936
1937 fi
1938 echo "$as_me:1938: result: $ac_cv_c_compiler_gnu" >&5
1939 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1940 GCC=`test $ac_compiler_gnu = yes && echo yes`
1941 ac_test_CFLAGS=${CFLAGS+set}
1942 ac_save_CFLAGS=$CFLAGS
1943 CFLAGS="-g"
1944 echo "$as_me:1944: checking whether $CC accepts -g" >&5
1945 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1946 if test "${ac_cv_prog_cc_g+set}" = set; then
1947   echo $ECHO_N "(cached) $ECHO_C" >&6
1948 else
1949   cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952
1953 int
1954 main (void)
1955 {
1956
1957   ;
1958   return 0;
1959 }
1960 _ACEOF
1961 rm -f conftest.$ac_objext
1962 if { (eval echo "$as_me:1962: \"$ac_compile\"") >&5
1963   (eval $ac_compile) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); } &&
1967          { ac_try='test -s conftest.$ac_objext'
1968   { (eval echo "$as_me:1968: \"$ac_try\"") >&5
1969   (eval $ac_try) 2>&5
1970   ac_status=$?
1971   echo "$as_me:1971: \$? = $ac_status" >&5
1972   (exit $ac_status); }; }; then
1973   ac_cv_prog_cc_g=yes
1974 else
1975   echo "$as_me: failed program was:" >&5
1976 cat conftest.$ac_ext >&5
1977 ac_cv_prog_cc_g=no
1978 fi
1979 rm -f conftest.$ac_objext conftest.$ac_ext
1980 fi
1981 echo "$as_me:1981: result: $ac_cv_prog_cc_g" >&5
1982 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1983 if test "$ac_test_CFLAGS" = set; then
1984   CFLAGS=$ac_save_CFLAGS
1985 elif test $ac_cv_prog_cc_g = yes; then
1986   if test "$GCC" = yes; then
1987     CFLAGS="-g -O2"
1988   else
1989     CFLAGS="-g"
1990   fi
1991 else
1992   if test "$GCC" = yes; then
1993     CFLAGS="-O2"
1994   else
1995     CFLAGS=
1996   fi
1997 fi
1998 # Some people use a C++ compiler to compile C.  Since we use `exit',
1999 # in C++ we need to declare it.  In case someone uses the same compiler
2000 # for both compiling C and C++ we need to have the C++ compiler decide
2001 # the declaration of exit, since it's the most demanding environment.
2002 cat >conftest.$ac_ext <<_ACEOF
2003 #ifndef __cplusplus
2004   choke me
2005 #endif
2006 _ACEOF
2007 rm -f conftest.$ac_objext
2008 if { (eval echo "$as_me:2008: \"$ac_compile\"") >&5
2009   (eval $ac_compile) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); } &&
2013          { ac_try='test -s conftest.$ac_objext'
2014   { (eval echo "$as_me:2014: \"$ac_try\"") >&5
2015   (eval $ac_try) 2>&5
2016   ac_status=$?
2017   echo "$as_me:2017: \$? = $ac_status" >&5
2018   (exit $ac_status); }; }; then
2019   for ac_declaration in \
2020    ''\
2021    '#include <stdlib.h>' \
2022    'extern "C" void std::exit (int) throw (); using std::exit;' \
2023    'extern "C" void std::exit (int); using std::exit;' \
2024    'extern "C" void exit (int) throw ();' \
2025    'extern "C" void exit (int);' \
2026    'void exit (int);'
2027 do
2028   cat >conftest.$ac_ext <<_ACEOF
2029 #line 2029 "configure"
2030 #include "confdefs.h"
2031 #include <stdlib.h>
2032 $ac_declaration
2033 int
2034 main (void)
2035 {
2036 exit (42);
2037   ;
2038   return 0;
2039 }
2040 _ACEOF
2041 rm -f conftest.$ac_objext
2042 if { (eval echo "$as_me:2042: \"$ac_compile\"") >&5
2043   (eval $ac_compile) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); } &&
2047          { ac_try='test -s conftest.$ac_objext'
2048   { (eval echo "$as_me:2048: \"$ac_try\"") >&5
2049   (eval $ac_try) 2>&5
2050   ac_status=$?
2051   echo "$as_me:2051: \$? = $ac_status" >&5
2052   (exit $ac_status); }; }; then
2053   :
2054 else
2055   echo "$as_me: failed program was:" >&5
2056 cat conftest.$ac_ext >&5
2057 continue
2058 fi
2059 rm -f conftest.$ac_objext conftest.$ac_ext
2060   cat >conftest.$ac_ext <<_ACEOF
2061 #line 2061 "configure"
2062 #include "confdefs.h"
2063 $ac_declaration
2064 int
2065 main (void)
2066 {
2067 exit (42);
2068   ;
2069   return 0;
2070 }
2071 _ACEOF
2072 rm -f conftest.$ac_objext
2073 if { (eval echo "$as_me:2073: \"$ac_compile\"") >&5
2074   (eval $ac_compile) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); } &&
2078          { ac_try='test -s conftest.$ac_objext'
2079   { (eval echo "$as_me:2079: \"$ac_try\"") >&5
2080   (eval $ac_try) 2>&5
2081   ac_status=$?
2082   echo "$as_me:2082: \$? = $ac_status" >&5
2083   (exit $ac_status); }; }; then
2084   break
2085 else
2086   echo "$as_me: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 fi
2089 rm -f conftest.$ac_objext conftest.$ac_ext
2090 done
2091 rm -rf conftest*
2092 if test -n "$ac_declaration"; then
2093   echo '#ifdef __cplusplus' >>confdefs.h
2094   echo $ac_declaration      >>confdefs.h
2095   echo '#endif'             >>confdefs.h
2096 fi
2097
2098 else
2099   echo "$as_me: failed program was:" >&5
2100 cat conftest.$ac_ext >&5
2101 fi
2102 rm -f conftest.$ac_objext conftest.$ac_ext
2103 ac_ext=c
2104 ac_cpp='$CPP $CPPFLAGS'
2105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2108 ac_main_return=return
2109
2110 GCC_VERSION=none
2111 if test "$GCC" = yes ; then
2112         echo "$as_me:2112: checking version of $CC" >&5
2113 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2114         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2115         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2116         echo "$as_me:2116: result: $GCC_VERSION" >&5
2117 echo "${ECHO_T}$GCC_VERSION" >&6
2118 fi
2119
2120 INTEL_COMPILER=no
2121
2122 if test "$GCC" = yes ; then
2123         case $host_os in
2124         (linux*|gnu*)
2125                 echo "$as_me:2125: checking if this is really Intel C compiler" >&5
2126 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2127                 cf_save_CFLAGS="$CFLAGS"
2128                 CFLAGS="$CFLAGS -no-gcc"
2129                 cat >conftest.$ac_ext <<_ACEOF
2130 #line 2130 "configure"
2131 #include "confdefs.h"
2132
2133 int
2134 main (void)
2135 {
2136
2137 #ifdef __INTEL_COMPILER
2138 #else
2139 make an error
2140 #endif
2141
2142   ;
2143   return 0;
2144 }
2145 _ACEOF
2146 rm -f conftest.$ac_objext
2147 if { (eval echo "$as_me:2147: \"$ac_compile\"") >&5
2148   (eval $ac_compile) 2>&5
2149   ac_status=$?
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } &&
2152          { ac_try='test -s conftest.$ac_objext'
2153   { (eval echo "$as_me:2153: \"$ac_try\"") >&5
2154   (eval $ac_try) 2>&5
2155   ac_status=$?
2156   echo "$as_me:2156: \$? = $ac_status" >&5
2157   (exit $ac_status); }; }; then
2158   INTEL_COMPILER=yes
2159 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2160
2161 else
2162   echo "$as_me: failed program was:" >&5
2163 cat conftest.$ac_ext >&5
2164 fi
2165 rm -f conftest.$ac_objext conftest.$ac_ext
2166                 CFLAGS="$cf_save_CFLAGS"
2167                 echo "$as_me:2167: result: $INTEL_COMPILER" >&5
2168 echo "${ECHO_T}$INTEL_COMPILER" >&6
2169                 ;;
2170         esac
2171 fi
2172
2173 CLANG_COMPILER=no
2174
2175 if test "$GCC" = yes ; then
2176         echo "$as_me:2176: checking if this is really Clang C compiler" >&5
2177 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2178         cf_save_CFLAGS="$CFLAGS"
2179         CFLAGS="$CFLAGS -Qunused-arguments"
2180         cat >conftest.$ac_ext <<_ACEOF
2181 #line 2181 "configure"
2182 #include "confdefs.h"
2183
2184 int
2185 main (void)
2186 {
2187
2188 #ifdef __clang__
2189 #else
2190 make an error
2191 #endif
2192
2193   ;
2194   return 0;
2195 }
2196 _ACEOF
2197 rm -f conftest.$ac_objext
2198 if { (eval echo "$as_me:2198: \"$ac_compile\"") >&5
2199   (eval $ac_compile) 2>&5
2200   ac_status=$?
2201   echo "$as_me:2201: \$? = $ac_status" >&5
2202   (exit $ac_status); } &&
2203          { ac_try='test -s conftest.$ac_objext'
2204   { (eval echo "$as_me:2204: \"$ac_try\"") >&5
2205   (eval $ac_try) 2>&5
2206   ac_status=$?
2207   echo "$as_me:2207: \$? = $ac_status" >&5
2208   (exit $ac_status); }; }; then
2209   CLANG_COMPILER=yes
2210 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
2211
2212 else
2213   echo "$as_me: failed program was:" >&5
2214 cat conftest.$ac_ext >&5
2215 fi
2216 rm -f conftest.$ac_objext conftest.$ac_ext
2217         CFLAGS="$cf_save_CFLAGS"
2218         echo "$as_me:2218: result: $CLANG_COMPILER" >&5
2219 echo "${ECHO_T}$CLANG_COMPILER" >&6
2220 fi
2221
2222 echo "$as_me:2222: checking for $CC option to accept ANSI C" >&5
2223 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2224 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2225   echo $ECHO_N "(cached) $ECHO_C" >&6
2226 else
2227   ac_cv_prog_cc_stdc=no
2228 ac_save_CC=$CC
2229 cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <stdarg.h>
2233 #include <stdio.h>
2234 #include <sys/types.h>
2235 #include <sys/stat.h>
2236 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2237 struct buf { int x; };
2238 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2239 static char *e (p, i)
2240      char **p;
2241      int i;
2242 {
2243   return p[i];
2244 }
2245 static char *f (char * (*g) (char **, int), char **p, ...)
2246 {
2247   char *s;
2248   va_list v;
2249   va_start (v,p);
2250   s = g (p, va_arg (v,int));
2251   va_end (v);
2252   return s;
2253 }
2254 int test (int i, double x);
2255 struct s1 {int (*f) (int a);};
2256 struct s2 {int (*f) (double a);};
2257 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2258 int argc;
2259 char **argv;
2260 int
2261 main (void)
2262 {
2263 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2264   ;
2265   return 0;
2266 }
2267 _ACEOF
2268 # Don't try gcc -ansi; that turns off useful extensions and
2269 # breaks some systems' header files.
2270 # AIX                   -qlanglvl=ansi
2271 # Ultrix and OSF/1      -std1
2272 # HP-UX 10.20 and later -Ae
2273 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2274 # SVR4                  -Xc -D__EXTENSIONS__
2275 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2276 do
2277   CC="$ac_save_CC $ac_arg"
2278   rm -f conftest.$ac_objext
2279 if { (eval echo "$as_me:2279: \"$ac_compile\"") >&5
2280   (eval $ac_compile) 2>&5
2281   ac_status=$?
2282   echo "$as_me:2282: \$? = $ac_status" >&5
2283   (exit $ac_status); } &&
2284          { ac_try='test -s conftest.$ac_objext'
2285   { (eval echo "$as_me:2285: \"$ac_try\"") >&5
2286   (eval $ac_try) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit $ac_status); }; }; then
2290   ac_cv_prog_cc_stdc=$ac_arg
2291 break
2292 else
2293   echo "$as_me: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 fi
2296 rm -f conftest.$ac_objext
2297 done
2298 rm -f conftest.$ac_ext conftest.$ac_objext
2299 CC=$ac_save_CC
2300
2301 fi
2302
2303 case "x$ac_cv_prog_cc_stdc" in
2304   x|xno)
2305     echo "$as_me:2305: result: none needed" >&5
2306 echo "${ECHO_T}none needed" >&6 ;;
2307   *)
2308     echo "$as_me:2308: result: $ac_cv_prog_cc_stdc" >&5
2309 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2310     CC="$CC $ac_cv_prog_cc_stdc" ;;
2311 esac
2312
2313 # This should have been defined by AC_PROG_CC
2314 : ${CC:=cc}
2315
2316 echo "$as_me:2316: checking \$CFLAGS variable" >&5
2317 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2318 case "x$CFLAGS" in
2319 (*-[IUD]*)
2320         echo "$as_me:2320: result: broken" >&5
2321 echo "${ECHO_T}broken" >&6
2322         { echo "$as_me:2322: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2323 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2324         cf_flags="$CFLAGS"
2325         CFLAGS=
2326         for cf_arg in $cf_flags
2327         do
2328
2329 cf_fix_cppflags=no
2330 cf_new_cflags=
2331 cf_new_cppflags=
2332 cf_new_extra_cppflags=
2333
2334 for cf_add_cflags in $cf_arg
2335 do
2336 case $cf_fix_cppflags in
2337 (no)
2338         case $cf_add_cflags in
2339         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2340                 case $cf_add_cflags in
2341                 (-D*)
2342                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2343
2344                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2345                                 && test -z "${cf_tst_cflags}" \
2346                                 && cf_fix_cppflags=yes
2347
2348                         if test $cf_fix_cppflags = yes ; then
2349
2350         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2351         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2352
2353                                 continue
2354                         elif test "${cf_tst_cflags}" = "\"'" ; then
2355
2356         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2357         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2358
2359                                 continue
2360                         fi
2361                         ;;
2362                 esac
2363                 case "$CPPFLAGS" in
2364                 (*$cf_add_cflags)
2365                         ;;
2366                 (*)
2367                         case $cf_add_cflags in
2368                         (-D*)
2369                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2370
2371 CPPFLAGS=`echo "$CPPFLAGS" | \
2372         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2373                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2374
2375                                 ;;
2376                         esac
2377
2378         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2379         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2380
2381                         ;;
2382                 esac
2383                 ;;
2384         (*)
2385
2386         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2387         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2388
2389                 ;;
2390         esac
2391         ;;
2392 (yes)
2393
2394         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2395         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2396
2397         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2398
2399         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2400                 && test -z "${cf_tst_cflags}" \
2401                 && cf_fix_cppflags=no
2402         ;;
2403 esac
2404 done
2405
2406 if test -n "$cf_new_cflags" ; then
2407
2408         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2409         CFLAGS="${CFLAGS}$cf_new_cflags"
2410
2411 fi
2412
2413 if test -n "$cf_new_cppflags" ; then
2414
2415         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2416         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2417
2418 fi
2419
2420 if test -n "$cf_new_extra_cppflags" ; then
2421
2422         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2423         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2424
2425 fi
2426
2427         done
2428         ;;
2429 (*)
2430         echo "$as_me:2430: result: ok" >&5
2431 echo "${ECHO_T}ok" >&6
2432         ;;
2433 esac
2434
2435 echo "$as_me:2435: checking \$CC variable" >&5
2436 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2437 case "$CC" in
2438 (*[\ \  ]-*)
2439         echo "$as_me:2439: result: broken" >&5
2440 echo "${ECHO_T}broken" >&6
2441         { echo "$as_me:2441: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2442 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2443         # humor him...
2444         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2445         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2446         CC="$cf_prog"
2447         for cf_arg in $cf_flags
2448         do
2449                 case "x$cf_arg" in
2450                 (x-[IUDfgOW]*)
2451
2452 cf_fix_cppflags=no
2453 cf_new_cflags=
2454 cf_new_cppflags=
2455 cf_new_extra_cppflags=
2456
2457 for cf_add_cflags in $cf_arg
2458 do
2459 case $cf_fix_cppflags in
2460 (no)
2461         case $cf_add_cflags in
2462         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2463                 case $cf_add_cflags in
2464                 (-D*)
2465                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2466
2467                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2468                                 && test -z "${cf_tst_cflags}" \
2469                                 && cf_fix_cppflags=yes
2470
2471                         if test $cf_fix_cppflags = yes ; then
2472
2473         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2474         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2475
2476                                 continue
2477                         elif test "${cf_tst_cflags}" = "\"'" ; then
2478
2479         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2480         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2481
2482                                 continue
2483                         fi
2484                         ;;
2485                 esac
2486                 case "$CPPFLAGS" in
2487                 (*$cf_add_cflags)
2488                         ;;
2489                 (*)
2490                         case $cf_add_cflags in
2491                         (-D*)
2492                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2493
2494 CPPFLAGS=`echo "$CPPFLAGS" | \
2495         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2496                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2497
2498                                 ;;
2499                         esac
2500
2501         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2502         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2503
2504                         ;;
2505                 esac
2506                 ;;
2507         (*)
2508
2509         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2510         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2511
2512                 ;;
2513         esac
2514         ;;
2515 (yes)
2516
2517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2519
2520         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2521
2522         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2523                 && test -z "${cf_tst_cflags}" \
2524                 && cf_fix_cppflags=no
2525         ;;
2526 esac
2527 done
2528
2529 if test -n "$cf_new_cflags" ; then
2530
2531         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2532         CFLAGS="${CFLAGS}$cf_new_cflags"
2533
2534 fi
2535
2536 if test -n "$cf_new_cppflags" ; then
2537
2538         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2539         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2540
2541 fi
2542
2543 if test -n "$cf_new_extra_cppflags" ; then
2544
2545         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2546         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2547
2548 fi
2549
2550                         ;;
2551                 (*)
2552                         CC="$CC $cf_arg"
2553                         ;;
2554                 esac
2555         done
2556         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2557
2558 echo "${as_me:-configure}:2558: testing resulting CC: '$CC' ..." 1>&5
2559
2560         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2561
2562 echo "${as_me:-configure}:2562: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2563
2564         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2565
2566 echo "${as_me:-configure}:2566: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2567
2568         ;;
2569 (*)
2570         echo "$as_me:2570: result: ok" >&5
2571 echo "${ECHO_T}ok" >&6
2572         ;;
2573 esac
2574
2575 ac_ext=c
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580 ac_main_return=return
2581 echo "$as_me:2581: checking how to run the C preprocessor" >&5
2582 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2583 # On Suns, sometimes $CPP names a directory.
2584 if test -n "$CPP" && test -d "$CPP"; then
2585   CPP=
2586 fi
2587 if test -z "$CPP"; then
2588   if test "${ac_cv_prog_CPP+set}" = set; then
2589   echo $ECHO_N "(cached) $ECHO_C" >&6
2590 else
2591       # Double quotes because CPP needs to be expanded
2592     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2593     do
2594       ac_preproc_ok=false
2595 for ac_c_preproc_warn_flag in '' yes
2596 do
2597   # Use a header file that comes with gcc, so configuring glibc
2598   # with a fresh cross-compiler works.
2599   # On the NeXT, cc -E runs the code through the compiler's parser,
2600   # not just through cpp. "Syntax error" is here to catch this case.
2601   cat >conftest.$ac_ext <<_ACEOF
2602 #line 2602 "configure"
2603 #include "confdefs.h"
2604 #include <assert.h>
2605                      Syntax error
2606 _ACEOF
2607 if { (eval echo "$as_me:2607: \"$ac_cpp conftest.$ac_ext\"") >&5
2608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2609   ac_status=$?
2610   egrep -v '^ *\+' conftest.er1 >conftest.err
2611   rm -f conftest.er1
2612   cat conftest.err >&5
2613   echo "$as_me:2613: \$? = $ac_status" >&5
2614   (exit $ac_status); } >/dev/null; then
2615   if test -s conftest.err; then
2616     ac_cpp_err=$ac_c_preproc_warn_flag
2617   else
2618     ac_cpp_err=
2619   fi
2620 else
2621   ac_cpp_err=yes
2622 fi
2623 if test -z "$ac_cpp_err"; then
2624   :
2625 else
2626   echo "$as_me: failed program was:" >&5
2627   cat conftest.$ac_ext >&5
2628   # Broken: fails on valid input.
2629 continue
2630 fi
2631 rm -f conftest.err conftest.$ac_ext
2632
2633   # OK, works on sane cases.  Now check whether non-existent headers
2634   # can be detected and how.
2635   cat >conftest.$ac_ext <<_ACEOF
2636 #line 2636 "configure"
2637 #include "confdefs.h"
2638 #include <ac_nonexistent.h>
2639 _ACEOF
2640 if { (eval echo "$as_me:2640: \"$ac_cpp conftest.$ac_ext\"") >&5
2641   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2642   ac_status=$?
2643   egrep -v '^ *\+' conftest.er1 >conftest.err
2644   rm -f conftest.er1
2645   cat conftest.err >&5
2646   echo "$as_me:2646: \$? = $ac_status" >&5
2647   (exit $ac_status); } >/dev/null; then
2648   if test -s conftest.err; then
2649     ac_cpp_err=$ac_c_preproc_warn_flag
2650   else
2651     ac_cpp_err=
2652   fi
2653 else
2654   ac_cpp_err=yes
2655 fi
2656 if test -z "$ac_cpp_err"; then
2657   # Broken: success on invalid input.
2658 continue
2659 else
2660   echo "$as_me: failed program was:" >&5
2661   cat conftest.$ac_ext >&5
2662   # Passes both tests.
2663 ac_preproc_ok=:
2664 break
2665 fi
2666 rm -f conftest.err conftest.$ac_ext
2667
2668 done
2669 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2670 rm -f conftest.err conftest.$ac_ext
2671 if $ac_preproc_ok; then
2672   break
2673 fi
2674
2675     done
2676     ac_cv_prog_CPP=$CPP
2677
2678 fi
2679   CPP=$ac_cv_prog_CPP
2680 else
2681   ac_cv_prog_CPP=$CPP
2682 fi
2683 echo "$as_me:2683: result: $CPP" >&5
2684 echo "${ECHO_T}$CPP" >&6
2685 ac_preproc_ok=false
2686 for ac_c_preproc_warn_flag in '' yes
2687 do
2688   # Use a header file that comes with gcc, so configuring glibc
2689   # with a fresh cross-compiler works.
2690   # On the NeXT, cc -E runs the code through the compiler's parser,
2691   # not just through cpp. "Syntax error" is here to catch this case.
2692   cat >conftest.$ac_ext <<_ACEOF
2693 #line 2693 "configure"
2694 #include "confdefs.h"
2695 #include <assert.h>
2696                      Syntax error
2697 _ACEOF
2698 if { (eval echo "$as_me:2698: \"$ac_cpp conftest.$ac_ext\"") >&5
2699   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2700   ac_status=$?
2701   egrep -v '^ *\+' conftest.er1 >conftest.err
2702   rm -f conftest.er1
2703   cat conftest.err >&5
2704   echo "$as_me:2704: \$? = $ac_status" >&5
2705   (exit $ac_status); } >/dev/null; then
2706   if test -s conftest.err; then
2707     ac_cpp_err=$ac_c_preproc_warn_flag
2708   else
2709     ac_cpp_err=
2710   fi
2711 else
2712   ac_cpp_err=yes
2713 fi
2714 if test -z "$ac_cpp_err"; then
2715   :
2716 else
2717   echo "$as_me: failed program was:" >&5
2718   cat conftest.$ac_ext >&5
2719   # Broken: fails on valid input.
2720 continue
2721 fi
2722 rm -f conftest.err conftest.$ac_ext
2723
2724   # OK, works on sane cases.  Now check whether non-existent headers
2725   # can be detected and how.
2726   cat >conftest.$ac_ext <<_ACEOF
2727 #line 2727 "configure"
2728 #include "confdefs.h"
2729 #include <ac_nonexistent.h>
2730 _ACEOF
2731 if { (eval echo "$as_me:2731: \"$ac_cpp conftest.$ac_ext\"") >&5
2732   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2733   ac_status=$?
2734   egrep -v '^ *\+' conftest.er1 >conftest.err
2735   rm -f conftest.er1
2736   cat conftest.err >&5
2737   echo "$as_me:2737: \$? = $ac_status" >&5
2738   (exit $ac_status); } >/dev/null; then
2739   if test -s conftest.err; then
2740     ac_cpp_err=$ac_c_preproc_warn_flag
2741   else
2742     ac_cpp_err=
2743   fi
2744 else
2745   ac_cpp_err=yes
2746 fi
2747 if test -z "$ac_cpp_err"; then
2748   # Broken: success on invalid input.
2749 continue
2750 else
2751   echo "$as_me: failed program was:" >&5
2752   cat conftest.$ac_ext >&5
2753   # Passes both tests.
2754 ac_preproc_ok=:
2755 break
2756 fi
2757 rm -f conftest.err conftest.$ac_ext
2758
2759 done
2760 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2761 rm -f conftest.err conftest.$ac_ext
2762 if $ac_preproc_ok; then
2763   :
2764 else
2765   { { echo "$as_me:2765: error: C preprocessor \"$CPP\" fails sanity check" >&5
2766 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2767    { (exit 1); exit 1; }; }
2768 fi
2769
2770 ac_ext=c
2771 ac_cpp='$CPP $CPPFLAGS'
2772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2775 ac_main_return=return
2776
2777 if test $ac_cv_c_compiler_gnu = yes; then
2778     echo "$as_me:2778: checking whether $CC needs -traditional" >&5
2779 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2780 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2781   echo $ECHO_N "(cached) $ECHO_C" >&6
2782 else
2783     ac_pattern="Autoconf.*'x'"
2784   cat >conftest.$ac_ext <<_ACEOF
2785 #line 2785 "configure"
2786 #include "confdefs.h"
2787 #include <sgtty.h>
2788 int Autoconf = TIOCGETP;
2789 _ACEOF
2790 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2791   egrep "$ac_pattern" >/dev/null 2>&1; then
2792   ac_cv_prog_gcc_traditional=yes
2793 else
2794   ac_cv_prog_gcc_traditional=no
2795 fi
2796 rm -rf conftest*
2797
2798   if test $ac_cv_prog_gcc_traditional = no; then
2799     cat >conftest.$ac_ext <<_ACEOF
2800 #line 2800 "configure"
2801 #include "confdefs.h"
2802 #include <termio.h>
2803 int Autoconf = TCGETA;
2804 _ACEOF
2805 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2806   egrep "$ac_pattern" >/dev/null 2>&1; then
2807   ac_cv_prog_gcc_traditional=yes
2808 fi
2809 rm -rf conftest*
2810
2811   fi
2812 fi
2813 echo "$as_me:2813: result: $ac_cv_prog_gcc_traditional" >&5
2814 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2815   if test $ac_cv_prog_gcc_traditional = yes; then
2816     CC="$CC -traditional"
2817   fi
2818 fi
2819
2820 echo "$as_me:2820: checking whether $CC understands -c and -o together" >&5
2821 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2822 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2823   echo $ECHO_N "(cached) $ECHO_C" >&6
2824 else
2825
2826 cat > conftest.$ac_ext <<CF_EOF
2827 int main(void)
2828 {
2829         ${cf_cv_main_return:-return}(0);
2830 }
2831 CF_EOF
2832 # We do the test twice because some compilers refuse to overwrite an
2833 # existing .o file with -o, though they will create one.
2834 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2835 if { (eval echo "$as_me:2835: \"$ac_try\"") >&5
2836   (eval $ac_try) 2>&5
2837   ac_status=$?
2838   echo "$as_me:2838: \$? = $ac_status" >&5
2839   (exit $ac_status); } &&
2840   test -f conftest2.$ac_objext && { (eval echo "$as_me:2840: \"$ac_try\"") >&5
2841   (eval $ac_try) 2>&5
2842   ac_status=$?
2843   echo "$as_me:2843: \$? = $ac_status" >&5
2844   (exit $ac_status); };
2845 then
2846   eval cf_cv_prog_CC_c_o=yes
2847 else
2848   eval cf_cv_prog_CC_c_o=no
2849 fi
2850 rm -rf conftest*
2851
2852 fi
2853 if test $cf_cv_prog_CC_c_o = yes; then
2854   echo "$as_me:2854: result: yes" >&5
2855 echo "${ECHO_T}yes" >&6
2856 else
2857   echo "$as_me:2857: result: no" >&5
2858 echo "${ECHO_T}no" >&6
2859 fi
2860
2861 if test "$cross_compiling" = yes ; then
2862         LDCONFIG=:
2863 else
2864         case "$cf_cv_system_name" in
2865         (dragonfly*|mirbsd*|freebsd*)
2866                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2867                 ;;
2868         (*) LDPATH=$PATH:/sbin:/usr/sbin
2869                 # Extract the first word of "ldconfig", so it can be a program name with args.
2870 set dummy ldconfig; ac_word=$2
2871 echo "$as_me:2871: checking for $ac_word" >&5
2872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2873 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876   case $LDCONFIG in
2877   [\\/]* | ?:[\\/]*)
2878   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2879   ;;
2880   *)
2881   ac_save_IFS=$IFS; IFS=$ac_path_separator
2882 ac_dummy="$LDPATH"
2883 for ac_dir in $ac_dummy; do
2884   IFS=$ac_save_IFS
2885   test -z "$ac_dir" && ac_dir=.
2886   if $as_executable_p "$ac_dir/$ac_word"; then
2887    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2888    echo "$as_me:2888: found $ac_dir/$ac_word" >&5
2889    break
2890 fi
2891 done
2892
2893   ;;
2894 esac
2895 fi
2896 LDCONFIG=$ac_cv_path_LDCONFIG
2897
2898 if test -n "$LDCONFIG"; then
2899   echo "$as_me:2899: result: $LDCONFIG" >&5
2900 echo "${ECHO_T}$LDCONFIG" >&6
2901 else
2902   echo "$as_me:2902: result: no" >&5
2903 echo "${ECHO_T}no" >&6
2904 fi
2905
2906                 ;;
2907         esac
2908 fi
2909
2910 echo "$as_me:2910: checking if you want to ensure bool is consistent with C++" >&5
2911 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2912
2913 # Check whether --with-cxx or --without-cxx was given.
2914 if test "${with_cxx+set}" = set; then
2915   withval="$with_cxx"
2916   cf_with_cxx=$withval
2917 else
2918   cf_with_cxx=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_cxx" >&5
2921 echo "${ECHO_T}$cf_with_cxx" >&6
2922 if test "X$cf_with_cxx" = Xno ; then
2923         CXX=""
2924         GXX=""
2925 else
2926         # with autoconf 2.13, we can change the error to a warning:
2927                 ac_ext=cc
2928 ac_cpp='$CXXCPP $CPPFLAGS'
2929 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2930 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2931 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2932 ac_main_return=return
2933 if test -n "$ac_tool_prefix"; then
2934   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2935   do
2936     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2937 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2938 echo "$as_me:2938: checking for $ac_word" >&5
2939 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2940 if test "${ac_cv_prog_CXX+set}" = set; then
2941   echo $ECHO_N "(cached) $ECHO_C" >&6
2942 else
2943   if test -n "$CXX"; then
2944   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2945 else
2946   ac_save_IFS=$IFS; IFS=$ac_path_separator
2947 ac_dummy="$PATH"
2948 for ac_dir in $ac_dummy; do
2949   IFS=$ac_save_IFS
2950   test -z "$ac_dir" && ac_dir=.
2951   $as_executable_p "$ac_dir/$ac_word" || continue
2952 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2953 echo "$as_me:2953: found $ac_dir/$ac_word" >&5
2954 break
2955 done
2956
2957 fi
2958 fi
2959 CXX=$ac_cv_prog_CXX
2960 if test -n "$CXX"; then
2961   echo "$as_me:2961: result: $CXX" >&5
2962 echo "${ECHO_T}$CXX" >&6
2963 else
2964   echo "$as_me:2964: result: no" >&5
2965 echo "${ECHO_T}no" >&6
2966 fi
2967
2968     test -n "$CXX" && break
2969   done
2970 fi
2971 if test -z "$CXX"; then
2972   ac_ct_CXX=$CXX
2973   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2974 do
2975   # Extract the first word of "$ac_prog", so it can be a program name with args.
2976 set dummy $ac_prog; ac_word=$2
2977 echo "$as_me:2977: checking for $ac_word" >&5
2978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2979 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if test -n "$ac_ct_CXX"; then
2983   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2984 else
2985   ac_save_IFS=$IFS; IFS=$ac_path_separator
2986 ac_dummy="$PATH"
2987 for ac_dir in $ac_dummy; do
2988   IFS=$ac_save_IFS
2989   test -z "$ac_dir" && ac_dir=.
2990   $as_executable_p "$ac_dir/$ac_word" || continue
2991 ac_cv_prog_ac_ct_CXX="$ac_prog"
2992 echo "$as_me:2992: found $ac_dir/$ac_word" >&5
2993 break
2994 done
2995
2996 fi
2997 fi
2998 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2999 if test -n "$ac_ct_CXX"; then
3000   echo "$as_me:3000: result: $ac_ct_CXX" >&5
3001 echo "${ECHO_T}$ac_ct_CXX" >&6
3002 else
3003   echo "$as_me:3003: result: no" >&5
3004 echo "${ECHO_T}no" >&6
3005 fi
3006
3007   test -n "$ac_ct_CXX" && break
3008 done
3009 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3010
3011   CXX=$ac_ct_CXX
3012 fi
3013
3014 # Provide some information about the compiler.
3015 echo "$as_me:3015:" \
3016      "checking for C++ compiler version" >&5
3017 ac_compiler=`set X $ac_compile; echo $2`
3018 { (eval echo "$as_me:3018: \"$ac_compiler --version </dev/null >&5\"") >&5
3019   (eval $ac_compiler --version </dev/null >&5) 2>&5
3020   ac_status=$?
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit $ac_status); }
3023 { (eval echo "$as_me:3023: \"$ac_compiler -v </dev/null >&5\"") >&5
3024   (eval $ac_compiler -v </dev/null >&5) 2>&5
3025   ac_status=$?
3026   echo "$as_me:3026: \$? = $ac_status" >&5
3027   (exit $ac_status); }
3028 { (eval echo "$as_me:3028: \"$ac_compiler -V </dev/null >&5\"") >&5
3029   (eval $ac_compiler -V </dev/null >&5) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }
3033
3034 echo "$as_me:3034: checking whether we are using the GNU C++ compiler" >&5
3035 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3036 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   cat >conftest.$ac_ext <<_ACEOF
3040 #line 3040 "configure"
3041 #include "confdefs.h"
3042
3043 int
3044 main (void)
3045 {
3046 #ifndef __GNUC__
3047        choke me
3048 #endif
3049
3050   ;
3051   return 0;
3052 }
3053 _ACEOF
3054 rm -f conftest.$ac_objext
3055 if { (eval echo "$as_me:3055: \"$ac_compile\"") >&5
3056   (eval $ac_compile) 2>&5
3057   ac_status=$?
3058   echo "$as_me:3058: \$? = $ac_status" >&5
3059   (exit $ac_status); } &&
3060          { ac_try='test -s conftest.$ac_objext'
3061   { (eval echo "$as_me:3061: \"$ac_try\"") >&5
3062   (eval $ac_try) 2>&5
3063   ac_status=$?
3064   echo "$as_me:3064: \$? = $ac_status" >&5
3065   (exit $ac_status); }; }; then
3066   ac_compiler_gnu=yes
3067 else
3068   echo "$as_me: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 ac_compiler_gnu=no
3071 fi
3072 rm -f conftest.$ac_objext conftest.$ac_ext
3073 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3074
3075 fi
3076 echo "$as_me:3076: result: $ac_cv_cxx_compiler_gnu" >&5
3077 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3078 GXX=`test $ac_compiler_gnu = yes && echo yes`
3079 ac_test_CXXFLAGS=${CXXFLAGS+set}
3080 ac_save_CXXFLAGS=$CXXFLAGS
3081 CXXFLAGS="-g"
3082 echo "$as_me:3082: checking whether $CXX accepts -g" >&5
3083 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3084 if test "${ac_cv_prog_cxx_g+set}" = set; then
3085   echo $ECHO_N "(cached) $ECHO_C" >&6
3086 else
3087   cat >conftest.$ac_ext <<_ACEOF
3088 #line 3088 "configure"
3089 #include "confdefs.h"
3090
3091 int
3092 main (void)
3093 {
3094
3095   ;
3096   return 0;
3097 }
3098 _ACEOF
3099 rm -f conftest.$ac_objext
3100 if { (eval echo "$as_me:3100: \"$ac_compile\"") >&5
3101   (eval $ac_compile) 2>&5
3102   ac_status=$?
3103   echo "$as_me:3103: \$? = $ac_status" >&5
3104   (exit $ac_status); } &&
3105          { ac_try='test -s conftest.$ac_objext'
3106   { (eval echo "$as_me:3106: \"$ac_try\"") >&5
3107   (eval $ac_try) 2>&5
3108   ac_status=$?
3109   echo "$as_me:3109: \$? = $ac_status" >&5
3110   (exit $ac_status); }; }; then
3111   ac_cv_prog_cxx_g=yes
3112 else
3113   echo "$as_me: failed program was:" >&5
3114 cat conftest.$ac_ext >&5
3115 ac_cv_prog_cxx_g=no
3116 fi
3117 rm -f conftest.$ac_objext conftest.$ac_ext
3118 fi
3119 echo "$as_me:3119: result: $ac_cv_prog_cxx_g" >&5
3120 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3121 if test "$ac_test_CXXFLAGS" = set; then
3122   CXXFLAGS=$ac_save_CXXFLAGS
3123 elif test $ac_cv_prog_cxx_g = yes; then
3124   if test "$GXX" = yes; then
3125     CXXFLAGS="-g -O2"
3126   else
3127     CXXFLAGS="-g"
3128   fi
3129 else
3130   if test "$GXX" = yes; then
3131     CXXFLAGS="-O2"
3132   else
3133     CXXFLAGS=
3134   fi
3135 fi
3136 for ac_declaration in \
3137    ''\
3138    '#include <stdlib.h>' \
3139    'extern "C" void std::exit (int) throw (); using std::exit;' \
3140    'extern "C" void std::exit (int); using std::exit;' \
3141    'extern "C" void exit (int) throw ();' \
3142    'extern "C" void exit (int);' \
3143    'void exit (int);'
3144 do
3145   cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <stdlib.h>
3149 $ac_declaration
3150 int
3151 main (void)
3152 {
3153 exit (42);
3154   ;
3155   return 0;
3156 }
3157 _ACEOF
3158 rm -f conftest.$ac_objext
3159 if { (eval echo "$as_me:3159: \"$ac_compile\"") >&5
3160   (eval $ac_compile) 2>&5
3161   ac_status=$?
3162   echo "$as_me:3162: \$? = $ac_status" >&5
3163   (exit $ac_status); } &&
3164          { ac_try='test -s conftest.$ac_objext'
3165   { (eval echo "$as_me:3165: \"$ac_try\"") >&5
3166   (eval $ac_try) 2>&5
3167   ac_status=$?
3168   echo "$as_me:3168: \$? = $ac_status" >&5
3169   (exit $ac_status); }; }; then
3170   :
3171 else
3172   echo "$as_me: failed program was:" >&5
3173 cat conftest.$ac_ext >&5
3174 continue
3175 fi
3176 rm -f conftest.$ac_objext conftest.$ac_ext
3177   cat >conftest.$ac_ext <<_ACEOF
3178 #line 3178 "configure"
3179 #include "confdefs.h"
3180 $ac_declaration
3181 int
3182 main (void)
3183 {
3184 exit (42);
3185   ;
3186   return 0;
3187 }
3188 _ACEOF
3189 rm -f conftest.$ac_objext
3190 if { (eval echo "$as_me:3190: \"$ac_compile\"") >&5
3191   (eval $ac_compile) 2>&5
3192   ac_status=$?
3193   echo "$as_me:3193: \$? = $ac_status" >&5
3194   (exit $ac_status); } &&
3195          { ac_try='test -s conftest.$ac_objext'
3196   { (eval echo "$as_me:3196: \"$ac_try\"") >&5
3197   (eval $ac_try) 2>&5
3198   ac_status=$?
3199   echo "$as_me:3199: \$? = $ac_status" >&5
3200   (exit $ac_status); }; }; then
3201   break
3202 else
3203   echo "$as_me: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3205 fi
3206 rm -f conftest.$ac_objext conftest.$ac_ext
3207 done
3208 rm -rf conftest*
3209 if test -n "$ac_declaration"; then
3210   echo '#ifdef __cplusplus' >>confdefs.h
3211   echo $ac_declaration      >>confdefs.h
3212   echo '#endif'             >>confdefs.h
3213 fi
3214
3215 ac_ext=c
3216 ac_cpp='$CPP $CPPFLAGS'
3217 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3218 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3219 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3220 ac_main_return=return
3221
3222         ac_ext=cc
3223 ac_cpp='$CXXCPP $CPPFLAGS'
3224 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3227 ac_main_return=return
3228
3229         if test "x$cf_with_cxx" != xno
3230         then
3231                 # Several of the C++ configurations do not work, particularly when
3232                 # cross-compiling (20140913 -TD)
3233                 echo "$as_me:3233: checking if $CXX works" >&5
3234 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3235
3236                 save_CPPFLAGS="$CPPFLAGS"
3237                 eval cf_includedir=${includedir}
3238                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3239
3240 cat >conftest.$ac_ext <<_ACEOF
3241 #line 3241 "configure"
3242 #include "confdefs.h"
3243
3244 #include <stdlib.h>
3245 #include <stdio.h>
3246
3247 int
3248 main (void)
3249 {
3250
3251                 printf("Hello world!\n")
3252
3253   ;
3254   return 0;
3255 }
3256 _ACEOF
3257 rm -f conftest.$ac_objext
3258 if { (eval echo "$as_me:3258: \"$ac_compile\"") >&5
3259   (eval $ac_compile) 2>&5
3260   ac_status=$?
3261   echo "$as_me:3261: \$? = $ac_status" >&5
3262   (exit $ac_status); } &&
3263          { ac_try='test -s conftest.$ac_objext'
3264   { (eval echo "$as_me:3264: \"$ac_try\"") >&5
3265   (eval $ac_try) 2>&5
3266   ac_status=$?
3267   echo "$as_me:3267: \$? = $ac_status" >&5
3268   (exit $ac_status); }; }; then
3269   cf_cxx_works=yes
3270 else
3271   echo "$as_me: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3273 cf_cxx_works=no
3274 fi
3275 rm -f conftest.$ac_objext conftest.$ac_ext
3276                 CPPFLAGS="$save_CPPFLAGS"
3277
3278                 echo "$as_me:3278: result: $cf_cxx_works" >&5
3279 echo "${ECHO_T}$cf_cxx_works" >&6
3280                 if test "x$cf_cxx_works" = xno
3281                 then
3282                         { echo "$as_me:3282: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3283 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3284                         cf_with_cxx=no; CXX=""; GXX="";
3285                 fi
3286         fi
3287         ac_ext=c
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3290 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3291 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3292 ac_main_return=return
3293
3294         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3295         if test "$CXX" = "g++" ; then
3296                 # Extract the first word of "g++", so it can be a program name with args.
3297 set dummy g++; ac_word=$2
3298 echo "$as_me:3298: checking for $ac_word" >&5
3299 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3300 if test "${ac_cv_path_CXX+set}" = set; then
3301   echo $ECHO_N "(cached) $ECHO_C" >&6
3302 else
3303   case $CXX in
3304   [\\/]* | ?:[\\/]*)
3305   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3306   ;;
3307   *)
3308   ac_save_IFS=$IFS; IFS=$ac_path_separator
3309 ac_dummy="$PATH"
3310 for ac_dir in $ac_dummy; do
3311   IFS=$ac_save_IFS
3312   test -z "$ac_dir" && ac_dir=.
3313   if $as_executable_p "$ac_dir/$ac_word"; then
3314    ac_cv_path_CXX="$ac_dir/$ac_word"
3315    echo "$as_me:3315: found $ac_dir/$ac_word" >&5
3316    break
3317 fi
3318 done
3319
3320   ;;
3321 esac
3322 fi
3323 CXX=$ac_cv_path_CXX
3324
3325 if test -n "$CXX"; then
3326   echo "$as_me:3326: result: $CXX" >&5
3327 echo "${ECHO_T}$CXX" >&6
3328 else
3329   echo "$as_me:3329: result: no" >&5
3330 echo "${ECHO_T}no" >&6
3331 fi
3332
3333         fi
3334         case "x$CXX" in
3335         (x|xg++)
3336                 { echo "$as_me:3336: WARNING: You don't have any C++ compiler, too bad" >&5
3337 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3338                 cf_with_cxx=no; CXX=""; GXX="";
3339                 ;;
3340         esac
3341 fi
3342
3343 GXX_VERSION=none
3344 if test "$GXX" = yes; then
3345         echo "$as_me:3345: checking version of ${CXX:-g++}" >&5
3346 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3347         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3348         if test -z "$GXX_VERSION"
3349         then
3350                 GXX_VERSION=unknown
3351                 GXX=no
3352         fi
3353         echo "$as_me:3353: result: $GXX_VERSION" >&5
3354 echo "${ECHO_T}$GXX_VERSION" >&6
3355 fi
3356
3357 case $GXX_VERSION in
3358 (1*|2.[0-6]*)
3359         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3360         # cf_cxx_library=no
3361         { echo "$as_me:3361: WARNING: templates do not work" >&5
3362 echo "$as_me: WARNING: templates do not work" >&2;}
3363         ;;
3364 esac
3365
3366 echo "$as_me:3366: checking if you want to build C++ binding and demo" >&5
3367 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3368
3369 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3370 if test "${with_cxx_binding+set}" = set; then
3371   withval="$with_cxx_binding"
3372   cf_with_cxx_binding=$withval
3373 else
3374   cf_with_cxx_binding=$cf_with_cxx
3375 fi;
3376 echo "$as_me:3376: result: $cf_with_cxx_binding" >&5
3377 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3378
3379 echo "$as_me:3379: checking if you want to build with Ada" >&5
3380 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3381 echo "$as_me:3381: result: $cf_with_ada" >&5
3382 echo "${ECHO_T}$cf_with_ada" >&6
3383
3384 echo "$as_me:3384: checking if you want to install terminal database" >&5
3385 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3386
3387 # Check whether --enable-db-install or --disable-db-install was given.
3388 if test "${enable_db_install+set}" = set; then
3389   enableval="$enable_db_install"
3390   cf_with_db_install=$enableval
3391 else
3392   cf_with_db_install=yes
3393 fi;
3394 echo "$as_me:3394: result: $cf_with_db_install" >&5
3395 echo "${ECHO_T}$cf_with_db_install" >&6
3396
3397 echo "$as_me:3397: checking if you want to install manpages" >&5
3398 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3399
3400 # Check whether --with-manpages or --without-manpages was given.
3401 if test "${with_manpages+set}" = set; then
3402   withval="$with_manpages"
3403   cf_with_manpages=$withval
3404 else
3405   cf_with_manpages=yes
3406 fi;
3407 echo "$as_me:3407: result: $cf_with_manpages" >&5
3408 echo "${ECHO_T}$cf_with_manpages" >&6
3409
3410 echo "$as_me:3410: checking if you want to build programs such as tic" >&5
3411 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3412
3413 # Check whether --with-progs or --without-progs was given.
3414 if test "${with_progs+set}" = set; then
3415   withval="$with_progs"
3416   cf_with_progs=$withval
3417 else
3418   cf_with_progs=yes
3419 fi;
3420 echo "$as_me:3420: result: $cf_with_progs" >&5
3421 echo "${ECHO_T}$cf_with_progs" >&6
3422
3423 if test -f $srcdir/tack/tack.h; then
3424         if test "x$cross_compiling" = xyes ; then
3425                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3426
3427 echo "${as_me:-configure}:3427: testing ignoring tack because we are cross-compiling ..." 1>&5
3428
3429                 cf_with_tack=no
3430         else
3431                 echo "$as_me:3431: checking if you want to build the tack program" >&5
3432 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3433
3434 # Check whether --with-tack or --without-tack was given.
3435 if test "${with_tack+set}" = set; then
3436   withval="$with_tack"
3437   cf_with_tack=$withval
3438 else
3439   cf_with_tack=$cf_with_progs
3440 fi;
3441                 echo "$as_me:3441: result: $cf_with_tack" >&5
3442 echo "${ECHO_T}$cf_with_tack" >&6
3443         fi
3444 else
3445         cf_with_tack=no
3446 fi
3447
3448 echo "$as_me:3448: checking if you want to build test-programs" >&5
3449 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3450
3451 # Check whether --with-tests or --without-tests was given.
3452 if test "${with_tests+set}" = set; then
3453   withval="$with_tests"
3454   cf_with_tests=$withval
3455 else
3456   cf_with_tests=yes
3457 fi;
3458 echo "$as_me:3458: result: $cf_with_tests" >&5
3459 echo "${ECHO_T}$cf_with_tests" >&6
3460
3461 echo "$as_me:3461: checking if you wish to install curses.h" >&5
3462 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3463
3464 # Check whether --with-curses-h or --without-curses-h was given.
3465 if test "${with_curses_h+set}" = set; then
3466   withval="$with_curses_h"
3467   with_curses_h=$withval
3468 else
3469   with_curses_h=yes
3470 fi;
3471 echo "$as_me:3471: result: $with_curses_h" >&5
3472 echo "${ECHO_T}$with_curses_h" >&6
3473
3474 modules_to_build="ncurses"
3475 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3476 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3477 modules_to_build="$modules_to_build panel menu form"
3478
3479 test "$program_prefix" != NONE &&
3480   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3481 # Use a double $ so make ignores it.
3482 test "$program_suffix" != NONE &&
3483   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3484 # Double any \ or $.  echo might interpret backslashes.
3485 # By default was `s,x,x', remove it if useless.
3486 cat <<\_ACEOF >conftest.sed
3487 s/[\\$]/&&/g;s/;s,x,x,$//
3488 _ACEOF
3489 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3490 rm conftest.sed
3491
3492 for ac_prog in mawk gawk nawk awk
3493 do
3494   # Extract the first word of "$ac_prog", so it can be a program name with args.
3495 set dummy $ac_prog; ac_word=$2
3496 echo "$as_me:3496: checking for $ac_word" >&5
3497 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3498 if test "${ac_cv_prog_AWK+set}" = set; then
3499   echo $ECHO_N "(cached) $ECHO_C" >&6
3500 else
3501   if test -n "$AWK"; then
3502   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3503 else
3504   ac_save_IFS=$IFS; IFS=$ac_path_separator
3505 ac_dummy="$PATH"
3506 for ac_dir in $ac_dummy; do
3507   IFS=$ac_save_IFS
3508   test -z "$ac_dir" && ac_dir=.
3509   $as_executable_p "$ac_dir/$ac_word" || continue
3510 ac_cv_prog_AWK="$ac_prog"
3511 echo "$as_me:3511: found $ac_dir/$ac_word" >&5
3512 break
3513 done
3514
3515 fi
3516 fi
3517 AWK=$ac_cv_prog_AWK
3518 if test -n "$AWK"; then
3519   echo "$as_me:3519: result: $AWK" >&5
3520 echo "${ECHO_T}$AWK" >&6
3521 else
3522   echo "$as_me:3522: result: no" >&5
3523 echo "${ECHO_T}no" >&6
3524 fi
3525
3526   test -n "$AWK" && break
3527 done
3528
3529 test -z "$AWK" && { { echo "$as_me:3529: error: No awk program found" >&5
3530 echo "$as_me: error: No awk program found" >&2;}
3531    { (exit 1); exit 1; }; }
3532
3533 echo "$as_me:3533: checking for egrep" >&5
3534 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3535 if test "${ac_cv_prog_egrep+set}" = set; then
3536   echo $ECHO_N "(cached) $ECHO_C" >&6
3537 else
3538   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3539                 then ac_cv_prog_egrep='grep -E'
3540                 else ac_cv_prog_egrep='egrep'
3541         fi
3542 fi
3543 echo "$as_me:3543: result: $ac_cv_prog_egrep" >&5
3544 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3545         EGREP=$ac_cv_prog_egrep
3546
3547         test -z "$EGREP" && { { echo "$as_me:3547: error: No egrep program found" >&5
3548 echo "$as_me: error: No egrep program found" >&2;}
3549    { (exit 1); exit 1; }; }
3550
3551 # Find a good install program.  We prefer a C program (faster),
3552 # so one script is as good as another.  But avoid the broken or
3553 # incompatible versions:
3554 # SysV /etc/install, /usr/sbin/install
3555 # SunOS /usr/etc/install
3556 # IRIX /sbin/install
3557 # AIX /bin/install
3558 # AmigaOS /C/install, which installs bootblocks on floppy discs
3559 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3560 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3561 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 echo "$as_me:3563: checking for a BSD compatible install" >&5
3564 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3565 if test -z "$INSTALL"; then
3566 if test "${ac_cv_path_install+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569     ac_save_IFS=$IFS; IFS=$ac_path_separator
3570   for ac_dir in $PATH; do
3571     IFS=$ac_save_IFS
3572     # Account for people who put trailing slashes in PATH elements.
3573     case $ac_dir/ in
3574     / | ./ | .// | /cC/* \
3575     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3576     | /usr/ucb/* ) ;;
3577     *)
3578       # OSF1 and SCO ODT 3.0 have their own names for install.
3579       # Don't use installbsd from OSF since it installs stuff as root
3580       # by default.
3581       for ac_prog in ginstall scoinst install; do
3582         if $as_executable_p "$ac_dir/$ac_prog"; then
3583           if test $ac_prog = install &&
3584             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3585             # AIX install.  It has an incompatible calling convention.
3586             :
3587           elif test $ac_prog = install &&
3588             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3589             # program-specific install script used by HP pwplus--don't use.
3590             :
3591           else
3592             ac_cv_path_install="$ac_dir/$ac_prog -c"
3593             break 2
3594           fi
3595         fi
3596       done
3597       ;;
3598     esac
3599   done
3600
3601 fi
3602   if test "${ac_cv_path_install+set}" = set; then
3603     INSTALL=$ac_cv_path_install
3604   else
3605     # As a last resort, use the slow shell script.  We don't cache a
3606     # path for INSTALL within a source directory, because that will
3607     # break other packages using the cache if that directory is
3608     # removed, or if the path is relative.
3609     INSTALL=$ac_install_sh
3610   fi
3611 fi
3612 echo "$as_me:3612: result: $INSTALL" >&5
3613 echo "${ECHO_T}$INSTALL" >&6
3614
3615 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3616 # It thinks the first close brace ends the variable substitution.
3617 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3618
3619 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3620
3621 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3622
3623 case $INSTALL in
3624 (/*)
3625         ;;
3626 (*)
3627         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3628         test -z "$cf_dir" && cf_dir=.
3629         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3630         ;;
3631 esac
3632
3633 for ac_prog in lint cppcheck splint
3634 do
3635   # Extract the first word of "$ac_prog", so it can be a program name with args.
3636 set dummy $ac_prog; ac_word=$2
3637 echo "$as_me:3637: checking for $ac_word" >&5
3638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639 if test "${ac_cv_prog_LINT+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   if test -n "$LINT"; then
3643   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3644 else
3645   ac_save_IFS=$IFS; IFS=$ac_path_separator
3646 ac_dummy="$PATH"
3647 for ac_dir in $ac_dummy; do
3648   IFS=$ac_save_IFS
3649   test -z "$ac_dir" && ac_dir=.
3650   $as_executable_p "$ac_dir/$ac_word" || continue
3651 ac_cv_prog_LINT="$ac_prog"
3652 echo "$as_me:3652: found $ac_dir/$ac_word" >&5
3653 break
3654 done
3655
3656 fi
3657 fi
3658 LINT=$ac_cv_prog_LINT
3659 if test -n "$LINT"; then
3660   echo "$as_me:3660: result: $LINT" >&5
3661 echo "${ECHO_T}$LINT" >&6
3662 else
3663   echo "$as_me:3663: result: no" >&5
3664 echo "${ECHO_T}no" >&6
3665 fi
3666
3667   test -n "$LINT" && break
3668 done
3669
3670 case "x$LINT" in
3671 (xcppcheck|x*/cppcheck)
3672         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3673         ;;
3674 esac
3675
3676 echo "$as_me:3676: checking whether ln -s works" >&5
3677 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3678 LN_S=$as_ln_s
3679 if test "$LN_S" = "ln -s"; then
3680   echo "$as_me:3680: result: yes" >&5
3681 echo "${ECHO_T}yes" >&6
3682 else
3683   echo "$as_me:3683: result: no, using $LN_S" >&5
3684 echo "${ECHO_T}no, using $LN_S" >&6
3685 fi
3686
3687 echo "$as_me:3687: checking if $LN_S -f options work" >&5
3688 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3689
3690 rm -f conf$$.src conf$$dst
3691 echo >conf$$.dst
3692 echo first >conf$$.src
3693 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3694         cf_prog_ln_sf=yes
3695 else
3696         cf_prog_ln_sf=no
3697 fi
3698 rm -f conf$$.dst conf$$src
3699 echo "$as_me:3699: result: $cf_prog_ln_sf" >&5
3700 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3701
3702 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3703
3704 echo "$as_me:3704: checking for long file names" >&5
3705 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3706 if test "${ac_cv_sys_long_file_names+set}" = set; then
3707   echo $ECHO_N "(cached) $ECHO_C" >&6
3708 else
3709   ac_cv_sys_long_file_names=yes
3710 # Test for long file names in all the places we know might matter:
3711 #      .                the current directory, where building will happen
3712 #      $prefix/lib      where we will be installing things
3713 #      $exec_prefix/lib likewise
3714 # eval it to expand exec_prefix.
3715 #      $TMPDIR          if set, where it might want to write temporary files
3716 # if $TMPDIR is not set:
3717 #      /tmp             where it might want to write temporary files
3718 #      /var/tmp         likewise
3719 #      /usr/tmp         likewise
3720 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3721   ac_tmpdirs=$TMPDIR
3722 else
3723   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3724 fi
3725 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3726   test -d $ac_dir || continue
3727   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3728   ac_xdir=$ac_dir/cf$$
3729   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3730   ac_tf1=$ac_xdir/conftest9012345
3731   ac_tf2=$ac_xdir/conftest9012346
3732   (echo 1 >$ac_tf1) 2>/dev/null
3733   (echo 2 >$ac_tf2) 2>/dev/null
3734   ac_val=`cat $ac_tf1 2>/dev/null`
3735   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3736     ac_cv_sys_long_file_names=no
3737     rm -rf $ac_xdir 2>/dev/null
3738     break
3739   fi
3740   rm -rf $ac_xdir 2>/dev/null
3741 done
3742 fi
3743 echo "$as_me:3743: result: $ac_cv_sys_long_file_names" >&5
3744 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3745 if test $ac_cv_sys_long_file_names = yes; then
3746
3747 cat >>confdefs.h <<\EOF
3748 #define HAVE_LONG_FILE_NAMES 1
3749 EOF
3750
3751 fi
3752
3753 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3754 # of package conflict.
3755 cf_config_suffix=
3756
3757 # Check whether --with-config-suffix or --without-config-suffix was given.
3758 if test "${with_config_suffix+set}" = set; then
3759   withval="$with_config_suffix"
3760   case "x$withval" in
3761         (xyes|xno)
3762                 { echo "$as_me:3762: WARNING: expected a value for config-suffix option" >&5
3763 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3764                 ;;
3765         (*)     cf_config_suffix="$withval"
3766                 ;;
3767         esac
3768 fi;
3769
3770 # If we find pkg-config, check if we should install the ".pc" files.
3771
3772 echo "$as_me:3772: checking if you want to use pkg-config" >&5
3773 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3774
3775 # Check whether --with-pkg-config or --without-pkg-config was given.
3776 if test "${with_pkg_config+set}" = set; then
3777   withval="$with_pkg_config"
3778   cf_pkg_config=$withval
3779 else
3780   cf_pkg_config=yes
3781 fi;
3782 echo "$as_me:3782: result: $cf_pkg_config" >&5
3783 echo "${ECHO_T}$cf_pkg_config" >&6
3784
3785 case $cf_pkg_config in
3786 (no)
3787         PKG_CONFIG=none
3788         ;;
3789 (yes)
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   case $PKG_CONFIG in
3800   [\\/]* | ?:[\\/]*)
3801   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3802   ;;
3803   *)
3804   ac_save_IFS=$IFS; IFS=$ac_path_separator
3805 ac_dummy="$PATH"
3806 for ac_dir in $ac_dummy; do
3807   IFS=$ac_save_IFS
3808   test -z "$ac_dir" && ac_dir=.
3809   if $as_executable_p "$ac_dir/$ac_word"; then
3810    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3811    echo "$as_me:3811: found $ac_dir/$ac_word" >&5
3812    break
3813 fi
3814 done
3815
3816   ;;
3817 esac
3818 fi
3819 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3820
3821 if test -n "$PKG_CONFIG"; then
3822   echo "$as_me:3822: result: $PKG_CONFIG" >&5
3823 echo "${ECHO_T}$PKG_CONFIG" >&6
3824 else
3825   echo "$as_me:3825: result: no" >&5
3826 echo "${ECHO_T}no" >&6
3827 fi
3828
3829 fi
3830 if test -z "$ac_cv_path_PKG_CONFIG"; then
3831   ac_pt_PKG_CONFIG=$PKG_CONFIG
3832   # Extract the first word of "pkg-config", so it can be a program name with args.
3833 set dummy pkg-config; ac_word=$2
3834 echo "$as_me:3834: checking for $ac_word" >&5
3835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3836 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3837   echo $ECHO_N "(cached) $ECHO_C" >&6
3838 else
3839   case $ac_pt_PKG_CONFIG in
3840   [\\/]* | ?:[\\/]*)
3841   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3842   ;;
3843   *)
3844   ac_save_IFS=$IFS; IFS=$ac_path_separator
3845 ac_dummy="$PATH"
3846 for ac_dir in $ac_dummy; do
3847   IFS=$ac_save_IFS
3848   test -z "$ac_dir" && ac_dir=.
3849   if $as_executable_p "$ac_dir/$ac_word"; then
3850    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3851    echo "$as_me:3851: found $ac_dir/$ac_word" >&5
3852    break
3853 fi
3854 done
3855
3856   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3857   ;;
3858 esac
3859 fi
3860 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3861
3862 if test -n "$ac_pt_PKG_CONFIG"; then
3863   echo "$as_me:3863: result: $ac_pt_PKG_CONFIG" >&5
3864 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3865 else
3866   echo "$as_me:3866: result: no" >&5
3867 echo "${ECHO_T}no" >&6
3868 fi
3869
3870   PKG_CONFIG=$ac_pt_PKG_CONFIG
3871 else
3872   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3873 fi
3874
3875         ;;
3876 (*)
3877         PKG_CONFIG=$withval
3878         ;;
3879 esac
3880
3881 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3882 if test "$PKG_CONFIG" != none ; then
3883
3884 if test "x$prefix" != xNONE; then
3885         cf_path_syntax="$prefix"
3886 else
3887         cf_path_syntax="$ac_default_prefix"
3888 fi
3889
3890 case ".$PKG_CONFIG" in
3891 (.\$\(*\)*|.\'*\'*)
3892         ;;
3893 (..|./*|.\\*)
3894         ;;
3895 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3896         ;;
3897 (.\${*prefix}*|.\${*dir}*)
3898         eval PKG_CONFIG="$PKG_CONFIG"
3899         case ".$PKG_CONFIG" in
3900         (.NONE/*)
3901                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3902                 ;;
3903         esac
3904         ;;
3905 (.no|.NONE/*)
3906         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3907         ;;
3908 (*)
3909         { { echo "$as_me:3909: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3910 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3911    { (exit 1); exit 1; }; }
3912         ;;
3913 esac
3914
3915 elif test "x$cf_pkg_config" != xno ; then
3916         { echo "$as_me:3916: WARNING: pkg-config is not installed" >&5
3917 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3918 fi
3919
3920 case $PKG_CONFIG in
3921 (no|none|yes)
3922         echo "$as_me:3922: checking for pkg-config library directory" >&5
3923 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3924         ;;
3925 (*)
3926         echo "$as_me:3926: checking for $PKG_CONFIG library directory" >&5
3927 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3928         ;;
3929 esac
3930
3931 PKG_CONFIG_LIBDIR=no
3932
3933 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3934 if test "${with_pkg_config_libdir+set}" = set; then
3935   withval="$with_pkg_config_libdir"
3936   PKG_CONFIG_LIBDIR=$withval
3937 else
3938   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3939 fi;
3940
3941 case x$PKG_CONFIG_LIBDIR in
3942 (x/*)
3943         ;;
3944 (xyes)
3945         # Look for the library directory using the same prefix as the executable
3946         if test "x$PKG_CONFIG" = xnone
3947         then
3948                 cf_path=$prefix
3949         else
3950                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3951         fi
3952
3953         # If you don't like using the default architecture, you have to specify the
3954         # intended library directory and corresponding compiler/linker options.
3955         #
3956         # This case allows for Debian's 2014-flavor of multiarch, along with the
3957         # most common variations before that point.  Some other variants spell the
3958         # directory differently, e.g., "pkg-config", and put it in unusual places.
3959         # pkg-config has always been poorly standardized, which is ironic...
3960         case x`(arch) 2>/dev/null` in
3961         (*64)
3962                 cf_search_path="\
3963                         $cf_path/lib/*64-linux-gnu \
3964                         $cf_path/share \
3965                         $cf_path/lib64 \
3966                         $cf_path/lib32 \
3967                         $cf_path/lib"
3968                 ;;
3969         (*)
3970                 cf_search_path="\
3971                         $cf_path/lib/*-linux-gnu \
3972                         $cf_path/share \
3973                         $cf_path/lib32 \
3974                         $cf_path/lib \
3975                         $cf_path/libdata"
3976                 ;;
3977         esac
3978
3979         test -n "$verbose" && echo "    list..." 1>&6
3980
3981 echo "${as_me:-configure}:3981: testing list... ..." 1>&5
3982
3983         for cf_config in $cf_search_path
3984         do
3985                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3986
3987 echo "${as_me:-configure}:3987: testing checking $cf_config/pkgconfig ..." 1>&5
3988
3989                 if test -d $cf_config/pkgconfig
3990                 then
3991                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3992                         echo "$as_me:3992: checking done" >&5
3993 echo $ECHO_N "checking done... $ECHO_C" >&6
3994                         break
3995                 fi
3996         done
3997         ;;
3998 (*)
3999         ;;
4000 esac
4001
4002 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
4003         echo "$as_me:4003: result: $PKG_CONFIG_LIBDIR" >&5
4004 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4005 fi
4006
4007 if test "x$PKG_CONFIG" != xnone
4008 then
4009         echo "$as_me:4009: checking if we should install .pc files for $PKG_CONFIG" >&5
4010 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4011 else
4012         echo "$as_me:4012: checking if we should install .pc files" >&5
4013 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4014 fi
4015
4016 # Check whether --enable-pc-files or --disable-pc-files was given.
4017 if test "${enable_pc_files+set}" = set; then
4018   enableval="$enable_pc_files"
4019   enable_pc_files=$enableval
4020 else
4021   enable_pc_files=no
4022 fi;
4023 echo "$as_me:4023: result: $enable_pc_files" >&5
4024 echo "${ECHO_T}$enable_pc_files" >&6
4025
4026 if test "x$enable_pc_files" != xno
4027 then
4028         MAKE_PC_FILES=
4029         case "x$PKG_CONFIG_LIBDIR" in
4030         (xno|xyes)
4031                 { echo "$as_me:4031: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4032 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4033                 ;;
4034         (*)
4035
4036 if test "x$prefix" != xNONE; then
4037         cf_path_syntax="$prefix"
4038 else
4039         cf_path_syntax="$ac_default_prefix"
4040 fi
4041
4042 case ".$PKG_CONFIG_LIBDIR" in
4043 (.\$\(*\)*|.\'*\'*)
4044         ;;
4045 (..|./*|.\\*)
4046         ;;
4047 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4048         ;;
4049 (.\${*prefix}*|.\${*dir}*)
4050         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
4051         case ".$PKG_CONFIG_LIBDIR" in
4052         (.NONE/*)
4053                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4054                 ;;
4055         esac
4056         ;;
4057 (.no|.NONE/*)
4058         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
4059         ;;
4060 (*)
4061         { { echo "$as_me:4061: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
4062 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
4063    { (exit 1); exit 1; }; }
4064         ;;
4065 esac
4066
4067                 ;;
4068         esac
4069 else
4070         MAKE_PC_FILES="#"
4071 fi
4072
4073 if test -z "$MAKE_PC_FILES"
4074 then
4075         echo "$as_me:4075: checking for suffix to add to pc-files" >&5
4076 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4077
4078 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4079 if test "${with_pc_suffix+set}" = set; then
4080   withval="$with_pc_suffix"
4081   case "x$withval" in
4082         (xyes|xno)
4083                 PC_MODULE_SUFFIX=
4084                 ;;
4085         (*)     PC_MODULE_SUFFIX="$withval"
4086                 ;;
4087         esac
4088 fi;
4089         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4090         echo "$as_me:4090: result: $PC_MODULE_SUFFIX" >&5
4091 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4092         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4093
4094 fi
4095
4096 echo "$as_me:4096: checking if we should assume mixed-case filenames" >&5
4097 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4098
4099 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4100 if test "${enable_mixed_case+set}" = set; then
4101   enableval="$enable_mixed_case"
4102   enable_mixedcase=$enableval
4103 else
4104   enable_mixedcase=auto
4105 fi;
4106 echo "$as_me:4106: result: $enable_mixedcase" >&5
4107 echo "${ECHO_T}$enable_mixedcase" >&6
4108 if test "$enable_mixedcase" = "auto" ; then
4109
4110 echo "$as_me:4110: checking if filesystem supports mixed-case filenames" >&5
4111 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4112 if test "${cf_cv_mixedcase+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115
4116 if test "$cross_compiling" = yes ; then
4117         case $target_alias in
4118         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4119                 cf_cv_mixedcase=no
4120                 ;;
4121         (*)
4122                 cf_cv_mixedcase=yes
4123                 ;;
4124         esac
4125 else
4126         rm -f conftest CONFTEST
4127         echo test >conftest
4128         if test -f CONFTEST ; then
4129                 cf_cv_mixedcase=no
4130         else
4131                 cf_cv_mixedcase=yes
4132         fi
4133         rm -f conftest CONFTEST
4134 fi
4135
4136 fi
4137 echo "$as_me:4137: result: $cf_cv_mixedcase" >&5
4138 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4139 test "$cf_cv_mixedcase" = yes &&
4140 cat >>confdefs.h <<\EOF
4141 #define MIXEDCASE_FILENAMES 1
4142 EOF
4143
4144 else
4145         cf_cv_mixedcase=$enable_mixedcase
4146         if test "x$enable_mixedcase" = "xyes" ; then
4147
4148 cat >>confdefs.h <<\EOF
4149 #define MIXEDCASE_FILENAMES 1
4150 EOF
4151
4152         fi
4153 fi
4154
4155 # do this after mixed-case option (tags/TAGS is not as important as tic).
4156 echo "$as_me:4156: checking whether ${MAKE-make} sets \${MAKE}" >&5
4157 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4158 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4159 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4160   echo $ECHO_N "(cached) $ECHO_C" >&6
4161 else
4162   cat >conftest.make <<\EOF
4163 all:
4164         @echo 'ac_maketemp="${MAKE}"'
4165 EOF
4166 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4167 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4168 if test -n "$ac_maketemp"; then
4169   eval ac_cv_prog_make_${ac_make}_set=yes
4170 else
4171   eval ac_cv_prog_make_${ac_make}_set=no
4172 fi
4173 rm -f conftest.make
4174 fi
4175 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4176   echo "$as_me:4176: result: yes" >&5
4177 echo "${ECHO_T}yes" >&6
4178   SET_MAKE=
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182   SET_MAKE="MAKE=${MAKE-make}"
4183 fi
4184
4185 for ac_prog in exctags ctags
4186 do
4187   # Extract the first word of "$ac_prog", so it can be a program name with args.
4188 set dummy $ac_prog; ac_word=$2
4189 echo "$as_me:4189: checking for $ac_word" >&5
4190 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4191 if test "${ac_cv_prog_CTAGS+set}" = set; then
4192   echo $ECHO_N "(cached) $ECHO_C" >&6
4193 else
4194   if test -n "$CTAGS"; then
4195   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4196 else
4197   ac_save_IFS=$IFS; IFS=$ac_path_separator
4198 ac_dummy="$PATH"
4199 for ac_dir in $ac_dummy; do
4200   IFS=$ac_save_IFS
4201   test -z "$ac_dir" && ac_dir=.
4202   $as_executable_p "$ac_dir/$ac_word" || continue
4203 ac_cv_prog_CTAGS="$ac_prog"
4204 echo "$as_me:4204: found $ac_dir/$ac_word" >&5
4205 break
4206 done
4207
4208 fi
4209 fi
4210 CTAGS=$ac_cv_prog_CTAGS
4211 if test -n "$CTAGS"; then
4212   echo "$as_me:4212: result: $CTAGS" >&5
4213 echo "${ECHO_T}$CTAGS" >&6
4214 else
4215   echo "$as_me:4215: result: no" >&5
4216 echo "${ECHO_T}no" >&6
4217 fi
4218
4219   test -n "$CTAGS" && break
4220 done
4221
4222 for ac_prog in exetags etags
4223 do
4224   # Extract the first word of "$ac_prog", so it can be a program name with args.
4225 set dummy $ac_prog; ac_word=$2
4226 echo "$as_me:4226: checking for $ac_word" >&5
4227 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4228 if test "${ac_cv_prog_ETAGS+set}" = set; then
4229   echo $ECHO_N "(cached) $ECHO_C" >&6
4230 else
4231   if test -n "$ETAGS"; then
4232   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4233 else
4234   ac_save_IFS=$IFS; IFS=$ac_path_separator
4235 ac_dummy="$PATH"
4236 for ac_dir in $ac_dummy; do
4237   IFS=$ac_save_IFS
4238   test -z "$ac_dir" && ac_dir=.
4239   $as_executable_p "$ac_dir/$ac_word" || continue
4240 ac_cv_prog_ETAGS="$ac_prog"
4241 echo "$as_me:4241: found $ac_dir/$ac_word" >&5
4242 break
4243 done
4244
4245 fi
4246 fi
4247 ETAGS=$ac_cv_prog_ETAGS
4248 if test -n "$ETAGS"; then
4249   echo "$as_me:4249: result: $ETAGS" >&5
4250 echo "${ECHO_T}$ETAGS" >&6
4251 else
4252   echo "$as_me:4252: result: no" >&5
4253 echo "${ECHO_T}no" >&6
4254 fi
4255
4256   test -n "$ETAGS" && break
4257 done
4258
4259 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4260 set dummy ${CTAGS:-ctags}; ac_word=$2
4261 echo "$as_me:4261: checking for $ac_word" >&5
4262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4263 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4264   echo $ECHO_N "(cached) $ECHO_C" >&6
4265 else
4266   if test -n "$MAKE_LOWER_TAGS"; then
4267   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4268 else
4269   ac_save_IFS=$IFS; IFS=$ac_path_separator
4270 ac_dummy="$PATH"
4271 for ac_dir in $ac_dummy; do
4272   IFS=$ac_save_IFS
4273   test -z "$ac_dir" && ac_dir=.
4274   $as_executable_p "$ac_dir/$ac_word" || continue
4275 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4276 echo "$as_me:4276: found $ac_dir/$ac_word" >&5
4277 break
4278 done
4279
4280   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4281 fi
4282 fi
4283 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4284 if test -n "$MAKE_LOWER_TAGS"; then
4285   echo "$as_me:4285: result: $MAKE_LOWER_TAGS" >&5
4286 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4287 else
4288   echo "$as_me:4288: result: no" >&5
4289 echo "${ECHO_T}no" >&6
4290 fi
4291
4292 if test "$cf_cv_mixedcase" = yes ; then
4293         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4294 set dummy ${ETAGS:-etags}; ac_word=$2
4295 echo "$as_me:4295: checking for $ac_word" >&5
4296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4297 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4298   echo $ECHO_N "(cached) $ECHO_C" >&6
4299 else
4300   if test -n "$MAKE_UPPER_TAGS"; then
4301   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4302 else
4303   ac_save_IFS=$IFS; IFS=$ac_path_separator
4304 ac_dummy="$PATH"
4305 for ac_dir in $ac_dummy; do
4306   IFS=$ac_save_IFS
4307   test -z "$ac_dir" && ac_dir=.
4308   $as_executable_p "$ac_dir/$ac_word" || continue
4309 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4310 echo "$as_me:4310: found $ac_dir/$ac_word" >&5
4311 break
4312 done
4313
4314   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4315 fi
4316 fi
4317 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4318 if test -n "$MAKE_UPPER_TAGS"; then
4319   echo "$as_me:4319: result: $MAKE_UPPER_TAGS" >&5
4320 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 else
4327         MAKE_UPPER_TAGS=no
4328 fi
4329
4330 if test "$MAKE_UPPER_TAGS" = yes ; then
4331         MAKE_UPPER_TAGS=
4332 else
4333         MAKE_UPPER_TAGS="#"
4334 fi
4335
4336 if test "$MAKE_LOWER_TAGS" = yes ; then
4337         MAKE_LOWER_TAGS=
4338 else
4339         MAKE_LOWER_TAGS="#"
4340 fi
4341
4342 echo "$as_me:4342: checking for makeflags variable" >&5
4343 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4344 if test "${cf_cv_makeflags+set}" = set; then
4345   echo $ECHO_N "(cached) $ECHO_C" >&6
4346 else
4347
4348         cf_cv_makeflags=''
4349         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4350         do
4351                 cat >cf_makeflags.tmp <<CF_EOF
4352 SHELL = $SHELL
4353 all :
4354         @ echo '.$cf_option'
4355 CF_EOF
4356                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4357                 case "$cf_result" in
4358                 (.*k|.*kw)
4359                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4360                         case "$cf_result" in
4361                         (.*CC=*)        cf_cv_makeflags=
4362                                 ;;
4363                         (*)     cf_cv_makeflags=$cf_option
4364                                 ;;
4365                         esac
4366                         break
4367                         ;;
4368                 (.-)
4369                         ;;
4370                 (*)
4371
4372 echo "${as_me:-configure}:4372: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4373
4374                         ;;
4375                 esac
4376         done
4377         rm -f cf_makeflags.tmp
4378
4379 fi
4380 echo "$as_me:4380: result: $cf_cv_makeflags" >&5
4381 echo "${ECHO_T}$cf_cv_makeflags" >&6
4382
4383 if test -n "$ac_tool_prefix"; then
4384   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4385 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4386 echo "$as_me:4386: checking for $ac_word" >&5
4387 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4388 if test "${ac_cv_prog_RANLIB+set}" = set; then
4389   echo $ECHO_N "(cached) $ECHO_C" >&6
4390 else
4391   if test -n "$RANLIB"; then
4392   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4393 else
4394   ac_save_IFS=$IFS; IFS=$ac_path_separator
4395 ac_dummy="$PATH"
4396 for ac_dir in $ac_dummy; do
4397   IFS=$ac_save_IFS
4398   test -z "$ac_dir" && ac_dir=.
4399   $as_executable_p "$ac_dir/$ac_word" || continue
4400 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4401 echo "$as_me:4401: found $ac_dir/$ac_word" >&5
4402 break
4403 done
4404
4405 fi
4406 fi
4407 RANLIB=$ac_cv_prog_RANLIB
4408 if test -n "$RANLIB"; then
4409   echo "$as_me:4409: result: $RANLIB" >&5
4410 echo "${ECHO_T}$RANLIB" >&6
4411 else
4412   echo "$as_me:4412: result: no" >&5
4413 echo "${ECHO_T}no" >&6
4414 fi
4415
4416 fi
4417 if test -z "$ac_cv_prog_RANLIB"; then
4418   ac_ct_RANLIB=$RANLIB
4419   # Extract the first word of "ranlib", so it can be a program name with args.
4420 set dummy ranlib; ac_word=$2
4421 echo "$as_me:4421: checking for $ac_word" >&5
4422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4423 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4424   echo $ECHO_N "(cached) $ECHO_C" >&6
4425 else
4426   if test -n "$ac_ct_RANLIB"; then
4427   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4428 else
4429   ac_save_IFS=$IFS; IFS=$ac_path_separator
4430 ac_dummy="$PATH"
4431 for ac_dir in $ac_dummy; do
4432   IFS=$ac_save_IFS
4433   test -z "$ac_dir" && ac_dir=.
4434   $as_executable_p "$ac_dir/$ac_word" || continue
4435 ac_cv_prog_ac_ct_RANLIB="ranlib"
4436 echo "$as_me:4436: found $ac_dir/$ac_word" >&5
4437 break
4438 done
4439
4440   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4441 fi
4442 fi
4443 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4444 if test -n "$ac_ct_RANLIB"; then
4445   echo "$as_me:4445: result: $ac_ct_RANLIB" >&5
4446 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4447 else
4448   echo "$as_me:4448: result: no" >&5
4449 echo "${ECHO_T}no" >&6
4450 fi
4451
4452   RANLIB=$ac_ct_RANLIB
4453 else
4454   RANLIB="$ac_cv_prog_RANLIB"
4455 fi
4456
4457 if test -n "$ac_tool_prefix"; then
4458   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4459 set dummy ${ac_tool_prefix}ld; ac_word=$2
4460 echo "$as_me:4460: checking for $ac_word" >&5
4461 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4462 if test "${ac_cv_prog_LD+set}" = set; then
4463   echo $ECHO_N "(cached) $ECHO_C" >&6
4464 else
4465   if test -n "$LD"; then
4466   ac_cv_prog_LD="$LD" # Let the user override the test.
4467 else
4468   ac_save_IFS=$IFS; IFS=$ac_path_separator
4469 ac_dummy="$PATH"
4470 for ac_dir in $ac_dummy; do
4471   IFS=$ac_save_IFS
4472   test -z "$ac_dir" && ac_dir=.
4473   $as_executable_p "$ac_dir/$ac_word" || continue
4474 ac_cv_prog_LD="${ac_tool_prefix}ld"
4475 echo "$as_me:4475: found $ac_dir/$ac_word" >&5
4476 break
4477 done
4478
4479 fi
4480 fi
4481 LD=$ac_cv_prog_LD
4482 if test -n "$LD"; then
4483   echo "$as_me:4483: result: $LD" >&5
4484 echo "${ECHO_T}$LD" >&6
4485 else
4486   echo "$as_me:4486: result: no" >&5
4487 echo "${ECHO_T}no" >&6
4488 fi
4489
4490 fi
4491 if test -z "$ac_cv_prog_LD"; then
4492   ac_ct_LD=$LD
4493   # Extract the first word of "ld", so it can be a program name with args.
4494 set dummy ld; ac_word=$2
4495 echo "$as_me:4495: checking for $ac_word" >&5
4496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4497 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4498   echo $ECHO_N "(cached) $ECHO_C" >&6
4499 else
4500   if test -n "$ac_ct_LD"; then
4501   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4502 else
4503   ac_save_IFS=$IFS; IFS=$ac_path_separator
4504 ac_dummy="$PATH"
4505 for ac_dir in $ac_dummy; do
4506   IFS=$ac_save_IFS
4507   test -z "$ac_dir" && ac_dir=.
4508   $as_executable_p "$ac_dir/$ac_word" || continue
4509 ac_cv_prog_ac_ct_LD="ld"
4510 echo "$as_me:4510: found $ac_dir/$ac_word" >&5
4511 break
4512 done
4513
4514   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4515 fi
4516 fi
4517 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4518 if test -n "$ac_ct_LD"; then
4519   echo "$as_me:4519: result: $ac_ct_LD" >&5
4520 echo "${ECHO_T}$ac_ct_LD" >&6
4521 else
4522   echo "$as_me:4522: result: no" >&5
4523 echo "${ECHO_T}no" >&6
4524 fi
4525
4526   LD=$ac_ct_LD
4527 else
4528   LD="$ac_cv_prog_LD"
4529 fi
4530
4531 if test -n "$ac_tool_prefix"; then
4532   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4533 set dummy ${ac_tool_prefix}ar; ac_word=$2
4534 echo "$as_me:4534: checking for $ac_word" >&5
4535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4536 if test "${ac_cv_prog_AR+set}" = set; then
4537   echo $ECHO_N "(cached) $ECHO_C" >&6
4538 else
4539   if test -n "$AR"; then
4540   ac_cv_prog_AR="$AR" # Let the user override the test.
4541 else
4542   ac_save_IFS=$IFS; IFS=$ac_path_separator
4543 ac_dummy="$PATH"
4544 for ac_dir in $ac_dummy; do
4545   IFS=$ac_save_IFS
4546   test -z "$ac_dir" && ac_dir=.
4547   $as_executable_p "$ac_dir/$ac_word" || continue
4548 ac_cv_prog_AR="${ac_tool_prefix}ar"
4549 echo "$as_me:4549: found $ac_dir/$ac_word" >&5
4550 break
4551 done
4552
4553 fi
4554 fi
4555 AR=$ac_cv_prog_AR
4556 if test -n "$AR"; then
4557   echo "$as_me:4557: result: $AR" >&5
4558 echo "${ECHO_T}$AR" >&6
4559 else
4560   echo "$as_me:4560: result: no" >&5
4561 echo "${ECHO_T}no" >&6
4562 fi
4563
4564 fi
4565 if test -z "$ac_cv_prog_AR"; then
4566   ac_ct_AR=$AR
4567   # Extract the first word of "ar", so it can be a program name with args.
4568 set dummy ar; ac_word=$2
4569 echo "$as_me:4569: checking for $ac_word" >&5
4570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4571 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4572   echo $ECHO_N "(cached) $ECHO_C" >&6
4573 else
4574   if test -n "$ac_ct_AR"; then
4575   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4576 else
4577   ac_save_IFS=$IFS; IFS=$ac_path_separator
4578 ac_dummy="$PATH"
4579 for ac_dir in $ac_dummy; do
4580   IFS=$ac_save_IFS
4581   test -z "$ac_dir" && ac_dir=.
4582   $as_executable_p "$ac_dir/$ac_word" || continue
4583 ac_cv_prog_ac_ct_AR="ar"
4584 echo "$as_me:4584: found $ac_dir/$ac_word" >&5
4585 break
4586 done
4587
4588   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4589 fi
4590 fi
4591 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4592 if test -n "$ac_ct_AR"; then
4593   echo "$as_me:4593: result: $ac_ct_AR" >&5
4594 echo "${ECHO_T}$ac_ct_AR" >&6
4595 else
4596   echo "$as_me:4596: result: no" >&5
4597 echo "${ECHO_T}no" >&6
4598 fi
4599
4600   AR=$ac_ct_AR
4601 else
4602   AR="$ac_cv_prog_AR"
4603 fi
4604
4605 if test -n "$ac_tool_prefix"; then
4606   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4607 set dummy ${ac_tool_prefix}nm; ac_word=$2
4608 echo "$as_me:4608: checking for $ac_word" >&5
4609 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4610 if test "${ac_cv_prog_NM+set}" = set; then
4611   echo $ECHO_N "(cached) $ECHO_C" >&6
4612 else
4613   if test -n "$NM"; then
4614   ac_cv_prog_NM="$NM" # Let the user override the test.
4615 else
4616   ac_save_IFS=$IFS; IFS=$ac_path_separator
4617 ac_dummy="$PATH"
4618 for ac_dir in $ac_dummy; do
4619   IFS=$ac_save_IFS
4620   test -z "$ac_dir" && ac_dir=.
4621   $as_executable_p "$ac_dir/$ac_word" || continue
4622 ac_cv_prog_NM="${ac_tool_prefix}nm"
4623 echo "$as_me:4623: found $ac_dir/$ac_word" >&5
4624 break
4625 done
4626
4627 fi
4628 fi
4629 NM=$ac_cv_prog_NM
4630 if test -n "$NM"; then
4631   echo "$as_me:4631: result: $NM" >&5
4632 echo "${ECHO_T}$NM" >&6
4633 else
4634   echo "$as_me:4634: result: no" >&5
4635 echo "${ECHO_T}no" >&6
4636 fi
4637
4638 fi
4639 if test -z "$ac_cv_prog_NM"; then
4640   ac_ct_NM=$NM
4641   # Extract the first word of "nm", so it can be a program name with args.
4642 set dummy nm; ac_word=$2
4643 echo "$as_me:4643: checking for $ac_word" >&5
4644 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4645 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4646   echo $ECHO_N "(cached) $ECHO_C" >&6
4647 else
4648   if test -n "$ac_ct_NM"; then
4649   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4650 else
4651   ac_save_IFS=$IFS; IFS=$ac_path_separator
4652 ac_dummy="$PATH"
4653 for ac_dir in $ac_dummy; do
4654   IFS=$ac_save_IFS
4655   test -z "$ac_dir" && ac_dir=.
4656   $as_executable_p "$ac_dir/$ac_word" || continue
4657 ac_cv_prog_ac_ct_NM="nm"
4658 echo "$as_me:4658: found $ac_dir/$ac_word" >&5
4659 break
4660 done
4661
4662   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4663 fi
4664 fi
4665 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4666 if test -n "$ac_ct_NM"; then
4667   echo "$as_me:4667: result: $ac_ct_NM" >&5
4668 echo "${ECHO_T}$ac_ct_NM" >&6
4669 else
4670   echo "$as_me:4670: result: no" >&5
4671 echo "${ECHO_T}no" >&6
4672 fi
4673
4674   NM=$ac_ct_NM
4675 else
4676   NM="$ac_cv_prog_NM"
4677 fi
4678
4679 if test -n "$ac_tool_prefix"; then
4680   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4681 set dummy ${ac_tool_prefix}ar; ac_word=$2
4682 echo "$as_me:4682: checking for $ac_word" >&5
4683 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4684 if test "${ac_cv_prog_AR+set}" = set; then
4685   echo $ECHO_N "(cached) $ECHO_C" >&6
4686 else
4687   if test -n "$AR"; then
4688   ac_cv_prog_AR="$AR" # Let the user override the test.
4689 else
4690   ac_save_IFS=$IFS; IFS=$ac_path_separator
4691 ac_dummy="$PATH"
4692 for ac_dir in $ac_dummy; do
4693   IFS=$ac_save_IFS
4694   test -z "$ac_dir" && ac_dir=.
4695   $as_executable_p "$ac_dir/$ac_word" || continue
4696 ac_cv_prog_AR="${ac_tool_prefix}ar"
4697 echo "$as_me:4697: found $ac_dir/$ac_word" >&5
4698 break
4699 done
4700
4701 fi
4702 fi
4703 AR=$ac_cv_prog_AR
4704 if test -n "$AR"; then
4705   echo "$as_me:4705: result: $AR" >&5
4706 echo "${ECHO_T}$AR" >&6
4707 else
4708   echo "$as_me:4708: result: no" >&5
4709 echo "${ECHO_T}no" >&6
4710 fi
4711
4712 fi
4713 if test -z "$ac_cv_prog_AR"; then
4714   ac_ct_AR=$AR
4715   # Extract the first word of "ar", so it can be a program name with args.
4716 set dummy ar; ac_word=$2
4717 echo "$as_me:4717: checking for $ac_word" >&5
4718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4719 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4720   echo $ECHO_N "(cached) $ECHO_C" >&6
4721 else
4722   if test -n "$ac_ct_AR"; then
4723   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4724 else
4725   ac_save_IFS=$IFS; IFS=$ac_path_separator
4726 ac_dummy="$PATH"
4727 for ac_dir in $ac_dummy; do
4728   IFS=$ac_save_IFS
4729   test -z "$ac_dir" && ac_dir=.
4730   $as_executable_p "$ac_dir/$ac_word" || continue
4731 ac_cv_prog_ac_ct_AR="ar"
4732 echo "$as_me:4732: found $ac_dir/$ac_word" >&5
4733 break
4734 done
4735
4736   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4737 fi
4738 fi
4739 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4740 if test -n "$ac_ct_AR"; then
4741   echo "$as_me:4741: result: $ac_ct_AR" >&5
4742 echo "${ECHO_T}$ac_ct_AR" >&6
4743 else
4744   echo "$as_me:4744: result: no" >&5
4745 echo "${ECHO_T}no" >&6
4746 fi
4747
4748   AR=$ac_ct_AR
4749 else
4750   AR="$ac_cv_prog_AR"
4751 fi
4752
4753 echo "$as_me:4753: checking for options to update archives" >&5
4754 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4755 if test "${cf_cv_ar_flags+set}" = set; then
4756   echo $ECHO_N "(cached) $ECHO_C" >&6
4757 else
4758
4759         case $cf_cv_system_name in
4760         (*-msvc*)
4761                 cf_cv_ar_flags=''
4762                 cat >mk_static_lib.sh <<-EOF
4763                 #!$SHELL
4764                 MSVC_BIN="$AR"
4765                 out="\$1"
4766                 shift
4767                 exec \$MSVC_BIN -out:"\$out" \$@
4768                 EOF
4769                 chmod +x mk_static_lib.sh
4770                 AR=`pwd`/mk_static_lib.sh
4771                 ;;
4772         (*)
4773                 cf_cv_ar_flags=unknown
4774                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4775                 do
4776
4777                         # check if $ARFLAGS already contains this choice
4778                         if test "x$ARFLAGS" != "x" ; then
4779                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4780                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4781                                         cf_cv_ar_flags=
4782                                         break
4783                                 fi
4784                         fi
4785
4786                         rm -f conftest.$ac_cv_objext
4787                         rm -f conftest.a
4788
4789                         cat >conftest.$ac_ext <<EOF
4790 #line 4790 "configure"
4791 int     testdata[3] = { 123, 456, 789 };
4792 EOF
4793                         if { (eval echo "$as_me:4793: \"$ac_compile\"") >&5
4794   (eval $ac_compile) 2>&5
4795   ac_status=$?
4796   echo "$as_me:4796: \$? = $ac_status" >&5
4797   (exit $ac_status); } ; then
4798                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4799                                 $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4800                                 if test -f conftest.a ; then
4801                                         cf_cv_ar_flags=$cf_ar_flags
4802                                         break
4803                                 fi
4804                         else
4805                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4806
4807 echo "${as_me:-configure}:4807: testing cannot compile test-program ..." 1>&5
4808
4809                                 break
4810                         fi
4811                 done
4812                 rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4813                 ;;
4814         esac
4815
4816 fi
4817 echo "$as_me:4817: result: $cf_cv_ar_flags" >&5
4818 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4819
4820 if test -n "$ARFLAGS" ; then
4821         if test -n "$cf_cv_ar_flags" ; then
4822                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4823         fi
4824 else
4825         ARFLAGS=$cf_cv_ar_flags
4826 fi
4827
4828 echo "$as_me:4828: checking if you have specified an install-prefix" >&5
4829 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4830
4831 # Check whether --with-install-prefix or --without-install-prefix was given.
4832 if test "${with_install_prefix+set}" = set; then
4833   withval="$with_install_prefix"
4834   case "x$withval" in
4835         (xyes|xno)
4836                 ;;
4837         (*)     DESTDIR="$withval"
4838                 ;;
4839         esac
4840 fi;
4841 echo "$as_me:4841: result: $DESTDIR" >&5
4842 echo "${ECHO_T}$DESTDIR" >&6
4843
4844 ###############################################################################
4845
4846 # If we're cross-compiling, allow the user to override the tools and their
4847 # options.  The configure script is oriented toward identifying the host
4848 # compiler, etc., but we need a build compiler to generate parts of the source.
4849
4850 if test "$cross_compiling" = yes ; then
4851
4852         # defaults that we might want to override
4853         : ${BUILD_CFLAGS:=''}
4854         : ${BUILD_CPPFLAGS:=''}
4855         : ${BUILD_LDFLAGS:=''}
4856         : ${BUILD_LIBS:=''}
4857         : ${BUILD_EXEEXT:='$x'}
4858         : ${BUILD_OBJEXT:='o'}
4859
4860 # Check whether --with-build-cc or --without-build-cc was given.
4861 if test "${with_build_cc+set}" = set; then
4862   withval="$with_build_cc"
4863   BUILD_CC="$withval"
4864 else
4865   for ac_prog in gcc clang c99 c89 cc cl
4866 do
4867   # Extract the first word of "$ac_prog", so it can be a program name with args.
4868 set dummy $ac_prog; ac_word=$2
4869 echo "$as_me:4869: checking for $ac_word" >&5
4870 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4871 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   if test -n "$BUILD_CC"; then
4875   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4876 else
4877   ac_save_IFS=$IFS; IFS=$ac_path_separator
4878 ac_dummy="$PATH"
4879 for ac_dir in $ac_dummy; do
4880   IFS=$ac_save_IFS
4881   test -z "$ac_dir" && ac_dir=.
4882   $as_executable_p "$ac_dir/$ac_word" || continue
4883 ac_cv_prog_BUILD_CC="$ac_prog"
4884 echo "$as_me:4884: found $ac_dir/$ac_word" >&5
4885 break
4886 done
4887
4888 fi
4889 fi
4890 BUILD_CC=$ac_cv_prog_BUILD_CC
4891 if test -n "$BUILD_CC"; then
4892   echo "$as_me:4892: result: $BUILD_CC" >&5
4893 echo "${ECHO_T}$BUILD_CC" >&6
4894 else
4895   echo "$as_me:4895: result: no" >&5
4896 echo "${ECHO_T}no" >&6
4897 fi
4898
4899   test -n "$BUILD_CC" && break
4900 done
4901 test -n "$BUILD_CC" || BUILD_CC="none"
4902
4903 fi;
4904         echo "$as_me:4904: checking for native build C compiler" >&5
4905 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4906         echo "$as_me:4906: result: $BUILD_CC" >&5
4907 echo "${ECHO_T}$BUILD_CC" >&6
4908
4909         echo "$as_me:4909: checking for native build C preprocessor" >&5
4910 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4911
4912 # Check whether --with-build-cpp or --without-build-cpp was given.
4913 if test "${with_build_cpp+set}" = set; then
4914   withval="$with_build_cpp"
4915   BUILD_CPP="$withval"
4916 else
4917   BUILD_CPP='${BUILD_CC} -E'
4918 fi;
4919         echo "$as_me:4919: result: $BUILD_CPP" >&5
4920 echo "${ECHO_T}$BUILD_CPP" >&6
4921
4922         echo "$as_me:4922: checking for native build C flags" >&5
4923 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4924
4925 # Check whether --with-build-cflags or --without-build-cflags was given.
4926 if test "${with_build_cflags+set}" = set; then
4927   withval="$with_build_cflags"
4928   BUILD_CFLAGS="$withval"
4929 fi;
4930         echo "$as_me:4930: result: $BUILD_CFLAGS" >&5
4931 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4932
4933         echo "$as_me:4933: checking for native build C preprocessor-flags" >&5
4934 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4935
4936 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4937 if test "${with_build_cppflags+set}" = set; then
4938   withval="$with_build_cppflags"
4939   BUILD_CPPFLAGS="$withval"
4940 fi;
4941         echo "$as_me:4941: result: $BUILD_CPPFLAGS" >&5
4942 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4943
4944         echo "$as_me:4944: checking for native build linker-flags" >&5
4945 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4946
4947 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4948 if test "${with_build_ldflags+set}" = set; then
4949   withval="$with_build_ldflags"
4950   BUILD_LDFLAGS="$withval"
4951 fi;
4952         echo "$as_me:4952: result: $BUILD_LDFLAGS" >&5
4953 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4954
4955         echo "$as_me:4955: checking for native build linker-libraries" >&5
4956 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4957
4958 # Check whether --with-build-libs or --without-build-libs was given.
4959 if test "${with_build_libs+set}" = set; then
4960   withval="$with_build_libs"
4961   BUILD_LIBS="$withval"
4962 fi;
4963         echo "$as_me:4963: result: $BUILD_LIBS" >&5
4964 echo "${ECHO_T}$BUILD_LIBS" >&6
4965
4966         # this assumes we're on Unix.
4967         BUILD_EXEEXT=
4968         BUILD_OBJEXT=o
4969
4970         : ${BUILD_CC:='${CC}'}
4971
4972         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4973                 { { echo "$as_me:4973: error: Cross-build requires two compilers.
4974 Use --with-build-cc to specify the native compiler." >&5
4975 echo "$as_me: error: Cross-build requires two compilers.
4976 Use --with-build-cc to specify the native compiler." >&2;}
4977    { (exit 1); exit 1; }; }
4978         fi
4979
4980 else
4981         : ${BUILD_CC:='${CC}'}
4982         : ${BUILD_CPP:='${CPP}'}
4983         : ${BUILD_CFLAGS:='${CFLAGS}'}
4984         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4985         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4986         : ${BUILD_LIBS:='${LIBS}'}
4987         : ${BUILD_EXEEXT:='$x'}
4988         : ${BUILD_OBJEXT:='o'}
4989 fi
4990
4991 ###############################################################################
4992
4993 ### Options to allow the user to specify the set of libraries which are used.
4994 ### Use "--without-normal --with-shared" to allow the default model to be
4995 ### shared, for example.
4996 cf_list_models=""
4997
4998 echo "$as_me:4998: checking if libtool -version-number should be used" >&5
4999 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5000
5001 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5002 if test "${enable_libtool_version+set}" = set; then
5003   enableval="$enable_libtool_version"
5004   test "$enableval" != no && enableval=yes
5005         if test "$enableval" != "yes" ; then
5006     cf_libtool_version=no
5007         else
5008                 cf_libtool_version=yes
5009         fi
5010 else
5011   enableval=yes
5012         cf_libtool_version=yes
5013
5014 fi;
5015 echo "$as_me:5015: result: $cf_libtool_version" >&5
5016 echo "${ECHO_T}$cf_libtool_version" >&6
5017
5018 if test "$cf_libtool_version" = yes ; then
5019         LIBTOOL_VERSION="-version-number"
5020 else
5021         LIBTOOL_VERSION="-version-info"
5022         case "x$VERSION" in
5023         (x)
5024                 { echo "$as_me:5024: WARNING: VERSION was not set" >&5
5025 echo "$as_me: WARNING: VERSION was not set" >&2;}
5026                 ;;
5027         (x*.*.*)
5028                 ABI_VERSION="$VERSION"
5029                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5030
5031 echo "${as_me:-configure}:5031: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5032
5033                 ;;
5034         (x*:*:*)
5035                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5036                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5037
5038 echo "${as_me:-configure}:5038: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5039
5040                 ;;
5041         (*)
5042                 { echo "$as_me:5042: WARNING: unexpected VERSION value: $VERSION" >&5
5043 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5044                 ;;
5045         esac
5046 fi
5047
5048 LIBTOOL=
5049
5050 # common library maintenance symbols that are convenient for libtool scripts:
5051 LIB_CREATE='${AR} -cr'
5052 LIB_OBJECT='${OBJECTS}'
5053 LIB_SUFFIX=.a
5054 LIB_PREP="$RANLIB"
5055
5056 # symbols used to prop libtool up to enable it to determine what it should be
5057 # doing:
5058 LIB_CLEAN=
5059 LIB_COMPILE=
5060 LIB_LINK='${CC}'
5061 LIB_INSTALL=
5062 LIB_UNINSTALL=
5063
5064 echo "$as_me:5064: checking if you want to build libraries with libtool" >&5
5065 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5066
5067 # Check whether --with-libtool or --without-libtool was given.
5068 if test "${with_libtool+set}" = set; then
5069   withval="$with_libtool"
5070   with_libtool=$withval
5071 else
5072   with_libtool=no
5073 fi;
5074 echo "$as_me:5074: result: $with_libtool" >&5
5075 echo "${ECHO_T}$with_libtool" >&6
5076 if test "$with_libtool" != "no"; then
5077
5078         if test "$with_libtool" != "yes" ; then
5079
5080 if test "x$prefix" != xNONE; then
5081         cf_path_syntax="$prefix"
5082 else
5083         cf_path_syntax="$ac_default_prefix"
5084 fi
5085
5086 case ".$with_libtool" in
5087 (.\$\(*\)*|.\'*\'*)
5088         ;;
5089 (..|./*|.\\*)
5090         ;;
5091 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5092         ;;
5093 (.\${*prefix}*|.\${*dir}*)
5094         eval with_libtool="$with_libtool"
5095         case ".$with_libtool" in
5096         (.NONE/*)
5097                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5098                 ;;
5099         esac
5100         ;;
5101 (.no|.NONE/*)
5102         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
5103         ;;
5104 (*)
5105         { { echo "$as_me:5105: error: expected a pathname, not \"$with_libtool\"" >&5
5106 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5107    { (exit 1); exit 1; }; }
5108         ;;
5109 esac
5110
5111                 LIBTOOL=$with_libtool
5112         else
5113                 if test -n "$ac_tool_prefix"; then
5114   for ac_prog in libtool glibtool
5115   do
5116     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5117 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5118 echo "$as_me:5118: checking for $ac_word" >&5
5119 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5120 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5121   echo $ECHO_N "(cached) $ECHO_C" >&6
5122 else
5123   if test -n "$LIBTOOL"; then
5124   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5125 else
5126   ac_save_IFS=$IFS; IFS=$ac_path_separator
5127 ac_dummy="$PATH"
5128 for ac_dir in $ac_dummy; do
5129   IFS=$ac_save_IFS
5130   test -z "$ac_dir" && ac_dir=.
5131   $as_executable_p "$ac_dir/$ac_word" || continue
5132 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5133 echo "$as_me:5133: found $ac_dir/$ac_word" >&5
5134 break
5135 done
5136
5137 fi
5138 fi
5139 LIBTOOL=$ac_cv_prog_LIBTOOL
5140 if test -n "$LIBTOOL"; then
5141   echo "$as_me:5141: result: $LIBTOOL" >&5
5142 echo "${ECHO_T}$LIBTOOL" >&6
5143 else
5144   echo "$as_me:5144: result: no" >&5
5145 echo "${ECHO_T}no" >&6
5146 fi
5147
5148     test -n "$LIBTOOL" && break
5149   done
5150 fi
5151 if test -z "$LIBTOOL"; then
5152   ac_ct_LIBTOOL=$LIBTOOL
5153   for ac_prog in libtool glibtool
5154 do
5155   # Extract the first word of "$ac_prog", so it can be a program name with args.
5156 set dummy $ac_prog; ac_word=$2
5157 echo "$as_me:5157: checking for $ac_word" >&5
5158 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5159 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5160   echo $ECHO_N "(cached) $ECHO_C" >&6
5161 else
5162   if test -n "$ac_ct_LIBTOOL"; then
5163   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5164 else
5165   ac_save_IFS=$IFS; IFS=$ac_path_separator
5166 ac_dummy="$PATH"
5167 for ac_dir in $ac_dummy; do
5168   IFS=$ac_save_IFS
5169   test -z "$ac_dir" && ac_dir=.
5170   $as_executable_p "$ac_dir/$ac_word" || continue
5171 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5172 echo "$as_me:5172: found $ac_dir/$ac_word" >&5
5173 break
5174 done
5175
5176 fi
5177 fi
5178 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5179 if test -n "$ac_ct_LIBTOOL"; then
5180   echo "$as_me:5180: result: $ac_ct_LIBTOOL" >&5
5181 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5182 else
5183   echo "$as_me:5183: result: no" >&5
5184 echo "${ECHO_T}no" >&6
5185 fi
5186
5187   test -n "$ac_ct_LIBTOOL" && break
5188 done
5189 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5190
5191   LIBTOOL=$ac_ct_LIBTOOL
5192 fi
5193
5194 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5195 then
5196         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5197 else
5198         cf_cv_libtool_version=
5199 fi
5200 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5201
5202                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5203                 then
5204
5205 unset ac_cv_prog_ac_ct_LIBTOOL
5206 unset ac_ct_LIBTOOL
5207 unset LIBTOOL
5208
5209                         if test -n "$ac_tool_prefix"; then
5210   for ac_prog in glibtool
5211   do
5212     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5213 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5214 echo "$as_me:5214: checking for $ac_word" >&5
5215 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5216 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219   if test -n "$LIBTOOL"; then
5220   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5221 else
5222   ac_save_IFS=$IFS; IFS=$ac_path_separator
5223 ac_dummy="$PATH"
5224 for ac_dir in $ac_dummy; do
5225   IFS=$ac_save_IFS
5226   test -z "$ac_dir" && ac_dir=.
5227   $as_executable_p "$ac_dir/$ac_word" || continue
5228 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5229 echo "$as_me:5229: found $ac_dir/$ac_word" >&5
5230 break
5231 done
5232
5233 fi
5234 fi
5235 LIBTOOL=$ac_cv_prog_LIBTOOL
5236 if test -n "$LIBTOOL"; then
5237   echo "$as_me:5237: result: $LIBTOOL" >&5
5238 echo "${ECHO_T}$LIBTOOL" >&6
5239 else
5240   echo "$as_me:5240: result: no" >&5
5241 echo "${ECHO_T}no" >&6
5242 fi
5243
5244     test -n "$LIBTOOL" && break
5245   done
5246 fi
5247 if test -z "$LIBTOOL"; then
5248   ac_ct_LIBTOOL=$LIBTOOL
5249   for ac_prog in glibtool
5250 do
5251   # Extract the first word of "$ac_prog", so it can be a program name with args.
5252 set dummy $ac_prog; ac_word=$2
5253 echo "$as_me:5253: checking for $ac_word" >&5
5254 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5255 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5256   echo $ECHO_N "(cached) $ECHO_C" >&6
5257 else
5258   if test -n "$ac_ct_LIBTOOL"; then
5259   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5260 else
5261   ac_save_IFS=$IFS; IFS=$ac_path_separator
5262 ac_dummy="$PATH"
5263 for ac_dir in $ac_dummy; do
5264   IFS=$ac_save_IFS
5265   test -z "$ac_dir" && ac_dir=.
5266   $as_executable_p "$ac_dir/$ac_word" || continue
5267 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5268 echo "$as_me:5268: found $ac_dir/$ac_word" >&5
5269 break
5270 done
5271
5272 fi
5273 fi
5274 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5275 if test -n "$ac_ct_LIBTOOL"; then
5276   echo "$as_me:5276: result: $ac_ct_LIBTOOL" >&5
5277 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5278 else
5279   echo "$as_me:5279: result: no" >&5
5280 echo "${ECHO_T}no" >&6
5281 fi
5282
5283   test -n "$ac_ct_LIBTOOL" && break
5284 done
5285 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5286
5287   LIBTOOL=$ac_ct_LIBTOOL
5288 fi
5289
5290 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5291 then
5292         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5293 else
5294         cf_cv_libtool_version=
5295 fi
5296 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5297
5298                 fi
5299         fi
5300         if test -z "$LIBTOOL" ; then
5301                 { { echo "$as_me:5301: error: Cannot find libtool" >&5
5302 echo "$as_me: error: Cannot find libtool" >&2;}
5303    { (exit 1); exit 1; }; }
5304         fi
5305         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5306         LIB_OBJECT='${OBJECTS:.o=.lo}'
5307         LIB_SUFFIX=.la
5308         LIB_CLEAN='${LIBTOOL} --mode=clean'
5309         LIB_COMPILE='${LIBTOOL} --mode=compile'
5310         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5311         LIB_INSTALL='${LIBTOOL} --mode=install'
5312         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5313         LIB_PREP=:
5314
5315 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5316 then
5317         echo "$as_me:5317: checking version of $LIBTOOL" >&5
5318 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5319
5320 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5321 then
5322         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5323 else
5324         cf_cv_libtool_version=
5325 fi
5326 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5327
5328         echo "$as_me:5328: result: $cf_cv_libtool_version" >&5
5329 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5330         if test -z "$cf_cv_libtool_version" ; then
5331                 { { echo "$as_me:5331: error: This is not GNU libtool" >&5
5332 echo "$as_me: error: This is not GNU libtool" >&2;}
5333    { (exit 1); exit 1; }; }
5334         fi
5335 else
5336         { { echo "$as_me:5336: error: GNU libtool has not been found" >&5
5337 echo "$as_me: error: GNU libtool has not been found" >&2;}
5338    { (exit 1); exit 1; }; }
5339 fi
5340
5341         # special hack to add -no-undefined (which libtool should do for itself)
5342         LT_UNDEF=
5343         case "$cf_cv_system_name" in
5344         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5345                 LT_UNDEF=-no-undefined
5346                 ;;
5347         esac
5348
5349         # special hack to add --tag option for C++ compiler
5350         case $cf_cv_libtool_version in
5351         (1.[5-9]*|[2-9].[0-9.a-z]*)
5352                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5353                 LIBTOOL="$LIBTOOL --tag=CC"
5354                 ;;
5355         (*)
5356                 LIBTOOL_CXX="$LIBTOOL"
5357                 ;;
5358         esac
5359 else
5360         LIBTOOL=""
5361         LIBTOOL_CXX=""
5362 fi
5363
5364 test -z "$LIBTOOL" && ECHO_LT=
5365
5366 if test "$with_libtool" != "no" ; then
5367
5368 cf_list_models="$cf_list_models libtool"
5369
5370 else
5371
5372 echo "$as_me:5372: checking if you want to build shared libraries" >&5
5373 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5374
5375 # Check whether --with-shared or --without-shared was given.
5376 if test "${with_shared+set}" = set; then
5377   withval="$with_shared"
5378   with_shared=$withval
5379 else
5380   with_shared=no
5381 fi;
5382 echo "$as_me:5382: result: $with_shared" >&5
5383 echo "${ECHO_T}$with_shared" >&6
5384 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5385
5386 echo "$as_me:5386: checking if you want to build static libraries" >&5
5387 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5388
5389 # Check whether --with-normal or --without-normal was given.
5390 if test "${with_normal+set}" = set; then
5391   withval="$with_normal"
5392   with_normal=$withval
5393 else
5394   with_normal=yes
5395 fi;
5396 echo "$as_me:5396: result: $with_normal" >&5
5397 echo "${ECHO_T}$with_normal" >&6
5398 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5399
5400 echo "$as_me:5400: checking if you want to build debug libraries" >&5
5401 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5402
5403 # Check whether --with-debug or --without-debug was given.
5404 if test "${with_debug+set}" = set; then
5405   withval="$with_debug"
5406   with_debug=$withval
5407 else
5408   with_debug=yes
5409 fi;
5410 echo "$as_me:5410: result: $with_debug" >&5
5411 echo "${ECHO_T}$with_debug" >&6
5412 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5413
5414 echo "$as_me:5414: checking if you want to build profiling libraries" >&5
5415 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5416
5417 # Check whether --with-profile or --without-profile was given.
5418 if test "${with_profile+set}" = set; then
5419   withval="$with_profile"
5420   with_profile=$withval
5421 else
5422   with_profile=no
5423 fi;
5424 echo "$as_me:5424: result: $with_profile" >&5
5425 echo "${ECHO_T}$with_profile" >&6
5426 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5427
5428 fi
5429
5430 if test "X$cf_with_cxx_binding" != Xno; then
5431 if test "x$with_shared" = "xyes"; then
5432 echo "$as_me:5432: checking if you want to build C++ shared libraries" >&5
5433 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5434
5435 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5436 if test "${with_cxx_shared+set}" = set; then
5437   withval="$with_cxx_shared"
5438   with_shared_cxx=$withval
5439 else
5440   with_shared_cxx=no
5441 fi;
5442 echo "$as_me:5442: result: $with_shared_cxx" >&5
5443 echo "${ECHO_T}$with_shared_cxx" >&6
5444 fi
5445 fi
5446
5447 ###############################################################################
5448
5449 echo "$as_me:5449: checking for specified models" >&5
5450 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5451 test -z "$cf_list_models" && cf_list_models=normal
5452 test "$with_libtool" != "no" && cf_list_models=libtool
5453 echo "$as_me:5453: result: $cf_list_models" >&5
5454 echo "${ECHO_T}$cf_list_models" >&6
5455
5456 ### Use the first model as the default, and save its suffix for use in building
5457 ### up test-applications.
5458 echo "$as_me:5458: checking for default model" >&5
5459 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5460 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5461 echo "$as_me:5461: result: $DFT_LWR_MODEL" >&5
5462 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5463
5464 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5465
5466 TICS_NAME=tic
5467
5468 TINFO_NAME=tinfo
5469
5470 LIB_NAME=ncurses
5471
5472 LIB_DIR=../lib
5473 LIB_2ND=../../lib
5474
5475 echo "$as_me:5475: checking if you want to have a library-prefix" >&5
5476 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5477
5478 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5479 if test "${with_lib_prefix+set}" = set; then
5480   withval="$with_lib_prefix"
5481   with_lib_prefix=$withval
5482 else
5483   with_lib_prefix=auto
5484 fi;
5485 echo "$as_me:5485: result: $with_lib_prefix" >&5
5486 echo "${ECHO_T}$with_lib_prefix" >&6
5487
5488 if test $with_lib_prefix = auto
5489 then
5490
5491         case $cf_cv_system_name in
5492         (OS/2*|os2*)
5493                 if test "$DFT_LWR_MODEL" = libtool; then
5494                         LIB_PREFIX='lib'
5495                 else
5496                         LIB_PREFIX=''
5497                 fi
5498                 ;;
5499         (*-msvc*)
5500                 LIB_PREFIX=''
5501                 ;;
5502         (*)     LIB_PREFIX='lib'
5503                 ;;
5504         esac
5505 cf_prefix=$LIB_PREFIX
5506
5507 elif test $with_lib_prefix = no
5508 then
5509         LIB_PREFIX=
5510 else
5511         LIB_PREFIX=$with_lib_prefix
5512 fi
5513
5514 LIB_SUFFIX=
5515
5516         echo "$as_me:5516: checking for PATH separator" >&5
5517 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5518         case $cf_cv_system_name in
5519         (os2*)  PATH_SEPARATOR=';'  ;;
5520         (*)     ${PATH_SEPARATOR:=':'}  ;;
5521         esac
5522
5523         echo "$as_me:5523: result: $PATH_SEPARATOR" >&5
5524 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5525
5526 ###############################################################################
5527
5528 echo "$as_me:5528: checking if you want to build a separate terminfo library" >&5
5529 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5530
5531 # Check whether --with-termlib or --without-termlib was given.
5532 if test "${with_termlib+set}" = set; then
5533   withval="$with_termlib"
5534   with_termlib=$withval
5535 else
5536   with_termlib=no
5537 fi;
5538 echo "$as_me:5538: result: $with_termlib" >&5
5539 echo "${ECHO_T}$with_termlib" >&6
5540
5541 echo "$as_me:5541: checking if you want to build a separate tic library" >&5
5542 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5543
5544 # Check whether --with-ticlib or --without-ticlib was given.
5545 if test "${with_ticlib+set}" = set; then
5546   withval="$with_ticlib"
5547   with_ticlib=$withval
5548 else
5549   with_ticlib=no
5550 fi;
5551 echo "$as_me:5551: result: $with_ticlib" >&5
5552 echo "${ECHO_T}$with_ticlib" >&6
5553
5554 if test X"$CC_G_OPT" = X"" ; then
5555         CC_G_OPT='-g'
5556         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5557 fi
5558
5559 if test X"$CXX_G_OPT" = X"" ; then
5560         CXX_G_OPT='-g'
5561         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5562 fi
5563
5564 echo "$as_me:5564: checking for default loader flags" >&5
5565 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5566 case $DFT_LWR_MODEL in
5567 (libtool) LD_MODEL=''   ;;
5568 (normal)  LD_MODEL=''   ;;
5569 (debug)   LD_MODEL=$CC_G_OPT ;;
5570 (profile) LD_MODEL='-pg';;
5571 (shared)  LD_MODEL=''   ;;
5572 esac
5573 echo "$as_me:5573: result: $LD_MODEL" >&5
5574 echo "${ECHO_T}$LD_MODEL" >&6
5575
5576 case $DFT_LWR_MODEL in
5577 (shared)
5578
5579 echo "$as_me:5579: checking if rpath option should be used" >&5
5580 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5581
5582 # Check whether --enable-rpath or --disable-rpath was given.
5583 if test "${enable_rpath+set}" = set; then
5584   enableval="$enable_rpath"
5585   cf_cv_enable_rpath=$enableval
5586 else
5587   cf_cv_enable_rpath=no
5588 fi;
5589 echo "$as_me:5589: result: $cf_cv_enable_rpath" >&5
5590 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5591
5592 echo "$as_me:5592: checking if shared libraries should be relinked during install" >&5
5593 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5594
5595 # Check whether --enable-relink or --disable-relink was given.
5596 if test "${enable_relink+set}" = set; then
5597   enableval="$enable_relink"
5598   cf_cv_do_relink=$enableval
5599 else
5600   cf_cv_do_relink=yes
5601 fi;
5602 echo "$as_me:5602: result: $cf_cv_do_relink" >&5
5603 echo "${ECHO_T}$cf_cv_do_relink" >&6
5604         ;;
5605 esac
5606
5607 # we will build libraries one-level down.
5608 rel_builddir=..
5609
5610 LD_RPATH_OPT=
5611 if test "x$cf_cv_enable_rpath" != xno
5612 then
5613         echo "$as_me:5613: checking for an rpath option" >&5
5614 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5615         case $cf_cv_system_name in
5616         (irix*)
5617                 if test "$GCC" = yes; then
5618                         LD_RPATH_OPT="-Wl,-rpath,"
5619                 else
5620                         LD_RPATH_OPT="-rpath "
5621                 fi
5622                 ;;
5623         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5624                 LD_RPATH_OPT="-Wl,-rpath,"
5625                 ;;
5626         (openbsd[2-9].*|mirbsd*)
5627                 LD_RPATH_OPT="-Wl,-rpath,"
5628                 ;;
5629         (dragonfly*)
5630                 LD_RPATH_OPT="-rpath "
5631                 ;;
5632         (netbsd*)
5633                 LD_RPATH_OPT="-Wl,-rpath,"
5634                 ;;
5635         (osf*|mls+*)
5636                 LD_RPATH_OPT="-rpath "
5637                 ;;
5638         (solaris2*)
5639                 LD_RPATH_OPT="-R"
5640                 ;;
5641         (*)
5642                 ;;
5643         esac
5644         echo "$as_me:5644: result: $LD_RPATH_OPT" >&5
5645 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5646
5647         case "x$LD_RPATH_OPT" in
5648         (x-R*)
5649                 echo "$as_me:5649: checking if we need a space after rpath option" >&5
5650 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5651                 cf_save_LIBS="$LIBS"
5652
5653 cf_add_libs="$LIBS"
5654 # reverse order
5655 cf_add_0lib=
5656 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5657 # filter duplicates
5658 for cf_add_1lib in $cf_add_0lib; do
5659         for cf_add_2lib in $cf_add_libs; do
5660                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5661                         cf_add_1lib=
5662                         break
5663                 fi
5664         done
5665         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
5666 done
5667 LIBS="$cf_add_libs"
5668
5669                 cat >conftest.$ac_ext <<_ACEOF
5670 #line 5670 "configure"
5671 #include "confdefs.h"
5672
5673 int
5674 main (void)
5675 {
5676
5677   ;
5678   return 0;
5679 }
5680 _ACEOF
5681 rm -f conftest.$ac_objext conftest$ac_exeext
5682 if { (eval echo "$as_me:5682: \"$ac_link\"") >&5
5683   (eval $ac_link) 2>&5
5684   ac_status=$?
5685   echo "$as_me:5685: \$? = $ac_status" >&5
5686   (exit $ac_status); } &&
5687          { ac_try='test -s conftest$ac_exeext'
5688   { (eval echo "$as_me:5688: \"$ac_try\"") >&5
5689   (eval $ac_try) 2>&5
5690   ac_status=$?
5691   echo "$as_me:5691: \$? = $ac_status" >&5
5692   (exit $ac_status); }; }; then
5693   cf_rpath_space=no
5694 else
5695   echo "$as_me: failed program was:" >&5
5696 cat conftest.$ac_ext >&5
5697 cf_rpath_space=yes
5698 fi
5699 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5700                 LIBS="$cf_save_LIBS"
5701                 echo "$as_me:5701: result: $cf_rpath_space" >&5
5702 echo "${ECHO_T}$cf_rpath_space" >&6
5703                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5704                 ;;
5705         esac
5706 fi
5707
5708         RM_SHARED_OPTS=
5709         LOCAL_LDFLAGS=
5710         LOCAL_LDFLAGS2=
5711         LD_SHARED_OPTS=
5712         INSTALL_LIB="-m 644"
5713         : ${rel_builddir:=.}
5714
5715         shlibdir=$libdir
5716
5717         MAKE_DLLS="#"
5718
5719         cf_cv_do_symlinks=no
5720         cf_ld_rpath_opt=
5721         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5722
5723         echo "$as_me:5723: checking if release/abi version should be used for shared libs" >&5
5724 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5725
5726 # Check whether --with-shlib-version or --without-shlib-version was given.
5727 if test "${with_shlib_version+set}" = set; then
5728   withval="$with_shlib_version"
5729   test -z "$withval" && withval=auto
5730         case $withval in
5731         (yes)
5732                 cf_cv_shlib_version=auto
5733                 ;;
5734         (rel|abi|auto)
5735                 cf_cv_shlib_version=$withval
5736                 ;;
5737         (*)
5738                 echo "$as_me:5738: result: $withval" >&5
5739 echo "${ECHO_T}$withval" >&6
5740                 { { echo "$as_me:5740: error: option value must be one of: rel, abi, or auto" >&5
5741 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5742    { (exit 1); exit 1; }; }
5743                 ;;
5744         esac
5745
5746 else
5747   cf_cv_shlib_version=auto
5748 fi;
5749         echo "$as_me:5749: result: $cf_cv_shlib_version" >&5
5750 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5751
5752         cf_cv_rm_so_locs=no
5753         cf_try_cflags=
5754
5755         # Some less-capable ports of gcc support only -fpic
5756         CC_SHARED_OPTS=
5757
5758         cf_try_fPIC=no
5759         if test "$GCC" = yes
5760         then
5761                 cf_try_fPIC=yes
5762         else
5763                 case $cf_cv_system_name in
5764                 (*linux*)       # e.g., PGI compiler
5765                         cf_try_fPIC=yes
5766                         ;;
5767                 esac
5768         fi
5769
5770         if test "$cf_try_fPIC" = yes
5771         then
5772                 echo "$as_me:5772: checking which $CC option to use" >&5
5773 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5774                 cf_save_CFLAGS="$CFLAGS"
5775                 for CC_SHARED_OPTS in -fPIC -fpic ''
5776                 do
5777                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5778                         cat >conftest.$ac_ext <<_ACEOF
5779 #line 5779 "configure"
5780 #include "confdefs.h"
5781 #include <stdio.h>
5782 int
5783 main (void)
5784 {
5785 int x = 1
5786   ;
5787   return 0;
5788 }
5789 _ACEOF
5790 rm -f conftest.$ac_objext
5791 if { (eval echo "$as_me:5791: \"$ac_compile\"") >&5
5792   (eval $ac_compile) 2>&5
5793   ac_status=$?
5794   echo "$as_me:5794: \$? = $ac_status" >&5
5795   (exit $ac_status); } &&
5796          { ac_try='test -s conftest.$ac_objext'
5797   { (eval echo "$as_me:5797: \"$ac_try\"") >&5
5798   (eval $ac_try) 2>&5
5799   ac_status=$?
5800   echo "$as_me:5800: \$? = $ac_status" >&5
5801   (exit $ac_status); }; }; then
5802   break
5803 else
5804   echo "$as_me: failed program was:" >&5
5805 cat conftest.$ac_ext >&5
5806 fi
5807 rm -f conftest.$ac_objext conftest.$ac_ext
5808                 done
5809                 echo "$as_me:5809: result: $CC_SHARED_OPTS" >&5
5810 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5811                 CFLAGS="$cf_save_CFLAGS"
5812         fi
5813
5814         cf_cv_shlib_version_infix=no
5815
5816         case $cf_cv_system_name in
5817         (aix4.3-9*|aix[5-7]*)
5818                 if test "$GCC" = yes; then
5819                         CC_SHARED_OPTS='-Wl,-brtl'
5820                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5821                 else
5822                         CC_SHARED_OPTS='-brtl'
5823                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5824                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5825                 fi
5826                 ;;
5827         (beos*)
5828                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5829                 ;;
5830         (cygwin*)
5831                 CC_SHARED_OPTS=
5832                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5833                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5834                 cf_cv_shlib_version=cygdll
5835                 cf_cv_shlib_version_infix=cygdll
5836                 shlibdir=$bindir
5837                 MAKE_DLLS=
5838                 cat >mk_shared_lib.sh <<-CF_EOF
5839                 #!$SHELL
5840                 SHARED_LIB=\$1
5841                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5842                 shift
5843                 cat <<-EOF
5844                 Linking shared library
5845                 ** SHARED_LIB \$SHARED_LIB
5846                 ** IMPORT_LIB \$IMPORT_LIB
5847 EOF
5848                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5849 CF_EOF
5850                 chmod +x mk_shared_lib.sh
5851                 ;;
5852         (msys*)
5853                 CC_SHARED_OPTS=
5854                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5855                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5856                 cf_cv_shlib_version=msysdll
5857                 cf_cv_shlib_version_infix=msysdll
5858                 shlibdir=$bindir
5859                 MAKE_DLLS=
5860                 cat >mk_shared_lib.sh <<-CF_EOF
5861                 #!$SHELL
5862                 SHARED_LIB=\$1
5863                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5864                 shift
5865                 cat <<-EOF
5866                 Linking shared library
5867                 ** SHARED_LIB \$SHARED_LIB
5868                 ** IMPORT_LIB \$IMPORT_LIB
5869 EOF
5870                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5871 CF_EOF
5872                 chmod +x mk_shared_lib.sh
5873                 ;;
5874         (darwin*)
5875                 cf_try_cflags="no-cpp-precomp"
5876                 CC_SHARED_OPTS="-dynamic"
5877                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5878                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5879                 cf_cv_shlib_version_infix=yes
5880                 echo "$as_me:5880: checking if ld -search_paths_first works" >&5
5881 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5882 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5883   echo $ECHO_N "(cached) $ECHO_C" >&6
5884 else
5885
5886                         cf_save_LDFLAGS=$LDFLAGS
5887                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5888                         cat >conftest.$ac_ext <<_ACEOF
5889 #line 5889 "configure"
5890 #include "confdefs.h"
5891
5892 int
5893 main (void)
5894 {
5895 int i;
5896   ;
5897   return 0;
5898 }
5899 _ACEOF
5900 rm -f conftest.$ac_objext conftest$ac_exeext
5901 if { (eval echo "$as_me:5901: \"$ac_link\"") >&5
5902   (eval $ac_link) 2>&5
5903   ac_status=$?
5904   echo "$as_me:5904: \$? = $ac_status" >&5
5905   (exit $ac_status); } &&
5906          { ac_try='test -s conftest$ac_exeext'
5907   { (eval echo "$as_me:5907: \"$ac_try\"") >&5
5908   (eval $ac_try) 2>&5
5909   ac_status=$?
5910   echo "$as_me:5910: \$? = $ac_status" >&5
5911   (exit $ac_status); }; }; then
5912   cf_cv_ldflags_search_paths_first=yes
5913 else
5914   echo "$as_me: failed program was:" >&5
5915 cat conftest.$ac_ext >&5
5916 cf_cv_ldflags_search_paths_first=no
5917 fi
5918 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5919                                 LDFLAGS=$cf_save_LDFLAGS
5920 fi
5921 echo "$as_me:5921: result: $cf_cv_ldflags_search_paths_first" >&5
5922 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5923                 if test $cf_cv_ldflags_search_paths_first = yes; then
5924                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5925                 fi
5926                 ;;
5927         (hpux[7-8]*)
5928                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5929                 if test "$GCC" != yes; then
5930                         CC_SHARED_OPTS='+Z'
5931                 fi
5932                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5933                 INSTALL_LIB="-m 555"
5934                 ;;
5935         (hpux*)
5936                 # (tested with gcc 2.7.2 -- I don't have c89)
5937                 if test "$GCC" = yes; then
5938                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5939                 else
5940                         CC_SHARED_OPTS='+Z'
5941                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5942                 fi
5943                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5944                 # HP-UX shared libraries must be executable, and should be
5945                 # readonly to exploit a quirk in the memory manager.
5946                 INSTALL_LIB="-m 555"
5947                 ;;
5948         (interix*)
5949                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5950                 if test "$cf_cv_shlib_version" = rel; then
5951                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5952                 else
5953                         cf_shared_soname='`basename $@`'
5954                 fi
5955                 CC_SHARED_OPTS=
5956                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5957                 ;;
5958         (irix*)
5959                 if test "$cf_cv_enable_rpath" = yes ; then
5960                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5961                 fi
5962                 # tested with IRIX 5.2 and 'cc'.
5963                 if test "$GCC" != yes; then
5964                         CC_SHARED_OPTS='-KPIC'
5965                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5966                 else
5967                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5968                 fi
5969                 cf_cv_rm_so_locs=yes
5970                 ;;
5971         (linux*|gnu*|k*bsd*-gnu)
5972                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5973                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5974                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5975                 fi
5976                 if test "$cf_cv_enable_rpath" = yes ; then
5977                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5978                 fi
5979
5980         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5981         if test "$cf_cv_shlib_version" = rel; then
5982                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5983         else
5984                 cf_cv_shared_soname='`basename $@`'
5985         fi
5986
5987                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5988                 ;;
5989         (mingw*msvc*)
5990                 cf_cv_shlib_version=msvcdll
5991                 cf_cv_shlib_version_infix=msvcdll
5992                 shlibdir=$bindir
5993                 MAKE_DLLS=
5994                 if test "$DFT_LWR_MODEL" = "shared" ; then
5995                         LOCAL_LDFLAGS="-link -dll"
5996                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5997                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
5998                 fi
5999                 CC_SHARED_OPTS=
6000                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6001                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6002                 cat >mk_shared_lib.sh <<-CF_EOF
6003                 #!$SHELL
6004                 SHARED_LIB=\$1
6005                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6006                 shift
6007                 my_ld=\$1
6008                 shift
6009                 cat <<-EOF
6010                 Linking shared library
6011                 ** SHARED LIB \$SHARED_LIB
6012                 ** IMPORT_LIB \$IMPORT_LIB
6013 EOF
6014                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6015                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6016                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6017 CF_EOF
6018                 chmod +x mk_shared_lib.sh
6019                 cat >mk_prog.sh <<-CF_EOF
6020                 #!$SHELL
6021                 shift
6022                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6023                 LD="$LD"
6024                 clopts=()
6025                 ldopts=()
6026                 libs=()
6027                 isdll=0
6028                 while test \$# -gt 0; do
6029                         case "\$1" in
6030                                 -link)
6031                                         # ignore -link argument
6032                                         ;;
6033                                 -dll)
6034                                         isdll=1
6035                                         ;;
6036                                 -W* | -w*)
6037                                         # ignore warnings
6038                                         ;;
6039                                 -D*)
6040                                         clopts+=("\$1")
6041                                         ;;
6042                                 -I*)
6043                                         clopts+=("\$1")
6044                                         ;;
6045                                 -l*)
6046                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6047                                         ;;
6048                                 -L*)
6049                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6050                                         ;;
6051                                 *.obj | *.o)
6052                                         ldopts+=("\$1")
6053                                         ;;
6054                                 -Wl,*)
6055                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6056                                                 ldopts+=("\${linkarg}")
6057                                         done
6058                                         ;;
6059                                 *.lib)
6060                                         ldopts+=("\$1")
6061                                         ;;
6062                                 -o)
6063                                         shift
6064                                         ldopts+=("-out:\$1")
6065                                         ;;
6066                                 *)
6067                                         clopts+=("\$1")
6068                                         ldopts+=("\$1")
6069                                         ;;
6070                         esac
6071                         shift
6072                 done
6073                 if [ "\$isdll" -ne 0 ]; then
6074                         for lib in \${libs[*]}; do
6075                                 ldopts+=("\$lib.dll.lib")
6076                         done
6077                 else
6078                         for lib in \${libs[*]}; do
6079                                 ldopts+=("\$lib.lib")
6080                         done
6081                 fi
6082                 cat <<-EOF
6083                 Creating program
6084                 ** ld options:   "\${ldopts[@]}"
6085 EOF
6086                 exec \$LD \${ldopts[@]}
6087 CF_EOF
6088                 chmod +x mk_prog.sh
6089                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6090                 ;;
6091         (mingw*)
6092                 cf_cv_shlib_version=mingw
6093                 cf_cv_shlib_version_infix=mingw
6094                 shlibdir=$bindir
6095                 MAKE_DLLS=
6096                 if test "$DFT_LWR_MODEL" = "shared" ; then
6097                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6098                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6099                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6100                 fi
6101                 CC_SHARED_OPTS=
6102                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6103                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6104                 cat >mk_shared_lib.sh <<-CF_EOF
6105                 #!$SHELL
6106                 SHARED_LIB=\$1
6107                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6108                 shift
6109                 cat <<-EOF
6110                 Linking shared library
6111                 ** SHARED_LIB \$SHARED_LIB
6112                 ** IMPORT_LIB \$IMPORT_LIB
6113 EOF
6114                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6115 CF_EOF
6116                 chmod +x mk_shared_lib.sh
6117                 ;;
6118         (openbsd[2-9].*|mirbsd*)
6119                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6120                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6121                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6122                 fi
6123                 if test "$cf_cv_enable_rpath" = yes ; then
6124                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6125                 fi
6126                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6127
6128         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6129         if test "$cf_cv_shlib_version" = rel; then
6130                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6131         else
6132                 cf_cv_shared_soname='`basename $@`'
6133         fi
6134
6135                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6136                 ;;
6137         (nto-qnx*|openbsd*|freebsd[12].*)
6138                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6139                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6140                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6141                 ;;
6142         (dragonfly*|freebsd*)
6143                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6144                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6145                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6146                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6147                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6148                 fi
6149
6150         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6151         if test "$cf_cv_shlib_version" = rel; then
6152                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6153         else
6154                 cf_cv_shared_soname='`basename $@`'
6155         fi
6156
6157                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6158                 ;;
6159         (netbsd*)
6160                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6161                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6162                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6163                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6164                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6165                         if test "$cf_cv_shlib_version" = auto; then
6166                         if test -f /usr/libexec/ld.elf_so; then
6167                                 cf_cv_shlib_version=abi
6168                         else
6169                                 cf_cv_shlib_version=rel
6170                         fi
6171                         fi
6172
6173         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6174         if test "$cf_cv_shlib_version" = rel; then
6175                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6176         else
6177                 cf_cv_shared_soname='`basename $@`'
6178         fi
6179
6180                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6181                 else
6182                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
6183                 fi
6184                 ;;
6185         (osf*|mls+*)
6186                 # tested with OSF/1 V3.2 and 'cc'
6187                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6188                 # link with shared libs).
6189                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6190                 case $host_os in
6191                 (osf4*)
6192                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6193                         ;;
6194                 esac
6195                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6196                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6197                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6198                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6199                 fi
6200                 cf_cv_rm_so_locs=yes
6201                 ;;
6202         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6203                 # tested with osr5.0.5
6204                 if test "$GCC" != yes; then
6205                         CC_SHARED_OPTS='-belf -KPIC'
6206                 fi
6207                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6208                 if test "$cf_cv_enable_rpath" = yes ; then
6209                         # only way is to set LD_RUN_PATH but no switch for it
6210                         RUN_PATH=$libdir
6211                 fi
6212                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6213                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6214                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6215                 ;;
6216         (sunos4*)
6217                 # tested with SunOS 4.1.1 and gcc 2.7.0
6218                 if test "$GCC" != yes; then
6219                         CC_SHARED_OPTS='-KPIC'
6220                 fi
6221                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6222                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6223                 ;;
6224         (solaris2*)
6225                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6226                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6227                 if test "$DFT_LWR_MODEL" = "shared" ; then
6228                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6229                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6230                 fi
6231                 if test "$cf_cv_enable_rpath" = yes ; then
6232                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6233                 fi
6234
6235         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6236         if test "$cf_cv_shlib_version" = rel; then
6237                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6238         else
6239                 cf_cv_shared_soname='`basename $@`'
6240         fi
6241
6242                 if test "$GCC" != yes; then
6243                         cf_save_CFLAGS="$CFLAGS"
6244                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6245                         do
6246                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6247                                 cat >conftest.$ac_ext <<_ACEOF
6248 #line 6248 "configure"
6249 #include "confdefs.h"
6250 #include <stdio.h>
6251 int
6252 main (void)
6253 {
6254 printf("Hello\n");
6255   ;
6256   return 0;
6257 }
6258 _ACEOF
6259 rm -f conftest.$ac_objext
6260 if { (eval echo "$as_me:6260: \"$ac_compile\"") >&5
6261   (eval $ac_compile) 2>&5
6262   ac_status=$?
6263   echo "$as_me:6263: \$? = $ac_status" >&5
6264   (exit $ac_status); } &&
6265          { ac_try='test -s conftest.$ac_objext'
6266   { (eval echo "$as_me:6266: \"$ac_try\"") >&5
6267   (eval $ac_try) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit $ac_status); }; }; then
6271   break
6272 else
6273   echo "$as_me: failed program was:" >&5
6274 cat conftest.$ac_ext >&5
6275 fi
6276 rm -f conftest.$ac_objext conftest.$ac_ext
6277                         done
6278                         CFLAGS="$cf_save_CFLAGS"
6279                         CC_SHARED_OPTS=$cf_shared_opts
6280                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6281                 else
6282                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6283                 fi
6284                 ;;
6285         (sysv5uw7*|unix_sv*)
6286                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6287                 if test "$GCC" != yes; then
6288                         CC_SHARED_OPTS='-KPIC'
6289                 fi
6290                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6291                 ;;
6292         (*)
6293                 CC_SHARED_OPTS='unknown'
6294                 MK_SHARED_LIB='echo unknown'
6295                 ;;
6296         esac
6297
6298         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6299         case "$cf_cv_shlib_version" in
6300         (rel|abi)
6301                 case "$MK_SHARED_LIB" in
6302                 (*'-o $@')
6303                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6304                         ;;
6305                 (*)
6306                         { echo "$as_me:6306: WARNING: ignored --with-shlib-version" >&5
6307 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6308                         ;;
6309                 esac
6310                 ;;
6311         esac
6312
6313         if test -n "$cf_try_cflags"
6314         then
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6316 "${as_me:-configure}"
6317 #include <stdio.h>
6318 int main(int argc, char *argv[])
6319 {
6320         printf("hello\n");
6321         return (argv[argc-1] == 0) ;
6322 }
6323 EOF
6324                 cf_save_CFLAGS="$CFLAGS"
6325                 for cf_opt in $cf_try_cflags
6326                 do
6327                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6328                         echo "$as_me:6328: checking if CFLAGS option -$cf_opt works" >&5
6329 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6330                         if { (eval echo "$as_me:6330: \"$ac_compile\"") >&5
6331   (eval $ac_compile) 2>&5
6332   ac_status=$?
6333   echo "$as_me:6333: \$? = $ac_status" >&5
6334   (exit $ac_status); }; then
6335                                 echo "$as_me:6335: result: yes" >&5
6336 echo "${ECHO_T}yes" >&6
6337                                 cf_save_CFLAGS="$CFLAGS"
6338                         else
6339                                 echo "$as_me:6339: result: no" >&5
6340 echo "${ECHO_T}no" >&6
6341                         fi
6342                 done
6343                 CFLAGS="$cf_save_CFLAGS"
6344         fi
6345
6346         # RPATH_LIST is a colon-separated list of directories
6347         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6348         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6349
6350         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6351
6352         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6353
6354 echo "${as_me:-configure}:6354: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6355
6356         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6357
6358 echo "${as_me:-configure}:6358: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6359
6360 for model in $cf_list_models; do
6361         case $model in
6362         (libtool)
6363
6364 echo "$as_me:6364: checking for additional libtool options" >&5
6365 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6366
6367 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6368 if test "${with_libtool_opts+set}" = set; then
6369   withval="$with_libtool_opts"
6370   with_libtool_opts=$withval
6371 else
6372   with_libtool_opts=no
6373 fi;
6374 echo "$as_me:6374: result: $with_libtool_opts" >&5
6375 echo "${ECHO_T}$with_libtool_opts" >&6
6376
6377 case .$with_libtool_opts in
6378 (.yes|.no|.)
6379         ;;
6380 (*)
6381         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6382         ;;
6383 esac
6384
6385 echo "$as_me:6385: checking if exported-symbols file should be used" >&5
6386 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6387
6388 # Check whether --with-export-syms or --without-export-syms was given.
6389 if test "${with_export_syms+set}" = set; then
6390   withval="$with_export_syms"
6391   with_export_syms=$withval
6392 else
6393   with_export_syms=no
6394 fi;
6395 if test "x$with_export_syms" = xyes
6396 then
6397         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6398
6399 fi
6400 echo "$as_me:6400: result: $with_export_syms" >&5
6401 echo "${ECHO_T}$with_export_syms" >&6
6402 if test "x$with_export_syms" != xno
6403 then
6404         EXPORT_SYMS="-export-symbols $with_export_syms"
6405
6406 fi
6407
6408                 ;;
6409         (shared)
6410                 if test "$CC_SHARED_OPTS" = "unknown"; then
6411                         { { echo "$as_me:6411: error: Shared libraries are not supported in this version" >&5
6412 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6413    { (exit 1); exit 1; }; }
6414                 fi
6415                 # workaround for inept transition to PIE vs PIC...
6416                 echo "$as_me:6416: checking if current CFLAGS link properly" >&5
6417 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6418                 cat >conftest.$ac_ext <<_ACEOF
6419 #line 6419 "configure"
6420 #include "confdefs.h"
6421 #include <stdio.h>
6422 int
6423 main (void)
6424 {
6425 printf("Hello work\n");
6426   ;
6427   return 0;
6428 }
6429 _ACEOF
6430 rm -f conftest.$ac_objext conftest$ac_exeext
6431 if { (eval echo "$as_me:6431: \"$ac_link\"") >&5
6432   (eval $ac_link) 2>&5
6433   ac_status=$?
6434   echo "$as_me:6434: \$? = $ac_status" >&5
6435   (exit $ac_status); } &&
6436          { ac_try='test -s conftest$ac_exeext'
6437   { (eval echo "$as_me:6437: \"$ac_try\"") >&5
6438   (eval $ac_try) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); }; }; then
6442   cf_cflags_work=yes
6443 else
6444   echo "$as_me: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 cf_cflags_work=no
6447 fi
6448 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6449                 echo "$as_me:6449: result: $cf_cflags_work" >&5
6450 echo "${ECHO_T}$cf_cflags_work" >&6
6451                 if test "$cf_cflags_work" = no
6452                 then
6453                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6454
6455 echo "${as_me:-configure}:6455: testing try to work around by appending shared-options ..." 1>&5
6456
6457                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6458                 fi
6459
6460 echo "$as_me:6460: checking if versioned-symbols file should be used" >&5
6461 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6462
6463 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6464 if test "${with_versioned_syms+set}" = set; then
6465   withval="$with_versioned_syms"
6466   with_versioned_syms=$withval
6467 else
6468   with_versioned_syms=no
6469 fi;
6470 case "x$with_versioned_syms" in
6471 (xyes)
6472         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6473
6474         ;;
6475 (xno)
6476         ;;
6477 (x/*)
6478         test -f "$with_versioned_syms" || { { echo "$as_me:6478: error: expected a filename: $with_versioned_syms" >&5
6479 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6480    { (exit 1); exit 1; }; }
6481         ;;
6482 (*)
6483         test -f "$with_versioned_syms" || { { echo "$as_me:6483: error: expected a filename: $with_versioned_syms" >&5
6484 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6485    { (exit 1); exit 1; }; }
6486         with_versioned_syms=`pwd`/"$with_versioned_syms"
6487         ;;
6488 esac
6489 echo "$as_me:6489: result: $with_versioned_syms" >&5
6490 echo "${ECHO_T}$with_versioned_syms" >&6
6491
6492 RESULTING_SYMS=
6493 VERSIONED_SYMS=
6494 WILDCARD_SYMS=
6495
6496 if test "x$with_versioned_syms" != xno
6497 then
6498         RESULTING_SYMS=$with_versioned_syms
6499         case "x$MK_SHARED_LIB" in
6500         (*-Wl,*)
6501                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6502                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6503                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6504
6505 echo "${as_me:-configure}:6505: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6506
6507                 ;;
6508         (*-dy\ *)
6509                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6510                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6511                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6512
6513 echo "${as_me:-configure}:6513: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6514
6515                 ;;
6516         (*)
6517                 { echo "$as_me:6517: WARNING: this system does not support versioned-symbols" >&5
6518 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6519                 ;;
6520         esac
6521
6522         # Linux ld can selectively override scope, e.g., of symbols beginning with
6523         # "_" by first declaring some as global, and then using a wildcard to
6524         # declare the others as local.  Some other loaders cannot do this.  Check
6525         # by constructing a (very) simple shared library and inspecting its
6526         # symbols.
6527         if test "x$VERSIONED_SYMS" != "x"
6528         then
6529                 echo "$as_me:6529: checking if wildcards can be used to selectively omit symbols" >&5
6530 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6531                 WILDCARD_SYMS=no
6532
6533                 # make sources
6534                 rm -f conftest.*
6535
6536                 cat >conftest.ver <<EOF
6537 module_1.0 {
6538 global:
6539         globalf1;
6540 local:
6541         localf1;
6542 };
6543 module_2.0 {
6544 global:
6545         globalf2;
6546 local:
6547         localf2;
6548         _*;
6549 } module_1.0;
6550 submodule_1.0 {
6551 global:
6552         subglobalf1;
6553         _ismissing;
6554 local:
6555         sublocalf1;
6556 };
6557 submodule_2.0 {
6558 global:
6559         subglobalf2;
6560 local:
6561         sublocalf2;
6562         _*;
6563 } submodule_1.0;
6564 EOF
6565                 cat >conftest.$ac_ext <<EOF
6566 #line 6566 "configure"
6567 int     _ismissing(void) { return 1; }
6568 int     _localf1(void) { return 1; }
6569 int     _localf2(void) { return 2; }
6570 int     globalf1(void) { return 1; }
6571 int     globalf2(void) { return 2; }
6572 int     _sublocalf1(void) { return 1; }
6573 int     _sublocalf2(void) { return 2; }
6574 int     subglobalf1(void) { return 1; }
6575 int     subglobalf2(void) { return 2; }
6576 EOF
6577                 cat >conftest.mk <<EOF
6578 CC=${CC}
6579 CFLAGS=${CFLAGS}
6580 CPPFLAGS=${CPPFLAGS}
6581 LDFLAGS=${LDFLAGS}
6582 LIBS=${LIBS}
6583 VERSIONED_SYMS=${VERSIONED_SYMS}
6584 RESULTING_SYMS=conftest.ver
6585 MK_SHARED_LIB=${MK_SHARED_LIB}
6586 conftest.so: conftest.$ac_cv_objext
6587                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6588 EOF
6589
6590                 # compile source, make library
6591                 if make -f conftest.mk 2>&5 >/dev/null
6592                 then
6593                         # test for missing symbol in either Data or Text section
6594                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6595                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6596                 fi
6597                 echo "$as_me:6597: result: $WILDCARD_SYMS" >&5
6598 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6599                 rm -f conftest.*
6600         fi
6601 fi
6602
6603                 ;;
6604         esac
6605 done
6606
6607 ### Checks for special libraries, must be done up-front.
6608 SHLIB_LIST=""
6609
6610 echo "$as_me:6610: checking if you want to link with the GPM mouse library" >&5
6611 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6612
6613 # Check whether --with-gpm or --without-gpm was given.
6614 if test "${with_gpm+set}" = set; then
6615   withval="$with_gpm"
6616   with_gpm=$withval
6617 else
6618   with_gpm=maybe
6619 fi;
6620 echo "$as_me:6620: result: $with_gpm" >&5
6621 echo "${ECHO_T}$with_gpm" >&6
6622
6623 if test "$with_gpm" != no ; then
6624         echo "$as_me:6624: checking for gpm.h" >&5
6625 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6626 if test "${ac_cv_header_gpm_h+set}" = set; then
6627   echo $ECHO_N "(cached) $ECHO_C" >&6
6628 else
6629   cat >conftest.$ac_ext <<_ACEOF
6630 #line 6630 "configure"
6631 #include "confdefs.h"
6632 #include <gpm.h>
6633 _ACEOF
6634 if { (eval echo "$as_me:6634: \"$ac_cpp conftest.$ac_ext\"") >&5
6635   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6636   ac_status=$?
6637   egrep -v '^ *\+' conftest.er1 >conftest.err
6638   rm -f conftest.er1
6639   cat conftest.err >&5
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit $ac_status); } >/dev/null; then
6642   if test -s conftest.err; then
6643     ac_cpp_err=$ac_c_preproc_warn_flag
6644   else
6645     ac_cpp_err=
6646   fi
6647 else
6648   ac_cpp_err=yes
6649 fi
6650 if test -z "$ac_cpp_err"; then
6651   ac_cv_header_gpm_h=yes
6652 else
6653   echo "$as_me: failed program was:" >&5
6654   cat conftest.$ac_ext >&5
6655   ac_cv_header_gpm_h=no
6656 fi
6657 rm -f conftest.err conftest.$ac_ext
6658 fi
6659 echo "$as_me:6659: result: $ac_cv_header_gpm_h" >&5
6660 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6661 if test $ac_cv_header_gpm_h = yes; then
6662
6663 cat >>confdefs.h <<\EOF
6664 #define HAVE_GPM_H 1
6665 EOF
6666
6667                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6668                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6669
6670 echo "${as_me:-configure}:6670: testing assuming we really have GPM library ..." 1>&5
6671
6672 cat >>confdefs.h <<\EOF
6673 #define HAVE_LIBGPM 1
6674 EOF
6675
6676                         with_gpm=yes
6677                 else
6678                         echo "$as_me:6678: checking for Gpm_Open in -lgpm" >&5
6679 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6680 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6681   echo $ECHO_N "(cached) $ECHO_C" >&6
6682 else
6683   ac_check_lib_save_LIBS=$LIBS
6684 LIBS="-lgpm  $LIBS"
6685 cat >conftest.$ac_ext <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 #ifdef __cplusplus
6691 extern "C"
6692 #endif
6693 /* We use char because int might match the return type of a gcc2
6694    builtin and then its argument prototype would still apply.  */
6695 char Gpm_Open ();
6696 int
6697 main (void)
6698 {
6699 Gpm_Open ();
6700   ;
6701   return 0;
6702 }
6703 _ACEOF
6704 rm -f conftest.$ac_objext conftest$ac_exeext
6705 if { (eval echo "$as_me:6705: \"$ac_link\"") >&5
6706   (eval $ac_link) 2>&5
6707   ac_status=$?
6708   echo "$as_me:6708: \$? = $ac_status" >&5
6709   (exit $ac_status); } &&
6710          { ac_try='test -s conftest$ac_exeext'
6711   { (eval echo "$as_me:6711: \"$ac_try\"") >&5
6712   (eval $ac_try) 2>&5
6713   ac_status=$?
6714   echo "$as_me:6714: \$? = $ac_status" >&5
6715   (exit $ac_status); }; }; then
6716   ac_cv_lib_gpm_Gpm_Open=yes
6717 else
6718   echo "$as_me: failed program was:" >&5
6719 cat conftest.$ac_ext >&5
6720 ac_cv_lib_gpm_Gpm_Open=no
6721 fi
6722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6723 LIBS=$ac_check_lib_save_LIBS
6724 fi
6725 echo "$as_me:6725: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6726 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6727 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6728   with_gpm=yes
6729 else
6730
6731                                 if test "$with_gpm" = maybe; then
6732                                         { echo "$as_me:6732: WARNING: Cannot link with GPM library" >&5
6733 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6734                                         with_gpm=no
6735                                 else
6736                                         { { echo "$as_me:6736: error: Cannot link with GPM library" >&5
6737 echo "$as_me: error: Cannot link with GPM library" >&2;}
6738    { (exit 1); exit 1; }; }
6739                                 fi
6740
6741 fi
6742
6743                 fi
6744
6745 else
6746
6747                 test "$with_gpm" != maybe && { echo "$as_me:6747: WARNING: Cannot find GPM header" >&5
6748 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6749                 with_gpm=no
6750
6751 fi
6752
6753 fi
6754
6755 if test "$with_gpm" != no ; then
6756         echo "$as_me:6756: checking if you want to load GPM dynamically" >&5
6757 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6758
6759 # Check whether --with-dlsym or --without-dlsym was given.
6760 if test "${with_dlsym+set}" = set; then
6761   withval="$with_dlsym"
6762   with_dlsym=$withval
6763 else
6764   with_dlsym=yes
6765 fi;
6766         echo "$as_me:6766: result: $with_dlsym" >&5
6767 echo "${ECHO_T}$with_dlsym" >&6
6768         if test "x$with_dlsym" = xyes ; then
6769
6770 cf_have_dlsym=no
6771 echo "$as_me:6771: checking for dlsym" >&5
6772 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6773 if test "${ac_cv_func_dlsym+set}" = set; then
6774   echo $ECHO_N "(cached) $ECHO_C" >&6
6775 else
6776   cat >conftest.$ac_ext <<_ACEOF
6777 #line 6777 "configure"
6778 #include "confdefs.h"
6779 #define dlsym autoconf_temporary
6780 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6781 #undef dlsym
6782
6783 #ifdef __cplusplus
6784 extern "C"
6785 #endif
6786
6787 /* We use char because int might match the return type of a gcc2
6788    builtin and then its argument prototype would still apply.  */
6789 char dlsym (void);
6790
6791 int
6792 main (void)
6793 {
6794
6795 /* The GNU C library defines stubs for functions which it implements
6796     to always fail with ENOSYS.  Some functions are actually named
6797     something starting with __ and the normal name is an alias.  */
6798 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6799 #error found stub for dlsym
6800 #endif
6801
6802         return dlsym ();
6803   ;
6804   return 0;
6805 }
6806 _ACEOF
6807 rm -f conftest.$ac_objext conftest$ac_exeext
6808 if { (eval echo "$as_me:6808: \"$ac_link\"") >&5
6809   (eval $ac_link) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit $ac_status); } &&
6813          { ac_try='test -s conftest$ac_exeext'
6814   { (eval echo "$as_me:6814: \"$ac_try\"") >&5
6815   (eval $ac_try) 2>&5
6816   ac_status=$?
6817   echo "$as_me:6817: \$? = $ac_status" >&5
6818   (exit $ac_status); }; }; then
6819   ac_cv_func_dlsym=yes
6820 else
6821   echo "$as_me: failed program was:" >&5
6822 cat conftest.$ac_ext >&5
6823 ac_cv_func_dlsym=no
6824 fi
6825 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6826 fi
6827 echo "$as_me:6827: result: $ac_cv_func_dlsym" >&5
6828 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6829 if test $ac_cv_func_dlsym = yes; then
6830   cf_have_dlsym=yes
6831 else
6832
6833 cf_have_libdl=no
6834 echo "$as_me:6834: checking for dlsym in -ldl" >&5
6835 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6836 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6837   echo $ECHO_N "(cached) $ECHO_C" >&6
6838 else
6839   ac_check_lib_save_LIBS=$LIBS
6840 LIBS="-ldl  $LIBS"
6841 cat >conftest.$ac_ext <<_ACEOF
6842 #line 6842 "configure"
6843 #include "confdefs.h"
6844
6845 /* Override any gcc2 internal prototype to avoid an error.  */
6846 #ifdef __cplusplus
6847 extern "C"
6848 #endif
6849 /* We use char because int might match the return type of a gcc2
6850    builtin and then its argument prototype would still apply.  */
6851 char dlsym ();
6852 int
6853 main (void)
6854 {
6855 dlsym ();
6856   ;
6857   return 0;
6858 }
6859 _ACEOF
6860 rm -f conftest.$ac_objext conftest$ac_exeext
6861 if { (eval echo "$as_me:6861: \"$ac_link\"") >&5
6862   (eval $ac_link) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit $ac_status); } &&
6866          { ac_try='test -s conftest$ac_exeext'
6867   { (eval echo "$as_me:6867: \"$ac_try\"") >&5
6868   (eval $ac_try) 2>&5
6869   ac_status=$?
6870   echo "$as_me:6870: \$? = $ac_status" >&5
6871   (exit $ac_status); }; }; then
6872   ac_cv_lib_dl_dlsym=yes
6873 else
6874   echo "$as_me: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6876 ac_cv_lib_dl_dlsym=no
6877 fi
6878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6879 LIBS=$ac_check_lib_save_LIBS
6880 fi
6881 echo "$as_me:6881: result: $ac_cv_lib_dl_dlsym" >&5
6882 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6883 if test $ac_cv_lib_dl_dlsym = yes; then
6884
6885         cf_have_dlsym=yes
6886         cf_have_libdl=yes
6887 fi
6888
6889 fi
6890
6891 if test "$cf_have_dlsym" = yes ; then
6892         test "$cf_have_libdl" = yes && {
6893 cf_add_libs="$LIBS"
6894 # reverse order
6895 cf_add_0lib=
6896 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6897 # filter duplicates
6898 for cf_add_1lib in $cf_add_0lib; do
6899         for cf_add_2lib in $cf_add_libs; do
6900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6901                         cf_add_1lib=
6902                         break
6903                 fi
6904         done
6905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6906 done
6907 LIBS="$cf_add_libs"
6908  }
6909
6910         echo "$as_me:6910: checking whether able to link to dl*() functions" >&5
6911 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6912         cat >conftest.$ac_ext <<_ACEOF
6913 #line 6913 "configure"
6914 #include "confdefs.h"
6915 #include <dlfcn.h>
6916 int
6917 main (void)
6918 {
6919
6920                 void *obj;
6921                 if ((obj = dlopen("filename", 0)) != 0) {
6922                         if (dlsym(obj, "symbolname") == 0) {
6923                         dlclose(obj);
6924                         }
6925                 }
6926   ;
6927   return 0;
6928 }
6929 _ACEOF
6930 rm -f conftest.$ac_objext conftest$ac_exeext
6931 if { (eval echo "$as_me:6931: \"$ac_link\"") >&5
6932   (eval $ac_link) 2>&5
6933   ac_status=$?
6934   echo "$as_me:6934: \$? = $ac_status" >&5
6935   (exit $ac_status); } &&
6936          { ac_try='test -s conftest$ac_exeext'
6937   { (eval echo "$as_me:6937: \"$ac_try\"") >&5
6938   (eval $ac_try) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); }; }; then
6942
6943 cat >>confdefs.h <<\EOF
6944 #define HAVE_LIBDL 1
6945 EOF
6946
6947 else
6948   echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950
6951                 { { echo "$as_me:6951: error: Cannot link test program for libdl" >&5
6952 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6953    { (exit 1); exit 1; }; }
6954 fi
6955 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6956         echo "$as_me:6956: result: ok" >&5
6957 echo "${ECHO_T}ok" >&6
6958 else
6959         { { echo "$as_me:6959: error: Cannot find dlsym function" >&5
6960 echo "$as_me: error: Cannot find dlsym function" >&2;}
6961    { (exit 1); exit 1; }; }
6962 fi
6963
6964                 if test "x$with_gpm" != xyes ; then
6965                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6966
6967 echo "${as_me:-configure}:6967: testing assuming soname for gpm is $with_gpm ..." 1>&5
6968
6969                         cf_cv_gpm_soname="$with_gpm"
6970                 else
6971
6972 echo "$as_me:6972: checking for soname of gpm library" >&5
6973 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6974 if test "${cf_cv_gpm_soname+set}" = set; then
6975   echo $ECHO_N "(cached) $ECHO_C" >&6
6976 else
6977
6978 cf_cv_gpm_soname=unknown
6979 if test "$cross_compiling" != yes ; then
6980 cat >conftest.$ac_ext <<CF_EOF
6981 #include <gpm.h>
6982 int main(void)
6983 {
6984 if (Gpm_Open(0,0)) Gpm_Close();
6985         ${cf_cv_main_return:-return}(0);
6986 }
6987 CF_EOF
6988 cf_save_LIBS="$LIBS"
6989
6990 cf_add_libs="$LIBS"
6991 # reverse order
6992 cf_add_0lib=
6993 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6994 # filter duplicates
6995 for cf_add_1lib in $cf_add_0lib; do
6996         for cf_add_2lib in $cf_add_libs; do
6997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6998                         cf_add_1lib=
6999                         break
7000                 fi
7001         done
7002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7003 done
7004 LIBS="$cf_add_libs"
7005
7006         if { (eval echo "$as_me:7006: \"$ac_compile\"") >&5
7007   (eval $ac_compile) 2>&5
7008   ac_status=$?
7009   echo "$as_me:7009: \$? = $ac_status" >&5
7010   (exit $ac_status); } ; then
7011                 if { (eval echo "$as_me:7011: \"$ac_link\"") >&5
7012   (eval $ac_link) 2>&5
7013   ac_status=$?
7014   echo "$as_me:7014: \$? = $ac_status" >&5
7015   (exit $ac_status); } ; then
7016                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
7017                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7018                 fi
7019         fi
7020 rm -rf conftest*
7021 LIBS="$cf_save_LIBS"
7022 fi
7023
7024 fi
7025 echo "$as_me:7025: result: $cf_cv_gpm_soname" >&5
7026 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7027
7028                 fi
7029                 test "$cf_cv_gpm_soname" != "unknown" &&
7030 cat >>confdefs.h <<EOF
7031 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7032 EOF
7033
7034                 SHLIB_LIST="-ldl $SHLIB_LIST"
7035
7036 cf_add_libs="$PRIVATE_LIBS"
7037 # reverse order
7038 cf_add_0lib=
7039 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7040 # filter duplicates
7041 for cf_add_1lib in $cf_add_0lib; do
7042         for cf_add_2lib in $cf_add_libs; do
7043                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7044                         cf_add_1lib=
7045                         break
7046                 fi
7047         done
7048         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7049 done
7050 PRIVATE_LIBS="$cf_add_libs"
7051
7052         else
7053                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7054
7055 cf_add_libs="$TEST_LIBS"
7056 # reverse order
7057 cf_add_0lib=
7058 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7059 # filter duplicates
7060 for cf_add_1lib in $cf_add_0lib; do
7061         for cf_add_2lib in $cf_add_libs; do
7062                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7063                         cf_add_1lib=
7064                         break
7065                 fi
7066         done
7067         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7068 done
7069 TEST_LIBS="$cf_add_libs"
7070
7071 cf_add_libs="$PRIVATE_LIBS"
7072 # reverse order
7073 cf_add_0lib=
7074 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7075 # filter duplicates
7076 for cf_add_1lib in $cf_add_0lib; do
7077         for cf_add_2lib in $cf_add_libs; do
7078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7079                         cf_add_1lib=
7080                         break
7081                 fi
7082         done
7083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7084 done
7085 PRIVATE_LIBS="$cf_add_libs"
7086
7087         fi
7088
7089 cat >>confdefs.h <<\EOF
7090 #define HAVE_LIBGPM 1
7091 EOF
7092
7093 echo "$as_me:7093: checking for Gpm_Wgetch in -lgpm" >&5
7094 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7095 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7096   echo $ECHO_N "(cached) $ECHO_C" >&6
7097 else
7098   ac_check_lib_save_LIBS=$LIBS
7099 LIBS="-lgpm  $LIBS"
7100 cat >conftest.$ac_ext <<_ACEOF
7101 #line 7101 "configure"
7102 #include "confdefs.h"
7103
7104 /* Override any gcc2 internal prototype to avoid an error.  */
7105 #ifdef __cplusplus
7106 extern "C"
7107 #endif
7108 /* We use char because int might match the return type of a gcc2
7109    builtin and then its argument prototype would still apply.  */
7110 char Gpm_Wgetch ();
7111 int
7112 main (void)
7113 {
7114 Gpm_Wgetch ();
7115   ;
7116   return 0;
7117 }
7118 _ACEOF
7119 rm -f conftest.$ac_objext conftest$ac_exeext
7120 if { (eval echo "$as_me:7120: \"$ac_link\"") >&5
7121   (eval $ac_link) 2>&5
7122   ac_status=$?
7123   echo "$as_me:7123: \$? = $ac_status" >&5
7124   (exit $ac_status); } &&
7125          { ac_try='test -s conftest$ac_exeext'
7126   { (eval echo "$as_me:7126: \"$ac_try\"") >&5
7127   (eval $ac_try) 2>&5
7128   ac_status=$?
7129   echo "$as_me:7129: \$? = $ac_status" >&5
7130   (exit $ac_status); }; }; then
7131   ac_cv_lib_gpm_Gpm_Wgetch=yes
7132 else
7133   echo "$as_me: failed program was:" >&5
7134 cat conftest.$ac_ext >&5
7135 ac_cv_lib_gpm_Gpm_Wgetch=no
7136 fi
7137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7138 LIBS=$ac_check_lib_save_LIBS
7139 fi
7140 echo "$as_me:7140: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7141 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7142 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
7143
7144 echo "$as_me:7144: checking if GPM is weakly bound to curses library" >&5
7145 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7146 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7147   echo $ECHO_N "(cached) $ECHO_C" >&6
7148 else
7149
7150 cf_cv_check_gpm_wgetch=unknown
7151 if test "$cross_compiling" != yes ; then
7152
7153 cat >conftest.$ac_ext <<CF_EOF
7154 #include <gpm.h>
7155 int main(void)
7156 {
7157         Gpm_Wgetch();
7158         ${cf_cv_main_return:-return}(0);
7159 }
7160 CF_EOF
7161
7162         cf_save_LIBS="$LIBS"
7163         # This only works if we can look at the symbol table.  If a shared
7164         # library is stripped for install, we cannot use that.  So we're forced
7165         # to rely on the static library, noting that some packagers may not
7166         # include it.
7167         LIBS="-static -lgpm -dynamic $LIBS"
7168         if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } ; then
7173                 if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
7174   (eval $ac_link) 2>&5
7175   ac_status=$?
7176   echo "$as_me:7176: \$? = $ac_status" >&5
7177   (exit $ac_status); } ; then
7178                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
7179                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7180                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7181                 fi
7182         fi
7183         rm -rf conftest*
7184         LIBS="$cf_save_LIBS"
7185 fi
7186
7187 fi
7188 echo "$as_me:7188: result: $cf_cv_check_gpm_wgetch" >&5
7189 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7190
7191 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7192         { echo "$as_me:7192: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7193 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7194 fi
7195
7196 fi
7197
7198 fi
7199
7200 echo "$as_me:7200: checking if you want to use PCRE2 for regular-expressions" >&5
7201 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7202
7203 # Check whether --with-pcre2 or --without-pcre2 was given.
7204 if test "${with_pcre2+set}" = set; then
7205   withval="$with_pcre2"
7206
7207 fi;
7208 test -z "$with_pcre2" && with_pcre2=no
7209 echo "$as_me:7209: result: $with_pcre2" >&5
7210 echo "${ECHO_T}$with_pcre2" >&6
7211
7212 if test "x$with_pcre2" != xno ; then
7213
7214 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
7215         test -n "$verbose" && echo "    found package libpcre2" 1>&6
7216
7217 echo "${as_me:-configure}:7217: testing found package libpcre2 ..." 1>&5
7218
7219         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
7220         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
7221         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7222
7223 echo "${as_me:-configure}:7223: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7224
7225         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7226
7227 echo "${as_me:-configure}:7227: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7228
7229 cf_fix_cppflags=no
7230 cf_new_cflags=
7231 cf_new_cppflags=
7232 cf_new_extra_cppflags=
7233
7234 for cf_add_cflags in $cf_pkgconfig_incs
7235 do
7236 case $cf_fix_cppflags in
7237 (no)
7238         case $cf_add_cflags in
7239         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7240                 case $cf_add_cflags in
7241                 (-D*)
7242                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7243
7244                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7245                                 && test -z "${cf_tst_cflags}" \
7246                                 && cf_fix_cppflags=yes
7247
7248                         if test $cf_fix_cppflags = yes ; then
7249
7250         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7251         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7252
7253                                 continue
7254                         elif test "${cf_tst_cflags}" = "\"'" ; then
7255
7256         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7257         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7258
7259                                 continue
7260                         fi
7261                         ;;
7262                 esac
7263                 case "$CPPFLAGS" in
7264                 (*$cf_add_cflags)
7265                         ;;
7266                 (*)
7267                         case $cf_add_cflags in
7268                         (-D*)
7269                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7270
7271 CPPFLAGS=`echo "$CPPFLAGS" | \
7272         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7273                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7274
7275                                 ;;
7276                         esac
7277
7278         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7279         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7280
7281                         ;;
7282                 esac
7283                 ;;
7284         (*)
7285
7286         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7287         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7288
7289                 ;;
7290         esac
7291         ;;
7292 (yes)
7293
7294         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7295         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7296
7297         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7298
7299         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7300                 && test -z "${cf_tst_cflags}" \
7301                 && cf_fix_cppflags=no
7302         ;;
7303 esac
7304 done
7305
7306 if test -n "$cf_new_cflags" ; then
7307
7308         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7309         CFLAGS="${CFLAGS}$cf_new_cflags"
7310
7311 fi
7312
7313 if test -n "$cf_new_cppflags" ; then
7314
7315         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7316         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7317
7318 fi
7319
7320 if test -n "$cf_new_extra_cppflags" ; then
7321
7322         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7323         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7324
7325 fi
7326
7327 cf_add_libs="$LIBS"
7328 # reverse order
7329 cf_add_0lib=
7330 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7331 # filter duplicates
7332 for cf_add_1lib in $cf_add_0lib; do
7333         for cf_add_2lib in $cf_add_libs; do
7334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7335                         cf_add_1lib=
7336                         break
7337                 fi
7338         done
7339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7340 done
7341 LIBS="$cf_add_libs"
7342
7343         :
7344 else
7345         cf_pkgconfig_incs=
7346         cf_pkgconfig_libs=
7347
7348 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7349         test -n "$verbose" && echo "    found package libpcre" 1>&6
7350
7351 echo "${as_me:-configure}:7351: testing found package libpcre ..." 1>&5
7352
7353         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7354         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7355         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7356
7357 echo "${as_me:-configure}:7357: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7358
7359         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7360
7361 echo "${as_me:-configure}:7361: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7362
7363 cf_fix_cppflags=no
7364 cf_new_cflags=
7365 cf_new_cppflags=
7366 cf_new_extra_cppflags=
7367
7368 for cf_add_cflags in $cf_pkgconfig_incs
7369 do
7370 case $cf_fix_cppflags in
7371 (no)
7372         case $cf_add_cflags in
7373         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7374                 case $cf_add_cflags in
7375                 (-D*)
7376                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7377
7378                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7379                                 && test -z "${cf_tst_cflags}" \
7380                                 && cf_fix_cppflags=yes
7381
7382                         if test $cf_fix_cppflags = yes ; then
7383
7384         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7385         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7386
7387                                 continue
7388                         elif test "${cf_tst_cflags}" = "\"'" ; then
7389
7390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7392
7393                                 continue
7394                         fi
7395                         ;;
7396                 esac
7397                 case "$CPPFLAGS" in
7398                 (*$cf_add_cflags)
7399                         ;;
7400                 (*)
7401                         case $cf_add_cflags in
7402                         (-D*)
7403                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7404
7405 CPPFLAGS=`echo "$CPPFLAGS" | \
7406         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7407                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7408
7409                                 ;;
7410                         esac
7411
7412         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7413         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7414
7415                         ;;
7416                 esac
7417                 ;;
7418         (*)
7419
7420         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7421         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7422
7423                 ;;
7424         esac
7425         ;;
7426 (yes)
7427
7428         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7429         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7430
7431         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7432
7433         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7434                 && test -z "${cf_tst_cflags}" \
7435                 && cf_fix_cppflags=no
7436         ;;
7437 esac
7438 done
7439
7440 if test -n "$cf_new_cflags" ; then
7441
7442         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7443         CFLAGS="${CFLAGS}$cf_new_cflags"
7444
7445 fi
7446
7447 if test -n "$cf_new_cppflags" ; then
7448
7449         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7450         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7451
7452 fi
7453
7454 if test -n "$cf_new_extra_cppflags" ; then
7455
7456         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7457         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7458
7459 fi
7460
7461 cf_add_libs="$LIBS"
7462 # reverse order
7463 cf_add_0lib=
7464 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7465 # filter duplicates
7466 for cf_add_1lib in $cf_add_0lib; do
7467         for cf_add_2lib in $cf_add_libs; do
7468                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7469                         cf_add_1lib=
7470                         break
7471                 fi
7472         done
7473         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7474 done
7475 LIBS="$cf_add_libs"
7476
7477         :
7478 else
7479         cf_pkgconfig_incs=
7480         cf_pkgconfig_libs=
7481
7482                         { { echo "$as_me:7482: error: Cannot find PCRE2 library" >&5
7483 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7484    { (exit 1); exit 1; }; }
7485 fi
7486
7487 fi
7488
7489 cat >>confdefs.h <<\EOF
7490 #define HAVE_LIB_PCRE2 1
7491 EOF
7492
7493         # if pkgconfig gave no results, look for the libraries directly
7494         case $LIBS in
7495         (*pcre2-posix*|*pcreposix*)
7496                 ;;
7497         (*)
7498                 echo "$as_me:7498: checking for regcomp in -lpcre2-posix" >&5
7499 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7500 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7501   echo $ECHO_N "(cached) $ECHO_C" >&6
7502 else
7503   ac_check_lib_save_LIBS=$LIBS
7504 LIBS="-lpcre2-posix  $LIBS"
7505 cat >conftest.$ac_ext <<_ACEOF
7506 #line 7506 "configure"
7507 #include "confdefs.h"
7508
7509 /* Override any gcc2 internal prototype to avoid an error.  */
7510 #ifdef __cplusplus
7511 extern "C"
7512 #endif
7513 /* We use char because int might match the return type of a gcc2
7514    builtin and then its argument prototype would still apply.  */
7515 char regcomp ();
7516 int
7517 main (void)
7518 {
7519 regcomp ();
7520   ;
7521   return 0;
7522 }
7523 _ACEOF
7524 rm -f conftest.$ac_objext conftest$ac_exeext
7525 if { (eval echo "$as_me:7525: \"$ac_link\"") >&5
7526   (eval $ac_link) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); } &&
7530          { ac_try='test -s conftest$ac_exeext'
7531   { (eval echo "$as_me:7531: \"$ac_try\"") >&5
7532   (eval $ac_try) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); }; }; then
7536   ac_cv_lib_pcre2_posix_regcomp=yes
7537 else
7538   echo "$as_me: failed program was:" >&5
7539 cat conftest.$ac_ext >&5
7540 ac_cv_lib_pcre2_posix_regcomp=no
7541 fi
7542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7543 LIBS=$ac_check_lib_save_LIBS
7544 fi
7545 echo "$as_me:7545: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7546 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7547 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7548
7549 cf_add_libs="$LIBS"
7550 # reverse order
7551 cf_add_0lib=
7552 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7553 # filter duplicates
7554 for cf_add_1lib in $cf_add_0lib; do
7555         for cf_add_2lib in $cf_add_libs; do
7556                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7557                         cf_add_1lib=
7558                         break
7559                 fi
7560         done
7561         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7562 done
7563 LIBS="$cf_add_libs"
7564
7565 else
7566   echo "$as_me:7566: checking for regcomp in -lpcreposix" >&5
7567 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7568 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7569   echo $ECHO_N "(cached) $ECHO_C" >&6
7570 else
7571   ac_check_lib_save_LIBS=$LIBS
7572 LIBS="-lpcreposix  $LIBS"
7573 cat >conftest.$ac_ext <<_ACEOF
7574 #line 7574 "configure"
7575 #include "confdefs.h"
7576
7577 /* Override any gcc2 internal prototype to avoid an error.  */
7578 #ifdef __cplusplus
7579 extern "C"
7580 #endif
7581 /* We use char because int might match the return type of a gcc2
7582    builtin and then its argument prototype would still apply.  */
7583 char regcomp ();
7584 int
7585 main (void)
7586 {
7587 regcomp ();
7588   ;
7589   return 0;
7590 }
7591 _ACEOF
7592 rm -f conftest.$ac_objext conftest$ac_exeext
7593 if { (eval echo "$as_me:7593: \"$ac_link\"") >&5
7594   (eval $ac_link) 2>&5
7595   ac_status=$?
7596   echo "$as_me:7596: \$? = $ac_status" >&5
7597   (exit $ac_status); } &&
7598          { ac_try='test -s conftest$ac_exeext'
7599   { (eval echo "$as_me:7599: \"$ac_try\"") >&5
7600   (eval $ac_try) 2>&5
7601   ac_status=$?
7602   echo "$as_me:7602: \$? = $ac_status" >&5
7603   (exit $ac_status); }; }; then
7604   ac_cv_lib_pcreposix_regcomp=yes
7605 else
7606   echo "$as_me: failed program was:" >&5
7607 cat conftest.$ac_ext >&5
7608 ac_cv_lib_pcreposix_regcomp=no
7609 fi
7610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7611 LIBS=$ac_check_lib_save_LIBS
7612 fi
7613 echo "$as_me:7613: result: $ac_cv_lib_pcreposix_regcomp" >&5
7614 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7615 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7616
7617 cf_add_libs="$LIBS"
7618 # reverse order
7619 cf_add_0lib=
7620 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7621 # filter duplicates
7622 for cf_add_1lib in $cf_add_0lib; do
7623         for cf_add_2lib in $cf_add_libs; do
7624                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7625                         cf_add_1lib=
7626                         break
7627                 fi
7628         done
7629         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7630 done
7631 LIBS="$cf_add_libs"
7632
7633 else
7634   { { echo "$as_me:7634: error: Cannot find PCRE2 POSIX library" >&5
7635 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7636    { (exit 1); exit 1; }; }
7637 fi
7638
7639 fi
7640
7641                 ;;
7642         esac
7643
7644         # either way, check for the library header files
7645
7646 for ac_header in pcre2posix.h pcreposix.h
7647 do
7648 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7649 echo "$as_me:7649: checking for $ac_header" >&5
7650 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7651 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7652   echo $ECHO_N "(cached) $ECHO_C" >&6
7653 else
7654   cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657 #include <$ac_header>
7658 _ACEOF
7659 if { (eval echo "$as_me:7659: \"$ac_cpp conftest.$ac_ext\"") >&5
7660   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7661   ac_status=$?
7662   egrep -v '^ *\+' conftest.er1 >conftest.err
7663   rm -f conftest.er1
7664   cat conftest.err >&5
7665   echo "$as_me:7665: \$? = $ac_status" >&5
7666   (exit $ac_status); } >/dev/null; then
7667   if test -s conftest.err; then
7668     ac_cpp_err=$ac_c_preproc_warn_flag
7669   else
7670     ac_cpp_err=
7671   fi
7672 else
7673   ac_cpp_err=yes
7674 fi
7675 if test -z "$ac_cpp_err"; then
7676   eval "$as_ac_Header=yes"
7677 else
7678   echo "$as_me: failed program was:" >&5
7679   cat conftest.$ac_ext >&5
7680   eval "$as_ac_Header=no"
7681 fi
7682 rm -f conftest.err conftest.$ac_ext
7683 fi
7684 echo "$as_me:7684: result: `eval echo '${'$as_ac_Header'}'`" >&5
7685 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7686 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7687   cat >>confdefs.h <<EOF
7688 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7689 EOF
7690
7691 fi
7692 done
7693
7694 fi
7695
7696 # not everyone has "test -c"
7697 if test -c /dev/sysmouse 2>/dev/null ; then
7698 echo "$as_me:7698: checking if you want to use sysmouse" >&5
7699 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7700
7701 # Check whether --with-sysmouse or --without-sysmouse was given.
7702 if test "${with_sysmouse+set}" = set; then
7703   withval="$with_sysmouse"
7704   cf_with_sysmouse=$withval
7705 else
7706   cf_with_sysmouse=maybe
7707 fi;
7708         if test "$cf_with_sysmouse" != no ; then
7709         cat >conftest.$ac_ext <<_ACEOF
7710 #line 7710 "configure"
7711 #include "confdefs.h"
7712
7713 #include <osreldate.h>
7714 #if (__FreeBSD_version >= 400017)
7715 #include <sys/consio.h>
7716 #include <sys/fbio.h>
7717 #else
7718 #include <machine/console.h>
7719 #endif
7720
7721 int
7722 main (void)
7723 {
7724
7725         struct mouse_info the_mouse;
7726         ioctl(0, CONS_MOUSECTL, &the_mouse);
7727
7728   ;
7729   return 0;
7730 }
7731 _ACEOF
7732 rm -f conftest.$ac_objext
7733 if { (eval echo "$as_me:7733: \"$ac_compile\"") >&5
7734   (eval $ac_compile) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); } &&
7738          { ac_try='test -s conftest.$ac_objext'
7739   { (eval echo "$as_me:7739: \"$ac_try\"") >&5
7740   (eval $ac_try) 2>&5
7741   ac_status=$?
7742   echo "$as_me:7742: \$? = $ac_status" >&5
7743   (exit $ac_status); }; }; then
7744   cf_with_sysmouse=yes
7745 else
7746   echo "$as_me: failed program was:" >&5
7747 cat conftest.$ac_ext >&5
7748 cf_with_sysmouse=no
7749 fi
7750 rm -f conftest.$ac_objext conftest.$ac_ext
7751         fi
7752 echo "$as_me:7752: result: $cf_with_sysmouse" >&5
7753 echo "${ECHO_T}$cf_with_sysmouse" >&6
7754 test "$cf_with_sysmouse" = yes &&
7755 cat >>confdefs.h <<\EOF
7756 #define USE_SYSMOUSE 1
7757 EOF
7758
7759 fi
7760
7761 # pretend that ncurses==ncursesw==ncursest
7762 echo "$as_me:7762: checking if you want to disable library suffixes" >&5
7763 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7764
7765 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7766 if test "${enable_lib_suffixes+set}" = set; then
7767   enableval="$enable_lib_suffixes"
7768   test "$enableval" != no && enableval=yes
7769         if test "$enableval" != "yes" ; then
7770     disable_lib_suffixes=yes
7771         else
7772                 disable_lib_suffixes=no
7773         fi
7774 else
7775   enableval=yes
7776         disable_lib_suffixes=no
7777
7778 fi;
7779 echo "$as_me:7779: result: $disable_lib_suffixes" >&5
7780 echo "${ECHO_T}$disable_lib_suffixes" >&6
7781
7782 ### If we're building with rpath, try to link non-standard libs that way too.
7783 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7784
7785 echo "$as_me:7785: checking if rpath-hack should be disabled" >&5
7786 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7787
7788 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7789 if test "${enable_rpath_hack+set}" = set; then
7790   enableval="$enable_rpath_hack"
7791   test "$enableval" != no && enableval=yes
7792         if test "$enableval" != "yes" ; then
7793     cf_disable_rpath_hack=yes
7794         else
7795                 cf_disable_rpath_hack=no
7796         fi
7797 else
7798   enableval=yes
7799         cf_disable_rpath_hack=no
7800
7801 fi;
7802 echo "$as_me:7802: result: $cf_disable_rpath_hack" >&5
7803 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7804 if test "$cf_disable_rpath_hack" = no ; then
7805
7806 echo "$as_me:7806: checking for updated LDFLAGS" >&5
7807 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7808 if test -n "$LD_RPATH_OPT" ; then
7809         echo "$as_me:7809: result: maybe" >&5
7810 echo "${ECHO_T}maybe" >&6
7811
7812         for ac_prog in ldd
7813 do
7814   # Extract the first word of "$ac_prog", so it can be a program name with args.
7815 set dummy $ac_prog; ac_word=$2
7816 echo "$as_me:7816: checking for $ac_word" >&5
7817 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7818 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7819   echo $ECHO_N "(cached) $ECHO_C" >&6
7820 else
7821   if test -n "$cf_ldd_prog"; then
7822   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7823 else
7824   ac_save_IFS=$IFS; IFS=$ac_path_separator
7825 ac_dummy="$PATH"
7826 for ac_dir in $ac_dummy; do
7827   IFS=$ac_save_IFS
7828   test -z "$ac_dir" && ac_dir=.
7829   $as_executable_p "$ac_dir/$ac_word" || continue
7830 ac_cv_prog_cf_ldd_prog="$ac_prog"
7831 echo "$as_me:7831: found $ac_dir/$ac_word" >&5
7832 break
7833 done
7834
7835 fi
7836 fi
7837 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7838 if test -n "$cf_ldd_prog"; then
7839   echo "$as_me:7839: result: $cf_ldd_prog" >&5
7840 echo "${ECHO_T}$cf_ldd_prog" >&6
7841 else
7842   echo "$as_me:7842: result: no" >&5
7843 echo "${ECHO_T}no" >&6
7844 fi
7845
7846   test -n "$cf_ldd_prog" && break
7847 done
7848 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7849
7850         cf_rpath_list="/usr/lib /lib"
7851         if test "$cf_ldd_prog" != no
7852         then
7853                 cf_rpath_oops=
7854
7855 cat >conftest.$ac_ext <<_ACEOF
7856 #line 7856 "configure"
7857 #include "confdefs.h"
7858 #include <stdio.h>
7859 int
7860 main (void)
7861 {
7862 printf("Hello");
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 rm -f conftest.$ac_objext conftest$ac_exeext
7868 if { (eval echo "$as_me:7868: \"$ac_link\"") >&5
7869   (eval $ac_link) 2>&5
7870   ac_status=$?
7871   echo "$as_me:7871: \$? = $ac_status" >&5
7872   (exit $ac_status); } &&
7873          { ac_try='test -s conftest$ac_exeext'
7874   { (eval echo "$as_me:7874: \"$ac_try\"") >&5
7875   (eval $ac_try) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); }; }; then
7879   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7880                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 fi
7885 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7886
7887                 # If we passed the link-test, but get a "not found" on a given library,
7888                 # this could be due to inept reconfiguration of gcc to make it only
7889                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7890                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7891                 # /usr/local libraries.
7892                 if test -n "$cf_rpath_oops"
7893                 then
7894                         for cf_rpath_src in $cf_rpath_oops
7895                         do
7896                                 for cf_rpath_dir in \
7897                                         /usr/local \
7898                                         /usr/pkg \
7899                                         /opt/sfw
7900                                 do
7901                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7902                                         then
7903                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7904
7905 echo "${as_me:-configure}:7905: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7906
7907                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7908                                                 break
7909                                         fi
7910                                 done
7911                         done
7912                 fi
7913         fi
7914
7915         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7916
7917 echo "${as_me:-configure}:7917: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7918
7919 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7920
7921 echo "${as_me:-configure}:7921: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7922
7923 cf_rpath_dst=
7924 for cf_rpath_src in $LDFLAGS
7925 do
7926         case $cf_rpath_src in
7927         (-L*)
7928
7929                 # check if this refers to a directory which we will ignore
7930                 cf_rpath_skip=no
7931                 if test -n "$cf_rpath_list"
7932                 then
7933                         for cf_rpath_item in $cf_rpath_list
7934                         do
7935                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7936                                 then
7937                                         cf_rpath_skip=yes
7938                                         break
7939                                 fi
7940                         done
7941                 fi
7942
7943                 if test "$cf_rpath_skip" = no
7944                 then
7945                         # transform the option
7946                         if test "$LD_RPATH_OPT" = "-R " ; then
7947                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7948                         else
7949                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7950                         fi
7951
7952                         # if we have not already added this, add it now
7953                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7954                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7955                         then
7956                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7957
7958 echo "${as_me:-configure}:7958: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7959
7960                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7961                         fi
7962                 fi
7963                 ;;
7964         esac
7965         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7966 done
7967 LDFLAGS=$cf_rpath_dst
7968
7969 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7970
7971 echo "${as_me:-configure}:7971: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7972
7973 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7974
7975 echo "${as_me:-configure}:7975: testing ...checking LIBS $LIBS ..." 1>&5
7976
7977 cf_rpath_dst=
7978 for cf_rpath_src in $LIBS
7979 do
7980         case $cf_rpath_src in
7981         (-L*)
7982
7983                 # check if this refers to a directory which we will ignore
7984                 cf_rpath_skip=no
7985                 if test -n "$cf_rpath_list"
7986                 then
7987                         for cf_rpath_item in $cf_rpath_list
7988                         do
7989                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7990                                 then
7991                                         cf_rpath_skip=yes
7992                                         break
7993                                 fi
7994                         done
7995                 fi
7996
7997                 if test "$cf_rpath_skip" = no
7998                 then
7999                         # transform the option
8000                         if test "$LD_RPATH_OPT" = "-R " ; then
8001                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8002                         else
8003                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8004                         fi
8005
8006                         # if we have not already added this, add it now
8007                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8008                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8009                         then
8010                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8011
8012 echo "${as_me:-configure}:8012: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8013
8014                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8015                         fi
8016                 fi
8017                 ;;
8018         esac
8019         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8020 done
8021 LIBS=$cf_rpath_dst
8022
8023 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8024
8025 echo "${as_me:-configure}:8025: testing ...checked LIBS $LIBS ..." 1>&5
8026
8027         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8028
8029 echo "${as_me:-configure}:8029: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8030
8031 else
8032         echo "$as_me:8032: result: no" >&5
8033 echo "${ECHO_T}no" >&6
8034 fi
8035
8036 fi
8037
8038 fi
8039
8040 ### Depending on the system, someone may use rpath to build ncurses but not
8041 # want users of the package to rely upon that feature.  Give those people an
8042 # option to suppress that detail from EXTRA_LDFLAGS.
8043 EXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS"
8044 if test -n "$EXTRA_PKG_LDFLAGS"
8045 then
8046         echo "$as_me:8046: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8047 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8048
8049 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8050 if test "${enable_pkg_ldflags+set}" = set; then
8051   enableval="$enable_pkg_ldflags"
8052   test "$enableval" != no && enableval=yes
8053         if test "$enableval" != "yes" ; then
8054     disable_pkg_ldflags=yes
8055         else
8056                 disable_pkg_ldflags=no
8057         fi
8058 else
8059   enableval=yes
8060         disable_pkg_ldflags=no
8061
8062 fi;
8063         echo "$as_me:8063: result: $disable_pkg_ldflags" >&5
8064 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8065         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8066 fi
8067
8068 ###############################################################################
8069
8070 ###     use option --with-extra-suffix to append suffix to headers and libraries
8071 echo "$as_me:8071: checking if you wish to append extra suffix to header/library paths" >&5
8072 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8073 EXTRA_SUFFIX=
8074
8075 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8076 if test "${with_extra_suffix+set}" = set; then
8077   withval="$with_extra_suffix"
8078   case x$withval in
8079         (no)
8080                 ;;
8081         (xyes|x)
8082                 EXTRA_SUFFIX=$cf_cv_abi_version
8083                 ;;
8084         (*)
8085                 EXTRA_SUFFIX=$withval
8086                 ;;
8087         esac
8088
8089 fi;
8090 echo "$as_me:8090: result: $EXTRA_SUFFIX" >&5
8091 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8092
8093 ###     use option --disable-overwrite to leave out the link to -lcurses
8094 echo "$as_me:8094: checking if you wish to install ncurses overwriting curses" >&5
8095 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8096
8097 # Check whether --enable-overwrite or --disable-overwrite was given.
8098 if test "${enable_overwrite+set}" = set; then
8099   enableval="$enable_overwrite"
8100   with_overwrite=$enableval
8101 else
8102   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8103 fi;
8104 echo "$as_me:8104: result: $with_overwrite" >&5
8105 echo "${ECHO_T}$with_overwrite" >&6
8106
8107 echo "$as_me:8107: checking if external terminfo-database is used" >&5
8108 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8109
8110 # Check whether --enable-database or --disable-database was given.
8111 if test "${enable_database+set}" = set; then
8112   enableval="$enable_database"
8113   use_database=$enableval
8114 else
8115   use_database=yes
8116 fi;
8117 echo "$as_me:8117: result: $use_database" >&5
8118 echo "${ECHO_T}$use_database" >&6
8119
8120 case $host_os in
8121 (os2*)
8122         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8123         ;;
8124 (*)
8125         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8126         ;;
8127 esac
8128
8129 NCURSES_USE_DATABASE=0
8130 if test "$use_database" != no ; then
8131         NCURSES_USE_DATABASE=1
8132
8133         echo "$as_me:8133: checking which terminfo source-file will be installed" >&5
8134 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8135
8136 # Check whether --with-database or --without-database was given.
8137 if test "${with_database+set}" = set; then
8138   withval="$with_database"
8139   TERMINFO_SRC=$withval
8140 fi;
8141         echo "$as_me:8141: result: $TERMINFO_SRC" >&5
8142 echo "${ECHO_T}$TERMINFO_SRC" >&6
8143
8144         echo "$as_me:8144: checking whether to use hashed database instead of directory/tree" >&5
8145 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8146
8147 # Check whether --with-hashed-db or --without-hashed-db was given.
8148 if test "${with_hashed_db+set}" = set; then
8149   withval="$with_hashed_db"
8150
8151 else
8152   with_hashed_db=no
8153 fi;
8154         echo "$as_me:8154: result: $with_hashed_db" >&5
8155 echo "${ECHO_T}$with_hashed_db" >&6
8156 else
8157         with_hashed_db=no
8158 fi
8159
8160 echo "$as_me:8160: checking for list of fallback descriptions" >&5
8161 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8162
8163 # Check whether --with-fallbacks or --without-fallbacks was given.
8164 if test "${with_fallbacks+set}" = set; then
8165   withval="$with_fallbacks"
8166   with_fallback=$withval
8167 else
8168   with_fallback=
8169 fi;
8170 echo "$as_me:8170: result: $with_fallback" >&5
8171 echo "${ECHO_T}$with_fallback" >&6
8172
8173 case ".$with_fallback" in
8174 (.|.no)
8175         FALLBACK_LIST=
8176         ;;
8177 (.yes)
8178         { echo "$as_me:8178: WARNING: expected a list of terminal descriptions" >&5
8179 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8180         ;;
8181 (*)
8182         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8183         ;;
8184 esac
8185
8186 USE_FALLBACKS=
8187 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8188
8189 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8190 # tree for generating the terminal descriptions that will be compiled into the
8191 # library.  If your toolchain is old, it may not handle current terminal
8192 # databases.  Use configure-options to point to the tools which will be used,
8193 # rather than the first ones found on the $PATH.
8194 if test -n "$FALLBACK_LIST"
8195 then
8196
8197 # Check whether --with-tic-path or --without-tic-path was given.
8198 if test "${with_tic_path+set}" = set; then
8199   withval="$with_tic_path"
8200   echo "$as_me:8200: checking for tic program for fallbacks" >&5
8201 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8202                 TIC=$withval
8203                 echo "$as_me:8203: result: $TIC" >&5
8204 echo "${ECHO_T}$TIC" >&6
8205
8206 if test "x$prefix" != xNONE; then
8207         cf_path_syntax="$prefix"
8208 else
8209         cf_path_syntax="$ac_default_prefix"
8210 fi
8211
8212 case ".$TIC" in
8213 (.\$\(*\)*|.\'*\'*)
8214         ;;
8215 (..|./*|.\\*)
8216         ;;
8217 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8218         ;;
8219 (.\${*prefix}*|.\${*dir}*)
8220         eval TIC="$TIC"
8221         case ".$TIC" in
8222         (.NONE/*)
8223                 TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8224                 ;;
8225         esac
8226         ;;
8227 (.no|.NONE/*)
8228         TIC=`echo $TIC | sed -e s%NONE%$cf_path_syntax%`
8229         ;;
8230 (*)
8231         { { echo "$as_me:8231: error: expected a pathname, not \"$TIC\"" >&5
8232 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8233    { (exit 1); exit 1; }; }
8234         ;;
8235 esac
8236
8237 else
8238
8239 test -z "$TIC" && TIC=tic
8240 for ac_prog in $TIC tic
8241 do
8242   # Extract the first word of "$ac_prog", so it can be a program name with args.
8243 set dummy $ac_prog; ac_word=$2
8244 echo "$as_me:8244: checking for $ac_word" >&5
8245 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8246 if test "${ac_cv_path_TIC+set}" = set; then
8247   echo $ECHO_N "(cached) $ECHO_C" >&6
8248 else
8249   case $TIC in
8250   [\\/]* | ?:[\\/]*)
8251   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8252   ;;
8253   *)
8254   ac_save_IFS=$IFS; IFS=$ac_path_separator
8255 ac_dummy="$PATH:/usr/local/ncurses/bin"
8256 for ac_dir in $ac_dummy; do
8257   IFS=$ac_save_IFS
8258   test -z "$ac_dir" && ac_dir=.
8259   if $as_executable_p "$ac_dir/$ac_word"; then
8260    ac_cv_path_TIC="$ac_dir/$ac_word"
8261    echo "$as_me:8261: found $ac_dir/$ac_word" >&5
8262    break
8263 fi
8264 done
8265
8266   ;;
8267 esac
8268 fi
8269 TIC=$ac_cv_path_TIC
8270
8271 if test -n "$TIC"; then
8272   echo "$as_me:8272: result: $TIC" >&5
8273 echo "${ECHO_T}$TIC" >&6
8274 else
8275   echo "$as_me:8275: result: no" >&5
8276 echo "${ECHO_T}no" >&6
8277 fi
8278
8279   test -n "$TIC" && break
8280 done
8281 test -n "$TIC" || TIC="$TIC"
8282
8283 cf_path_prog=""
8284 cf_path_args=""
8285 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8286 for cf_temp in $ac_cv_path_TIC
8287 do
8288         if test -z "$cf_path_prog" ; then
8289                 if test "$with_full_paths" = yes ; then
8290
8291 if test "x$prefix" != xNONE; then
8292         cf_path_syntax="$prefix"
8293 else
8294         cf_path_syntax="$ac_default_prefix"
8295 fi
8296
8297 case ".$cf_temp" in
8298 (.\$\(*\)*|.\'*\'*)
8299         ;;
8300 (..|./*|.\\*)
8301         ;;
8302 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8303         ;;
8304 (.\${*prefix}*|.\${*dir}*)
8305         eval cf_temp="$cf_temp"
8306         case ".$cf_temp" in
8307         (.NONE/*)
8308                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8309                 ;;
8310         esac
8311         ;;
8312 (.no|.NONE/*)
8313         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8314         ;;
8315 (*)
8316         break
8317         ;;
8318 esac
8319
8320                         cf_path_prog="$cf_temp"
8321                 else
8322                         cf_path_prog="`basename $cf_temp`"
8323                 fi
8324         elif test -z "$cf_path_args" ; then
8325                 cf_path_args="$cf_temp"
8326         else
8327                 cf_path_args="$cf_path_args $cf_temp"
8328         fi
8329 done
8330 IFS="$cf_save_ifs"
8331
8332 if test -n "$cf_path_prog" ; then
8333
8334 echo "${as_me:-configure}:8334: testing defining path for ${cf_path_prog} ..." 1>&5
8335
8336 cat >>confdefs.h <<EOF
8337 #define TIC_PATH "$cf_path_prog"
8338 EOF
8339
8340         test -n "$cf_path_args" &&
8341 cat >>confdefs.h <<EOF
8342 #define TIC_ARGS "$cf_path_args"
8343 EOF
8344
8345 fi
8346
8347                 if test -z "$TIC"
8348                 then
8349                         { echo "$as_me:8349: WARNING: no tic program found for fallbacks" >&5
8350 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8351                 fi
8352
8353 fi;
8354
8355 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8356 if test "${with_infocmp_path+set}" = set; then
8357   withval="$with_infocmp_path"
8358   echo "$as_me:8358: checking for infocmp program for fallbacks" >&5
8359 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8360                 INFOCMP=$withval
8361                 echo "$as_me:8361: result: $INFOCMP" >&5
8362 echo "${ECHO_T}$INFOCMP" >&6
8363
8364 if test "x$prefix" != xNONE; then
8365         cf_path_syntax="$prefix"
8366 else
8367         cf_path_syntax="$ac_default_prefix"
8368 fi
8369
8370 case ".$INFOCMP" in
8371 (.\$\(*\)*|.\'*\'*)
8372         ;;
8373 (..|./*|.\\*)
8374         ;;
8375 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8376         ;;
8377 (.\${*prefix}*|.\${*dir}*)
8378         eval INFOCMP="$INFOCMP"
8379         case ".$INFOCMP" in
8380         (.NONE/*)
8381                 INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8382                 ;;
8383         esac
8384         ;;
8385 (.no|.NONE/*)
8386         INFOCMP=`echo $INFOCMP | sed -e s%NONE%$cf_path_syntax%`
8387         ;;
8388 (*)
8389         { { echo "$as_me:8389: error: expected a pathname, not \"$INFOCMP\"" >&5
8390 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8391    { (exit 1); exit 1; }; }
8392         ;;
8393 esac
8394
8395 else
8396
8397 test -z "$INFOCMP" && INFOCMP=infocmp
8398 for ac_prog in $INFOCMP infocmp
8399 do
8400   # Extract the first word of "$ac_prog", so it can be a program name with args.
8401 set dummy $ac_prog; ac_word=$2
8402 echo "$as_me:8402: checking for $ac_word" >&5
8403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8404 if test "${ac_cv_path_INFOCMP+set}" = set; then
8405   echo $ECHO_N "(cached) $ECHO_C" >&6
8406 else
8407   case $INFOCMP in
8408   [\\/]* | ?:[\\/]*)
8409   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8410   ;;
8411   *)
8412   ac_save_IFS=$IFS; IFS=$ac_path_separator
8413 ac_dummy="$PATH:/usr/local/ncurses/bin"
8414 for ac_dir in $ac_dummy; do
8415   IFS=$ac_save_IFS
8416   test -z "$ac_dir" && ac_dir=.
8417   if $as_executable_p "$ac_dir/$ac_word"; then
8418    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8419    echo "$as_me:8419: found $ac_dir/$ac_word" >&5
8420    break
8421 fi
8422 done
8423
8424   ;;
8425 esac
8426 fi
8427 INFOCMP=$ac_cv_path_INFOCMP
8428
8429 if test -n "$INFOCMP"; then
8430   echo "$as_me:8430: result: $INFOCMP" >&5
8431 echo "${ECHO_T}$INFOCMP" >&6
8432 else
8433   echo "$as_me:8433: result: no" >&5
8434 echo "${ECHO_T}no" >&6
8435 fi
8436
8437   test -n "$INFOCMP" && break
8438 done
8439 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8440
8441 cf_path_prog=""
8442 cf_path_args=""
8443 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8444 for cf_temp in $ac_cv_path_INFOCMP
8445 do
8446         if test -z "$cf_path_prog" ; then
8447                 if test "$with_full_paths" = yes ; then
8448
8449 if test "x$prefix" != xNONE; then
8450         cf_path_syntax="$prefix"
8451 else
8452         cf_path_syntax="$ac_default_prefix"
8453 fi
8454
8455 case ".$cf_temp" in
8456 (.\$\(*\)*|.\'*\'*)
8457         ;;
8458 (..|./*|.\\*)
8459         ;;
8460 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8461         ;;
8462 (.\${*prefix}*|.\${*dir}*)
8463         eval cf_temp="$cf_temp"
8464         case ".$cf_temp" in
8465         (.NONE/*)
8466                 cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8467                 ;;
8468         esac
8469         ;;
8470 (.no|.NONE/*)
8471         cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
8472         ;;
8473 (*)
8474         break
8475         ;;
8476 esac
8477
8478                         cf_path_prog="$cf_temp"
8479                 else
8480                         cf_path_prog="`basename $cf_temp`"
8481                 fi
8482         elif test -z "$cf_path_args" ; then
8483                 cf_path_args="$cf_temp"
8484         else
8485                 cf_path_args="$cf_path_args $cf_temp"
8486         fi
8487 done
8488 IFS="$cf_save_ifs"
8489
8490 if test -n "$cf_path_prog" ; then
8491
8492 echo "${as_me:-configure}:8492: testing defining path for ${cf_path_prog} ..." 1>&5
8493
8494 cat >>confdefs.h <<EOF
8495 #define INFOCMP_PATH "$cf_path_prog"
8496 EOF
8497
8498         test -n "$cf_path_args" &&
8499 cat >>confdefs.h <<EOF
8500 #define INFOCMP_ARGS "$cf_path_args"
8501 EOF
8502
8503 fi
8504
8505                 if test -z "$INFOCMP"
8506                 then
8507                         { echo "$as_me:8507: WARNING: no infocmp program found for fallbacks" >&5
8508 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8509                 fi
8510
8511 fi;
8512
8513 else
8514         : ${TIC:=tic}
8515         : ${INFOCMP:=infocmp}
8516 fi
8517
8518 echo "$as_me:8518: checking if you want modern xterm or antique" >&5
8519 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8520
8521 # Check whether --with-xterm-new or --without-xterm-new was given.
8522 if test "${with_xterm_new+set}" = set; then
8523   withval="$with_xterm_new"
8524   with_xterm_new=$withval
8525 else
8526   with_xterm_new=yes
8527 fi;
8528 case $with_xterm_new in
8529 (no) with_xterm_new=xterm-old;;
8530 (*)      with_xterm_new=xterm-new;;
8531 esac
8532 echo "$as_me:8532: result: $with_xterm_new" >&5
8533 echo "${ECHO_T}$with_xterm_new" >&6
8534 WHICH_XTERM=$with_xterm_new
8535
8536 echo "$as_me:8536: checking if xterm backspace sends BS or DEL" >&5
8537 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8538
8539 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8540 if test "${with_xterm_kbs+set}" = set; then
8541   withval="$with_xterm_kbs"
8542   with_xterm_kbs=$withval
8543 else
8544   with_xterm_kbs=BS
8545 fi;
8546 case x$with_xterm_kbs in
8547 (xyes|xno|xBS|xbs|x8)
8548         with_xterm_kbs=BS
8549         ;;
8550 (xDEL|xdel|x127)
8551         with_xterm_kbs=DEL
8552         ;;
8553 (*)
8554         with_xterm_kbs=$withval
8555         ;;
8556 esac
8557 echo "$as_me:8557: result: $with_xterm_kbs" >&5
8558 echo "${ECHO_T}$with_xterm_kbs" >&6
8559 XTERM_KBS=$with_xterm_kbs
8560
8561 MAKE_TERMINFO=
8562 if test "$use_database" = no ; then
8563         TERMINFO="${datadir}/terminfo"
8564         MAKE_TERMINFO="#"
8565 else
8566
8567 echo "$as_me:8567: checking for list of terminfo directories" >&5
8568 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
8569
8570 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
8571 if test "${with_terminfo_dirs+set}" = set; then
8572   withval="$with_terminfo_dirs"
8573
8574 else
8575   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
8576 fi;
8577 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8578 cf_dst_path=
8579 for cf_src_path in $withval
8580 do
8581
8582 if test "x$prefix" != xNONE; then
8583         cf_path_syntax="$prefix"
8584 else
8585         cf_path_syntax="$ac_default_prefix"
8586 fi
8587
8588 case ".$cf_src_path" in
8589 (.\$\(*\)*|.\'*\'*)
8590         ;;
8591 (..|./*|.\\*)
8592         ;;
8593 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8594         ;;
8595 (.\${*prefix}*|.\${*dir}*)
8596         eval cf_src_path="$cf_src_path"
8597         case ".$cf_src_path" in
8598         (.NONE/*)
8599                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8600                 ;;
8601         esac
8602         ;;
8603 (.no|.NONE/*)
8604         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8605         ;;
8606 (*)
8607         { { echo "$as_me:8607: error: expected a pathname, not \"$cf_src_path\"" >&5
8608 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8609    { (exit 1); exit 1; }; }
8610         ;;
8611 esac
8612
8613   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8614   cf_dst_path="${cf_dst_path}${cf_src_path}"
8615 done
8616 IFS="$ac_save_ifs"
8617
8618 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8619 # so we have to check/work around.  We do prefer the result of "eval"...
8620 eval cf_dst_eval="$cf_dst_path"
8621 case "x$cf_dst_eval" in
8622 (xNONE*)
8623         TERMINFO_DIRS=$cf_dst_path
8624         ;;
8625 (*)
8626         TERMINFO_DIRS="$cf_dst_eval"
8627         ;;
8628 esac
8629
8630 echo "$as_me:8630: result: $TERMINFO_DIRS" >&5
8631 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8632 test -n "$TERMINFO_DIRS" &&
8633 cat >>confdefs.h <<EOF
8634 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8635 EOF
8636
8637 case "x$TERMINFO" in
8638 x???:*)
8639         { echo "$as_me:8639: WARNING: ignoring non-directory/file TERMINFO value" >&5
8640 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8641         unset TERMINFO
8642         ;;
8643 esac
8644
8645 echo "$as_me:8645: checking for default terminfo directory" >&5
8646 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8647
8648 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8649 if test "${with_default_terminfo_dir+set}" = set; then
8650   withval="$with_default_terminfo_dir"
8651
8652 else
8653   withval="${TERMINFO:-${datadir}/terminfo}"
8654 fi; if test -n "${datadir}/terminfo" ; then
8655
8656 if test "x$prefix" != xNONE; then
8657         cf_path_syntax="$prefix"
8658 else
8659         cf_path_syntax="$ac_default_prefix"
8660 fi
8661
8662 case ".$withval" in
8663 (.\$\(*\)*|.\'*\'*)
8664         ;;
8665 (..|./*|.\\*)
8666         ;;
8667 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8668         ;;
8669 (.\${*prefix}*|.\${*dir}*)
8670         eval withval="$withval"
8671         case ".$withval" in
8672         (.NONE/*)
8673                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8674                 ;;
8675         esac
8676         ;;
8677 (.no|.NONE/*)
8678         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8679         ;;
8680 (*)
8681         { { echo "$as_me:8681: error: expected a pathname, not \"$withval\"" >&5
8682 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8683    { (exit 1); exit 1; }; }
8684         ;;
8685 esac
8686
8687 fi
8688 eval TERMINFO="$withval"
8689
8690 echo "$as_me:8690: result: $TERMINFO" >&5
8691 echo "${ECHO_T}$TERMINFO" >&6
8692
8693 cat >>confdefs.h <<EOF
8694 #define TERMINFO "$TERMINFO"
8695 EOF
8696
8697 fi
8698
8699 ###     use option --disable-big-core to make tic run on small machines
8700 ###     We need 4Mb, check if we can allocate 50% more than that.
8701 echo "$as_me:8701: checking if big-core option selected" >&5
8702 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8703
8704 # Check whether --enable-big-core or --disable-big-core was given.
8705 if test "${enable_big_core+set}" = set; then
8706   enableval="$enable_big_core"
8707   with_big_core=$enableval
8708 else
8709   if test "$cross_compiling" = yes; then
8710   with_big_core=no
8711 else
8712   cat >conftest.$ac_ext <<_ACEOF
8713 #line 8713 "configure"
8714 #include "confdefs.h"
8715
8716 #include <stdlib.h>
8717 #include <string.h>
8718 int main() {
8719         unsigned long n = 6000000L;
8720         char *s = malloc(n);
8721         if (s != 0)
8722                 s[0] = s[n-1] = 0;
8723         ${cf_cv_main_return:-return}(s == 0);
8724 }
8725 _ACEOF
8726 rm -f conftest$ac_exeext
8727 if { (eval echo "$as_me:8727: \"$ac_link\"") >&5
8728   (eval $ac_link) 2>&5
8729   ac_status=$?
8730   echo "$as_me:8730: \$? = $ac_status" >&5
8731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8732   { (eval echo "$as_me:8732: \"$ac_try\"") >&5
8733   (eval $ac_try) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); }; }; then
8737   with_big_core=yes
8738 else
8739   echo "$as_me: program exited with status $ac_status" >&5
8740 echo "$as_me: failed program was:" >&5
8741 cat conftest.$ac_ext >&5
8742 with_big_core=no
8743 fi
8744 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8745 fi
8746 fi;
8747 echo "$as_me:8747: result: $with_big_core" >&5
8748 echo "${ECHO_T}$with_big_core" >&6
8749 test "x$with_big_core" = "xyes" &&
8750 cat >>confdefs.h <<\EOF
8751 #define HAVE_BIG_CORE 1
8752 EOF
8753
8754 ### ISO C only guarantees 512-char strings, we have tables which load faster
8755 ### when constructed using "big" strings.  More than the C compiler, the awk
8756 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8757 echo "$as_me:8757: checking if big-strings option selected" >&5
8758 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8759
8760 # Check whether --enable-big-strings or --disable-big-strings was given.
8761 if test "${enable_big_strings+set}" = set; then
8762   enableval="$enable_big_strings"
8763   with_big_strings=$enableval
8764 else
8765
8766         case x$AWK in
8767         (x)
8768                 eval with_big_strings=no
8769                 ;;
8770         (*)
8771                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8772                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
8773                         eval with_big_strings=yes
8774                 else
8775                         eval with_big_strings=no
8776                 fi
8777                 ;;
8778         esac
8779
8780 fi;
8781 echo "$as_me:8781: result: $with_big_strings" >&5
8782 echo "${ECHO_T}$with_big_strings" >&6
8783
8784 USE_BIG_STRINGS=0
8785 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8786
8787 ###     use option --enable-termcap to compile in the termcap fallback support
8788 echo "$as_me:8788: checking if you want termcap-fallback support" >&5
8789 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8790
8791 # Check whether --enable-termcap or --disable-termcap was given.
8792 if test "${enable_termcap+set}" = set; then
8793   enableval="$enable_termcap"
8794   with_termcap=$enableval
8795 else
8796   with_termcap=no
8797 fi;
8798 echo "$as_me:8798: result: $with_termcap" >&5
8799 echo "${ECHO_T}$with_termcap" >&6
8800
8801 NCURSES_USE_TERMCAP=0
8802 if test "x$with_termcap" != "xyes" ; then
8803         if test "$use_database" = no ; then
8804                 if test -z "$with_fallback" ; then
8805                         { { echo "$as_me:8805: error: You have disabled the database w/o specifying fallbacks" >&5
8806 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8807    { (exit 1); exit 1; }; }
8808                 fi
8809         fi
8810
8811 cat >>confdefs.h <<\EOF
8812 #define PURE_TERMINFO 1
8813 EOF
8814
8815 else
8816
8817         if test "$with_ticlib" != no ; then
8818                 { { echo "$as_me:8818: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8819 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8820    { (exit 1); exit 1; }; }
8821         fi
8822
8823         NCURSES_USE_TERMCAP=1
8824         echo "$as_me:8824: checking for list of termcap files" >&5
8825 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8826
8827 # Check whether --with-termpath or --without-termpath was given.
8828 if test "${with_termpath+set}" = set; then
8829   withval="$with_termpath"
8830
8831 else
8832   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8833 fi;
8834 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8835 cf_dst_path=
8836 for cf_src_path in $withval
8837 do
8838
8839 if test "x$prefix" != xNONE; then
8840         cf_path_syntax="$prefix"
8841 else
8842         cf_path_syntax="$ac_default_prefix"
8843 fi
8844
8845 case ".$cf_src_path" in
8846 (.\$\(*\)*|.\'*\'*)
8847         ;;
8848 (..|./*|.\\*)
8849         ;;
8850 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8851         ;;
8852 (.\${*prefix}*|.\${*dir}*)
8853         eval cf_src_path="$cf_src_path"
8854         case ".$cf_src_path" in
8855         (.NONE/*)
8856                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8857                 ;;
8858         esac
8859         ;;
8860 (.no|.NONE/*)
8861         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8862         ;;
8863 (*)
8864         { { echo "$as_me:8864: error: expected a pathname, not \"$cf_src_path\"" >&5
8865 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8866    { (exit 1); exit 1; }; }
8867         ;;
8868 esac
8869
8870   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8871   cf_dst_path="${cf_dst_path}${cf_src_path}"
8872 done
8873 IFS="$ac_save_ifs"
8874
8875 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8876 # so we have to check/work around.  We do prefer the result of "eval"...
8877 eval cf_dst_eval="$cf_dst_path"
8878 case "x$cf_dst_eval" in
8879 (xNONE*)
8880         TERMPATH=$cf_dst_path
8881         ;;
8882 (*)
8883         TERMPATH="$cf_dst_eval"
8884         ;;
8885 esac
8886
8887         echo "$as_me:8887: result: $TERMPATH" >&5
8888 echo "${ECHO_T}$TERMPATH" >&6
8889         test -n "$TERMPATH" &&
8890 cat >>confdefs.h <<EOF
8891 #define TERMPATH "$TERMPATH"
8892 EOF
8893
8894         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8895         echo "$as_me:8895: checking if fast termcap-loader is needed" >&5
8896 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8897
8898 # Check whether --enable-getcap or --disable-getcap was given.
8899 if test "${enable_getcap+set}" = set; then
8900   enableval="$enable_getcap"
8901   with_getcap=$enableval
8902 else
8903   with_getcap=no
8904 fi;
8905         echo "$as_me:8905: result: $with_getcap" >&5
8906 echo "${ECHO_T}$with_getcap" >&6
8907         test "x$with_getcap" = "xyes" &&
8908 cat >>confdefs.h <<\EOF
8909 #define USE_GETCAP 1
8910 EOF
8911
8912         echo "$as_me:8912: checking if translated termcaps will be cached in ~/.terminfo" >&5
8913 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8914
8915 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8916 if test "${enable_getcap_cache+set}" = set; then
8917   enableval="$enable_getcap_cache"
8918   with_getcap_cache=$enableval
8919 else
8920   with_getcap_cache=no
8921 fi;
8922         echo "$as_me:8922: result: $with_getcap_cache" >&5
8923 echo "${ECHO_T}$with_getcap_cache" >&6
8924         test "x$with_getcap_cache" = "xyes" &&
8925 cat >>confdefs.h <<\EOF
8926 #define USE_GETCAP_CACHE 1
8927 EOF
8928
8929 fi
8930
8931 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8932 echo "$as_me:8932: checking if ~/.terminfo is wanted" >&5
8933 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8934
8935 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8936 if test "${enable_home_terminfo+set}" = set; then
8937   enableval="$enable_home_terminfo"
8938   with_home_terminfo=$enableval
8939 else
8940   with_home_terminfo=yes
8941 fi;
8942 echo "$as_me:8942: result: $with_home_terminfo" >&5
8943 echo "${ECHO_T}$with_home_terminfo" >&6
8944 test "x$with_home_terminfo" = "xyes" &&
8945 cat >>confdefs.h <<\EOF
8946 #define USE_HOME_TERMINFO 1
8947 EOF
8948
8949 echo "$as_me:8949: checking if you want to use restricted environment when running as root" >&5
8950 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8951
8952 # Check whether --enable-root-environ or --disable-root-environ was given.
8953 if test "${enable_root_environ+set}" = set; then
8954   enableval="$enable_root_environ"
8955   with_root_environ=$enableval
8956 else
8957   with_root_environ=yes
8958 fi;
8959 echo "$as_me:8959: result: $with_root_environ" >&5
8960 echo "${ECHO_T}$with_root_environ" >&6
8961 test "x$with_root_environ" = xyes &&
8962 cat >>confdefs.h <<\EOF
8963 #define USE_ROOT_ENVIRON 1
8964 EOF
8965
8966 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8967 ###   to reduce storage requirements for the terminfo database.
8968
8969 for ac_header in \
8970 unistd.h \
8971
8972 do
8973 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8974 echo "$as_me:8974: checking for $ac_header" >&5
8975 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8977   echo $ECHO_N "(cached) $ECHO_C" >&6
8978 else
8979   cat >conftest.$ac_ext <<_ACEOF
8980 #line 8980 "configure"
8981 #include "confdefs.h"
8982 #include <$ac_header>
8983 _ACEOF
8984 if { (eval echo "$as_me:8984: \"$ac_cpp conftest.$ac_ext\"") >&5
8985   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8986   ac_status=$?
8987   egrep -v '^ *\+' conftest.er1 >conftest.err
8988   rm -f conftest.er1
8989   cat conftest.err >&5
8990   echo "$as_me:8990: \$? = $ac_status" >&5
8991   (exit $ac_status); } >/dev/null; then
8992   if test -s conftest.err; then
8993     ac_cpp_err=$ac_c_preproc_warn_flag
8994   else
8995     ac_cpp_err=
8996   fi
8997 else
8998   ac_cpp_err=yes
8999 fi
9000 if test -z "$ac_cpp_err"; then
9001   eval "$as_ac_Header=yes"
9002 else
9003   echo "$as_me: failed program was:" >&5
9004   cat conftest.$ac_ext >&5
9005   eval "$as_ac_Header=no"
9006 fi
9007 rm -f conftest.err conftest.$ac_ext
9008 fi
9009 echo "$as_me:9009: result: `eval echo '${'$as_ac_Header'}'`" >&5
9010 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9011 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9012   cat >>confdefs.h <<EOF
9013 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9014 EOF
9015
9016 fi
9017 done
9018
9019 for ac_func in \
9020         remove \
9021         unlink
9022 do
9023 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9024 echo "$as_me:9024: checking for $ac_func" >&5
9025 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9026 if eval "test \"\${$as_ac_var+set}\" = set"; then
9027   echo $ECHO_N "(cached) $ECHO_C" >&6
9028 else
9029   cat >conftest.$ac_ext <<_ACEOF
9030 #line 9030 "configure"
9031 #include "confdefs.h"
9032 #define $ac_func autoconf_temporary
9033 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9034 #undef $ac_func
9035
9036 #ifdef __cplusplus
9037 extern "C"
9038 #endif
9039
9040 /* We use char because int might match the return type of a gcc2
9041    builtin and then its argument prototype would still apply.  */
9042 char $ac_func (void);
9043
9044 int
9045 main (void)
9046 {
9047
9048 /* The GNU C library defines stubs for functions which it implements
9049     to always fail with ENOSYS.  Some functions are actually named
9050     something starting with __ and the normal name is an alias.  */
9051 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9052 #error found stub for $ac_func
9053 #endif
9054
9055         return $ac_func ();
9056   ;
9057   return 0;
9058 }
9059 _ACEOF
9060 rm -f conftest.$ac_objext conftest$ac_exeext
9061 if { (eval echo "$as_me:9061: \"$ac_link\"") >&5
9062   (eval $ac_link) 2>&5
9063   ac_status=$?
9064   echo "$as_me:9064: \$? = $ac_status" >&5
9065   (exit $ac_status); } &&
9066          { ac_try='test -s conftest$ac_exeext'
9067   { (eval echo "$as_me:9067: \"$ac_try\"") >&5
9068   (eval $ac_try) 2>&5
9069   ac_status=$?
9070   echo "$as_me:9070: \$? = $ac_status" >&5
9071   (exit $ac_status); }; }; then
9072   eval "$as_ac_var=yes"
9073 else
9074   echo "$as_me: failed program was:" >&5
9075 cat conftest.$ac_ext >&5
9076 eval "$as_ac_var=no"
9077 fi
9078 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9079 fi
9080 echo "$as_me:9080: result: `eval echo '${'$as_ac_var'}'`" >&5
9081 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9082 if test `eval echo '${'$as_ac_var'}'` = yes; then
9083   cat >>confdefs.h <<EOF
9084 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9085 EOF
9086
9087 fi
9088 done
9089
9090 if test "$cross_compiling" = yes ; then
9091
9092 for ac_func in \
9093                 link \
9094                 symlink
9095 do
9096 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9097 echo "$as_me:9097: checking for $ac_func" >&5
9098 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9099 if eval "test \"\${$as_ac_var+set}\" = set"; then
9100   echo $ECHO_N "(cached) $ECHO_C" >&6
9101 else
9102   cat >conftest.$ac_ext <<_ACEOF
9103 #line 9103 "configure"
9104 #include "confdefs.h"
9105 #define $ac_func autoconf_temporary
9106 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9107 #undef $ac_func
9108
9109 #ifdef __cplusplus
9110 extern "C"
9111 #endif
9112
9113 /* We use char because int might match the return type of a gcc2
9114    builtin and then its argument prototype would still apply.  */
9115 char $ac_func (void);
9116
9117 int
9118 main (void)
9119 {
9120
9121 /* The GNU C library defines stubs for functions which it implements
9122     to always fail with ENOSYS.  Some functions are actually named
9123     something starting with __ and the normal name is an alias.  */
9124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9125 #error found stub for $ac_func
9126 #endif
9127
9128         return $ac_func ();
9129   ;
9130   return 0;
9131 }
9132 _ACEOF
9133 rm -f conftest.$ac_objext conftest$ac_exeext
9134 if { (eval echo "$as_me:9134: \"$ac_link\"") >&5
9135   (eval $ac_link) 2>&5
9136   ac_status=$?
9137   echo "$as_me:9137: \$? = $ac_status" >&5
9138   (exit $ac_status); } &&
9139          { ac_try='test -s conftest$ac_exeext'
9140   { (eval echo "$as_me:9140: \"$ac_try\"") >&5
9141   (eval $ac_try) 2>&5
9142   ac_status=$?
9143   echo "$as_me:9143: \$? = $ac_status" >&5
9144   (exit $ac_status); }; }; then
9145   eval "$as_ac_var=yes"
9146 else
9147   echo "$as_me: failed program was:" >&5
9148 cat conftest.$ac_ext >&5
9149 eval "$as_ac_var=no"
9150 fi
9151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9152 fi
9153 echo "$as_me:9153: result: `eval echo '${'$as_ac_var'}'`" >&5
9154 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9155 if test `eval echo '${'$as_ac_var'}'` = yes; then
9156   cat >>confdefs.h <<EOF
9157 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9158 EOF
9159
9160 fi
9161 done
9162
9163 else
9164         echo "$as_me:9164: checking if link/symlink functions work" >&5
9165 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9166 if test "${cf_cv_link_funcs+set}" = set; then
9167   echo $ECHO_N "(cached) $ECHO_C" >&6
9168 else
9169
9170                 cf_cv_link_funcs=
9171                 for cf_func in link symlink ; do
9172                         if test "$cross_compiling" = yes; then
9173
9174                         eval 'ac_cv_func_'$cf_func'=error'
9175 else
9176   cat >conftest.$ac_ext <<_ACEOF
9177 #line 9177 "configure"
9178 #include "confdefs.h"
9179
9180 #include <sys/types.h>
9181 #include <sys/stat.h>
9182 #ifdef HAVE_UNISTD_H
9183 #include <unistd.h>
9184 #endif
9185 int main(void)
9186 {
9187         int fail = 0;
9188         char *src = "config.log";
9189         char *dst = "conftest.chk";
9190         struct stat src_sb;
9191         struct stat dst_sb;
9192
9193         stat(src, &src_sb);
9194         fail = ($cf_func("config.log", "conftest.chk") < 0)
9195             || (stat(dst, &dst_sb) < 0)
9196             || (dst_sb.st_mtime != src_sb.st_mtime);
9197 #ifdef HAVE_UNLINK
9198         unlink(dst);
9199 #else
9200         remove(dst);
9201 #endif
9202         ${cf_cv_main_return:-return} (fail);
9203 }
9204
9205 _ACEOF
9206 rm -f conftest$ac_exeext
9207 if { (eval echo "$as_me:9207: \"$ac_link\"") >&5
9208   (eval $ac_link) 2>&5
9209   ac_status=$?
9210   echo "$as_me:9210: \$? = $ac_status" >&5
9211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9212   { (eval echo "$as_me:9212: \"$ac_try\"") >&5
9213   (eval $ac_try) 2>&5
9214   ac_status=$?
9215   echo "$as_me:9215: \$? = $ac_status" >&5
9216   (exit $ac_status); }; }; then
9217
9218                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9219                         eval 'ac_cv_func_'$cf_func'=yes'
9220 else
9221   echo "$as_me: program exited with status $ac_status" >&5
9222 echo "$as_me: failed program was:" >&5
9223 cat conftest.$ac_ext >&5
9224
9225                         eval 'ac_cv_func_'$cf_func'=no'
9226 fi
9227 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9228 fi
9229                 done
9230                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9231
9232 fi
9233 echo "$as_me:9233: result: $cf_cv_link_funcs" >&5
9234 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9235         test "$ac_cv_func_link"    = yes &&
9236 cat >>confdefs.h <<\EOF
9237 #define HAVE_LINK 1
9238 EOF
9239
9240         test "$ac_cv_func_symlink" = yes &&
9241 cat >>confdefs.h <<\EOF
9242 #define HAVE_SYMLINK 1
9243 EOF
9244
9245 fi
9246
9247 with_links=no
9248 with_symlinks=no
9249
9250 # soft links (symbolic links) are useful for some systems where hard links do
9251 # not work, or to make it simpler to copy terminfo trees around.
9252 if test "x$ac_cv_func_symlink" = xyes ; then
9253         echo "$as_me:9253: checking if tic should use symbolic links" >&5
9254 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9255
9256 # Check whether --enable-symlinks or --disable-symlinks was given.
9257 if test "${enable_symlinks+set}" = set; then
9258   enableval="$enable_symlinks"
9259   with_symlinks=$enableval
9260 else
9261   with_symlinks=no
9262 fi;
9263         echo "$as_me:9263: result: $with_symlinks" >&5
9264 echo "${ECHO_T}$with_symlinks" >&6
9265 fi
9266
9267 # If we have hard links and did not choose to use soft links instead, there is
9268 # no reason to make this choice optional - use the hard links.
9269 if test "$with_symlinks" = no ; then
9270         echo "$as_me:9270: checking if tic should use hard links" >&5
9271 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9272         if test "x$ac_cv_func_link" = xyes ; then
9273                 with_links=yes
9274         else
9275                 with_links=no
9276         fi
9277         echo "$as_me:9277: result: $with_links" >&5
9278 echo "${ECHO_T}$with_links" >&6
9279 fi
9280
9281 test "x$with_links" = xyes &&
9282 cat >>confdefs.h <<\EOF
9283 #define USE_LINKS 1
9284 EOF
9285
9286 test "x$with_symlinks" = xyes &&
9287 cat >>confdefs.h <<\EOF
9288 #define USE_SYMLINKS 1
9289 EOF
9290
9291 ###   use option --enable-broken-linker to force on use of broken-linker support
9292
9293 echo "$as_me:9293: checking if you want broken-linker support code" >&5
9294 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9295
9296 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9297 if test "${enable_broken_linker+set}" = set; then
9298   enableval="$enable_broken_linker"
9299   with_broken_linker=$enableval
9300 else
9301   with_broken_linker=no
9302 fi;
9303 echo "$as_me:9303: result: $with_broken_linker" >&5
9304 echo "${ECHO_T}$with_broken_linker" >&6
9305
9306 : ${BROKEN_LINKER:=0}
9307 if test "x$with_broken_linker" = xyes ; then
9308
9309 cat >>confdefs.h <<\EOF
9310 #define BROKEN_LINKER 1
9311 EOF
9312
9313         BROKEN_LINKER=1
9314 fi
9315
9316 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9317 echo "$as_me:9317: checking if tputs should process BSD-style prefix padding" >&5
9318 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9319
9320 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9321 if test "${enable_bsdpad+set}" = set; then
9322   enableval="$enable_bsdpad"
9323   with_bsdpad=$enableval
9324 else
9325   with_bsdpad=no
9326 fi;
9327 echo "$as_me:9327: result: $with_bsdpad" >&5
9328 echo "${ECHO_T}$with_bsdpad" >&6
9329 test "x$with_bsdpad" = xyes &&
9330 cat >>confdefs.h <<\EOF
9331 #define BSD_TPUTS 1
9332 EOF
9333
9334 ###   use option --enable-widec to turn on use of wide-character support
9335 NCURSES_CH_T=chtype
9336 NCURSES_LIBUTF8=0
9337
9338 NEED_WCHAR_H=0
9339 NCURSES_MBSTATE_T=0
9340 NCURSES_WCHAR_T=0
9341 NCURSES_WINT_T=0
9342
9343 # Check to define _XOPEN_SOURCE "automatically"
9344 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9345
9346 echo "$as_me:9346: checking if the POSIX test-macros are already defined" >&5
9347 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9348 if test "${cf_cv_posix_visible+set}" = set; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351
9352 cat >conftest.$ac_ext <<_ACEOF
9353 #line 9353 "configure"
9354 #include "confdefs.h"
9355 #include <stdio.h>
9356 int
9357 main (void)
9358 {
9359
9360 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9361         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9362         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9363         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9364 #error conflicting symbols found
9365 #endif
9366
9367   ;
9368   return 0;
9369 }
9370 _ACEOF
9371 rm -f conftest.$ac_objext
9372 if { (eval echo "$as_me:9372: \"$ac_compile\"") >&5
9373   (eval $ac_compile) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); } &&
9377          { ac_try='test -s conftest.$ac_objext'
9378   { (eval echo "$as_me:9378: \"$ac_try\"") >&5
9379   (eval $ac_try) 2>&5
9380   ac_status=$?
9381   echo "$as_me:9381: \$? = $ac_status" >&5
9382   (exit $ac_status); }; }; then
9383   cf_cv_posix_visible=no
9384 else
9385   echo "$as_me: failed program was:" >&5
9386 cat conftest.$ac_ext >&5
9387 cf_cv_posix_visible=yes
9388 fi
9389 rm -f conftest.$ac_objext conftest.$ac_ext
9390
9391 fi
9392 echo "$as_me:9392: result: $cf_cv_posix_visible" >&5
9393 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9394
9395 if test "$cf_cv_posix_visible" = no; then
9396
9397 cf_XOPEN_SOURCE=600
9398 cf_POSIX_C_SOURCE=199506L
9399 cf_xopen_source=
9400
9401 case $host_os in
9402 (aix[4-7]*)
9403         cf_xopen_source="-D_ALL_SOURCE"
9404         ;;
9405 (msys)
9406         cf_XOPEN_SOURCE=600
9407         ;;
9408 (darwin[0-8].*)
9409         cf_xopen_source="-D_APPLE_C_SOURCE"
9410         ;;
9411 (darwin*)
9412         cf_xopen_source="-D_DARWIN_C_SOURCE"
9413         cf_XOPEN_SOURCE=
9414         ;;
9415 (freebsd*|dragonfly*|midnightbsd*)
9416         # 5.x headers associate
9417         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9418         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9419         cf_POSIX_C_SOURCE=200112L
9420         cf_XOPEN_SOURCE=600
9421         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9422         ;;
9423 (hpux11*)
9424         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9425         ;;
9426 (hpux*)
9427         cf_xopen_source="-D_HPUX_SOURCE"
9428         ;;
9429 (irix[56].*)
9430         cf_xopen_source="-D_SGI_SOURCE"
9431         cf_XOPEN_SOURCE=
9432         ;;
9433 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9434
9435 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9436
9437 echo "$as_me:9437: checking if this is the GNU C library" >&5
9438 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9439 if test "${cf_cv_gnu_library+set}" = set; then
9440   echo $ECHO_N "(cached) $ECHO_C" >&6
9441 else
9442
9443 cat >conftest.$ac_ext <<_ACEOF
9444 #line 9444 "configure"
9445 #include "confdefs.h"
9446 #include <sys/types.h>
9447 int
9448 main (void)
9449 {
9450
9451         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9452                 return 0;
9453         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9454                 return 0;
9455         #else
9456         #       error not GNU C library
9457         #endif
9458   ;
9459   return 0;
9460 }
9461 _ACEOF
9462 rm -f conftest.$ac_objext
9463 if { (eval echo "$as_me:9463: \"$ac_compile\"") >&5
9464   (eval $ac_compile) 2>&5
9465   ac_status=$?
9466   echo "$as_me:9466: \$? = $ac_status" >&5
9467   (exit $ac_status); } &&
9468          { ac_try='test -s conftest.$ac_objext'
9469   { (eval echo "$as_me:9469: \"$ac_try\"") >&5
9470   (eval $ac_try) 2>&5
9471   ac_status=$?
9472   echo "$as_me:9472: \$? = $ac_status" >&5
9473   (exit $ac_status); }; }; then
9474   cf_cv_gnu_library=yes
9475 else
9476   echo "$as_me: failed program was:" >&5
9477 cat conftest.$ac_ext >&5
9478 cf_cv_gnu_library=no
9479 fi
9480 rm -f conftest.$ac_objext conftest.$ac_ext
9481
9482 fi
9483 echo "$as_me:9483: result: $cf_cv_gnu_library" >&5
9484 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9485
9486 if test x$cf_cv_gnu_library = xyes; then
9487
9488         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9489         # was changed to help a little.  newlib incorporated the change about 4
9490         # years later.
9491         echo "$as_me:9491: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9492 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9493 if test "${cf_cv_gnu_library_219+set}" = set; then
9494   echo $ECHO_N "(cached) $ECHO_C" >&6
9495 else
9496
9497                 cf_save="$CPPFLAGS"
9498
9499         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9500         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9501
9502                 cat >conftest.$ac_ext <<_ACEOF
9503 #line 9503 "configure"
9504 #include "confdefs.h"
9505 #include <sys/types.h>
9506 int
9507 main (void)
9508 {
9509
9510                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9511                                 return 0;
9512                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9513                                 return 0;
9514                         #else
9515                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9516                         #endif
9517   ;
9518   return 0;
9519 }
9520 _ACEOF
9521 rm -f conftest.$ac_objext
9522 if { (eval echo "$as_me:9522: \"$ac_compile\"") >&5
9523   (eval $ac_compile) 2>&5
9524   ac_status=$?
9525   echo "$as_me:9525: \$? = $ac_status" >&5
9526   (exit $ac_status); } &&
9527          { ac_try='test -s conftest.$ac_objext'
9528   { (eval echo "$as_me:9528: \"$ac_try\"") >&5
9529   (eval $ac_try) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit $ac_status); }; }; then
9533   cf_cv_gnu_library_219=yes
9534 else
9535   echo "$as_me: failed program was:" >&5
9536 cat conftest.$ac_ext >&5
9537 cf_cv_gnu_library_219=no
9538 fi
9539 rm -f conftest.$ac_objext conftest.$ac_ext
9540                 CPPFLAGS="$cf_save"
9541
9542 fi
9543 echo "$as_me:9543: result: $cf_cv_gnu_library_219" >&5
9544 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
9545
9546         if test "x$cf_cv_gnu_library_219" = xyes; then
9547                 cf_save="$CPPFLAGS"
9548                 echo "$as_me:9548: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
9549 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
9550 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
9551   echo $ECHO_N "(cached) $ECHO_C" >&6
9552 else
9553
9554 cf_fix_cppflags=no
9555 cf_new_cflags=
9556 cf_new_cppflags=
9557 cf_new_extra_cppflags=
9558
9559 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
9560 do
9561 case $cf_fix_cppflags in
9562 (no)
9563         case $cf_add_cflags in
9564         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9565                 case $cf_add_cflags in
9566                 (-D*)
9567                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9568
9569                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9570                                 && test -z "${cf_tst_cflags}" \
9571                                 && cf_fix_cppflags=yes
9572
9573                         if test $cf_fix_cppflags = yes ; then
9574
9575         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9576         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9577
9578                                 continue
9579                         elif test "${cf_tst_cflags}" = "\"'" ; then
9580
9581         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9582         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9583
9584                                 continue
9585                         fi
9586                         ;;
9587                 esac
9588                 case "$CPPFLAGS" in
9589                 (*$cf_add_cflags)
9590                         ;;
9591                 (*)
9592                         case $cf_add_cflags in
9593                         (-D*)
9594                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9595
9596 CPPFLAGS=`echo "$CPPFLAGS" | \
9597         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9598                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9599
9600                                 ;;
9601                         esac
9602
9603         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9604         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9605
9606                         ;;
9607                 esac
9608                 ;;
9609         (*)
9610
9611         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9612         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9613
9614                 ;;
9615         esac
9616         ;;
9617 (yes)
9618
9619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9621
9622         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9623
9624         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9625                 && test -z "${cf_tst_cflags}" \
9626                 && cf_fix_cppflags=no
9627         ;;
9628 esac
9629 done
9630
9631 if test -n "$cf_new_cflags" ; then
9632
9633         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9634         CFLAGS="${CFLAGS}$cf_new_cflags"
9635
9636 fi
9637
9638 if test -n "$cf_new_cppflags" ; then
9639
9640         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9641         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9642
9643 fi
9644
9645 if test -n "$cf_new_extra_cppflags" ; then
9646
9647         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9648         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9649
9650 fi
9651
9652                         cat >conftest.$ac_ext <<_ACEOF
9653 #line 9653 "configure"
9654 #include "confdefs.h"
9655
9656                                 #include <limits.h>
9657                                 #include <sys/types.h>
9658
9659 int
9660 main (void)
9661 {
9662
9663                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9664                                         return 0;
9665                                 #else
9666                                 #       error GNU C library is too old
9667                                 #endif
9668   ;
9669   return 0;
9670 }
9671 _ACEOF
9672 rm -f conftest.$ac_objext
9673 if { (eval echo "$as_me:9673: \"$ac_compile\"") >&5
9674   (eval $ac_compile) 2>&5
9675   ac_status=$?
9676   echo "$as_me:9676: \$? = $ac_status" >&5
9677   (exit $ac_status); } &&
9678          { ac_try='test -s conftest.$ac_objext'
9679   { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680   (eval $ac_try) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit $ac_status); }; }; then
9684   cf_cv_gnu_dftsrc_219=yes
9685 else
9686   echo "$as_me: failed program was:" >&5
9687 cat conftest.$ac_ext >&5
9688 cf_cv_gnu_dftsrc_219=no
9689 fi
9690 rm -f conftest.$ac_objext conftest.$ac_ext
9691
9692 fi
9693 echo "$as_me:9693: result: $cf_cv_gnu_dftsrc_219" >&5
9694 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9695                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9696         else
9697                 cf_cv_gnu_dftsrc_219=maybe
9698         fi
9699
9700         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9701
9702                 echo "$as_me:9702: checking if we must define _GNU_SOURCE" >&5
9703 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9704 if test "${cf_cv_gnu_source+set}" = set; then
9705   echo $ECHO_N "(cached) $ECHO_C" >&6
9706 else
9707
9708                 cat >conftest.$ac_ext <<_ACEOF
9709 #line 9709 "configure"
9710 #include "confdefs.h"
9711 #include <sys/types.h>
9712 int
9713 main (void)
9714 {
9715
9716                         #ifndef _XOPEN_SOURCE
9717                         #error  expected _XOPEN_SOURCE to be defined
9718                         #endif
9719   ;
9720   return 0;
9721 }
9722 _ACEOF
9723 rm -f conftest.$ac_objext
9724 if { (eval echo "$as_me:9724: \"$ac_compile\"") >&5
9725   (eval $ac_compile) 2>&5
9726   ac_status=$?
9727   echo "$as_me:9727: \$? = $ac_status" >&5
9728   (exit $ac_status); } &&
9729          { ac_try='test -s conftest.$ac_objext'
9730   { (eval echo "$as_me:9730: \"$ac_try\"") >&5
9731   (eval $ac_try) 2>&5
9732   ac_status=$?
9733   echo "$as_me:9733: \$? = $ac_status" >&5
9734   (exit $ac_status); }; }; then
9735   cf_cv_gnu_source=no
9736 else
9737   echo "$as_me: failed program was:" >&5
9738 cat conftest.$ac_ext >&5
9739 cf_save="$CPPFLAGS"
9740
9741 cf_fix_cppflags=no
9742 cf_new_cflags=
9743 cf_new_cppflags=
9744 cf_new_extra_cppflags=
9745
9746 for cf_add_cflags in -D_GNU_SOURCE
9747 do
9748 case $cf_fix_cppflags in
9749 (no)
9750         case $cf_add_cflags in
9751         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9752                 case $cf_add_cflags in
9753                 (-D*)
9754                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9755
9756                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9757                                 && test -z "${cf_tst_cflags}" \
9758                                 && cf_fix_cppflags=yes
9759
9760                         if test $cf_fix_cppflags = yes ; then
9761
9762         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9763         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9764
9765                                 continue
9766                         elif test "${cf_tst_cflags}" = "\"'" ; then
9767
9768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9770
9771                                 continue
9772                         fi
9773                         ;;
9774                 esac
9775                 case "$CPPFLAGS" in
9776                 (*$cf_add_cflags)
9777                         ;;
9778                 (*)
9779                         case $cf_add_cflags in
9780                         (-D*)
9781                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9782
9783 CPPFLAGS=`echo "$CPPFLAGS" | \
9784         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9785                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9786
9787                                 ;;
9788                         esac
9789
9790         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9791         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9792
9793                         ;;
9794                 esac
9795                 ;;
9796         (*)
9797
9798         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9799         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9800
9801                 ;;
9802         esac
9803         ;;
9804 (yes)
9805
9806         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9807         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9808
9809         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9810
9811         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9812                 && test -z "${cf_tst_cflags}" \
9813                 && cf_fix_cppflags=no
9814         ;;
9815 esac
9816 done
9817
9818 if test -n "$cf_new_cflags" ; then
9819
9820         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9821         CFLAGS="${CFLAGS}$cf_new_cflags"
9822
9823 fi
9824
9825 if test -n "$cf_new_cppflags" ; then
9826
9827         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9828         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9829
9830 fi
9831
9832 if test -n "$cf_new_extra_cppflags" ; then
9833
9834         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9835         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9836
9837 fi
9838
9839                          cat >conftest.$ac_ext <<_ACEOF
9840 #line 9840 "configure"
9841 #include "confdefs.h"
9842 #include <sys/types.h>
9843 int
9844 main (void)
9845 {
9846
9847                                 #ifdef _XOPEN_SOURCE
9848                                 #error  expected _XOPEN_SOURCE to be undefined
9849                                 #endif
9850   ;
9851   return 0;
9852 }
9853 _ACEOF
9854 rm -f conftest.$ac_objext
9855 if { (eval echo "$as_me:9855: \"$ac_compile\"") >&5
9856   (eval $ac_compile) 2>&5
9857   ac_status=$?
9858   echo "$as_me:9858: \$? = $ac_status" >&5
9859   (exit $ac_status); } &&
9860          { ac_try='test -s conftest.$ac_objext'
9861   { (eval echo "$as_me:9861: \"$ac_try\"") >&5
9862   (eval $ac_try) 2>&5
9863   ac_status=$?
9864   echo "$as_me:9864: \$? = $ac_status" >&5
9865   (exit $ac_status); }; }; then
9866   cf_cv_gnu_source=no
9867 else
9868   echo "$as_me: failed program was:" >&5
9869 cat conftest.$ac_ext >&5
9870 cf_cv_gnu_source=yes
9871 fi
9872 rm -f conftest.$ac_objext conftest.$ac_ext
9873                         CPPFLAGS="$cf_save"
9874
9875 fi
9876 rm -f conftest.$ac_objext conftest.$ac_ext
9877
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_gnu_source" >&5
9880 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9881
9882                 if test "$cf_cv_gnu_source" = yes
9883                 then
9884                 echo "$as_me:9884: checking if we should also define _DEFAULT_SOURCE" >&5
9885 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9886 if test "${cf_cv_default_source+set}" = set; then
9887   echo $ECHO_N "(cached) $ECHO_C" >&6
9888 else
9889
9890         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9891         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9892
9893                         cat >conftest.$ac_ext <<_ACEOF
9894 #line 9894 "configure"
9895 #include "confdefs.h"
9896 #include <sys/types.h>
9897 int
9898 main (void)
9899 {
9900
9901                                 #ifdef _DEFAULT_SOURCE
9902                                 #error  expected _DEFAULT_SOURCE to be undefined
9903                                 #endif
9904   ;
9905   return 0;
9906 }
9907 _ACEOF
9908 rm -f conftest.$ac_objext
9909 if { (eval echo "$as_me:9909: \"$ac_compile\"") >&5
9910   (eval $ac_compile) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); } &&
9914          { ac_try='test -s conftest.$ac_objext'
9915   { (eval echo "$as_me:9915: \"$ac_try\"") >&5
9916   (eval $ac_try) 2>&5
9917   ac_status=$?
9918   echo "$as_me:9918: \$? = $ac_status" >&5
9919   (exit $ac_status); }; }; then
9920   cf_cv_default_source=no
9921 else
9922   echo "$as_me: failed program was:" >&5
9923 cat conftest.$ac_ext >&5
9924 cf_cv_default_source=yes
9925 fi
9926 rm -f conftest.$ac_objext conftest.$ac_ext
9927
9928 fi
9929 echo "$as_me:9929: result: $cf_cv_default_source" >&5
9930 echo "${ECHO_T}$cf_cv_default_source" >&6
9931                         if test "$cf_cv_default_source" = yes
9932                         then
9933
9934         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9935         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9936
9937                         fi
9938                 fi
9939         fi
9940
9941 fi
9942
9943         ;;
9944 (minix*)
9945         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9946         ;;
9947 (mirbsd*)
9948         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9949         cf_XOPEN_SOURCE=
9950
9951 if test "$cf_cv_posix_visible" = no; then
9952
9953 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9954
9955 cf_save_CFLAGS="$CFLAGS"
9956 cf_save_CPPFLAGS="$CPPFLAGS"
9957
9958 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9959         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9960                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9961
9962 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9963         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9964                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9965
9966 echo "$as_me:9966: checking if we should define _POSIX_C_SOURCE" >&5
9967 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9968 if test "${cf_cv_posix_c_source+set}" = set; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 else
9971
9972 echo "${as_me:-configure}:9972: testing if the symbol is already defined go no further ..." 1>&5
9973
9974         cat >conftest.$ac_ext <<_ACEOF
9975 #line 9975 "configure"
9976 #include "confdefs.h"
9977 #include <sys/types.h>
9978 int
9979 main (void)
9980 {
9981
9982 #ifndef _POSIX_C_SOURCE
9983 make an error
9984 #endif
9985   ;
9986   return 0;
9987 }
9988 _ACEOF
9989 rm -f conftest.$ac_objext
9990 if { (eval echo "$as_me:9990: \"$ac_compile\"") >&5
9991   (eval $ac_compile) 2>&5
9992   ac_status=$?
9993   echo "$as_me:9993: \$? = $ac_status" >&5
9994   (exit $ac_status); } &&
9995          { ac_try='test -s conftest.$ac_objext'
9996   { (eval echo "$as_me:9996: \"$ac_try\"") >&5
9997   (eval $ac_try) 2>&5
9998   ac_status=$?
9999   echo "$as_me:9999: \$? = $ac_status" >&5
10000   (exit $ac_status); }; }; then
10001   cf_cv_posix_c_source=no
10002 else
10003   echo "$as_me: failed program was:" >&5
10004 cat conftest.$ac_ext >&5
10005 cf_want_posix_source=no
10006          case .$cf_POSIX_C_SOURCE in
10007          (.[12]??*)
10008                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10009                 ;;
10010          (.2)
10011                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10012                 cf_want_posix_source=yes
10013                 ;;
10014          (.*)
10015                 cf_want_posix_source=yes
10016                 ;;
10017          esac
10018          if test "$cf_want_posix_source" = yes ; then
10019                 cat >conftest.$ac_ext <<_ACEOF
10020 #line 10020 "configure"
10021 #include "confdefs.h"
10022 #include <sys/types.h>
10023 int
10024 main (void)
10025 {
10026
10027 #ifdef _POSIX_SOURCE
10028 make an error
10029 #endif
10030   ;
10031   return 0;
10032 }
10033 _ACEOF
10034 rm -f conftest.$ac_objext
10035 if { (eval echo "$as_me:10035: \"$ac_compile\"") >&5
10036   (eval $ac_compile) 2>&5
10037   ac_status=$?
10038   echo "$as_me:10038: \$? = $ac_status" >&5
10039   (exit $ac_status); } &&
10040          { ac_try='test -s conftest.$ac_objext'
10041   { (eval echo "$as_me:10041: \"$ac_try\"") >&5
10042   (eval $ac_try) 2>&5
10043   ac_status=$?
10044   echo "$as_me:10044: \$? = $ac_status" >&5
10045   (exit $ac_status); }; }; then
10046   :
10047 else
10048   echo "$as_me: failed program was:" >&5
10049 cat conftest.$ac_ext >&5
10050 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10051 fi
10052 rm -f conftest.$ac_objext conftest.$ac_ext
10053          fi
10054
10055 echo "${as_me:-configure}:10055: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10056
10057          CFLAGS="$cf_trim_CFLAGS"
10058          CPPFLAGS="$cf_trim_CPPFLAGS"
10059
10060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10061         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10062
10063 echo "${as_me:-configure}:10063: testing if the second compile does not leave our definition intact error ..." 1>&5
10064
10065          cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068 #include <sys/types.h>
10069 int
10070 main (void)
10071 {
10072
10073 #ifndef _POSIX_C_SOURCE
10074 make an error
10075 #endif
10076   ;
10077   return 0;
10078 }
10079 _ACEOF
10080 rm -f conftest.$ac_objext
10081 if { (eval echo "$as_me:10081: \"$ac_compile\"") >&5
10082   (eval $ac_compile) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); } &&
10086          { ac_try='test -s conftest.$ac_objext'
10087   { (eval echo "$as_me:10087: \"$ac_try\"") >&5
10088   (eval $ac_try) 2>&5
10089   ac_status=$?
10090   echo "$as_me:10090: \$? = $ac_status" >&5
10091   (exit $ac_status); }; }; then
10092   :
10093 else
10094   echo "$as_me: failed program was:" >&5
10095 cat conftest.$ac_ext >&5
10096 cf_cv_posix_c_source=no
10097 fi
10098 rm -f conftest.$ac_objext conftest.$ac_ext
10099          CFLAGS="$cf_save_CFLAGS"
10100          CPPFLAGS="$cf_save_CPPFLAGS"
10101
10102 fi
10103 rm -f conftest.$ac_objext conftest.$ac_ext
10104
10105 fi
10106 echo "$as_me:10106: result: $cf_cv_posix_c_source" >&5
10107 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10108
10109 if test "$cf_cv_posix_c_source" != no ; then
10110         CFLAGS="$cf_trim_CFLAGS"
10111         CPPFLAGS="$cf_trim_CPPFLAGS"
10112
10113 cf_fix_cppflags=no
10114 cf_new_cflags=
10115 cf_new_cppflags=
10116 cf_new_extra_cppflags=
10117
10118 for cf_add_cflags in $cf_cv_posix_c_source
10119 do
10120 case $cf_fix_cppflags in
10121 (no)
10122         case $cf_add_cflags in
10123         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10124                 case $cf_add_cflags in
10125                 (-D*)
10126                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10127
10128                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10129                                 && test -z "${cf_tst_cflags}" \
10130                                 && cf_fix_cppflags=yes
10131
10132                         if test $cf_fix_cppflags = yes ; then
10133
10134         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10135         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10136
10137                                 continue
10138                         elif test "${cf_tst_cflags}" = "\"'" ; then
10139
10140         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10141         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10142
10143                                 continue
10144                         fi
10145                         ;;
10146                 esac
10147                 case "$CPPFLAGS" in
10148                 (*$cf_add_cflags)
10149                         ;;
10150                 (*)
10151                         case $cf_add_cflags in
10152                         (-D*)
10153                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10154
10155 CPPFLAGS=`echo "$CPPFLAGS" | \
10156         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10157                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10158
10159                                 ;;
10160                         esac
10161
10162         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10163         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10164
10165                         ;;
10166                 esac
10167                 ;;
10168         (*)
10169
10170         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10171         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10172
10173                 ;;
10174         esac
10175         ;;
10176 (yes)
10177
10178         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10179         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10180
10181         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10182
10183         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10184                 && test -z "${cf_tst_cflags}" \
10185                 && cf_fix_cppflags=no
10186         ;;
10187 esac
10188 done
10189
10190 if test -n "$cf_new_cflags" ; then
10191
10192         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10193         CFLAGS="${CFLAGS}$cf_new_cflags"
10194
10195 fi
10196
10197 if test -n "$cf_new_cppflags" ; then
10198
10199         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10200         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10201
10202 fi
10203
10204 if test -n "$cf_new_extra_cppflags" ; then
10205
10206         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10207         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10208
10209 fi
10210
10211 fi
10212
10213 fi # cf_cv_posix_visible
10214
10215         ;;
10216 (netbsd*)
10217         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10218         ;;
10219 (openbsd[4-9]*)
10220         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10221         cf_xopen_source="-D_BSD_SOURCE"
10222         cf_XOPEN_SOURCE=600
10223         ;;
10224 (openbsd*)
10225         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10226         ;;
10227 (osf[45]*)
10228         cf_xopen_source="-D_OSF_SOURCE"
10229         ;;
10230 (nto-qnx*)
10231         cf_xopen_source="-D_QNX_SOURCE"
10232         ;;
10233 (sco*)
10234         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10235         ;;
10236 (solaris2.*)
10237         cf_xopen_source="-D__EXTENSIONS__"
10238         cf_cv_xopen_source=broken
10239         ;;
10240 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10241         cf_XOPEN_SOURCE=
10242         cf_POSIX_C_SOURCE=
10243         ;;
10244 (*)
10245
10246 echo "$as_me:10246: checking if we should define _XOPEN_SOURCE" >&5
10247 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10248 if test "${cf_cv_xopen_source+set}" = set; then
10249   echo $ECHO_N "(cached) $ECHO_C" >&6
10250 else
10251
10252         cat >conftest.$ac_ext <<_ACEOF
10253 #line 10253 "configure"
10254 #include "confdefs.h"
10255
10256 #include <stdlib.h>
10257 #include <string.h>
10258 #include <sys/types.h>
10259
10260 int
10261 main (void)
10262 {
10263
10264 #ifndef _XOPEN_SOURCE
10265 make an error
10266 #endif
10267   ;
10268   return 0;
10269 }
10270 _ACEOF
10271 rm -f conftest.$ac_objext
10272 if { (eval echo "$as_me:10272: \"$ac_compile\"") >&5
10273   (eval $ac_compile) 2>&5
10274   ac_status=$?
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit $ac_status); } &&
10277          { ac_try='test -s conftest.$ac_objext'
10278   { (eval echo "$as_me:10278: \"$ac_try\"") >&5
10279   (eval $ac_try) 2>&5
10280   ac_status=$?
10281   echo "$as_me:10281: \$? = $ac_status" >&5
10282   (exit $ac_status); }; }; then
10283   cf_cv_xopen_source=no
10284 else
10285   echo "$as_me: failed program was:" >&5
10286 cat conftest.$ac_ext >&5
10287 cf_save="$CPPFLAGS"
10288
10289         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10290         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10291
10292          cat >conftest.$ac_ext <<_ACEOF
10293 #line 10293 "configure"
10294 #include "confdefs.h"
10295
10296 #include <stdlib.h>
10297 #include <string.h>
10298 #include <sys/types.h>
10299
10300 int
10301 main (void)
10302 {
10303
10304 #ifdef _XOPEN_SOURCE
10305 make an error
10306 #endif
10307   ;
10308   return 0;
10309 }
10310 _ACEOF
10311 rm -f conftest.$ac_objext
10312 if { (eval echo "$as_me:10312: \"$ac_compile\"") >&5
10313   (eval $ac_compile) 2>&5
10314   ac_status=$?
10315   echo "$as_me:10315: \$? = $ac_status" >&5
10316   (exit $ac_status); } &&
10317          { ac_try='test -s conftest.$ac_objext'
10318   { (eval echo "$as_me:10318: \"$ac_try\"") >&5
10319   (eval $ac_try) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); }; }; then
10323   cf_cv_xopen_source=no
10324 else
10325   echo "$as_me: failed program was:" >&5
10326 cat conftest.$ac_ext >&5
10327 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10328 fi
10329 rm -f conftest.$ac_objext conftest.$ac_ext
10330         CPPFLAGS="$cf_save"
10331
10332 fi
10333 rm -f conftest.$ac_objext conftest.$ac_ext
10334
10335 fi
10336 echo "$as_me:10336: result: $cf_cv_xopen_source" >&5
10337 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10338
10339 if test "$cf_cv_xopen_source" != no ; then
10340
10341 CFLAGS=`echo "$CFLAGS" | \
10342         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10343                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10344
10345 CPPFLAGS=`echo "$CPPFLAGS" | \
10346         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10347                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10348
10349         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10350
10351 cf_fix_cppflags=no
10352 cf_new_cflags=
10353 cf_new_cppflags=
10354 cf_new_extra_cppflags=
10355
10356 for cf_add_cflags in $cf_temp_xopen_source
10357 do
10358 case $cf_fix_cppflags in
10359 (no)
10360         case $cf_add_cflags in
10361         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10362                 case $cf_add_cflags in
10363                 (-D*)
10364                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10365
10366                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10367                                 && test -z "${cf_tst_cflags}" \
10368                                 && cf_fix_cppflags=yes
10369
10370                         if test $cf_fix_cppflags = yes ; then
10371
10372         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10373         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10374
10375                                 continue
10376                         elif test "${cf_tst_cflags}" = "\"'" ; then
10377
10378         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10379         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10380
10381                                 continue
10382                         fi
10383                         ;;
10384                 esac
10385                 case "$CPPFLAGS" in
10386                 (*$cf_add_cflags)
10387                         ;;
10388                 (*)
10389                         case $cf_add_cflags in
10390                         (-D*)
10391                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10392
10393 CPPFLAGS=`echo "$CPPFLAGS" | \
10394         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10395                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10396
10397                                 ;;
10398                         esac
10399
10400         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10401         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10402
10403                         ;;
10404                 esac
10405                 ;;
10406         (*)
10407
10408         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10409         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10410
10411                 ;;
10412         esac
10413         ;;
10414 (yes)
10415
10416         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10417         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10418
10419         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10420
10421         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10422                 && test -z "${cf_tst_cflags}" \
10423                 && cf_fix_cppflags=no
10424         ;;
10425 esac
10426 done
10427
10428 if test -n "$cf_new_cflags" ; then
10429
10430         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10431         CFLAGS="${CFLAGS}$cf_new_cflags"
10432
10433 fi
10434
10435 if test -n "$cf_new_cppflags" ; then
10436
10437         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10438         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10439
10440 fi
10441
10442 if test -n "$cf_new_extra_cppflags" ; then
10443
10444         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10445         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10446
10447 fi
10448
10449 fi
10450
10451 if test "$cf_cv_posix_visible" = no; then
10452
10453 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10454
10455 cf_save_CFLAGS="$CFLAGS"
10456 cf_save_CPPFLAGS="$CPPFLAGS"
10457
10458 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10459         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10460                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10461
10462 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10463         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10464                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10465
10466 echo "$as_me:10466: checking if we should define _POSIX_C_SOURCE" >&5
10467 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10468 if test "${cf_cv_posix_c_source+set}" = set; then
10469   echo $ECHO_N "(cached) $ECHO_C" >&6
10470 else
10471
10472 echo "${as_me:-configure}:10472: testing if the symbol is already defined go no further ..." 1>&5
10473
10474         cat >conftest.$ac_ext <<_ACEOF
10475 #line 10475 "configure"
10476 #include "confdefs.h"
10477 #include <sys/types.h>
10478 int
10479 main (void)
10480 {
10481
10482 #ifndef _POSIX_C_SOURCE
10483 make an error
10484 #endif
10485   ;
10486   return 0;
10487 }
10488 _ACEOF
10489 rm -f conftest.$ac_objext
10490 if { (eval echo "$as_me:10490: \"$ac_compile\"") >&5
10491   (eval $ac_compile) 2>&5
10492   ac_status=$?
10493   echo "$as_me:10493: \$? = $ac_status" >&5
10494   (exit $ac_status); } &&
10495          { ac_try='test -s conftest.$ac_objext'
10496   { (eval echo "$as_me:10496: \"$ac_try\"") >&5
10497   (eval $ac_try) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit $ac_status); }; }; then
10501   cf_cv_posix_c_source=no
10502 else
10503   echo "$as_me: failed program was:" >&5
10504 cat conftest.$ac_ext >&5
10505 cf_want_posix_source=no
10506          case .$cf_POSIX_C_SOURCE in
10507          (.[12]??*)
10508                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10509                 ;;
10510          (.2)
10511                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10512                 cf_want_posix_source=yes
10513                 ;;
10514          (.*)
10515                 cf_want_posix_source=yes
10516                 ;;
10517          esac
10518          if test "$cf_want_posix_source" = yes ; then
10519                 cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522 #include <sys/types.h>
10523 int
10524 main (void)
10525 {
10526
10527 #ifdef _POSIX_SOURCE
10528 make an error
10529 #endif
10530   ;
10531   return 0;
10532 }
10533 _ACEOF
10534 rm -f conftest.$ac_objext
10535 if { (eval echo "$as_me:10535: \"$ac_compile\"") >&5
10536   (eval $ac_compile) 2>&5
10537   ac_status=$?
10538   echo "$as_me:10538: \$? = $ac_status" >&5
10539   (exit $ac_status); } &&
10540          { ac_try='test -s conftest.$ac_objext'
10541   { (eval echo "$as_me:10541: \"$ac_try\"") >&5
10542   (eval $ac_try) 2>&5
10543   ac_status=$?
10544   echo "$as_me:10544: \$? = $ac_status" >&5
10545   (exit $ac_status); }; }; then
10546   :
10547 else
10548   echo "$as_me: failed program was:" >&5
10549 cat conftest.$ac_ext >&5
10550 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10551 fi
10552 rm -f conftest.$ac_objext conftest.$ac_ext
10553          fi
10554
10555 echo "${as_me:-configure}:10555: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10556
10557          CFLAGS="$cf_trim_CFLAGS"
10558          CPPFLAGS="$cf_trim_CPPFLAGS"
10559
10560         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10561         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10562
10563 echo "${as_me:-configure}:10563: testing if the second compile does not leave our definition intact error ..." 1>&5
10564
10565          cat >conftest.$ac_ext <<_ACEOF
10566 #line 10566 "configure"
10567 #include "confdefs.h"
10568 #include <sys/types.h>
10569 int
10570 main (void)
10571 {
10572
10573 #ifndef _POSIX_C_SOURCE
10574 make an error
10575 #endif
10576   ;
10577   return 0;
10578 }
10579 _ACEOF
10580 rm -f conftest.$ac_objext
10581 if { (eval echo "$as_me:10581: \"$ac_compile\"") >&5
10582   (eval $ac_compile) 2>&5
10583   ac_status=$?
10584   echo "$as_me:10584: \$? = $ac_status" >&5
10585   (exit $ac_status); } &&
10586          { ac_try='test -s conftest.$ac_objext'
10587   { (eval echo "$as_me:10587: \"$ac_try\"") >&5
10588   (eval $ac_try) 2>&5
10589   ac_status=$?
10590   echo "$as_me:10590: \$? = $ac_status" >&5
10591   (exit $ac_status); }; }; then
10592   :
10593 else
10594   echo "$as_me: failed program was:" >&5
10595 cat conftest.$ac_ext >&5
10596 cf_cv_posix_c_source=no
10597 fi
10598 rm -f conftest.$ac_objext conftest.$ac_ext
10599          CFLAGS="$cf_save_CFLAGS"
10600          CPPFLAGS="$cf_save_CPPFLAGS"
10601
10602 fi
10603 rm -f conftest.$ac_objext conftest.$ac_ext
10604
10605 fi
10606 echo "$as_me:10606: result: $cf_cv_posix_c_source" >&5
10607 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10608
10609 if test "$cf_cv_posix_c_source" != no ; then
10610         CFLAGS="$cf_trim_CFLAGS"
10611         CPPFLAGS="$cf_trim_CPPFLAGS"
10612
10613 cf_fix_cppflags=no
10614 cf_new_cflags=
10615 cf_new_cppflags=
10616 cf_new_extra_cppflags=
10617
10618 for cf_add_cflags in $cf_cv_posix_c_source
10619 do
10620 case $cf_fix_cppflags in
10621 (no)
10622         case $cf_add_cflags in
10623         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10624                 case $cf_add_cflags in
10625                 (-D*)
10626                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10627
10628                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10629                                 && test -z "${cf_tst_cflags}" \
10630                                 && cf_fix_cppflags=yes
10631
10632                         if test $cf_fix_cppflags = yes ; then
10633
10634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10636
10637                                 continue
10638                         elif test "${cf_tst_cflags}" = "\"'" ; then
10639
10640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10642
10643                                 continue
10644                         fi
10645                         ;;
10646                 esac
10647                 case "$CPPFLAGS" in
10648                 (*$cf_add_cflags)
10649                         ;;
10650                 (*)
10651                         case $cf_add_cflags in
10652                         (-D*)
10653                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10654
10655 CPPFLAGS=`echo "$CPPFLAGS" | \
10656         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10657                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10658
10659                                 ;;
10660                         esac
10661
10662         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10663         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10664
10665                         ;;
10666                 esac
10667                 ;;
10668         (*)
10669
10670         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10671         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10672
10673                 ;;
10674         esac
10675         ;;
10676 (yes)
10677
10678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10680
10681         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10682
10683         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10684                 && test -z "${cf_tst_cflags}" \
10685                 && cf_fix_cppflags=no
10686         ;;
10687 esac
10688 done
10689
10690 if test -n "$cf_new_cflags" ; then
10691
10692         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10693         CFLAGS="${CFLAGS}$cf_new_cflags"
10694
10695 fi
10696
10697 if test -n "$cf_new_cppflags" ; then
10698
10699         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10700         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10701
10702 fi
10703
10704 if test -n "$cf_new_extra_cppflags" ; then
10705
10706         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10707         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10708
10709 fi
10710
10711 fi
10712
10713 fi # cf_cv_posix_visible
10714
10715         ;;
10716 esac
10717
10718 if test -n "$cf_xopen_source" ; then
10719
10720 cf_fix_cppflags=no
10721 cf_new_cflags=
10722 cf_new_cppflags=
10723 cf_new_extra_cppflags=
10724
10725 for cf_add_cflags in $cf_xopen_source
10726 do
10727 case $cf_fix_cppflags in
10728 (no)
10729         case $cf_add_cflags in
10730         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10731                 case $cf_add_cflags in
10732                 (-D*)
10733                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10734
10735                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10736                                 && test -z "${cf_tst_cflags}" \
10737                                 && cf_fix_cppflags=yes
10738
10739                         if test $cf_fix_cppflags = yes ; then
10740
10741         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10742         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10743
10744                                 continue
10745                         elif test "${cf_tst_cflags}" = "\"'" ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         fi
10752                         ;;
10753                 esac
10754                 case "$CPPFLAGS" in
10755                 (*$cf_add_cflags)
10756                         ;;
10757                 (*)
10758                         case $cf_add_cflags in
10759                         (-D*)
10760                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10761
10762 CPPFLAGS=`echo "$CPPFLAGS" | \
10763         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10764                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10765
10766                                 ;;
10767                         esac
10768
10769         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10770         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10771
10772                         ;;
10773                 esac
10774                 ;;
10775         (*)
10776
10777         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10778         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10779
10780                 ;;
10781         esac
10782         ;;
10783 (yes)
10784
10785         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10786         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10787
10788         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10789
10790         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10791                 && test -z "${cf_tst_cflags}" \
10792                 && cf_fix_cppflags=no
10793         ;;
10794 esac
10795 done
10796
10797 if test -n "$cf_new_cflags" ; then
10798         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10799
10800 echo "${as_me:-configure}:10800: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10801
10802         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10803         CFLAGS="${CFLAGS}$cf_new_cflags"
10804
10805 fi
10806
10807 if test -n "$cf_new_cppflags" ; then
10808         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10809
10810 echo "${as_me:-configure}:10810: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10811
10812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10813         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10814
10815 fi
10816
10817 if test -n "$cf_new_extra_cppflags" ; then
10818         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10819
10820 echo "${as_me:-configure}:10820: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10821
10822         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825 fi
10826
10827 fi
10828
10829 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10830         echo "$as_me:10830: checking if _XOPEN_SOURCE really is set" >&5
10831 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10832         cat >conftest.$ac_ext <<_ACEOF
10833 #line 10833 "configure"
10834 #include "confdefs.h"
10835 #include <stdlib.h>
10836 int
10837 main (void)
10838 {
10839
10840 #ifndef _XOPEN_SOURCE
10841 make an error
10842 #endif
10843   ;
10844   return 0;
10845 }
10846 _ACEOF
10847 rm -f conftest.$ac_objext
10848 if { (eval echo "$as_me:10848: \"$ac_compile\"") >&5
10849   (eval $ac_compile) 2>&5
10850   ac_status=$?
10851   echo "$as_me:10851: \$? = $ac_status" >&5
10852   (exit $ac_status); } &&
10853          { ac_try='test -s conftest.$ac_objext'
10854   { (eval echo "$as_me:10854: \"$ac_try\"") >&5
10855   (eval $ac_try) 2>&5
10856   ac_status=$?
10857   echo "$as_me:10857: \$? = $ac_status" >&5
10858   (exit $ac_status); }; }; then
10859   cf_XOPEN_SOURCE_set=yes
10860 else
10861   echo "$as_me: failed program was:" >&5
10862 cat conftest.$ac_ext >&5
10863 cf_XOPEN_SOURCE_set=no
10864 fi
10865 rm -f conftest.$ac_objext conftest.$ac_ext
10866         echo "$as_me:10866: result: $cf_XOPEN_SOURCE_set" >&5
10867 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10868         if test $cf_XOPEN_SOURCE_set = yes
10869         then
10870                 cat >conftest.$ac_ext <<_ACEOF
10871 #line 10871 "configure"
10872 #include "confdefs.h"
10873 #include <stdlib.h>
10874 int
10875 main (void)
10876 {
10877
10878 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10879 make an error
10880 #endif
10881   ;
10882   return 0;
10883 }
10884 _ACEOF
10885 rm -f conftest.$ac_objext
10886 if { (eval echo "$as_me:10886: \"$ac_compile\"") >&5
10887   (eval $ac_compile) 2>&5
10888   ac_status=$?
10889   echo "$as_me:10889: \$? = $ac_status" >&5
10890   (exit $ac_status); } &&
10891          { ac_try='test -s conftest.$ac_objext'
10892   { (eval echo "$as_me:10892: \"$ac_try\"") >&5
10893   (eval $ac_try) 2>&5
10894   ac_status=$?
10895   echo "$as_me:10895: \$? = $ac_status" >&5
10896   (exit $ac_status); }; }; then
10897   cf_XOPEN_SOURCE_set_ok=yes
10898 else
10899   echo "$as_me: failed program was:" >&5
10900 cat conftest.$ac_ext >&5
10901 cf_XOPEN_SOURCE_set_ok=no
10902 fi
10903 rm -f conftest.$ac_objext conftest.$ac_ext
10904                 if test $cf_XOPEN_SOURCE_set_ok = no
10905                 then
10906                         { echo "$as_me:10906: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10907 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10908                 fi
10909         else
10910
10911 echo "$as_me:10911: checking if we should define _XOPEN_SOURCE" >&5
10912 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10913 if test "${cf_cv_xopen_source+set}" = set; then
10914   echo $ECHO_N "(cached) $ECHO_C" >&6
10915 else
10916
10917         cat >conftest.$ac_ext <<_ACEOF
10918 #line 10918 "configure"
10919 #include "confdefs.h"
10920
10921 #include <stdlib.h>
10922 #include <string.h>
10923 #include <sys/types.h>
10924
10925 int
10926 main (void)
10927 {
10928
10929 #ifndef _XOPEN_SOURCE
10930 make an error
10931 #endif
10932   ;
10933   return 0;
10934 }
10935 _ACEOF
10936 rm -f conftest.$ac_objext
10937 if { (eval echo "$as_me:10937: \"$ac_compile\"") >&5
10938   (eval $ac_compile) 2>&5
10939   ac_status=$?
10940   echo "$as_me:10940: \$? = $ac_status" >&5
10941   (exit $ac_status); } &&
10942          { ac_try='test -s conftest.$ac_objext'
10943   { (eval echo "$as_me:10943: \"$ac_try\"") >&5
10944   (eval $ac_try) 2>&5
10945   ac_status=$?
10946   echo "$as_me:10946: \$? = $ac_status" >&5
10947   (exit $ac_status); }; }; then
10948   cf_cv_xopen_source=no
10949 else
10950   echo "$as_me: failed program was:" >&5
10951 cat conftest.$ac_ext >&5
10952 cf_save="$CPPFLAGS"
10953
10954         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10955         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10956
10957          cat >conftest.$ac_ext <<_ACEOF
10958 #line 10958 "configure"
10959 #include "confdefs.h"
10960
10961 #include <stdlib.h>
10962 #include <string.h>
10963 #include <sys/types.h>
10964
10965 int
10966 main (void)
10967 {
10968
10969 #ifdef _XOPEN_SOURCE
10970 make an error
10971 #endif
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 rm -f conftest.$ac_objext
10977 if { (eval echo "$as_me:10977: \"$ac_compile\"") >&5
10978   (eval $ac_compile) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit $ac_status); } &&
10982          { ac_try='test -s conftest.$ac_objext'
10983   { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit $ac_status); }; }; then
10988   cf_cv_xopen_source=no
10989 else
10990   echo "$as_me: failed program was:" >&5
10991 cat conftest.$ac_ext >&5
10992 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10993 fi
10994 rm -f conftest.$ac_objext conftest.$ac_ext
10995         CPPFLAGS="$cf_save"
10996
10997 fi
10998 rm -f conftest.$ac_objext conftest.$ac_ext
10999
11000 fi
11001 echo "$as_me:11001: result: $cf_cv_xopen_source" >&5
11002 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11003
11004 if test "$cf_cv_xopen_source" != no ; then
11005
11006 CFLAGS=`echo "$CFLAGS" | \
11007         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11008                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11009
11010 CPPFLAGS=`echo "$CPPFLAGS" | \
11011         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11012                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11013
11014         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11015
11016 cf_fix_cppflags=no
11017 cf_new_cflags=
11018 cf_new_cppflags=
11019 cf_new_extra_cppflags=
11020
11021 for cf_add_cflags in $cf_temp_xopen_source
11022 do
11023 case $cf_fix_cppflags in
11024 (no)
11025         case $cf_add_cflags in
11026         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11027                 case $cf_add_cflags in
11028                 (-D*)
11029                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11030
11031                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11032                                 && test -z "${cf_tst_cflags}" \
11033                                 && cf_fix_cppflags=yes
11034
11035                         if test $cf_fix_cppflags = yes ; then
11036
11037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11039
11040                                 continue
11041                         elif test "${cf_tst_cflags}" = "\"'" ; then
11042
11043         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11044         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11045
11046                                 continue
11047                         fi
11048                         ;;
11049                 esac
11050                 case "$CPPFLAGS" in
11051                 (*$cf_add_cflags)
11052                         ;;
11053                 (*)
11054                         case $cf_add_cflags in
11055                         (-D*)
11056                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11057
11058 CPPFLAGS=`echo "$CPPFLAGS" | \
11059         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11060                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11061
11062                                 ;;
11063                         esac
11064
11065         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11066         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11067
11068                         ;;
11069                 esac
11070                 ;;
11071         (*)
11072
11073         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11074         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11075
11076                 ;;
11077         esac
11078         ;;
11079 (yes)
11080
11081         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11082         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11083
11084         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11085
11086         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11087                 && test -z "${cf_tst_cflags}" \
11088                 && cf_fix_cppflags=no
11089         ;;
11090 esac
11091 done
11092
11093 if test -n "$cf_new_cflags" ; then
11094
11095         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11096         CFLAGS="${CFLAGS}$cf_new_cflags"
11097
11098 fi
11099
11100 if test -n "$cf_new_cppflags" ; then
11101
11102         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11103         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11104
11105 fi
11106
11107 if test -n "$cf_new_extra_cppflags" ; then
11108
11109         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11110         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11111
11112 fi
11113
11114 fi
11115
11116         fi
11117 fi
11118 fi # cf_cv_posix_visible
11119
11120 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11121
11122 # Work around breakage on OS X
11123
11124 echo "$as_me:11124: checking if SIGWINCH is defined" >&5
11125 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11126 if test "${cf_cv_define_sigwinch+set}" = set; then
11127   echo $ECHO_N "(cached) $ECHO_C" >&6
11128 else
11129
11130         cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133
11134 #include <sys/types.h>
11135 #include <sys/signal.h>
11136
11137 int
11138 main (void)
11139 {
11140 int x = SIGWINCH; (void)x
11141   ;
11142   return 0;
11143 }
11144 _ACEOF
11145 rm -f conftest.$ac_objext
11146 if { (eval echo "$as_me:11146: \"$ac_compile\"") >&5
11147   (eval $ac_compile) 2>&5
11148   ac_status=$?
11149   echo "$as_me:11149: \$? = $ac_status" >&5
11150   (exit $ac_status); } &&
11151          { ac_try='test -s conftest.$ac_objext'
11152   { (eval echo "$as_me:11152: \"$ac_try\"") >&5
11153   (eval $ac_try) 2>&5
11154   ac_status=$?
11155   echo "$as_me:11155: \$? = $ac_status" >&5
11156   (exit $ac_status); }; }; then
11157   cf_cv_define_sigwinch=yes
11158 else
11159   echo "$as_me: failed program was:" >&5
11160 cat conftest.$ac_ext >&5
11161 cat >conftest.$ac_ext <<_ACEOF
11162 #line 11162 "configure"
11163 #include "confdefs.h"
11164
11165 #undef _XOPEN_SOURCE
11166 #undef _POSIX_SOURCE
11167 #undef _POSIX_C_SOURCE
11168 #include <sys/types.h>
11169 #include <sys/signal.h>
11170
11171 int
11172 main (void)
11173 {
11174 int x = SIGWINCH; (void)x
11175   ;
11176   return 0;
11177 }
11178 _ACEOF
11179 rm -f conftest.$ac_objext
11180 if { (eval echo "$as_me:11180: \"$ac_compile\"") >&5
11181   (eval $ac_compile) 2>&5
11182   ac_status=$?
11183   echo "$as_me:11183: \$? = $ac_status" >&5
11184   (exit $ac_status); } &&
11185          { ac_try='test -s conftest.$ac_objext'
11186   { (eval echo "$as_me:11186: \"$ac_try\"") >&5
11187   (eval $ac_try) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); }; }; then
11191   cf_cv_define_sigwinch=maybe
11192 else
11193   echo "$as_me: failed program was:" >&5
11194 cat conftest.$ac_ext >&5
11195 cf_cv_define_sigwinch=no
11196 fi
11197 rm -f conftest.$ac_objext conftest.$ac_ext
11198
11199 fi
11200 rm -f conftest.$ac_objext conftest.$ac_ext
11201
11202 fi
11203 echo "$as_me:11203: result: $cf_cv_define_sigwinch" >&5
11204 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11205
11206 if test "$cf_cv_define_sigwinch" = maybe ; then
11207 echo "$as_me:11207: checking for actual SIGWINCH definition" >&5
11208 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11209 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11210   echo $ECHO_N "(cached) $ECHO_C" >&6
11211 else
11212
11213 cf_cv_fixup_sigwinch=unknown
11214 cf_sigwinch=32
11215 while test $cf_sigwinch != 1
11216 do
11217         cat >conftest.$ac_ext <<_ACEOF
11218 #line 11218 "configure"
11219 #include "confdefs.h"
11220
11221 #undef _XOPEN_SOURCE
11222 #undef _POSIX_SOURCE
11223 #undef _POSIX_C_SOURCE
11224 #include <sys/types.h>
11225 #include <sys/signal.h>
11226
11227 int
11228 main (void)
11229 {
11230
11231 #if SIGWINCH != $cf_sigwinch
11232 make an error
11233 #endif
11234 int x = SIGWINCH; (void)x
11235   ;
11236   return 0;
11237 }
11238 _ACEOF
11239 rm -f conftest.$ac_objext
11240 if { (eval echo "$as_me:11240: \"$ac_compile\"") >&5
11241   (eval $ac_compile) 2>&5
11242   ac_status=$?
11243   echo "$as_me:11243: \$? = $ac_status" >&5
11244   (exit $ac_status); } &&
11245          { ac_try='test -s conftest.$ac_objext'
11246   { (eval echo "$as_me:11246: \"$ac_try\"") >&5
11247   (eval $ac_try) 2>&5
11248   ac_status=$?
11249   echo "$as_me:11249: \$? = $ac_status" >&5
11250   (exit $ac_status); }; }; then
11251   cf_cv_fixup_sigwinch=$cf_sigwinch
11252          break
11253 else
11254   echo "$as_me: failed program was:" >&5
11255 cat conftest.$ac_ext >&5
11256 fi
11257 rm -f conftest.$ac_objext conftest.$ac_ext
11258
11259 cf_sigwinch=`expr $cf_sigwinch - 1`
11260 done
11261
11262 fi
11263 echo "$as_me:11263: result: $cf_cv_fixup_sigwinch" >&5
11264 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11265
11266         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11267                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11268         fi
11269 fi
11270
11271 # Checks for CODESET support.
11272
11273 echo "$as_me:11273: checking for nl_langinfo and CODESET" >&5
11274 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11275 if test "${am_cv_langinfo_codeset+set}" = set; then
11276   echo $ECHO_N "(cached) $ECHO_C" >&6
11277 else
11278   cat >conftest.$ac_ext <<_ACEOF
11279 #line 11279 "configure"
11280 #include "confdefs.h"
11281 #include <langinfo.h>
11282 int
11283 main (void)
11284 {
11285 char* cs = nl_langinfo(CODESET); (void)cs
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 rm -f conftest.$ac_objext conftest$ac_exeext
11291 if { (eval echo "$as_me:11291: \"$ac_link\"") >&5
11292   (eval $ac_link) 2>&5
11293   ac_status=$?
11294   echo "$as_me:11294: \$? = $ac_status" >&5
11295   (exit $ac_status); } &&
11296          { ac_try='test -s conftest$ac_exeext'
11297   { (eval echo "$as_me:11297: \"$ac_try\"") >&5
11298   (eval $ac_try) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); }; }; then
11302   am_cv_langinfo_codeset=yes
11303 else
11304   echo "$as_me: failed program was:" >&5
11305 cat conftest.$ac_ext >&5
11306 am_cv_langinfo_codeset=no
11307 fi
11308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11309
11310 fi
11311 echo "$as_me:11311: result: $am_cv_langinfo_codeset" >&5
11312 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11313         if test $am_cv_langinfo_codeset = yes; then
11314
11315 cat >>confdefs.h <<\EOF
11316 #define HAVE_LANGINFO_CODESET 1
11317 EOF
11318
11319         fi
11320
11321 # use these variables to work around a defect in gcc's fixincludes.
11322 NCURSES_OK_WCHAR_T=
11323 NCURSES_OK_WINT_T=
11324
11325 echo "$as_me:11325: checking if you want wide-character code" >&5
11326 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11327
11328 # Check whether --enable-widec or --disable-widec was given.
11329 if test "${enable_widec+set}" = set; then
11330   enableval="$enable_widec"
11331   with_widec=$enableval
11332 else
11333   with_widec=no
11334 fi;
11335 echo "$as_me:11335: result: $with_widec" >&5
11336 echo "${ECHO_T}$with_widec" >&6
11337
11338 NCURSES_WCWIDTH_GRAPHICS=1
11339
11340 if test "x$with_widec" = xyes ; then
11341         if test "x$disable_lib_suffixes" = xno ; then
11342                 LIB_SUFFIX="w${LIB_SUFFIX}"
11343         fi
11344
11345 cat >>confdefs.h <<\EOF
11346 #define USE_WIDEC_SUPPORT 1
11347 EOF
11348
11349 cat >>confdefs.h <<\EOF
11350 #define NCURSES_WIDECHAR 1
11351 EOF
11352
11353 for ac_header in \
11354 wchar.h \
11355 wctype.h \
11356
11357 do
11358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11359 echo "$as_me:11359: checking for $ac_header" >&5
11360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11362   echo $ECHO_N "(cached) $ECHO_C" >&6
11363 else
11364   cat >conftest.$ac_ext <<_ACEOF
11365 #line 11365 "configure"
11366 #include "confdefs.h"
11367 #include <$ac_header>
11368 _ACEOF
11369 if { (eval echo "$as_me:11369: \"$ac_cpp conftest.$ac_ext\"") >&5
11370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11371   ac_status=$?
11372   egrep -v '^ *\+' conftest.er1 >conftest.err
11373   rm -f conftest.er1
11374   cat conftest.err >&5
11375   echo "$as_me:11375: \$? = $ac_status" >&5
11376   (exit $ac_status); } >/dev/null; then
11377   if test -s conftest.err; then
11378     ac_cpp_err=$ac_c_preproc_warn_flag
11379   else
11380     ac_cpp_err=
11381   fi
11382 else
11383   ac_cpp_err=yes
11384 fi
11385 if test -z "$ac_cpp_err"; then
11386   eval "$as_ac_Header=yes"
11387 else
11388   echo "$as_me: failed program was:" >&5
11389   cat conftest.$ac_ext >&5
11390   eval "$as_ac_Header=no"
11391 fi
11392 rm -f conftest.err conftest.$ac_ext
11393 fi
11394 echo "$as_me:11394: result: `eval echo '${'$as_ac_Header'}'`" >&5
11395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11396 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11397   cat >>confdefs.h <<EOF
11398 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11399 EOF
11400
11401 fi
11402 done
11403
11404 echo "$as_me:11404: checking if wchar.h can be used as is" >&5
11405 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11406 if test "${cf_cv_wchar_h_okay+set}" = set; then
11407   echo $ECHO_N "(cached) $ECHO_C" >&6
11408 else
11409
11410 cat >conftest.$ac_ext <<_ACEOF
11411 #line 11411 "configure"
11412 #include "confdefs.h"
11413
11414 #include <stdlib.h>
11415 #ifdef HAVE_WCHAR_H
11416 #include <wchar.h>
11417 #endif
11418 #ifdef HAVE_WCTYPE_H
11419 #include <wctype.h>
11420 #endif
11421
11422 int
11423 main (void)
11424 {
11425
11426         wint_t foo = 0;
11427         int bar = iswpunct(foo)
11428   ;
11429   return 0;
11430 }
11431 _ACEOF
11432 rm -f conftest.$ac_objext
11433 if { (eval echo "$as_me:11433: \"$ac_compile\"") >&5
11434   (eval $ac_compile) 2>&5
11435   ac_status=$?
11436   echo "$as_me:11436: \$? = $ac_status" >&5
11437   (exit $ac_status); } &&
11438          { ac_try='test -s conftest.$ac_objext'
11439   { (eval echo "$as_me:11439: \"$ac_try\"") >&5
11440   (eval $ac_try) 2>&5
11441   ac_status=$?
11442   echo "$as_me:11442: \$? = $ac_status" >&5
11443   (exit $ac_status); }; }; then
11444   cf_cv_wchar_h_okay=yes
11445 else
11446   echo "$as_me: failed program was:" >&5
11447 cat conftest.$ac_ext >&5
11448 cf_cv_wchar_h_okay=no
11449 fi
11450 rm -f conftest.$ac_objext conftest.$ac_ext
11451 fi
11452 echo "$as_me:11452: result: $cf_cv_wchar_h_okay" >&5
11453 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
11454
11455 if test $cf_cv_wchar_h_okay = no
11456 then
11457
11458 echo "$as_me:11458: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
11459 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
11460 cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11463 #include <sys/types.h>
11464
11465 int
11466 main (void)
11467 {
11468
11469 #ifndef _XOPEN_SOURCE_EXTENDED
11470 make an error
11471 #endif
11472   ;
11473   return 0;
11474 }
11475 _ACEOF
11476 rm -f conftest.$ac_objext
11477 if { (eval echo "$as_me:11477: \"$ac_compile\"") >&5
11478   (eval $ac_compile) 2>&5
11479   ac_status=$?
11480   echo "$as_me:11480: \$? = $ac_status" >&5
11481   (exit $ac_status); } &&
11482          { ac_try='test -s conftest.$ac_objext'
11483   { (eval echo "$as_me:11483: \"$ac_try\"") >&5
11484   (eval $ac_try) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit $ac_status); }; }; then
11488   cf_result=no
11489 else
11490   echo "$as_me: failed program was:" >&5
11491 cat conftest.$ac_ext >&5
11492 cf_result=yes
11493 fi
11494 rm -f conftest.$ac_objext conftest.$ac_ext
11495 echo "$as_me:11495: result: $cf_result" >&5
11496 echo "${ECHO_T}$cf_result" >&6
11497
11498 if test "$cf_result" = yes ; then
11499         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
11500 elif test "x" != "x" ; then
11501         echo "$as_me:11501: checking checking for compatible value versus " >&5
11502 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
11503         cat >conftest.$ac_ext <<_ACEOF
11504 #line 11504 "configure"
11505 #include "confdefs.h"
11506 #include <sys/types.h>
11507
11508 int
11509 main (void)
11510 {
11511
11512 #if _XOPEN_SOURCE_EXTENDED- < 0
11513 make an error
11514 #endif
11515   ;
11516   return 0;
11517 }
11518 _ACEOF
11519 rm -f conftest.$ac_objext
11520 if { (eval echo "$as_me:11520: \"$ac_compile\"") >&5
11521   (eval $ac_compile) 2>&5
11522   ac_status=$?
11523   echo "$as_me:11523: \$? = $ac_status" >&5
11524   (exit $ac_status); } &&
11525          { ac_try='test -s conftest.$ac_objext'
11526   { (eval echo "$as_me:11526: \"$ac_try\"") >&5
11527   (eval $ac_try) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); }; }; then
11531   cf_result=yes
11532 else
11533   echo "$as_me: failed program was:" >&5
11534 cat conftest.$ac_ext >&5
11535 cf_result=no
11536 fi
11537 rm -f conftest.$ac_objext conftest.$ac_ext
11538         echo "$as_me:11538: result: $cf_result" >&5
11539 echo "${ECHO_T}$cf_result" >&6
11540         if test "$cf_result" = no ; then
11541                 # perhaps we can override it - try...
11542                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
11543         fi
11544 fi
11545
11546 fi
11547
11548 echo "$as_me:11548: checking if wcwidth agrees graphics are single-width" >&5
11549 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
11550 if test "${cf_cv_wcwidth_graphics+set}" = set; then
11551   echo $ECHO_N "(cached) $ECHO_C" >&6
11552 else
11553
11554 cat >conftest.in <<CF_EOF
11555 -       VT100 symbols
11556 0x250c  upper left corner
11557 0x2514  lower left corner
11558 0x2510  upper right corner
11559 0x2518  lower right corner
11560 0x251c  tee pointing left
11561 0x2524  tee pointing right
11562 0x2534  tee pointing up
11563 0x252c  tee pointing down
11564 0x2500  horizontal line
11565 0x2502  vertical line
11566 0x253c  large plus or crossover
11567 0x23ba  scan line 1
11568 0x23bd  scan line 9
11569 0x25c6  diamond
11570 0x2592  checker board (stipple)
11571 0x00b0  degree symbol
11572 0x00b1  plus/minus
11573 0x00b7  bullet
11574 -       Teletype 5410v1 symbols
11575 0x2190  arrow pointing left
11576 0x2192  arrow pointing right
11577 0x2193  arrow pointing down
11578 0x2191  arrow pointing up
11579 0x2592  board of squares
11580 0x2603  lantern symbol
11581 0x25ae  solid square block
11582 -       these defaults were invented for ncurses
11583 0x23bb  scan line 3
11584 0x23bc  scan line 7
11585 0x2264  less-than-or-equal-to
11586 0x2265  greater-than-or-equal-to
11587 0x03c0  greek pi
11588 0x2260  not-equal
11589 0x00a3  pound-sterling symbol
11590 -       thick-line-drawing
11591 0x250f  upper left corner
11592 0x2517  lower left corner
11593 0x2513  upper right corner
11594 0x251b  lower right corner
11595 0x2523  tee pointing left
11596 0x252b  tee pointing right
11597 0x253b  tee pointing up
11598 0x2533  tee pointing down
11599 0x2501  horizontal line
11600 0x2503  vertical line
11601 0x254b  large plus or crossover
11602 -       double-line-drawing
11603 0x2554  upper left corner
11604 0x255a  lower left corner
11605 0x2557  upper right corner
11606 0x255d  lower right corner
11607 0x2563  tee pointing left
11608 0x2560  tee pointing right
11609 0x2569  tee pointing up
11610 0x2566  tee pointing down
11611 0x2550  horizontal line
11612 0x2551  vertical line
11613 0x256c  large plus or crossover
11614 CF_EOF
11615 if test "$cross_compiling" = yes; then
11616   cf_cv_wcwidth_graphics=unknown
11617 else
11618   cat >conftest.$ac_ext <<_ACEOF
11619 #line 11619 "configure"
11620 #include "confdefs.h"
11621
11622 #include <locale.h>
11623 #include <stdio.h>
11624 #include <wchar.h>
11625
11626 #define MY_LEN 80
11627
11628 int
11629 main(void)
11630 {
11631         FILE *fp;
11632         int value;
11633         char buffer[MY_LEN + 1];
11634         char notes[MY_LEN + 1];
11635         int totals = 0;
11636         int passed = 0;
11637
11638         if (setlocale(LC_ALL, "en_US.UTF8") ||
11639                 setlocale(LC_ALL, "en_US.UTF-8") ||
11640                 setlocale(LC_ALL, "en_US.utf8") ||
11641                 setlocale(LC_ALL, "en_US.utf-8")) {
11642                 if ((fp = fopen("conftest.in", "r")) != 0) {
11643                         while (fgets(buffer, MY_LEN, fp) != 0) {
11644                                 if (*buffer == '-') {
11645                                         fprintf(stderr, "\t%s", buffer);
11646                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11647                                         ++totals;
11648                                         if (wcwidth(value) == 1)
11649                                                 ++passed;
11650                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11651                                 } else {
11652                                         fprintf(stderr, "?\t%s", buffer);
11653                                 }
11654                         }
11655                 }
11656         }
11657         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11658         return (totals == passed) ? 0 : 1;
11659 }
11660
11661 _ACEOF
11662 rm -f conftest$ac_exeext
11663 if { (eval echo "$as_me:11663: \"$ac_link\"") >&5
11664   (eval $ac_link) 2>&5
11665   ac_status=$?
11666   echo "$as_me:11666: \$? = $ac_status" >&5
11667   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11668   { (eval echo "$as_me:11668: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   cf_cv_wcwidth_graphics=yes
11674 else
11675   echo "$as_me: program exited with status $ac_status" >&5
11676 echo "$as_me: failed program was:" >&5
11677 cat conftest.$ac_ext >&5
11678 cf_cv_wcwidth_graphics=no
11679 fi
11680 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11681 fi
11682
11683 fi
11684 echo "$as_me:11684: result: $cf_cv_wcwidth_graphics" >&5
11685 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11686
11687         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11688
11689         # with_overwrite=no
11690         NCURSES_CH_T=cchar_t
11691
11692 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11693 do
11694 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11695 echo "$as_me:11695: checking for $ac_func" >&5
11696 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11697 if eval "test \"\${$as_ac_var+set}\" = set"; then
11698   echo $ECHO_N "(cached) $ECHO_C" >&6
11699 else
11700   cat >conftest.$ac_ext <<_ACEOF
11701 #line 11701 "configure"
11702 #include "confdefs.h"
11703 #define $ac_func autoconf_temporary
11704 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11705 #undef $ac_func
11706
11707 #ifdef __cplusplus
11708 extern "C"
11709 #endif
11710
11711 /* We use char because int might match the return type of a gcc2
11712    builtin and then its argument prototype would still apply.  */
11713 char $ac_func (void);
11714
11715 int
11716 main (void)
11717 {
11718
11719 /* The GNU C library defines stubs for functions which it implements
11720     to always fail with ENOSYS.  Some functions are actually named
11721     something starting with __ and the normal name is an alias.  */
11722 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11723 #error found stub for $ac_func
11724 #endif
11725
11726         return $ac_func ();
11727   ;
11728   return 0;
11729 }
11730 _ACEOF
11731 rm -f conftest.$ac_objext conftest$ac_exeext
11732 if { (eval echo "$as_me:11732: \"$ac_link\"") >&5
11733   (eval $ac_link) 2>&5
11734   ac_status=$?
11735   echo "$as_me:11735: \$? = $ac_status" >&5
11736   (exit $ac_status); } &&
11737          { ac_try='test -s conftest$ac_exeext'
11738   { (eval echo "$as_me:11738: \"$ac_try\"") >&5
11739   (eval $ac_try) 2>&5
11740   ac_status=$?
11741   echo "$as_me:11741: \$? = $ac_status" >&5
11742   (exit $ac_status); }; }; then
11743   eval "$as_ac_var=yes"
11744 else
11745   echo "$as_me: failed program was:" >&5
11746 cat conftest.$ac_ext >&5
11747 eval "$as_ac_var=no"
11748 fi
11749 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11750 fi
11751 echo "$as_me:11751: result: `eval echo '${'$as_ac_var'}'`" >&5
11752 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11753 if test `eval echo '${'$as_ac_var'}'` = yes; then
11754   cat >>confdefs.h <<EOF
11755 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11756 EOF
11757
11758 fi
11759 done
11760
11761         if test "x$ac_cv_func_putwc" != xyes ; then
11762
11763 echo "$as_me:11763: checking for multibyte character support" >&5
11764 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11765 if test "${cf_cv_utf8_lib+set}" = set; then
11766   echo $ECHO_N "(cached) $ECHO_C" >&6
11767 else
11768
11769         cf_save_LIBS="$LIBS"
11770         cat >conftest.$ac_ext <<_ACEOF
11771 #line 11771 "configure"
11772 #include "confdefs.h"
11773
11774 #include <stdlib.h>
11775 int
11776 main (void)
11777 {
11778 putwc(0,0);
11779   ;
11780   return 0;
11781 }
11782 _ACEOF
11783 rm -f conftest.$ac_objext conftest$ac_exeext
11784 if { (eval echo "$as_me:11784: \"$ac_link\"") >&5
11785   (eval $ac_link) 2>&5
11786   ac_status=$?
11787   echo "$as_me:11787: \$? = $ac_status" >&5
11788   (exit $ac_status); } &&
11789          { ac_try='test -s conftest$ac_exeext'
11790   { (eval echo "$as_me:11790: \"$ac_try\"") >&5
11791   (eval $ac_try) 2>&5
11792   ac_status=$?
11793   echo "$as_me:11793: \$? = $ac_status" >&5
11794   (exit $ac_status); }; }; then
11795   cf_cv_utf8_lib=yes
11796 else
11797   echo "$as_me: failed program was:" >&5
11798 cat conftest.$ac_ext >&5
11799
11800 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11801 # will be set on completion of the AC_TRY_LINK below.
11802 cf_cv_header_path_utf8=
11803 cf_cv_library_path_utf8=
11804
11805 echo "${as_me:-configure}:11805: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11806
11807 cf_save_LIBS="$LIBS"
11808
11809 cat >conftest.$ac_ext <<_ACEOF
11810 #line 11810 "configure"
11811 #include "confdefs.h"
11812
11813 #include <libutf8.h>
11814 int
11815 main (void)
11816 {
11817 putwc(0,0);
11818   ;
11819   return 0;
11820 }
11821 _ACEOF
11822 rm -f conftest.$ac_objext conftest$ac_exeext
11823 if { (eval echo "$as_me:11823: \"$ac_link\"") >&5
11824   (eval $ac_link) 2>&5
11825   ac_status=$?
11826   echo "$as_me:11826: \$? = $ac_status" >&5
11827   (exit $ac_status); } &&
11828          { ac_try='test -s conftest$ac_exeext'
11829   { (eval echo "$as_me:11829: \"$ac_try\"") >&5
11830   (eval $ac_try) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); }; }; then
11834
11835         cf_cv_find_linkage_utf8=yes
11836         cf_cv_header_path_utf8=/usr/include
11837         cf_cv_library_path_utf8=/usr/lib
11838
11839 else
11840   echo "$as_me: failed program was:" >&5
11841 cat conftest.$ac_ext >&5
11842
11843 LIBS="-lutf8  $cf_save_LIBS"
11844
11845 cat >conftest.$ac_ext <<_ACEOF
11846 #line 11846 "configure"
11847 #include "confdefs.h"
11848
11849 #include <libutf8.h>
11850 int
11851 main (void)
11852 {
11853 putwc(0,0);
11854   ;
11855   return 0;
11856 }
11857 _ACEOF
11858 rm -f conftest.$ac_objext conftest$ac_exeext
11859 if { (eval echo "$as_me:11859: \"$ac_link\"") >&5
11860   (eval $ac_link) 2>&5
11861   ac_status=$?
11862   echo "$as_me:11862: \$? = $ac_status" >&5
11863   (exit $ac_status); } &&
11864          { ac_try='test -s conftest$ac_exeext'
11865   { (eval echo "$as_me:11865: \"$ac_try\"") >&5
11866   (eval $ac_try) 2>&5
11867   ac_status=$?
11868   echo "$as_me:11868: \$? = $ac_status" >&5
11869   (exit $ac_status); }; }; then
11870
11871         cf_cv_find_linkage_utf8=yes
11872         cf_cv_header_path_utf8=/usr/include
11873         cf_cv_library_path_utf8=/usr/lib
11874         cf_cv_library_file_utf8="-lutf8"
11875
11876 else
11877   echo "$as_me: failed program was:" >&5
11878 cat conftest.$ac_ext >&5
11879
11880         cf_cv_find_linkage_utf8=no
11881         LIBS="$cf_save_LIBS"
11882
11883         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11884
11885 echo "${as_me:-configure}:11885: testing find linkage for utf8 library ..." 1>&5
11886
11887 echo "${as_me:-configure}:11887: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11888
11889         cf_save_CPPFLAGS="$CPPFLAGS"
11890         cf_test_CPPFLAGS="$CPPFLAGS"
11891
11892 cf_search=
11893
11894 # collect the current set of include-directories from compiler flags
11895 cf_header_path_list=""
11896 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11897         for cf_header_path in $CPPFLAGS $CFLAGS
11898         do
11899                 case $cf_header_path in
11900                 (-I*)
11901                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11902
11903 test "x$cf_header_path" != "xNONE" && \
11904 test -d "$cf_header_path" && \
11905  {
11906         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11907         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11908         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11909         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11910         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11911         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11912 }
11913
11914                         cf_header_path_list="$cf_header_path_list $cf_search"
11915                         ;;
11916                 esac
11917         done
11918 fi
11919
11920 # add the variations for the package we are looking for
11921
11922 cf_search=
11923
11924 test "x$prefix" != "xNONE" && \
11925 test -d "$prefix" && \
11926  {
11927         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11928         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11929         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11930         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11931         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11932         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11933 }
11934
11935 for cf_subdir_prefix in \
11936         /usr \
11937         /usr/local \
11938         /usr/pkg \
11939         /opt \
11940         /opt/local \
11941         $HOME
11942 do
11943
11944 test "x$cf_subdir_prefix" != "x$prefix" && \
11945 test -d "$cf_subdir_prefix" && \
11946 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11947         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11948         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11949         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11950         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11951         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11952         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11953 }
11954
11955 done
11956
11957 test "$includedir" != NONE && \
11958 test "$includedir" != "/usr/include" && \
11959 test -d "$includedir" && {
11960         test -d $includedir &&    cf_search="$cf_search $includedir"
11961         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11962 }
11963
11964 test "$oldincludedir" != NONE && \
11965 test "$oldincludedir" != "/usr/include" && \
11966 test -d "$oldincludedir" && {
11967         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11968         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11969 }
11970
11971 cf_search="$cf_search $cf_header_path_list"
11972
11973         for cf_cv_header_path_utf8 in $cf_search
11974         do
11975                 if test -d $cf_cv_header_path_utf8 ; then
11976                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11977
11978 echo "${as_me:-configure}:11978: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11979
11980                         CPPFLAGS="$cf_save_CPPFLAGS"
11981
11982         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11983         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11984
11985                         cat >conftest.$ac_ext <<_ACEOF
11986 #line 11986 "configure"
11987 #include "confdefs.h"
11988
11989 #include <libutf8.h>
11990 int
11991 main (void)
11992 {
11993 putwc(0,0);
11994   ;
11995   return 0;
11996 }
11997 _ACEOF
11998 rm -f conftest.$ac_objext
11999 if { (eval echo "$as_me:11999: \"$ac_compile\"") >&5
12000   (eval $ac_compile) 2>&5
12001   ac_status=$?
12002   echo "$as_me:12002: \$? = $ac_status" >&5
12003   (exit $ac_status); } &&
12004          { ac_try='test -s conftest.$ac_objext'
12005   { (eval echo "$as_me:12005: \"$ac_try\"") >&5
12006   (eval $ac_try) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); }; }; then
12010
12011                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12012
12013 echo "${as_me:-configure}:12013: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12014
12015                                 cf_cv_find_linkage_utf8=maybe
12016                                 cf_test_CPPFLAGS="$CPPFLAGS"
12017                                 break
12018 else
12019   echo "$as_me: failed program was:" >&5
12020 cat conftest.$ac_ext >&5
12021
12022                                 CPPFLAGS="$cf_save_CPPFLAGS"
12023
12024 fi
12025 rm -f conftest.$ac_objext conftest.$ac_ext
12026                 fi
12027         done
12028
12029         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12030
12031 echo "${as_me:-configure}:12031: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12032
12033                 cf_save_LIBS="$LIBS"
12034                 cf_save_LDFLAGS="$LDFLAGS"
12035
12036                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12037
12038 cf_search=
12039 cf_library_path_list=""
12040 if test -n "${LDFLAGS}${LIBS}" ; then
12041         for cf_library_path in $LDFLAGS $LIBS
12042         do
12043                 case $cf_library_path in
12044                 (-L*)
12045                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12046
12047 test "x$cf_library_path" != "xNONE" && \
12048 test -d "$cf_library_path" && \
12049  {
12050         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12051         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
12052         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12053         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12054         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12055         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12056 }
12057
12058                         cf_library_path_list="$cf_library_path_list $cf_search"
12059                         ;;
12060                 esac
12061         done
12062 fi
12063
12064 cf_search=
12065
12066 test "x$prefix" != "xNONE" && \
12067 test -d "$prefix" && \
12068  {
12069         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12070         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
12071         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
12072         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12073         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
12074         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12075 }
12076
12077 for cf_subdir_prefix in \
12078         /usr \
12079         /usr/local \
12080         /usr/pkg \
12081         /opt \
12082         /opt/local \
12083         $HOME
12084 do
12085
12086 test "x$cf_subdir_prefix" != "x$prefix" && \
12087 test -d "$cf_subdir_prefix" && \
12088 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12089         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12090         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12091         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12092         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12093         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12094         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12095 }
12096
12097 done
12098
12099 cf_search="$cf_library_path_list $cf_search"
12100
12101                         for cf_cv_library_path_utf8 in $cf_search
12102                         do
12103                                 if test -d $cf_cv_library_path_utf8 ; then
12104                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12105
12106 echo "${as_me:-configure}:12106: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12107
12108                                         CPPFLAGS="$cf_test_CPPFLAGS"
12109                                         LIBS="-lutf8  $cf_save_LIBS"
12110                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12111                                         cat >conftest.$ac_ext <<_ACEOF
12112 #line 12112 "configure"
12113 #include "confdefs.h"
12114
12115 #include <libutf8.h>
12116 int
12117 main (void)
12118 {
12119 putwc(0,0);
12120   ;
12121   return 0;
12122 }
12123 _ACEOF
12124 rm -f conftest.$ac_objext conftest$ac_exeext
12125 if { (eval echo "$as_me:12125: \"$ac_link\"") >&5
12126   (eval $ac_link) 2>&5
12127   ac_status=$?
12128   echo "$as_me:12128: \$? = $ac_status" >&5
12129   (exit $ac_status); } &&
12130          { ac_try='test -s conftest$ac_exeext'
12131   { (eval echo "$as_me:12131: \"$ac_try\"") >&5
12132   (eval $ac_try) 2>&5
12133   ac_status=$?
12134   echo "$as_me:12134: \$? = $ac_status" >&5
12135   (exit $ac_status); }; }; then
12136
12137                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12138
12139 echo "${as_me:-configure}:12139: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12140
12141                                         cf_cv_find_linkage_utf8=yes
12142                                         cf_cv_library_file_utf8="-lutf8"
12143                                         break
12144 else
12145   echo "$as_me: failed program was:" >&5
12146 cat conftest.$ac_ext >&5
12147
12148                                         CPPFLAGS="$cf_save_CPPFLAGS"
12149                                         LIBS="$cf_save_LIBS"
12150                                         LDFLAGS="$cf_save_LDFLAGS"
12151
12152 fi
12153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12154                                 fi
12155                         done
12156                         CPPFLAGS="$cf_save_CPPFLAGS"
12157                         LDFLAGS="$cf_save_LDFLAGS"
12158                 fi
12159
12160         else
12161                 cf_cv_find_linkage_utf8=no
12162         fi
12163
12164 fi
12165 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12166
12167 fi
12168 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12169
12170 LIBS="$cf_save_LIBS"
12171
12172 if test "$cf_cv_find_linkage_utf8" = yes ; then
12173 cf_cv_utf8_lib=add-on
12174 else
12175 cf_cv_utf8_lib=no
12176 fi
12177
12178 fi
12179 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12180 fi
12181 echo "$as_me:12181: result: $cf_cv_utf8_lib" >&5
12182 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12183
12184 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12185 # ncurses/ncursesw:
12186 if test "$cf_cv_utf8_lib" = "add-on" ; then
12187
12188 cat >>confdefs.h <<\EOF
12189 #define HAVE_LIBUTF8_H 1
12190 EOF
12191
12192 if test -n "$cf_cv_header_path_utf8" ; then
12193   for cf_add_incdir in $cf_cv_header_path_utf8
12194   do
12195         while test $cf_add_incdir != /usr/include
12196         do
12197           if test -d $cf_add_incdir
12198           then
12199                 cf_have_incdir=no
12200                 if test -n "$CFLAGS$CPPFLAGS" ; then
12201                   # a loop is needed to ensure we can add subdirs of existing dirs
12202                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12203                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12204                           cf_have_incdir=yes; break
12205                         fi
12206                   done
12207                 fi
12208
12209                 if test "$cf_have_incdir" = no ; then
12210                   if test "$cf_add_incdir" = /usr/local/include ; then
12211                         if test "$GCC" = yes
12212                         then
12213                           cf_save_CPPFLAGS=$CPPFLAGS
12214
12215         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12216         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12217
12218                           cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12221 #include <stdio.h>
12222 int
12223 main (void)
12224 {
12225 printf("Hello")
12226   ;
12227   return 0;
12228 }
12229 _ACEOF
12230 rm -f conftest.$ac_objext
12231 if { (eval echo "$as_me:12231: \"$ac_compile\"") >&5
12232   (eval $ac_compile) 2>&5
12233   ac_status=$?
12234   echo "$as_me:12234: \$? = $ac_status" >&5
12235   (exit $ac_status); } &&
12236          { ac_try='test -s conftest.$ac_objext'
12237   { (eval echo "$as_me:12237: \"$ac_try\"") >&5
12238   (eval $ac_try) 2>&5
12239   ac_status=$?
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit $ac_status); }; }; then
12242   :
12243 else
12244   echo "$as_me: failed program was:" >&5
12245 cat conftest.$ac_ext >&5
12246 cf_have_incdir=yes
12247 fi
12248 rm -f conftest.$ac_objext conftest.$ac_ext
12249                           CPPFLAGS=$cf_save_CPPFLAGS
12250                         fi
12251                   fi
12252                 fi
12253
12254                 if test "$cf_have_incdir" = no ; then
12255                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12256
12257 echo "${as_me:-configure}:12257: testing adding $cf_add_incdir to include-path ..." 1>&5
12258
12259                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12260
12261                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12262                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12263                   cf_add_incdir="$cf_top_incdir"
12264                 else
12265                   break
12266                 fi
12267           else
12268                 break
12269           fi
12270         done
12271   done
12272 fi
12273
12274 if test -n "$cf_cv_library_path_utf8" ; then
12275         for cf_add_libdir in $cf_cv_library_path_utf8
12276         do
12277                 if test $cf_add_libdir = /usr/lib ; then
12278                         :
12279                 elif test -d $cf_add_libdir
12280                 then
12281                         cf_have_libdir=no
12282                         if test -n "$LDFLAGS$LIBS" ; then
12283                                 # a loop is needed to ensure we can add subdirs of existing dirs
12284                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12285                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12286                                                 cf_have_libdir=yes; break
12287                                         fi
12288                                 done
12289                         fi
12290                         if test "$cf_have_libdir" = no ; then
12291                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12292
12293 echo "${as_me:-configure}:12293: testing adding $cf_add_libdir to library-path ..." 1>&5
12294
12295                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12296                         fi
12297                 fi
12298         done
12299 fi
12300
12301 cf_add_libs="$LIBS"
12302 # reverse order
12303 cf_add_0lib=
12304 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12305 # filter duplicates
12306 for cf_add_1lib in $cf_add_0lib; do
12307         for cf_add_2lib in $cf_add_libs; do
12308                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12309                         cf_add_1lib=
12310                         break
12311                 fi
12312         done
12313         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12314 done
12315 LIBS="$cf_add_libs"
12316
12317 fi
12318
12319                 if test "$cf_cv_utf8_lib" != no ; then
12320                         NCURSES_LIBUTF8=1
12321                 fi
12322         fi
12323
12324 # This is needed on Tru64 5.0 to declare mbstate_t
12325 echo "$as_me:12325: checking if we must include wchar.h to declare mbstate_t" >&5
12326 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12327 if test "${cf_cv_mbstate_t+set}" = set; then
12328   echo $ECHO_N "(cached) $ECHO_C" >&6
12329 else
12330
12331 cat >conftest.$ac_ext <<_ACEOF
12332 #line 12332 "configure"
12333 #include "confdefs.h"
12334
12335 #include <stdlib.h>
12336 #include <stdarg.h>
12337 #include <stdio.h>
12338 #ifdef HAVE_LIBUTF8_H
12339 #include <libutf8.h>
12340 #endif
12341 int
12342 main (void)
12343 {
12344 mbstate_t state
12345   ;
12346   return 0;
12347 }
12348 _ACEOF
12349 rm -f conftest.$ac_objext
12350 if { (eval echo "$as_me:12350: \"$ac_compile\"") >&5
12351   (eval $ac_compile) 2>&5
12352   ac_status=$?
12353   echo "$as_me:12353: \$? = $ac_status" >&5
12354   (exit $ac_status); } &&
12355          { ac_try='test -s conftest.$ac_objext'
12356   { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357   (eval $ac_try) 2>&5
12358   ac_status=$?
12359   echo "$as_me:12359: \$? = $ac_status" >&5
12360   (exit $ac_status); }; }; then
12361   cf_cv_mbstate_t=no
12362 else
12363   echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 cat >conftest.$ac_ext <<_ACEOF
12366 #line 12366 "configure"
12367 #include "confdefs.h"
12368
12369 #include <stdlib.h>
12370 #include <stdarg.h>
12371 #include <stdio.h>
12372 #include <wchar.h>
12373 #ifdef HAVE_LIBUTF8_H
12374 #include <libutf8.h>
12375 #endif
12376 int
12377 main (void)
12378 {
12379 mbstate_t value
12380   ;
12381   return 0;
12382 }
12383 _ACEOF
12384 rm -f conftest.$ac_objext
12385 if { (eval echo "$as_me:12385: \"$ac_compile\"") >&5
12386   (eval $ac_compile) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit $ac_status); } &&
12390          { ac_try='test -s conftest.$ac_objext'
12391   { (eval echo "$as_me:12391: \"$ac_try\"") >&5
12392   (eval $ac_try) 2>&5
12393   ac_status=$?
12394   echo "$as_me:12394: \$? = $ac_status" >&5
12395   (exit $ac_status); }; }; then
12396   cf_cv_mbstate_t=yes
12397 else
12398   echo "$as_me: failed program was:" >&5
12399 cat conftest.$ac_ext >&5
12400 cf_cv_mbstate_t=unknown
12401 fi
12402 rm -f conftest.$ac_objext conftest.$ac_ext
12403 fi
12404 rm -f conftest.$ac_objext conftest.$ac_ext
12405 fi
12406 echo "$as_me:12406: result: $cf_cv_mbstate_t" >&5
12407 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
12408
12409 if test "$cf_cv_mbstate_t" = yes ; then
12410
12411 cat >>confdefs.h <<\EOF
12412 #define NEED_WCHAR_H 1
12413 EOF
12414
12415         NEED_WCHAR_H=1
12416 fi
12417
12418 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
12419 if test "$cf_cv_mbstate_t" = unknown ; then
12420         NCURSES_MBSTATE_T=1
12421 fi
12422
12423 # This is needed on Tru64 5.0 to declare wchar_t
12424 echo "$as_me:12424: checking if we must include wchar.h to declare wchar_t" >&5
12425 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
12426 if test "${cf_cv_wchar_t+set}" = set; then
12427   echo $ECHO_N "(cached) $ECHO_C" >&6
12428 else
12429
12430 cat >conftest.$ac_ext <<_ACEOF
12431 #line 12431 "configure"
12432 #include "confdefs.h"
12433
12434 #include <stdlib.h>
12435 #include <stdarg.h>
12436 #include <stdio.h>
12437 #ifdef HAVE_LIBUTF8_H
12438 #include <libutf8.h>
12439 #endif
12440 int
12441 main (void)
12442 {
12443 wchar_t state
12444   ;
12445   return 0;
12446 }
12447 _ACEOF
12448 rm -f conftest.$ac_objext
12449 if { (eval echo "$as_me:12449: \"$ac_compile\"") >&5
12450   (eval $ac_compile) 2>&5
12451   ac_status=$?
12452   echo "$as_me:12452: \$? = $ac_status" >&5
12453   (exit $ac_status); } &&
12454          { ac_try='test -s conftest.$ac_objext'
12455   { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456   (eval $ac_try) 2>&5
12457   ac_status=$?
12458   echo "$as_me:12458: \$? = $ac_status" >&5
12459   (exit $ac_status); }; }; then
12460   cf_cv_wchar_t=no
12461 else
12462   echo "$as_me: failed program was:" >&5
12463 cat conftest.$ac_ext >&5
12464 cat >conftest.$ac_ext <<_ACEOF
12465 #line 12465 "configure"
12466 #include "confdefs.h"
12467
12468 #include <stdlib.h>
12469 #include <stdarg.h>
12470 #include <stdio.h>
12471 #include <wchar.h>
12472 #ifdef HAVE_LIBUTF8_H
12473 #include <libutf8.h>
12474 #endif
12475 int
12476 main (void)
12477 {
12478 wchar_t value
12479   ;
12480   return 0;
12481 }
12482 _ACEOF
12483 rm -f conftest.$ac_objext
12484 if { (eval echo "$as_me:12484: \"$ac_compile\"") >&5
12485   (eval $ac_compile) 2>&5
12486   ac_status=$?
12487   echo "$as_me:12487: \$? = $ac_status" >&5
12488   (exit $ac_status); } &&
12489          { ac_try='test -s conftest.$ac_objext'
12490   { (eval echo "$as_me:12490: \"$ac_try\"") >&5
12491   (eval $ac_try) 2>&5
12492   ac_status=$?
12493   echo "$as_me:12493: \$? = $ac_status" >&5
12494   (exit $ac_status); }; }; then
12495   cf_cv_wchar_t=yes
12496 else
12497   echo "$as_me: failed program was:" >&5
12498 cat conftest.$ac_ext >&5
12499 cf_cv_wchar_t=unknown
12500 fi
12501 rm -f conftest.$ac_objext conftest.$ac_ext
12502 fi
12503 rm -f conftest.$ac_objext conftest.$ac_ext
12504 fi
12505 echo "$as_me:12505: result: $cf_cv_wchar_t" >&5
12506 echo "${ECHO_T}$cf_cv_wchar_t" >&6
12507
12508 if test "$cf_cv_wchar_t" = yes ; then
12509
12510 cat >>confdefs.h <<\EOF
12511 #define NEED_WCHAR_H 1
12512 EOF
12513
12514         NEED_WCHAR_H=1
12515 fi
12516
12517 # if we do not find wchar_t in either place, use substitution to provide a fallback.
12518 if test "$cf_cv_wchar_t" = unknown ; then
12519         NCURSES_WCHAR_T=1
12520 fi
12521
12522 # if we find wchar_t in either place, use substitution to provide a fallback.
12523 if test "$cf_cv_wchar_t" != unknown ; then
12524         NCURSES_OK_WCHAR_T=1
12525 fi
12526
12527 # This is needed on Tru64 5.0 to declare wint_t
12528 echo "$as_me:12528: checking if we must include wchar.h to declare wint_t" >&5
12529 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
12530 if test "${cf_cv_wint_t+set}" = set; then
12531   echo $ECHO_N "(cached) $ECHO_C" >&6
12532 else
12533
12534 cat >conftest.$ac_ext <<_ACEOF
12535 #line 12535 "configure"
12536 #include "confdefs.h"
12537
12538 #include <stdlib.h>
12539 #include <stdarg.h>
12540 #include <stdio.h>
12541 #ifdef HAVE_LIBUTF8_H
12542 #include <libutf8.h>
12543 #endif
12544 int
12545 main (void)
12546 {
12547 wint_t state
12548   ;
12549   return 0;
12550 }
12551 _ACEOF
12552 rm -f conftest.$ac_objext
12553 if { (eval echo "$as_me:12553: \"$ac_compile\"") >&5
12554   (eval $ac_compile) 2>&5
12555   ac_status=$?
12556   echo "$as_me:12556: \$? = $ac_status" >&5
12557   (exit $ac_status); } &&
12558          { ac_try='test -s conftest.$ac_objext'
12559   { (eval echo "$as_me:12559: \"$ac_try\"") >&5
12560   (eval $ac_try) 2>&5
12561   ac_status=$?
12562   echo "$as_me:12562: \$? = $ac_status" >&5
12563   (exit $ac_status); }; }; then
12564   cf_cv_wint_t=no
12565 else
12566   echo "$as_me: failed program was:" >&5
12567 cat conftest.$ac_ext >&5
12568 cat >conftest.$ac_ext <<_ACEOF
12569 #line 12569 "configure"
12570 #include "confdefs.h"
12571
12572 #include <stdlib.h>
12573 #include <stdarg.h>
12574 #include <stdio.h>
12575 #include <wchar.h>
12576 #ifdef HAVE_LIBUTF8_H
12577 #include <libutf8.h>
12578 #endif
12579 int
12580 main (void)
12581 {
12582 wint_t value
12583   ;
12584   return 0;
12585 }
12586 _ACEOF
12587 rm -f conftest.$ac_objext
12588 if { (eval echo "$as_me:12588: \"$ac_compile\"") >&5
12589   (eval $ac_compile) 2>&5
12590   ac_status=$?
12591   echo "$as_me:12591: \$? = $ac_status" >&5
12592   (exit $ac_status); } &&
12593          { ac_try='test -s conftest.$ac_objext'
12594   { (eval echo "$as_me:12594: \"$ac_try\"") >&5
12595   (eval $ac_try) 2>&5
12596   ac_status=$?
12597   echo "$as_me:12597: \$? = $ac_status" >&5
12598   (exit $ac_status); }; }; then
12599   cf_cv_wint_t=yes
12600 else
12601   echo "$as_me: failed program was:" >&5
12602 cat conftest.$ac_ext >&5
12603 cf_cv_wint_t=unknown
12604 fi
12605 rm -f conftest.$ac_objext conftest.$ac_ext
12606 fi
12607 rm -f conftest.$ac_objext conftest.$ac_ext
12608 fi
12609 echo "$as_me:12609: result: $cf_cv_wint_t" >&5
12610 echo "${ECHO_T}$cf_cv_wint_t" >&6
12611
12612 if test "$cf_cv_wint_t" = yes ; then
12613
12614 cat >>confdefs.h <<\EOF
12615 #define NEED_WCHAR_H 1
12616 EOF
12617
12618         NEED_WCHAR_H=1
12619 fi
12620
12621 # if we do not find wint_t in either place, use substitution to provide a fallback.
12622 if test "$cf_cv_wint_t" = unknown ; then
12623         NCURSES_WINT_T=1
12624 fi
12625
12626 # if we find wint_t in either place, use substitution to provide a fallback.
12627 if test "$cf_cv_wint_t" != unknown ; then
12628         NCURSES_OK_WINT_T=1
12629 fi
12630
12631         if test "$NCURSES_MBSTATE_T" != 0; then
12632
12633 cat >>confdefs.h <<\EOF
12634 #define NEED_MBSTATE_T_DEF 1
12635 EOF
12636
12637         fi
12638 fi
12639
12640 ###   use option --disable-lp64 to allow long chtype
12641 echo "$as_me:12641: checking whether to enable _LP64 definition in curses.h" >&5
12642 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12643
12644 # Check whether --enable-lp64 or --disable-lp64 was given.
12645 if test "${enable_lp64+set}" = set; then
12646   enableval="$enable_lp64"
12647   with_lp64=$enableval
12648 else
12649   with_lp64=$cf_dft_with_lp64
12650 fi;
12651 echo "$as_me:12651: result: $with_lp64" >&5
12652 echo "${ECHO_T}$with_lp64" >&6
12653
12654 if test "x$with_lp64" = xyes ; then
12655         cf_cv_enable_lp64=1
12656 else
12657         cf_cv_enable_lp64=0
12658 fi
12659
12660 # Check whether --enable-largefile or --disable-largefile was given.
12661 if test "${enable_largefile+set}" = set; then
12662   enableval="$enable_largefile"
12663
12664 fi;
12665 if test "$enable_largefile" != no; then
12666
12667   echo "$as_me:12667: checking for special C compiler options needed for large files" >&5
12668 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12669 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12670   echo $ECHO_N "(cached) $ECHO_C" >&6
12671 else
12672   ac_cv_sys_largefile_CC=no
12673      if test "$GCC" != yes; then
12674        ac_save_CC=$CC
12675        while :; do
12676          # IRIX 6.2 and later do not support large files by default,
12677          # so use the C compiler's -n32 option if that helps.
12678          cat >conftest.$ac_ext <<_ACEOF
12679 #line 12679 "configure"
12680 #include "confdefs.h"
12681 #include <sys/types.h>
12682  /* Check that off_t can represent 2**63 - 1 correctly.
12683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12684     since some C++ compilers masquerading as C compilers
12685     incorrectly reject 9223372036854775807.  */
12686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12688                        && LARGE_OFF_T % 2147483647 == 1)
12689                       ? 1 : -1];
12690 int
12691 main (void)
12692 {
12693
12694   ;
12695   return 0;
12696 }
12697 _ACEOF
12698          rm -f conftest.$ac_objext
12699 if { (eval echo "$as_me:12699: \"$ac_compile\"") >&5
12700   (eval $ac_compile) 2>&5
12701   ac_status=$?
12702   echo "$as_me:12702: \$? = $ac_status" >&5
12703   (exit $ac_status); } &&
12704          { ac_try='test -s conftest.$ac_objext'
12705   { (eval echo "$as_me:12705: \"$ac_try\"") >&5
12706   (eval $ac_try) 2>&5
12707   ac_status=$?
12708   echo "$as_me:12708: \$? = $ac_status" >&5
12709   (exit $ac_status); }; }; then
12710   break
12711 else
12712   echo "$as_me: failed program was:" >&5
12713 cat conftest.$ac_ext >&5
12714 fi
12715 rm -f conftest.$ac_objext
12716          CC="$CC -n32"
12717          rm -f conftest.$ac_objext
12718 if { (eval echo "$as_me:12718: \"$ac_compile\"") >&5
12719   (eval $ac_compile) 2>&5
12720   ac_status=$?
12721   echo "$as_me:12721: \$? = $ac_status" >&5
12722   (exit $ac_status); } &&
12723          { ac_try='test -s conftest.$ac_objext'
12724   { (eval echo "$as_me:12724: \"$ac_try\"") >&5
12725   (eval $ac_try) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); }; }; then
12729   ac_cv_sys_largefile_CC=' -n32'; break
12730 else
12731   echo "$as_me: failed program was:" >&5
12732 cat conftest.$ac_ext >&5
12733 fi
12734 rm -f conftest.$ac_objext
12735          break
12736        done
12737        CC=$ac_save_CC
12738        rm -f conftest.$ac_ext
12739     fi
12740 fi
12741 echo "$as_me:12741: result: $ac_cv_sys_largefile_CC" >&5
12742 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12743   if test "$ac_cv_sys_largefile_CC" != no; then
12744     CC=$CC$ac_cv_sys_largefile_CC
12745   fi
12746
12747   echo "$as_me:12747: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12748 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12749 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12750   echo $ECHO_N "(cached) $ECHO_C" >&6
12751 else
12752   while :; do
12753   ac_cv_sys_file_offset_bits=no
12754   cat >conftest.$ac_ext <<_ACEOF
12755 #line 12755 "configure"
12756 #include "confdefs.h"
12757 #include <sys/types.h>
12758  /* Check that off_t can represent 2**63 - 1 correctly.
12759     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12760     since some C++ compilers masquerading as C compilers
12761     incorrectly reject 9223372036854775807.  */
12762 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12763   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12764                        && LARGE_OFF_T % 2147483647 == 1)
12765                       ? 1 : -1];
12766 int
12767 main (void)
12768 {
12769
12770   ;
12771   return 0;
12772 }
12773 _ACEOF
12774 rm -f conftest.$ac_objext
12775 if { (eval echo "$as_me:12775: \"$ac_compile\"") >&5
12776   (eval $ac_compile) 2>&5
12777   ac_status=$?
12778   echo "$as_me:12778: \$? = $ac_status" >&5
12779   (exit $ac_status); } &&
12780          { ac_try='test -s conftest.$ac_objext'
12781   { (eval echo "$as_me:12781: \"$ac_try\"") >&5
12782   (eval $ac_try) 2>&5
12783   ac_status=$?
12784   echo "$as_me:12784: \$? = $ac_status" >&5
12785   (exit $ac_status); }; }; then
12786   break
12787 else
12788   echo "$as_me: failed program was:" >&5
12789 cat conftest.$ac_ext >&5
12790 fi
12791 rm -f conftest.$ac_objext conftest.$ac_ext
12792   cat >conftest.$ac_ext <<_ACEOF
12793 #line 12793 "configure"
12794 #include "confdefs.h"
12795 #define _FILE_OFFSET_BITS 64
12796 #include <sys/types.h>
12797  /* Check that off_t can represent 2**63 - 1 correctly.
12798     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12799     since some C++ compilers masquerading as C compilers
12800     incorrectly reject 9223372036854775807.  */
12801 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12802   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12803                        && LARGE_OFF_T % 2147483647 == 1)
12804                       ? 1 : -1];
12805 int
12806 main (void)
12807 {
12808
12809   ;
12810   return 0;
12811 }
12812 _ACEOF
12813 rm -f conftest.$ac_objext
12814 if { (eval echo "$as_me:12814: \"$ac_compile\"") >&5
12815   (eval $ac_compile) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit $ac_status); } &&
12819          { ac_try='test -s conftest.$ac_objext'
12820   { (eval echo "$as_me:12820: \"$ac_try\"") >&5
12821   (eval $ac_try) 2>&5
12822   ac_status=$?
12823   echo "$as_me:12823: \$? = $ac_status" >&5
12824   (exit $ac_status); }; }; then
12825   ac_cv_sys_file_offset_bits=64; break
12826 else
12827   echo "$as_me: failed program was:" >&5
12828 cat conftest.$ac_ext >&5
12829 fi
12830 rm -f conftest.$ac_objext conftest.$ac_ext
12831   break
12832 done
12833 fi
12834 echo "$as_me:12834: result: $ac_cv_sys_file_offset_bits" >&5
12835 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12836 if test "$ac_cv_sys_file_offset_bits" != no; then
12837
12838 cat >>confdefs.h <<EOF
12839 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12840 EOF
12841
12842 fi
12843 rm -rf conftest*
12844   echo "$as_me:12844: checking for _LARGE_FILES value needed for large files" >&5
12845 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12846 if test "${ac_cv_sys_large_files+set}" = set; then
12847   echo $ECHO_N "(cached) $ECHO_C" >&6
12848 else
12849   while :; do
12850   ac_cv_sys_large_files=no
12851   cat >conftest.$ac_ext <<_ACEOF
12852 #line 12852 "configure"
12853 #include "confdefs.h"
12854 #include <sys/types.h>
12855  /* Check that off_t can represent 2**63 - 1 correctly.
12856     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12857     since some C++ compilers masquerading as C compilers
12858     incorrectly reject 9223372036854775807.  */
12859 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12860   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12861                        && LARGE_OFF_T % 2147483647 == 1)
12862                       ? 1 : -1];
12863 int
12864 main (void)
12865 {
12866
12867   ;
12868   return 0;
12869 }
12870 _ACEOF
12871 rm -f conftest.$ac_objext
12872 if { (eval echo "$as_me:12872: \"$ac_compile\"") >&5
12873   (eval $ac_compile) 2>&5
12874   ac_status=$?
12875   echo "$as_me:12875: \$? = $ac_status" >&5
12876   (exit $ac_status); } &&
12877          { ac_try='test -s conftest.$ac_objext'
12878   { (eval echo "$as_me:12878: \"$ac_try\"") >&5
12879   (eval $ac_try) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit $ac_status); }; }; then
12883   break
12884 else
12885   echo "$as_me: failed program was:" >&5
12886 cat conftest.$ac_ext >&5
12887 fi
12888 rm -f conftest.$ac_objext conftest.$ac_ext
12889   cat >conftest.$ac_ext <<_ACEOF
12890 #line 12890 "configure"
12891 #include "confdefs.h"
12892 #define _LARGE_FILES 1
12893 #include <sys/types.h>
12894  /* Check that off_t can represent 2**63 - 1 correctly.
12895     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12896     since some C++ compilers masquerading as C compilers
12897     incorrectly reject 9223372036854775807.  */
12898 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12899   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12900                        && LARGE_OFF_T % 2147483647 == 1)
12901                       ? 1 : -1];
12902 int
12903 main (void)
12904 {
12905
12906   ;
12907   return 0;
12908 }
12909 _ACEOF
12910 rm -f conftest.$ac_objext
12911 if { (eval echo "$as_me:12911: \"$ac_compile\"") >&5
12912   (eval $ac_compile) 2>&5
12913   ac_status=$?
12914   echo "$as_me:12914: \$? = $ac_status" >&5
12915   (exit $ac_status); } &&
12916          { ac_try='test -s conftest.$ac_objext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   ac_cv_sys_large_files=1; break
12923 else
12924   echo "$as_me: failed program was:" >&5
12925 cat conftest.$ac_ext >&5
12926 fi
12927 rm -f conftest.$ac_objext conftest.$ac_ext
12928   break
12929 done
12930 fi
12931 echo "$as_me:12931: result: $ac_cv_sys_large_files" >&5
12932 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12933 if test "$ac_cv_sys_large_files" != no; then
12934
12935 cat >>confdefs.h <<EOF
12936 #define _LARGE_FILES $ac_cv_sys_large_files
12937 EOF
12938
12939 fi
12940 rm -rf conftest*
12941 fi
12942
12943         if test "$enable_largefile" != no ; then
12944         echo "$as_me:12944: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12945 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12946 if test "${ac_cv_sys_largefile_source+set}" = set; then
12947   echo $ECHO_N "(cached) $ECHO_C" >&6
12948 else
12949   while :; do
12950   ac_cv_sys_largefile_source=no
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <stdio.h>
12955 int
12956 main (void)
12957 {
12958 return !fseeko;
12959   ;
12960   return 0;
12961 }
12962 _ACEOF
12963 rm -f conftest.$ac_objext
12964 if { (eval echo "$as_me:12964: \"$ac_compile\"") >&5
12965   (eval $ac_compile) 2>&5
12966   ac_status=$?
12967   echo "$as_me:12967: \$? = $ac_status" >&5
12968   (exit $ac_status); } &&
12969          { ac_try='test -s conftest.$ac_objext'
12970   { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971   (eval $ac_try) 2>&5
12972   ac_status=$?
12973   echo "$as_me:12973: \$? = $ac_status" >&5
12974   (exit $ac_status); }; }; then
12975   break
12976 else
12977   echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 fi
12980 rm -f conftest.$ac_objext conftest.$ac_ext
12981   cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984 #define _LARGEFILE_SOURCE 1
12985 #include <stdio.h>
12986 int
12987 main (void)
12988 {
12989 return !fseeko;
12990   ;
12991   return 0;
12992 }
12993 _ACEOF
12994 rm -f conftest.$ac_objext
12995 if { (eval echo "$as_me:12995: \"$ac_compile\"") >&5
12996   (eval $ac_compile) 2>&5
12997   ac_status=$?
12998   echo "$as_me:12998: \$? = $ac_status" >&5
12999   (exit $ac_status); } &&
13000          { ac_try='test -s conftest.$ac_objext'
13001   { (eval echo "$as_me:13001: \"$ac_try\"") >&5
13002   (eval $ac_try) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); }; }; then
13006   ac_cv_sys_largefile_source=1; break
13007 else
13008   echo "$as_me: failed program was:" >&5
13009 cat conftest.$ac_ext >&5
13010 fi
13011 rm -f conftest.$ac_objext conftest.$ac_ext
13012   break
13013 done
13014 fi
13015 echo "$as_me:13015: result: $ac_cv_sys_largefile_source" >&5
13016 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13017 if test "$ac_cv_sys_largefile_source" != no; then
13018
13019 cat >>confdefs.h <<EOF
13020 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13021 EOF
13022
13023 fi
13024 rm -rf conftest*
13025
13026 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13027 # in glibc 2.1.3, but that breaks too many other things.
13028 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13029 echo "$as_me:13029: checking for fseeko" >&5
13030 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13031 if test "${ac_cv_func_fseeko+set}" = set; then
13032   echo $ECHO_N "(cached) $ECHO_C" >&6
13033 else
13034   cat >conftest.$ac_ext <<_ACEOF
13035 #line 13035 "configure"
13036 #include "confdefs.h"
13037 #include <stdio.h>
13038 int
13039 main (void)
13040 {
13041 return fseeko && fseeko (stdin, 0, 0);
13042   ;
13043   return 0;
13044 }
13045 _ACEOF
13046 rm -f conftest.$ac_objext conftest$ac_exeext
13047 if { (eval echo "$as_me:13047: \"$ac_link\"") >&5
13048   (eval $ac_link) 2>&5
13049   ac_status=$?
13050   echo "$as_me:13050: \$? = $ac_status" >&5
13051   (exit $ac_status); } &&
13052          { ac_try='test -s conftest$ac_exeext'
13053   { (eval echo "$as_me:13053: \"$ac_try\"") >&5
13054   (eval $ac_try) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit $ac_status); }; }; then
13058   ac_cv_func_fseeko=yes
13059 else
13060   echo "$as_me: failed program was:" >&5
13061 cat conftest.$ac_ext >&5
13062 ac_cv_func_fseeko=no
13063 fi
13064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13065 fi
13066 echo "$as_me:13066: result: $ac_cv_func_fseeko" >&5
13067 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13068 if test $ac_cv_func_fseeko = yes; then
13069
13070 cat >>confdefs.h <<\EOF
13071 #define HAVE_FSEEKO 1
13072 EOF
13073
13074 fi
13075
13076         # Normally we would collect these definitions in the config.h,
13077         # but (like _XOPEN_SOURCE), some environments rely on having these
13078         # defined before any of the system headers are included.  Another
13079         # case comes up with C++, e.g., on AIX the compiler compiles the
13080         # header files by themselves before looking at the body files it is
13081         # told to compile.  For ncurses, those header files do not include
13082         # the config.h
13083         if test "$ac_cv_sys_large_files" != no
13084         then
13085
13086         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13087         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13088
13089         fi
13090         if test "$ac_cv_sys_largefile_source" != no
13091         then
13092
13093         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13094         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13095
13096         fi
13097         if test "$ac_cv_sys_file_offset_bits" != no
13098         then
13099
13100         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13101         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13102
13103         fi
13104
13105         echo "$as_me:13105: checking whether to use struct dirent64" >&5
13106 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13107 if test "${cf_cv_struct_dirent64+set}" = set; then
13108   echo $ECHO_N "(cached) $ECHO_C" >&6
13109 else
13110
13111                 cat >conftest.$ac_ext <<_ACEOF
13112 #line 13112 "configure"
13113 #include "confdefs.h"
13114
13115 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13116 #include <sys/types.h>
13117 #include <dirent.h>
13118
13119 int
13120 main (void)
13121 {
13122
13123                 /* if transitional largefile support is setup, this is true */
13124                 extern struct dirent64 * readdir(DIR *);
13125                 struct dirent64 *x = readdir((DIR *)0);
13126                 struct dirent *y = readdir((DIR *)0);
13127                 int z = x - y;
13128                 (void)z;
13129
13130   ;
13131   return 0;
13132 }
13133 _ACEOF
13134 rm -f conftest.$ac_objext
13135 if { (eval echo "$as_me:13135: \"$ac_compile\"") >&5
13136   (eval $ac_compile) 2>&5
13137   ac_status=$?
13138   echo "$as_me:13138: \$? = $ac_status" >&5
13139   (exit $ac_status); } &&
13140          { ac_try='test -s conftest.$ac_objext'
13141   { (eval echo "$as_me:13141: \"$ac_try\"") >&5
13142   (eval $ac_try) 2>&5
13143   ac_status=$?
13144   echo "$as_me:13144: \$? = $ac_status" >&5
13145   (exit $ac_status); }; }; then
13146   cf_cv_struct_dirent64=yes
13147 else
13148   echo "$as_me: failed program was:" >&5
13149 cat conftest.$ac_ext >&5
13150 cf_cv_struct_dirent64=no
13151 fi
13152 rm -f conftest.$ac_objext conftest.$ac_ext
13153
13154 fi
13155 echo "$as_me:13155: result: $cf_cv_struct_dirent64" >&5
13156 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13157         test "$cf_cv_struct_dirent64" = yes &&
13158 cat >>confdefs.h <<\EOF
13159 #define HAVE_STRUCT_DIRENT64 1
13160 EOF
13161
13162         fi
13163
13164 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13165 echo "$as_me:13165: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13166 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13167
13168 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13169 if test "${enable_tparm_varargs+set}" = set; then
13170   enableval="$enable_tparm_varargs"
13171   with_tparm_varargs=$enableval
13172 else
13173   with_tparm_varargs=yes
13174 fi;
13175 echo "$as_me:13175: result: $with_tparm_varargs" >&5
13176 echo "${ECHO_T}$with_tparm_varargs" >&6
13177 NCURSES_TPARM_VARARGS=0
13178 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13179
13180 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13181 if test "$with_ticlib" != no ; then
13182 echo "$as_me:13182: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13183 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13184
13185 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13186 if test "${enable_tic_depends+set}" = set; then
13187   enableval="$enable_tic_depends"
13188   with_tic_depends=$enableval
13189 else
13190   with_tic_depends=yes
13191 fi;
13192 echo "$as_me:13192: result: $with_tic_depends" >&5
13193 echo "${ECHO_T}$with_tic_depends" >&6
13194 else
13195         with_tic_depends=no
13196 fi
13197
13198 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
13199 echo "$as_me:13199: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
13200 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
13201
13202 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13203 if test "${enable_wattr_macros+set}" = set; then
13204   enableval="$enable_wattr_macros"
13205   with_wattr_macros=$enableval
13206 else
13207   with_wattr_macros=yes
13208 fi;
13209 if [ "x$with_wattr_macros" != xyes ]; then
13210         NCURSES_WATTR_MACROS=0
13211         echo "$as_me:13211: result: yes" >&5
13212 echo "${ECHO_T}yes" >&6
13213 else
13214         NCURSES_WATTR_MACROS=1
13215         echo "$as_me:13215: result: no" >&5
13216 echo "${ECHO_T}no" >&6
13217 fi
13218
13219 echo "$as_me:13219: checking for X11 rgb file" >&5
13220 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13221
13222 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13223 if test "${with_x11_rgb+set}" = set; then
13224   withval="$with_x11_rgb"
13225   RGB_PATH=$withval
13226 else
13227   RGB_PATH=auto
13228 fi;
13229
13230 if test "x$RGB_PATH" = xauto
13231 then
13232         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13233         for cf_path in \
13234                 /opt/local/share/X11/rgb.txt \
13235                 /opt/X11/share/X11/rgb.txt \
13236                 /usr/share/X11/rgb.txt \
13237                 /usr/X11/share/X11/rgb.txt \
13238                 /usr/X11/lib/X11/rgb.txt \
13239                 /usr/lib/X11/rgb.txt \
13240                 /etc/X11/rgb.txt \
13241                 /usr/pkg/lib/X11/rgb.txt \
13242                 /usr/X11R7/lib/X11/rgb.txt \
13243                 /usr/X11R6/lib/X11/rgb.txt \
13244                 /usr/X11R5/lib/X11/rgb.txt \
13245                 /usr/X11R4/lib/X11/rgb.txt \
13246                 /usr/local/lib/X11/rgb.txt \
13247                 /usr/local/share/X11/rgb.txt \
13248                 /usr/lib64/X11/rgb.txt
13249         do
13250                 if test -f "$cf_path" ; then
13251                         RGB_PATH="$cf_path"
13252                         break
13253                 fi
13254         done
13255 else
13256         cf_path=$RGB_PATH
13257
13258 if test "x$prefix" != xNONE; then
13259         cf_path_syntax="$prefix"
13260 else
13261         cf_path_syntax="$ac_default_prefix"
13262 fi
13263
13264 case ".$cf_path" in
13265 (.\$\(*\)*|.\'*\'*)
13266         ;;
13267 (..|./*|.\\*)
13268         ;;
13269 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13270         ;;
13271 (.\${*prefix}*|.\${*dir}*)
13272         eval cf_path="$cf_path"
13273         case ".$cf_path" in
13274         (.NONE/*)
13275                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13276                 ;;
13277         esac
13278         ;;
13279 (.no|.NONE/*)
13280         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
13281         ;;
13282 (*)
13283         { { echo "$as_me:13283: error: expected a pathname, not \"$cf_path\"" >&5
13284 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13285    { (exit 1); exit 1; }; }
13286         ;;
13287 esac
13288
13289 fi
13290
13291 echo "$as_me:13291: result: $RGB_PATH" >&5
13292 echo "${ECHO_T}$RGB_PATH" >&6
13293
13294 cat >>confdefs.h <<EOF
13295 #define RGB_PATH "$cf_path"
13296 EOF
13297
13298 no_x11_rgb=
13299 if test "$RGB_PATH" = no
13300 then
13301         no_x11_rgb="#"
13302 fi
13303
13304 ###   use option --with-bool to override bool's type
13305 echo "$as_me:13305: checking for type of bool" >&5
13306 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13307
13308 # Check whether --with-bool or --without-bool was given.
13309 if test "${with_bool+set}" = set; then
13310   withval="$with_bool"
13311   NCURSES_BOOL="$withval"
13312 else
13313   NCURSES_BOOL=auto
13314 fi;
13315 echo "$as_me:13315: result: $NCURSES_BOOL" >&5
13316 echo "${ECHO_T}$NCURSES_BOOL" >&6
13317
13318 echo "$as_me:13318: checking for alternate terminal capabilities file" >&5
13319 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13320
13321 # Check whether --with-caps or --without-caps was given.
13322 if test "${with_caps+set}" = set; then
13323   withval="$with_caps"
13324   TERMINFO_CAPS=Caps.$withval
13325 else
13326   TERMINFO_CAPS=Caps
13327 fi;
13328 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13329 echo "$as_me:13329: result: $TERMINFO_CAPS" >&5
13330 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13331
13332 ###   use option --with-chtype to override chtype's type
13333 echo "$as_me:13333: checking for type of chtype" >&5
13334 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13335
13336 # Check whether --with-chtype or --without-chtype was given.
13337 if test "${with_chtype+set}" = set; then
13338   withval="$with_chtype"
13339   NCURSES_CHTYPE="$withval"
13340 else
13341   NCURSES_CHTYPE=$cf_dft_chtype
13342 fi;
13343 echo "$as_me:13343: result: $NCURSES_CHTYPE" >&5
13344 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13345
13346 ###   use option --with-ospeed to override ospeed's type
13347 echo "$as_me:13347: checking for type of ospeed" >&5
13348 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13349
13350 # Check whether --with-ospeed or --without-ospeed was given.
13351 if test "${with_ospeed+set}" = set; then
13352   withval="$with_ospeed"
13353   NCURSES_OSPEED="$withval"
13354 else
13355   NCURSES_OSPEED=short
13356 fi;
13357 echo "$as_me:13357: result: $NCURSES_OSPEED" >&5
13358 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13359
13360 ###   use option --with-mmask-t to override mmask_t's type
13361 echo "$as_me:13361: checking for type of mmask_t" >&5
13362 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13363
13364 # Check whether --with-mmask-t or --without-mmask-t was given.
13365 if test "${with_mmask_t+set}" = set; then
13366   withval="$with_mmask_t"
13367   NCURSES_MMASK_T="$withval"
13368 else
13369   NCURSES_MMASK_T=$cf_dft_mmask_t
13370 fi;
13371 echo "$as_me:13371: result: $NCURSES_MMASK_T" >&5
13372 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
13373
13374 ###   use option --with-ccharw-max to override CCHARW_MAX size
13375 echo "$as_me:13375: checking for size CCHARW_MAX" >&5
13376 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
13377
13378 # Check whether --with-ccharw-max or --without-ccharw-max was given.
13379 if test "${with_ccharw_max+set}" = set; then
13380   withval="$with_ccharw_max"
13381   NCURSES_CCHARW_MAX="$withval"
13382 else
13383   NCURSES_CCHARW_MAX=5
13384 fi;
13385 echo "$as_me:13385: result: $NCURSES_CCHARW_MAX" >&5
13386 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
13387
13388 echo "$as_me:13388: checking for ANSI C header files" >&5
13389 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13390 if test "${ac_cv_header_stdc+set}" = set; then
13391   echo $ECHO_N "(cached) $ECHO_C" >&6
13392 else
13393   cat >conftest.$ac_ext <<_ACEOF
13394 #line 13394 "configure"
13395 #include "confdefs.h"
13396 #include <stdlib.h>
13397 #include <stdarg.h>
13398 #include <string.h>
13399 #include <float.h>
13400
13401 _ACEOF
13402 if { (eval echo "$as_me:13402: \"$ac_cpp conftest.$ac_ext\"") >&5
13403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13404   ac_status=$?
13405   egrep -v '^ *\+' conftest.er1 >conftest.err
13406   rm -f conftest.er1
13407   cat conftest.err >&5
13408   echo "$as_me:13408: \$? = $ac_status" >&5
13409   (exit $ac_status); } >/dev/null; then
13410   if test -s conftest.err; then
13411     ac_cpp_err=$ac_c_preproc_warn_flag
13412   else
13413     ac_cpp_err=
13414   fi
13415 else
13416   ac_cpp_err=yes
13417 fi
13418 if test -z "$ac_cpp_err"; then
13419   ac_cv_header_stdc=yes
13420 else
13421   echo "$as_me: failed program was:" >&5
13422   cat conftest.$ac_ext >&5
13423   ac_cv_header_stdc=no
13424 fi
13425 rm -f conftest.err conftest.$ac_ext
13426
13427 if test $ac_cv_header_stdc = yes; then
13428   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13429   cat >conftest.$ac_ext <<_ACEOF
13430 #line 13430 "configure"
13431 #include "confdefs.h"
13432 #include <string.h>
13433
13434 _ACEOF
13435 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13436   egrep "memchr" >/dev/null 2>&1; then
13437   :
13438 else
13439   ac_cv_header_stdc=no
13440 fi
13441 rm -rf conftest*
13442
13443 fi
13444
13445 if test $ac_cv_header_stdc = yes; then
13446   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13447   cat >conftest.$ac_ext <<_ACEOF
13448 #line 13448 "configure"
13449 #include "confdefs.h"
13450 #include <stdlib.h>
13451
13452 _ACEOF
13453 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13454   egrep "free" >/dev/null 2>&1; then
13455   :
13456 else
13457   ac_cv_header_stdc=no
13458 fi
13459 rm -rf conftest*
13460
13461 fi
13462
13463 if test $ac_cv_header_stdc = yes; then
13464   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13465   if test "$cross_compiling" = yes; then
13466   :
13467 else
13468   cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471 #include <ctype.h>
13472 #if ((' ' & 0x0FF) == 0x020)
13473 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13474 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13475 #else
13476 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13477                      || ('j' <= (c) && (c) <= 'r') \
13478                      || ('s' <= (c) && (c) <= 'z'))
13479 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13480 #endif
13481
13482 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13483 int
13484 main (void)
13485 {
13486   int i;
13487   for (i = 0; i < 256; i++)
13488     if (XOR (islower (i), ISLOWER (i))
13489         || toupper (i) != TOUPPER (i))
13490       $ac_main_return(2);
13491   $ac_main_return (0);
13492 }
13493 _ACEOF
13494 rm -f conftest$ac_exeext
13495 if { (eval echo "$as_me:13495: \"$ac_link\"") >&5
13496   (eval $ac_link) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13500   { (eval echo "$as_me:13500: \"$ac_try\"") >&5
13501   (eval $ac_try) 2>&5
13502   ac_status=$?
13503   echo "$as_me:13503: \$? = $ac_status" >&5
13504   (exit $ac_status); }; }; then
13505   :
13506 else
13507   echo "$as_me: program exited with status $ac_status" >&5
13508 echo "$as_me: failed program was:" >&5
13509 cat conftest.$ac_ext >&5
13510 ac_cv_header_stdc=no
13511 fi
13512 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13513 fi
13514 fi
13515 fi
13516 echo "$as_me:13516: result: $ac_cv_header_stdc" >&5
13517 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13518 if test $ac_cv_header_stdc = yes; then
13519
13520 cat >>confdefs.h <<\EOF
13521 #define STDC_HEADERS 1
13522 EOF
13523
13524 fi
13525
13526 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
13527
13528 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
13529                   inttypes.h stdint.h unistd.h
13530 do
13531 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13532 echo "$as_me:13532: checking for $ac_header" >&5
13533 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13534 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13535   echo $ECHO_N "(cached) $ECHO_C" >&6
13536 else
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 $ac_includes_default
13541 #include <$ac_header>
13542 _ACEOF
13543 rm -f conftest.$ac_objext
13544 if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545   (eval $ac_compile) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit $ac_status); } &&
13549          { ac_try='test -s conftest.$ac_objext'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit $ac_status); }; }; then
13555   eval "$as_ac_Header=yes"
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat conftest.$ac_ext >&5
13559 eval "$as_ac_Header=no"
13560 fi
13561 rm -f conftest.$ac_objext conftest.$ac_ext
13562 fi
13563 echo "$as_me:13563: result: `eval echo '${'$as_ac_Header'}'`" >&5
13564 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13565 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13566   cat >>confdefs.h <<EOF
13567 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13568 EOF
13569
13570 fi
13571 done
13572
13573 echo "$as_me:13573: checking for signed char" >&5
13574 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
13575 if test "${ac_cv_type_signed_char+set}" = set; then
13576   echo $ECHO_N "(cached) $ECHO_C" >&6
13577 else
13578   cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 $ac_includes_default
13582 int
13583 main (void)
13584 {
13585 if ((signed char *) 0)
13586   return 0;
13587 if (sizeof (signed char))
13588   return 0;
13589   ;
13590   return 0;
13591 }
13592 _ACEOF
13593 rm -f conftest.$ac_objext
13594 if { (eval echo "$as_me:13594: \"$ac_compile\"") >&5
13595   (eval $ac_compile) 2>&5
13596   ac_status=$?
13597   echo "$as_me:13597: \$? = $ac_status" >&5
13598   (exit $ac_status); } &&
13599          { ac_try='test -s conftest.$ac_objext'
13600   { (eval echo "$as_me:13600: \"$ac_try\"") >&5
13601   (eval $ac_try) 2>&5
13602   ac_status=$?
13603   echo "$as_me:13603: \$? = $ac_status" >&5
13604   (exit $ac_status); }; }; then
13605   ac_cv_type_signed_char=yes
13606 else
13607   echo "$as_me: failed program was:" >&5
13608 cat conftest.$ac_ext >&5
13609 ac_cv_type_signed_char=no
13610 fi
13611 rm -f conftest.$ac_objext conftest.$ac_ext
13612 fi
13613 echo "$as_me:13613: result: $ac_cv_type_signed_char" >&5
13614 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
13615
13616 echo "$as_me:13616: checking size of signed char" >&5
13617 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
13618 if test "${ac_cv_sizeof_signed_char+set}" = set; then
13619   echo $ECHO_N "(cached) $ECHO_C" >&6
13620 else
13621   if test "$ac_cv_type_signed_char" = yes; then
13622   if test "$cross_compiling" = yes; then
13623   # Depending upon the size, compute the lo and hi bounds.
13624 cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627 $ac_includes_default
13628 int
13629 main (void)
13630 {
13631 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
13632   ;
13633   return 0;
13634 }
13635 _ACEOF
13636 rm -f conftest.$ac_objext
13637 if { (eval echo "$as_me:13637: \"$ac_compile\"") >&5
13638   (eval $ac_compile) 2>&5
13639   ac_status=$?
13640   echo "$as_me:13640: \$? = $ac_status" >&5
13641   (exit $ac_status); } &&
13642          { ac_try='test -s conftest.$ac_objext'
13643   { (eval echo "$as_me:13643: \"$ac_try\"") >&5
13644   (eval $ac_try) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit $ac_status); }; }; then
13648   ac_lo=0 ac_mid=0
13649   while :; do
13650     cat >conftest.$ac_ext <<_ACEOF
13651 #line 13651 "configure"
13652 #include "confdefs.h"
13653 $ac_includes_default
13654 int
13655 main (void)
13656 {
13657 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13658   ;
13659   return 0;
13660 }
13661 _ACEOF
13662 rm -f conftest.$ac_objext
13663 if { (eval echo "$as_me:13663: \"$ac_compile\"") >&5
13664   (eval $ac_compile) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit $ac_status); } &&
13668          { ac_try='test -s conftest.$ac_objext'
13669   { (eval echo "$as_me:13669: \"$ac_try\"") >&5
13670   (eval $ac_try) 2>&5
13671   ac_status=$?
13672   echo "$as_me:13672: \$? = $ac_status" >&5
13673   (exit $ac_status); }; }; then
13674   ac_hi=$ac_mid; break
13675 else
13676   echo "$as_me: failed program was:" >&5
13677 cat conftest.$ac_ext >&5
13678 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13679 fi
13680 rm -f conftest.$ac_objext conftest.$ac_ext
13681   done
13682 else
13683   echo "$as_me: failed program was:" >&5
13684 cat conftest.$ac_ext >&5
13685 ac_hi=-1 ac_mid=-1
13686   while :; do
13687     cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690 $ac_includes_default
13691 int
13692 main (void)
13693 {
13694 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13695   ;
13696   return 0;
13697 }
13698 _ACEOF
13699 rm -f conftest.$ac_objext
13700 if { (eval echo "$as_me:13700: \"$ac_compile\"") >&5
13701   (eval $ac_compile) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); } &&
13705          { ac_try='test -s conftest.$ac_objext'
13706   { (eval echo "$as_me:13706: \"$ac_try\"") >&5
13707   (eval $ac_try) 2>&5
13708   ac_status=$?
13709   echo "$as_me:13709: \$? = $ac_status" >&5
13710   (exit $ac_status); }; }; then
13711   ac_lo=$ac_mid; break
13712 else
13713   echo "$as_me: failed program was:" >&5
13714 cat conftest.$ac_ext >&5
13715 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13716 fi
13717 rm -f conftest.$ac_objext conftest.$ac_ext
13718   done
13719 fi
13720 rm -f conftest.$ac_objext conftest.$ac_ext
13721 # Binary search between lo and hi bounds.
13722 while test "x$ac_lo" != "x$ac_hi"; do
13723   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13724   cat >conftest.$ac_ext <<_ACEOF
13725 #line 13725 "configure"
13726 #include "confdefs.h"
13727 $ac_includes_default
13728 int
13729 main (void)
13730 {
13731 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13732   ;
13733   return 0;
13734 }
13735 _ACEOF
13736 rm -f conftest.$ac_objext
13737 if { (eval echo "$as_me:13737: \"$ac_compile\"") >&5
13738   (eval $ac_compile) 2>&5
13739   ac_status=$?
13740   echo "$as_me:13740: \$? = $ac_status" >&5
13741   (exit $ac_status); } &&
13742          { ac_try='test -s conftest.$ac_objext'
13743   { (eval echo "$as_me:13743: \"$ac_try\"") >&5
13744   (eval $ac_try) 2>&5
13745   ac_status=$?
13746   echo "$as_me:13746: \$? = $ac_status" >&5
13747   (exit $ac_status); }; }; then
13748   ac_hi=$ac_mid
13749 else
13750   echo "$as_me: failed program was:" >&5
13751 cat conftest.$ac_ext >&5
13752 ac_lo=`expr $ac_mid + 1`
13753 fi
13754 rm -f conftest.$ac_objext conftest.$ac_ext
13755 done
13756 ac_cv_sizeof_signed_char=$ac_lo
13757 else
13758   if test "$cross_compiling" = yes; then
13759   { { echo "$as_me:13759: error: cannot run test program while cross compiling" >&5
13760 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13761    { (exit 1); exit 1; }; }
13762 else
13763   cat >conftest.$ac_ext <<_ACEOF
13764 #line 13764 "configure"
13765 #include "confdefs.h"
13766 $ac_includes_default
13767 int
13768 main (void)
13769 {
13770 FILE *f = fopen ("conftest.val", "w");
13771 if (!f)
13772   $ac_main_return (1);
13773 fprintf (f, "%d", (sizeof (signed char)));
13774 fclose (f);
13775   ;
13776   return 0;
13777 }
13778 _ACEOF
13779 rm -f conftest$ac_exeext
13780 if { (eval echo "$as_me:13780: \"$ac_link\"") >&5
13781   (eval $ac_link) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13785   { (eval echo "$as_me:13785: \"$ac_try\"") >&5
13786   (eval $ac_try) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit $ac_status); }; }; then
13790   ac_cv_sizeof_signed_char=`cat conftest.val`
13791 else
13792   echo "$as_me: program exited with status $ac_status" >&5
13793 echo "$as_me: failed program was:" >&5
13794 cat conftest.$ac_ext >&5
13795 fi
13796 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13797 fi
13798 fi
13799 rm -f conftest.val
13800 else
13801   ac_cv_sizeof_signed_char=0
13802 fi
13803 fi
13804 echo "$as_me:13804: result: $ac_cv_sizeof_signed_char" >&5
13805 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13806 cat >>confdefs.h <<EOF
13807 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13808 EOF
13809
13810 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13811         NCURSES_SBOOL="signed char"
13812 else
13813         NCURSES_SBOOL="char"
13814 fi
13815 echo "$as_me:13815: checking if you want to use signed Boolean array in term.h" >&5
13816 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13817
13818 # Check whether --enable-signed-char or --disable-signed-char was given.
13819 if test "${enable_signed_char+set}" = set; then
13820   enableval="$enable_signed_char"
13821   with_signed_char=$enableval
13822 else
13823   with_signed_char=no
13824 fi;
13825 echo "$as_me:13825: result: $with_signed_char" >&5
13826 echo "${ECHO_T}$with_signed_char" >&6
13827 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13828
13829 ###   use option --with-tparm-arg to override tparm's argument type
13830 echo "$as_me:13830: checking for type of tparm args" >&5
13831 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13832
13833 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13834 if test "${with_tparm_arg+set}" = set; then
13835   withval="$with_tparm_arg"
13836   NCURSES_TPARM_ARG="$withval"
13837 else
13838   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13839 fi;
13840 echo "$as_me:13840: result: $NCURSES_TPARM_ARG" >&5
13841 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13842
13843 ### Enable compiling-in rcs id's
13844 echo "$as_me:13844: checking if RCS identifiers should be compiled-in" >&5
13845 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13846
13847 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13848 if test "${with_rcs_ids+set}" = set; then
13849   withval="$with_rcs_ids"
13850   with_rcs_ids=$withval
13851 else
13852   with_rcs_ids=no
13853 fi;
13854 echo "$as_me:13854: result: $with_rcs_ids" >&5
13855 echo "${ECHO_T}$with_rcs_ids" >&6
13856 test "x$with_rcs_ids" = xyes &&
13857 cat >>confdefs.h <<\EOF
13858 #define USE_RCS_IDS 1
13859 EOF
13860
13861 ###############################################################################
13862
13863 echo "$as_me:13863: checking format of man-pages" >&5
13864 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13865
13866 # Check whether --with-manpage-format or --without-manpage-format was given.
13867 if test "${with_manpage_format+set}" = set; then
13868   withval="$with_manpage_format"
13869   MANPAGE_FORMAT=$withval
13870 else
13871   MANPAGE_FORMAT=unknown
13872 fi;
13873
13874 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13875 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13876
13877 cf_unknown=
13878
13879 case $MANPAGE_FORMAT in
13880 (unknown)
13881         if test -z "$MANPATH" ; then
13882                 MANPATH="/usr/man:/usr/share/man"
13883         fi
13884
13885         # look for the 'date' man-page (it's most likely to be installed!)
13886         MANPAGE_FORMAT=
13887         cf_preform=no
13888         cf_catonly=yes
13889         cf_example=date
13890
13891         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13892         for cf_dir in $MANPATH; do
13893                 test -z "$cf_dir" && cf_dir=/usr/man
13894                 for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
13895                 do
13896                         cf_test=`echo $cf_name | sed -e 's/*//'`
13897                         if test "x$cf_test" = "x$cf_name" ; then
13898
13899                                 case "$cf_name" in
13900                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13901                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13902                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13903                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13904                                 esac
13905
13906                                 case "$cf_name" in
13907                                 ($cf_dir/man*)
13908                                         cf_catonly=no
13909                                         ;;
13910                                 ($cf_dir/cat*)
13911                                         cf_preform=yes
13912                                         ;;
13913                                 esac
13914                                 break
13915                         fi
13916
13917                         # if we found a match in either man* or cat*, stop looking
13918                         if test -n "$MANPAGE_FORMAT" ; then
13919                                 cf_found=no
13920                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13921                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13922                                 case "$cf_name" in
13923                                 ($cf_dir/cat*)
13924                                         cf_found=yes
13925                                         ;;
13926                                 esac
13927                                 test $cf_found=yes && break
13928                         fi
13929                 done
13930                 # only check the first directory in $MANPATH where we find manpages
13931                 if test -n "$MANPAGE_FORMAT" ; then
13932                         break
13933                 fi
13934         done
13935         # if we did not find the example, just assume it is normal
13936         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13937         IFS="$ac_save_ifs"
13938         ;;
13939 (*)
13940         for cf_option in $MANPAGE_FORMAT; do
13941         case $cf_option in
13942         (gzip|compress|BSDI|normal|formatted|catonly)
13943                 ;;
13944         (*)
13945                 cf_unknown="$cf_unknown $cf_option"
13946                 ;;
13947         esac
13948         done
13949         ;;
13950 esac
13951
13952 echo "$as_me:13952: result: $MANPAGE_FORMAT" >&5
13953 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13954 if test -n "$cf_unknown" ; then
13955         { echo "$as_me:13955: WARNING: Unexpected manpage-format $cf_unknown" >&5
13956 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13957 fi
13958
13959 echo "$as_me:13959: checking for manpage renaming" >&5
13960 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13961
13962 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13963 if test "${with_manpage_renames+set}" = set; then
13964   withval="$with_manpage_renames"
13965   MANPAGE_RENAMES=$withval
13966 else
13967   MANPAGE_RENAMES=yes
13968 fi;
13969
13970 case ".$MANPAGE_RENAMES" in
13971 (.no)
13972         ;;
13973 (.|.yes)
13974         # Debian 'man' program?
13975         if test -f /etc/debian_version ; then
13976                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13977         else
13978                 MANPAGE_RENAMES=no
13979         fi
13980         ;;
13981 esac
13982
13983 if test "$MANPAGE_RENAMES" != no ; then
13984         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13985                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13986         elif test ! -f $MANPAGE_RENAMES ; then
13987                 { { echo "$as_me:13987: error: not a filename: $MANPAGE_RENAMES" >&5
13988 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13989    { (exit 1); exit 1; }; }
13990         fi
13991
13992         test ! -d man && mkdir man
13993
13994         # Construct a sed-script to perform renaming within man-pages
13995         if test -n "$MANPAGE_RENAMES" ; then
13996                 test ! -d man && mkdir man
13997                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13998         fi
13999 fi
14000
14001 echo "$as_me:14001: result: $MANPAGE_RENAMES" >&5
14002 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14003
14004 echo "$as_me:14004: checking if manpage aliases will be installed" >&5
14005 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14006
14007 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14008 if test "${with_manpage_aliases+set}" = set; then
14009   withval="$with_manpage_aliases"
14010   MANPAGE_ALIASES=$withval
14011 else
14012   MANPAGE_ALIASES=yes
14013 fi;
14014
14015 echo "$as_me:14015: result: $MANPAGE_ALIASES" >&5
14016 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14017
14018 case "x$LN_S" in
14019 (xln*)
14020         cf_use_symlinks=yes
14021         ;;
14022 (*)
14023         cf_use_symlinks=no
14024         ;;
14025 esac
14026
14027 MANPAGE_SYMLINKS=no
14028 if test "$MANPAGE_ALIASES" = yes ; then
14029 echo "$as_me:14029: checking if manpage symlinks should be used" >&5
14030 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14031
14032 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14033 if test "${with_manpage_symlinks+set}" = set; then
14034   withval="$with_manpage_symlinks"
14035   MANPAGE_SYMLINKS=$withval
14036 else
14037   MANPAGE_SYMLINKS=$cf_use_symlinks
14038 fi;
14039
14040 if test "$$cf_use_symlinks" = no; then
14041 if test "$MANPAGE_SYMLINKS" = yes ; then
14042         { echo "$as_me:14042: WARNING: cannot make symlinks" >&5
14043 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14044         MANPAGE_SYMLINKS=no
14045 fi
14046 fi
14047
14048 echo "$as_me:14048: result: $MANPAGE_SYMLINKS" >&5
14049 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14050 fi
14051
14052 echo "$as_me:14052: checking for manpage tbl" >&5
14053 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14054
14055 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14056 if test "${with_manpage_tbl+set}" = set; then
14057   withval="$with_manpage_tbl"
14058   MANPAGE_TBL=$withval
14059 else
14060   MANPAGE_TBL=no
14061 fi;
14062
14063 echo "$as_me:14063: result: $MANPAGE_TBL" >&5
14064 echo "${ECHO_T}$MANPAGE_TBL" >&6
14065
14066 if test "$prefix" = "NONE" ; then
14067         cf_prefix="$ac_default_prefix"
14068 else
14069         cf_prefix="$prefix"
14070 fi
14071
14072 case "$MANPAGE_FORMAT" in
14073 (*catonly*)
14074         cf_format=yes
14075         cf_inboth=no
14076         ;;
14077 (*formatted*)
14078         cf_format=yes
14079         cf_inboth=yes
14080         ;;
14081 (*)
14082         cf_format=no
14083         cf_inboth=no
14084         ;;
14085 esac
14086
14087 test ! -d man && mkdir man
14088
14089 cf_so_strip=
14090 cf_compress=
14091 case "$MANPAGE_FORMAT" in
14092 (*compress*)
14093         cf_so_strip="Z"
14094         cf_compress=compress
14095         ;;
14096 (*gzip*)
14097         cf_so_strip="gz"
14098         cf_compress=gzip
14099         ;;
14100 esac
14101
14102 cf_edit_man=./edit_man.sh
14103 cf_man_alias=`pwd`/man_alias.sed
14104
14105 cat >$cf_edit_man <<CF_EOF
14106 #! $SHELL
14107 # this script is generated by the configure-script CF_MAN_PAGES macro.
14108
14109 prefix="$cf_prefix"
14110 datarootdir="$datarootdir"
14111 datadir="$datadir"
14112
14113 NCURSES_MAJOR="$NCURSES_MAJOR"
14114 NCURSES_MINOR="$NCURSES_MINOR"
14115 NCURSES_PATCH="$NCURSES_PATCH"
14116
14117 NCURSES_OSPEED="$NCURSES_OSPEED"
14118 TERMINFO="$TERMINFO"
14119
14120 INSTALL="$INSTALL"
14121 INSTALL_DATA="$INSTALL_DATA"
14122
14123 transform="$program_transform_name"
14124
14125 TMP=\${TMPDIR:=/tmp}/man\$\$
14126 trap "rm -f \$TMP" 0 1 2 3 15
14127
14128 form=\$1
14129 shift || exit 1
14130
14131 verb=\$1
14132 shift || exit 1
14133
14134 mandir=\$1
14135 shift || exit 1
14136
14137 srcdir=\$1
14138 top_srcdir=\$srcdir/..
14139 shift || exit 1
14140
14141 if test "\$form" = normal ; then
14142         if test "$cf_format" = yes ; then
14143         if test "$cf_inboth" = no ; then
14144                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14145                 exit $?
14146         fi
14147         fi
14148         cf_subdir=\$mandir/man
14149         cf_tables=$MANPAGE_TBL
14150 else
14151         cf_subdir=\$mandir/cat
14152         cf_tables=yes
14153 fi
14154
14155 # process the list of source-files
14156 for i in \$* ; do
14157 case \$i in
14158 (*.orig|*.rej) ;;
14159 (*.[0-9]*)
14160         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14161         if test \$verb = installing ; then
14162         if test ! -d \$cf_subdir\${section} ; then
14163                 mkdir -p \$cf_subdir\$section
14164         fi
14165         fi
14166
14167         # replace variables in man page
14168         if test ! -f $cf_man_alias ; then
14169 cat >>$cf_man_alias <<-CF_EOF2
14170                 s,@DATADIR@,\$datadir,g
14171                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14172                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14173                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14174                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14175                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14176                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14177 CF_EOF
14178
14179         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14180         do
14181                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14182                 cf_name=`echo $cf_name|sed "$program_transform_name"`
14183 cat >>$cf_edit_man <<-CF_EOF
14184                 s,@$cf_NAME@,$cf_name,g
14185 CF_EOF
14186         done
14187
14188 cat >>$cf_edit_man <<CF_EOF
14189 CF_EOF2
14190                 echo "...made $cf_man_alias"
14191         fi
14192
14193         aliases=
14194         cf_source=\`basename \$i\`
14195         inalias=\$cf_source
14196         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
14197         if test ! -f \$inalias ; then
14198                 echo .. skipped \$cf_source
14199                 continue
14200         fi
14201 CF_EOF
14202
14203 if test "$MANPAGE_ALIASES" != no ; then
14204 cat >>$cf_edit_man <<CF_EOF
14205         nCurses=ignore.3x
14206         test $with_curses_h = yes && nCurses=ncurses.3x
14207         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
14208 CF_EOF
14209 fi
14210
14211 if test "$MANPAGE_RENAMES" = no ; then
14212 cat >>$cf_edit_man <<CF_EOF
14213         # perform program transformations for section 1 man pages
14214         if test \$section = 1 ; then
14215                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14216         else
14217                 cf_target=\$cf_subdir\${section}/\$cf_source
14218         fi
14219 CF_EOF
14220 else
14221 cat >>$cf_edit_man <<CF_EOF
14222         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14223         if test -z "\$cf_target" ; then
14224                 echo '? missing rename for '\$cf_source
14225                 cf_target="\$cf_source"
14226         fi
14227         cf_target="\$cf_subdir\${section}/\${cf_target}"
14228
14229 CF_EOF
14230 fi
14231
14232 cat >>$cf_edit_man <<CF_EOF
14233         sed     -f $cf_man_alias \\
14234 CF_EOF
14235
14236 if test -f $MANPAGE_RENAMES ; then
14237 cat >>$cf_edit_man <<CF_EOF
14238                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
14239 CF_EOF
14240 else
14241 cat >>$cf_edit_man <<CF_EOF
14242                 < \$i >\$TMP
14243 CF_EOF
14244 fi
14245
14246 cat >>$cf_edit_man <<CF_EOF
14247 if test \$cf_tables = yes ; then
14248         tbl \$TMP >\$TMP.out
14249         mv \$TMP.out \$TMP
14250 fi
14251 CF_EOF
14252
14253 if test $with_overwrite != yes ; then
14254 cat >>$cf_edit_man <<CF_EOF
14255         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14256         mv \$TMP.out \$TMP
14257 CF_EOF
14258 fi
14259
14260 if test $with_curses_h != yes ; then
14261 cat >>$cf_edit_man <<CF_EOF
14262         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14263         mv \$TMP.out \$TMP
14264 CF_EOF
14265 fi
14266
14267 cat >>$cf_edit_man <<CF_EOF
14268         if test \$form = format ; then
14269                 nroff -man \$TMP >\$TMP.out
14270                 mv \$TMP.out \$TMP
14271         fi
14272 CF_EOF
14273
14274 if test -n "$cf_compress" ; then
14275 cat >>$cf_edit_man <<CF_EOF
14276         if test \$verb = installing ; then
14277         if ( $cf_compress -f \$TMP )
14278         then
14279                 mv \$TMP.$cf_so_strip \$TMP
14280         fi
14281         fi
14282         cf_target="\$cf_target.$cf_so_strip"
14283 CF_EOF
14284 fi
14285
14286 case "$MANPAGE_FORMAT" in
14287 (*BSDI*)
14288 cat >>$cf_edit_man <<CF_EOF
14289         if test \$form = format ; then
14290                 # BSDI installs only .0 suffixes in the cat directories
14291                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
14292         fi
14293 CF_EOF
14294   ;;
14295 esac
14296
14297 cat >>$cf_edit_man <<CF_EOF
14298         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
14299         if test \$verb = installing ; then
14300                 echo \$verb \$cf_target
14301                 \$INSTALL_DATA \$TMP \$cf_target
14302                 test -d \$cf_subdir\${section} &&
14303                 test -n "\$aliases" && (
14304                         cd \$cf_subdir\${section} && (
14305                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
14306                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
14307                                 cf_target=\`basename \$cf_target\`
14308                                 for cf_alias in \$aliases
14309                                 do
14310                                         if test \$section = 1 ; then
14311                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14312                                         fi
14313
14314                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14315                                                 if test -f \$cf_alias\${suffix} ; then
14316                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
14317                                                         then
14318                                                                 continue
14319                                                         fi
14320                                                 fi
14321                                                 echo .. \$verb alias \$cf_alias\${suffix}
14322 CF_EOF
14323 case "x$LN_S" in
14324 (*-f)
14325 cat >>$cf_edit_man <<CF_EOF
14326                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14327 CF_EOF
14328         ;;
14329 (*)
14330 cat >>$cf_edit_man <<CF_EOF
14331                                                 rm -f \$cf_alias\${suffix}
14332                                                 $LN_S \$cf_target \$cf_alias\${suffix}
14333 CF_EOF
14334         ;;
14335 esac
14336 cat >>$cf_edit_man <<CF_EOF
14337                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14338                                                 echo ".so \$cf_source" >\$TMP
14339 CF_EOF
14340 if test -n "$cf_compress" ; then
14341 cat >>$cf_edit_man <<CF_EOF
14342                                                 if test -n "$cf_so_strip" ; then
14343                                                         $cf_compress -f \$TMP
14344                                                         mv \$TMP.$cf_so_strip \$TMP
14345                                                 fi
14346 CF_EOF
14347 fi
14348 cat >>$cf_edit_man <<CF_EOF
14349                                                 echo .. \$verb alias \$cf_alias\${suffix}
14350                                                 rm -f \$cf_alias\${suffix}
14351                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
14352                                         fi
14353                                 done
14354                         )
14355                 )
14356         elif test \$verb = removing ; then
14357                 test -f \$cf_target && (
14358                         echo \$verb \$cf_target
14359                         rm -f \$cf_target
14360                 )
14361                 test -d \$cf_subdir\${section} &&
14362                 test -n "\$aliases" && (
14363                         cd \$cf_subdir\${section} && (
14364                                 for cf_alias in \$aliases
14365                                 do
14366                                         if test \$section = 1 ; then
14367                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
14368                                         fi
14369
14370                                         echo .. \$verb alias \$cf_alias\${suffix}
14371                                         rm -f \$cf_alias\${suffix}
14372                                 done
14373                         )
14374                 )
14375         else
14376 #               echo ".hy 0"
14377                 cat \$TMP
14378         fi
14379         ;;
14380 esac
14381 done
14382
14383 if test $cf_inboth = yes ; then
14384 if test \$form != format ; then
14385         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
14386 fi
14387 fi
14388
14389 exit 0
14390 CF_EOF
14391 chmod 755 $cf_edit_man
14392
14393 ###############################################################################
14394
14395 ### Note that some functions (such as const) are normally disabled anyway.
14396 echo "$as_me:14396: checking if you want to build with function extensions" >&5
14397 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
14398
14399 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
14400 if test "${enable_ext_funcs+set}" = set; then
14401   enableval="$enable_ext_funcs"
14402   with_ext_funcs=$enableval
14403 else
14404   with_ext_funcs=yes
14405 fi;
14406 echo "$as_me:14406: result: $with_ext_funcs" >&5
14407 echo "${ECHO_T}$with_ext_funcs" >&6
14408 if test "x$with_ext_funcs" = xyes ; then
14409         NCURSES_EXT_FUNCS=1
14410
14411 cat >>confdefs.h <<\EOF
14412 #define NCURSES_EXT_FUNCS 1
14413 EOF
14414
14415 cat >>confdefs.h <<\EOF
14416 #define HAVE_ASSUME_DEFAULT_COLORS 1
14417 EOF
14418
14419 cat >>confdefs.h <<\EOF
14420 #define HAVE_CURSES_VERSION 1
14421 EOF
14422
14423 cat >>confdefs.h <<\EOF
14424 #define HAVE_HAS_KEY 1
14425 EOF
14426
14427 cat >>confdefs.h <<\EOF
14428 #define HAVE_RESIZETERM 1
14429 EOF
14430
14431 cat >>confdefs.h <<\EOF
14432 #define HAVE_RESIZE_TERM 1
14433 EOF
14434
14435 cat >>confdefs.h <<\EOF
14436 #define HAVE_TERM_ENTRY_H 1
14437 EOF
14438
14439 cat >>confdefs.h <<\EOF
14440 #define HAVE_USE_DEFAULT_COLORS 1
14441 EOF
14442
14443 cat >>confdefs.h <<\EOF
14444 #define HAVE_USE_EXTENDED_NAMES 1
14445 EOF
14446
14447 cat >>confdefs.h <<\EOF
14448 #define HAVE_USE_SCREEN 1
14449 EOF
14450
14451 cat >>confdefs.h <<\EOF
14452 #define HAVE_USE_WINDOW 1
14453 EOF
14454
14455 cat >>confdefs.h <<\EOF
14456 #define HAVE_WRESIZE 1
14457 EOF
14458
14459         GENERATED_EXT_FUNCS=generated
14460         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
14461 else
14462         NCURSES_EXT_FUNCS=0
14463         GENERATED_EXT_FUNCS=
14464 fi
14465
14466 echo "$as_me:14466: checking if you want to build with SCREEN extensions" >&5
14467 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
14468
14469 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
14470 if test "${enable_sp_funcs+set}" = set; then
14471   enableval="$enable_sp_funcs"
14472   with_sp_funcs=$enableval
14473 else
14474   with_sp_funcs=$cf_dft_ext_spfuncs
14475 fi;
14476 echo "$as_me:14476: result: $with_sp_funcs" >&5
14477 echo "${ECHO_T}$with_sp_funcs" >&6
14478 if test "x$with_sp_funcs" = xyes ; then
14479         NCURSES_SP_FUNCS=1
14480
14481 cat >>confdefs.h <<\EOF
14482 #define NCURSES_SP_FUNCS 1
14483 EOF
14484
14485 cat >>confdefs.h <<\EOF
14486 #define HAVE_TPUTS_SP 1
14487 EOF
14488
14489         GENERATED_SP_FUNCS=generated
14490 else
14491         NCURSES_SP_FUNCS=0
14492         GENERATED_SP_FUNCS=
14493 fi
14494
14495 echo "$as_me:14495: checking if you want to build with terminal-driver" >&5
14496 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
14497
14498 # Check whether --enable-term-driver or --disable-term-driver was given.
14499 if test "${enable_term_driver+set}" = set; then
14500   enableval="$enable_term_driver"
14501   with_term_driver=$enableval
14502 else
14503   with_term_driver=no
14504 fi;
14505 echo "$as_me:14505: result: $with_term_driver" >&5
14506 echo "${ECHO_T}$with_term_driver" >&6
14507 if test "x$with_term_driver" = xyes ; then
14508
14509 cat >>confdefs.h <<\EOF
14510 #define USE_TERM_DRIVER 1
14511 EOF
14512
14513         if test "x$with_termlib" != xno ; then
14514                 { { echo "$as_me:14514: error: The term-driver option conflicts with the termlib option" >&5
14515 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
14516    { (exit 1); exit 1; }; }
14517         fi
14518         if test "x$with_sp_funcs" != xyes ; then
14519                 { { echo "$as_me:14519: error: The term-driver option relies upon sp-funcs" >&5
14520 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
14521    { (exit 1); exit 1; }; }
14522         fi
14523 fi
14524
14525 ###   use option --enable-const to turn on use of const beyond that in XSI.
14526 echo "$as_me:14526: checking for extended use of const keyword" >&5
14527 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
14528
14529 # Check whether --enable-const or --disable-const was given.
14530 if test "${enable_const+set}" = set; then
14531   enableval="$enable_const"
14532   with_ext_const=$enableval
14533 else
14534   with_ext_const=$cf_dft_ext_const
14535 fi;
14536 echo "$as_me:14536: result: $with_ext_const" >&5
14537 echo "${ECHO_T}$with_ext_const" >&6
14538 NCURSES_CONST='/*nothing*/'
14539 if test "x$with_ext_const" = xyes ; then
14540         NCURSES_CONST=const
14541 fi
14542
14543 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
14544 echo "$as_me:14544: checking if you want to use extended colors" >&5
14545 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
14546
14547 # Check whether --enable-ext-colors or --disable-ext-colors was given.
14548 if test "${enable_ext_colors+set}" = set; then
14549   enableval="$enable_ext_colors"
14550   with_ext_colors=$enableval
14551 else
14552   with_ext_colors=$cf_dft_ext_colors
14553 fi;
14554 echo "$as_me:14554: result: $with_ext_colors" >&5
14555 echo "${ECHO_T}$with_ext_colors" >&6
14556 NCURSES_EXT_COLORS=0
14557 if test "x$with_ext_colors" = xyes ; then
14558         if test "x$with_widec" != xyes ; then
14559                 { echo "$as_me:14559: WARNING: This option applies only to wide-character library" >&5
14560 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
14561         else
14562                 # cannot be ABI 5 since it changes sizeof(cchar_t)
14563
14564 if test "${with_abi_version+set}" != set; then
14565         case $cf_cv_rel_version in
14566         (5.*)
14567                 cf_cv_rel_version=6.0
14568                 cf_cv_abi_version=6
14569                 { echo "$as_me:14569: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14570 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14571                 ;;
14572         esac
14573 fi
14574
14575                 NCURSES_EXT_COLORS=1
14576
14577 cat >>confdefs.h <<\EOF
14578 #define NCURSES_EXT_COLORS 1
14579 EOF
14580
14581 cat >>confdefs.h <<\EOF
14582 #define HAVE_ALLOC_PAIR 1
14583 EOF
14584
14585 cat >>confdefs.h <<\EOF
14586 #define HAVE_INIT_EXTENDED_COLOR 1
14587 EOF
14588
14589 cat >>confdefs.h <<\EOF
14590 #define HAVE_RESET_COLOR_PAIRS 1
14591 EOF
14592
14593         fi
14594 fi
14595
14596 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
14597 echo "$as_me:14597: checking if you want to use extended mouse encoding" >&5
14598 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
14599
14600 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
14601 if test "${enable_ext_mouse+set}" = set; then
14602   enableval="$enable_ext_mouse"
14603   with_ext_mouse=$enableval
14604 else
14605   with_ext_mouse=$cf_dft_ext_mouse
14606 fi;
14607 echo "$as_me:14607: result: $with_ext_mouse" >&5
14608 echo "${ECHO_T}$with_ext_mouse" >&6
14609 NCURSES_MOUSE_VERSION=1
14610 if test "x$with_ext_mouse" = xyes ; then
14611         NCURSES_MOUSE_VERSION=2
14612
14613 if test "${with_abi_version+set}" != set; then
14614         case $cf_cv_rel_version in
14615         (5.*)
14616                 cf_cv_rel_version=6.0
14617                 cf_cv_abi_version=6
14618                 { echo "$as_me:14618: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14619 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14620                 ;;
14621         esac
14622 fi
14623
14624 fi
14625
14626 ###   use option --enable-ext-putwin to turn on extended screendumps
14627 echo "$as_me:14627: checking if you want to use extended putwin/screendump" >&5
14628 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
14629
14630 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
14631 if test "${enable_ext_putwin+set}" = set; then
14632   enableval="$enable_ext_putwin"
14633   with_ext_putwin=$enableval
14634 else
14635   with_ext_putwin=$cf_dft_ext_putwin
14636 fi;
14637 echo "$as_me:14637: result: $with_ext_putwin" >&5
14638 echo "${ECHO_T}$with_ext_putwin" >&6
14639 if test "x$with_ext_putwin" = xyes ; then
14640
14641 cat >>confdefs.h <<\EOF
14642 #define NCURSES_EXT_PUTWIN 1
14643 EOF
14644
14645 fi
14646
14647 echo "$as_me:14647: checking if you want \$NCURSES_NO_PADDING code" >&5
14648 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14649
14650 # Check whether --enable-no-padding or --disable-no-padding was given.
14651 if test "${enable_no_padding+set}" = set; then
14652   enableval="$enable_no_padding"
14653   with_no_padding=$enableval
14654 else
14655   with_no_padding=$with_ext_funcs
14656 fi;
14657 echo "$as_me:14657: result: $with_no_padding" >&5
14658 echo "${ECHO_T}$with_no_padding" >&6
14659 test "x$with_no_padding" = xyes &&
14660 cat >>confdefs.h <<\EOF
14661 #define NCURSES_NO_PADDING 1
14662 EOF
14663
14664 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14665 echo "$as_me:14665: checking if you want SIGWINCH handler" >&5
14666 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14667
14668 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14669 if test "${enable_sigwinch+set}" = set; then
14670   enableval="$enable_sigwinch"
14671   with_sigwinch=$enableval
14672 else
14673   with_sigwinch=$with_ext_funcs
14674 fi;
14675 echo "$as_me:14675: result: $with_sigwinch" >&5
14676 echo "${ECHO_T}$with_sigwinch" >&6
14677 test "x$with_sigwinch" = xyes &&
14678 cat >>confdefs.h <<\EOF
14679 #define USE_SIGWINCH 1
14680 EOF
14681
14682 ###   use option --enable-tcap-names to allow user to define new capabilities
14683 echo "$as_me:14683: checking if you want user-definable terminal capabilities like termcap" >&5
14684 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14685
14686 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14687 if test "${enable_tcap_names+set}" = set; then
14688   enableval="$enable_tcap_names"
14689   with_tcap_names=$enableval
14690 else
14691   with_tcap_names=$with_ext_funcs
14692 fi;
14693 echo "$as_me:14693: result: $with_tcap_names" >&5
14694 echo "${ECHO_T}$with_tcap_names" >&6
14695 NCURSES_XNAMES=0
14696 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14697
14698 ##############################################################################
14699
14700 echo "$as_me:14700: checking if you want to link with the pthread library" >&5
14701 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14702
14703 # Check whether --with-pthread or --without-pthread was given.
14704 if test "${with_pthread+set}" = set; then
14705   withval="$with_pthread"
14706   with_pthread=$withval
14707 else
14708   with_pthread=no
14709 fi;
14710 echo "$as_me:14710: result: $with_pthread" >&5
14711 echo "${ECHO_T}$with_pthread" >&6
14712
14713 if test "$with_pthread" != no ; then
14714         echo "$as_me:14714: checking for pthread.h" >&5
14715 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14716 if test "${ac_cv_header_pthread_h+set}" = set; then
14717   echo $ECHO_N "(cached) $ECHO_C" >&6
14718 else
14719   cat >conftest.$ac_ext <<_ACEOF
14720 #line 14720 "configure"
14721 #include "confdefs.h"
14722 #include <pthread.h>
14723 _ACEOF
14724 if { (eval echo "$as_me:14724: \"$ac_cpp conftest.$ac_ext\"") >&5
14725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14726   ac_status=$?
14727   egrep -v '^ *\+' conftest.er1 >conftest.err
14728   rm -f conftest.er1
14729   cat conftest.err >&5
14730   echo "$as_me:14730: \$? = $ac_status" >&5
14731   (exit $ac_status); } >/dev/null; then
14732   if test -s conftest.err; then
14733     ac_cpp_err=$ac_c_preproc_warn_flag
14734   else
14735     ac_cpp_err=
14736   fi
14737 else
14738   ac_cpp_err=yes
14739 fi
14740 if test -z "$ac_cpp_err"; then
14741   ac_cv_header_pthread_h=yes
14742 else
14743   echo "$as_me: failed program was:" >&5
14744   cat conftest.$ac_ext >&5
14745   ac_cv_header_pthread_h=no
14746 fi
14747 rm -f conftest.err conftest.$ac_ext
14748 fi
14749 echo "$as_me:14749: result: $ac_cv_header_pthread_h" >&5
14750 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14751 if test $ac_cv_header_pthread_h = yes; then
14752
14753 cat >>confdefs.h <<\EOF
14754 #define HAVE_PTHREADS_H 1
14755 EOF
14756
14757         for cf_lib_pthread in pthread c_r
14758         do
14759             echo "$as_me:14759: checking if we can link with the $cf_lib_pthread library" >&5
14760 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14761             cf_save_LIBS="$LIBS"
14762
14763 cf_add_libs="$LIBS"
14764 # reverse order
14765 cf_add_0lib=
14766 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14767 # filter duplicates
14768 for cf_add_1lib in $cf_add_0lib; do
14769         for cf_add_2lib in $cf_add_libs; do
14770                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14771                         cf_add_1lib=
14772                         break
14773                 fi
14774         done
14775         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14776 done
14777 LIBS="$cf_add_libs"
14778
14779             cat >conftest.$ac_ext <<_ACEOF
14780 #line 14780 "configure"
14781 #include "confdefs.h"
14782
14783 #include <pthread.h>
14784
14785 int
14786 main (void)
14787 {
14788
14789                 int rc = pthread_create(0,0,0,0);
14790                 int r2 = pthread_mutexattr_settype(0, 0);
14791
14792   ;
14793   return 0;
14794 }
14795 _ACEOF
14796 rm -f conftest.$ac_objext conftest$ac_exeext
14797 if { (eval echo "$as_me:14797: \"$ac_link\"") >&5
14798   (eval $ac_link) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit $ac_status); } &&
14802          { ac_try='test -s conftest$ac_exeext'
14803   { (eval echo "$as_me:14803: \"$ac_try\"") >&5
14804   (eval $ac_try) 2>&5
14805   ac_status=$?
14806   echo "$as_me:14806: \$? = $ac_status" >&5
14807   (exit $ac_status); }; }; then
14808   with_pthread=yes
14809 else
14810   echo "$as_me: failed program was:" >&5
14811 cat conftest.$ac_ext >&5
14812 with_pthread=no
14813 fi
14814 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14815             LIBS="$cf_save_LIBS"
14816             echo "$as_me:14816: result: $with_pthread" >&5
14817 echo "${ECHO_T}$with_pthread" >&6
14818             test "$with_pthread" = yes && break
14819         done
14820
14821         if test "$with_pthread" = yes ; then
14822
14823 cf_add_libs="$LIBS"
14824 # reverse order
14825 cf_add_0lib=
14826 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14827 # filter duplicates
14828 for cf_add_1lib in $cf_add_0lib; do
14829         for cf_add_2lib in $cf_add_libs; do
14830                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14831                         cf_add_1lib=
14832                         break
14833                 fi
14834         done
14835         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14836 done
14837 LIBS="$cf_add_libs"
14838
14839 cat >>confdefs.h <<\EOF
14840 #define HAVE_LIBPTHREADS 1
14841 EOF
14842
14843         else
14844             { { echo "$as_me:14844: error: Cannot link with pthread library" >&5
14845 echo "$as_me: error: Cannot link with pthread library" >&2;}
14846    { (exit 1); exit 1; }; }
14847         fi
14848
14849 fi
14850
14851 fi
14852
14853 if test "x$with_pthread" != xno; then
14854         echo "$as_me:14854: checking for pthread_kill" >&5
14855 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14856 if test "${ac_cv_func_pthread_kill+set}" = set; then
14857   echo $ECHO_N "(cached) $ECHO_C" >&6
14858 else
14859   cat >conftest.$ac_ext <<_ACEOF
14860 #line 14860 "configure"
14861 #include "confdefs.h"
14862 #define pthread_kill autoconf_temporary
14863 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14864 #undef pthread_kill
14865
14866 #ifdef __cplusplus
14867 extern "C"
14868 #endif
14869
14870 /* We use char because int might match the return type of a gcc2
14871    builtin and then its argument prototype would still apply.  */
14872 char pthread_kill (void);
14873
14874 int
14875 main (void)
14876 {
14877
14878 /* The GNU C library defines stubs for functions which it implements
14879     to always fail with ENOSYS.  Some functions are actually named
14880     something starting with __ and the normal name is an alias.  */
14881 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14882 #error found stub for pthread_kill
14883 #endif
14884
14885         return pthread_kill ();
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 rm -f conftest.$ac_objext conftest$ac_exeext
14891 if { (eval echo "$as_me:14891: \"$ac_link\"") >&5
14892   (eval $ac_link) 2>&5
14893   ac_status=$?
14894   echo "$as_me:14894: \$? = $ac_status" >&5
14895   (exit $ac_status); } &&
14896          { ac_try='test -s conftest$ac_exeext'
14897   { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898   (eval $ac_try) 2>&5
14899   ac_status=$?
14900   echo "$as_me:14900: \$? = $ac_status" >&5
14901   (exit $ac_status); }; }; then
14902   ac_cv_func_pthread_kill=yes
14903 else
14904   echo "$as_me: failed program was:" >&5
14905 cat conftest.$ac_ext >&5
14906 ac_cv_func_pthread_kill=no
14907 fi
14908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14909 fi
14910 echo "$as_me:14910: result: $ac_cv_func_pthread_kill" >&5
14911 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14912 if test $ac_cv_func_pthread_kill = yes; then
14913
14914                 echo "$as_me:14914: checking if you want to allow EINTR in wgetch with pthreads" >&5
14915 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14916
14917 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14918 if test "${enable_pthreads_eintr+set}" = set; then
14919   enableval="$enable_pthreads_eintr"
14920   use_pthreads_eintr=$enableval
14921 else
14922   use_pthreads_eintr=no
14923 fi;
14924                 echo "$as_me:14924: result: $use_pthreads_eintr" >&5
14925 echo "${ECHO_T}$use_pthreads_eintr" >&6
14926                 if test "x$use_pthreads_eintr" = xyes ; then
14927
14928 cat >>confdefs.h <<\EOF
14929 #define USE_PTHREADS_EINTR 1
14930 EOF
14931
14932                 fi
14933 fi
14934
14935         echo "$as_me:14935: checking if you want to use weak-symbols for pthreads" >&5
14936 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14937
14938 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14939 if test "${enable_weak_symbols+set}" = set; then
14940   enableval="$enable_weak_symbols"
14941   use_weak_symbols=$enableval
14942 else
14943   use_weak_symbols=no
14944 fi;
14945         echo "$as_me:14945: result: $use_weak_symbols" >&5
14946 echo "${ECHO_T}$use_weak_symbols" >&6
14947         if test "x$use_weak_symbols" = xyes ; then
14948
14949 echo "$as_me:14949: checking if $CC supports weak symbols" >&5
14950 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14951 if test "${cf_cv_weak_symbols+set}" = set; then
14952   echo $ECHO_N "(cached) $ECHO_C" >&6
14953 else
14954
14955 cat >conftest.$ac_ext <<_ACEOF
14956 #line 14956 "configure"
14957 #include "confdefs.h"
14958
14959 #include <stdio.h>
14960 int
14961 main (void)
14962 {
14963
14964 #if defined(__GNUC__)
14965 #  if defined __USE_ISOC99
14966 #    define _cat_pragma(exp)    _Pragma(#exp)
14967 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14968 #  else
14969 #    define _weak_pragma(exp)
14970 #  endif
14971 #  define _declare(name)        __extension__ extern __typeof__(name) name
14972 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14973 #endif
14974
14975 weak_symbol(fopen);
14976
14977   ;
14978   return 0;
14979 }
14980 _ACEOF
14981 rm -f conftest.$ac_objext
14982 if { (eval echo "$as_me:14982: \"$ac_compile\"") >&5
14983   (eval $ac_compile) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); } &&
14987          { ac_try='test -s conftest.$ac_objext'
14988   { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989   (eval $ac_try) 2>&5
14990   ac_status=$?
14991   echo "$as_me:14991: \$? = $ac_status" >&5
14992   (exit $ac_status); }; }; then
14993   cf_cv_weak_symbols=yes
14994 else
14995   echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 cf_cv_weak_symbols=no
14998 fi
14999 rm -f conftest.$ac_objext conftest.$ac_ext
15000
15001 fi
15002 echo "$as_me:15002: result: $cf_cv_weak_symbols" >&5
15003 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15004
15005         else
15006                 cf_cv_weak_symbols=no
15007         fi
15008
15009         if test "x$cf_cv_weak_symbols" = xyes ; then
15010
15011 cat >>confdefs.h <<\EOF
15012 #define USE_WEAK_SYMBOLS 1
15013 EOF
15014
15015         fi
15016 fi
15017
15018 PTHREAD=
15019 if test "x$with_pthread" = "xyes" ; then
15020
15021 cat >>confdefs.h <<\EOF
15022 #define USE_PTHREADS 1
15023 EOF
15024
15025         enable_reentrant=yes
15026         if test "x$cf_cv_weak_symbols" = xyes ; then
15027                 PTHREAD=-lpthread
15028
15029 cf_add_libs="$PRIVATE_LIBS"
15030 # reverse order
15031 cf_add_0lib=
15032 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15033 # filter duplicates
15034 for cf_add_1lib in $cf_add_0lib; do
15035         for cf_add_2lib in $cf_add_libs; do
15036                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15037                         cf_add_1lib=
15038                         break
15039                 fi
15040         done
15041         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15042 done
15043 PRIVATE_LIBS="$cf_add_libs"
15044
15045         fi
15046 fi
15047
15048 # Reentrant code has to be opaque; there's little advantage to making ncurses
15049 # opaque outside of that, so there is no --enable-opaque option.  We can use
15050 # this option without --with-pthreads, but this will be always set for
15051 # pthreads.
15052 echo "$as_me:15052: checking if you want reentrant code" >&5
15053 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15054
15055 # Check whether --enable-reentrant or --disable-reentrant was given.
15056 if test "${enable_reentrant+set}" = set; then
15057   enableval="$enable_reentrant"
15058   with_reentrant=$enableval
15059 else
15060   with_reentrant=no
15061 fi;
15062 echo "$as_me:15062: result: $with_reentrant" >&5
15063 echo "${ECHO_T}$with_reentrant" >&6
15064 if test "x$with_reentrant" = xyes ; then
15065         cf_cv_enable_reentrant=1
15066         cf_cv_enable_opaque="NCURSES_INTERNALS"
15067         NCURSES_SIZE_T=int
15068         if test "x$cf_cv_weak_symbols" = xyes ; then
15069
15070 # remove pthread library from $LIBS
15071 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15072
15073 cf_add_libs="$TEST_LIBS"
15074 # reverse order
15075 cf_add_0lib=
15076 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15077 # filter duplicates
15078 for cf_add_1lib in $cf_add_0lib; do
15079         for cf_add_2lib in $cf_add_libs; do
15080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15081                         cf_add_1lib=
15082                         break
15083                 fi
15084         done
15085         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15086 done
15087 TEST_LIBS="$cf_add_libs"
15088
15089 cf_add_libs="$TEST_LIBS2"
15090 # reverse order
15091 cf_add_0lib=
15092 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15093 # filter duplicates
15094 for cf_add_1lib in $cf_add_0lib; do
15095         for cf_add_2lib in $cf_add_libs; do
15096                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15097                         cf_add_1lib=
15098                         break
15099                 fi
15100         done
15101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15102 done
15103 TEST_LIBS2="$cf_add_libs"
15104
15105 cf_add_libs="$PRIVATE_LIBS"
15106 # reverse order
15107 cf_add_0lib=
15108 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15109 # filter duplicates
15110 for cf_add_1lib in $cf_add_0lib; do
15111         for cf_add_2lib in $cf_add_libs; do
15112                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15113                         cf_add_1lib=
15114                         break
15115                 fi
15116         done
15117         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15118 done
15119 PRIVATE_LIBS="$cf_add_libs"
15120
15121         else
15122                 # when not using weak symbols but with_reentrant,
15123                 # add 't' to the library suffix on all platforms
15124                 # except cygwin, where we only do that if ALSO
15125                 # compiling with full thread support.
15126                 case "$host" in
15127                 (*cygwin* | *msys*)
15128                         if test "$with_pthread" = "yes" ; then
15129                                 if test "x$disable_lib_suffixes" = "xno" ; then
15130                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15131                                 fi
15132                         fi ;;
15133                 (*)
15134                         if test "x$disable_lib_suffixes" = "xno" ; then
15135                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15136                         fi
15137                         ;;
15138                 esac
15139         fi
15140
15141 cat >>confdefs.h <<\EOF
15142 #define USE_REENTRANT 1
15143 EOF
15144
15145 if test "${with_abi_version+set}" != set; then
15146         case $cf_cv_rel_version in
15147         (5.*)
15148                 cf_cv_rel_version=6.0
15149                 cf_cv_abi_version=6
15150                 { echo "$as_me:15150: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15151 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15152                 ;;
15153         esac
15154 fi
15155
15156 else
15157         cf_cv_enable_reentrant=0
15158         cf_cv_enable_opaque="NCURSES_OPAQUE"
15159         NCURSES_SIZE_T=short
15160 fi
15161
15162 echo "$as_me:15162: checking if you want opaque curses-library structures" >&5
15163 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15164
15165 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15166 if test "${enable_opaque_curses+set}" = set; then
15167   enableval="$enable_opaque_curses"
15168   test "$enableval" != yes && enableval=no
15169         if test "$enableval" != "no" ; then
15170     enable_opaque_curses=yes
15171         else
15172
15173          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15174          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15175
15176         fi
15177 else
15178   enableval=no
15179
15180          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15181          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15182
15183 fi;
15184 echo "$as_me:15184: result: $enable_opaque_curses" >&5
15185 echo "${ECHO_T}$enable_opaque_curses" >&6
15186
15187 test "$cf_cv_enable_reentrant" = 1 && \
15188 test "$enable_opaque_curses" = no && \
15189 { { echo "$as_me:15189: error: reentrant configuration requires opaque library" >&5
15190 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15191    { (exit 1); exit 1; }; }
15192
15193 echo "$as_me:15193: checking if you want opaque form-library structures" >&5
15194 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15195
15196 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15197 if test "${enable_opaque_form+set}" = set; then
15198   enableval="$enable_opaque_form"
15199   enable_opaque_form=yes
15200 else
15201   enable_opaque_form=no
15202 fi;
15203 echo "$as_me:15203: result: $enable_opaque_form" >&5
15204 echo "${ECHO_T}$enable_opaque_form" >&6
15205
15206 echo "$as_me:15206: checking if you want opaque menu-library structures" >&5
15207 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15208
15209 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15210 if test "${enable_opaque_menu+set}" = set; then
15211   enableval="$enable_opaque_menu"
15212   enable_opaque_menu=yes
15213 else
15214   enable_opaque_menu=no
15215 fi;
15216 echo "$as_me:15216: result: $enable_opaque_menu" >&5
15217 echo "${ECHO_T}$enable_opaque_menu" >&6
15218
15219 echo "$as_me:15219: checking if you want opaque panel-library structures" >&5
15220 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15221
15222 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15223 if test "${enable_opaque_panel+set}" = set; then
15224   enableval="$enable_opaque_panel"
15225   enable_opaque_panel=yes
15226 else
15227   enable_opaque_panel=no
15228 fi;
15229 echo "$as_me:15229: result: $enable_opaque_panel" >&5
15230 echo "${ECHO_T}$enable_opaque_panel" >&6
15231
15232 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15233 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15234 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15235 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15236
15237 ### Allow using a different wrap-prefix
15238 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15239         echo "$as_me:15239: checking for prefix used to wrap public variables" >&5
15240 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15241
15242 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15243 if test "${with_wrap_prefix+set}" = set; then
15244   withval="$with_wrap_prefix"
15245   NCURSES_WRAP_PREFIX=$withval
15246 else
15247   NCURSES_WRAP_PREFIX=_nc_
15248 fi;
15249         echo "$as_me:15249: result: $NCURSES_WRAP_PREFIX" >&5
15250 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15251 else
15252         NCURSES_WRAP_PREFIX=_nc_
15253 fi
15254
15255 cat >>confdefs.h <<EOF
15256 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15257 EOF
15258
15259 ###############################################################################
15260 # These options are relatively safe to experiment with.
15261
15262 echo "$as_me:15262: checking if you want all development code" >&5
15263 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15264
15265 # Check whether --with-develop or --without-develop was given.
15266 if test "${with_develop+set}" = set; then
15267   withval="$with_develop"
15268   with_develop=$withval
15269 else
15270   with_develop=no
15271 fi;
15272 echo "$as_me:15272: result: $with_develop" >&5
15273 echo "${ECHO_T}$with_develop" >&6
15274
15275 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15276 echo "$as_me:15276: checking if you want hard-tabs code" >&5
15277 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15278
15279 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15280 if test "${enable_hard_tabs+set}" = set; then
15281   enableval="$enable_hard_tabs"
15282
15283 else
15284   enable_hard_tabs=$with_develop
15285 fi;
15286 echo "$as_me:15286: result: $enable_hard_tabs" >&5
15287 echo "${ECHO_T}$enable_hard_tabs" >&6
15288 test "x$enable_hard_tabs" = xyes &&
15289 cat >>confdefs.h <<\EOF
15290 #define USE_HARD_TABS 1
15291 EOF
15292
15293 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15294 echo "$as_me:15294: checking if you want limited support for xmc" >&5
15295 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15296
15297 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15298 if test "${enable_xmc_glitch+set}" = set; then
15299   enableval="$enable_xmc_glitch"
15300
15301 else
15302   enable_xmc_glitch=$with_develop
15303 fi;
15304 echo "$as_me:15304: result: $enable_xmc_glitch" >&5
15305 echo "${ECHO_T}$enable_xmc_glitch" >&6
15306 test "x$enable_xmc_glitch" = xyes &&
15307 cat >>confdefs.h <<\EOF
15308 #define USE_XMC_SUPPORT 1
15309 EOF
15310
15311 ###############################################################################
15312 # These are just experimental, probably should not be in a package:
15313
15314 echo "$as_me:15314: checking if you do not want to assume colors are white-on-black" >&5
15315 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15316
15317 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15318 if test "${enable_assumed_color+set}" = set; then
15319   enableval="$enable_assumed_color"
15320   with_assumed_color=$enableval
15321 else
15322   with_assumed_color=yes
15323 fi;
15324 echo "$as_me:15324: result: $with_assumed_color" >&5
15325 echo "${ECHO_T}$with_assumed_color" >&6
15326 test "x$with_assumed_color" = xyes &&
15327 cat >>confdefs.h <<\EOF
15328 #define USE_ASSUMED_COLOR 1
15329 EOF
15330
15331 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15332 echo "$as_me:15332: checking if you want hashmap scrolling-optimization code" >&5
15333 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15334
15335 # Check whether --enable-hashmap or --disable-hashmap was given.
15336 if test "${enable_hashmap+set}" = set; then
15337   enableval="$enable_hashmap"
15338   with_hashmap=$enableval
15339 else
15340   with_hashmap=yes
15341 fi;
15342 echo "$as_me:15342: result: $with_hashmap" >&5
15343 echo "${ECHO_T}$with_hashmap" >&6
15344 test "x$with_hashmap" = xyes &&
15345 cat >>confdefs.h <<\EOF
15346 #define USE_HASHMAP 1
15347 EOF
15348
15349 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15350 echo "$as_me:15350: checking if you want colorfgbg code" >&5
15351 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15352
15353 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15354 if test "${enable_colorfgbg+set}" = set; then
15355   enableval="$enable_colorfgbg"
15356   with_colorfgbg=$enableval
15357 else
15358   with_colorfgbg=no
15359 fi;
15360 echo "$as_me:15360: result: $with_colorfgbg" >&5
15361 echo "${ECHO_T}$with_colorfgbg" >&6
15362 test "x$with_colorfgbg" = xyes &&
15363 cat >>confdefs.h <<\EOF
15364 #define USE_COLORFGBG 1
15365 EOF
15366
15367 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15368 echo "$as_me:15368: checking if you want to use gcc -fvisibility option" >&5
15369 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15370
15371 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15372 if test "${enable_fvisibility+set}" = set; then
15373   enableval="$enable_fvisibility"
15374   cf_with_fvisibility=$enableval
15375 else
15376   cf_with_fvisibility=no
15377 fi;
15378 echo "$as_me:15378: result: $cf_with_fvisibility" >&5
15379 echo "${ECHO_T}$cf_with_fvisibility" >&6
15380
15381 NCURSES_IMPEXP=
15382 NCURSES_CXX_IMPEXP=
15383 if test "x$cf_with_fvisibility" = xyes; then
15384
15385 echo "$as_me:15385: checking if $CC -fvisibility=hidden option works" >&5
15386 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
15387 if test "${cf_cv_fvisibility_hidden+set}" = set; then
15388   echo $ECHO_N "(cached) $ECHO_C" >&6
15389 else
15390
15391     cf_save_cflags="$CFLAGS"
15392     CFLAGS="$CFLAGS -fvisibility=hidden"
15393     cat >conftest.$ac_ext <<_ACEOF
15394 #line 15394 "configure"
15395 #include "confdefs.h"
15396
15397 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15398
15399 int
15400 main (void)
15401 {
15402
15403         if (somefunc()) return 1;
15404
15405   ;
15406   return 0;
15407 }
15408 _ACEOF
15409 rm -f conftest.$ac_objext conftest$ac_exeext
15410 if { (eval echo "$as_me:15410: \"$ac_link\"") >&5
15411   (eval $ac_link) 2>&5
15412   ac_status=$?
15413   echo "$as_me:15413: \$? = $ac_status" >&5
15414   (exit $ac_status); } &&
15415          { ac_try='test -s conftest$ac_exeext'
15416   { (eval echo "$as_me:15416: \"$ac_try\"") >&5
15417   (eval $ac_try) 2>&5
15418   ac_status=$?
15419   echo "$as_me:15419: \$? = $ac_status" >&5
15420   (exit $ac_status); }; }; then
15421   cf_cv_fvisibility_hidden=yes
15422 else
15423   echo "$as_me: failed program was:" >&5
15424 cat conftest.$ac_ext >&5
15425 cf_cv_fvisibility_hidden=no
15426 fi
15427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15428     CFLAGS=$cf_save_cflags
15429
15430 fi
15431 echo "$as_me:15431: result: $cf_cv_fvisibility_hidden" >&5
15432 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
15433
15434         if test "x$cf_cv_fvisibility_hidden" = xyes
15435         then
15436
15437 cf_fix_cppflags=no
15438 cf_new_cflags=
15439 cf_new_cppflags=
15440 cf_new_extra_cppflags=
15441
15442 for cf_add_cflags in -fvisibility=hidden
15443 do
15444 case $cf_fix_cppflags in
15445 (no)
15446         case $cf_add_cflags in
15447         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15448                 case $cf_add_cflags in
15449                 (-D*)
15450                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15451
15452                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15453                                 && test -z "${cf_tst_cflags}" \
15454                                 && cf_fix_cppflags=yes
15455
15456                         if test $cf_fix_cppflags = yes ; then
15457
15458         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15459         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15460
15461                                 continue
15462                         elif test "${cf_tst_cflags}" = "\"'" ; then
15463
15464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15466
15467                                 continue
15468                         fi
15469                         ;;
15470                 esac
15471                 case "$CPPFLAGS" in
15472                 (*$cf_add_cflags)
15473                         ;;
15474                 (*)
15475                         case $cf_add_cflags in
15476                         (-D*)
15477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15478
15479 CPPFLAGS=`echo "$CPPFLAGS" | \
15480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15482
15483                                 ;;
15484                         esac
15485
15486         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15487         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15488
15489                         ;;
15490                 esac
15491                 ;;
15492         (*)
15493
15494         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15495         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15496
15497                 ;;
15498         esac
15499         ;;
15500 (yes)
15501
15502         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15503         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15504
15505         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15506
15507         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15508                 && test -z "${cf_tst_cflags}" \
15509                 && cf_fix_cppflags=no
15510         ;;
15511 esac
15512 done
15513
15514 if test -n "$cf_new_cflags" ; then
15515
15516         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15517         CFLAGS="${CFLAGS}$cf_new_cflags"
15518
15519 fi
15520
15521 if test -n "$cf_new_cppflags" ; then
15522
15523         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15524         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15525
15526 fi
15527
15528 if test -n "$cf_new_extra_cppflags" ; then
15529
15530         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15531         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15532
15533 fi
15534
15535                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
15536         fi
15537         if test -n "$CXX"
15538         then
15539                 ac_ext=cc
15540 ac_cpp='$CXXCPP $CPPFLAGS'
15541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15542 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15544 ac_main_return=return
15545
15546 echo "$as_me:15546: checking if $CXX -fvisibility=hidden option works" >&5
15547 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
15548 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551
15552     cf_save_cflags="$CXXFLAGS"
15553     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
15554     cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15557
15558 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
15559
15560 int
15561 main (void)
15562 {
15563
15564         if (somefunc()) return 1;
15565
15566   ;
15567   return 0;
15568 }
15569 _ACEOF
15570 rm -f conftest.$ac_objext conftest$ac_exeext
15571 if { (eval echo "$as_me:15571: \"$ac_link\"") >&5
15572   (eval $ac_link) 2>&5
15573   ac_status=$?
15574   echo "$as_me:15574: \$? = $ac_status" >&5
15575   (exit $ac_status); } &&
15576          { ac_try='test -s conftest$ac_exeext'
15577   { (eval echo "$as_me:15577: \"$ac_try\"") >&5
15578   (eval $ac_try) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); }; }; then
15582   cf_cv_fvisibility_hidden2=yes
15583 else
15584   echo "$as_me: failed program was:" >&5
15585 cat conftest.$ac_ext >&5
15586 cf_cv_fvisibility_hidden2=no
15587 fi
15588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15589     CXXFLAGS=$cf_save_cflags
15590
15591 fi
15592 echo "$as_me:15592: result: $cf_cv_fvisibility_hidden2" >&5
15593 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
15594
15595                 if test "x$cf_cv_fvisibility_hidden2" = xyes
15596                 then
15597
15598 cf_save_CXXFLAGS="$CFLAGS"
15599 CFLAGS="$CXXFLAGS"
15600
15601 cf_fix_cppflags=no
15602 cf_new_cflags=
15603 cf_new_cppflags=
15604 cf_new_extra_cppflags=
15605
15606 for cf_add_cflags in -fvisibility=hidden
15607 do
15608 case $cf_fix_cppflags in
15609 (no)
15610         case $cf_add_cflags in
15611         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15612                 case $cf_add_cflags in
15613                 (-D*)
15614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15615
15616                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15617                                 && test -z "${cf_tst_cflags}" \
15618                                 && cf_fix_cppflags=yes
15619
15620                         if test $cf_fix_cppflags = yes ; then
15621
15622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15624
15625                                 continue
15626                         elif test "${cf_tst_cflags}" = "\"'" ; then
15627
15628         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15629         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15630
15631                                 continue
15632                         fi
15633                         ;;
15634                 esac
15635                 case "$CPPFLAGS" in
15636                 (*$cf_add_cflags)
15637                         ;;
15638                 (*)
15639                         case $cf_add_cflags in
15640                         (-D*)
15641                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15642
15643 CPPFLAGS=`echo "$CPPFLAGS" | \
15644         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15645                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15646
15647                                 ;;
15648                         esac
15649
15650         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15651         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15652
15653                         ;;
15654                 esac
15655                 ;;
15656         (*)
15657
15658         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15659         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15660
15661                 ;;
15662         esac
15663         ;;
15664 (yes)
15665
15666         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15667         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15668
15669         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15670
15671         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15672                 && test -z "${cf_tst_cflags}" \
15673                 && cf_fix_cppflags=no
15674         ;;
15675 esac
15676 done
15677
15678 if test -n "$cf_new_cflags" ; then
15679
15680         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15681         CFLAGS="${CFLAGS}$cf_new_cflags"
15682
15683 fi
15684
15685 if test -n "$cf_new_cppflags" ; then
15686
15687         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15688         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15689
15690 fi
15691
15692 if test -n "$cf_new_extra_cppflags" ; then
15693
15694         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15695         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15696
15697 fi
15698
15699 CXXFLAGS="$CFLAGS"
15700 CFLAGS="$cf_save_CXXFLAGS"
15701
15702                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
15703                 fi
15704                 ac_ext=c
15705 ac_cpp='$CPP $CPPFLAGS'
15706 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15707 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15708 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15709 ac_main_return=return
15710
15711         fi
15712 fi
15713
15714 ###   use option --enable-interop to turn on use of bindings used for interop
15715 echo "$as_me:15715: checking if you want interop bindings" >&5
15716 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
15717
15718 # Check whether --enable-interop or --disable-interop was given.
15719 if test "${enable_interop+set}" = set; then
15720   enableval="$enable_interop"
15721   with_exp_interop=$enableval
15722 else
15723   with_exp_interop=$cf_dft_interop
15724 fi;
15725 echo "$as_me:15725: result: $with_exp_interop" >&5
15726 echo "${ECHO_T}$with_exp_interop" >&6
15727
15728 NCURSES_INTEROP_FUNCS=0
15729 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
15730
15731 echo "$as_me:15731: checking if you want experimental safe-sprintf code" >&5
15732 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
15733
15734 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
15735 if test "${enable_safe_sprintf+set}" = set; then
15736   enableval="$enable_safe_sprintf"
15737   with_safe_sprintf=$enableval
15738 else
15739   with_safe_sprintf=no
15740 fi;
15741 echo "$as_me:15741: result: $with_safe_sprintf" >&5
15742 echo "${ECHO_T}$with_safe_sprintf" >&6
15743
15744 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
15745 # when hashmap is used scroll hints are useless
15746 if test "$with_hashmap" = no ; then
15747 echo "$as_me:15747: checking if you want to experiment without scrolling-hints code" >&5
15748 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
15749
15750 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
15751 if test "${enable_scroll_hints+set}" = set; then
15752   enableval="$enable_scroll_hints"
15753   with_scroll_hints=$enableval
15754 else
15755   with_scroll_hints=yes
15756 fi;
15757 echo "$as_me:15757: result: $with_scroll_hints" >&5
15758 echo "${ECHO_T}$with_scroll_hints" >&6
15759 test "x$with_scroll_hints" = xyes &&
15760 cat >>confdefs.h <<\EOF
15761 #define USE_SCROLL_HINTS 1
15762 EOF
15763
15764 fi
15765
15766 echo "$as_me:15766: checking if you want wgetch-events code" >&5
15767 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
15768
15769 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
15770 if test "${enable_wgetch_events+set}" = set; then
15771   enableval="$enable_wgetch_events"
15772   with_wgetch_events=$enableval
15773 else
15774   with_wgetch_events=no
15775 fi;
15776 echo "$as_me:15776: result: $with_wgetch_events" >&5
15777 echo "${ECHO_T}$with_wgetch_events" >&6
15778 test "x$with_wgetch_events" = xyes &&
15779 cat >>confdefs.h <<\EOF
15780 #define NCURSES_WGETCH_EVENTS 1
15781 EOF
15782
15783 ###############################################################################
15784
15785 ###     use option --disable-echo to suppress full display compiling commands
15786
15787 echo "$as_me:15787: checking if you want to see long compiling messages" >&5
15788 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
15789
15790 # Check whether --enable-echo or --disable-echo was given.
15791 if test "${enable_echo+set}" = set; then
15792   enableval="$enable_echo"
15793   test "$enableval" != no && enableval=yes
15794         if test "$enableval" != "yes" ; then
15795
15796         ECHO_LT='--silent'
15797         ECHO_LD='@echo linking $@;'
15798         RULE_CC='@echo compiling $<'
15799         SHOW_CC='@echo compiling $@'
15800         ECHO_CC='@'
15801
15802         else
15803
15804         ECHO_LT=''
15805         ECHO_LD=''
15806         RULE_CC=''
15807         SHOW_CC=''
15808         ECHO_CC=''
15809
15810         fi
15811 else
15812   enableval=yes
15813
15814         ECHO_LT=''
15815         ECHO_LD=''
15816         RULE_CC=''
15817         SHOW_CC=''
15818         ECHO_CC=''
15819
15820 fi;
15821 echo "$as_me:15821: result: $enableval" >&5
15822 echo "${ECHO_T}$enableval" >&6
15823
15824 if test "x$enable_echo" = xyes; then
15825         ECHO_LINK=
15826 else
15827         ECHO_LINK='@ echo linking $@ ... ;'
15828         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
15829         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
15830 fi
15831
15832 # --disable-stripping is used for debugging
15833
15834 echo "$as_me:15834: checking if you want to install stripped executables" >&5
15835 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
15836
15837 # Check whether --enable-stripping or --disable-stripping was given.
15838 if test "${enable_stripping+set}" = set; then
15839   enableval="$enable_stripping"
15840   test "$enableval" != no && enableval=yes
15841         if test "$enableval" != "yes" ; then
15842     with_stripping=no
15843         else
15844                 with_stripping=yes
15845         fi
15846 else
15847   enableval=yes
15848         with_stripping=yes
15849
15850 fi;
15851 echo "$as_me:15851: result: $with_stripping" >&5
15852 echo "${ECHO_T}$with_stripping" >&6
15853
15854 if test "$with_stripping" = yes
15855 then
15856         INSTALL_OPT_S="-s"
15857 else
15858         INSTALL_OPT_S=
15859 fi
15860
15861 : ${INSTALL:=install}
15862 echo "$as_me:15862: checking if install accepts -p option" >&5
15863 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
15864 if test "${cf_cv_install_p+set}" = set; then
15865   echo $ECHO_N "(cached) $ECHO_C" >&6
15866 else
15867
15868         rm -rf conftest*
15869         date >conftest.in
15870         mkdir conftest.out
15871         sleep 3
15872         if $INSTALL -p conftest.in conftest.out 2>/dev/null
15873         then
15874                 if test -f conftest.out/conftest.in
15875                 then
15876                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
15877                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
15878                         if test -s conftest.err
15879                         then
15880                                 cf_cv_install_p=no
15881                         else
15882                                 cf_cv_install_p=yes
15883                         fi
15884                 else
15885                         cf_cv_install_p=no
15886                 fi
15887         else
15888                 cf_cv_install_p=no
15889         fi
15890         rm -rf conftest*
15891
15892 fi
15893 echo "$as_me:15893: result: $cf_cv_install_p" >&5
15894 echo "${ECHO_T}$cf_cv_install_p" >&6
15895
15896 echo "$as_me:15896: checking if install needs to be told about ownership" >&5
15897 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
15898 case `$ac_config_guess` in
15899 (*minix)
15900         with_install_o=yes
15901         ;;
15902 (*)
15903         with_install_o=no
15904         ;;
15905 esac
15906
15907 echo "$as_me:15907: result: $with_install_o" >&5
15908 echo "${ECHO_T}$with_install_o" >&6
15909 if test "x$with_install_o" = xyes
15910 then
15911         INSTALL_OPT_O=`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`
15912 else
15913         INSTALL_OPT_O=
15914 fi
15915
15916 # If we're avoiding relinking of shared libraries during install, that is to
15917 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
15918 # the install program has "-p" (for preserving timestamps).
15919 cf_cv_do_reranlib=yes
15920 if test "x$cf_cv_install_p" = xyes
15921 then
15922         if test "x$cf_cv_do_relink" != xyes
15923         then
15924                 cf_cv_do_reranlib=no
15925                 INSTALL_OPT_P="-p"
15926                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
15927         fi
15928 fi
15929
15930 ###     use option --enable-warnings to turn on all gcc warnings
15931 echo "$as_me:15931: checking if you want to see compiler warnings" >&5
15932 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
15933
15934 # Check whether --enable-warnings or --disable-warnings was given.
15935 if test "${enable_warnings+set}" = set; then
15936   enableval="$enable_warnings"
15937   with_warnings=$enableval
15938 fi;
15939 echo "$as_me:15939: result: $with_warnings" >&5
15940 echo "${ECHO_T}$with_warnings" >&6
15941
15942 if test "x$with_warnings" = "xyes"; then
15943
15944         ADAFLAGS="$ADAFLAGS -gnatg"
15945
15946 if test "x$have_x" = xyes; then
15947
15948 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
15949 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
15950 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
15951 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
15952 for cf_X_CFLAGS in $X_CFLAGS
15953 do
15954         case "x$cf_X_CFLAGS" in
15955         x-[IUD]*)
15956                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15957                 ;;
15958         *)
15959                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
15960                 ;;
15961         esac
15962 done
15963
15964 cat >conftest.$ac_ext <<_ACEOF
15965 #line 15965 "configure"
15966 #include "confdefs.h"
15967
15968 #include <stdlib.h>
15969 #include <X11/Intrinsic.h>
15970
15971 int
15972 main (void)
15973 {
15974 String foo = malloc(1); (void)foo
15975   ;
15976   return 0;
15977 }
15978 _ACEOF
15979 rm -f conftest.$ac_objext
15980 if { (eval echo "$as_me:15980: \"$ac_compile\"") >&5
15981   (eval $ac_compile) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit $ac_status); } &&
15985          { ac_try='test -s conftest.$ac_objext'
15986   { (eval echo "$as_me:15986: \"$ac_try\"") >&5
15987   (eval $ac_try) 2>&5
15988   ac_status=$?
15989   echo "$as_me:15989: \$? = $ac_status" >&5
15990   (exit $ac_status); }; }; then
15991
15992 echo "$as_me:15992: checking for X11/Xt const-feature" >&5
15993 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
15994 if test "${cf_cv_const_x_string+set}" = set; then
15995   echo $ECHO_N "(cached) $ECHO_C" >&6
15996 else
15997
15998         cat >conftest.$ac_ext <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16003 #undef  XTSTRINGDEFINES /* X11R5 and later */
16004 #include <stdlib.h>
16005 #include <X11/Intrinsic.h>
16006
16007 int
16008 main (void)
16009 {
16010 String foo = malloc(1); *foo = 0
16011   ;
16012   return 0;
16013 }
16014 _ACEOF
16015 rm -f conftest.$ac_objext
16016 if { (eval echo "$as_me:16016: \"$ac_compile\"") >&5
16017   (eval $ac_compile) 2>&5
16018   ac_status=$?
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); } &&
16021          { ac_try='test -s conftest.$ac_objext'
16022   { (eval echo "$as_me:16022: \"$ac_try\"") >&5
16023   (eval $ac_try) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit $ac_status); }; }; then
16027
16028                         cf_cv_const_x_string=no
16029
16030 else
16031   echo "$as_me: failed program was:" >&5
16032 cat conftest.$ac_ext >&5
16033
16034                         cf_cv_const_x_string=yes
16035
16036 fi
16037 rm -f conftest.$ac_objext conftest.$ac_ext
16038
16039 fi
16040 echo "$as_me:16040: result: $cf_cv_const_x_string" >&5
16041 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16042
16043 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16044 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16045 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16046
16047 case $cf_cv_const_x_string in
16048 (no)
16049
16050         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16051         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16052
16053         ;;
16054 (*)
16055
16056         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16057         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16058
16059         ;;
16060 esac
16061
16062 else
16063   echo "$as_me: failed program was:" >&5
16064 cat conftest.$ac_ext >&5
16065 fi
16066 rm -f conftest.$ac_objext conftest.$ac_ext
16067  fi
16068 cat > conftest.$ac_ext <<EOF
16069 #line 16069 "${as_me:-configure}"
16070 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16071 EOF
16072 if test "$INTEL_COMPILER" = yes
16073 then
16074 # The "-wdXXX" options suppress warnings:
16075 # remark #1419: external declaration in primary source file
16076 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16077 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16078 # remark #193: zero used for undefined preprocessing identifier
16079 # remark #593: variable "curs_sb_left_arrow" was set but never used
16080 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16081 # remark #869: parameter "tw" was never referenced
16082 # remark #981: operands are evaluated in unspecified order
16083 # warning #279: controlling expression is constant
16084
16085         { echo "$as_me:16085: checking for $CC warning options..." >&5
16086 echo "$as_me: checking for $CC warning options..." >&6;}
16087         cf_save_CFLAGS="$CFLAGS"
16088         EXTRA_CFLAGS="-Wall"
16089         for cf_opt in \
16090                 wd1419 \
16091                 wd1683 \
16092                 wd1684 \
16093                 wd193 \
16094                 wd593 \
16095                 wd279 \
16096                 wd810 \
16097                 wd869 \
16098                 wd981
16099         do
16100                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16101                 if { (eval echo "$as_me:16101: \"$ac_compile\"") >&5
16102   (eval $ac_compile) 2>&5
16103   ac_status=$?
16104   echo "$as_me:16104: \$? = $ac_status" >&5
16105   (exit $ac_status); }; then
16106                         test -n "$verbose" && echo "$as_me:16106: result: ... -$cf_opt" >&5
16107 echo "${ECHO_T}... -$cf_opt" >&6
16108                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16109                 fi
16110         done
16111         CFLAGS="$cf_save_CFLAGS"
16112 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16113 then
16114         { echo "$as_me:16114: checking for $CC warning options..." >&5
16115 echo "$as_me: checking for $CC warning options..." >&6;}
16116         cf_save_CFLAGS="$CFLAGS"
16117         EXTRA_CFLAGS=
16118         cf_warn_CONST=""
16119         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16120         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
16121         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
16122         for cf_opt in W Wall \
16123                 Wbad-function-cast \
16124                 Wcast-align \
16125                 Wcast-qual \
16126                 Wdeclaration-after-statement \
16127                 Wextra \
16128                 Winline \
16129                 Wmissing-declarations \
16130                 Wmissing-prototypes \
16131                 Wnested-externs \
16132                 Wpointer-arith \
16133                 Wshadow \
16134                 Wstrict-prototypes \
16135                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
16136         do
16137                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16138                 if { (eval echo "$as_me:16138: \"$ac_compile\"") >&5
16139   (eval $ac_compile) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; then
16143                         test -n "$verbose" && echo "$as_me:16143: result: ... -$cf_opt" >&5
16144 echo "${ECHO_T}... -$cf_opt" >&6
16145                         case $cf_opt in
16146                         (Winline)
16147                                 case $GCC_VERSION in
16148                                 ([34].*)
16149                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16150
16151 echo "${as_me:-configure}:16151: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16152
16153                                         continue;;
16154                                 esac
16155                                 ;;
16156                         (Wpointer-arith)
16157                                 case $GCC_VERSION in
16158                                 ([12].*)
16159                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
16160
16161 echo "${as_me:-configure}:16161: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
16162
16163                                         continue;;
16164                                 esac
16165                                 ;;
16166                         esac
16167                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16168                 fi
16169         done
16170         CFLAGS="$cf_save_CFLAGS"
16171 fi
16172 rm -rf conftest*
16173
16174         if test "x$cf_with_cxx" = xyes ; then
16175
16176 INTEL_CPLUSPLUS=no
16177
16178 if test "$GCC" = yes ; then
16179         case $host_os in
16180         (linux*|gnu*)
16181                 echo "$as_me:16181: checking if this is really Intel C++ compiler" >&5
16182 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
16183                 cf_save_CFLAGS="$CXXFLAGS"
16184                 CXXFLAGS="$CXXFLAGS -no-gcc"
16185                 cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188
16189 int
16190 main (void)
16191 {
16192
16193 #ifdef __INTEL_COMPILER
16194 #else
16195 make an error
16196 #endif
16197
16198   ;
16199   return 0;
16200 }
16201 _ACEOF
16202 rm -f conftest.$ac_objext
16203 if { (eval echo "$as_me:16203: \"$ac_compile\"") >&5
16204   (eval $ac_compile) 2>&5
16205   ac_status=$?
16206   echo "$as_me:16206: \$? = $ac_status" >&5
16207   (exit $ac_status); } &&
16208          { ac_try='test -s conftest.$ac_objext'
16209   { (eval echo "$as_me:16209: \"$ac_try\"") >&5
16210   (eval $ac_try) 2>&5
16211   ac_status=$?
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); }; }; then
16214   INTEL_CPLUSPLUS=yes
16215 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
16216
16217 else
16218   echo "$as_me: failed program was:" >&5
16219 cat conftest.$ac_ext >&5
16220 fi
16221 rm -f conftest.$ac_objext conftest.$ac_ext
16222                 CXXFLAGS="$cf_save_CFLAGS"
16223                 echo "$as_me:16223: result: $INTEL_CPLUSPLUS" >&5
16224 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
16225                 ;;
16226         esac
16227 fi
16228
16229 CLANG_CPLUSPLUS=no
16230
16231 if test "$GCC" = yes ; then
16232         echo "$as_me:16232: checking if this is really Clang C++ compiler" >&5
16233 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
16234         cf_save_CFLAGS="$CXXFLAGS"
16235         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
16236         cat >conftest.$ac_ext <<_ACEOF
16237 #line 16237 "configure"
16238 #include "confdefs.h"
16239
16240 int
16241 main (void)
16242 {
16243
16244 #ifdef __clang__
16245 #else
16246 make an error
16247 #endif
16248
16249   ;
16250   return 0;
16251 }
16252 _ACEOF
16253 rm -f conftest.$ac_objext
16254 if { (eval echo "$as_me:16254: \"$ac_compile\"") >&5
16255   (eval $ac_compile) 2>&5
16256   ac_status=$?
16257   echo "$as_me:16257: \$? = $ac_status" >&5
16258   (exit $ac_status); } &&
16259          { ac_try='test -s conftest.$ac_objext'
16260   { (eval echo "$as_me:16260: \"$ac_try\"") >&5
16261   (eval $ac_try) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); }; }; then
16265   CLANG_CPLUSPLUS=yes
16266 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
16267
16268 else
16269   echo "$as_me: failed program was:" >&5
16270 cat conftest.$ac_ext >&5
16271 fi
16272 rm -f conftest.$ac_objext conftest.$ac_ext
16273         CXXFLAGS="$cf_save_CFLAGS"
16274         echo "$as_me:16274: result: $CLANG_CPLUSPLUS" >&5
16275 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
16276 fi
16277
16278 ac_ext=cc
16279 ac_cpp='$CXXCPP $CPPFLAGS'
16280 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16281 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16282 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16283 ac_main_return=return
16284
16285 cat > conftest.$ac_ext <<EOF
16286 #line 16286 "configure"
16287 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16288 EOF
16289
16290 if test "$INTEL_CPLUSPLUS" = yes
16291 then
16292 # The "-wdXXX" options suppress warnings:
16293 # remark #1419: external declaration in primary source file
16294 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16295 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16296 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16297 # remark #193: zero used for undefined preprocessing identifier
16298 # remark #593: variable "curs_sb_left_arrow" was set but never used
16299 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16300 # remark #869: parameter "tw" was never referenced
16301 # remark #981: operands are evaluated in unspecified order
16302 # warning #269: invalid format string conversion
16303
16304         { echo "$as_me:16304: checking for $CC warning options..." >&5
16305 echo "$as_me: checking for $CC warning options..." >&6;}
16306         cf_save_CXXFLAGS="$CXXFLAGS"
16307         EXTRA_CXXFLAGS="-Wall"
16308         for cf_opt in \
16309                 wd1419 \
16310                 wd1682 \
16311                 wd1683 \
16312                 wd1684 \
16313                 wd193 \
16314                 wd279 \
16315                 wd593 \
16316                 wd810 \
16317                 wd869 \
16318                 wd981
16319         do
16320                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
16321                 if { (eval echo "$as_me:16321: \"$ac_compile\"") >&5
16322   (eval $ac_compile) 2>&5
16323   ac_status=$?
16324   echo "$as_me:16324: \$? = $ac_status" >&5
16325   (exit $ac_status); }; then
16326                         test -n "$verbose" && echo "$as_me:16326: result: ... -$cf_opt" >&5
16327 echo "${ECHO_T}... -$cf_opt" >&6
16328                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16329                 fi
16330         done
16331         CXXFLAGS="$cf_save_CXXFLAGS"
16332
16333 elif test "$GXX" = yes
16334 then
16335         { echo "$as_me:16335: checking for $CXX warning options..." >&5
16336 echo "$as_me: checking for $CXX warning options..." >&6;}
16337         cf_save_CXXFLAGS="$CXXFLAGS"
16338         EXTRA_CXXFLAGS="-W -Wall"
16339         cf_gxx_extra_warnings=""
16340         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
16341         case "$GCC_VERSION" in
16342         ([1-2].*)
16343                 ;;
16344         (*)
16345                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
16346                 ;;
16347         esac
16348         for cf_opt in \
16349                 Wabi \
16350                 fabi-version=0 \
16351                 Wextra \
16352                 Wignored-qualifiers \
16353                 Wlogical-op \
16354                 Woverloaded-virtual \
16355                 Wsign-promo \
16356                 Wsynth \
16357                 Wold-style-cast \
16358                 Wcast-align \
16359                 Wcast-qual \
16360                 Wpointer-arith \
16361                 Wshadow \
16362                 Wundef $cf_gxx_extra_warnings Wno-unused
16363         do
16364                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
16365                 if { (eval echo "$as_me:16365: \"$ac_compile\"") >&5
16366   (eval $ac_compile) 2>&5
16367   ac_status=$?
16368   echo "$as_me:16368: \$? = $ac_status" >&5
16369   (exit $ac_status); }; then
16370                         test -n "$verbose" && echo "$as_me:16370: result: ... -$cf_opt" >&5
16371 echo "${ECHO_T}... -$cf_opt" >&6
16372                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
16373                 else
16374                         test -n "$verbose" && echo "$as_me:16374: result: ... no -$cf_opt" >&5
16375 echo "${ECHO_T}... no -$cf_opt" >&6
16376                 fi
16377         done
16378         CXXFLAGS="$cf_save_CXXFLAGS"
16379 fi
16380
16381 rm -rf conftest*
16382 ac_ext=c
16383 ac_cpp='$CPP $CPPFLAGS'
16384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16387 ac_main_return=return
16388
16389         fi
16390 fi
16391
16392 if test "$GCC" = yes
16393 then
16394 cat > conftest.i <<EOF
16395 #ifndef GCC_PRINTF
16396 #define GCC_PRINTF 0
16397 #endif
16398 #ifndef GCC_SCANF
16399 #define GCC_SCANF 0
16400 #endif
16401 #ifndef GCC_NORETURN
16402 #define GCC_NORETURN /* nothing */
16403 #endif
16404 #ifndef GCC_UNUSED
16405 #define GCC_UNUSED /* nothing */
16406 #endif
16407 EOF
16408 if test "$GCC" = yes
16409 then
16410         { echo "$as_me:16410: checking for $CC __attribute__ directives..." >&5
16411 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
16412 cat > conftest.$ac_ext <<EOF
16413 #line 16413 "${as_me:-configure}"
16414 #include "confdefs.h"
16415 #include "conftest.h"
16416 #include "conftest.i"
16417 #if     GCC_PRINTF
16418 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
16419 #else
16420 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
16421 #endif
16422 #if     GCC_SCANF
16423 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
16424 #else
16425 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
16426 #endif
16427 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
16428 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
16429 extern void foo(void) GCC_NORETURN;
16430 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
16431 EOF
16432         cf_printf_attribute=no
16433         cf_scanf_attribute=no
16434         for cf_attribute in scanf printf unused noreturn
16435         do
16436
16437 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16438
16439                 cf_directive="__attribute__(($cf_attribute))"
16440                 echo "checking for $CC $cf_directive" 1>&5
16441
16442                 case $cf_attribute in
16443                 (printf)
16444                         cf_printf_attribute=yes
16445                         cat >conftest.h <<EOF
16446 #define GCC_$cf_ATTRIBUTE 1
16447 EOF
16448                         ;;
16449                 (scanf)
16450                         cf_scanf_attribute=yes
16451                         cat >conftest.h <<EOF
16452 #define GCC_$cf_ATTRIBUTE 1
16453 EOF
16454                         ;;
16455                 (*)
16456                         cat >conftest.h <<EOF
16457 #define GCC_$cf_ATTRIBUTE $cf_directive
16458 EOF
16459                         ;;
16460                 esac
16461
16462                 if { (eval echo "$as_me:16462: \"$ac_compile\"") >&5
16463   (eval $ac_compile) 2>&5
16464   ac_status=$?
16465   echo "$as_me:16465: \$? = $ac_status" >&5
16466   (exit $ac_status); }; then
16467                         test -n "$verbose" && echo "$as_me:16467: result: ... $cf_attribute" >&5
16468 echo "${ECHO_T}... $cf_attribute" >&6
16469                         cat conftest.h >>confdefs.h
16470                         case $cf_attribute in
16471                         (noreturn)
16472
16473 cat >>confdefs.h <<EOF
16474 #define GCC_NORETURN $cf_directive
16475 EOF
16476
16477                                 ;;
16478                         (printf)
16479                                 cf_value='/* nothing */'
16480                                 if test "$cf_printf_attribute" != no ; then
16481                                         cf_value='__attribute__((format(printf,fmt,var)))'
16482
16483 cat >>confdefs.h <<\EOF
16484 #define GCC_PRINTF 1
16485 EOF
16486
16487                                 fi
16488
16489 cat >>confdefs.h <<EOF
16490 #define GCC_PRINTFLIKE(fmt,var) $cf_value
16491 EOF
16492
16493                                 ;;
16494                         (scanf)
16495                                 cf_value='/* nothing */'
16496                                 if test "$cf_scanf_attribute" != no ; then
16497                                         cf_value='__attribute__((format(scanf,fmt,var)))'
16498
16499 cat >>confdefs.h <<\EOF
16500 #define GCC_SCANF 1
16501 EOF
16502
16503                                 fi
16504
16505 cat >>confdefs.h <<EOF
16506 #define GCC_SCANFLIKE(fmt,var) $cf_value
16507 EOF
16508
16509                                 ;;
16510                         (unused)
16511
16512 cat >>confdefs.h <<EOF
16513 #define GCC_UNUSED $cf_directive
16514 EOF
16515
16516                                 ;;
16517                         esac
16518                 fi
16519         done
16520 else
16521         fgrep define conftest.i >>confdefs.h
16522 fi
16523 rm -rf conftest*
16524 fi
16525
16526 echo "$as_me:16526: checking if you want to work around bogus compiler/loader warnings" >&5
16527 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
16528
16529 # Check whether --enable-string-hacks or --disable-string-hacks was given.
16530 if test "${enable_string_hacks+set}" = set; then
16531   enableval="$enable_string_hacks"
16532   with_string_hacks=$enableval
16533 else
16534   with_string_hacks=no
16535 fi;
16536 echo "$as_me:16536: result: $with_string_hacks" >&5
16537 echo "${ECHO_T}$with_string_hacks" >&6
16538
16539 if test "x$with_string_hacks" = "xyes"; then
16540
16541 cat >>confdefs.h <<\EOF
16542 #define USE_STRING_HACKS 1
16543 EOF
16544
16545         { echo "$as_me:16545: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
16546 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
16547         echo "$as_me:16547: checking for strlcat" >&5
16548 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
16549 if test "${ac_cv_func_strlcat+set}" = set; then
16550   echo $ECHO_N "(cached) $ECHO_C" >&6
16551 else
16552   cat >conftest.$ac_ext <<_ACEOF
16553 #line 16553 "configure"
16554 #include "confdefs.h"
16555 #define strlcat autoconf_temporary
16556 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16557 #undef strlcat
16558
16559 #ifdef __cplusplus
16560 extern "C"
16561 #endif
16562
16563 /* We use char because int might match the return type of a gcc2
16564    builtin and then its argument prototype would still apply.  */
16565 char strlcat (void);
16566
16567 int
16568 main (void)
16569 {
16570
16571 /* The GNU C library defines stubs for functions which it implements
16572     to always fail with ENOSYS.  Some functions are actually named
16573     something starting with __ and the normal name is an alias.  */
16574 #if defined (__stub_strlcat) || defined (__stub___strlcat)
16575 #error found stub for strlcat
16576 #endif
16577
16578         return strlcat ();
16579   ;
16580   return 0;
16581 }
16582 _ACEOF
16583 rm -f conftest.$ac_objext conftest$ac_exeext
16584 if { (eval echo "$as_me:16584: \"$ac_link\"") >&5
16585   (eval $ac_link) 2>&5
16586   ac_status=$?
16587   echo "$as_me:16587: \$? = $ac_status" >&5
16588   (exit $ac_status); } &&
16589          { ac_try='test -s conftest$ac_exeext'
16590   { (eval echo "$as_me:16590: \"$ac_try\"") >&5
16591   (eval $ac_try) 2>&5
16592   ac_status=$?
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); }; }; then
16595   ac_cv_func_strlcat=yes
16596 else
16597   echo "$as_me: failed program was:" >&5
16598 cat conftest.$ac_ext >&5
16599 ac_cv_func_strlcat=no
16600 fi
16601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16602 fi
16603 echo "$as_me:16603: result: $ac_cv_func_strlcat" >&5
16604 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
16605 if test $ac_cv_func_strlcat = yes; then
16606
16607 cat >>confdefs.h <<\EOF
16608 #define HAVE_STRLCAT 1
16609 EOF
16610
16611 else
16612
16613                 echo "$as_me:16613: checking for strlcat in -lbsd" >&5
16614 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
16615 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618   ac_check_lib_save_LIBS=$LIBS
16619 LIBS="-lbsd  $LIBS"
16620 cat >conftest.$ac_ext <<_ACEOF
16621 #line 16621 "configure"
16622 #include "confdefs.h"
16623
16624 /* Override any gcc2 internal prototype to avoid an error.  */
16625 #ifdef __cplusplus
16626 extern "C"
16627 #endif
16628 /* We use char because int might match the return type of a gcc2
16629    builtin and then its argument prototype would still apply.  */
16630 char strlcat ();
16631 int
16632 main (void)
16633 {
16634 strlcat ();
16635   ;
16636   return 0;
16637 }
16638 _ACEOF
16639 rm -f conftest.$ac_objext conftest$ac_exeext
16640 if { (eval echo "$as_me:16640: \"$ac_link\"") >&5
16641   (eval $ac_link) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); } &&
16645          { ac_try='test -s conftest$ac_exeext'
16646   { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647   (eval $ac_try) 2>&5
16648   ac_status=$?
16649   echo "$as_me:16649: \$? = $ac_status" >&5
16650   (exit $ac_status); }; }; then
16651   ac_cv_lib_bsd_strlcat=yes
16652 else
16653   echo "$as_me: failed program was:" >&5
16654 cat conftest.$ac_ext >&5
16655 ac_cv_lib_bsd_strlcat=no
16656 fi
16657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16658 LIBS=$ac_check_lib_save_LIBS
16659 fi
16660 echo "$as_me:16660: result: $ac_cv_lib_bsd_strlcat" >&5
16661 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
16662 if test $ac_cv_lib_bsd_strlcat = yes; then
16663
16664 cf_add_libs="$LIBS"
16665 # reverse order
16666 cf_add_0lib=
16667 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16668 # filter duplicates
16669 for cf_add_1lib in $cf_add_0lib; do
16670         for cf_add_2lib in $cf_add_libs; do
16671                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16672                         cf_add_1lib=
16673                         break
16674                 fi
16675         done
16676         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16677 done
16678 LIBS="$cf_add_libs"
16679
16680 for ac_header in bsd/string.h
16681 do
16682 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16683 echo "$as_me:16683: checking for $ac_header" >&5
16684 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16686   echo $ECHO_N "(cached) $ECHO_C" >&6
16687 else
16688   cat >conftest.$ac_ext <<_ACEOF
16689 #line 16689 "configure"
16690 #include "confdefs.h"
16691 #include <$ac_header>
16692 _ACEOF
16693 if { (eval echo "$as_me:16693: \"$ac_cpp conftest.$ac_ext\"") >&5
16694   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16695   ac_status=$?
16696   egrep -v '^ *\+' conftest.er1 >conftest.err
16697   rm -f conftest.er1
16698   cat conftest.err >&5
16699   echo "$as_me:16699: \$? = $ac_status" >&5
16700   (exit $ac_status); } >/dev/null; then
16701   if test -s conftest.err; then
16702     ac_cpp_err=$ac_c_preproc_warn_flag
16703   else
16704     ac_cpp_err=
16705   fi
16706 else
16707   ac_cpp_err=yes
16708 fi
16709 if test -z "$ac_cpp_err"; then
16710   eval "$as_ac_Header=yes"
16711 else
16712   echo "$as_me: failed program was:" >&5
16713   cat conftest.$ac_ext >&5
16714   eval "$as_ac_Header=no"
16715 fi
16716 rm -f conftest.err conftest.$ac_ext
16717 fi
16718 echo "$as_me:16718: result: `eval echo '${'$as_ac_Header'}'`" >&5
16719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16721   cat >>confdefs.h <<EOF
16722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16723 EOF
16724
16725 fi
16726 done
16727
16728 cat >>confdefs.h <<\EOF
16729 #define HAVE_STRLCAT 1
16730 EOF
16731
16732 fi
16733
16734 fi
16735
16736 for ac_func in strlcpy snprintf
16737 do
16738 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16739 echo "$as_me:16739: checking for $ac_func" >&5
16740 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16741 if eval "test \"\${$as_ac_var+set}\" = set"; then
16742   echo $ECHO_N "(cached) $ECHO_C" >&6
16743 else
16744   cat >conftest.$ac_ext <<_ACEOF
16745 #line 16745 "configure"
16746 #include "confdefs.h"
16747 #define $ac_func autoconf_temporary
16748 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16749 #undef $ac_func
16750
16751 #ifdef __cplusplus
16752 extern "C"
16753 #endif
16754
16755 /* We use char because int might match the return type of a gcc2
16756    builtin and then its argument prototype would still apply.  */
16757 char $ac_func (void);
16758
16759 int
16760 main (void)
16761 {
16762
16763 /* The GNU C library defines stubs for functions which it implements
16764     to always fail with ENOSYS.  Some functions are actually named
16765     something starting with __ and the normal name is an alias.  */
16766 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16767 #error found stub for $ac_func
16768 #endif
16769
16770         return $ac_func ();
16771   ;
16772   return 0;
16773 }
16774 _ACEOF
16775 rm -f conftest.$ac_objext conftest$ac_exeext
16776 if { (eval echo "$as_me:16776: \"$ac_link\"") >&5
16777   (eval $ac_link) 2>&5
16778   ac_status=$?
16779   echo "$as_me:16779: \$? = $ac_status" >&5
16780   (exit $ac_status); } &&
16781          { ac_try='test -s conftest$ac_exeext'
16782   { (eval echo "$as_me:16782: \"$ac_try\"") >&5
16783   (eval $ac_try) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); }; }; then
16787   eval "$as_ac_var=yes"
16788 else
16789   echo "$as_me: failed program was:" >&5
16790 cat conftest.$ac_ext >&5
16791 eval "$as_ac_var=no"
16792 fi
16793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16794 fi
16795 echo "$as_me:16795: result: `eval echo '${'$as_ac_var'}'`" >&5
16796 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16797 if test `eval echo '${'$as_ac_var'}'` = yes; then
16798   cat >>confdefs.h <<EOF
16799 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16800 EOF
16801
16802 fi
16803 done
16804
16805 fi
16806
16807 ###     use option --enable-assertions to turn on generation of assertion code
16808 echo "$as_me:16808: checking if you want to enable runtime assertions" >&5
16809 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
16810
16811 # Check whether --enable-assertions or --disable-assertions was given.
16812 if test "${enable_assertions+set}" = set; then
16813   enableval="$enable_assertions"
16814   with_assertions=$enableval
16815 else
16816   with_assertions=no
16817 fi;
16818 echo "$as_me:16818: result: $with_assertions" >&5
16819 echo "${ECHO_T}$with_assertions" >&6
16820 if test -n "$GCC"
16821 then
16822         if test "$with_assertions" = no
16823         then
16824                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
16825         else
16826
16827         ADAFLAGS="$ADAFLAGS -gnata"
16828
16829         fi
16830 fi
16831
16832 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
16833
16834 echo "$as_me:16834: checking if you want to use dmalloc for testing" >&5
16835 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
16836
16837 # Check whether --with-dmalloc or --without-dmalloc was given.
16838 if test "${with_dmalloc+set}" = set; then
16839   withval="$with_dmalloc"
16840
16841 cat >>confdefs.h <<EOF
16842 #define USE_DMALLOC 1
16843 EOF
16844
16845         : ${with_cflags:=-g}
16846         : ${with_no_leaks:=yes}
16847          with_dmalloc=yes
16848 else
16849   with_dmalloc=
16850 fi;
16851 echo "$as_me:16851: result: ${with_dmalloc:-no}" >&5
16852 echo "${ECHO_T}${with_dmalloc:-no}" >&6
16853
16854 case .$with_cflags in
16855 (.*-g*)
16856         case .$CFLAGS in
16857         (.*-g*)
16858                 ;;
16859         (*)
16860
16861 cf_fix_cppflags=no
16862 cf_new_cflags=
16863 cf_new_cppflags=
16864 cf_new_extra_cppflags=
16865
16866 for cf_add_cflags in -g
16867 do
16868 case $cf_fix_cppflags in
16869 (no)
16870         case $cf_add_cflags in
16871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16872                 case $cf_add_cflags in
16873                 (-D*)
16874                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16875
16876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16877                                 && test -z "${cf_tst_cflags}" \
16878                                 && cf_fix_cppflags=yes
16879
16880                         if test $cf_fix_cppflags = yes ; then
16881
16882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16884
16885                                 continue
16886                         elif test "${cf_tst_cflags}" = "\"'" ; then
16887
16888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16890
16891                                 continue
16892                         fi
16893                         ;;
16894                 esac
16895                 case "$CPPFLAGS" in
16896                 (*$cf_add_cflags)
16897                         ;;
16898                 (*)
16899                         case $cf_add_cflags in
16900                         (-D*)
16901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16902
16903 CPPFLAGS=`echo "$CPPFLAGS" | \
16904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16906
16907                                 ;;
16908                         esac
16909
16910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16912
16913                         ;;
16914                 esac
16915                 ;;
16916         (*)
16917
16918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16920
16921                 ;;
16922         esac
16923         ;;
16924 (yes)
16925
16926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16928
16929         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16930
16931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16932                 && test -z "${cf_tst_cflags}" \
16933                 && cf_fix_cppflags=no
16934         ;;
16935 esac
16936 done
16937
16938 if test -n "$cf_new_cflags" ; then
16939
16940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16941         CFLAGS="${CFLAGS}$cf_new_cflags"
16942
16943 fi
16944
16945 if test -n "$cf_new_cppflags" ; then
16946
16947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16949
16950 fi
16951
16952 if test -n "$cf_new_extra_cppflags" ; then
16953
16954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16956
16957 fi
16958
16959                 ;;
16960         esac
16961         ;;
16962 esac
16963
16964 if test "$with_dmalloc" = yes ; then
16965         echo "$as_me:16965: checking for dmalloc.h" >&5
16966 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
16967 if test "${ac_cv_header_dmalloc_h+set}" = set; then
16968   echo $ECHO_N "(cached) $ECHO_C" >&6
16969 else
16970   cat >conftest.$ac_ext <<_ACEOF
16971 #line 16971 "configure"
16972 #include "confdefs.h"
16973 #include <dmalloc.h>
16974 _ACEOF
16975 if { (eval echo "$as_me:16975: \"$ac_cpp conftest.$ac_ext\"") >&5
16976   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16977   ac_status=$?
16978   egrep -v '^ *\+' conftest.er1 >conftest.err
16979   rm -f conftest.er1
16980   cat conftest.err >&5
16981   echo "$as_me:16981: \$? = $ac_status" >&5
16982   (exit $ac_status); } >/dev/null; then
16983   if test -s conftest.err; then
16984     ac_cpp_err=$ac_c_preproc_warn_flag
16985   else
16986     ac_cpp_err=
16987   fi
16988 else
16989   ac_cpp_err=yes
16990 fi
16991 if test -z "$ac_cpp_err"; then
16992   ac_cv_header_dmalloc_h=yes
16993 else
16994   echo "$as_me: failed program was:" >&5
16995   cat conftest.$ac_ext >&5
16996   ac_cv_header_dmalloc_h=no
16997 fi
16998 rm -f conftest.err conftest.$ac_ext
16999 fi
17000 echo "$as_me:17000: result: $ac_cv_header_dmalloc_h" >&5
17001 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17002 if test $ac_cv_header_dmalloc_h = yes; then
17003
17004 echo "$as_me:17004: checking for dmalloc_debug in -ldmalloc" >&5
17005 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17006 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17007   echo $ECHO_N "(cached) $ECHO_C" >&6
17008 else
17009   ac_check_lib_save_LIBS=$LIBS
17010 LIBS="-ldmalloc  $LIBS"
17011 cat >conftest.$ac_ext <<_ACEOF
17012 #line 17012 "configure"
17013 #include "confdefs.h"
17014
17015 /* Override any gcc2 internal prototype to avoid an error.  */
17016 #ifdef __cplusplus
17017 extern "C"
17018 #endif
17019 /* We use char because int might match the return type of a gcc2
17020    builtin and then its argument prototype would still apply.  */
17021 char dmalloc_debug ();
17022 int
17023 main (void)
17024 {
17025 dmalloc_debug ();
17026   ;
17027   return 0;
17028 }
17029 _ACEOF
17030 rm -f conftest.$ac_objext conftest$ac_exeext
17031 if { (eval echo "$as_me:17031: \"$ac_link\"") >&5
17032   (eval $ac_link) 2>&5
17033   ac_status=$?
17034   echo "$as_me:17034: \$? = $ac_status" >&5
17035   (exit $ac_status); } &&
17036          { ac_try='test -s conftest$ac_exeext'
17037   { (eval echo "$as_me:17037: \"$ac_try\"") >&5
17038   (eval $ac_try) 2>&5
17039   ac_status=$?
17040   echo "$as_me:17040: \$? = $ac_status" >&5
17041   (exit $ac_status); }; }; then
17042   ac_cv_lib_dmalloc_dmalloc_debug=yes
17043 else
17044   echo "$as_me: failed program was:" >&5
17045 cat conftest.$ac_ext >&5
17046 ac_cv_lib_dmalloc_dmalloc_debug=no
17047 fi
17048 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17049 LIBS=$ac_check_lib_save_LIBS
17050 fi
17051 echo "$as_me:17051: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
17052 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
17053 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
17054   cat >>confdefs.h <<EOF
17055 #define HAVE_LIBDMALLOC 1
17056 EOF
17057
17058   LIBS="-ldmalloc $LIBS"
17059
17060 fi
17061
17062 fi
17063
17064 fi
17065
17066 echo "$as_me:17066: checking if you want to use dbmalloc for testing" >&5
17067 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17068
17069 # Check whether --with-dbmalloc or --without-dbmalloc was given.
17070 if test "${with_dbmalloc+set}" = set; then
17071   withval="$with_dbmalloc"
17072
17073 cat >>confdefs.h <<EOF
17074 #define USE_DBMALLOC 1
17075 EOF
17076
17077         : ${with_cflags:=-g}
17078         : ${with_no_leaks:=yes}
17079          with_dbmalloc=yes
17080 else
17081   with_dbmalloc=
17082 fi;
17083 echo "$as_me:17083: result: ${with_dbmalloc:-no}" >&5
17084 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17085
17086 case .$with_cflags in
17087 (.*-g*)
17088         case .$CFLAGS in
17089         (.*-g*)
17090                 ;;
17091         (*)
17092
17093 cf_fix_cppflags=no
17094 cf_new_cflags=
17095 cf_new_cppflags=
17096 cf_new_extra_cppflags=
17097
17098 for cf_add_cflags in -g
17099 do
17100 case $cf_fix_cppflags in
17101 (no)
17102         case $cf_add_cflags in
17103         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17104                 case $cf_add_cflags in
17105                 (-D*)
17106                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17107
17108                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17109                                 && test -z "${cf_tst_cflags}" \
17110                                 && cf_fix_cppflags=yes
17111
17112                         if test $cf_fix_cppflags = yes ; then
17113
17114         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17115         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17116
17117                                 continue
17118                         elif test "${cf_tst_cflags}" = "\"'" ; then
17119
17120         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17121         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17122
17123                                 continue
17124                         fi
17125                         ;;
17126                 esac
17127                 case "$CPPFLAGS" in
17128                 (*$cf_add_cflags)
17129                         ;;
17130                 (*)
17131                         case $cf_add_cflags in
17132                         (-D*)
17133                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17134
17135 CPPFLAGS=`echo "$CPPFLAGS" | \
17136         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17137                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17138
17139                                 ;;
17140                         esac
17141
17142         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17143         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17144
17145                         ;;
17146                 esac
17147                 ;;
17148         (*)
17149
17150         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17151         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17152
17153                 ;;
17154         esac
17155         ;;
17156 (yes)
17157
17158         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17159         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17160
17161         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17162
17163         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17164                 && test -z "${cf_tst_cflags}" \
17165                 && cf_fix_cppflags=no
17166         ;;
17167 esac
17168 done
17169
17170 if test -n "$cf_new_cflags" ; then
17171
17172         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17173         CFLAGS="${CFLAGS}$cf_new_cflags"
17174
17175 fi
17176
17177 if test -n "$cf_new_cppflags" ; then
17178
17179         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17180         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17181
17182 fi
17183
17184 if test -n "$cf_new_extra_cppflags" ; then
17185
17186         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17187         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17188
17189 fi
17190
17191                 ;;
17192         esac
17193         ;;
17194 esac
17195
17196 if test "$with_dbmalloc" = yes ; then
17197         echo "$as_me:17197: checking for dbmalloc.h" >&5
17198 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
17199 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
17200   echo $ECHO_N "(cached) $ECHO_C" >&6
17201 else
17202   cat >conftest.$ac_ext <<_ACEOF
17203 #line 17203 "configure"
17204 #include "confdefs.h"
17205 #include <dbmalloc.h>
17206 _ACEOF
17207 if { (eval echo "$as_me:17207: \"$ac_cpp conftest.$ac_ext\"") >&5
17208   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17209   ac_status=$?
17210   egrep -v '^ *\+' conftest.er1 >conftest.err
17211   rm -f conftest.er1
17212   cat conftest.err >&5
17213   echo "$as_me:17213: \$? = $ac_status" >&5
17214   (exit $ac_status); } >/dev/null; then
17215   if test -s conftest.err; then
17216     ac_cpp_err=$ac_c_preproc_warn_flag
17217   else
17218     ac_cpp_err=
17219   fi
17220 else
17221   ac_cpp_err=yes
17222 fi
17223 if test -z "$ac_cpp_err"; then
17224   ac_cv_header_dbmalloc_h=yes
17225 else
17226   echo "$as_me: failed program was:" >&5
17227   cat conftest.$ac_ext >&5
17228   ac_cv_header_dbmalloc_h=no
17229 fi
17230 rm -f conftest.err conftest.$ac_ext
17231 fi
17232 echo "$as_me:17232: result: $ac_cv_header_dbmalloc_h" >&5
17233 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
17234 if test $ac_cv_header_dbmalloc_h = yes; then
17235
17236 echo "$as_me:17236: checking for debug_malloc in -ldbmalloc" >&5
17237 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
17238 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
17239   echo $ECHO_N "(cached) $ECHO_C" >&6
17240 else
17241   ac_check_lib_save_LIBS=$LIBS
17242 LIBS="-ldbmalloc  $LIBS"
17243 cat >conftest.$ac_ext <<_ACEOF
17244 #line 17244 "configure"
17245 #include "confdefs.h"
17246
17247 /* Override any gcc2 internal prototype to avoid an error.  */
17248 #ifdef __cplusplus
17249 extern "C"
17250 #endif
17251 /* We use char because int might match the return type of a gcc2
17252    builtin and then its argument prototype would still apply.  */
17253 char debug_malloc ();
17254 int
17255 main (void)
17256 {
17257 debug_malloc ();
17258   ;
17259   return 0;
17260 }
17261 _ACEOF
17262 rm -f conftest.$ac_objext conftest$ac_exeext
17263 if { (eval echo "$as_me:17263: \"$ac_link\"") >&5
17264   (eval $ac_link) 2>&5
17265   ac_status=$?
17266   echo "$as_me:17266: \$? = $ac_status" >&5
17267   (exit $ac_status); } &&
17268          { ac_try='test -s conftest$ac_exeext'
17269   { (eval echo "$as_me:17269: \"$ac_try\"") >&5
17270   (eval $ac_try) 2>&5
17271   ac_status=$?
17272   echo "$as_me:17272: \$? = $ac_status" >&5
17273   (exit $ac_status); }; }; then
17274   ac_cv_lib_dbmalloc_debug_malloc=yes
17275 else
17276   echo "$as_me: failed program was:" >&5
17277 cat conftest.$ac_ext >&5
17278 ac_cv_lib_dbmalloc_debug_malloc=no
17279 fi
17280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17281 LIBS=$ac_check_lib_save_LIBS
17282 fi
17283 echo "$as_me:17283: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
17284 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
17285 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
17286   cat >>confdefs.h <<EOF
17287 #define HAVE_LIBDBMALLOC 1
17288 EOF
17289
17290   LIBS="-ldbmalloc $LIBS"
17291
17292 fi
17293
17294 fi
17295
17296 fi
17297
17298 echo "$as_me:17298: checking if you want to use valgrind for testing" >&5
17299 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
17300
17301 # Check whether --with-valgrind or --without-valgrind was given.
17302 if test "${with_valgrind+set}" = set; then
17303   withval="$with_valgrind"
17304
17305 cat >>confdefs.h <<EOF
17306 #define USE_VALGRIND 1
17307 EOF
17308
17309         : ${with_cflags:=-g}
17310         : ${with_no_leaks:=yes}
17311          with_valgrind=yes
17312 else
17313   with_valgrind=
17314 fi;
17315 echo "$as_me:17315: result: ${with_valgrind:-no}" >&5
17316 echo "${ECHO_T}${with_valgrind:-no}" >&6
17317
17318 case .$with_cflags in
17319 (.*-g*)
17320         case .$CFLAGS in
17321         (.*-g*)
17322                 ;;
17323         (*)
17324
17325 cf_fix_cppflags=no
17326 cf_new_cflags=
17327 cf_new_cppflags=
17328 cf_new_extra_cppflags=
17329
17330 for cf_add_cflags in -g
17331 do
17332 case $cf_fix_cppflags in
17333 (no)
17334         case $cf_add_cflags in
17335         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17336                 case $cf_add_cflags in
17337                 (-D*)
17338                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17339
17340                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17341                                 && test -z "${cf_tst_cflags}" \
17342                                 && cf_fix_cppflags=yes
17343
17344                         if test $cf_fix_cppflags = yes ; then
17345
17346         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17347         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17348
17349                                 continue
17350                         elif test "${cf_tst_cflags}" = "\"'" ; then
17351
17352         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17353         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17354
17355                                 continue
17356                         fi
17357                         ;;
17358                 esac
17359                 case "$CPPFLAGS" in
17360                 (*$cf_add_cflags)
17361                         ;;
17362                 (*)
17363                         case $cf_add_cflags in
17364                         (-D*)
17365                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17366
17367 CPPFLAGS=`echo "$CPPFLAGS" | \
17368         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17369                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17370
17371                                 ;;
17372                         esac
17373
17374         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17375         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17376
17377                         ;;
17378                 esac
17379                 ;;
17380         (*)
17381
17382         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17383         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17384
17385                 ;;
17386         esac
17387         ;;
17388 (yes)
17389
17390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17392
17393         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17394
17395         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17396                 && test -z "${cf_tst_cflags}" \
17397                 && cf_fix_cppflags=no
17398         ;;
17399 esac
17400 done
17401
17402 if test -n "$cf_new_cflags" ; then
17403
17404         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17405         CFLAGS="${CFLAGS}$cf_new_cflags"
17406
17407 fi
17408
17409 if test -n "$cf_new_cppflags" ; then
17410
17411         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17412         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17413
17414 fi
17415
17416 if test -n "$cf_new_extra_cppflags" ; then
17417
17418         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17419         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17420
17421 fi
17422
17423                 ;;
17424         esac
17425         ;;
17426 esac
17427
17428 echo "$as_me:17428: checking if you want to perform memory-leak testing" >&5
17429 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
17430
17431 # Check whether --enable-leaks or --disable-leaks was given.
17432 if test "${enable_leaks+set}" = set; then
17433   enableval="$enable_leaks"
17434   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
17435 else
17436   : ${with_no_leaks:=no}
17437 fi;
17438 echo "$as_me:17438: result: $with_no_leaks" >&5
17439 echo "${ECHO_T}$with_no_leaks" >&6
17440
17441 if test "$with_no_leaks" = yes ; then
17442
17443 cat >>confdefs.h <<\EOF
17444 #define NO_LEAKS 1
17445 EOF
17446
17447 cat >>confdefs.h <<\EOF
17448 #define YY_NO_LEAKS 1
17449 EOF
17450
17451 fi
17452
17453 cat >>confdefs.h <<\EOF
17454 #define HAVE_NC_ALLOC_H 1
17455 EOF
17456
17457 ###     use option --enable-expanded to generate certain macros as functions
17458
17459 # Check whether --enable-expanded or --disable-expanded was given.
17460 if test "${enable_expanded+set}" = set; then
17461   enableval="$enable_expanded"
17462   test "x$enableval" = xyes &&
17463 cat >>confdefs.h <<\EOF
17464 #define NCURSES_EXPANDED 1
17465 EOF
17466
17467 fi;
17468
17469 ###     use option --disable-macros to suppress macros in favor of functions
17470
17471 # Check whether --enable-macros or --disable-macros was given.
17472 if test "${enable_macros+set}" = set; then
17473   enableval="$enable_macros"
17474   test "$enableval" = no &&
17475 cat >>confdefs.h <<\EOF
17476 #define NCURSES_NOMACROS 1
17477 EOF
17478
17479 fi;
17480
17481 # Normally we only add trace() to the debug-library.  Allow this to be
17482 # extended to all models of the ncurses library:
17483 cf_all_traces=no
17484 case "$CFLAGS $CPPFLAGS" in
17485 (*-DTRACE*)
17486         cf_all_traces=yes
17487         ;;
17488 esac
17489
17490 echo "$as_me:17490: checking whether to add trace feature to all models" >&5
17491 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
17492
17493 # Check whether --with-trace or --without-trace was given.
17494 if test "${with_trace+set}" = set; then
17495   withval="$with_trace"
17496   cf_with_trace=$withval
17497 else
17498   cf_with_trace=$cf_all_traces
17499 fi;
17500 echo "$as_me:17500: result: $cf_with_trace" >&5
17501 echo "${ECHO_T}$cf_with_trace" >&6
17502
17503 if test "x$cf_with_trace" = xyes ; then
17504         LIB_TRACING=all
17505         ADA_TRACE=TRUE
17506
17507 cf_fix_cppflags=no
17508 cf_new_cflags=
17509 cf_new_cppflags=
17510 cf_new_extra_cppflags=
17511
17512 for cf_add_cflags in -DTRACE
17513 do
17514 case $cf_fix_cppflags in
17515 (no)
17516         case $cf_add_cflags in
17517         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17518                 case $cf_add_cflags in
17519                 (-D*)
17520                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17521
17522                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17523                                 && test -z "${cf_tst_cflags}" \
17524                                 && cf_fix_cppflags=yes
17525
17526                         if test $cf_fix_cppflags = yes ; then
17527
17528         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17529         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17530
17531                                 continue
17532                         elif test "${cf_tst_cflags}" = "\"'" ; then
17533
17534         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17535         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17536
17537                                 continue
17538                         fi
17539                         ;;
17540                 esac
17541                 case "$CPPFLAGS" in
17542                 (*$cf_add_cflags)
17543                         ;;
17544                 (*)
17545                         case $cf_add_cflags in
17546                         (-D*)
17547                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17548
17549 CPPFLAGS=`echo "$CPPFLAGS" | \
17550         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17551                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17552
17553                                 ;;
17554                         esac
17555
17556         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17557         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17558
17559                         ;;
17560                 esac
17561                 ;;
17562         (*)
17563
17564         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17565         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17566
17567                 ;;
17568         esac
17569         ;;
17570 (yes)
17571
17572         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17573         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17574
17575         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17576
17577         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17578                 && test -z "${cf_tst_cflags}" \
17579                 && cf_fix_cppflags=no
17580         ;;
17581 esac
17582 done
17583
17584 if test -n "$cf_new_cflags" ; then
17585
17586         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17587         CFLAGS="${CFLAGS}$cf_new_cflags"
17588
17589 fi
17590
17591 if test -n "$cf_new_cppflags" ; then
17592
17593         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17594         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17595
17596 fi
17597
17598 if test -n "$cf_new_extra_cppflags" ; then
17599
17600         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17601         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17602
17603 fi
17604
17605 cat >>confdefs.h <<\EOF
17606 #define HAVE__TRACEF 1
17607 EOF
17608
17609 else
17610         LIB_TRACING=DEBUG
17611         ADA_TRACE=FALSE
17612 fi
17613
17614 echo "$as_me:17614: checking if we want to use GNAT projects" >&5
17615 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
17616
17617 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
17618 if test "${enable_gnat_projects+set}" = set; then
17619   enableval="$enable_gnat_projects"
17620   test "$enableval" != no && enableval=yes
17621         if test "$enableval" != "yes" ; then
17622     enable_gnat_projects=no
17623         else
17624                 enable_gnat_projects=yes
17625         fi
17626 else
17627   enableval=yes
17628         enable_gnat_projects=yes
17629
17630 fi;
17631 echo "$as_me:17631: result: $enable_gnat_projects" >&5
17632 echo "${ECHO_T}$enable_gnat_projects" >&6
17633
17634 ###     Checks for libraries.
17635 case $cf_cv_system_name in
17636 (*mingw32*|*mingw64*)
17637         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
17638         # Note: WINVER may be a problem with Windows 10
17639         ;;
17640 (*)
17641 echo "$as_me:17641: checking for gettimeofday" >&5
17642 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
17643 if test "${ac_cv_func_gettimeofday+set}" = set; then
17644   echo $ECHO_N "(cached) $ECHO_C" >&6
17645 else
17646   cat >conftest.$ac_ext <<_ACEOF
17647 #line 17647 "configure"
17648 #include "confdefs.h"
17649 #define gettimeofday autoconf_temporary
17650 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17651 #undef gettimeofday
17652
17653 #ifdef __cplusplus
17654 extern "C"
17655 #endif
17656
17657 /* We use char because int might match the return type of a gcc2
17658    builtin and then its argument prototype would still apply.  */
17659 char gettimeofday (void);
17660
17661 int
17662 main (void)
17663 {
17664
17665 /* The GNU C library defines stubs for functions which it implements
17666     to always fail with ENOSYS.  Some functions are actually named
17667     something starting with __ and the normal name is an alias.  */
17668 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
17669 #error found stub for gettimeofday
17670 #endif
17671
17672         return gettimeofday ();
17673   ;
17674   return 0;
17675 }
17676 _ACEOF
17677 rm -f conftest.$ac_objext conftest$ac_exeext
17678 if { (eval echo "$as_me:17678: \"$ac_link\"") >&5
17679   (eval $ac_link) 2>&5
17680   ac_status=$?
17681   echo "$as_me:17681: \$? = $ac_status" >&5
17682   (exit $ac_status); } &&
17683          { ac_try='test -s conftest$ac_exeext'
17684   { (eval echo "$as_me:17684: \"$ac_try\"") >&5
17685   (eval $ac_try) 2>&5
17686   ac_status=$?
17687   echo "$as_me:17687: \$? = $ac_status" >&5
17688   (exit $ac_status); }; }; then
17689   ac_cv_func_gettimeofday=yes
17690 else
17691   echo "$as_me: failed program was:" >&5
17692 cat conftest.$ac_ext >&5
17693 ac_cv_func_gettimeofday=no
17694 fi
17695 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17696 fi
17697 echo "$as_me:17697: result: $ac_cv_func_gettimeofday" >&5
17698 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
17699 if test $ac_cv_func_gettimeofday = yes; then
17700
17701 cat >>confdefs.h <<\EOF
17702 #define HAVE_GETTIMEOFDAY 1
17703 EOF
17704
17705 else
17706
17707 echo "$as_me:17707: checking for gettimeofday in -lbsd" >&5
17708 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
17709 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
17710   echo $ECHO_N "(cached) $ECHO_C" >&6
17711 else
17712   ac_check_lib_save_LIBS=$LIBS
17713 LIBS="-lbsd  $LIBS"
17714 cat >conftest.$ac_ext <<_ACEOF
17715 #line 17715 "configure"
17716 #include "confdefs.h"
17717
17718 /* Override any gcc2 internal prototype to avoid an error.  */
17719 #ifdef __cplusplus
17720 extern "C"
17721 #endif
17722 /* We use char because int might match the return type of a gcc2
17723    builtin and then its argument prototype would still apply.  */
17724 char gettimeofday ();
17725 int
17726 main (void)
17727 {
17728 gettimeofday ();
17729   ;
17730   return 0;
17731 }
17732 _ACEOF
17733 rm -f conftest.$ac_objext conftest$ac_exeext
17734 if { (eval echo "$as_me:17734: \"$ac_link\"") >&5
17735   (eval $ac_link) 2>&5
17736   ac_status=$?
17737   echo "$as_me:17737: \$? = $ac_status" >&5
17738   (exit $ac_status); } &&
17739          { ac_try='test -s conftest$ac_exeext'
17740   { (eval echo "$as_me:17740: \"$ac_try\"") >&5
17741   (eval $ac_try) 2>&5
17742   ac_status=$?
17743   echo "$as_me:17743: \$? = $ac_status" >&5
17744   (exit $ac_status); }; }; then
17745   ac_cv_lib_bsd_gettimeofday=yes
17746 else
17747   echo "$as_me: failed program was:" >&5
17748 cat conftest.$ac_ext >&5
17749 ac_cv_lib_bsd_gettimeofday=no
17750 fi
17751 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17752 LIBS=$ac_check_lib_save_LIBS
17753 fi
17754 echo "$as_me:17754: result: $ac_cv_lib_bsd_gettimeofday" >&5
17755 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
17756 if test $ac_cv_lib_bsd_gettimeofday = yes; then
17757
17758 cat >>confdefs.h <<\EOF
17759 #define HAVE_GETTIMEOFDAY 1
17760 EOF
17761
17762 cf_add_libs="$LIBS"
17763 # reverse order
17764 cf_add_0lib=
17765 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17766 # filter duplicates
17767 for cf_add_1lib in $cf_add_0lib; do
17768         for cf_add_2lib in $cf_add_libs; do
17769                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17770                         cf_add_1lib=
17771                         break
17772                 fi
17773         done
17774         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17775 done
17776 LIBS="$cf_add_libs"
17777
17778 fi
17779
17780 fi
17781         ;;
17782 esac
17783
17784 echo "$as_me:17784: checking if -lm needed for math functions" >&5
17785 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
17786 if test "${cf_cv_need_libm+set}" = set; then
17787   echo $ECHO_N "(cached) $ECHO_C" >&6
17788 else
17789
17790         cat >conftest.$ac_ext <<_ACEOF
17791 #line 17791 "configure"
17792 #include "confdefs.h"
17793
17794         #include <stdio.h>
17795         #include <stdlib.h>
17796         #include <math.h>
17797
17798 int
17799 main (void)
17800 {
17801 double x = rand(); printf("result = %g\n", pow(sin(x),x))
17802   ;
17803   return 0;
17804 }
17805 _ACEOF
17806 rm -f conftest.$ac_objext conftest$ac_exeext
17807 if { (eval echo "$as_me:17807: \"$ac_link\"") >&5
17808   (eval $ac_link) 2>&5
17809   ac_status=$?
17810   echo "$as_me:17810: \$? = $ac_status" >&5
17811   (exit $ac_status); } &&
17812          { ac_try='test -s conftest$ac_exeext'
17813   { (eval echo "$as_me:17813: \"$ac_try\"") >&5
17814   (eval $ac_try) 2>&5
17815   ac_status=$?
17816   echo "$as_me:17816: \$? = $ac_status" >&5
17817   (exit $ac_status); }; }; then
17818   cf_cv_need_libm=no
17819 else
17820   echo "$as_me: failed program was:" >&5
17821 cat conftest.$ac_ext >&5
17822 cf_cv_need_libm=yes
17823 fi
17824 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17825 fi
17826 echo "$as_me:17826: result: $cf_cv_need_libm" >&5
17827 echo "${ECHO_T}$cf_cv_need_libm" >&6
17828 if test "$cf_cv_need_libm" = yes
17829 then
17830 MATH_LIB=-lm
17831 fi
17832
17833 ###     Checks for header files.
17834 echo "$as_me:17834: checking for ANSI C header files" >&5
17835 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
17836 if test "${ac_cv_header_stdc+set}" = set; then
17837   echo $ECHO_N "(cached) $ECHO_C" >&6
17838 else
17839   cat >conftest.$ac_ext <<_ACEOF
17840 #line 17840 "configure"
17841 #include "confdefs.h"
17842 #include <stdlib.h>
17843 #include <stdarg.h>
17844 #include <string.h>
17845 #include <float.h>
17846
17847 _ACEOF
17848 if { (eval echo "$as_me:17848: \"$ac_cpp conftest.$ac_ext\"") >&5
17849   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17850   ac_status=$?
17851   egrep -v '^ *\+' conftest.er1 >conftest.err
17852   rm -f conftest.er1
17853   cat conftest.err >&5
17854   echo "$as_me:17854: \$? = $ac_status" >&5
17855   (exit $ac_status); } >/dev/null; then
17856   if test -s conftest.err; then
17857     ac_cpp_err=$ac_c_preproc_warn_flag
17858   else
17859     ac_cpp_err=
17860   fi
17861 else
17862   ac_cpp_err=yes
17863 fi
17864 if test -z "$ac_cpp_err"; then
17865   ac_cv_header_stdc=yes
17866 else
17867   echo "$as_me: failed program was:" >&5
17868   cat conftest.$ac_ext >&5
17869   ac_cv_header_stdc=no
17870 fi
17871 rm -f conftest.err conftest.$ac_ext
17872
17873 if test $ac_cv_header_stdc = yes; then
17874   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
17875   cat >conftest.$ac_ext <<_ACEOF
17876 #line 17876 "configure"
17877 #include "confdefs.h"
17878 #include <string.h>
17879
17880 _ACEOF
17881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17882   egrep "memchr" >/dev/null 2>&1; then
17883   :
17884 else
17885   ac_cv_header_stdc=no
17886 fi
17887 rm -rf conftest*
17888
17889 fi
17890
17891 if test $ac_cv_header_stdc = yes; then
17892   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
17893   cat >conftest.$ac_ext <<_ACEOF
17894 #line 17894 "configure"
17895 #include "confdefs.h"
17896 #include <stdlib.h>
17897
17898 _ACEOF
17899 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17900   egrep "free" >/dev/null 2>&1; then
17901   :
17902 else
17903   ac_cv_header_stdc=no
17904 fi
17905 rm -rf conftest*
17906
17907 fi
17908
17909 if test $ac_cv_header_stdc = yes; then
17910   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
17911   if test "$cross_compiling" = yes; then
17912   :
17913 else
17914   cat >conftest.$ac_ext <<_ACEOF
17915 #line 17915 "configure"
17916 #include "confdefs.h"
17917 #include <ctype.h>
17918 #if ((' ' & 0x0FF) == 0x020)
17919 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
17920 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
17921 #else
17922 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
17923                      || ('j' <= (c) && (c) <= 'r') \
17924                      || ('s' <= (c) && (c) <= 'z'))
17925 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
17926 #endif
17927
17928 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
17929 int
17930 main (void)
17931 {
17932   int i;
17933   for (i = 0; i < 256; i++)
17934     if (XOR (islower (i), ISLOWER (i))
17935         || toupper (i) != TOUPPER (i))
17936       $ac_main_return(2);
17937   $ac_main_return (0);
17938 }
17939 _ACEOF
17940 rm -f conftest$ac_exeext
17941 if { (eval echo "$as_me:17941: \"$ac_link\"") >&5
17942   (eval $ac_link) 2>&5
17943   ac_status=$?
17944   echo "$as_me:17944: \$? = $ac_status" >&5
17945   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17946   { (eval echo "$as_me:17946: \"$ac_try\"") >&5
17947   (eval $ac_try) 2>&5
17948   ac_status=$?
17949   echo "$as_me:17949: \$? = $ac_status" >&5
17950   (exit $ac_status); }; }; then
17951   :
17952 else
17953   echo "$as_me: program exited with status $ac_status" >&5
17954 echo "$as_me: failed program was:" >&5
17955 cat conftest.$ac_ext >&5
17956 ac_cv_header_stdc=no
17957 fi
17958 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17959 fi
17960 fi
17961 fi
17962 echo "$as_me:17962: result: $ac_cv_header_stdc" >&5
17963 echo "${ECHO_T}$ac_cv_header_stdc" >&6
17964 if test $ac_cv_header_stdc = yes; then
17965
17966 cat >>confdefs.h <<\EOF
17967 #define STDC_HEADERS 1
17968 EOF
17969
17970 fi
17971
17972 ac_header_dirent=no
17973 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
17974   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
17975 echo "$as_me:17975: checking for $ac_hdr that defines DIR" >&5
17976 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
17977 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17978   echo $ECHO_N "(cached) $ECHO_C" >&6
17979 else
17980   cat >conftest.$ac_ext <<_ACEOF
17981 #line 17981 "configure"
17982 #include "confdefs.h"
17983 #include <sys/types.h>
17984 #include <$ac_hdr>
17985
17986 int
17987 main (void)
17988 {
17989 if ((DIR *) 0)
17990 return 0;
17991   ;
17992   return 0;
17993 }
17994 _ACEOF
17995 rm -f conftest.$ac_objext
17996 if { (eval echo "$as_me:17996: \"$ac_compile\"") >&5
17997   (eval $ac_compile) 2>&5
17998   ac_status=$?
17999   echo "$as_me:17999: \$? = $ac_status" >&5
18000   (exit $ac_status); } &&
18001          { ac_try='test -s conftest.$ac_objext'
18002   { (eval echo "$as_me:18002: \"$ac_try\"") >&5
18003   (eval $ac_try) 2>&5
18004   ac_status=$?
18005   echo "$as_me:18005: \$? = $ac_status" >&5
18006   (exit $ac_status); }; }; then
18007   eval "$as_ac_Header=yes"
18008 else
18009   echo "$as_me: failed program was:" >&5
18010 cat conftest.$ac_ext >&5
18011 eval "$as_ac_Header=no"
18012 fi
18013 rm -f conftest.$ac_objext conftest.$ac_ext
18014 fi
18015 echo "$as_me:18015: result: `eval echo '${'$as_ac_Header'}'`" >&5
18016 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18017 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18018   cat >>confdefs.h <<EOF
18019 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
18020 EOF
18021
18022 ac_header_dirent=$ac_hdr; break
18023 fi
18024
18025 done
18026 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
18027 if test $ac_header_dirent = dirent.h; then
18028   echo "$as_me:18028: checking for opendir in -ldir" >&5
18029 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
18030 if test "${ac_cv_lib_dir_opendir+set}" = set; then
18031   echo $ECHO_N "(cached) $ECHO_C" >&6
18032 else
18033   ac_check_lib_save_LIBS=$LIBS
18034 LIBS="-ldir  $LIBS"
18035 cat >conftest.$ac_ext <<_ACEOF
18036 #line 18036 "configure"
18037 #include "confdefs.h"
18038
18039 /* Override any gcc2 internal prototype to avoid an error.  */
18040 #ifdef __cplusplus
18041 extern "C"
18042 #endif
18043 /* We use char because int might match the return type of a gcc2
18044    builtin and then its argument prototype would still apply.  */
18045 char opendir ();
18046 int
18047 main (void)
18048 {
18049 opendir ();
18050   ;
18051   return 0;
18052 }
18053 _ACEOF
18054 rm -f conftest.$ac_objext conftest$ac_exeext
18055 if { (eval echo "$as_me:18055: \"$ac_link\"") >&5
18056   (eval $ac_link) 2>&5
18057   ac_status=$?
18058   echo "$as_me:18058: \$? = $ac_status" >&5
18059   (exit $ac_status); } &&
18060          { ac_try='test -s conftest$ac_exeext'
18061   { (eval echo "$as_me:18061: \"$ac_try\"") >&5
18062   (eval $ac_try) 2>&5
18063   ac_status=$?
18064   echo "$as_me:18064: \$? = $ac_status" >&5
18065   (exit $ac_status); }; }; then
18066   ac_cv_lib_dir_opendir=yes
18067 else
18068   echo "$as_me: failed program was:" >&5
18069 cat conftest.$ac_ext >&5
18070 ac_cv_lib_dir_opendir=no
18071 fi
18072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18073 LIBS=$ac_check_lib_save_LIBS
18074 fi
18075 echo "$as_me:18075: result: $ac_cv_lib_dir_opendir" >&5
18076 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
18077 if test $ac_cv_lib_dir_opendir = yes; then
18078   LIBS="$LIBS -ldir"
18079 fi
18080
18081 else
18082   echo "$as_me:18082: checking for opendir in -lx" >&5
18083 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
18084 if test "${ac_cv_lib_x_opendir+set}" = set; then
18085   echo $ECHO_N "(cached) $ECHO_C" >&6
18086 else
18087   ac_check_lib_save_LIBS=$LIBS
18088 LIBS="-lx  $LIBS"
18089 cat >conftest.$ac_ext <<_ACEOF
18090 #line 18090 "configure"
18091 #include "confdefs.h"
18092
18093 /* Override any gcc2 internal prototype to avoid an error.  */
18094 #ifdef __cplusplus
18095 extern "C"
18096 #endif
18097 /* We use char because int might match the return type of a gcc2
18098    builtin and then its argument prototype would still apply.  */
18099 char opendir ();
18100 int
18101 main (void)
18102 {
18103 opendir ();
18104   ;
18105   return 0;
18106 }
18107 _ACEOF
18108 rm -f conftest.$ac_objext conftest$ac_exeext
18109 if { (eval echo "$as_me:18109: \"$ac_link\"") >&5
18110   (eval $ac_link) 2>&5
18111   ac_status=$?
18112   echo "$as_me:18112: \$? = $ac_status" >&5
18113   (exit $ac_status); } &&
18114          { ac_try='test -s conftest$ac_exeext'
18115   { (eval echo "$as_me:18115: \"$ac_try\"") >&5
18116   (eval $ac_try) 2>&5
18117   ac_status=$?
18118   echo "$as_me:18118: \$? = $ac_status" >&5
18119   (exit $ac_status); }; }; then
18120   ac_cv_lib_x_opendir=yes
18121 else
18122   echo "$as_me: failed program was:" >&5
18123 cat conftest.$ac_ext >&5
18124 ac_cv_lib_x_opendir=no
18125 fi
18126 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18127 LIBS=$ac_check_lib_save_LIBS
18128 fi
18129 echo "$as_me:18129: result: $ac_cv_lib_x_opendir" >&5
18130 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
18131 if test $ac_cv_lib_x_opendir = yes; then
18132   LIBS="$LIBS -lx"
18133 fi
18134
18135 fi
18136
18137 echo "$as_me:18137: checking whether time.h and sys/time.h may both be included" >&5
18138 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18139 if test "${ac_cv_header_time+set}" = set; then
18140   echo $ECHO_N "(cached) $ECHO_C" >&6
18141 else
18142   cat >conftest.$ac_ext <<_ACEOF
18143 #line 18143 "configure"
18144 #include "confdefs.h"
18145 #include <sys/types.h>
18146 #include <sys/time.h>
18147 #include <time.h>
18148
18149 int
18150 main (void)
18151 {
18152 if ((struct tm *) 0)
18153 return 0;
18154   ;
18155   return 0;
18156 }
18157 _ACEOF
18158 rm -f conftest.$ac_objext
18159 if { (eval echo "$as_me:18159: \"$ac_compile\"") >&5
18160   (eval $ac_compile) 2>&5
18161   ac_status=$?
18162   echo "$as_me:18162: \$? = $ac_status" >&5
18163   (exit $ac_status); } &&
18164          { ac_try='test -s conftest.$ac_objext'
18165   { (eval echo "$as_me:18165: \"$ac_try\"") >&5
18166   (eval $ac_try) 2>&5
18167   ac_status=$?
18168   echo "$as_me:18168: \$? = $ac_status" >&5
18169   (exit $ac_status); }; }; then
18170   ac_cv_header_time=yes
18171 else
18172   echo "$as_me: failed program was:" >&5
18173 cat conftest.$ac_ext >&5
18174 ac_cv_header_time=no
18175 fi
18176 rm -f conftest.$ac_objext conftest.$ac_ext
18177 fi
18178 echo "$as_me:18178: result: $ac_cv_header_time" >&5
18179 echo "${ECHO_T}$ac_cv_header_time" >&6
18180 if test $ac_cv_header_time = yes; then
18181
18182 cat >>confdefs.h <<\EOF
18183 #define TIME_WITH_SYS_TIME 1
18184 EOF
18185
18186 fi
18187
18188 cf_regex_func=no
18189
18190 cf_regex_libs="regex re"
18191 case $host_os in
18192 (mingw*)
18193         cf_regex_libs="gnurx $cf_regex_libs"
18194         ;;
18195 esac
18196
18197 echo "$as_me:18197: checking for regcomp" >&5
18198 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
18199 if test "${ac_cv_func_regcomp+set}" = set; then
18200   echo $ECHO_N "(cached) $ECHO_C" >&6
18201 else
18202   cat >conftest.$ac_ext <<_ACEOF
18203 #line 18203 "configure"
18204 #include "confdefs.h"
18205 #define regcomp autoconf_temporary
18206 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18207 #undef regcomp
18208
18209 #ifdef __cplusplus
18210 extern "C"
18211 #endif
18212
18213 /* We use char because int might match the return type of a gcc2
18214    builtin and then its argument prototype would still apply.  */
18215 char regcomp (void);
18216
18217 int
18218 main (void)
18219 {
18220
18221 /* The GNU C library defines stubs for functions which it implements
18222     to always fail with ENOSYS.  Some functions are actually named
18223     something starting with __ and the normal name is an alias.  */
18224 #if defined (__stub_regcomp) || defined (__stub___regcomp)
18225 #error found stub for regcomp
18226 #endif
18227
18228         return regcomp ();
18229   ;
18230   return 0;
18231 }
18232 _ACEOF
18233 rm -f conftest.$ac_objext conftest$ac_exeext
18234 if { (eval echo "$as_me:18234: \"$ac_link\"") >&5
18235   (eval $ac_link) 2>&5
18236   ac_status=$?
18237   echo "$as_me:18237: \$? = $ac_status" >&5
18238   (exit $ac_status); } &&
18239          { ac_try='test -s conftest$ac_exeext'
18240   { (eval echo "$as_me:18240: \"$ac_try\"") >&5
18241   (eval $ac_try) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); }; }; then
18245   ac_cv_func_regcomp=yes
18246 else
18247   echo "$as_me: failed program was:" >&5
18248 cat conftest.$ac_ext >&5
18249 ac_cv_func_regcomp=no
18250 fi
18251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18252 fi
18253 echo "$as_me:18253: result: $ac_cv_func_regcomp" >&5
18254 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
18255 if test $ac_cv_func_regcomp = yes; then
18256   cf_regex_func=regcomp
18257 else
18258
18259         for cf_regex_lib in $cf_regex_libs
18260         do
18261                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
18262 echo "$as_me:18262: checking for regcomp in -l$cf_regex_lib" >&5
18263 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
18264 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18265   echo $ECHO_N "(cached) $ECHO_C" >&6
18266 else
18267   ac_check_lib_save_LIBS=$LIBS
18268 LIBS="-l$cf_regex_lib  $LIBS"
18269 cat >conftest.$ac_ext <<_ACEOF
18270 #line 18270 "configure"
18271 #include "confdefs.h"
18272
18273 /* Override any gcc2 internal prototype to avoid an error.  */
18274 #ifdef __cplusplus
18275 extern "C"
18276 #endif
18277 /* We use char because int might match the return type of a gcc2
18278    builtin and then its argument prototype would still apply.  */
18279 char regcomp ();
18280 int
18281 main (void)
18282 {
18283 regcomp ();
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 rm -f conftest.$ac_objext conftest$ac_exeext
18289 if { (eval echo "$as_me:18289: \"$ac_link\"") >&5
18290   (eval $ac_link) 2>&5
18291   ac_status=$?
18292   echo "$as_me:18292: \$? = $ac_status" >&5
18293   (exit $ac_status); } &&
18294          { ac_try='test -s conftest$ac_exeext'
18295   { (eval echo "$as_me:18295: \"$ac_try\"") >&5
18296   (eval $ac_try) 2>&5
18297   ac_status=$?
18298   echo "$as_me:18298: \$? = $ac_status" >&5
18299   (exit $ac_status); }; }; then
18300   eval "$as_ac_Lib=yes"
18301 else
18302   echo "$as_me: failed program was:" >&5
18303 cat conftest.$ac_ext >&5
18304 eval "$as_ac_Lib=no"
18305 fi
18306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18307 LIBS=$ac_check_lib_save_LIBS
18308 fi
18309 echo "$as_me:18309: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18310 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18311 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18312
18313 cf_add_libs="$LIBS"
18314 # reverse order
18315 cf_add_0lib=
18316 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18317 # filter duplicates
18318 for cf_add_1lib in $cf_add_0lib; do
18319         for cf_add_2lib in $cf_add_libs; do
18320                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18321                         cf_add_1lib=
18322                         break
18323                 fi
18324         done
18325         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18326 done
18327 LIBS="$cf_add_libs"
18328
18329                                 cf_regex_func=regcomp
18330                                 break
18331 fi
18332
18333         done
18334
18335 fi
18336
18337 if test "$cf_regex_func" = no ; then
18338         echo "$as_me:18338: checking for compile" >&5
18339 echo $ECHO_N "checking for compile... $ECHO_C" >&6
18340 if test "${ac_cv_func_compile+set}" = set; then
18341   echo $ECHO_N "(cached) $ECHO_C" >&6
18342 else
18343   cat >conftest.$ac_ext <<_ACEOF
18344 #line 18344 "configure"
18345 #include "confdefs.h"
18346 #define compile autoconf_temporary
18347 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18348 #undef compile
18349
18350 #ifdef __cplusplus
18351 extern "C"
18352 #endif
18353
18354 /* We use char because int might match the return type of a gcc2
18355    builtin and then its argument prototype would still apply.  */
18356 char compile (void);
18357
18358 int
18359 main (void)
18360 {
18361
18362 /* The GNU C library defines stubs for functions which it implements
18363     to always fail with ENOSYS.  Some functions are actually named
18364     something starting with __ and the normal name is an alias.  */
18365 #if defined (__stub_compile) || defined (__stub___compile)
18366 #error found stub for compile
18367 #endif
18368
18369         return compile ();
18370   ;
18371   return 0;
18372 }
18373 _ACEOF
18374 rm -f conftest.$ac_objext conftest$ac_exeext
18375 if { (eval echo "$as_me:18375: \"$ac_link\"") >&5
18376   (eval $ac_link) 2>&5
18377   ac_status=$?
18378   echo "$as_me:18378: \$? = $ac_status" >&5
18379   (exit $ac_status); } &&
18380          { ac_try='test -s conftest$ac_exeext'
18381   { (eval echo "$as_me:18381: \"$ac_try\"") >&5
18382   (eval $ac_try) 2>&5
18383   ac_status=$?
18384   echo "$as_me:18384: \$? = $ac_status" >&5
18385   (exit $ac_status); }; }; then
18386   ac_cv_func_compile=yes
18387 else
18388   echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 ac_cv_func_compile=no
18391 fi
18392 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18393 fi
18394 echo "$as_me:18394: result: $ac_cv_func_compile" >&5
18395 echo "${ECHO_T}$ac_cv_func_compile" >&6
18396 if test $ac_cv_func_compile = yes; then
18397   cf_regex_func=compile
18398 else
18399
18400                 echo "$as_me:18400: checking for compile in -lgen" >&5
18401 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18402 if test "${ac_cv_lib_gen_compile+set}" = set; then
18403   echo $ECHO_N "(cached) $ECHO_C" >&6
18404 else
18405   ac_check_lib_save_LIBS=$LIBS
18406 LIBS="-lgen  $LIBS"
18407 cat >conftest.$ac_ext <<_ACEOF
18408 #line 18408 "configure"
18409 #include "confdefs.h"
18410
18411 /* Override any gcc2 internal prototype to avoid an error.  */
18412 #ifdef __cplusplus
18413 extern "C"
18414 #endif
18415 /* We use char because int might match the return type of a gcc2
18416    builtin and then its argument prototype would still apply.  */
18417 char compile ();
18418 int
18419 main (void)
18420 {
18421 compile ();
18422   ;
18423   return 0;
18424 }
18425 _ACEOF
18426 rm -f conftest.$ac_objext conftest$ac_exeext
18427 if { (eval echo "$as_me:18427: \"$ac_link\"") >&5
18428   (eval $ac_link) 2>&5
18429   ac_status=$?
18430   echo "$as_me:18430: \$? = $ac_status" >&5
18431   (exit $ac_status); } &&
18432          { ac_try='test -s conftest$ac_exeext'
18433   { (eval echo "$as_me:18433: \"$ac_try\"") >&5
18434   (eval $ac_try) 2>&5
18435   ac_status=$?
18436   echo "$as_me:18436: \$? = $ac_status" >&5
18437   (exit $ac_status); }; }; then
18438   ac_cv_lib_gen_compile=yes
18439 else
18440   echo "$as_me: failed program was:" >&5
18441 cat conftest.$ac_ext >&5
18442 ac_cv_lib_gen_compile=no
18443 fi
18444 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18445 LIBS=$ac_check_lib_save_LIBS
18446 fi
18447 echo "$as_me:18447: result: $ac_cv_lib_gen_compile" >&5
18448 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18449 if test $ac_cv_lib_gen_compile = yes; then
18450
18451 cf_add_libs="$LIBS"
18452 # reverse order
18453 cf_add_0lib=
18454 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18455 # filter duplicates
18456 for cf_add_1lib in $cf_add_0lib; do
18457         for cf_add_2lib in $cf_add_libs; do
18458                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18459                         cf_add_1lib=
18460                         break
18461                 fi
18462         done
18463         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18464 done
18465 LIBS="$cf_add_libs"
18466
18467                                 cf_regex_func=compile
18468 fi
18469
18470 fi
18471
18472 fi
18473
18474 if test "$cf_regex_func" = no ; then
18475         { echo "$as_me:18475: WARNING: cannot find regular expression library" >&5
18476 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18477 fi
18478
18479 echo "$as_me:18479: checking for regular-expression headers" >&5
18480 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18481 if test "${cf_cv_regex_hdrs+set}" = set; then
18482   echo $ECHO_N "(cached) $ECHO_C" >&6
18483 else
18484
18485 cf_cv_regex_hdrs=no
18486 case $cf_regex_func in
18487 (compile)
18488         for cf_regex_hdr in regexp.h regexpr.h
18489         do
18490                 cat >conftest.$ac_ext <<_ACEOF
18491 #line 18491 "configure"
18492 #include "confdefs.h"
18493 #include <$cf_regex_hdr>
18494 int
18495 main (void)
18496 {
18497
18498                         char *p = compile("", "", "", 0);
18499                         int x = step("", "");
18500                         (void)p;
18501                         (void)x;
18502
18503   ;
18504   return 0;
18505 }
18506 _ACEOF
18507 rm -f conftest.$ac_objext conftest$ac_exeext
18508 if { (eval echo "$as_me:18508: \"$ac_link\"") >&5
18509   (eval $ac_link) 2>&5
18510   ac_status=$?
18511   echo "$as_me:18511: \$? = $ac_status" >&5
18512   (exit $ac_status); } &&
18513          { ac_try='test -s conftest$ac_exeext'
18514   { (eval echo "$as_me:18514: \"$ac_try\"") >&5
18515   (eval $ac_try) 2>&5
18516   ac_status=$?
18517   echo "$as_me:18517: \$? = $ac_status" >&5
18518   (exit $ac_status); }; }; then
18519
18520                         cf_cv_regex_hdrs=$cf_regex_hdr
18521                         break
18522
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 cat conftest.$ac_ext >&5
18526 fi
18527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18528         done
18529         ;;
18530 (*)
18531         for cf_regex_hdr in regex.h
18532         do
18533                 cat >conftest.$ac_ext <<_ACEOF
18534 #line 18534 "configure"
18535 #include "confdefs.h"
18536 #include <sys/types.h>
18537 #include <$cf_regex_hdr>
18538 int
18539 main (void)
18540 {
18541
18542                         regex_t *p = 0;
18543                         int x = regcomp(p, "", 0);
18544                         int y = regexec(p, "", 0, 0, 0);
18545                         (void)x;
18546                         (void)y;
18547                         regfree(p);
18548
18549   ;
18550   return 0;
18551 }
18552 _ACEOF
18553 rm -f conftest.$ac_objext conftest$ac_exeext
18554 if { (eval echo "$as_me:18554: \"$ac_link\"") >&5
18555   (eval $ac_link) 2>&5
18556   ac_status=$?
18557   echo "$as_me:18557: \$? = $ac_status" >&5
18558   (exit $ac_status); } &&
18559          { ac_try='test -s conftest$ac_exeext'
18560   { (eval echo "$as_me:18560: \"$ac_try\"") >&5
18561   (eval $ac_try) 2>&5
18562   ac_status=$?
18563   echo "$as_me:18563: \$? = $ac_status" >&5
18564   (exit $ac_status); }; }; then
18565
18566                         cf_cv_regex_hdrs=$cf_regex_hdr
18567                         break
18568
18569 else
18570   echo "$as_me: failed program was:" >&5
18571 cat conftest.$ac_ext >&5
18572 fi
18573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18574         done
18575         ;;
18576 esac
18577
18578 fi
18579 echo "$as_me:18579: result: $cf_cv_regex_hdrs" >&5
18580 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18581
18582 case $cf_cv_regex_hdrs in
18583         (no)            { echo "$as_me:18583: WARNING: no regular expression header found" >&5
18584 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18585         (regex.h)
18586 cat >>confdefs.h <<\EOF
18587 #define HAVE_REGEX_H_FUNCS 1
18588 EOF
18589  ;;
18590         (regexp.h)
18591 cat >>confdefs.h <<\EOF
18592 #define HAVE_REGEXP_H_FUNCS 1
18593 EOF
18594  ;;
18595         (regexpr.h)
18596 cat >>confdefs.h <<\EOF
18597 #define HAVE_REGEXPR_H_FUNCS 1
18598 EOF
18599  ;;
18600 esac
18601
18602 for ac_header in \
18603 fcntl.h \
18604 getopt.h \
18605 limits.h \
18606 locale.h \
18607 math.h \
18608 poll.h \
18609 sys/bsdtypes.h \
18610 sys/ioctl.h \
18611 sys/param.h \
18612 sys/poll.h \
18613 sys/select.h \
18614 sys/time.h \
18615 sys/times.h \
18616 ttyent.h \
18617 unistd.h \
18618 wctype.h \
18619
18620 do
18621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18622 echo "$as_me:18622: checking for $ac_header" >&5
18623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18625   echo $ECHO_N "(cached) $ECHO_C" >&6
18626 else
18627   cat >conftest.$ac_ext <<_ACEOF
18628 #line 18628 "configure"
18629 #include "confdefs.h"
18630 #include <$ac_header>
18631 _ACEOF
18632 if { (eval echo "$as_me:18632: \"$ac_cpp conftest.$ac_ext\"") >&5
18633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18634   ac_status=$?
18635   egrep -v '^ *\+' conftest.er1 >conftest.err
18636   rm -f conftest.er1
18637   cat conftest.err >&5
18638   echo "$as_me:18638: \$? = $ac_status" >&5
18639   (exit $ac_status); } >/dev/null; then
18640   if test -s conftest.err; then
18641     ac_cpp_err=$ac_c_preproc_warn_flag
18642   else
18643     ac_cpp_err=
18644   fi
18645 else
18646   ac_cpp_err=yes
18647 fi
18648 if test -z "$ac_cpp_err"; then
18649   eval "$as_ac_Header=yes"
18650 else
18651   echo "$as_me: failed program was:" >&5
18652   cat conftest.$ac_ext >&5
18653   eval "$as_ac_Header=no"
18654 fi
18655 rm -f conftest.err conftest.$ac_ext
18656 fi
18657 echo "$as_me:18657: result: `eval echo '${'$as_ac_Header'}'`" >&5
18658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18660   cat >>confdefs.h <<EOF
18661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18662 EOF
18663
18664 fi
18665 done
18666
18667 for ac_header in unistd.h getopt.h
18668 do
18669 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18670 echo "$as_me:18670: checking for $ac_header" >&5
18671 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18672 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18673   echo $ECHO_N "(cached) $ECHO_C" >&6
18674 else
18675   cat >conftest.$ac_ext <<_ACEOF
18676 #line 18676 "configure"
18677 #include "confdefs.h"
18678 #include <$ac_header>
18679 _ACEOF
18680 if { (eval echo "$as_me:18680: \"$ac_cpp conftest.$ac_ext\"") >&5
18681   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18682   ac_status=$?
18683   egrep -v '^ *\+' conftest.er1 >conftest.err
18684   rm -f conftest.er1
18685   cat conftest.err >&5
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } >/dev/null; then
18688   if test -s conftest.err; then
18689     ac_cpp_err=$ac_c_preproc_warn_flag
18690   else
18691     ac_cpp_err=
18692   fi
18693 else
18694   ac_cpp_err=yes
18695 fi
18696 if test -z "$ac_cpp_err"; then
18697   eval "$as_ac_Header=yes"
18698 else
18699   echo "$as_me: failed program was:" >&5
18700   cat conftest.$ac_ext >&5
18701   eval "$as_ac_Header=no"
18702 fi
18703 rm -f conftest.err conftest.$ac_ext
18704 fi
18705 echo "$as_me:18705: result: `eval echo '${'$as_ac_Header'}'`" >&5
18706 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18707 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18708   cat >>confdefs.h <<EOF
18709 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18710 EOF
18711
18712 fi
18713 done
18714
18715 echo "$as_me:18715: checking for header declaring getopt variables" >&5
18716 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18717 if test "${cf_cv_getopt_header+set}" = set; then
18718   echo $ECHO_N "(cached) $ECHO_C" >&6
18719 else
18720
18721 cf_cv_getopt_header=none
18722 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18723 do
18724 cat >conftest.$ac_ext <<_ACEOF
18725 #line 18725 "configure"
18726 #include "confdefs.h"
18727
18728 #include <$cf_header>
18729 int
18730 main (void)
18731 {
18732 int x = optind; char *y = optarg
18733   ;
18734   return 0;
18735 }
18736 _ACEOF
18737 rm -f conftest.$ac_objext
18738 if { (eval echo "$as_me:18738: \"$ac_compile\"") >&5
18739   (eval $ac_compile) 2>&5
18740   ac_status=$?
18741   echo "$as_me:18741: \$? = $ac_status" >&5
18742   (exit $ac_status); } &&
18743          { ac_try='test -s conftest.$ac_objext'
18744   { (eval echo "$as_me:18744: \"$ac_try\"") >&5
18745   (eval $ac_try) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); }; }; then
18749   cf_cv_getopt_header=$cf_header
18750  break
18751 else
18752   echo "$as_me: failed program was:" >&5
18753 cat conftest.$ac_ext >&5
18754 fi
18755 rm -f conftest.$ac_objext conftest.$ac_ext
18756 done
18757
18758 fi
18759 echo "$as_me:18759: result: $cf_cv_getopt_header" >&5
18760 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18761 if test $cf_cv_getopt_header != none ; then
18762
18763 cat >>confdefs.h <<\EOF
18764 #define HAVE_GETOPT_HEADER 1
18765 EOF
18766
18767 fi
18768 if test $cf_cv_getopt_header = getopt.h ; then
18769
18770 cat >>confdefs.h <<\EOF
18771 #define NEED_GETOPT_H 1
18772 EOF
18773
18774 fi
18775
18776 echo "$as_me:18776: checking if external environ is declared" >&5
18777 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
18778 if test "${cf_cv_dcl_environ+set}" = set; then
18779   echo $ECHO_N "(cached) $ECHO_C" >&6
18780 else
18781
18782     cat >conftest.$ac_ext <<_ACEOF
18783 #line 18783 "configure"
18784 #include "confdefs.h"
18785
18786 #ifdef HAVE_STDLIB_H
18787 #include <stdlib.h>
18788 #endif
18789 #include <unistd.h>
18790 int
18791 main (void)
18792 {
18793 int x = (int) environ
18794   ;
18795   return 0;
18796 }
18797 _ACEOF
18798 rm -f conftest.$ac_objext
18799 if { (eval echo "$as_me:18799: \"$ac_compile\"") >&5
18800   (eval $ac_compile) 2>&5
18801   ac_status=$?
18802   echo "$as_me:18802: \$? = $ac_status" >&5
18803   (exit $ac_status); } &&
18804          { ac_try='test -s conftest.$ac_objext'
18805   { (eval echo "$as_me:18805: \"$ac_try\"") >&5
18806   (eval $ac_try) 2>&5
18807   ac_status=$?
18808   echo "$as_me:18808: \$? = $ac_status" >&5
18809   (exit $ac_status); }; }; then
18810   cf_cv_dcl_environ=yes
18811 else
18812   echo "$as_me: failed program was:" >&5
18813 cat conftest.$ac_ext >&5
18814 cf_cv_dcl_environ=no
18815 fi
18816 rm -f conftest.$ac_objext conftest.$ac_ext
18817
18818 fi
18819 echo "$as_me:18819: result: $cf_cv_dcl_environ" >&5
18820 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
18821
18822 if test "$cf_cv_dcl_environ" = no ; then
18823
18824 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18825
18826     cat >>confdefs.h <<EOF
18827 #define $cf_result 1
18828 EOF
18829
18830 fi
18831
18832 # It's possible (for near-UNIX clones) that the data doesn't exist
18833
18834 echo "$as_me:18834: checking if external environ exists" >&5
18835 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
18836 if test "${cf_cv_have_environ+set}" = set; then
18837   echo $ECHO_N "(cached) $ECHO_C" >&6
18838 else
18839
18840         cat >conftest.$ac_ext <<_ACEOF
18841 #line 18841 "configure"
18842 #include "confdefs.h"
18843
18844 #undef environ
18845 extern int environ;
18846
18847 int
18848 main (void)
18849 {
18850 environ = 2
18851   ;
18852   return 0;
18853 }
18854 _ACEOF
18855 rm -f conftest.$ac_objext conftest$ac_exeext
18856 if { (eval echo "$as_me:18856: \"$ac_link\"") >&5
18857   (eval $ac_link) 2>&5
18858   ac_status=$?
18859   echo "$as_me:18859: \$? = $ac_status" >&5
18860   (exit $ac_status); } &&
18861          { ac_try='test -s conftest$ac_exeext'
18862   { (eval echo "$as_me:18862: \"$ac_try\"") >&5
18863   (eval $ac_try) 2>&5
18864   ac_status=$?
18865   echo "$as_me:18865: \$? = $ac_status" >&5
18866   (exit $ac_status); }; }; then
18867   cf_cv_have_environ=yes
18868 else
18869   echo "$as_me: failed program was:" >&5
18870 cat conftest.$ac_ext >&5
18871 cf_cv_have_environ=no
18872 fi
18873 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18874
18875 fi
18876 echo "$as_me:18876: result: $cf_cv_have_environ" >&5
18877 echo "${ECHO_T}$cf_cv_have_environ" >&6
18878
18879 if test "$cf_cv_have_environ" = yes ; then
18880
18881 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18882
18883         cat >>confdefs.h <<EOF
18884 #define $cf_result 1
18885 EOF
18886
18887 fi
18888
18889 echo "$as_me:18889: checking for getenv" >&5
18890 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
18891 if test "${ac_cv_func_getenv+set}" = set; then
18892   echo $ECHO_N "(cached) $ECHO_C" >&6
18893 else
18894   cat >conftest.$ac_ext <<_ACEOF
18895 #line 18895 "configure"
18896 #include "confdefs.h"
18897 #define getenv autoconf_temporary
18898 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18899 #undef getenv
18900
18901 #ifdef __cplusplus
18902 extern "C"
18903 #endif
18904
18905 /* We use char because int might match the return type of a gcc2
18906    builtin and then its argument prototype would still apply.  */
18907 char getenv (void);
18908
18909 int
18910 main (void)
18911 {
18912
18913 /* The GNU C library defines stubs for functions which it implements
18914     to always fail with ENOSYS.  Some functions are actually named
18915     something starting with __ and the normal name is an alias.  */
18916 #if defined (__stub_getenv) || defined (__stub___getenv)
18917 #error found stub for getenv
18918 #endif
18919
18920         return getenv ();
18921   ;
18922   return 0;
18923 }
18924 _ACEOF
18925 rm -f conftest.$ac_objext conftest$ac_exeext
18926 if { (eval echo "$as_me:18926: \"$ac_link\"") >&5
18927   (eval $ac_link) 2>&5
18928   ac_status=$?
18929   echo "$as_me:18929: \$? = $ac_status" >&5
18930   (exit $ac_status); } &&
18931          { ac_try='test -s conftest$ac_exeext'
18932   { (eval echo "$as_me:18932: \"$ac_try\"") >&5
18933   (eval $ac_try) 2>&5
18934   ac_status=$?
18935   echo "$as_me:18935: \$? = $ac_status" >&5
18936   (exit $ac_status); }; }; then
18937   ac_cv_func_getenv=yes
18938 else
18939   echo "$as_me: failed program was:" >&5
18940 cat conftest.$ac_ext >&5
18941 ac_cv_func_getenv=no
18942 fi
18943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18944 fi
18945 echo "$as_me:18945: result: $ac_cv_func_getenv" >&5
18946 echo "${ECHO_T}$ac_cv_func_getenv" >&6
18947
18948 for ac_func in putenv setenv strdup
18949 do
18950 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18951 echo "$as_me:18951: checking for $ac_func" >&5
18952 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18953 if eval "test \"\${$as_ac_var+set}\" = set"; then
18954   echo $ECHO_N "(cached) $ECHO_C" >&6
18955 else
18956   cat >conftest.$ac_ext <<_ACEOF
18957 #line 18957 "configure"
18958 #include "confdefs.h"
18959 #define $ac_func autoconf_temporary
18960 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18961 #undef $ac_func
18962
18963 #ifdef __cplusplus
18964 extern "C"
18965 #endif
18966
18967 /* We use char because int might match the return type of a gcc2
18968    builtin and then its argument prototype would still apply.  */
18969 char $ac_func (void);
18970
18971 int
18972 main (void)
18973 {
18974
18975 /* The GNU C library defines stubs for functions which it implements
18976     to always fail with ENOSYS.  Some functions are actually named
18977     something starting with __ and the normal name is an alias.  */
18978 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18979 #error found stub for $ac_func
18980 #endif
18981
18982         return $ac_func ();
18983   ;
18984   return 0;
18985 }
18986 _ACEOF
18987 rm -f conftest.$ac_objext conftest$ac_exeext
18988 if { (eval echo "$as_me:18988: \"$ac_link\"") >&5
18989   (eval $ac_link) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); } &&
18993          { ac_try='test -s conftest$ac_exeext'
18994   { (eval echo "$as_me:18994: \"$ac_try\"") >&5
18995   (eval $ac_try) 2>&5
18996   ac_status=$?
18997   echo "$as_me:18997: \$? = $ac_status" >&5
18998   (exit $ac_status); }; }; then
18999   eval "$as_ac_var=yes"
19000 else
19001   echo "$as_me: failed program was:" >&5
19002 cat conftest.$ac_ext >&5
19003 eval "$as_ac_var=no"
19004 fi
19005 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19006 fi
19007 echo "$as_me:19007: result: `eval echo '${'$as_ac_var'}'`" >&5
19008 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
19009 if test `eval echo '${'$as_ac_var'}'` = yes; then
19010   cat >>confdefs.h <<EOF
19011 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19012 EOF
19013
19014 fi
19015 done
19016
19017 echo "$as_me:19017: checking if getenv returns consistent values" >&5
19018 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
19019 if test "${cf_cv_consistent_getenv+set}" = set; then
19020   echo $ECHO_N "(cached) $ECHO_C" >&6
19021 else
19022
19023 if test "$cross_compiling" = yes; then
19024   cf_cv_consistent_getenv=unknown
19025 else
19026   cat >conftest.$ac_ext <<_ACEOF
19027 #line 19027 "configure"
19028 #include "confdefs.h"
19029
19030 #include <stdlib.h>
19031 #include <unistd.h>
19032 #include <stdio.h>
19033 #include <string.h>
19034 #include <sys/types.h>
19035
19036 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
19037 extern char **environ;  /* POSIX, but some systems are not... */
19038 #endif
19039
19040 #if defined(HAVE_STRDUP)
19041 #define str_alloc(s) strdup(s)
19042 #else
19043 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
19044 #endif
19045
19046 static void set_value(const char *name, const char *value)
19047 {
19048 #if defined(HAVE_SETENV)
19049         setenv(name, value, 1);
19050 #elif defined(HAVE_PUTENV)
19051         char buffer[1024];
19052         sprintf(buffer, "%s=%s", name, value);
19053         putenv(str_alloc(buffer));
19054 #else
19055 #error neither putenv/setenv found
19056 #endif
19057 }
19058 int main(void)
19059 {
19060         int pass;
19061         size_t numenv, limit, j;
19062         char **mynames;
19063         char **myvalues;
19064         char **mypointer;
19065         char *equals;
19066         for (numenv = 0; environ[numenv]; ++numenv) ;
19067         limit = numenv + 10;
19068         mynames = (char **) calloc(limit + 1, sizeof(char *));
19069         myvalues = (char **) calloc(limit + 1, sizeof(char *));
19070         mypointer = (char **) calloc(limit + 1, sizeof(char *));
19071 #if defined(HAVE_ENVIRON)
19072         for (j = 0; environ[j]; ++j) {
19073                 mynames[j] = str_alloc(environ[j]);
19074                 equals = strchr(mynames[j], '=');
19075                 if (equals != 0) {
19076                         *equals++ = '\0';
19077                         myvalues[j] = str_alloc(equals);
19078                 } else {
19079                         myvalues[j] = str_alloc("");
19080                 }
19081         }
19082 #endif
19083         for (j = numenv; j < limit; ++j) {
19084                 char name[80];
19085                 char value[80];
19086                 size_t found;
19087                 size_t k = 0;
19088                 do {
19089                         size_t jk;
19090                         found = 0;
19091                         sprintf(name, "TERM%lu", (unsigned long) k);
19092                         for (jk = 0; jk < j; ++jk) {
19093                                 if (!strcmp(name, mynames[jk])) {
19094                                         found = 1;
19095                                         ++k;
19096                                         break;
19097                                 }
19098                         }
19099                 } while (found);
19100                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
19101                 set_value(name, value);
19102                 mynames[j] = str_alloc(name);
19103                 myvalues[j] = str_alloc(value);
19104         }
19105         for (pass = 0; pass < 3; ++pass) {
19106                 for (j = 0; j < limit; ++j) {
19107                         char *value = getenv(mynames[j]);
19108                         if (pass) {
19109                                 if (value == 0) {
19110                                         fprintf(stderr, "getenv returned null for %s\n", mynames[j]);
19111                                         ${cf_cv_main_return:-return}(1);
19112                                 } else if (value != mypointer[j]) {
19113                                         fprintf(stderr, "getenv returned different pointer for %s\n", mynames[j]);
19114                                         ${cf_cv_main_return:-return}(1);
19115                                 } else if (strcmp(value, myvalues[j])) {
19116                                         fprintf(stderr, "getenv returned different value for %s\n", mynames[j]);
19117                                         ${cf_cv_main_return:-return}(1);
19118                                 }
19119                         } else {
19120                                 size_t k;
19121                                 mypointer[j] = value;
19122                                 for (k = 0; k < j; ++k) {
19123                                         if (mypointer[j] == mypointer[k]) {
19124                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\n", mynames[j], mynames[k]);
19125                                                 ${cf_cv_main_return:-return}(1);
19126                                         }
19127                                 }
19128                         }
19129                 }
19130         }
19131         ${cf_cv_main_return:-return}(0);
19132 }
19133
19134 _ACEOF
19135 rm -f conftest$ac_exeext
19136 if { (eval echo "$as_me:19136: \"$ac_link\"") >&5
19137   (eval $ac_link) 2>&5
19138   ac_status=$?
19139   echo "$as_me:19139: \$? = $ac_status" >&5
19140   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19141   { (eval echo "$as_me:19141: \"$ac_try\"") >&5
19142   (eval $ac_try) 2>&5
19143   ac_status=$?
19144   echo "$as_me:19144: \$? = $ac_status" >&5
19145   (exit $ac_status); }; }; then
19146   cf_cv_consistent_getenv=yes
19147 else
19148   echo "$as_me: program exited with status $ac_status" >&5
19149 echo "$as_me: failed program was:" >&5
19150 cat conftest.$ac_ext >&5
19151 cf_cv_consistent_getenv=no
19152 fi
19153 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19154 fi
19155
19156 fi
19157 echo "$as_me:19157: result: $cf_cv_consistent_getenv" >&5
19158 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
19159
19160 if test "x$cf_cv_consistent_getenv" = xno
19161 then
19162
19163 cat >>confdefs.h <<\EOF
19164 #define HAVE_CONSISTENT_GETENV 1
19165 EOF
19166
19167 fi
19168
19169 if test "x$cf_cv_consistent_getenv" = xno && \
19170         test "x$cf_with_trace" = xyes
19171 then
19172         { echo "$as_me:19172: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
19173 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
19174 fi
19175
19176 # check for ISC (this may also define _POSIX_SOURCE)
19177 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
19178 if test "x$ISC" = xyes ; then
19179
19180 echo "$as_me:19180: checking for main in -lcposix" >&5
19181 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
19182 if test "${ac_cv_lib_cposix_main+set}" = set; then
19183   echo $ECHO_N "(cached) $ECHO_C" >&6
19184 else
19185   ac_check_lib_save_LIBS=$LIBS
19186 LIBS="-lcposix  $LIBS"
19187 cat >conftest.$ac_ext <<_ACEOF
19188 #line 19188 "configure"
19189 #include "confdefs.h"
19190
19191 int
19192 main (void)
19193 {
19194 main ();
19195   ;
19196   return 0;
19197 }
19198 _ACEOF
19199 rm -f conftest.$ac_objext conftest$ac_exeext
19200 if { (eval echo "$as_me:19200: \"$ac_link\"") >&5
19201   (eval $ac_link) 2>&5
19202   ac_status=$?
19203   echo "$as_me:19203: \$? = $ac_status" >&5
19204   (exit $ac_status); } &&
19205          { ac_try='test -s conftest$ac_exeext'
19206   { (eval echo "$as_me:19206: \"$ac_try\"") >&5
19207   (eval $ac_try) 2>&5
19208   ac_status=$?
19209   echo "$as_me:19209: \$? = $ac_status" >&5
19210   (exit $ac_status); }; }; then
19211   ac_cv_lib_cposix_main=yes
19212 else
19213   echo "$as_me: failed program was:" >&5
19214 cat conftest.$ac_ext >&5
19215 ac_cv_lib_cposix_main=no
19216 fi
19217 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19218 LIBS=$ac_check_lib_save_LIBS
19219 fi
19220 echo "$as_me:19220: result: $ac_cv_lib_cposix_main" >&5
19221 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
19222 if test $ac_cv_lib_cposix_main = yes; then
19223   cat >>confdefs.h <<EOF
19224 #define HAVE_LIBCPOSIX 1
19225 EOF
19226
19227   LIBS="-lcposix $LIBS"
19228
19229 fi
19230
19231         echo "$as_me:19231: checking for bzero in -linet" >&5
19232 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
19233 if test "${ac_cv_lib_inet_bzero+set}" = set; then
19234   echo $ECHO_N "(cached) $ECHO_C" >&6
19235 else
19236   ac_check_lib_save_LIBS=$LIBS
19237 LIBS="-linet  $LIBS"
19238 cat >conftest.$ac_ext <<_ACEOF
19239 #line 19239 "configure"
19240 #include "confdefs.h"
19241
19242 /* Override any gcc2 internal prototype to avoid an error.  */
19243 #ifdef __cplusplus
19244 extern "C"
19245 #endif
19246 /* We use char because int might match the return type of a gcc2
19247    builtin and then its argument prototype would still apply.  */
19248 char bzero ();
19249 int
19250 main (void)
19251 {
19252 bzero ();
19253   ;
19254   return 0;
19255 }
19256 _ACEOF
19257 rm -f conftest.$ac_objext conftest$ac_exeext
19258 if { (eval echo "$as_me:19258: \"$ac_link\"") >&5
19259   (eval $ac_link) 2>&5
19260   ac_status=$?
19261   echo "$as_me:19261: \$? = $ac_status" >&5
19262   (exit $ac_status); } &&
19263          { ac_try='test -s conftest$ac_exeext'
19264   { (eval echo "$as_me:19264: \"$ac_try\"") >&5
19265   (eval $ac_try) 2>&5
19266   ac_status=$?
19267   echo "$as_me:19267: \$? = $ac_status" >&5
19268   (exit $ac_status); }; }; then
19269   ac_cv_lib_inet_bzero=yes
19270 else
19271   echo "$as_me: failed program was:" >&5
19272 cat conftest.$ac_ext >&5
19273 ac_cv_lib_inet_bzero=no
19274 fi
19275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19276 LIBS=$ac_check_lib_save_LIBS
19277 fi
19278 echo "$as_me:19278: result: $ac_cv_lib_inet_bzero" >&5
19279 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
19280 if test $ac_cv_lib_inet_bzero = yes; then
19281
19282 cf_add_libs="$LIBS"
19283 # reverse order
19284 cf_add_0lib=
19285 for cf_add_1lib in -linet; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19286 # filter duplicates
19287 for cf_add_1lib in $cf_add_0lib; do
19288         for cf_add_2lib in $cf_add_libs; do
19289                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19290                         cf_add_1lib=
19291                         break
19292                 fi
19293         done
19294         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19295 done
19296 LIBS="$cf_add_libs"
19297
19298 fi
19299 fi
19300
19301 echo "$as_me:19301: checking if sys/time.h works with sys/select.h" >&5
19302 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19303 if test "${cf_cv_sys_time_select+set}" = set; then
19304   echo $ECHO_N "(cached) $ECHO_C" >&6
19305 else
19306
19307 cat >conftest.$ac_ext <<_ACEOF
19308 #line 19308 "configure"
19309 #include "confdefs.h"
19310
19311 #include <sys/types.h>
19312 #ifdef HAVE_SYS_TIME_H
19313 #include <sys/time.h>
19314 #endif
19315 #ifdef HAVE_SYS_SELECT_H
19316 #include <sys/select.h>
19317 #endif
19318
19319 int
19320 main (void)
19321 {
19322
19323   ;
19324   return 0;
19325 }
19326 _ACEOF
19327 rm -f conftest.$ac_objext
19328 if { (eval echo "$as_me:19328: \"$ac_compile\"") >&5
19329   (eval $ac_compile) 2>&5
19330   ac_status=$?
19331   echo "$as_me:19331: \$? = $ac_status" >&5
19332   (exit $ac_status); } &&
19333          { ac_try='test -s conftest.$ac_objext'
19334   { (eval echo "$as_me:19334: \"$ac_try\"") >&5
19335   (eval $ac_try) 2>&5
19336   ac_status=$?
19337   echo "$as_me:19337: \$? = $ac_status" >&5
19338   (exit $ac_status); }; }; then
19339   cf_cv_sys_time_select=yes
19340 else
19341   echo "$as_me: failed program was:" >&5
19342 cat conftest.$ac_ext >&5
19343 cf_cv_sys_time_select=no
19344 fi
19345 rm -f conftest.$ac_objext conftest.$ac_ext
19346
19347 fi
19348
19349 echo "$as_me:19349: result: $cf_cv_sys_time_select" >&5
19350 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19351 test "$cf_cv_sys_time_select" = yes &&
19352 cat >>confdefs.h <<\EOF
19353 #define HAVE_SYS_TIME_SELECT 1
19354 EOF
19355
19356 ###     checks for compiler characteristics
19357 ac_ext=c
19358 ac_cpp='$CPP $CPPFLAGS'
19359 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19360 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19361 ac_compiler_gnu=$ac_cv_c_compiler_gnu
19362 ac_main_return=return
19363
19364 echo "$as_me:19364: checking for an ANSI C-conforming const" >&5
19365 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
19366 if test "${ac_cv_c_const+set}" = set; then
19367   echo $ECHO_N "(cached) $ECHO_C" >&6
19368 else
19369   cat >conftest.$ac_ext <<_ACEOF
19370 #line 19370 "configure"
19371 #include "confdefs.h"
19372
19373 int
19374 main (void)
19375 {
19376 /* FIXME: Include the comments suggested by Paul. */
19377 #ifndef __cplusplus
19378   /* Ultrix mips cc rejects this.  */
19379   typedef int charset[2];
19380   const charset x;
19381   /* SunOS 4.1.1 cc rejects this.  */
19382   char const *const *ccp;
19383   char **p;
19384   /* NEC SVR4.0.2 mips cc rejects this.  */
19385   struct point {int x, y;};
19386   static struct point const zero = {0,0};
19387   /* AIX XL C 1.02.0.0 rejects this.
19388      It does not let you subtract one const X* pointer from another in
19389      an arm of an if-expression whose if-part is not a constant
19390      expression */
19391   const char *g = "string";
19392   ccp = &g + (g ? g-g : 0);
19393   /* HPUX 7.0 cc rejects these. */
19394   ++ccp;
19395   p = (char**) ccp;
19396   ccp = (char const *const *) p;
19397   { /* SCO 3.2v4 cc rejects this.  */
19398     char *t;
19399     char const *s = 0 ? (char *) 0 : (char const *) 0;
19400
19401     *t++ = 0;
19402   }
19403   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
19404     int x[] = {25, 17};
19405     const int *foo = &x[0];
19406     ++foo;
19407   }
19408   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
19409     typedef const int *iptr;
19410     iptr p = 0;
19411     ++p;
19412   }
19413   { /* AIX XL C 1.02.0.0 rejects this saying
19414        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
19415     struct s { int j; const int *ap[3]; };
19416     struct s *b; b->j = 5;
19417   }
19418   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
19419     const int foo = 10;
19420   }
19421 #endif
19422
19423   ;
19424   return 0;
19425 }
19426 _ACEOF
19427 rm -f conftest.$ac_objext
19428 if { (eval echo "$as_me:19428: \"$ac_compile\"") >&5
19429   (eval $ac_compile) 2>&5
19430   ac_status=$?
19431   echo "$as_me:19431: \$? = $ac_status" >&5
19432   (exit $ac_status); } &&
19433          { ac_try='test -s conftest.$ac_objext'
19434   { (eval echo "$as_me:19434: \"$ac_try\"") >&5
19435   (eval $ac_try) 2>&5
19436   ac_status=$?
19437   echo "$as_me:19437: \$? = $ac_status" >&5
19438   (exit $ac_status); }; }; then
19439   ac_cv_c_const=yes
19440 else
19441   echo "$as_me: failed program was:" >&5
19442 cat conftest.$ac_ext >&5
19443 ac_cv_c_const=no
19444 fi
19445 rm -f conftest.$ac_objext conftest.$ac_ext
19446 fi
19447 echo "$as_me:19447: result: $ac_cv_c_const" >&5
19448 echo "${ECHO_T}$ac_cv_c_const" >&6
19449 if test $ac_cv_c_const = no; then
19450
19451 cat >>confdefs.h <<\EOF
19452 #define const
19453 EOF
19454
19455 fi
19456
19457 echo "$as_me:19457: checking for inline" >&5
19458 echo $ECHO_N "checking for inline... $ECHO_C" >&6
19459 if test "${ac_cv_c_inline+set}" = set; then
19460   echo $ECHO_N "(cached) $ECHO_C" >&6
19461 else
19462   ac_cv_c_inline=no
19463 for ac_kw in inline __inline__ __inline; do
19464   cat >conftest.$ac_ext <<_ACEOF
19465 #line 19465 "configure"
19466 #include "confdefs.h"
19467 #ifndef __cplusplus
19468 static $ac_kw int static_foo () {return 0; }
19469 $ac_kw int foo () {return 0; }
19470 #endif
19471
19472 _ACEOF
19473 rm -f conftest.$ac_objext
19474 if { (eval echo "$as_me:19474: \"$ac_compile\"") >&5
19475   (eval $ac_compile) 2>&5
19476   ac_status=$?
19477   echo "$as_me:19477: \$? = $ac_status" >&5
19478   (exit $ac_status); } &&
19479          { ac_try='test -s conftest.$ac_objext'
19480   { (eval echo "$as_me:19480: \"$ac_try\"") >&5
19481   (eval $ac_try) 2>&5
19482   ac_status=$?
19483   echo "$as_me:19483: \$? = $ac_status" >&5
19484   (exit $ac_status); }; }; then
19485   ac_cv_c_inline=$ac_kw; break
19486 else
19487   echo "$as_me: failed program was:" >&5
19488 cat conftest.$ac_ext >&5
19489 fi
19490 rm -f conftest.$ac_objext conftest.$ac_ext
19491 done
19492
19493 fi
19494 echo "$as_me:19494: result: $ac_cv_c_inline" >&5
19495 echo "${ECHO_T}$ac_cv_c_inline" >&6
19496 case $ac_cv_c_inline in
19497   inline | yes) ;;
19498   no)
19499 cat >>confdefs.h <<\EOF
19500 #define inline
19501 EOF
19502  ;;
19503   *)  cat >>confdefs.h <<EOF
19504 #define inline $ac_cv_c_inline
19505 EOF
19506  ;;
19507 esac
19508
19509 NCURSES_INLINE=
19510 if test "$ac_cv_c_inline" != no ; then
19511         NCURSES_INLINE=inline
19512         if test "$INTEL_COMPILER" = yes
19513         then
19514                 :
19515         elif test "$CLANG_COMPILER" = yes
19516         then
19517                 :
19518         elif test "$GCC" = yes
19519         then
19520                 echo "$as_me:19520: checking if $CC supports options to tune inlining" >&5
19521 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
19522 if test "${cf_cv_gcc_inline+set}" = set; then
19523   echo $ECHO_N "(cached) $ECHO_C" >&6
19524 else
19525
19526                 cf_save_CFLAGS=$CFLAGS
19527                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
19528                 cat >conftest.$ac_ext <<_ACEOF
19529 #line 19529 "configure"
19530 #include "confdefs.h"
19531 inline int foo(void) { return 1; }
19532 int
19533 main (void)
19534 {
19535 ${cf_cv_main_return:-return} foo()
19536   ;
19537   return 0;
19538 }
19539 _ACEOF
19540 rm -f conftest.$ac_objext
19541 if { (eval echo "$as_me:19541: \"$ac_compile\"") >&5
19542   (eval $ac_compile) 2>&5
19543   ac_status=$?
19544   echo "$as_me:19544: \$? = $ac_status" >&5
19545   (exit $ac_status); } &&
19546          { ac_try='test -s conftest.$ac_objext'
19547   { (eval echo "$as_me:19547: \"$ac_try\"") >&5
19548   (eval $ac_try) 2>&5
19549   ac_status=$?
19550   echo "$as_me:19550: \$? = $ac_status" >&5
19551   (exit $ac_status); }; }; then
19552   cf_cv_gcc_inline=yes
19553 else
19554   echo "$as_me: failed program was:" >&5
19555 cat conftest.$ac_ext >&5
19556 cf_cv_gcc_inline=no
19557 fi
19558 rm -f conftest.$ac_objext conftest.$ac_ext
19559                 CFLAGS=$cf_save_CFLAGS
19560
19561 fi
19562 echo "$as_me:19562: result: $cf_cv_gcc_inline" >&5
19563 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
19564                 if test "$cf_cv_gcc_inline" = yes ; then
19565
19566 cf_fix_cppflags=no
19567 cf_new_cflags=
19568 cf_new_cppflags=
19569 cf_new_extra_cppflags=
19570
19571 for cf_add_cflags in --param max-inline-insns-single=1200
19572 do
19573 case $cf_fix_cppflags in
19574 (no)
19575         case $cf_add_cflags in
19576         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19577                 case $cf_add_cflags in
19578                 (-D*)
19579                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19580
19581                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19582                                 && test -z "${cf_tst_cflags}" \
19583                                 && cf_fix_cppflags=yes
19584
19585                         if test $cf_fix_cppflags = yes ; then
19586
19587         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19588         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19589
19590                                 continue
19591                         elif test "${cf_tst_cflags}" = "\"'" ; then
19592
19593         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19594         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19595
19596                                 continue
19597                         fi
19598                         ;;
19599                 esac
19600                 case "$CPPFLAGS" in
19601                 (*$cf_add_cflags)
19602                         ;;
19603                 (*)
19604                         case $cf_add_cflags in
19605                         (-D*)
19606                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19607
19608 CPPFLAGS=`echo "$CPPFLAGS" | \
19609         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19610                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19611
19612                                 ;;
19613                         esac
19614
19615         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19616         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19617
19618                         ;;
19619                 esac
19620                 ;;
19621         (*)
19622
19623         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19624         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19625
19626                 ;;
19627         esac
19628         ;;
19629 (yes)
19630
19631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19633
19634         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19635
19636         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19637                 && test -z "${cf_tst_cflags}" \
19638                 && cf_fix_cppflags=no
19639         ;;
19640 esac
19641 done
19642
19643 if test -n "$cf_new_cflags" ; then
19644
19645         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19646         CFLAGS="${CFLAGS}$cf_new_cflags"
19647
19648 fi
19649
19650 if test -n "$cf_new_cppflags" ; then
19651
19652         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19653         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19654
19655 fi
19656
19657 if test -n "$cf_new_extra_cppflags" ; then
19658
19659         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19660         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19661
19662 fi
19663
19664                 fi
19665         fi
19666 fi
19667
19668 echo "$as_me:19668: checking for signal global datatype" >&5
19669 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
19670 if test "${cf_cv_sig_atomic_t+set}" = set; then
19671   echo $ECHO_N "(cached) $ECHO_C" >&6
19672 else
19673
19674         for cf_type in \
19675                 "volatile sig_atomic_t" \
19676                 "sig_atomic_t" \
19677                 "int"
19678         do
19679         cat >conftest.$ac_ext <<_ACEOF
19680 #line 19680 "configure"
19681 #include "confdefs.h"
19682
19683 #include <sys/types.h>
19684 #include <signal.h>
19685 #include <stdio.h>
19686
19687 extern $cf_type x;
19688 $cf_type x;
19689 static void handler(int sig)
19690 {
19691         (void)sig;
19692         x = 5;
19693 }
19694 int
19695 main (void)
19696 {
19697 signal(SIGINT, handler);
19698                  x = 1
19699   ;
19700   return 0;
19701 }
19702 _ACEOF
19703 rm -f conftest.$ac_objext
19704 if { (eval echo "$as_me:19704: \"$ac_compile\"") >&5
19705   (eval $ac_compile) 2>&5
19706   ac_status=$?
19707   echo "$as_me:19707: \$? = $ac_status" >&5
19708   (exit $ac_status); } &&
19709          { ac_try='test -s conftest.$ac_objext'
19710   { (eval echo "$as_me:19710: \"$ac_try\"") >&5
19711   (eval $ac_try) 2>&5
19712   ac_status=$?
19713   echo "$as_me:19713: \$? = $ac_status" >&5
19714   (exit $ac_status); }; }; then
19715   cf_cv_sig_atomic_t=$cf_type
19716 else
19717   echo "$as_me: failed program was:" >&5
19718 cat conftest.$ac_ext >&5
19719 cf_cv_sig_atomic_t=no
19720 fi
19721 rm -f conftest.$ac_objext conftest.$ac_ext
19722                 test "$cf_cv_sig_atomic_t" != no && break
19723         done
19724
19725 fi
19726
19727 echo "$as_me:19727: result: $cf_cv_sig_atomic_t" >&5
19728 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
19729 test "$cf_cv_sig_atomic_t" != no &&
19730 cat >>confdefs.h <<EOF
19731 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
19732 EOF
19733
19734 if test $NCURSES_CHTYPE = auto ; then
19735
19736 echo "$as_me:19736: checking for type of chtype" >&5
19737 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
19738 if test "${cf_cv_typeof_chtype+set}" = set; then
19739   echo $ECHO_N "(cached) $ECHO_C" >&6
19740 else
19741
19742                 if test "$cross_compiling" = yes; then
19743   cf_cv_typeof_chtype=long
19744 else
19745   cat >conftest.$ac_ext <<_ACEOF
19746 #line 19746 "configure"
19747 #include "confdefs.h"
19748
19749 #define WANT_BITS 31
19750 #include <stdio.h>
19751 int main(void)
19752 {
19753         FILE *fp = fopen("cf_test.out", "w");
19754         if (fp != 0) {
19755                 char *result = "long";
19756                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
19757                         int n;
19758                         unsigned int x, y;
19759                         for (n = 0; n < WANT_BITS; n++) {
19760                                 x = (1 << n);
19761                                 y = (x >> n);
19762                                 if (y != 1 || x == 0) {
19763                                         x = 0;
19764                                         break;
19765                                 }
19766                         }
19767                         /*
19768                          * If x is nonzero, an int is big enough for the bits
19769                          * that we want.
19770                          */
19771                         result = (x != 0) ? "int" : "long";
19772                 }
19773                 fputs(result, fp);
19774                 fclose(fp);
19775         }
19776         ${cf_cv_main_return:-return}(0);
19777 }
19778
19779 _ACEOF
19780 rm -f conftest$ac_exeext
19781 if { (eval echo "$as_me:19781: \"$ac_link\"") >&5
19782   (eval $ac_link) 2>&5
19783   ac_status=$?
19784   echo "$as_me:19784: \$? = $ac_status" >&5
19785   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19786   { (eval echo "$as_me:19786: \"$ac_try\"") >&5
19787   (eval $ac_try) 2>&5
19788   ac_status=$?
19789   echo "$as_me:19789: \$? = $ac_status" >&5
19790   (exit $ac_status); }; }; then
19791   cf_cv_typeof_chtype=`cat cf_test.out`
19792 else
19793   echo "$as_me: program exited with status $ac_status" >&5
19794 echo "$as_me: failed program was:" >&5
19795 cat conftest.$ac_ext >&5
19796 cf_cv_typeof_chtype=long
19797 fi
19798 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19799 fi
19800                 rm -f cf_test.out
19801
19802 fi
19803
19804 echo "$as_me:19804: result: $cf_cv_typeof_chtype" >&5
19805 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
19806
19807 cat >>confdefs.h <<EOF
19808 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
19809 EOF
19810
19811 else
19812         cf_cv_typeof_chtype=$NCURSES_CHTYPE
19813 fi
19814 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
19815
19816 echo "$as_me:19816: checking if unsigned literals are legal" >&5
19817 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
19818 if test "${cf_cv_unsigned_literals+set}" = set; then
19819   echo $ECHO_N "(cached) $ECHO_C" >&6
19820 else
19821
19822         cat >conftest.$ac_ext <<_ACEOF
19823 #line 19823 "configure"
19824 #include "confdefs.h"
19825
19826 int
19827 main (void)
19828 {
19829 long x = 1L + 1UL + 1U + 1
19830   ;
19831   return 0;
19832 }
19833 _ACEOF
19834 rm -f conftest.$ac_objext
19835 if { (eval echo "$as_me:19835: \"$ac_compile\"") >&5
19836   (eval $ac_compile) 2>&5
19837   ac_status=$?
19838   echo "$as_me:19838: \$? = $ac_status" >&5
19839   (exit $ac_status); } &&
19840          { ac_try='test -s conftest.$ac_objext'
19841   { (eval echo "$as_me:19841: \"$ac_try\"") >&5
19842   (eval $ac_try) 2>&5
19843   ac_status=$?
19844   echo "$as_me:19844: \$? = $ac_status" >&5
19845   (exit $ac_status); }; }; then
19846   cf_cv_unsigned_literals=yes
19847 else
19848   echo "$as_me: failed program was:" >&5
19849 cat conftest.$ac_ext >&5
19850 cf_cv_unsigned_literals=no
19851 fi
19852 rm -f conftest.$ac_objext conftest.$ac_ext
19853
19854 fi
19855
19856 echo "$as_me:19856: result: $cf_cv_unsigned_literals" >&5
19857 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
19858
19859 cf_cv_1UL="1"
19860 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
19861 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
19862
19863 if test $NCURSES_MMASK_T = auto ; then
19864         cf_cv_typeof_mmask_t=long
19865 else
19866         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
19867 fi
19868 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
19869
19870 ###     Checks for external-data
19871
19872 echo "$as_me:19872: checking if external errno is declared" >&5
19873 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
19874 if test "${cf_cv_dcl_errno+set}" = set; then
19875   echo $ECHO_N "(cached) $ECHO_C" >&6
19876 else
19877
19878         cat >conftest.$ac_ext <<_ACEOF
19879 #line 19879 "configure"
19880 #include "confdefs.h"
19881
19882 #ifdef HAVE_STDLIB_H
19883 #include <stdlib.h>
19884 #endif
19885 #include <stdio.h>
19886 #include <sys/types.h>
19887 #include <errno.h>
19888 int
19889 main (void)
19890 {
19891 int x = (int) errno; (void)x
19892   ;
19893   return 0;
19894 }
19895 _ACEOF
19896 rm -f conftest.$ac_objext
19897 if { (eval echo "$as_me:19897: \"$ac_compile\"") >&5
19898   (eval $ac_compile) 2>&5
19899   ac_status=$?
19900   echo "$as_me:19900: \$? = $ac_status" >&5
19901   (exit $ac_status); } &&
19902          { ac_try='test -s conftest.$ac_objext'
19903   { (eval echo "$as_me:19903: \"$ac_try\"") >&5
19904   (eval $ac_try) 2>&5
19905   ac_status=$?
19906   echo "$as_me:19906: \$? = $ac_status" >&5
19907   (exit $ac_status); }; }; then
19908   cf_cv_dcl_errno=yes
19909 else
19910   echo "$as_me: failed program was:" >&5
19911 cat conftest.$ac_ext >&5
19912 cf_cv_dcl_errno=no
19913 fi
19914 rm -f conftest.$ac_objext conftest.$ac_ext
19915
19916 fi
19917 echo "$as_me:19917: result: $cf_cv_dcl_errno" >&5
19918 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
19919
19920 if test "$cf_cv_dcl_errno" = no ; then
19921
19922 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19923
19924         cat >>confdefs.h <<EOF
19925 #define $cf_result 1
19926 EOF
19927
19928 fi
19929
19930 # It's possible (for near-UNIX clones) that the data doesn't exist
19931
19932 echo "$as_me:19932: checking if external errno exists" >&5
19933 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
19934 if test "${cf_cv_have_errno+set}" = set; then
19935   echo $ECHO_N "(cached) $ECHO_C" >&6
19936 else
19937
19938         cat >conftest.$ac_ext <<_ACEOF
19939 #line 19939 "configure"
19940 #include "confdefs.h"
19941
19942 #undef errno
19943 extern int errno;
19944
19945 int
19946 main (void)
19947 {
19948 errno = 2
19949   ;
19950   return 0;
19951 }
19952 _ACEOF
19953 rm -f conftest.$ac_objext conftest$ac_exeext
19954 if { (eval echo "$as_me:19954: \"$ac_link\"") >&5
19955   (eval $ac_link) 2>&5
19956   ac_status=$?
19957   echo "$as_me:19957: \$? = $ac_status" >&5
19958   (exit $ac_status); } &&
19959          { ac_try='test -s conftest$ac_exeext'
19960   { (eval echo "$as_me:19960: \"$ac_try\"") >&5
19961   (eval $ac_try) 2>&5
19962   ac_status=$?
19963   echo "$as_me:19963: \$? = $ac_status" >&5
19964   (exit $ac_status); }; }; then
19965   cf_cv_have_errno=yes
19966 else
19967   echo "$as_me: failed program was:" >&5
19968 cat conftest.$ac_ext >&5
19969 cf_cv_have_errno=no
19970 fi
19971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19972
19973 fi
19974 echo "$as_me:19974: result: $cf_cv_have_errno" >&5
19975 echo "${ECHO_T}$cf_cv_have_errno" >&6
19976
19977 if test "$cf_cv_have_errno" = yes ; then
19978
19979 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19980
19981         cat >>confdefs.h <<EOF
19982 #define $cf_result 1
19983 EOF
19984
19985 fi
19986
19987 echo "$as_me:19987: checking if data-only library module links" >&5
19988 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
19989 if test "${cf_cv_link_dataonly+set}" = set; then
19990   echo $ECHO_N "(cached) $ECHO_C" >&6
19991 else
19992
19993         rm -f conftest.a
19994         cat >conftest.$ac_ext <<EOF
19995 #line 19995 "configure"
19996 int     testdata[3] = { 123, 456, 789 };
19997 EOF
19998         if { (eval echo "$as_me:19998: \"$ac_compile\"") >&5
19999   (eval $ac_compile) 2>&5
20000   ac_status=$?
20001   echo "$as_me:20001: \$? = $ac_status" >&5
20002   (exit $ac_status); } ; then
20003                 mv conftest.o data.o && \
20004                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
20005         fi
20006         rm -f conftest.$ac_ext data.o
20007         cat >conftest.$ac_ext <<EOF
20008 #line 20008 "configure"
20009 int     testfunc(void)
20010 {
20011 #if defined(NeXT)
20012         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
20013 #else
20014         extern int testdata[3];
20015         return testdata[0] == 123
20016            &&  testdata[1] == 456
20017            &&  testdata[2] == 789;
20018 #endif
20019 }
20020 EOF
20021         if { (eval echo "$as_me:20021: \"$ac_compile\"") >&5
20022   (eval $ac_compile) 2>&5
20023   ac_status=$?
20024   echo "$as_me:20024: \$? = $ac_status" >&5
20025   (exit $ac_status); }; then
20026                 mv conftest.o func.o && \
20027                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
20028         fi
20029         rm -f conftest.$ac_ext func.o
20030         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
20031         cf_saveLIBS="$LIBS"
20032         LIBS="conftest.a $LIBS"
20033         if test "$cross_compiling" = yes; then
20034   cf_cv_link_dataonly=unknown
20035 else
20036   cat >conftest.$ac_ext <<_ACEOF
20037 #line 20037 "configure"
20038 #include "confdefs.h"
20039
20040         int main(void)
20041         {
20042                 extern int testfunc();
20043                 ${cf_cv_main_return:-return} (!testfunc());
20044         }
20045
20046 _ACEOF
20047 rm -f conftest$ac_exeext
20048 if { (eval echo "$as_me:20048: \"$ac_link\"") >&5
20049   (eval $ac_link) 2>&5
20050   ac_status=$?
20051   echo "$as_me:20051: \$? = $ac_status" >&5
20052   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20053   { (eval echo "$as_me:20053: \"$ac_try\"") >&5
20054   (eval $ac_try) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); }; }; then
20058   cf_cv_link_dataonly=yes
20059 else
20060   echo "$as_me: program exited with status $ac_status" >&5
20061 echo "$as_me: failed program was:" >&5
20062 cat conftest.$ac_ext >&5
20063 cf_cv_link_dataonly=no
20064 fi
20065 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20066 fi
20067         LIBS="$cf_saveLIBS"
20068
20069 fi
20070
20071 echo "$as_me:20071: result: $cf_cv_link_dataonly" >&5
20072 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
20073
20074 if test "$cf_cv_link_dataonly" = no ; then
20075
20076 cat >>confdefs.h <<\EOF
20077 #define BROKEN_LINKER 1
20078 EOF
20079
20080         BROKEN_LINKER=1
20081 fi
20082
20083 ###     Checks for library functions.
20084
20085 for ac_func in \
20086 getcwd \
20087 getegid \
20088 geteuid \
20089 getopt \
20090 getttynam \
20091 issetugid \
20092 localeconv \
20093 poll \
20094 putenv \
20095 remove \
20096 select \
20097 setbuf \
20098 setbuffer \
20099 setenv \
20100 setvbuf \
20101 sigaction \
20102 sigvec \
20103 strdup \
20104 strstr \
20105 sysconf \
20106 tcgetpgrp \
20107 times \
20108 tsearch \
20109 vsnprintf \
20110
20111 do
20112 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20113 echo "$as_me:20113: checking for $ac_func" >&5
20114 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20115 if eval "test \"\${$as_ac_var+set}\" = set"; then
20116   echo $ECHO_N "(cached) $ECHO_C" >&6
20117 else
20118   cat >conftest.$ac_ext <<_ACEOF
20119 #line 20119 "configure"
20120 #include "confdefs.h"
20121 #define $ac_func autoconf_temporary
20122 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20123 #undef $ac_func
20124
20125 #ifdef __cplusplus
20126 extern "C"
20127 #endif
20128
20129 /* We use char because int might match the return type of a gcc2
20130    builtin and then its argument prototype would still apply.  */
20131 char $ac_func (void);
20132
20133 int
20134 main (void)
20135 {
20136
20137 /* The GNU C library defines stubs for functions which it implements
20138     to always fail with ENOSYS.  Some functions are actually named
20139     something starting with __ and the normal name is an alias.  */
20140 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20141 #error found stub for $ac_func
20142 #endif
20143
20144         return $ac_func ();
20145   ;
20146   return 0;
20147 }
20148 _ACEOF
20149 rm -f conftest.$ac_objext conftest$ac_exeext
20150 if { (eval echo "$as_me:20150: \"$ac_link\"") >&5
20151   (eval $ac_link) 2>&5
20152   ac_status=$?
20153   echo "$as_me:20153: \$? = $ac_status" >&5
20154   (exit $ac_status); } &&
20155          { ac_try='test -s conftest$ac_exeext'
20156   { (eval echo "$as_me:20156: \"$ac_try\"") >&5
20157   (eval $ac_try) 2>&5
20158   ac_status=$?
20159   echo "$as_me:20159: \$? = $ac_status" >&5
20160   (exit $ac_status); }; }; then
20161   eval "$as_ac_var=yes"
20162 else
20163   echo "$as_me: failed program was:" >&5
20164 cat conftest.$ac_ext >&5
20165 eval "$as_ac_var=no"
20166 fi
20167 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20168 fi
20169 echo "$as_me:20169: result: `eval echo '${'$as_ac_var'}'`" >&5
20170 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20171 if test `eval echo '${'$as_ac_var'}'` = yes; then
20172   cat >>confdefs.h <<EOF
20173 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20174 EOF
20175
20176 fi
20177 done
20178
20179 if test "x$ac_cv_func_getopt" = xno && \
20180    test "x$cf_with_progs$cf_with_tests" != xnono; then
20181         { { echo "$as_me:20181: error: getopt is required for building programs" >&5
20182 echo "$as_me: error: getopt is required for building programs" >&2;}
20183    { (exit 1); exit 1; }; }
20184 fi
20185
20186 if test "x$with_safe_sprintf" = xyes
20187 then
20188         if test "x$ac_cv_func_vsnprintf" = xyes
20189         then
20190                 { echo "$as_me:20190: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
20191 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
20192         else
20193
20194 cat >>confdefs.h <<\EOF
20195 #define USE_SAFE_SPRINTF 1
20196 EOF
20197
20198         fi
20199 fi
20200
20201 if test "x$with_getcap" = "xyes" ; then
20202
20203 echo "$as_me:20203: checking for terminal-capability database functions" >&5
20204 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
20205 if test "${cf_cv_cgetent+set}" = set; then
20206   echo $ECHO_N "(cached) $ECHO_C" >&6
20207 else
20208
20209 cat >conftest.$ac_ext <<_ACEOF
20210 #line 20210 "configure"
20211 #include "confdefs.h"
20212
20213 #include <stdlib.h>
20214 int
20215 main (void)
20216 {
20217
20218         char temp[128];
20219         char *buf = temp;
20220         char *db_array = temp;
20221         cgetent(&buf, &db_array, "vt100");
20222         cgetcap(buf, "tc", '=');
20223         cgetmatch(buf, "tc");
20224
20225   ;
20226   return 0;
20227 }
20228 _ACEOF
20229 rm -f conftest.$ac_objext conftest$ac_exeext
20230 if { (eval echo "$as_me:20230: \"$ac_link\"") >&5
20231   (eval $ac_link) 2>&5
20232   ac_status=$?
20233   echo "$as_me:20233: \$? = $ac_status" >&5
20234   (exit $ac_status); } &&
20235          { ac_try='test -s conftest$ac_exeext'
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_cgetent=yes
20242 else
20243   echo "$as_me: failed program was:" >&5
20244 cat conftest.$ac_ext >&5
20245 cf_cv_cgetent=no
20246 fi
20247 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20248
20249 fi
20250 echo "$as_me:20250: result: $cf_cv_cgetent" >&5
20251 echo "${ECHO_T}$cf_cv_cgetent" >&6
20252
20253 if test "$cf_cv_cgetent" = yes
20254 then
20255
20256 cat >>confdefs.h <<\EOF
20257 #define HAVE_BSD_CGETENT 1
20258 EOF
20259
20260 echo "$as_me:20260: checking if cgetent uses const parameter" >&5
20261 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
20262 if test "${cf_cv_cgetent_const+set}" = set; then
20263   echo $ECHO_N "(cached) $ECHO_C" >&6
20264 else
20265
20266 cat >conftest.$ac_ext <<_ACEOF
20267 #line 20267 "configure"
20268 #include "confdefs.h"
20269
20270 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
20271 #include <stdlib.h>
20272 int
20273 main (void)
20274 {
20275
20276         char temp[128];
20277         char *buf = temp;
20278 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
20279         const char *db_array = temp;
20280         cgetent(&buf, &db_array, "vt100");
20281 #endif
20282         cgetcap(buf, "tc", '=');
20283         cgetmatch(buf, "tc");
20284
20285   ;
20286   return 0;
20287 }
20288 _ACEOF
20289 rm -f conftest.$ac_objext conftest$ac_exeext
20290 if { (eval echo "$as_me:20290: \"$ac_link\"") >&5
20291   (eval $ac_link) 2>&5
20292   ac_status=$?
20293   echo "$as_me:20293: \$? = $ac_status" >&5
20294   (exit $ac_status); } &&
20295          { ac_try='test -s conftest$ac_exeext'
20296   { (eval echo "$as_me:20296: \"$ac_try\"") >&5
20297   (eval $ac_try) 2>&5
20298   ac_status=$?
20299   echo "$as_me:20299: \$? = $ac_status" >&5
20300   (exit $ac_status); }; }; then
20301   cf_cv_cgetent_const=yes
20302 else
20303   echo "$as_me: failed program was:" >&5
20304 cat conftest.$ac_ext >&5
20305 cf_cv_cgetent_const=no
20306 fi
20307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20308
20309 fi
20310 echo "$as_me:20310: result: $cf_cv_cgetent_const" >&5
20311 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
20312         if test "$cf_cv_cgetent_const" = yes
20313         then
20314
20315 cat >>confdefs.h <<EOF
20316 #define CGETENT_CONST const
20317 EOF
20318
20319         fi
20320 fi
20321
20322 fi
20323
20324 echo "$as_me:20324: checking for isascii" >&5
20325 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
20326 if test "${cf_cv_have_isascii+set}" = set; then
20327   echo $ECHO_N "(cached) $ECHO_C" >&6
20328 else
20329
20330         cat >conftest.$ac_ext <<_ACEOF
20331 #line 20331 "configure"
20332 #include "confdefs.h"
20333 #include <ctype.h>
20334 int
20335 main (void)
20336 {
20337 int x = isascii(' ')
20338   ;
20339   return 0;
20340 }
20341 _ACEOF
20342 rm -f conftest.$ac_objext conftest$ac_exeext
20343 if { (eval echo "$as_me:20343: \"$ac_link\"") >&5
20344   (eval $ac_link) 2>&5
20345   ac_status=$?
20346   echo "$as_me:20346: \$? = $ac_status" >&5
20347   (exit $ac_status); } &&
20348          { ac_try='test -s conftest$ac_exeext'
20349   { (eval echo "$as_me:20349: \"$ac_try\"") >&5
20350   (eval $ac_try) 2>&5
20351   ac_status=$?
20352   echo "$as_me:20352: \$? = $ac_status" >&5
20353   (exit $ac_status); }; }; then
20354   cf_cv_have_isascii=yes
20355 else
20356   echo "$as_me: failed program was:" >&5
20357 cat conftest.$ac_ext >&5
20358 cf_cv_have_isascii=no
20359 fi
20360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20361
20362 fi
20363 echo "$as_me:20363: result: $cf_cv_have_isascii" >&5
20364 echo "${ECHO_T}$cf_cv_have_isascii" >&6
20365 test "$cf_cv_have_isascii" = yes &&
20366 cat >>confdefs.h <<\EOF
20367 #define HAVE_ISASCII 1
20368 EOF
20369
20370 if test "$ac_cv_func_sigaction" = yes; then
20371 echo "$as_me:20371: checking whether sigaction needs _POSIX_SOURCE" >&5
20372 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
20373 cat >conftest.$ac_ext <<_ACEOF
20374 #line 20374 "configure"
20375 #include "confdefs.h"
20376
20377 #include <sys/types.h>
20378 #include <signal.h>
20379 int
20380 main (void)
20381 {
20382 struct sigaction act
20383   ;
20384   return 0;
20385 }
20386 _ACEOF
20387 rm -f conftest.$ac_objext
20388 if { (eval echo "$as_me:20388: \"$ac_compile\"") >&5
20389   (eval $ac_compile) 2>&5
20390   ac_status=$?
20391   echo "$as_me:20391: \$? = $ac_status" >&5
20392   (exit $ac_status); } &&
20393          { ac_try='test -s conftest.$ac_objext'
20394   { (eval echo "$as_me:20394: \"$ac_try\"") >&5
20395   (eval $ac_try) 2>&5
20396   ac_status=$?
20397   echo "$as_me:20397: \$? = $ac_status" >&5
20398   (exit $ac_status); }; }; then
20399   sigact_bad=no
20400 else
20401   echo "$as_me: failed program was:" >&5
20402 cat conftest.$ac_ext >&5
20403
20404 cat >conftest.$ac_ext <<_ACEOF
20405 #line 20405 "configure"
20406 #include "confdefs.h"
20407
20408 #define _POSIX_SOURCE
20409 #include <sys/types.h>
20410 #include <signal.h>
20411 int
20412 main (void)
20413 {
20414 struct sigaction act
20415   ;
20416   return 0;
20417 }
20418 _ACEOF
20419 rm -f conftest.$ac_objext
20420 if { (eval echo "$as_me:20420: \"$ac_compile\"") >&5
20421   (eval $ac_compile) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit $ac_status); } &&
20425          { ac_try='test -s conftest.$ac_objext'
20426   { (eval echo "$as_me:20426: \"$ac_try\"") >&5
20427   (eval $ac_try) 2>&5
20428   ac_status=$?
20429   echo "$as_me:20429: \$? = $ac_status" >&5
20430   (exit $ac_status); }; }; then
20431   sigact_bad=yes
20432
20433 cat >>confdefs.h <<\EOF
20434 #define _POSIX_SOURCE 1
20435 EOF
20436
20437 else
20438   echo "$as_me: failed program was:" >&5
20439 cat conftest.$ac_ext >&5
20440 sigact_bad=unknown
20441 fi
20442 rm -f conftest.$ac_objext conftest.$ac_ext
20443 fi
20444 rm -f conftest.$ac_objext conftest.$ac_ext
20445 echo "$as_me:20445: result: $sigact_bad" >&5
20446 echo "${ECHO_T}$sigact_bad" >&6
20447 fi
20448
20449 echo "$as_me:20449: checking if nanosleep really works" >&5
20450 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
20451 if test "${cf_cv_func_nanosleep+set}" = set; then
20452   echo $ECHO_N "(cached) $ECHO_C" >&6
20453 else
20454
20455 if test "$cross_compiling" = yes; then
20456   cf_cv_func_nanosleep=unknown
20457 else
20458   cat >conftest.$ac_ext <<_ACEOF
20459 #line 20459 "configure"
20460 #include "confdefs.h"
20461
20462 #include <stdio.h>
20463 #include <errno.h>
20464 #include <time.h>
20465
20466 #ifdef HAVE_SYS_TIME_H
20467 #include <sys/time.h>
20468 #endif
20469
20470 int main(void) {
20471         struct timespec ts1, ts2;
20472         int code;
20473         ts1.tv_sec  = 0;
20474         ts1.tv_nsec = 750000000;
20475         ts2.tv_sec  = 0;
20476         ts2.tv_nsec = 0;
20477         errno = 0;
20478         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
20479         ${cf_cv_main_return:-return}(code != 0);
20480 }
20481
20482 _ACEOF
20483 rm -f conftest$ac_exeext
20484 if { (eval echo "$as_me:20484: \"$ac_link\"") >&5
20485   (eval $ac_link) 2>&5
20486   ac_status=$?
20487   echo "$as_me:20487: \$? = $ac_status" >&5
20488   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20489   { (eval echo "$as_me:20489: \"$ac_try\"") >&5
20490   (eval $ac_try) 2>&5
20491   ac_status=$?
20492   echo "$as_me:20492: \$? = $ac_status" >&5
20493   (exit $ac_status); }; }; then
20494   cf_cv_func_nanosleep=yes
20495 else
20496   echo "$as_me: program exited with status $ac_status" >&5
20497 echo "$as_me: failed program was:" >&5
20498 cat conftest.$ac_ext >&5
20499 cf_cv_func_nanosleep=no
20500 fi
20501 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20502 fi
20503 fi
20504 echo "$as_me:20504: result: $cf_cv_func_nanosleep" >&5
20505 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
20506
20507 test "$cf_cv_func_nanosleep" = "yes" &&
20508 cat >>confdefs.h <<\EOF
20509 #define HAVE_NANOSLEEP 1
20510 EOF
20511
20512 for ac_header in \
20513 termio.h \
20514 termios.h \
20515 unistd.h \
20516 sys/ioctl.h \
20517 sys/termio.h \
20518
20519 do
20520 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20521 echo "$as_me:20521: checking for $ac_header" >&5
20522 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20523 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20524   echo $ECHO_N "(cached) $ECHO_C" >&6
20525 else
20526   cat >conftest.$ac_ext <<_ACEOF
20527 #line 20527 "configure"
20528 #include "confdefs.h"
20529 #include <$ac_header>
20530 _ACEOF
20531 if { (eval echo "$as_me:20531: \"$ac_cpp conftest.$ac_ext\"") >&5
20532   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20533   ac_status=$?
20534   egrep -v '^ *\+' conftest.er1 >conftest.err
20535   rm -f conftest.er1
20536   cat conftest.err >&5
20537   echo "$as_me:20537: \$? = $ac_status" >&5
20538   (exit $ac_status); } >/dev/null; then
20539   if test -s conftest.err; then
20540     ac_cpp_err=$ac_c_preproc_warn_flag
20541   else
20542     ac_cpp_err=
20543   fi
20544 else
20545   ac_cpp_err=yes
20546 fi
20547 if test -z "$ac_cpp_err"; then
20548   eval "$as_ac_Header=yes"
20549 else
20550   echo "$as_me: failed program was:" >&5
20551   cat conftest.$ac_ext >&5
20552   eval "$as_ac_Header=no"
20553 fi
20554 rm -f conftest.err conftest.$ac_ext
20555 fi
20556 echo "$as_me:20556: result: `eval echo '${'$as_ac_Header'}'`" >&5
20557 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20558 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20559   cat >>confdefs.h <<EOF
20560 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20561 EOF
20562
20563 fi
20564 done
20565
20566 if test "$ac_cv_header_termios_h" = yes ; then
20567         case "$CFLAGS $CPPFLAGS" in
20568         (*-D_POSIX_SOURCE*)
20569                 termios_bad=dunno ;;
20570         (*)     termios_bad=maybe ;;
20571         esac
20572         if test "$termios_bad" = maybe ; then
20573         echo "$as_me:20573: checking whether termios.h needs _POSIX_SOURCE" >&5
20574 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
20575         cat >conftest.$ac_ext <<_ACEOF
20576 #line 20576 "configure"
20577 #include "confdefs.h"
20578 #include <termios.h>
20579 int
20580 main (void)
20581 {
20582 struct termios foo; int x = foo.c_iflag = 1; (void)x
20583   ;
20584   return 0;
20585 }
20586 _ACEOF
20587 rm -f conftest.$ac_objext
20588 if { (eval echo "$as_me:20588: \"$ac_compile\"") >&5
20589   (eval $ac_compile) 2>&5
20590   ac_status=$?
20591   echo "$as_me:20591: \$? = $ac_status" >&5
20592   (exit $ac_status); } &&
20593          { ac_try='test -s conftest.$ac_objext'
20594   { (eval echo "$as_me:20594: \"$ac_try\"") >&5
20595   (eval $ac_try) 2>&5
20596   ac_status=$?
20597   echo "$as_me:20597: \$? = $ac_status" >&5
20598   (exit $ac_status); }; }; then
20599   termios_bad=no
20600 else
20601   echo "$as_me: failed program was:" >&5
20602 cat conftest.$ac_ext >&5
20603
20604                 cat >conftest.$ac_ext <<_ACEOF
20605 #line 20605 "configure"
20606 #include "confdefs.h"
20607
20608 #define _POSIX_SOURCE
20609 #include <termios.h>
20610 int
20611 main (void)
20612 {
20613 struct termios foo; int x = foo.c_iflag = 2; (void)x
20614   ;
20615   return 0;
20616 }
20617 _ACEOF
20618 rm -f conftest.$ac_objext
20619 if { (eval echo "$as_me:20619: \"$ac_compile\"") >&5
20620   (eval $ac_compile) 2>&5
20621   ac_status=$?
20622   echo "$as_me:20622: \$? = $ac_status" >&5
20623   (exit $ac_status); } &&
20624          { ac_try='test -s conftest.$ac_objext'
20625   { (eval echo "$as_me:20625: \"$ac_try\"") >&5
20626   (eval $ac_try) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit $ac_status); }; }; then
20630   termios_bad=unknown
20631 else
20632   echo "$as_me: failed program was:" >&5
20633 cat conftest.$ac_ext >&5
20634 termios_bad=yes
20635 cat >>confdefs.h <<\EOF
20636 #define _POSIX_SOURCE 1
20637 EOF
20638
20639 fi
20640 rm -f conftest.$ac_objext conftest.$ac_ext
20641
20642 fi
20643 rm -f conftest.$ac_objext conftest.$ac_ext
20644         echo "$as_me:20644: result: $termios_bad" >&5
20645 echo "${ECHO_T}$termios_bad" >&6
20646         fi
20647 fi
20648
20649 echo "$as_me:20649: checking for tcgetattr" >&5
20650 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
20651 if test "${cf_cv_have_tcgetattr+set}" = set; then
20652   echo $ECHO_N "(cached) $ECHO_C" >&6
20653 else
20654
20655 cat >conftest.$ac_ext <<_ACEOF
20656 #line 20656 "configure"
20657 #include "confdefs.h"
20658
20659 #include <sys/types.h>
20660 #ifdef HAVE_UNISTD_H
20661 #include <unistd.h>
20662 #endif
20663 #ifdef HAVE_TERMIOS_H
20664 #include <termios.h>
20665 #define TTY struct termios
20666 #else
20667 #ifdef HAVE_TERMIO_H
20668 #include <termio.h>
20669 #define TTY struct termio
20670 #endif
20671 #endif
20672
20673 int
20674 main (void)
20675 {
20676
20677 TTY foo;
20678 tcgetattr(1, &foo);
20679   ;
20680   return 0;
20681 }
20682 _ACEOF
20683 rm -f conftest.$ac_objext conftest$ac_exeext
20684 if { (eval echo "$as_me:20684: \"$ac_link\"") >&5
20685   (eval $ac_link) 2>&5
20686   ac_status=$?
20687   echo "$as_me:20687: \$? = $ac_status" >&5
20688   (exit $ac_status); } &&
20689          { ac_try='test -s conftest$ac_exeext'
20690   { (eval echo "$as_me:20690: \"$ac_try\"") >&5
20691   (eval $ac_try) 2>&5
20692   ac_status=$?
20693   echo "$as_me:20693: \$? = $ac_status" >&5
20694   (exit $ac_status); }; }; then
20695   cf_cv_have_tcgetattr=yes
20696 else
20697   echo "$as_me: failed program was:" >&5
20698 cat conftest.$ac_ext >&5
20699 cf_cv_have_tcgetattr=no
20700 fi
20701 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20702 fi
20703 echo "$as_me:20703: result: $cf_cv_have_tcgetattr" >&5
20704 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
20705 test "$cf_cv_have_tcgetattr" = yes &&
20706 cat >>confdefs.h <<\EOF
20707 #define HAVE_TCGETATTR 1
20708 EOF
20709
20710 echo "$as_me:20710: checking for vsscanf function or workaround" >&5
20711 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
20712 if test "${cf_cv_func_vsscanf+set}" = set; then
20713   echo $ECHO_N "(cached) $ECHO_C" >&6
20714 else
20715
20716 cat >conftest.$ac_ext <<_ACEOF
20717 #line 20717 "configure"
20718 #include "confdefs.h"
20719
20720 #include <stdarg.h>
20721 #include <stdio.h>
20722 int
20723 main (void)
20724 {
20725
20726         va_list ap;
20727         vsscanf("from", "%d", ap)
20728   ;
20729   return 0;
20730 }
20731 _ACEOF
20732 rm -f conftest.$ac_objext conftest$ac_exeext
20733 if { (eval echo "$as_me:20733: \"$ac_link\"") >&5
20734   (eval $ac_link) 2>&5
20735   ac_status=$?
20736   echo "$as_me:20736: \$? = $ac_status" >&5
20737   (exit $ac_status); } &&
20738          { ac_try='test -s conftest$ac_exeext'
20739   { (eval echo "$as_me:20739: \"$ac_try\"") >&5
20740   (eval $ac_try) 2>&5
20741   ac_status=$?
20742   echo "$as_me:20742: \$? = $ac_status" >&5
20743   (exit $ac_status); }; }; then
20744   cf_cv_func_vsscanf=vsscanf
20745 else
20746   echo "$as_me: failed program was:" >&5
20747 cat conftest.$ac_ext >&5
20748
20749 cat >conftest.$ac_ext <<_ACEOF
20750 #line 20750 "configure"
20751 #include "confdefs.h"
20752
20753 #include <stdarg.h>
20754 #include <stdio.h>
20755 int
20756 main (void)
20757 {
20758
20759         FILE strbuf;
20760         char *str = "from";
20761
20762         strbuf._flag = _IOREAD;
20763         strbuf._ptr = strbuf._base = (unsigned char *) str;
20764         strbuf._cnt = strlen(str);
20765         strbuf._file = _NFILE;
20766         return (vfscanf(&strbuf, "%d", ap))
20767   ;
20768   return 0;
20769 }
20770 _ACEOF
20771 rm -f conftest.$ac_objext conftest$ac_exeext
20772 if { (eval echo "$as_me:20772: \"$ac_link\"") >&5
20773   (eval $ac_link) 2>&5
20774   ac_status=$?
20775   echo "$as_me:20775: \$? = $ac_status" >&5
20776   (exit $ac_status); } &&
20777          { ac_try='test -s conftest$ac_exeext'
20778   { (eval echo "$as_me:20778: \"$ac_try\"") >&5
20779   (eval $ac_try) 2>&5
20780   ac_status=$?
20781   echo "$as_me:20781: \$? = $ac_status" >&5
20782   (exit $ac_status); }; }; then
20783   cf_cv_func_vsscanf=vfscanf
20784 else
20785   echo "$as_me: failed program was:" >&5
20786 cat conftest.$ac_ext >&5
20787
20788 cat >conftest.$ac_ext <<_ACEOF
20789 #line 20789 "configure"
20790 #include "confdefs.h"
20791
20792 #include <stdarg.h>
20793 #include <stdio.h>
20794 int
20795 main (void)
20796 {
20797
20798         FILE strbuf;
20799         char *str = "from";
20800
20801         strbuf._flag = _IOREAD;
20802         strbuf._ptr = strbuf._base = (unsigned char *) str;
20803         strbuf._cnt = strlen(str);
20804         strbuf._file = _NFILE;
20805         return (_doscan(&strbuf, "%d", ap))
20806   ;
20807   return 0;
20808 }
20809 _ACEOF
20810 rm -f conftest.$ac_objext conftest$ac_exeext
20811 if { (eval echo "$as_me:20811: \"$ac_link\"") >&5
20812   (eval $ac_link) 2>&5
20813   ac_status=$?
20814   echo "$as_me:20814: \$? = $ac_status" >&5
20815   (exit $ac_status); } &&
20816          { ac_try='test -s conftest$ac_exeext'
20817   { (eval echo "$as_me:20817: \"$ac_try\"") >&5
20818   (eval $ac_try) 2>&5
20819   ac_status=$?
20820   echo "$as_me:20820: \$? = $ac_status" >&5
20821   (exit $ac_status); }; }; then
20822   cf_cv_func_vsscanf=_doscan
20823 else
20824   echo "$as_me: failed program was:" >&5
20825 cat conftest.$ac_ext >&5
20826
20827 cf_cv_func_vsscanf=no
20828 fi
20829 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20830 fi
20831 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20832 fi
20833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20834 fi
20835 echo "$as_me:20835: result: $cf_cv_func_vsscanf" >&5
20836 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
20837
20838 case $cf_cv_func_vsscanf in
20839 (vsscanf)
20840 cat >>confdefs.h <<\EOF
20841 #define HAVE_VSSCANF 1
20842 EOF
20843 ;;
20844 (vfscanf)
20845 cat >>confdefs.h <<\EOF
20846 #define HAVE_VFSCANF 1
20847 EOF
20848 ;;
20849 (_doscan)
20850 cat >>confdefs.h <<\EOF
20851 #define HAVE__DOSCAN 1
20852 EOF
20853 ;;
20854 esac
20855
20856 for ac_header in \
20857 unistd.h \
20858
20859 do
20860 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20861 echo "$as_me:20861: checking for $ac_header" >&5
20862 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20863 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20864   echo $ECHO_N "(cached) $ECHO_C" >&6
20865 else
20866   cat >conftest.$ac_ext <<_ACEOF
20867 #line 20867 "configure"
20868 #include "confdefs.h"
20869 #include <$ac_header>
20870 _ACEOF
20871 if { (eval echo "$as_me:20871: \"$ac_cpp conftest.$ac_ext\"") >&5
20872   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20873   ac_status=$?
20874   egrep -v '^ *\+' conftest.er1 >conftest.err
20875   rm -f conftest.er1
20876   cat conftest.err >&5
20877   echo "$as_me:20877: \$? = $ac_status" >&5
20878   (exit $ac_status); } >/dev/null; then
20879   if test -s conftest.err; then
20880     ac_cpp_err=$ac_c_preproc_warn_flag
20881   else
20882     ac_cpp_err=
20883   fi
20884 else
20885   ac_cpp_err=yes
20886 fi
20887 if test -z "$ac_cpp_err"; then
20888   eval "$as_ac_Header=yes"
20889 else
20890   echo "$as_me: failed program was:" >&5
20891   cat conftest.$ac_ext >&5
20892   eval "$as_ac_Header=no"
20893 fi
20894 rm -f conftest.err conftest.$ac_ext
20895 fi
20896 echo "$as_me:20896: result: `eval echo '${'$as_ac_Header'}'`" >&5
20897 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20898 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20899   cat >>confdefs.h <<EOF
20900 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20901 EOF
20902
20903 fi
20904 done
20905
20906 echo "$as_me:20906: checking for working mkstemp" >&5
20907 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
20908 if test "${cf_cv_func_mkstemp+set}" = set; then
20909   echo $ECHO_N "(cached) $ECHO_C" >&6
20910 else
20911
20912 rm -rf conftest*
20913 if test "$cross_compiling" = yes; then
20914   cf_cv_func_mkstemp=maybe
20915 else
20916   cat >conftest.$ac_ext <<_ACEOF
20917 #line 20917 "configure"
20918 #include "confdefs.h"
20919
20920 #include <sys/types.h>
20921 #ifdef HAVE_UNISTD_H
20922 #include <unistd.h>
20923 #endif
20924 #include <stdlib.h>
20925 #include <stdio.h>
20926 #include <string.h>
20927 #include <sys/stat.h>
20928 int main(void)
20929 {
20930         char *tmpl = "conftestXXXXXX";
20931         char name[2][80];
20932         int n;
20933         int result = 0;
20934         int fd;
20935         struct stat sb;
20936
20937         umask(077);
20938         for (n = 0; n < 2; ++n) {
20939                 strcpy(name[n], tmpl);
20940                 if ((fd = mkstemp(name[n])) >= 0) {
20941                         if (!strcmp(name[n], tmpl)
20942                          || stat(name[n], &sb) != 0
20943                          || (sb.st_mode & S_IFMT) != S_IFREG
20944                          || (sb.st_mode & 077) != 0) {
20945                                 result = 1;
20946                         }
20947                         close(fd);
20948                 }
20949         }
20950         if (result == 0
20951          && !strcmp(name[0], name[1]))
20952                 result = 1;
20953         ${cf_cv_main_return:-return}(result);
20954 }
20955
20956 _ACEOF
20957 rm -f conftest$ac_exeext
20958 if { (eval echo "$as_me:20958: \"$ac_link\"") >&5
20959   (eval $ac_link) 2>&5
20960   ac_status=$?
20961   echo "$as_me:20961: \$? = $ac_status" >&5
20962   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20963   { (eval echo "$as_me:20963: \"$ac_try\"") >&5
20964   (eval $ac_try) 2>&5
20965   ac_status=$?
20966   echo "$as_me:20966: \$? = $ac_status" >&5
20967   (exit $ac_status); }; }; then
20968   cf_cv_func_mkstemp=yes
20969
20970 else
20971   echo "$as_me: program exited with status $ac_status" >&5
20972 echo "$as_me: failed program was:" >&5
20973 cat conftest.$ac_ext >&5
20974 cf_cv_func_mkstemp=no
20975
20976 fi
20977 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20978 fi
20979
20980 fi
20981 echo "$as_me:20981: result: $cf_cv_func_mkstemp" >&5
20982 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
20983 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
20984         echo "$as_me:20984: checking for mkstemp" >&5
20985 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
20986 if test "${ac_cv_func_mkstemp+set}" = set; then
20987   echo $ECHO_N "(cached) $ECHO_C" >&6
20988 else
20989   cat >conftest.$ac_ext <<_ACEOF
20990 #line 20990 "configure"
20991 #include "confdefs.h"
20992 #define mkstemp autoconf_temporary
20993 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20994 #undef mkstemp
20995
20996 #ifdef __cplusplus
20997 extern "C"
20998 #endif
20999
21000 /* We use char because int might match the return type of a gcc2
21001    builtin and then its argument prototype would still apply.  */
21002 char mkstemp (void);
21003
21004 int
21005 main (void)
21006 {
21007
21008 /* The GNU C library defines stubs for functions which it implements
21009     to always fail with ENOSYS.  Some functions are actually named
21010     something starting with __ and the normal name is an alias.  */
21011 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
21012 #error found stub for mkstemp
21013 #endif
21014
21015         return mkstemp ();
21016   ;
21017   return 0;
21018 }
21019 _ACEOF
21020 rm -f conftest.$ac_objext conftest$ac_exeext
21021 if { (eval echo "$as_me:21021: \"$ac_link\"") >&5
21022   (eval $ac_link) 2>&5
21023   ac_status=$?
21024   echo "$as_me:21024: \$? = $ac_status" >&5
21025   (exit $ac_status); } &&
21026          { ac_try='test -s conftest$ac_exeext'
21027   { (eval echo "$as_me:21027: \"$ac_try\"") >&5
21028   (eval $ac_try) 2>&5
21029   ac_status=$?
21030   echo "$as_me:21030: \$? = $ac_status" >&5
21031   (exit $ac_status); }; }; then
21032   ac_cv_func_mkstemp=yes
21033 else
21034   echo "$as_me: failed program was:" >&5
21035 cat conftest.$ac_ext >&5
21036 ac_cv_func_mkstemp=no
21037 fi
21038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21039 fi
21040 echo "$as_me:21040: result: $ac_cv_func_mkstemp" >&5
21041 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
21042
21043 fi
21044 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
21045
21046 cat >>confdefs.h <<\EOF
21047 #define HAVE_MKSTEMP 1
21048 EOF
21049
21050 fi
21051
21052 # setup for prototype of fallback for vsscanf()
21053
21054 if test "$cf_cv_func_vsscanf" = vsscanf ; then
21055         HAVE_VSSCANF=1
21056 else
21057         HAVE_VSSCANF=0
21058 fi
21059
21060 if test "x$cross_compiling" = xyes ; then
21061         { echo "$as_me:21061: WARNING: cross compiling: assume setvbuf params not reversed" >&5
21062 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
21063 else
21064         echo "$as_me:21064: checking whether setvbuf arguments are reversed" >&5
21065 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
21066 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
21067   echo $ECHO_N "(cached) $ECHO_C" >&6
21068 else
21069   if test "$cross_compiling" = yes; then
21070   { { echo "$as_me:21070: error: cannot run test program while cross compiling" >&5
21071 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
21072    { (exit 1); exit 1; }; }
21073 else
21074   cat >conftest.$ac_ext <<_ACEOF
21075 #line 21075 "configure"
21076 #include "confdefs.h"
21077 #include <stdio.h>
21078 /* If setvbuf has the reversed format, exit 0. */
21079 int
21080 main (void)
21081 {
21082   /* This call has the arguments reversed.
21083      A reversed system may check and see that the address of main
21084      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
21085   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
21086     $ac_main_return(1);
21087   putc('\r', stdout);
21088   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
21089 }
21090 _ACEOF
21091 rm -f conftest$ac_exeext
21092 if { (eval echo "$as_me:21092: \"$ac_link\"") >&5
21093   (eval $ac_link) 2>&5
21094   ac_status=$?
21095   echo "$as_me:21095: \$? = $ac_status" >&5
21096   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21097   { (eval echo "$as_me:21097: \"$ac_try\"") >&5
21098   (eval $ac_try) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit $ac_status); }; }; then
21102   ac_cv_func_setvbuf_reversed=yes
21103 else
21104   echo "$as_me: program exited with status $ac_status" >&5
21105 echo "$as_me: failed program was:" >&5
21106 cat conftest.$ac_ext >&5
21107 ac_cv_func_setvbuf_reversed=no
21108 fi
21109 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21110 fi
21111 rm -f core core.* *.core
21112 fi
21113 echo "$as_me:21113: result: $ac_cv_func_setvbuf_reversed" >&5
21114 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
21115 if test $ac_cv_func_setvbuf_reversed = yes; then
21116
21117 cat >>confdefs.h <<\EOF
21118 #define SETVBUF_REVERSED 1
21119 EOF
21120
21121 fi
21122
21123 fi
21124 echo "$as_me:21124: checking for intptr_t" >&5
21125 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
21126 if test "${ac_cv_type_intptr_t+set}" = set; then
21127   echo $ECHO_N "(cached) $ECHO_C" >&6
21128 else
21129   cat >conftest.$ac_ext <<_ACEOF
21130 #line 21130 "configure"
21131 #include "confdefs.h"
21132 $ac_includes_default
21133 int
21134 main (void)
21135 {
21136 if ((intptr_t *) 0)
21137   return 0;
21138 if (sizeof (intptr_t))
21139   return 0;
21140   ;
21141   return 0;
21142 }
21143 _ACEOF
21144 rm -f conftest.$ac_objext
21145 if { (eval echo "$as_me:21145: \"$ac_compile\"") >&5
21146   (eval $ac_compile) 2>&5
21147   ac_status=$?
21148   echo "$as_me:21148: \$? = $ac_status" >&5
21149   (exit $ac_status); } &&
21150          { ac_try='test -s conftest.$ac_objext'
21151   { (eval echo "$as_me:21151: \"$ac_try\"") >&5
21152   (eval $ac_try) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit $ac_status); }; }; then
21156   ac_cv_type_intptr_t=yes
21157 else
21158   echo "$as_me: failed program was:" >&5
21159 cat conftest.$ac_ext >&5
21160 ac_cv_type_intptr_t=no
21161 fi
21162 rm -f conftest.$ac_objext conftest.$ac_ext
21163 fi
21164 echo "$as_me:21164: result: $ac_cv_type_intptr_t" >&5
21165 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
21166 if test $ac_cv_type_intptr_t = yes; then
21167   :
21168 else
21169
21170 cat >>confdefs.h <<EOF
21171 #define intptr_t long
21172 EOF
21173
21174 fi
21175
21176 echo "$as_me:21176: checking for ssize_t" >&5
21177 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
21178 if test "${ac_cv_type_ssize_t+set}" = set; then
21179   echo $ECHO_N "(cached) $ECHO_C" >&6
21180 else
21181   cat >conftest.$ac_ext <<_ACEOF
21182 #line 21182 "configure"
21183 #include "confdefs.h"
21184 $ac_includes_default
21185 int
21186 main (void)
21187 {
21188 if ((ssize_t *) 0)
21189   return 0;
21190 if (sizeof (ssize_t))
21191   return 0;
21192   ;
21193   return 0;
21194 }
21195 _ACEOF
21196 rm -f conftest.$ac_objext
21197 if { (eval echo "$as_me:21197: \"$ac_compile\"") >&5
21198   (eval $ac_compile) 2>&5
21199   ac_status=$?
21200   echo "$as_me:21200: \$? = $ac_status" >&5
21201   (exit $ac_status); } &&
21202          { ac_try='test -s conftest.$ac_objext'
21203   { (eval echo "$as_me:21203: \"$ac_try\"") >&5
21204   (eval $ac_try) 2>&5
21205   ac_status=$?
21206   echo "$as_me:21206: \$? = $ac_status" >&5
21207   (exit $ac_status); }; }; then
21208   ac_cv_type_ssize_t=yes
21209 else
21210   echo "$as_me: failed program was:" >&5
21211 cat conftest.$ac_ext >&5
21212 ac_cv_type_ssize_t=no
21213 fi
21214 rm -f conftest.$ac_objext conftest.$ac_ext
21215 fi
21216 echo "$as_me:21216: result: $ac_cv_type_ssize_t" >&5
21217 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
21218 if test $ac_cv_type_ssize_t = yes; then
21219   :
21220 else
21221
21222 cat >>confdefs.h <<EOF
21223 #define ssize_t int
21224 EOF
21225
21226 fi
21227
21228 echo "$as_me:21228: checking for type sigaction_t" >&5
21229 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
21230 if test "${cf_cv_type_sigaction+set}" = set; then
21231   echo $ECHO_N "(cached) $ECHO_C" >&6
21232 else
21233
21234         cat >conftest.$ac_ext <<_ACEOF
21235 #line 21235 "configure"
21236 #include "confdefs.h"
21237
21238 #include <signal.h>
21239 int
21240 main (void)
21241 {
21242 sigaction_t x
21243   ;
21244   return 0;
21245 }
21246 _ACEOF
21247 rm -f conftest.$ac_objext
21248 if { (eval echo "$as_me:21248: \"$ac_compile\"") >&5
21249   (eval $ac_compile) 2>&5
21250   ac_status=$?
21251   echo "$as_me:21251: \$? = $ac_status" >&5
21252   (exit $ac_status); } &&
21253          { ac_try='test -s conftest.$ac_objext'
21254   { (eval echo "$as_me:21254: \"$ac_try\"") >&5
21255   (eval $ac_try) 2>&5
21256   ac_status=$?
21257   echo "$as_me:21257: \$? = $ac_status" >&5
21258   (exit $ac_status); }; }; then
21259   cf_cv_type_sigaction=yes
21260 else
21261   echo "$as_me: failed program was:" >&5
21262 cat conftest.$ac_ext >&5
21263 cf_cv_type_sigaction=no
21264 fi
21265 rm -f conftest.$ac_objext conftest.$ac_ext
21266 fi
21267
21268 echo "$as_me:21268: result: $cf_cv_type_sigaction" >&5
21269 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
21270 test "$cf_cv_type_sigaction" = yes &&
21271 cat >>confdefs.h <<\EOF
21272 #define HAVE_TYPE_SIGACTION 1
21273 EOF
21274
21275 echo "$as_me:21275: checking declaration of size-change" >&5
21276 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21277 if test "${cf_cv_sizechange+set}" = set; then
21278   echo $ECHO_N "(cached) $ECHO_C" >&6
21279 else
21280
21281         cf_cv_sizechange=unknown
21282         cf_save_CPPFLAGS="$CPPFLAGS"
21283
21284 for cf_opts in "" "NEED_PTEM_H"
21285 do
21286
21287         CPPFLAGS="$cf_save_CPPFLAGS"
21288         if test -n "$cf_opts"
21289         then
21290
21291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21292         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21293
21294         fi
21295         cat >conftest.$ac_ext <<_ACEOF
21296 #line 21296 "configure"
21297 #include "confdefs.h"
21298 #include <sys/types.h>
21299 #ifdef HAVE_TERMIOS_H
21300 #include <termios.h>
21301 #else
21302 #ifdef HAVE_TERMIO_H
21303 #include <termio.h>
21304 #endif
21305 #endif
21306
21307 #ifdef NEED_PTEM_H
21308 /* This is a workaround for SCO:  they neglected to define struct winsize in
21309  * termios.h -- it's only in termio.h and ptem.h
21310  */
21311 #include <sys/stream.h>
21312 #include <sys/ptem.h>
21313 #endif
21314
21315 #ifdef HAVE_SYS_IOCTL_H
21316 #include <sys/ioctl.h>
21317 #endif
21318
21319 int
21320 main (void)
21321 {
21322
21323 #ifdef TIOCGSIZE
21324         struct ttysize win;     /* SunOS 3.0... */
21325         int y = win.ts_lines = 2;
21326         int x = win.ts_cols = 1;
21327         (void)y;
21328         (void)x;
21329 #else
21330 #ifdef TIOCGWINSZ
21331         struct winsize win;     /* everything else */
21332         int y = win.ws_row = 2;
21333         int x = win.ws_col = 1;
21334         (void)y;
21335         (void)x;
21336 #else
21337         no TIOCGSIZE or TIOCGWINSZ
21338 #endif /* TIOCGWINSZ */
21339 #endif /* TIOCGSIZE */
21340
21341   ;
21342   return 0;
21343 }
21344 _ACEOF
21345 rm -f conftest.$ac_objext
21346 if { (eval echo "$as_me:21346: \"$ac_compile\"") >&5
21347   (eval $ac_compile) 2>&5
21348   ac_status=$?
21349   echo "$as_me:21349: \$? = $ac_status" >&5
21350   (exit $ac_status); } &&
21351          { ac_try='test -s conftest.$ac_objext'
21352   { (eval echo "$as_me:21352: \"$ac_try\"") >&5
21353   (eval $ac_try) 2>&5
21354   ac_status=$?
21355   echo "$as_me:21355: \$? = $ac_status" >&5
21356   (exit $ac_status); }; }; then
21357   cf_cv_sizechange=yes
21358 else
21359   echo "$as_me: failed program was:" >&5
21360 cat conftest.$ac_ext >&5
21361 cf_cv_sizechange=no
21362 fi
21363 rm -f conftest.$ac_objext conftest.$ac_ext
21364
21365         CPPFLAGS="$cf_save_CPPFLAGS"
21366         if test "$cf_cv_sizechange" = yes ; then
21367                 echo "size-change succeeded ($cf_opts)" >&5
21368                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21369                 break
21370         fi
21371 done
21372
21373 fi
21374 echo "$as_me:21374: result: $cf_cv_sizechange" >&5
21375 echo "${ECHO_T}$cf_cv_sizechange" >&6
21376 if test "$cf_cv_sizechange" != no ; then
21377
21378 cat >>confdefs.h <<\EOF
21379 #define HAVE_SIZECHANGE 1
21380 EOF
21381
21382         case $cf_cv_sizechange in
21383         (NEED*)
21384                 cat >>confdefs.h <<EOF
21385 #define $cf_cv_sizechange  1
21386 EOF
21387
21388                 ;;
21389         esac
21390 fi
21391
21392 echo "$as_me:21392: checking for memmove" >&5
21393 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
21394 if test "${ac_cv_func_memmove+set}" = set; then
21395   echo $ECHO_N "(cached) $ECHO_C" >&6
21396 else
21397   cat >conftest.$ac_ext <<_ACEOF
21398 #line 21398 "configure"
21399 #include "confdefs.h"
21400 #define memmove autoconf_temporary
21401 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21402 #undef memmove
21403
21404 #ifdef __cplusplus
21405 extern "C"
21406 #endif
21407
21408 /* We use char because int might match the return type of a gcc2
21409    builtin and then its argument prototype would still apply.  */
21410 char memmove (void);
21411
21412 int
21413 main (void)
21414 {
21415
21416 /* The GNU C library defines stubs for functions which it implements
21417     to always fail with ENOSYS.  Some functions are actually named
21418     something starting with __ and the normal name is an alias.  */
21419 #if defined (__stub_memmove) || defined (__stub___memmove)
21420 #error found stub for memmove
21421 #endif
21422
21423         return memmove ();
21424   ;
21425   return 0;
21426 }
21427 _ACEOF
21428 rm -f conftest.$ac_objext conftest$ac_exeext
21429 if { (eval echo "$as_me:21429: \"$ac_link\"") >&5
21430   (eval $ac_link) 2>&5
21431   ac_status=$?
21432   echo "$as_me:21432: \$? = $ac_status" >&5
21433   (exit $ac_status); } &&
21434          { ac_try='test -s conftest$ac_exeext'
21435   { (eval echo "$as_me:21435: \"$ac_try\"") >&5
21436   (eval $ac_try) 2>&5
21437   ac_status=$?
21438   echo "$as_me:21438: \$? = $ac_status" >&5
21439   (exit $ac_status); }; }; then
21440   ac_cv_func_memmove=yes
21441 else
21442   echo "$as_me: failed program was:" >&5
21443 cat conftest.$ac_ext >&5
21444 ac_cv_func_memmove=no
21445 fi
21446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21447 fi
21448 echo "$as_me:21448: result: $ac_cv_func_memmove" >&5
21449 echo "${ECHO_T}$ac_cv_func_memmove" >&6
21450 if test $ac_cv_func_memmove = yes; then
21451   :
21452 else
21453
21454 echo "$as_me:21454: checking for bcopy" >&5
21455 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
21456 if test "${ac_cv_func_bcopy+set}" = set; then
21457   echo $ECHO_N "(cached) $ECHO_C" >&6
21458 else
21459   cat >conftest.$ac_ext <<_ACEOF
21460 #line 21460 "configure"
21461 #include "confdefs.h"
21462 #define bcopy autoconf_temporary
21463 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21464 #undef bcopy
21465
21466 #ifdef __cplusplus
21467 extern "C"
21468 #endif
21469
21470 /* We use char because int might match the return type of a gcc2
21471    builtin and then its argument prototype would still apply.  */
21472 char bcopy (void);
21473
21474 int
21475 main (void)
21476 {
21477
21478 /* The GNU C library defines stubs for functions which it implements
21479     to always fail with ENOSYS.  Some functions are actually named
21480     something starting with __ and the normal name is an alias.  */
21481 #if defined (__stub_bcopy) || defined (__stub___bcopy)
21482 #error found stub for bcopy
21483 #endif
21484
21485         return bcopy ();
21486   ;
21487   return 0;
21488 }
21489 _ACEOF
21490 rm -f conftest.$ac_objext conftest$ac_exeext
21491 if { (eval echo "$as_me:21491: \"$ac_link\"") >&5
21492   (eval $ac_link) 2>&5
21493   ac_status=$?
21494   echo "$as_me:21494: \$? = $ac_status" >&5
21495   (exit $ac_status); } &&
21496          { ac_try='test -s conftest$ac_exeext'
21497   { (eval echo "$as_me:21497: \"$ac_try\"") >&5
21498   (eval $ac_try) 2>&5
21499   ac_status=$?
21500   echo "$as_me:21500: \$? = $ac_status" >&5
21501   (exit $ac_status); }; }; then
21502   ac_cv_func_bcopy=yes
21503 else
21504   echo "$as_me: failed program was:" >&5
21505 cat conftest.$ac_ext >&5
21506 ac_cv_func_bcopy=no
21507 fi
21508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21509 fi
21510 echo "$as_me:21510: result: $ac_cv_func_bcopy" >&5
21511 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
21512 if test $ac_cv_func_bcopy = yes; then
21513
21514         echo "$as_me:21514: checking if bcopy does overlapping moves" >&5
21515 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
21516 if test "${cf_cv_good_bcopy+set}" = set; then
21517   echo $ECHO_N "(cached) $ECHO_C" >&6
21518 else
21519
21520                 if test "$cross_compiling" = yes; then
21521   cf_cv_good_bcopy=unknown
21522 else
21523   cat >conftest.$ac_ext <<_ACEOF
21524 #line 21524 "configure"
21525 #include "confdefs.h"
21526
21527 int main(void) {
21528         static char data[] = "abcdefghijklmnopqrstuwwxyz";
21529         char temp[40];
21530         bcopy(data, temp, sizeof(data));
21531         bcopy(temp+10, temp, 15);
21532         bcopy(temp+5, temp+15, 10);
21533         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
21534 }
21535
21536 _ACEOF
21537 rm -f conftest$ac_exeext
21538 if { (eval echo "$as_me:21538: \"$ac_link\"") >&5
21539   (eval $ac_link) 2>&5
21540   ac_status=$?
21541   echo "$as_me:21541: \$? = $ac_status" >&5
21542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21543   { (eval echo "$as_me:21543: \"$ac_try\"") >&5
21544   (eval $ac_try) 2>&5
21545   ac_status=$?
21546   echo "$as_me:21546: \$? = $ac_status" >&5
21547   (exit $ac_status); }; }; then
21548   cf_cv_good_bcopy=yes
21549 else
21550   echo "$as_me: program exited with status $ac_status" >&5
21551 echo "$as_me: failed program was:" >&5
21552 cat conftest.$ac_ext >&5
21553 cf_cv_good_bcopy=no
21554 fi
21555 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21556 fi
21557
21558 fi
21559 echo "$as_me:21559: result: $cf_cv_good_bcopy" >&5
21560 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
21561
21562 else
21563   cf_cv_good_bcopy=no
21564 fi
21565
21566         if test "$cf_cv_good_bcopy" = yes ; then
21567
21568 cat >>confdefs.h <<\EOF
21569 #define USE_OK_BCOPY 1
21570 EOF
21571
21572         else
21573
21574 cat >>confdefs.h <<\EOF
21575 #define USE_MY_MEMMOVE 1
21576 EOF
21577
21578         fi
21579
21580 fi
21581
21582 tty 2>&1 >/dev/null || {
21583 for ac_func in posix_openpt
21584 do
21585 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21586 echo "$as_me:21586: checking for $ac_func" >&5
21587 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21588 if eval "test \"\${$as_ac_var+set}\" = set"; then
21589   echo $ECHO_N "(cached) $ECHO_C" >&6
21590 else
21591   cat >conftest.$ac_ext <<_ACEOF
21592 #line 21592 "configure"
21593 #include "confdefs.h"
21594 #define $ac_func autoconf_temporary
21595 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21596 #undef $ac_func
21597
21598 #ifdef __cplusplus
21599 extern "C"
21600 #endif
21601
21602 /* We use char because int might match the return type of a gcc2
21603    builtin and then its argument prototype would still apply.  */
21604 char $ac_func (void);
21605
21606 int
21607 main (void)
21608 {
21609
21610 /* The GNU C library defines stubs for functions which it implements
21611     to always fail with ENOSYS.  Some functions are actually named
21612     something starting with __ and the normal name is an alias.  */
21613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21614 #error found stub for $ac_func
21615 #endif
21616
21617         return $ac_func ();
21618   ;
21619   return 0;
21620 }
21621 _ACEOF
21622 rm -f conftest.$ac_objext conftest$ac_exeext
21623 if { (eval echo "$as_me:21623: \"$ac_link\"") >&5
21624   (eval $ac_link) 2>&5
21625   ac_status=$?
21626   echo "$as_me:21626: \$? = $ac_status" >&5
21627   (exit $ac_status); } &&
21628          { ac_try='test -s conftest$ac_exeext'
21629   { (eval echo "$as_me:21629: \"$ac_try\"") >&5
21630   (eval $ac_try) 2>&5
21631   ac_status=$?
21632   echo "$as_me:21632: \$? = $ac_status" >&5
21633   (exit $ac_status); }; }; then
21634   eval "$as_ac_var=yes"
21635 else
21636   echo "$as_me: failed program was:" >&5
21637 cat conftest.$ac_ext >&5
21638 eval "$as_ac_var=no"
21639 fi
21640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21641 fi
21642 echo "$as_me:21642: result: `eval echo '${'$as_ac_var'}'`" >&5
21643 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21644 if test `eval echo '${'$as_ac_var'}'` = yes; then
21645   cat >>confdefs.h <<EOF
21646 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21647 EOF
21648
21649 fi
21650 done
21651  }
21652 echo "$as_me:21652: checking if poll really works" >&5
21653 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
21654 if test "${cf_cv_working_poll+set}" = set; then
21655   echo $ECHO_N "(cached) $ECHO_C" >&6
21656 else
21657
21658 if test "$cross_compiling" = yes; then
21659   cf_cv_working_poll=unknown
21660 else
21661   cat >conftest.$ac_ext <<_ACEOF
21662 #line 21662 "configure"
21663 #include "confdefs.h"
21664
21665 #include <stdlib.h>
21666 #include <stdio.h>
21667 #include <unistd.h>
21668 #include <fcntl.h>
21669 #ifdef HAVE_POLL_H
21670 #include <poll.h>
21671 #else
21672 #include <sys/poll.h>
21673 #endif
21674 int main(void) {
21675         struct pollfd myfds;
21676         int ret;
21677
21678         /* check for Darwin bug with respect to "devices" */
21679         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
21680         if (myfds.fd < 0)
21681                 myfds.fd = 0;
21682         myfds.events = POLLIN;
21683         myfds.revents = 0;
21684
21685         ret = poll(&myfds, 1, 100);
21686
21687         if (ret < 0 || (myfds.revents & POLLNVAL)) {
21688                 ret = -1;
21689         } else {
21690                 int fd = 0;
21691                 if (!isatty(fd)) {
21692                         fd = open("/dev/tty", 2);       /* O_RDWR */
21693                 }
21694 #ifdef HAVE_POSIX_OPENPT
21695                 if (fd < 0) {
21696                         fd = posix_openpt(O_RDWR);
21697                 }
21698 #endif
21699
21700                 if (fd >= 0) {
21701                         /* also check with standard input */
21702                         myfds.fd = fd;
21703                         myfds.events = POLLIN;
21704                         myfds.revents = 0;
21705                         ret = poll(&myfds, 1, 100);
21706                 } else {
21707                         ret = -1;
21708                 }
21709         }
21710         ${cf_cv_main_return:-return}(ret < 0);
21711 }
21712 _ACEOF
21713 rm -f conftest$ac_exeext
21714 if { (eval echo "$as_me:21714: \"$ac_link\"") >&5
21715   (eval $ac_link) 2>&5
21716   ac_status=$?
21717   echo "$as_me:21717: \$? = $ac_status" >&5
21718   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21719   { (eval echo "$as_me:21719: \"$ac_try\"") >&5
21720   (eval $ac_try) 2>&5
21721   ac_status=$?
21722   echo "$as_me:21722: \$? = $ac_status" >&5
21723   (exit $ac_status); }; }; then
21724   cf_cv_working_poll=yes
21725 else
21726   echo "$as_me: program exited with status $ac_status" >&5
21727 echo "$as_me: failed program was:" >&5
21728 cat conftest.$ac_ext >&5
21729 cf_cv_working_poll=no
21730 fi
21731 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21732 fi
21733 fi
21734 echo "$as_me:21734: result: $cf_cv_working_poll" >&5
21735 echo "${ECHO_T}$cf_cv_working_poll" >&6
21736 test "$cf_cv_working_poll" = "yes" &&
21737 cat >>confdefs.h <<\EOF
21738 #define HAVE_WORKING_POLL 1
21739 EOF
21740
21741 echo "$as_me:21741: checking for va_copy" >&5
21742 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21743 if test "${cf_cv_have_va_copy+set}" = set; then
21744   echo $ECHO_N "(cached) $ECHO_C" >&6
21745 else
21746
21747 cat >conftest.$ac_ext <<_ACEOF
21748 #line 21748 "configure"
21749 #include "confdefs.h"
21750
21751 #include <stdarg.h>
21752
21753 int
21754 main (void)
21755 {
21756
21757         static va_list dst;
21758         static va_list src;
21759         va_copy(dst, src)
21760   ;
21761   return 0;
21762 }
21763 _ACEOF
21764 rm -f conftest.$ac_objext conftest$ac_exeext
21765 if { (eval echo "$as_me:21765: \"$ac_link\"") >&5
21766   (eval $ac_link) 2>&5
21767   ac_status=$?
21768   echo "$as_me:21768: \$? = $ac_status" >&5
21769   (exit $ac_status); } &&
21770          { ac_try='test -s conftest$ac_exeext'
21771   { (eval echo "$as_me:21771: \"$ac_try\"") >&5
21772   (eval $ac_try) 2>&5
21773   ac_status=$?
21774   echo "$as_me:21774: \$? = $ac_status" >&5
21775   (exit $ac_status); }; }; then
21776   cf_cv_have_va_copy=yes
21777 else
21778   echo "$as_me: failed program was:" >&5
21779 cat conftest.$ac_ext >&5
21780 cf_cv_have_va_copy=no
21781 fi
21782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21783 fi
21784 echo "$as_me:21784: result: $cf_cv_have_va_copy" >&5
21785 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21786
21787 if test "$cf_cv_have_va_copy" = yes;
21788 then
21789
21790 cat >>confdefs.h <<\EOF
21791 #define HAVE_VA_COPY 1
21792 EOF
21793
21794 else # !cf_cv_have_va_copy
21795
21796 echo "$as_me:21796: checking for __va_copy" >&5
21797 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21798 if test "${cf_cv_have___va_copy+set}" = set; then
21799   echo $ECHO_N "(cached) $ECHO_C" >&6
21800 else
21801
21802 cat >conftest.$ac_ext <<_ACEOF
21803 #line 21803 "configure"
21804 #include "confdefs.h"
21805
21806 #include <stdarg.h>
21807
21808 int
21809 main (void)
21810 {
21811
21812         static va_list dst;
21813         static va_list src;
21814         __va_copy(dst, src)
21815   ;
21816   return 0;
21817 }
21818 _ACEOF
21819 rm -f conftest.$ac_objext conftest$ac_exeext
21820 if { (eval echo "$as_me:21820: \"$ac_link\"") >&5
21821   (eval $ac_link) 2>&5
21822   ac_status=$?
21823   echo "$as_me:21823: \$? = $ac_status" >&5
21824   (exit $ac_status); } &&
21825          { ac_try='test -s conftest$ac_exeext'
21826   { (eval echo "$as_me:21826: \"$ac_try\"") >&5
21827   (eval $ac_try) 2>&5
21828   ac_status=$?
21829   echo "$as_me:21829: \$? = $ac_status" >&5
21830   (exit $ac_status); }; }; then
21831   cf_cv_have___va_copy=yes
21832 else
21833   echo "$as_me: failed program was:" >&5
21834 cat conftest.$ac_ext >&5
21835 cf_cv_have___va_copy=no
21836 fi
21837 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21838 fi
21839 echo "$as_me:21839: result: $cf_cv_have___va_copy" >&5
21840 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21841
21842 if test "$cf_cv_have___va_copy" = yes
21843 then
21844
21845 cat >>confdefs.h <<\EOF
21846 #define HAVE___VA_COPY 1
21847 EOF
21848
21849 else # !cf_cv_have___va_copy
21850
21851 echo "$as_me:21851: checking for __builtin_va_copy" >&5
21852 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21853 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21854   echo $ECHO_N "(cached) $ECHO_C" >&6
21855 else
21856
21857 cat >conftest.$ac_ext <<_ACEOF
21858 #line 21858 "configure"
21859 #include "confdefs.h"
21860
21861 #include <stdarg.h>
21862
21863 int
21864 main (void)
21865 {
21866
21867         static va_list dst;
21868         static va_list src;
21869         __builtin_va_copy(dst, src)
21870   ;
21871   return 0;
21872 }
21873 _ACEOF
21874 rm -f conftest.$ac_objext conftest$ac_exeext
21875 if { (eval echo "$as_me:21875: \"$ac_link\"") >&5
21876   (eval $ac_link) 2>&5
21877   ac_status=$?
21878   echo "$as_me:21878: \$? = $ac_status" >&5
21879   (exit $ac_status); } &&
21880          { ac_try='test -s conftest$ac_exeext'
21881   { (eval echo "$as_me:21881: \"$ac_try\"") >&5
21882   (eval $ac_try) 2>&5
21883   ac_status=$?
21884   echo "$as_me:21884: \$? = $ac_status" >&5
21885   (exit $ac_status); }; }; then
21886   cf_cv_have___builtin_va_copy=yes
21887 else
21888   echo "$as_me: failed program was:" >&5
21889 cat conftest.$ac_ext >&5
21890 cf_cv_have___builtin_va_copy=no
21891 fi
21892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21893 fi
21894 echo "$as_me:21894: result: $cf_cv_have___builtin_va_copy" >&5
21895 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
21896
21897 test "$cf_cv_have___builtin_va_copy" = yes &&
21898
21899 cat >>confdefs.h <<\EOF
21900 #define HAVE___BUILTIN_VA_COPY 1
21901 EOF
21902
21903 fi # cf_cv_have___va_copy
21904
21905 fi # cf_cv_have_va_copy
21906
21907 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
21908 (*yes*)
21909         ;;
21910
21911 (*)
21912         echo "$as_me:21912: checking if we can simply copy va_list" >&5
21913 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
21914 if test "${cf_cv_pointer_va_list+set}" = set; then
21915   echo $ECHO_N "(cached) $ECHO_C" >&6
21916 else
21917
21918 cat >conftest.$ac_ext <<_ACEOF
21919 #line 21919 "configure"
21920 #include "confdefs.h"
21921
21922 #include <stdarg.h>
21923
21924 int
21925 main (void)
21926 {
21927
21928         va_list dst;
21929         va_list src;
21930         dst = src
21931   ;
21932   return 0;
21933 }
21934 _ACEOF
21935 rm -f conftest.$ac_objext conftest$ac_exeext
21936 if { (eval echo "$as_me:21936: \"$ac_link\"") >&5
21937   (eval $ac_link) 2>&5
21938   ac_status=$?
21939   echo "$as_me:21939: \$? = $ac_status" >&5
21940   (exit $ac_status); } &&
21941          { ac_try='test -s conftest$ac_exeext'
21942   { (eval echo "$as_me:21942: \"$ac_try\"") >&5
21943   (eval $ac_try) 2>&5
21944   ac_status=$?
21945   echo "$as_me:21945: \$? = $ac_status" >&5
21946   (exit $ac_status); }; }; then
21947   cf_cv_pointer_va_list=yes
21948 else
21949   echo "$as_me: failed program was:" >&5
21950 cat conftest.$ac_ext >&5
21951 cf_cv_pointer_va_list=no
21952 fi
21953 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21954 fi
21955 echo "$as_me:21955: result: $cf_cv_pointer_va_list" >&5
21956 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
21957
21958         if test "$cf_cv_pointer_va_list" = no
21959         then
21960                 echo "$as_me:21960: checking if we can copy va_list indirectly" >&5
21961 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
21962 if test "${cf_cv_array_va_list+set}" = set; then
21963   echo $ECHO_N "(cached) $ECHO_C" >&6
21964 else
21965
21966 cat >conftest.$ac_ext <<_ACEOF
21967 #line 21967 "configure"
21968 #include "confdefs.h"
21969
21970 #include <stdarg.h>
21971
21972 int
21973 main (void)
21974 {
21975
21976         va_list dst;
21977         va_list src;
21978         *dst = *src
21979   ;
21980   return 0;
21981 }
21982 _ACEOF
21983 rm -f conftest.$ac_objext conftest$ac_exeext
21984 if { (eval echo "$as_me:21984: \"$ac_link\"") >&5
21985   (eval $ac_link) 2>&5
21986   ac_status=$?
21987   echo "$as_me:21987: \$? = $ac_status" >&5
21988   (exit $ac_status); } &&
21989          { ac_try='test -s conftest$ac_exeext'
21990   { (eval echo "$as_me:21990: \"$ac_try\"") >&5
21991   (eval $ac_try) 2>&5
21992   ac_status=$?
21993   echo "$as_me:21993: \$? = $ac_status" >&5
21994   (exit $ac_status); }; }; then
21995   cf_cv_array_va_list=yes
21996 else
21997   echo "$as_me: failed program was:" >&5
21998 cat conftest.$ac_ext >&5
21999 cf_cv_array_va_list=no
22000 fi
22001 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22002 fi
22003 echo "$as_me:22003: result: $cf_cv_array_va_list" >&5
22004 echo "${ECHO_T}$cf_cv_array_va_list" >&6
22005                 test "$cf_cv_array_va_list" = yes &&
22006 cat >>confdefs.h <<\EOF
22007 #define ARRAY_VA_LIST 1
22008 EOF
22009
22010         fi
22011         ;;
22012 esac
22013
22014 echo "$as_me:22014: checking for pid_t" >&5
22015 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22016 if test "${ac_cv_type_pid_t+set}" = set; then
22017   echo $ECHO_N "(cached) $ECHO_C" >&6
22018 else
22019   cat >conftest.$ac_ext <<_ACEOF
22020 #line 22020 "configure"
22021 #include "confdefs.h"
22022 $ac_includes_default
22023 int
22024 main (void)
22025 {
22026 if ((pid_t *) 0)
22027   return 0;
22028 if (sizeof (pid_t))
22029   return 0;
22030   ;
22031   return 0;
22032 }
22033 _ACEOF
22034 rm -f conftest.$ac_objext
22035 if { (eval echo "$as_me:22035: \"$ac_compile\"") >&5
22036   (eval $ac_compile) 2>&5
22037   ac_status=$?
22038   echo "$as_me:22038: \$? = $ac_status" >&5
22039   (exit $ac_status); } &&
22040          { ac_try='test -s conftest.$ac_objext'
22041   { (eval echo "$as_me:22041: \"$ac_try\"") >&5
22042   (eval $ac_try) 2>&5
22043   ac_status=$?
22044   echo "$as_me:22044: \$? = $ac_status" >&5
22045   (exit $ac_status); }; }; then
22046   ac_cv_type_pid_t=yes
22047 else
22048   echo "$as_me: failed program was:" >&5
22049 cat conftest.$ac_ext >&5
22050 ac_cv_type_pid_t=no
22051 fi
22052 rm -f conftest.$ac_objext conftest.$ac_ext
22053 fi
22054 echo "$as_me:22054: result: $ac_cv_type_pid_t" >&5
22055 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22056 if test $ac_cv_type_pid_t = yes; then
22057   :
22058 else
22059
22060 cat >>confdefs.h <<EOF
22061 #define pid_t int
22062 EOF
22063
22064 fi
22065
22066 for ac_header in unistd.h vfork.h
22067 do
22068 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22069 echo "$as_me:22069: checking for $ac_header" >&5
22070 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22071 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22072   echo $ECHO_N "(cached) $ECHO_C" >&6
22073 else
22074   cat >conftest.$ac_ext <<_ACEOF
22075 #line 22075 "configure"
22076 #include "confdefs.h"
22077 #include <$ac_header>
22078 _ACEOF
22079 if { (eval echo "$as_me:22079: \"$ac_cpp conftest.$ac_ext\"") >&5
22080   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22081   ac_status=$?
22082   egrep -v '^ *\+' conftest.er1 >conftest.err
22083   rm -f conftest.er1
22084   cat conftest.err >&5
22085   echo "$as_me:22085: \$? = $ac_status" >&5
22086   (exit $ac_status); } >/dev/null; then
22087   if test -s conftest.err; then
22088     ac_cpp_err=$ac_c_preproc_warn_flag
22089   else
22090     ac_cpp_err=
22091   fi
22092 else
22093   ac_cpp_err=yes
22094 fi
22095 if test -z "$ac_cpp_err"; then
22096   eval "$as_ac_Header=yes"
22097 else
22098   echo "$as_me: failed program was:" >&5
22099   cat conftest.$ac_ext >&5
22100   eval "$as_ac_Header=no"
22101 fi
22102 rm -f conftest.err conftest.$ac_ext
22103 fi
22104 echo "$as_me:22104: result: `eval echo '${'$as_ac_Header'}'`" >&5
22105 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22106 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22107   cat >>confdefs.h <<EOF
22108 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22109 EOF
22110
22111 fi
22112 done
22113
22114 for ac_func in fork vfork
22115 do
22116 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22117 echo "$as_me:22117: checking for $ac_func" >&5
22118 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22119 if eval "test \"\${$as_ac_var+set}\" = set"; then
22120   echo $ECHO_N "(cached) $ECHO_C" >&6
22121 else
22122   cat >conftest.$ac_ext <<_ACEOF
22123 #line 22123 "configure"
22124 #include "confdefs.h"
22125 #define $ac_func autoconf_temporary
22126 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22127 #undef $ac_func
22128
22129 #ifdef __cplusplus
22130 extern "C"
22131 #endif
22132
22133 /* We use char because int might match the return type of a gcc2
22134    builtin and then its argument prototype would still apply.  */
22135 char $ac_func (void);
22136
22137 int
22138 main (void)
22139 {
22140
22141 /* The GNU C library defines stubs for functions which it implements
22142     to always fail with ENOSYS.  Some functions are actually named
22143     something starting with __ and the normal name is an alias.  */
22144 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22145 #error found stub for $ac_func
22146 #endif
22147
22148         return $ac_func ();
22149   ;
22150   return 0;
22151 }
22152 _ACEOF
22153 rm -f conftest.$ac_objext conftest$ac_exeext
22154 if { (eval echo "$as_me:22154: \"$ac_link\"") >&5
22155   (eval $ac_link) 2>&5
22156   ac_status=$?
22157   echo "$as_me:22157: \$? = $ac_status" >&5
22158   (exit $ac_status); } &&
22159          { ac_try='test -s conftest$ac_exeext'
22160   { (eval echo "$as_me:22160: \"$ac_try\"") >&5
22161   (eval $ac_try) 2>&5
22162   ac_status=$?
22163   echo "$as_me:22163: \$? = $ac_status" >&5
22164   (exit $ac_status); }; }; then
22165   eval "$as_ac_var=yes"
22166 else
22167   echo "$as_me: failed program was:" >&5
22168 cat conftest.$ac_ext >&5
22169 eval "$as_ac_var=no"
22170 fi
22171 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22172 fi
22173 echo "$as_me:22173: result: `eval echo '${'$as_ac_var'}'`" >&5
22174 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
22175 if test `eval echo '${'$as_ac_var'}'` = yes; then
22176   cat >>confdefs.h <<EOF
22177 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22178 EOF
22179
22180 fi
22181 done
22182
22183 ac_cv_func_fork_works=$ac_cv_func_fork
22184 if test "x$ac_cv_func_fork" = xyes; then
22185   echo "$as_me:22185: checking for working fork" >&5
22186 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
22187 if test "${ac_cv_func_fork_works+set}" = set; then
22188   echo $ECHO_N "(cached) $ECHO_C" >&6
22189 else
22190   if test "$cross_compiling" = yes; then
22191   ac_cv_func_fork_works=cross
22192 else
22193   cat >conftest.$ac_ext <<_ACEOF
22194 /* By Rüdiger Kuhlmann. */
22195       #include <sys/types.h>
22196       #if HAVE_UNISTD_H
22197       # include <unistd.h>
22198       #endif
22199       /* Some systems only have a dummy stub for fork() */
22200       int main (void)
22201       {
22202         if (fork() < 0)
22203           $ac_main_return (1);
22204         $ac_main_return (0);
22205       }
22206 _ACEOF
22207 rm -f conftest$ac_exeext
22208 if { (eval echo "$as_me:22208: \"$ac_link\"") >&5
22209   (eval $ac_link) 2>&5
22210   ac_status=$?
22211   echo "$as_me:22211: \$? = $ac_status" >&5
22212   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22213   { (eval echo "$as_me:22213: \"$ac_try\"") >&5
22214   (eval $ac_try) 2>&5
22215   ac_status=$?
22216   echo "$as_me:22216: \$? = $ac_status" >&5
22217   (exit $ac_status); }; }; then
22218   ac_cv_func_fork_works=yes
22219 else
22220   echo "$as_me: program exited with status $ac_status" >&5
22221 echo "$as_me: failed program was:" >&5
22222 cat conftest.$ac_ext >&5
22223 ac_cv_func_fork_works=no
22224 fi
22225 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22226 fi
22227 fi
22228 echo "$as_me:22228: result: $ac_cv_func_fork_works" >&5
22229 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
22230
22231 fi
22232 if test "x$ac_cv_func_fork_works" = xcross; then
22233   case $host in
22234     *-*-amigaos* | *-*-msdosdjgpp*)
22235       # Override, as these systems have only a dummy fork() stub
22236       ac_cv_func_fork_works=no
22237       ;;
22238     *)
22239       ac_cv_func_fork_works=yes
22240       ;;
22241   esac
22242   { echo "$as_me:22242: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
22243 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
22244 fi
22245 ac_cv_func_vfork_works=$ac_cv_func_vfork
22246 if test "x$ac_cv_func_vfork" = xyes; then
22247   echo "$as_me:22247: checking for working vfork" >&5
22248 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
22249 if test "${ac_cv_func_vfork_works+set}" = set; then
22250   echo $ECHO_N "(cached) $ECHO_C" >&6
22251 else
22252   if test "$cross_compiling" = yes; then
22253   ac_cv_func_vfork_works=cross
22254 else
22255   cat >conftest.$ac_ext <<_ACEOF
22256 #line 22256 "configure"
22257 #include "confdefs.h"
22258 /* Thanks to Paul Eggert for this test.  */
22259 #include <stdio.h>
22260 #include <sys/types.h>
22261 #include <sys/stat.h>
22262 #if HAVE_UNISTD_H
22263 # include <unistd.h>
22264 #endif
22265 #if HAVE_VFORK_H
22266 # include <vfork.h>
22267 #endif
22268 /* On some sparc systems, changes by the child to local and incoming
22269    argument registers are propagated back to the parent.  The compiler
22270    is told about this with #include <vfork.h>, but some compilers
22271    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
22272    static variable whose address is put into a register that is
22273    clobbered by the vfork.  */
22274 static
22275 #ifdef __cplusplus
22276 sparc_address_test (int arg)
22277 # else
22278 sparc_address_test (arg) int arg;
22279 #endif
22280 {
22281   static pid_t child;
22282   if (!child) {
22283     child = vfork ();
22284     if (child < 0) {
22285       perror ("vfork");
22286       _exit(2);
22287     }
22288     if (!child) {
22289       arg = getpid();
22290       write(-1, "", 0);
22291       _exit (arg);
22292     }
22293   }
22294 }
22295
22296 int
22297 main (void)
22298 {
22299   pid_t parent = getpid ();
22300   pid_t child;
22301
22302   sparc_address_test ();
22303
22304   child = vfork ();
22305
22306   if (child == 0) {
22307     /* Here is another test for sparc vfork register problems.  This
22308        test uses lots of local variables, at least as many local
22309        variables as main has allocated so far including compiler
22310        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
22311        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
22312        reuse the register of parent for one of the local variables,
22313        since it will think that parent can't possibly be used any more
22314        in this routine.  Assigning to the local variable will thus
22315        munge parent in the parent process.  */
22316     pid_t
22317       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
22318       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
22319     /* Convince the compiler that p..p7 are live; otherwise, it might
22320        use the same hardware register for all 8 local variables.  */
22321     if (p != p1 || p != p2 || p != p3 || p != p4
22322         || p != p5 || p != p6 || p != p7)
22323       _exit(1);
22324
22325     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
22326        from child file descriptors.  If the child closes a descriptor
22327        before it execs or exits, this munges the parent's descriptor
22328        as well.  Test for this by closing stdout in the child.  */
22329     _exit(close(fileno(stdout)) != 0);
22330   } else {
22331     int status;
22332     struct stat st;
22333
22334     while (wait(&status) != child)
22335       ;
22336     $ac_main_return(
22337          /* Was there some problem with vforking?  */
22338          child < 0
22339
22340          /* Did the child fail?  (This shouldn't happen.)  */
22341          || status
22342
22343          /* Did the vfork/compiler bug occur?  */
22344          || parent != getpid()
22345
22346          /* Did the file descriptor bug occur?  */
22347          || fstat(fileno(stdout), &st) != 0
22348          );
22349   }
22350 }
22351 _ACEOF
22352 rm -f conftest$ac_exeext
22353 if { (eval echo "$as_me:22353: \"$ac_link\"") >&5
22354   (eval $ac_link) 2>&5
22355   ac_status=$?
22356   echo "$as_me:22356: \$? = $ac_status" >&5
22357   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22358   { (eval echo "$as_me:22358: \"$ac_try\"") >&5
22359   (eval $ac_try) 2>&5
22360   ac_status=$?
22361   echo "$as_me:22361: \$? = $ac_status" >&5
22362   (exit $ac_status); }; }; then
22363   ac_cv_func_vfork_works=yes
22364 else
22365   echo "$as_me: program exited with status $ac_status" >&5
22366 echo "$as_me: failed program was:" >&5
22367 cat conftest.$ac_ext >&5
22368 ac_cv_func_vfork_works=no
22369 fi
22370 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22371 fi
22372 fi
22373 echo "$as_me:22373: result: $ac_cv_func_vfork_works" >&5
22374 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
22375
22376 fi;
22377 if test "x$ac_cv_func_fork_works" = xcross; then
22378   ac_cv_func_vfork_works=ac_cv_func_vfork
22379   { echo "$as_me:22379: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
22380 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
22381 fi
22382
22383 if test "x$ac_cv_func_vfork_works" = xyes; then
22384
22385 cat >>confdefs.h <<\EOF
22386 #define HAVE_WORKING_VFORK 1
22387 EOF
22388
22389 else
22390
22391 cat >>confdefs.h <<\EOF
22392 #define vfork fork
22393 EOF
22394
22395 fi
22396 if test "x$ac_cv_func_fork_works" = xyes; then
22397
22398 cat >>confdefs.h <<\EOF
22399 #define HAVE_WORKING_FORK 1
22400 EOF
22401
22402 fi
22403
22404 echo "$as_me:22404: checking if fopen accepts explicit binary mode" >&5
22405 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
22406 if test "${cf_cv_fopen_bin_r+set}" = set; then
22407   echo $ECHO_N "(cached) $ECHO_C" >&6
22408 else
22409
22410         if test "$cross_compiling" = yes; then
22411   cf_cv_fopen_bin_r=unknown
22412 else
22413   cat >conftest.$ac_ext <<_ACEOF
22414 #line 22414 "configure"
22415 #include "confdefs.h"
22416
22417 #include <stdio.h>
22418 int main(void) {
22419         FILE *fp = fopen("conftest.tmp", "wb");
22420         int rc = 0;
22421         if (fp != 0) {
22422                 int p, q;
22423                 for (p = 0; p < 256; ++p) {
22424                         fputc(p, fp);
22425                 }
22426                 fclose(fp);
22427                 fp = fopen("conftest.tmp", "rb");
22428                 if (fp != 0) {
22429                         for (p = 0; p < 256; ++p) {
22430                                 q = fgetc(fp);
22431                                 if (q != p) {
22432                                         rc = 1;
22433                                         break;
22434                                 }
22435                         }
22436                 } else {
22437                         rc = 1;
22438                 }
22439         } else {
22440                 rc = 1;
22441         }
22442         ${cf_cv_main_return:-return} (rc);
22443 }
22444
22445 _ACEOF
22446 rm -f conftest$ac_exeext
22447 if { (eval echo "$as_me:22447: \"$ac_link\"") >&5
22448   (eval $ac_link) 2>&5
22449   ac_status=$?
22450   echo "$as_me:22450: \$? = $ac_status" >&5
22451   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22452   { (eval echo "$as_me:22452: \"$ac_try\"") >&5
22453   (eval $ac_try) 2>&5
22454   ac_status=$?
22455   echo "$as_me:22455: \$? = $ac_status" >&5
22456   (exit $ac_status); }; }; then
22457   cf_cv_fopen_bin_r=yes
22458 else
22459   echo "$as_me: program exited with status $ac_status" >&5
22460 echo "$as_me: failed program was:" >&5
22461 cat conftest.$ac_ext >&5
22462 cf_cv_fopen_bin_r=no
22463 fi
22464 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22465 fi
22466
22467 fi
22468 echo "$as_me:22468: result: $cf_cv_fopen_bin_r" >&5
22469 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
22470 test "x$cf_cv_fopen_bin_r" != xno &&
22471 cat >>confdefs.h <<\EOF
22472 #define USE_FOPEN_BIN_R 1
22473 EOF
22474
22475 # special check for test/ditto.c
22476
22477 echo "$as_me:22477: checking for openpty in -lutil" >&5
22478 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
22479 if test "${ac_cv_lib_util_openpty+set}" = set; then
22480   echo $ECHO_N "(cached) $ECHO_C" >&6
22481 else
22482   ac_check_lib_save_LIBS=$LIBS
22483 LIBS="-lutil  $LIBS"
22484 cat >conftest.$ac_ext <<_ACEOF
22485 #line 22485 "configure"
22486 #include "confdefs.h"
22487
22488 /* Override any gcc2 internal prototype to avoid an error.  */
22489 #ifdef __cplusplus
22490 extern "C"
22491 #endif
22492 /* We use char because int might match the return type of a gcc2
22493    builtin and then its argument prototype would still apply.  */
22494 char openpty ();
22495 int
22496 main (void)
22497 {
22498 openpty ();
22499   ;
22500   return 0;
22501 }
22502 _ACEOF
22503 rm -f conftest.$ac_objext conftest$ac_exeext
22504 if { (eval echo "$as_me:22504: \"$ac_link\"") >&5
22505   (eval $ac_link) 2>&5
22506   ac_status=$?
22507   echo "$as_me:22507: \$? = $ac_status" >&5
22508   (exit $ac_status); } &&
22509          { ac_try='test -s conftest$ac_exeext'
22510   { (eval echo "$as_me:22510: \"$ac_try\"") >&5
22511   (eval $ac_try) 2>&5
22512   ac_status=$?
22513   echo "$as_me:22513: \$? = $ac_status" >&5
22514   (exit $ac_status); }; }; then
22515   ac_cv_lib_util_openpty=yes
22516 else
22517   echo "$as_me: failed program was:" >&5
22518 cat conftest.$ac_ext >&5
22519 ac_cv_lib_util_openpty=no
22520 fi
22521 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22522 LIBS=$ac_check_lib_save_LIBS
22523 fi
22524 echo "$as_me:22524: result: $ac_cv_lib_util_openpty" >&5
22525 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
22526 if test $ac_cv_lib_util_openpty = yes; then
22527   cf_cv_lib_util=yes
22528 else
22529   cf_cv_lib_util=no
22530 fi
22531
22532 echo "$as_me:22532: checking for openpty header" >&5
22533 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
22534 if test "${cf_cv_func_openpty+set}" = set; then
22535   echo $ECHO_N "(cached) $ECHO_C" >&6
22536 else
22537
22538         cf_save_LIBS="$LIBS"
22539         test $cf_cv_lib_util = yes && {
22540 cf_add_libs="$LIBS"
22541 # reverse order
22542 cf_add_0lib=
22543 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22544 # filter duplicates
22545 for cf_add_1lib in $cf_add_0lib; do
22546         for cf_add_2lib in $cf_add_libs; do
22547                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22548                         cf_add_1lib=
22549                         break
22550                 fi
22551         done
22552         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22553 done
22554 LIBS="$cf_add_libs"
22555  }
22556         for cf_header in pty.h libutil.h util.h
22557         do
22558         cat >conftest.$ac_ext <<_ACEOF
22559 #line 22559 "configure"
22560 #include "confdefs.h"
22561
22562 #include <$cf_header>
22563
22564 int
22565 main (void)
22566 {
22567
22568         int x = openpty((int *)0, (int *)0, (char *)0,
22569                                    (struct termios *)0, (struct winsize *)0);
22570
22571   ;
22572   return 0;
22573 }
22574 _ACEOF
22575 rm -f conftest.$ac_objext conftest$ac_exeext
22576 if { (eval echo "$as_me:22576: \"$ac_link\"") >&5
22577   (eval $ac_link) 2>&5
22578   ac_status=$?
22579   echo "$as_me:22579: \$? = $ac_status" >&5
22580   (exit $ac_status); } &&
22581          { ac_try='test -s conftest$ac_exeext'
22582   { (eval echo "$as_me:22582: \"$ac_try\"") >&5
22583   (eval $ac_try) 2>&5
22584   ac_status=$?
22585   echo "$as_me:22585: \$? = $ac_status" >&5
22586   (exit $ac_status); }; }; then
22587
22588                 cf_cv_func_openpty=$cf_header
22589                 break
22590
22591 else
22592   echo "$as_me: failed program was:" >&5
22593 cat conftest.$ac_ext >&5
22594
22595                 cf_cv_func_openpty=no
22596
22597 fi
22598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22599         done
22600         LIBS="$cf_save_LIBS"
22601
22602 fi
22603 echo "$as_me:22603: result: $cf_cv_func_openpty" >&5
22604 echo "${ECHO_T}$cf_cv_func_openpty" >&6
22605
22606 if test "$cf_cv_func_openpty" != no ; then
22607
22608 cat >>confdefs.h <<EOF
22609 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
22610 EOF
22611
22612 cat >>confdefs.h <<\EOF
22613 #define USE_XTERM_PTY 1
22614 EOF
22615
22616         if test "x$cf_cv_lib_util" = xyes ; then
22617
22618 cf_add_libs="$TEST_LIBS"
22619 # reverse order
22620 cf_add_0lib=
22621 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22622 # filter duplicates
22623 for cf_add_1lib in $cf_add_0lib; do
22624         for cf_add_2lib in $cf_add_libs; do
22625                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22626                         cf_add_1lib=
22627                         break
22628                 fi
22629         done
22630         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22631 done
22632 TEST_LIBS="$cf_add_libs"
22633
22634         fi
22635 fi
22636
22637 if test "$with_hashed_db" != no ; then
22638
22639 cat >>confdefs.h <<\EOF
22640 #define USE_HASHED_DB 1
22641 EOF
22642
22643 case $with_hashed_db in
22644 (yes|*able*)
22645         ;;
22646 (*)
22647         if test -d "$with_hashed_db" ; then
22648
22649 if test -n "$with_hashed_db/include" ; then
22650   for cf_add_incdir in $with_hashed_db/include
22651   do
22652         while test $cf_add_incdir != /usr/include
22653         do
22654           if test -d $cf_add_incdir
22655           then
22656                 cf_have_incdir=no
22657                 if test -n "$CFLAGS$CPPFLAGS" ; then
22658                   # a loop is needed to ensure we can add subdirs of existing dirs
22659                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22660                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22661                           cf_have_incdir=yes; break
22662                         fi
22663                   done
22664                 fi
22665
22666                 if test "$cf_have_incdir" = no ; then
22667                   if test "$cf_add_incdir" = /usr/local/include ; then
22668                         if test "$GCC" = yes
22669                         then
22670                           cf_save_CPPFLAGS=$CPPFLAGS
22671
22672         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22673         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22674
22675                           cat >conftest.$ac_ext <<_ACEOF
22676 #line 22676 "configure"
22677 #include "confdefs.h"
22678 #include <stdio.h>
22679 int
22680 main (void)
22681 {
22682 printf("Hello")
22683   ;
22684   return 0;
22685 }
22686 _ACEOF
22687 rm -f conftest.$ac_objext
22688 if { (eval echo "$as_me:22688: \"$ac_compile\"") >&5
22689   (eval $ac_compile) 2>&5
22690   ac_status=$?
22691   echo "$as_me:22691: \$? = $ac_status" >&5
22692   (exit $ac_status); } &&
22693          { ac_try='test -s conftest.$ac_objext'
22694   { (eval echo "$as_me:22694: \"$ac_try\"") >&5
22695   (eval $ac_try) 2>&5
22696   ac_status=$?
22697   echo "$as_me:22697: \$? = $ac_status" >&5
22698   (exit $ac_status); }; }; then
22699   :
22700 else
22701   echo "$as_me: failed program was:" >&5
22702 cat conftest.$ac_ext >&5
22703 cf_have_incdir=yes
22704 fi
22705 rm -f conftest.$ac_objext conftest.$ac_ext
22706                           CPPFLAGS=$cf_save_CPPFLAGS
22707                         fi
22708                   fi
22709                 fi
22710
22711                 if test "$cf_have_incdir" = no ; then
22712                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22713
22714 echo "${as_me:-configure}:22714: testing adding $cf_add_incdir to include-path ..." 1>&5
22715
22716                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22717
22718                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22719                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22720                   cf_add_incdir="$cf_top_incdir"
22721                 else
22722                   break
22723                 fi
22724           else
22725                 break
22726           fi
22727         done
22728   done
22729 fi
22730
22731 if test -n "$with_hashed_db/lib" ; then
22732         for cf_add_libdir in $with_hashed_db/lib
22733         do
22734                 if test $cf_add_libdir = /usr/lib ; then
22735                         :
22736                 elif test -d $cf_add_libdir
22737                 then
22738                         cf_have_libdir=no
22739                         if test -n "$LDFLAGS$LIBS" ; then
22740                                 # a loop is needed to ensure we can add subdirs of existing dirs
22741                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22742                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22743                                                 cf_have_libdir=yes; break
22744                                         fi
22745                                 done
22746                         fi
22747                         if test "$cf_have_libdir" = no ; then
22748                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22749
22750 echo "${as_me:-configure}:22750: testing adding $cf_add_libdir to library-path ..." 1>&5
22751
22752                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22753                         fi
22754                 fi
22755         done
22756 fi
22757
22758         else
22759                 case "$with_hashed_db" in
22760                 (./*|../*|/*)
22761                         { echo "$as_me:22761: WARNING: no such directory $with_hashed_db" >&5
22762 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
22763                         ;;
22764                 (*)
22765
22766 cf_search=
22767
22768 test "x$prefix" != "xNONE" && \
22769 test -d "$prefix" && \
22770  {
22771         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
22772         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
22773         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
22774         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
22775         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
22776         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
22777 }
22778
22779 for cf_subdir_prefix in \
22780         /usr \
22781         /usr/local \
22782         /usr/pkg \
22783         /opt \
22784         /opt/local \
22785         $HOME
22786 do
22787
22788 test "x$cf_subdir_prefix" != "x$prefix" && \
22789 test -d "$cf_subdir_prefix" && \
22790 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22791         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
22792         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
22793         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
22794         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
22795         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
22796         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"
22797 }
22798
22799 done
22800
22801         for cf_item in $cf_search
22802         do
22803                 case $cf_item in
22804                 (*/$with_hashed_db)
22805
22806 if test -n "$cf_item" ; then
22807   for cf_add_incdir in $cf_item
22808   do
22809         while test $cf_add_incdir != /usr/include
22810         do
22811           if test -d $cf_add_incdir
22812           then
22813                 cf_have_incdir=no
22814                 if test -n "$CFLAGS$CPPFLAGS" ; then
22815                   # a loop is needed to ensure we can add subdirs of existing dirs
22816                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
22817                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
22818                           cf_have_incdir=yes; break
22819                         fi
22820                   done
22821                 fi
22822
22823                 if test "$cf_have_incdir" = no ; then
22824                   if test "$cf_add_incdir" = /usr/local/include ; then
22825                         if test "$GCC" = yes
22826                         then
22827                           cf_save_CPPFLAGS=$CPPFLAGS
22828
22829         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22830         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
22831
22832                           cat >conftest.$ac_ext <<_ACEOF
22833 #line 22833 "configure"
22834 #include "confdefs.h"
22835 #include <stdio.h>
22836 int
22837 main (void)
22838 {
22839 printf("Hello")
22840   ;
22841   return 0;
22842 }
22843 _ACEOF
22844 rm -f conftest.$ac_objext
22845 if { (eval echo "$as_me:22845: \"$ac_compile\"") >&5
22846   (eval $ac_compile) 2>&5
22847   ac_status=$?
22848   echo "$as_me:22848: \$? = $ac_status" >&5
22849   (exit $ac_status); } &&
22850          { ac_try='test -s conftest.$ac_objext'
22851   { (eval echo "$as_me:22851: \"$ac_try\"") >&5
22852   (eval $ac_try) 2>&5
22853   ac_status=$?
22854   echo "$as_me:22854: \$? = $ac_status" >&5
22855   (exit $ac_status); }; }; then
22856   :
22857 else
22858   echo "$as_me: failed program was:" >&5
22859 cat conftest.$ac_ext >&5
22860 cf_have_incdir=yes
22861 fi
22862 rm -f conftest.$ac_objext conftest.$ac_ext
22863                           CPPFLAGS=$cf_save_CPPFLAGS
22864                         fi
22865                   fi
22866                 fi
22867
22868                 if test "$cf_have_incdir" = no ; then
22869                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
22870
22871 echo "${as_me:-configure}:22871: testing adding $cf_add_incdir to include-path ..." 1>&5
22872
22873                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
22874
22875                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
22876                   test "$cf_top_incdir" = "$cf_add_incdir" && break
22877                   cf_add_incdir="$cf_top_incdir"
22878                 else
22879                   break
22880                 fi
22881           else
22882                 break
22883           fi
22884         done
22885   done
22886 fi
22887
22888                         ;;
22889                 esac
22890         done
22891
22892 cf_search=
22893
22894 test "x$prefix" != "xNONE" && \
22895 test -d "$prefix" && \
22896  {
22897         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
22898         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
22899         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
22900         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
22901         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
22902         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
22903 }
22904
22905 for cf_subdir_prefix in \
22906         /usr \
22907         /usr/local \
22908         /usr/pkg \
22909         /opt \
22910         /opt/local \
22911         $HOME
22912 do
22913
22914 test "x$cf_subdir_prefix" != "x$prefix" && \
22915 test -d "$cf_subdir_prefix" && \
22916 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
22917         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
22918         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
22919         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
22920         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
22921         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
22922         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"
22923 }
22924
22925 done
22926
22927         for cf_item in $cf_search
22928         do
22929                 case $cf_item in
22930                 (*/$with_hashed_db)
22931
22932 if test -n "$cf_item" ; then
22933         for cf_add_libdir in $cf_item
22934         do
22935                 if test $cf_add_libdir = /usr/lib ; then
22936                         :
22937                 elif test -d $cf_add_libdir
22938                 then
22939                         cf_have_libdir=no
22940                         if test -n "$LDFLAGS$LIBS" ; then
22941                                 # a loop is needed to ensure we can add subdirs of existing dirs
22942                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
22943                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22944                                                 cf_have_libdir=yes; break
22945                                         fi
22946                                 done
22947                         fi
22948                         if test "$cf_have_libdir" = no ; then
22949                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
22950
22951 echo "${as_me:-configure}:22951: testing adding $cf_add_libdir to library-path ..." 1>&5
22952
22953                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22954                         fi
22955                 fi
22956         done
22957 fi
22958
22959                         ;;
22960                 esac
22961         done
22962
22963                         ;;
22964                 esac
22965         fi
22966 esac
22967
22968 echo "$as_me:22968: checking for db.h" >&5
22969 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
22970 if test "${ac_cv_header_db_h+set}" = set; then
22971   echo $ECHO_N "(cached) $ECHO_C" >&6
22972 else
22973   cat >conftest.$ac_ext <<_ACEOF
22974 #line 22974 "configure"
22975 #include "confdefs.h"
22976 #include <db.h>
22977 _ACEOF
22978 if { (eval echo "$as_me:22978: \"$ac_cpp conftest.$ac_ext\"") >&5
22979   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22980   ac_status=$?
22981   egrep -v '^ *\+' conftest.er1 >conftest.err
22982   rm -f conftest.er1
22983   cat conftest.err >&5
22984   echo "$as_me:22984: \$? = $ac_status" >&5
22985   (exit $ac_status); } >/dev/null; then
22986   if test -s conftest.err; then
22987     ac_cpp_err=$ac_c_preproc_warn_flag
22988   else
22989     ac_cpp_err=
22990   fi
22991 else
22992   ac_cpp_err=yes
22993 fi
22994 if test -z "$ac_cpp_err"; then
22995   ac_cv_header_db_h=yes
22996 else
22997   echo "$as_me: failed program was:" >&5
22998   cat conftest.$ac_ext >&5
22999   ac_cv_header_db_h=no
23000 fi
23001 rm -f conftest.err conftest.$ac_ext
23002 fi
23003 echo "$as_me:23003: result: $ac_cv_header_db_h" >&5
23004 echo "${ECHO_T}$ac_cv_header_db_h" >&6
23005 if test $ac_cv_header_db_h = yes; then
23006
23007 echo "$as_me:23007: checking for version of db" >&5
23008 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
23009 if test "${cf_cv_hashed_db_version+set}" = set; then
23010   echo $ECHO_N "(cached) $ECHO_C" >&6
23011 else
23012
23013 cf_cv_hashed_db_version=unknown
23014
23015 for cf_db_version in 1 2 3 4 5 6
23016 do
23017
23018 echo "${as_me:-configure}:23018: testing checking for db version $cf_db_version ..." 1>&5
23019
23020         cat >conftest.$ac_ext <<_ACEOF
23021 #line 23021 "configure"
23022 #include "confdefs.h"
23023
23024 $ac_includes_default
23025 #include <db.h>
23026
23027 #ifdef DB_VERSION_MAJOR
23028         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
23029 #if $cf_db_version == DB_VERSION_MAJOR
23030         /* ok */
23031 #else
23032         make an error
23033 #endif
23034 #else
23035 #if $cf_db_version == 1
23036         /* ok: assuming this is DB 1.8.5 */
23037 #else
23038         make an error
23039 #endif
23040 #endif
23041
23042 int
23043 main (void)
23044 {
23045 DBT *foo = 0
23046   ;
23047   return 0;
23048 }
23049 _ACEOF
23050 rm -f conftest.$ac_objext
23051 if { (eval echo "$as_me:23051: \"$ac_compile\"") >&5
23052   (eval $ac_compile) 2>&5
23053   ac_status=$?
23054   echo "$as_me:23054: \$? = $ac_status" >&5
23055   (exit $ac_status); } &&
23056          { ac_try='test -s conftest.$ac_objext'
23057   { (eval echo "$as_me:23057: \"$ac_try\"") >&5
23058   (eval $ac_try) 2>&5
23059   ac_status=$?
23060   echo "$as_me:23060: \$? = $ac_status" >&5
23061   (exit $ac_status); }; }; then
23062
23063         cf_cv_hashed_db_version=$cf_db_version
23064         break
23065
23066 else
23067   echo "$as_me: failed program was:" >&5
23068 cat conftest.$ac_ext >&5
23069 fi
23070 rm -f conftest.$ac_objext conftest.$ac_ext
23071 done
23072
23073 fi
23074 echo "$as_me:23074: result: $cf_cv_hashed_db_version" >&5
23075 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
23076
23077 if test "$cf_cv_hashed_db_version" = unknown ; then
23078         { { echo "$as_me:23078: error: Cannot determine version of db" >&5
23079 echo "$as_me: error: Cannot determine version of db" >&2;}
23080    { (exit 1); exit 1; }; }
23081 else
23082
23083 echo "$as_me:23083: checking for db libraries" >&5
23084 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
23085 if test "${cf_cv_hashed_db_libs+set}" = set; then
23086   echo $ECHO_N "(cached) $ECHO_C" >&6
23087 else
23088
23089 cf_cv_hashed_db_libs=unknown
23090 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
23091 do
23092         cf_save_libs="$LIBS"
23093         if test -n "$cf_db_libs"; then
23094
23095 cf_add_libs="$LIBS"
23096 # reverse order
23097 cf_add_0lib=
23098 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23099 # filter duplicates
23100 for cf_add_1lib in $cf_add_0lib; do
23101         for cf_add_2lib in $cf_add_libs; do
23102                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23103                         cf_add_1lib=
23104                         break
23105                 fi
23106         done
23107         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23108 done
23109 LIBS="$cf_add_libs"
23110
23111         fi
23112
23113 echo "${as_me:-configure}:23113: testing checking for library "$cf_db_libs" ..." 1>&5
23114
23115         cat >conftest.$ac_ext <<_ACEOF
23116 #line 23116 "configure"
23117 #include "confdefs.h"
23118
23119 $ac_includes_default
23120 #include <db.h>
23121
23122 int
23123 main (void)
23124 {
23125
23126         char *path = "/tmp/foo";
23127 #ifdef DB_VERSION_MAJOR
23128 #if DB_VERSION_MAJOR >= 4
23129         DB *result = 0;
23130         db_create(&result, NULL, 0);
23131         result->open(result,
23132                 NULL,
23133                 path,
23134                 path,
23135                 DB_HASH,
23136                 DB_CREATE,
23137                 0644);
23138 #elif DB_VERSION_MAJOR >= 3
23139         DB *result = 0;
23140         db_create(&result, NULL, 0);
23141         result->open(result,
23142                 path,
23143                 path,
23144                 DB_HASH,
23145                 DB_CREATE,
23146                 0644);
23147 #elif DB_VERSION_MAJOR >= 2
23148         DB *result = 0;
23149         db_open(path,
23150                 DB_HASH,
23151                 DB_CREATE,
23152                 0644,
23153                 (DB_ENV *) 0,
23154                 (DB_INFO *) 0,
23155                 &result);
23156 #endif /* DB_VERSION_MAJOR */
23157 #else
23158         DB *result = dbopen(path,
23159                      2,
23160                      0644,
23161                      DB_HASH,
23162                      0);
23163 #endif
23164         ${cf_cv_main_return:-return}(result != 0)
23165
23166   ;
23167   return 0;
23168 }
23169 _ACEOF
23170 rm -f conftest.$ac_objext conftest$ac_exeext
23171 if { (eval echo "$as_me:23171: \"$ac_link\"") >&5
23172   (eval $ac_link) 2>&5
23173   ac_status=$?
23174   echo "$as_me:23174: \$? = $ac_status" >&5
23175   (exit $ac_status); } &&
23176          { ac_try='test -s conftest$ac_exeext'
23177   { (eval echo "$as_me:23177: \"$ac_try\"") >&5
23178   (eval $ac_try) 2>&5
23179   ac_status=$?
23180   echo "$as_me:23180: \$? = $ac_status" >&5
23181   (exit $ac_status); }; }; then
23182
23183         if test -n "$cf_db_libs" ; then
23184                 cf_cv_hashed_db_libs=$cf_db_libs
23185         else
23186                 cf_cv_hashed_db_libs=default
23187         fi
23188         LIBS="$cf_save_libs"
23189         break
23190
23191 else
23192   echo "$as_me: failed program was:" >&5
23193 cat conftest.$ac_ext >&5
23194 fi
23195 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23196         LIBS="$cf_save_libs"
23197 done
23198
23199 fi
23200 echo "$as_me:23200: result: $cf_cv_hashed_db_libs" >&5
23201 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
23202
23203         if test "$cf_cv_hashed_db_libs" = unknown ; then
23204                 { { echo "$as_me:23204: error: Cannot determine library for db" >&5
23205 echo "$as_me: error: Cannot determine library for db" >&2;}
23206    { (exit 1); exit 1; }; }
23207         elif test "$cf_cv_hashed_db_libs" != default ; then
23208
23209 cf_add_libs="$LIBS"
23210 # reverse order
23211 cf_add_0lib=
23212 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23213 # filter duplicates
23214 for cf_add_1lib in $cf_add_0lib; do
23215         for cf_add_2lib in $cf_add_libs; do
23216                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23217                         cf_add_1lib=
23218                         break
23219                 fi
23220         done
23221         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23222 done
23223 LIBS="$cf_add_libs"
23224
23225         fi
23226 fi
23227
23228 else
23229
23230         { { echo "$as_me:23230: error: Cannot find db.h" >&5
23231 echo "$as_me: error: Cannot find db.h" >&2;}
23232    { (exit 1); exit 1; }; }
23233
23234 fi
23235
23236 fi
23237
23238 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
23239         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23240         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
23241 fi
23242
23243 # Just in case, check if the C compiler has a bool type.
23244
23245 echo "$as_me:23245: checking if we should include stdbool.h" >&5
23246 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
23247
23248 if test "${cf_cv_header_stdbool_h+set}" = set; then
23249   echo $ECHO_N "(cached) $ECHO_C" >&6
23250 else
23251
23252         cat >conftest.$ac_ext <<_ACEOF
23253 #line 23253 "configure"
23254 #include "confdefs.h"
23255
23256 int
23257 main (void)
23258 {
23259 bool foo = false
23260   ;
23261   return 0;
23262 }
23263 _ACEOF
23264 rm -f conftest.$ac_objext
23265 if { (eval echo "$as_me:23265: \"$ac_compile\"") >&5
23266   (eval $ac_compile) 2>&5
23267   ac_status=$?
23268   echo "$as_me:23268: \$? = $ac_status" >&5
23269   (exit $ac_status); } &&
23270          { ac_try='test -s conftest.$ac_objext'
23271   { (eval echo "$as_me:23271: \"$ac_try\"") >&5
23272   (eval $ac_try) 2>&5
23273   ac_status=$?
23274   echo "$as_me:23274: \$? = $ac_status" >&5
23275   (exit $ac_status); }; }; then
23276   cf_cv_header_stdbool_h=0
23277 else
23278   echo "$as_me: failed program was:" >&5
23279 cat conftest.$ac_ext >&5
23280 cat >conftest.$ac_ext <<_ACEOF
23281 #line 23281 "configure"
23282 #include "confdefs.h"
23283
23284 #ifndef __BEOS__
23285 #include <stdbool.h>
23286 #endif
23287
23288 int
23289 main (void)
23290 {
23291 bool foo = false
23292   ;
23293   return 0;
23294 }
23295 _ACEOF
23296 rm -f conftest.$ac_objext
23297 if { (eval echo "$as_me:23297: \"$ac_compile\"") >&5
23298   (eval $ac_compile) 2>&5
23299   ac_status=$?
23300   echo "$as_me:23300: \$? = $ac_status" >&5
23301   (exit $ac_status); } &&
23302          { ac_try='test -s conftest.$ac_objext'
23303   { (eval echo "$as_me:23303: \"$ac_try\"") >&5
23304   (eval $ac_try) 2>&5
23305   ac_status=$?
23306   echo "$as_me:23306: \$? = $ac_status" >&5
23307   (exit $ac_status); }; }; then
23308   cf_cv_header_stdbool_h=1
23309 else
23310   echo "$as_me: failed program was:" >&5
23311 cat conftest.$ac_ext >&5
23312 cf_cv_header_stdbool_h=0
23313 fi
23314 rm -f conftest.$ac_objext conftest.$ac_ext
23315 fi
23316 rm -f conftest.$ac_objext conftest.$ac_ext
23317 fi
23318
23319 if test "$cf_cv_header_stdbool_h" = 1
23320 then    echo "$as_me:23320: result: yes" >&5
23321 echo "${ECHO_T}yes" >&6
23322 else    echo "$as_me:23322: result: no" >&5
23323 echo "${ECHO_T}no" >&6
23324 fi
23325
23326 echo "$as_me:23326: checking for builtin bool type" >&5
23327 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
23328
23329 if test "${cf_cv_cc_bool_type+set}" = set; then
23330   echo $ECHO_N "(cached) $ECHO_C" >&6
23331 else
23332
23333         cat >conftest.$ac_ext <<_ACEOF
23334 #line 23334 "configure"
23335 #include "confdefs.h"
23336
23337 #include <stdio.h>
23338 #include <sys/types.h>
23339
23340 int
23341 main (void)
23342 {
23343 bool x = false
23344   ;
23345   return 0;
23346 }
23347 _ACEOF
23348 rm -f conftest.$ac_objext
23349 if { (eval echo "$as_me:23349: \"$ac_compile\"") >&5
23350   (eval $ac_compile) 2>&5
23351   ac_status=$?
23352   echo "$as_me:23352: \$? = $ac_status" >&5
23353   (exit $ac_status); } &&
23354          { ac_try='test -s conftest.$ac_objext'
23355   { (eval echo "$as_me:23355: \"$ac_try\"") >&5
23356   (eval $ac_try) 2>&5
23357   ac_status=$?
23358   echo "$as_me:23358: \$? = $ac_status" >&5
23359   (exit $ac_status); }; }; then
23360   cf_cv_cc_bool_type=1
23361 else
23362   echo "$as_me: failed program was:" >&5
23363 cat conftest.$ac_ext >&5
23364 cf_cv_cc_bool_type=0
23365 fi
23366 rm -f conftest.$ac_objext conftest.$ac_ext
23367
23368 fi
23369
23370 if test "$cf_cv_cc_bool_type" = 1
23371 then    echo "$as_me:23371: result: yes" >&5
23372 echo "${ECHO_T}yes" >&6
23373 else    echo "$as_me:23373: result: no" >&5
23374 echo "${ECHO_T}no" >&6
23375 fi
23376
23377 # Check for C++ compiler characteristics (and ensure that it's there!)
23378 if test -n "$CXX" ; then
23379         ac_ext=cc
23380 ac_cpp='$CXXCPP $CPPFLAGS'
23381 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23382 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23383 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23384 ac_main_return=return
23385
23386 if test -n "$GXX" ; then
23387
23388         cf_save="$LIBS"
23389         LIBS="$LIBS $CXXLIBS"
23390         echo "$as_me:23390: checking if we already have C++ library" >&5
23391 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
23392         cat >conftest.$ac_ext <<_ACEOF
23393 #line 23393 "configure"
23394 #include "confdefs.h"
23395
23396                         #include <iostream>
23397 int
23398 main (void)
23399 {
23400
23401                         std::cout << "Hello World!" << std::endl;
23402   ;
23403   return 0;
23404 }
23405 _ACEOF
23406 rm -f conftest.$ac_objext conftest$ac_exeext
23407 if { (eval echo "$as_me:23407: \"$ac_link\"") >&5
23408   (eval $ac_link) 2>&5
23409   ac_status=$?
23410   echo "$as_me:23410: \$? = $ac_status" >&5
23411   (exit $ac_status); } &&
23412          { ac_try='test -s conftest$ac_exeext'
23413   { (eval echo "$as_me:23413: \"$ac_try\"") >&5
23414   (eval $ac_try) 2>&5
23415   ac_status=$?
23416   echo "$as_me:23416: \$? = $ac_status" >&5
23417   (exit $ac_status); }; }; then
23418   cf_have_libstdcpp=yes
23419 else
23420   echo "$as_me: failed program was:" >&5
23421 cat conftest.$ac_ext >&5
23422 cf_have_libstdcpp=no
23423 fi
23424 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23425         echo "$as_me:23425: result: $cf_have_libstdcpp" >&5
23426 echo "${ECHO_T}$cf_have_libstdcpp" >&6
23427         LIBS="$cf_save"
23428
23429         if test $cf_have_libstdcpp != yes
23430         then
23431                 case $cf_cv_system_name in
23432                 (os2*)
23433                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
23434                                 cf_stdcpp_libname=stdcpp
23435                         else
23436                                 cf_stdcpp_libname=stdc++
23437                         fi
23438                         ;;
23439                 (*)
23440                         cf_stdcpp_libname=stdc++
23441                         ;;
23442                 esac
23443
23444                 echo "$as_me:23444: checking for library $cf_stdcpp_libname" >&5
23445 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
23446 if test "${cf_cv_libstdcpp+set}" = set; then
23447   echo $ECHO_N "(cached) $ECHO_C" >&6
23448 else
23449
23450                         cf_save="$LIBS"
23451                         LIBS="$LIBS $CXXLIBS"
23452
23453 cf_add_libs="$LIBS"
23454 # reverse order
23455 cf_add_0lib=
23456 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23457 # filter duplicates
23458 for cf_add_1lib in $cf_add_0lib; do
23459         for cf_add_2lib in $cf_add_libs; do
23460                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23461                         cf_add_1lib=
23462                         break
23463                 fi
23464         done
23465         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23466 done
23467 LIBS="$cf_add_libs"
23468
23469                 cat >conftest.$ac_ext <<_ACEOF
23470 #line 23470 "configure"
23471 #include "confdefs.h"
23472
23473                                 #include <iostream>
23474 int
23475 main (void)
23476 {
23477
23478                                 std::cout << "Hello World!" << std::endl;
23479   ;
23480   return 0;
23481 }
23482 _ACEOF
23483 rm -f conftest.$ac_objext conftest$ac_exeext
23484 if { (eval echo "$as_me:23484: \"$ac_link\"") >&5
23485   (eval $ac_link) 2>&5
23486   ac_status=$?
23487   echo "$as_me:23487: \$? = $ac_status" >&5
23488   (exit $ac_status); } &&
23489          { ac_try='test -s conftest$ac_exeext'
23490   { (eval echo "$as_me:23490: \"$ac_try\"") >&5
23491   (eval $ac_try) 2>&5
23492   ac_status=$?
23493   echo "$as_me:23493: \$? = $ac_status" >&5
23494   (exit $ac_status); }; }; then
23495   cf_cv_libstdcpp=yes
23496 else
23497   echo "$as_me: failed program was:" >&5
23498 cat conftest.$ac_ext >&5
23499 cf_cv_libstdcpp=no
23500 fi
23501 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23502                         LIBS="$cf_save"
23503
23504 fi
23505 echo "$as_me:23505: result: $cf_cv_libstdcpp" >&5
23506 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
23507                 test "$cf_cv_libstdcpp" = yes && {
23508 cf_add_libs="$CXXLIBS"
23509 # reverse order
23510 cf_add_0lib=
23511 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23512 # filter duplicates
23513 for cf_add_1lib in $cf_add_0lib; do
23514         for cf_add_2lib in $cf_add_libs; do
23515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23516                         cf_add_1lib=
23517                         break
23518                 fi
23519         done
23520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23521 done
23522 CXXLIBS="$cf_add_libs"
23523  }
23524         fi
23525 fi
23526
23527         echo "$as_me:23527: checking whether $CXX understands -c and -o together" >&5
23528 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
23529 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
23530   echo $ECHO_N "(cached) $ECHO_C" >&6
23531 else
23532
23533 cat > conftest.$ac_ext <<CF_EOF
23534 int main(void)
23535 {
23536         ${cf_cv_main_return:-return}(0);
23537 }
23538 CF_EOF
23539 # We do the test twice because some compilers refuse to overwrite an
23540 # existing .o file with -o, though they will create one.
23541 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
23542 if { (eval echo "$as_me:23542: \"$ac_try\"") >&5
23543   (eval $ac_try) 2>&5
23544   ac_status=$?
23545   echo "$as_me:23545: \$? = $ac_status" >&5
23546   (exit $ac_status); } &&
23547   test -f conftest2.$ac_objext && { (eval echo "$as_me:23547: \"$ac_try\"") >&5
23548   (eval $ac_try) 2>&5
23549   ac_status=$?
23550   echo "$as_me:23550: \$? = $ac_status" >&5
23551   (exit $ac_status); };
23552 then
23553   eval cf_cv_prog_CXX_c_o=yes
23554 else
23555   eval cf_cv_prog_CXX_c_o=no
23556 fi
23557 rm -rf conftest*
23558
23559 fi
23560 if test $cf_cv_prog_CXX_c_o = yes; then
23561   echo "$as_me:23561: result: yes" >&5
23562 echo "${ECHO_T}yes" >&6
23563 else
23564   echo "$as_me:23564: result: no" >&5
23565 echo "${ECHO_T}no" >&6
23566 fi
23567
23568         case $GXX_VERSION in
23569         (1*|2.0-6*)
23570                 cf_cxx_library=yes
23571                 ;;
23572         (*-2.7*|2.7*)
23573
23574 cf_cxx_library=unknown
23575 case $cf_cv_system_name in
23576 (os2*)
23577         cf_gpp_libname=gpp
23578         ;;
23579 (*)
23580         cf_gpp_libname=g++
23581         ;;
23582 esac
23583 if test "$GXX" = yes; then
23584         echo "$as_me:23584: checking for lib$cf_gpp_libname" >&5
23585 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
23586         cf_save="$LIBS"
23587
23588 cf_add_libs="$LIBS"
23589 # reverse order
23590 cf_add_0lib=
23591 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23592 # filter duplicates
23593 for cf_add_1lib in $cf_add_0lib; do
23594         for cf_add_2lib in $cf_add_libs; do
23595                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23596                         cf_add_1lib=
23597                         break
23598                 fi
23599         done
23600         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23601 done
23602 LIBS="$cf_add_libs"
23603
23604         cat >conftest.$ac_ext <<_ACEOF
23605 #line 23605 "configure"
23606 #include "confdefs.h"
23607
23608 #include <$cf_gpp_libname/builtin.h>
23609
23610 int
23611 main (void)
23612 {
23613 two_arg_error_handler_t foo2 = lib_error_handler
23614   ;
23615   return 0;
23616 }
23617 _ACEOF
23618 rm -f conftest.$ac_objext conftest$ac_exeext
23619 if { (eval echo "$as_me:23619: \"$ac_link\"") >&5
23620   (eval $ac_link) 2>&5
23621   ac_status=$?
23622   echo "$as_me:23622: \$? = $ac_status" >&5
23623   (exit $ac_status); } &&
23624          { ac_try='test -s conftest$ac_exeext'
23625   { (eval echo "$as_me:23625: \"$ac_try\"") >&5
23626   (eval $ac_try) 2>&5
23627   ac_status=$?
23628   echo "$as_me:23628: \$? = $ac_status" >&5
23629   (exit $ac_status); }; }; then
23630   cf_cxx_library=yes
23631
23632 cf_add_libs="$CXXLIBS"
23633 # reverse order
23634 cf_add_0lib=
23635 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23636 # filter duplicates
23637 for cf_add_1lib in $cf_add_0lib; do
23638         for cf_add_2lib in $cf_add_libs; do
23639                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23640                         cf_add_1lib=
23641                         break
23642                 fi
23643         done
23644         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23645 done
23646 CXXLIBS="$cf_add_libs"
23647
23648          if test "$cf_gpp_libname" = cpp ; then
23649
23650 cat >>confdefs.h <<\EOF
23651 #define HAVE_GPP_BUILTIN_H 1
23652 EOF
23653
23654          else
23655
23656 cat >>confdefs.h <<\EOF
23657 #define HAVE_GXX_BUILTIN_H 1
23658 EOF
23659
23660          fi
23661 else
23662   echo "$as_me: failed program was:" >&5
23663 cat conftest.$ac_ext >&5
23664 cat >conftest.$ac_ext <<_ACEOF
23665 #line 23665 "configure"
23666 #include "confdefs.h"
23667
23668 #include <builtin.h>
23669
23670 int
23671 main (void)
23672 {
23673 two_arg_error_handler_t foo2 = lib_error_handler
23674   ;
23675   return 0;
23676 }
23677 _ACEOF
23678 rm -f conftest.$ac_objext conftest$ac_exeext
23679 if { (eval echo "$as_me:23679: \"$ac_link\"") >&5
23680   (eval $ac_link) 2>&5
23681   ac_status=$?
23682   echo "$as_me:23682: \$? = $ac_status" >&5
23683   (exit $ac_status); } &&
23684          { ac_try='test -s conftest$ac_exeext'
23685   { (eval echo "$as_me:23685: \"$ac_try\"") >&5
23686   (eval $ac_try) 2>&5
23687   ac_status=$?
23688   echo "$as_me:23688: \$? = $ac_status" >&5
23689   (exit $ac_status); }; }; then
23690   cf_cxx_library=yes
23691
23692 cf_add_libs="$CXXLIBS"
23693 # reverse order
23694 cf_add_0lib=
23695 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23696 # filter duplicates
23697 for cf_add_1lib in $cf_add_0lib; do
23698         for cf_add_2lib in $cf_add_libs; do
23699                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23700                         cf_add_1lib=
23701                         break
23702                 fi
23703         done
23704         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23705 done
23706 CXXLIBS="$cf_add_libs"
23707
23708 cat >>confdefs.h <<\EOF
23709 #define HAVE_BUILTIN_H 1
23710 EOF
23711
23712 else
23713   echo "$as_me: failed program was:" >&5
23714 cat conftest.$ac_ext >&5
23715 cf_cxx_library=no
23716 fi
23717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23718 fi
23719 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23720         LIBS="$cf_save"
23721         echo "$as_me:23721: result: $cf_cxx_library" >&5
23722 echo "${ECHO_T}$cf_cxx_library" >&6
23723 fi
23724
23725                 ;;
23726         (*)
23727                 cf_cxx_library=no
23728                 ;;
23729         esac
23730
23731         ac_ext=cc
23732 ac_cpp='$CXXCPP $CPPFLAGS'
23733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23734 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23736 ac_main_return=return
23737 echo "$as_me:23737: checking how to run the C++ preprocessor" >&5
23738 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
23739 if test -z "$CXXCPP"; then
23740   if test "${ac_cv_prog_CXXCPP+set}" = set; then
23741   echo $ECHO_N "(cached) $ECHO_C" >&6
23742 else
23743       # Double quotes because CXXCPP needs to be expanded
23744     for CXXCPP in "$CXX -E" "/lib/cpp"
23745     do
23746       ac_preproc_ok=false
23747 for ac_cxx_preproc_warn_flag in '' yes
23748 do
23749   # Use a header file that comes with gcc, so configuring glibc
23750   # with a fresh cross-compiler works.
23751   # On the NeXT, cc -E runs the code through the compiler's parser,
23752   # not just through cpp. "Syntax error" is here to catch this case.
23753   cat >conftest.$ac_ext <<_ACEOF
23754 #line 23754 "configure"
23755 #include "confdefs.h"
23756 #include <assert.h>
23757                      Syntax error
23758 _ACEOF
23759 if { (eval echo "$as_me:23759: \"$ac_cpp conftest.$ac_ext\"") >&5
23760   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23761   ac_status=$?
23762   egrep -v '^ *\+' conftest.er1 >conftest.err
23763   rm -f conftest.er1
23764   cat conftest.err >&5
23765   echo "$as_me:23765: \$? = $ac_status" >&5
23766   (exit $ac_status); } >/dev/null; then
23767   if test -s conftest.err; then
23768     ac_cpp_err=$ac_cxx_preproc_warn_flag
23769   else
23770     ac_cpp_err=
23771   fi
23772 else
23773   ac_cpp_err=yes
23774 fi
23775 if test -z "$ac_cpp_err"; then
23776   :
23777 else
23778   echo "$as_me: failed program was:" >&5
23779   cat conftest.$ac_ext >&5
23780   # Broken: fails on valid input.
23781 continue
23782 fi
23783 rm -f conftest.err conftest.$ac_ext
23784
23785   # OK, works on sane cases.  Now check whether non-existent headers
23786   # can be detected and how.
23787   cat >conftest.$ac_ext <<_ACEOF
23788 #line 23788 "configure"
23789 #include "confdefs.h"
23790 #include <ac_nonexistent.h>
23791 _ACEOF
23792 if { (eval echo "$as_me:23792: \"$ac_cpp conftest.$ac_ext\"") >&5
23793   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23794   ac_status=$?
23795   egrep -v '^ *\+' conftest.er1 >conftest.err
23796   rm -f conftest.er1
23797   cat conftest.err >&5
23798   echo "$as_me:23798: \$? = $ac_status" >&5
23799   (exit $ac_status); } >/dev/null; then
23800   if test -s conftest.err; then
23801     ac_cpp_err=$ac_cxx_preproc_warn_flag
23802   else
23803     ac_cpp_err=
23804   fi
23805 else
23806   ac_cpp_err=yes
23807 fi
23808 if test -z "$ac_cpp_err"; then
23809   # Broken: success on invalid input.
23810 continue
23811 else
23812   echo "$as_me: failed program was:" >&5
23813   cat conftest.$ac_ext >&5
23814   # Passes both tests.
23815 ac_preproc_ok=:
23816 break
23817 fi
23818 rm -f conftest.err conftest.$ac_ext
23819
23820 done
23821 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23822 rm -f conftest.err conftest.$ac_ext
23823 if $ac_preproc_ok; then
23824   break
23825 fi
23826
23827     done
23828     ac_cv_prog_CXXCPP=$CXXCPP
23829
23830 fi
23831   CXXCPP=$ac_cv_prog_CXXCPP
23832 else
23833   ac_cv_prog_CXXCPP=$CXXCPP
23834 fi
23835 echo "$as_me:23835: result: $CXXCPP" >&5
23836 echo "${ECHO_T}$CXXCPP" >&6
23837 ac_preproc_ok=false
23838 for ac_cxx_preproc_warn_flag in '' yes
23839 do
23840   # Use a header file that comes with gcc, so configuring glibc
23841   # with a fresh cross-compiler works.
23842   # On the NeXT, cc -E runs the code through the compiler's parser,
23843   # not just through cpp. "Syntax error" is here to catch this case.
23844   cat >conftest.$ac_ext <<_ACEOF
23845 #line 23845 "configure"
23846 #include "confdefs.h"
23847 #include <assert.h>
23848                      Syntax error
23849 _ACEOF
23850 if { (eval echo "$as_me:23850: \"$ac_cpp conftest.$ac_ext\"") >&5
23851   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23852   ac_status=$?
23853   egrep -v '^ *\+' conftest.er1 >conftest.err
23854   rm -f conftest.er1
23855   cat conftest.err >&5
23856   echo "$as_me:23856: \$? = $ac_status" >&5
23857   (exit $ac_status); } >/dev/null; then
23858   if test -s conftest.err; then
23859     ac_cpp_err=$ac_cxx_preproc_warn_flag
23860   else
23861     ac_cpp_err=
23862   fi
23863 else
23864   ac_cpp_err=yes
23865 fi
23866 if test -z "$ac_cpp_err"; then
23867   :
23868 else
23869   echo "$as_me: failed program was:" >&5
23870   cat conftest.$ac_ext >&5
23871   # Broken: fails on valid input.
23872 continue
23873 fi
23874 rm -f conftest.err conftest.$ac_ext
23875
23876   # OK, works on sane cases.  Now check whether non-existent headers
23877   # can be detected and how.
23878   cat >conftest.$ac_ext <<_ACEOF
23879 #line 23879 "configure"
23880 #include "confdefs.h"
23881 #include <ac_nonexistent.h>
23882 _ACEOF
23883 if { (eval echo "$as_me:23883: \"$ac_cpp conftest.$ac_ext\"") >&5
23884   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23885   ac_status=$?
23886   egrep -v '^ *\+' conftest.er1 >conftest.err
23887   rm -f conftest.er1
23888   cat conftest.err >&5
23889   echo "$as_me:23889: \$? = $ac_status" >&5
23890   (exit $ac_status); } >/dev/null; then
23891   if test -s conftest.err; then
23892     ac_cpp_err=$ac_cxx_preproc_warn_flag
23893   else
23894     ac_cpp_err=
23895   fi
23896 else
23897   ac_cpp_err=yes
23898 fi
23899 if test -z "$ac_cpp_err"; then
23900   # Broken: success on invalid input.
23901 continue
23902 else
23903   echo "$as_me: failed program was:" >&5
23904   cat conftest.$ac_ext >&5
23905   # Passes both tests.
23906 ac_preproc_ok=:
23907 break
23908 fi
23909 rm -f conftest.err conftest.$ac_ext
23910
23911 done
23912 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
23913 rm -f conftest.err conftest.$ac_ext
23914 if $ac_preproc_ok; then
23915   :
23916 else
23917   { { echo "$as_me:23917: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
23918 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
23919    { (exit 1); exit 1; }; }
23920 fi
23921
23922 ac_ext=cc
23923 ac_cpp='$CXXCPP $CPPFLAGS'
23924 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23925 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23926 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23927 ac_main_return=return
23928
23929 for ac_header in typeinfo
23930 do
23931 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23932 echo "$as_me:23932: checking for $ac_header" >&5
23933 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23934 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23935   echo $ECHO_N "(cached) $ECHO_C" >&6
23936 else
23937   cat >conftest.$ac_ext <<_ACEOF
23938 #line 23938 "configure"
23939 #include "confdefs.h"
23940 #include <$ac_header>
23941 _ACEOF
23942 if { (eval echo "$as_me:23942: \"$ac_cpp conftest.$ac_ext\"") >&5
23943   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23944   ac_status=$?
23945   egrep -v '^ *\+' conftest.er1 >conftest.err
23946   rm -f conftest.er1
23947   cat conftest.err >&5
23948   echo "$as_me:23948: \$? = $ac_status" >&5
23949   (exit $ac_status); } >/dev/null; then
23950   if test -s conftest.err; then
23951     ac_cpp_err=$ac_cxx_preproc_warn_flag
23952   else
23953     ac_cpp_err=
23954   fi
23955 else
23956   ac_cpp_err=yes
23957 fi
23958 if test -z "$ac_cpp_err"; then
23959   eval "$as_ac_Header=yes"
23960 else
23961   echo "$as_me: failed program was:" >&5
23962   cat conftest.$ac_ext >&5
23963   eval "$as_ac_Header=no"
23964 fi
23965 rm -f conftest.err conftest.$ac_ext
23966 fi
23967 echo "$as_me:23967: result: `eval echo '${'$as_ac_Header'}'`" >&5
23968 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
23969 if test `eval echo '${'$as_ac_Header'}'` = yes; then
23970   cat >>confdefs.h <<EOF
23971 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23972 EOF
23973
23974 fi
23975 done
23976
23977 for ac_header in iostream
23978 do
23979 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23980 echo "$as_me:23980: checking for $ac_header" >&5
23981 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23982 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23983   echo $ECHO_N "(cached) $ECHO_C" >&6
23984 else
23985   cat >conftest.$ac_ext <<_ACEOF
23986 #line 23986 "configure"
23987 #include "confdefs.h"
23988 #include <$ac_header>
23989 _ACEOF
23990 if { (eval echo "$as_me:23990: \"$ac_cpp conftest.$ac_ext\"") >&5
23991   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23992   ac_status=$?
23993   egrep -v '^ *\+' conftest.er1 >conftest.err
23994   rm -f conftest.er1
23995   cat conftest.err >&5
23996   echo "$as_me:23996: \$? = $ac_status" >&5
23997   (exit $ac_status); } >/dev/null; then
23998   if test -s conftest.err; then
23999     ac_cpp_err=$ac_cxx_preproc_warn_flag
24000   else
24001     ac_cpp_err=
24002   fi
24003 else
24004   ac_cpp_err=yes
24005 fi
24006 if test -z "$ac_cpp_err"; then
24007   eval "$as_ac_Header=yes"
24008 else
24009   echo "$as_me: failed program was:" >&5
24010   cat conftest.$ac_ext >&5
24011   eval "$as_ac_Header=no"
24012 fi
24013 rm -f conftest.err conftest.$ac_ext
24014 fi
24015 echo "$as_me:24015: result: `eval echo '${'$as_ac_Header'}'`" >&5
24016 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
24017 if test `eval echo '${'$as_ac_Header'}'` = yes; then
24018   cat >>confdefs.h <<EOF
24019 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24020 EOF
24021
24022 fi
24023 done
24024
24025 if test x"$ac_cv_header_iostream" = xyes ; then
24026         echo "$as_me:24026: checking if iostream uses std-namespace" >&5
24027 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
24028         cat >conftest.$ac_ext <<_ACEOF
24029 #line 24029 "configure"
24030 #include "confdefs.h"
24031
24032 #include <iostream>
24033 using std::endl;
24034 using std::cerr;
24035 int
24036 main (void)
24037 {
24038
24039 cerr << "testing" << endl;
24040
24041   ;
24042   return 0;
24043 }
24044 _ACEOF
24045 rm -f conftest.$ac_objext
24046 if { (eval echo "$as_me:24046: \"$ac_compile\"") >&5
24047   (eval $ac_compile) 2>&5
24048   ac_status=$?
24049   echo "$as_me:24049: \$? = $ac_status" >&5
24050   (exit $ac_status); } &&
24051          { ac_try='test -s conftest.$ac_objext'
24052   { (eval echo "$as_me:24052: \"$ac_try\"") >&5
24053   (eval $ac_try) 2>&5
24054   ac_status=$?
24055   echo "$as_me:24055: \$? = $ac_status" >&5
24056   (exit $ac_status); }; }; then
24057   cf_iostream_namespace=yes
24058 else
24059   echo "$as_me: failed program was:" >&5
24060 cat conftest.$ac_ext >&5
24061 cf_iostream_namespace=no
24062 fi
24063 rm -f conftest.$ac_objext conftest.$ac_ext
24064         echo "$as_me:24064: result: $cf_iostream_namespace" >&5
24065 echo "${ECHO_T}$cf_iostream_namespace" >&6
24066         if test "$cf_iostream_namespace" = yes ; then
24067
24068 cat >>confdefs.h <<\EOF
24069 #define IOSTREAM_NAMESPACE 1
24070 EOF
24071
24072         fi
24073 fi
24074
24075 echo "$as_me:24075: checking if we should include stdbool.h" >&5
24076 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24077
24078 if test "${cf_cv_header_stdbool_h+set}" = set; then
24079   echo $ECHO_N "(cached) $ECHO_C" >&6
24080 else
24081
24082         cat >conftest.$ac_ext <<_ACEOF
24083 #line 24083 "configure"
24084 #include "confdefs.h"
24085
24086 int
24087 main (void)
24088 {
24089 bool foo = false
24090   ;
24091   return 0;
24092 }
24093 _ACEOF
24094 rm -f conftest.$ac_objext
24095 if { (eval echo "$as_me:24095: \"$ac_compile\"") >&5
24096   (eval $ac_compile) 2>&5
24097   ac_status=$?
24098   echo "$as_me:24098: \$? = $ac_status" >&5
24099   (exit $ac_status); } &&
24100          { ac_try='test -s conftest.$ac_objext'
24101   { (eval echo "$as_me:24101: \"$ac_try\"") >&5
24102   (eval $ac_try) 2>&5
24103   ac_status=$?
24104   echo "$as_me:24104: \$? = $ac_status" >&5
24105   (exit $ac_status); }; }; then
24106   cf_cv_header_stdbool_h=0
24107 else
24108   echo "$as_me: failed program was:" >&5
24109 cat conftest.$ac_ext >&5
24110 cat >conftest.$ac_ext <<_ACEOF
24111 #line 24111 "configure"
24112 #include "confdefs.h"
24113
24114 #ifndef __BEOS__
24115 #include <stdbool.h>
24116 #endif
24117
24118 int
24119 main (void)
24120 {
24121 bool foo = false
24122   ;
24123   return 0;
24124 }
24125 _ACEOF
24126 rm -f conftest.$ac_objext
24127 if { (eval echo "$as_me:24127: \"$ac_compile\"") >&5
24128   (eval $ac_compile) 2>&5
24129   ac_status=$?
24130   echo "$as_me:24130: \$? = $ac_status" >&5
24131   (exit $ac_status); } &&
24132          { ac_try='test -s conftest.$ac_objext'
24133   { (eval echo "$as_me:24133: \"$ac_try\"") >&5
24134   (eval $ac_try) 2>&5
24135   ac_status=$?
24136   echo "$as_me:24136: \$? = $ac_status" >&5
24137   (exit $ac_status); }; }; then
24138   cf_cv_header_stdbool_h=1
24139 else
24140   echo "$as_me: failed program was:" >&5
24141 cat conftest.$ac_ext >&5
24142 cf_cv_header_stdbool_h=0
24143 fi
24144 rm -f conftest.$ac_objext conftest.$ac_ext
24145 fi
24146 rm -f conftest.$ac_objext conftest.$ac_ext
24147 fi
24148
24149 if test "$cf_cv_header_stdbool_h" = 1
24150 then    echo "$as_me:24150: result: yes" >&5
24151 echo "${ECHO_T}yes" >&6
24152 else    echo "$as_me:24152: result: no" >&5
24153 echo "${ECHO_T}no" >&6
24154 fi
24155
24156 echo "$as_me:24156: checking for builtin bool type" >&5
24157 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24158
24159 if test "${cf_cv_builtin_bool+set}" = set; then
24160   echo $ECHO_N "(cached) $ECHO_C" >&6
24161 else
24162
24163         cat >conftest.$ac_ext <<_ACEOF
24164 #line 24164 "configure"
24165 #include "confdefs.h"
24166
24167 #include <stdio.h>
24168 #include <sys/types.h>
24169
24170 int
24171 main (void)
24172 {
24173 bool x = false
24174   ;
24175   return 0;
24176 }
24177 _ACEOF
24178 rm -f conftest.$ac_objext
24179 if { (eval echo "$as_me:24179: \"$ac_compile\"") >&5
24180   (eval $ac_compile) 2>&5
24181   ac_status=$?
24182   echo "$as_me:24182: \$? = $ac_status" >&5
24183   (exit $ac_status); } &&
24184          { ac_try='test -s conftest.$ac_objext'
24185   { (eval echo "$as_me:24185: \"$ac_try\"") >&5
24186   (eval $ac_try) 2>&5
24187   ac_status=$?
24188   echo "$as_me:24188: \$? = $ac_status" >&5
24189   (exit $ac_status); }; }; then
24190   cf_cv_builtin_bool=1
24191 else
24192   echo "$as_me: failed program was:" >&5
24193 cat conftest.$ac_ext >&5
24194 cf_cv_builtin_bool=0
24195 fi
24196 rm -f conftest.$ac_objext conftest.$ac_ext
24197
24198 fi
24199
24200 if test "$cf_cv_builtin_bool" = 1
24201 then    echo "$as_me:24201: result: yes" >&5
24202 echo "${ECHO_T}yes" >&6
24203 else    echo "$as_me:24203: result: no" >&5
24204 echo "${ECHO_T}no" >&6
24205 fi
24206
24207 echo "$as_me:24207: checking for size of bool" >&5
24208 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24209 if test "${cf_cv_type_of_bool+set}" = set; then
24210   echo $ECHO_N "(cached) $ECHO_C" >&6
24211 else
24212
24213         rm -f cf_test.out
24214         if test "$cross_compiling" = yes; then
24215   cf_cv_type_of_bool=unknown
24216 else
24217   cat >conftest.$ac_ext <<_ACEOF
24218 #line 24218 "configure"
24219 #include "confdefs.h"
24220
24221 #include <stdlib.h>
24222 #include <stdio.h>
24223
24224 #if defined(__cplusplus)
24225
24226 #ifdef HAVE_GXX_BUILTIN_H
24227 #include <g++/builtin.h>
24228 #elif HAVE_GPP_BUILTIN_H
24229 #include <gpp/builtin.h>
24230 #elif HAVE_BUILTIN_H
24231 #include <builtin.h>
24232 #endif
24233
24234 #else
24235
24236 #if $cf_cv_header_stdbool_h
24237 #include <stdbool.h>
24238 #endif
24239
24240 #endif
24241
24242 int main(void)
24243 {
24244         FILE *fp = fopen("cf_test.out", "w");
24245         if (fp != 0) {
24246                 bool x = true;
24247                 if ((bool)(-x) >= 0)
24248                         fputs("unsigned ", fp);
24249                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24250                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24251                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24252                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24253                 fclose(fp);
24254         }
24255         ${cf_cv_main_return:-return}(0);
24256 }
24257
24258 _ACEOF
24259 rm -f conftest$ac_exeext
24260 if { (eval echo "$as_me:24260: \"$ac_link\"") >&5
24261   (eval $ac_link) 2>&5
24262   ac_status=$?
24263   echo "$as_me:24263: \$? = $ac_status" >&5
24264   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24265   { (eval echo "$as_me:24265: \"$ac_try\"") >&5
24266   (eval $ac_try) 2>&5
24267   ac_status=$?
24268   echo "$as_me:24268: \$? = $ac_status" >&5
24269   (exit $ac_status); }; }; then
24270   cf_cv_type_of_bool=`cat cf_test.out`
24271                  if test -z "$cf_cv_type_of_bool"; then
24272                    cf_cv_type_of_bool=unknown
24273                  fi
24274 else
24275   echo "$as_me: program exited with status $ac_status" >&5
24276 echo "$as_me: failed program was:" >&5
24277 cat conftest.$ac_ext >&5
24278 cf_cv_type_of_bool=unknown
24279 fi
24280 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24281 fi
24282
24283 fi
24284
24285         rm -f cf_test.out
24286 echo "$as_me:24286: result: $cf_cv_type_of_bool" >&5
24287 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24288 if test "$cf_cv_type_of_bool" = unknown ; then
24289         case .$NCURSES_BOOL in
24290         (.auto|.) NCURSES_BOOL=unsigned;;
24291         esac
24292         { echo "$as_me:24292: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24293 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24294         cf_cv_type_of_bool=$NCURSES_BOOL
24295 fi
24296
24297 echo "$as_me:24297: checking for special defines needed for etip.h" >&5
24298 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
24299 cf_save_CXXFLAGS="$CXXFLAGS"
24300 cf_result="none"
24301
24302 # etip.h includes ncurses.h which includes ncurses_dll.h
24303 # But ncurses_dll.h is generated - fix here.
24304 test -d include || mkdir include
24305 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
24306
24307 for cf_math in "" MATH_H
24308 do
24309 for cf_excp in "" MATH_EXCEPTION
24310 do
24311         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
24312         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
24313         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
24314 cat >conftest.$ac_ext <<_ACEOF
24315 #line 24315 "configure"
24316 #include "confdefs.h"
24317
24318 #include <etip.h.in>
24319
24320 int
24321 main (void)
24322 {
24323
24324   ;
24325   return 0;
24326 }
24327 _ACEOF
24328 rm -f conftest.$ac_objext
24329 if { (eval echo "$as_me:24329: \"$ac_compile\"") >&5
24330   (eval $ac_compile) 2>&5
24331   ac_status=$?
24332   echo "$as_me:24332: \$? = $ac_status" >&5
24333   (exit $ac_status); } &&
24334          { ac_try='test -s conftest.$ac_objext'
24335   { (eval echo "$as_me:24335: \"$ac_try\"") >&5
24336   (eval $ac_try) 2>&5
24337   ac_status=$?
24338   echo "$as_me:24338: \$? = $ac_status" >&5
24339   (exit $ac_status); }; }; then
24340
24341         test -n "$cf_math" && cat >>confdefs.h <<EOF
24342 #define ETIP_NEEDS_${cf_math} 1
24343 EOF
24344
24345         test -n "$cf_excp" && cat >>confdefs.h <<EOF
24346 #define ETIP_NEEDS_${cf_excp} 1
24347 EOF
24348
24349         cf_result="$cf_math $cf_excp"
24350         break 2
24351
24352 else
24353   echo "$as_me: failed program was:" >&5
24354 cat conftest.$ac_ext >&5
24355 fi
24356 rm -f conftest.$ac_objext conftest.$ac_ext
24357 done
24358 done
24359 echo "$as_me:24359: result: $cf_result" >&5
24360 echo "${ECHO_T}$cf_result" >&6
24361 CXXFLAGS="$cf_save_CXXFLAGS"
24362
24363 if test -n "$CXX"; then
24364 echo "$as_me:24364: checking if $CXX accepts parameter initialization" >&5
24365 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
24366 if test "${cf_cv_cpp_param_init+set}" = set; then
24367   echo $ECHO_N "(cached) $ECHO_C" >&6
24368 else
24369
24370         ac_ext=cc
24371 ac_cpp='$CXXCPP $CPPFLAGS'
24372 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24373 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24374 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24375 ac_main_return=return
24376
24377         if test "$cross_compiling" = yes; then
24378   cf_cv_cpp_param_init=unknown
24379 else
24380   cat >conftest.$ac_ext <<_ACEOF
24381 #line 24381 "configure"
24382 #include "confdefs.h"
24383
24384 class TEST {
24385 private:
24386         int value;
24387 public:
24388         TEST(int x = 1);
24389         ~TEST();
24390 };
24391
24392 TEST::TEST(int x = 1)   // some compilers do not like second initializer
24393 {
24394         value = x;
24395 }
24396 int main(void) { }
24397
24398 _ACEOF
24399 rm -f conftest$ac_exeext
24400 if { (eval echo "$as_me:24400: \"$ac_link\"") >&5
24401   (eval $ac_link) 2>&5
24402   ac_status=$?
24403   echo "$as_me:24403: \$? = $ac_status" >&5
24404   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24405   { (eval echo "$as_me:24405: \"$ac_try\"") >&5
24406   (eval $ac_try) 2>&5
24407   ac_status=$?
24408   echo "$as_me:24408: \$? = $ac_status" >&5
24409   (exit $ac_status); }; }; then
24410   cf_cv_cpp_param_init=yes
24411 else
24412   echo "$as_me: program exited with status $ac_status" >&5
24413 echo "$as_me: failed program was:" >&5
24414 cat conftest.$ac_ext >&5
24415 cf_cv_cpp_param_init=no
24416 fi
24417 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24418 fi
24419         ac_ext=cc
24420 ac_cpp='$CXXCPP $CPPFLAGS'
24421 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24422 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24423 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24424 ac_main_return=return
24425
24426 fi
24427 echo "$as_me:24427: result: $cf_cv_cpp_param_init" >&5
24428 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
24429 fi
24430 test "$cf_cv_cpp_param_init" = yes &&
24431 cat >>confdefs.h <<\EOF
24432 #define CPP_HAS_PARAM_INIT 1
24433 EOF
24434
24435 if test -n "$CXX"; then
24436
24437 echo "$as_me:24437: checking if $CXX accepts static_cast" >&5
24438 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
24439 if test "${cf_cv_cpp_static_cast+set}" = set; then
24440   echo $ECHO_N "(cached) $ECHO_C" >&6
24441 else
24442
24443         ac_ext=cc
24444 ac_cpp='$CXXCPP $CPPFLAGS'
24445 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24446 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24447 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24448 ac_main_return=return
24449
24450         cat >conftest.$ac_ext <<_ACEOF
24451 #line 24451 "configure"
24452 #include "confdefs.h"
24453
24454 class NCursesPanel
24455 {
24456 public:
24457   NCursesPanel(int nlines,
24458                int ncols,
24459                int begin_y = 0,
24460                int begin_x = 0)
24461   {
24462   }
24463   NCursesPanel();
24464   ~NCursesPanel();
24465 };
24466
24467 template<class T> class NCursesUserPanel : public NCursesPanel
24468 {
24469 public:
24470   NCursesUserPanel (int nlines,
24471                     int ncols,
24472                     int begin_y = 0,
24473                     int begin_x = 0,
24474                     const T* p_UserData = static_cast<T*>(0))
24475     : NCursesPanel (nlines, ncols, begin_y, begin_x)
24476   {
24477   };
24478   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
24479   {
24480   };
24481
24482   virtual ~NCursesUserPanel() {};
24483 };
24484
24485 int
24486 main (void)
24487 {
24488
24489         const char* p_UserData = static_cast<char*>(0)
24490   ;
24491   return 0;
24492 }
24493 _ACEOF
24494 rm -f conftest.$ac_objext
24495 if { (eval echo "$as_me:24495: \"$ac_compile\"") >&5
24496   (eval $ac_compile) 2>&5
24497   ac_status=$?
24498   echo "$as_me:24498: \$? = $ac_status" >&5
24499   (exit $ac_status); } &&
24500          { ac_try='test -s conftest.$ac_objext'
24501   { (eval echo "$as_me:24501: \"$ac_try\"") >&5
24502   (eval $ac_try) 2>&5
24503   ac_status=$?
24504   echo "$as_me:24504: \$? = $ac_status" >&5
24505   (exit $ac_status); }; }; then
24506   cf_cv_cpp_static_cast=yes
24507 else
24508   echo "$as_me: failed program was:" >&5
24509 cat conftest.$ac_ext >&5
24510 cf_cv_cpp_static_cast=no
24511 fi
24512 rm -f conftest.$ac_objext conftest.$ac_ext
24513
24514         ac_ext=cc
24515 ac_cpp='$CXXCPP $CPPFLAGS'
24516 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
24517 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
24518 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24519 ac_main_return=return
24520
24521 fi
24522 echo "$as_me:24522: result: $cf_cv_cpp_static_cast" >&5
24523 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
24524
24525 fi
24526
24527 test "$cf_cv_cpp_static_cast" = yes &&
24528 cat >>confdefs.h <<\EOF
24529 #define CPP_HAS_STATIC_CAST 1
24530 EOF
24531
24532         CXX_AR='$(AR)'
24533         CXX_ARFLAGS='$(ARFLAGS)'
24534         case $cf_cv_system_name in
24535         (irix*)
24536             if test "$GXX" != yes ; then
24537                 CXX_AR='$(CXX)'
24538                 CXX_ARFLAGS='-ar -o'
24539             fi
24540             ;;
24541         (sco3.2v5*)
24542             CXXLDFLAGS="-u main"
24543             ;;
24544         (solaris2*)
24545             if test "$GXX" != yes ; then
24546                 CXX_AR='$(CXX)'
24547                 CXX_ARFLAGS='-xar -o'
24548             fi
24549             ;;
24550         esac
24551
24552 else
24553         cf_cxx_library=no
24554         cf_cv_builtin_bool=1
24555
24556         # Just because we are not configuring against C++ right now does not
24557         # mean that a user will not want to use C++.  Some distributors disable
24558         # the C++ portion of this configuration as a shortcut (or just to avoid
24559         # compiling the demo in the c++ directory).  So we need a reasonable
24560         # default for the 'bool' type.
24561         #
24562         # Caveat: since the storage of the bool type is not standardized, it
24563         # may change.
24564
24565         if test "$NCURSES_BOOL" != auto ; then
24566                 cf_cv_type_of_bool=$NCURSES_BOOL
24567                 cf_cv_header_stdbool_h=0
24568         else
24569                 if test "$cf_cv_header_stdbool_h" = 1 ; then
24570
24571 echo "$as_me:24571: checking for size of bool" >&5
24572 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
24573 if test "${cf_cv_type_of_bool+set}" = set; then
24574   echo $ECHO_N "(cached) $ECHO_C" >&6
24575 else
24576
24577         rm -f cf_test.out
24578         if test "$cross_compiling" = yes; then
24579   cf_cv_type_of_bool=unknown
24580 else
24581   cat >conftest.$ac_ext <<_ACEOF
24582 #line 24582 "configure"
24583 #include "confdefs.h"
24584
24585 #include <stdlib.h>
24586 #include <stdio.h>
24587
24588 #if defined(__cplusplus)
24589
24590 #ifdef HAVE_GXX_BUILTIN_H
24591 #include <g++/builtin.h>
24592 #elif HAVE_GPP_BUILTIN_H
24593 #include <gpp/builtin.h>
24594 #elif HAVE_BUILTIN_H
24595 #include <builtin.h>
24596 #endif
24597
24598 #else
24599
24600 #if $cf_cv_header_stdbool_h
24601 #include <stdbool.h>
24602 #endif
24603
24604 #endif
24605
24606 int main(void)
24607 {
24608         FILE *fp = fopen("cf_test.out", "w");
24609         if (fp != 0) {
24610                 bool x = true;
24611                 if ((bool)(-x) >= 0)
24612                         fputs("unsigned ", fp);
24613                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
24614                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
24615                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
24616                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
24617                 fclose(fp);
24618         }
24619         ${cf_cv_main_return:-return}(0);
24620 }
24621
24622 _ACEOF
24623 rm -f conftest$ac_exeext
24624 if { (eval echo "$as_me:24624: \"$ac_link\"") >&5
24625   (eval $ac_link) 2>&5
24626   ac_status=$?
24627   echo "$as_me:24627: \$? = $ac_status" >&5
24628   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24629   { (eval echo "$as_me:24629: \"$ac_try\"") >&5
24630   (eval $ac_try) 2>&5
24631   ac_status=$?
24632   echo "$as_me:24632: \$? = $ac_status" >&5
24633   (exit $ac_status); }; }; then
24634   cf_cv_type_of_bool=`cat cf_test.out`
24635                  if test -z "$cf_cv_type_of_bool"; then
24636                    cf_cv_type_of_bool=unknown
24637                  fi
24638 else
24639   echo "$as_me: program exited with status $ac_status" >&5
24640 echo "$as_me: failed program was:" >&5
24641 cat conftest.$ac_ext >&5
24642 cf_cv_type_of_bool=unknown
24643 fi
24644 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24645 fi
24646
24647 fi
24648
24649         rm -f cf_test.out
24650 echo "$as_me:24650: result: $cf_cv_type_of_bool" >&5
24651 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24652 if test "$cf_cv_type_of_bool" = unknown ; then
24653         case .$NCURSES_BOOL in
24654         (.auto|.) NCURSES_BOOL=unsigned;;
24655         esac
24656         { echo "$as_me:24656: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
24657 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
24658         cf_cv_type_of_bool=$NCURSES_BOOL
24659 fi
24660
24661                 else
24662                         echo "$as_me:24662: checking for fallback type of bool" >&5
24663 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
24664                         case "$host_cpu" in
24665                         (i?86)  cf_cv_type_of_bool=char ;;
24666                         (*)     cf_cv_type_of_bool=int  ;;
24667                         esac
24668                         echo "$as_me:24668: result: $cf_cv_type_of_bool" >&5
24669 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
24670                 fi
24671         fi
24672 fi
24673
24674 # If the C compiler did not declare bool, and we did not determine that the C++
24675 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
24676 # ncurses library use the same type as C++ bool.  Note that this allows one to
24677 # specify the type of bool in a configure-script option and postpone
24678 # integration with the C++ compiler provided that the types are compatible.
24679 USE_CXX_BOOL=1
24680 if test $cf_cv_cc_bool_type = 1
24681 then
24682         # oops: C has a bool.  Unlikely, but C++ could differ.
24683         USE_CXX_BOOL=0
24684 elif test $cf_cv_builtin_bool = 0
24685 then
24686         # C++ has no bool
24687         USE_CXX_BOOL=0
24688 else
24689         # this is the normal case
24690         USE_CXX_BOOL='defined(__cplusplus)'
24691 fi
24692
24693 if test -f "${srcdir}/Ada95/Makefile.in" ; then
24694
24695         if test "$cf_with_ada" != "no" ; then
24696                 if test "$with_libtool" != "no"; then
24697                         { echo "$as_me:24697: WARNING: libtool does not support Ada - disabling feature" >&5
24698 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
24699                         cf_with_ada=no
24700                 fi
24701         fi
24702
24703         if test "$cf_with_ada" != "no" ; then
24704
24705 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
24706 do
24707
24708 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24709
24710         unset ac_cv_path_cf_TEMP_gnat
24711         unset cf_TEMP_gnat
24712         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
24713 set dummy $cf_prog_gnat; ac_word=$2
24714 echo "$as_me:24714: checking for $ac_word" >&5
24715 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24716 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
24717   echo $ECHO_N "(cached) $ECHO_C" >&6
24718 else
24719   case $cf_TEMP_gnat in
24720   [\\/]* | ?:[\\/]*)
24721   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
24722   ;;
24723   *)
24724   ac_save_IFS=$IFS; IFS=$ac_path_separator
24725 ac_dummy="$PATH"
24726 for ac_dir in $ac_dummy; do
24727   IFS=$ac_save_IFS
24728   test -z "$ac_dir" && ac_dir=.
24729   if $as_executable_p "$ac_dir/$ac_word"; then
24730    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
24731    echo "$as_me:24731: found $ac_dir/$ac_word" >&5
24732    break
24733 fi
24734 done
24735
24736   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
24737   ;;
24738 esac
24739 fi
24740 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
24741
24742 if test -n "$cf_TEMP_gnat"; then
24743   echo "$as_me:24743: result: $cf_TEMP_gnat" >&5
24744 echo "${ECHO_T}$cf_TEMP_gnat" >&6
24745 else
24746   echo "$as_me:24746: result: no" >&5
24747 echo "${ECHO_T}no" >&6
24748 fi
24749
24750         eval cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat
24751
24752         if test "x$cf_TEMP_gnat" != xno; then
24753                 unset cf_cv_gnat_version
24754                 unset cf_TEMP_gnat
24755
24756 echo "$as_me:24756: checking for $cf_prog_gnat version" >&5
24757 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
24758 if test "${cf_cv_gnat_version+set}" = set; then
24759   echo $ECHO_N "(cached) $ECHO_C" >&6
24760 else
24761
24762 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
24763         grep '[0-9].[0-9][0-9]*' |\
24764         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24765
24766 fi
24767 echo "$as_me:24767: result: $cf_cv_gnat_version" >&5
24768 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24769 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24770 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
24771
24772         fi
24773         eval cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat
24774
24775         unset cf_TEMP_gnat
24776         unset cf_cv_gnat_version
24777         unset ac_cv_path_cf_TEMP_gnat
24778 done
24779
24780 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
24781         cf_ada_make=
24782         cf_cv_prog_gnat_correct=no
24783 else
24784         cf_ada_make=gnatmake
24785         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
24786                 # gprconfig is newer than gnatmake; we can continue...
24787                 cf_ada_config="##"
24788         else
24789                 rm -rf conftest* *~conftest*
24790                 if mkdir conftest.src
24791                 then
24792                         cf_ada_config=""
24793                         cd conftest.src
24794                         for cf_gprconfig in Ada C
24795                         do
24796                                 echo "$as_me:24796: checking for gprconfig name for $cf_gprconfig" >&5
24797 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
24798                                 if test $cf_gprconfig = C
24799                                 then
24800                                         for cf_gprconfig_param in \
24801                                                 $cf_gprconfig,,,,GNATGCC \
24802                                                 $cf_gprconfig,,,,GCC \
24803                                                 $cf_gprconfig
24804                                         do
24805                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24806                                                 test -n "$cf_gprconfig_value" && break
24807                                         done
24808                                 else
24809                                         cf_gprconfig_param=$cf_gprconfig
24810                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
24811                                 fi
24812                                 if test -n "$cf_gprconfig_value"
24813                                 then
24814                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
24815                                         echo "$as_me:24815: result: $cf_gprconfig_value" >&5
24816 echo "${ECHO_T}$cf_gprconfig_value" >&6
24817                                 else
24818                                         echo "$as_me:24818: result: missing" >&5
24819 echo "${ECHO_T}missing" >&6
24820                                         cf_ada_config="#"
24821                                         break
24822                                 fi
24823                         done
24824                         cd ..
24825                         rm -rf conftest* *~conftest*
24826                 fi
24827         fi
24828         if test "x$cf_ada_config" != "x#"
24829         then
24830
24831 echo "$as_me:24831: checking for gnat version" >&5
24832 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
24833 if test "${cf_cv_gnat_version+set}" = set; then
24834   echo $ECHO_N "(cached) $ECHO_C" >&6
24835 else
24836
24837 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
24838         grep '[0-9].[0-9][0-9]*' |\
24839         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
24840
24841 fi
24842 echo "$as_me:24842: result: $cf_cv_gnat_version" >&5
24843 echo "${ECHO_T}$cf_cv_gnat_version" >&6
24844 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
24845
24846 case $cf_cv_gnat_version in
24847 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
24848         cf_cv_prog_gnat_correct=yes
24849         ;;
24850 (*)
24851         { echo "$as_me:24851: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
24852 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
24853         cf_cv_prog_gnat_correct=no
24854         ;;
24855 esac
24856
24857                 # Extract the first word of "m4", so it can be a program name with args.
24858 set dummy m4; ac_word=$2
24859 echo "$as_me:24859: checking for $ac_word" >&5
24860 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24861 if test "${ac_cv_prog_M4_exists+set}" = set; then
24862   echo $ECHO_N "(cached) $ECHO_C" >&6
24863 else
24864   if test -n "$M4_exists"; then
24865   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
24866 else
24867   ac_save_IFS=$IFS; IFS=$ac_path_separator
24868 ac_dummy="$PATH"
24869 for ac_dir in $ac_dummy; do
24870   IFS=$ac_save_IFS
24871   test -z "$ac_dir" && ac_dir=.
24872   $as_executable_p "$ac_dir/$ac_word" || continue
24873 ac_cv_prog_M4_exists="yes"
24874 echo "$as_me:24874: found $ac_dir/$ac_word" >&5
24875 break
24876 done
24877
24878   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
24879 fi
24880 fi
24881 M4_exists=$ac_cv_prog_M4_exists
24882 if test -n "$M4_exists"; then
24883   echo "$as_me:24883: result: $M4_exists" >&5
24884 echo "${ECHO_T}$M4_exists" >&6
24885 else
24886   echo "$as_me:24886: result: no" >&5
24887 echo "${ECHO_T}no" >&6
24888 fi
24889
24890                 if test "$ac_cv_prog_M4_exists" = no; then
24891                         cf_cv_prog_gnat_correct=no
24892                         { echo "$as_me:24892: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
24893 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
24894                 fi
24895                 if test "$cf_cv_prog_gnat_correct" = yes; then
24896                         echo "$as_me:24896: checking if GNAT works" >&5
24897 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
24898
24899 rm -rf conftest* *~conftest*
24900 cat >>conftest.ads <<CF_EOF
24901 procedure conftest;
24902 CF_EOF
24903 cat >>conftest.adb <<CF_EOF
24904 with Text_IO;
24905 with GNAT.OS_Lib;
24906 procedure conftest is
24907 begin
24908    Text_IO.Put ("Hello World");
24909    Text_IO.New_Line;
24910    GNAT.OS_Lib.OS_Exit (0);
24911 end conftest;
24912 CF_EOF
24913 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
24914    if ( ./conftest 1>&5 2>&1 ) ; then
24915       cf_cv_prog_gnat_correct=yes
24916    else
24917       cf_cv_prog_gnat_correct=no
24918    fi
24919 else
24920    cf_cv_prog_gnat_correct=no
24921 fi
24922 rm -rf conftest* *~conftest*
24923
24924                         echo "$as_me:24924: result: $cf_cv_prog_gnat_correct" >&5
24925 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
24926                 fi
24927         else
24928                 cf_cv_prog_gnat_correct=no
24929         fi
24930 fi
24931
24932                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
24933
24934         ADAFLAGS="$ADAFLAGS -gnatpn"
24935
24936         echo "$as_me:24936: checking optimization options for ADAFLAGS" >&5
24937 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
24938         case "$CFLAGS" in
24939         (*-g*)
24940
24941         ADAFLAGS="$ADAFLAGS -g"
24942
24943                 ;;
24944         esac
24945         case "$CFLAGS" in
24946         (*-O*)
24947                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
24948
24949         ADAFLAGS="$ADAFLAGS $cf_O_flag"
24950
24951                 ;;
24952         esac
24953         echo "$as_me:24953: result: $ADAFLAGS" >&5
24954 echo "${ECHO_T}$ADAFLAGS" >&6
24955
24956 echo "$as_me:24956: checking if GNATPREP supports -T option" >&5
24957 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
24958 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
24959   echo $ECHO_N "(cached) $ECHO_C" >&6
24960 else
24961
24962 cf_cv_gnatprep_opt_t=no
24963 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
24964
24965 fi
24966 echo "$as_me:24966: result: $cf_cv_gnatprep_opt_t" >&5
24967 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
24968 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
24969
24970 echo "$as_me:24970: checking if GNAT supports generics" >&5
24971 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
24972 case $cf_cv_gnat_version in
24973 (3.[1-9]*|[4-9].*)
24974         cf_gnat_generics=yes
24975         ;;
24976 (*)
24977         cf_gnat_generics=no
24978         ;;
24979 esac
24980 echo "$as_me:24980: result: $cf_gnat_generics" >&5
24981 echo "${ECHO_T}$cf_gnat_generics" >&6
24982
24983 if test "$cf_gnat_generics" = yes
24984 then
24985         cf_compile_generics=generics
24986         cf_generic_objects="\${GENOBJS}"
24987 else
24988         cf_compile_generics=
24989         cf_generic_objects=
24990 fi
24991
24992 echo "$as_me:24992: checking if GNAT supports SIGINT" >&5
24993 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
24994 if test "${cf_cv_gnat_sigint+set}" = set; then
24995   echo $ECHO_N "(cached) $ECHO_C" >&6
24996 else
24997
24998 rm -rf conftest* *~conftest*
24999 cat >>conftest.ads <<CF_EOF
25000 with Ada.Interrupts.Names;
25001
25002 package ConfTest is
25003
25004    pragma Warnings (Off);  --  the next pragma exists since 3.11p
25005    pragma Unreserve_All_Interrupts;
25006    pragma Warnings (On);
25007
25008    protected Process is
25009       procedure Stop;
25010       function Continue return Boolean;
25011       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
25012    private
25013       Done : Boolean := False;
25014    end Process;
25015
25016 end ConfTest;
25017 CF_EOF
25018 cat >>conftest.adb <<CF_EOF
25019 package body ConfTest is
25020    protected body Process is
25021       procedure Stop is
25022       begin
25023          Done := True;
25024       end Stop;
25025       function Continue return Boolean is
25026       begin
25027          return not Done;
25028       end Continue;
25029    end Process;
25030 end ConfTest;
25031 CF_EOF
25032 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
25033       cf_cv_gnat_sigint=yes
25034 else
25035    cf_cv_gnat_sigint=no
25036 fi
25037 rm -rf conftest* *~conftest*
25038
25039 fi
25040 echo "$as_me:25040: result: $cf_cv_gnat_sigint" >&5
25041 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
25042
25043 if test $cf_cv_gnat_sigint = yes ; then
25044         USE_GNAT_SIGINT=""
25045 else
25046         USE_GNAT_SIGINT="#"
25047 fi
25048
25049 cf_gnat_libraries=no
25050 cf_gnat_projects=no
25051
25052 if test "$enable_gnat_projects" != no ; then
25053 echo "$as_me:25053: checking if GNAT supports project files" >&5
25054 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
25055 case $cf_cv_gnat_version in
25056 (3.[0-9]*)
25057         ;;
25058 (*)
25059         case $cf_cv_system_name in
25060         (cygwin*|msys*)
25061                 ;;
25062         (*)
25063                 rm -rf conftest* *~conftest*
25064                 if mkdir conftest.src conftest.bin conftest.lib
25065                 then
25066                         cd conftest.src
25067                         rm -rf conftest* *~conftest*
25068                         cat >>library.gpr <<CF_EOF
25069 project Library is
25070   Kind := External ("LIB_KIND");
25071   for Library_Name use "ConfTest";
25072   for Object_Dir use ".";
25073   for Library_ALI_Dir use External("LIBRARY_DIR");
25074   for Library_Version use External ("SONAME");
25075   for Library_Kind use Kind;
25076   for Library_Dir use External("BUILD_DIR");
25077   Source_Dir := External ("SOURCE_DIR");
25078   for Source_Dirs use (Source_Dir);
25079 end Library;
25080 CF_EOF
25081                         cat >>confpackage.ads <<CF_EOF
25082 package ConfPackage is
25083    procedure conftest;
25084 end ConfPackage;
25085 CF_EOF
25086                         cat >>confpackage.adb <<CF_EOF
25087 with Text_IO;
25088 package body ConfPackage is
25089    procedure conftest is
25090    begin
25091       Text_IO.Put ("Hello World");
25092       Text_IO.New_Line;
25093    end conftest;
25094 end ConfPackage;
25095 CF_EOF
25096                         if ( $cf_ada_make $ADAFLAGS \
25097                                         -Plibrary.gpr \
25098                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
25099                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
25100                                         -XSOURCE_DIR=`pwd` \
25101                                         -XSONAME=libConfTest.so.1 \
25102                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
25103                                 cf_gnat_projects=yes
25104                         fi
25105                         cd ..
25106                 fi
25107                 if test -f conftest.lib/confpackage.ali
25108                 then
25109                         cf_gnat_libraries=yes
25110                 fi
25111                 rm -rf conftest* *~conftest*
25112                 ;;
25113         esac
25114         ;;
25115 esac
25116 echo "$as_me:25116: result: $cf_gnat_projects" >&5
25117 echo "${ECHO_T}$cf_gnat_projects" >&6
25118 fi # enable_gnat_projects
25119
25120 if test $cf_gnat_projects = yes
25121 then
25122         echo "$as_me:25122: checking if GNAT supports libraries" >&5
25123 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
25124         echo "$as_me:25124: result: $cf_gnat_libraries" >&5
25125 echo "${ECHO_T}$cf_gnat_libraries" >&6
25126 fi
25127
25128 if test "$cf_gnat_projects" = yes
25129 then
25130         USE_OLD_MAKERULES="#"
25131         USE_GNAT_PROJECTS=""
25132 else
25133         USE_OLD_MAKERULES=""
25134         USE_GNAT_PROJECTS="#"
25135 fi
25136
25137 if test "$cf_gnat_libraries" = yes
25138 then
25139         USE_GNAT_LIBRARIES=""
25140 else
25141         USE_GNAT_LIBRARIES="#"
25142 fi
25143
25144 echo "$as_me:25144: checking for ada-compiler" >&5
25145 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
25146
25147 # Check whether --with-ada-compiler or --without-ada-compiler was given.
25148 if test "${with_ada_compiler+set}" = set; then
25149   withval="$with_ada_compiler"
25150   cf_ada_compiler=$withval
25151 else
25152   cf_ada_compiler=gnatmake
25153 fi;
25154
25155 echo "$as_me:25155: result: $cf_ada_compiler" >&5
25156 echo "${ECHO_T}$cf_ada_compiler" >&6
25157
25158                         cf_ada_package=terminal_interface
25159
25160 echo "$as_me:25160: checking for ada-include" >&5
25161 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
25162
25163 # Check whether --with-ada-include or --without-ada-include was given.
25164 if test "${with_ada_include+set}" = set; then
25165   withval="$with_ada_include"
25166
25167 else
25168   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
25169 fi; if test -n "$prefix/share/ada/adainclude" ; then
25170
25171 if test "x$prefix" != xNONE; then
25172         cf_path_syntax="$prefix"
25173 else
25174         cf_path_syntax="$ac_default_prefix"
25175 fi
25176
25177 case ".$withval" in
25178 (.\$\(*\)*|.\'*\'*)
25179         ;;
25180 (..|./*|.\\*)
25181         ;;
25182 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25183         ;;
25184 (.\${*prefix}*|.\${*dir}*)
25185         eval withval="$withval"
25186         case ".$withval" in
25187         (.NONE/*)
25188                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25189                 ;;
25190         esac
25191         ;;
25192 (.no|.NONE/*)
25193         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25194         ;;
25195 (*)
25196         { { echo "$as_me:25196: error: expected a pathname, not \"$withval\"" >&5
25197 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25198    { (exit 1); exit 1; }; }
25199         ;;
25200 esac
25201
25202 fi
25203 eval ADA_INCLUDE="$withval"
25204
25205 echo "$as_me:25205: result: $ADA_INCLUDE" >&5
25206 echo "${ECHO_T}$ADA_INCLUDE" >&6
25207
25208 echo "$as_me:25208: checking for ada-objects" >&5
25209 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
25210
25211 # Check whether --with-ada-objects or --without-ada-objects was given.
25212 if test "${with_ada_objects+set}" = set; then
25213   withval="$with_ada_objects"
25214
25215 else
25216   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
25217 fi; if test -n "$prefix/lib/ada/adalib" ; then
25218
25219 if test "x$prefix" != xNONE; then
25220         cf_path_syntax="$prefix"
25221 else
25222         cf_path_syntax="$ac_default_prefix"
25223 fi
25224
25225 case ".$withval" in
25226 (.\$\(*\)*|.\'*\'*)
25227         ;;
25228 (..|./*|.\\*)
25229         ;;
25230 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
25231         ;;
25232 (.\${*prefix}*|.\${*dir}*)
25233         eval withval="$withval"
25234         case ".$withval" in
25235         (.NONE/*)
25236                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25237                 ;;
25238         esac
25239         ;;
25240 (.no|.NONE/*)
25241         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
25242         ;;
25243 (*)
25244         { { echo "$as_me:25244: error: expected a pathname, not \"$withval\"" >&5
25245 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
25246    { (exit 1); exit 1; }; }
25247         ;;
25248 esac
25249
25250 fi
25251 eval ADA_OBJECTS="$withval"
25252
25253 echo "$as_me:25253: result: $ADA_OBJECTS" >&5
25254 echo "${ECHO_T}$ADA_OBJECTS" >&6
25255
25256 echo "$as_me:25256: checking if an Ada95 shared-library should be built" >&5
25257 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
25258
25259 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
25260 if test "${with_ada_sharedlib+set}" = set; then
25261   withval="$with_ada_sharedlib"
25262   with_ada_sharedlib=$withval
25263 else
25264   with_ada_sharedlib=no
25265 fi;
25266 echo "$as_me:25266: result: $with_ada_sharedlib" >&5
25267 echo "${ECHO_T}$with_ada_sharedlib" >&6
25268
25269 if test "x$with_ada_sharedlib" != xno
25270 then
25271         if test "x$cf_gnat_projects" != xyes
25272         then
25273                 { echo "$as_me:25273: WARNING: disabling shared-library since GNAT projects are not supported" >&5
25274 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
25275                 with_ada_sharedlib=no
25276         fi
25277 fi
25278
25279 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
25280 MAKE_ADA_SHAREDLIB="#"
25281
25282 if test "x$with_ada_sharedlib" != xno
25283 then
25284         MAKE_ADA_SHAREDLIB=
25285         if test "x$with_ada_sharedlib" != xyes
25286         then
25287                 ADA_SHAREDLIB="$with_ada_sharedlib"
25288         fi
25289 fi
25290
25291                         # allow the Ada binding to be renamed
25292
25293 echo "$as_me:25293: checking for ada-libname" >&5
25294 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
25295
25296 # Check whether --with-ada-libname or --without-ada-libname was given.
25297 if test "${with_ada_libname+set}" = set; then
25298   withval="$with_ada_libname"
25299   ADA_LIBNAME=$withval
25300 else
25301   ADA_LIBNAME=AdaCurses
25302 fi;
25303 case "x$ADA_LIBNAME" in
25304 (x|xyes|xno)
25305         ADA_LIBNAME=AdaCurses
25306         ;;
25307 esac
25308
25309 echo "$as_me:25309: result: $ADA_LIBNAME" >&5
25310 echo "${ECHO_T}$ADA_LIBNAME" >&6
25311
25312                 fi
25313         fi
25314 else
25315         cf_with_ada=no
25316 fi
25317
25318 # do this "late" to avoid conflict with header-checks
25319 if test "x$with_widec" = xyes ; then
25320         echo "$as_me:25320: checking for wchar_t" >&5
25321 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
25322 if test "${ac_cv_type_wchar_t+set}" = set; then
25323   echo $ECHO_N "(cached) $ECHO_C" >&6
25324 else
25325   cat >conftest.$ac_ext <<_ACEOF
25326 #line 25326 "configure"
25327 #include "confdefs.h"
25328 $ac_includes_default
25329 int
25330 main (void)
25331 {
25332 if ((wchar_t *) 0)
25333   return 0;
25334 if (sizeof (wchar_t))
25335   return 0;
25336   ;
25337   return 0;
25338 }
25339 _ACEOF
25340 rm -f conftest.$ac_objext
25341 if { (eval echo "$as_me:25341: \"$ac_compile\"") >&5
25342   (eval $ac_compile) 2>&5
25343   ac_status=$?
25344   echo "$as_me:25344: \$? = $ac_status" >&5
25345   (exit $ac_status); } &&
25346          { ac_try='test -s conftest.$ac_objext'
25347   { (eval echo "$as_me:25347: \"$ac_try\"") >&5
25348   (eval $ac_try) 2>&5
25349   ac_status=$?
25350   echo "$as_me:25350: \$? = $ac_status" >&5
25351   (exit $ac_status); }; }; then
25352   ac_cv_type_wchar_t=yes
25353 else
25354   echo "$as_me: failed program was:" >&5
25355 cat conftest.$ac_ext >&5
25356 ac_cv_type_wchar_t=no
25357 fi
25358 rm -f conftest.$ac_objext conftest.$ac_ext
25359 fi
25360 echo "$as_me:25360: result: $ac_cv_type_wchar_t" >&5
25361 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
25362
25363 echo "$as_me:25363: checking size of wchar_t" >&5
25364 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
25365 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
25366   echo $ECHO_N "(cached) $ECHO_C" >&6
25367 else
25368   if test "$ac_cv_type_wchar_t" = yes; then
25369   if test "$cross_compiling" = yes; then
25370   # Depending upon the size, compute the lo and hi bounds.
25371 cat >conftest.$ac_ext <<_ACEOF
25372 #line 25372 "configure"
25373 #include "confdefs.h"
25374 $ac_includes_default
25375 int
25376 main (void)
25377 {
25378 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
25379   ;
25380   return 0;
25381 }
25382 _ACEOF
25383 rm -f conftest.$ac_objext
25384 if { (eval echo "$as_me:25384: \"$ac_compile\"") >&5
25385   (eval $ac_compile) 2>&5
25386   ac_status=$?
25387   echo "$as_me:25387: \$? = $ac_status" >&5
25388   (exit $ac_status); } &&
25389          { ac_try='test -s conftest.$ac_objext'
25390   { (eval echo "$as_me:25390: \"$ac_try\"") >&5
25391   (eval $ac_try) 2>&5
25392   ac_status=$?
25393   echo "$as_me:25393: \$? = $ac_status" >&5
25394   (exit $ac_status); }; }; then
25395   ac_lo=0 ac_mid=0
25396   while :; do
25397     cat >conftest.$ac_ext <<_ACEOF
25398 #line 25398 "configure"
25399 #include "confdefs.h"
25400 $ac_includes_default
25401 int
25402 main (void)
25403 {
25404 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25405   ;
25406   return 0;
25407 }
25408 _ACEOF
25409 rm -f conftest.$ac_objext
25410 if { (eval echo "$as_me:25410: \"$ac_compile\"") >&5
25411   (eval $ac_compile) 2>&5
25412   ac_status=$?
25413   echo "$as_me:25413: \$? = $ac_status" >&5
25414   (exit $ac_status); } &&
25415          { ac_try='test -s conftest.$ac_objext'
25416   { (eval echo "$as_me:25416: \"$ac_try\"") >&5
25417   (eval $ac_try) 2>&5
25418   ac_status=$?
25419   echo "$as_me:25419: \$? = $ac_status" >&5
25420   (exit $ac_status); }; }; then
25421   ac_hi=$ac_mid; break
25422 else
25423   echo "$as_me: failed program was:" >&5
25424 cat conftest.$ac_ext >&5
25425 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
25426 fi
25427 rm -f conftest.$ac_objext conftest.$ac_ext
25428   done
25429 else
25430   echo "$as_me: failed program was:" >&5
25431 cat conftest.$ac_ext >&5
25432 ac_hi=-1 ac_mid=-1
25433   while :; do
25434     cat >conftest.$ac_ext <<_ACEOF
25435 #line 25435 "configure"
25436 #include "confdefs.h"
25437 $ac_includes_default
25438 int
25439 main (void)
25440 {
25441 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
25442   ;
25443   return 0;
25444 }
25445 _ACEOF
25446 rm -f conftest.$ac_objext
25447 if { (eval echo "$as_me:25447: \"$ac_compile\"") >&5
25448   (eval $ac_compile) 2>&5
25449   ac_status=$?
25450   echo "$as_me:25450: \$? = $ac_status" >&5
25451   (exit $ac_status); } &&
25452          { ac_try='test -s conftest.$ac_objext'
25453   { (eval echo "$as_me:25453: \"$ac_try\"") >&5
25454   (eval $ac_try) 2>&5
25455   ac_status=$?
25456   echo "$as_me:25456: \$? = $ac_status" >&5
25457   (exit $ac_status); }; }; then
25458   ac_lo=$ac_mid; break
25459 else
25460   echo "$as_me: failed program was:" >&5
25461 cat conftest.$ac_ext >&5
25462 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
25463 fi
25464 rm -f conftest.$ac_objext conftest.$ac_ext
25465   done
25466 fi
25467 rm -f conftest.$ac_objext conftest.$ac_ext
25468 # Binary search between lo and hi bounds.
25469 while test "x$ac_lo" != "x$ac_hi"; do
25470   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25471   cat >conftest.$ac_ext <<_ACEOF
25472 #line 25472 "configure"
25473 #include "confdefs.h"
25474 $ac_includes_default
25475 int
25476 main (void)
25477 {
25478 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
25479   ;
25480   return 0;
25481 }
25482 _ACEOF
25483 rm -f conftest.$ac_objext
25484 if { (eval echo "$as_me:25484: \"$ac_compile\"") >&5
25485   (eval $ac_compile) 2>&5
25486   ac_status=$?
25487   echo "$as_me:25487: \$? = $ac_status" >&5
25488   (exit $ac_status); } &&
25489          { ac_try='test -s conftest.$ac_objext'
25490   { (eval echo "$as_me:25490: \"$ac_try\"") >&5
25491   (eval $ac_try) 2>&5
25492   ac_status=$?
25493   echo "$as_me:25493: \$? = $ac_status" >&5
25494   (exit $ac_status); }; }; then
25495   ac_hi=$ac_mid
25496 else
25497   echo "$as_me: failed program was:" >&5
25498 cat conftest.$ac_ext >&5
25499 ac_lo=`expr $ac_mid + 1`
25500 fi
25501 rm -f conftest.$ac_objext conftest.$ac_ext
25502 done
25503 ac_cv_sizeof_wchar_t=$ac_lo
25504 else
25505   if test "$cross_compiling" = yes; then
25506   { { echo "$as_me:25506: error: cannot run test program while cross compiling" >&5
25507 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25508    { (exit 1); exit 1; }; }
25509 else
25510   cat >conftest.$ac_ext <<_ACEOF
25511 #line 25511 "configure"
25512 #include "confdefs.h"
25513 $ac_includes_default
25514 int
25515 main (void)
25516 {
25517 FILE *f = fopen ("conftest.val", "w");
25518 if (!f)
25519   $ac_main_return (1);
25520 fprintf (f, "%d", (sizeof (wchar_t)));
25521 fclose (f);
25522   ;
25523   return 0;
25524 }
25525 _ACEOF
25526 rm -f conftest$ac_exeext
25527 if { (eval echo "$as_me:25527: \"$ac_link\"") >&5
25528   (eval $ac_link) 2>&5
25529   ac_status=$?
25530   echo "$as_me:25530: \$? = $ac_status" >&5
25531   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25532   { (eval echo "$as_me:25532: \"$ac_try\"") >&5
25533   (eval $ac_try) 2>&5
25534   ac_status=$?
25535   echo "$as_me:25535: \$? = $ac_status" >&5
25536   (exit $ac_status); }; }; then
25537   ac_cv_sizeof_wchar_t=`cat conftest.val`
25538 else
25539   echo "$as_me: program exited with status $ac_status" >&5
25540 echo "$as_me: failed program was:" >&5
25541 cat conftest.$ac_ext >&5
25542 fi
25543 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25544 fi
25545 fi
25546 rm -f conftest.val
25547 else
25548   ac_cv_sizeof_wchar_t=0
25549 fi
25550 fi
25551 echo "$as_me:25551: result: $ac_cv_sizeof_wchar_t" >&5
25552 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
25553 cat >>confdefs.h <<EOF
25554 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
25555 EOF
25556
25557         # cross-compiling to mingw can run into the problem that attempting to
25558         # link with the regex library fails, causing the test to not set this to
25559         # a number.  "recent" autoconf does not address this problem either -TD
25560         if test -z "$ac_cv_sizeof_wchar_t"
25561         then
25562                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
25563
25564 echo "${as_me:-configure}:25564: testing test failed (assume 2) ..." 1>&5
25565
25566                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
25567                 mv confdefs.tmp confdefs.h
25568                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
25569         fi
25570 fi
25571
25572 ### Construct the ncurses library-subsets, if any, from this set of keywords:
25573 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
25574 ###
25575 ### ticlib modules may be a separate library, otherwise contained in termlib.
25576 ### termlib modules may be a separate library, otherwise contained in ncurses.
25577 ###
25578 ### The of "+" or " " between the tokens controls the way the script
25579 ### chooses to split module lists into libraries.
25580 ###
25581 ### (see CF_LIB_RULES).
25582 echo "$as_me:25582: checking for library subsets" >&5
25583 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
25584 LIB_SUBSETS=
25585
25586 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
25587         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
25588         if test "$with_ticlib" != no ; then
25589                 LIB_SUBSETS="${LIB_SUBSETS} "
25590         else
25591                 LIB_SUBSETS="${LIB_SUBSETS}+"
25592         fi
25593 fi
25594
25595 LIB_SUBSETS="${LIB_SUBSETS}termlib"
25596 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
25597
25598 if test "$with_termlib" != no ; then
25599         LIB_SUBSETS="${LIB_SUBSETS} "
25600 else
25601         LIB_SUBSETS="${LIB_SUBSETS}+"
25602 fi
25603
25604 LIB_SUBSETS="${LIB_SUBSETS}base"
25605
25606 # Most term-driver calls are to tinfo, but some like init_pair are to the
25607 # base library (so it resides in base).
25608 if test "$with_term_driver" != no ; then
25609         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
25610         case $cf_cv_system_name in
25611         (*mingw32*|*mingw64*)
25612                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
25613                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
25614                 ;;
25615         (*)
25616                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
25617                 ;;
25618         esac
25619 fi
25620
25621 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
25622 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
25623
25624 echo "$as_me:25624: result: $LIB_SUBSETS" >&5
25625 echo "${ECHO_T}$LIB_SUBSETS" >&6
25626
25627 ### Construct the list of include-directories to be generated
25628
25629 if test "$srcdir" != "."; then
25630         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
25631 fi
25632 CPPFLAGS="-I../include $CPPFLAGS"
25633 if test "$srcdir" != "."; then
25634         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
25635 fi
25636 CPPFLAGS="-I. $CPPFLAGS"
25637
25638 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
25639 if test "$srcdir" != "."; then
25640         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
25641 fi
25642 if test "$GCC" != yes; then
25643         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25644 elif test "$includedir" != "/usr/include"; then
25645         if test "$includedir" = '${prefix}/include' ; then
25646                 if test x$prefix != x/usr ; then
25647                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25648                 fi
25649         else
25650                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
25651         fi
25652 fi
25653
25654 ### Build up pieces for makefile rules
25655 echo "$as_me:25655: checking default library suffix" >&5
25656 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
25657
25658         case $DFT_LWR_MODEL in
25659         (libtool) DFT_ARG_SUFFIX=''   ;;
25660         (normal)  DFT_ARG_SUFFIX=''   ;;
25661         (debug)   DFT_ARG_SUFFIX='_g' ;;
25662         (profile) DFT_ARG_SUFFIX='_p' ;;
25663         (shared)  DFT_ARG_SUFFIX=''   ;;
25664         esac
25665         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
25666 echo "$as_me:25666: result: $DFT_ARG_SUFFIX" >&5
25667 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
25668
25669 echo "$as_me:25669: checking default library-dependency suffix" >&5
25670 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
25671
25672         case X$DFT_LWR_MODEL in
25673         (Xlibtool)
25674                 DFT_LIB_SUFFIX='.la'
25675                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25676                 ;;
25677         (Xdebug)
25678                 case $cf_cv_system_name in
25679                 (*-msvc*)
25680                         DFT_LIB_SUFFIX='_g.lib'
25681                         ;;
25682                 (*)
25683                         DFT_LIB_SUFFIX='_g.a'
25684                         ;;
25685                 esac
25686                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25687                 ;;
25688         (Xprofile)
25689                 case $cf_cv_system_name in
25690                 (*-msvc*)
25691                         DFT_LIB_SUFFIX='_p.lib'
25692                         ;;
25693                 (*)
25694                         DFT_LIB_SUFFIX='_p.a'
25695                         ;;
25696                 esac
25697                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25698                 ;;
25699         (Xshared)
25700                 case $cf_cv_system_name in
25701                 (aix[5-7]*)
25702                         DFT_LIB_SUFFIX='.so'
25703                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25704                         ;;
25705                 (*-msvc*)
25706                         DFT_LIB_SUFFIX='.dll'
25707                         DFT_DEP_SUFFIX='.dll.lib'
25708                         ;;
25709                 (cygwin*|msys*|mingw*)
25710                         DFT_LIB_SUFFIX='.dll'
25711                         DFT_DEP_SUFFIX='.dll.a'
25712                         ;;
25713                 (darwin*)
25714                         DFT_LIB_SUFFIX='.dylib'
25715                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25716                         ;;
25717                 (hpux*)
25718                         case $target in
25719                         (ia64*)
25720                                 DFT_LIB_SUFFIX='.so'
25721                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25722                                 ;;
25723                         (*)
25724                                 DFT_LIB_SUFFIX='.sl'
25725                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25726                                 ;;
25727                         esac
25728                         ;;
25729                 (*)
25730                         DFT_LIB_SUFFIX='.so'
25731                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25732                         ;;
25733                 esac
25734                 ;;
25735         (*)
25736                 case $target in
25737                 (*-msvc*)
25738                         DFT_LIB_SUFFIX='.lib'
25739                         ;;
25740                 (*)
25741                         DFT_LIB_SUFFIX='.a'
25742                         ;;
25743                 esac
25744                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
25745                 ;;
25746         esac
25747         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25748         then
25749                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
25750                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
25751         fi
25752 echo "$as_me:25752: result: $DFT_DEP_SUFFIX" >&5
25753 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
25754
25755 echo "$as_me:25755: checking default object directory" >&5
25756 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
25757
25758         case $DFT_LWR_MODEL in
25759         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
25760         (normal)  DFT_OBJ_SUBDIR='objects' ;;
25761         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
25762         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
25763         (shared)
25764                 case $cf_cv_system_name in
25765                 (cygwin|msys)
25766                         DFT_OBJ_SUBDIR='objects' ;;
25767                 (*)
25768                         DFT_OBJ_SUBDIR='obj_s' ;;
25769                 esac
25770         esac
25771 echo "$as_me:25771: result: $DFT_OBJ_SUBDIR" >&5
25772 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
25773
25774 if test "x$cf_with_cxx" = xyes ; then
25775 echo "$as_me:25775: checking c++ library-dependency suffix" >&5
25776 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
25777 if test "$with_libtool" != "no"; then
25778         # libtool thinks it can make c++ shared libraries (perhaps only g++)
25779         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25780 elif test "$with_shared_cxx" != "no"; then
25781         # also for g++ users...
25782         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
25783 else
25784         # we normally make a static library because C/C++ library rules differ
25785
25786         case Xnormal in
25787         (Xlibtool)
25788                 CXX_LIB_SUFFIX='.la'
25789                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25790                 ;;
25791         (Xdebug)
25792                 case $cf_cv_system_name in
25793                 (*-msvc*)
25794                         CXX_LIB_SUFFIX='_g.lib'
25795                         ;;
25796                 (*)
25797                         CXX_LIB_SUFFIX='_g.a'
25798                         ;;
25799                 esac
25800                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25801                 ;;
25802         (Xprofile)
25803                 case $cf_cv_system_name in
25804                 (*-msvc*)
25805                         CXX_LIB_SUFFIX='_p.lib'
25806                         ;;
25807                 (*)
25808                         CXX_LIB_SUFFIX='_p.a'
25809                         ;;
25810                 esac
25811                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25812                 ;;
25813         (Xshared)
25814                 case $cf_cv_system_name in
25815                 (aix[5-7]*)
25816                         CXX_LIB_SUFFIX='.so'
25817                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25818                         ;;
25819                 (*-msvc*)
25820                         CXX_LIB_SUFFIX='.dll'
25821                         CXX_DEP_SUFFIX='.dll.lib'
25822                         ;;
25823                 (cygwin*|msys*|mingw*)
25824                         CXX_LIB_SUFFIX='.dll'
25825                         CXX_DEP_SUFFIX='.dll.a'
25826                         ;;
25827                 (darwin*)
25828                         CXX_LIB_SUFFIX='.dylib'
25829                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25830                         ;;
25831                 (hpux*)
25832                         case $target in
25833                         (ia64*)
25834                                 CXX_LIB_SUFFIX='.so'
25835                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25836                                 ;;
25837                         (*)
25838                                 CXX_LIB_SUFFIX='.sl'
25839                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25840                                 ;;
25841                         esac
25842                         ;;
25843                 (*)
25844                         CXX_LIB_SUFFIX='.so'
25845                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25846                         ;;
25847                 esac
25848                 ;;
25849         (*)
25850                 case $target in
25851                 (*-msvc*)
25852                         CXX_LIB_SUFFIX='.lib'
25853                         ;;
25854                 (*)
25855                         CXX_LIB_SUFFIX='.a'
25856                         ;;
25857                 esac
25858                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
25859                 ;;
25860         esac
25861         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
25862         then
25863                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
25864                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
25865         fi
25866
25867 fi
25868 echo "$as_me:25868: result: $CXX_LIB_SUFFIX" >&5
25869 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
25870
25871 fi
25872
25873 # do not want -ldl in build except as needed for -lncurses dependency
25874 if test "x$with_dlsym" = xyes ; then
25875 if test $DFT_LWR_MODEL = shared || \
25876    test $DFT_LWR_MODEL = libtool ; then
25877
25878 # remove dl library from $LIBS
25879 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
25880
25881 fi
25882 fi
25883 ### Set up low-level terminfo dependencies for makefiles.
25884
25885 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
25886 # do not need libdl
25887 TICS_LIST=
25888 if test "x$with_dlsym" = xyes ; then
25889
25890 # remove dl library from $SHLIB_LIST
25891 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
25892
25893 fi
25894
25895 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
25896 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
25897 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
25898 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
25899 then
25900         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
25901 fi
25902
25903 if test "$with_ticlib" != no ; then
25904
25905         if test "x$with_ticlib" != xyes ; then
25906                 TICS_NAME=$with_ticlib
25907                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25908                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25909                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25910                 TICS_LIB_SUFFIX="${with_ticlib}"
25911         else
25912                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
25913                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
25914                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
25915                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
25916         fi
25917         TICS_LDFLAGS="-L${LIB_DIR}"
25918         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
25919 else
25920         TICS_SUFFIX=${DFT_LIB_SUFFIX}
25921         TICS_LDFLAGS="-L${LIB_DIR}"
25922         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25923 fi
25924
25925 if test "$with_termlib" != no ; then
25926
25927         if test "x$with_termlib" != xyes ; then
25928                 TINFO_NAME=$with_termlib
25929                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
25930                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25931                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
25932                 TINFO_LIB_SUFFIX="${with_termlib}"
25933         else
25934                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25935                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
25936                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
25937                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
25938         fi
25939
25940         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25941         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
25942         if test "$DFT_LWR_MODEL" = "libtool"; then
25943                 TEST_ARGS="${TEST_DEPS}"
25944                 TEST_ARG2="${TEST_DEP2}"
25945                 TINFO_LDFLAGS="-L${LIB_DIR}"
25946                 TINFO_LIBS="$TEST_ARGS"
25947                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
25948                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
25949         else
25950                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
25951                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
25952                 if test "x$with_term_driver" != xno ; then
25953                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25954                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
25955                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
25956                 else
25957                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25958                         TINFO_LIBS="$TEST_ARGS"
25959                 fi
25960                 TINFO_LDFLAGS="-L${LIB_DIR}"
25961                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
25962         fi
25963 else
25964         # the next lines are needed for linking libtic over libncurses
25965         TINFO_NAME=${LIB_NAME}
25966         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
25967         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
25968         if test "x$with_tic_depends" = xyes ; then
25969                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
25970         else
25971                 TICS_LIST="$SHLIB_LIST"
25972         fi
25973
25974         TINFO_LDFLAGS="-L${LIB_DIR}"
25975         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
25976 fi
25977
25978 if test "$DFT_LWR_MODEL" = shared ; then
25979         case $cf_cv_system_name in
25980         (cygwin*|msys*)
25981                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
25982                 TINFO_SUFFIX=.dll
25983                 ;;
25984         esac
25985 fi
25986
25987 if test "x$with_dlsym" = xyes ; then
25988
25989 # remove dl library from $TICS_LIST
25990 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
25991
25992 fi
25993
25994 if test "$DFT_LWR_MODEL" = "libtool"; then
25995         OBJEXT=lo
25996 fi
25997
25998 # needed for Ada95
25999 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
26000
26001 case $DFT_LWR_MODEL in
26002 (normal|debug|profile)
26003
26004 if test "$GCC" = yes ; then
26005         case $cf_cv_system_name in
26006         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
26007                 LDFLAGS_STATIC=
26008                 LDFLAGS_SHARED=
26009                 ;;
26010         (*)     # normally, except when broken
26011                 LDFLAGS_STATIC=-static
26012                 LDFLAGS_SHARED=-dynamic
26013                 ;;
26014         esac
26015 else
26016         case $cf_cv_system_name in
26017         (aix[4-7]*)     # from ld manpage
26018                 LDFLAGS_STATIC=-bstatic
26019                 LDFLAGS_SHARED=-bdynamic
26020                 ;;
26021         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
26022                 # We could also use just "archive" and "shared".
26023                 LDFLAGS_STATIC=-Wl,-a,archive_shared
26024                 LDFLAGS_SHARED=-Wl,-a,shared_archive
26025                 ;;
26026         (irix*)         # from ld manpage IRIX64
26027                 LDFLAGS_STATIC=-Bstatic
26028                 LDFLAGS_SHARED=-Bdynamic
26029                 ;;
26030         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
26031                 # alternative "-oldstyle_liblookup" (not in cc manpage)
26032                 LDFLAGS_STATIC=-noso
26033                 LDFLAGS_SHARED=-so_archive
26034                 ;;
26035         (solaris2*)
26036                 LDFLAGS_STATIC=-Bstatic
26037                 LDFLAGS_SHARED=-Bdynamic
26038                 ;;
26039         esac
26040 fi
26041
26042 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
26043 then
26044         echo "$as_me:26044: checking if linker supports switching between static/dynamic" >&5
26045 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
26046
26047         rm -f libconftest.a
26048         cat >conftest.$ac_ext <<EOF
26049 #line 26049 "configure"
26050 #include <stdio.h>
26051 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
26052 EOF
26053         if { (eval echo "$as_me:26053: \"$ac_compile\"") >&5
26054   (eval $ac_compile) 2>&5
26055   ac_status=$?
26056   echo "$as_me:26056: \$? = $ac_status" >&5
26057   (exit $ac_status); } ; then
26058                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
26059                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
26060         fi
26061         rm -f conftest.*
26062
26063         cf_save_LIBS="$LIBS"
26064
26065         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
26066         cat >conftest.$ac_ext <<_ACEOF
26067 #line 26067 "configure"
26068 #include "confdefs.h"
26069
26070 #line 26070 "configure"
26071 #include <stdio.h>
26072 int cf_ldflags_static(FILE *fp);
26073
26074 int
26075 main (void)
26076 {
26077
26078         return cf_ldflags_static(stdin);
26079
26080   ;
26081   return 0;
26082 }
26083 _ACEOF
26084 rm -f conftest.$ac_objext conftest$ac_exeext
26085 if { (eval echo "$as_me:26085: \"$ac_link\"") >&5
26086   (eval $ac_link) 2>&5
26087   ac_status=$?
26088   echo "$as_me:26088: \$? = $ac_status" >&5
26089   (exit $ac_status); } &&
26090          { ac_try='test -s conftest$ac_exeext'
26091   { (eval echo "$as_me:26091: \"$ac_try\"") >&5
26092   (eval $ac_try) 2>&5
26093   ac_status=$?
26094   echo "$as_me:26094: \$? = $ac_status" >&5
26095   (exit $ac_status); }; }; then
26096
26097         # some linkers simply ignore the -dynamic
26098         case x`file conftest$ac_exeext 2>/dev/null` in
26099         (*static*)
26100                 cf_ldflags_static=no
26101                 ;;
26102         (*)
26103                 cf_ldflags_static=yes
26104                 ;;
26105         esac
26106
26107 else
26108   echo "$as_me: failed program was:" >&5
26109 cat conftest.$ac_ext >&5
26110 cf_ldflags_static=no
26111 fi
26112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26113
26114         rm -f libconftest.*
26115         LIBS="$cf_save_LIBS"
26116
26117         echo "$as_me:26117: result: $cf_ldflags_static" >&5
26118 echo "${ECHO_T}$cf_ldflags_static" >&6
26119
26120         if test $cf_ldflags_static != yes
26121         then
26122                 LDFLAGS_STATIC=
26123                 LDFLAGS_SHARED=
26124         fi
26125 else
26126         LDFLAGS_STATIC=
26127         LDFLAGS_SHARED=
26128 fi
26129
26130         ;;
26131 esac
26132
26133 echo "$as_me:26133: checking where we will install curses.h" >&5
26134 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
26135
26136 includesubdir=
26137 if test "$with_overwrite" = no && \
26138  ( test "x$includedir" = 'x${prefix}/include' || \
26139    test "x$includedir" = "x${prefix}/include" )
26140 then
26141         includesubdir="/ncurses${USE_LIB_SUFFIX}"
26142 fi
26143 echo "$as_me:26143: result: ${includedir}${includesubdir}" >&5
26144 echo "${ECHO_T}${includedir}${includesubdir}" >&6
26145
26146 ### Resolve a conflict between normal and wide-curses by forcing applications
26147 ### that will need libutf8 to add it to their configure script.
26148 if test "$with_overwrite" != no ; then
26149 if test "$NCURSES_LIBUTF8" = 1 ; then
26150         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
26151         { echo "$as_me:26151: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
26152 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
26153 fi
26154 fi
26155 WITH_OVERWRITE=$with_overwrite
26156
26157 # used to separate tack out of the tree
26158 NCURSES_TREE=
26159
26160 ### predefined stuff for the test programs
26161
26162 cat >>confdefs.h <<\EOF
26163 #define HAVE_SLK_COLOR 1
26164 EOF
26165
26166 # pkgsrc uses these
26167
26168 echo "$as_me:26168: checking for desired basename for form library" >&5
26169 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
26170
26171 # Check whether --with-form-libname or --without-form-libname was given.
26172 if test "${with_form_libname+set}" = set; then
26173   withval="$with_form_libname"
26174   with_lib_basename=$withval
26175 else
26176   with_lib_basename=form
26177 fi;
26178 FORM_NAME="$with_lib_basename"
26179
26180 case "x$FORM_NAME" in
26181 (x|xno|xnone|xyes)
26182         FORM_NAME=form
26183         ;;
26184 (*)
26185         ;;
26186 esac
26187
26188 echo "$as_me:26188: result: $FORM_NAME" >&5
26189 echo "${ECHO_T}$FORM_NAME" >&6
26190
26191 echo "$as_me:26191: checking for desired basename for menu library" >&5
26192 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
26193
26194 # Check whether --with-menu-libname or --without-menu-libname was given.
26195 if test "${with_menu_libname+set}" = set; then
26196   withval="$with_menu_libname"
26197   with_lib_basename=$withval
26198 else
26199   with_lib_basename=menu
26200 fi;
26201 MENU_NAME="$with_lib_basename"
26202
26203 case "x$MENU_NAME" in
26204 (x|xno|xnone|xyes)
26205         MENU_NAME=menu
26206         ;;
26207 (*)
26208         ;;
26209 esac
26210
26211 echo "$as_me:26211: result: $MENU_NAME" >&5
26212 echo "${ECHO_T}$MENU_NAME" >&6
26213
26214 echo "$as_me:26214: checking for desired basename for panel library" >&5
26215 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
26216
26217 # Check whether --with-panel-libname or --without-panel-libname was given.
26218 if test "${with_panel_libname+set}" = set; then
26219   withval="$with_panel_libname"
26220   with_lib_basename=$withval
26221 else
26222   with_lib_basename=panel
26223 fi;
26224 PANEL_NAME="$with_lib_basename"
26225
26226 case "x$PANEL_NAME" in
26227 (x|xno|xnone|xyes)
26228         PANEL_NAME=panel
26229         ;;
26230 (*)
26231         ;;
26232 esac
26233
26234 echo "$as_me:26234: result: $PANEL_NAME" >&5
26235 echo "${ECHO_T}$PANEL_NAME" >&6
26236
26237 echo "$as_me:26237: checking for desired basename for cxx library" >&5
26238 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
26239
26240 # Check whether --with-cxx-libname or --without-cxx-libname was given.
26241 if test "${with_cxx_libname+set}" = set; then
26242   withval="$with_cxx_libname"
26243   with_lib_basename=$withval
26244 else
26245   with_lib_basename=ncurses++
26246 fi;
26247 CXX_NAME="$with_lib_basename"
26248
26249 case "x$CXX_NAME" in
26250 (x|xno|xnone|xyes)
26251         CXX_NAME=ncurses++
26252         ;;
26253 (*)
26254         ;;
26255 esac
26256
26257 echo "$as_me:26257: result: $CXX_NAME" >&5
26258 echo "${ECHO_T}$CXX_NAME" >&6
26259
26260 ### Construct the list of subdirectories for which we'll customize makefiles
26261 ### with the appropriate compile-rules.
26262
26263 echo "$as_me:26263: checking for src modules" >&5
26264 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
26265
26266 # dependencies and linker-arguments for test-programs
26267 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
26268 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
26269 if test "$DFT_LWR_MODEL" = "libtool"; then
26270         TEST_ARGS="${TEST_DEPS}"
26271         TEST_ARG2="${TEST_DEP2}"
26272 else
26273         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
26274         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
26275 fi
26276
26277 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
26278 cf_cv_src_modules=
26279 for cf_dir in $modules_to_build
26280 do
26281         if test -f $srcdir/$cf_dir/modules; then
26282
26283                 # We may/may not have tack in the distribution, though the
26284                 # makefile is.
26285                 if test $cf_dir = tack ; then
26286                         if test "x$cf_with_tack" != "xyes"; then
26287                                 continue
26288                         fi
26289                 fi
26290
26291                 if test -z "$cf_cv_src_modules"; then
26292                         cf_cv_src_modules=$cf_dir
26293                 else
26294                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
26295                 fi
26296
26297                 # Make the ncurses_cfg.h file record the library interface files as
26298                 # well.  These are header files that are the same name as their
26299                 # directory.  Ncurses is the only library that does not follow
26300                 # that pattern.
26301                 if test $cf_dir = tack ; then
26302                         continue
26303                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
26304
26305 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26306
26307                         cat >>confdefs.h <<EOF
26308 #define HAVE_${cf_have_include}_H 1
26309 EOF
26310
26311                         cat >>confdefs.h <<EOF
26312 #define HAVE_LIB${cf_have_include} 1
26313 EOF
26314
26315 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26316
26317 eval TEST_ROOT=\$${cf_map_lib_basename}_NAME
26318
26319                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
26320                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
26321                         if test "$DFT_LWR_MODEL" = "libtool"; then
26322                                 TEST_ARGS="${TEST_DEPS}"
26323                                 TEST_ARG2="${TEST_DEP2}"
26324                         else
26325                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
26326                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
26327                         fi
26328                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
26329                 fi
26330         fi
26331 done
26332 echo "$as_me:26332: result: $cf_cv_src_modules" >&5
26333 echo "${ECHO_T}$cf_cv_src_modules" >&6
26334
26335 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
26336 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
26337
26338 SRC_SUBDIRS=
26339 if test "x$cf_with_manpages" != xno ; then
26340         SRC_SUBDIRS="$SRC_SUBDIRS man"
26341 fi
26342 SRC_SUBDIRS="$SRC_SUBDIRS include"
26343 for cf_dir in $cf_cv_src_modules
26344 do
26345         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
26346 done
26347 if test "x$cf_with_tests" != "xno" ; then
26348         SRC_SUBDIRS="$SRC_SUBDIRS test"
26349 fi
26350 # always make this, to install the ncurses-config script
26351 SRC_SUBDIRS="$SRC_SUBDIRS misc"
26352 if test "$cf_with_cxx_binding" != no; then
26353         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
26354         SRC_SUBDIRS="$SRC_SUBDIRS c++"
26355 fi
26356
26357 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
26358 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
26359
26360 ADA_SUBDIRS=
26361 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
26362         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
26363         ADA_SUBDIRS="gen src"
26364         if test "x$cf_with_tests" != "xno" ; then
26365                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
26366         fi
26367 fi
26368
26369 SUB_MAKEFILES=
26370 for cf_dir in $SRC_SUBDIRS
26371 do
26372         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
26373 done
26374
26375 if test -n "$ADA_SUBDIRS"; then
26376         for cf_dir in $ADA_SUBDIRS
26377         do
26378                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
26379         done
26380
26381 fi
26382
26383 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26384    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
26385    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
26386    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
26387 fi
26388
26389 DIRS_TO_MAKE="lib"
26390 for cf_item in $cf_list_models
26391 do
26392
26393         case $cf_item in
26394         (libtool) cf_subdir='obj_lo'  ;;
26395         (normal)  cf_subdir='objects' ;;
26396         (debug)   cf_subdir='obj_g' ;;
26397         (profile) cf_subdir='obj_p' ;;
26398         (shared)
26399                 case $cf_cv_system_name in
26400                 (cygwin|msys)
26401                         cf_subdir='objects' ;;
26402                 (*)
26403                         cf_subdir='obj_s' ;;
26404                 esac
26405         esac
26406
26407         for cf_item2 in $DIRS_TO_MAKE
26408         do
26409                 test $cf_item2 = $cf_subdir && break
26410         done
26411         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
26412 done
26413 for cf_dir in $DIRS_TO_MAKE
26414 do
26415         test ! -d $cf_dir && mkdir $cf_dir
26416 done
26417
26418 # symbols that differ when compiling Ada95 by itself.
26419 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
26420
26421 # values to use as strings
26422
26423 cat >>confdefs.h <<EOF
26424 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
26425 EOF
26426
26427 cat >>confdefs.h <<EOF
26428 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
26429 EOF
26430
26431 ### Now that we're done running tests, add the compiler-warnings, if any
26432
26433 cf_fix_cppflags=no
26434 cf_new_cflags=
26435 cf_new_cppflags=
26436 cf_new_extra_cppflags=
26437
26438 for cf_add_cflags in $EXTRA_CFLAGS
26439 do
26440 case $cf_fix_cppflags in
26441 (no)
26442         case $cf_add_cflags in
26443         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
26444                 case $cf_add_cflags in
26445                 (-D*)
26446                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
26447
26448                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26449                                 && test -z "${cf_tst_cflags}" \
26450                                 && cf_fix_cppflags=yes
26451
26452                         if test $cf_fix_cppflags = yes ; then
26453
26454         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26455         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26456
26457                                 continue
26458                         elif test "${cf_tst_cflags}" = "\"'" ; then
26459
26460         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26461         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26462
26463                                 continue
26464                         fi
26465                         ;;
26466                 esac
26467                 case "$CPPFLAGS" in
26468                 (*$cf_add_cflags)
26469                         ;;
26470                 (*)
26471                         case $cf_add_cflags in
26472                         (-D*)
26473                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
26474
26475 CPPFLAGS=`echo "$CPPFLAGS" | \
26476         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
26477                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
26478
26479                                 ;;
26480                         esac
26481
26482         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
26483         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
26484
26485                         ;;
26486                 esac
26487                 ;;
26488         (*)
26489
26490         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26491         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26492
26493                 ;;
26494         esac
26495         ;;
26496 (yes)
26497
26498         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26499         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26500
26501         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
26502
26503         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26504                 && test -z "${cf_tst_cflags}" \
26505                 && cf_fix_cppflags=no
26506         ;;
26507 esac
26508 done
26509
26510 if test -n "$cf_new_cflags" ; then
26511
26512         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26513         CFLAGS="${CFLAGS}$cf_new_cflags"
26514
26515 fi
26516
26517 if test -n "$cf_new_cppflags" ; then
26518
26519         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26520         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26521
26522 fi
26523
26524 if test -n "$cf_new_extra_cppflags" ; then
26525
26526         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26527         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26528
26529 fi
26530
26531 ### Define substitutions for header files to avoid name-pollution
26532
26533 if test "x$cf_cv_have_tcgetattr" = xyes ; then
26534         HAVE_TCGETATTR=1
26535 else
26536         HAVE_TCGETATTR=0
26537 fi
26538
26539 if test "x$ac_cv_header_stdint_h" = xyes ; then
26540         HAVE_STDINT_H=1
26541 else
26542         HAVE_STDINT_H=0
26543 fi
26544
26545 if test "x$ac_cv_header_termio_h" = xyes ; then
26546         HAVE_TERMIO_H=1
26547 else
26548         HAVE_TERMIO_H=0
26549 fi
26550
26551 if test "x$ac_cv_header_termios_h" = xyes ; then
26552         HAVE_TERMIOS_H=1
26553 else
26554         HAVE_TERMIOS_H=0
26555 fi
26556
26557 ################################################################################
26558 test "x$use_database" = xyes && \
26559 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
26560
26561 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
26562 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
26563
26564 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
26565 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
26566 fi
26567
26568 if test "x$cf_with_tests" != xno ; then
26569         MAKE_TESTS=
26570 else
26571         MAKE_TESTS="#"
26572 fi
26573
26574 ADAHTML_DIR=../../doc/html/ada
26575
26576 # workaround for OS/2 (20151017)
26577 case $cf_cv_system_name in
26578 (os2*)
26579         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
26580         ;;
26581 (*)
26582         LIBTOOL_OPTS_CXX=
26583         ;;
26584 esac
26585
26586 # workaround for g++ versus Solaris (20131116)
26587 case $cf_cv_system_name in
26588 (solaris2*)
26589         case "x$CPPFLAGS" in
26590         (*-D_XOPEN_SOURCE_EXTENDED*)
26591                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
26592
26593 echo "${as_me:-configure}:26593: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
26594
26595                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
26596                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
26597                 ;;
26598         esac
26599         ;;
26600 esac
26601
26602 # Help to automatically enable the extended curses features when using either
26603 # the *-config or the ".pc" files by adding defines.
26604 echo "$as_me:26604: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
26605 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
26606 PKG_CFLAGS=
26607 for cf_loop1 in $CPPFLAGS_after_XOPEN
26608 do
26609         cf_found=no
26610         for cf_loop2 in $CPPFLAGS_before_XOPEN
26611         do
26612                 if test "x$cf_loop1" = "x$cf_loop2"
26613                 then
26614                         cf_found=yes
26615                         break
26616                 fi
26617         done
26618         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
26619 done
26620 echo "$as_me:26620: result: $PKG_CFLAGS" >&5
26621 echo "${ECHO_T}$PKG_CFLAGS" >&6
26622
26623 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
26624 case "x$NCURSES_OSPEED" in
26625 (*short*)
26626         cf_compatible=1
26627         ;;
26628 (*)
26629         cf_compatible=0
26630         ;;
26631 esac
26632
26633 cat >>confdefs.h <<EOF
26634 #define NCURSES_OSPEED_COMPAT $cf_compatible
26635 EOF
26636
26637 case "x$cf_cv_typeof_chtype" in
26638 (xshort|xint|xlong)
26639         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
26640         ;;
26641 esac
26642
26643 case "x$cf_cv_typeof_mmask_t" in
26644 (xshort|xint|xlong)
26645         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
26646         ;;
26647 esac
26648
26649 # substitute into misc/Makefile to suppress
26650 # (un)install.data from the
26651 # (un)install rules.
26652 if test "x$cf_with_db_install" = "xno"; then
26653         MISC_INSTALL_DATA=
26654         MISC_UNINSTALL_DATA=
26655 else
26656         MISC_INSTALL_DATA=install.data
26657         MISC_UNINSTALL_DATA=uninstall.data
26658 fi
26659
26660 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
26661         MAKE_DATABASE="#"
26662 else
26663         MAKE_DATABASE="$MAKE_TERMINFO"
26664 fi
26665
26666 if test -n "$PACKAGE"
26667 then
26668         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
26669         export PACKAGE
26670         echo "package: $PACKAGE"
26671 fi
26672
26673 UNALTERED_SYMS=
26674 cf_filter_syms=no
26675
26676 if test -n "$RESULTING_SYMS"
26677 then
26678         cf_filter_syms=$cf_dft_filter_syms
26679         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
26680
26681 echo "${as_me:-configure}:26681: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
26682
26683 fi
26684
26685 if test "x$WILDCARD_SYMS" = xno
26686 then
26687         cf_filter_syms=yes
26688 fi
26689
26690 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
26691
26692 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
26693 if test $cf_filter_syms = yes
26694 then
26695         RESULTING_SYMS=resulting.map
26696 fi
26697
26698 if test "x$cross_compiling" = xyes ; then
26699         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
26700         CHECK_BUILD="#"
26701 else
26702         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
26703         CHECK_BUILD=
26704 fi
26705
26706 # This is used for the *-config script and *.pc data files.
26707
26708 echo "$as_me:26708: checking for linker search path" >&5
26709 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
26710 if test "${cf_cv_ld_searchpath+set}" = set; then
26711   echo $ECHO_N "(cached) $ECHO_C" >&6
26712 else
26713
26714 if test "$cross_compiling" != yes ; then
26715
26716 # GNU binutils' ld does not involve permissions which may stop ldconfig.
26717 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
26718
26719 # The -NX options tell newer versions of Linux ldconfig to not attempt to
26720 # update the cache, which makes it run faster.
26721 test -z "$cf_pathlist" && \
26722         cf_pathlist=`ldconfig -NX -v 2>/dev/null | sed -e '/^[  ]/d' -e 's/:$//' | sort -u`
26723
26724 test -z "$cf_pathlist" &&
26725         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e '/^[   ]/d' -e 's/:$//p' | sort -u`
26726
26727 # This works with OpenBSD 6.5, which lists only filenames
26728 test -z "$cf_pathlist" &&
26729         cf_pathlist=`ldconfig -v 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
26730
26731 if test -z "$cf_pathlist"
26732 then
26733         # dyld default path with MacOS
26734         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
26735         then
26736                 # do this to bypass check
26737                 cf_cv_ld_searchpath='$HOME/lib'
26738                 cf_pathlist="/usr/local/lib /lib /usr/lib"
26739         fi
26740 fi
26741
26742 if test -z "$cf_pathlist"
26743 then
26744         # Solaris is hardcoded
26745         if test -d /opt/SUNWspro/lib
26746         then
26747                 cf_pathlist="/opt/SUNWspro/lib /usr/ccs/lib /usr/lib"
26748         elif test -d /usr/ccs/lib
26749         then
26750                 cf_pathlist="/usr/ccs/lib /usr/lib"
26751         fi
26752 fi
26753
26754 fi
26755
26756 # If nothing else, assume it is conventional
26757 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
26758
26759 # Finally, check that this is only directories
26760 for cf_path in $0 $cf_pathlist
26761 do
26762         if test -d "$cf_path"; then
26763                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
26764                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
26765         fi
26766 done
26767
26768 # Ensure that it is nonempty
26769 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
26770
26771 fi
26772 echo "$as_me:26772: result: $cf_cv_ld_searchpath" >&5
26773 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
26774
26775 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
26776
26777 cat >>confdefs.h <<\EOF
26778 #define HAVE_CURSES_DATA_BOOLNAMES 1
26779 EOF
26780
26781 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"
26782 ac_config_commands="$ac_config_commands default"
26783 cat >confcache <<\_ACEOF
26784 # This file is a shell script that caches the results of configure
26785 # tests run on this system so they can be shared between configure
26786 # scripts and configure runs, see configure's option --config-cache.
26787 # It is not useful on other systems.  If it contains results you don't
26788 # want to keep, you may remove or edit it.
26789 #
26790 # config.status only pays attention to the cache file if you give it
26791 # the --recheck option to rerun configure.
26792 #
26793 # `ac_cv_env_foo' variables (set or unset) will be overriden when
26794 # loading this file, other *unset* `ac_cv_foo' will be assigned the
26795 # following values.
26796
26797 _ACEOF
26798
26799 # The following way of writing the cache mishandles newlines in values,
26800 # but we know of no workaround that is simple, portable, and efficient.
26801 # So, don't put newlines in cache variables' values.
26802 # Ultrix sh set writes to stderr and can't be redirected directly,
26803 # and sets the high bit in the cache file unless we assign to the vars.
26804 {
26805   (set) 2>&1 |
26806     case `(ac_space=' '; set | grep ac_space) 2>&1` in
26807     *ac_space=\ *)
26808       # `set' does not quote correctly, so add quotes (double-quote
26809       # substitution turns \\\\ into \\, and sed turns \\ into \).
26810       sed -n \
26811         "s/'/'\\\\''/g;
26812           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
26813       ;;
26814     *)
26815       # `set' quotes correctly as required by POSIX, so do not add quotes.
26816       sed -n \
26817         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
26818       ;;
26819     esac;
26820 } |
26821   sed '
26822      t clear
26823      : clear
26824      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26825      t end
26826      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26827      : end' >>confcache
26828 if cmp -s $cache_file confcache; then :; else
26829   if test -w $cache_file; then
26830     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
26831     cat confcache >$cache_file
26832   else
26833     echo "not updating unwritable cache $cache_file"
26834   fi
26835 fi
26836 rm -f confcache
26837
26838 test "x$prefix" = xNONE && prefix=$ac_default_prefix
26839 # Let make expand exec_prefix.
26840 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
26841
26842 # VPATH may cause trouble with some makes, so we remove $(srcdir),
26843 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26844 # trailing colons and then remove the whole line if VPATH becomes empty
26845 # (actually we leave an empty line to preserve line numbers).
26846 if test "x$srcdir" = x.; then
26847   ac_vpsub='/^[         ]*VPATH[        ]*=/{
26848 s/:*\$(srcdir):*/:/;
26849 s/:*\${srcdir}:*/:/;
26850 s/:*@srcdir@:*/:/;
26851 s/^\([^=]*=[    ]*\):*/\1/;
26852 s/:*$//;
26853 s/^[^=]*=[      ]*$//;
26854 }'
26855 fi
26856
26857 DEFS=-DHAVE_CONFIG_H
26858
26859 : ${CONFIG_STATUS=./config.status}
26860 ac_clean_files_save=$ac_clean_files
26861 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
26862 { echo "$as_me:26862: creating $CONFIG_STATUS" >&5
26863 echo "$as_me: creating $CONFIG_STATUS" >&6;}
26864 cat >$CONFIG_STATUS <<_ACEOF
26865 #! $SHELL
26866 # Generated automatically by configure.
26867 # Run this file to recreate the current configuration.
26868 # Compiler output produced by configure, useful for debugging
26869 # configure, is in config.log if it exists.
26870
26871 debug=false
26872 SHELL=\${CONFIG_SHELL-$SHELL}
26873 ac_cs_invocation="\$0 \$@"
26874
26875 _ACEOF
26876
26877 cat >>$CONFIG_STATUS <<\_ACEOF
26878 # Be Bourne compatible
26879 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26880   emulate sh
26881   NULLCMD=:
26882 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
26883   set -o posix
26884 fi
26885
26886 # Name of the executable.
26887 as_me=`echo "$0" |sed 's,.*[\\/],,'`
26888
26889 if expr a : '\(a\)' >/dev/null 2>&1; then
26890   as_expr=expr
26891 else
26892   as_expr=false
26893 fi
26894
26895 rm -f conf$$ conf$$.exe conf$$.file
26896 echo >conf$$.file
26897 if ln -s conf$$.file conf$$ 2>/dev/null; then
26898   # We could just check for DJGPP; but this test a) works b) is more generic
26899   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
26900   if test -f conf$$.exe; then
26901     # Don't use ln at all; we don't have any links
26902     as_ln_s='cp -p'
26903   else
26904     as_ln_s='ln -s'
26905   fi
26906 elif ln conf$$.file conf$$ 2>/dev/null; then
26907   as_ln_s=ln
26908 else
26909   as_ln_s='cp -p'
26910 fi
26911 rm -f conf$$ conf$$.exe conf$$.file
26912
26913 as_executable_p="test -f"
26914
26915 # Support unset when possible.
26916 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
26917   as_unset=unset
26918 else
26919   as_unset=false
26920 fi
26921
26922 # NLS nuisances.
26923 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
26924 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
26925 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
26926 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
26927 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
26928 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
26929 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
26930 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
26931
26932 # IFS
26933 # We need space, tab and new line, in precisely that order.
26934 as_nl='
26935 '
26936 IFS="   $as_nl"
26937
26938 # CDPATH.
26939 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
26940
26941 exec 6>&1
26942
26943 _ACEOF
26944
26945 # Files that config.status was made for.
26946 if test -n "$ac_config_files"; then
26947   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
26948 fi
26949
26950 if test -n "$ac_config_headers"; then
26951   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
26952 fi
26953
26954 if test -n "$ac_config_links"; then
26955   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
26956 fi
26957
26958 if test -n "$ac_config_commands"; then
26959   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
26960 fi
26961
26962 cat >>$CONFIG_STATUS <<\EOF
26963
26964 ac_cs_usage="\
26965 \`$as_me' instantiates files from templates according to the
26966 current configuration.
26967
26968 Usage: $0 [OPTIONS] [FILE]...
26969
26970   -h, --help       print this help, then exit
26971   -V, --version    print version number, then exit
26972   -d, --debug      don't remove temporary files
26973       --recheck    update $as_me by reconfiguring in the same conditions
26974   --file=FILE[:TEMPLATE]
26975                    instantiate the configuration file FILE
26976   --header=FILE[:TEMPLATE]
26977                    instantiate the configuration header FILE
26978
26979 Configuration files:
26980 $config_files
26981
26982 Configuration headers:
26983 $config_headers
26984
26985 Configuration commands:
26986 $config_commands
26987
26988 Report bugs to <dickey@invisible-island.net>."
26989 EOF
26990
26991 cat >>$CONFIG_STATUS <<EOF
26992 ac_cs_version="\\
26993 config.status
26994 configured by $0, generated by GNU Autoconf 2.52.20200111,
26995   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
26996
26997 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
26998 Free Software Foundation, Inc.
26999 This config.status script is free software; the Free Software Foundation
27000 gives unlimited permission to copy, distribute and modify it."
27001 srcdir=$srcdir
27002 INSTALL="$INSTALL"
27003 EOF
27004
27005 cat >>$CONFIG_STATUS <<\EOF
27006 # If no file are specified by the user, then we need to provide default
27007 # value.  By we need to know if files were specified by the user.
27008 ac_need_defaults=:
27009 while test $# != 0
27010 do
27011   case $1 in
27012   --*=*)
27013     ac_option=`expr "x$1" : 'x\([^=]*\)='`
27014     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
27015     shift
27016     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
27017     shift
27018     ;;
27019   -*);;
27020   *) # This is not an option, so the user has probably given explicit
27021      # arguments.
27022      ac_need_defaults=false;;
27023   esac
27024
27025   case $1 in
27026   # Handling of the options.
27027 EOF
27028 cat >>$CONFIG_STATUS <<EOF
27029   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27030     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
27031     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
27032 EOF
27033 cat >>$CONFIG_STATUS <<\EOF
27034   --version | --vers* | -V )
27035     echo "$ac_cs_version"; exit 0 ;;
27036   --he | --h)
27037     # Conflict between --help and --header
27038     { { echo "$as_me:27038: error: ambiguous option: $1
27039 Try \`$0 --help' for more information." >&5
27040 echo "$as_me: error: ambiguous option: $1
27041 Try \`$0 --help' for more information." >&2;}
27042    { (exit 1); exit 1; }; };;
27043   --help | --hel | -h )
27044     echo "$ac_cs_usage"; exit 0 ;;
27045   --debug | --d* | -d )
27046     debug=: ;;
27047   --file | --fil | --fi | --f )
27048     shift
27049     CONFIG_FILES="$CONFIG_FILES $1"
27050     ac_need_defaults=false;;
27051   --header | --heade | --head | --hea )
27052     shift
27053     CONFIG_HEADERS="$CONFIG_HEADERS $1"
27054     ac_need_defaults=false;;
27055
27056   # This is an error.
27057   -*) { { echo "$as_me:27057: error: unrecognized option: $1
27058 Try \`$0 --help' for more information." >&5
27059 echo "$as_me: error: unrecognized option: $1
27060 Try \`$0 --help' for more information." >&2;}
27061    { (exit 1); exit 1; }; } ;;
27062
27063   *) ac_config_targets="$ac_config_targets $1" ;;
27064
27065   esac
27066   shift
27067 done
27068
27069 exec 5>>config.log
27070 cat >&5 << _ACEOF
27071
27072 ## ----------------------- ##
27073 ## Running config.status.  ##
27074 ## ----------------------- ##
27075
27076 This file was extended by $as_me 2.52.20200111, executed with
27077   CONFIG_FILES    = $CONFIG_FILES
27078   CONFIG_HEADERS  = $CONFIG_HEADERS
27079   CONFIG_LINKS    = $CONFIG_LINKS
27080   CONFIG_COMMANDS = $CONFIG_COMMANDS
27081   > $ac_cs_invocation
27082 on `(hostname || uname -n) 2>/dev/null | sed 1q`
27083
27084 _ACEOF
27085 EOF
27086
27087 cat >>$CONFIG_STATUS <<EOF
27088 #
27089 # INIT-COMMANDS section.
27090 #
27091
27092 ### Special initialization commands, used to pass information from the
27093 ### configuration-run into config.status
27094
27095 ALTERNATE_SYMS="$ALTERNATE_SYMS"
27096 AWK="$AWK"
27097 CXX_NAME="$CXX_NAME"
27098 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
27099 DFT_LWR_MODEL="$DFT_LWR_MODEL"
27100 ECHO_LD="$ECHO_LD"
27101 EXTRA_SUFFIX="$EXTRA_SUFFIX"
27102 FORM_NAME="$FORM_NAME"
27103 LDCONFIG="$LDCONFIG"
27104 LIBTOOL_VERSION="$LIBTOOL_VERSION"
27105 LIB_NAME="$LIB_NAME"
27106 LIB_PREFIX="$LIB_PREFIX"
27107 LIB_SUBSETS="$LIB_SUBSETS"
27108 LIB_SUFFIX="$LIB_SUFFIX"
27109 LIB_TRACING="$LIB_TRACING"
27110 LN_S="$LN_S"
27111 MAKE_TERMINFO="$MAKE_TERMINFO"
27112 MENU_NAME="$MENU_NAME"
27113 NCURSES_MAJOR="$NCURSES_MAJOR"
27114 NCURSES_MINOR="$NCURSES_MINOR"
27115 NCURSES_OSPEED="$NCURSES_OSPEED"
27116 NCURSES_PATCH="$NCURSES_PATCH"
27117 PANEL_NAME="$PANEL_NAME"
27118 SRC_SUBDIRS="$SRC_SUBDIRS"
27119 TERMINFO="$TERMINFO"
27120 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
27121 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
27122 TICS_NAME="$TICS_NAME"
27123 TICS_SUFFIX="$TICS_SUFFIX"
27124 TIC_PATH="$TIC_PATH"
27125 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
27126 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
27127 TINFO_NAME="$TINFO_NAME"
27128 TINFO_SUFFIX="$TINFO_SUFFIX"
27129 UNALTERED_SYMS="$UNALTERED_SYMS"
27130 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
27131 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
27132 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
27133 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
27134 WILDCARD_SYMS="$WILDCARD_SYMS"
27135 WITH_CURSES_H="$with_curses_h"
27136 WITH_ECHO="${enable_echo:=yes}"
27137 WITH_OVERWRITE="$with_overwrite"
27138 cf_LIST_MODELS="$cf_list_models"
27139 cf_cv_abi_version="$cf_cv_abi_version"
27140 cf_cv_do_relink="$cf_cv_do_relink"
27141 cf_cv_do_reranlib="$cf_cv_do_reranlib"
27142 cf_cv_do_symlinks="$cf_cv_do_symlinks"
27143 cf_cv_enable_lp64="$cf_cv_enable_lp64"
27144 cf_cv_enable_opaque="$cf_cv_enable_opaque"
27145 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
27146 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
27147 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
27148 cf_cv_rel_version="$cf_cv_rel_version"
27149 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
27150 cf_cv_shared_soname='$cf_cv_shared_soname'
27151 cf_cv_shlib_version="$cf_cv_shlib_version"
27152 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
27153 cf_cv_system_name="$cf_cv_system_name"
27154 cf_cv_term_driver="$with_term_driver"
27155 cf_with_ada="$cf_with_ada"
27156 cf_with_cxx_binding="$cf_with_cxx_binding"
27157 cf_with_db_install="$cf_with_db_install"
27158 cf_with_manpages="$cf_with_manpages"
27159 cf_with_tests="$cf_with_tests"
27160 host="$host"
27161 target="$target"
27162 with_shared_cxx="$with_shared_cxx"
27163
27164 EOF
27165
27166 cat >>$CONFIG_STATUS <<\EOF
27167 for ac_config_target in $ac_config_targets
27168 do
27169   case "$ac_config_target" in
27170   # Handling of arguments.
27171   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
27172   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
27173   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
27174   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
27175   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
27176   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
27177   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
27178   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
27179   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
27180   *) { { echo "$as_me:27180: error: invalid argument: $ac_config_target" >&5
27181 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
27182    { (exit 1); exit 1; }; };;
27183   esac
27184 done
27185
27186 # If the user did not use the arguments to specify the items to instantiate,
27187 # then the envvar interface is used.  Set only those that are not.
27188 # We use the long form for the default assignment because of an extremely
27189 # bizarre bug on SunOS 4.1.3.
27190 if $ac_need_defaults; then
27191   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27192   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27193   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
27194 fi
27195
27196 # Create a temporary directory, and hook for its removal unless debugging.
27197 $debug ||
27198 {
27199   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
27200   trap '{ (exit 1); exit 1; }' 1 2 13 15
27201 }
27202
27203 # Create a (secure) tmp directory for tmp files.
27204 : ${TMPDIR=/tmp}
27205 {
27206   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
27207   test -n "$tmp" && test -d "$tmp"
27208 }  ||
27209 {
27210   tmp=$TMPDIR/cs$$-$RANDOM
27211   (umask 077 && mkdir $tmp)
27212 } ||
27213 {
27214    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
27215    { (exit 1); exit 1; }
27216 }
27217
27218 EOF
27219
27220 cat >>$CONFIG_STATUS <<EOF
27221
27222 #
27223 # CONFIG_FILES section.
27224 #
27225
27226 # No need to generate the scripts if there are no CONFIG_FILES.
27227 # This happens for instance when ./config.status config.h
27228 if test -n "\$CONFIG_FILES"; then
27229   # Protect against being on the right side of a sed subst in config.status.
27230   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
27231    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
27232 s,@SHELL@,$SHELL,;t t
27233 s,@exec_prefix@,$exec_prefix,;t t
27234 s,@prefix@,$prefix,;t t
27235 s,@program_transform_name@,$program_transform_name,;t t
27236 s,@bindir@,$bindir,;t t
27237 s,@sbindir@,$sbindir,;t t
27238 s,@libexecdir@,$libexecdir,;t t
27239 s,@datarootdir@,$datarootdir,;t t
27240 s,@datadir@,$datadir,;t t
27241 s,@sysconfdir@,$sysconfdir,;t t
27242 s,@sharedstatedir@,$sharedstatedir,;t t
27243 s,@localstatedir@,$localstatedir,;t t
27244 s,@runstatedir@,$runstatedir,;t t
27245 s,@libdir@,$libdir,;t t
27246 s,@includedir@,$includedir,;t t
27247 s,@oldincludedir@,$oldincludedir,;t t
27248 s,@infodir@,$infodir,;t t
27249 s,@mandir@,$mandir,;t t
27250 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
27251 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
27252 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
27253 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
27254 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
27255 s,@build_alias@,$build_alias,;t t
27256 s,@host_alias@,$host_alias,;t t
27257 s,@target_alias@,$target_alias,;t t
27258 s,@ECHO_C@,$ECHO_C,;t t
27259 s,@ECHO_N@,$ECHO_N,;t t
27260 s,@ECHO_T@,$ECHO_T,;t t
27261 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
27262 s,@DEFS@,$DEFS,;t t
27263 s,@LIBS@,$LIBS,;t t
27264 s,@top_builddir@,$top_builddir,;t t
27265 s,@EGREP@,$EGREP,;t t
27266 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
27267 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
27268 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
27269 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
27270 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
27271 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
27272 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
27273 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
27274 s,@VERSION@,$VERSION,;t t
27275 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
27276 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
27277 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
27278 s,@PACKAGE@,$PACKAGE,;t t
27279 s,@build@,$build,;t t
27280 s,@build_cpu@,$build_cpu,;t t
27281 s,@build_vendor@,$build_vendor,;t t
27282 s,@build_os@,$build_os,;t t
27283 s,@host@,$host,;t t
27284 s,@host_cpu@,$host_cpu,;t t
27285 s,@host_vendor@,$host_vendor,;t t
27286 s,@host_os@,$host_os,;t t
27287 s,@target@,$target,;t t
27288 s,@target_cpu@,$target_cpu,;t t
27289 s,@target_vendor@,$target_vendor,;t t
27290 s,@target_os@,$target_os,;t t
27291 s,@CC@,$CC,;t t
27292 s,@CFLAGS@,$CFLAGS,;t t
27293 s,@LDFLAGS@,$LDFLAGS,;t t
27294 s,@CPPFLAGS@,$CPPFLAGS,;t t
27295 s,@ac_ct_CC@,$ac_ct_CC,;t t
27296 s,@EXEEXT@,$EXEEXT,;t t
27297 s,@OBJEXT@,$OBJEXT,;t t
27298 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
27299 s,@CPP@,$CPP,;t t
27300 s,@LDCONFIG@,$LDCONFIG,;t t
27301 s,@CXX@,$CXX,;t t
27302 s,@CXXFLAGS@,$CXXFLAGS,;t t
27303 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
27304 s,@AWK@,$AWK,;t t
27305 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
27306 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
27307 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
27308 s,@LINT@,$LINT,;t t
27309 s,@LINT_OPTS@,$LINT_OPTS,;t t
27310 s,@LN_S@,$LN_S,;t t
27311 s,@cf_config_suffix@,$cf_config_suffix,;t t
27312 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
27313 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
27314 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
27315 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
27316 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
27317 s,@SET_MAKE@,$SET_MAKE,;t t
27318 s,@CTAGS@,$CTAGS,;t t
27319 s,@ETAGS@,$ETAGS,;t t
27320 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
27321 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
27322 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
27323 s,@RANLIB@,$RANLIB,;t t
27324 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
27325 s,@LD@,$LD,;t t
27326 s,@ac_ct_LD@,$ac_ct_LD,;t t
27327 s,@AR@,$AR,;t t
27328 s,@ac_ct_AR@,$ac_ct_AR,;t t
27329 s,@NM@,$NM,;t t
27330 s,@ac_ct_NM@,$ac_ct_NM,;t t
27331 s,@ARFLAGS@,$ARFLAGS,;t t
27332 s,@DESTDIR@,$DESTDIR,;t t
27333 s,@BUILD_CC@,$BUILD_CC,;t t
27334 s,@BUILD_CPP@,$BUILD_CPP,;t t
27335 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
27336 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
27337 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
27338 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
27339 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
27340 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
27341 s,@cf_list_models@,$cf_list_models,;t t
27342 s,@ABI_VERSION@,$ABI_VERSION,;t t
27343 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
27344 s,@LIBTOOL@,$LIBTOOL,;t t
27345 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
27346 s,@LT_UNDEF@,$LT_UNDEF,;t t
27347 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
27348 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
27349 s,@LIB_CREATE@,$LIB_CREATE,;t t
27350 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
27351 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
27352 s,@LIB_PREP@,$LIB_PREP,;t t
27353 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
27354 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
27355 s,@LIB_LINK@,$LIB_LINK,;t t
27356 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
27357 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
27358 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
27359 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
27360 s,@TICS_NAME@,$TICS_NAME,;t t
27361 s,@TINFO_NAME@,$TINFO_NAME,;t t
27362 s,@LIB_NAME@,$LIB_NAME,;t t
27363 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
27364 s,@CC_G_OPT@,$CC_G_OPT,;t t
27365 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
27366 s,@LD_MODEL@,$LD_MODEL,;t t
27367 s,@shlibdir@,$shlibdir,;t t
27368 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
27369 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
27370 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
27371 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
27372 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
27373 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
27374 s,@LINK_PROGS@,$LINK_PROGS,;t t
27375 s,@LINK_TESTS@,$LINK_TESTS,;t t
27376 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
27377 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
27378 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
27379 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
27380 s,@RPATH_LIST@,$RPATH_LIST,;t t
27381 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
27382 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
27383 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
27384 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
27385 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
27386 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
27387 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
27388 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
27389 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
27390 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
27391 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
27392 s,@TIC@,$TIC,;t t
27393 s,@INFOCMP@,$INFOCMP,;t t
27394 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
27395 s,@XTERM_KBS@,$XTERM_KBS,;t t
27396 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
27397 s,@TERMINFO@,$TERMINFO,;t t
27398 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
27399 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
27400 s,@TERMPATH@,$TERMPATH,;t t
27401 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
27402 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
27403 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
27404 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
27405 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
27406 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
27407 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
27408 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
27409 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
27410 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
27411 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
27412 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
27413 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
27414 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
27415 s,@RGB_PATH@,$RGB_PATH,;t t
27416 s,@no_x11_rgb@,$no_x11_rgb,;t t
27417 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
27418 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
27419 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
27420 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
27421 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
27422 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
27423 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
27424 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
27425 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
27426 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
27427 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
27428 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
27429 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
27430 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
27431 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
27432 s,@PTHREAD@,$PTHREAD,;t t
27433 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
27434 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
27435 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
27436 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
27437 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
27438 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
27439 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
27440 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
27441 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
27442 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
27443 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
27444 s,@ECHO_LT@,$ECHO_LT,;t t
27445 s,@ECHO_LD@,$ECHO_LD,;t t
27446 s,@RULE_CC@,$RULE_CC,;t t
27447 s,@SHOW_CC@,$SHOW_CC,;t t
27448 s,@ECHO_CC@,$ECHO_CC,;t t
27449 s,@ECHO_LINK@,$ECHO_LINK,;t t
27450 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
27451 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
27452 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
27453 s,@ADAFLAGS@,$ADAFLAGS,;t t
27454 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
27455 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
27456 s,@ADA_TRACE@,$ADA_TRACE,;t t
27457 s,@MATH_LIB@,$MATH_LIB,;t t
27458 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
27459 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
27460 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
27461 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
27462 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
27463 s,@TEST_LIBS@,$TEST_LIBS,;t t
27464 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
27465 s,@CXXCPP@,$CXXCPP,;t t
27466 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
27467 s,@CXX_AR@,$CXX_AR,;t t
27468 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
27469 s,@CXXLIBS@,$CXXLIBS,;t t
27470 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
27471 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
27472 s,@M4_exists@,$M4_exists,;t t
27473 s,@cf_ada_make@,$cf_ada_make,;t t
27474 s,@cf_ada_config@,$cf_ada_config,;t t
27475 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
27476 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
27477 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
27478 s,@cf_compile_generics@,$cf_compile_generics,;t t
27479 s,@cf_generic_objects@,$cf_generic_objects,;t t
27480 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
27481 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
27482 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
27483 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
27484 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
27485 s,@cf_ada_package@,$cf_ada_package,;t t
27486 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
27487 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
27488 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
27489 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
27490 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
27491 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
27492 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
27493 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
27494 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
27495 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
27496 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
27497 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
27498 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
27499 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
27500 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
27501 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
27502 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
27503 s,@TICS_LIBS@,$TICS_LIBS,;t t
27504 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
27505 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
27506 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
27507 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
27508 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
27509 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
27510 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
27511 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
27512 s,@includesubdir@,$includesubdir,;t t
27513 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
27514 s,@TICS_LIST@,$TICS_LIST,;t t
27515 s,@TINFO_LIST@,$TINFO_LIST,;t t
27516 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
27517 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
27518 s,@FORM_NAME@,$FORM_NAME,;t t
27519 s,@MENU_NAME@,$MENU_NAME,;t t
27520 s,@PANEL_NAME@,$PANEL_NAME,;t t
27521 s,@CXX_NAME@,$CXX_NAME,;t t
27522 s,@TEST_ARGS@,$TEST_ARGS,;t t
27523 s,@TEST_DEPS@,$TEST_DEPS,;t t
27524 s,@TEST_ARG2@,$TEST_ARG2,;t t
27525 s,@TEST_DEP2@,$TEST_DEP2,;t t
27526 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
27527 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
27528 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
27529 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
27530 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
27531 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
27532 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
27533 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
27534 s,@cross_compiling@,$cross_compiling,;t t
27535 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
27536 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
27537 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
27538 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
27539 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
27540 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
27541 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
27542 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
27543 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
27544 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
27545 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
27546 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
27547 CEOF
27548
27549 EOF
27550
27551   cat >>$CONFIG_STATUS <<\EOF
27552   # Split the substitutions into bite-sized pieces for seds with
27553   # small command number limits, like on Digital OSF/1 and HP-UX.
27554   ac_max_sed_lines=48
27555   ac_sed_frag=1 # Number of current file.
27556   ac_beg=1 # First line for current file.
27557   ac_end=$ac_max_sed_lines # Line after last line for current file.
27558   ac_more_lines=:
27559   ac_sed_cmds=
27560   while $ac_more_lines; do
27561     if test $ac_beg -gt 1; then
27562       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27563     else
27564       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
27565     fi
27566     if test ! -s $tmp/subs.frag; then
27567       ac_more_lines=false
27568     else
27569       # The purpose of the label and of the branching condition is to
27570       # speed up the sed processing (if there are no `@' at all, there
27571       # is no need to browse any of the substitutions).
27572       # These are the two extra sed commands mentioned above.
27573       (echo ':t
27574   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
27575       # It is possible to make a multiline substitution using escaped newlines.
27576       # Ensure that we do not split the substitution between script fragments.
27577       ac_BEG=$ac_end
27578       ac_END=`expr $ac_end + $ac_max_sed_lines`
27579       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
27580       if test -s $tmp/subs.next; then
27581         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
27582         if test ! -s $tmp/subs.edit; then
27583           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
27584           if test ! -s $tmp/subs.edit; then
27585             if test $ac_beg -gt 1; then
27586               ac_end=`expr $ac_end - 1`
27587               continue
27588             fi
27589           fi
27590         fi
27591       fi
27592
27593       if test -z "$ac_sed_cmds"; then
27594         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
27595       else
27596         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
27597       fi
27598       ac_sed_frag=`expr $ac_sed_frag + 1`
27599       ac_beg=$ac_end
27600       ac_end=`expr $ac_end + $ac_max_sed_lines`
27601     fi
27602   done
27603   if test -z "$ac_sed_cmds"; then
27604     ac_sed_cmds=cat
27605   fi
27606 fi # test -n "$CONFIG_FILES"
27607
27608 EOF
27609 cat >>$CONFIG_STATUS <<\EOF
27610 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
27611   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27612   case $ac_file in
27613   - | *:- | *:-:* ) # input from stdin
27614         cat >$tmp/stdin
27615         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27616         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27617   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27618         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27619   * )   ac_file_in=$ac_file.in ;;
27620   esac
27621
27622   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
27623   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27624          X"$ac_file" : 'X\(//\)[^/]' \| \
27625          X"$ac_file" : 'X\(//\)$' \| \
27626          X"$ac_file" : 'X\(/\)' \| \
27627          .     : '\(.\)' 2>/dev/null ||
27628 echo X"$ac_file" |
27629     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27630           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27631           /^X\(\/\/\)$/{ s//\1/; q; }
27632           /^X\(\/\).*/{ s//\1/; q; }
27633           s/.*/./; q'`
27634   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27635     { case "$ac_dir" in
27636   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27637   *)                      as_incr_dir=.;;
27638 esac
27639 as_dummy="$ac_dir"
27640 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27641   case $as_mkdir_dir in
27642     # Skip DOS drivespec
27643     ?:) as_incr_dir=$as_mkdir_dir ;;
27644     *)
27645       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27646       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27647     ;;
27648   esac
27649 done; }
27650
27651     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
27652     # A "../" for each directory in $ac_dir_suffix.
27653     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
27654   else
27655     ac_dir_suffix= ac_dots=
27656   fi
27657
27658   case $srcdir in
27659   .)  ac_srcdir=.
27660       if test -z "$ac_dots"; then
27661          ac_top_srcdir=.
27662       else
27663          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
27664       fi ;;
27665   [\\/]* | ?:[\\/]* )
27666       ac_srcdir=$srcdir$ac_dir_suffix;
27667       ac_top_srcdir=$srcdir ;;
27668   *) # Relative path.
27669     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
27670     ac_top_srcdir=$ac_dots$srcdir ;;
27671   esac
27672
27673   case $INSTALL in
27674   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
27675   *) ac_INSTALL=$ac_dots$INSTALL ;;
27676   esac
27677
27678   if test x"$ac_file" != x-; then
27679     { echo "$as_me:27679: creating $ac_file" >&5
27680 echo "$as_me: creating $ac_file" >&6;}
27681     rm -f "$ac_file"
27682   fi
27683   # Let's still pretend it is `configure' which instantiates (i.e., don't
27684   # use $as_me), people would be surprised to read:
27685   #    /* config.h.  Generated automatically by config.status.  */
27686   configure_input="Generated automatically from `echo $ac_file_in |
27687                                                  sed 's,.*/,,'` by configure."
27688
27689   # First look for the input files in the build tree, otherwise in the
27690   # src tree.
27691   ac_file_inputs=`IFS=:
27692     for f in $ac_file_in; do
27693       case $f in
27694       -) echo $tmp/stdin ;;
27695       [\\/$]*)
27696          # Absolute (can't be DOS-style, as IFS=:)
27697          test -f "$f" || { { echo "$as_me:27697: error: cannot find input file: $f" >&5
27698 echo "$as_me: error: cannot find input file: $f" >&2;}
27699    { (exit 1); exit 1; }; }
27700          echo $f;;
27701       *) # Relative
27702          if test -f "$f"; then
27703            # Build tree
27704            echo $f
27705          elif test -f "$srcdir/$f"; then
27706            # Source tree
27707            echo $srcdir/$f
27708          else
27709            # /dev/null tree
27710            { { echo "$as_me:27710: error: cannot find input file: $f" >&5
27711 echo "$as_me: error: cannot find input file: $f" >&2;}
27712    { (exit 1); exit 1; }; }
27713          fi;;
27714       esac
27715     done` || { (exit 1); exit 1; }
27716 EOF
27717 cat >>$CONFIG_STATUS <<\EOF
27718   ac_warn_datarootdir=no
27719   if test x"$ac_file" != x-; then
27720     for ac_item in $ac_file_inputs
27721     do
27722       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
27723       if test -n "$ac_seen"; then
27724         ac_used=`grep '@datarootdir@' $ac_item`
27725         if test -z "$ac_used"; then
27726           { echo "$as_me:27726: WARNING: datarootdir was used implicitly but not set:
27727 $ac_seen" >&5
27728 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
27729 $ac_seen" >&2;}
27730           ac_warn_datarootdir=yes
27731         fi
27732       fi
27733       ac_seen=`grep '${datarootdir}' $ac_item`
27734       if test -n "$ac_seen"; then
27735         { echo "$as_me:27735: WARNING: datarootdir was used explicitly but not set:
27736 $ac_seen" >&5
27737 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
27738 $ac_seen" >&2;}
27739         ac_warn_datarootdir=yes
27740       fi
27741     done
27742   fi
27743
27744 if test "x$ac_warn_datarootdir" = xyes; then
27745   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
27746 fi
27747
27748 EOF
27749 cat >>$CONFIG_STATUS <<EOF
27750   sed "$ac_vpsub
27751 $extrasub
27752 EOF
27753 cat >>$CONFIG_STATUS <<\EOF
27754 :t
27755 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
27756 s,@configure_input@,$configure_input,;t t
27757 s,@srcdir@,$ac_srcdir,;t t
27758 s,@top_srcdir@,$ac_top_srcdir,;t t
27759 s,@INSTALL@,$ac_INSTALL,;t t
27760 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
27761   rm -f $tmp/stdin
27762   if test x"$ac_file" != x-; then
27763     cp $tmp/out $ac_file
27764
27765     for ac_name in prefix exec_prefix datarootdir
27766     do
27767         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
27768         if test -n "$ac_seen"; then
27769             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
27770             if test -z "$ac_init"; then
27771               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
27772               { echo "$as_me:27772: WARNING: Variable $ac_name is used but was not set:
27773 $ac_seen" >&5
27774 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
27775 $ac_seen" >&2;}
27776             fi
27777         fi
27778     done
27779     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
27780     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
27781     if test -s $tmp/out; then
27782       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
27783       { echo "$as_me:27783: WARNING: Some variables may not be substituted:
27784 $ac_seen" >&5
27785 echo "$as_me: WARNING: Some variables may not be substituted:
27786 $ac_seen" >&2;}
27787     fi
27788   else
27789     cat $tmp/out
27790   fi
27791   rm -f $tmp/out
27792
27793 done
27794 EOF
27795 cat >>$CONFIG_STATUS <<\EOF
27796
27797 #
27798 # CONFIG_HEADER section.
27799 #
27800
27801 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
27802 # NAME is the cpp macro being defined and VALUE is the value it is being given.
27803 #
27804 # ac_d sets the value in "#define NAME VALUE" lines.
27805 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
27806 ac_dB='[        ].*$,\1#\2'
27807 ac_dC=' '
27808 ac_dD=',;t'
27809 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
27810 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27811 ac_iB='\([      ]\),\1#\2define\3'
27812 ac_iC=' '
27813 ac_iD='\4,;t'
27814 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
27815 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
27816 ac_uB='$,\1#\2define\3'
27817 ac_uC=' '
27818 ac_uD=',;t'
27819
27820 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
27821   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
27822   case $ac_file in
27823   - | *:- | *:-:* ) # input from stdin
27824         cat >$tmp/stdin
27825         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27826         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27827   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
27828         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
27829   * )   ac_file_in=$ac_file.in ;;
27830   esac
27831
27832   test x"$ac_file" != x- && { echo "$as_me:27832: creating $ac_file" >&5
27833 echo "$as_me: creating $ac_file" >&6;}
27834
27835   # First look for the input files in the build tree, otherwise in the
27836   # src tree.
27837   ac_file_inputs=`IFS=:
27838     for f in $ac_file_in; do
27839       case $f in
27840       -) echo $tmp/stdin ;;
27841       [\\/$]*)
27842          # Absolute (can't be DOS-style, as IFS=:)
27843          test -f "$f" || { { echo "$as_me:27843: error: cannot find input file: $f" >&5
27844 echo "$as_me: error: cannot find input file: $f" >&2;}
27845    { (exit 1); exit 1; }; }
27846          echo $f;;
27847       *) # Relative
27848          if test -f "$f"; then
27849            # Build tree
27850            echo $f
27851          elif test -f "$srcdir/$f"; then
27852            # Source tree
27853            echo $srcdir/$f
27854          else
27855            # /dev/null tree
27856            { { echo "$as_me:27856: error: cannot find input file: $f" >&5
27857 echo "$as_me: error: cannot find input file: $f" >&2;}
27858    { (exit 1); exit 1; }; }
27859          fi;;
27860       esac
27861     done` || { (exit 1); exit 1; }
27862   # Remove the trailing spaces.
27863   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
27864
27865 EOF
27866
27867 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
27868 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
27869 # be either 'cat' or 'sort'.
27870 cat confdefs.h | uniq >conftest.vals
27871
27872 # Break up conftest.vals because some shells have a limit on
27873 # the size of here documents, and old seds have small limits too.
27874
27875 rm -f conftest.tail
27876 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
27877 while grep . conftest.vals >/dev/null
27878 do
27879   # Write chunks of a limited-size here document to conftest.frag.
27880   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
27881   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
27882   echo 'CEOF' >> $CONFIG_STATUS
27883   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
27884   rm -f conftest.vals
27885   mv conftest.tail conftest.vals
27886 done
27887 rm -f conftest.vals
27888
27889 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
27890 # marker @DEFS@.
27891 echo '  cat >> conftest.edit <<CEOF
27892 /@DEFS@/r conftest.frag
27893 /@DEFS@/d
27894 CEOF
27895 sed -f conftest.edit $tmp/in > $tmp/out
27896 rm -f $tmp/in
27897 mv $tmp/out $tmp/in
27898 rm -f conftest.edit conftest.frag
27899 ' >> $CONFIG_STATUS
27900
27901 cat >>$CONFIG_STATUS <<\EOF
27902   # Let's still pretend it is `configure' which instantiates (i.e., don't
27903   # use $as_me), people would be surprised to read:
27904   #    /* config.h.  Generated automatically by config.status.  */
27905   if test x"$ac_file" = x-; then
27906     echo "/* Generated automatically by configure.  */" >$tmp/config.h
27907   else
27908     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
27909   fi
27910   cat $tmp/in >>$tmp/config.h
27911   rm -f $tmp/in
27912   if test x"$ac_file" != x-; then
27913     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
27914       { echo "$as_me:27914: $ac_file is unchanged" >&5
27915 echo "$as_me: $ac_file is unchanged" >&6;}
27916     else
27917       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
27918          X"$ac_file" : 'X\(//\)[^/]' \| \
27919          X"$ac_file" : 'X\(//\)$' \| \
27920          X"$ac_file" : 'X\(/\)' \| \
27921          .     : '\(.\)' 2>/dev/null ||
27922 echo X"$ac_file" |
27923     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
27924           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
27925           /^X\(\/\/\)$/{ s//\1/; q; }
27926           /^X\(\/\).*/{ s//\1/; q; }
27927           s/.*/./; q'`
27928       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
27929         { case "$ac_dir" in
27930   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
27931   *)                      as_incr_dir=.;;
27932 esac
27933 as_dummy="$ac_dir"
27934 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
27935   case $as_mkdir_dir in
27936     # Skip DOS drivespec
27937     ?:) as_incr_dir=$as_mkdir_dir ;;
27938     *)
27939       as_incr_dir=$as_incr_dir/$as_mkdir_dir
27940       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
27941     ;;
27942   esac
27943 done; }
27944
27945       fi
27946       rm -f $ac_file
27947       mv $tmp/config.h $ac_file
27948     fi
27949   else
27950     cat $tmp/config.h
27951     rm -f $tmp/config.h
27952   fi
27953 done
27954 EOF
27955 cat >>$CONFIG_STATUS <<\EOF
27956 #
27957 # CONFIG_COMMANDS section.
27958 #
27959 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
27960   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
27961   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
27962
27963   case $ac_dest in
27964     default )
27965 if test "x$cf_with_tests" != xno ; then
27966
27967 for cf_dir in test
27968 do
27969         if test ! -d $srcdir/$cf_dir; then
27970                 continue
27971         elif test -f $srcdir/$cf_dir/programs; then
27972                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
27973         fi
27974 done
27975
27976 fi
27977
27978 cf_prefix=$LIB_PREFIX
27979
27980 case $cf_cv_shlib_version in
27981 (cygdll|msysdll|mingw|msvcdll)
27982         TINFO_NAME=$TINFO_ARG_SUFFIX
27983         TINFO_SUFFIX=.dll
27984         ;;
27985 esac
27986
27987 if test -n "$TINFO_SUFFIX" ; then
27988         case $TINFO_SUFFIX in
27989         (tw*)
27990                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
27991                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
27992                 ;;
27993         (t*)
27994                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
27995                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
27996                 ;;
27997         (w*)
27998                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
27999                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
28000                 ;;
28001         esac
28002 fi
28003
28004 for cf_dir in $SRC_SUBDIRS
28005 do
28006         if test ! -d $srcdir/$cf_dir ; then
28007                 continue
28008         elif test -f $srcdir/$cf_dir/modules; then
28009
28010                 SHARED_LIB=
28011                 Libs_To_Make=
28012                 cf_awk_program=
28013                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
28014                 then
28015                         cf_awk_program="$cf_awk_program\
28016 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
28017 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
28018 "
28019                 fi
28020
28021                 if test "x$WILDCARD_SYMS" = xno
28022                 then
28023                         cf_awk_program="$cf_awk_program\
28024 /[      ]_\\*;/ { skip=1; next; }\
28025 "
28026                 fi
28027
28028                 if test "x$cf_awk_program" != "x"
28029                 then
28030                         cat >>$cf_dir/Makefile <<CF_EOF
28031
28032 # Generated by CF_LIB_RULES
28033 resulting.map: $UNALTERED_SYMS
28034         $AWK 'BEGIN { skip = 1; last=""; } \
28035 $cf_awk_program \
28036 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
28037  skip = 0; last = \$\$0; } \
28038 END { print last; }' < $UNALTERED_SYMS >\$@
28039
28040 distclean::
28041         rm -f resulting.map
28042 CF_EOF
28043                 fi
28044
28045                 for cf_item in $cf_LIST_MODELS
28046                 do
28047
28048         case X$cf_item in
28049         (Xlibtool)
28050                 cf_suffix='.la'
28051                 cf_depsuf=$cf_suffix
28052                 ;;
28053         (Xdebug)
28054                 case $cf_cv_system_name in
28055                 (*-msvc*)
28056                         cf_suffix='_g.lib'
28057                         ;;
28058                 (*)
28059                         cf_suffix='_g.a'
28060                         ;;
28061                 esac
28062                 cf_depsuf=$cf_suffix
28063                 ;;
28064         (Xprofile)
28065                 case $cf_cv_system_name in
28066                 (*-msvc*)
28067                         cf_suffix='_p.lib'
28068                         ;;
28069                 (*)
28070                         cf_suffix='_p.a'
28071                         ;;
28072                 esac
28073                 cf_depsuf=$cf_suffix
28074                 ;;
28075         (Xshared)
28076                 case $cf_cv_system_name in
28077                 (aix[5-7]*)
28078                         cf_suffix='.so'
28079                         cf_depsuf=$cf_suffix
28080                         ;;
28081                 (*-msvc*)
28082                         cf_suffix='.dll'
28083                         cf_depsuf='.dll.lib'
28084                         ;;
28085                 (cygwin*|msys*|mingw*)
28086                         cf_suffix='.dll'
28087                         cf_depsuf='.dll.a'
28088                         ;;
28089                 (darwin*)
28090                         cf_suffix='.dylib'
28091                         cf_depsuf=$cf_suffix
28092                         ;;
28093                 (hpux*)
28094                         case $target in
28095                         (ia64*)
28096                                 cf_suffix='.so'
28097                                 cf_depsuf=$cf_suffix
28098                                 ;;
28099                         (*)
28100                                 cf_suffix='.sl'
28101                                 cf_depsuf=$cf_suffix
28102                                 ;;
28103                         esac
28104                         ;;
28105                 (*)
28106                         cf_suffix='.so'
28107                         cf_depsuf=$cf_suffix
28108                         ;;
28109                 esac
28110                 ;;
28111         (*)
28112                 case $target in
28113                 (*-msvc*)
28114                         cf_suffix='.lib'
28115                         ;;
28116                 (*)
28117                         cf_suffix='.a'
28118                         ;;
28119                 esac
28120                 cf_depsuf=$cf_suffix
28121                 ;;
28122         esac
28123         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28124         then
28125                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28126                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28127         fi
28128
28129                         if test "$cf_dir" = "c++"
28130                         then
28131
28132 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28133
28134 eval cf_libname=\$${cf_map_lib_basename}_NAME
28135
28136                         else
28137
28138 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28139
28140 eval cf_libname=\$${cf_map_lib_basename}_NAME
28141
28142                         fi
28143                         test -z "$cf_libname" && cf_libname="$cf_dir"
28144                         if test $cf_item = shared ; then
28145                                 if test -n "${LIB_SUFFIX}"
28146                                 then
28147                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28148                                 else
28149                                         cf_shared_suffix="$cf_suffix"
28150                                 fi
28151                                 if test "$cf_cv_do_symlinks" = yes ; then
28152                                         cf_version_name=
28153
28154                                         case "$cf_cv_shlib_version" in
28155                                         (rel)
28156                                                 cf_version_name=REL_VERSION
28157                                                 ;;
28158                                         (abi)
28159                                                 cf_version_name=ABI_VERSION
28160                                                 ;;
28161                                         esac
28162
28163                                         if test -n "$cf_version_name"
28164                                         then
28165                                                 case "$cf_cv_system_name" in
28166                                                 (darwin*)
28167                                                         # "w", etc?
28168                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
28169                                                         ;;
28170                                                 (*)
28171                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
28172                                                         ;;
28173                                                 esac
28174                                         fi
28175                                         if test -n "${USE_LIB_SUFFIX}"
28176                                         then
28177                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
28178                                         else
28179                                                 cf_shared_suffix="$cf_suffix"
28180                                         fi
28181                                 fi
28182                                 # cygwin needs import library, and has unique naming convention
28183                                 # use autodetected ${cf_prefix} for import lib and static lib, but
28184                                 # use 'cyg' prefix for shared lib.
28185                                 case $cf_cv_shlib_version in
28186                                 (cygdll)
28187                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28188                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
28189                                         ;;
28190                                 (msysdll)
28191                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28192                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
28193                                         ;;
28194                                 (mingw)
28195                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28196                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
28197                                         ;;
28198                                 (msvcdll)
28199                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
28200                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
28201                                         ;;
28202                                 (*)
28203                                         cf_add_lib=
28204                                         ;;
28205                                 esac
28206                                 if test -n "$cf_add_lib"
28207                                 then
28208                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28209                                         continue
28210                                 fi
28211                         fi
28212                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
28213                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
28214                 done
28215
28216                 if test $cf_dir = ncurses ; then
28217                         cf_subsets="$LIB_SUBSETS"
28218                         cf_r_parts="$cf_subsets"
28219                         cf_liblist="$Libs_To_Make"
28220
28221                         while test -n "$cf_r_parts"
28222                         do
28223                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
28224                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
28225                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
28226                                         cf_add_lib=
28227                                         case $cf_l_parts in
28228                                         (*termlib*)
28229                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
28230                                                 ;;
28231                                         (*ticlib*)
28232                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
28233                                                 ;;
28234                                         (*)
28235                                                 break
28236                                                 ;;
28237                                         esac
28238                                         if test -n "$cf_add_lib"; then
28239                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
28240                                         fi
28241                                 else
28242                                         break
28243                                 fi
28244                         done
28245                 else
28246                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
28247                 fi
28248
28249                 if test $cf_dir = c++; then
28250                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
28251                                 cf_list=
28252                                 for cf_item in $Libs_To_Make
28253                                 do
28254                                         case $cf_item in
28255                                         (*.a)
28256                                                 ;;
28257                                         (*)
28258                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
28259                                                 ;;
28260                                         esac
28261                                         for cf_test in $cf_list
28262                                         do
28263                                                 if test "$cf_test" = "$cf_item"
28264                                                 then
28265                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
28266                                                         cf_item=
28267                                                         break
28268                                                 fi
28269                                         done
28270                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
28271                                 done
28272                                 Libs_To_Make="$cf_list"
28273                         fi
28274                 fi
28275
28276                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
28277                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
28278                         $cf_dir/Makefile >$cf_dir/Makefile.out
28279                 mv $cf_dir/Makefile.out $cf_dir/Makefile
28280
28281                 $AWK -f $srcdir/mk-0th.awk \
28282                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
28283                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28284
28285                 for cf_subset in $cf_subsets
28286                 do
28287                         cf_subdirs=
28288                         for cf_item in $cf_LIST_MODELS
28289                         do
28290
28291                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
28292
28293 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28294
28295                         CXX_MODEL=$cf_ITEM
28296                         if test "$CXX_MODEL" = SHARED; then
28297                                 case $cf_cv_shlib_version in
28298                                 (cygdll|msysdll|mingw|msvcdll)
28299                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
28300
28301 echo "${as_me:-configure}:28301: testing overriding CXX_MODEL to SHARED ..." 1>&5
28302
28303                                         with_shared_cxx=yes
28304                                         ;;
28305                                 (*)
28306                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
28307                                         ;;
28308                                 esac
28309                         fi
28310
28311         case X$cf_item in
28312         (Xlibtool)
28313                 cf_suffix='.la'
28314                 cf_depsuf=$cf_suffix
28315                 ;;
28316         (Xdebug)
28317                 case $cf_cv_system_name in
28318                 (*-msvc*)
28319                         cf_suffix='_g.lib'
28320                         ;;
28321                 (*)
28322                         cf_suffix='_g.a'
28323                         ;;
28324                 esac
28325                 cf_depsuf=$cf_suffix
28326                 ;;
28327         (Xprofile)
28328                 case $cf_cv_system_name in
28329                 (*-msvc*)
28330                         cf_suffix='_p.lib'
28331                         ;;
28332                 (*)
28333                         cf_suffix='_p.a'
28334                         ;;
28335                 esac
28336                 cf_depsuf=$cf_suffix
28337                 ;;
28338         (Xshared)
28339                 case $cf_cv_system_name in
28340                 (aix[5-7]*)
28341                         cf_suffix='.so'
28342                         cf_depsuf=$cf_suffix
28343                         ;;
28344                 (*-msvc*)
28345                         cf_suffix='.dll'
28346                         cf_depsuf='.dll.lib'
28347                         ;;
28348                 (cygwin*|msys*|mingw*)
28349                         cf_suffix='.dll'
28350                         cf_depsuf='.dll.a'
28351                         ;;
28352                 (darwin*)
28353                         cf_suffix='.dylib'
28354                         cf_depsuf=$cf_suffix
28355                         ;;
28356                 (hpux*)
28357                         case $target in
28358                         (ia64*)
28359                                 cf_suffix='.so'
28360                                 cf_depsuf=$cf_suffix
28361                                 ;;
28362                         (*)
28363                                 cf_suffix='.sl'
28364                                 cf_depsuf=$cf_suffix
28365                                 ;;
28366                         esac
28367                         ;;
28368                 (*)
28369                         cf_suffix='.so'
28370                         cf_depsuf=$cf_suffix
28371                         ;;
28372                 esac
28373                 ;;
28374         (*)
28375                 case $target in
28376                 (*-msvc*)
28377                         cf_suffix='.lib'
28378                         ;;
28379                 (*)
28380                         cf_suffix='.a'
28381                         ;;
28382                 esac
28383                 cf_depsuf=$cf_suffix
28384                 ;;
28385         esac
28386         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28387         then
28388                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
28389                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
28390         fi
28391
28392         case $cf_item in
28393         (libtool) cf_subdir='obj_lo'  ;;
28394         (normal)  cf_subdir='objects' ;;
28395         (debug)   cf_subdir='obj_g' ;;
28396         (profile) cf_subdir='obj_p' ;;
28397         (shared)
28398                 case $cf_cv_system_name in
28399                 (cygwin|msys)
28400                         cf_subdir='objects' ;;
28401                 (*)
28402                         cf_subdir='obj_s' ;;
28403                 esac
28404         esac
28405
28406                         # Test for case where we build libtinfo with a different name.
28407                         cf_libname=$cf_dir
28408                         if test $cf_dir = ncurses ; then
28409                                 case $cf_subset in
28410                                 (*base*)
28411                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
28412                                         ;;
28413                                 (*termlib*)
28414                                         cf_libname=$TINFO_LIB_SUFFIX
28415                                         ;;
28416                                 (ticlib*)
28417                                         cf_libname=$TICS_LIB_SUFFIX
28418                                         ;;
28419                                 esac
28420                         elif test $cf_dir = c++ ; then
28421
28422 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28423
28424 eval cf_libname=\$${cf_map_lib_basename}_NAME
28425
28426                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28427                         else
28428
28429 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28430
28431 eval cf_libname=\$${cf_map_lib_basename}_NAME
28432
28433                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
28434                         fi
28435                         if test -n "${USE_ARG_SUFFIX}" ; then
28436                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
28437                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
28438                         fi
28439
28440                         # These dependencies really are for development, not
28441                         # builds, but they are useful in porting, too.
28442                         cf_depend="../include/ncurses_cfg.h"
28443                         if test "$srcdir" = "."; then
28444                                 cf_reldir="."
28445                         else
28446                                 cf_reldir="\${srcdir}"
28447                         fi
28448
28449                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
28450                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
28451                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
28452                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
28453                         fi
28454
28455                         cf_dir_suffix=
28456                         old_cf_suffix="$cf_suffix"
28457                         if test "$cf_cv_shlib_version_infix" = yes ; then
28458                         if test -n "$USE_LIB_SUFFIX" ; then
28459                                 case $USE_LIB_SUFFIX in
28460                                 (tw*)
28461                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
28462                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
28463                                         cf_dir_suffix=tw$EXTRA_SUFFIX
28464                                         ;;
28465                                 (t*)
28466                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
28467                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
28468                                         cf_dir_suffix=t$EXTRA_SUFFIX
28469                                         ;;
28470                                 (w*)
28471                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
28472                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
28473                                         cf_dir_suffix=w$EXTRA_SUFFIX
28474                                         ;;
28475                                 (*)
28476                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
28477                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
28478                                         cf_dir_suffix=$EXTRA_SUFFIX
28479                                         ;;
28480                                 esac
28481                         fi
28482                         fi
28483
28484                         $AWK -f $srcdir/mk-1st.awk \
28485                                 name=${cf_libname}${cf_dir_suffix} \
28486                                 traces=$LIB_TRACING \
28487                                 MODEL=$cf_ITEM \
28488                                 CXX_MODEL=$CXX_MODEL \
28489                                 model=$cf_subdir \
28490                                 prefix=$cf_prefix \
28491                                 suffix=$cf_suffix \
28492                                 subset=$cf_subset \
28493                                 driver=$cf_cv_term_driver \
28494                                 SymLink="$LN_S" \
28495                                 TermlibRoot=$TINFO_NAME \
28496                                 TermlibSuffix=$TINFO_SUFFIX \
28497                                 ShlibVer=$cf_cv_shlib_version \
28498                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
28499                                 ReLink=${cf_cv_do_relink:-no} \
28500                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
28501                                 DoLinks=$cf_cv_do_symlinks \
28502                                 rmSoLocs=$cf_cv_rm_so_locs \
28503                                 ldconfig="$LDCONFIG" \
28504                                 overwrite=$WITH_OVERWRITE \
28505                                 depend="$cf_depend" \
28506                                 host="$host" \
28507                                 libtool_version="$LIBTOOL_VERSION" \
28508                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28509
28510                         cf_suffix="$old_cf_suffix"
28511
28512                         for cf_subdir2 in $cf_subdirs lib
28513                         do
28514                                 test $cf_subdir = $cf_subdir2 && break
28515                         done
28516                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
28517                         $AWK -f $srcdir/mk-2nd.awk \
28518                                 name=$cf_dir \
28519                                 traces=$LIB_TRACING \
28520                                 MODEL=$cf_ITEM \
28521                                 model=$cf_subdir \
28522                                 subset=$cf_subset \
28523                                 srcdir=$srcdir \
28524                                 echo=$WITH_ECHO \
28525                                 crenames=$cf_cv_prog_CC_c_o \
28526                                 cxxrenames=$cf_cv_prog_CXX_c_o \
28527                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
28528                         cf_subdirs="$cf_subdirs $cf_subdir"
28529                         done
28530                 done
28531         fi
28532
28533         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
28534 done
28535
28536 for cf_dir in $SRC_SUBDIRS
28537 do
28538         if test ! -d $srcdir/$cf_dir ; then
28539                 continue
28540         fi
28541
28542         if test -f $cf_dir/Makefile ; then
28543                 case "$cf_dir" in
28544                 (Ada95)
28545                         echo 'libs \' >> Makefile
28546                         echo 'install.libs \' >> Makefile
28547                         echo 'uninstall.libs ::' >> Makefile
28548                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
28549                         ;;
28550                 esac
28551         fi
28552
28553         if test -f $srcdir/$cf_dir/modules; then
28554                 echo >> Makefile
28555                 if test -f $srcdir/$cf_dir/headers; then
28556 cat >> Makefile <<CF_EOF
28557 install.includes \\
28558 uninstall.includes \\
28559 CF_EOF
28560                 fi
28561 if test "$cf_dir" != "c++" ; then
28562 echo 'lint \' >> Makefile
28563 fi
28564 cat >> Makefile <<CF_EOF
28565 libs \\
28566 lintlib \\
28567 install.libs \\
28568 uninstall.libs \\
28569 install.$cf_dir \\
28570 uninstall.$cf_dir ::
28571         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28572 CF_EOF
28573         elif test -f $srcdir/$cf_dir/headers; then
28574 cat >> Makefile <<CF_EOF
28575
28576 libs \\
28577 install.libs \\
28578 uninstall.libs \\
28579 install.includes \\
28580 uninstall.includes ::
28581         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
28582 CF_EOF
28583 fi
28584 done
28585
28586 if test "x$cf_with_db_install" = xyes; then
28587 cat >> Makefile <<CF_EOF
28588
28589 install.libs uninstall.libs \\
28590 install.data uninstall.data ::
28591 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28592 CF_EOF
28593 else
28594 cat >> Makefile <<CF_EOF
28595
28596 install.libs uninstall.libs ::
28597         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
28598 CF_EOF
28599 fi
28600
28601 if test "x$cf_with_manpages" = xyes; then
28602 cat >> Makefile <<CF_EOF
28603
28604 install.man \\
28605 uninstall.man ::
28606         cd man && \${MAKE} \${TOP_MFLAGS} \$@
28607 CF_EOF
28608 fi
28609
28610 cat >> Makefile <<CF_EOF
28611
28612 distclean ::
28613         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
28614         rm -f headers.sh headers.sed mk_shared_lib.sh
28615         rm -f edit_man.* man_alias.*
28616         rm -rf \${DIRS_TO_MAKE}
28617 CF_EOF
28618
28619 # Special case: tack's manpage lives in its own directory.
28620 if test "x$cf_with_manpages" = xyes; then
28621 if test "x$cf_with_tack" = "xyes"; then
28622 cat >> Makefile <<CF_EOF
28623
28624 install.man \\
28625 uninstall.man ::
28626         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
28627 CF_EOF
28628 fi
28629 fi
28630
28631 rm -f headers.sed headers.sh
28632
28633 echo creating headers.sh
28634 cat >headers.sh <<CF_EOF
28635 #! $SHELL
28636 # This shell script is generated by the 'configure' script.  It is invoked in a
28637 # subdirectory of the build tree.  It generates a sed-script in the parent
28638 # directory that is used to adjust includes for header files that reside in a
28639 # subdirectory of /usr/include, etc.
28640 PRG=""
28641 while test \$# != 3
28642 do
28643 PRG="\$PRG \$1"; shift
28644 done
28645 DST=\$1
28646 REF=\$2
28647 SRC=\$3
28648 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
28649 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
28650 echo installing \$SRC in \$DST
28651 CF_EOF
28652
28653 if test $WITH_CURSES_H = yes; then
28654         cat >>headers.sh <<CF_EOF
28655 case \$DST in
28656 (/*/include/*)
28657         END=\`basename \$DST\`
28658         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28659         do
28660                 NAME=\`basename \$i\`
28661                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28662         done
28663         ;;
28664 (*)
28665         echo "" >> \$TMPSED
28666         ;;
28667 esac
28668 CF_EOF
28669
28670 else
28671         cat >>headers.sh <<CF_EOF
28672 case \$DST in
28673 (/*/include/*)
28674         END=\`basename \$DST\`
28675         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
28676         do
28677                 NAME=\`basename \$i\`
28678                 if test "\$NAME" = "curses.h"
28679                 then
28680                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28681                         NAME=ncurses.h
28682                 fi
28683                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
28684         done
28685         ;;
28686 (*)
28687         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
28688         ;;
28689 esac
28690 CF_EOF
28691 fi
28692 cat >>headers.sh <<CF_EOF
28693 rm -f \$TMPSRC
28694 sed -f \$TMPSED \$SRC > \$TMPSRC
28695 NAME=\`basename \$SRC\`
28696 CF_EOF
28697 if test $WITH_CURSES_H != yes; then
28698         cat >>headers.sh <<CF_EOF
28699 test "\$NAME" = "curses.h" && NAME=ncurses.h
28700 CF_EOF
28701 fi
28702 cat >>headers.sh <<CF_EOF
28703 # Just in case someone gzip'd manpages, remove the conflicting copy.
28704 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
28705
28706 eval \$PRG \$TMPSRC \$DST/\$NAME
28707 rm -f \$TMPSRC \$TMPSED
28708 CF_EOF
28709
28710 chmod 0755 headers.sh
28711
28712 for cf_dir in $SRC_SUBDIRS
28713 do
28714         if test ! -d $srcdir/$cf_dir ; then
28715                 continue
28716         fi
28717
28718         if test -f $srcdir/$cf_dir/headers; then
28719                 $AWK -f $srcdir/mk-hdr.awk \
28720                         subset="$LIB_SUBSETS" \
28721                         compat="$WITH_CURSES_H" \
28722                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
28723         fi
28724
28725         if test -f $srcdir/$cf_dir/modules; then
28726                 if test "$cf_dir" != "c++" ; then
28727                         cat >>$cf_dir/Makefile <<"CF_EOF"
28728 depend : ${AUTO_SRC}
28729         makedepend -- ${CPPFLAGS} -- ${C_SRC}
28730
28731 # DO NOT DELETE THIS LINE -- make depend depends on it.
28732 CF_EOF
28733                 fi
28734         fi
28735 done
28736
28737 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28738 if test -z "$USE_OLD_MAKERULES" ; then
28739         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
28740 fi
28741 fi
28742  ;;
28743   esac
28744 done
28745 EOF
28746
28747 cat >>$CONFIG_STATUS <<\EOF
28748
28749 { (exit 0); exit 0; }
28750 EOF
28751 chmod +x $CONFIG_STATUS
28752 ac_clean_files=$ac_clean_files_save
28753
28754 # configure is writing to config.log, and then calls config.status.
28755 # config.status does its own redirection, appending to config.log.
28756 # Unfortunately, on DOS this fails, as config.log is still kept open
28757 # by configure, so config.status won't be able to write to it; its
28758 # output is simply discarded.  So we exec the FD to /dev/null,
28759 # effectively closing config.log, so it can be properly (re)opened and
28760 # appended to by config.status.  When coming back to configure, we
28761 # need to make the FD available again.
28762 if test "$no_create" != yes; then
28763   ac_cs_success=:
28764   exec 5>/dev/null
28765   $SHELL $CONFIG_STATUS || ac_cs_success=false
28766   exec 5>>config.log
28767   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28768   # would make configure fail if this is the last instruction.
28769   $ac_cs_success || { (exit 1); exit 1; }
28770 fi
28771 ${MAKE:-make} preinstall