]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
eb5fd8165ad5046a8cf8ab64a56aa1dacfe80481
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.672 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20181006.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datarootdir='${prefix}/share'
175 datadir='${datarootdir}'
176 sysconfdir='${prefix}/etc'
177 sharedstatedir='${prefix}/com'
178 localstatedir='${prefix}/var'
179 runstatedir='${localstatedir}/run'
180 libdir='${exec_prefix}/lib'
181 includedir='${prefix}/include'
182 oldincludedir='/usr/include'
183 infodir='${datarootdir}/info'
184 mandir='${datarootdir}/man'
185
186 # Identity of this package.
187 PACKAGE_NAME=
188 PACKAGE_TARNAME=
189 PACKAGE_VERSION=
190 PACKAGE_STRING=
191 PACKAGE_BUGREPORT=
192
193 ac_prev=
194 for ac_option
195 do
196   # If the previous option needs an argument, assign it.
197   if test -n "$ac_prev"; then
198     eval "$ac_prev=\$ac_option"
199     ac_prev=
200     continue
201   fi
202
203   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205   # Accept the important Cygnus configure options, so we can diagnose typos.
206
207   case $ac_option in
208
209   -bindir | --bindir | --bindi | --bind | --bin | --bi)
210     ac_prev=bindir ;;
211   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212     bindir=$ac_optarg ;;
213
214   -build | --build | --buil | --bui | --bu)
215     ac_prev=build_alias ;;
216   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217     build_alias=$ac_optarg ;;
218
219   -cache-file | --cache-file | --cache-fil | --cache-fi \
220   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221     ac_prev=cache_file ;;
222   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224     cache_file=$ac_optarg ;;
225
226   --config-cache | -C)
227     cache_file=config.cache ;;
228
229   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230     ac_prev=datadir ;;
231   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232   | --da=*)
233     datadir=$ac_optarg ;;
234
235   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236   | --dataroo | --dataro | --datar)
237     ac_prev=datarootdir ;;
238   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240     datarootdir=$ac_optarg ;;
241
242   -disable-* | --disable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     eval "enable_$ac_feature=no" ;;
250
251   -enable-* | --enable-*)
252     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253     # Reject names that are not valid shell variable names.
254     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256    { (exit 1); exit 1; }; }
257     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258     case $ac_option in
259       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260       *) ac_optarg=yes ;;
261     esac
262     eval "enable_$ac_feature='$ac_optarg'" ;;
263
264   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266   | --exec | --exe | --ex)
267     ac_prev=exec_prefix ;;
268   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270   | --exec=* | --exe=* | --ex=*)
271     exec_prefix=$ac_optarg ;;
272
273   -gas | --gas | --ga | --g)
274     # Obsolete; use --with-gas.
275     with_gas=yes ;;
276
277   -help | --help | --hel | --he | -h)
278     ac_init_help=long ;;
279   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280     ac_init_help=recursive ;;
281   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282     ac_init_help=short ;;
283
284   -host | --host | --hos | --ho)
285     ac_prev=host_alias ;;
286   -host=* | --host=* | --hos=* | --ho=*)
287     host_alias=$ac_optarg ;;
288
289   -includedir | --includedir | --includedi | --included | --include \
290   | --includ | --inclu | --incl | --inc)
291     ac_prev=includedir ;;
292   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293   | --includ=* | --inclu=* | --incl=* | --inc=*)
294     includedir=$ac_optarg ;;
295
296   -infodir | --infodir | --infodi | --infod | --info | --inf)
297     ac_prev=infodir ;;
298   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299     infodir=$ac_optarg ;;
300
301   -libdir | --libdir | --libdi | --libd)
302     ac_prev=libdir ;;
303   -libdir=* | --libdir=* | --libdi=* | --libd=*)
304     libdir=$ac_optarg ;;
305
306   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307   | --libexe | --libex | --libe)
308     ac_prev=libexecdir ;;
309   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310   | --libexe=* | --libex=* | --libe=*)
311     libexecdir=$ac_optarg ;;
312
313   -localstatedir | --localstatedir | --localstatedi | --localstated \
314   | --localstate | --localstat | --localsta | --localst \
315   | --locals | --local | --loca | --loc | --lo)
316     ac_prev=localstatedir ;;
317   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320     localstatedir=$ac_optarg ;;
321
322   -runstatedir | --runstatedir | --runstatedi | --runstated \
323   | --runstate | --runstat | --runsta | --runst \
324   | --runs | --run | --ru)
325     ac_prev=runstatedir ;;
326   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328   | --runs=* | --run=* | --ru=*)
329     runstatedir=$ac_optarg ;;
330
331   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332     ac_prev=mandir ;;
333   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334     mandir=$ac_optarg ;;
335
336   -nfp | --nfp | --nf)
337     # Obsolete; use --without-fp.
338     with_fp=no ;;
339
340   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341   | --no-cr | --no-c)
342     no_create=yes ;;
343
344   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346     no_recursion=yes ;;
347
348   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350   | --oldin | --oldi | --old | --ol | --o)
351     ac_prev=oldincludedir ;;
352   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355     oldincludedir=$ac_optarg ;;
356
357   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358     ac_prev=prefix ;;
359   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360     prefix=$ac_optarg ;;
361
362   -program-prefix | --program-prefix | --program-prefi | --program-pref \
363   | --program-pre | --program-pr | --program-p)
364     ac_prev=program_prefix ;;
365   -program-prefix=* | --program-prefix=* | --program-prefi=* \
366   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367     program_prefix=$ac_optarg ;;
368
369   -program-suffix | --program-suffix | --program-suffi | --program-suff \
370   | --program-suf | --program-su | --program-s)
371     ac_prev=program_suffix ;;
372   -program-suffix=* | --program-suffix=* | --program-suffi=* \
373   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374     program_suffix=$ac_optarg ;;
375
376   -program-transform-name | --program-transform-name \
377   | --program-transform-nam | --program-transform-na \
378   | --program-transform-n | --program-transform- \
379   | --program-transform | --program-transfor \
380   | --program-transfo | --program-transf \
381   | --program-trans | --program-tran \
382   | --progr-tra | --program-tr | --program-t)
383     ac_prev=program_transform_name ;;
384   -program-transform-name=* | --program-transform-name=* \
385   | --program-transform-nam=* | --program-transform-na=* \
386   | --program-transform-n=* | --program-transform-=* \
387   | --program-transform=* | --program-transfor=* \
388   | --program-transfo=* | --program-transf=* \
389   | --program-trans=* | --program-tran=* \
390   | --progr-tra=* | --program-tr=* | --program-t=*)
391     program_transform_name=$ac_optarg ;;
392
393   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394   | -silent | --silent | --silen | --sile | --sil)
395     silent=yes ;;
396
397   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398     ac_prev=sbindir ;;
399   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400   | --sbi=* | --sb=*)
401     sbindir=$ac_optarg ;;
402
403   -sharedstatedir | --sharedstatedir | --sharedstatedi \
404   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405   | --sharedst | --shareds | --shared | --share | --shar \
406   | --sha | --sh)
407     ac_prev=sharedstatedir ;;
408   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411   | --sha=* | --sh=*)
412     sharedstatedir=$ac_optarg ;;
413
414   -site | --site | --sit)
415     ac_prev=site ;;
416   -site=* | --site=* | --sit=*)
417     site=$ac_optarg ;;
418
419   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420     ac_prev=srcdir ;;
421   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422     srcdir=$ac_optarg ;;
423
424   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425   | --syscon | --sysco | --sysc | --sys | --sy)
426     ac_prev=sysconfdir ;;
427   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429     sysconfdir=$ac_optarg ;;
430
431   -target | --target | --targe | --targ | --tar | --ta | --t)
432     ac_prev=target_alias ;;
433   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434     target_alias=$ac_optarg ;;
435
436   -v | -verbose | --verbose | --verbos | --verbo | --verb)
437     verbose=yes ;;
438
439   -version | --version | --versio | --versi | --vers | -V)
440     ac_init_version=: ;;
441
442   -with-* | --with-*)
443     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444     # Reject names that are not valid shell variable names.
445     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446       { echo "$as_me: error: invalid package name: $ac_package" >&2
447    { (exit 1); exit 1; }; }
448     ac_package=`echo $ac_package| sed 's/-/_/g'`
449     case $ac_option in
450       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451       *) ac_optarg=yes ;;
452     esac
453     eval "with_$ac_package='$ac_optarg'" ;;
454
455   -without-* | --without-*)
456     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457     # Reject names that are not valid shell variable names.
458     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459       { echo "$as_me: error: invalid package name: $ac_package" >&2
460    { (exit 1); exit 1; }; }
461     ac_package=`echo $ac_package | sed 's/-/_/g'`
462     eval "with_$ac_package=no" ;;
463
464   --x)
465     # Obsolete; use --with-x.
466     with_x=yes ;;
467
468   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469   | --x-incl | --x-inc | --x-in | --x-i)
470     ac_prev=x_includes ;;
471   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473     x_includes=$ac_optarg ;;
474
475   -x-libraries | --x-libraries | --x-librarie | --x-librari \
476   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477     ac_prev=x_libraries ;;
478   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480     x_libraries=$ac_optarg ;;
481
482   -*) { echo "$as_me: error: unrecognized option: $ac_option
483 Try \`$0 --help' for more information." >&2
484    { (exit 1); exit 1; }; }
485     ;;
486
487   *=*)
488     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489     # Reject names that are not valid shell variable names.
490     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492    { (exit 1); exit 1; }; }
493     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494     eval "$ac_envvar='$ac_optarg'"
495     export $ac_envvar ;;
496
497   *)
498     # FIXME: should be removed in autoconf 3.0.
499     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503     ;;
504
505   esac
506 done
507
508 if test -n "$ac_prev"; then
509   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510   { echo "$as_me: error: missing argument to $ac_option" >&2
511    { (exit 1); exit 1; }; }
512 fi
513
514 # Be sure to have absolute paths.
515 for ac_var in exec_prefix prefix
516 do
517   eval ac_val=$`echo $ac_var`
518   case $ac_val in
519     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521    { (exit 1); exit 1; }; };;
522   esac
523 done
524
525 # Be sure to have absolute paths.
526 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527               localstatedir libdir includedir oldincludedir infodir mandir
528 do
529   eval ac_val=$`echo $ac_var`
530   case $ac_val in
531     [\\/$]* | ?:[\\/]* ) ;;
532     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533    { (exit 1); exit 1; }; };;
534   esac
535 done
536
537 # There might be people who depend on the old broken behavior: `$host'
538 # used to hold the argument of --host etc.
539 build=$build_alias
540 host=$host_alias
541 target=$target_alias
542
543 # FIXME: should be removed in autoconf 3.0.
544 if test "x$host_alias" != x; then
545   if test "x$build_alias" = x; then
546     cross_compiling=maybe
547     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548     If a cross compiler is detected then cross compile mode will be used." >&2
549   elif test "x$build_alias" != "x$host_alias"; then
550     cross_compiling=yes
551   fi
552 fi
553
554 ac_tool_prefix=
555 test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557 test "$silent" = yes && exec 6>/dev/null
558
559 # Find the source files, if location was not specified.
560 if test -z "$srcdir"; then
561   ac_srcdir_defaulted=yes
562   # Try the directory containing this script, then its parent.
563   ac_prog=$0
564   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566   srcdir=$ac_confdir
567   if test ! -r $srcdir/$ac_unique_file; then
568     srcdir=..
569   fi
570 else
571   ac_srcdir_defaulted=no
572 fi
573 if test ! -r $srcdir/$ac_unique_file; then
574   if test "$ac_srcdir_defaulted" = yes; then
575     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576    { (exit 1); exit 1; }; }
577   else
578     { echo "$as_me: error: cannot find sources in $srcdir" >&2
579    { (exit 1); exit 1; }; }
580   fi
581 fi
582 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583 ac_env_build_alias_set=${build_alias+set}
584 ac_env_build_alias_value=$build_alias
585 ac_cv_env_build_alias_set=${build_alias+set}
586 ac_cv_env_build_alias_value=$build_alias
587 ac_env_host_alias_set=${host_alias+set}
588 ac_env_host_alias_value=$host_alias
589 ac_cv_env_host_alias_set=${host_alias+set}
590 ac_cv_env_host_alias_value=$host_alias
591 ac_env_target_alias_set=${target_alias+set}
592 ac_env_target_alias_value=$target_alias
593 ac_cv_env_target_alias_set=${target_alias+set}
594 ac_cv_env_target_alias_value=$target_alias
595 ac_env_CC_set=${CC+set}
596 ac_env_CC_value=$CC
597 ac_cv_env_CC_set=${CC+set}
598 ac_cv_env_CC_value=$CC
599 ac_env_CFLAGS_set=${CFLAGS+set}
600 ac_env_CFLAGS_value=$CFLAGS
601 ac_cv_env_CFLAGS_set=${CFLAGS+set}
602 ac_cv_env_CFLAGS_value=$CFLAGS
603 ac_env_LDFLAGS_set=${LDFLAGS+set}
604 ac_env_LDFLAGS_value=$LDFLAGS
605 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_cv_env_LDFLAGS_value=$LDFLAGS
607 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608 ac_env_CPPFLAGS_value=$CPPFLAGS
609 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611 ac_env_CPP_set=${CPP+set}
612 ac_env_CPP_value=$CPP
613 ac_cv_env_CPP_set=${CPP+set}
614 ac_cv_env_CPP_value=$CPP
615 ac_env_CXX_set=${CXX+set}
616 ac_env_CXX_value=$CXX
617 ac_cv_env_CXX_set=${CXX+set}
618 ac_cv_env_CXX_value=$CXX
619 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
620 ac_env_CXXFLAGS_value=$CXXFLAGS
621 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
623 ac_env_CXXCPP_set=${CXXCPP+set}
624 ac_env_CXXCPP_value=$CXXCPP
625 ac_cv_env_CXXCPP_set=${CXXCPP+set}
626 ac_cv_env_CXXCPP_value=$CXXCPP
627
628 #
629 # Report the --help message.
630 #
631 if test "$ac_init_help" = "long"; then
632   # Omit some internal or obsolete options to make the list less imposing.
633   # This message is too long to be a string in the A/UX 3.1 sh.
634   cat <<EOF
635 \`configure' configures this package to adapt to many kinds of systems.
636
637 Usage: $0 [OPTION]... [VAR=VALUE]...
638
639 To assign environment variables (e.g., CC, CFLAGS...), specify them as
640 VAR=VALUE.  See below for descriptions of some of the useful variables.
641
642 Defaults for the options are specified in brackets.
643
644 Configuration:
645   -h, --help              display this help and exit
646       --help=short        display options specific to this package
647       --help=recursive    display the short help of all the included packages
648   -V, --version           display version information and exit
649   -q, --quiet, --silent   do not print \`checking...' messages
650       --cache-file=FILE   cache test results in FILE [disabled]
651   -C, --config-cache      alias for \`--cache-file=config.cache'
652   -n, --no-create         do not create output files
653       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
654
655 EOF
656
657   cat <<EOF
658 Installation directories:
659   --prefix=PREFIX         install architecture-independent files in PREFIX
660                           [$ac_default_prefix]
661   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
662                           [PREFIX]
663
664 By default, \`make install' will install all the files in
665 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
666 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
667 for instance \`--prefix=\$HOME'.
668
669 For better control, use the options below.
670
671 Fine tuning of the installation directories:
672   --bindir=DIR            user executables [EPREFIX/bin]
673   --sbindir=DIR           system admin executables [EPREFIX/sbin]
674   --libexecdir=DIR        program executables [EPREFIX/libexec]
675   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
676   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
677   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
678   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
679   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
680   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
681   --libdir=DIR            object code libraries [EPREFIX/lib]
682   --includedir=DIR        C header files [PREFIX/include]
683   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
684   --infodir=DIR           info documentation [DATAROOTDIR/info]
685   --mandir=DIR            man documentation [DATAROOTDIR/man]
686 EOF
687
688   cat <<\EOF
689
690 Program names:
691   --program-prefix=PREFIX            prepend PREFIX to installed program names
692   --program-suffix=SUFFIX            append SUFFIX to installed program names
693   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
694
695 System types:
696   --build=BUILD           configure for building on BUILD [guessed]
697   --host=HOST       build programs to run on HOST [BUILD]
698   --target=TARGET   configure for building compilers for TARGET [HOST]
699 EOF
700 fi
701
702 if test -n "$ac_init_help"; then
703
704   cat <<\EOF
705
706 Optional Packages:
707   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
708   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
709
710 Optional Features:
711   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
712   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
713
714   --with-rel-version=XXX  override derived release version
715   --with-abi-version=XXX  override derived ABI version
716   --with-system-type=XXX  test: override derived host system-type
717   --without-ada           suppress check for Ada95, don't build demo
718   --without-cxx           do not adjust ncurses bool to match C++
719   --without-cxx-binding   do not build C++ binding and demo
720   --disable-db-install    suppress install of terminal database
721   --without-manpages      suppress install of manpages
722   --without-progs         suppress build/install with programs (e.g., tic)
723   --without-tack          suppress build/install with tack program
724   --without-tests         suppress build/install with test-programs
725   --without-curses-h      install curses.h as ncurses.h only
726   --with-config-suffix=X  suffixes ncursesXX-config file
727   --with-pkg-config{=path} enable/disable use of pkg-config
728   --with-pkg-config-libdir=XXX use given directory for installing pc-files
729   --enable-pc-files       generate and install .pc files for pkg-config
730   --with-pc-suffix        suffixes pc-files
731   --enable-mixed-case     tic should assume mixed-case filenames
732   --with-install-prefix   prefixes actual install-location ($DESTDIR)
733 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
734   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
735   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
736   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
737   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
738   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
739   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
740 Options to Specify the Libraries Built/Used:
741   --disable-libtool-version  enable to use libtool's incompatible naming scheme
742   --with-libtool          generate libraries with libtool
743   --with-shared           generate shared-libraries
744   --with-normal           generate normal-libraries (default)
745   --with-debug            generate debug-libraries (default)
746   --with-profile          generate profile-libraries
747   --with-cxx-shared       generate C++ shared-libraries
748   --with-lib-prefix       override library-prefix
749   --with-termlib          generate separate terminfo library
750   --with-ticlib           generate separate tic library
751   --enable-rpath          use rpath option when generating shared libraries
752   --disable-relink        relink shared libraries during install
753   --with-shlib-version=X  Specify rel or abi version for shared libs
754   --with-libtool-opts=XXX specify additional libtool options
755   --with-export-syms=XXX  limit exported symbols using libtool
756   --with-versioned-syms=X markup versioned symbols using ld
757   --with-gpm              use Alessandro Rubini's GPM library
758   --without-dlsym         do not use dlsym() to load GPM dynamically
759   --with-pcre2            use PCRE2 for regular-expressions
760   --with-sysmouse         use sysmouse (FreeBSD console)
761   --disable-lib-suffixes  disable library suffixes
762   --disable-rpath-hack    don't add rpath options for additional libraries
763 Fine-Tuning Your Configuration:
764   --with-extra-suffix=X   append extra suffix to header/library paths
765   --disable-overwrite     put headers in subdir, omit link to -lcurses
766   --disable-database      do not use terminfo, only fallbacks/termcap
767   --with-database=XXX     specify terminfo source to install
768   --with-hashed-db        specify hashed-database library
769   --with-fallbacks=XXX    specify list of fallback terminal descriptions
770   --without-xterm-new     specify if xterm terminfo should be old version
771   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
772   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
773   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
774   --disable-big-core      assume machine has little memory
775   --disable-big-strings   assume compiler has only standard-size strings
776   --enable-termcap        compile in termcap fallback support
777   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
778   --enable-getcap         fast termcap load, no xrefs to terminfo
779   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
780   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
781   --disable-root-environ  restrict environment when running as root
782   --enable-symlinks       make tic use symbolic links not hard links
783   --enable-broken_linker  compile with broken-linker support code
784   --enable-bsdpad         recognize BSD-style prefix padding
785   --enable-widec          compile with wide-char/UTF-8 code
786   --disable-lp64          allow chtype to be long (ignore _LP64)
787   --disable-largefile     omit support for large files
788   --disable-tparm-varargs compile tparm() without varargs interface
789   --disable-tic-depends   link tic library without explicit dependency on ncurses library
790   --disable-wattr-macros  suppress wattr* macros to help with ncurses5/ncurses6 transition
791   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
792   --with-bool=TYPE        override fallback type of bool variable
793   --with-caps=alt         compile with alternate Caps file
794   --with-chtype=TYPE      override type of chtype
795   --with-ospeed=TYPE      override type of ospeed variable
796   --with-mmask-t=TYPE     override type of mmask_t
797   --with-ccharw-max=XXX   override size CCHARW_MAX
798   --enable-signed-char    compile using signed Boolean's in term.h
799   --with-tparm-arg=TYPE   override parameter type of tparm
800   --with-rcs-ids          compile-in RCS identifiers
801 Options to Specify How Manpages are Installed:
802   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
803                           optionally formatted/catonly, e.g., gzip,formatted
804   --with-manpage-renames  specify manpage-renaming
805   --with-manpage-aliases  specify manpage-aliases using .so
806   --with-manpage-symlinks specify manpage-aliases using symlinks
807   --with-manpage-tbl      specify manpage processing with tbl
808 Extensions:
809   --disable-ext-funcs     disable function-extensions
810   --enable-sp-funcs       enable SCREEN-extensions
811   --enable-term-driver    enable terminal-driver
812   --enable-const          compile with extra/non-standard const
813   --enable-ext-colors     compile for 256-color support
814   --enable-ext-mouse      compile for extended mouse-encoding
815   --enable-ext-putwin     compile with extended putwin/screendump
816   --enable-no-padding     compile with $NCURSES_NO_PADDING code
817   --enable-sigwinch       compile with SIGWINCH handler
818   --enable-tcap-names     compile with user-definable terminal capabilities
819 Reentrant Code:
820   --with-pthread          use POSIX thread library
821   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
822   --enable-weak-symbols   enable weak-symbols for pthreads
823   --enable-reentrant      compile with reentrant code
824   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
825   --enable-opaque-form    make form-library structures "opaque"
826   --enable-opaque-menu    make menu-library structures "opaque"
827   --enable-opaque-panel   make panel-library structures "opaque"
828   --with-wrap-prefix=XXX  override prefix used for public variables
829 Development Code:
830   --without-develop       disable development options
831   --enable-hard-tabs      compile with hard-tabs code
832   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
833 Experimental Code:
834   --disable-assumed-color do not assume anything about default-colors
835   --disable-hashmap       compile without hashmap scrolling-optimization
836   --enable-colorfgbg      compile-in experimental $COLORFGBG code
837   --enable-interop        compile-in interop bindings
838   --enable-safe-sprintf   compile with experimental safe-sprintf code
839   --disable-scroll-hints  compile without scroll-hints code
840   --enable-wgetch-events  compile with wgetch-events code
841 Testing/development Options:
842   --disable-echo          do not display "compiling" commands
843   --disable-stripping     do not strip (debug info) installed executables
844   --enable-warnings       build: turn on GCC compiler warnings
845   --enable-string-hacks   work around bogus compiler/loader warnings
846   --enable-assertions     test: turn on generation of assertion code
847   --with-dmalloc          test: use Gray Watson's dmalloc library
848   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
849   --with-valgrind         test: use valgrind
850   --disable-leaks         test: free permanent memory, analyze leaks
851   --enable-expanded       test: generate functions for certain macros
852   --disable-macros        test: use functions rather than macros
853   --with-trace            test: add trace() function to all models of ncurses
854   --disable-gnat-projects test: disable GNAT projects even if usable
855 Ada95 Binding Options:
856   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
857   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
858   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
859   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
860
861 Some influential environment variables:
862   CC          C compiler command
863   CFLAGS      C compiler flags
864   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
865               nonstandard directory <lib dir>
866   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
867               headers in a nonstandard directory <include dir>
868   CPP         C preprocessor
869   CXX         C++ compiler command
870   CXXFLAGS    C++ compiler flags
871   CXXCPP      C++ preprocessor
872
873 Use these variables to override the choices made by `configure' or to help
874 it to find libraries and programs with nonstandard names/locations.
875
876 EOF
877 fi
878
879 if test "$ac_init_help" = "recursive"; then
880   # If there are subdirs, report their specific --help.
881   ac_popdir=`pwd`
882   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
883     cd $ac_subdir
884     # A "../" for each directory in /$ac_subdir.
885     ac_dots=`echo $ac_subdir |
886              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
887
888     case $srcdir in
889     .) # No --srcdir option.  We are building in place.
890       ac_sub_srcdir=$srcdir ;;
891     [\\/]* | ?:[\\/]* ) # Absolute path.
892       ac_sub_srcdir=$srcdir/$ac_subdir ;;
893     *) # Relative path.
894       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
895     esac
896
897     # Check for guested configure; otherwise get Cygnus style configure.
898     if test -f $ac_sub_srcdir/configure.gnu; then
899       echo
900       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
901     elif test -f $ac_sub_srcdir/configure; then
902       echo
903       $SHELL $ac_sub_srcdir/configure  --help=recursive
904     elif test -f $ac_sub_srcdir/configure.ac ||
905            test -f $ac_sub_srcdir/configure.in; then
906       echo
907       $ac_configure --help
908     else
909       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
910     fi
911     cd $ac_popdir
912   done
913 fi
914
915 test -n "$ac_init_help" && exit 0
916 if $ac_init_version; then
917   cat <<\EOF
918
919 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
920 Free Software Foundation, Inc.
921 This configure script is free software; the Free Software Foundation
922 gives unlimited permission to copy, distribute and modify it.
923 EOF
924   exit 0
925 fi
926 exec 5>config.log
927 cat >&5 <<EOF
928 This file contains any messages produced by compilers while
929 running configure, to aid debugging if configure makes a mistake.
930
931 It was created by $as_me, which was
932 generated by GNU Autoconf 2.52.20181006.  Invocation command line was
933
934   $ $0 $@
935
936 EOF
937 {
938 cat <<_ASUNAME
939 ## ---------- ##
940 ## Platform.  ##
941 ## ---------- ##
942
943 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
944 uname -m = `(uname -m) 2>/dev/null || echo unknown`
945 uname -r = `(uname -r) 2>/dev/null || echo unknown`
946 uname -s = `(uname -s) 2>/dev/null || echo unknown`
947 uname -v = `(uname -v) 2>/dev/null || echo unknown`
948
949 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
950 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
951
952 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
953 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
954 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
955 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
956 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
957 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
958 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
959
960 PATH = $PATH
961
962 _ASUNAME
963 } >&5
964
965 cat >&5 <<EOF
966 ## ------------ ##
967 ## Core tests.  ##
968 ## ------------ ##
969
970 EOF
971
972 # Keep a trace of the command line.
973 # Strip out --no-create and --no-recursion so they do not pile up.
974 # Also quote any args containing shell meta-characters.
975 ac_configure_args=
976 ac_sep=
977 for ac_arg
978 do
979   case $ac_arg in
980   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
981   | --no-cr | --no-c) ;;
982   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
983   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
984   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
985     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
986     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
987     ac_sep=" " ;;
988   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
989      ac_sep=" " ;;
990   esac
991   # Get rid of the leading space.
992 done
993
994 # When interrupted or exit'd, cleanup temporary files, and complete
995 # config.log.  We remove comments because anyway the quotes in there
996 # would cause problems or look ugly.
997 trap 'exit_status=$?
998   # Save into config.log some information that might help in debugging.
999   echo >&5
1000   echo "## ----------------- ##" >&5
1001   echo "## Cache variables.  ##" >&5
1002   echo "## ----------------- ##" >&5
1003   echo >&5
1004   # The following way of writing the cache mishandles newlines in values,
1005 {
1006   (set) 2>&1 |
1007     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1008     *ac_space=\ *)
1009       sed -n \
1010         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1011           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1012       ;;
1013     *)
1014       sed -n \
1015         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1016       ;;
1017     esac;
1018 } >&5
1019   sed "/^$/d" confdefs.h >conftest.log
1020   if test -s conftest.log; then
1021     echo >&5
1022     echo "## ------------ ##" >&5
1023     echo "## confdefs.h.  ##" >&5
1024     echo "## ------------ ##" >&5
1025     echo >&5
1026     cat conftest.log >&5
1027   fi
1028   (echo; echo) >&5
1029   test "$ac_signal" != 0 &&
1030     echo "$as_me: caught signal $ac_signal" >&5
1031   echo "$as_me: exit $exit_status" >&5
1032   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1033     exit $exit_status
1034      ' 0
1035 for ac_signal in 1 2 13 15; do
1036   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1037 done
1038 ac_signal=0
1039
1040 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1041 rm -rf conftest* confdefs.h
1042 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1043 echo >confdefs.h
1044
1045 # Let the site file select an alternate cache file if it wants to.
1046 # Prefer explicitly selected file to automatically selected ones.
1047 if test -z "$CONFIG_SITE"; then
1048   if test "x$prefix" != xNONE; then
1049     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1050   else
1051     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1052   fi
1053 fi
1054 for ac_site_file in $CONFIG_SITE; do
1055   if test -r "$ac_site_file"; then
1056     { echo "$as_me:1056: loading site script $ac_site_file" >&5
1057 echo "$as_me: loading site script $ac_site_file" >&6;}
1058     cat "$ac_site_file" >&5
1059     . "$ac_site_file"
1060   fi
1061 done
1062
1063 if test -r "$cache_file"; then
1064   # Some versions of bash will fail to source /dev/null (special
1065   # files actually), so we avoid doing that.
1066   if test -f "$cache_file"; then
1067     { echo "$as_me:1067: loading cache $cache_file" >&5
1068 echo "$as_me: loading cache $cache_file" >&6;}
1069     case $cache_file in
1070       [\\/]* | ?:[\\/]* ) . $cache_file;;
1071       *)                      . ./$cache_file;;
1072     esac
1073   fi
1074 else
1075   { echo "$as_me:1075: creating cache $cache_file" >&5
1076 echo "$as_me: creating cache $cache_file" >&6;}
1077   >$cache_file
1078 fi
1079
1080 # Check that the precious variables saved in the cache have kept the same
1081 # value.
1082 ac_cache_corrupted=false
1083 for ac_var in `(set) 2>&1 |
1084                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1085   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1086   eval ac_new_set=\$ac_env_${ac_var}_set
1087   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1088   eval ac_new_val="\$ac_env_${ac_var}_value"
1089   case $ac_old_set,$ac_new_set in
1090     set,)
1091       { echo "$as_me:1091: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1092 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1093       ac_cache_corrupted=: ;;
1094     ,set)
1095       { echo "$as_me:1095: error: \`$ac_var' was not set in the previous run" >&5
1096 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1097       ac_cache_corrupted=: ;;
1098     ,);;
1099     *)
1100       if test "x$ac_old_val" != "x$ac_new_val"; then
1101         { echo "$as_me:1101: error: \`$ac_var' has changed since the previous run:" >&5
1102 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1103         { echo "$as_me:1103:   former value:  $ac_old_val" >&5
1104 echo "$as_me:   former value:  $ac_old_val" >&2;}
1105         { echo "$as_me:1105:   current value: $ac_new_val" >&5
1106 echo "$as_me:   current value: $ac_new_val" >&2;}
1107         ac_cache_corrupted=:
1108       fi;;
1109   esac
1110   # Pass precious variables to config.status.  It doesn't matter if
1111   # we pass some twice (in addition to the command line arguments).
1112   if test "$ac_new_set" = set; then
1113     case $ac_new_val in
1114     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1115       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1116       ac_configure_args="$ac_configure_args '$ac_arg'"
1117       ;;
1118     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1119        ;;
1120     esac
1121   fi
1122 done
1123 if $ac_cache_corrupted; then
1124   { echo "$as_me:1124: error: changes in the environment can compromise the build" >&5
1125 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1126   { { echo "$as_me:1126: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1127 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1128    { (exit 1); exit 1; }; }
1129 fi
1130
1131 ac_ext=c
1132 ac_cpp='$CPP $CPPFLAGS'
1133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1136 ac_main_return=return
1137
1138 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1139   *c*,-n*) ECHO_N= ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1140                    ECHO_T='     ' ;;
1141   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1142   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1143 esac
1144 echo "#! $SHELL" >conftest.sh
1145 echo  "exit 0"   >>conftest.sh
1146 chmod +x conftest.sh
1147 if { (echo "$as_me:1147: PATH=\".;.\"; conftest.sh") >&5
1148   (PATH=".;."; conftest.sh) 2>&5
1149   ac_status=$?
1150   echo "$as_me:1150: \$? = $ac_status" >&5
1151   (exit $ac_status); }; then
1152   ac_path_separator=';'
1153 else
1154   ac_path_separator=:
1155 fi
1156 PATH_SEPARATOR="$ac_path_separator"
1157 rm -f conftest.sh
1158
1159 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1160
1161 top_builddir=`pwd`
1162
1163 echo "$as_me:1163: checking for egrep" >&5
1164 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1165 if test "${ac_cv_prog_egrep+set}" = set; then
1166   echo $ECHO_N "(cached) $ECHO_C" >&6
1167 else
1168   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1169                 then ac_cv_prog_egrep='grep -E'
1170                 else ac_cv_prog_egrep='egrep'
1171         fi
1172 fi
1173 echo "$as_me:1173: result: $ac_cv_prog_egrep" >&5
1174 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1175         EGREP=$ac_cv_prog_egrep
1176
1177         test -z "$EGREP" && { { echo "$as_me:1177: error: No egrep program found" >&5
1178 echo "$as_me: error: No egrep program found" >&2;}
1179    { (exit 1); exit 1; }; }
1180
1181 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1182 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1183 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1184 cf_cv_abi_version=${NCURSES_MAJOR}
1185 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1186 cf_cv_timestamp=`date`
1187 echo "$as_me:1187: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1188 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1189
1190 if test -f $srcdir/VERSION ; then
1191         echo "$as_me:1191: checking for package version" >&5
1192 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1193
1194         # if there are not enough fields, cut returns the last one...
1195         cf_field1=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
1196         cf_field2=`sed -e '2,$d' $srcdir/VERSION|cut -f2`
1197         cf_field3=`sed -e '2,$d' $srcdir/VERSION|cut -f3`
1198
1199         # this is how CF_BUNDLED_INTL uses $VERSION:
1200         VERSION="$cf_field1"
1201
1202         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1203         test -z "$VERSION_MAJOR" && { { echo "$as_me:1203: error: missing major-version" >&5
1204 echo "$as_me: error: missing major-version" >&2;}
1205    { (exit 1); exit 1; }; }
1206
1207         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1208         test -z "$VERSION_MINOR" && { { echo "$as_me:1208: error: missing minor-version" >&5
1209 echo "$as_me: error: missing minor-version" >&2;}
1210    { (exit 1); exit 1; }; }
1211
1212         echo "$as_me:1212: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1213 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1214
1215         echo "$as_me:1215: checking for package patch date" >&5
1216 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1217         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1218         case .$VERSION_PATCH in
1219         (.)
1220                 { { echo "$as_me:1220: error: missing patch-date $VERSION_PATCH" >&5
1221 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1222    { (exit 1); exit 1; }; }
1223                 ;;
1224         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1225                 ;;
1226         (*)
1227                 { { echo "$as_me:1227: error: illegal patch-date $VERSION_PATCH" >&5
1228 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1229    { (exit 1); exit 1; }; }
1230                 ;;
1231         esac
1232         echo "$as_me:1232: result: $VERSION_PATCH" >&5
1233 echo "${ECHO_T}$VERSION_PATCH" >&6
1234 else
1235         { { echo "$as_me:1235: error: did not find $srcdir/VERSION" >&5
1236 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1237    { (exit 1); exit 1; }; }
1238 fi
1239
1240 # show the actual data that we have for versions:
1241 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1242
1243 echo "${as_me:-configure}:1243: testing ABI VERSION $VERSION ..." 1>&5
1244
1245 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1246
1247 echo "${as_me:-configure}:1247: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1248
1249 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1250
1251 echo "${as_me:-configure}:1251: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1252
1253 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1254
1255 echo "${as_me:-configure}:1255: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1256
1257         cf_PACKAGE=NCURSES
1258         PACKAGE=ncurses
1259
1260 cat >>confdefs.h <<EOF
1261 #define PACKAGE "$PACKAGE"
1262 EOF
1263
1264 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1265
1266         cat >>confdefs.h <<EOF
1267 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1268 EOF
1269
1270         cat >>confdefs.h <<EOF
1271 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1272 EOF
1273
1274 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1275
1276 # Check whether --with-rel-version or --without-rel-version was given.
1277 if test "${with_rel_version+set}" = set; then
1278   withval="$with_rel_version"
1279   { echo "$as_me:1279: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1280 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1281  cf_cv_rel_version=$withval
1282 fi;
1283
1284  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1285  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1286
1287 if test -n "$NCURSES_MAJOR" ; then
1288   case $NCURSES_MAJOR in
1289   ([0-9]*)
1290         ;;
1291   (*)
1292         { { echo "$as_me:1292: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1293 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1294    { (exit 1); exit 1; }; }
1295         ;;
1296   esac
1297 else
1298   { { echo "$as_me:1298: error: Release major-version value is empty" >&5
1299 echo "$as_me: error: Release major-version value is empty" >&2;}
1300    { (exit 1); exit 1; }; }
1301 fi
1302
1303 if test -n "$NCURSES_MINOR" ; then
1304   case $NCURSES_MINOR in
1305   ([0-9]*)
1306         ;;
1307   (*)
1308         { { echo "$as_me:1308: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1309 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1310    { (exit 1); exit 1; }; }
1311         ;;
1312   esac
1313 else
1314   { { echo "$as_me:1314: error: Release minor-version value is empty" >&5
1315 echo "$as_me: error: Release minor-version value is empty" >&2;}
1316    { (exit 1); exit 1; }; }
1317 fi
1318
1319 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1320
1321 # Check whether --with-abi-version or --without-abi-version was given.
1322 if test "${with_abi_version+set}" = set; then
1323   withval="$with_abi_version"
1324
1325         if test "x$cf_cv_abi_version" != "x$withval"
1326         then
1327                 { echo "$as_me:1327: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1328 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1329                 case $cf_cv_rel_version in
1330                 (5.*)
1331                         cf_cv_rel_version=$withval.0
1332                         ;;
1333                 (6.*)
1334                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1335                         ;;
1336                 esac
1337         fi
1338         cf_cv_abi_version=$withval
1339 fi;
1340
1341 if test -n "$cf_cv_abi_version" ; then
1342   case $cf_cv_abi_version in
1343   ([0-9]*)
1344         ;;
1345   (*)
1346         { { echo "$as_me:1346: error: ABI version is not a number: $cf_cv_abi_version" >&5
1347 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1348    { (exit 1); exit 1; }; }
1349         ;;
1350   esac
1351 else
1352   { { echo "$as_me:1352: error: ABI version value is empty" >&5
1353 echo "$as_me: error: ABI version value is empty" >&2;}
1354    { (exit 1); exit 1; }; }
1355 fi
1356
1357 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1358 then
1359         case $cf_cv_rel_version in
1360         (5.*)
1361                 cf_cv_rel_version=$with_abi_version.0
1362                 ;;
1363         esac
1364 fi
1365
1366 ac_aux_dir=
1367 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1368   if test -f $ac_dir/install-sh; then
1369     ac_aux_dir=$ac_dir
1370     ac_install_sh="$ac_aux_dir/install-sh -c"
1371     break
1372   elif test -f $ac_dir/install.sh; then
1373     ac_aux_dir=$ac_dir
1374     ac_install_sh="$ac_aux_dir/install.sh -c"
1375     break
1376   elif test -f $ac_dir/shtool; then
1377     ac_aux_dir=$ac_dir
1378     ac_install_sh="$ac_aux_dir/shtool install -c"
1379     break
1380   fi
1381 done
1382 if test -z "$ac_aux_dir"; then
1383   { { echo "$as_me:1383: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1384 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1385    { (exit 1); exit 1; }; }
1386 fi
1387 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1388 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1389 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1390
1391 # Make sure we can run config.sub.
1392 $ac_config_sub sun4 >/dev/null 2>&1 ||
1393   { { echo "$as_me:1393: error: cannot run $ac_config_sub" >&5
1394 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1395    { (exit 1); exit 1; }; }
1396
1397 echo "$as_me:1397: checking build system type" >&5
1398 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1399 if test "${ac_cv_build+set}" = set; then
1400   echo $ECHO_N "(cached) $ECHO_C" >&6
1401 else
1402   ac_cv_build_alias=$build_alias
1403 test -z "$ac_cv_build_alias" &&
1404   ac_cv_build_alias=`$ac_config_guess`
1405 test -z "$ac_cv_build_alias" &&
1406   { { echo "$as_me:1406: error: cannot guess build type; you must specify one" >&5
1407 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1408    { (exit 1); exit 1; }; }
1409 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1410   { { echo "$as_me:1410: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1411 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1412    { (exit 1); exit 1; }; }
1413
1414 fi
1415 echo "$as_me:1415: result: $ac_cv_build" >&5
1416 echo "${ECHO_T}$ac_cv_build" >&6
1417 build=$ac_cv_build
1418 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1419 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1420 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1421
1422 echo "$as_me:1422: checking host system type" >&5
1423 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1424 if test "${ac_cv_host+set}" = set; then
1425   echo $ECHO_N "(cached) $ECHO_C" >&6
1426 else
1427   ac_cv_host_alias=$host_alias
1428 test -z "$ac_cv_host_alias" &&
1429   ac_cv_host_alias=$ac_cv_build_alias
1430 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1431   { { echo "$as_me:1431: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1432 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1433    { (exit 1); exit 1; }; }
1434
1435 fi
1436 echo "$as_me:1436: result: $ac_cv_host" >&5
1437 echo "${ECHO_T}$ac_cv_host" >&6
1438 host=$ac_cv_host
1439 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1440 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1441 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1442
1443 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1444         echo "$as_me:1444: checking target system type" >&5
1445 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1446 if test "${ac_cv_target+set}" = set; then
1447   echo $ECHO_N "(cached) $ECHO_C" >&6
1448 else
1449   ac_cv_target_alias=$target_alias
1450 test "x$ac_cv_target_alias" = "x" &&
1451   ac_cv_target_alias=$ac_cv_host_alias
1452 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1453   { { echo "$as_me:1453: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1454 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1455    { (exit 1); exit 1; }; }
1456
1457 fi
1458 echo "$as_me:1458: result: $ac_cv_target" >&5
1459 echo "${ECHO_T}$ac_cv_target" >&6
1460 target=$ac_cv_target
1461 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1462 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1463 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1464
1465 # The aliases save the names the user supplied, while $host etc.
1466 # will get canonicalized.
1467 test -n "$target_alias" &&
1468   test "$program_prefix$program_suffix$program_transform_name" = \
1469     NONENONEs,x,x, &&
1470   program_prefix=${target_alias}-
1471         system_name="$host_os"
1472 else
1473         system_name="`(uname -s -r) 2>/dev/null`"
1474         if test -z "$system_name" ; then
1475                 system_name="`(hostname) 2>/dev/null`"
1476         fi
1477 fi
1478 test -n "$system_name" &&
1479 cat >>confdefs.h <<EOF
1480 #define SYSTEM_NAME "$system_name"
1481 EOF
1482
1483 if test "${cf_cv_system_name+set}" = set; then
1484   echo $ECHO_N "(cached) $ECHO_C" >&6
1485 else
1486   cf_cv_system_name="$system_name"
1487 fi
1488
1489 test -z "$system_name" && system_name="$cf_cv_system_name"
1490 test -n "$cf_cv_system_name" && echo "$as_me:1490: result: Configuring for $cf_cv_system_name" >&5
1491 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1492
1493 if test ".$system_name" != ".$cf_cv_system_name" ; then
1494         echo "$as_me:1494: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1495 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1496         { { echo "$as_me:1496: error: \"Please remove config.cache and try again.\"" >&5
1497 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1498    { (exit 1); exit 1; }; }
1499 fi
1500
1501 # Check whether --with-system-type or --without-system-type was given.
1502 if test "${with_system_type+set}" = set; then
1503   withval="$with_system_type"
1504   { echo "$as_me:1504: WARNING: overriding system type to $withval" >&5
1505 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1506         cf_cv_system_name=$withval
1507         host_os=$withval
1508
1509 fi;
1510
1511 ###     Save the given $CFLAGS to allow user-override.
1512 cf_user_CFLAGS="$CFLAGS"
1513
1514 ###     Default install-location
1515
1516 echo "$as_me:1516: checking for prefix" >&5
1517 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1518 if test "x$prefix" = "xNONE" ; then
1519         case "$cf_cv_system_name" in
1520                 # non-vendor systems don't have a conflict
1521         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1522                 prefix=/usr
1523                 ;;
1524         (*)     prefix=$ac_default_prefix
1525                 ;;
1526         esac
1527 fi
1528 echo "$as_me:1528: result: $prefix" >&5
1529 echo "${ECHO_T}$prefix" >&6
1530
1531 if test "x$prefix" = "xNONE" ; then
1532 echo "$as_me:1532: checking for default include-directory" >&5
1533 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1534 test -n "$verbose" && echo 1>&6
1535 for cf_symbol in \
1536         $includedir \
1537         $includedir/ncurses \
1538         $prefix/include \
1539         $prefix/include/ncurses \
1540         /usr/local/include \
1541         /usr/local/include/ncurses \
1542         /usr/include \
1543         /usr/include/ncurses
1544 do
1545         cf_dir=`eval echo $cf_symbol`
1546         if test -f $cf_dir/curses.h ; then
1547         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1548                 includedir="$cf_symbol"
1549                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1550                 break
1551         fi
1552         fi
1553         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1554 done
1555 echo "$as_me:1555: result: $includedir" >&5
1556 echo "${ECHO_T}$includedir" >&6
1557 fi
1558
1559 ### Defaults for ncurses ABI
1560
1561 case x$cf_cv_abi_version in
1562 (x[6789])
1563         cf_dft_ext_colors=yes
1564         cf_dft_ext_const=yes
1565         cf_dft_ext_mouse=yes
1566         cf_dft_ext_putwin=yes
1567         cf_dft_ext_spfuncs=yes
1568         cf_dft_filter_syms=yes
1569         cf_dft_chtype=uint32_t
1570         cf_dft_mmask_t=uint32_t
1571         cf_dft_interop=yes
1572         cf_dft_tparm_arg=intptr_t
1573         cf_dft_with_lp64=yes
1574         ;;
1575 (*)
1576         cf_dft_ext_colors=no
1577         cf_dft_ext_const=no
1578         cf_dft_ext_mouse=no
1579         cf_dft_ext_putwin=no
1580         cf_dft_ext_spfuncs=no
1581         cf_dft_filter_syms=no
1582         cf_dft_chtype=auto
1583         cf_dft_mmask_t=auto
1584         cf_dft_interop=no
1585         cf_dft_tparm_arg=long
1586         cf_dft_with_lp64=no
1587         ;;
1588 esac
1589
1590 ###     Checks for programs.
1591
1592 # Check whether --with-ada or --without-ada was given.
1593 if test "${with_ada+set}" = set; then
1594   withval="$with_ada"
1595   cf_with_ada=$withval
1596 else
1597   cf_with_ada=yes
1598 fi;
1599
1600 if test "x$cf_with_ada" = xyes
1601 then
1602         cf_prog_cc="gnatgcc gcc cc"
1603 else
1604         cf_prog_cc="gcc cc"
1605 fi
1606
1607 ac_ext=c
1608 ac_cpp='$CPP $CPPFLAGS'
1609 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1610 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1611 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1612 ac_main_return=return
1613 if test -n "$ac_tool_prefix"; then
1614   for ac_prog in $cf_prog_cc
1615   do
1616     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1617 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1618 echo "$as_me:1618: checking for $ac_word" >&5
1619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1620 if test "${ac_cv_prog_CC+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   ac_save_IFS=$IFS; IFS=$ac_path_separator
1627 ac_dummy="$PATH"
1628 for ac_dir in $ac_dummy; do
1629   IFS=$ac_save_IFS
1630   test -z "$ac_dir" && ac_dir=.
1631   $as_executable_p "$ac_dir/$ac_word" || continue
1632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1633 echo "$as_me:1633: found $ac_dir/$ac_word" >&5
1634 break
1635 done
1636
1637 fi
1638 fi
1639 CC=$ac_cv_prog_CC
1640 if test -n "$CC"; then
1641   echo "$as_me:1641: result: $CC" >&5
1642 echo "${ECHO_T}$CC" >&6
1643 else
1644   echo "$as_me:1644: result: no" >&5
1645 echo "${ECHO_T}no" >&6
1646 fi
1647
1648     test -n "$CC" && break
1649   done
1650 fi
1651 if test -z "$CC"; then
1652   ac_ct_CC=$CC
1653   for ac_prog in $cf_prog_cc
1654 do
1655   # Extract the first word of "$ac_prog", so it can be a program name with args.
1656 set dummy $ac_prog; ac_word=$2
1657 echo "$as_me:1657: checking for $ac_word" >&5
1658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1659 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1660   echo $ECHO_N "(cached) $ECHO_C" >&6
1661 else
1662   if test -n "$ac_ct_CC"; then
1663   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1664 else
1665   ac_save_IFS=$IFS; IFS=$ac_path_separator
1666 ac_dummy="$PATH"
1667 for ac_dir in $ac_dummy; do
1668   IFS=$ac_save_IFS
1669   test -z "$ac_dir" && ac_dir=.
1670   $as_executable_p "$ac_dir/$ac_word" || continue
1671 ac_cv_prog_ac_ct_CC="$ac_prog"
1672 echo "$as_me:1672: found $ac_dir/$ac_word" >&5
1673 break
1674 done
1675
1676 fi
1677 fi
1678 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1679 if test -n "$ac_ct_CC"; then
1680   echo "$as_me:1680: result: $ac_ct_CC" >&5
1681 echo "${ECHO_T}$ac_ct_CC" >&6
1682 else
1683   echo "$as_me:1683: result: no" >&5
1684 echo "${ECHO_T}no" >&6
1685 fi
1686
1687   test -n "$ac_ct_CC" && break
1688 done
1689
1690   CC=$ac_ct_CC
1691 fi
1692
1693 test -z "$CC" && { { echo "$as_me:1693: error: no acceptable cc found in \$PATH" >&5
1694 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1695    { (exit 1); exit 1; }; }
1696
1697 # Provide some information about the compiler.
1698 echo "$as_me:1698:" \
1699      "checking for C compiler version" >&5
1700 ac_compiler=`set X $ac_compile; echo $2`
1701 { (eval echo "$as_me:1701: \"$ac_compiler --version </dev/null >&5\"") >&5
1702   (eval $ac_compiler --version </dev/null >&5) 2>&5
1703   ac_status=$?
1704   echo "$as_me:1704: \$? = $ac_status" >&5
1705   (exit $ac_status); }
1706 { (eval echo "$as_me:1706: \"$ac_compiler -v </dev/null >&5\"") >&5
1707   (eval $ac_compiler -v </dev/null >&5) 2>&5
1708   ac_status=$?
1709   echo "$as_me:1709: \$? = $ac_status" >&5
1710   (exit $ac_status); }
1711 { (eval echo "$as_me:1711: \"$ac_compiler -V </dev/null >&5\"") >&5
1712   (eval $ac_compiler -V </dev/null >&5) 2>&5
1713   ac_status=$?
1714   echo "$as_me:1714: \$? = $ac_status" >&5
1715   (exit $ac_status); }
1716
1717 cat >conftest.$ac_ext <<_ACEOF
1718 #line 1718 "configure"
1719 #include "confdefs.h"
1720
1721 int
1722 main (void)
1723 {
1724
1725   ;
1726   return 0;
1727 }
1728 _ACEOF
1729 ac_clean_files_save=$ac_clean_files
1730 ac_clean_files="$ac_clean_files a.out a.exe"
1731 # Try to create an executable without -o first, disregard a.out.
1732 # It will help us diagnose broken compilers, and finding out an intuition
1733 # of exeext.
1734 echo "$as_me:1734: checking for C compiler default output" >&5
1735 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1736 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1737 if { (eval echo "$as_me:1737: \"$ac_link_default\"") >&5
1738   (eval $ac_link_default) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); }; then
1742   # Find the output, starting from the most likely.  This scheme is
1743 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1744 # resort.
1745 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1746                 ls a.out conftest 2>/dev/null;
1747                 ls a.* conftest.* 2>/dev/null`; do
1748   case $ac_file in
1749     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1750     a.out ) # We found the default executable, but exeext='' is most
1751             # certainly right.
1752             break;;
1753     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1754           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1755           export ac_cv_exeext
1756           break;;
1757     * ) break;;
1758   esac
1759 done
1760 else
1761   echo "$as_me: failed program was:" >&5
1762 cat conftest.$ac_ext >&5
1763 { { echo "$as_me:1763: error: C compiler cannot create executables" >&5
1764 echo "$as_me: error: C compiler cannot create executables" >&2;}
1765    { (exit 77); exit 77; }; }
1766 fi
1767
1768 ac_exeext=$ac_cv_exeext
1769 echo "$as_me:1769: result: $ac_file" >&5
1770 echo "${ECHO_T}$ac_file" >&6
1771
1772 # Check the compiler produces executables we can run.  If not, either
1773 # the compiler is broken, or we cross compile.
1774 echo "$as_me:1774: checking whether the C compiler works" >&5
1775 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1776 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1777 # If not cross compiling, check that we can run a simple program.
1778 if test "$cross_compiling" != yes; then
1779   if { ac_try='./$ac_file'
1780   { (eval echo "$as_me:1780: \"$ac_try\"") >&5
1781   (eval $ac_try) 2>&5
1782   ac_status=$?
1783   echo "$as_me:1783: \$? = $ac_status" >&5
1784   (exit $ac_status); }; }; then
1785     cross_compiling=no
1786   else
1787     if test "$cross_compiling" = maybe; then
1788         cross_compiling=yes
1789     else
1790         { { echo "$as_me:1790: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&5
1792 echo "$as_me: error: cannot run C compiled programs.
1793 If you meant to cross compile, use \`--host'." >&2;}
1794    { (exit 1); exit 1; }; }
1795     fi
1796   fi
1797 fi
1798 echo "$as_me:1798: result: yes" >&5
1799 echo "${ECHO_T}yes" >&6
1800
1801 rm -f a.out a.exe conftest$ac_cv_exeext
1802 ac_clean_files=$ac_clean_files_save
1803 # Check the compiler produces executables we can run.  If not, either
1804 # the compiler is broken, or we cross compile.
1805 echo "$as_me:1805: checking whether we are cross compiling" >&5
1806 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1807 echo "$as_me:1807: result: $cross_compiling" >&5
1808 echo "${ECHO_T}$cross_compiling" >&6
1809
1810 echo "$as_me:1810: checking for executable suffix" >&5
1811 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1812 if { (eval echo "$as_me:1812: \"$ac_link\"") >&5
1813   (eval $ac_link) 2>&5
1814   ac_status=$?
1815   echo "$as_me:1815: \$? = $ac_status" >&5
1816   (exit $ac_status); }; then
1817   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1818 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1819 # work properly (i.e., refer to `conftest.exe'), while it won't with
1820 # `rm'.
1821 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1822   case $ac_file in
1823     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1824     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1825           export ac_cv_exeext
1826           break;;
1827     * ) break;;
1828   esac
1829 done
1830 else
1831   { { echo "$as_me:1831: error: cannot compute EXEEXT: cannot compile and link" >&5
1832 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1833    { (exit 1); exit 1; }; }
1834 fi
1835
1836 rm -f conftest$ac_cv_exeext
1837 echo "$as_me:1837: result: $ac_cv_exeext" >&5
1838 echo "${ECHO_T}$ac_cv_exeext" >&6
1839
1840 rm -f conftest.$ac_ext
1841 EXEEXT=$ac_cv_exeext
1842 ac_exeext=$EXEEXT
1843 echo "$as_me:1843: checking for object suffix" >&5
1844 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1845 if test "${ac_cv_objext+set}" = set; then
1846   echo $ECHO_N "(cached) $ECHO_C" >&6
1847 else
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851
1852 int
1853 main (void)
1854 {
1855
1856   ;
1857   return 0;
1858 }
1859 _ACEOF
1860 rm -f conftest.o conftest.obj
1861 if { (eval echo "$as_me:1861: \"$ac_compile\"") >&5
1862   (eval $ac_compile) 2>&5
1863   ac_status=$?
1864   echo "$as_me:1864: \$? = $ac_status" >&5
1865   (exit $ac_status); }; then
1866   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1867   case $ac_file in
1868     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1869     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1870        break;;
1871   esac
1872 done
1873 else
1874   echo "$as_me: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 { { echo "$as_me:1876: error: cannot compute OBJEXT: cannot compile" >&5
1877 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1878    { (exit 1); exit 1; }; }
1879 fi
1880
1881 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1882 fi
1883 echo "$as_me:1883: result: $ac_cv_objext" >&5
1884 echo "${ECHO_T}$ac_cv_objext" >&6
1885 OBJEXT=$ac_cv_objext
1886 ac_objext=$OBJEXT
1887 echo "$as_me:1887: checking whether we are using the GNU C compiler" >&5
1888 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1889 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1890   echo $ECHO_N "(cached) $ECHO_C" >&6
1891 else
1892   cat >conftest.$ac_ext <<_ACEOF
1893 #line 1893 "configure"
1894 #include "confdefs.h"
1895
1896 int
1897 main (void)
1898 {
1899 #ifndef __GNUC__
1900        choke me
1901 #endif
1902
1903   ;
1904   return 0;
1905 }
1906 _ACEOF
1907 rm -f conftest.$ac_objext
1908 if { (eval echo "$as_me:1908: \"$ac_compile\"") >&5
1909   (eval $ac_compile) 2>&5
1910   ac_status=$?
1911   echo "$as_me:1911: \$? = $ac_status" >&5
1912   (exit $ac_status); } &&
1913          { ac_try='test -s conftest.$ac_objext'
1914   { (eval echo "$as_me:1914: \"$ac_try\"") >&5
1915   (eval $ac_try) 2>&5
1916   ac_status=$?
1917   echo "$as_me:1917: \$? = $ac_status" >&5
1918   (exit $ac_status); }; }; then
1919   ac_compiler_gnu=yes
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat conftest.$ac_ext >&5
1923 ac_compiler_gnu=no
1924 fi
1925 rm -f conftest.$ac_objext conftest.$ac_ext
1926 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1927
1928 fi
1929 echo "$as_me:1929: result: $ac_cv_c_compiler_gnu" >&5
1930 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1931 GCC=`test $ac_compiler_gnu = yes && echo yes`
1932 ac_test_CFLAGS=${CFLAGS+set}
1933 ac_save_CFLAGS=$CFLAGS
1934 CFLAGS="-g"
1935 echo "$as_me:1935: checking whether $CC accepts -g" >&5
1936 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1937 if test "${ac_cv_prog_cc_g+set}" = set; then
1938   echo $ECHO_N "(cached) $ECHO_C" >&6
1939 else
1940   cat >conftest.$ac_ext <<_ACEOF
1941 #line 1941 "configure"
1942 #include "confdefs.h"
1943
1944 int
1945 main (void)
1946 {
1947
1948   ;
1949   return 0;
1950 }
1951 _ACEOF
1952 rm -f conftest.$ac_objext
1953 if { (eval echo "$as_me:1953: \"$ac_compile\"") >&5
1954   (eval $ac_compile) 2>&5
1955   ac_status=$?
1956   echo "$as_me:1956: \$? = $ac_status" >&5
1957   (exit $ac_status); } &&
1958          { ac_try='test -s conftest.$ac_objext'
1959   { (eval echo "$as_me:1959: \"$ac_try\"") >&5
1960   (eval $ac_try) 2>&5
1961   ac_status=$?
1962   echo "$as_me:1962: \$? = $ac_status" >&5
1963   (exit $ac_status); }; }; then
1964   ac_cv_prog_cc_g=yes
1965 else
1966   echo "$as_me: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 ac_cv_prog_cc_g=no
1969 fi
1970 rm -f conftest.$ac_objext conftest.$ac_ext
1971 fi
1972 echo "$as_me:1972: result: $ac_cv_prog_cc_g" >&5
1973 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1974 if test "$ac_test_CFLAGS" = set; then
1975   CFLAGS=$ac_save_CFLAGS
1976 elif test $ac_cv_prog_cc_g = yes; then
1977   if test "$GCC" = yes; then
1978     CFLAGS="-g -O2"
1979   else
1980     CFLAGS="-g"
1981   fi
1982 else
1983   if test "$GCC" = yes; then
1984     CFLAGS="-O2"
1985   else
1986     CFLAGS=
1987   fi
1988 fi
1989 # Some people use a C++ compiler to compile C.  Since we use `exit',
1990 # in C++ we need to declare it.  In case someone uses the same compiler
1991 # for both compiling C and C++ we need to have the C++ compiler decide
1992 # the declaration of exit, since it's the most demanding environment.
1993 cat >conftest.$ac_ext <<_ACEOF
1994 #ifndef __cplusplus
1995   choke me
1996 #endif
1997 _ACEOF
1998 rm -f conftest.$ac_objext
1999 if { (eval echo "$as_me:1999: \"$ac_compile\"") >&5
2000   (eval $ac_compile) 2>&5
2001   ac_status=$?
2002   echo "$as_me:2002: \$? = $ac_status" >&5
2003   (exit $ac_status); } &&
2004          { ac_try='test -s conftest.$ac_objext'
2005   { (eval echo "$as_me:2005: \"$ac_try\"") >&5
2006   (eval $ac_try) 2>&5
2007   ac_status=$?
2008   echo "$as_me:2008: \$? = $ac_status" >&5
2009   (exit $ac_status); }; }; then
2010   for ac_declaration in \
2011    ''\
2012    '#include <stdlib.h>' \
2013    'extern "C" void std::exit (int) throw (); using std::exit;' \
2014    'extern "C" void std::exit (int); using std::exit;' \
2015    'extern "C" void exit (int) throw ();' \
2016    'extern "C" void exit (int);' \
2017    'void exit (int);'
2018 do
2019   cat >conftest.$ac_ext <<_ACEOF
2020 #line 2020 "configure"
2021 #include "confdefs.h"
2022 #include <stdlib.h>
2023 $ac_declaration
2024 int
2025 main (void)
2026 {
2027 exit (42);
2028   ;
2029   return 0;
2030 }
2031 _ACEOF
2032 rm -f conftest.$ac_objext
2033 if { (eval echo "$as_me:2033: \"$ac_compile\"") >&5
2034   (eval $ac_compile) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit $ac_status); } &&
2038          { ac_try='test -s conftest.$ac_objext'
2039   { (eval echo "$as_me:2039: \"$ac_try\"") >&5
2040   (eval $ac_try) 2>&5
2041   ac_status=$?
2042   echo "$as_me:2042: \$? = $ac_status" >&5
2043   (exit $ac_status); }; }; then
2044   :
2045 else
2046   echo "$as_me: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
2048 continue
2049 fi
2050 rm -f conftest.$ac_objext conftest.$ac_ext
2051   cat >conftest.$ac_ext <<_ACEOF
2052 #line 2052 "configure"
2053 #include "confdefs.h"
2054 $ac_declaration
2055 int
2056 main (void)
2057 {
2058 exit (42);
2059   ;
2060   return 0;
2061 }
2062 _ACEOF
2063 rm -f conftest.$ac_objext
2064 if { (eval echo "$as_me:2064: \"$ac_compile\"") >&5
2065   (eval $ac_compile) 2>&5
2066   ac_status=$?
2067   echo "$as_me:2067: \$? = $ac_status" >&5
2068   (exit $ac_status); } &&
2069          { ac_try='test -s conftest.$ac_objext'
2070   { (eval echo "$as_me:2070: \"$ac_try\"") >&5
2071   (eval $ac_try) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit $ac_status); }; }; then
2075   break
2076 else
2077   echo "$as_me: failed program was:" >&5
2078 cat conftest.$ac_ext >&5
2079 fi
2080 rm -f conftest.$ac_objext conftest.$ac_ext
2081 done
2082 rm -rf conftest*
2083 if test -n "$ac_declaration"; then
2084   echo '#ifdef __cplusplus' >>confdefs.h
2085   echo $ac_declaration      >>confdefs.h
2086   echo '#endif'             >>confdefs.h
2087 fi
2088
2089 else
2090   echo "$as_me: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
2092 fi
2093 rm -f conftest.$ac_objext conftest.$ac_ext
2094 ac_ext=c
2095 ac_cpp='$CPP $CPPFLAGS'
2096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2099 ac_main_return=return
2100
2101 GCC_VERSION=none
2102 if test "$GCC" = yes ; then
2103         echo "$as_me:2103: checking version of $CC" >&5
2104 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2105         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.].*//'`"
2106         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2107         echo "$as_me:2107: result: $GCC_VERSION" >&5
2108 echo "${ECHO_T}$GCC_VERSION" >&6
2109 fi
2110
2111 echo "$as_me:2111: checking for $CC option to accept ANSI C" >&5
2112 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2113 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2114   echo $ECHO_N "(cached) $ECHO_C" >&6
2115 else
2116   ac_cv_prog_cc_stdc=no
2117 ac_save_CC=$CC
2118 cat >conftest.$ac_ext <<_ACEOF
2119 #line 2119 "configure"
2120 #include "confdefs.h"
2121 #include <stdarg.h>
2122 #include <stdio.h>
2123 #include <sys/types.h>
2124 #include <sys/stat.h>
2125 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2126 struct buf { int x; };
2127 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2128 static char *e (p, i)
2129      char **p;
2130      int i;
2131 {
2132   return p[i];
2133 }
2134 static char *f (char * (*g) (char **, int), char **p, ...)
2135 {
2136   char *s;
2137   va_list v;
2138   va_start (v,p);
2139   s = g (p, va_arg (v,int));
2140   va_end (v);
2141   return s;
2142 }
2143 int test (int i, double x);
2144 struct s1 {int (*f) (int a);};
2145 struct s2 {int (*f) (double a);};
2146 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2147 int argc;
2148 char **argv;
2149 int
2150 main (void)
2151 {
2152 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2153   ;
2154   return 0;
2155 }
2156 _ACEOF
2157 # Don't try gcc -ansi; that turns off useful extensions and
2158 # breaks some systems' header files.
2159 # AIX                   -qlanglvl=ansi
2160 # Ultrix and OSF/1      -std1
2161 # HP-UX 10.20 and later -Ae
2162 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2163 # SVR4                  -Xc -D__EXTENSIONS__
2164 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2165 do
2166   CC="$ac_save_CC $ac_arg"
2167   rm -f conftest.$ac_objext
2168 if { (eval echo "$as_me:2168: \"$ac_compile\"") >&5
2169   (eval $ac_compile) 2>&5
2170   ac_status=$?
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } &&
2173          { ac_try='test -s conftest.$ac_objext'
2174   { (eval echo "$as_me:2174: \"$ac_try\"") >&5
2175   (eval $ac_try) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit $ac_status); }; }; then
2179   ac_cv_prog_cc_stdc=$ac_arg
2180 break
2181 else
2182   echo "$as_me: failed program was:" >&5
2183 cat conftest.$ac_ext >&5
2184 fi
2185 rm -f conftest.$ac_objext
2186 done
2187 rm -f conftest.$ac_ext conftest.$ac_objext
2188 CC=$ac_save_CC
2189
2190 fi
2191
2192 case "x$ac_cv_prog_cc_stdc" in
2193   x|xno)
2194     echo "$as_me:2194: result: none needed" >&5
2195 echo "${ECHO_T}none needed" >&6 ;;
2196   *)
2197     echo "$as_me:2197: result: $ac_cv_prog_cc_stdc" >&5
2198 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2199     CC="$CC $ac_cv_prog_cc_stdc" ;;
2200 esac
2201
2202 # This should have been defined by AC_PROG_CC
2203 : ${CC:=cc}
2204
2205 echo "$as_me:2205: checking \$CFLAGS variable" >&5
2206 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2207 case "x$CFLAGS" in
2208 (*-[IUD]*)
2209         echo "$as_me:2209: result: broken" >&5
2210 echo "${ECHO_T}broken" >&6
2211         { echo "$as_me:2211: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2212 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2213         cf_flags="$CFLAGS"
2214         CFLAGS=
2215         for cf_arg in $cf_flags
2216         do
2217
2218 cf_fix_cppflags=no
2219 cf_new_cflags=
2220 cf_new_cppflags=
2221 cf_new_extra_cppflags=
2222
2223 for cf_add_cflags in $cf_arg
2224 do
2225 case $cf_fix_cppflags in
2226 (no)
2227         case $cf_add_cflags in
2228         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2229                 case $cf_add_cflags in
2230                 (-D*)
2231                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2232
2233                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2234                                 && test -z "${cf_tst_cflags}" \
2235                                 && cf_fix_cppflags=yes
2236
2237                         if test $cf_fix_cppflags = yes ; then
2238
2239         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2240         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2241
2242                                 continue
2243                         elif test "${cf_tst_cflags}" = "\"'" ; then
2244
2245         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2246         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2247
2248                                 continue
2249                         fi
2250                         ;;
2251                 esac
2252                 case "$CPPFLAGS" in
2253                 (*$cf_add_cflags)
2254                         ;;
2255                 (*)
2256                         case $cf_add_cflags in
2257                         (-D*)
2258                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2259
2260 CPPFLAGS=`echo "$CPPFLAGS" | \
2261         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2262                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2263
2264                                 ;;
2265                         esac
2266
2267         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2268         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2269
2270                         ;;
2271                 esac
2272                 ;;
2273         (*)
2274
2275         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2276         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2277
2278                 ;;
2279         esac
2280         ;;
2281 (yes)
2282
2283         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2284         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2285
2286         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2287
2288         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2289                 && test -z "${cf_tst_cflags}" \
2290                 && cf_fix_cppflags=no
2291         ;;
2292 esac
2293 done
2294
2295 if test -n "$cf_new_cflags" ; then
2296
2297         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2298         CFLAGS="${CFLAGS}$cf_new_cflags"
2299
2300 fi
2301
2302 if test -n "$cf_new_cppflags" ; then
2303
2304         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2305         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2306
2307 fi
2308
2309 if test -n "$cf_new_extra_cppflags" ; then
2310
2311         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2312         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2313
2314 fi
2315
2316         done
2317         ;;
2318 (*)
2319         echo "$as_me:2319: result: ok" >&5
2320 echo "${ECHO_T}ok" >&6
2321         ;;
2322 esac
2323
2324 echo "$as_me:2324: checking \$CC variable" >&5
2325 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2326 case "$CC" in
2327 (*[\ \  ]-*)
2328         echo "$as_me:2328: result: broken" >&5
2329 echo "${ECHO_T}broken" >&6
2330         { echo "$as_me:2330: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2331 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2332         # humor him...
2333         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2334         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2335         CC="$cf_prog"
2336         for cf_arg in $cf_flags
2337         do
2338                 case "x$cf_arg" in
2339                 (x-[IUDfgOW]*)
2340
2341 cf_fix_cppflags=no
2342 cf_new_cflags=
2343 cf_new_cppflags=
2344 cf_new_extra_cppflags=
2345
2346 for cf_add_cflags in $cf_arg
2347 do
2348 case $cf_fix_cppflags in
2349 (no)
2350         case $cf_add_cflags in
2351         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2352                 case $cf_add_cflags in
2353                 (-D*)
2354                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2355
2356                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2357                                 && test -z "${cf_tst_cflags}" \
2358                                 && cf_fix_cppflags=yes
2359
2360                         if test $cf_fix_cppflags = yes ; then
2361
2362         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2363         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2364
2365                                 continue
2366                         elif test "${cf_tst_cflags}" = "\"'" ; then
2367
2368         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2369         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2370
2371                                 continue
2372                         fi
2373                         ;;
2374                 esac
2375                 case "$CPPFLAGS" in
2376                 (*$cf_add_cflags)
2377                         ;;
2378                 (*)
2379                         case $cf_add_cflags in
2380                         (-D*)
2381                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2382
2383 CPPFLAGS=`echo "$CPPFLAGS" | \
2384         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2385                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2386
2387                                 ;;
2388                         esac
2389
2390         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2391         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2392
2393                         ;;
2394                 esac
2395                 ;;
2396         (*)
2397
2398         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2399         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2400
2401                 ;;
2402         esac
2403         ;;
2404 (yes)
2405
2406         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2407         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2408
2409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2410
2411         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2412                 && test -z "${cf_tst_cflags}" \
2413                 && cf_fix_cppflags=no
2414         ;;
2415 esac
2416 done
2417
2418 if test -n "$cf_new_cflags" ; then
2419
2420         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2421         CFLAGS="${CFLAGS}$cf_new_cflags"
2422
2423 fi
2424
2425 if test -n "$cf_new_cppflags" ; then
2426
2427         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2428         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2429
2430 fi
2431
2432 if test -n "$cf_new_extra_cppflags" ; then
2433
2434         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2435         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2436
2437 fi
2438
2439                         ;;
2440                 (*)
2441                         CC="$CC $cf_arg"
2442                         ;;
2443                 esac
2444         done
2445         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2446
2447 echo "${as_me:-configure}:2447: testing resulting CC: '$CC' ..." 1>&5
2448
2449         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2450
2451 echo "${as_me:-configure}:2451: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2452
2453         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2454
2455 echo "${as_me:-configure}:2455: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2456
2457         ;;
2458 (*)
2459         echo "$as_me:2459: result: ok" >&5
2460 echo "${ECHO_T}ok" >&6
2461         ;;
2462 esac
2463
2464 ac_ext=c
2465 ac_cpp='$CPP $CPPFLAGS'
2466 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2467 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2468 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2469 ac_main_return=return
2470 echo "$as_me:2470: checking how to run the C preprocessor" >&5
2471 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2472 # On Suns, sometimes $CPP names a directory.
2473 if test -n "$CPP" && test -d "$CPP"; then
2474   CPP=
2475 fi
2476 if test -z "$CPP"; then
2477   if test "${ac_cv_prog_CPP+set}" = set; then
2478   echo $ECHO_N "(cached) $ECHO_C" >&6
2479 else
2480       # Double quotes because CPP needs to be expanded
2481     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2482     do
2483       ac_preproc_ok=false
2484 for ac_c_preproc_warn_flag in '' yes
2485 do
2486   # Use a header file that comes with gcc, so configuring glibc
2487   # with a fresh cross-compiler works.
2488   # On the NeXT, cc -E runs the code through the compiler's parser,
2489   # not just through cpp. "Syntax error" is here to catch this case.
2490   cat >conftest.$ac_ext <<_ACEOF
2491 #line 2491 "configure"
2492 #include "confdefs.h"
2493 #include <assert.h>
2494                      Syntax error
2495 _ACEOF
2496 if { (eval echo "$as_me:2496: \"$ac_cpp conftest.$ac_ext\"") >&5
2497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2498   ac_status=$?
2499   egrep -v '^ *\+' conftest.er1 >conftest.err
2500   rm -f conftest.er1
2501   cat conftest.err >&5
2502   echo "$as_me:2502: \$? = $ac_status" >&5
2503   (exit $ac_status); } >/dev/null; then
2504   if test -s conftest.err; then
2505     ac_cpp_err=$ac_c_preproc_warn_flag
2506   else
2507     ac_cpp_err=
2508   fi
2509 else
2510   ac_cpp_err=yes
2511 fi
2512 if test -z "$ac_cpp_err"; then
2513   :
2514 else
2515   echo "$as_me: failed program was:" >&5
2516   cat conftest.$ac_ext >&5
2517   # Broken: fails on valid input.
2518 continue
2519 fi
2520 rm -f conftest.err conftest.$ac_ext
2521
2522   # OK, works on sane cases.  Now check whether non-existent headers
2523   # can be detected and how.
2524   cat >conftest.$ac_ext <<_ACEOF
2525 #line 2525 "configure"
2526 #include "confdefs.h"
2527 #include <ac_nonexistent.h>
2528 _ACEOF
2529 if { (eval echo "$as_me:2529: \"$ac_cpp conftest.$ac_ext\"") >&5
2530   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2531   ac_status=$?
2532   egrep -v '^ *\+' conftest.er1 >conftest.err
2533   rm -f conftest.er1
2534   cat conftest.err >&5
2535   echo "$as_me:2535: \$? = $ac_status" >&5
2536   (exit $ac_status); } >/dev/null; then
2537   if test -s conftest.err; then
2538     ac_cpp_err=$ac_c_preproc_warn_flag
2539   else
2540     ac_cpp_err=
2541   fi
2542 else
2543   ac_cpp_err=yes
2544 fi
2545 if test -z "$ac_cpp_err"; then
2546   # Broken: success on invalid input.
2547 continue
2548 else
2549   echo "$as_me: failed program was:" >&5
2550   cat conftest.$ac_ext >&5
2551   # Passes both tests.
2552 ac_preproc_ok=:
2553 break
2554 fi
2555 rm -f conftest.err conftest.$ac_ext
2556
2557 done
2558 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2559 rm -f conftest.err conftest.$ac_ext
2560 if $ac_preproc_ok; then
2561   break
2562 fi
2563
2564     done
2565     ac_cv_prog_CPP=$CPP
2566
2567 fi
2568   CPP=$ac_cv_prog_CPP
2569 else
2570   ac_cv_prog_CPP=$CPP
2571 fi
2572 echo "$as_me:2572: result: $CPP" >&5
2573 echo "${ECHO_T}$CPP" >&6
2574 ac_preproc_ok=false
2575 for ac_c_preproc_warn_flag in '' yes
2576 do
2577   # Use a header file that comes with gcc, so configuring glibc
2578   # with a fresh cross-compiler works.
2579   # On the NeXT, cc -E runs the code through the compiler's parser,
2580   # not just through cpp. "Syntax error" is here to catch this case.
2581   cat >conftest.$ac_ext <<_ACEOF
2582 #line 2582 "configure"
2583 #include "confdefs.h"
2584 #include <assert.h>
2585                      Syntax error
2586 _ACEOF
2587 if { (eval echo "$as_me:2587: \"$ac_cpp conftest.$ac_ext\"") >&5
2588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2589   ac_status=$?
2590   egrep -v '^ *\+' conftest.er1 >conftest.err
2591   rm -f conftest.er1
2592   cat conftest.err >&5
2593   echo "$as_me:2593: \$? = $ac_status" >&5
2594   (exit $ac_status); } >/dev/null; then
2595   if test -s conftest.err; then
2596     ac_cpp_err=$ac_c_preproc_warn_flag
2597   else
2598     ac_cpp_err=
2599   fi
2600 else
2601   ac_cpp_err=yes
2602 fi
2603 if test -z "$ac_cpp_err"; then
2604   :
2605 else
2606   echo "$as_me: failed program was:" >&5
2607   cat conftest.$ac_ext >&5
2608   # Broken: fails on valid input.
2609 continue
2610 fi
2611 rm -f conftest.err conftest.$ac_ext
2612
2613   # OK, works on sane cases.  Now check whether non-existent headers
2614   # can be detected and how.
2615   cat >conftest.$ac_ext <<_ACEOF
2616 #line 2616 "configure"
2617 #include "confdefs.h"
2618 #include <ac_nonexistent.h>
2619 _ACEOF
2620 if { (eval echo "$as_me:2620: \"$ac_cpp conftest.$ac_ext\"") >&5
2621   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2622   ac_status=$?
2623   egrep -v '^ *\+' conftest.er1 >conftest.err
2624   rm -f conftest.er1
2625   cat conftest.err >&5
2626   echo "$as_me:2626: \$? = $ac_status" >&5
2627   (exit $ac_status); } >/dev/null; then
2628   if test -s conftest.err; then
2629     ac_cpp_err=$ac_c_preproc_warn_flag
2630   else
2631     ac_cpp_err=
2632   fi
2633 else
2634   ac_cpp_err=yes
2635 fi
2636 if test -z "$ac_cpp_err"; then
2637   # Broken: success on invalid input.
2638 continue
2639 else
2640   echo "$as_me: failed program was:" >&5
2641   cat conftest.$ac_ext >&5
2642   # Passes both tests.
2643 ac_preproc_ok=:
2644 break
2645 fi
2646 rm -f conftest.err conftest.$ac_ext
2647
2648 done
2649 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2650 rm -f conftest.err conftest.$ac_ext
2651 if $ac_preproc_ok; then
2652   :
2653 else
2654   { { echo "$as_me:2654: error: C preprocessor \"$CPP\" fails sanity check" >&5
2655 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2656    { (exit 1); exit 1; }; }
2657 fi
2658
2659 ac_ext=c
2660 ac_cpp='$CPP $CPPFLAGS'
2661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2664 ac_main_return=return
2665
2666 if test $ac_cv_c_compiler_gnu = yes; then
2667     echo "$as_me:2667: checking whether $CC needs -traditional" >&5
2668 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2669 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2670   echo $ECHO_N "(cached) $ECHO_C" >&6
2671 else
2672     ac_pattern="Autoconf.*'x'"
2673   cat >conftest.$ac_ext <<_ACEOF
2674 #line 2674 "configure"
2675 #include "confdefs.h"
2676 #include <sgtty.h>
2677 int Autoconf = TIOCGETP;
2678 _ACEOF
2679 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2680   egrep "$ac_pattern" >/dev/null 2>&1; then
2681   ac_cv_prog_gcc_traditional=yes
2682 else
2683   ac_cv_prog_gcc_traditional=no
2684 fi
2685 rm -rf conftest*
2686
2687   if test $ac_cv_prog_gcc_traditional = no; then
2688     cat >conftest.$ac_ext <<_ACEOF
2689 #line 2689 "configure"
2690 #include "confdefs.h"
2691 #include <termio.h>
2692 int Autoconf = TCGETA;
2693 _ACEOF
2694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2695   egrep "$ac_pattern" >/dev/null 2>&1; then
2696   ac_cv_prog_gcc_traditional=yes
2697 fi
2698 rm -rf conftest*
2699
2700   fi
2701 fi
2702 echo "$as_me:2702: result: $ac_cv_prog_gcc_traditional" >&5
2703 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2704   if test $ac_cv_prog_gcc_traditional = yes; then
2705     CC="$CC -traditional"
2706   fi
2707 fi
2708
2709 echo "$as_me:2709: checking whether $CC understands -c and -o together" >&5
2710 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2711 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2712   echo $ECHO_N "(cached) $ECHO_C" >&6
2713 else
2714
2715 cat > conftest.$ac_ext <<CF_EOF
2716 int main(void)
2717 {
2718         ${cf_cv_main_return:-return}(0);
2719 }
2720 CF_EOF
2721 # We do the test twice because some compilers refuse to overwrite an
2722 # existing .o file with -o, though they will create one.
2723 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2724 if { (eval echo "$as_me:2724: \"$ac_try\"") >&5
2725   (eval $ac_try) 2>&5
2726   ac_status=$?
2727   echo "$as_me:2727: \$? = $ac_status" >&5
2728   (exit $ac_status); } &&
2729   test -f conftest2.$ac_objext && { (eval echo "$as_me:2729: \"$ac_try\"") >&5
2730   (eval $ac_try) 2>&5
2731   ac_status=$?
2732   echo "$as_me:2732: \$? = $ac_status" >&5
2733   (exit $ac_status); };
2734 then
2735   eval cf_cv_prog_CC_c_o=yes
2736 else
2737   eval cf_cv_prog_CC_c_o=no
2738 fi
2739 rm -rf conftest*
2740
2741 fi
2742 if test $cf_cv_prog_CC_c_o = yes; then
2743   echo "$as_me:2743: result: yes" >&5
2744 echo "${ECHO_T}yes" >&6
2745 else
2746   echo "$as_me:2746: result: no" >&5
2747 echo "${ECHO_T}no" >&6
2748 fi
2749
2750 if test "$cross_compiling" = yes ; then
2751         LDCONFIG=:
2752 else
2753         case "$cf_cv_system_name" in
2754         (dragonfly*|mirbsd*|freebsd*)
2755                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2756                 ;;
2757         (*) LDPATH=$PATH:/sbin:/usr/sbin
2758                 # Extract the first word of "ldconfig", so it can be a program name with args.
2759 set dummy ldconfig; ac_word=$2
2760 echo "$as_me:2760: checking for $ac_word" >&5
2761 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2762 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2763   echo $ECHO_N "(cached) $ECHO_C" >&6
2764 else
2765   case $LDCONFIG in
2766   [\\/]* | ?:[\\/]*)
2767   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2768   ;;
2769   *)
2770   ac_save_IFS=$IFS; IFS=$ac_path_separator
2771 ac_dummy="$LDPATH"
2772 for ac_dir in $ac_dummy; do
2773   IFS=$ac_save_IFS
2774   test -z "$ac_dir" && ac_dir=.
2775   if $as_executable_p "$ac_dir/$ac_word"; then
2776    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2777    echo "$as_me:2777: found $ac_dir/$ac_word" >&5
2778    break
2779 fi
2780 done
2781
2782   ;;
2783 esac
2784 fi
2785 LDCONFIG=$ac_cv_path_LDCONFIG
2786
2787 if test -n "$LDCONFIG"; then
2788   echo "$as_me:2788: result: $LDCONFIG" >&5
2789 echo "${ECHO_T}$LDCONFIG" >&6
2790 else
2791   echo "$as_me:2791: result: no" >&5
2792 echo "${ECHO_T}no" >&6
2793 fi
2794
2795                 ;;
2796         esac
2797 fi
2798
2799 echo "$as_me:2799: checking if you want to ensure bool is consistent with C++" >&5
2800 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2801
2802 # Check whether --with-cxx or --without-cxx was given.
2803 if test "${with_cxx+set}" = set; then
2804   withval="$with_cxx"
2805   cf_with_cxx=$withval
2806 else
2807   cf_with_cxx=yes
2808 fi;
2809 echo "$as_me:2809: result: $cf_with_cxx" >&5
2810 echo "${ECHO_T}$cf_with_cxx" >&6
2811 if test "X$cf_with_cxx" = Xno ; then
2812         CXX=""
2813         GXX=""
2814 else
2815         # with autoconf 2.13, we can change the error to a warning:
2816                 ac_ext=cc
2817 ac_cpp='$CXXCPP $CPPFLAGS'
2818 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2819 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2820 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2821 ac_main_return=return
2822 if test -n "$ac_tool_prefix"; then
2823   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2824   do
2825     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2826 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2827 echo "$as_me:2827: checking for $ac_word" >&5
2828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2829 if test "${ac_cv_prog_CXX+set}" = set; then
2830   echo $ECHO_N "(cached) $ECHO_C" >&6
2831 else
2832   if test -n "$CXX"; then
2833   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2834 else
2835   ac_save_IFS=$IFS; IFS=$ac_path_separator
2836 ac_dummy="$PATH"
2837 for ac_dir in $ac_dummy; do
2838   IFS=$ac_save_IFS
2839   test -z "$ac_dir" && ac_dir=.
2840   $as_executable_p "$ac_dir/$ac_word" || continue
2841 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2842 echo "$as_me:2842: found $ac_dir/$ac_word" >&5
2843 break
2844 done
2845
2846 fi
2847 fi
2848 CXX=$ac_cv_prog_CXX
2849 if test -n "$CXX"; then
2850   echo "$as_me:2850: result: $CXX" >&5
2851 echo "${ECHO_T}$CXX" >&6
2852 else
2853   echo "$as_me:2853: result: no" >&5
2854 echo "${ECHO_T}no" >&6
2855 fi
2856
2857     test -n "$CXX" && break
2858   done
2859 fi
2860 if test -z "$CXX"; then
2861   ac_ct_CXX=$CXX
2862   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2863 do
2864   # Extract the first word of "$ac_prog", so it can be a program name with args.
2865 set dummy $ac_prog; ac_word=$2
2866 echo "$as_me:2866: checking for $ac_word" >&5
2867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2868 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   if test -n "$ac_ct_CXX"; then
2872   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2873 else
2874   ac_save_IFS=$IFS; IFS=$ac_path_separator
2875 ac_dummy="$PATH"
2876 for ac_dir in $ac_dummy; do
2877   IFS=$ac_save_IFS
2878   test -z "$ac_dir" && ac_dir=.
2879   $as_executable_p "$ac_dir/$ac_word" || continue
2880 ac_cv_prog_ac_ct_CXX="$ac_prog"
2881 echo "$as_me:2881: found $ac_dir/$ac_word" >&5
2882 break
2883 done
2884
2885 fi
2886 fi
2887 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2888 if test -n "$ac_ct_CXX"; then
2889   echo "$as_me:2889: result: $ac_ct_CXX" >&5
2890 echo "${ECHO_T}$ac_ct_CXX" >&6
2891 else
2892   echo "$as_me:2892: result: no" >&5
2893 echo "${ECHO_T}no" >&6
2894 fi
2895
2896   test -n "$ac_ct_CXX" && break
2897 done
2898 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2899
2900   CXX=$ac_ct_CXX
2901 fi
2902
2903 # Provide some information about the compiler.
2904 echo "$as_me:2904:" \
2905      "checking for C++ compiler version" >&5
2906 ac_compiler=`set X $ac_compile; echo $2`
2907 { (eval echo "$as_me:2907: \"$ac_compiler --version </dev/null >&5\"") >&5
2908   (eval $ac_compiler --version </dev/null >&5) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); }
2912 { (eval echo "$as_me:2912: \"$ac_compiler -v </dev/null >&5\"") >&5
2913   (eval $ac_compiler -v </dev/null >&5) 2>&5
2914   ac_status=$?
2915   echo "$as_me:2915: \$? = $ac_status" >&5
2916   (exit $ac_status); }
2917 { (eval echo "$as_me:2917: \"$ac_compiler -V </dev/null >&5\"") >&5
2918   (eval $ac_compiler -V </dev/null >&5) 2>&5
2919   ac_status=$?
2920   echo "$as_me:2920: \$? = $ac_status" >&5
2921   (exit $ac_status); }
2922
2923 echo "$as_me:2923: checking whether we are using the GNU C++ compiler" >&5
2924 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2925 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2926   echo $ECHO_N "(cached) $ECHO_C" >&6
2927 else
2928   cat >conftest.$ac_ext <<_ACEOF
2929 #line 2929 "configure"
2930 #include "confdefs.h"
2931
2932 int
2933 main (void)
2934 {
2935 #ifndef __GNUC__
2936        choke me
2937 #endif
2938
2939   ;
2940   return 0;
2941 }
2942 _ACEOF
2943 rm -f conftest.$ac_objext
2944 if { (eval echo "$as_me:2944: \"$ac_compile\"") >&5
2945   (eval $ac_compile) 2>&5
2946   ac_status=$?
2947   echo "$as_me:2947: \$? = $ac_status" >&5
2948   (exit $ac_status); } &&
2949          { ac_try='test -s conftest.$ac_objext'
2950   { (eval echo "$as_me:2950: \"$ac_try\"") >&5
2951   (eval $ac_try) 2>&5
2952   ac_status=$?
2953   echo "$as_me:2953: \$? = $ac_status" >&5
2954   (exit $ac_status); }; }; then
2955   ac_compiler_gnu=yes
2956 else
2957   echo "$as_me: failed program was:" >&5
2958 cat conftest.$ac_ext >&5
2959 ac_compiler_gnu=no
2960 fi
2961 rm -f conftest.$ac_objext conftest.$ac_ext
2962 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2963
2964 fi
2965 echo "$as_me:2965: result: $ac_cv_cxx_compiler_gnu" >&5
2966 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2967 GXX=`test $ac_compiler_gnu = yes && echo yes`
2968 ac_test_CXXFLAGS=${CXXFLAGS+set}
2969 ac_save_CXXFLAGS=$CXXFLAGS
2970 CXXFLAGS="-g"
2971 echo "$as_me:2971: checking whether $CXX accepts -g" >&5
2972 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2973 if test "${ac_cv_prog_cxx_g+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main (void)
2982 {
2983
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   ac_cv_prog_cxx_g=yes
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 ac_cv_prog_cxx_g=no
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007 fi
3008 echo "$as_me:3008: result: $ac_cv_prog_cxx_g" >&5
3009 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3010 if test "$ac_test_CXXFLAGS" = set; then
3011   CXXFLAGS=$ac_save_CXXFLAGS
3012 elif test $ac_cv_prog_cxx_g = yes; then
3013   if test "$GXX" = yes; then
3014     CXXFLAGS="-g -O2"
3015   else
3016     CXXFLAGS="-g"
3017   fi
3018 else
3019   if test "$GXX" = yes; then
3020     CXXFLAGS="-O2"
3021   else
3022     CXXFLAGS=
3023   fi
3024 fi
3025 for ac_declaration in \
3026    ''\
3027    '#include <stdlib.h>' \
3028    'extern "C" void std::exit (int) throw (); using std::exit;' \
3029    'extern "C" void std::exit (int); using std::exit;' \
3030    'extern "C" void exit (int) throw ();' \
3031    'extern "C" void exit (int);' \
3032    'void exit (int);'
3033 do
3034   cat >conftest.$ac_ext <<_ACEOF
3035 #line 3035 "configure"
3036 #include "confdefs.h"
3037 #include <stdlib.h>
3038 $ac_declaration
3039 int
3040 main (void)
3041 {
3042 exit (42);
3043   ;
3044   return 0;
3045 }
3046 _ACEOF
3047 rm -f conftest.$ac_objext
3048 if { (eval echo "$as_me:3048: \"$ac_compile\"") >&5
3049   (eval $ac_compile) 2>&5
3050   ac_status=$?
3051   echo "$as_me:3051: \$? = $ac_status" >&5
3052   (exit $ac_status); } &&
3053          { ac_try='test -s conftest.$ac_objext'
3054   { (eval echo "$as_me:3054: \"$ac_try\"") >&5
3055   (eval $ac_try) 2>&5
3056   ac_status=$?
3057   echo "$as_me:3057: \$? = $ac_status" >&5
3058   (exit $ac_status); }; }; then
3059   :
3060 else
3061   echo "$as_me: failed program was:" >&5
3062 cat conftest.$ac_ext >&5
3063 continue
3064 fi
3065 rm -f conftest.$ac_objext conftest.$ac_ext
3066   cat >conftest.$ac_ext <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3069 $ac_declaration
3070 int
3071 main (void)
3072 {
3073 exit (42);
3074   ;
3075   return 0;
3076 }
3077 _ACEOF
3078 rm -f conftest.$ac_objext
3079 if { (eval echo "$as_me:3079: \"$ac_compile\"") >&5
3080   (eval $ac_compile) 2>&5
3081   ac_status=$?
3082   echo "$as_me:3082: \$? = $ac_status" >&5
3083   (exit $ac_status); } &&
3084          { ac_try='test -s conftest.$ac_objext'
3085   { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3086   (eval $ac_try) 2>&5
3087   ac_status=$?
3088   echo "$as_me:3088: \$? = $ac_status" >&5
3089   (exit $ac_status); }; }; then
3090   break
3091 else
3092   echo "$as_me: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3094 fi
3095 rm -f conftest.$ac_objext conftest.$ac_ext
3096 done
3097 rm -rf conftest*
3098 if test -n "$ac_declaration"; then
3099   echo '#ifdef __cplusplus' >>confdefs.h
3100   echo $ac_declaration      >>confdefs.h
3101   echo '#endif'             >>confdefs.h
3102 fi
3103
3104 ac_ext=c
3105 ac_cpp='$CPP $CPPFLAGS'
3106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3109 ac_main_return=return
3110
3111         ac_ext=cc
3112 ac_cpp='$CXXCPP $CPPFLAGS'
3113 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3114 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3115 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3116 ac_main_return=return
3117
3118         if test "x$cf_with_cxx" != xno
3119         then
3120                 # Several of the C++ configurations do not work, particularly when
3121                 # cross-compiling (20140913 -TD)
3122                 echo "$as_me:3122: checking if $CXX works" >&5
3123 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3124
3125                 save_CPPFLAGS="$CPPFLAGS"
3126                 eval cf_includedir=${includedir}
3127                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3128
3129 cat >conftest.$ac_ext <<_ACEOF
3130 #line 3130 "configure"
3131 #include "confdefs.h"
3132
3133 #include <stdlib.h>
3134 #include <stdio.h>
3135
3136 int
3137 main (void)
3138 {
3139
3140                 printf("Hello world!\n")
3141
3142   ;
3143   return 0;
3144 }
3145 _ACEOF
3146 rm -f conftest.$ac_objext
3147 if { (eval echo "$as_me:3147: \"$ac_compile\"") >&5
3148   (eval $ac_compile) 2>&5
3149   ac_status=$?
3150   echo "$as_me:3150: \$? = $ac_status" >&5
3151   (exit $ac_status); } &&
3152          { ac_try='test -s conftest.$ac_objext'
3153   { (eval echo "$as_me:3153: \"$ac_try\"") >&5
3154   (eval $ac_try) 2>&5
3155   ac_status=$?
3156   echo "$as_me:3156: \$? = $ac_status" >&5
3157   (exit $ac_status); }; }; then
3158   cf_cxx_works=yes
3159 else
3160   echo "$as_me: failed program was:" >&5
3161 cat conftest.$ac_ext >&5
3162 cf_cxx_works=no
3163 fi
3164 rm -f conftest.$ac_objext conftest.$ac_ext
3165                 CPPFLAGS="$save_CPPFLAGS"
3166
3167                 echo "$as_me:3167: result: $cf_cxx_works" >&5
3168 echo "${ECHO_T}$cf_cxx_works" >&6
3169                 if test "x$cf_cxx_works" = xno
3170                 then
3171                         { echo "$as_me:3171: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3172 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3173                         cf_with_cxx=no; CXX=""; GXX="";
3174                 fi
3175         fi
3176         ac_ext=c
3177 ac_cpp='$CPP $CPPFLAGS'
3178 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3179 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3180 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3181 ac_main_return=return
3182
3183         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3184         if test "$CXX" = "g++" ; then
3185                 # Extract the first word of "g++", so it can be a program name with args.
3186 set dummy g++; ac_word=$2
3187 echo "$as_me:3187: checking for $ac_word" >&5
3188 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3189 if test "${ac_cv_path_CXX+set}" = set; then
3190   echo $ECHO_N "(cached) $ECHO_C" >&6
3191 else
3192   case $CXX in
3193   [\\/]* | ?:[\\/]*)
3194   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3195   ;;
3196   *)
3197   ac_save_IFS=$IFS; IFS=$ac_path_separator
3198 ac_dummy="$PATH"
3199 for ac_dir in $ac_dummy; do
3200   IFS=$ac_save_IFS
3201   test -z "$ac_dir" && ac_dir=.
3202   if $as_executable_p "$ac_dir/$ac_word"; then
3203    ac_cv_path_CXX="$ac_dir/$ac_word"
3204    echo "$as_me:3204: found $ac_dir/$ac_word" >&5
3205    break
3206 fi
3207 done
3208
3209   ;;
3210 esac
3211 fi
3212 CXX=$ac_cv_path_CXX
3213
3214 if test -n "$CXX"; then
3215   echo "$as_me:3215: result: $CXX" >&5
3216 echo "${ECHO_T}$CXX" >&6
3217 else
3218   echo "$as_me:3218: result: no" >&5
3219 echo "${ECHO_T}no" >&6
3220 fi
3221
3222         fi
3223         case "x$CXX" in
3224         (x|xg++)
3225                 { echo "$as_me:3225: WARNING: You don't have any C++ compiler, too bad" >&5
3226 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3227                 cf_with_cxx=no; CXX=""; GXX="";
3228                 ;;
3229         esac
3230 fi
3231
3232 GXX_VERSION=none
3233 if test "$GXX" = yes; then
3234         echo "$as_me:3234: checking version of ${CXX:-g++}" >&5
3235 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3236         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3237         if test -z "$GXX_VERSION"
3238         then
3239                 GXX_VERSION=unknown
3240                 GXX=no
3241         fi
3242         echo "$as_me:3242: result: $GXX_VERSION" >&5
3243 echo "${ECHO_T}$GXX_VERSION" >&6
3244 fi
3245
3246 case $GXX_VERSION in
3247 (1*|2.[0-6]*)
3248         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3249         # cf_cxx_library=no
3250         { echo "$as_me:3250: WARNING: templates do not work" >&5
3251 echo "$as_me: WARNING: templates do not work" >&2;}
3252         ;;
3253 esac
3254
3255 echo "$as_me:3255: checking if you want to build C++ binding and demo" >&5
3256 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3257
3258 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3259 if test "${with_cxx_binding+set}" = set; then
3260   withval="$with_cxx_binding"
3261   cf_with_cxx_binding=$withval
3262 else
3263   cf_with_cxx_binding=$cf_with_cxx
3264 fi;
3265 echo "$as_me:3265: result: $cf_with_cxx_binding" >&5
3266 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3267
3268 echo "$as_me:3268: checking if you want to build with Ada95" >&5
3269 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3270 echo "$as_me:3270: result: $cf_with_ada" >&5
3271 echo "${ECHO_T}$cf_with_ada" >&6
3272
3273 echo "$as_me:3273: checking if you want to install terminal database" >&5
3274 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3275
3276 # Check whether --enable-db-install or --disable-db-install was given.
3277 if test "${enable_db_install+set}" = set; then
3278   enableval="$enable_db_install"
3279   cf_with_db_install=$enableval
3280 else
3281   cf_with_db_install=yes
3282 fi;
3283 echo "$as_me:3283: result: $cf_with_db_install" >&5
3284 echo "${ECHO_T}$cf_with_db_install" >&6
3285
3286 echo "$as_me:3286: checking if you want to install manpages" >&5
3287 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3288
3289 # Check whether --with-manpages or --without-manpages was given.
3290 if test "${with_manpages+set}" = set; then
3291   withval="$with_manpages"
3292   cf_with_manpages=$withval
3293 else
3294   cf_with_manpages=yes
3295 fi;
3296 echo "$as_me:3296: result: $cf_with_manpages" >&5
3297 echo "${ECHO_T}$cf_with_manpages" >&6
3298
3299 echo "$as_me:3299: checking if you want to build programs such as tic" >&5
3300 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3301
3302 # Check whether --with-progs or --without-progs was given.
3303 if test "${with_progs+set}" = set; then
3304   withval="$with_progs"
3305   cf_with_progs=$withval
3306 else
3307   cf_with_progs=yes
3308 fi;
3309 echo "$as_me:3309: result: $cf_with_progs" >&5
3310 echo "${ECHO_T}$cf_with_progs" >&6
3311
3312 if test -f $srcdir/tack/tack.h; then
3313         if test "x$cross_compiling" = xyes ; then
3314                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3315
3316 echo "${as_me:-configure}:3316: testing ignoring tack because we are cross-compiling ..." 1>&5
3317
3318                 cf_with_tack=no
3319         else
3320                 echo "$as_me:3320: checking if you want to build the tack program" >&5
3321 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3322
3323 # Check whether --with-tack or --without-tack was given.
3324 if test "${with_tack+set}" = set; then
3325   withval="$with_tack"
3326   cf_with_tack=$withval
3327 else
3328   cf_with_tack=$cf_with_progs
3329 fi;
3330                 echo "$as_me:3330: result: $cf_with_tack" >&5
3331 echo "${ECHO_T}$cf_with_tack" >&6
3332         fi
3333 else
3334         cf_with_tack=no
3335 fi
3336
3337 echo "$as_me:3337: checking if you want to build test-programs" >&5
3338 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3339
3340 # Check whether --with-tests or --without-tests was given.
3341 if test "${with_tests+set}" = set; then
3342   withval="$with_tests"
3343   cf_with_tests=$withval
3344 else
3345   cf_with_tests=yes
3346 fi;
3347 echo "$as_me:3347: result: $cf_with_tests" >&5
3348 echo "${ECHO_T}$cf_with_tests" >&6
3349
3350 echo "$as_me:3350: checking if you wish to install curses.h" >&5
3351 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3352
3353 # Check whether --with-curses-h or --without-curses-h was given.
3354 if test "${with_curses_h+set}" = set; then
3355   withval="$with_curses_h"
3356   with_curses_h=$withval
3357 else
3358   with_curses_h=yes
3359 fi;
3360 echo "$as_me:3360: result: $with_curses_h" >&5
3361 echo "${ECHO_T}$with_curses_h" >&6
3362
3363 modules_to_build="ncurses"
3364 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3365 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3366 modules_to_build="$modules_to_build panel menu form"
3367
3368 test "$program_prefix" != NONE &&
3369   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3370 # Use a double $ so make ignores it.
3371 test "$program_suffix" != NONE &&
3372   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3373 # Double any \ or $.  echo might interpret backslashes.
3374 # By default was `s,x,x', remove it if useless.
3375 cat <<\_ACEOF >conftest.sed
3376 s/[\\$]/&&/g;s/;s,x,x,$//
3377 _ACEOF
3378 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3379 rm conftest.sed
3380
3381 for ac_prog in mawk gawk nawk awk
3382 do
3383   # Extract the first word of "$ac_prog", so it can be a program name with args.
3384 set dummy $ac_prog; ac_word=$2
3385 echo "$as_me:3385: checking for $ac_word" >&5
3386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3387 if test "${ac_cv_prog_AWK+set}" = set; then
3388   echo $ECHO_N "(cached) $ECHO_C" >&6
3389 else
3390   if test -n "$AWK"; then
3391   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3392 else
3393   ac_save_IFS=$IFS; IFS=$ac_path_separator
3394 ac_dummy="$PATH"
3395 for ac_dir in $ac_dummy; do
3396   IFS=$ac_save_IFS
3397   test -z "$ac_dir" && ac_dir=.
3398   $as_executable_p "$ac_dir/$ac_word" || continue
3399 ac_cv_prog_AWK="$ac_prog"
3400 echo "$as_me:3400: found $ac_dir/$ac_word" >&5
3401 break
3402 done
3403
3404 fi
3405 fi
3406 AWK=$ac_cv_prog_AWK
3407 if test -n "$AWK"; then
3408   echo "$as_me:3408: result: $AWK" >&5
3409 echo "${ECHO_T}$AWK" >&6
3410 else
3411   echo "$as_me:3411: result: no" >&5
3412 echo "${ECHO_T}no" >&6
3413 fi
3414
3415   test -n "$AWK" && break
3416 done
3417
3418 test -z "$AWK" && { { echo "$as_me:3418: error: No awk program found" >&5
3419 echo "$as_me: error: No awk program found" >&2;}
3420    { (exit 1); exit 1; }; }
3421
3422 echo "$as_me:3422: checking for egrep" >&5
3423 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3424 if test "${ac_cv_prog_egrep+set}" = set; then
3425   echo $ECHO_N "(cached) $ECHO_C" >&6
3426 else
3427   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3428                 then ac_cv_prog_egrep='grep -E'
3429                 else ac_cv_prog_egrep='egrep'
3430         fi
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_prog_egrep" >&5
3433 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3434         EGREP=$ac_cv_prog_egrep
3435
3436         test -z "$EGREP" && { { echo "$as_me:3436: error: No egrep program found" >&5
3437 echo "$as_me: error: No egrep program found" >&2;}
3438    { (exit 1); exit 1; }; }
3439
3440 # Find a good install program.  We prefer a C program (faster),
3441 # so one script is as good as another.  But avoid the broken or
3442 # incompatible versions:
3443 # SysV /etc/install, /usr/sbin/install
3444 # SunOS /usr/etc/install
3445 # IRIX /sbin/install
3446 # AIX /bin/install
3447 # AmigaOS /C/install, which installs bootblocks on floppy discs
3448 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3449 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3450 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3451 # ./install, which can be erroneously created by make from ./install.sh.
3452 echo "$as_me:3452: checking for a BSD compatible install" >&5
3453 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3454 if test -z "$INSTALL"; then
3455 if test "${ac_cv_path_install+set}" = set; then
3456   echo $ECHO_N "(cached) $ECHO_C" >&6
3457 else
3458     ac_save_IFS=$IFS; IFS=$ac_path_separator
3459   for ac_dir in $PATH; do
3460     IFS=$ac_save_IFS
3461     # Account for people who put trailing slashes in PATH elements.
3462     case $ac_dir/ in
3463     / | ./ | .// | /cC/* \
3464     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3465     | /usr/ucb/* ) ;;
3466     *)
3467       # OSF1 and SCO ODT 3.0 have their own names for install.
3468       # Don't use installbsd from OSF since it installs stuff as root
3469       # by default.
3470       for ac_prog in ginstall scoinst install; do
3471         if $as_executable_p "$ac_dir/$ac_prog"; then
3472           if test $ac_prog = install &&
3473             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3474             # AIX install.  It has an incompatible calling convention.
3475             :
3476           elif test $ac_prog = install &&
3477             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3478             # program-specific install script used by HP pwplus--don't use.
3479             :
3480           else
3481             ac_cv_path_install="$ac_dir/$ac_prog -c"
3482             break 2
3483           fi
3484         fi
3485       done
3486       ;;
3487     esac
3488   done
3489
3490 fi
3491   if test "${ac_cv_path_install+set}" = set; then
3492     INSTALL=$ac_cv_path_install
3493   else
3494     # As a last resort, use the slow shell script.  We don't cache a
3495     # path for INSTALL within a source directory, because that will
3496     # break other packages using the cache if that directory is
3497     # removed, or if the path is relative.
3498     INSTALL=$ac_install_sh
3499   fi
3500 fi
3501 echo "$as_me:3501: result: $INSTALL" >&5
3502 echo "${ECHO_T}$INSTALL" >&6
3503
3504 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3505 # It thinks the first close brace ends the variable substitution.
3506 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3507
3508 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3509
3510 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3511
3512 case $INSTALL in
3513 (/*)
3514         ;;
3515 (*)
3516         cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3517         test -z "$cf_dir" && cf_dir=.
3518         INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3519         ;;
3520 esac
3521
3522 for ac_prog in lint cppcheck splint
3523 do
3524   # Extract the first word of "$ac_prog", so it can be a program name with args.
3525 set dummy $ac_prog; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_prog_LINT+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   if test -n "$LINT"; then
3532   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3533 else
3534   ac_save_IFS=$IFS; IFS=$ac_path_separator
3535 ac_dummy="$PATH"
3536 for ac_dir in $ac_dummy; do
3537   IFS=$ac_save_IFS
3538   test -z "$ac_dir" && ac_dir=.
3539   $as_executable_p "$ac_dir/$ac_word" || continue
3540 ac_cv_prog_LINT="$ac_prog"
3541 echo "$as_me:3541: found $ac_dir/$ac_word" >&5
3542 break
3543 done
3544
3545 fi
3546 fi
3547 LINT=$ac_cv_prog_LINT
3548 if test -n "$LINT"; then
3549   echo "$as_me:3549: result: $LINT" >&5
3550 echo "${ECHO_T}$LINT" >&6
3551 else
3552   echo "$as_me:3552: result: no" >&5
3553 echo "${ECHO_T}no" >&6
3554 fi
3555
3556   test -n "$LINT" && break
3557 done
3558
3559 echo "$as_me:3559: checking whether ln -s works" >&5
3560 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3561 LN_S=$as_ln_s
3562 if test "$LN_S" = "ln -s"; then
3563   echo "$as_me:3563: result: yes" >&5
3564 echo "${ECHO_T}yes" >&6
3565 else
3566   echo "$as_me:3566: result: no, using $LN_S" >&5
3567 echo "${ECHO_T}no, using $LN_S" >&6
3568 fi
3569
3570 echo "$as_me:3570: checking if $LN_S -f options work" >&5
3571 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3572
3573 rm -f conf$$.src conf$$dst
3574 echo >conf$$.dst
3575 echo first >conf$$.src
3576 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3577         cf_prog_ln_sf=yes
3578 else
3579         cf_prog_ln_sf=no
3580 fi
3581 rm -f conf$$.dst conf$$src
3582 echo "$as_me:3582: result: $cf_prog_ln_sf" >&5
3583 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3584
3585 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3586
3587 echo "$as_me:3587: checking for long file names" >&5
3588 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3589 if test "${ac_cv_sys_long_file_names+set}" = set; then
3590   echo $ECHO_N "(cached) $ECHO_C" >&6
3591 else
3592   ac_cv_sys_long_file_names=yes
3593 # Test for long file names in all the places we know might matter:
3594 #      .                the current directory, where building will happen
3595 #      $prefix/lib      where we will be installing things
3596 #      $exec_prefix/lib likewise
3597 # eval it to expand exec_prefix.
3598 #      $TMPDIR          if set, where it might want to write temporary files
3599 # if $TMPDIR is not set:
3600 #      /tmp             where it might want to write temporary files
3601 #      /var/tmp         likewise
3602 #      /usr/tmp         likewise
3603 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3604   ac_tmpdirs=$TMPDIR
3605 else
3606   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3607 fi
3608 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3609   test -d $ac_dir || continue
3610   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3611   ac_xdir=$ac_dir/cf$$
3612   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3613   ac_tf1=$ac_xdir/conftest9012345
3614   ac_tf2=$ac_xdir/conftest9012346
3615   (echo 1 >$ac_tf1) 2>/dev/null
3616   (echo 2 >$ac_tf2) 2>/dev/null
3617   ac_val=`cat $ac_tf1 2>/dev/null`
3618   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3619     ac_cv_sys_long_file_names=no
3620     rm -rf $ac_xdir 2>/dev/null
3621     break
3622   fi
3623   rm -rf $ac_xdir 2>/dev/null
3624 done
3625 fi
3626 echo "$as_me:3626: result: $ac_cv_sys_long_file_names" >&5
3627 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3628 if test $ac_cv_sys_long_file_names = yes; then
3629
3630 cat >>confdefs.h <<\EOF
3631 #define HAVE_LONG_FILE_NAMES 1
3632 EOF
3633
3634 fi
3635
3636 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3637 # of package conflict.
3638 cf_config_suffix=
3639
3640 # Check whether --with-config-suffix or --without-config-suffix was given.
3641 if test "${with_config_suffix+set}" = set; then
3642   withval="$with_config_suffix"
3643   case "x$withval" in
3644         (xyes|xno)
3645                 { echo "$as_me:3645: WARNING: expected a value for config-suffix option" >&5
3646 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3647                 ;;
3648         (*)     cf_config_suffix="$withval"
3649                 ;;
3650         esac
3651 fi;
3652
3653 # If we find pkg-config, check if we should install the ".pc" files.
3654
3655 echo "$as_me:3655: checking if you want to use pkg-config" >&5
3656 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3657
3658 # Check whether --with-pkg-config or --without-pkg-config was given.
3659 if test "${with_pkg_config+set}" = set; then
3660   withval="$with_pkg_config"
3661   cf_pkg_config=$withval
3662 else
3663   cf_pkg_config=yes
3664 fi;
3665 echo "$as_me:3665: result: $cf_pkg_config" >&5
3666 echo "${ECHO_T}$cf_pkg_config" >&6
3667
3668 case $cf_pkg_config in
3669 (no)
3670         PKG_CONFIG=none
3671         ;;
3672 (yes)
3673
3674 if test -n "$ac_tool_prefix"; then
3675   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3676 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3677 echo "$as_me:3677: checking for $ac_word" >&5
3678 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3679 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3680   echo $ECHO_N "(cached) $ECHO_C" >&6
3681 else
3682   case $PKG_CONFIG in
3683   [\\/]* | ?:[\\/]*)
3684   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3685   ;;
3686   *)
3687   ac_save_IFS=$IFS; IFS=$ac_path_separator
3688 ac_dummy="$PATH"
3689 for ac_dir in $ac_dummy; do
3690   IFS=$ac_save_IFS
3691   test -z "$ac_dir" && ac_dir=.
3692   if $as_executable_p "$ac_dir/$ac_word"; then
3693    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3694    echo "$as_me:3694: found $ac_dir/$ac_word" >&5
3695    break
3696 fi
3697 done
3698
3699   ;;
3700 esac
3701 fi
3702 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3703
3704 if test -n "$PKG_CONFIG"; then
3705   echo "$as_me:3705: result: $PKG_CONFIG" >&5
3706 echo "${ECHO_T}$PKG_CONFIG" >&6
3707 else
3708   echo "$as_me:3708: result: no" >&5
3709 echo "${ECHO_T}no" >&6
3710 fi
3711
3712 fi
3713 if test -z "$ac_cv_path_PKG_CONFIG"; then
3714   ac_pt_PKG_CONFIG=$PKG_CONFIG
3715   # Extract the first word of "pkg-config", so it can be a program name with args.
3716 set dummy pkg-config; ac_word=$2
3717 echo "$as_me:3717: checking for $ac_word" >&5
3718 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722   case $ac_pt_PKG_CONFIG in
3723   [\\/]* | ?:[\\/]*)
3724   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3725   ;;
3726   *)
3727   ac_save_IFS=$IFS; IFS=$ac_path_separator
3728 ac_dummy="$PATH"
3729 for ac_dir in $ac_dummy; do
3730   IFS=$ac_save_IFS
3731   test -z "$ac_dir" && ac_dir=.
3732   if $as_executable_p "$ac_dir/$ac_word"; then
3733    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3734    echo "$as_me:3734: found $ac_dir/$ac_word" >&5
3735    break
3736 fi
3737 done
3738
3739   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3740   ;;
3741 esac
3742 fi
3743 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3744
3745 if test -n "$ac_pt_PKG_CONFIG"; then
3746   echo "$as_me:3746: result: $ac_pt_PKG_CONFIG" >&5
3747 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3748 else
3749   echo "$as_me:3749: result: no" >&5
3750 echo "${ECHO_T}no" >&6
3751 fi
3752
3753   PKG_CONFIG=$ac_pt_PKG_CONFIG
3754 else
3755   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3756 fi
3757
3758         ;;
3759 (*)
3760         PKG_CONFIG=$withval
3761         ;;
3762 esac
3763
3764 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3765 if test "$PKG_CONFIG" != none ; then
3766
3767 if test "x$prefix" != xNONE; then
3768         cf_path_syntax="$prefix"
3769 else
3770         cf_path_syntax="$ac_default_prefix"
3771 fi
3772
3773 case ".$PKG_CONFIG" in
3774 (.\$\(*\)*|.\'*\'*)
3775         ;;
3776 (..|./*|.\\*)
3777         ;;
3778 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3779         ;;
3780 (.\${*prefix}*|.\${*dir}*)
3781         eval PKG_CONFIG="$PKG_CONFIG"
3782         case ".$PKG_CONFIG" in
3783         (.NONE/*)
3784                 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3785                 ;;
3786         esac
3787         ;;
3788 (.no|.NONE/*)
3789         PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3790         ;;
3791 (*)
3792         { { echo "$as_me:3792: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3793 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3794    { (exit 1); exit 1; }; }
3795         ;;
3796 esac
3797
3798 elif test "x$cf_pkg_config" != xno ; then
3799         { echo "$as_me:3799: WARNING: pkg-config is not installed" >&5
3800 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
3801 fi
3802
3803 case $PKG_CONFIG in
3804 (no|none|yes)
3805         echo "$as_me:3805: checking for pkg-config library directory" >&5
3806 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
3807         ;;
3808 (*)
3809         echo "$as_me:3809: checking for $PKG_CONFIG library directory" >&5
3810 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3811         ;;
3812 esac
3813
3814 PKG_CONFIG_LIBDIR=no
3815
3816 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3817 if test "${with_pkg_config_libdir+set}" = set; then
3818   withval="$with_pkg_config_libdir"
3819   PKG_CONFIG_LIBDIR=$withval
3820 else
3821   test "x$PKG_CONFIG" != xnone && PKG_CONFIG_LIBDIR=yes
3822 fi;
3823
3824 case x$PKG_CONFIG_LIBDIR in
3825 (x/*)
3826         ;;
3827 (xyes)
3828         # Look for the library directory using the same prefix as the executable
3829         if test "x$PKG_CONFIG" = xnone
3830         then
3831                 cf_path=$prefix
3832         else
3833                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3834         fi
3835
3836         # If you don't like using the default architecture, you have to specify the
3837         # intended library directory and corresponding compiler/linker options.
3838         #
3839         # This case allows for Debian's 2014-flavor of multiarch, along with the
3840         # most common variations before that point.  Some other variants spell the
3841         # directory differently, e.g., "pkg-config", and put it in unusual places.
3842         # pkg-config has always been poorly standardized, which is ironic...
3843         case x`(arch) 2>/dev/null` in
3844         (*64)
3845                 cf_search_path="\
3846                         $cf_path/lib/*64-linux-gnu \
3847                         $cf_path/share \
3848                         $cf_path/lib64 \
3849                         $cf_path/lib32 \
3850                         $cf_path/lib"
3851                 ;;
3852         (*)
3853                 cf_search_path="\
3854                         $cf_path/lib/*-linux-gnu \
3855                         $cf_path/share \
3856                         $cf_path/lib32 \
3857                         $cf_path/lib \
3858                         $cf_path/libdata"
3859                 ;;
3860         esac
3861
3862         test -n "$verbose" && echo "    list..." 1>&6
3863
3864 echo "${as_me:-configure}:3864: testing list... ..." 1>&5
3865
3866         for cf_config in $cf_search_path
3867         do
3868                 test -n "$verbose" && echo "    checking $cf_config/pkgconfig" 1>&6
3869
3870 echo "${as_me:-configure}:3870: testing checking $cf_config/pkgconfig ..." 1>&5
3871
3872                 if test -d $cf_config/pkgconfig
3873                 then
3874                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3875                         echo "$as_me:3875: checking done" >&5
3876 echo $ECHO_N "checking done... $ECHO_C" >&6
3877                         break
3878                 fi
3879         done
3880         ;;
3881 (*)
3882         ;;
3883 esac
3884
3885 if test "x$PKG_CONFIG_LIBDIR" != xno ; then
3886         echo "$as_me:3886: result: $PKG_CONFIG_LIBDIR" >&5
3887 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3888 fi
3889
3890 if test "x$PKG_CONFIG" != xnone
3891 then
3892         echo "$as_me:3892: checking if we should install .pc files for $PKG_CONFIG" >&5
3893 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3894 else
3895         echo "$as_me:3895: checking if we should install .pc files" >&5
3896 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
3897 fi
3898
3899 # Check whether --enable-pc-files or --disable-pc-files was given.
3900 if test "${enable_pc_files+set}" = set; then
3901   enableval="$enable_pc_files"
3902   enable_pc_files=$enableval
3903 else
3904   enable_pc_files=no
3905 fi;
3906 echo "$as_me:3906: result: $enable_pc_files" >&5
3907 echo "${ECHO_T}$enable_pc_files" >&6
3908
3909 if test "x$enable_pc_files" != xno
3910 then
3911         MAKE_PC_FILES=
3912         case "x$PKG_CONFIG_LIBDIR" in
3913         (xno|xyes)
3914                 { echo "$as_me:3914: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
3915 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
3916                 ;;
3917         (*)
3918
3919 if test "x$prefix" != xNONE; then
3920         cf_path_syntax="$prefix"
3921 else
3922         cf_path_syntax="$ac_default_prefix"
3923 fi
3924
3925 case ".$PKG_CONFIG_LIBDIR" in
3926 (.\$\(*\)*|.\'*\'*)
3927         ;;
3928 (..|./*|.\\*)
3929         ;;
3930 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
3931         ;;
3932 (.\${*prefix}*|.\${*dir}*)
3933         eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3934         case ".$PKG_CONFIG_LIBDIR" in
3935         (.NONE/*)
3936                 PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3937                 ;;
3938         esac
3939         ;;
3940 (.no|.NONE/*)
3941         PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3942         ;;
3943 (*)
3944         { { echo "$as_me:3944: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3945 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3946    { (exit 1); exit 1; }; }
3947         ;;
3948 esac
3949
3950                 ;;
3951         esac
3952 else
3953         MAKE_PC_FILES="#"
3954 fi
3955
3956 if test -z "$MAKE_PC_FILES"
3957 then
3958         echo "$as_me:3958: checking for suffix to add to pc-files" >&5
3959 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
3960
3961 # Check whether --with-pc-suffix or --without-pc-suffix was given.
3962 if test "${with_pc_suffix+set}" = set; then
3963   withval="$with_pc_suffix"
3964   case "x$withval" in
3965         (xyes|xno)
3966                 PC_MODULE_SUFFIX=
3967                 ;;
3968         (*)     PC_MODULE_SUFFIX="$withval"
3969                 ;;
3970         esac
3971 fi;
3972         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
3973         echo "$as_me:3973: result: $PC_MODULE_SUFFIX" >&5
3974 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
3975         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
3976
3977 fi
3978
3979 echo "$as_me:3979: checking if we should assume mixed-case filenames" >&5
3980 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3981
3982 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3983 if test "${enable_mixed_case+set}" = set; then
3984   enableval="$enable_mixed_case"
3985   enable_mixedcase=$enableval
3986 else
3987   enable_mixedcase=auto
3988 fi;
3989 echo "$as_me:3989: result: $enable_mixedcase" >&5
3990 echo "${ECHO_T}$enable_mixedcase" >&6
3991 if test "$enable_mixedcase" = "auto" ; then
3992
3993 echo "$as_me:3993: checking if filesystem supports mixed-case filenames" >&5
3994 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3995 if test "${cf_cv_mixedcase+set}" = set; then
3996   echo $ECHO_N "(cached) $ECHO_C" >&6
3997 else
3998
3999 if test "$cross_compiling" = yes ; then
4000         case $target_alias in
4001         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
4002                 cf_cv_mixedcase=no
4003                 ;;
4004         (*)
4005                 cf_cv_mixedcase=yes
4006                 ;;
4007         esac
4008 else
4009         rm -f conftest CONFTEST
4010         echo test >conftest
4011         if test -f CONFTEST ; then
4012                 cf_cv_mixedcase=no
4013         else
4014                 cf_cv_mixedcase=yes
4015         fi
4016         rm -f conftest CONFTEST
4017 fi
4018
4019 fi
4020 echo "$as_me:4020: result: $cf_cv_mixedcase" >&5
4021 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4022 test "$cf_cv_mixedcase" = yes &&
4023 cat >>confdefs.h <<\EOF
4024 #define MIXEDCASE_FILENAMES 1
4025 EOF
4026
4027 else
4028         cf_cv_mixedcase=$enable_mixedcase
4029         if test "x$enable_mixedcase" = "xyes" ; then
4030
4031 cat >>confdefs.h <<\EOF
4032 #define MIXEDCASE_FILENAMES 1
4033 EOF
4034
4035         fi
4036 fi
4037
4038 # do this after mixed-case option (tags/TAGS is not as important as tic).
4039 echo "$as_me:4039: checking whether ${MAKE-make} sets \${MAKE}" >&5
4040 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4041 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4042 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4043   echo $ECHO_N "(cached) $ECHO_C" >&6
4044 else
4045   cat >conftest.make <<\EOF
4046 all:
4047         @echo 'ac_maketemp="${MAKE}"'
4048 EOF
4049 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4050 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4051 if test -n "$ac_maketemp"; then
4052   eval ac_cv_prog_make_${ac_make}_set=yes
4053 else
4054   eval ac_cv_prog_make_${ac_make}_set=no
4055 fi
4056 rm -f conftest.make
4057 fi
4058 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4059   echo "$as_me:4059: result: yes" >&5
4060 echo "${ECHO_T}yes" >&6
4061   SET_MAKE=
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065   SET_MAKE="MAKE=${MAKE-make}"
4066 fi
4067
4068 for ac_prog in exctags ctags
4069 do
4070   # Extract the first word of "$ac_prog", so it can be a program name with args.
4071 set dummy $ac_prog; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_prog_CTAGS+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   if test -n "$CTAGS"; then
4078   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4079 else
4080   ac_save_IFS=$IFS; IFS=$ac_path_separator
4081 ac_dummy="$PATH"
4082 for ac_dir in $ac_dummy; do
4083   IFS=$ac_save_IFS
4084   test -z "$ac_dir" && ac_dir=.
4085   $as_executable_p "$ac_dir/$ac_word" || continue
4086 ac_cv_prog_CTAGS="$ac_prog"
4087 echo "$as_me:4087: found $ac_dir/$ac_word" >&5
4088 break
4089 done
4090
4091 fi
4092 fi
4093 CTAGS=$ac_cv_prog_CTAGS
4094 if test -n "$CTAGS"; then
4095   echo "$as_me:4095: result: $CTAGS" >&5
4096 echo "${ECHO_T}$CTAGS" >&6
4097 else
4098   echo "$as_me:4098: result: no" >&5
4099 echo "${ECHO_T}no" >&6
4100 fi
4101
4102   test -n "$CTAGS" && break
4103 done
4104
4105 for ac_prog in exetags etags
4106 do
4107   # Extract the first word of "$ac_prog", so it can be a program name with args.
4108 set dummy $ac_prog; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ETAGS+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ETAGS"; then
4115   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ETAGS="$ac_prog"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128 fi
4129 fi
4130 ETAGS=$ac_cv_prog_ETAGS
4131 if test -n "$ETAGS"; then
4132   echo "$as_me:4132: result: $ETAGS" >&5
4133 echo "${ECHO_T}$ETAGS" >&6
4134 else
4135   echo "$as_me:4135: result: no" >&5
4136 echo "${ECHO_T}no" >&6
4137 fi
4138
4139   test -n "$ETAGS" && break
4140 done
4141
4142 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4143 set dummy ${CTAGS:-ctags}; ac_word=$2
4144 echo "$as_me:4144: checking for $ac_word" >&5
4145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4146 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4147   echo $ECHO_N "(cached) $ECHO_C" >&6
4148 else
4149   if test -n "$MAKE_LOWER_TAGS"; then
4150   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4151 else
4152   ac_save_IFS=$IFS; IFS=$ac_path_separator
4153 ac_dummy="$PATH"
4154 for ac_dir in $ac_dummy; do
4155   IFS=$ac_save_IFS
4156   test -z "$ac_dir" && ac_dir=.
4157   $as_executable_p "$ac_dir/$ac_word" || continue
4158 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4159 echo "$as_me:4159: found $ac_dir/$ac_word" >&5
4160 break
4161 done
4162
4163   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4164 fi
4165 fi
4166 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4167 if test -n "$MAKE_LOWER_TAGS"; then
4168   echo "$as_me:4168: result: $MAKE_LOWER_TAGS" >&5
4169 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4170 else
4171   echo "$as_me:4171: result: no" >&5
4172 echo "${ECHO_T}no" >&6
4173 fi
4174
4175 if test "$cf_cv_mixedcase" = yes ; then
4176         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4177 set dummy ${ETAGS:-etags}; ac_word=$2
4178 echo "$as_me:4178: checking for $ac_word" >&5
4179 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4180 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4181   echo $ECHO_N "(cached) $ECHO_C" >&6
4182 else
4183   if test -n "$MAKE_UPPER_TAGS"; then
4184   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4185 else
4186   ac_save_IFS=$IFS; IFS=$ac_path_separator
4187 ac_dummy="$PATH"
4188 for ac_dir in $ac_dummy; do
4189   IFS=$ac_save_IFS
4190   test -z "$ac_dir" && ac_dir=.
4191   $as_executable_p "$ac_dir/$ac_word" || continue
4192 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4193 echo "$as_me:4193: found $ac_dir/$ac_word" >&5
4194 break
4195 done
4196
4197   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4198 fi
4199 fi
4200 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4201 if test -n "$MAKE_UPPER_TAGS"; then
4202   echo "$as_me:4202: result: $MAKE_UPPER_TAGS" >&5
4203 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4204 else
4205   echo "$as_me:4205: result: no" >&5
4206 echo "${ECHO_T}no" >&6
4207 fi
4208
4209 else
4210         MAKE_UPPER_TAGS=no
4211 fi
4212
4213 if test "$MAKE_UPPER_TAGS" = yes ; then
4214         MAKE_UPPER_TAGS=
4215 else
4216         MAKE_UPPER_TAGS="#"
4217 fi
4218
4219 if test "$MAKE_LOWER_TAGS" = yes ; then
4220         MAKE_LOWER_TAGS=
4221 else
4222         MAKE_LOWER_TAGS="#"
4223 fi
4224
4225 echo "$as_me:4225: checking for makeflags variable" >&5
4226 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4227 if test "${cf_cv_makeflags+set}" = set; then
4228   echo $ECHO_N "(cached) $ECHO_C" >&6
4229 else
4230
4231         cf_cv_makeflags=''
4232         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4233         do
4234                 cat >cf_makeflags.tmp <<CF_EOF
4235 SHELL = $SHELL
4236 all :
4237         @ echo '.$cf_option'
4238 CF_EOF
4239                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4240                 case "$cf_result" in
4241                 (.*k|.*kw)
4242                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4243                         case "$cf_result" in
4244                         (.*CC=*)        cf_cv_makeflags=
4245                                 ;;
4246                         (*)     cf_cv_makeflags=$cf_option
4247                                 ;;
4248                         esac
4249                         break
4250                         ;;
4251                 (.-)
4252                         ;;
4253                 (*)
4254
4255 echo "${as_me:-configure}:4255: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4256
4257                         ;;
4258                 esac
4259         done
4260         rm -f cf_makeflags.tmp
4261
4262 fi
4263 echo "$as_me:4263: result: $cf_cv_makeflags" >&5
4264 echo "${ECHO_T}$cf_cv_makeflags" >&6
4265
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4268 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4269 echo "$as_me:4269: checking for $ac_word" >&5
4270 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4271 if test "${ac_cv_prog_RANLIB+set}" = set; then
4272   echo $ECHO_N "(cached) $ECHO_C" >&6
4273 else
4274   if test -n "$RANLIB"; then
4275   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4276 else
4277   ac_save_IFS=$IFS; IFS=$ac_path_separator
4278 ac_dummy="$PATH"
4279 for ac_dir in $ac_dummy; do
4280   IFS=$ac_save_IFS
4281   test -z "$ac_dir" && ac_dir=.
4282   $as_executable_p "$ac_dir/$ac_word" || continue
4283 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4284 echo "$as_me:4284: found $ac_dir/$ac_word" >&5
4285 break
4286 done
4287
4288 fi
4289 fi
4290 RANLIB=$ac_cv_prog_RANLIB
4291 if test -n "$RANLIB"; then
4292   echo "$as_me:4292: result: $RANLIB" >&5
4293 echo "${ECHO_T}$RANLIB" >&6
4294 else
4295   echo "$as_me:4295: result: no" >&5
4296 echo "${ECHO_T}no" >&6
4297 fi
4298
4299 fi
4300 if test -z "$ac_cv_prog_RANLIB"; then
4301   ac_ct_RANLIB=$RANLIB
4302   # Extract the first word of "ranlib", so it can be a program name with args.
4303 set dummy ranlib; ac_word=$2
4304 echo "$as_me:4304: checking for $ac_word" >&5
4305 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4306 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4307   echo $ECHO_N "(cached) $ECHO_C" >&6
4308 else
4309   if test -n "$ac_ct_RANLIB"; then
4310   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4311 else
4312   ac_save_IFS=$IFS; IFS=$ac_path_separator
4313 ac_dummy="$PATH"
4314 for ac_dir in $ac_dummy; do
4315   IFS=$ac_save_IFS
4316   test -z "$ac_dir" && ac_dir=.
4317   $as_executable_p "$ac_dir/$ac_word" || continue
4318 ac_cv_prog_ac_ct_RANLIB="ranlib"
4319 echo "$as_me:4319: found $ac_dir/$ac_word" >&5
4320 break
4321 done
4322
4323   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4324 fi
4325 fi
4326 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4327 if test -n "$ac_ct_RANLIB"; then
4328   echo "$as_me:4328: result: $ac_ct_RANLIB" >&5
4329 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4330 else
4331   echo "$as_me:4331: result: no" >&5
4332 echo "${ECHO_T}no" >&6
4333 fi
4334
4335   RANLIB=$ac_ct_RANLIB
4336 else
4337   RANLIB="$ac_cv_prog_RANLIB"
4338 fi
4339
4340 if test -n "$ac_tool_prefix"; then
4341   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4342 set dummy ${ac_tool_prefix}ld; ac_word=$2
4343 echo "$as_me:4343: checking for $ac_word" >&5
4344 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4345 if test "${ac_cv_prog_LD+set}" = set; then
4346   echo $ECHO_N "(cached) $ECHO_C" >&6
4347 else
4348   if test -n "$LD"; then
4349   ac_cv_prog_LD="$LD" # Let the user override the test.
4350 else
4351   ac_save_IFS=$IFS; IFS=$ac_path_separator
4352 ac_dummy="$PATH"
4353 for ac_dir in $ac_dummy; do
4354   IFS=$ac_save_IFS
4355   test -z "$ac_dir" && ac_dir=.
4356   $as_executable_p "$ac_dir/$ac_word" || continue
4357 ac_cv_prog_LD="${ac_tool_prefix}ld"
4358 echo "$as_me:4358: found $ac_dir/$ac_word" >&5
4359 break
4360 done
4361
4362 fi
4363 fi
4364 LD=$ac_cv_prog_LD
4365 if test -n "$LD"; then
4366   echo "$as_me:4366: result: $LD" >&5
4367 echo "${ECHO_T}$LD" >&6
4368 else
4369   echo "$as_me:4369: result: no" >&5
4370 echo "${ECHO_T}no" >&6
4371 fi
4372
4373 fi
4374 if test -z "$ac_cv_prog_LD"; then
4375   ac_ct_LD=$LD
4376   # Extract the first word of "ld", so it can be a program name with args.
4377 set dummy ld; ac_word=$2
4378 echo "$as_me:4378: checking for $ac_word" >&5
4379 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4380 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4381   echo $ECHO_N "(cached) $ECHO_C" >&6
4382 else
4383   if test -n "$ac_ct_LD"; then
4384   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4385 else
4386   ac_save_IFS=$IFS; IFS=$ac_path_separator
4387 ac_dummy="$PATH"
4388 for ac_dir in $ac_dummy; do
4389   IFS=$ac_save_IFS
4390   test -z "$ac_dir" && ac_dir=.
4391   $as_executable_p "$ac_dir/$ac_word" || continue
4392 ac_cv_prog_ac_ct_LD="ld"
4393 echo "$as_me:4393: found $ac_dir/$ac_word" >&5
4394 break
4395 done
4396
4397   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4398 fi
4399 fi
4400 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4401 if test -n "$ac_ct_LD"; then
4402   echo "$as_me:4402: result: $ac_ct_LD" >&5
4403 echo "${ECHO_T}$ac_ct_LD" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   LD=$ac_ct_LD
4410 else
4411   LD="$ac_cv_prog_LD"
4412 fi
4413
4414 if test -n "$ac_tool_prefix"; then
4415   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4416 set dummy ${ac_tool_prefix}ar; ac_word=$2
4417 echo "$as_me:4417: checking for $ac_word" >&5
4418 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4419 if test "${ac_cv_prog_AR+set}" = set; then
4420   echo $ECHO_N "(cached) $ECHO_C" >&6
4421 else
4422   if test -n "$AR"; then
4423   ac_cv_prog_AR="$AR" # Let the user override the test.
4424 else
4425   ac_save_IFS=$IFS; IFS=$ac_path_separator
4426 ac_dummy="$PATH"
4427 for ac_dir in $ac_dummy; do
4428   IFS=$ac_save_IFS
4429   test -z "$ac_dir" && ac_dir=.
4430   $as_executable_p "$ac_dir/$ac_word" || continue
4431 ac_cv_prog_AR="${ac_tool_prefix}ar"
4432 echo "$as_me:4432: found $ac_dir/$ac_word" >&5
4433 break
4434 done
4435
4436 fi
4437 fi
4438 AR=$ac_cv_prog_AR
4439 if test -n "$AR"; then
4440   echo "$as_me:4440: result: $AR" >&5
4441 echo "${ECHO_T}$AR" >&6
4442 else
4443   echo "$as_me:4443: result: no" >&5
4444 echo "${ECHO_T}no" >&6
4445 fi
4446
4447 fi
4448 if test -z "$ac_cv_prog_AR"; then
4449   ac_ct_AR=$AR
4450   # Extract the first word of "ar", so it can be a program name with args.
4451 set dummy ar; ac_word=$2
4452 echo "$as_me:4452: checking for $ac_word" >&5
4453 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4454 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   if test -n "$ac_ct_AR"; then
4458   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4459 else
4460   ac_save_IFS=$IFS; IFS=$ac_path_separator
4461 ac_dummy="$PATH"
4462 for ac_dir in $ac_dummy; do
4463   IFS=$ac_save_IFS
4464   test -z "$ac_dir" && ac_dir=.
4465   $as_executable_p "$ac_dir/$ac_word" || continue
4466 ac_cv_prog_ac_ct_AR="ar"
4467 echo "$as_me:4467: found $ac_dir/$ac_word" >&5
4468 break
4469 done
4470
4471   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4472 fi
4473 fi
4474 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4475 if test -n "$ac_ct_AR"; then
4476   echo "$as_me:4476: result: $ac_ct_AR" >&5
4477 echo "${ECHO_T}$ac_ct_AR" >&6
4478 else
4479   echo "$as_me:4479: result: no" >&5
4480 echo "${ECHO_T}no" >&6
4481 fi
4482
4483   AR=$ac_ct_AR
4484 else
4485   AR="$ac_cv_prog_AR"
4486 fi
4487
4488 if test -n "$ac_tool_prefix"; then
4489   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4490 set dummy ${ac_tool_prefix}nm; ac_word=$2
4491 echo "$as_me:4491: checking for $ac_word" >&5
4492 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4493 if test "${ac_cv_prog_NM+set}" = set; then
4494   echo $ECHO_N "(cached) $ECHO_C" >&6
4495 else
4496   if test -n "$NM"; then
4497   ac_cv_prog_NM="$NM" # Let the user override the test.
4498 else
4499   ac_save_IFS=$IFS; IFS=$ac_path_separator
4500 ac_dummy="$PATH"
4501 for ac_dir in $ac_dummy; do
4502   IFS=$ac_save_IFS
4503   test -z "$ac_dir" && ac_dir=.
4504   $as_executable_p "$ac_dir/$ac_word" || continue
4505 ac_cv_prog_NM="${ac_tool_prefix}nm"
4506 echo "$as_me:4506: found $ac_dir/$ac_word" >&5
4507 break
4508 done
4509
4510 fi
4511 fi
4512 NM=$ac_cv_prog_NM
4513 if test -n "$NM"; then
4514   echo "$as_me:4514: result: $NM" >&5
4515 echo "${ECHO_T}$NM" >&6
4516 else
4517   echo "$as_me:4517: result: no" >&5
4518 echo "${ECHO_T}no" >&6
4519 fi
4520
4521 fi
4522 if test -z "$ac_cv_prog_NM"; then
4523   ac_ct_NM=$NM
4524   # Extract the first word of "nm", so it can be a program name with args.
4525 set dummy nm; ac_word=$2
4526 echo "$as_me:4526: checking for $ac_word" >&5
4527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4528 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4529   echo $ECHO_N "(cached) $ECHO_C" >&6
4530 else
4531   if test -n "$ac_ct_NM"; then
4532   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4533 else
4534   ac_save_IFS=$IFS; IFS=$ac_path_separator
4535 ac_dummy="$PATH"
4536 for ac_dir in $ac_dummy; do
4537   IFS=$ac_save_IFS
4538   test -z "$ac_dir" && ac_dir=.
4539   $as_executable_p "$ac_dir/$ac_word" || continue
4540 ac_cv_prog_ac_ct_NM="nm"
4541 echo "$as_me:4541: found $ac_dir/$ac_word" >&5
4542 break
4543 done
4544
4545   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4546 fi
4547 fi
4548 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4549 if test -n "$ac_ct_NM"; then
4550   echo "$as_me:4550: result: $ac_ct_NM" >&5
4551 echo "${ECHO_T}$ac_ct_NM" >&6
4552 else
4553   echo "$as_me:4553: result: no" >&5
4554 echo "${ECHO_T}no" >&6
4555 fi
4556
4557   NM=$ac_ct_NM
4558 else
4559   NM="$ac_cv_prog_NM"
4560 fi
4561
4562 if test -n "$ac_tool_prefix"; then
4563   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4564 set dummy ${ac_tool_prefix}ar; ac_word=$2
4565 echo "$as_me:4565: checking for $ac_word" >&5
4566 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4567 if test "${ac_cv_prog_AR+set}" = set; then
4568   echo $ECHO_N "(cached) $ECHO_C" >&6
4569 else
4570   if test -n "$AR"; then
4571   ac_cv_prog_AR="$AR" # Let the user override the test.
4572 else
4573   ac_save_IFS=$IFS; IFS=$ac_path_separator
4574 ac_dummy="$PATH"
4575 for ac_dir in $ac_dummy; do
4576   IFS=$ac_save_IFS
4577   test -z "$ac_dir" && ac_dir=.
4578   $as_executable_p "$ac_dir/$ac_word" || continue
4579 ac_cv_prog_AR="${ac_tool_prefix}ar"
4580 echo "$as_me:4580: found $ac_dir/$ac_word" >&5
4581 break
4582 done
4583
4584 fi
4585 fi
4586 AR=$ac_cv_prog_AR
4587 if test -n "$AR"; then
4588   echo "$as_me:4588: result: $AR" >&5
4589 echo "${ECHO_T}$AR" >&6
4590 else
4591   echo "$as_me:4591: result: no" >&5
4592 echo "${ECHO_T}no" >&6
4593 fi
4594
4595 fi
4596 if test -z "$ac_cv_prog_AR"; then
4597   ac_ct_AR=$AR
4598   # Extract the first word of "ar", so it can be a program name with args.
4599 set dummy ar; ac_word=$2
4600 echo "$as_me:4600: checking for $ac_word" >&5
4601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4602 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4603   echo $ECHO_N "(cached) $ECHO_C" >&6
4604 else
4605   if test -n "$ac_ct_AR"; then
4606   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4607 else
4608   ac_save_IFS=$IFS; IFS=$ac_path_separator
4609 ac_dummy="$PATH"
4610 for ac_dir in $ac_dummy; do
4611   IFS=$ac_save_IFS
4612   test -z "$ac_dir" && ac_dir=.
4613   $as_executable_p "$ac_dir/$ac_word" || continue
4614 ac_cv_prog_ac_ct_AR="ar"
4615 echo "$as_me:4615: found $ac_dir/$ac_word" >&5
4616 break
4617 done
4618
4619   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4620 fi
4621 fi
4622 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4623 if test -n "$ac_ct_AR"; then
4624   echo "$as_me:4624: result: $ac_ct_AR" >&5
4625 echo "${ECHO_T}$ac_ct_AR" >&6
4626 else
4627   echo "$as_me:4627: result: no" >&5
4628 echo "${ECHO_T}no" >&6
4629 fi
4630
4631   AR=$ac_ct_AR
4632 else
4633   AR="$ac_cv_prog_AR"
4634 fi
4635
4636 echo "$as_me:4636: checking for options to update archives" >&5
4637 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4638 if test "${cf_cv_ar_flags+set}" = set; then
4639   echo $ECHO_N "(cached) $ECHO_C" >&6
4640 else
4641
4642         cf_cv_ar_flags=unknown
4643         for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
4644         do
4645
4646                 # check if $ARFLAGS already contains this choice
4647                 if test "x$ARFLAGS" != "x" ; then
4648                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4649                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4650                                 cf_cv_ar_flags=
4651                                 break
4652                         fi
4653                 fi
4654
4655                 rm -f conftest.$ac_cv_objext
4656                 rm -f conftest.a
4657
4658                 cat >conftest.$ac_ext <<EOF
4659 #line 4659 "configure"
4660 int     testdata[3] = { 123, 456, 789 };
4661 EOF
4662                 if { (eval echo "$as_me:4662: \"$ac_compile\"") >&5
4663   (eval $ac_compile) 2>&5
4664   ac_status=$?
4665   echo "$as_me:4665: \$? = $ac_status" >&5
4666   (exit $ac_status); } ; then
4667                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4668                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4669                         if test -f conftest.a ; then
4670                                 cf_cv_ar_flags=$cf_ar_flags
4671                                 break
4672                         fi
4673                 else
4674                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4675
4676 echo "${as_me:-configure}:4676: testing cannot compile test-program ..." 1>&5
4677
4678                         break
4679                 fi
4680         done
4681         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4682
4683 fi
4684 echo "$as_me:4684: result: $cf_cv_ar_flags" >&5
4685 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4686
4687 if test -n "$ARFLAGS" ; then
4688         if test -n "$cf_cv_ar_flags" ; then
4689                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4690         fi
4691 else
4692         ARFLAGS=$cf_cv_ar_flags
4693 fi
4694
4695 echo "$as_me:4695: checking if you have specified an install-prefix" >&5
4696 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4697
4698 # Check whether --with-install-prefix or --without-install-prefix was given.
4699 if test "${with_install_prefix+set}" = set; then
4700   withval="$with_install_prefix"
4701   case "x$withval" in
4702         (xyes|xno)
4703                 ;;
4704         (*)     DESTDIR="$withval"
4705                 ;;
4706         esac
4707 fi;
4708 echo "$as_me:4708: result: $DESTDIR" >&5
4709 echo "${ECHO_T}$DESTDIR" >&6
4710
4711 ###############################################################################
4712
4713 # If we're cross-compiling, allow the user to override the tools and their
4714 # options.  The configure script is oriented toward identifying the host
4715 # compiler, etc., but we need a build compiler to generate parts of the source.
4716
4717 if test "$cross_compiling" = yes ; then
4718
4719         # defaults that we might want to override
4720         : ${BUILD_CFLAGS:=''}
4721         : ${BUILD_CPPFLAGS:=''}
4722         : ${BUILD_LDFLAGS:=''}
4723         : ${BUILD_LIBS:=''}
4724         : ${BUILD_EXEEXT:='$x'}
4725         : ${BUILD_OBJEXT:='o'}
4726
4727 # Check whether --with-build-cc or --without-build-cc was given.
4728 if test "${with_build_cc+set}" = set; then
4729   withval="$with_build_cc"
4730   BUILD_CC="$withval"
4731 else
4732   for ac_prog in gcc clang c99 c89 cc cl
4733 do
4734   # Extract the first word of "$ac_prog", so it can be a program name with args.
4735 set dummy $ac_prog; ac_word=$2
4736 echo "$as_me:4736: checking for $ac_word" >&5
4737 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4738 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4739   echo $ECHO_N "(cached) $ECHO_C" >&6
4740 else
4741   if test -n "$BUILD_CC"; then
4742   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4743 else
4744   ac_save_IFS=$IFS; IFS=$ac_path_separator
4745 ac_dummy="$PATH"
4746 for ac_dir in $ac_dummy; do
4747   IFS=$ac_save_IFS
4748   test -z "$ac_dir" && ac_dir=.
4749   $as_executable_p "$ac_dir/$ac_word" || continue
4750 ac_cv_prog_BUILD_CC="$ac_prog"
4751 echo "$as_me:4751: found $ac_dir/$ac_word" >&5
4752 break
4753 done
4754
4755 fi
4756 fi
4757 BUILD_CC=$ac_cv_prog_BUILD_CC
4758 if test -n "$BUILD_CC"; then
4759   echo "$as_me:4759: result: $BUILD_CC" >&5
4760 echo "${ECHO_T}$BUILD_CC" >&6
4761 else
4762   echo "$as_me:4762: result: no" >&5
4763 echo "${ECHO_T}no" >&6
4764 fi
4765
4766   test -n "$BUILD_CC" && break
4767 done
4768 test -n "$BUILD_CC" || BUILD_CC="none"
4769
4770 fi;
4771         echo "$as_me:4771: checking for native build C compiler" >&5
4772 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4773         echo "$as_me:4773: result: $BUILD_CC" >&5
4774 echo "${ECHO_T}$BUILD_CC" >&6
4775
4776         echo "$as_me:4776: checking for native build C preprocessor" >&5
4777 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4778
4779 # Check whether --with-build-cpp or --without-build-cpp was given.
4780 if test "${with_build_cpp+set}" = set; then
4781   withval="$with_build_cpp"
4782   BUILD_CPP="$withval"
4783 else
4784   BUILD_CPP='${BUILD_CC} -E'
4785 fi;
4786         echo "$as_me:4786: result: $BUILD_CPP" >&5
4787 echo "${ECHO_T}$BUILD_CPP" >&6
4788
4789         echo "$as_me:4789: checking for native build C flags" >&5
4790 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4791
4792 # Check whether --with-build-cflags or --without-build-cflags was given.
4793 if test "${with_build_cflags+set}" = set; then
4794   withval="$with_build_cflags"
4795   BUILD_CFLAGS="$withval"
4796 fi;
4797         echo "$as_me:4797: result: $BUILD_CFLAGS" >&5
4798 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4799
4800         echo "$as_me:4800: checking for native build C preprocessor-flags" >&5
4801 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4802
4803 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4804 if test "${with_build_cppflags+set}" = set; then
4805   withval="$with_build_cppflags"
4806   BUILD_CPPFLAGS="$withval"
4807 fi;
4808         echo "$as_me:4808: result: $BUILD_CPPFLAGS" >&5
4809 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4810
4811         echo "$as_me:4811: checking for native build linker-flags" >&5
4812 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4813
4814 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4815 if test "${with_build_ldflags+set}" = set; then
4816   withval="$with_build_ldflags"
4817   BUILD_LDFLAGS="$withval"
4818 fi;
4819         echo "$as_me:4819: result: $BUILD_LDFLAGS" >&5
4820 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4821
4822         echo "$as_me:4822: checking for native build linker-libraries" >&5
4823 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4824
4825 # Check whether --with-build-libs or --without-build-libs was given.
4826 if test "${with_build_libs+set}" = set; then
4827   withval="$with_build_libs"
4828   BUILD_LIBS="$withval"
4829 fi;
4830         echo "$as_me:4830: result: $BUILD_LIBS" >&5
4831 echo "${ECHO_T}$BUILD_LIBS" >&6
4832
4833         # this assumes we're on Unix.
4834         BUILD_EXEEXT=
4835         BUILD_OBJEXT=o
4836
4837         : ${BUILD_CC:='${CC}'}
4838
4839         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4840                 { { echo "$as_me:4840: error: Cross-build requires two compilers.
4841 Use --with-build-cc to specify the native compiler." >&5
4842 echo "$as_me: error: Cross-build requires two compilers.
4843 Use --with-build-cc to specify the native compiler." >&2;}
4844    { (exit 1); exit 1; }; }
4845         fi
4846
4847 else
4848         : ${BUILD_CC:='${CC}'}
4849         : ${BUILD_CPP:='${CPP}'}
4850         : ${BUILD_CFLAGS:='${CFLAGS}'}
4851         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4852         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4853         : ${BUILD_LIBS:='${LIBS}'}
4854         : ${BUILD_EXEEXT:='$x'}
4855         : ${BUILD_OBJEXT:='o'}
4856 fi
4857
4858 ###############################################################################
4859
4860 ### Options to allow the user to specify the set of libraries which are used.
4861 ### Use "--without-normal --with-shared" to allow the default model to be
4862 ### shared, for example.
4863 cf_list_models=""
4864
4865 echo "$as_me:4865: checking if libtool -version-number should be used" >&5
4866 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4867
4868 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4869 if test "${enable_libtool_version+set}" = set; then
4870   enableval="$enable_libtool_version"
4871   test "$enableval" != no && enableval=yes
4872         if test "$enableval" != "yes" ; then
4873     cf_libtool_version=no
4874         else
4875                 cf_libtool_version=yes
4876         fi
4877 else
4878   enableval=yes
4879         cf_libtool_version=yes
4880
4881 fi;
4882 echo "$as_me:4882: result: $cf_libtool_version" >&5
4883 echo "${ECHO_T}$cf_libtool_version" >&6
4884
4885 if test "$cf_libtool_version" = yes ; then
4886         LIBTOOL_VERSION="-version-number"
4887 else
4888         LIBTOOL_VERSION="-version-info"
4889         case "x$VERSION" in
4890         (x)
4891                 { echo "$as_me:4891: WARNING: VERSION was not set" >&5
4892 echo "$as_me: WARNING: VERSION was not set" >&2;}
4893                 ;;
4894         (x*.*.*)
4895                 ABI_VERSION="$VERSION"
4896                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4897
4898 echo "${as_me:-configure}:4898: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4899
4900                 ;;
4901         (x*:*:*)
4902                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
4903                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
4904
4905 echo "${as_me:-configure}:4905: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
4906
4907                 ;;
4908         (*)
4909                 { echo "$as_me:4909: WARNING: unexpected VERSION value: $VERSION" >&5
4910 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
4911                 ;;
4912         esac
4913 fi
4914
4915 LIBTOOL=
4916
4917 # common library maintenance symbols that are convenient for libtool scripts:
4918 LIB_CREATE='${AR} -cr'
4919 LIB_OBJECT='${OBJECTS}'
4920 LIB_SUFFIX=.a
4921 LIB_PREP="$RANLIB"
4922
4923 # symbols used to prop libtool up to enable it to determine what it should be
4924 # doing:
4925 LIB_CLEAN=
4926 LIB_COMPILE=
4927 LIB_LINK='${CC}'
4928 LIB_INSTALL=
4929 LIB_UNINSTALL=
4930
4931 echo "$as_me:4931: checking if you want to build libraries with libtool" >&5
4932 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4933
4934 # Check whether --with-libtool or --without-libtool was given.
4935 if test "${with_libtool+set}" = set; then
4936   withval="$with_libtool"
4937   with_libtool=$withval
4938 else
4939   with_libtool=no
4940 fi;
4941 echo "$as_me:4941: result: $with_libtool" >&5
4942 echo "${ECHO_T}$with_libtool" >&6
4943 if test "$with_libtool" != "no"; then
4944
4945         if test "$with_libtool" != "yes" ; then
4946
4947 if test "x$prefix" != xNONE; then
4948         cf_path_syntax="$prefix"
4949 else
4950         cf_path_syntax="$ac_default_prefix"
4951 fi
4952
4953 case ".$with_libtool" in
4954 (.\$\(*\)*|.\'*\'*)
4955         ;;
4956 (..|./*|.\\*)
4957         ;;
4958 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4959         ;;
4960 (.\${*prefix}*|.\${*dir}*)
4961         eval with_libtool="$with_libtool"
4962         case ".$with_libtool" in
4963         (.NONE/*)
4964                 with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4965                 ;;
4966         esac
4967         ;;
4968 (.no|.NONE/*)
4969         with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4970         ;;
4971 (*)
4972         { { echo "$as_me:4972: error: expected a pathname, not \"$with_libtool\"" >&5
4973 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4974    { (exit 1); exit 1; }; }
4975         ;;
4976 esac
4977
4978                 LIBTOOL=$with_libtool
4979         else
4980                 if test -n "$ac_tool_prefix"; then
4981   for ac_prog in libtool glibtool
4982   do
4983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4985 echo "$as_me:4985: checking for $ac_word" >&5
4986 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4987 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4988   echo $ECHO_N "(cached) $ECHO_C" >&6
4989 else
4990   if test -n "$LIBTOOL"; then
4991   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4992 else
4993   ac_save_IFS=$IFS; IFS=$ac_path_separator
4994 ac_dummy="$PATH"
4995 for ac_dir in $ac_dummy; do
4996   IFS=$ac_save_IFS
4997   test -z "$ac_dir" && ac_dir=.
4998   $as_executable_p "$ac_dir/$ac_word" || continue
4999 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5000 echo "$as_me:5000: found $ac_dir/$ac_word" >&5
5001 break
5002 done
5003
5004 fi
5005 fi
5006 LIBTOOL=$ac_cv_prog_LIBTOOL
5007 if test -n "$LIBTOOL"; then
5008   echo "$as_me:5008: result: $LIBTOOL" >&5
5009 echo "${ECHO_T}$LIBTOOL" >&6
5010 else
5011   echo "$as_me:5011: result: no" >&5
5012 echo "${ECHO_T}no" >&6
5013 fi
5014
5015     test -n "$LIBTOOL" && break
5016   done
5017 fi
5018 if test -z "$LIBTOOL"; then
5019   ac_ct_LIBTOOL=$LIBTOOL
5020   for ac_prog in libtool glibtool
5021 do
5022   # Extract the first word of "$ac_prog", so it can be a program name with args.
5023 set dummy $ac_prog; ac_word=$2
5024 echo "$as_me:5024: checking for $ac_word" >&5
5025 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5026 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5027   echo $ECHO_N "(cached) $ECHO_C" >&6
5028 else
5029   if test -n "$ac_ct_LIBTOOL"; then
5030   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5031 else
5032   ac_save_IFS=$IFS; IFS=$ac_path_separator
5033 ac_dummy="$PATH"
5034 for ac_dir in $ac_dummy; do
5035   IFS=$ac_save_IFS
5036   test -z "$ac_dir" && ac_dir=.
5037   $as_executable_p "$ac_dir/$ac_word" || continue
5038 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5039 echo "$as_me:5039: found $ac_dir/$ac_word" >&5
5040 break
5041 done
5042
5043 fi
5044 fi
5045 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5046 if test -n "$ac_ct_LIBTOOL"; then
5047   echo "$as_me:5047: result: $ac_ct_LIBTOOL" >&5
5048 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5049 else
5050   echo "$as_me:5050: result: no" >&5
5051 echo "${ECHO_T}no" >&6
5052 fi
5053
5054   test -n "$ac_ct_LIBTOOL" && break
5055 done
5056 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5057
5058   LIBTOOL=$ac_ct_LIBTOOL
5059 fi
5060
5061 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5062 then
5063         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.].*//'`
5064 else
5065         cf_cv_libtool_version=
5066 fi
5067 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5068
5069                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5070                 then
5071
5072 unset ac_cv_prog_ac_ct_LIBTOOL
5073 unset ac_ct_LIBTOOL
5074 unset LIBTOOL
5075
5076                         if test -n "$ac_tool_prefix"; then
5077   for ac_prog in glibtool
5078   do
5079     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5080 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5081 echo "$as_me:5081: checking for $ac_word" >&5
5082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5083 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5084   echo $ECHO_N "(cached) $ECHO_C" >&6
5085 else
5086   if test -n "$LIBTOOL"; then
5087   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5088 else
5089   ac_save_IFS=$IFS; IFS=$ac_path_separator
5090 ac_dummy="$PATH"
5091 for ac_dir in $ac_dummy; do
5092   IFS=$ac_save_IFS
5093   test -z "$ac_dir" && ac_dir=.
5094   $as_executable_p "$ac_dir/$ac_word" || continue
5095 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5096 echo "$as_me:5096: found $ac_dir/$ac_word" >&5
5097 break
5098 done
5099
5100 fi
5101 fi
5102 LIBTOOL=$ac_cv_prog_LIBTOOL
5103 if test -n "$LIBTOOL"; then
5104   echo "$as_me:5104: result: $LIBTOOL" >&5
5105 echo "${ECHO_T}$LIBTOOL" >&6
5106 else
5107   echo "$as_me:5107: result: no" >&5
5108 echo "${ECHO_T}no" >&6
5109 fi
5110
5111     test -n "$LIBTOOL" && break
5112   done
5113 fi
5114 if test -z "$LIBTOOL"; then
5115   ac_ct_LIBTOOL=$LIBTOOL
5116   for ac_prog in glibtool
5117 do
5118   # Extract the first word of "$ac_prog", so it can be a program name with args.
5119 set dummy $ac_prog; ac_word=$2
5120 echo "$as_me:5120: checking for $ac_word" >&5
5121 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5122 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5123   echo $ECHO_N "(cached) $ECHO_C" >&6
5124 else
5125   if test -n "$ac_ct_LIBTOOL"; then
5126   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5127 else
5128   ac_save_IFS=$IFS; IFS=$ac_path_separator
5129 ac_dummy="$PATH"
5130 for ac_dir in $ac_dummy; do
5131   IFS=$ac_save_IFS
5132   test -z "$ac_dir" && ac_dir=.
5133   $as_executable_p "$ac_dir/$ac_word" || continue
5134 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5135 echo "$as_me:5135: found $ac_dir/$ac_word" >&5
5136 break
5137 done
5138
5139 fi
5140 fi
5141 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5142 if test -n "$ac_ct_LIBTOOL"; then
5143   echo "$as_me:5143: result: $ac_ct_LIBTOOL" >&5
5144 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5145 else
5146   echo "$as_me:5146: result: no" >&5
5147 echo "${ECHO_T}no" >&6
5148 fi
5149
5150   test -n "$ac_ct_LIBTOOL" && break
5151 done
5152 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5153
5154   LIBTOOL=$ac_ct_LIBTOOL
5155 fi
5156
5157 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5158 then
5159         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.].*//'`
5160 else
5161         cf_cv_libtool_version=
5162 fi
5163 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5164
5165                 fi
5166         fi
5167         if test -z "$LIBTOOL" ; then
5168                 { { echo "$as_me:5168: error: Cannot find libtool" >&5
5169 echo "$as_me: error: Cannot find libtool" >&2;}
5170    { (exit 1); exit 1; }; }
5171         fi
5172         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5173         LIB_OBJECT='${OBJECTS:.o=.lo}'
5174         LIB_SUFFIX=.la
5175         LIB_CLEAN='${LIBTOOL} --mode=clean'
5176         LIB_COMPILE='${LIBTOOL} --mode=compile'
5177         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5178         LIB_INSTALL='${LIBTOOL} --mode=install'
5179         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5180         LIB_PREP=:
5181
5182 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5183 then
5184         echo "$as_me:5184: checking version of $LIBTOOL" >&5
5185 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5186
5187 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5188 then
5189         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.].*//'`
5190 else
5191         cf_cv_libtool_version=
5192 fi
5193 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5194
5195         echo "$as_me:5195: result: $cf_cv_libtool_version" >&5
5196 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5197         if test -z "$cf_cv_libtool_version" ; then
5198                 { { echo "$as_me:5198: error: This is not GNU libtool" >&5
5199 echo "$as_me: error: This is not GNU libtool" >&2;}
5200    { (exit 1); exit 1; }; }
5201         fi
5202 else
5203         { { echo "$as_me:5203: error: GNU libtool has not been found" >&5
5204 echo "$as_me: error: GNU libtool has not been found" >&2;}
5205    { (exit 1); exit 1; }; }
5206 fi
5207
5208         # special hack to add -no-undefined (which libtool should do for itself)
5209         LT_UNDEF=
5210         case "$cf_cv_system_name" in
5211         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5212                 LT_UNDEF=-no-undefined
5213                 ;;
5214         esac
5215
5216         # special hack to add --tag option for C++ compiler
5217         case $cf_cv_libtool_version in
5218         (1.[5-9]*|[2-9].[0-9.a-z]*)
5219                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5220                 LIBTOOL="$LIBTOOL --tag=CC"
5221                 ;;
5222         (*)
5223                 LIBTOOL_CXX="$LIBTOOL"
5224                 ;;
5225         esac
5226 else
5227         LIBTOOL=""
5228         LIBTOOL_CXX=""
5229 fi
5230
5231 test -z "$LIBTOOL" && ECHO_LT=
5232
5233 if test "$with_libtool" != "no" ; then
5234
5235 cf_list_models="$cf_list_models libtool"
5236
5237 else
5238
5239 echo "$as_me:5239: checking if you want to build shared libraries" >&5
5240 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5241
5242 # Check whether --with-shared or --without-shared was given.
5243 if test "${with_shared+set}" = set; then
5244   withval="$with_shared"
5245   with_shared=$withval
5246 else
5247   with_shared=no
5248 fi;
5249 echo "$as_me:5249: result: $with_shared" >&5
5250 echo "${ECHO_T}$with_shared" >&6
5251 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5252
5253 echo "$as_me:5253: checking if you want to build static libraries" >&5
5254 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5255
5256 # Check whether --with-normal or --without-normal was given.
5257 if test "${with_normal+set}" = set; then
5258   withval="$with_normal"
5259   with_normal=$withval
5260 else
5261   with_normal=yes
5262 fi;
5263 echo "$as_me:5263: result: $with_normal" >&5
5264 echo "${ECHO_T}$with_normal" >&6
5265 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5266
5267 echo "$as_me:5267: checking if you want to build debug libraries" >&5
5268 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5269
5270 # Check whether --with-debug or --without-debug was given.
5271 if test "${with_debug+set}" = set; then
5272   withval="$with_debug"
5273   with_debug=$withval
5274 else
5275   with_debug=yes
5276 fi;
5277 echo "$as_me:5277: result: $with_debug" >&5
5278 echo "${ECHO_T}$with_debug" >&6
5279 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5280
5281 echo "$as_me:5281: checking if you want to build profiling libraries" >&5
5282 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5283
5284 # Check whether --with-profile or --without-profile was given.
5285 if test "${with_profile+set}" = set; then
5286   withval="$with_profile"
5287   with_profile=$withval
5288 else
5289   with_profile=no
5290 fi;
5291 echo "$as_me:5291: result: $with_profile" >&5
5292 echo "${ECHO_T}$with_profile" >&6
5293 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5294
5295 fi
5296
5297 if test "X$cf_with_cxx_binding" != Xno; then
5298 if test "x$with_shared" = "xyes"; then
5299 echo "$as_me:5299: checking if you want to build C++ shared libraries" >&5
5300 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5301
5302 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5303 if test "${with_cxx_shared+set}" = set; then
5304   withval="$with_cxx_shared"
5305   with_shared_cxx=$withval
5306 else
5307   with_shared_cxx=no
5308 fi;
5309 echo "$as_me:5309: result: $with_shared_cxx" >&5
5310 echo "${ECHO_T}$with_shared_cxx" >&6
5311 fi
5312 fi
5313
5314 ###############################################################################
5315
5316 echo "$as_me:5316: checking for specified models" >&5
5317 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5318 test -z "$cf_list_models" && cf_list_models=normal
5319 test "$with_libtool" != "no" && cf_list_models=libtool
5320 echo "$as_me:5320: result: $cf_list_models" >&5
5321 echo "${ECHO_T}$cf_list_models" >&6
5322
5323 ### Use the first model as the default, and save its suffix for use in building
5324 ### up test-applications.
5325 echo "$as_me:5325: checking for default model" >&5
5326 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5327 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5328 echo "$as_me:5328: result: $DFT_LWR_MODEL" >&5
5329 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5330
5331 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5332
5333 TICS_NAME=tic
5334
5335 TINFO_NAME=tinfo
5336
5337 LIB_NAME=ncurses
5338
5339 LIB_DIR=../lib
5340 LIB_2ND=../../lib
5341
5342 echo "$as_me:5342: checking if you want to have a library-prefix" >&5
5343 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5344
5345 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5346 if test "${with_lib_prefix+set}" = set; then
5347   withval="$with_lib_prefix"
5348   with_lib_prefix=$withval
5349 else
5350   with_lib_prefix=auto
5351 fi;
5352 echo "$as_me:5352: result: $with_lib_prefix" >&5
5353 echo "${ECHO_T}$with_lib_prefix" >&6
5354
5355 if test $with_lib_prefix = auto
5356 then
5357
5358         case $cf_cv_system_name in
5359         (OS/2*|os2*)
5360                 if test "$DFT_LWR_MODEL" = libtool; then
5361                         LIB_PREFIX='lib'
5362                 else
5363                         LIB_PREFIX=''
5364                 fi
5365                 ;;
5366         (*)     LIB_PREFIX='lib'
5367                 ;;
5368         esac
5369 cf_prefix=$LIB_PREFIX
5370
5371 elif test $with_lib_prefix = no
5372 then
5373         LIB_PREFIX=
5374 else
5375         LIB_PREFIX=$with_lib_prefix
5376 fi
5377
5378 LIB_SUFFIX=
5379
5380         echo "$as_me:5380: checking for PATH separator" >&5
5381 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5382         case $cf_cv_system_name in
5383         (os2*)  PATH_SEPARATOR=';'  ;;
5384         (*)     ${PATH_SEPARATOR:=':'}  ;;
5385         esac
5386
5387         echo "$as_me:5387: result: $PATH_SEPARATOR" >&5
5388 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5389
5390 ###############################################################################
5391
5392 echo "$as_me:5392: checking if you want to build a separate terminfo library" >&5
5393 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5394
5395 # Check whether --with-termlib or --without-termlib was given.
5396 if test "${with_termlib+set}" = set; then
5397   withval="$with_termlib"
5398   with_termlib=$withval
5399 else
5400   with_termlib=no
5401 fi;
5402 echo "$as_me:5402: result: $with_termlib" >&5
5403 echo "${ECHO_T}$with_termlib" >&6
5404
5405 echo "$as_me:5405: checking if you want to build a separate tic library" >&5
5406 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5407
5408 # Check whether --with-ticlib or --without-ticlib was given.
5409 if test "${with_ticlib+set}" = set; then
5410   withval="$with_ticlib"
5411   with_ticlib=$withval
5412 else
5413   with_ticlib=no
5414 fi;
5415 echo "$as_me:5415: result: $with_ticlib" >&5
5416 echo "${ECHO_T}$with_ticlib" >&6
5417
5418 if test X"$CC_G_OPT" = X"" ; then
5419         CC_G_OPT='-g'
5420         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5421 fi
5422
5423 if test X"$CXX_G_OPT" = X"" ; then
5424         CXX_G_OPT='-g'
5425         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5426 fi
5427
5428 echo "$as_me:5428: checking for default loader flags" >&5
5429 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5430 case $DFT_LWR_MODEL in
5431 (libtool) LD_MODEL=''   ;;
5432 (normal)  LD_MODEL=''   ;;
5433 (debug)   LD_MODEL=$CC_G_OPT ;;
5434 (profile) LD_MODEL='-pg';;
5435 (shared)  LD_MODEL=''   ;;
5436 esac
5437 echo "$as_me:5437: result: $LD_MODEL" >&5
5438 echo "${ECHO_T}$LD_MODEL" >&6
5439
5440 case $DFT_LWR_MODEL in
5441 (shared)
5442
5443 echo "$as_me:5443: checking if rpath option should be used" >&5
5444 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5445
5446 # Check whether --enable-rpath or --disable-rpath was given.
5447 if test "${enable_rpath+set}" = set; then
5448   enableval="$enable_rpath"
5449   cf_cv_enable_rpath=$enableval
5450 else
5451   cf_cv_enable_rpath=no
5452 fi;
5453 echo "$as_me:5453: result: $cf_cv_enable_rpath" >&5
5454 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5455
5456 echo "$as_me:5456: checking if shared libraries should be relinked during install" >&5
5457 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5458
5459 # Check whether --enable-relink or --disable-relink was given.
5460 if test "${enable_relink+set}" = set; then
5461   enableval="$enable_relink"
5462   cf_cv_do_relink=$enableval
5463 else
5464   cf_cv_do_relink=yes
5465 fi;
5466 echo "$as_me:5466: result: $cf_cv_do_relink" >&5
5467 echo "${ECHO_T}$cf_cv_do_relink" >&6
5468         ;;
5469 esac
5470
5471 # we will build libraries one-level down.
5472 rel_builddir=..
5473
5474 LD_RPATH_OPT=
5475 if test "x$cf_cv_enable_rpath" != xno
5476 then
5477         echo "$as_me:5477: checking for an rpath option" >&5
5478 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5479         case $cf_cv_system_name in
5480         (irix*)
5481                 if test "$GCC" = yes; then
5482                         LD_RPATH_OPT="-Wl,-rpath,"
5483                 else
5484                         LD_RPATH_OPT="-rpath "
5485                 fi
5486                 ;;
5487         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5488                 LD_RPATH_OPT="-Wl,-rpath,"
5489                 ;;
5490         (openbsd[2-9].*|mirbsd*)
5491                 LD_RPATH_OPT="-Wl,-rpath,"
5492                 ;;
5493         (dragonfly*)
5494                 LD_RPATH_OPT="-rpath "
5495                 ;;
5496         (netbsd*)
5497                 LD_RPATH_OPT="-Wl,-rpath,"
5498                 ;;
5499         (osf*|mls+*)
5500                 LD_RPATH_OPT="-rpath "
5501                 ;;
5502         (solaris2*)
5503                 LD_RPATH_OPT="-R"
5504                 ;;
5505         (*)
5506                 ;;
5507         esac
5508         echo "$as_me:5508: result: $LD_RPATH_OPT" >&5
5509 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5510
5511         case "x$LD_RPATH_OPT" in
5512         (x-R*)
5513                 echo "$as_me:5513: checking if we need a space after rpath option" >&5
5514 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5515                 cf_save_LIBS="$LIBS"
5516
5517 cf_add_libs="${LD_RPATH_OPT}$libdir"
5518 # Filter out duplicates - this happens with badly-designed ".pc" files...
5519 for cf_add_1lib in $LIBS
5520 do
5521         for cf_add_2lib in $cf_add_libs
5522         do
5523                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5524                 then
5525                         cf_add_1lib=
5526                         break
5527                 fi
5528         done
5529         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5530 done
5531 LIBS="$cf_add_libs"
5532
5533                 cat >conftest.$ac_ext <<_ACEOF
5534 #line 5534 "configure"
5535 #include "confdefs.h"
5536
5537 int
5538 main (void)
5539 {
5540
5541   ;
5542   return 0;
5543 }
5544 _ACEOF
5545 rm -f conftest.$ac_objext conftest$ac_exeext
5546 if { (eval echo "$as_me:5546: \"$ac_link\"") >&5
5547   (eval $ac_link) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); } &&
5551          { ac_try='test -s conftest$ac_exeext'
5552   { (eval echo "$as_me:5552: \"$ac_try\"") >&5
5553   (eval $ac_try) 2>&5
5554   ac_status=$?
5555   echo "$as_me:5555: \$? = $ac_status" >&5
5556   (exit $ac_status); }; }; then
5557   cf_rpath_space=no
5558 else
5559   echo "$as_me: failed program was:" >&5
5560 cat conftest.$ac_ext >&5
5561 cf_rpath_space=yes
5562 fi
5563 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5564                 LIBS="$cf_save_LIBS"
5565                 echo "$as_me:5565: result: $cf_rpath_space" >&5
5566 echo "${ECHO_T}$cf_rpath_space" >&6
5567                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5568                 ;;
5569         esac
5570 fi
5571
5572         RM_SHARED_OPTS=
5573         LOCAL_LDFLAGS=
5574         LOCAL_LDFLAGS2=
5575         LD_SHARED_OPTS=
5576         INSTALL_LIB="-m 644"
5577         : ${rel_builddir:=.}
5578
5579         shlibdir=$libdir
5580
5581         MAKE_DLLS="#"
5582
5583         cf_cv_do_symlinks=no
5584         cf_ld_rpath_opt=
5585         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5586
5587         echo "$as_me:5587: checking if release/abi version should be used for shared libs" >&5
5588 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5589
5590 # Check whether --with-shlib-version or --without-shlib-version was given.
5591 if test "${with_shlib_version+set}" = set; then
5592   withval="$with_shlib_version"
5593   test -z "$withval" && withval=auto
5594         case $withval in
5595         (yes)
5596                 cf_cv_shlib_version=auto
5597                 ;;
5598         (rel|abi|auto)
5599                 cf_cv_shlib_version=$withval
5600                 ;;
5601         (*)
5602                 echo "$as_me:5602: result: $withval" >&5
5603 echo "${ECHO_T}$withval" >&6
5604                 { { echo "$as_me:5604: error: option value must be one of: rel, abi, or auto" >&5
5605 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
5606    { (exit 1); exit 1; }; }
5607                 ;;
5608         esac
5609
5610 else
5611   cf_cv_shlib_version=auto
5612 fi;
5613         echo "$as_me:5613: result: $cf_cv_shlib_version" >&5
5614 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5615
5616         cf_cv_rm_so_locs=no
5617         cf_try_cflags=
5618
5619         # Some less-capable ports of gcc support only -fpic
5620         CC_SHARED_OPTS=
5621
5622         cf_try_fPIC=no
5623         if test "$GCC" = yes
5624         then
5625                 cf_try_fPIC=yes
5626         else
5627                 case $cf_cv_system_name in
5628                 (*linux*)       # e.g., PGI compiler
5629                         cf_try_fPIC=yes
5630                         ;;
5631                 esac
5632         fi
5633
5634         if test "$cf_try_fPIC" = yes
5635         then
5636                 echo "$as_me:5636: checking which $CC option to use" >&5
5637 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5638                 cf_save_CFLAGS="$CFLAGS"
5639                 for CC_SHARED_OPTS in -fPIC -fpic ''
5640                 do
5641                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5642                         cat >conftest.$ac_ext <<_ACEOF
5643 #line 5643 "configure"
5644 #include "confdefs.h"
5645 #include <stdio.h>
5646 int
5647 main (void)
5648 {
5649 int x = 1
5650   ;
5651   return 0;
5652 }
5653 _ACEOF
5654 rm -f conftest.$ac_objext
5655 if { (eval echo "$as_me:5655: \"$ac_compile\"") >&5
5656   (eval $ac_compile) 2>&5
5657   ac_status=$?
5658   echo "$as_me:5658: \$? = $ac_status" >&5
5659   (exit $ac_status); } &&
5660          { ac_try='test -s conftest.$ac_objext'
5661   { (eval echo "$as_me:5661: \"$ac_try\"") >&5
5662   (eval $ac_try) 2>&5
5663   ac_status=$?
5664   echo "$as_me:5664: \$? = $ac_status" >&5
5665   (exit $ac_status); }; }; then
5666   break
5667 else
5668   echo "$as_me: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5670 fi
5671 rm -f conftest.$ac_objext conftest.$ac_ext
5672                 done
5673                 echo "$as_me:5673: result: $CC_SHARED_OPTS" >&5
5674 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5675                 CFLAGS="$cf_save_CFLAGS"
5676         fi
5677
5678         cf_cv_shlib_version_infix=no
5679
5680         case $cf_cv_system_name in
5681         (aix4.3-9*|aix[5-7]*)
5682                 if test "$GCC" = yes; then
5683                         CC_SHARED_OPTS='-Wl,-brtl'
5684                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5685                 else
5686                         CC_SHARED_OPTS='-brtl'
5687                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
5688                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5689                 fi
5690                 ;;
5691         (beos*)
5692                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5693                 ;;
5694         (cygwin*)
5695                 CC_SHARED_OPTS=
5696                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5697                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5698                 cf_cv_shlib_version=cygdll
5699                 cf_cv_shlib_version_infix=cygdll
5700                 shlibdir=$bindir
5701                 MAKE_DLLS=
5702                 cat >mk_shared_lib.sh <<-CF_EOF
5703                 #!$SHELL
5704                 SHARED_LIB=\$1
5705                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5706                 shift
5707                 cat <<-EOF
5708                 Linking shared library
5709                 ** SHARED_LIB \$SHARED_LIB
5710                 ** IMPORT_LIB \$IMPORT_LIB
5711 EOF
5712                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5713 CF_EOF
5714                 chmod +x mk_shared_lib.sh
5715                 ;;
5716         (msys*)
5717                 CC_SHARED_OPTS=
5718                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5719                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5720                 cf_cv_shlib_version=msysdll
5721                 cf_cv_shlib_version_infix=msysdll
5722                 shlibdir=$bindir
5723                 MAKE_DLLS=
5724                 cat >mk_shared_lib.sh <<-CF_EOF
5725                 #!$SHELL
5726                 SHARED_LIB=\$1
5727                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5728                 shift
5729                 cat <<-EOF
5730                 Linking shared library
5731                 ** SHARED_LIB \$SHARED_LIB
5732                 ** IMPORT_LIB \$IMPORT_LIB
5733 EOF
5734                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5735 CF_EOF
5736                 chmod +x mk_shared_lib.sh
5737                 ;;
5738         (darwin*)
5739                 cf_try_cflags="no-cpp-precomp"
5740                 CC_SHARED_OPTS="-dynamic"
5741                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5742                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5743                 cf_cv_shlib_version_infix=yes
5744                 echo "$as_me:5744: checking if ld -search_paths_first works" >&5
5745 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5746 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5747   echo $ECHO_N "(cached) $ECHO_C" >&6
5748 else
5749
5750                         cf_save_LDFLAGS=$LDFLAGS
5751                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5752                         cat >conftest.$ac_ext <<_ACEOF
5753 #line 5753 "configure"
5754 #include "confdefs.h"
5755
5756 int
5757 main (void)
5758 {
5759 int i;
5760   ;
5761   return 0;
5762 }
5763 _ACEOF
5764 rm -f conftest.$ac_objext conftest$ac_exeext
5765 if { (eval echo "$as_me:5765: \"$ac_link\"") >&5
5766   (eval $ac_link) 2>&5
5767   ac_status=$?
5768   echo "$as_me:5768: \$? = $ac_status" >&5
5769   (exit $ac_status); } &&
5770          { ac_try='test -s conftest$ac_exeext'
5771   { (eval echo "$as_me:5771: \"$ac_try\"") >&5
5772   (eval $ac_try) 2>&5
5773   ac_status=$?
5774   echo "$as_me:5774: \$? = $ac_status" >&5
5775   (exit $ac_status); }; }; then
5776   cf_cv_ldflags_search_paths_first=yes
5777 else
5778   echo "$as_me: failed program was:" >&5
5779 cat conftest.$ac_ext >&5
5780 cf_cv_ldflags_search_paths_first=no
5781 fi
5782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5783                                 LDFLAGS=$cf_save_LDFLAGS
5784 fi
5785 echo "$as_me:5785: result: $cf_cv_ldflags_search_paths_first" >&5
5786 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5787                 if test $cf_cv_ldflags_search_paths_first = yes; then
5788                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5789                 fi
5790                 ;;
5791         (hpux[7-8]*)
5792                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5793                 if test "$GCC" != yes; then
5794                         CC_SHARED_OPTS='+Z'
5795                 fi
5796                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
5797                 INSTALL_LIB="-m 555"
5798                 ;;
5799         (hpux*)
5800                 # (tested with gcc 2.7.2 -- I don't have c89)
5801                 if test "$GCC" = yes; then
5802                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5803                 else
5804                         CC_SHARED_OPTS='+Z'
5805                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5806                 fi
5807                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
5808                 # HP-UX shared libraries must be executable, and should be
5809                 # readonly to exploit a quirk in the memory manager.
5810                 INSTALL_LIB="-m 555"
5811                 ;;
5812         (interix*)
5813                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5814                 if test "$cf_cv_shlib_version" = rel; then
5815                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5816                 else
5817                         cf_shared_soname='`basename $@`'
5818                 fi
5819                 CC_SHARED_OPTS=
5820                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
5821                 ;;
5822         (irix*)
5823                 if test "$cf_cv_enable_rpath" = yes ; then
5824                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5825                 fi
5826                 # tested with IRIX 5.2 and 'cc'.
5827                 if test "$GCC" != yes; then
5828                         CC_SHARED_OPTS='-KPIC'
5829                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
5830                 else
5831                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
5832                 fi
5833                 cf_cv_rm_so_locs=yes
5834                 ;;
5835         (linux*|gnu*|k*bsd*-gnu)
5836                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5837                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5838                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5839                 fi
5840                 if test "$cf_cv_enable_rpath" = yes ; then
5841                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5842                 fi
5843
5844         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5845         if test "$cf_cv_shlib_version" = rel; then
5846                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5847         else
5848                 cf_cv_shared_soname='`basename $@`'
5849         fi
5850
5851                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5852                 ;;
5853         (mingw*)
5854                 cf_cv_shlib_version=mingw
5855                 cf_cv_shlib_version_infix=mingw
5856                 shlibdir=$bindir
5857                 MAKE_DLLS=
5858                 if test "$DFT_LWR_MODEL" = "shared" ; then
5859                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5860                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5861                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5862                 fi
5863                 CC_SHARED_OPTS=
5864                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5865                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5866                 cat >mk_shared_lib.sh <<-CF_EOF
5867                 #!$SHELL
5868                 SHARED_LIB=\$1
5869                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5870                 shift
5871                 cat <<-EOF
5872                 Linking shared library
5873                 ** SHARED_LIB \$SHARED_LIB
5874                 ** IMPORT_LIB \$IMPORT_LIB
5875 EOF
5876                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5877 CF_EOF
5878                 chmod +x mk_shared_lib.sh
5879                 ;;
5880         (openbsd[2-9].*|mirbsd*)
5881                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5882                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                 fi
5885                 if test "$cf_cv_enable_rpath" = yes ; then
5886                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5887                 fi
5888                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5889
5890         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5891         if test "$cf_cv_shlib_version" = rel; then
5892                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5893         else
5894                 cf_cv_shared_soname='`basename $@`'
5895         fi
5896
5897                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5898                 ;;
5899         (nto-qnx*|openbsd*|freebsd[12].*)
5900                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5901                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
5902                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5903                 ;;
5904         (dragonfly*|freebsd*)
5905                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5906                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5907                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5908                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5909                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5910                 fi
5911
5912         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5913         if test "$cf_cv_shlib_version" = rel; then
5914                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5915         else
5916                 cf_cv_shared_soname='`basename $@`'
5917         fi
5918
5919                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5920                 ;;
5921         (netbsd*)
5922                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5923                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5924                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5925                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5926                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5927                         if test "$cf_cv_shlib_version" = auto; then
5928                         if test -f /usr/libexec/ld.elf_so; then
5929                                 cf_cv_shlib_version=abi
5930                         else
5931                                 cf_cv_shlib_version=rel
5932                         fi
5933                         fi
5934
5935         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5936         if test "$cf_cv_shlib_version" = rel; then
5937                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5938         else
5939                 cf_cv_shared_soname='`basename $@`'
5940         fi
5941
5942                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5943                 else
5944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
5945                 fi
5946                 ;;
5947         (osf*|mls+*)
5948                 # tested with OSF/1 V3.2 and 'cc'
5949                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5950                 # link with shared libs).
5951                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5952                 case $host_os in
5953                 (osf4*)
5954                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5955                         ;;
5956                 esac
5957                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5958                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
5959                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5960                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5961                 fi
5962                 cf_cv_rm_so_locs=yes
5963                 ;;
5964         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
5965                 # tested with osr5.0.5
5966                 if test "$GCC" != yes; then
5967                         CC_SHARED_OPTS='-belf -KPIC'
5968                 fi
5969                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5970                 if test "$cf_cv_enable_rpath" = yes ; then
5971                         # only way is to set LD_RUN_PATH but no switch for it
5972                         RUN_PATH=$libdir
5973                 fi
5974                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5975                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5976                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5977                 ;;
5978         (sunos4*)
5979                 # tested with SunOS 4.1.1 and gcc 2.7.0
5980                 if test "$GCC" != yes; then
5981                         CC_SHARED_OPTS='-KPIC'
5982                 fi
5983                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
5984                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5985                 ;;
5986         (solaris2*)
5987                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5988                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5989                 if test "$DFT_LWR_MODEL" = "shared" ; then
5990                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5991                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5992                 fi
5993                 if test "$cf_cv_enable_rpath" = yes ; then
5994                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5995                 fi
5996
5997         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5998         if test "$cf_cv_shlib_version" = rel; then
5999                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6000         else
6001                 cf_cv_shared_soname='`basename $@`'
6002         fi
6003
6004                 if test "$GCC" != yes; then
6005                         cf_save_CFLAGS="$CFLAGS"
6006                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6007                         do
6008                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6009                                 cat >conftest.$ac_ext <<_ACEOF
6010 #line 6010 "configure"
6011 #include "confdefs.h"
6012 #include <stdio.h>
6013 int
6014 main (void)
6015 {
6016 printf("Hello\n");
6017   ;
6018   return 0;
6019 }
6020 _ACEOF
6021 rm -f conftest.$ac_objext
6022 if { (eval echo "$as_me:6022: \"$ac_compile\"") >&5
6023   (eval $ac_compile) 2>&5
6024   ac_status=$?
6025   echo "$as_me:6025: \$? = $ac_status" >&5
6026   (exit $ac_status); } &&
6027          { ac_try='test -s conftest.$ac_objext'
6028   { (eval echo "$as_me:6028: \"$ac_try\"") >&5
6029   (eval $ac_try) 2>&5
6030   ac_status=$?
6031   echo "$as_me:6031: \$? = $ac_status" >&5
6032   (exit $ac_status); }; }; then
6033   break
6034 else
6035   echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 fi
6038 rm -f conftest.$ac_objext conftest.$ac_ext
6039                         done
6040                         CFLAGS="$cf_save_CFLAGS"
6041                         CC_SHARED_OPTS=$cf_shared_opts
6042                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6043                 else
6044                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6045                 fi
6046                 ;;
6047         (sysv5uw7*|unix_sv*)
6048                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6049                 if test "$GCC" != yes; then
6050                         CC_SHARED_OPTS='-KPIC'
6051                 fi
6052                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6053                 ;;
6054         (*)
6055                 CC_SHARED_OPTS='unknown'
6056                 MK_SHARED_LIB='echo unknown'
6057                 ;;
6058         esac
6059
6060         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6061         case "$cf_cv_shlib_version" in
6062         (rel|abi)
6063                 case "$MK_SHARED_LIB" in
6064                 (*'-o $@')
6065                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6066                         ;;
6067                 (*)
6068                         { echo "$as_me:6068: WARNING: ignored --with-shlib-version" >&5
6069 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6070                         ;;
6071                 esac
6072                 ;;
6073         esac
6074
6075         if test -n "$cf_try_cflags"
6076         then
6077 cat > conftest.$ac_ext <<EOF
6078 #line 6078 "${as_me:-configure}"
6079 #include <stdio.h>
6080 int main(int argc, char *argv[])
6081 {
6082         printf("hello\n");
6083         return (argv[argc-1] == 0) ;
6084 }
6085 EOF
6086                 cf_save_CFLAGS="$CFLAGS"
6087                 for cf_opt in $cf_try_cflags
6088                 do
6089                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6090                         echo "$as_me:6090: checking if CFLAGS option -$cf_opt works" >&5
6091 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6092                         if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
6093   (eval $ac_compile) 2>&5
6094   ac_status=$?
6095   echo "$as_me:6095: \$? = $ac_status" >&5
6096   (exit $ac_status); }; then
6097                                 echo "$as_me:6097: result: yes" >&5
6098 echo "${ECHO_T}yes" >&6
6099                                 cf_save_CFLAGS="$CFLAGS"
6100                         else
6101                                 echo "$as_me:6101: result: no" >&5
6102 echo "${ECHO_T}no" >&6
6103                         fi
6104                 done
6105                 CFLAGS="$cf_save_CFLAGS"
6106         fi
6107
6108         # RPATH_LIST is a colon-separated list of directories
6109         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6110         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6111
6112         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6113
6114         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6115
6116 echo "${as_me:-configure}:6116: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6117
6118         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6119
6120 echo "${as_me:-configure}:6120: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6121
6122 for model in $cf_list_models; do
6123         case $model in
6124         (libtool)
6125
6126 echo "$as_me:6126: checking for additional libtool options" >&5
6127 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6128
6129 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6130 if test "${with_libtool_opts+set}" = set; then
6131   withval="$with_libtool_opts"
6132   with_libtool_opts=$withval
6133 else
6134   with_libtool_opts=no
6135 fi;
6136 echo "$as_me:6136: result: $with_libtool_opts" >&5
6137 echo "${ECHO_T}$with_libtool_opts" >&6
6138
6139 case .$with_libtool_opts in
6140 (.yes|.no|.)
6141         ;;
6142 (*)
6143         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6144         ;;
6145 esac
6146
6147 echo "$as_me:6147: checking if exported-symbols file should be used" >&5
6148 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6149
6150 # Check whether --with-export-syms or --without-export-syms was given.
6151 if test "${with_export_syms+set}" = set; then
6152   withval="$with_export_syms"
6153   with_export_syms=$withval
6154 else
6155   with_export_syms=no
6156 fi;
6157 if test "x$with_export_syms" = xyes
6158 then
6159         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6160
6161 fi
6162 echo "$as_me:6162: result: $with_export_syms" >&5
6163 echo "${ECHO_T}$with_export_syms" >&6
6164 if test "x$with_export_syms" != xno
6165 then
6166         EXPORT_SYMS="-export-symbols $with_export_syms"
6167
6168 fi
6169
6170                 ;;
6171         (shared)
6172                 if test "$CC_SHARED_OPTS" = "unknown"; then
6173                         { { echo "$as_me:6173: error: Shared libraries are not supported in this version" >&5
6174 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6175    { (exit 1); exit 1; }; }
6176                 fi
6177                 # workaround for inept transition to PIE vs PIC...
6178                 echo "$as_me:6178: checking if current CFLAGS link properly" >&5
6179 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6180                 cat >conftest.$ac_ext <<_ACEOF
6181 #line 6181 "configure"
6182 #include "confdefs.h"
6183 #include <stdio.h>
6184 int
6185 main (void)
6186 {
6187 printf("Hello work\n");
6188   ;
6189   return 0;
6190 }
6191 _ACEOF
6192 rm -f conftest.$ac_objext conftest$ac_exeext
6193 if { (eval echo "$as_me:6193: \"$ac_link\"") >&5
6194   (eval $ac_link) 2>&5
6195   ac_status=$?
6196   echo "$as_me:6196: \$? = $ac_status" >&5
6197   (exit $ac_status); } &&
6198          { ac_try='test -s conftest$ac_exeext'
6199   { (eval echo "$as_me:6199: \"$ac_try\"") >&5
6200   (eval $ac_try) 2>&5
6201   ac_status=$?
6202   echo "$as_me:6202: \$? = $ac_status" >&5
6203   (exit $ac_status); }; }; then
6204   cf_cflags_work=yes
6205 else
6206   echo "$as_me: failed program was:" >&5
6207 cat conftest.$ac_ext >&5
6208 cf_cflags_work=no
6209 fi
6210 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6211                 echo "$as_me:6211: result: $cf_cflags_work" >&5
6212 echo "${ECHO_T}$cf_cflags_work" >&6
6213                 if test "$cf_cflags_work" = no
6214                 then
6215                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6216
6217 echo "${as_me:-configure}:6217: testing try to work around by appending shared-options ..." 1>&5
6218
6219                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6220                 fi
6221
6222 echo "$as_me:6222: checking if versioned-symbols file should be used" >&5
6223 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6224
6225 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6226 if test "${with_versioned_syms+set}" = set; then
6227   withval="$with_versioned_syms"
6228   with_versioned_syms=$withval
6229 else
6230   with_versioned_syms=no
6231 fi;
6232 case "x$with_versioned_syms" in
6233 (xyes)
6234         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6235
6236         ;;
6237 (xno)
6238         ;;
6239 (x/*)
6240         test -f "$with_versioned_syms" || { { echo "$as_me:6240: error: expected a filename: $with_versioned_syms" >&5
6241 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6242    { (exit 1); exit 1; }; }
6243         ;;
6244 (*)
6245         test -f "$with_versioned_syms" || { { echo "$as_me:6245: error: expected a filename: $with_versioned_syms" >&5
6246 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6247    { (exit 1); exit 1; }; }
6248         with_versioned_syms=`pwd`/"$with_versioned_syms"
6249         ;;
6250 esac
6251 echo "$as_me:6251: result: $with_versioned_syms" >&5
6252 echo "${ECHO_T}$with_versioned_syms" >&6
6253
6254 RESULTING_SYMS=
6255 VERSIONED_SYMS=
6256 WILDCARD_SYMS=
6257
6258 if test "x$with_versioned_syms" != xno
6259 then
6260         RESULTING_SYMS=$with_versioned_syms
6261         case "x$MK_SHARED_LIB" in
6262         (*-Wl,*)
6263                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6264                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6265                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6266
6267 echo "${as_me:-configure}:6267: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6268
6269                 ;;
6270         (*-dy\ *)
6271                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6272                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6273                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6274
6275 echo "${as_me:-configure}:6275: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6276
6277                 ;;
6278         (*)
6279                 { echo "$as_me:6279: WARNING: this system does not support versioned-symbols" >&5
6280 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6281                 ;;
6282         esac
6283
6284         # Linux ld can selectively override scope, e.g., of symbols beginning with
6285         # "_" by first declaring some as global, and then using a wildcard to
6286         # declare the others as local.  Some other loaders cannot do this.  Check
6287         # by constructing a (very) simple shared library and inspecting its
6288         # symbols.
6289         if test "x$VERSIONED_SYMS" != "x"
6290         then
6291                 echo "$as_me:6291: checking if wildcards can be used to selectively omit symbols" >&5
6292 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6293                 WILDCARD_SYMS=no
6294
6295                 # make sources
6296                 rm -f conftest.*
6297
6298                 cat >conftest.ver <<EOF
6299 module_1.0 {
6300 global:
6301         globalf1;
6302 local:
6303         localf1;
6304 };
6305 module_2.0 {
6306 global:
6307         globalf2;
6308 local:
6309         localf2;
6310         _*;
6311 } module_1.0;
6312 submodule_1.0 {
6313 global:
6314         subglobalf1;
6315         _ismissing;
6316 local:
6317         sublocalf1;
6318 };
6319 submodule_2.0 {
6320 global:
6321         subglobalf2;
6322 local:
6323         sublocalf2;
6324         _*;
6325 } submodule_1.0;
6326 EOF
6327                 cat >conftest.$ac_ext <<EOF
6328 #line 6328 "configure"
6329 int     _ismissing(void) { return 1; }
6330 int     _localf1(void) { return 1; }
6331 int     _localf2(void) { return 2; }
6332 int     globalf1(void) { return 1; }
6333 int     globalf2(void) { return 2; }
6334 int     _sublocalf1(void) { return 1; }
6335 int     _sublocalf2(void) { return 2; }
6336 int     subglobalf1(void) { return 1; }
6337 int     subglobalf2(void) { return 2; }
6338 EOF
6339                 cat >conftest.mk <<EOF
6340 CC=${CC}
6341 CFLAGS=${CFLAGS}
6342 CPPFLAGS=${CPPFLAGS}
6343 LDFLAGS=${LDFLAGS}
6344 LIBS=${LIBS}
6345 VERSIONED_SYMS=${VERSIONED_SYMS}
6346 RESULTING_SYMS=conftest.ver
6347 MK_SHARED_LIB=${MK_SHARED_LIB}
6348 conftest.so: conftest.$ac_cv_objext
6349                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6350 EOF
6351
6352                 # compile source, make library
6353                 if make -f conftest.mk 2>&5 >/dev/null
6354                 then
6355                         # test for missing symbol in either Data or Text section
6356                         cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[         ][DT][  ]'`
6357                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6358                 fi
6359                 echo "$as_me:6359: result: $WILDCARD_SYMS" >&5
6360 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6361                 rm -f conftest.*
6362         fi
6363 fi
6364
6365                 ;;
6366         esac
6367 done
6368
6369 ### Checks for special libraries, must be done up-front.
6370 SHLIB_LIST=""
6371
6372 echo "$as_me:6372: checking if you want to link with the GPM mouse library" >&5
6373 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6374
6375 # Check whether --with-gpm or --without-gpm was given.
6376 if test "${with_gpm+set}" = set; then
6377   withval="$with_gpm"
6378   with_gpm=$withval
6379 else
6380   with_gpm=maybe
6381 fi;
6382 echo "$as_me:6382: result: $with_gpm" >&5
6383 echo "${ECHO_T}$with_gpm" >&6
6384
6385 if test "$with_gpm" != no ; then
6386         echo "$as_me:6386: checking for gpm.h" >&5
6387 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6388 if test "${ac_cv_header_gpm_h+set}" = set; then
6389   echo $ECHO_N "(cached) $ECHO_C" >&6
6390 else
6391   cat >conftest.$ac_ext <<_ACEOF
6392 #line 6392 "configure"
6393 #include "confdefs.h"
6394 #include <gpm.h>
6395 _ACEOF
6396 if { (eval echo "$as_me:6396: \"$ac_cpp conftest.$ac_ext\"") >&5
6397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6398   ac_status=$?
6399   egrep -v '^ *\+' conftest.er1 >conftest.err
6400   rm -f conftest.er1
6401   cat conftest.err >&5
6402   echo "$as_me:6402: \$? = $ac_status" >&5
6403   (exit $ac_status); } >/dev/null; then
6404   if test -s conftest.err; then
6405     ac_cpp_err=$ac_c_preproc_warn_flag
6406   else
6407     ac_cpp_err=
6408   fi
6409 else
6410   ac_cpp_err=yes
6411 fi
6412 if test -z "$ac_cpp_err"; then
6413   ac_cv_header_gpm_h=yes
6414 else
6415   echo "$as_me: failed program was:" >&5
6416   cat conftest.$ac_ext >&5
6417   ac_cv_header_gpm_h=no
6418 fi
6419 rm -f conftest.err conftest.$ac_ext
6420 fi
6421 echo "$as_me:6421: result: $ac_cv_header_gpm_h" >&5
6422 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
6423 if test $ac_cv_header_gpm_h = yes; then
6424
6425 cat >>confdefs.h <<\EOF
6426 #define HAVE_GPM_H 1
6427 EOF
6428
6429                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
6430                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
6431
6432 echo "${as_me:-configure}:6432: testing assuming we really have GPM library ..." 1>&5
6433
6434 cat >>confdefs.h <<\EOF
6435 #define HAVE_LIBGPM 1
6436 EOF
6437
6438                         with_gpm=yes
6439                 else
6440                         echo "$as_me:6440: checking for Gpm_Open in -lgpm" >&5
6441 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
6442 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
6443   echo $ECHO_N "(cached) $ECHO_C" >&6
6444 else
6445   ac_check_lib_save_LIBS=$LIBS
6446 LIBS="-lgpm  $LIBS"
6447 cat >conftest.$ac_ext <<_ACEOF
6448 #line 6448 "configure"
6449 #include "confdefs.h"
6450
6451 /* Override any gcc2 internal prototype to avoid an error.  */
6452 #ifdef __cplusplus
6453 extern "C"
6454 #endif
6455 /* We use char because int might match the return type of a gcc2
6456    builtin and then its argument prototype would still apply.  */
6457 char Gpm_Open ();
6458 int
6459 main (void)
6460 {
6461 Gpm_Open ();
6462   ;
6463   return 0;
6464 }
6465 _ACEOF
6466 rm -f conftest.$ac_objext conftest$ac_exeext
6467 if { (eval echo "$as_me:6467: \"$ac_link\"") >&5
6468   (eval $ac_link) 2>&5
6469   ac_status=$?
6470   echo "$as_me:6470: \$? = $ac_status" >&5
6471   (exit $ac_status); } &&
6472          { ac_try='test -s conftest$ac_exeext'
6473   { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474   (eval $ac_try) 2>&5
6475   ac_status=$?
6476   echo "$as_me:6476: \$? = $ac_status" >&5
6477   (exit $ac_status); }; }; then
6478   ac_cv_lib_gpm_Gpm_Open=yes
6479 else
6480   echo "$as_me: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 ac_cv_lib_gpm_Gpm_Open=no
6483 fi
6484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6485 LIBS=$ac_check_lib_save_LIBS
6486 fi
6487 echo "$as_me:6487: result: $ac_cv_lib_gpm_Gpm_Open" >&5
6488 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
6489 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
6490   with_gpm=yes
6491 else
6492
6493                                 if test "$with_gpm" = maybe; then
6494                                         { echo "$as_me:6494: WARNING: Cannot link with GPM library" >&5
6495 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
6496                                         with_gpm=no
6497                                 else
6498                                         { { echo "$as_me:6498: error: Cannot link with GPM library" >&5
6499 echo "$as_me: error: Cannot link with GPM library" >&2;}
6500    { (exit 1); exit 1; }; }
6501                                 fi
6502
6503 fi
6504
6505                 fi
6506
6507 else
6508
6509                 test "$with_gpm" != maybe && { echo "$as_me:6509: WARNING: Cannot find GPM header" >&5
6510 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
6511                 with_gpm=no
6512
6513 fi
6514
6515 fi
6516
6517 if test "$with_gpm" != no ; then
6518         echo "$as_me:6518: checking if you want to load GPM dynamically" >&5
6519 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
6520
6521 # Check whether --with-dlsym or --without-dlsym was given.
6522 if test "${with_dlsym+set}" = set; then
6523   withval="$with_dlsym"
6524   with_dlsym=$withval
6525 else
6526   with_dlsym=yes
6527 fi;
6528         echo "$as_me:6528: result: $with_dlsym" >&5
6529 echo "${ECHO_T}$with_dlsym" >&6
6530         if test "x$with_dlsym" = xyes ; then
6531
6532 cf_have_dlsym=no
6533 echo "$as_me:6533: checking for dlsym" >&5
6534 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
6535 if test "${ac_cv_func_dlsym+set}" = set; then
6536   echo $ECHO_N "(cached) $ECHO_C" >&6
6537 else
6538   cat >conftest.$ac_ext <<_ACEOF
6539 #line 6539 "configure"
6540 #include "confdefs.h"
6541 #define dlsym autoconf_temporary
6542 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
6543 #undef dlsym
6544
6545 #ifdef __cplusplus
6546 extern "C"
6547 #endif
6548
6549 /* We use char because int might match the return type of a gcc2
6550    builtin and then its argument prototype would still apply.  */
6551 char dlsym (void);
6552
6553 int
6554 main (void)
6555 {
6556
6557 /* The GNU C library defines stubs for functions which it implements
6558     to always fail with ENOSYS.  Some functions are actually named
6559     something starting with __ and the normal name is an alias.  */
6560 #if defined (__stub_dlsym) || defined (__stub___dlsym)
6561 #error found stub for dlsym
6562 #endif
6563
6564         return dlsym ();
6565   ;
6566   return 0;
6567 }
6568 _ACEOF
6569 rm -f conftest.$ac_objext conftest$ac_exeext
6570 if { (eval echo "$as_me:6570: \"$ac_link\"") >&5
6571   (eval $ac_link) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit $ac_status); } &&
6575          { ac_try='test -s conftest$ac_exeext'
6576   { (eval echo "$as_me:6576: \"$ac_try\"") >&5
6577   (eval $ac_try) 2>&5
6578   ac_status=$?
6579   echo "$as_me:6579: \$? = $ac_status" >&5
6580   (exit $ac_status); }; }; then
6581   ac_cv_func_dlsym=yes
6582 else
6583   echo "$as_me: failed program was:" >&5
6584 cat conftest.$ac_ext >&5
6585 ac_cv_func_dlsym=no
6586 fi
6587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6588 fi
6589 echo "$as_me:6589: result: $ac_cv_func_dlsym" >&5
6590 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
6591 if test $ac_cv_func_dlsym = yes; then
6592   cf_have_dlsym=yes
6593 else
6594
6595 cf_have_libdl=no
6596 echo "$as_me:6596: checking for dlsym in -ldl" >&5
6597 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
6598 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
6599   echo $ECHO_N "(cached) $ECHO_C" >&6
6600 else
6601   ac_check_lib_save_LIBS=$LIBS
6602 LIBS="-ldl  $LIBS"
6603 cat >conftest.$ac_ext <<_ACEOF
6604 #line 6604 "configure"
6605 #include "confdefs.h"
6606
6607 /* Override any gcc2 internal prototype to avoid an error.  */
6608 #ifdef __cplusplus
6609 extern "C"
6610 #endif
6611 /* We use char because int might match the return type of a gcc2
6612    builtin and then its argument prototype would still apply.  */
6613 char dlsym ();
6614 int
6615 main (void)
6616 {
6617 dlsym ();
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 rm -f conftest.$ac_objext conftest$ac_exeext
6623 if { (eval echo "$as_me:6623: \"$ac_link\"") >&5
6624   (eval $ac_link) 2>&5
6625   ac_status=$?
6626   echo "$as_me:6626: \$? = $ac_status" >&5
6627   (exit $ac_status); } &&
6628          { ac_try='test -s conftest$ac_exeext'
6629   { (eval echo "$as_me:6629: \"$ac_try\"") >&5
6630   (eval $ac_try) 2>&5
6631   ac_status=$?
6632   echo "$as_me:6632: \$? = $ac_status" >&5
6633   (exit $ac_status); }; }; then
6634   ac_cv_lib_dl_dlsym=yes
6635 else
6636   echo "$as_me: failed program was:" >&5
6637 cat conftest.$ac_ext >&5
6638 ac_cv_lib_dl_dlsym=no
6639 fi
6640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6641 LIBS=$ac_check_lib_save_LIBS
6642 fi
6643 echo "$as_me:6643: result: $ac_cv_lib_dl_dlsym" >&5
6644 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
6645 if test $ac_cv_lib_dl_dlsym = yes; then
6646
6647         cf_have_dlsym=yes
6648         cf_have_libdl=yes
6649 fi
6650
6651 fi
6652
6653 if test "$cf_have_dlsym" = yes ; then
6654         test "$cf_have_libdl" = yes && {
6655 cf_add_libs="-ldl"
6656 # Filter out duplicates - this happens with badly-designed ".pc" files...
6657 for cf_add_1lib in $LIBS
6658 do
6659         for cf_add_2lib in $cf_add_libs
6660         do
6661                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6662                 then
6663                         cf_add_1lib=
6664                         break
6665                 fi
6666         done
6667         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6668 done
6669 LIBS="$cf_add_libs"
6670  }
6671
6672         echo "$as_me:6672: checking whether able to link to dl*() functions" >&5
6673 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
6674         cat >conftest.$ac_ext <<_ACEOF
6675 #line 6675 "configure"
6676 #include "confdefs.h"
6677 #include <dlfcn.h>
6678 int
6679 main (void)
6680 {
6681
6682                 void *obj;
6683                 if ((obj = dlopen("filename", 0)) != 0) {
6684                         if (dlsym(obj, "symbolname") == 0) {
6685                         dlclose(obj);
6686                         }
6687                 }
6688   ;
6689   return 0;
6690 }
6691 _ACEOF
6692 rm -f conftest.$ac_objext conftest$ac_exeext
6693 if { (eval echo "$as_me:6693: \"$ac_link\"") >&5
6694   (eval $ac_link) 2>&5
6695   ac_status=$?
6696   echo "$as_me:6696: \$? = $ac_status" >&5
6697   (exit $ac_status); } &&
6698          { ac_try='test -s conftest$ac_exeext'
6699   { (eval echo "$as_me:6699: \"$ac_try\"") >&5
6700   (eval $ac_try) 2>&5
6701   ac_status=$?
6702   echo "$as_me:6702: \$? = $ac_status" >&5
6703   (exit $ac_status); }; }; then
6704
6705 cat >>confdefs.h <<\EOF
6706 #define HAVE_LIBDL 1
6707 EOF
6708
6709 else
6710   echo "$as_me: failed program was:" >&5
6711 cat conftest.$ac_ext >&5
6712
6713                 { { echo "$as_me:6713: error: Cannot link test program for libdl" >&5
6714 echo "$as_me: error: Cannot link test program for libdl" >&2;}
6715    { (exit 1); exit 1; }; }
6716 fi
6717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6718         echo "$as_me:6718: result: ok" >&5
6719 echo "${ECHO_T}ok" >&6
6720 else
6721         { { echo "$as_me:6721: error: Cannot find dlsym function" >&5
6722 echo "$as_me: error: Cannot find dlsym function" >&2;}
6723    { (exit 1); exit 1; }; }
6724 fi
6725
6726                 if test "x$with_gpm" != xyes ; then
6727                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
6728
6729 echo "${as_me:-configure}:6729: testing assuming soname for gpm is $with_gpm ..." 1>&5
6730
6731                         cf_cv_gpm_soname="$with_gpm"
6732                 else
6733
6734 echo "$as_me:6734: checking for soname of gpm library" >&5
6735 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
6736 if test "${cf_cv_gpm_soname+set}" = set; then
6737   echo $ECHO_N "(cached) $ECHO_C" >&6
6738 else
6739
6740 cf_cv_gpm_soname=unknown
6741 if test "$cross_compiling" != yes ; then
6742 cat >conftest.$ac_ext <<CF_EOF
6743 #include <gpm.h>
6744 int main(void)
6745 {
6746 if (Gpm_Open(0,0)) Gpm_Close();
6747         ${cf_cv_main_return:-return}(0);
6748 }
6749 CF_EOF
6750 cf_save_LIBS="$LIBS"
6751
6752 cf_add_libs="-lgpm"
6753 # Filter out duplicates - this happens with badly-designed ".pc" files...
6754 for cf_add_1lib in $LIBS
6755 do
6756         for cf_add_2lib in $cf_add_libs
6757         do
6758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6759                 then
6760                         cf_add_1lib=
6761                         break
6762                 fi
6763         done
6764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6765 done
6766 LIBS="$cf_add_libs"
6767
6768         if { (eval echo "$as_me:6768: \"$ac_compile\"") >&5
6769   (eval $ac_compile) 2>&5
6770   ac_status=$?
6771   echo "$as_me:6771: \$? = $ac_status" >&5
6772   (exit $ac_status); } ; then
6773                 if { (eval echo "$as_me:6773: \"$ac_link\"") >&5
6774   (eval $ac_link) 2>&5
6775   ac_status=$?
6776   echo "$as_me:6776: \$? = $ac_status" >&5
6777   (exit $ac_status); } ; then
6778                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
6779                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
6780                 fi
6781         fi
6782 rm -rf conftest*
6783 LIBS="$cf_save_LIBS"
6784 fi
6785
6786 fi
6787 echo "$as_me:6787: result: $cf_cv_gpm_soname" >&5
6788 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
6789
6790                 fi
6791                 test "$cf_cv_gpm_soname" != "unknown" &&
6792 cat >>confdefs.h <<EOF
6793 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
6794 EOF
6795
6796                 SHLIB_LIST="-ldl $SHLIB_LIST"
6797
6798 cf_add_libs="-ldl"
6799 # Filter out duplicates - this happens with badly-designed ".pc" files...
6800 for cf_add_1lib in $PRIVATE_LIBS
6801 do
6802         for cf_add_2lib in $cf_add_libs
6803         do
6804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6805                 then
6806                         cf_add_1lib=
6807                         break
6808                 fi
6809         done
6810         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6811 done
6812 PRIVATE_LIBS="$cf_add_libs"
6813
6814         else
6815                 SHLIB_LIST="-lgpm $SHLIB_LIST"
6816
6817 cf_add_libs="-lgpm"
6818 # Filter out duplicates - this happens with badly-designed ".pc" files...
6819 for cf_add_1lib in $TEST_LIBS
6820 do
6821         for cf_add_2lib in $cf_add_libs
6822         do
6823                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6824                 then
6825                         cf_add_1lib=
6826                         break
6827                 fi
6828         done
6829         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6830 done
6831 TEST_LIBS="$cf_add_libs"
6832
6833 cf_add_libs="-lgpm"
6834 # Filter out duplicates - this happens with badly-designed ".pc" files...
6835 for cf_add_1lib in $PRIVATE_LIBS
6836 do
6837         for cf_add_2lib in $cf_add_libs
6838         do
6839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
6840                 then
6841                         cf_add_1lib=
6842                         break
6843                 fi
6844         done
6845         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6846 done
6847 PRIVATE_LIBS="$cf_add_libs"
6848
6849         fi
6850
6851 cat >>confdefs.h <<\EOF
6852 #define HAVE_LIBGPM 1
6853 EOF
6854
6855 echo "$as_me:6855: checking for Gpm_Wgetch in -lgpm" >&5
6856 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
6857 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
6858   echo $ECHO_N "(cached) $ECHO_C" >&6
6859 else
6860   ac_check_lib_save_LIBS=$LIBS
6861 LIBS="-lgpm  $LIBS"
6862 cat >conftest.$ac_ext <<_ACEOF
6863 #line 6863 "configure"
6864 #include "confdefs.h"
6865
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char Gpm_Wgetch ();
6873 int
6874 main (void)
6875 {
6876 Gpm_Wgetch ();
6877   ;
6878   return 0;
6879 }
6880 _ACEOF
6881 rm -f conftest.$ac_objext conftest$ac_exeext
6882 if { (eval echo "$as_me:6882: \"$ac_link\"") >&5
6883   (eval $ac_link) 2>&5
6884   ac_status=$?
6885   echo "$as_me:6885: \$? = $ac_status" >&5
6886   (exit $ac_status); } &&
6887          { ac_try='test -s conftest$ac_exeext'
6888   { (eval echo "$as_me:6888: \"$ac_try\"") >&5
6889   (eval $ac_try) 2>&5
6890   ac_status=$?
6891   echo "$as_me:6891: \$? = $ac_status" >&5
6892   (exit $ac_status); }; }; then
6893   ac_cv_lib_gpm_Gpm_Wgetch=yes
6894 else
6895   echo "$as_me: failed program was:" >&5
6896 cat conftest.$ac_ext >&5
6897 ac_cv_lib_gpm_Gpm_Wgetch=no
6898 fi
6899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6900 LIBS=$ac_check_lib_save_LIBS
6901 fi
6902 echo "$as_me:6902: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
6903 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
6904 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
6905
6906 echo "$as_me:6906: checking if GPM is weakly bound to curses library" >&5
6907 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
6908 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
6909   echo $ECHO_N "(cached) $ECHO_C" >&6
6910 else
6911
6912 cf_cv_check_gpm_wgetch=unknown
6913 if test "$cross_compiling" != yes ; then
6914
6915 cat >conftest.$ac_ext <<CF_EOF
6916 #include <gpm.h>
6917 int main(void)
6918 {
6919         Gpm_Wgetch();
6920         ${cf_cv_main_return:-return}(0);
6921 }
6922 CF_EOF
6923
6924         cf_save_LIBS="$LIBS"
6925         # This only works if we can look at the symbol table.  If a shared
6926         # library is stripped for install, we cannot use that.  So we're forced
6927         # to rely on the static library, noting that some packagers may not
6928         # include it.
6929         LIBS="-static -lgpm -dynamic $LIBS"
6930         if { (eval echo "$as_me:6930: \"$ac_compile\"") >&5
6931   (eval $ac_compile) 2>&5
6932   ac_status=$?
6933   echo "$as_me:6933: \$? = $ac_status" >&5
6934   (exit $ac_status); } ; then
6935                 if { (eval echo "$as_me:6935: \"$ac_link\"") >&5
6936   (eval $ac_link) 2>&5
6937   ac_status=$?
6938   echo "$as_me:6938: \$? = $ac_status" >&5
6939   (exit $ac_status); } ; then
6940                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
6941                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
6942                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
6943                 fi
6944         fi
6945         rm -rf conftest*
6946         LIBS="$cf_save_LIBS"
6947 fi
6948
6949 fi
6950 echo "$as_me:6950: result: $cf_cv_check_gpm_wgetch" >&5
6951 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
6952
6953 if test "$cf_cv_check_gpm_wgetch" != yes ; then
6954         { echo "$as_me:6954: WARNING: GPM library is already linked with curses - read the FAQ" >&5
6955 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
6956 fi
6957
6958 fi
6959
6960 fi
6961
6962 echo "$as_me:6962: checking if you want to use PCRE2 for regular-expressions" >&5
6963 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
6964
6965 # Check whether --with-pcre2 or --without-pcre2 was given.
6966 if test "${with_pcre2+set}" = set; then
6967   withval="$with_pcre2"
6968
6969 fi;
6970 test -z "$with_pcre2" && with_pcre2=no
6971 echo "$as_me:6971: result: $with_pcre2" >&5
6972 echo "${ECHO_T}$with_pcre2" >&6
6973
6974 if test "x$with_pcre2" != xno ; then
6975
6976 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
6977         test -n "$verbose" && echo "    found package libpcre2" 1>&6
6978
6979 echo "${as_me:-configure}:6979: testing found package libpcre2 ..." 1>&5
6980
6981         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
6982         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
6983         test -n "$verbose" && echo "    package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
6984
6985 echo "${as_me:-configure}:6985: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
6986
6987         test -n "$verbose" && echo "    package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
6988
6989 echo "${as_me:-configure}:6989: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
6990
6991 cf_fix_cppflags=no
6992 cf_new_cflags=
6993 cf_new_cppflags=
6994 cf_new_extra_cppflags=
6995
6996 for cf_add_cflags in $cf_pkgconfig_incs
6997 do
6998 case $cf_fix_cppflags in
6999 (no)
7000         case $cf_add_cflags in
7001         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7002                 case $cf_add_cflags in
7003                 (-D*)
7004                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7005
7006                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7007                                 && test -z "${cf_tst_cflags}" \
7008                                 && cf_fix_cppflags=yes
7009
7010                         if test $cf_fix_cppflags = yes ; then
7011
7012         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7013         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7014
7015                                 continue
7016                         elif test "${cf_tst_cflags}" = "\"'" ; then
7017
7018         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7019         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7020
7021                                 continue
7022                         fi
7023                         ;;
7024                 esac
7025                 case "$CPPFLAGS" in
7026                 (*$cf_add_cflags)
7027                         ;;
7028                 (*)
7029                         case $cf_add_cflags in
7030                         (-D*)
7031                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7032
7033 CPPFLAGS=`echo "$CPPFLAGS" | \
7034         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7035                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7036
7037                                 ;;
7038                         esac
7039
7040         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7041         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7042
7043                         ;;
7044                 esac
7045                 ;;
7046         (*)
7047
7048         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7049         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7050
7051                 ;;
7052         esac
7053         ;;
7054 (yes)
7055
7056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7058
7059         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7060
7061         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7062                 && test -z "${cf_tst_cflags}" \
7063                 && cf_fix_cppflags=no
7064         ;;
7065 esac
7066 done
7067
7068 if test -n "$cf_new_cflags" ; then
7069
7070         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7071         CFLAGS="${CFLAGS}$cf_new_cflags"
7072
7073 fi
7074
7075 if test -n "$cf_new_cppflags" ; then
7076
7077         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7078         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7079
7080 fi
7081
7082 if test -n "$cf_new_extra_cppflags" ; then
7083
7084         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7085         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7086
7087 fi
7088
7089 cf_add_libs="$cf_pkgconfig_libs"
7090 # Filter out duplicates - this happens with badly-designed ".pc" files...
7091 for cf_add_1lib in $LIBS
7092 do
7093         for cf_add_2lib in $cf_add_libs
7094         do
7095                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7096                 then
7097                         cf_add_1lib=
7098                         break
7099                 fi
7100         done
7101         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7102 done
7103 LIBS="$cf_add_libs"
7104
7105         :
7106 else
7107         cf_pkgconfig_incs=
7108         cf_pkgconfig_libs=
7109
7110 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
7111         test -n "$verbose" && echo "    found package libpcre" 1>&6
7112
7113 echo "${as_me:-configure}:7113: testing found package libpcre ..." 1>&5
7114
7115         cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
7116         cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
7117         test -n "$verbose" && echo "    package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
7118
7119 echo "${as_me:-configure}:7119: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7120
7121         test -n "$verbose" && echo "    package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
7122
7123 echo "${as_me:-configure}:7123: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
7124
7125 cf_fix_cppflags=no
7126 cf_new_cflags=
7127 cf_new_cppflags=
7128 cf_new_extra_cppflags=
7129
7130 for cf_add_cflags in $cf_pkgconfig_incs
7131 do
7132 case $cf_fix_cppflags in
7133 (no)
7134         case $cf_add_cflags in
7135         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7136                 case $cf_add_cflags in
7137                 (-D*)
7138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7139
7140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7141                                 && test -z "${cf_tst_cflags}" \
7142                                 && cf_fix_cppflags=yes
7143
7144                         if test $cf_fix_cppflags = yes ; then
7145
7146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7148
7149                                 continue
7150                         elif test "${cf_tst_cflags}" = "\"'" ; then
7151
7152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7154
7155                                 continue
7156                         fi
7157                         ;;
7158                 esac
7159                 case "$CPPFLAGS" in
7160                 (*$cf_add_cflags)
7161                         ;;
7162                 (*)
7163                         case $cf_add_cflags in
7164                         (-D*)
7165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7166
7167 CPPFLAGS=`echo "$CPPFLAGS" | \
7168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7170
7171                                 ;;
7172                         esac
7173
7174         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7175         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7176
7177                         ;;
7178                 esac
7179                 ;;
7180         (*)
7181
7182         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7183         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7184
7185                 ;;
7186         esac
7187         ;;
7188 (yes)
7189
7190         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7191         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7192
7193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7194
7195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7196                 && test -z "${cf_tst_cflags}" \
7197                 && cf_fix_cppflags=no
7198         ;;
7199 esac
7200 done
7201
7202 if test -n "$cf_new_cflags" ; then
7203
7204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7205         CFLAGS="${CFLAGS}$cf_new_cflags"
7206
7207 fi
7208
7209 if test -n "$cf_new_cppflags" ; then
7210
7211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7212         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7213
7214 fi
7215
7216 if test -n "$cf_new_extra_cppflags" ; then
7217
7218         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7219         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7220
7221 fi
7222
7223 cf_add_libs="$cf_pkgconfig_libs"
7224 # Filter out duplicates - this happens with badly-designed ".pc" files...
7225 for cf_add_1lib in $LIBS
7226 do
7227         for cf_add_2lib in $cf_add_libs
7228         do
7229                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7230                 then
7231                         cf_add_1lib=
7232                         break
7233                 fi
7234         done
7235         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7236 done
7237 LIBS="$cf_add_libs"
7238
7239         :
7240 else
7241         cf_pkgconfig_incs=
7242         cf_pkgconfig_libs=
7243
7244                         { { echo "$as_me:7244: error: Cannot find PCRE2 library" >&5
7245 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7246    { (exit 1); exit 1; }; }
7247 fi
7248
7249 fi
7250
7251 cat >>confdefs.h <<\EOF
7252 #define HAVE_LIB_PCRE2 1
7253 EOF
7254
7255         # if pkgconfig gave no results, look for the libraries directly
7256         case $LIBS in
7257         (*pcre2-posix*|*pcreposix*)
7258                 ;;
7259         (*)
7260                 echo "$as_me:7260: checking for regcomp in -lpcre2-posix" >&5
7261 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7262 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7263   echo $ECHO_N "(cached) $ECHO_C" >&6
7264 else
7265   ac_check_lib_save_LIBS=$LIBS
7266 LIBS="-lpcre2-posix  $LIBS"
7267 cat >conftest.$ac_ext <<_ACEOF
7268 #line 7268 "configure"
7269 #include "confdefs.h"
7270
7271 /* Override any gcc2 internal prototype to avoid an error.  */
7272 #ifdef __cplusplus
7273 extern "C"
7274 #endif
7275 /* We use char because int might match the return type of a gcc2
7276    builtin and then its argument prototype would still apply.  */
7277 char regcomp ();
7278 int
7279 main (void)
7280 {
7281 regcomp ();
7282   ;
7283   return 0;
7284 }
7285 _ACEOF
7286 rm -f conftest.$ac_objext conftest$ac_exeext
7287 if { (eval echo "$as_me:7287: \"$ac_link\"") >&5
7288   (eval $ac_link) 2>&5
7289   ac_status=$?
7290   echo "$as_me:7290: \$? = $ac_status" >&5
7291   (exit $ac_status); } &&
7292          { ac_try='test -s conftest$ac_exeext'
7293   { (eval echo "$as_me:7293: \"$ac_try\"") >&5
7294   (eval $ac_try) 2>&5
7295   ac_status=$?
7296   echo "$as_me:7296: \$? = $ac_status" >&5
7297   (exit $ac_status); }; }; then
7298   ac_cv_lib_pcre2_posix_regcomp=yes
7299 else
7300   echo "$as_me: failed program was:" >&5
7301 cat conftest.$ac_ext >&5
7302 ac_cv_lib_pcre2_posix_regcomp=no
7303 fi
7304 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7305 LIBS=$ac_check_lib_save_LIBS
7306 fi
7307 echo "$as_me:7307: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7308 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7309 if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
7310
7311 cf_add_libs="-lpcre2-posix"
7312 # Filter out duplicates - this happens with badly-designed ".pc" files...
7313 for cf_add_1lib in $LIBS
7314 do
7315         for cf_add_2lib in $cf_add_libs
7316         do
7317                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7318                 then
7319                         cf_add_1lib=
7320                         break
7321                 fi
7322         done
7323         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7324 done
7325 LIBS="$cf_add_libs"
7326
7327 else
7328   echo "$as_me:7328: checking for regcomp in -lpcreposix" >&5
7329 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7330 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7331   echo $ECHO_N "(cached) $ECHO_C" >&6
7332 else
7333   ac_check_lib_save_LIBS=$LIBS
7334 LIBS="-lpcreposix  $LIBS"
7335 cat >conftest.$ac_ext <<_ACEOF
7336 #line 7336 "configure"
7337 #include "confdefs.h"
7338
7339 /* Override any gcc2 internal prototype to avoid an error.  */
7340 #ifdef __cplusplus
7341 extern "C"
7342 #endif
7343 /* We use char because int might match the return type of a gcc2
7344    builtin and then its argument prototype would still apply.  */
7345 char regcomp ();
7346 int
7347 main (void)
7348 {
7349 regcomp ();
7350   ;
7351   return 0;
7352 }
7353 _ACEOF
7354 rm -f conftest.$ac_objext conftest$ac_exeext
7355 if { (eval echo "$as_me:7355: \"$ac_link\"") >&5
7356   (eval $ac_link) 2>&5
7357   ac_status=$?
7358   echo "$as_me:7358: \$? = $ac_status" >&5
7359   (exit $ac_status); } &&
7360          { ac_try='test -s conftest$ac_exeext'
7361   { (eval echo "$as_me:7361: \"$ac_try\"") >&5
7362   (eval $ac_try) 2>&5
7363   ac_status=$?
7364   echo "$as_me:7364: \$? = $ac_status" >&5
7365   (exit $ac_status); }; }; then
7366   ac_cv_lib_pcreposix_regcomp=yes
7367 else
7368   echo "$as_me: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 ac_cv_lib_pcreposix_regcomp=no
7371 fi
7372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7373 LIBS=$ac_check_lib_save_LIBS
7374 fi
7375 echo "$as_me:7375: result: $ac_cv_lib_pcreposix_regcomp" >&5
7376 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7377 if test $ac_cv_lib_pcreposix_regcomp = yes; then
7378
7379 cf_add_libs="-lpcreposix"
7380 # Filter out duplicates - this happens with badly-designed ".pc" files...
7381 for cf_add_1lib in $LIBS
7382 do
7383         for cf_add_2lib in $cf_add_libs
7384         do
7385                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
7386                 then
7387                         cf_add_1lib=
7388                         break
7389                 fi
7390         done
7391         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7392 done
7393 LIBS="$cf_add_libs"
7394
7395 else
7396   { { echo "$as_me:7396: error: Cannot find PCRE2 POSIX library" >&5
7397 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7398    { (exit 1); exit 1; }; }
7399 fi
7400
7401 fi
7402
7403                 ;;
7404         esac
7405
7406         # either way, check for the library header files
7407
7408 for ac_header in pcre2-posix.h pcreposix.h
7409 do
7410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7411 echo "$as_me:7411: checking for $ac_header" >&5
7412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7414   echo $ECHO_N "(cached) $ECHO_C" >&6
7415 else
7416   cat >conftest.$ac_ext <<_ACEOF
7417 #line 7417 "configure"
7418 #include "confdefs.h"
7419 #include <$ac_header>
7420 _ACEOF
7421 if { (eval echo "$as_me:7421: \"$ac_cpp conftest.$ac_ext\"") >&5
7422   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7423   ac_status=$?
7424   egrep -v '^ *\+' conftest.er1 >conftest.err
7425   rm -f conftest.er1
7426   cat conftest.err >&5
7427   echo "$as_me:7427: \$? = $ac_status" >&5
7428   (exit $ac_status); } >/dev/null; then
7429   if test -s conftest.err; then
7430     ac_cpp_err=$ac_c_preproc_warn_flag
7431   else
7432     ac_cpp_err=
7433   fi
7434 else
7435   ac_cpp_err=yes
7436 fi
7437 if test -z "$ac_cpp_err"; then
7438   eval "$as_ac_Header=yes"
7439 else
7440   echo "$as_me: failed program was:" >&5
7441   cat conftest.$ac_ext >&5
7442   eval "$as_ac_Header=no"
7443 fi
7444 rm -f conftest.err conftest.$ac_ext
7445 fi
7446 echo "$as_me:7446: result: `eval echo '${'$as_ac_Header'}'`" >&5
7447 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7448 if test `eval echo '${'$as_ac_Header'}'` = yes; then
7449   cat >>confdefs.h <<EOF
7450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7451 EOF
7452
7453 fi
7454 done
7455
7456 fi
7457
7458 # not everyone has "test -c"
7459 if test -c /dev/sysmouse 2>/dev/null ; then
7460 echo "$as_me:7460: checking if you want to use sysmouse" >&5
7461 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7462
7463 # Check whether --with-sysmouse or --without-sysmouse was given.
7464 if test "${with_sysmouse+set}" = set; then
7465   withval="$with_sysmouse"
7466   cf_with_sysmouse=$withval
7467 else
7468   cf_with_sysmouse=maybe
7469 fi;
7470         if test "$cf_with_sysmouse" != no ; then
7471         cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474
7475 #include <osreldate.h>
7476 #if (__FreeBSD_version >= 400017)
7477 #include <sys/consio.h>
7478 #include <sys/fbio.h>
7479 #else
7480 #include <machine/console.h>
7481 #endif
7482
7483 int
7484 main (void)
7485 {
7486
7487         struct mouse_info the_mouse;
7488         ioctl(0, CONS_MOUSECTL, &the_mouse);
7489
7490   ;
7491   return 0;
7492 }
7493 _ACEOF
7494 rm -f conftest.$ac_objext
7495 if { (eval echo "$as_me:7495: \"$ac_compile\"") >&5
7496   (eval $ac_compile) 2>&5
7497   ac_status=$?
7498   echo "$as_me:7498: \$? = $ac_status" >&5
7499   (exit $ac_status); } &&
7500          { ac_try='test -s conftest.$ac_objext'
7501   { (eval echo "$as_me:7501: \"$ac_try\"") >&5
7502   (eval $ac_try) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); }; }; then
7506   cf_with_sysmouse=yes
7507 else
7508   echo "$as_me: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7510 cf_with_sysmouse=no
7511 fi
7512 rm -f conftest.$ac_objext conftest.$ac_ext
7513         fi
7514 echo "$as_me:7514: result: $cf_with_sysmouse" >&5
7515 echo "${ECHO_T}$cf_with_sysmouse" >&6
7516 test "$cf_with_sysmouse" = yes &&
7517 cat >>confdefs.h <<\EOF
7518 #define USE_SYSMOUSE 1
7519 EOF
7520
7521 fi
7522
7523 # pretend that ncurses==ncursesw==ncursest
7524 echo "$as_me:7524: checking if you want to disable library suffixes" >&5
7525 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
7526
7527 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
7528 if test "${enable_lib_suffixes+set}" = set; then
7529   enableval="$enable_lib_suffixes"
7530   test "$enableval" != no && enableval=yes
7531         if test "$enableval" != "yes" ; then
7532     disable_lib_suffixes=yes
7533         else
7534                 disable_lib_suffixes=no
7535         fi
7536 else
7537   enableval=yes
7538         disable_lib_suffixes=no
7539
7540 fi;
7541 echo "$as_me:7541: result: $disable_lib_suffixes" >&5
7542 echo "${ECHO_T}$disable_lib_suffixes" >&6
7543
7544 ### If we're building with rpath, try to link non-standard libs that way too.
7545 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
7546
7547 echo "$as_me:7547: checking if rpath-hack should be disabled" >&5
7548 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
7549
7550 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
7551 if test "${enable_rpath_hack+set}" = set; then
7552   enableval="$enable_rpath_hack"
7553   test "$enableval" != no && enableval=yes
7554         if test "$enableval" != "yes" ; then
7555     cf_disable_rpath_hack=yes
7556         else
7557                 cf_disable_rpath_hack=no
7558         fi
7559 else
7560   enableval=yes
7561         cf_disable_rpath_hack=no
7562
7563 fi;
7564 echo "$as_me:7564: result: $cf_disable_rpath_hack" >&5
7565 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
7566 if test "$cf_disable_rpath_hack" = no ; then
7567
7568 echo "$as_me:7568: checking for updated LDFLAGS" >&5
7569 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
7570 if test -n "$LD_RPATH_OPT" ; then
7571         echo "$as_me:7571: result: maybe" >&5
7572 echo "${ECHO_T}maybe" >&6
7573
7574         for ac_prog in ldd
7575 do
7576   # Extract the first word of "$ac_prog", so it can be a program name with args.
7577 set dummy $ac_prog; ac_word=$2
7578 echo "$as_me:7578: checking for $ac_word" >&5
7579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7580 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
7581   echo $ECHO_N "(cached) $ECHO_C" >&6
7582 else
7583   if test -n "$cf_ldd_prog"; then
7584   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
7585 else
7586   ac_save_IFS=$IFS; IFS=$ac_path_separator
7587 ac_dummy="$PATH"
7588 for ac_dir in $ac_dummy; do
7589   IFS=$ac_save_IFS
7590   test -z "$ac_dir" && ac_dir=.
7591   $as_executable_p "$ac_dir/$ac_word" || continue
7592 ac_cv_prog_cf_ldd_prog="$ac_prog"
7593 echo "$as_me:7593: found $ac_dir/$ac_word" >&5
7594 break
7595 done
7596
7597 fi
7598 fi
7599 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
7600 if test -n "$cf_ldd_prog"; then
7601   echo "$as_me:7601: result: $cf_ldd_prog" >&5
7602 echo "${ECHO_T}$cf_ldd_prog" >&6
7603 else
7604   echo "$as_me:7604: result: no" >&5
7605 echo "${ECHO_T}no" >&6
7606 fi
7607
7608   test -n "$cf_ldd_prog" && break
7609 done
7610 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
7611
7612         cf_rpath_list="/usr/lib /lib"
7613         if test "$cf_ldd_prog" != no
7614         then
7615                 cf_rpath_oops=
7616
7617 cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620 #include <stdio.h>
7621 int
7622 main (void)
7623 {
7624 printf("Hello");
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 rm -f conftest.$ac_objext conftest$ac_exeext
7630 if { (eval echo "$as_me:7630: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); } &&
7635          { ac_try='test -s conftest$ac_exeext'
7636   { (eval echo "$as_me:7636: \"$ac_try\"") >&5
7637   (eval $ac_try) 2>&5
7638   ac_status=$?
7639   echo "$as_me:7639: \$? = $ac_status" >&5
7640   (exit $ac_status); }; }; then
7641   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
7642                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
7643 else
7644   echo "$as_me: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646 fi
7647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7648
7649                 # If we passed the link-test, but get a "not found" on a given library,
7650                 # this could be due to inept reconfiguration of gcc to make it only
7651                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
7652                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
7653                 # /usr/local libraries.
7654                 if test -n "$cf_rpath_oops"
7655                 then
7656                         for cf_rpath_src in $cf_rpath_oops
7657                         do
7658                                 for cf_rpath_dir in \
7659                                         /usr/local \
7660                                         /usr/pkg \
7661                                         /opt/sfw
7662                                 do
7663                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
7664                                         then
7665                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
7666
7667 echo "${as_me:-configure}:7667: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
7668
7669                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
7670                                                 break
7671                                         fi
7672                                 done
7673                         done
7674                 fi
7675         fi
7676
7677         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7678
7679 echo "${as_me:-configure}:7679: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7680
7681 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
7682
7683 echo "${as_me:-configure}:7683: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
7684
7685 cf_rpath_dst=
7686 for cf_rpath_src in $LDFLAGS
7687 do
7688         case $cf_rpath_src in
7689         (-L*)
7690
7691                 # check if this refers to a directory which we will ignore
7692                 cf_rpath_skip=no
7693                 if test -n "$cf_rpath_list"
7694                 then
7695                         for cf_rpath_item in $cf_rpath_list
7696                         do
7697                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7698                                 then
7699                                         cf_rpath_skip=yes
7700                                         break
7701                                 fi
7702                         done
7703                 fi
7704
7705                 if test "$cf_rpath_skip" = no
7706                 then
7707                         # transform the option
7708                         if test "$LD_RPATH_OPT" = "-R " ; then
7709                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7710                         else
7711                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7712                         fi
7713
7714                         # if we have not already added this, add it now
7715                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7716                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7717                         then
7718                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7719
7720 echo "${as_me:-configure}:7720: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7721
7722                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7723                         fi
7724                 fi
7725                 ;;
7726         esac
7727         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7728 done
7729 LDFLAGS=$cf_rpath_dst
7730
7731 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
7732
7733 echo "${as_me:-configure}:7733: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
7734
7735 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
7736
7737 echo "${as_me:-configure}:7737: testing ...checking LIBS $LIBS ..." 1>&5
7738
7739 cf_rpath_dst=
7740 for cf_rpath_src in $LIBS
7741 do
7742         case $cf_rpath_src in
7743         (-L*)
7744
7745                 # check if this refers to a directory which we will ignore
7746                 cf_rpath_skip=no
7747                 if test -n "$cf_rpath_list"
7748                 then
7749                         for cf_rpath_item in $cf_rpath_list
7750                         do
7751                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
7752                                 then
7753                                         cf_rpath_skip=yes
7754                                         break
7755                                 fi
7756                         done
7757                 fi
7758
7759                 if test "$cf_rpath_skip" = no
7760                 then
7761                         # transform the option
7762                         if test "$LD_RPATH_OPT" = "-R " ; then
7763                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
7764                         else
7765                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
7766                         fi
7767
7768                         # if we have not already added this, add it now
7769                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
7770                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
7771                         then
7772                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
7773
7774 echo "${as_me:-configure}:7774: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
7775
7776                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
7777                         fi
7778                 fi
7779                 ;;
7780         esac
7781         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
7782 done
7783 LIBS=$cf_rpath_dst
7784
7785 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
7786
7787 echo "${as_me:-configure}:7787: testing ...checked LIBS $LIBS ..." 1>&5
7788
7789         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
7790
7791 echo "${as_me:-configure}:7791: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
7792
7793 else
7794         echo "$as_me:7794: result: no" >&5
7795 echo "${ECHO_T}no" >&6
7796 fi
7797
7798 fi
7799
7800 fi
7801
7802 ###############################################################################
7803
7804 ###     use option --with-extra-suffix to append suffix to headers and libraries
7805 echo "$as_me:7805: checking if you wish to append extra suffix to header/library paths" >&5
7806 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
7807 EXTRA_SUFFIX=
7808
7809 # Check whether --with-extra-suffix or --without-extra-suffix was given.
7810 if test "${with_extra_suffix+set}" = set; then
7811   withval="$with_extra_suffix"
7812   case x$withval in
7813         (no)
7814                 ;;
7815         (xyes|x)
7816                 EXTRA_SUFFIX=$cf_cv_abi_version
7817                 ;;
7818         (*)
7819                 EXTRA_SUFFIX=$withval
7820                 ;;
7821         esac
7822
7823 fi;
7824 echo "$as_me:7824: result: $EXTRA_SUFFIX" >&5
7825 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
7826
7827 ###     use option --disable-overwrite to leave out the link to -lcurses
7828 echo "$as_me:7828: checking if you wish to install ncurses overwriting curses" >&5
7829 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
7830
7831 # Check whether --enable-overwrite or --disable-overwrite was given.
7832 if test "${enable_overwrite+set}" = set; then
7833   enableval="$enable_overwrite"
7834   with_overwrite=$enableval
7835 else
7836   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
7837 fi;
7838 echo "$as_me:7838: result: $with_overwrite" >&5
7839 echo "${ECHO_T}$with_overwrite" >&6
7840
7841 echo "$as_me:7841: checking if external terminfo-database is used" >&5
7842 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
7843
7844 # Check whether --enable-database or --disable-database was given.
7845 if test "${enable_database+set}" = set; then
7846   enableval="$enable_database"
7847   use_database=$enableval
7848 else
7849   use_database=yes
7850 fi;
7851 echo "$as_me:7851: result: $use_database" >&5
7852 echo "${ECHO_T}$use_database" >&6
7853
7854 case $host_os in
7855 (os2*)
7856         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
7857         ;;
7858 (*)
7859         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
7860         ;;
7861 esac
7862
7863 NCURSES_USE_DATABASE=0
7864 if test "$use_database" != no ; then
7865         NCURSES_USE_DATABASE=1
7866
7867         echo "$as_me:7867: checking which terminfo source-file will be installed" >&5
7868 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
7869
7870 # Check whether --with-database or --without-database was given.
7871 if test "${with_database+set}" = set; then
7872   withval="$with_database"
7873   TERMINFO_SRC=$withval
7874 fi;
7875         echo "$as_me:7875: result: $TERMINFO_SRC" >&5
7876 echo "${ECHO_T}$TERMINFO_SRC" >&6
7877
7878         echo "$as_me:7878: checking whether to use hashed database instead of directory/tree" >&5
7879 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
7880
7881 # Check whether --with-hashed-db or --without-hashed-db was given.
7882 if test "${with_hashed_db+set}" = set; then
7883   withval="$with_hashed_db"
7884
7885 else
7886   with_hashed_db=no
7887 fi;
7888         echo "$as_me:7888: result: $with_hashed_db" >&5
7889 echo "${ECHO_T}$with_hashed_db" >&6
7890 else
7891         with_hashed_db=no
7892 fi
7893
7894 echo "$as_me:7894: checking for list of fallback descriptions" >&5
7895 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
7896
7897 # Check whether --with-fallbacks or --without-fallbacks was given.
7898 if test "${with_fallbacks+set}" = set; then
7899   withval="$with_fallbacks"
7900   with_fallback=$withval
7901 else
7902   with_fallback=
7903 fi;
7904 echo "$as_me:7904: result: $with_fallback" >&5
7905 echo "${ECHO_T}$with_fallback" >&6
7906
7907 case ".$with_fallback" in
7908 (.|.no)
7909         FALLBACK_LIST=
7910         ;;
7911 (.yes)
7912         { echo "$as_me:7912: WARNING: expected a list of terminal descriptions" >&5
7913 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
7914         ;;
7915 (*)
7916         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
7917         ;;
7918 esac
7919
7920 USE_FALLBACKS=
7921 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
7922
7923 echo "$as_me:7923: checking if you want modern xterm or antique" >&5
7924 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
7925
7926 # Check whether --with-xterm-new or --without-xterm-new was given.
7927 if test "${with_xterm_new+set}" = set; then
7928   withval="$with_xterm_new"
7929   with_xterm_new=$withval
7930 else
7931   with_xterm_new=yes
7932 fi;
7933 case $with_xterm_new in
7934 (no) with_xterm_new=xterm-old;;
7935 (*)      with_xterm_new=xterm-new;;
7936 esac
7937 echo "$as_me:7937: result: $with_xterm_new" >&5
7938 echo "${ECHO_T}$with_xterm_new" >&6
7939 WHICH_XTERM=$with_xterm_new
7940
7941 echo "$as_me:7941: checking if xterm backspace sends BS or DEL" >&5
7942 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
7943
7944 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
7945 if test "${with_xterm_kbs+set}" = set; then
7946   withval="$with_xterm_kbs"
7947   with_xterm_kbs=$withval
7948 else
7949   with_xterm_kbs=BS
7950 fi;
7951 case x$with_xterm_kbs in
7952 (xyes|xno|xBS|xbs|x8)
7953         with_xterm_kbs=BS
7954         ;;
7955 (xDEL|xdel|x127)
7956         with_xterm_kbs=DEL
7957         ;;
7958 (*)
7959         with_xterm_kbs=$withval
7960         ;;
7961 esac
7962 echo "$as_me:7962: result: $with_xterm_kbs" >&5
7963 echo "${ECHO_T}$with_xterm_kbs" >&6
7964 XTERM_KBS=$with_xterm_kbs
7965
7966 MAKE_TERMINFO=
7967 if test "$use_database" = no ; then
7968         TERMINFO="${datadir}/terminfo"
7969         MAKE_TERMINFO="#"
7970 else
7971
7972 echo "$as_me:7972: checking for list of terminfo directories" >&5
7973 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
7974
7975 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
7976 if test "${with_terminfo_dirs+set}" = set; then
7977   withval="$with_terminfo_dirs"
7978
7979 else
7980   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
7981 fi;
7982 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
7983 cf_dst_path=
7984 for cf_src_path in $withval
7985 do
7986
7987 if test "x$prefix" != xNONE; then
7988         cf_path_syntax="$prefix"
7989 else
7990         cf_path_syntax="$ac_default_prefix"
7991 fi
7992
7993 case ".$cf_src_path" in
7994 (.\$\(*\)*|.\'*\'*)
7995         ;;
7996 (..|./*|.\\*)
7997         ;;
7998 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
7999         ;;
8000 (.\${*prefix}*|.\${*dir}*)
8001         eval cf_src_path="$cf_src_path"
8002         case ".$cf_src_path" in
8003         (.NONE/*)
8004                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8005                 ;;
8006         esac
8007         ;;
8008 (.no|.NONE/*)
8009         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8010         ;;
8011 (*)
8012         { { echo "$as_me:8012: error: expected a pathname, not \"$cf_src_path\"" >&5
8013 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8014    { (exit 1); exit 1; }; }
8015         ;;
8016 esac
8017
8018   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8019   cf_dst_path="${cf_dst_path}${cf_src_path}"
8020 done
8021 IFS="$ac_save_ifs"
8022
8023 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8024 # so we have to check/work around.  We do prefer the result of "eval"...
8025 eval cf_dst_eval="$cf_dst_path"
8026 case "x$cf_dst_eval" in
8027 (xNONE*)
8028         TERMINFO_DIRS=$cf_dst_path
8029         ;;
8030 (*)
8031         TERMINFO_DIRS="$cf_dst_eval"
8032         ;;
8033 esac
8034
8035 echo "$as_me:8035: result: $TERMINFO_DIRS" >&5
8036 echo "${ECHO_T}$TERMINFO_DIRS" >&6
8037 test -n "$TERMINFO_DIRS" &&
8038 cat >>confdefs.h <<EOF
8039 #define TERMINFO_DIRS "$TERMINFO_DIRS"
8040 EOF
8041
8042 case "x$TERMINFO" in
8043 x???:*)
8044         { echo "$as_me:8044: WARNING: ignoring non-directory/file TERMINFO value" >&5
8045 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
8046         unset TERMINFO
8047         ;;
8048 esac
8049
8050 echo "$as_me:8050: checking for default terminfo directory" >&5
8051 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
8052
8053 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
8054 if test "${with_default_terminfo_dir+set}" = set; then
8055   withval="$with_default_terminfo_dir"
8056
8057 else
8058   withval="${TERMINFO:-${datadir}/terminfo}"
8059 fi; if test -n "${datadir}/terminfo" ; then
8060
8061 if test "x$prefix" != xNONE; then
8062         cf_path_syntax="$prefix"
8063 else
8064         cf_path_syntax="$ac_default_prefix"
8065 fi
8066
8067 case ".$withval" in
8068 (.\$\(*\)*|.\'*\'*)
8069         ;;
8070 (..|./*|.\\*)
8071         ;;
8072 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8073         ;;
8074 (.\${*prefix}*|.\${*dir}*)
8075         eval withval="$withval"
8076         case ".$withval" in
8077         (.NONE/*)
8078                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8079                 ;;
8080         esac
8081         ;;
8082 (.no|.NONE/*)
8083         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8084         ;;
8085 (*)
8086         { { echo "$as_me:8086: error: expected a pathname, not \"$withval\"" >&5
8087 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8088    { (exit 1); exit 1; }; }
8089         ;;
8090 esac
8091
8092 fi
8093 eval TERMINFO="$withval"
8094
8095 echo "$as_me:8095: result: $TERMINFO" >&5
8096 echo "${ECHO_T}$TERMINFO" >&6
8097
8098 cat >>confdefs.h <<EOF
8099 #define TERMINFO "$TERMINFO"
8100 EOF
8101
8102 fi
8103
8104 ###     use option --disable-big-core to make tic run on small machines
8105 ###     We need 4Mb, check if we can allocate 50% more than that.
8106 echo "$as_me:8106: checking if big-core option selected" >&5
8107 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
8108
8109 # Check whether --enable-big-core or --disable-big-core was given.
8110 if test "${enable_big_core+set}" = set; then
8111   enableval="$enable_big_core"
8112   with_big_core=$enableval
8113 else
8114   if test "$cross_compiling" = yes; then
8115   with_big_core=no
8116 else
8117   cat >conftest.$ac_ext <<_ACEOF
8118 #line 8118 "configure"
8119 #include "confdefs.h"
8120
8121 #include <stdlib.h>
8122 #include <string.h>
8123 int main() {
8124         unsigned long n = 6000000L;
8125         char *s = malloc(n);
8126         if (s != 0)
8127                 s[0] = s[n-1] = 0;
8128         ${cf_cv_main_return:-return}(s == 0);
8129 }
8130 _ACEOF
8131 rm -f conftest$ac_exeext
8132 if { (eval echo "$as_me:8132: \"$ac_link\"") >&5
8133   (eval $ac_link) 2>&5
8134   ac_status=$?
8135   echo "$as_me:8135: \$? = $ac_status" >&5
8136   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8137   { (eval echo "$as_me:8137: \"$ac_try\"") >&5
8138   (eval $ac_try) 2>&5
8139   ac_status=$?
8140   echo "$as_me:8140: \$? = $ac_status" >&5
8141   (exit $ac_status); }; }; then
8142   with_big_core=yes
8143 else
8144   echo "$as_me: program exited with status $ac_status" >&5
8145 echo "$as_me: failed program was:" >&5
8146 cat conftest.$ac_ext >&5
8147 with_big_core=no
8148 fi
8149 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8150 fi
8151 fi;
8152 echo "$as_me:8152: result: $with_big_core" >&5
8153 echo "${ECHO_T}$with_big_core" >&6
8154 test "x$with_big_core" = "xyes" &&
8155 cat >>confdefs.h <<\EOF
8156 #define HAVE_BIG_CORE 1
8157 EOF
8158
8159 ### ISO C only guarantees 512-char strings, we have tables which load faster
8160 ### when constructed using "big" strings.  More than the C compiler, the awk
8161 ### program is a limit on most vendor UNIX systems.  Check that we can build.
8162 echo "$as_me:8162: checking if big-strings option selected" >&5
8163 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
8164
8165 # Check whether --enable-big-strings or --disable-big-strings was given.
8166 if test "${enable_big_strings+set}" = set; then
8167   enableval="$enable_big_strings"
8168   with_big_strings=$enableval
8169 else
8170
8171         case x$AWK in
8172         (x)
8173                 eval with_big_strings=no
8174                 ;;
8175         (*)
8176                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
8177                         | $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
8178                         eval with_big_strings=yes
8179                 else
8180                         eval with_big_strings=no
8181                 fi
8182                 ;;
8183         esac
8184
8185 fi;
8186 echo "$as_me:8186: result: $with_big_strings" >&5
8187 echo "${ECHO_T}$with_big_strings" >&6
8188
8189 USE_BIG_STRINGS=0
8190 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
8191
8192 ###     use option --enable-termcap to compile in the termcap fallback support
8193 echo "$as_me:8193: checking if you want termcap-fallback support" >&5
8194 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
8195
8196 # Check whether --enable-termcap or --disable-termcap was given.
8197 if test "${enable_termcap+set}" = set; then
8198   enableval="$enable_termcap"
8199   with_termcap=$enableval
8200 else
8201   with_termcap=no
8202 fi;
8203 echo "$as_me:8203: result: $with_termcap" >&5
8204 echo "${ECHO_T}$with_termcap" >&6
8205
8206 NCURSES_USE_TERMCAP=0
8207 if test "x$with_termcap" != "xyes" ; then
8208         if test "$use_database" = no ; then
8209                 if test -z "$with_fallback" ; then
8210                         { { echo "$as_me:8210: error: You have disabled the database w/o specifying fallbacks" >&5
8211 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
8212    { (exit 1); exit 1; }; }
8213                 fi
8214         fi
8215
8216 cat >>confdefs.h <<\EOF
8217 #define PURE_TERMINFO 1
8218 EOF
8219
8220 else
8221
8222         if test "$with_ticlib" != no ; then
8223                 { { echo "$as_me:8223: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
8224 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
8225    { (exit 1); exit 1; }; }
8226         fi
8227
8228         NCURSES_USE_TERMCAP=1
8229         echo "$as_me:8229: checking for list of termcap files" >&5
8230 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
8231
8232 # Check whether --with-termpath or --without-termpath was given.
8233 if test "${with_termpath+set}" = set; then
8234   withval="$with_termpath"
8235
8236 else
8237   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
8238 fi;
8239 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
8240 cf_dst_path=
8241 for cf_src_path in $withval
8242 do
8243
8244 if test "x$prefix" != xNONE; then
8245         cf_path_syntax="$prefix"
8246 else
8247         cf_path_syntax="$ac_default_prefix"
8248 fi
8249
8250 case ".$cf_src_path" in
8251 (.\$\(*\)*|.\'*\'*)
8252         ;;
8253 (..|./*|.\\*)
8254         ;;
8255 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8256         ;;
8257 (.\${*prefix}*|.\${*dir}*)
8258         eval cf_src_path="$cf_src_path"
8259         case ".$cf_src_path" in
8260         (.NONE/*)
8261                 cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8262                 ;;
8263         esac
8264         ;;
8265 (.no|.NONE/*)
8266         cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
8267         ;;
8268 (*)
8269         { { echo "$as_me:8269: error: expected a pathname, not \"$cf_src_path\"" >&5
8270 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
8271    { (exit 1); exit 1; }; }
8272         ;;
8273 esac
8274
8275   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
8276   cf_dst_path="${cf_dst_path}${cf_src_path}"
8277 done
8278 IFS="$ac_save_ifs"
8279
8280 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
8281 # so we have to check/work around.  We do prefer the result of "eval"...
8282 eval cf_dst_eval="$cf_dst_path"
8283 case "x$cf_dst_eval" in
8284 (xNONE*)
8285         TERMPATH=$cf_dst_path
8286         ;;
8287 (*)
8288         TERMPATH="$cf_dst_eval"
8289         ;;
8290 esac
8291
8292         echo "$as_me:8292: result: $TERMPATH" >&5
8293 echo "${ECHO_T}$TERMPATH" >&6
8294         test -n "$TERMPATH" &&
8295 cat >>confdefs.h <<EOF
8296 #define TERMPATH "$TERMPATH"
8297 EOF
8298
8299         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
8300         echo "$as_me:8300: checking if fast termcap-loader is needed" >&5
8301 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
8302
8303 # Check whether --enable-getcap or --disable-getcap was given.
8304 if test "${enable_getcap+set}" = set; then
8305   enableval="$enable_getcap"
8306   with_getcap=$enableval
8307 else
8308   with_getcap=no
8309 fi;
8310         echo "$as_me:8310: result: $with_getcap" >&5
8311 echo "${ECHO_T}$with_getcap" >&6
8312         test "x$with_getcap" = "xyes" &&
8313 cat >>confdefs.h <<\EOF
8314 #define USE_GETCAP 1
8315 EOF
8316
8317         echo "$as_me:8317: checking if translated termcaps will be cached in ~/.terminfo" >&5
8318 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
8319
8320 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
8321 if test "${enable_getcap_cache+set}" = set; then
8322   enableval="$enable_getcap_cache"
8323   with_getcap_cache=$enableval
8324 else
8325   with_getcap_cache=no
8326 fi;
8327         echo "$as_me:8327: result: $with_getcap_cache" >&5
8328 echo "${ECHO_T}$with_getcap_cache" >&6
8329         test "x$with_getcap_cache" = "xyes" &&
8330 cat >>confdefs.h <<\EOF
8331 #define USE_GETCAP_CACHE 1
8332 EOF
8333
8334 fi
8335
8336 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
8337 echo "$as_me:8337: checking if ~/.terminfo is wanted" >&5
8338 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
8339
8340 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
8341 if test "${enable_home_terminfo+set}" = set; then
8342   enableval="$enable_home_terminfo"
8343   with_home_terminfo=$enableval
8344 else
8345   with_home_terminfo=yes
8346 fi;
8347 echo "$as_me:8347: result: $with_home_terminfo" >&5
8348 echo "${ECHO_T}$with_home_terminfo" >&6
8349 test "x$with_home_terminfo" = "xyes" &&
8350 cat >>confdefs.h <<\EOF
8351 #define USE_HOME_TERMINFO 1
8352 EOF
8353
8354 echo "$as_me:8354: checking if you want to use restricted environment when running as root" >&5
8355 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
8356
8357 # Check whether --enable-root-environ or --disable-root-environ was given.
8358 if test "${enable_root_environ+set}" = set; then
8359   enableval="$enable_root_environ"
8360   with_root_environ=$enableval
8361 else
8362   with_root_environ=yes
8363 fi;
8364 echo "$as_me:8364: result: $with_root_environ" >&5
8365 echo "${ECHO_T}$with_root_environ" >&6
8366 test "x$with_root_environ" = xyes &&
8367 cat >>confdefs.h <<\EOF
8368 #define USE_ROOT_ENVIRON 1
8369 EOF
8370
8371 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
8372 ###   to reduce storage requirements for the terminfo database.
8373
8374 for ac_header in \
8375 unistd.h \
8376
8377 do
8378 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8379 echo "$as_me:8379: checking for $ac_header" >&5
8380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8382   echo $ECHO_N "(cached) $ECHO_C" >&6
8383 else
8384   cat >conftest.$ac_ext <<_ACEOF
8385 #line 8385 "configure"
8386 #include "confdefs.h"
8387 #include <$ac_header>
8388 _ACEOF
8389 if { (eval echo "$as_me:8389: \"$ac_cpp conftest.$ac_ext\"") >&5
8390   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8391   ac_status=$?
8392   egrep -v '^ *\+' conftest.er1 >conftest.err
8393   rm -f conftest.er1
8394   cat conftest.err >&5
8395   echo "$as_me:8395: \$? = $ac_status" >&5
8396   (exit $ac_status); } >/dev/null; then
8397   if test -s conftest.err; then
8398     ac_cpp_err=$ac_c_preproc_warn_flag
8399   else
8400     ac_cpp_err=
8401   fi
8402 else
8403   ac_cpp_err=yes
8404 fi
8405 if test -z "$ac_cpp_err"; then
8406   eval "$as_ac_Header=yes"
8407 else
8408   echo "$as_me: failed program was:" >&5
8409   cat conftest.$ac_ext >&5
8410   eval "$as_ac_Header=no"
8411 fi
8412 rm -f conftest.err conftest.$ac_ext
8413 fi
8414 echo "$as_me:8414: result: `eval echo '${'$as_ac_Header'}'`" >&5
8415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8417   cat >>confdefs.h <<EOF
8418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8419 EOF
8420
8421 fi
8422 done
8423
8424 for ac_func in \
8425         remove \
8426         unlink
8427 do
8428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8429 echo "$as_me:8429: checking for $ac_func" >&5
8430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8431 if eval "test \"\${$as_ac_var+set}\" = set"; then
8432   echo $ECHO_N "(cached) $ECHO_C" >&6
8433 else
8434   cat >conftest.$ac_ext <<_ACEOF
8435 #line 8435 "configure"
8436 #include "confdefs.h"
8437 #define $ac_func autoconf_temporary
8438 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8439 #undef $ac_func
8440
8441 #ifdef __cplusplus
8442 extern "C"
8443 #endif
8444
8445 /* We use char because int might match the return type of a gcc2
8446    builtin and then its argument prototype would still apply.  */
8447 char $ac_func (void);
8448
8449 int
8450 main (void)
8451 {
8452
8453 /* The GNU C library defines stubs for functions which it implements
8454     to always fail with ENOSYS.  Some functions are actually named
8455     something starting with __ and the normal name is an alias.  */
8456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8457 #error found stub for $ac_func
8458 #endif
8459
8460         return $ac_func ();
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 rm -f conftest.$ac_objext conftest$ac_exeext
8466 if { (eval echo "$as_me:8466: \"$ac_link\"") >&5
8467   (eval $ac_link) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); } &&
8471          { ac_try='test -s conftest$ac_exeext'
8472   { (eval echo "$as_me:8472: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); }; }; then
8477   eval "$as_ac_var=yes"
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 eval "$as_ac_var=no"
8482 fi
8483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8484 fi
8485 echo "$as_me:8485: result: `eval echo '${'$as_ac_var'}'`" >&5
8486 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8487 if test `eval echo '${'$as_ac_var'}'` = yes; then
8488   cat >>confdefs.h <<EOF
8489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8490 EOF
8491
8492 fi
8493 done
8494
8495 if test "$cross_compiling" = yes ; then
8496
8497 for ac_func in \
8498                 link \
8499                 symlink
8500 do
8501 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8502 echo "$as_me:8502: checking for $ac_func" >&5
8503 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8504 if eval "test \"\${$as_ac_var+set}\" = set"; then
8505   echo $ECHO_N "(cached) $ECHO_C" >&6
8506 else
8507   cat >conftest.$ac_ext <<_ACEOF
8508 #line 8508 "configure"
8509 #include "confdefs.h"
8510 #define $ac_func autoconf_temporary
8511 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8512 #undef $ac_func
8513
8514 #ifdef __cplusplus
8515 extern "C"
8516 #endif
8517
8518 /* We use char because int might match the return type of a gcc2
8519    builtin and then its argument prototype would still apply.  */
8520 char $ac_func (void);
8521
8522 int
8523 main (void)
8524 {
8525
8526 /* The GNU C library defines stubs for functions which it implements
8527     to always fail with ENOSYS.  Some functions are actually named
8528     something starting with __ and the normal name is an alias.  */
8529 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8530 #error found stub for $ac_func
8531 #endif
8532
8533         return $ac_func ();
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext conftest$ac_exeext
8539 if { (eval echo "$as_me:8539: \"$ac_link\"") >&5
8540   (eval $ac_link) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest$ac_exeext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   eval "$as_ac_var=yes"
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 eval "$as_ac_var=no"
8555 fi
8556 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8557 fi
8558 echo "$as_me:8558: result: `eval echo '${'$as_ac_var'}'`" >&5
8559 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8560 if test `eval echo '${'$as_ac_var'}'` = yes; then
8561   cat >>confdefs.h <<EOF
8562 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8563 EOF
8564
8565 fi
8566 done
8567
8568 else
8569         echo "$as_me:8569: checking if link/symlink functions work" >&5
8570 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
8571 if test "${cf_cv_link_funcs+set}" = set; then
8572   echo $ECHO_N "(cached) $ECHO_C" >&6
8573 else
8574
8575                 cf_cv_link_funcs=
8576                 for cf_func in link symlink ; do
8577                         if test "$cross_compiling" = yes; then
8578
8579                         eval 'ac_cv_func_'$cf_func'=error'
8580 else
8581   cat >conftest.$ac_ext <<_ACEOF
8582 #line 8582 "configure"
8583 #include "confdefs.h"
8584
8585 #include <sys/types.h>
8586 #include <sys/stat.h>
8587 #ifdef HAVE_UNISTD_H
8588 #include <unistd.h>
8589 #endif
8590 int main(void)
8591 {
8592         int fail = 0;
8593         char *src = "config.log";
8594         char *dst = "conftest.chk";
8595         struct stat src_sb;
8596         struct stat dst_sb;
8597
8598         stat(src, &src_sb);
8599         fail = ($cf_func("config.log", "conftest.chk") < 0)
8600             || (stat(dst, &dst_sb) < 0)
8601             || (dst_sb.st_mtime != src_sb.st_mtime);
8602 #ifdef HAVE_UNLINK
8603         unlink(dst);
8604 #else
8605         remove(dst);
8606 #endif
8607         ${cf_cv_main_return:-return} (fail);
8608 }
8609
8610 _ACEOF
8611 rm -f conftest$ac_exeext
8612 if { (eval echo "$as_me:8612: \"$ac_link\"") >&5
8613   (eval $ac_link) 2>&5
8614   ac_status=$?
8615   echo "$as_me:8615: \$? = $ac_status" >&5
8616   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8617   { (eval echo "$as_me:8617: \"$ac_try\"") >&5
8618   (eval $ac_try) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); }; }; then
8622
8623                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
8624                         eval 'ac_cv_func_'$cf_func'=yes'
8625 else
8626   echo "$as_me: program exited with status $ac_status" >&5
8627 echo "$as_me: failed program was:" >&5
8628 cat conftest.$ac_ext >&5
8629
8630                         eval 'ac_cv_func_'$cf_func'=no'
8631 fi
8632 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8633 fi
8634                 done
8635                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
8636
8637 fi
8638 echo "$as_me:8638: result: $cf_cv_link_funcs" >&5
8639 echo "${ECHO_T}$cf_cv_link_funcs" >&6
8640         test "$ac_cv_func_link"    = yes &&
8641 cat >>confdefs.h <<\EOF
8642 #define HAVE_LINK 1
8643 EOF
8644
8645         test "$ac_cv_func_symlink" = yes &&
8646 cat >>confdefs.h <<\EOF
8647 #define HAVE_SYMLINK 1
8648 EOF
8649
8650 fi
8651
8652 with_links=no
8653 with_symlinks=no
8654
8655 # soft links (symbolic links) are useful for some systems where hard links do
8656 # not work, or to make it simpler to copy terminfo trees around.
8657 if test "x$ac_cv_func_symlink" = xyes ; then
8658         echo "$as_me:8658: checking if tic should use symbolic links" >&5
8659 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
8660
8661 # Check whether --enable-symlinks or --disable-symlinks was given.
8662 if test "${enable_symlinks+set}" = set; then
8663   enableval="$enable_symlinks"
8664   with_symlinks=$enableval
8665 else
8666   with_symlinks=no
8667 fi;
8668         echo "$as_me:8668: result: $with_symlinks" >&5
8669 echo "${ECHO_T}$with_symlinks" >&6
8670 fi
8671
8672 # If we have hard links and did not choose to use soft links instead, there is
8673 # no reason to make this choice optional - use the hard links.
8674 if test "$with_symlinks" = no ; then
8675         echo "$as_me:8675: checking if tic should use hard links" >&5
8676 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
8677         if test "x$ac_cv_func_link" = xyes ; then
8678                 with_links=yes
8679         else
8680                 with_links=no
8681         fi
8682         echo "$as_me:8682: result: $with_links" >&5
8683 echo "${ECHO_T}$with_links" >&6
8684 fi
8685
8686 test "x$with_links" = xyes &&
8687 cat >>confdefs.h <<\EOF
8688 #define USE_LINKS 1
8689 EOF
8690
8691 test "x$with_symlinks" = xyes &&
8692 cat >>confdefs.h <<\EOF
8693 #define USE_SYMLINKS 1
8694 EOF
8695
8696 ###   use option --enable-broken-linker to force on use of broken-linker support
8697 echo "$as_me:8697: checking if you want broken-linker support code" >&5
8698 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
8699
8700 # Check whether --enable-broken_linker or --disable-broken_linker was given.
8701 if test "${enable_broken_linker+set}" = set; then
8702   enableval="$enable_broken_linker"
8703   with_broken_linker=$enableval
8704 else
8705   with_broken_linker=${BROKEN_LINKER:-no}
8706 fi;
8707 echo "$as_me:8707: result: $with_broken_linker" >&5
8708 echo "${ECHO_T}$with_broken_linker" >&6
8709
8710 BROKEN_LINKER=0
8711 if test "x$with_broken_linker" = xyes ; then
8712
8713 cat >>confdefs.h <<\EOF
8714 #define BROKEN_LINKER 1
8715 EOF
8716
8717         BROKEN_LINKER=1
8718 elif test "$DFT_LWR_MODEL" = shared ; then
8719         case $cf_cv_system_name in
8720         (cygwin*)
8721
8722 cat >>confdefs.h <<\EOF
8723 #define BROKEN_LINKER 1
8724 EOF
8725
8726                 BROKEN_LINKER=1
8727                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
8728
8729 echo "${as_me:-configure}:8729: testing cygwin linker is broken anyway ..." 1>&5
8730
8731                 ;;
8732         esac
8733 fi
8734
8735 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
8736 echo "$as_me:8736: checking if tputs should process BSD-style prefix padding" >&5
8737 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
8738
8739 # Check whether --enable-bsdpad or --disable-bsdpad was given.
8740 if test "${enable_bsdpad+set}" = set; then
8741   enableval="$enable_bsdpad"
8742   with_bsdpad=$enableval
8743 else
8744   with_bsdpad=no
8745 fi;
8746 echo "$as_me:8746: result: $with_bsdpad" >&5
8747 echo "${ECHO_T}$with_bsdpad" >&6
8748 test "x$with_bsdpad" = xyes &&
8749 cat >>confdefs.h <<\EOF
8750 #define BSD_TPUTS 1
8751 EOF
8752
8753 ###   use option --enable-widec to turn on use of wide-character support
8754 NCURSES_CH_T=chtype
8755 NCURSES_LIBUTF8=0
8756
8757 NEED_WCHAR_H=0
8758 NCURSES_MBSTATE_T=0
8759 NCURSES_WCHAR_T=0
8760 NCURSES_WINT_T=0
8761
8762 # Check to define _XOPEN_SOURCE "automatically"
8763 CPPFLAGS_before_XOPEN="$CPPFLAGS"
8764
8765 cf_XOPEN_SOURCE=600
8766 cf_POSIX_C_SOURCE=199506L
8767 cf_xopen_source=
8768
8769 case $host_os in
8770 (aix[4-7]*)
8771         cf_xopen_source="-D_ALL_SOURCE"
8772         ;;
8773 (msys)
8774         cf_XOPEN_SOURCE=600
8775         ;;
8776 (darwin[0-8].*)
8777         cf_xopen_source="-D_APPLE_C_SOURCE"
8778         ;;
8779 (darwin*)
8780         cf_xopen_source="-D_DARWIN_C_SOURCE"
8781         cf_XOPEN_SOURCE=
8782         ;;
8783 (freebsd*|dragonfly*|midnightbsd*)
8784         # 5.x headers associate
8785         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
8786         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
8787         cf_POSIX_C_SOURCE=200112L
8788         cf_XOPEN_SOURCE=600
8789         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8790         ;;
8791 (hpux11*)
8792         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
8793         ;;
8794 (hpux*)
8795         cf_xopen_source="-D_HPUX_SOURCE"
8796         ;;
8797 (irix[56].*)
8798         cf_xopen_source="-D_SGI_SOURCE"
8799         cf_XOPEN_SOURCE=
8800         ;;
8801 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
8802
8803 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
8804
8805 echo "$as_me:8805: checking if this is the GNU C library" >&5
8806 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
8807 if test "${cf_cv_gnu_library+set}" = set; then
8808   echo $ECHO_N "(cached) $ECHO_C" >&6
8809 else
8810
8811 cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8814 #include <sys/types.h>
8815 int
8816 main (void)
8817 {
8818
8819         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
8820                 return 0;
8821         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
8822                 return 0;
8823         #else
8824         #       error not GNU C library
8825         #endif
8826   ;
8827   return 0;
8828 }
8829 _ACEOF
8830 rm -f conftest.$ac_objext
8831 if { (eval echo "$as_me:8831: \"$ac_compile\"") >&5
8832   (eval $ac_compile) 2>&5
8833   ac_status=$?
8834   echo "$as_me:8834: \$? = $ac_status" >&5
8835   (exit $ac_status); } &&
8836          { ac_try='test -s conftest.$ac_objext'
8837   { (eval echo "$as_me:8837: \"$ac_try\"") >&5
8838   (eval $ac_try) 2>&5
8839   ac_status=$?
8840   echo "$as_me:8840: \$? = $ac_status" >&5
8841   (exit $ac_status); }; }; then
8842   cf_cv_gnu_library=yes
8843 else
8844   echo "$as_me: failed program was:" >&5
8845 cat conftest.$ac_ext >&5
8846 cf_cv_gnu_library=no
8847 fi
8848 rm -f conftest.$ac_objext conftest.$ac_ext
8849
8850 fi
8851 echo "$as_me:8851: result: $cf_cv_gnu_library" >&5
8852 echo "${ECHO_T}$cf_cv_gnu_library" >&6
8853
8854 if test x$cf_cv_gnu_library = xyes; then
8855
8856         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
8857         # was changed to help a little.  newlib incorporated the change about 4
8858         # years later.
8859         echo "$as_me:8859: checking if _DEFAULT_SOURCE can be used as a basis" >&5
8860 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
8861 if test "${cf_cv_gnu_library_219+set}" = set; then
8862   echo $ECHO_N "(cached) $ECHO_C" >&6
8863 else
8864
8865                 cf_save="$CPPFLAGS"
8866
8867         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8868         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
8869
8870                 cat >conftest.$ac_ext <<_ACEOF
8871 #line 8871 "configure"
8872 #include "confdefs.h"
8873 #include <sys/types.h>
8874 int
8875 main (void)
8876 {
8877
8878                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
8879                                 return 0;
8880                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
8881                                 return 0;
8882                         #else
8883                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
8884                         #endif
8885   ;
8886   return 0;
8887 }
8888 _ACEOF
8889 rm -f conftest.$ac_objext
8890 if { (eval echo "$as_me:8890: \"$ac_compile\"") >&5
8891   (eval $ac_compile) 2>&5
8892   ac_status=$?
8893   echo "$as_me:8893: \$? = $ac_status" >&5
8894   (exit $ac_status); } &&
8895          { ac_try='test -s conftest.$ac_objext'
8896   { (eval echo "$as_me:8896: \"$ac_try\"") >&5
8897   (eval $ac_try) 2>&5
8898   ac_status=$?
8899   echo "$as_me:8899: \$? = $ac_status" >&5
8900   (exit $ac_status); }; }; then
8901   cf_cv_gnu_library_219=yes
8902 else
8903   echo "$as_me: failed program was:" >&5
8904 cat conftest.$ac_ext >&5
8905 cf_cv_gnu_library_219=no
8906 fi
8907 rm -f conftest.$ac_objext conftest.$ac_ext
8908                 CPPFLAGS="$cf_save"
8909
8910 fi
8911 echo "$as_me:8911: result: $cf_cv_gnu_library_219" >&5
8912 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
8913
8914         if test "x$cf_cv_gnu_library_219" = xyes; then
8915                 cf_save="$CPPFLAGS"
8916                 echo "$as_me:8916: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
8917 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
8918 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
8919   echo $ECHO_N "(cached) $ECHO_C" >&6
8920 else
8921
8922 cf_fix_cppflags=no
8923 cf_new_cflags=
8924 cf_new_cppflags=
8925 cf_new_extra_cppflags=
8926
8927 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
8928 do
8929 case $cf_fix_cppflags in
8930 (no)
8931         case $cf_add_cflags in
8932         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8933                 case $cf_add_cflags in
8934                 (-D*)
8935                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8936
8937                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8938                                 && test -z "${cf_tst_cflags}" \
8939                                 && cf_fix_cppflags=yes
8940
8941                         if test $cf_fix_cppflags = yes ; then
8942
8943         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8944         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8945
8946                                 continue
8947                         elif test "${cf_tst_cflags}" = "\"'" ; then
8948
8949         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8950         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8951
8952                                 continue
8953                         fi
8954                         ;;
8955                 esac
8956                 case "$CPPFLAGS" in
8957                 (*$cf_add_cflags)
8958                         ;;
8959                 (*)
8960                         case $cf_add_cflags in
8961                         (-D*)
8962                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8963
8964 CPPFLAGS=`echo "$CPPFLAGS" | \
8965         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8966                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8967
8968                                 ;;
8969                         esac
8970
8971         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8972         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8973
8974                         ;;
8975                 esac
8976                 ;;
8977         (*)
8978
8979         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8980         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8981
8982                 ;;
8983         esac
8984         ;;
8985 (yes)
8986
8987         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8988         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8989
8990         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8991
8992         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8993                 && test -z "${cf_tst_cflags}" \
8994                 && cf_fix_cppflags=no
8995         ;;
8996 esac
8997 done
8998
8999 if test -n "$cf_new_cflags" ; then
9000
9001         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9002         CFLAGS="${CFLAGS}$cf_new_cflags"
9003
9004 fi
9005
9006 if test -n "$cf_new_cppflags" ; then
9007
9008         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9009         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9010
9011 fi
9012
9013 if test -n "$cf_new_extra_cppflags" ; then
9014
9015         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9016         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9017
9018 fi
9019
9020                         cat >conftest.$ac_ext <<_ACEOF
9021 #line 9021 "configure"
9022 #include "confdefs.h"
9023
9024                                 #include <limits.h>
9025                                 #include <sys/types.h>
9026
9027 int
9028 main (void)
9029 {
9030
9031                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
9032                                         return 0;
9033                                 #else
9034                                 #       error GNU C library is too old
9035                                 #endif
9036   ;
9037   return 0;
9038 }
9039 _ACEOF
9040 rm -f conftest.$ac_objext
9041 if { (eval echo "$as_me:9041: \"$ac_compile\"") >&5
9042   (eval $ac_compile) 2>&5
9043   ac_status=$?
9044   echo "$as_me:9044: \$? = $ac_status" >&5
9045   (exit $ac_status); } &&
9046          { ac_try='test -s conftest.$ac_objext'
9047   { (eval echo "$as_me:9047: \"$ac_try\"") >&5
9048   (eval $ac_try) 2>&5
9049   ac_status=$?
9050   echo "$as_me:9050: \$? = $ac_status" >&5
9051   (exit $ac_status); }; }; then
9052   cf_cv_gnu_dftsrc_219=yes
9053 else
9054   echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9056 cf_cv_gnu_dftsrc_219=no
9057 fi
9058 rm -f conftest.$ac_objext conftest.$ac_ext
9059
9060 fi
9061 echo "$as_me:9061: result: $cf_cv_gnu_dftsrc_219" >&5
9062 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
9063                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
9064         else
9065                 cf_cv_gnu_dftsrc_219=maybe
9066         fi
9067
9068         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
9069
9070                 echo "$as_me:9070: checking if we must define _GNU_SOURCE" >&5
9071 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
9072 if test "${cf_cv_gnu_source+set}" = set; then
9073   echo $ECHO_N "(cached) $ECHO_C" >&6
9074 else
9075
9076                 cat >conftest.$ac_ext <<_ACEOF
9077 #line 9077 "configure"
9078 #include "confdefs.h"
9079 #include <sys/types.h>
9080 int
9081 main (void)
9082 {
9083
9084                         #ifndef _XOPEN_SOURCE
9085                         #error  expected _XOPEN_SOURCE to be defined
9086                         #endif
9087   ;
9088   return 0;
9089 }
9090 _ACEOF
9091 rm -f conftest.$ac_objext
9092 if { (eval echo "$as_me:9092: \"$ac_compile\"") >&5
9093   (eval $ac_compile) 2>&5
9094   ac_status=$?
9095   echo "$as_me:9095: \$? = $ac_status" >&5
9096   (exit $ac_status); } &&
9097          { ac_try='test -s conftest.$ac_objext'
9098   { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9099   (eval $ac_try) 2>&5
9100   ac_status=$?
9101   echo "$as_me:9101: \$? = $ac_status" >&5
9102   (exit $ac_status); }; }; then
9103   cf_cv_gnu_source=no
9104 else
9105   echo "$as_me: failed program was:" >&5
9106 cat conftest.$ac_ext >&5
9107 cf_save="$CPPFLAGS"
9108
9109 cf_fix_cppflags=no
9110 cf_new_cflags=
9111 cf_new_cppflags=
9112 cf_new_extra_cppflags=
9113
9114 for cf_add_cflags in -D_GNU_SOURCE
9115 do
9116 case $cf_fix_cppflags in
9117 (no)
9118         case $cf_add_cflags in
9119         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9120                 case $cf_add_cflags in
9121                 (-D*)
9122                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9123
9124                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9125                                 && test -z "${cf_tst_cflags}" \
9126                                 && cf_fix_cppflags=yes
9127
9128                         if test $cf_fix_cppflags = yes ; then
9129
9130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9132
9133                                 continue
9134                         elif test "${cf_tst_cflags}" = "\"'" ; then
9135
9136         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9137         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9138
9139                                 continue
9140                         fi
9141                         ;;
9142                 esac
9143                 case "$CPPFLAGS" in
9144                 (*$cf_add_cflags)
9145                         ;;
9146                 (*)
9147                         case $cf_add_cflags in
9148                         (-D*)
9149                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9150
9151 CPPFLAGS=`echo "$CPPFLAGS" | \
9152         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9153                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9154
9155                                 ;;
9156                         esac
9157
9158         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9159         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9160
9161                         ;;
9162                 esac
9163                 ;;
9164         (*)
9165
9166         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9167         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9168
9169                 ;;
9170         esac
9171         ;;
9172 (yes)
9173
9174         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9175         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9176
9177         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9178
9179         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9180                 && test -z "${cf_tst_cflags}" \
9181                 && cf_fix_cppflags=no
9182         ;;
9183 esac
9184 done
9185
9186 if test -n "$cf_new_cflags" ; then
9187
9188         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9189         CFLAGS="${CFLAGS}$cf_new_cflags"
9190
9191 fi
9192
9193 if test -n "$cf_new_cppflags" ; then
9194
9195         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9196         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9197
9198 fi
9199
9200 if test -n "$cf_new_extra_cppflags" ; then
9201
9202         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9203         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9204
9205 fi
9206
9207                          cat >conftest.$ac_ext <<_ACEOF
9208 #line 9208 "configure"
9209 #include "confdefs.h"
9210 #include <sys/types.h>
9211 int
9212 main (void)
9213 {
9214
9215                                 #ifdef _XOPEN_SOURCE
9216                                 #error  expected _XOPEN_SOURCE to be undefined
9217                                 #endif
9218   ;
9219   return 0;
9220 }
9221 _ACEOF
9222 rm -f conftest.$ac_objext
9223 if { (eval echo "$as_me:9223: \"$ac_compile\"") >&5
9224   (eval $ac_compile) 2>&5
9225   ac_status=$?
9226   echo "$as_me:9226: \$? = $ac_status" >&5
9227   (exit $ac_status); } &&
9228          { ac_try='test -s conftest.$ac_objext'
9229   { (eval echo "$as_me:9229: \"$ac_try\"") >&5
9230   (eval $ac_try) 2>&5
9231   ac_status=$?
9232   echo "$as_me:9232: \$? = $ac_status" >&5
9233   (exit $ac_status); }; }; then
9234   cf_cv_gnu_source=no
9235 else
9236   echo "$as_me: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9238 cf_cv_gnu_source=yes
9239 fi
9240 rm -f conftest.$ac_objext conftest.$ac_ext
9241                         CPPFLAGS="$cf_save"
9242
9243 fi
9244 rm -f conftest.$ac_objext conftest.$ac_ext
9245
9246 fi
9247 echo "$as_me:9247: result: $cf_cv_gnu_source" >&5
9248 echo "${ECHO_T}$cf_cv_gnu_source" >&6
9249
9250                 if test "$cf_cv_gnu_source" = yes
9251                 then
9252                 echo "$as_me:9252: checking if we should also define _DEFAULT_SOURCE" >&5
9253 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
9254 if test "${cf_cv_default_source+set}" = set; then
9255   echo $ECHO_N "(cached) $ECHO_C" >&6
9256 else
9257
9258         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9259         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
9260
9261                         cat >conftest.$ac_ext <<_ACEOF
9262 #line 9262 "configure"
9263 #include "confdefs.h"
9264 #include <sys/types.h>
9265 int
9266 main (void)
9267 {
9268
9269                                 #ifdef _DEFAULT_SOURCE
9270                                 #error  expected _DEFAULT_SOURCE to be undefined
9271                                 #endif
9272   ;
9273   return 0;
9274 }
9275 _ACEOF
9276 rm -f conftest.$ac_objext
9277 if { (eval echo "$as_me:9277: \"$ac_compile\"") >&5
9278   (eval $ac_compile) 2>&5
9279   ac_status=$?
9280   echo "$as_me:9280: \$? = $ac_status" >&5
9281   (exit $ac_status); } &&
9282          { ac_try='test -s conftest.$ac_objext'
9283   { (eval echo "$as_me:9283: \"$ac_try\"") >&5
9284   (eval $ac_try) 2>&5
9285   ac_status=$?
9286   echo "$as_me:9286: \$? = $ac_status" >&5
9287   (exit $ac_status); }; }; then
9288   cf_cv_default_source=no
9289 else
9290   echo "$as_me: failed program was:" >&5
9291 cat conftest.$ac_ext >&5
9292 cf_cv_default_source=yes
9293 fi
9294 rm -f conftest.$ac_objext conftest.$ac_ext
9295
9296 fi
9297 echo "$as_me:9297: result: $cf_cv_default_source" >&5
9298 echo "${ECHO_T}$cf_cv_default_source" >&6
9299                         if test "$cf_cv_default_source" = yes
9300                         then
9301
9302         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9303         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9304
9305                         fi
9306                 fi
9307         fi
9308
9309 fi
9310
9311         ;;
9312 (minix*)
9313         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
9314         ;;
9315 (mirbsd*)
9316         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
9317         cf_XOPEN_SOURCE=
9318
9319 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9320
9321 cf_save_CFLAGS="$CFLAGS"
9322 cf_save_CPPFLAGS="$CPPFLAGS"
9323
9324 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9325         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9326                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9327
9328 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9329         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9330                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9331
9332 echo "$as_me:9332: checking if we should define _POSIX_C_SOURCE" >&5
9333 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9334 if test "${cf_cv_posix_c_source+set}" = set; then
9335   echo $ECHO_N "(cached) $ECHO_C" >&6
9336 else
9337
9338 echo "${as_me:-configure}:9338: testing if the symbol is already defined go no further ..." 1>&5
9339
9340         cat >conftest.$ac_ext <<_ACEOF
9341 #line 9341 "configure"
9342 #include "confdefs.h"
9343 #include <sys/types.h>
9344 int
9345 main (void)
9346 {
9347
9348 #ifndef _POSIX_C_SOURCE
9349 make an error
9350 #endif
9351   ;
9352   return 0;
9353 }
9354 _ACEOF
9355 rm -f conftest.$ac_objext
9356 if { (eval echo "$as_me:9356: \"$ac_compile\"") >&5
9357   (eval $ac_compile) 2>&5
9358   ac_status=$?
9359   echo "$as_me:9359: \$? = $ac_status" >&5
9360   (exit $ac_status); } &&
9361          { ac_try='test -s conftest.$ac_objext'
9362   { (eval echo "$as_me:9362: \"$ac_try\"") >&5
9363   (eval $ac_try) 2>&5
9364   ac_status=$?
9365   echo "$as_me:9365: \$? = $ac_status" >&5
9366   (exit $ac_status); }; }; then
9367   cf_cv_posix_c_source=no
9368 else
9369   echo "$as_me: failed program was:" >&5
9370 cat conftest.$ac_ext >&5
9371 cf_want_posix_source=no
9372          case .$cf_POSIX_C_SOURCE in
9373          (.[12]??*)
9374                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9375                 ;;
9376          (.2)
9377                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9378                 cf_want_posix_source=yes
9379                 ;;
9380          (.*)
9381                 cf_want_posix_source=yes
9382                 ;;
9383          esac
9384          if test "$cf_want_posix_source" = yes ; then
9385                 cat >conftest.$ac_ext <<_ACEOF
9386 #line 9386 "configure"
9387 #include "confdefs.h"
9388 #include <sys/types.h>
9389 int
9390 main (void)
9391 {
9392
9393 #ifdef _POSIX_SOURCE
9394 make an error
9395 #endif
9396   ;
9397   return 0;
9398 }
9399 _ACEOF
9400 rm -f conftest.$ac_objext
9401 if { (eval echo "$as_me:9401: \"$ac_compile\"") >&5
9402   (eval $ac_compile) 2>&5
9403   ac_status=$?
9404   echo "$as_me:9404: \$? = $ac_status" >&5
9405   (exit $ac_status); } &&
9406          { ac_try='test -s conftest.$ac_objext'
9407   { (eval echo "$as_me:9407: \"$ac_try\"") >&5
9408   (eval $ac_try) 2>&5
9409   ac_status=$?
9410   echo "$as_me:9410: \$? = $ac_status" >&5
9411   (exit $ac_status); }; }; then
9412   :
9413 else
9414   echo "$as_me: failed program was:" >&5
9415 cat conftest.$ac_ext >&5
9416 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9417 fi
9418 rm -f conftest.$ac_objext conftest.$ac_ext
9419          fi
9420
9421 echo "${as_me:-configure}:9421: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9422
9423          CFLAGS="$cf_trim_CFLAGS"
9424          CPPFLAGS="$cf_trim_CPPFLAGS"
9425
9426         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9427         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9428
9429 echo "${as_me:-configure}:9429: testing if the second compile does not leave our definition intact error ..." 1>&5
9430
9431          cat >conftest.$ac_ext <<_ACEOF
9432 #line 9432 "configure"
9433 #include "confdefs.h"
9434 #include <sys/types.h>
9435 int
9436 main (void)
9437 {
9438
9439 #ifndef _POSIX_C_SOURCE
9440 make an error
9441 #endif
9442   ;
9443   return 0;
9444 }
9445 _ACEOF
9446 rm -f conftest.$ac_objext
9447 if { (eval echo "$as_me:9447: \"$ac_compile\"") >&5
9448   (eval $ac_compile) 2>&5
9449   ac_status=$?
9450   echo "$as_me:9450: \$? = $ac_status" >&5
9451   (exit $ac_status); } &&
9452          { ac_try='test -s conftest.$ac_objext'
9453   { (eval echo "$as_me:9453: \"$ac_try\"") >&5
9454   (eval $ac_try) 2>&5
9455   ac_status=$?
9456   echo "$as_me:9456: \$? = $ac_status" >&5
9457   (exit $ac_status); }; }; then
9458   :
9459 else
9460   echo "$as_me: failed program was:" >&5
9461 cat conftest.$ac_ext >&5
9462 cf_cv_posix_c_source=no
9463 fi
9464 rm -f conftest.$ac_objext conftest.$ac_ext
9465          CFLAGS="$cf_save_CFLAGS"
9466          CPPFLAGS="$cf_save_CPPFLAGS"
9467
9468 fi
9469 rm -f conftest.$ac_objext conftest.$ac_ext
9470
9471 fi
9472 echo "$as_me:9472: result: $cf_cv_posix_c_source" >&5
9473 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9474
9475 if test "$cf_cv_posix_c_source" != no ; then
9476         CFLAGS="$cf_trim_CFLAGS"
9477         CPPFLAGS="$cf_trim_CPPFLAGS"
9478
9479 cf_fix_cppflags=no
9480 cf_new_cflags=
9481 cf_new_cppflags=
9482 cf_new_extra_cppflags=
9483
9484 for cf_add_cflags in $cf_cv_posix_c_source
9485 do
9486 case $cf_fix_cppflags in
9487 (no)
9488         case $cf_add_cflags in
9489         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9490                 case $cf_add_cflags in
9491                 (-D*)
9492                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9493
9494                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9495                                 && test -z "${cf_tst_cflags}" \
9496                                 && cf_fix_cppflags=yes
9497
9498                         if test $cf_fix_cppflags = yes ; then
9499
9500         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9501         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9502
9503                                 continue
9504                         elif test "${cf_tst_cflags}" = "\"'" ; then
9505
9506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9508
9509                                 continue
9510                         fi
9511                         ;;
9512                 esac
9513                 case "$CPPFLAGS" in
9514                 (*$cf_add_cflags)
9515                         ;;
9516                 (*)
9517                         case $cf_add_cflags in
9518                         (-D*)
9519                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9520
9521 CPPFLAGS=`echo "$CPPFLAGS" | \
9522         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9523                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9524
9525                                 ;;
9526                         esac
9527
9528         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9529         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9530
9531                         ;;
9532                 esac
9533                 ;;
9534         (*)
9535
9536         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9537         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9538
9539                 ;;
9540         esac
9541         ;;
9542 (yes)
9543
9544         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9545         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9546
9547         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9548
9549         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9550                 && test -z "${cf_tst_cflags}" \
9551                 && cf_fix_cppflags=no
9552         ;;
9553 esac
9554 done
9555
9556 if test -n "$cf_new_cflags" ; then
9557
9558         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9559         CFLAGS="${CFLAGS}$cf_new_cflags"
9560
9561 fi
9562
9563 if test -n "$cf_new_cppflags" ; then
9564
9565         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9566         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9567
9568 fi
9569
9570 if test -n "$cf_new_extra_cppflags" ; then
9571
9572         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9573         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9574
9575 fi
9576
9577 fi
9578
9579         ;;
9580 (netbsd*)
9581         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
9582         ;;
9583 (openbsd[4-9]*)
9584         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
9585         cf_xopen_source="-D_BSD_SOURCE"
9586         cf_XOPEN_SOURCE=600
9587         ;;
9588 (openbsd*)
9589         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
9590         ;;
9591 (osf[45]*)
9592         cf_xopen_source="-D_OSF_SOURCE"
9593         ;;
9594 (nto-qnx*)
9595         cf_xopen_source="-D_QNX_SOURCE"
9596         ;;
9597 (sco*)
9598         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
9599         ;;
9600 (solaris2.*)
9601         cf_xopen_source="-D__EXTENSIONS__"
9602         cf_cv_xopen_source=broken
9603         ;;
9604 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
9605         cf_XOPEN_SOURCE=
9606         cf_POSIX_C_SOURCE=
9607         ;;
9608 (*)
9609
9610 echo "$as_me:9610: checking if we should define _XOPEN_SOURCE" >&5
9611 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
9612 if test "${cf_cv_xopen_source+set}" = set; then
9613   echo $ECHO_N "(cached) $ECHO_C" >&6
9614 else
9615
9616         cat >conftest.$ac_ext <<_ACEOF
9617 #line 9617 "configure"
9618 #include "confdefs.h"
9619
9620 #include <stdlib.h>
9621 #include <string.h>
9622 #include <sys/types.h>
9623
9624 int
9625 main (void)
9626 {
9627
9628 #ifndef _XOPEN_SOURCE
9629 make an error
9630 #endif
9631   ;
9632   return 0;
9633 }
9634 _ACEOF
9635 rm -f conftest.$ac_objext
9636 if { (eval echo "$as_me:9636: \"$ac_compile\"") >&5
9637   (eval $ac_compile) 2>&5
9638   ac_status=$?
9639   echo "$as_me:9639: \$? = $ac_status" >&5
9640   (exit $ac_status); } &&
9641          { ac_try='test -s conftest.$ac_objext'
9642   { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9643   (eval $ac_try) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); }; }; then
9647   cf_cv_xopen_source=no
9648 else
9649   echo "$as_me: failed program was:" >&5
9650 cat conftest.$ac_ext >&5
9651 cf_save="$CPPFLAGS"
9652
9653         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9654         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9655
9656          cat >conftest.$ac_ext <<_ACEOF
9657 #line 9657 "configure"
9658 #include "confdefs.h"
9659
9660 #include <stdlib.h>
9661 #include <string.h>
9662 #include <sys/types.h>
9663
9664 int
9665 main (void)
9666 {
9667
9668 #ifdef _XOPEN_SOURCE
9669 make an error
9670 #endif
9671   ;
9672   return 0;
9673 }
9674 _ACEOF
9675 rm -f conftest.$ac_objext
9676 if { (eval echo "$as_me:9676: \"$ac_compile\"") >&5
9677   (eval $ac_compile) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit $ac_status); } &&
9681          { ac_try='test -s conftest.$ac_objext'
9682   { (eval echo "$as_me:9682: \"$ac_try\"") >&5
9683   (eval $ac_try) 2>&5
9684   ac_status=$?
9685   echo "$as_me:9685: \$? = $ac_status" >&5
9686   (exit $ac_status); }; }; then
9687   cf_cv_xopen_source=no
9688 else
9689   echo "$as_me: failed program was:" >&5
9690 cat conftest.$ac_ext >&5
9691 cf_cv_xopen_source=$cf_XOPEN_SOURCE
9692 fi
9693 rm -f conftest.$ac_objext conftest.$ac_ext
9694         CPPFLAGS="$cf_save"
9695
9696 fi
9697 rm -f conftest.$ac_objext conftest.$ac_ext
9698
9699 fi
9700 echo "$as_me:9700: result: $cf_cv_xopen_source" >&5
9701 echo "${ECHO_T}$cf_cv_xopen_source" >&6
9702
9703 if test "$cf_cv_xopen_source" != no ; then
9704
9705 CFLAGS=`echo "$CFLAGS" | \
9706         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9707                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9708
9709 CPPFLAGS=`echo "$CPPFLAGS" | \
9710         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
9711                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
9712
9713         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
9714
9715 cf_fix_cppflags=no
9716 cf_new_cflags=
9717 cf_new_cppflags=
9718 cf_new_extra_cppflags=
9719
9720 for cf_add_cflags in $cf_temp_xopen_source
9721 do
9722 case $cf_fix_cppflags in
9723 (no)
9724         case $cf_add_cflags in
9725         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9726                 case $cf_add_cflags in
9727                 (-D*)
9728                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9729
9730                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9731                                 && test -z "${cf_tst_cflags}" \
9732                                 && cf_fix_cppflags=yes
9733
9734                         if test $cf_fix_cppflags = yes ; then
9735
9736         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9737         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9738
9739                                 continue
9740                         elif test "${cf_tst_cflags}" = "\"'" ; then
9741
9742         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9743         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9744
9745                                 continue
9746                         fi
9747                         ;;
9748                 esac
9749                 case "$CPPFLAGS" in
9750                 (*$cf_add_cflags)
9751                         ;;
9752                 (*)
9753                         case $cf_add_cflags in
9754                         (-D*)
9755                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9756
9757 CPPFLAGS=`echo "$CPPFLAGS" | \
9758         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
9759                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
9760
9761                                 ;;
9762                         esac
9763
9764         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9765         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9766
9767                         ;;
9768                 esac
9769                 ;;
9770         (*)
9771
9772         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9773         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9774
9775                 ;;
9776         esac
9777         ;;
9778 (yes)
9779
9780         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9781         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9782
9783         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9784
9785         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9786                 && test -z "${cf_tst_cflags}" \
9787                 && cf_fix_cppflags=no
9788         ;;
9789 esac
9790 done
9791
9792 if test -n "$cf_new_cflags" ; then
9793
9794         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9795         CFLAGS="${CFLAGS}$cf_new_cflags"
9796
9797 fi
9798
9799 if test -n "$cf_new_cppflags" ; then
9800
9801         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9802         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9803
9804 fi
9805
9806 if test -n "$cf_new_extra_cppflags" ; then
9807
9808         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9809         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9810
9811 fi
9812
9813 fi
9814
9815 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
9816
9817 cf_save_CFLAGS="$CFLAGS"
9818 cf_save_CPPFLAGS="$CPPFLAGS"
9819
9820 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
9821         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9822                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9823
9824 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
9825         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
9826                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
9827
9828 echo "$as_me:9828: checking if we should define _POSIX_C_SOURCE" >&5
9829 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
9830 if test "${cf_cv_posix_c_source+set}" = set; then
9831   echo $ECHO_N "(cached) $ECHO_C" >&6
9832 else
9833
9834 echo "${as_me:-configure}:9834: testing if the symbol is already defined go no further ..." 1>&5
9835
9836         cat >conftest.$ac_ext <<_ACEOF
9837 #line 9837 "configure"
9838 #include "confdefs.h"
9839 #include <sys/types.h>
9840 int
9841 main (void)
9842 {
9843
9844 #ifndef _POSIX_C_SOURCE
9845 make an error
9846 #endif
9847   ;
9848   return 0;
9849 }
9850 _ACEOF
9851 rm -f conftest.$ac_objext
9852 if { (eval echo "$as_me:9852: \"$ac_compile\"") >&5
9853   (eval $ac_compile) 2>&5
9854   ac_status=$?
9855   echo "$as_me:9855: \$? = $ac_status" >&5
9856   (exit $ac_status); } &&
9857          { ac_try='test -s conftest.$ac_objext'
9858   { (eval echo "$as_me:9858: \"$ac_try\"") >&5
9859   (eval $ac_try) 2>&5
9860   ac_status=$?
9861   echo "$as_me:9861: \$? = $ac_status" >&5
9862   (exit $ac_status); }; }; then
9863   cf_cv_posix_c_source=no
9864 else
9865   echo "$as_me: failed program was:" >&5
9866 cat conftest.$ac_ext >&5
9867 cf_want_posix_source=no
9868          case .$cf_POSIX_C_SOURCE in
9869          (.[12]??*)
9870                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9871                 ;;
9872          (.2)
9873                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
9874                 cf_want_posix_source=yes
9875                 ;;
9876          (.*)
9877                 cf_want_posix_source=yes
9878                 ;;
9879          esac
9880          if test "$cf_want_posix_source" = yes ; then
9881                 cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884 #include <sys/types.h>
9885 int
9886 main (void)
9887 {
9888
9889 #ifdef _POSIX_SOURCE
9890 make an error
9891 #endif
9892   ;
9893   return 0;
9894 }
9895 _ACEOF
9896 rm -f conftest.$ac_objext
9897 if { (eval echo "$as_me:9897: \"$ac_compile\"") >&5
9898   (eval $ac_compile) 2>&5
9899   ac_status=$?
9900   echo "$as_me:9900: \$? = $ac_status" >&5
9901   (exit $ac_status); } &&
9902          { ac_try='test -s conftest.$ac_objext'
9903   { (eval echo "$as_me:9903: \"$ac_try\"") >&5
9904   (eval $ac_try) 2>&5
9905   ac_status=$?
9906   echo "$as_me:9906: \$? = $ac_status" >&5
9907   (exit $ac_status); }; }; then
9908   :
9909 else
9910   echo "$as_me: failed program was:" >&5
9911 cat conftest.$ac_ext >&5
9912 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
9913 fi
9914 rm -f conftest.$ac_objext conftest.$ac_ext
9915          fi
9916
9917 echo "${as_me:-configure}:9917: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
9918
9919          CFLAGS="$cf_trim_CFLAGS"
9920          CPPFLAGS="$cf_trim_CPPFLAGS"
9921
9922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9923         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
9924
9925 echo "${as_me:-configure}:9925: testing if the second compile does not leave our definition intact error ..." 1>&5
9926
9927          cat >conftest.$ac_ext <<_ACEOF
9928 #line 9928 "configure"
9929 #include "confdefs.h"
9930 #include <sys/types.h>
9931 int
9932 main (void)
9933 {
9934
9935 #ifndef _POSIX_C_SOURCE
9936 make an error
9937 #endif
9938   ;
9939   return 0;
9940 }
9941 _ACEOF
9942 rm -f conftest.$ac_objext
9943 if { (eval echo "$as_me:9943: \"$ac_compile\"") >&5
9944   (eval $ac_compile) 2>&5
9945   ac_status=$?
9946   echo "$as_me:9946: \$? = $ac_status" >&5
9947   (exit $ac_status); } &&
9948          { ac_try='test -s conftest.$ac_objext'
9949   { (eval echo "$as_me:9949: \"$ac_try\"") >&5
9950   (eval $ac_try) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); }; }; then
9954   :
9955 else
9956   echo "$as_me: failed program was:" >&5
9957 cat conftest.$ac_ext >&5
9958 cf_cv_posix_c_source=no
9959 fi
9960 rm -f conftest.$ac_objext conftest.$ac_ext
9961          CFLAGS="$cf_save_CFLAGS"
9962          CPPFLAGS="$cf_save_CPPFLAGS"
9963
9964 fi
9965 rm -f conftest.$ac_objext conftest.$ac_ext
9966
9967 fi
9968 echo "$as_me:9968: result: $cf_cv_posix_c_source" >&5
9969 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
9970
9971 if test "$cf_cv_posix_c_source" != no ; then
9972         CFLAGS="$cf_trim_CFLAGS"
9973         CPPFLAGS="$cf_trim_CPPFLAGS"
9974
9975 cf_fix_cppflags=no
9976 cf_new_cflags=
9977 cf_new_cppflags=
9978 cf_new_extra_cppflags=
9979
9980 for cf_add_cflags in $cf_cv_posix_c_source
9981 do
9982 case $cf_fix_cppflags in
9983 (no)
9984         case $cf_add_cflags in
9985         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9986                 case $cf_add_cflags in
9987                 (-D*)
9988                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9989
9990                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9991                                 && test -z "${cf_tst_cflags}" \
9992                                 && cf_fix_cppflags=yes
9993
9994                         if test $cf_fix_cppflags = yes ; then
9995
9996         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9997         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9998
9999                                 continue
10000                         elif test "${cf_tst_cflags}" = "\"'" ; then
10001
10002         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10003         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10004
10005                                 continue
10006                         fi
10007                         ;;
10008                 esac
10009                 case "$CPPFLAGS" in
10010                 (*$cf_add_cflags)
10011                         ;;
10012                 (*)
10013                         case $cf_add_cflags in
10014                         (-D*)
10015                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10016
10017 CPPFLAGS=`echo "$CPPFLAGS" | \
10018         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10019                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10020
10021                                 ;;
10022                         esac
10023
10024         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10025         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10026
10027                         ;;
10028                 esac
10029                 ;;
10030         (*)
10031
10032         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10033         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10034
10035                 ;;
10036         esac
10037         ;;
10038 (yes)
10039
10040         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10041         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10042
10043         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10044
10045         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10046                 && test -z "${cf_tst_cflags}" \
10047                 && cf_fix_cppflags=no
10048         ;;
10049 esac
10050 done
10051
10052 if test -n "$cf_new_cflags" ; then
10053
10054         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10055         CFLAGS="${CFLAGS}$cf_new_cflags"
10056
10057 fi
10058
10059 if test -n "$cf_new_cppflags" ; then
10060
10061         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10062         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10063
10064 fi
10065
10066 if test -n "$cf_new_extra_cppflags" ; then
10067
10068         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10069         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10070
10071 fi
10072
10073 fi
10074
10075         ;;
10076 esac
10077
10078 if test -n "$cf_xopen_source" ; then
10079
10080 cf_fix_cppflags=no
10081 cf_new_cflags=
10082 cf_new_cppflags=
10083 cf_new_extra_cppflags=
10084
10085 for cf_add_cflags in $cf_xopen_source
10086 do
10087 case $cf_fix_cppflags in
10088 (no)
10089         case $cf_add_cflags in
10090         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10091                 case $cf_add_cflags in
10092                 (-D*)
10093                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10094
10095                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10096                                 && test -z "${cf_tst_cflags}" \
10097                                 && cf_fix_cppflags=yes
10098
10099                         if test $cf_fix_cppflags = yes ; then
10100
10101         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10102         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10103
10104                                 continue
10105                         elif test "${cf_tst_cflags}" = "\"'" ; then
10106
10107         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10108         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10109
10110                                 continue
10111                         fi
10112                         ;;
10113                 esac
10114                 case "$CPPFLAGS" in
10115                 (*$cf_add_cflags)
10116                         ;;
10117                 (*)
10118                         case $cf_add_cflags in
10119                         (-D*)
10120                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10121
10122 CPPFLAGS=`echo "$CPPFLAGS" | \
10123         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10124                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10125
10126                                 ;;
10127                         esac
10128
10129         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10130         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10131
10132                         ;;
10133                 esac
10134                 ;;
10135         (*)
10136
10137         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10138         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10139
10140                 ;;
10141         esac
10142         ;;
10143 (yes)
10144
10145         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10146         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10147
10148         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10149
10150         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10151                 && test -z "${cf_tst_cflags}" \
10152                 && cf_fix_cppflags=no
10153         ;;
10154 esac
10155 done
10156
10157 if test -n "$cf_new_cflags" ; then
10158         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
10159
10160 echo "${as_me:-configure}:10160: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10161
10162         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10163         CFLAGS="${CFLAGS}$cf_new_cflags"
10164
10165 fi
10166
10167 if test -n "$cf_new_cppflags" ; then
10168         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10169
10170 echo "${as_me:-configure}:10170: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10171
10172         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10173         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10174
10175 fi
10176
10177 if test -n "$cf_new_extra_cppflags" ; then
10178         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10179
10180 echo "${as_me:-configure}:10180: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10181
10182         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10183         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10184
10185 fi
10186
10187 fi
10188
10189 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
10190         echo "$as_me:10190: checking if _XOPEN_SOURCE really is set" >&5
10191 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
10192         cat >conftest.$ac_ext <<_ACEOF
10193 #line 10193 "configure"
10194 #include "confdefs.h"
10195 #include <stdlib.h>
10196 int
10197 main (void)
10198 {
10199
10200 #ifndef _XOPEN_SOURCE
10201 make an error
10202 #endif
10203   ;
10204   return 0;
10205 }
10206 _ACEOF
10207 rm -f conftest.$ac_objext
10208 if { (eval echo "$as_me:10208: \"$ac_compile\"") >&5
10209   (eval $ac_compile) 2>&5
10210   ac_status=$?
10211   echo "$as_me:10211: \$? = $ac_status" >&5
10212   (exit $ac_status); } &&
10213          { ac_try='test -s conftest.$ac_objext'
10214   { (eval echo "$as_me:10214: \"$ac_try\"") >&5
10215   (eval $ac_try) 2>&5
10216   ac_status=$?
10217   echo "$as_me:10217: \$? = $ac_status" >&5
10218   (exit $ac_status); }; }; then
10219   cf_XOPEN_SOURCE_set=yes
10220 else
10221   echo "$as_me: failed program was:" >&5
10222 cat conftest.$ac_ext >&5
10223 cf_XOPEN_SOURCE_set=no
10224 fi
10225 rm -f conftest.$ac_objext conftest.$ac_ext
10226         echo "$as_me:10226: result: $cf_XOPEN_SOURCE_set" >&5
10227 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
10228         if test $cf_XOPEN_SOURCE_set = yes
10229         then
10230                 cat >conftest.$ac_ext <<_ACEOF
10231 #line 10231 "configure"
10232 #include "confdefs.h"
10233 #include <stdlib.h>
10234 int
10235 main (void)
10236 {
10237
10238 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
10239 make an error
10240 #endif
10241   ;
10242   return 0;
10243 }
10244 _ACEOF
10245 rm -f conftest.$ac_objext
10246 if { (eval echo "$as_me:10246: \"$ac_compile\"") >&5
10247   (eval $ac_compile) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); } &&
10251          { ac_try='test -s conftest.$ac_objext'
10252   { (eval echo "$as_me:10252: \"$ac_try\"") >&5
10253   (eval $ac_try) 2>&5
10254   ac_status=$?
10255   echo "$as_me:10255: \$? = $ac_status" >&5
10256   (exit $ac_status); }; }; then
10257   cf_XOPEN_SOURCE_set_ok=yes
10258 else
10259   echo "$as_me: failed program was:" >&5
10260 cat conftest.$ac_ext >&5
10261 cf_XOPEN_SOURCE_set_ok=no
10262 fi
10263 rm -f conftest.$ac_objext conftest.$ac_ext
10264                 if test $cf_XOPEN_SOURCE_set_ok = no
10265                 then
10266                         { echo "$as_me:10266: WARNING: _XOPEN_SOURCE is lower than requested" >&5
10267 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
10268                 fi
10269         else
10270
10271 echo "$as_me:10271: checking if we should define _XOPEN_SOURCE" >&5
10272 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10273 if test "${cf_cv_xopen_source+set}" = set; then
10274   echo $ECHO_N "(cached) $ECHO_C" >&6
10275 else
10276
10277         cat >conftest.$ac_ext <<_ACEOF
10278 #line 10278 "configure"
10279 #include "confdefs.h"
10280
10281 #include <stdlib.h>
10282 #include <string.h>
10283 #include <sys/types.h>
10284
10285 int
10286 main (void)
10287 {
10288
10289 #ifndef _XOPEN_SOURCE
10290 make an error
10291 #endif
10292   ;
10293   return 0;
10294 }
10295 _ACEOF
10296 rm -f conftest.$ac_objext
10297 if { (eval echo "$as_me:10297: \"$ac_compile\"") >&5
10298   (eval $ac_compile) 2>&5
10299   ac_status=$?
10300   echo "$as_me:10300: \$? = $ac_status" >&5
10301   (exit $ac_status); } &&
10302          { ac_try='test -s conftest.$ac_objext'
10303   { (eval echo "$as_me:10303: \"$ac_try\"") >&5
10304   (eval $ac_try) 2>&5
10305   ac_status=$?
10306   echo "$as_me:10306: \$? = $ac_status" >&5
10307   (exit $ac_status); }; }; then
10308   cf_cv_xopen_source=no
10309 else
10310   echo "$as_me: failed program was:" >&5
10311 cat conftest.$ac_ext >&5
10312 cf_save="$CPPFLAGS"
10313
10314         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10315         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10316
10317          cat >conftest.$ac_ext <<_ACEOF
10318 #line 10318 "configure"
10319 #include "confdefs.h"
10320
10321 #include <stdlib.h>
10322 #include <string.h>
10323 #include <sys/types.h>
10324
10325 int
10326 main (void)
10327 {
10328
10329 #ifdef _XOPEN_SOURCE
10330 make an error
10331 #endif
10332   ;
10333   return 0;
10334 }
10335 _ACEOF
10336 rm -f conftest.$ac_objext
10337 if { (eval echo "$as_me:10337: \"$ac_compile\"") >&5
10338   (eval $ac_compile) 2>&5
10339   ac_status=$?
10340   echo "$as_me:10340: \$? = $ac_status" >&5
10341   (exit $ac_status); } &&
10342          { ac_try='test -s conftest.$ac_objext'
10343   { (eval echo "$as_me:10343: \"$ac_try\"") >&5
10344   (eval $ac_try) 2>&5
10345   ac_status=$?
10346   echo "$as_me:10346: \$? = $ac_status" >&5
10347   (exit $ac_status); }; }; then
10348   cf_cv_xopen_source=no
10349 else
10350   echo "$as_me: failed program was:" >&5
10351 cat conftest.$ac_ext >&5
10352 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10353 fi
10354 rm -f conftest.$ac_objext conftest.$ac_ext
10355         CPPFLAGS="$cf_save"
10356
10357 fi
10358 rm -f conftest.$ac_objext conftest.$ac_ext
10359
10360 fi
10361 echo "$as_me:10361: result: $cf_cv_xopen_source" >&5
10362 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10363
10364 if test "$cf_cv_xopen_source" != no ; then
10365
10366 CFLAGS=`echo "$CFLAGS" | \
10367         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10368                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10369
10370 CPPFLAGS=`echo "$CPPFLAGS" | \
10371         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10372                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10373
10374         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10375
10376 cf_fix_cppflags=no
10377 cf_new_cflags=
10378 cf_new_cppflags=
10379 cf_new_extra_cppflags=
10380
10381 for cf_add_cflags in $cf_temp_xopen_source
10382 do
10383 case $cf_fix_cppflags in
10384 (no)
10385         case $cf_add_cflags in
10386         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10387                 case $cf_add_cflags in
10388                 (-D*)
10389                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10390
10391                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10392                                 && test -z "${cf_tst_cflags}" \
10393                                 && cf_fix_cppflags=yes
10394
10395                         if test $cf_fix_cppflags = yes ; then
10396
10397         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10398         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10399
10400                                 continue
10401                         elif test "${cf_tst_cflags}" = "\"'" ; then
10402
10403         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10404         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10405
10406                                 continue
10407                         fi
10408                         ;;
10409                 esac
10410                 case "$CPPFLAGS" in
10411                 (*$cf_add_cflags)
10412                         ;;
10413                 (*)
10414                         case $cf_add_cflags in
10415                         (-D*)
10416                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10417
10418 CPPFLAGS=`echo "$CPPFLAGS" | \
10419         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10420                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10421
10422                                 ;;
10423                         esac
10424
10425         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10426         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10427
10428                         ;;
10429                 esac
10430                 ;;
10431         (*)
10432
10433         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10434         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10435
10436                 ;;
10437         esac
10438         ;;
10439 (yes)
10440
10441         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10442         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10443
10444         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10445
10446         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10447                 && test -z "${cf_tst_cflags}" \
10448                 && cf_fix_cppflags=no
10449         ;;
10450 esac
10451 done
10452
10453 if test -n "$cf_new_cflags" ; then
10454
10455         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10456         CFLAGS="${CFLAGS}$cf_new_cflags"
10457
10458 fi
10459
10460 if test -n "$cf_new_cppflags" ; then
10461
10462         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10463         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10464
10465 fi
10466
10467 if test -n "$cf_new_extra_cppflags" ; then
10468
10469         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10470         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10471
10472 fi
10473
10474 fi
10475
10476         fi
10477 fi
10478
10479 CPPFLAGS_after_XOPEN="$CPPFLAGS"
10480
10481 # Work around breakage on OS X
10482
10483 echo "$as_me:10483: checking if SIGWINCH is defined" >&5
10484 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
10485 if test "${cf_cv_define_sigwinch+set}" = set; then
10486   echo $ECHO_N "(cached) $ECHO_C" >&6
10487 else
10488
10489         cat >conftest.$ac_ext <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492
10493 #include <sys/types.h>
10494 #include <sys/signal.h>
10495
10496 int
10497 main (void)
10498 {
10499 int x = SIGWINCH
10500   ;
10501   return 0;
10502 }
10503 _ACEOF
10504 rm -f conftest.$ac_objext
10505 if { (eval echo "$as_me:10505: \"$ac_compile\"") >&5
10506   (eval $ac_compile) 2>&5
10507   ac_status=$?
10508   echo "$as_me:10508: \$? = $ac_status" >&5
10509   (exit $ac_status); } &&
10510          { ac_try='test -s conftest.$ac_objext'
10511   { (eval echo "$as_me:10511: \"$ac_try\"") >&5
10512   (eval $ac_try) 2>&5
10513   ac_status=$?
10514   echo "$as_me:10514: \$? = $ac_status" >&5
10515   (exit $ac_status); }; }; then
10516   cf_cv_define_sigwinch=yes
10517 else
10518   echo "$as_me: failed program was:" >&5
10519 cat conftest.$ac_ext >&5
10520 cat >conftest.$ac_ext <<_ACEOF
10521 #line 10521 "configure"
10522 #include "confdefs.h"
10523
10524 #undef _XOPEN_SOURCE
10525 #undef _POSIX_SOURCE
10526 #undef _POSIX_C_SOURCE
10527 #include <sys/types.h>
10528 #include <sys/signal.h>
10529
10530 int
10531 main (void)
10532 {
10533 int x = SIGWINCH
10534   ;
10535   return 0;
10536 }
10537 _ACEOF
10538 rm -f conftest.$ac_objext
10539 if { (eval echo "$as_me:10539: \"$ac_compile\"") >&5
10540   (eval $ac_compile) 2>&5
10541   ac_status=$?
10542   echo "$as_me:10542: \$? = $ac_status" >&5
10543   (exit $ac_status); } &&
10544          { ac_try='test -s conftest.$ac_objext'
10545   { (eval echo "$as_me:10545: \"$ac_try\"") >&5
10546   (eval $ac_try) 2>&5
10547   ac_status=$?
10548   echo "$as_me:10548: \$? = $ac_status" >&5
10549   (exit $ac_status); }; }; then
10550   cf_cv_define_sigwinch=maybe
10551 else
10552   echo "$as_me: failed program was:" >&5
10553 cat conftest.$ac_ext >&5
10554 cf_cv_define_sigwinch=no
10555 fi
10556 rm -f conftest.$ac_objext conftest.$ac_ext
10557
10558 fi
10559 rm -f conftest.$ac_objext conftest.$ac_ext
10560
10561 fi
10562 echo "$as_me:10562: result: $cf_cv_define_sigwinch" >&5
10563 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
10564
10565 if test "$cf_cv_define_sigwinch" = maybe ; then
10566 echo "$as_me:10566: checking for actual SIGWINCH definition" >&5
10567 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
10568 if test "${cf_cv_fixup_sigwinch+set}" = set; then
10569   echo $ECHO_N "(cached) $ECHO_C" >&6
10570 else
10571
10572 cf_cv_fixup_sigwinch=unknown
10573 cf_sigwinch=32
10574 while test $cf_sigwinch != 1
10575 do
10576         cat >conftest.$ac_ext <<_ACEOF
10577 #line 10577 "configure"
10578 #include "confdefs.h"
10579
10580 #undef _XOPEN_SOURCE
10581 #undef _POSIX_SOURCE
10582 #undef _POSIX_C_SOURCE
10583 #include <sys/types.h>
10584 #include <sys/signal.h>
10585
10586 int
10587 main (void)
10588 {
10589
10590 #if SIGWINCH != $cf_sigwinch
10591 make an error
10592 #endif
10593 int x = SIGWINCH
10594   ;
10595   return 0;
10596 }
10597 _ACEOF
10598 rm -f conftest.$ac_objext
10599 if { (eval echo "$as_me:10599: \"$ac_compile\"") >&5
10600   (eval $ac_compile) 2>&5
10601   ac_status=$?
10602   echo "$as_me:10602: \$? = $ac_status" >&5
10603   (exit $ac_status); } &&
10604          { ac_try='test -s conftest.$ac_objext'
10605   { (eval echo "$as_me:10605: \"$ac_try\"") >&5
10606   (eval $ac_try) 2>&5
10607   ac_status=$?
10608   echo "$as_me:10608: \$? = $ac_status" >&5
10609   (exit $ac_status); }; }; then
10610   cf_cv_fixup_sigwinch=$cf_sigwinch
10611          break
10612 else
10613   echo "$as_me: failed program was:" >&5
10614 cat conftest.$ac_ext >&5
10615 fi
10616 rm -f conftest.$ac_objext conftest.$ac_ext
10617
10618 cf_sigwinch=`expr $cf_sigwinch - 1`
10619 done
10620
10621 fi
10622 echo "$as_me:10622: result: $cf_cv_fixup_sigwinch" >&5
10623 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
10624
10625         if test "$cf_cv_fixup_sigwinch" != unknown ; then
10626                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
10627         fi
10628 fi
10629
10630 # Checks for CODESET support.
10631
10632 echo "$as_me:10632: checking for nl_langinfo and CODESET" >&5
10633 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
10634 if test "${am_cv_langinfo_codeset+set}" = set; then
10635   echo $ECHO_N "(cached) $ECHO_C" >&6
10636 else
10637   cat >conftest.$ac_ext <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640 #include <langinfo.h>
10641 int
10642 main (void)
10643 {
10644 char* cs = nl_langinfo(CODESET);
10645   ;
10646   return 0;
10647 }
10648 _ACEOF
10649 rm -f conftest.$ac_objext conftest$ac_exeext
10650 if { (eval echo "$as_me:10650: \"$ac_link\"") >&5
10651   (eval $ac_link) 2>&5
10652   ac_status=$?
10653   echo "$as_me:10653: \$? = $ac_status" >&5
10654   (exit $ac_status); } &&
10655          { ac_try='test -s conftest$ac_exeext'
10656   { (eval echo "$as_me:10656: \"$ac_try\"") >&5
10657   (eval $ac_try) 2>&5
10658   ac_status=$?
10659   echo "$as_me:10659: \$? = $ac_status" >&5
10660   (exit $ac_status); }; }; then
10661   am_cv_langinfo_codeset=yes
10662 else
10663   echo "$as_me: failed program was:" >&5
10664 cat conftest.$ac_ext >&5
10665 am_cv_langinfo_codeset=no
10666 fi
10667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10668
10669 fi
10670 echo "$as_me:10670: result: $am_cv_langinfo_codeset" >&5
10671 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
10672         if test $am_cv_langinfo_codeset = yes; then
10673
10674 cat >>confdefs.h <<\EOF
10675 #define HAVE_LANGINFO_CODESET 1
10676 EOF
10677
10678         fi
10679
10680 # use these variables to work around a defect in gcc's fixincludes.
10681 NCURSES_OK_WCHAR_T=
10682 NCURSES_OK_WINT_T=
10683
10684 echo "$as_me:10684: checking if you want wide-character code" >&5
10685 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
10686
10687 # Check whether --enable-widec or --disable-widec was given.
10688 if test "${enable_widec+set}" = set; then
10689   enableval="$enable_widec"
10690   with_widec=$enableval
10691 else
10692   with_widec=no
10693 fi;
10694 echo "$as_me:10694: result: $with_widec" >&5
10695 echo "${ECHO_T}$with_widec" >&6
10696
10697 NCURSES_WCWIDTH_GRAPHICS=1
10698
10699 if test "x$with_widec" = xyes ; then
10700         if test "x$disable_lib_suffixes" = xno ; then
10701                 LIB_SUFFIX="w${LIB_SUFFIX}"
10702         fi
10703
10704 cat >>confdefs.h <<\EOF
10705 #define USE_WIDEC_SUPPORT 1
10706 EOF
10707
10708 cat >>confdefs.h <<\EOF
10709 #define NCURSES_WIDECHAR 1
10710 EOF
10711
10712 for ac_header in \
10713 wchar.h \
10714 wctype.h \
10715
10716 do
10717 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10718 echo "$as_me:10718: checking for $ac_header" >&5
10719 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10720 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10721   echo $ECHO_N "(cached) $ECHO_C" >&6
10722 else
10723   cat >conftest.$ac_ext <<_ACEOF
10724 #line 10724 "configure"
10725 #include "confdefs.h"
10726 #include <$ac_header>
10727 _ACEOF
10728 if { (eval echo "$as_me:10728: \"$ac_cpp conftest.$ac_ext\"") >&5
10729   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10730   ac_status=$?
10731   egrep -v '^ *\+' conftest.er1 >conftest.err
10732   rm -f conftest.er1
10733   cat conftest.err >&5
10734   echo "$as_me:10734: \$? = $ac_status" >&5
10735   (exit $ac_status); } >/dev/null; then
10736   if test -s conftest.err; then
10737     ac_cpp_err=$ac_c_preproc_warn_flag
10738   else
10739     ac_cpp_err=
10740   fi
10741 else
10742   ac_cpp_err=yes
10743 fi
10744 if test -z "$ac_cpp_err"; then
10745   eval "$as_ac_Header=yes"
10746 else
10747   echo "$as_me: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   eval "$as_ac_Header=no"
10750 fi
10751 rm -f conftest.err conftest.$ac_ext
10752 fi
10753 echo "$as_me:10753: result: `eval echo '${'$as_ac_Header'}'`" >&5
10754 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10755 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10756   cat >>confdefs.h <<EOF
10757 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10758 EOF
10759
10760 fi
10761 done
10762
10763 echo "$as_me:10763: checking if wchar.h can be used as is" >&5
10764 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
10765 if test "${cf_cv_wchar_h_okay+set}" = set; then
10766   echo $ECHO_N "(cached) $ECHO_C" >&6
10767 else
10768
10769 cat >conftest.$ac_ext <<_ACEOF
10770 #line 10770 "configure"
10771 #include "confdefs.h"
10772
10773 #include <stdlib.h>
10774 #ifdef HAVE_WCHAR_H
10775 #include <wchar.h>
10776 #endif
10777 #ifdef HAVE_WCTYPE_H
10778 #include <wctype.h>
10779 #endif
10780
10781 int
10782 main (void)
10783 {
10784
10785         wint_t foo = 0;
10786         int bar = iswpunct(foo)
10787   ;
10788   return 0;
10789 }
10790 _ACEOF
10791 rm -f conftest.$ac_objext
10792 if { (eval echo "$as_me:10792: \"$ac_compile\"") >&5
10793   (eval $ac_compile) 2>&5
10794   ac_status=$?
10795   echo "$as_me:10795: \$? = $ac_status" >&5
10796   (exit $ac_status); } &&
10797          { ac_try='test -s conftest.$ac_objext'
10798   { (eval echo "$as_me:10798: \"$ac_try\"") >&5
10799   (eval $ac_try) 2>&5
10800   ac_status=$?
10801   echo "$as_me:10801: \$? = $ac_status" >&5
10802   (exit $ac_status); }; }; then
10803   cf_cv_wchar_h_okay=yes
10804 else
10805   echo "$as_me: failed program was:" >&5
10806 cat conftest.$ac_ext >&5
10807 cf_cv_wchar_h_okay=no
10808 fi
10809 rm -f conftest.$ac_objext conftest.$ac_ext
10810 fi
10811 echo "$as_me:10811: result: $cf_cv_wchar_h_okay" >&5
10812 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
10813
10814 if test $cf_cv_wchar_h_okay = no
10815 then
10816
10817 echo "$as_me:10817: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
10818 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
10819 cat >conftest.$ac_ext <<_ACEOF
10820 #line 10820 "configure"
10821 #include "confdefs.h"
10822 #include <sys/types.h>
10823
10824 int
10825 main (void)
10826 {
10827
10828 #ifndef _XOPEN_SOURCE_EXTENDED
10829 make an error
10830 #endif
10831   ;
10832   return 0;
10833 }
10834 _ACEOF
10835 rm -f conftest.$ac_objext
10836 if { (eval echo "$as_me:10836: \"$ac_compile\"") >&5
10837   (eval $ac_compile) 2>&5
10838   ac_status=$?
10839   echo "$as_me:10839: \$? = $ac_status" >&5
10840   (exit $ac_status); } &&
10841          { ac_try='test -s conftest.$ac_objext'
10842   { (eval echo "$as_me:10842: \"$ac_try\"") >&5
10843   (eval $ac_try) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit $ac_status); }; }; then
10847   cf_result=no
10848 else
10849   echo "$as_me: failed program was:" >&5
10850 cat conftest.$ac_ext >&5
10851 cf_result=yes
10852 fi
10853 rm -f conftest.$ac_objext conftest.$ac_ext
10854 echo "$as_me:10854: result: $cf_result" >&5
10855 echo "${ECHO_T}$cf_result" >&6
10856
10857 if test "$cf_result" = yes ; then
10858         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
10859 elif test "x" != "x" ; then
10860         echo "$as_me:10860: checking checking for compatible value versus " >&5
10861 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
10862         cat >conftest.$ac_ext <<_ACEOF
10863 #line 10863 "configure"
10864 #include "confdefs.h"
10865 #include <sys/types.h>
10866
10867 int
10868 main (void)
10869 {
10870
10871 #if _XOPEN_SOURCE_EXTENDED- < 0
10872 make an error
10873 #endif
10874   ;
10875   return 0;
10876 }
10877 _ACEOF
10878 rm -f conftest.$ac_objext
10879 if { (eval echo "$as_me:10879: \"$ac_compile\"") >&5
10880   (eval $ac_compile) 2>&5
10881   ac_status=$?
10882   echo "$as_me:10882: \$? = $ac_status" >&5
10883   (exit $ac_status); } &&
10884          { ac_try='test -s conftest.$ac_objext'
10885   { (eval echo "$as_me:10885: \"$ac_try\"") >&5
10886   (eval $ac_try) 2>&5
10887   ac_status=$?
10888   echo "$as_me:10888: \$? = $ac_status" >&5
10889   (exit $ac_status); }; }; then
10890   cf_result=yes
10891 else
10892   echo "$as_me: failed program was:" >&5
10893 cat conftest.$ac_ext >&5
10894 cf_result=no
10895 fi
10896 rm -f conftest.$ac_objext conftest.$ac_ext
10897         echo "$as_me:10897: result: $cf_result" >&5
10898 echo "${ECHO_T}$cf_result" >&6
10899         if test "$cf_result" = no ; then
10900                 # perhaps we can override it - try...
10901                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
10902         fi
10903 fi
10904
10905 fi
10906
10907 echo "$as_me:10907: checking if wcwidth agrees graphics are single-width" >&5
10908 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
10909 if test "${cf_cv_wcwidth_graphics+set}" = set; then
10910   echo $ECHO_N "(cached) $ECHO_C" >&6
10911 else
10912
10913 cat >conftest.in <<CF_EOF
10914 -       VT100 symbols
10915 0x250c  upper left corner
10916 0x2514  lower left corner
10917 0x2510  upper right corner
10918 0x2518  lower right corner
10919 0x251c  tee pointing left
10920 0x2524  tee pointing right
10921 0x2534  tee pointing up
10922 0x252c  tee pointing down
10923 0x2500  horizontal line
10924 0x2502  vertical line
10925 0x253c  large plus or crossover
10926 0x23ba  scan line 1
10927 0x23bd  scan line 9
10928 0x25c6  diamond
10929 0x2592  checker board (stipple)
10930 0x00b0  degree symbol
10931 0x00b1  plus/minus
10932 0x00b7  bullet
10933 -       Teletype 5410v1 symbols
10934 0x2190  arrow pointing left
10935 0x2192  arrow pointing right
10936 0x2193  arrow pointing down
10937 0x2191  arrow pointing up
10938 0x2592  board of squares
10939 0x2603  lantern symbol
10940 0x25ae  solid square block
10941 -       these defaults were invented for ncurses
10942 0x23bb  scan line 3
10943 0x23bc  scan line 7
10944 0x2264  less-than-or-equal-to
10945 0x2265  greater-than-or-equal-to
10946 0x03c0  greek pi
10947 0x2260  not-equal
10948 0x00a3  pound-sterling symbol
10949 -       thick-line-drawing
10950 0x250f  upper left corner
10951 0x2517  lower left corner
10952 0x2513  upper right corner
10953 0x251b  lower right corner
10954 0x2523  tee pointing left
10955 0x252b  tee pointing right
10956 0x253b  tee pointing up
10957 0x2533  tee pointing down
10958 0x2501  horizontal line
10959 0x2503  vertical line
10960 0x254b  large plus or crossover
10961 -       double-line-drawing
10962 0x2554  upper left corner
10963 0x255a  lower left corner
10964 0x2557  upper right corner
10965 0x255d  lower right corner
10966 0x2563  tee pointing left
10967 0x2560  tee pointing right
10968 0x2569  tee pointing up
10969 0x2566  tee pointing down
10970 0x2550  horizontal line
10971 0x2551  vertical line
10972 0x256c  large plus or crossover
10973 CF_EOF
10974 if test "$cross_compiling" = yes; then
10975   cf_cv_wcwidth_graphics=unknown
10976 else
10977   cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10980
10981 #include <locale.h>
10982 #include <stdio.h>
10983 #include <wchar.h>
10984
10985 #define MY_LEN 80
10986
10987 int
10988 main(void)
10989 {
10990         FILE *fp;
10991         int value;
10992         char buffer[MY_LEN + 1];
10993         char notes[MY_LEN + 1];
10994         int totals = 0;
10995         int passed = 0;
10996
10997         if (setlocale(LC_ALL, "en_US.UTF8") ||
10998                 setlocale(LC_ALL, "en_US.UTF-8") ||
10999                 setlocale(LC_ALL, "en_US.utf8") ||
11000                 setlocale(LC_ALL, "en_US.utf-8")) {
11001                 if ((fp = fopen("conftest.in", "r")) != 0) {
11002                         while (fgets(buffer, MY_LEN, fp) != 0) {
11003                                 if (*buffer == '-') {
11004                                         fprintf(stderr, "\t%s", buffer);
11005                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
11006                                         ++totals;
11007                                         if (wcwidth(value) == 1)
11008                                                 ++passed;
11009                                         fprintf(stderr, "%d\t%s", wcwidth(value), buffer);
11010                                 } else {
11011                                         fprintf(stderr, "?\t%s", buffer);
11012                                 }
11013                         }
11014                 }
11015         }
11016         fprintf(stderr, "%d/%d passed wcwidth/graphics check\n", passed, totals);
11017         return (totals == passed) ? 0 : 1;
11018 }
11019
11020 _ACEOF
11021 rm -f conftest$ac_exeext
11022 if { (eval echo "$as_me:11022: \"$ac_link\"") >&5
11023   (eval $ac_link) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11027   { (eval echo "$as_me:11027: \"$ac_try\"") >&5
11028   (eval $ac_try) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit $ac_status); }; }; then
11032   cf_cv_wcwidth_graphics=yes
11033 else
11034   echo "$as_me: program exited with status $ac_status" >&5
11035 echo "$as_me: failed program was:" >&5
11036 cat conftest.$ac_ext >&5
11037 cf_cv_wcwidth_graphics=no
11038 fi
11039 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11040 fi
11041
11042 fi
11043 echo "$as_me:11043: result: $cf_cv_wcwidth_graphics" >&5
11044 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
11045
11046         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
11047
11048         # with_overwrite=no
11049         NCURSES_CH_T=cchar_t
11050
11051 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
11052 do
11053 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11054 echo "$as_me:11054: checking for $ac_func" >&5
11055 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11056 if eval "test \"\${$as_ac_var+set}\" = set"; then
11057   echo $ECHO_N "(cached) $ECHO_C" >&6
11058 else
11059   cat >conftest.$ac_ext <<_ACEOF
11060 #line 11060 "configure"
11061 #include "confdefs.h"
11062 #define $ac_func autoconf_temporary
11063 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
11064 #undef $ac_func
11065
11066 #ifdef __cplusplus
11067 extern "C"
11068 #endif
11069
11070 /* We use char because int might match the return type of a gcc2
11071    builtin and then its argument prototype would still apply.  */
11072 char $ac_func (void);
11073
11074 int
11075 main (void)
11076 {
11077
11078 /* The GNU C library defines stubs for functions which it implements
11079     to always fail with ENOSYS.  Some functions are actually named
11080     something starting with __ and the normal name is an alias.  */
11081 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11082 #error found stub for $ac_func
11083 #endif
11084
11085         return $ac_func ();
11086   ;
11087   return 0;
11088 }
11089 _ACEOF
11090 rm -f conftest.$ac_objext conftest$ac_exeext
11091 if { (eval echo "$as_me:11091: \"$ac_link\"") >&5
11092   (eval $ac_link) 2>&5
11093   ac_status=$?
11094   echo "$as_me:11094: \$? = $ac_status" >&5
11095   (exit $ac_status); } &&
11096          { ac_try='test -s conftest$ac_exeext'
11097   { (eval echo "$as_me:11097: \"$ac_try\"") >&5
11098   (eval $ac_try) 2>&5
11099   ac_status=$?
11100   echo "$as_me:11100: \$? = $ac_status" >&5
11101   (exit $ac_status); }; }; then
11102   eval "$as_ac_var=yes"
11103 else
11104   echo "$as_me: failed program was:" >&5
11105 cat conftest.$ac_ext >&5
11106 eval "$as_ac_var=no"
11107 fi
11108 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11109 fi
11110 echo "$as_me:11110: result: `eval echo '${'$as_ac_var'}'`" >&5
11111 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11112 if test `eval echo '${'$as_ac_var'}'` = yes; then
11113   cat >>confdefs.h <<EOF
11114 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11115 EOF
11116
11117 fi
11118 done
11119
11120         if test "x$ac_cv_func_putwc" != xyes ; then
11121
11122 echo "$as_me:11122: checking for multibyte character support" >&5
11123 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
11124 if test "${cf_cv_utf8_lib+set}" = set; then
11125   echo $ECHO_N "(cached) $ECHO_C" >&6
11126 else
11127
11128         cf_save_LIBS="$LIBS"
11129         cat >conftest.$ac_ext <<_ACEOF
11130 #line 11130 "configure"
11131 #include "confdefs.h"
11132
11133 #include <stdlib.h>
11134 int
11135 main (void)
11136 {
11137 putwc(0,0);
11138   ;
11139   return 0;
11140 }
11141 _ACEOF
11142 rm -f conftest.$ac_objext conftest$ac_exeext
11143 if { (eval echo "$as_me:11143: \"$ac_link\"") >&5
11144   (eval $ac_link) 2>&5
11145   ac_status=$?
11146   echo "$as_me:11146: \$? = $ac_status" >&5
11147   (exit $ac_status); } &&
11148          { ac_try='test -s conftest$ac_exeext'
11149   { (eval echo "$as_me:11149: \"$ac_try\"") >&5
11150   (eval $ac_try) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit $ac_status); }; }; then
11154   cf_cv_utf8_lib=yes
11155 else
11156   echo "$as_me: failed program was:" >&5
11157 cat conftest.$ac_ext >&5
11158
11159 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
11160 # will be set on completion of the AC_TRY_LINK below.
11161 cf_cv_header_path_utf8=
11162 cf_cv_library_path_utf8=
11163
11164 echo "${as_me:-configure}:11164: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
11165
11166 cf_save_LIBS="$LIBS"
11167
11168 cat >conftest.$ac_ext <<_ACEOF
11169 #line 11169 "configure"
11170 #include "confdefs.h"
11171
11172 #include <libutf8.h>
11173 int
11174 main (void)
11175 {
11176 putwc(0,0);
11177   ;
11178   return 0;
11179 }
11180 _ACEOF
11181 rm -f conftest.$ac_objext conftest$ac_exeext
11182 if { (eval echo "$as_me:11182: \"$ac_link\"") >&5
11183   (eval $ac_link) 2>&5
11184   ac_status=$?
11185   echo "$as_me:11185: \$? = $ac_status" >&5
11186   (exit $ac_status); } &&
11187          { ac_try='test -s conftest$ac_exeext'
11188   { (eval echo "$as_me:11188: \"$ac_try\"") >&5
11189   (eval $ac_try) 2>&5
11190   ac_status=$?
11191   echo "$as_me:11191: \$? = $ac_status" >&5
11192   (exit $ac_status); }; }; then
11193
11194         cf_cv_find_linkage_utf8=yes
11195         cf_cv_header_path_utf8=/usr/include
11196         cf_cv_library_path_utf8=/usr/lib
11197
11198 else
11199   echo "$as_me: failed program was:" >&5
11200 cat conftest.$ac_ext >&5
11201
11202 LIBS="-lutf8  $cf_save_LIBS"
11203
11204 cat >conftest.$ac_ext <<_ACEOF
11205 #line 11205 "configure"
11206 #include "confdefs.h"
11207
11208 #include <libutf8.h>
11209 int
11210 main (void)
11211 {
11212 putwc(0,0);
11213   ;
11214   return 0;
11215 }
11216 _ACEOF
11217 rm -f conftest.$ac_objext conftest$ac_exeext
11218 if { (eval echo "$as_me:11218: \"$ac_link\"") >&5
11219   (eval $ac_link) 2>&5
11220   ac_status=$?
11221   echo "$as_me:11221: \$? = $ac_status" >&5
11222   (exit $ac_status); } &&
11223          { ac_try='test -s conftest$ac_exeext'
11224   { (eval echo "$as_me:11224: \"$ac_try\"") >&5
11225   (eval $ac_try) 2>&5
11226   ac_status=$?
11227   echo "$as_me:11227: \$? = $ac_status" >&5
11228   (exit $ac_status); }; }; then
11229
11230         cf_cv_find_linkage_utf8=yes
11231         cf_cv_header_path_utf8=/usr/include
11232         cf_cv_library_path_utf8=/usr/lib
11233         cf_cv_library_file_utf8="-lutf8"
11234
11235 else
11236   echo "$as_me: failed program was:" >&5
11237 cat conftest.$ac_ext >&5
11238
11239         cf_cv_find_linkage_utf8=no
11240         LIBS="$cf_save_LIBS"
11241
11242         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
11243
11244 echo "${as_me:-configure}:11244: testing find linkage for utf8 library ..." 1>&5
11245
11246 echo "${as_me:-configure}:11246: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
11247
11248         cf_save_CPPFLAGS="$CPPFLAGS"
11249         cf_test_CPPFLAGS="$CPPFLAGS"
11250
11251 cf_search=
11252
11253 # collect the current set of include-directories from compiler flags
11254 cf_header_path_list=""
11255 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11256         for cf_header_path in $CPPFLAGS $CFLAGS
11257         do
11258                 case $cf_header_path in
11259                 (-I*)
11260                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11261
11262 test "x$cf_header_path" != "xNONE" && \
11263 test -d "$cf_header_path" && \
11264  {
11265         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
11266         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
11267         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
11268         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
11269         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
11270         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
11271 }
11272
11273                         cf_header_path_list="$cf_header_path_list $cf_search"
11274                         ;;
11275                 esac
11276         done
11277 fi
11278
11279 # add the variations for the package we are looking for
11280
11281 cf_search=
11282
11283 test "x$prefix" != "xNONE" && \
11284 test -d "$prefix" && \
11285  {
11286         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
11287         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
11288         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
11289         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
11290         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
11291         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
11292 }
11293
11294 for cf_subdir_prefix in \
11295         /usr \
11296         /usr/local \
11297         /usr/pkg \
11298         /opt \
11299         /opt/local \
11300         $HOME
11301 do
11302
11303 test "x$cf_subdir_prefix" != "x$prefix" && \
11304 test -d "$cf_subdir_prefix" && \
11305 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11306         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
11307         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
11308         test -d $cf_subdir_prefix/include/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
11309         test -d $cf_subdir_prefix/include/utf8/include &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
11310         test -d $cf_subdir_prefix/utf8/include &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
11311         test -d $cf_subdir_prefix/utf8/include/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
11312 }
11313
11314 done
11315
11316 test "$includedir" != NONE && \
11317 test "$includedir" != "/usr/include" && \
11318 test -d "$includedir" && {
11319         test -d $includedir &&    cf_search="$cf_search $includedir"
11320         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
11321 }
11322
11323 test "$oldincludedir" != NONE && \
11324 test "$oldincludedir" != "/usr/include" && \
11325 test -d "$oldincludedir" && {
11326         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
11327         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
11328 }
11329
11330 cf_search="$cf_search $cf_header_path_list"
11331
11332         for cf_cv_header_path_utf8 in $cf_search
11333         do
11334                 if test -d $cf_cv_header_path_utf8 ; then
11335                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
11336
11337 echo "${as_me:-configure}:11337: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
11338
11339                         CPPFLAGS="$cf_save_CPPFLAGS"
11340
11341         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11342         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
11343
11344                         cat >conftest.$ac_ext <<_ACEOF
11345 #line 11345 "configure"
11346 #include "confdefs.h"
11347
11348 #include <libutf8.h>
11349 int
11350 main (void)
11351 {
11352 putwc(0,0);
11353   ;
11354   return 0;
11355 }
11356 _ACEOF
11357 rm -f conftest.$ac_objext
11358 if { (eval echo "$as_me:11358: \"$ac_compile\"") >&5
11359   (eval $ac_compile) 2>&5
11360   ac_status=$?
11361   echo "$as_me:11361: \$? = $ac_status" >&5
11362   (exit $ac_status); } &&
11363          { ac_try='test -s conftest.$ac_objext'
11364   { (eval echo "$as_me:11364: \"$ac_try\"") >&5
11365   (eval $ac_try) 2>&5
11366   ac_status=$?
11367   echo "$as_me:11367: \$? = $ac_status" >&5
11368   (exit $ac_status); }; }; then
11369
11370                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
11371
11372 echo "${as_me:-configure}:11372: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
11373
11374                                 cf_cv_find_linkage_utf8=maybe
11375                                 cf_test_CPPFLAGS="$CPPFLAGS"
11376                                 break
11377 else
11378   echo "$as_me: failed program was:" >&5
11379 cat conftest.$ac_ext >&5
11380
11381                                 CPPFLAGS="$cf_save_CPPFLAGS"
11382
11383 fi
11384 rm -f conftest.$ac_objext conftest.$ac_ext
11385                 fi
11386         done
11387
11388         if test "$cf_cv_find_linkage_utf8" = maybe ; then
11389
11390 echo "${as_me:-configure}:11390: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
11391
11392                 cf_save_LIBS="$LIBS"
11393                 cf_save_LDFLAGS="$LDFLAGS"
11394
11395                 if test "$cf_cv_find_linkage_utf8" != yes ; then
11396
11397 cf_search=
11398 cf_library_path_list=""
11399 if test -n "${LDFLAGS}${LIBS}" ; then
11400         for cf_library_path in $LDFLAGS $LIBS
11401         do
11402                 case $cf_library_path in
11403                 (-L*)
11404                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
11405
11406 test "x$cf_library_path" != "xNONE" && \
11407 test -d "$cf_library_path" && \
11408  {
11409         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
11410         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
11411         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
11412         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
11413         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
11414         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
11415 }
11416
11417                         cf_library_path_list="$cf_library_path_list $cf_search"
11418                         ;;
11419                 esac
11420         done
11421 fi
11422
11423 cf_search=
11424
11425 test "x$prefix" != "xNONE" && \
11426 test -d "$prefix" && \
11427  {
11428         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
11429         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
11430         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
11431         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
11432         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
11433         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
11434 }
11435
11436 for cf_subdir_prefix in \
11437         /usr \
11438         /usr/local \
11439         /usr/pkg \
11440         /opt \
11441         /opt/local \
11442         $HOME
11443 do
11444
11445 test "x$cf_subdir_prefix" != "x$prefix" && \
11446 test -d "$cf_subdir_prefix" && \
11447 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
11448         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
11449         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
11450         test -d $cf_subdir_prefix/lib/utf8 &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
11451         test -d $cf_subdir_prefix/lib/utf8/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
11452         test -d $cf_subdir_prefix/utf8/lib &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
11453         test -d $cf_subdir_prefix/utf8/lib/utf8 &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
11454 }
11455
11456 done
11457
11458 cf_search="$cf_library_path_list $cf_search"
11459
11460                         for cf_cv_library_path_utf8 in $cf_search
11461                         do
11462                                 if test -d $cf_cv_library_path_utf8 ; then
11463                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
11464
11465 echo "${as_me:-configure}:11465: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
11466
11467                                         CPPFLAGS="$cf_test_CPPFLAGS"
11468                                         LIBS="-lutf8  $cf_save_LIBS"
11469                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
11470                                         cat >conftest.$ac_ext <<_ACEOF
11471 #line 11471 "configure"
11472 #include "confdefs.h"
11473
11474 #include <libutf8.h>
11475 int
11476 main (void)
11477 {
11478 putwc(0,0);
11479   ;
11480   return 0;
11481 }
11482 _ACEOF
11483 rm -f conftest.$ac_objext conftest$ac_exeext
11484 if { (eval echo "$as_me:11484: \"$ac_link\"") >&5
11485   (eval $ac_link) 2>&5
11486   ac_status=$?
11487   echo "$as_me:11487: \$? = $ac_status" >&5
11488   (exit $ac_status); } &&
11489          { ac_try='test -s conftest$ac_exeext'
11490   { (eval echo "$as_me:11490: \"$ac_try\"") >&5
11491   (eval $ac_try) 2>&5
11492   ac_status=$?
11493   echo "$as_me:11493: \$? = $ac_status" >&5
11494   (exit $ac_status); }; }; then
11495
11496                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
11497
11498 echo "${as_me:-configure}:11498: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
11499
11500                                         cf_cv_find_linkage_utf8=yes
11501                                         cf_cv_library_file_utf8="-lutf8"
11502                                         break
11503 else
11504   echo "$as_me: failed program was:" >&5
11505 cat conftest.$ac_ext >&5
11506
11507                                         CPPFLAGS="$cf_save_CPPFLAGS"
11508                                         LIBS="$cf_save_LIBS"
11509                                         LDFLAGS="$cf_save_LDFLAGS"
11510
11511 fi
11512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11513                                 fi
11514                         done
11515                         CPPFLAGS="$cf_save_CPPFLAGS"
11516                         LDFLAGS="$cf_save_LDFLAGS"
11517                 fi
11518
11519         else
11520                 cf_cv_find_linkage_utf8=no
11521         fi
11522
11523 fi
11524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11525
11526 fi
11527 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11528
11529 LIBS="$cf_save_LIBS"
11530
11531 if test "$cf_cv_find_linkage_utf8" = yes ; then
11532 cf_cv_utf8_lib=add-on
11533 else
11534 cf_cv_utf8_lib=no
11535 fi
11536
11537 fi
11538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11539 fi
11540 echo "$as_me:11540: result: $cf_cv_utf8_lib" >&5
11541 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
11542
11543 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
11544 # ncurses/ncursesw:
11545 if test "$cf_cv_utf8_lib" = "add-on" ; then
11546
11547 cat >>confdefs.h <<\EOF
11548 #define HAVE_LIBUTF8_H 1
11549 EOF
11550
11551 if test -n "$cf_cv_header_path_utf8" ; then
11552   for cf_add_incdir in $cf_cv_header_path_utf8
11553   do
11554         while test $cf_add_incdir != /usr/include
11555         do
11556           if test -d $cf_add_incdir
11557           then
11558                 cf_have_incdir=no
11559                 if test -n "$CFLAGS$CPPFLAGS" ; then
11560                   # a loop is needed to ensure we can add subdirs of existing dirs
11561                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11562                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11563                           cf_have_incdir=yes; break
11564                         fi
11565                   done
11566                 fi
11567
11568                 if test "$cf_have_incdir" = no ; then
11569                   if test "$cf_add_incdir" = /usr/local/include ; then
11570                         if test "$GCC" = yes
11571                         then
11572                           cf_save_CPPFLAGS=$CPPFLAGS
11573
11574         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11575         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11576
11577                           cat >conftest.$ac_ext <<_ACEOF
11578 #line 11578 "configure"
11579 #include "confdefs.h"
11580 #include <stdio.h>
11581 int
11582 main (void)
11583 {
11584 printf("Hello")
11585   ;
11586   return 0;
11587 }
11588 _ACEOF
11589 rm -f conftest.$ac_objext
11590 if { (eval echo "$as_me:11590: \"$ac_compile\"") >&5
11591   (eval $ac_compile) 2>&5
11592   ac_status=$?
11593   echo "$as_me:11593: \$? = $ac_status" >&5
11594   (exit $ac_status); } &&
11595          { ac_try='test -s conftest.$ac_objext'
11596   { (eval echo "$as_me:11596: \"$ac_try\"") >&5
11597   (eval $ac_try) 2>&5
11598   ac_status=$?
11599   echo "$as_me:11599: \$? = $ac_status" >&5
11600   (exit $ac_status); }; }; then
11601   :
11602 else
11603   echo "$as_me: failed program was:" >&5
11604 cat conftest.$ac_ext >&5
11605 cf_have_incdir=yes
11606 fi
11607 rm -f conftest.$ac_objext conftest.$ac_ext
11608                           CPPFLAGS=$cf_save_CPPFLAGS
11609                         fi
11610                   fi
11611                 fi
11612
11613                 if test "$cf_have_incdir" = no ; then
11614                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
11615
11616 echo "${as_me:-configure}:11616: testing adding $cf_add_incdir to include-path ..." 1>&5
11617
11618                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11619
11620                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11621                   test "$cf_top_incdir" = "$cf_add_incdir" && break
11622                   cf_add_incdir="$cf_top_incdir"
11623                 else
11624                   break
11625                 fi
11626           else
11627                 break
11628           fi
11629         done
11630   done
11631 fi
11632
11633 if test -n "$cf_cv_library_path_utf8" ; then
11634         for cf_add_libdir in $cf_cv_library_path_utf8
11635         do
11636                 if test $cf_add_libdir = /usr/lib ; then
11637                         :
11638                 elif test -d $cf_add_libdir
11639                 then
11640                         cf_have_libdir=no
11641                         if test -n "$LDFLAGS$LIBS" ; then
11642                                 # a loop is needed to ensure we can add subdirs of existing dirs
11643                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
11644                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11645                                                 cf_have_libdir=yes; break
11646                                         fi
11647                                 done
11648                         fi
11649                         if test "$cf_have_libdir" = no ; then
11650                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
11651
11652 echo "${as_me:-configure}:11652: testing adding $cf_add_libdir to library-path ..." 1>&5
11653
11654                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11655                         fi
11656                 fi
11657         done
11658 fi
11659
11660 cf_add_libs="$cf_cv_library_file_utf8"
11661 # Filter out duplicates - this happens with badly-designed ".pc" files...
11662 for cf_add_1lib in $LIBS
11663 do
11664         for cf_add_2lib in $cf_add_libs
11665         do
11666                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11667                 then
11668                         cf_add_1lib=
11669                         break
11670                 fi
11671         done
11672         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11673 done
11674 LIBS="$cf_add_libs"
11675
11676 fi
11677
11678                 if test "$cf_cv_utf8_lib" != no ; then
11679                         NCURSES_LIBUTF8=1
11680                 fi
11681         fi
11682
11683 # This is needed on Tru64 5.0 to declare mbstate_t
11684 echo "$as_me:11684: checking if we must include wchar.h to declare mbstate_t" >&5
11685 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
11686 if test "${cf_cv_mbstate_t+set}" = set; then
11687   echo $ECHO_N "(cached) $ECHO_C" >&6
11688 else
11689
11690 cat >conftest.$ac_ext <<_ACEOF
11691 #line 11691 "configure"
11692 #include "confdefs.h"
11693
11694 #include <stdlib.h>
11695 #include <stdarg.h>
11696 #include <stdio.h>
11697 #ifdef HAVE_LIBUTF8_H
11698 #include <libutf8.h>
11699 #endif
11700 int
11701 main (void)
11702 {
11703 mbstate_t state
11704   ;
11705   return 0;
11706 }
11707 _ACEOF
11708 rm -f conftest.$ac_objext
11709 if { (eval echo "$as_me:11709: \"$ac_compile\"") >&5
11710   (eval $ac_compile) 2>&5
11711   ac_status=$?
11712   echo "$as_me:11712: \$? = $ac_status" >&5
11713   (exit $ac_status); } &&
11714          { ac_try='test -s conftest.$ac_objext'
11715   { (eval echo "$as_me:11715: \"$ac_try\"") >&5
11716   (eval $ac_try) 2>&5
11717   ac_status=$?
11718   echo "$as_me:11718: \$? = $ac_status" >&5
11719   (exit $ac_status); }; }; then
11720   cf_cv_mbstate_t=no
11721 else
11722   echo "$as_me: failed program was:" >&5
11723 cat conftest.$ac_ext >&5
11724 cat >conftest.$ac_ext <<_ACEOF
11725 #line 11725 "configure"
11726 #include "confdefs.h"
11727
11728 #include <stdlib.h>
11729 #include <stdarg.h>
11730 #include <stdio.h>
11731 #include <wchar.h>
11732 #ifdef HAVE_LIBUTF8_H
11733 #include <libutf8.h>
11734 #endif
11735 int
11736 main (void)
11737 {
11738 mbstate_t value
11739   ;
11740   return 0;
11741 }
11742 _ACEOF
11743 rm -f conftest.$ac_objext
11744 if { (eval echo "$as_me:11744: \"$ac_compile\"") >&5
11745   (eval $ac_compile) 2>&5
11746   ac_status=$?
11747   echo "$as_me:11747: \$? = $ac_status" >&5
11748   (exit $ac_status); } &&
11749          { ac_try='test -s conftest.$ac_objext'
11750   { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751   (eval $ac_try) 2>&5
11752   ac_status=$?
11753   echo "$as_me:11753: \$? = $ac_status" >&5
11754   (exit $ac_status); }; }; then
11755   cf_cv_mbstate_t=yes
11756 else
11757   echo "$as_me: failed program was:" >&5
11758 cat conftest.$ac_ext >&5
11759 cf_cv_mbstate_t=unknown
11760 fi
11761 rm -f conftest.$ac_objext conftest.$ac_ext
11762 fi
11763 rm -f conftest.$ac_objext conftest.$ac_ext
11764 fi
11765 echo "$as_me:11765: result: $cf_cv_mbstate_t" >&5
11766 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
11767
11768 if test "$cf_cv_mbstate_t" = yes ; then
11769
11770 cat >>confdefs.h <<\EOF
11771 #define NEED_WCHAR_H 1
11772 EOF
11773
11774         NEED_WCHAR_H=1
11775 fi
11776
11777 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
11778 if test "$cf_cv_mbstate_t" = unknown ; then
11779         NCURSES_MBSTATE_T=1
11780 fi
11781
11782 # This is needed on Tru64 5.0 to declare wchar_t
11783 echo "$as_me:11783: checking if we must include wchar.h to declare wchar_t" >&5
11784 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
11785 if test "${cf_cv_wchar_t+set}" = set; then
11786   echo $ECHO_N "(cached) $ECHO_C" >&6
11787 else
11788
11789 cat >conftest.$ac_ext <<_ACEOF
11790 #line 11790 "configure"
11791 #include "confdefs.h"
11792
11793 #include <stdlib.h>
11794 #include <stdarg.h>
11795 #include <stdio.h>
11796 #ifdef HAVE_LIBUTF8_H
11797 #include <libutf8.h>
11798 #endif
11799 int
11800 main (void)
11801 {
11802 wchar_t state
11803   ;
11804   return 0;
11805 }
11806 _ACEOF
11807 rm -f conftest.$ac_objext
11808 if { (eval echo "$as_me:11808: \"$ac_compile\"") >&5
11809   (eval $ac_compile) 2>&5
11810   ac_status=$?
11811   echo "$as_me:11811: \$? = $ac_status" >&5
11812   (exit $ac_status); } &&
11813          { ac_try='test -s conftest.$ac_objext'
11814   { (eval echo "$as_me:11814: \"$ac_try\"") >&5
11815   (eval $ac_try) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit $ac_status); }; }; then
11819   cf_cv_wchar_t=no
11820 else
11821   echo "$as_me: failed program was:" >&5
11822 cat conftest.$ac_ext >&5
11823 cat >conftest.$ac_ext <<_ACEOF
11824 #line 11824 "configure"
11825 #include "confdefs.h"
11826
11827 #include <stdlib.h>
11828 #include <stdarg.h>
11829 #include <stdio.h>
11830 #include <wchar.h>
11831 #ifdef HAVE_LIBUTF8_H
11832 #include <libutf8.h>
11833 #endif
11834 int
11835 main (void)
11836 {
11837 wchar_t value
11838   ;
11839   return 0;
11840 }
11841 _ACEOF
11842 rm -f conftest.$ac_objext
11843 if { (eval echo "$as_me:11843: \"$ac_compile\"") >&5
11844   (eval $ac_compile) 2>&5
11845   ac_status=$?
11846   echo "$as_me:11846: \$? = $ac_status" >&5
11847   (exit $ac_status); } &&
11848          { ac_try='test -s conftest.$ac_objext'
11849   { (eval echo "$as_me:11849: \"$ac_try\"") >&5
11850   (eval $ac_try) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit $ac_status); }; }; then
11854   cf_cv_wchar_t=yes
11855 else
11856   echo "$as_me: failed program was:" >&5
11857 cat conftest.$ac_ext >&5
11858 cf_cv_wchar_t=unknown
11859 fi
11860 rm -f conftest.$ac_objext conftest.$ac_ext
11861 fi
11862 rm -f conftest.$ac_objext conftest.$ac_ext
11863 fi
11864 echo "$as_me:11864: result: $cf_cv_wchar_t" >&5
11865 echo "${ECHO_T}$cf_cv_wchar_t" >&6
11866
11867 if test "$cf_cv_wchar_t" = yes ; then
11868
11869 cat >>confdefs.h <<\EOF
11870 #define NEED_WCHAR_H 1
11871 EOF
11872
11873         NEED_WCHAR_H=1
11874 fi
11875
11876 # if we do not find wchar_t in either place, use substitution to provide a fallback.
11877 if test "$cf_cv_wchar_t" = unknown ; then
11878         NCURSES_WCHAR_T=1
11879 fi
11880
11881 # if we find wchar_t in either place, use substitution to provide a fallback.
11882 if test "$cf_cv_wchar_t" != unknown ; then
11883         NCURSES_OK_WCHAR_T=1
11884 fi
11885
11886 # This is needed on Tru64 5.0 to declare wint_t
11887 echo "$as_me:11887: checking if we must include wchar.h to declare wint_t" >&5
11888 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
11889 if test "${cf_cv_wint_t+set}" = set; then
11890   echo $ECHO_N "(cached) $ECHO_C" >&6
11891 else
11892
11893 cat >conftest.$ac_ext <<_ACEOF
11894 #line 11894 "configure"
11895 #include "confdefs.h"
11896
11897 #include <stdlib.h>
11898 #include <stdarg.h>
11899 #include <stdio.h>
11900 #ifdef HAVE_LIBUTF8_H
11901 #include <libutf8.h>
11902 #endif
11903 int
11904 main (void)
11905 {
11906 wint_t state
11907   ;
11908   return 0;
11909 }
11910 _ACEOF
11911 rm -f conftest.$ac_objext
11912 if { (eval echo "$as_me:11912: \"$ac_compile\"") >&5
11913   (eval $ac_compile) 2>&5
11914   ac_status=$?
11915   echo "$as_me:11915: \$? = $ac_status" >&5
11916   (exit $ac_status); } &&
11917          { ac_try='test -s conftest.$ac_objext'
11918   { (eval echo "$as_me:11918: \"$ac_try\"") >&5
11919   (eval $ac_try) 2>&5
11920   ac_status=$?
11921   echo "$as_me:11921: \$? = $ac_status" >&5
11922   (exit $ac_status); }; }; then
11923   cf_cv_wint_t=no
11924 else
11925   echo "$as_me: failed program was:" >&5
11926 cat conftest.$ac_ext >&5
11927 cat >conftest.$ac_ext <<_ACEOF
11928 #line 11928 "configure"
11929 #include "confdefs.h"
11930
11931 #include <stdlib.h>
11932 #include <stdarg.h>
11933 #include <stdio.h>
11934 #include <wchar.h>
11935 #ifdef HAVE_LIBUTF8_H
11936 #include <libutf8.h>
11937 #endif
11938 int
11939 main (void)
11940 {
11941 wint_t value
11942   ;
11943   return 0;
11944 }
11945 _ACEOF
11946 rm -f conftest.$ac_objext
11947 if { (eval echo "$as_me:11947: \"$ac_compile\"") >&5
11948   (eval $ac_compile) 2>&5
11949   ac_status=$?
11950   echo "$as_me:11950: \$? = $ac_status" >&5
11951   (exit $ac_status); } &&
11952          { ac_try='test -s conftest.$ac_objext'
11953   { (eval echo "$as_me:11953: \"$ac_try\"") >&5
11954   (eval $ac_try) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit $ac_status); }; }; then
11958   cf_cv_wint_t=yes
11959 else
11960   echo "$as_me: failed program was:" >&5
11961 cat conftest.$ac_ext >&5
11962 cf_cv_wint_t=unknown
11963 fi
11964 rm -f conftest.$ac_objext conftest.$ac_ext
11965 fi
11966 rm -f conftest.$ac_objext conftest.$ac_ext
11967 fi
11968 echo "$as_me:11968: result: $cf_cv_wint_t" >&5
11969 echo "${ECHO_T}$cf_cv_wint_t" >&6
11970
11971 if test "$cf_cv_wint_t" = yes ; then
11972
11973 cat >>confdefs.h <<\EOF
11974 #define NEED_WCHAR_H 1
11975 EOF
11976
11977         NEED_WCHAR_H=1
11978 fi
11979
11980 # if we do not find wint_t in either place, use substitution to provide a fallback.
11981 if test "$cf_cv_wint_t" = unknown ; then
11982         NCURSES_WINT_T=1
11983 fi
11984
11985 # if we find wint_t in either place, use substitution to provide a fallback.
11986 if test "$cf_cv_wint_t" != unknown ; then
11987         NCURSES_OK_WINT_T=1
11988 fi
11989
11990         if test "$NCURSES_MBSTATE_T" != 0; then
11991
11992 cat >>confdefs.h <<\EOF
11993 #define NEED_MBSTATE_T_DEF 1
11994 EOF
11995
11996         fi
11997 fi
11998
11999 ###   use option --disable-lp64 to allow long chtype
12000 echo "$as_me:12000: checking whether to enable _LP64 definition in curses.h" >&5
12001 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
12002
12003 # Check whether --enable-lp64 or --disable-lp64 was given.
12004 if test "${enable_lp64+set}" = set; then
12005   enableval="$enable_lp64"
12006   with_lp64=$enableval
12007 else
12008   with_lp64=$cf_dft_with_lp64
12009 fi;
12010 echo "$as_me:12010: result: $with_lp64" >&5
12011 echo "${ECHO_T}$with_lp64" >&6
12012
12013 if test "x$with_lp64" = xyes ; then
12014         cf_cv_enable_lp64=1
12015 else
12016         cf_cv_enable_lp64=0
12017 fi
12018
12019 # Check whether --enable-largefile or --disable-largefile was given.
12020 if test "${enable_largefile+set}" = set; then
12021   enableval="$enable_largefile"
12022
12023 fi;
12024 if test "$enable_largefile" != no; then
12025
12026   echo "$as_me:12026: checking for special C compiler options needed for large files" >&5
12027 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
12028 if test "${ac_cv_sys_largefile_CC+set}" = set; then
12029   echo $ECHO_N "(cached) $ECHO_C" >&6
12030 else
12031   ac_cv_sys_largefile_CC=no
12032      if test "$GCC" != yes; then
12033        ac_save_CC=$CC
12034        while :; do
12035          # IRIX 6.2 and later do not support large files by default,
12036          # so use the C compiler's -n32 option if that helps.
12037          cat >conftest.$ac_ext <<_ACEOF
12038 #line 12038 "configure"
12039 #include "confdefs.h"
12040 #include <sys/types.h>
12041  /* Check that off_t can represent 2**63 - 1 correctly.
12042     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12043     since some C++ compilers masquerading as C compilers
12044     incorrectly reject 9223372036854775807.  */
12045 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12046   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12047                        && LARGE_OFF_T % 2147483647 == 1)
12048                       ? 1 : -1];
12049 int
12050 main (void)
12051 {
12052
12053   ;
12054   return 0;
12055 }
12056 _ACEOF
12057          rm -f conftest.$ac_objext
12058 if { (eval echo "$as_me:12058: \"$ac_compile\"") >&5
12059   (eval $ac_compile) 2>&5
12060   ac_status=$?
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); } &&
12063          { ac_try='test -s conftest.$ac_objext'
12064   { (eval echo "$as_me:12064: \"$ac_try\"") >&5
12065   (eval $ac_try) 2>&5
12066   ac_status=$?
12067   echo "$as_me:12067: \$? = $ac_status" >&5
12068   (exit $ac_status); }; }; then
12069   break
12070 else
12071   echo "$as_me: failed program was:" >&5
12072 cat conftest.$ac_ext >&5
12073 fi
12074 rm -f conftest.$ac_objext
12075          CC="$CC -n32"
12076          rm -f conftest.$ac_objext
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078   (eval $ac_compile) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit $ac_status); } &&
12082          { ac_try='test -s conftest.$ac_objext'
12083   { (eval echo "$as_me:12083: \"$ac_try\"") >&5
12084   (eval $ac_try) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit $ac_status); }; }; then
12088   ac_cv_sys_largefile_CC=' -n32'; break
12089 else
12090   echo "$as_me: failed program was:" >&5
12091 cat conftest.$ac_ext >&5
12092 fi
12093 rm -f conftest.$ac_objext
12094          break
12095        done
12096        CC=$ac_save_CC
12097        rm -f conftest.$ac_ext
12098     fi
12099 fi
12100 echo "$as_me:12100: result: $ac_cv_sys_largefile_CC" >&5
12101 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
12102   if test "$ac_cv_sys_largefile_CC" != no; then
12103     CC=$CC$ac_cv_sys_largefile_CC
12104   fi
12105
12106   echo "$as_me:12106: checking for _FILE_OFFSET_BITS value needed for large files" >&5
12107 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
12108 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111   while :; do
12112   ac_cv_sys_file_offset_bits=no
12113   cat >conftest.$ac_ext <<_ACEOF
12114 #line 12114 "configure"
12115 #include "confdefs.h"
12116 #include <sys/types.h>
12117  /* Check that off_t can represent 2**63 - 1 correctly.
12118     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12119     since some C++ compilers masquerading as C compilers
12120     incorrectly reject 9223372036854775807.  */
12121 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12122   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12123                        && LARGE_OFF_T % 2147483647 == 1)
12124                       ? 1 : -1];
12125 int
12126 main (void)
12127 {
12128
12129   ;
12130   return 0;
12131 }
12132 _ACEOF
12133 rm -f conftest.$ac_objext
12134 if { (eval echo "$as_me:12134: \"$ac_compile\"") >&5
12135   (eval $ac_compile) 2>&5
12136   ac_status=$?
12137   echo "$as_me:12137: \$? = $ac_status" >&5
12138   (exit $ac_status); } &&
12139          { ac_try='test -s conftest.$ac_objext'
12140   { (eval echo "$as_me:12140: \"$ac_try\"") >&5
12141   (eval $ac_try) 2>&5
12142   ac_status=$?
12143   echo "$as_me:12143: \$? = $ac_status" >&5
12144   (exit $ac_status); }; }; then
12145   break
12146 else
12147   echo "$as_me: failed program was:" >&5
12148 cat conftest.$ac_ext >&5
12149 fi
12150 rm -f conftest.$ac_objext conftest.$ac_ext
12151   cat >conftest.$ac_ext <<_ACEOF
12152 #line 12152 "configure"
12153 #include "confdefs.h"
12154 #define _FILE_OFFSET_BITS 64
12155 #include <sys/types.h>
12156  /* Check that off_t can represent 2**63 - 1 correctly.
12157     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12158     since some C++ compilers masquerading as C compilers
12159     incorrectly reject 9223372036854775807.  */
12160 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12161   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12162                        && LARGE_OFF_T % 2147483647 == 1)
12163                       ? 1 : -1];
12164 int
12165 main (void)
12166 {
12167
12168   ;
12169   return 0;
12170 }
12171 _ACEOF
12172 rm -f conftest.$ac_objext
12173 if { (eval echo "$as_me:12173: \"$ac_compile\"") >&5
12174   (eval $ac_compile) 2>&5
12175   ac_status=$?
12176   echo "$as_me:12176: \$? = $ac_status" >&5
12177   (exit $ac_status); } &&
12178          { ac_try='test -s conftest.$ac_objext'
12179   { (eval echo "$as_me:12179: \"$ac_try\"") >&5
12180   (eval $ac_try) 2>&5
12181   ac_status=$?
12182   echo "$as_me:12182: \$? = $ac_status" >&5
12183   (exit $ac_status); }; }; then
12184   ac_cv_sys_file_offset_bits=64; break
12185 else
12186   echo "$as_me: failed program was:" >&5
12187 cat conftest.$ac_ext >&5
12188 fi
12189 rm -f conftest.$ac_objext conftest.$ac_ext
12190   break
12191 done
12192 fi
12193 echo "$as_me:12193: result: $ac_cv_sys_file_offset_bits" >&5
12194 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
12195 if test "$ac_cv_sys_file_offset_bits" != no; then
12196
12197 cat >>confdefs.h <<EOF
12198 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
12199 EOF
12200
12201 fi
12202 rm -rf conftest*
12203   echo "$as_me:12203: checking for _LARGE_FILES value needed for large files" >&5
12204 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
12205 if test "${ac_cv_sys_large_files+set}" = set; then
12206   echo $ECHO_N "(cached) $ECHO_C" >&6
12207 else
12208   while :; do
12209   ac_cv_sys_large_files=no
12210   cat >conftest.$ac_ext <<_ACEOF
12211 #line 12211 "configure"
12212 #include "confdefs.h"
12213 #include <sys/types.h>
12214  /* Check that off_t can represent 2**63 - 1 correctly.
12215     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12216     since some C++ compilers masquerading as C compilers
12217     incorrectly reject 9223372036854775807.  */
12218 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12219   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12220                        && LARGE_OFF_T % 2147483647 == 1)
12221                       ? 1 : -1];
12222 int
12223 main (void)
12224 {
12225
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   break
12243 else
12244   echo "$as_me: failed program was:" >&5
12245 cat conftest.$ac_ext >&5
12246 fi
12247 rm -f conftest.$ac_objext conftest.$ac_ext
12248   cat >conftest.$ac_ext <<_ACEOF
12249 #line 12249 "configure"
12250 #include "confdefs.h"
12251 #define _LARGE_FILES 1
12252 #include <sys/types.h>
12253  /* Check that off_t can represent 2**63 - 1 correctly.
12254     We can't simply define LARGE_OFF_T to be 9223372036854775807,
12255     since some C++ compilers masquerading as C compilers
12256     incorrectly reject 9223372036854775807.  */
12257 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
12258   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
12259                        && LARGE_OFF_T % 2147483647 == 1)
12260                       ? 1 : -1];
12261 int
12262 main (void)
12263 {
12264
12265   ;
12266   return 0;
12267 }
12268 _ACEOF
12269 rm -f conftest.$ac_objext
12270 if { (eval echo "$as_me:12270: \"$ac_compile\"") >&5
12271   (eval $ac_compile) 2>&5
12272   ac_status=$?
12273   echo "$as_me:12273: \$? = $ac_status" >&5
12274   (exit $ac_status); } &&
12275          { ac_try='test -s conftest.$ac_objext'
12276   { (eval echo "$as_me:12276: \"$ac_try\"") >&5
12277   (eval $ac_try) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); }; }; then
12281   ac_cv_sys_large_files=1; break
12282 else
12283   echo "$as_me: failed program was:" >&5
12284 cat conftest.$ac_ext >&5
12285 fi
12286 rm -f conftest.$ac_objext conftest.$ac_ext
12287   break
12288 done
12289 fi
12290 echo "$as_me:12290: result: $ac_cv_sys_large_files" >&5
12291 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
12292 if test "$ac_cv_sys_large_files" != no; then
12293
12294 cat >>confdefs.h <<EOF
12295 #define _LARGE_FILES $ac_cv_sys_large_files
12296 EOF
12297
12298 fi
12299 rm -rf conftest*
12300 fi
12301
12302         if test "$enable_largefile" != no ; then
12303         echo "$as_me:12303: checking for _LARGEFILE_SOURCE value needed for large files" >&5
12304 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
12305 if test "${ac_cv_sys_largefile_source+set}" = set; then
12306   echo $ECHO_N "(cached) $ECHO_C" >&6
12307 else
12308   while :; do
12309   ac_cv_sys_largefile_source=no
12310   cat >conftest.$ac_ext <<_ACEOF
12311 #line 12311 "configure"
12312 #include "confdefs.h"
12313 #include <stdio.h>
12314 int
12315 main (void)
12316 {
12317 return !fseeko;
12318   ;
12319   return 0;
12320 }
12321 _ACEOF
12322 rm -f conftest.$ac_objext
12323 if { (eval echo "$as_me:12323: \"$ac_compile\"") >&5
12324   (eval $ac_compile) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit $ac_status); } &&
12328          { ac_try='test -s conftest.$ac_objext'
12329   { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330   (eval $ac_try) 2>&5
12331   ac_status=$?
12332   echo "$as_me:12332: \$? = $ac_status" >&5
12333   (exit $ac_status); }; }; then
12334   break
12335 else
12336   echo "$as_me: failed program was:" >&5
12337 cat conftest.$ac_ext >&5
12338 fi
12339 rm -f conftest.$ac_objext conftest.$ac_ext
12340   cat >conftest.$ac_ext <<_ACEOF
12341 #line 12341 "configure"
12342 #include "confdefs.h"
12343 #define _LARGEFILE_SOURCE 1
12344 #include <stdio.h>
12345 int
12346 main (void)
12347 {
12348 return !fseeko;
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext
12354 if { (eval echo "$as_me:12354: \"$ac_compile\"") >&5
12355   (eval $ac_compile) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -s conftest.$ac_objext'
12360   { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361   (eval $ac_try) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); }; }; then
12365   ac_cv_sys_largefile_source=1; break
12366 else
12367   echo "$as_me: failed program was:" >&5
12368 cat conftest.$ac_ext >&5
12369 fi
12370 rm -f conftest.$ac_objext conftest.$ac_ext
12371   break
12372 done
12373 fi
12374 echo "$as_me:12374: result: $ac_cv_sys_largefile_source" >&5
12375 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
12376 if test "$ac_cv_sys_largefile_source" != no; then
12377
12378 cat >>confdefs.h <<EOF
12379 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
12380 EOF
12381
12382 fi
12383 rm -rf conftest*
12384
12385 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
12386 # in glibc 2.1.3, but that breaks too many other things.
12387 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
12388 echo "$as_me:12388: checking for fseeko" >&5
12389 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
12390 if test "${ac_cv_func_fseeko+set}" = set; then
12391   echo $ECHO_N "(cached) $ECHO_C" >&6
12392 else
12393   cat >conftest.$ac_ext <<_ACEOF
12394 #line 12394 "configure"
12395 #include "confdefs.h"
12396 #include <stdio.h>
12397 int
12398 main (void)
12399 {
12400 return fseeko && fseeko (stdin, 0, 0);
12401   ;
12402   return 0;
12403 }
12404 _ACEOF
12405 rm -f conftest.$ac_objext conftest$ac_exeext
12406 if { (eval echo "$as_me:12406: \"$ac_link\"") >&5
12407   (eval $ac_link) 2>&5
12408   ac_status=$?
12409   echo "$as_me:12409: \$? = $ac_status" >&5
12410   (exit $ac_status); } &&
12411          { ac_try='test -s conftest$ac_exeext'
12412   { (eval echo "$as_me:12412: \"$ac_try\"") >&5
12413   (eval $ac_try) 2>&5
12414   ac_status=$?
12415   echo "$as_me:12415: \$? = $ac_status" >&5
12416   (exit $ac_status); }; }; then
12417   ac_cv_func_fseeko=yes
12418 else
12419   echo "$as_me: failed program was:" >&5
12420 cat conftest.$ac_ext >&5
12421 ac_cv_func_fseeko=no
12422 fi
12423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12424 fi
12425 echo "$as_me:12425: result: $ac_cv_func_fseeko" >&5
12426 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
12427 if test $ac_cv_func_fseeko = yes; then
12428
12429 cat >>confdefs.h <<\EOF
12430 #define HAVE_FSEEKO 1
12431 EOF
12432
12433 fi
12434
12435         # Normally we would collect these definitions in the config.h,
12436         # but (like _XOPEN_SOURCE), some environments rely on having these
12437         # defined before any of the system headers are included.  Another
12438         # case comes up with C++, e.g., on AIX the compiler compiles the
12439         # header files by themselves before looking at the body files it is
12440         # told to compile.  For ncurses, those header files do not include
12441         # the config.h
12442         if test "$ac_cv_sys_large_files" != no
12443         then
12444
12445         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12446         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
12447
12448         fi
12449         if test "$ac_cv_sys_largefile_source" != no
12450         then
12451
12452         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12453         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
12454
12455         fi
12456         if test "$ac_cv_sys_file_offset_bits" != no
12457         then
12458
12459         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12460         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
12461
12462         fi
12463
12464         echo "$as_me:12464: checking whether to use struct dirent64" >&5
12465 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
12466 if test "${cf_cv_struct_dirent64+set}" = set; then
12467   echo $ECHO_N "(cached) $ECHO_C" >&6
12468 else
12469
12470                 cat >conftest.$ac_ext <<_ACEOF
12471 #line 12471 "configure"
12472 #include "confdefs.h"
12473
12474 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
12475 #include <sys/types.h>
12476 #include <dirent.h>
12477
12478 int
12479 main (void)
12480 {
12481
12482                 /* if transitional largefile support is setup, this is true */
12483                 extern struct dirent64 * readdir(DIR *);
12484                 struct dirent64 *x = readdir((DIR *)0);
12485                 struct dirent *y = readdir((DIR *)0);
12486                 int z = x - y;
12487
12488   ;
12489   return 0;
12490 }
12491 _ACEOF
12492 rm -f conftest.$ac_objext
12493 if { (eval echo "$as_me:12493: \"$ac_compile\"") >&5
12494   (eval $ac_compile) 2>&5
12495   ac_status=$?
12496   echo "$as_me:12496: \$? = $ac_status" >&5
12497   (exit $ac_status); } &&
12498          { ac_try='test -s conftest.$ac_objext'
12499   { (eval echo "$as_me:12499: \"$ac_try\"") >&5
12500   (eval $ac_try) 2>&5
12501   ac_status=$?
12502   echo "$as_me:12502: \$? = $ac_status" >&5
12503   (exit $ac_status); }; }; then
12504   cf_cv_struct_dirent64=yes
12505 else
12506   echo "$as_me: failed program was:" >&5
12507 cat conftest.$ac_ext >&5
12508 cf_cv_struct_dirent64=no
12509 fi
12510 rm -f conftest.$ac_objext conftest.$ac_ext
12511
12512 fi
12513 echo "$as_me:12513: result: $cf_cv_struct_dirent64" >&5
12514 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
12515         test "$cf_cv_struct_dirent64" = yes &&
12516 cat >>confdefs.h <<\EOF
12517 #define HAVE_STRUCT_DIRENT64 1
12518 EOF
12519
12520         fi
12521
12522 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
12523 echo "$as_me:12523: checking if you want tparm not to use X/Open fixed-parameter list" >&5
12524 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
12525
12526 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
12527 if test "${enable_tparm_varargs+set}" = set; then
12528   enableval="$enable_tparm_varargs"
12529   with_tparm_varargs=$enableval
12530 else
12531   with_tparm_varargs=yes
12532 fi;
12533 echo "$as_me:12533: result: $with_tparm_varargs" >&5
12534 echo "${ECHO_T}$with_tparm_varargs" >&6
12535 NCURSES_TPARM_VARARGS=0
12536 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
12537
12538 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
12539 if test "$with_ticlib" != no ; then
12540 echo "$as_me:12540: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
12541 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
12542
12543 # Check whether --enable-tic-depends or --disable-tic-depends was given.
12544 if test "${enable_tic_depends+set}" = set; then
12545   enableval="$enable_tic_depends"
12546   with_tic_depends=$enableval
12547 else
12548   with_tic_depends=yes
12549 fi;
12550 echo "$as_me:12550: result: $with_tic_depends" >&5
12551 echo "${ECHO_T}$with_tic_depends" >&6
12552 else
12553         with_tic_depends=no
12554 fi
12555
12556 ###   use option --disable-wattr-macros to suppress wattr* macros from curses.h
12557 echo "$as_me:12557: checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition" >&5
12558 echo $ECHO_N "checking if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition... $ECHO_C" >&6
12559
12560 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
12561 if test "${enable_wattr_macros+set}" = set; then
12562   enableval="$enable_wattr_macros"
12563   with_wattr_macros=$enableval
12564 else
12565   with_wattr_macros=yes
12566 fi;
12567 if [ "x$with_wattr_macros" != xyes ]; then
12568         NCURSES_WATTR_MACROS=0
12569         echo "$as_me:12569: result: yes" >&5
12570 echo "${ECHO_T}yes" >&6
12571 else
12572         NCURSES_WATTR_MACROS=1
12573         echo "$as_me:12573: result: no" >&5
12574 echo "${ECHO_T}no" >&6
12575 fi
12576
12577 echo "$as_me:12577: checking for X11 rgb file" >&5
12578 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
12579
12580 # Check whether --with-x11-rgb or --without-x11-rgb was given.
12581 if test "${with_x11_rgb+set}" = set; then
12582   withval="$with_x11_rgb"
12583   RGB_PATH=$withval
12584 else
12585   RGB_PATH=auto
12586 fi;
12587
12588 if test "x$RGB_PATH" = xauto
12589 then
12590         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
12591         for cf_path in \
12592                 /opt/local/share/X11/rgb.txt \
12593                 /opt/X11/share/X11/rgb.txt \
12594                 /usr/share/X11/rgb.txt \
12595                 /usr/X11/share/X11/rgb.txt \
12596                 /usr/X11/lib/X11/rgb.txt \
12597                 /usr/lib/X11/rgb.txt \
12598                 /etc/X11/rgb.txt \
12599                 /usr/pkg/lib/X11/rgb.txt \
12600                 /usr/X11R7/lib/X11/rgb.txt \
12601                 /usr/X11R6/lib/X11/rgb.txt \
12602                 /usr/X11R5/lib/X11/rgb.txt \
12603                 /usr/X11R4/lib/X11/rgb.txt \
12604                 /usr/local/lib/X11/rgb.txt \
12605                 /usr/local/share/X11/rgb.txt \
12606                 /usr/lib64/X11/rgb.txt
12607         do
12608                 if test -f "$cf_path" ; then
12609                         RGB_PATH="$cf_path"
12610                         break
12611                 fi
12612         done
12613 else
12614         cf_path=$RGB_PATH
12615
12616 if test "x$prefix" != xNONE; then
12617         cf_path_syntax="$prefix"
12618 else
12619         cf_path_syntax="$ac_default_prefix"
12620 fi
12621
12622 case ".$cf_path" in
12623 (.\$\(*\)*|.\'*\'*)
12624         ;;
12625 (..|./*|.\\*)
12626         ;;
12627 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
12628         ;;
12629 (.\${*prefix}*|.\${*dir}*)
12630         eval cf_path="$cf_path"
12631         case ".$cf_path" in
12632         (.NONE/*)
12633                 cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12634                 ;;
12635         esac
12636         ;;
12637 (.no|.NONE/*)
12638         cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
12639         ;;
12640 (*)
12641         { { echo "$as_me:12641: error: expected a pathname, not \"$cf_path\"" >&5
12642 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
12643    { (exit 1); exit 1; }; }
12644         ;;
12645 esac
12646
12647 fi
12648
12649 echo "$as_me:12649: result: $RGB_PATH" >&5
12650 echo "${ECHO_T}$RGB_PATH" >&6
12651
12652 cat >>confdefs.h <<EOF
12653 #define RGB_PATH "$cf_path"
12654 EOF
12655
12656 no_x11_rgb=
12657 if test "$RGB_PATH" = no
12658 then
12659         no_x11_rgb="#"
12660 fi
12661
12662 ###   use option --with-bool to override bool's type
12663 echo "$as_me:12663: checking for type of bool" >&5
12664 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
12665
12666 # Check whether --with-bool or --without-bool was given.
12667 if test "${with_bool+set}" = set; then
12668   withval="$with_bool"
12669   NCURSES_BOOL="$withval"
12670 else
12671   NCURSES_BOOL=auto
12672 fi;
12673 echo "$as_me:12673: result: $NCURSES_BOOL" >&5
12674 echo "${ECHO_T}$NCURSES_BOOL" >&6
12675
12676 echo "$as_me:12676: checking for alternate terminal capabilities file" >&5
12677 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
12678
12679 # Check whether --with-caps or --without-caps was given.
12680 if test "${with_caps+set}" = set; then
12681   withval="$with_caps"
12682   TERMINFO_CAPS=Caps.$withval
12683 else
12684   TERMINFO_CAPS=Caps
12685 fi;
12686 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
12687 echo "$as_me:12687: result: $TERMINFO_CAPS" >&5
12688 echo "${ECHO_T}$TERMINFO_CAPS" >&6
12689
12690 ###   use option --with-chtype to override chtype's type
12691 echo "$as_me:12691: checking for type of chtype" >&5
12692 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12693
12694 # Check whether --with-chtype or --without-chtype was given.
12695 if test "${with_chtype+set}" = set; then
12696   withval="$with_chtype"
12697   NCURSES_CHTYPE="$withval"
12698 else
12699   NCURSES_CHTYPE=$cf_dft_chtype
12700 fi;
12701 echo "$as_me:12701: result: $NCURSES_CHTYPE" >&5
12702 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
12703
12704 ###   use option --with-ospeed to override ospeed's type
12705 echo "$as_me:12705: checking for type of ospeed" >&5
12706 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
12707
12708 # Check whether --with-ospeed or --without-ospeed was given.
12709 if test "${with_ospeed+set}" = set; then
12710   withval="$with_ospeed"
12711   NCURSES_OSPEED="$withval"
12712 else
12713   NCURSES_OSPEED=short
12714 fi;
12715 echo "$as_me:12715: result: $NCURSES_OSPEED" >&5
12716 echo "${ECHO_T}$NCURSES_OSPEED" >&6
12717
12718 ###   use option --with-mmask-t to override mmask_t's type
12719 echo "$as_me:12719: checking for type of mmask_t" >&5
12720 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
12721
12722 # Check whether --with-mmask-t or --without-mmask-t was given.
12723 if test "${with_mmask_t+set}" = set; then
12724   withval="$with_mmask_t"
12725   NCURSES_MMASK_T="$withval"
12726 else
12727   NCURSES_MMASK_T=$cf_dft_mmask_t
12728 fi;
12729 echo "$as_me:12729: result: $NCURSES_MMASK_T" >&5
12730 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
12731
12732 ###   use option --with-ccharw-max to override CCHARW_MAX size
12733 echo "$as_me:12733: checking for size CCHARW_MAX" >&5
12734 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
12735
12736 # Check whether --with-ccharw-max or --without-ccharw-max was given.
12737 if test "${with_ccharw_max+set}" = set; then
12738   withval="$with_ccharw_max"
12739   NCURSES_CCHARW_MAX="$withval"
12740 else
12741   NCURSES_CCHARW_MAX=5
12742 fi;
12743 echo "$as_me:12743: result: $NCURSES_CCHARW_MAX" >&5
12744 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
12745
12746 echo "$as_me:12746: checking for ANSI C header files" >&5
12747 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12748 if test "${ac_cv_header_stdc+set}" = set; then
12749   echo $ECHO_N "(cached) $ECHO_C" >&6
12750 else
12751   cat >conftest.$ac_ext <<_ACEOF
12752 #line 12752 "configure"
12753 #include "confdefs.h"
12754 #include <stdlib.h>
12755 #include <stdarg.h>
12756 #include <string.h>
12757 #include <float.h>
12758
12759 _ACEOF
12760 if { (eval echo "$as_me:12760: \"$ac_cpp conftest.$ac_ext\"") >&5
12761   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12762   ac_status=$?
12763   egrep -v '^ *\+' conftest.er1 >conftest.err
12764   rm -f conftest.er1
12765   cat conftest.err >&5
12766   echo "$as_me:12766: \$? = $ac_status" >&5
12767   (exit $ac_status); } >/dev/null; then
12768   if test -s conftest.err; then
12769     ac_cpp_err=$ac_c_preproc_warn_flag
12770   else
12771     ac_cpp_err=
12772   fi
12773 else
12774   ac_cpp_err=yes
12775 fi
12776 if test -z "$ac_cpp_err"; then
12777   ac_cv_header_stdc=yes
12778 else
12779   echo "$as_me: failed program was:" >&5
12780   cat conftest.$ac_ext >&5
12781   ac_cv_header_stdc=no
12782 fi
12783 rm -f conftest.err conftest.$ac_ext
12784
12785 if test $ac_cv_header_stdc = yes; then
12786   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12787   cat >conftest.$ac_ext <<_ACEOF
12788 #line 12788 "configure"
12789 #include "confdefs.h"
12790 #include <string.h>
12791
12792 _ACEOF
12793 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12794   egrep "memchr" >/dev/null 2>&1; then
12795   :
12796 else
12797   ac_cv_header_stdc=no
12798 fi
12799 rm -rf conftest*
12800
12801 fi
12802
12803 if test $ac_cv_header_stdc = yes; then
12804   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808 #include <stdlib.h>
12809
12810 _ACEOF
12811 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12812   egrep "free" >/dev/null 2>&1; then
12813   :
12814 else
12815   ac_cv_header_stdc=no
12816 fi
12817 rm -rf conftest*
12818
12819 fi
12820
12821 if test $ac_cv_header_stdc = yes; then
12822   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12823   if test "$cross_compiling" = yes; then
12824   :
12825 else
12826   cat >conftest.$ac_ext <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12829 #include <ctype.h>
12830 #if ((' ' & 0x0FF) == 0x020)
12831 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12832 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12833 #else
12834 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12835                      || ('j' <= (c) && (c) <= 'r') \
12836                      || ('s' <= (c) && (c) <= 'z'))
12837 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12838 #endif
12839
12840 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12841 int
12842 main (void)
12843 {
12844   int i;
12845   for (i = 0; i < 256; i++)
12846     if (XOR (islower (i), ISLOWER (i))
12847         || toupper (i) != TOUPPER (i))
12848       $ac_main_return(2);
12849   $ac_main_return (0);
12850 }
12851 _ACEOF
12852 rm -f conftest$ac_exeext
12853 if { (eval echo "$as_me:12853: \"$ac_link\"") >&5
12854   (eval $ac_link) 2>&5
12855   ac_status=$?
12856   echo "$as_me:12856: \$? = $ac_status" >&5
12857   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12858   { (eval echo "$as_me:12858: \"$ac_try\"") >&5
12859   (eval $ac_try) 2>&5
12860   ac_status=$?
12861   echo "$as_me:12861: \$? = $ac_status" >&5
12862   (exit $ac_status); }; }; then
12863   :
12864 else
12865   echo "$as_me: program exited with status $ac_status" >&5
12866 echo "$as_me: failed program was:" >&5
12867 cat conftest.$ac_ext >&5
12868 ac_cv_header_stdc=no
12869 fi
12870 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12871 fi
12872 fi
12873 fi
12874 echo "$as_me:12874: result: $ac_cv_header_stdc" >&5
12875 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12876 if test $ac_cv_header_stdc = yes; then
12877
12878 cat >>confdefs.h <<\EOF
12879 #define STDC_HEADERS 1
12880 EOF
12881
12882 fi
12883
12884 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
12885
12886 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
12887                   inttypes.h stdint.h unistd.h
12888 do
12889 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12890 echo "$as_me:12890: checking for $ac_header" >&5
12891 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12892 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12893   echo $ECHO_N "(cached) $ECHO_C" >&6
12894 else
12895   cat >conftest.$ac_ext <<_ACEOF
12896 #line 12896 "configure"
12897 #include "confdefs.h"
12898 $ac_includes_default
12899 #include <$ac_header>
12900 _ACEOF
12901 rm -f conftest.$ac_objext
12902 if { (eval echo "$as_me:12902: \"$ac_compile\"") >&5
12903   (eval $ac_compile) 2>&5
12904   ac_status=$?
12905   echo "$as_me:12905: \$? = $ac_status" >&5
12906   (exit $ac_status); } &&
12907          { ac_try='test -s conftest.$ac_objext'
12908   { (eval echo "$as_me:12908: \"$ac_try\"") >&5
12909   (eval $ac_try) 2>&5
12910   ac_status=$?
12911   echo "$as_me:12911: \$? = $ac_status" >&5
12912   (exit $ac_status); }; }; then
12913   eval "$as_ac_Header=yes"
12914 else
12915   echo "$as_me: failed program was:" >&5
12916 cat conftest.$ac_ext >&5
12917 eval "$as_ac_Header=no"
12918 fi
12919 rm -f conftest.$ac_objext conftest.$ac_ext
12920 fi
12921 echo "$as_me:12921: result: `eval echo '${'$as_ac_Header'}'`" >&5
12922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12923 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12924   cat >>confdefs.h <<EOF
12925 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12926 EOF
12927
12928 fi
12929 done
12930
12931 echo "$as_me:12931: checking for signed char" >&5
12932 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
12933 if test "${ac_cv_type_signed_char+set}" = set; then
12934   echo $ECHO_N "(cached) $ECHO_C" >&6
12935 else
12936   cat >conftest.$ac_ext <<_ACEOF
12937 #line 12937 "configure"
12938 #include "confdefs.h"
12939 $ac_includes_default
12940 int
12941 main (void)
12942 {
12943 if ((signed char *) 0)
12944   return 0;
12945 if (sizeof (signed char))
12946   return 0;
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 rm -f conftest.$ac_objext
12952 if { (eval echo "$as_me:12952: \"$ac_compile\"") >&5
12953   (eval $ac_compile) 2>&5
12954   ac_status=$?
12955   echo "$as_me:12955: \$? = $ac_status" >&5
12956   (exit $ac_status); } &&
12957          { ac_try='test -s conftest.$ac_objext'
12958   { (eval echo "$as_me:12958: \"$ac_try\"") >&5
12959   (eval $ac_try) 2>&5
12960   ac_status=$?
12961   echo "$as_me:12961: \$? = $ac_status" >&5
12962   (exit $ac_status); }; }; then
12963   ac_cv_type_signed_char=yes
12964 else
12965   echo "$as_me: failed program was:" >&5
12966 cat conftest.$ac_ext >&5
12967 ac_cv_type_signed_char=no
12968 fi
12969 rm -f conftest.$ac_objext conftest.$ac_ext
12970 fi
12971 echo "$as_me:12971: result: $ac_cv_type_signed_char" >&5
12972 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
12973
12974 echo "$as_me:12974: checking size of signed char" >&5
12975 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
12976 if test "${ac_cv_sizeof_signed_char+set}" = set; then
12977   echo $ECHO_N "(cached) $ECHO_C" >&6
12978 else
12979   if test "$ac_cv_type_signed_char" = yes; then
12980   if test "$cross_compiling" = yes; then
12981   # Depending upon the size, compute the lo and hi bounds.
12982 cat >conftest.$ac_ext <<_ACEOF
12983 #line 12983 "configure"
12984 #include "confdefs.h"
12985 $ac_includes_default
12986 int
12987 main (void)
12988 {
12989 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
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_lo=0 ac_mid=0
13007   while :; do
13008     cat >conftest.$ac_ext <<_ACEOF
13009 #line 13009 "configure"
13010 #include "confdefs.h"
13011 $ac_includes_default
13012 int
13013 main (void)
13014 {
13015 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13016   ;
13017   return 0;
13018 }
13019 _ACEOF
13020 rm -f conftest.$ac_objext
13021 if { (eval echo "$as_me:13021: \"$ac_compile\"") >&5
13022   (eval $ac_compile) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit $ac_status); } &&
13026          { ac_try='test -s conftest.$ac_objext'
13027   { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   echo "$as_me:13030: \$? = $ac_status" >&5
13031   (exit $ac_status); }; }; then
13032   ac_hi=$ac_mid; break
13033 else
13034   echo "$as_me: failed program was:" >&5
13035 cat conftest.$ac_ext >&5
13036 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
13037 fi
13038 rm -f conftest.$ac_objext conftest.$ac_ext
13039   done
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 ac_hi=-1 ac_mid=-1
13044   while :; do
13045     cat >conftest.$ac_ext <<_ACEOF
13046 #line 13046 "configure"
13047 #include "confdefs.h"
13048 $ac_includes_default
13049 int
13050 main (void)
13051 {
13052 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext
13058 if { (eval echo "$as_me:13058: \"$ac_compile\"") >&5
13059   (eval $ac_compile) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest.$ac_objext'
13064   { (eval echo "$as_me:13064: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   ac_lo=$ac_mid; break
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
13074 fi
13075 rm -f conftest.$ac_objext conftest.$ac_ext
13076   done
13077 fi
13078 rm -f conftest.$ac_objext conftest.$ac_ext
13079 # Binary search between lo and hi bounds.
13080 while test "x$ac_lo" != "x$ac_hi"; do
13081   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13082   cat >conftest.$ac_ext <<_ACEOF
13083 #line 13083 "configure"
13084 #include "confdefs.h"
13085 $ac_includes_default
13086 int
13087 main (void)
13088 {
13089 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
13090   ;
13091   return 0;
13092 }
13093 _ACEOF
13094 rm -f conftest.$ac_objext
13095 if { (eval echo "$as_me:13095: \"$ac_compile\"") >&5
13096   (eval $ac_compile) 2>&5
13097   ac_status=$?
13098   echo "$as_me:13098: \$? = $ac_status" >&5
13099   (exit $ac_status); } &&
13100          { ac_try='test -s conftest.$ac_objext'
13101   { (eval echo "$as_me:13101: \"$ac_try\"") >&5
13102   (eval $ac_try) 2>&5
13103   ac_status=$?
13104   echo "$as_me:13104: \$? = $ac_status" >&5
13105   (exit $ac_status); }; }; then
13106   ac_hi=$ac_mid
13107 else
13108   echo "$as_me: failed program was:" >&5
13109 cat conftest.$ac_ext >&5
13110 ac_lo=`expr $ac_mid + 1`
13111 fi
13112 rm -f conftest.$ac_objext conftest.$ac_ext
13113 done
13114 ac_cv_sizeof_signed_char=$ac_lo
13115 else
13116   if test "$cross_compiling" = yes; then
13117   { { echo "$as_me:13117: error: cannot run test program while cross compiling" >&5
13118 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13119    { (exit 1); exit 1; }; }
13120 else
13121   cat >conftest.$ac_ext <<_ACEOF
13122 #line 13122 "configure"
13123 #include "confdefs.h"
13124 $ac_includes_default
13125 int
13126 main (void)
13127 {
13128 FILE *f = fopen ("conftest.val", "w");
13129 if (!f)
13130   $ac_main_return (1);
13131 fprintf (f, "%d", (sizeof (signed char)));
13132 fclose (f);
13133   ;
13134   return 0;
13135 }
13136 _ACEOF
13137 rm -f conftest$ac_exeext
13138 if { (eval echo "$as_me:13138: \"$ac_link\"") >&5
13139   (eval $ac_link) 2>&5
13140   ac_status=$?
13141   echo "$as_me:13141: \$? = $ac_status" >&5
13142   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13143   { (eval echo "$as_me:13143: \"$ac_try\"") >&5
13144   (eval $ac_try) 2>&5
13145   ac_status=$?
13146   echo "$as_me:13146: \$? = $ac_status" >&5
13147   (exit $ac_status); }; }; then
13148   ac_cv_sizeof_signed_char=`cat conftest.val`
13149 else
13150   echo "$as_me: program exited with status $ac_status" >&5
13151 echo "$as_me: failed program was:" >&5
13152 cat conftest.$ac_ext >&5
13153 fi
13154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13155 fi
13156 fi
13157 rm -f conftest.val
13158 else
13159   ac_cv_sizeof_signed_char=0
13160 fi
13161 fi
13162 echo "$as_me:13162: result: $ac_cv_sizeof_signed_char" >&5
13163 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
13164 cat >>confdefs.h <<EOF
13165 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
13166 EOF
13167
13168 if test "$ac_cv_sizeof_signed_char" = 1 ; then
13169         NCURSES_SBOOL="signed char"
13170 else
13171         NCURSES_SBOOL="char"
13172 fi
13173 echo "$as_me:13173: checking if you want to use signed Boolean array in term.h" >&5
13174 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
13175
13176 # Check whether --enable-signed-char or --disable-signed-char was given.
13177 if test "${enable_signed_char+set}" = set; then
13178   enableval="$enable_signed_char"
13179   with_signed_char=$enableval
13180 else
13181   with_signed_char=no
13182 fi;
13183 echo "$as_me:13183: result: $with_signed_char" >&5
13184 echo "${ECHO_T}$with_signed_char" >&6
13185 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
13186
13187 ###   use option --with-tparm-arg to override tparm's argument type
13188 echo "$as_me:13188: checking for type of tparm args" >&5
13189 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
13190
13191 # Check whether --with-tparm-arg or --without-tparm-arg was given.
13192 if test "${with_tparm_arg+set}" = set; then
13193   withval="$with_tparm_arg"
13194   NCURSES_TPARM_ARG="$withval"
13195 else
13196   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
13197 fi;
13198 echo "$as_me:13198: result: $NCURSES_TPARM_ARG" >&5
13199 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
13200
13201 ### Enable compiling-in rcs id's
13202 echo "$as_me:13202: checking if RCS identifiers should be compiled-in" >&5
13203 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
13204
13205 # Check whether --with-rcs-ids or --without-rcs-ids was given.
13206 if test "${with_rcs_ids+set}" = set; then
13207   withval="$with_rcs_ids"
13208   with_rcs_ids=$withval
13209 else
13210   with_rcs_ids=no
13211 fi;
13212 echo "$as_me:13212: result: $with_rcs_ids" >&5
13213 echo "${ECHO_T}$with_rcs_ids" >&6
13214 test "x$with_rcs_ids" = xyes &&
13215 cat >>confdefs.h <<\EOF
13216 #define USE_RCS_IDS 1
13217 EOF
13218
13219 ###############################################################################
13220
13221 echo "$as_me:13221: checking format of man-pages" >&5
13222 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
13223
13224 # Check whether --with-manpage-format or --without-manpage-format was given.
13225 if test "${with_manpage_format+set}" = set; then
13226   withval="$with_manpage_format"
13227   MANPAGE_FORMAT=$withval
13228 else
13229   MANPAGE_FORMAT=unknown
13230 fi;
13231
13232 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
13233 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
13234
13235 cf_unknown=
13236
13237 case $MANPAGE_FORMAT in
13238 (unknown)
13239         if test -z "$MANPATH" ; then
13240                 MANPATH="/usr/man:/usr/share/man"
13241         fi
13242
13243         # look for the 'date' man-page (it's most likely to be installed!)
13244         MANPAGE_FORMAT=
13245         cf_preform=no
13246         cf_catonly=yes
13247         cf_example=date
13248
13249         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
13250         for cf_dir in $MANPATH; do
13251                 test -z "$cf_dir" && cf_dir=/usr/man
13252                 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
13253                 do
13254                         cf_test=`echo $cf_name | sed -e 's/*//'`
13255                         if test "x$cf_test" = "x$cf_name" ; then
13256
13257                                 case "$cf_name" in
13258                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
13259                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
13260                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
13261                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
13262                                 esac
13263
13264                                 case "$cf_name" in
13265                                 ($cf_dir/man*)
13266                                         cf_catonly=no
13267                                         ;;
13268                                 ($cf_dir/cat*)
13269                                         cf_preform=yes
13270                                         ;;
13271                                 esac
13272                                 break
13273                         fi
13274
13275                         # if we found a match in either man* or cat*, stop looking
13276                         if test -n "$MANPAGE_FORMAT" ; then
13277                                 cf_found=no
13278                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
13279                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
13280                                 case "$cf_name" in
13281                                 ($cf_dir/cat*)
13282                                         cf_found=yes
13283                                         ;;
13284                                 esac
13285                                 test $cf_found=yes && break
13286                         fi
13287                 done
13288                 # only check the first directory in $MANPATH where we find manpages
13289                 if test -n "$MANPAGE_FORMAT" ; then
13290                         break
13291                 fi
13292         done
13293         # if we did not find the example, just assume it is normal
13294         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
13295         IFS="$ac_save_ifs"
13296         ;;
13297 (*)
13298         for cf_option in $MANPAGE_FORMAT; do
13299         case $cf_option in
13300         (gzip|compress|BSDI|normal|formatted|catonly)
13301                 ;;
13302         (*)
13303                 cf_unknown="$cf_unknown $cf_option"
13304                 ;;
13305         esac
13306         done
13307         ;;
13308 esac
13309
13310 echo "$as_me:13310: result: $MANPAGE_FORMAT" >&5
13311 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
13312 if test -n "$cf_unknown" ; then
13313         { echo "$as_me:13313: WARNING: Unexpected manpage-format $cf_unknown" >&5
13314 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
13315 fi
13316
13317 echo "$as_me:13317: checking for manpage renaming" >&5
13318 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
13319
13320 # Check whether --with-manpage-renames or --without-manpage-renames was given.
13321 if test "${with_manpage_renames+set}" = set; then
13322   withval="$with_manpage_renames"
13323   MANPAGE_RENAMES=$withval
13324 else
13325   MANPAGE_RENAMES=yes
13326 fi;
13327
13328 case ".$MANPAGE_RENAMES" in
13329 (.no)
13330         ;;
13331 (.|.yes)
13332         # Debian 'man' program?
13333         if test -f /etc/debian_version ; then
13334                 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
13335         else
13336                 MANPAGE_RENAMES=no
13337         fi
13338         ;;
13339 esac
13340
13341 if test "$MANPAGE_RENAMES" != no ; then
13342         if test -f $srcdir/man/$MANPAGE_RENAMES ; then
13343                 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
13344         elif test ! -f $MANPAGE_RENAMES ; then
13345                 { { echo "$as_me:13345: error: not a filename: $MANPAGE_RENAMES" >&5
13346 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
13347    { (exit 1); exit 1; }; }
13348         fi
13349
13350         test ! -d man && mkdir man
13351
13352         # Construct a sed-script to perform renaming within man-pages
13353         if test -n "$MANPAGE_RENAMES" ; then
13354                 test ! -d man && mkdir man
13355                 $SHELL $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
13356         fi
13357 fi
13358
13359 echo "$as_me:13359: result: $MANPAGE_RENAMES" >&5
13360 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
13361
13362 echo "$as_me:13362: checking if manpage aliases will be installed" >&5
13363 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
13364
13365 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
13366 if test "${with_manpage_aliases+set}" = set; then
13367   withval="$with_manpage_aliases"
13368   MANPAGE_ALIASES=$withval
13369 else
13370   MANPAGE_ALIASES=yes
13371 fi;
13372
13373 echo "$as_me:13373: result: $MANPAGE_ALIASES" >&5
13374 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
13375
13376 case "x$LN_S" in
13377 (xln*)
13378         cf_use_symlinks=yes
13379         ;;
13380 (*)
13381         cf_use_symlinks=no
13382         ;;
13383 esac
13384
13385 MANPAGE_SYMLINKS=no
13386 if test "$MANPAGE_ALIASES" = yes ; then
13387 echo "$as_me:13387: checking if manpage symlinks should be used" >&5
13388 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
13389
13390 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
13391 if test "${with_manpage_symlinks+set}" = set; then
13392   withval="$with_manpage_symlinks"
13393   MANPAGE_SYMLINKS=$withval
13394 else
13395   MANPAGE_SYMLINKS=$cf_use_symlinks
13396 fi;
13397
13398 if test "$$cf_use_symlinks" = no; then
13399 if test "$MANPAGE_SYMLINKS" = yes ; then
13400         { echo "$as_me:13400: WARNING: cannot make symlinks" >&5
13401 echo "$as_me: WARNING: cannot make symlinks" >&2;}
13402         MANPAGE_SYMLINKS=no
13403 fi
13404 fi
13405
13406 echo "$as_me:13406: result: $MANPAGE_SYMLINKS" >&5
13407 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
13408 fi
13409
13410 echo "$as_me:13410: checking for manpage tbl" >&5
13411 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
13412
13413 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
13414 if test "${with_manpage_tbl+set}" = set; then
13415   withval="$with_manpage_tbl"
13416   MANPAGE_TBL=$withval
13417 else
13418   MANPAGE_TBL=no
13419 fi;
13420
13421 echo "$as_me:13421: result: $MANPAGE_TBL" >&5
13422 echo "${ECHO_T}$MANPAGE_TBL" >&6
13423
13424 if test "$prefix" = "NONE" ; then
13425         cf_prefix="$ac_default_prefix"
13426 else
13427         cf_prefix="$prefix"
13428 fi
13429
13430 case "$MANPAGE_FORMAT" in
13431 (*catonly*)
13432         cf_format=yes
13433         cf_inboth=no
13434         ;;
13435 (*formatted*)
13436         cf_format=yes
13437         cf_inboth=yes
13438         ;;
13439 (*)
13440         cf_format=no
13441         cf_inboth=no
13442         ;;
13443 esac
13444
13445 test ! -d man && mkdir man
13446
13447 cf_so_strip=
13448 cf_compress=
13449 case "$MANPAGE_FORMAT" in
13450 (*compress*)
13451         cf_so_strip="Z"
13452         cf_compress=compress
13453         ;;
13454 (*gzip*)
13455         cf_so_strip="gz"
13456         cf_compress=gzip
13457         ;;
13458 esac
13459
13460 cf_edit_man=./edit_man.sh
13461 cf_man_alias=`pwd`/man_alias.sed
13462
13463 cat >$cf_edit_man <<CF_EOF
13464 #! $SHELL
13465 # this script is generated by the configure-script CF_MAN_PAGES macro.
13466
13467 prefix="$cf_prefix"
13468 datarootdir="$datarootdir"
13469 datadir="$datadir"
13470
13471 NCURSES_MAJOR="$NCURSES_MAJOR"
13472 NCURSES_MINOR="$NCURSES_MINOR"
13473 NCURSES_PATCH="$NCURSES_PATCH"
13474
13475 NCURSES_OSPEED="$NCURSES_OSPEED"
13476 TERMINFO="$TERMINFO"
13477
13478 INSTALL="$INSTALL"
13479 INSTALL_DATA="$INSTALL_DATA"
13480
13481 transform="$program_transform_name"
13482
13483 TMP=\${TMPDIR:=/tmp}/man\$\$
13484 trap "rm -f \$TMP" 0 1 2 3 15
13485
13486 form=\$1
13487 shift || exit 1
13488
13489 verb=\$1
13490 shift || exit 1
13491
13492 mandir=\$1
13493 shift || exit 1
13494
13495 srcdir=\$1
13496 top_srcdir=\$srcdir/..
13497 shift || exit 1
13498
13499 if test "\$form" = normal ; then
13500         if test "$cf_format" = yes ; then
13501         if test "$cf_inboth" = no ; then
13502                 $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13503                 exit $?
13504         fi
13505         fi
13506         cf_subdir=\$mandir/man
13507         cf_tables=$MANPAGE_TBL
13508 else
13509         cf_subdir=\$mandir/cat
13510         cf_tables=yes
13511 fi
13512
13513 # process the list of source-files
13514 for i in \$* ; do
13515 case \$i in
13516 (*.orig|*.rej) ;;
13517 (*.[0-9]*)
13518         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
13519         if test \$verb = installing ; then
13520         if test ! -d \$cf_subdir\${section} ; then
13521                 mkdir -p \$cf_subdir\$section
13522         fi
13523         fi
13524
13525         # replace variables in man page
13526         if test ! -f $cf_man_alias ; then
13527 cat >>$cf_man_alias <<-CF_EOF2
13528                 s,@DATADIR@,\$datadir,g
13529                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
13530                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
13531                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
13532                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
13533                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
13534                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
13535 CF_EOF
13536
13537         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
13538         do
13539                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13540                 cf_name=`echo $cf_name|sed "$program_transform_name"`
13541 cat >>$cf_edit_man <<-CF_EOF
13542                 s,@$cf_NAME@,$cf_name,g
13543 CF_EOF
13544         done
13545
13546 cat >>$cf_edit_man <<CF_EOF
13547 CF_EOF2
13548                 echo "...made $cf_man_alias"
13549         fi
13550
13551         aliases=
13552         cf_source=\`basename \$i\`
13553         inalias=\$cf_source
13554         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
13555         if test ! -f \$inalias ; then
13556                 echo .. skipped \$cf_source
13557                 continue
13558         fi
13559 CF_EOF
13560
13561 if test "$MANPAGE_ALIASES" != no ; then
13562 cat >>$cf_edit_man <<CF_EOF
13563         nCurses=ignore.3x
13564         test $with_curses_h = yes && nCurses=ncurses.3x
13565         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
13566 CF_EOF
13567 fi
13568
13569 if test "$MANPAGE_RENAMES" = no ; then
13570 cat >>$cf_edit_man <<CF_EOF
13571         # perform program transformations for section 1 man pages
13572         if test \$section = 1 ; then
13573                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
13574         else
13575                 cf_target=\$cf_subdir\${section}/\$cf_source
13576         fi
13577 CF_EOF
13578 else
13579 cat >>$cf_edit_man <<CF_EOF
13580         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
13581         if test -z "\$cf_target" ; then
13582                 echo '? missing rename for '\$cf_source
13583                 cf_target="\$cf_source"
13584         fi
13585         cf_target="\$cf_subdir\${section}/\${cf_target}"
13586
13587 CF_EOF
13588 fi
13589
13590 cat >>$cf_edit_man <<CF_EOF
13591         sed     -f $cf_man_alias \\
13592 CF_EOF
13593
13594 if test -f $MANPAGE_RENAMES ; then
13595 cat >>$cf_edit_man <<CF_EOF
13596                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
13597 CF_EOF
13598 else
13599 cat >>$cf_edit_man <<CF_EOF
13600                 < \$i >\$TMP
13601 CF_EOF
13602 fi
13603
13604 cat >>$cf_edit_man <<CF_EOF
13605 if test \$cf_tables = yes ; then
13606         tbl \$TMP >\$TMP.out
13607         mv \$TMP.out \$TMP
13608 fi
13609 CF_EOF
13610
13611 if test $with_overwrite != yes ; then
13612 cat >>$cf_edit_man <<CF_EOF
13613         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
13614         mv \$TMP.out \$TMP
13615 CF_EOF
13616 fi
13617
13618 if test $with_curses_h != yes ; then
13619 cat >>$cf_edit_man <<CF_EOF
13620         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
13621         mv \$TMP.out \$TMP
13622 CF_EOF
13623 fi
13624
13625 cat >>$cf_edit_man <<CF_EOF
13626         if test \$form = format ; then
13627                 nroff -man \$TMP >\$TMP.out
13628                 mv \$TMP.out \$TMP
13629         fi
13630 CF_EOF
13631
13632 if test -n "$cf_compress" ; then
13633 cat >>$cf_edit_man <<CF_EOF
13634         if test \$verb = installing ; then
13635         if ( $cf_compress -f \$TMP )
13636         then
13637                 mv \$TMP.$cf_so_strip \$TMP
13638         fi
13639         fi
13640         cf_target="\$cf_target.$cf_so_strip"
13641 CF_EOF
13642 fi
13643
13644 case "$MANPAGE_FORMAT" in
13645 (*BSDI*)
13646 cat >>$cf_edit_man <<CF_EOF
13647         if test \$form = format ; then
13648                 # BSDI installs only .0 suffixes in the cat directories
13649                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
13650         fi
13651 CF_EOF
13652   ;;
13653 esac
13654
13655 cat >>$cf_edit_man <<CF_EOF
13656         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
13657         if test \$verb = installing ; then
13658                 echo \$verb \$cf_target
13659                 \$INSTALL_DATA \$TMP \$cf_target
13660                 test -d \$cf_subdir\${section} &&
13661                 test -n "\$aliases" && (
13662                         cd \$cf_subdir\${section} && (
13663                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
13664                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
13665                                 cf_target=\`basename \$cf_target\`
13666                                 for cf_alias in \$aliases
13667                                 do
13668                                         if test \$section = 1 ; then
13669                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13670                                         fi
13671
13672                                         if test "$MANPAGE_SYMLINKS" = yes ; then
13673                                                 if test -f \$cf_alias\${suffix} ; then
13674                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
13675                                                         then
13676                                                                 continue
13677                                                         fi
13678                                                 fi
13679                                                 echo .. \$verb alias \$cf_alias\${suffix}
13680 CF_EOF
13681 case "x$LN_S" in
13682 (*-f)
13683 cat >>$cf_edit_man <<CF_EOF
13684                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13685 CF_EOF
13686         ;;
13687 (*)
13688 cat >>$cf_edit_man <<CF_EOF
13689                                                 rm -f \$cf_alias\${suffix}
13690                                                 $LN_S \$cf_target \$cf_alias\${suffix}
13691 CF_EOF
13692         ;;
13693 esac
13694 cat >>$cf_edit_man <<CF_EOF
13695                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
13696                                                 echo ".so \$cf_source" >\$TMP
13697 CF_EOF
13698 if test -n "$cf_compress" ; then
13699 cat >>$cf_edit_man <<CF_EOF
13700                                                 if test -n "$cf_so_strip" ; then
13701                                                         $cf_compress -f \$TMP
13702                                                         mv \$TMP.$cf_so_strip \$TMP
13703                                                 fi
13704 CF_EOF
13705 fi
13706 cat >>$cf_edit_man <<CF_EOF
13707                                                 echo .. \$verb alias \$cf_alias\${suffix}
13708                                                 rm -f \$cf_alias\${suffix}
13709                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
13710                                         fi
13711                                 done
13712                         )
13713                 )
13714         elif test \$verb = removing ; then
13715                 test -f \$cf_target && (
13716                         echo \$verb \$cf_target
13717                         rm -f \$cf_target
13718                 )
13719                 test -d \$cf_subdir\${section} &&
13720                 test -n "\$aliases" && (
13721                         cd \$cf_subdir\${section} && (
13722                                 for cf_alias in \$aliases
13723                                 do
13724                                         if test \$section = 1 ; then
13725                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
13726                                         fi
13727
13728                                         echo .. \$verb alias \$cf_alias\${suffix}
13729                                         rm -f \$cf_alias\${suffix}
13730                                 done
13731                         )
13732                 )
13733         else
13734 #               echo ".hy 0"
13735                 cat \$TMP
13736         fi
13737         ;;
13738 esac
13739 done
13740
13741 if test $cf_inboth = yes ; then
13742 if test \$form != format ; then
13743         $SHELL \$0 format \$verb \$mandir \$srcdir \$*
13744 fi
13745 fi
13746
13747 exit 0
13748 CF_EOF
13749 chmod 755 $cf_edit_man
13750
13751 ###############################################################################
13752
13753 ### Note that some functions (such as const) are normally disabled anyway.
13754 echo "$as_me:13754: checking if you want to build with function extensions" >&5
13755 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
13756
13757 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
13758 if test "${enable_ext_funcs+set}" = set; then
13759   enableval="$enable_ext_funcs"
13760   with_ext_funcs=$enableval
13761 else
13762   with_ext_funcs=yes
13763 fi;
13764 echo "$as_me:13764: result: $with_ext_funcs" >&5
13765 echo "${ECHO_T}$with_ext_funcs" >&6
13766 if test "x$with_ext_funcs" = xyes ; then
13767         NCURSES_EXT_FUNCS=1
13768
13769 cat >>confdefs.h <<\EOF
13770 #define NCURSES_EXT_FUNCS 1
13771 EOF
13772
13773 cat >>confdefs.h <<\EOF
13774 #define HAVE_ASSUME_DEFAULT_COLORS 1
13775 EOF
13776
13777 cat >>confdefs.h <<\EOF
13778 #define HAVE_CURSES_VERSION 1
13779 EOF
13780
13781 cat >>confdefs.h <<\EOF
13782 #define HAVE_HAS_KEY 1
13783 EOF
13784
13785 cat >>confdefs.h <<\EOF
13786 #define HAVE_RESIZETERM 1
13787 EOF
13788
13789 cat >>confdefs.h <<\EOF
13790 #define HAVE_RESIZE_TERM 1
13791 EOF
13792
13793 cat >>confdefs.h <<\EOF
13794 #define HAVE_TERM_ENTRY_H 1
13795 EOF
13796
13797 cat >>confdefs.h <<\EOF
13798 #define HAVE_USE_DEFAULT_COLORS 1
13799 EOF
13800
13801 cat >>confdefs.h <<\EOF
13802 #define HAVE_USE_EXTENDED_NAMES 1
13803 EOF
13804
13805 cat >>confdefs.h <<\EOF
13806 #define HAVE_USE_SCREEN 1
13807 EOF
13808
13809 cat >>confdefs.h <<\EOF
13810 #define HAVE_USE_WINDOW 1
13811 EOF
13812
13813 cat >>confdefs.h <<\EOF
13814 #define HAVE_WRESIZE 1
13815 EOF
13816
13817         GENERATED_EXT_FUNCS=generated
13818         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
13819 else
13820         NCURSES_EXT_FUNCS=0
13821         GENERATED_EXT_FUNCS=
13822 fi
13823
13824 echo "$as_me:13824: checking if you want to build with SCREEN extensions" >&5
13825 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
13826
13827 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
13828 if test "${enable_sp_funcs+set}" = set; then
13829   enableval="$enable_sp_funcs"
13830   with_sp_funcs=$enableval
13831 else
13832   with_sp_funcs=$cf_dft_ext_spfuncs
13833 fi;
13834 echo "$as_me:13834: result: $with_sp_funcs" >&5
13835 echo "${ECHO_T}$with_sp_funcs" >&6
13836 if test "x$with_sp_funcs" = xyes ; then
13837         NCURSES_SP_FUNCS=1
13838
13839 cat >>confdefs.h <<\EOF
13840 #define NCURSES_SP_FUNCS 1
13841 EOF
13842
13843 cat >>confdefs.h <<\EOF
13844 #define HAVE_TPUTS_SP 1
13845 EOF
13846
13847         GENERATED_SP_FUNCS=generated
13848 else
13849         NCURSES_SP_FUNCS=0
13850         GENERATED_SP_FUNCS=
13851 fi
13852
13853 echo "$as_me:13853: checking if you want to build with terminal-driver" >&5
13854 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
13855
13856 # Check whether --enable-term-driver or --disable-term-driver was given.
13857 if test "${enable_term_driver+set}" = set; then
13858   enableval="$enable_term_driver"
13859   with_term_driver=$enableval
13860 else
13861   with_term_driver=no
13862 fi;
13863 echo "$as_me:13863: result: $with_term_driver" >&5
13864 echo "${ECHO_T}$with_term_driver" >&6
13865 if test "x$with_term_driver" = xyes ; then
13866
13867 cat >>confdefs.h <<\EOF
13868 #define USE_TERM_DRIVER 1
13869 EOF
13870
13871         if test "x$with_termlib" != xno ; then
13872                 { { echo "$as_me:13872: error: The term-driver option conflicts with the termlib option" >&5
13873 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
13874    { (exit 1); exit 1; }; }
13875         fi
13876         if test "x$with_sp_funcs" != xyes ; then
13877                 { { echo "$as_me:13877: error: The term-driver option relies upon sp-funcs" >&5
13878 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
13879    { (exit 1); exit 1; }; }
13880         fi
13881 fi
13882
13883 ###   use option --enable-const to turn on use of const beyond that in XSI.
13884 echo "$as_me:13884: checking for extended use of const keyword" >&5
13885 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
13886
13887 # Check whether --enable-const or --disable-const was given.
13888 if test "${enable_const+set}" = set; then
13889   enableval="$enable_const"
13890   with_ext_const=$enableval
13891 else
13892   with_ext_const=$cf_dft_ext_const
13893 fi;
13894 echo "$as_me:13894: result: $with_ext_const" >&5
13895 echo "${ECHO_T}$with_ext_const" >&6
13896 NCURSES_CONST='/*nothing*/'
13897 if test "x$with_ext_const" = xyes ; then
13898         NCURSES_CONST=const
13899 fi
13900
13901 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
13902 echo "$as_me:13902: checking if you want to use extended colors" >&5
13903 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
13904
13905 # Check whether --enable-ext-colors or --disable-ext-colors was given.
13906 if test "${enable_ext_colors+set}" = set; then
13907   enableval="$enable_ext_colors"
13908   with_ext_colors=$enableval
13909 else
13910   with_ext_colors=$cf_dft_ext_colors
13911 fi;
13912 echo "$as_me:13912: result: $with_ext_colors" >&5
13913 echo "${ECHO_T}$with_ext_colors" >&6
13914 NCURSES_EXT_COLORS=0
13915 if test "x$with_ext_colors" = xyes ; then
13916         if test "x$with_widec" != xyes ; then
13917                 { echo "$as_me:13917: WARNING: This option applies only to wide-character library" >&5
13918 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
13919         else
13920                 # cannot be ABI 5 since it changes sizeof(cchar_t)
13921
13922 if test "${with_abi_version+set}" != set; then
13923         case $cf_cv_rel_version in
13924         (5.*)
13925                 cf_cv_rel_version=6.0
13926                 cf_cv_abi_version=6
13927                 { echo "$as_me:13927: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13928 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13929                 ;;
13930         esac
13931 fi
13932
13933                 NCURSES_EXT_COLORS=1
13934
13935 cat >>confdefs.h <<\EOF
13936 #define NCURSES_EXT_COLORS 1
13937 EOF
13938
13939 cat >>confdefs.h <<\EOF
13940 #define HAVE_ALLOC_PAIR 1
13941 EOF
13942
13943 cat >>confdefs.h <<\EOF
13944 #define HAVE_INIT_EXTENDED_COLOR 1
13945 EOF
13946
13947 cat >>confdefs.h <<\EOF
13948 #define HAVE_RESET_COLOR_PAIRS 1
13949 EOF
13950
13951         fi
13952 fi
13953
13954 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
13955 echo "$as_me:13955: checking if you want to use extended mouse encoding" >&5
13956 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
13957
13958 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
13959 if test "${enable_ext_mouse+set}" = set; then
13960   enableval="$enable_ext_mouse"
13961   with_ext_mouse=$enableval
13962 else
13963   with_ext_mouse=$cf_dft_ext_mouse
13964 fi;
13965 echo "$as_me:13965: result: $with_ext_mouse" >&5
13966 echo "${ECHO_T}$with_ext_mouse" >&6
13967 NCURSES_MOUSE_VERSION=1
13968 if test "x$with_ext_mouse" = xyes ; then
13969         NCURSES_MOUSE_VERSION=2
13970
13971 if test "${with_abi_version+set}" != set; then
13972         case $cf_cv_rel_version in
13973         (5.*)
13974                 cf_cv_rel_version=6.0
13975                 cf_cv_abi_version=6
13976                 { echo "$as_me:13976: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
13977 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
13978                 ;;
13979         esac
13980 fi
13981
13982 fi
13983
13984 ###   use option --enable-ext-putwin to turn on extended screendumps
13985 echo "$as_me:13985: checking if you want to use extended putwin/screendump" >&5
13986 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
13987
13988 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
13989 if test "${enable_ext_putwin+set}" = set; then
13990   enableval="$enable_ext_putwin"
13991   with_ext_putwin=$enableval
13992 else
13993   with_ext_putwin=$cf_dft_ext_putwin
13994 fi;
13995 echo "$as_me:13995: result: $with_ext_putwin" >&5
13996 echo "${ECHO_T}$with_ext_putwin" >&6
13997 if test "x$with_ext_putwin" = xyes ; then
13998
13999 cat >>confdefs.h <<\EOF
14000 #define NCURSES_EXT_PUTWIN 1
14001 EOF
14002
14003 fi
14004
14005 echo "$as_me:14005: checking if you want \$NCURSES_NO_PADDING code" >&5
14006 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
14007
14008 # Check whether --enable-no-padding or --disable-no-padding was given.
14009 if test "${enable_no_padding+set}" = set; then
14010   enableval="$enable_no_padding"
14011   with_no_padding=$enableval
14012 else
14013   with_no_padding=$with_ext_funcs
14014 fi;
14015 echo "$as_me:14015: result: $with_no_padding" >&5
14016 echo "${ECHO_T}$with_no_padding" >&6
14017 test "x$with_no_padding" = xyes &&
14018 cat >>confdefs.h <<\EOF
14019 #define NCURSES_NO_PADDING 1
14020 EOF
14021
14022 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
14023 echo "$as_me:14023: checking if you want SIGWINCH handler" >&5
14024 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
14025
14026 # Check whether --enable-sigwinch or --disable-sigwinch was given.
14027 if test "${enable_sigwinch+set}" = set; then
14028   enableval="$enable_sigwinch"
14029   with_sigwinch=$enableval
14030 else
14031   with_sigwinch=$with_ext_funcs
14032 fi;
14033 echo "$as_me:14033: result: $with_sigwinch" >&5
14034 echo "${ECHO_T}$with_sigwinch" >&6
14035 test "x$with_sigwinch" = xyes &&
14036 cat >>confdefs.h <<\EOF
14037 #define USE_SIGWINCH 1
14038 EOF
14039
14040 ###   use option --enable-tcap-names to allow user to define new capabilities
14041 echo "$as_me:14041: checking if you want user-definable terminal capabilities like termcap" >&5
14042 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
14043
14044 # Check whether --enable-tcap-names or --disable-tcap-names was given.
14045 if test "${enable_tcap_names+set}" = set; then
14046   enableval="$enable_tcap_names"
14047   with_tcap_names=$enableval
14048 else
14049   with_tcap_names=$with_ext_funcs
14050 fi;
14051 echo "$as_me:14051: result: $with_tcap_names" >&5
14052 echo "${ECHO_T}$with_tcap_names" >&6
14053 NCURSES_XNAMES=0
14054 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
14055
14056 ##############################################################################
14057
14058 echo "$as_me:14058: checking if you want to link with the pthread library" >&5
14059 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
14060
14061 # Check whether --with-pthread or --without-pthread was given.
14062 if test "${with_pthread+set}" = set; then
14063   withval="$with_pthread"
14064   with_pthread=$withval
14065 else
14066   with_pthread=no
14067 fi;
14068 echo "$as_me:14068: result: $with_pthread" >&5
14069 echo "${ECHO_T}$with_pthread" >&6
14070
14071 if test "$with_pthread" != no ; then
14072         echo "$as_me:14072: checking for pthread.h" >&5
14073 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
14074 if test "${ac_cv_header_pthread_h+set}" = set; then
14075   echo $ECHO_N "(cached) $ECHO_C" >&6
14076 else
14077   cat >conftest.$ac_ext <<_ACEOF
14078 #line 14078 "configure"
14079 #include "confdefs.h"
14080 #include <pthread.h>
14081 _ACEOF
14082 if { (eval echo "$as_me:14082: \"$ac_cpp conftest.$ac_ext\"") >&5
14083   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14084   ac_status=$?
14085   egrep -v '^ *\+' conftest.er1 >conftest.err
14086   rm -f conftest.er1
14087   cat conftest.err >&5
14088   echo "$as_me:14088: \$? = $ac_status" >&5
14089   (exit $ac_status); } >/dev/null; then
14090   if test -s conftest.err; then
14091     ac_cpp_err=$ac_c_preproc_warn_flag
14092   else
14093     ac_cpp_err=
14094   fi
14095 else
14096   ac_cpp_err=yes
14097 fi
14098 if test -z "$ac_cpp_err"; then
14099   ac_cv_header_pthread_h=yes
14100 else
14101   echo "$as_me: failed program was:" >&5
14102   cat conftest.$ac_ext >&5
14103   ac_cv_header_pthread_h=no
14104 fi
14105 rm -f conftest.err conftest.$ac_ext
14106 fi
14107 echo "$as_me:14107: result: $ac_cv_header_pthread_h" >&5
14108 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
14109 if test $ac_cv_header_pthread_h = yes; then
14110
14111 cat >>confdefs.h <<\EOF
14112 #define HAVE_PTHREADS_H 1
14113 EOF
14114
14115         for cf_lib_pthread in pthread c_r
14116         do
14117             echo "$as_me:14117: checking if we can link with the $cf_lib_pthread library" >&5
14118 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
14119             cf_save_LIBS="$LIBS"
14120
14121 cf_add_libs="-l$cf_lib_pthread"
14122 # Filter out duplicates - this happens with badly-designed ".pc" files...
14123 for cf_add_1lib in $LIBS
14124 do
14125         for cf_add_2lib in $cf_add_libs
14126         do
14127                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14128                 then
14129                         cf_add_1lib=
14130                         break
14131                 fi
14132         done
14133         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14134 done
14135 LIBS="$cf_add_libs"
14136
14137             cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14140
14141 #include <pthread.h>
14142
14143 int
14144 main (void)
14145 {
14146
14147                 int rc = pthread_create(0,0,0,0);
14148                 int r2 = pthread_mutexattr_settype(0, 0);
14149
14150   ;
14151   return 0;
14152 }
14153 _ACEOF
14154 rm -f conftest.$ac_objext conftest$ac_exeext
14155 if { (eval echo "$as_me:14155: \"$ac_link\"") >&5
14156   (eval $ac_link) 2>&5
14157   ac_status=$?
14158   echo "$as_me:14158: \$? = $ac_status" >&5
14159   (exit $ac_status); } &&
14160          { ac_try='test -s conftest$ac_exeext'
14161   { (eval echo "$as_me:14161: \"$ac_try\"") >&5
14162   (eval $ac_try) 2>&5
14163   ac_status=$?
14164   echo "$as_me:14164: \$? = $ac_status" >&5
14165   (exit $ac_status); }; }; then
14166   with_pthread=yes
14167 else
14168   echo "$as_me: failed program was:" >&5
14169 cat conftest.$ac_ext >&5
14170 with_pthread=no
14171 fi
14172 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14173             LIBS="$cf_save_LIBS"
14174             echo "$as_me:14174: result: $with_pthread" >&5
14175 echo "${ECHO_T}$with_pthread" >&6
14176             test "$with_pthread" = yes && break
14177         done
14178
14179         if test "$with_pthread" = yes ; then
14180
14181 cf_add_libs="-l$cf_lib_pthread"
14182 # Filter out duplicates - this happens with badly-designed ".pc" files...
14183 for cf_add_1lib in $LIBS
14184 do
14185         for cf_add_2lib in $cf_add_libs
14186         do
14187                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14188                 then
14189                         cf_add_1lib=
14190                         break
14191                 fi
14192         done
14193         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14194 done
14195 LIBS="$cf_add_libs"
14196
14197 cat >>confdefs.h <<\EOF
14198 #define HAVE_LIBPTHREADS 1
14199 EOF
14200
14201         else
14202             { { echo "$as_me:14202: error: Cannot link with pthread library" >&5
14203 echo "$as_me: error: Cannot link with pthread library" >&2;}
14204    { (exit 1); exit 1; }; }
14205         fi
14206
14207 fi
14208
14209 fi
14210
14211 if test "x$with_pthread" != xno; then
14212         echo "$as_me:14212: checking for pthread_kill" >&5
14213 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
14214 if test "${ac_cv_func_pthread_kill+set}" = set; then
14215   echo $ECHO_N "(cached) $ECHO_C" >&6
14216 else
14217   cat >conftest.$ac_ext <<_ACEOF
14218 #line 14218 "configure"
14219 #include "confdefs.h"
14220 #define pthread_kill autoconf_temporary
14221 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
14222 #undef pthread_kill
14223
14224 #ifdef __cplusplus
14225 extern "C"
14226 #endif
14227
14228 /* We use char because int might match the return type of a gcc2
14229    builtin and then its argument prototype would still apply.  */
14230 char pthread_kill (void);
14231
14232 int
14233 main (void)
14234 {
14235
14236 /* The GNU C library defines stubs for functions which it implements
14237     to always fail with ENOSYS.  Some functions are actually named
14238     something starting with __ and the normal name is an alias.  */
14239 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
14240 #error found stub for pthread_kill
14241 #endif
14242
14243         return pthread_kill ();
14244   ;
14245   return 0;
14246 }
14247 _ACEOF
14248 rm -f conftest.$ac_objext conftest$ac_exeext
14249 if { (eval echo "$as_me:14249: \"$ac_link\"") >&5
14250   (eval $ac_link) 2>&5
14251   ac_status=$?
14252   echo "$as_me:14252: \$? = $ac_status" >&5
14253   (exit $ac_status); } &&
14254          { ac_try='test -s conftest$ac_exeext'
14255   { (eval echo "$as_me:14255: \"$ac_try\"") >&5
14256   (eval $ac_try) 2>&5
14257   ac_status=$?
14258   echo "$as_me:14258: \$? = $ac_status" >&5
14259   (exit $ac_status); }; }; then
14260   ac_cv_func_pthread_kill=yes
14261 else
14262   echo "$as_me: failed program was:" >&5
14263 cat conftest.$ac_ext >&5
14264 ac_cv_func_pthread_kill=no
14265 fi
14266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14267 fi
14268 echo "$as_me:14268: result: $ac_cv_func_pthread_kill" >&5
14269 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
14270 if test $ac_cv_func_pthread_kill = yes; then
14271
14272                 echo "$as_me:14272: checking if you want to allow EINTR in wgetch with pthreads" >&5
14273 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
14274
14275 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
14276 if test "${enable_pthreads_eintr+set}" = set; then
14277   enableval="$enable_pthreads_eintr"
14278   use_pthreads_eintr=$enableval
14279 else
14280   use_pthreads_eintr=no
14281 fi;
14282                 echo "$as_me:14282: result: $use_pthreads_eintr" >&5
14283 echo "${ECHO_T}$use_pthreads_eintr" >&6
14284                 if test "x$use_pthreads_eintr" = xyes ; then
14285
14286 cat >>confdefs.h <<\EOF
14287 #define USE_PTHREADS_EINTR 1
14288 EOF
14289
14290                 fi
14291 fi
14292
14293         echo "$as_me:14293: checking if you want to use weak-symbols for pthreads" >&5
14294 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
14295
14296 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
14297 if test "${enable_weak_symbols+set}" = set; then
14298   enableval="$enable_weak_symbols"
14299   use_weak_symbols=$enableval
14300 else
14301   use_weak_symbols=no
14302 fi;
14303         echo "$as_me:14303: result: $use_weak_symbols" >&5
14304 echo "${ECHO_T}$use_weak_symbols" >&6
14305         if test "x$use_weak_symbols" = xyes ; then
14306
14307 echo "$as_me:14307: checking if $CC supports weak symbols" >&5
14308 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
14309 if test "${cf_cv_weak_symbols+set}" = set; then
14310   echo $ECHO_N "(cached) $ECHO_C" >&6
14311 else
14312
14313 cat >conftest.$ac_ext <<_ACEOF
14314 #line 14314 "configure"
14315 #include "confdefs.h"
14316
14317 #include <stdio.h>
14318 int
14319 main (void)
14320 {
14321
14322 #if defined(__GNUC__)
14323 #  if defined __USE_ISOC99
14324 #    define _cat_pragma(exp)    _Pragma(#exp)
14325 #    define _weak_pragma(exp)   _cat_pragma(weak name)
14326 #  else
14327 #    define _weak_pragma(exp)
14328 #  endif
14329 #  define _declare(name)        __extension__ extern __typeof__(name) name
14330 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
14331 #endif
14332
14333 weak_symbol(fopen);
14334
14335   ;
14336   return 0;
14337 }
14338 _ACEOF
14339 rm -f conftest.$ac_objext
14340 if { (eval echo "$as_me:14340: \"$ac_compile\"") >&5
14341   (eval $ac_compile) 2>&5
14342   ac_status=$?
14343   echo "$as_me:14343: \$? = $ac_status" >&5
14344   (exit $ac_status); } &&
14345          { ac_try='test -s conftest.$ac_objext'
14346   { (eval echo "$as_me:14346: \"$ac_try\"") >&5
14347   (eval $ac_try) 2>&5
14348   ac_status=$?
14349   echo "$as_me:14349: \$? = $ac_status" >&5
14350   (exit $ac_status); }; }; then
14351   cf_cv_weak_symbols=yes
14352 else
14353   echo "$as_me: failed program was:" >&5
14354 cat conftest.$ac_ext >&5
14355 cf_cv_weak_symbols=no
14356 fi
14357 rm -f conftest.$ac_objext conftest.$ac_ext
14358
14359 fi
14360 echo "$as_me:14360: result: $cf_cv_weak_symbols" >&5
14361 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
14362
14363         else
14364                 cf_cv_weak_symbols=no
14365         fi
14366
14367         if test "x$cf_cv_weak_symbols" = xyes ; then
14368
14369 cat >>confdefs.h <<\EOF
14370 #define USE_WEAK_SYMBOLS 1
14371 EOF
14372
14373         fi
14374 fi
14375
14376 PTHREAD=
14377 if test "x$with_pthread" = "xyes" ; then
14378
14379 cat >>confdefs.h <<\EOF
14380 #define USE_PTHREADS 1
14381 EOF
14382
14383         enable_reentrant=yes
14384         if test "x$cf_cv_weak_symbols" = xyes ; then
14385                 PTHREAD=-lpthread
14386
14387 cf_add_libs="-lpthread"
14388 # Filter out duplicates - this happens with badly-designed ".pc" files...
14389 for cf_add_1lib in $PRIVATE_LIBS
14390 do
14391         for cf_add_2lib in $cf_add_libs
14392         do
14393                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14394                 then
14395                         cf_add_1lib=
14396                         break
14397                 fi
14398         done
14399         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14400 done
14401 PRIVATE_LIBS="$cf_add_libs"
14402
14403         fi
14404 fi
14405
14406 # Reentrant code has to be opaque; there's little advantage to making ncurses
14407 # opaque outside of that, so there is no --enable-opaque option.  We can use
14408 # this option without --with-pthreads, but this will be always set for
14409 # pthreads.
14410 echo "$as_me:14410: checking if you want reentrant code" >&5
14411 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
14412
14413 # Check whether --enable-reentrant or --disable-reentrant was given.
14414 if test "${enable_reentrant+set}" = set; then
14415   enableval="$enable_reentrant"
14416   with_reentrant=$enableval
14417 else
14418   with_reentrant=no
14419 fi;
14420 echo "$as_me:14420: result: $with_reentrant" >&5
14421 echo "${ECHO_T}$with_reentrant" >&6
14422 if test "x$with_reentrant" = xyes ; then
14423         cf_cv_enable_reentrant=1
14424         cf_cv_enable_opaque="NCURSES_INTERNALS"
14425         NCURSES_SIZE_T=int
14426         if test "x$cf_cv_weak_symbols" = xyes ; then
14427
14428 # remove pthread library from $LIBS
14429 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
14430
14431 cf_add_libs="-lpthread"
14432 # Filter out duplicates - this happens with badly-designed ".pc" files...
14433 for cf_add_1lib in $TEST_LIBS
14434 do
14435         for cf_add_2lib in $cf_add_libs
14436         do
14437                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14438                 then
14439                         cf_add_1lib=
14440                         break
14441                 fi
14442         done
14443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14444 done
14445 TEST_LIBS="$cf_add_libs"
14446
14447 cf_add_libs="-lpthread"
14448 # Filter out duplicates - this happens with badly-designed ".pc" files...
14449 for cf_add_1lib in $TEST_LIBS2
14450 do
14451         for cf_add_2lib in $cf_add_libs
14452         do
14453                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14454                 then
14455                         cf_add_1lib=
14456                         break
14457                 fi
14458         done
14459         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14460 done
14461 TEST_LIBS2="$cf_add_libs"
14462
14463 cf_add_libs="-lpthread"
14464 # Filter out duplicates - this happens with badly-designed ".pc" files...
14465 for cf_add_1lib in $PRIVATE_LIBS
14466 do
14467         for cf_add_2lib in $cf_add_libs
14468         do
14469                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14470                 then
14471                         cf_add_1lib=
14472                         break
14473                 fi
14474         done
14475         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14476 done
14477 PRIVATE_LIBS="$cf_add_libs"
14478
14479         else
14480                 # when not using weak symbols but with_reentrant,
14481                 # add 't' to the library suffix on all platforms
14482                 # except cygwin, where we only do that if ALSO
14483                 # compiling with full thread support.
14484                 case "$host" in
14485                 (*cygwin* | *msys*)
14486                         if test "$with_pthread" = "yes" ; then
14487                                 if test "x$disable_lib_suffixes" = "xno" ; then
14488                                         LIB_SUFFIX="t${LIB_SUFFIX}"
14489                                 fi
14490                         fi ;;
14491                 (*)
14492                         if test "x$disable_lib_suffixes" = "xno" ; then
14493                                 LIB_SUFFIX="t${LIB_SUFFIX}"
14494                         fi
14495                         ;;
14496                 esac
14497         fi
14498
14499 cat >>confdefs.h <<\EOF
14500 #define USE_REENTRANT 1
14501 EOF
14502
14503 if test "${with_abi_version+set}" != set; then
14504         case $cf_cv_rel_version in
14505         (5.*)
14506                 cf_cv_rel_version=6.0
14507                 cf_cv_abi_version=6
14508                 { echo "$as_me:14508: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
14509 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
14510                 ;;
14511         esac
14512 fi
14513
14514 else
14515         cf_cv_enable_reentrant=0
14516         cf_cv_enable_opaque="NCURSES_OPAQUE"
14517         NCURSES_SIZE_T=short
14518 fi
14519
14520 echo "$as_me:14520: checking if you want opaque curses-library structures" >&5
14521 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
14522
14523 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
14524 if test "${enable_opaque_curses+set}" = set; then
14525   enableval="$enable_opaque_curses"
14526   test "$enableval" != yes && enableval=no
14527         if test "$enableval" != "no" ; then
14528     enable_opaque_curses=yes
14529         else
14530
14531          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14532          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14533
14534         fi
14535 else
14536   enableval=no
14537
14538          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
14539          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
14540
14541 fi;
14542 echo "$as_me:14542: result: $enable_opaque_curses" >&5
14543 echo "${ECHO_T}$enable_opaque_curses" >&6
14544
14545 test "$cf_cv_enable_reentrant" = 1 && \
14546 test "$enable_opaque_curses" = no && \
14547 { { echo "$as_me:14547: error: reentrant configuration requires opaque library" >&5
14548 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
14549    { (exit 1); exit 1; }; }
14550
14551 echo "$as_me:14551: checking if you want opaque form-library structures" >&5
14552 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
14553
14554 # Check whether --enable-opaque-form or --disable-opaque-form was given.
14555 if test "${enable_opaque_form+set}" = set; then
14556   enableval="$enable_opaque_form"
14557   enable_opaque_form=yes
14558 else
14559   enable_opaque_form=no
14560 fi;
14561 echo "$as_me:14561: result: $enable_opaque_form" >&5
14562 echo "${ECHO_T}$enable_opaque_form" >&6
14563
14564 echo "$as_me:14564: checking if you want opaque menu-library structures" >&5
14565 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
14566
14567 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
14568 if test "${enable_opaque_menu+set}" = set; then
14569   enableval="$enable_opaque_menu"
14570   enable_opaque_menu=yes
14571 else
14572   enable_opaque_menu=no
14573 fi;
14574 echo "$as_me:14574: result: $enable_opaque_menu" >&5
14575 echo "${ECHO_T}$enable_opaque_menu" >&6
14576
14577 echo "$as_me:14577: checking if you want opaque panel-library structures" >&5
14578 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
14579
14580 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
14581 if test "${enable_opaque_panel+set}" = set; then
14582   enableval="$enable_opaque_panel"
14583   enable_opaque_panel=yes
14584 else
14585   enable_opaque_panel=no
14586 fi;
14587 echo "$as_me:14587: result: $enable_opaque_panel" >&5
14588 echo "${ECHO_T}$enable_opaque_panel" >&6
14589
14590 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
14591 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
14592 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
14593 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
14594
14595 ### Allow using a different wrap-prefix
14596 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
14597         echo "$as_me:14597: checking for prefix used to wrap public variables" >&5
14598 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
14599
14600 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
14601 if test "${with_wrap_prefix+set}" = set; then
14602   withval="$with_wrap_prefix"
14603   NCURSES_WRAP_PREFIX=$withval
14604 else
14605   NCURSES_WRAP_PREFIX=_nc_
14606 fi;
14607         echo "$as_me:14607: result: $NCURSES_WRAP_PREFIX" >&5
14608 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14609 else
14610         NCURSES_WRAP_PREFIX=_nc_
14611 fi
14612
14613 cat >>confdefs.h <<EOF
14614 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
14615 EOF
14616
14617 ###############################################################################
14618 # These options are relatively safe to experiment with.
14619
14620 echo "$as_me:14620: checking if you want all development code" >&5
14621 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
14622
14623 # Check whether --with-develop or --without-develop was given.
14624 if test "${with_develop+set}" = set; then
14625   withval="$with_develop"
14626   with_develop=$withval
14627 else
14628   with_develop=no
14629 fi;
14630 echo "$as_me:14630: result: $with_develop" >&5
14631 echo "${ECHO_T}$with_develop" >&6
14632
14633 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
14634 echo "$as_me:14634: checking if you want hard-tabs code" >&5
14635 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
14636
14637 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
14638 if test "${enable_hard_tabs+set}" = set; then
14639   enableval="$enable_hard_tabs"
14640
14641 else
14642   enable_hard_tabs=$with_develop
14643 fi;
14644 echo "$as_me:14644: result: $enable_hard_tabs" >&5
14645 echo "${ECHO_T}$enable_hard_tabs" >&6
14646 test "x$enable_hard_tabs" = xyes &&
14647 cat >>confdefs.h <<\EOF
14648 #define USE_HARD_TABS 1
14649 EOF
14650
14651 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
14652 echo "$as_me:14652: checking if you want limited support for xmc" >&5
14653 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
14654
14655 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
14656 if test "${enable_xmc_glitch+set}" = set; then
14657   enableval="$enable_xmc_glitch"
14658
14659 else
14660   enable_xmc_glitch=$with_develop
14661 fi;
14662 echo "$as_me:14662: result: $enable_xmc_glitch" >&5
14663 echo "${ECHO_T}$enable_xmc_glitch" >&6
14664 test "x$enable_xmc_glitch" = xyes &&
14665 cat >>confdefs.h <<\EOF
14666 #define USE_XMC_SUPPORT 1
14667 EOF
14668
14669 ###############################################################################
14670 # These are just experimental, probably should not be in a package:
14671
14672 echo "$as_me:14672: checking if you do not want to assume colors are white-on-black" >&5
14673 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
14674
14675 # Check whether --enable-assumed-color or --disable-assumed-color was given.
14676 if test "${enable_assumed_color+set}" = set; then
14677   enableval="$enable_assumed_color"
14678   with_assumed_color=$enableval
14679 else
14680   with_assumed_color=yes
14681 fi;
14682 echo "$as_me:14682: result: $with_assumed_color" >&5
14683 echo "${ECHO_T}$with_assumed_color" >&6
14684 test "x$with_assumed_color" = xyes &&
14685 cat >>confdefs.h <<\EOF
14686 #define USE_ASSUMED_COLOR 1
14687 EOF
14688
14689 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
14690 echo "$as_me:14690: checking if you want hashmap scrolling-optimization code" >&5
14691 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
14692
14693 # Check whether --enable-hashmap or --disable-hashmap was given.
14694 if test "${enable_hashmap+set}" = set; then
14695   enableval="$enable_hashmap"
14696   with_hashmap=$enableval
14697 else
14698   with_hashmap=yes
14699 fi;
14700 echo "$as_me:14700: result: $with_hashmap" >&5
14701 echo "${ECHO_T}$with_hashmap" >&6
14702 test "x$with_hashmap" = xyes &&
14703 cat >>confdefs.h <<\EOF
14704 #define USE_HASHMAP 1
14705 EOF
14706
14707 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
14708 echo "$as_me:14708: checking if you want colorfgbg code" >&5
14709 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
14710
14711 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
14712 if test "${enable_colorfgbg+set}" = set; then
14713   enableval="$enable_colorfgbg"
14714   with_colorfgbg=$enableval
14715 else
14716   with_colorfgbg=no
14717 fi;
14718 echo "$as_me:14718: result: $with_colorfgbg" >&5
14719 echo "${ECHO_T}$with_colorfgbg" >&6
14720 test "x$with_colorfgbg" = xyes &&
14721 cat >>confdefs.h <<\EOF
14722 #define USE_COLORFGBG 1
14723 EOF
14724
14725 ###   use option --enable-interop to turn on use of bindings used for interop
14726 echo "$as_me:14726: checking if you want interop bindings" >&5
14727 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
14728
14729 # Check whether --enable-interop or --disable-interop was given.
14730 if test "${enable_interop+set}" = set; then
14731   enableval="$enable_interop"
14732   with_exp_interop=$enableval
14733 else
14734   with_exp_interop=$cf_dft_interop
14735 fi;
14736 echo "$as_me:14736: result: $with_exp_interop" >&5
14737 echo "${ECHO_T}$with_exp_interop" >&6
14738
14739 NCURSES_INTEROP_FUNCS=0
14740 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
14741
14742 echo "$as_me:14742: checking if you want experimental safe-sprintf code" >&5
14743 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
14744
14745 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
14746 if test "${enable_safe_sprintf+set}" = set; then
14747   enableval="$enable_safe_sprintf"
14748   with_safe_sprintf=$enableval
14749 else
14750   with_safe_sprintf=no
14751 fi;
14752 echo "$as_me:14752: result: $with_safe_sprintf" >&5
14753 echo "${ECHO_T}$with_safe_sprintf" >&6
14754
14755 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
14756 # when hashmap is used scroll hints are useless
14757 if test "$with_hashmap" = no ; then
14758 echo "$as_me:14758: checking if you want to experiment without scrolling-hints code" >&5
14759 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
14760
14761 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
14762 if test "${enable_scroll_hints+set}" = set; then
14763   enableval="$enable_scroll_hints"
14764   with_scroll_hints=$enableval
14765 else
14766   with_scroll_hints=yes
14767 fi;
14768 echo "$as_me:14768: result: $with_scroll_hints" >&5
14769 echo "${ECHO_T}$with_scroll_hints" >&6
14770 test "x$with_scroll_hints" = xyes &&
14771 cat >>confdefs.h <<\EOF
14772 #define USE_SCROLL_HINTS 1
14773 EOF
14774
14775 fi
14776
14777 echo "$as_me:14777: checking if you want wgetch-events code" >&5
14778 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
14779
14780 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
14781 if test "${enable_wgetch_events+set}" = set; then
14782   enableval="$enable_wgetch_events"
14783   with_wgetch_events=$enableval
14784 else
14785   with_wgetch_events=no
14786 fi;
14787 echo "$as_me:14787: result: $with_wgetch_events" >&5
14788 echo "${ECHO_T}$with_wgetch_events" >&6
14789 test "x$with_wgetch_events" = xyes &&
14790 cat >>confdefs.h <<\EOF
14791 #define NCURSES_WGETCH_EVENTS 1
14792 EOF
14793
14794 ###############################################################################
14795
14796 ###     use option --disable-echo to suppress full display compiling commands
14797
14798 echo "$as_me:14798: checking if you want to see long compiling messages" >&5
14799 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
14800
14801 # Check whether --enable-echo or --disable-echo was given.
14802 if test "${enable_echo+set}" = set; then
14803   enableval="$enable_echo"
14804   test "$enableval" != no && enableval=yes
14805         if test "$enableval" != "yes" ; then
14806
14807         ECHO_LT='--silent'
14808         ECHO_LD='@echo linking $@;'
14809         RULE_CC='@echo compiling $<'
14810         SHOW_CC='@echo compiling $@'
14811         ECHO_CC='@'
14812
14813         else
14814
14815         ECHO_LT=''
14816         ECHO_LD=''
14817         RULE_CC=''
14818         SHOW_CC=''
14819         ECHO_CC=''
14820
14821         fi
14822 else
14823   enableval=yes
14824
14825         ECHO_LT=''
14826         ECHO_LD=''
14827         RULE_CC=''
14828         SHOW_CC=''
14829         ECHO_CC=''
14830
14831 fi;
14832 echo "$as_me:14832: result: $enableval" >&5
14833 echo "${ECHO_T}$enableval" >&6
14834
14835 if test "x$enable_echo" = xyes; then
14836         ECHO_LINK=
14837 else
14838         ECHO_LINK='@ echo linking $@ ... ;'
14839         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
14840         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
14841 fi
14842
14843 # --disable-stripping is used for debugging
14844
14845 echo "$as_me:14845: checking if you want to install stripped executables" >&5
14846 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
14847
14848 # Check whether --enable-stripping or --disable-stripping was given.
14849 if test "${enable_stripping+set}" = set; then
14850   enableval="$enable_stripping"
14851   test "$enableval" != no && enableval=yes
14852         if test "$enableval" != "yes" ; then
14853     with_stripping=no
14854         else
14855                 with_stripping=yes
14856         fi
14857 else
14858   enableval=yes
14859         with_stripping=yes
14860
14861 fi;
14862 echo "$as_me:14862: result: $with_stripping" >&5
14863 echo "${ECHO_T}$with_stripping" >&6
14864
14865 if test "$with_stripping" = yes
14866 then
14867         INSTALL_OPT_S="-s"
14868 else
14869         INSTALL_OPT_S=
14870 fi
14871
14872 : ${INSTALL:=install}
14873 echo "$as_me:14873: checking if install accepts -p option" >&5
14874 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
14875 if test "${cf_cv_install_p+set}" = set; then
14876   echo $ECHO_N "(cached) $ECHO_C" >&6
14877 else
14878
14879         rm -rf conftest*
14880         date >conftest.in
14881         mkdir conftest.out
14882         sleep 3
14883         if $INSTALL -p conftest.in conftest.out 2>/dev/null
14884         then
14885                 if test -f conftest.out/conftest.in
14886                 then
14887                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
14888                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
14889                         if test -s conftest.err
14890                         then
14891                                 cf_cv_install_p=no
14892                         else
14893                                 cf_cv_install_p=yes
14894                         fi
14895                 else
14896                         cf_cv_install_p=no
14897                 fi
14898         else
14899                 cf_cv_install_p=no
14900         fi
14901         rm -rf conftest*
14902
14903 fi
14904 echo "$as_me:14904: result: $cf_cv_install_p" >&5
14905 echo "${ECHO_T}$cf_cv_install_p" >&6
14906
14907 echo "$as_me:14907: checking if install needs to be told about ownership" >&5
14908 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
14909 case `$ac_config_guess` in
14910 (*minix)
14911         with_install_o=yes
14912         ;;
14913 (*)
14914         with_install_o=no
14915         ;;
14916 esac
14917
14918 echo "$as_me:14918: result: $with_install_o" >&5
14919 echo "${ECHO_T}$with_install_o" >&6
14920 if test "x$with_install_o" = xyes
14921 then
14922         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'`
14923 else
14924         INSTALL_OPT_O=
14925 fi
14926
14927 # If we're avoiding relinking of shared libraries during install, that is to
14928 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
14929 # the install program has "-p" (for preserving timestamps).
14930 cf_cv_do_reranlib=yes
14931 if test "x$cf_cv_install_p" = xyes
14932 then
14933         if test "x$cf_cv_do_relink" != xyes
14934         then
14935                 cf_cv_do_reranlib=no
14936                 INSTALL_OPT_P="-p"
14937                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
14938         fi
14939 fi
14940
14941 ###     use option --enable-warnings to turn on all gcc warnings
14942 echo "$as_me:14942: checking if you want to see compiler warnings" >&5
14943 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
14944
14945 # Check whether --enable-warnings or --disable-warnings was given.
14946 if test "${enable_warnings+set}" = set; then
14947   enableval="$enable_warnings"
14948   with_warnings=$enableval
14949 fi;
14950 echo "$as_me:14950: result: $with_warnings" >&5
14951 echo "${ECHO_T}$with_warnings" >&6
14952
14953 if test "x$with_warnings" = "xyes"; then
14954
14955         ADAFLAGS="$ADAFLAGS -gnatg"
14956
14957 INTEL_COMPILER=no
14958
14959 if test "$GCC" = yes ; then
14960         case $host_os in
14961         (linux*|gnu*)
14962                 echo "$as_me:14962: checking if this is really Intel C compiler" >&5
14963 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
14964                 cf_save_CFLAGS="$CFLAGS"
14965                 CFLAGS="$CFLAGS -no-gcc"
14966                 cat >conftest.$ac_ext <<_ACEOF
14967 #line 14967 "configure"
14968 #include "confdefs.h"
14969
14970 int
14971 main (void)
14972 {
14973
14974 #ifdef __INTEL_COMPILER
14975 #else
14976 make an error
14977 #endif
14978
14979   ;
14980   return 0;
14981 }
14982 _ACEOF
14983 rm -f conftest.$ac_objext
14984 if { (eval echo "$as_me:14984: \"$ac_compile\"") >&5
14985   (eval $ac_compile) 2>&5
14986   ac_status=$?
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit $ac_status); } &&
14989          { ac_try='test -s conftest.$ac_objext'
14990   { (eval echo "$as_me:14990: \"$ac_try\"") >&5
14991   (eval $ac_try) 2>&5
14992   ac_status=$?
14993   echo "$as_me:14993: \$? = $ac_status" >&5
14994   (exit $ac_status); }; }; then
14995   INTEL_COMPILER=yes
14996 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
14997
14998 else
14999   echo "$as_me: failed program was:" >&5
15000 cat conftest.$ac_ext >&5
15001 fi
15002 rm -f conftest.$ac_objext conftest.$ac_ext
15003                 CFLAGS="$cf_save_CFLAGS"
15004                 echo "$as_me:15004: result: $INTEL_COMPILER" >&5
15005 echo "${ECHO_T}$INTEL_COMPILER" >&6
15006                 ;;
15007         esac
15008 fi
15009
15010 CLANG_COMPILER=no
15011
15012 if test "$GCC" = yes ; then
15013         echo "$as_me:15013: checking if this is really Clang C compiler" >&5
15014 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
15015         cf_save_CFLAGS="$CFLAGS"
15016         CFLAGS="$CFLAGS -Qunused-arguments"
15017         cat >conftest.$ac_ext <<_ACEOF
15018 #line 15018 "configure"
15019 #include "confdefs.h"
15020
15021 int
15022 main (void)
15023 {
15024
15025 #ifdef __clang__
15026 #else
15027 make an error
15028 #endif
15029
15030   ;
15031   return 0;
15032 }
15033 _ACEOF
15034 rm -f conftest.$ac_objext
15035 if { (eval echo "$as_me:15035: \"$ac_compile\"") >&5
15036   (eval $ac_compile) 2>&5
15037   ac_status=$?
15038   echo "$as_me:15038: \$? = $ac_status" >&5
15039   (exit $ac_status); } &&
15040          { ac_try='test -s conftest.$ac_objext'
15041   { (eval echo "$as_me:15041: \"$ac_try\"") >&5
15042   (eval $ac_try) 2>&5
15043   ac_status=$?
15044   echo "$as_me:15044: \$? = $ac_status" >&5
15045   (exit $ac_status); }; }; then
15046   CLANG_COMPILER=yes
15047 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15048
15049 else
15050   echo "$as_me: failed program was:" >&5
15051 cat conftest.$ac_ext >&5
15052 fi
15053 rm -f conftest.$ac_objext conftest.$ac_ext
15054         CFLAGS="$cf_save_CFLAGS"
15055         echo "$as_me:15055: result: $CLANG_COMPILER" >&5
15056 echo "${ECHO_T}$CLANG_COMPILER" >&6
15057 fi
15058
15059 cat > conftest.$ac_ext <<EOF
15060 #line 15060 "${as_me:-configure}"
15061 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15062 EOF
15063
15064 if test "$INTEL_COMPILER" = yes
15065 then
15066 # The "-wdXXX" options suppress warnings:
15067 # remark #1419: external declaration in primary source file
15068 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15069 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15070 # remark #193: zero used for undefined preprocessing identifier
15071 # remark #593: variable "curs_sb_left_arrow" was set but never used
15072 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15073 # remark #869: parameter "tw" was never referenced
15074 # remark #981: operands are evaluated in unspecified order
15075 # warning #279: controlling expression is constant
15076
15077         { echo "$as_me:15077: checking for $CC warning options..." >&5
15078 echo "$as_me: checking for $CC warning options..." >&6;}
15079         cf_save_CFLAGS="$CFLAGS"
15080         EXTRA_CFLAGS="-Wall"
15081         for cf_opt in \
15082                 wd1419 \
15083                 wd1683 \
15084                 wd1684 \
15085                 wd193 \
15086                 wd593 \
15087                 wd279 \
15088                 wd810 \
15089                 wd869 \
15090                 wd981
15091         do
15092                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15093                 if { (eval echo "$as_me:15093: \"$ac_compile\"") >&5
15094   (eval $ac_compile) 2>&5
15095   ac_status=$?
15096   echo "$as_me:15096: \$? = $ac_status" >&5
15097   (exit $ac_status); }; then
15098                         test -n "$verbose" && echo "$as_me:15098: result: ... -$cf_opt" >&5
15099 echo "${ECHO_T}... -$cf_opt" >&6
15100                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15101                 fi
15102         done
15103         CFLAGS="$cf_save_CFLAGS"
15104
15105 elif test "$GCC" = yes
15106 then
15107         { echo "$as_me:15107: checking for $CC warning options..." >&5
15108 echo "$as_me: checking for $CC warning options..." >&6;}
15109         cf_save_CFLAGS="$CFLAGS"
15110         EXTRA_CFLAGS=
15111         cf_warn_CONST=""
15112         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
15113         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
15114         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
15115         for cf_opt in W Wall \
15116                 Wbad-function-cast \
15117                 Wcast-align \
15118                 Wcast-qual \
15119                 Wdeclaration-after-statement \
15120                 Wextra \
15121                 Winline \
15122                 Wmissing-declarations \
15123                 Wmissing-prototypes \
15124                 Wnested-externs \
15125                 Wpointer-arith \
15126                 Wshadow \
15127                 Wstrict-prototypes \
15128                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
15129         do
15130                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
15131                 if { (eval echo "$as_me:15131: \"$ac_compile\"") >&5
15132   (eval $ac_compile) 2>&5
15133   ac_status=$?
15134   echo "$as_me:15134: \$? = $ac_status" >&5
15135   (exit $ac_status); }; then
15136                         test -n "$verbose" && echo "$as_me:15136: result: ... -$cf_opt" >&5
15137 echo "${ECHO_T}... -$cf_opt" >&6
15138                         case $cf_opt in
15139                         (Wcast-qual)
15140
15141         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15142         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
15143
15144                                 ;;
15145                         (Winline)
15146                                 case $GCC_VERSION in
15147                                 ([34].*)
15148                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15149
15150 echo "${as_me:-configure}:15150: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15151
15152                                         continue;;
15153                                 esac
15154                                 ;;
15155                         (Wpointer-arith)
15156                                 case $GCC_VERSION in
15157                                 ([12].*)
15158                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
15159
15160 echo "${as_me:-configure}:15160: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
15161
15162                                         continue;;
15163                                 esac
15164                                 ;;
15165                         esac
15166                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
15167                 fi
15168         done
15169         CFLAGS="$cf_save_CFLAGS"
15170 fi
15171 rm -rf conftest*
15172
15173         if test "x$cf_with_cxx" = xyes ; then
15174
15175 INTEL_CPLUSPLUS=no
15176
15177 if test "$GCC" = yes ; then
15178         case $host_os in
15179         (linux*|gnu*)
15180                 echo "$as_me:15180: checking if this is really Intel C++ compiler" >&5
15181 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
15182                 cf_save_CFLAGS="$CXXFLAGS"
15183                 CXXFLAGS="$CXXFLAGS -no-gcc"
15184                 cat >conftest.$ac_ext <<_ACEOF
15185 #line 15185 "configure"
15186 #include "confdefs.h"
15187
15188 int
15189 main (void)
15190 {
15191
15192 #ifdef __INTEL_COMPILER
15193 #else
15194 make an error
15195 #endif
15196
15197   ;
15198   return 0;
15199 }
15200 _ACEOF
15201 rm -f conftest.$ac_objext
15202 if { (eval echo "$as_me:15202: \"$ac_compile\"") >&5
15203   (eval $ac_compile) 2>&5
15204   ac_status=$?
15205   echo "$as_me:15205: \$? = $ac_status" >&5
15206   (exit $ac_status); } &&
15207          { ac_try='test -s conftest.$ac_objext'
15208   { (eval echo "$as_me:15208: \"$ac_try\"") >&5
15209   (eval $ac_try) 2>&5
15210   ac_status=$?
15211   echo "$as_me:15211: \$? = $ac_status" >&5
15212   (exit $ac_status); }; }; then
15213   INTEL_CPLUSPLUS=yes
15214 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
15215
15216 else
15217   echo "$as_me: failed program was:" >&5
15218 cat conftest.$ac_ext >&5
15219 fi
15220 rm -f conftest.$ac_objext conftest.$ac_ext
15221                 CXXFLAGS="$cf_save_CFLAGS"
15222                 echo "$as_me:15222: result: $INTEL_CPLUSPLUS" >&5
15223 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
15224                 ;;
15225         esac
15226 fi
15227
15228 CLANG_CPLUSPLUS=no
15229
15230 if test "$GCC" = yes ; then
15231         echo "$as_me:15231: checking if this is really Clang C++ compiler" >&5
15232 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
15233         cf_save_CFLAGS="$CXXFLAGS"
15234         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
15235         cat >conftest.$ac_ext <<_ACEOF
15236 #line 15236 "configure"
15237 #include "confdefs.h"
15238
15239 int
15240 main (void)
15241 {
15242
15243 #ifdef __clang__
15244 #else
15245 make an error
15246 #endif
15247
15248   ;
15249   return 0;
15250 }
15251 _ACEOF
15252 rm -f conftest.$ac_objext
15253 if { (eval echo "$as_me:15253: \"$ac_compile\"") >&5
15254   (eval $ac_compile) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); } &&
15258          { ac_try='test -s conftest.$ac_objext'
15259   { (eval echo "$as_me:15259: \"$ac_try\"") >&5
15260   (eval $ac_try) 2>&5
15261   ac_status=$?
15262   echo "$as_me:15262: \$? = $ac_status" >&5
15263   (exit $ac_status); }; }; then
15264   CLANG_CPLUSPLUS=yes
15265 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
15266
15267 else
15268   echo "$as_me: failed program was:" >&5
15269 cat conftest.$ac_ext >&5
15270 fi
15271 rm -f conftest.$ac_objext conftest.$ac_ext
15272         CXXFLAGS="$cf_save_CFLAGS"
15273         echo "$as_me:15273: result: $CLANG_CPLUSPLUS" >&5
15274 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
15275 fi
15276
15277 ac_ext=cc
15278 ac_cpp='$CXXCPP $CPPFLAGS'
15279 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15280 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15281 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15282 ac_main_return=return
15283
15284 cat > conftest.$ac_ext <<EOF
15285 #line 15285 "configure"
15286 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
15287 EOF
15288
15289 if test "$INTEL_CPLUSPLUS" = yes
15290 then
15291 # The "-wdXXX" options suppress warnings:
15292 # remark #1419: external declaration in primary source file
15293 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15294 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
15295 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
15296 # remark #193: zero used for undefined preprocessing identifier
15297 # remark #593: variable "curs_sb_left_arrow" was set but never used
15298 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
15299 # remark #869: parameter "tw" was never referenced
15300 # remark #981: operands are evaluated in unspecified order
15301 # warning #269: invalid format string conversion
15302
15303         { echo "$as_me:15303: checking for $CC warning options..." >&5
15304 echo "$as_me: checking for $CC warning options..." >&6;}
15305         cf_save_CXXFLAGS="$CXXFLAGS"
15306         EXTRA_CXXFLAGS="-Wall"
15307         for cf_opt in \
15308                 wd1419 \
15309                 wd1682 \
15310                 wd1683 \
15311                 wd1684 \
15312                 wd193 \
15313                 wd279 \
15314                 wd593 \
15315                 wd810 \
15316                 wd869 \
15317                 wd981
15318         do
15319                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
15320                 if { (eval echo "$as_me:15320: \"$ac_compile\"") >&5
15321   (eval $ac_compile) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); }; then
15325                         test -n "$verbose" && echo "$as_me:15325: result: ... -$cf_opt" >&5
15326 echo "${ECHO_T}... -$cf_opt" >&6
15327                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15328                 fi
15329         done
15330         CXXFLAGS="$cf_save_CXXFLAGS"
15331
15332 elif test "$GXX" = yes
15333 then
15334         { echo "$as_me:15334: checking for $CXX warning options..." >&5
15335 echo "$as_me: checking for $CXX warning options..." >&6;}
15336         cf_save_CXXFLAGS="$CXXFLAGS"
15337         EXTRA_CXXFLAGS="-W -Wall"
15338         cf_gxx_extra_warnings=""
15339         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
15340         case "$GCC_VERSION" in
15341         ([1-2].*)
15342                 ;;
15343         (*)
15344                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
15345                 ;;
15346         esac
15347         for cf_opt in \
15348                 Wabi \
15349                 fabi-version=0 \
15350                 Wextra \
15351                 Wignored-qualifiers \
15352                 Wlogical-op \
15353                 Woverloaded-virtual \
15354                 Wsign-promo \
15355                 Wsynth \
15356                 Wold-style-cast \
15357                 Wcast-align \
15358                 Wcast-qual \
15359                 Wpointer-arith \
15360                 Wshadow \
15361                 Wundef $cf_gxx_extra_warnings Wno-unused
15362         do
15363                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
15364                 if { (eval echo "$as_me:15364: \"$ac_compile\"") >&5
15365   (eval $ac_compile) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); }; then
15369                         test -n "$verbose" && echo "$as_me:15369: result: ... -$cf_opt" >&5
15370 echo "${ECHO_T}... -$cf_opt" >&6
15371                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
15372                 else
15373                         test -n "$verbose" && echo "$as_me:15373: result: ... no -$cf_opt" >&5
15374 echo "${ECHO_T}... no -$cf_opt" >&6
15375                 fi
15376         done
15377         CXXFLAGS="$cf_save_CXXFLAGS"
15378 fi
15379
15380 rm -rf conftest*
15381 ac_ext=c
15382 ac_cpp='$CPP $CPPFLAGS'
15383 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15384 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15385 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15386 ac_main_return=return
15387
15388         fi
15389 fi
15390
15391 if test "$GCC" = yes
15392 then
15393 cat > conftest.i <<EOF
15394 #ifndef GCC_PRINTF
15395 #define GCC_PRINTF 0
15396 #endif
15397 #ifndef GCC_SCANF
15398 #define GCC_SCANF 0
15399 #endif
15400 #ifndef GCC_NORETURN
15401 #define GCC_NORETURN /* nothing */
15402 #endif
15403 #ifndef GCC_UNUSED
15404 #define GCC_UNUSED /* nothing */
15405 #endif
15406 EOF
15407 if test "$GCC" = yes
15408 then
15409         { echo "$as_me:15409: checking for $CC __attribute__ directives..." >&5
15410 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
15411 cat > conftest.$ac_ext <<EOF
15412 #line 15412 "${as_me:-configure}"
15413 #include "confdefs.h"
15414 #include "conftest.h"
15415 #include "conftest.i"
15416 #if     GCC_PRINTF
15417 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
15418 #else
15419 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
15420 #endif
15421 #if     GCC_SCANF
15422 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
15423 #else
15424 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
15425 #endif
15426 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
15427 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
15428 extern void foo(void) GCC_NORETURN;
15429 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
15430 EOF
15431         cf_printf_attribute=no
15432         cf_scanf_attribute=no
15433         for cf_attribute in scanf printf unused noreturn
15434         do
15435
15436 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15437
15438                 cf_directive="__attribute__(($cf_attribute))"
15439                 echo "checking for $CC $cf_directive" 1>&5
15440
15441                 case $cf_attribute in
15442                 (printf)
15443                         cf_printf_attribute=yes
15444                         cat >conftest.h <<EOF
15445 #define GCC_$cf_ATTRIBUTE 1
15446 EOF
15447                         ;;
15448                 (scanf)
15449                         cf_scanf_attribute=yes
15450                         cat >conftest.h <<EOF
15451 #define GCC_$cf_ATTRIBUTE 1
15452 EOF
15453                         ;;
15454                 (*)
15455                         cat >conftest.h <<EOF
15456 #define GCC_$cf_ATTRIBUTE $cf_directive
15457 EOF
15458                         ;;
15459                 esac
15460
15461                 if { (eval echo "$as_me:15461: \"$ac_compile\"") >&5
15462   (eval $ac_compile) 2>&5
15463   ac_status=$?
15464   echo "$as_me:15464: \$? = $ac_status" >&5
15465   (exit $ac_status); }; then
15466                         test -n "$verbose" && echo "$as_me:15466: result: ... $cf_attribute" >&5
15467 echo "${ECHO_T}... $cf_attribute" >&6
15468                         cat conftest.h >>confdefs.h
15469                         case $cf_attribute in
15470                         (noreturn)
15471
15472 cat >>confdefs.h <<EOF
15473 #define GCC_NORETURN $cf_directive
15474 EOF
15475
15476                                 ;;
15477                         (printf)
15478                                 cf_value='/* nothing */'
15479                                 if test "$cf_printf_attribute" != no ; then
15480                                         cf_value='__attribute__((format(printf,fmt,var)))'
15481
15482 cat >>confdefs.h <<\EOF
15483 #define GCC_PRINTF 1
15484 EOF
15485
15486                                 fi
15487
15488 cat >>confdefs.h <<EOF
15489 #define GCC_PRINTFLIKE(fmt,var) $cf_value
15490 EOF
15491
15492                                 ;;
15493                         (scanf)
15494                                 cf_value='/* nothing */'
15495                                 if test "$cf_scanf_attribute" != no ; then
15496                                         cf_value='__attribute__((format(scanf,fmt,var)))'
15497
15498 cat >>confdefs.h <<\EOF
15499 #define GCC_SCANF 1
15500 EOF
15501
15502                                 fi
15503
15504 cat >>confdefs.h <<EOF
15505 #define GCC_SCANFLIKE(fmt,var) $cf_value
15506 EOF
15507
15508                                 ;;
15509                         (unused)
15510
15511 cat >>confdefs.h <<EOF
15512 #define GCC_UNUSED $cf_directive
15513 EOF
15514
15515                                 ;;
15516                         esac
15517                 fi
15518         done
15519 else
15520         fgrep define conftest.i >>confdefs.h
15521 fi
15522 rm -rf conftest*
15523 fi
15524
15525 echo "$as_me:15525: checking if you want to work around bogus compiler/loader warnings" >&5
15526 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
15527
15528 # Check whether --enable-string-hacks or --disable-string-hacks was given.
15529 if test "${enable_string_hacks+set}" = set; then
15530   enableval="$enable_string_hacks"
15531   with_string_hacks=$enableval
15532 else
15533   with_string_hacks=no
15534 fi;
15535 echo "$as_me:15535: result: $with_string_hacks" >&5
15536 echo "${ECHO_T}$with_string_hacks" >&6
15537
15538 if test "x$with_string_hacks" = "xyes"; then
15539
15540 cat >>confdefs.h <<\EOF
15541 #define USE_STRING_HACKS 1
15542 EOF
15543
15544         { echo "$as_me:15544: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
15545 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
15546         echo "$as_me:15546: checking for strlcat" >&5
15547 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
15548 if test "${ac_cv_func_strlcat+set}" = set; then
15549   echo $ECHO_N "(cached) $ECHO_C" >&6
15550 else
15551   cat >conftest.$ac_ext <<_ACEOF
15552 #line 15552 "configure"
15553 #include "confdefs.h"
15554 #define strlcat autoconf_temporary
15555 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15556 #undef strlcat
15557
15558 #ifdef __cplusplus
15559 extern "C"
15560 #endif
15561
15562 /* We use char because int might match the return type of a gcc2
15563    builtin and then its argument prototype would still apply.  */
15564 char strlcat (void);
15565
15566 int
15567 main (void)
15568 {
15569
15570 /* The GNU C library defines stubs for functions which it implements
15571     to always fail with ENOSYS.  Some functions are actually named
15572     something starting with __ and the normal name is an alias.  */
15573 #if defined (__stub_strlcat) || defined (__stub___strlcat)
15574 #error found stub for strlcat
15575 #endif
15576
15577         return strlcat ();
15578   ;
15579   return 0;
15580 }
15581 _ACEOF
15582 rm -f conftest.$ac_objext conftest$ac_exeext
15583 if { (eval echo "$as_me:15583: \"$ac_link\"") >&5
15584   (eval $ac_link) 2>&5
15585   ac_status=$?
15586   echo "$as_me:15586: \$? = $ac_status" >&5
15587   (exit $ac_status); } &&
15588          { ac_try='test -s conftest$ac_exeext'
15589   { (eval echo "$as_me:15589: \"$ac_try\"") >&5
15590   (eval $ac_try) 2>&5
15591   ac_status=$?
15592   echo "$as_me:15592: \$? = $ac_status" >&5
15593   (exit $ac_status); }; }; then
15594   ac_cv_func_strlcat=yes
15595 else
15596   echo "$as_me: failed program was:" >&5
15597 cat conftest.$ac_ext >&5
15598 ac_cv_func_strlcat=no
15599 fi
15600 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15601 fi
15602 echo "$as_me:15602: result: $ac_cv_func_strlcat" >&5
15603 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
15604 if test $ac_cv_func_strlcat = yes; then
15605
15606 cat >>confdefs.h <<\EOF
15607 #define HAVE_STRLCAT 1
15608 EOF
15609
15610 else
15611
15612                 echo "$as_me:15612: checking for strlcat in -lbsd" >&5
15613 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
15614 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
15615   echo $ECHO_N "(cached) $ECHO_C" >&6
15616 else
15617   ac_check_lib_save_LIBS=$LIBS
15618 LIBS="-lbsd  $LIBS"
15619 cat >conftest.$ac_ext <<_ACEOF
15620 #line 15620 "configure"
15621 #include "confdefs.h"
15622
15623 /* Override any gcc2 internal prototype to avoid an error.  */
15624 #ifdef __cplusplus
15625 extern "C"
15626 #endif
15627 /* We use char because int might match the return type of a gcc2
15628    builtin and then its argument prototype would still apply.  */
15629 char strlcat ();
15630 int
15631 main (void)
15632 {
15633 strlcat ();
15634   ;
15635   return 0;
15636 }
15637 _ACEOF
15638 rm -f conftest.$ac_objext conftest$ac_exeext
15639 if { (eval echo "$as_me:15639: \"$ac_link\"") >&5
15640   (eval $ac_link) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); } &&
15644          { ac_try='test -s conftest$ac_exeext'
15645   { (eval echo "$as_me:15645: \"$ac_try\"") >&5
15646   (eval $ac_try) 2>&5
15647   ac_status=$?
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); }; }; then
15650   ac_cv_lib_bsd_strlcat=yes
15651 else
15652   echo "$as_me: failed program was:" >&5
15653 cat conftest.$ac_ext >&5
15654 ac_cv_lib_bsd_strlcat=no
15655 fi
15656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15657 LIBS=$ac_check_lib_save_LIBS
15658 fi
15659 echo "$as_me:15659: result: $ac_cv_lib_bsd_strlcat" >&5
15660 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
15661 if test $ac_cv_lib_bsd_strlcat = yes; then
15662
15663 cf_add_libs="-lbsd"
15664 # Filter out duplicates - this happens with badly-designed ".pc" files...
15665 for cf_add_1lib in $LIBS
15666 do
15667         for cf_add_2lib in $cf_add_libs
15668         do
15669                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15670                 then
15671                         cf_add_1lib=
15672                         break
15673                 fi
15674         done
15675         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15676 done
15677 LIBS="$cf_add_libs"
15678
15679 for ac_header in bsd/string.h
15680 do
15681 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15682 echo "$as_me:15682: checking for $ac_header" >&5
15683 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15684 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15685   echo $ECHO_N "(cached) $ECHO_C" >&6
15686 else
15687   cat >conftest.$ac_ext <<_ACEOF
15688 #line 15688 "configure"
15689 #include "confdefs.h"
15690 #include <$ac_header>
15691 _ACEOF
15692 if { (eval echo "$as_me:15692: \"$ac_cpp conftest.$ac_ext\"") >&5
15693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15694   ac_status=$?
15695   egrep -v '^ *\+' conftest.er1 >conftest.err
15696   rm -f conftest.er1
15697   cat conftest.err >&5
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); } >/dev/null; then
15700   if test -s conftest.err; then
15701     ac_cpp_err=$ac_c_preproc_warn_flag
15702   else
15703     ac_cpp_err=
15704   fi
15705 else
15706   ac_cpp_err=yes
15707 fi
15708 if test -z "$ac_cpp_err"; then
15709   eval "$as_ac_Header=yes"
15710 else
15711   echo "$as_me: failed program was:" >&5
15712   cat conftest.$ac_ext >&5
15713   eval "$as_ac_Header=no"
15714 fi
15715 rm -f conftest.err conftest.$ac_ext
15716 fi
15717 echo "$as_me:15717: result: `eval echo '${'$as_ac_Header'}'`" >&5
15718 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15719 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15720   cat >>confdefs.h <<EOF
15721 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15722 EOF
15723
15724 fi
15725 done
15726
15727 cat >>confdefs.h <<\EOF
15728 #define HAVE_STRLCAT 1
15729 EOF
15730
15731 fi
15732
15733 fi
15734
15735 for ac_func in strlcpy snprintf
15736 do
15737 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15738 echo "$as_me:15738: checking for $ac_func" >&5
15739 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15740 if eval "test \"\${$as_ac_var+set}\" = set"; then
15741   echo $ECHO_N "(cached) $ECHO_C" >&6
15742 else
15743   cat >conftest.$ac_ext <<_ACEOF
15744 #line 15744 "configure"
15745 #include "confdefs.h"
15746 #define $ac_func autoconf_temporary
15747 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15748 #undef $ac_func
15749
15750 #ifdef __cplusplus
15751 extern "C"
15752 #endif
15753
15754 /* We use char because int might match the return type of a gcc2
15755    builtin and then its argument prototype would still apply.  */
15756 char $ac_func (void);
15757
15758 int
15759 main (void)
15760 {
15761
15762 /* The GNU C library defines stubs for functions which it implements
15763     to always fail with ENOSYS.  Some functions are actually named
15764     something starting with __ and the normal name is an alias.  */
15765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15766 #error found stub for $ac_func
15767 #endif
15768
15769         return $ac_func ();
15770   ;
15771   return 0;
15772 }
15773 _ACEOF
15774 rm -f conftest.$ac_objext conftest$ac_exeext
15775 if { (eval echo "$as_me:15775: \"$ac_link\"") >&5
15776   (eval $ac_link) 2>&5
15777   ac_status=$?
15778   echo "$as_me:15778: \$? = $ac_status" >&5
15779   (exit $ac_status); } &&
15780          { ac_try='test -s conftest$ac_exeext'
15781   { (eval echo "$as_me:15781: \"$ac_try\"") >&5
15782   (eval $ac_try) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); }; }; then
15786   eval "$as_ac_var=yes"
15787 else
15788   echo "$as_me: failed program was:" >&5
15789 cat conftest.$ac_ext >&5
15790 eval "$as_ac_var=no"
15791 fi
15792 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15793 fi
15794 echo "$as_me:15794: result: `eval echo '${'$as_ac_var'}'`" >&5
15795 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15796 if test `eval echo '${'$as_ac_var'}'` = yes; then
15797   cat >>confdefs.h <<EOF
15798 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15799 EOF
15800
15801 fi
15802 done
15803
15804 fi
15805
15806 ###     use option --enable-assertions to turn on generation of assertion code
15807 echo "$as_me:15807: checking if you want to enable runtime assertions" >&5
15808 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
15809
15810 # Check whether --enable-assertions or --disable-assertions was given.
15811 if test "${enable_assertions+set}" = set; then
15812   enableval="$enable_assertions"
15813   with_assertions=$enableval
15814 else
15815   with_assertions=no
15816 fi;
15817 echo "$as_me:15817: result: $with_assertions" >&5
15818 echo "${ECHO_T}$with_assertions" >&6
15819 if test -n "$GCC"
15820 then
15821         if test "$with_assertions" = no
15822         then
15823                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
15824         else
15825
15826         ADAFLAGS="$ADAFLAGS -gnata"
15827
15828         fi
15829 fi
15830
15831 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
15832
15833 echo "$as_me:15833: checking if you want to use dmalloc for testing" >&5
15834 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
15835
15836 # Check whether --with-dmalloc or --without-dmalloc was given.
15837 if test "${with_dmalloc+set}" = set; then
15838   withval="$with_dmalloc"
15839
15840 cat >>confdefs.h <<EOF
15841 #define USE_DMALLOC 1
15842 EOF
15843
15844         : ${with_cflags:=-g}
15845         : ${with_no_leaks:=yes}
15846          with_dmalloc=yes
15847 else
15848   with_dmalloc=
15849 fi;
15850 echo "$as_me:15850: result: ${with_dmalloc:-no}" >&5
15851 echo "${ECHO_T}${with_dmalloc:-no}" >&6
15852
15853 case .$with_cflags in
15854 (.*-g*)
15855         case .$CFLAGS in
15856         (.*-g*)
15857                 ;;
15858         (*)
15859
15860 cf_fix_cppflags=no
15861 cf_new_cflags=
15862 cf_new_cppflags=
15863 cf_new_extra_cppflags=
15864
15865 for cf_add_cflags in -g
15866 do
15867 case $cf_fix_cppflags in
15868 (no)
15869         case $cf_add_cflags in
15870         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15871                 case $cf_add_cflags in
15872                 (-D*)
15873                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15874
15875                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15876                                 && test -z "${cf_tst_cflags}" \
15877                                 && cf_fix_cppflags=yes
15878
15879                         if test $cf_fix_cppflags = yes ; then
15880
15881         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15882         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15883
15884                                 continue
15885                         elif test "${cf_tst_cflags}" = "\"'" ; then
15886
15887         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15888         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15889
15890                                 continue
15891                         fi
15892                         ;;
15893                 esac
15894                 case "$CPPFLAGS" in
15895                 (*$cf_add_cflags)
15896                         ;;
15897                 (*)
15898                         case $cf_add_cflags in
15899                         (-D*)
15900                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15901
15902 CPPFLAGS=`echo "$CPPFLAGS" | \
15903         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15904                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15905
15906                                 ;;
15907                         esac
15908
15909         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15910         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15911
15912                         ;;
15913                 esac
15914                 ;;
15915         (*)
15916
15917         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15918         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15919
15920                 ;;
15921         esac
15922         ;;
15923 (yes)
15924
15925         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15926         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15927
15928         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15929
15930         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15931                 && test -z "${cf_tst_cflags}" \
15932                 && cf_fix_cppflags=no
15933         ;;
15934 esac
15935 done
15936
15937 if test -n "$cf_new_cflags" ; then
15938
15939         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15940         CFLAGS="${CFLAGS}$cf_new_cflags"
15941
15942 fi
15943
15944 if test -n "$cf_new_cppflags" ; then
15945
15946         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15947         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15948
15949 fi
15950
15951 if test -n "$cf_new_extra_cppflags" ; then
15952
15953         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15954         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15955
15956 fi
15957
15958                 ;;
15959         esac
15960         ;;
15961 esac
15962
15963 if test "$with_dmalloc" = yes ; then
15964         echo "$as_me:15964: checking for dmalloc.h" >&5
15965 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
15966 if test "${ac_cv_header_dmalloc_h+set}" = set; then
15967   echo $ECHO_N "(cached) $ECHO_C" >&6
15968 else
15969   cat >conftest.$ac_ext <<_ACEOF
15970 #line 15970 "configure"
15971 #include "confdefs.h"
15972 #include <dmalloc.h>
15973 _ACEOF
15974 if { (eval echo "$as_me:15974: \"$ac_cpp conftest.$ac_ext\"") >&5
15975   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15976   ac_status=$?
15977   egrep -v '^ *\+' conftest.er1 >conftest.err
15978   rm -f conftest.er1
15979   cat conftest.err >&5
15980   echo "$as_me:15980: \$? = $ac_status" >&5
15981   (exit $ac_status); } >/dev/null; then
15982   if test -s conftest.err; then
15983     ac_cpp_err=$ac_c_preproc_warn_flag
15984   else
15985     ac_cpp_err=
15986   fi
15987 else
15988   ac_cpp_err=yes
15989 fi
15990 if test -z "$ac_cpp_err"; then
15991   ac_cv_header_dmalloc_h=yes
15992 else
15993   echo "$as_me: failed program was:" >&5
15994   cat conftest.$ac_ext >&5
15995   ac_cv_header_dmalloc_h=no
15996 fi
15997 rm -f conftest.err conftest.$ac_ext
15998 fi
15999 echo "$as_me:15999: result: $ac_cv_header_dmalloc_h" >&5
16000 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
16001 if test $ac_cv_header_dmalloc_h = yes; then
16002
16003 echo "$as_me:16003: checking for dmalloc_debug in -ldmalloc" >&5
16004 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
16005 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
16006   echo $ECHO_N "(cached) $ECHO_C" >&6
16007 else
16008   ac_check_lib_save_LIBS=$LIBS
16009 LIBS="-ldmalloc  $LIBS"
16010 cat >conftest.$ac_ext <<_ACEOF
16011 #line 16011 "configure"
16012 #include "confdefs.h"
16013
16014 /* Override any gcc2 internal prototype to avoid an error.  */
16015 #ifdef __cplusplus
16016 extern "C"
16017 #endif
16018 /* We use char because int might match the return type of a gcc2
16019    builtin and then its argument prototype would still apply.  */
16020 char dmalloc_debug ();
16021 int
16022 main (void)
16023 {
16024 dmalloc_debug ();
16025   ;
16026   return 0;
16027 }
16028 _ACEOF
16029 rm -f conftest.$ac_objext conftest$ac_exeext
16030 if { (eval echo "$as_me:16030: \"$ac_link\"") >&5
16031   (eval $ac_link) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit $ac_status); } &&
16035          { ac_try='test -s conftest$ac_exeext'
16036   { (eval echo "$as_me:16036: \"$ac_try\"") >&5
16037   (eval $ac_try) 2>&5
16038   ac_status=$?
16039   echo "$as_me:16039: \$? = $ac_status" >&5
16040   (exit $ac_status); }; }; then
16041   ac_cv_lib_dmalloc_dmalloc_debug=yes
16042 else
16043   echo "$as_me: failed program was:" >&5
16044 cat conftest.$ac_ext >&5
16045 ac_cv_lib_dmalloc_dmalloc_debug=no
16046 fi
16047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16048 LIBS=$ac_check_lib_save_LIBS
16049 fi
16050 echo "$as_me:16050: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
16051 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
16052 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
16053   cat >>confdefs.h <<EOF
16054 #define HAVE_LIBDMALLOC 1
16055 EOF
16056
16057   LIBS="-ldmalloc $LIBS"
16058
16059 fi
16060
16061 fi
16062
16063 fi
16064
16065 echo "$as_me:16065: checking if you want to use dbmalloc for testing" >&5
16066 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
16067
16068 # Check whether --with-dbmalloc or --without-dbmalloc was given.
16069 if test "${with_dbmalloc+set}" = set; then
16070   withval="$with_dbmalloc"
16071
16072 cat >>confdefs.h <<EOF
16073 #define USE_DBMALLOC 1
16074 EOF
16075
16076         : ${with_cflags:=-g}
16077         : ${with_no_leaks:=yes}
16078          with_dbmalloc=yes
16079 else
16080   with_dbmalloc=
16081 fi;
16082 echo "$as_me:16082: result: ${with_dbmalloc:-no}" >&5
16083 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
16084
16085 case .$with_cflags in
16086 (.*-g*)
16087         case .$CFLAGS in
16088         (.*-g*)
16089                 ;;
16090         (*)
16091
16092 cf_fix_cppflags=no
16093 cf_new_cflags=
16094 cf_new_cppflags=
16095 cf_new_extra_cppflags=
16096
16097 for cf_add_cflags in -g
16098 do
16099 case $cf_fix_cppflags in
16100 (no)
16101         case $cf_add_cflags in
16102         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16103                 case $cf_add_cflags in
16104                 (-D*)
16105                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16106
16107                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16108                                 && test -z "${cf_tst_cflags}" \
16109                                 && cf_fix_cppflags=yes
16110
16111                         if test $cf_fix_cppflags = yes ; then
16112
16113         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16114         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16115
16116                                 continue
16117                         elif test "${cf_tst_cflags}" = "\"'" ; then
16118
16119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16121
16122                                 continue
16123                         fi
16124                         ;;
16125                 esac
16126                 case "$CPPFLAGS" in
16127                 (*$cf_add_cflags)
16128                         ;;
16129                 (*)
16130                         case $cf_add_cflags in
16131                         (-D*)
16132                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16133
16134 CPPFLAGS=`echo "$CPPFLAGS" | \
16135         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16136                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16137
16138                                 ;;
16139                         esac
16140
16141         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16142         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16143
16144                         ;;
16145                 esac
16146                 ;;
16147         (*)
16148
16149         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16150         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16151
16152                 ;;
16153         esac
16154         ;;
16155 (yes)
16156
16157         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16158         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16159
16160         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16161
16162         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16163                 && test -z "${cf_tst_cflags}" \
16164                 && cf_fix_cppflags=no
16165         ;;
16166 esac
16167 done
16168
16169 if test -n "$cf_new_cflags" ; then
16170
16171         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16172         CFLAGS="${CFLAGS}$cf_new_cflags"
16173
16174 fi
16175
16176 if test -n "$cf_new_cppflags" ; then
16177
16178         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16179         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16180
16181 fi
16182
16183 if test -n "$cf_new_extra_cppflags" ; then
16184
16185         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16186         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16187
16188 fi
16189
16190                 ;;
16191         esac
16192         ;;
16193 esac
16194
16195 if test "$with_dbmalloc" = yes ; then
16196         echo "$as_me:16196: checking for dbmalloc.h" >&5
16197 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
16198 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
16199   echo $ECHO_N "(cached) $ECHO_C" >&6
16200 else
16201   cat >conftest.$ac_ext <<_ACEOF
16202 #line 16202 "configure"
16203 #include "confdefs.h"
16204 #include <dbmalloc.h>
16205 _ACEOF
16206 if { (eval echo "$as_me:16206: \"$ac_cpp conftest.$ac_ext\"") >&5
16207   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16208   ac_status=$?
16209   egrep -v '^ *\+' conftest.er1 >conftest.err
16210   rm -f conftest.er1
16211   cat conftest.err >&5
16212   echo "$as_me:16212: \$? = $ac_status" >&5
16213   (exit $ac_status); } >/dev/null; then
16214   if test -s conftest.err; then
16215     ac_cpp_err=$ac_c_preproc_warn_flag
16216   else
16217     ac_cpp_err=
16218   fi
16219 else
16220   ac_cpp_err=yes
16221 fi
16222 if test -z "$ac_cpp_err"; then
16223   ac_cv_header_dbmalloc_h=yes
16224 else
16225   echo "$as_me: failed program was:" >&5
16226   cat conftest.$ac_ext >&5
16227   ac_cv_header_dbmalloc_h=no
16228 fi
16229 rm -f conftest.err conftest.$ac_ext
16230 fi
16231 echo "$as_me:16231: result: $ac_cv_header_dbmalloc_h" >&5
16232 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
16233 if test $ac_cv_header_dbmalloc_h = yes; then
16234
16235 echo "$as_me:16235: checking for debug_malloc in -ldbmalloc" >&5
16236 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
16237 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
16238   echo $ECHO_N "(cached) $ECHO_C" >&6
16239 else
16240   ac_check_lib_save_LIBS=$LIBS
16241 LIBS="-ldbmalloc  $LIBS"
16242 cat >conftest.$ac_ext <<_ACEOF
16243 #line 16243 "configure"
16244 #include "confdefs.h"
16245
16246 /* Override any gcc2 internal prototype to avoid an error.  */
16247 #ifdef __cplusplus
16248 extern "C"
16249 #endif
16250 /* We use char because int might match the return type of a gcc2
16251    builtin and then its argument prototype would still apply.  */
16252 char debug_malloc ();
16253 int
16254 main (void)
16255 {
16256 debug_malloc ();
16257   ;
16258   return 0;
16259 }
16260 _ACEOF
16261 rm -f conftest.$ac_objext conftest$ac_exeext
16262 if { (eval echo "$as_me:16262: \"$ac_link\"") >&5
16263   (eval $ac_link) 2>&5
16264   ac_status=$?
16265   echo "$as_me:16265: \$? = $ac_status" >&5
16266   (exit $ac_status); } &&
16267          { ac_try='test -s conftest$ac_exeext'
16268   { (eval echo "$as_me:16268: \"$ac_try\"") >&5
16269   (eval $ac_try) 2>&5
16270   ac_status=$?
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); }; }; then
16273   ac_cv_lib_dbmalloc_debug_malloc=yes
16274 else
16275   echo "$as_me: failed program was:" >&5
16276 cat conftest.$ac_ext >&5
16277 ac_cv_lib_dbmalloc_debug_malloc=no
16278 fi
16279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16280 LIBS=$ac_check_lib_save_LIBS
16281 fi
16282 echo "$as_me:16282: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
16283 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
16284 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
16285   cat >>confdefs.h <<EOF
16286 #define HAVE_LIBDBMALLOC 1
16287 EOF
16288
16289   LIBS="-ldbmalloc $LIBS"
16290
16291 fi
16292
16293 fi
16294
16295 fi
16296
16297 echo "$as_me:16297: checking if you want to use valgrind for testing" >&5
16298 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
16299
16300 # Check whether --with-valgrind or --without-valgrind was given.
16301 if test "${with_valgrind+set}" = set; then
16302   withval="$with_valgrind"
16303
16304 cat >>confdefs.h <<EOF
16305 #define USE_VALGRIND 1
16306 EOF
16307
16308         : ${with_cflags:=-g}
16309         : ${with_no_leaks:=yes}
16310          with_valgrind=yes
16311 else
16312   with_valgrind=
16313 fi;
16314 echo "$as_me:16314: result: ${with_valgrind:-no}" >&5
16315 echo "${ECHO_T}${with_valgrind:-no}" >&6
16316
16317 case .$with_cflags in
16318 (.*-g*)
16319         case .$CFLAGS in
16320         (.*-g*)
16321                 ;;
16322         (*)
16323
16324 cf_fix_cppflags=no
16325 cf_new_cflags=
16326 cf_new_cppflags=
16327 cf_new_extra_cppflags=
16328
16329 for cf_add_cflags in -g
16330 do
16331 case $cf_fix_cppflags in
16332 (no)
16333         case $cf_add_cflags in
16334         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16335                 case $cf_add_cflags in
16336                 (-D*)
16337                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16338
16339                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16340                                 && test -z "${cf_tst_cflags}" \
16341                                 && cf_fix_cppflags=yes
16342
16343                         if test $cf_fix_cppflags = yes ; then
16344
16345         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16346         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16347
16348                                 continue
16349                         elif test "${cf_tst_cflags}" = "\"'" ; then
16350
16351         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16352         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16353
16354                                 continue
16355                         fi
16356                         ;;
16357                 esac
16358                 case "$CPPFLAGS" in
16359                 (*$cf_add_cflags)
16360                         ;;
16361                 (*)
16362                         case $cf_add_cflags in
16363                         (-D*)
16364                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16365
16366 CPPFLAGS=`echo "$CPPFLAGS" | \
16367         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16368                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16369
16370                                 ;;
16371                         esac
16372
16373         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16374         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16375
16376                         ;;
16377                 esac
16378                 ;;
16379         (*)
16380
16381         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16382         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16383
16384                 ;;
16385         esac
16386         ;;
16387 (yes)
16388
16389         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16390         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16391
16392         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16393
16394         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16395                 && test -z "${cf_tst_cflags}" \
16396                 && cf_fix_cppflags=no
16397         ;;
16398 esac
16399 done
16400
16401 if test -n "$cf_new_cflags" ; then
16402
16403         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16404         CFLAGS="${CFLAGS}$cf_new_cflags"
16405
16406 fi
16407
16408 if test -n "$cf_new_cppflags" ; then
16409
16410         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16411         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16412
16413 fi
16414
16415 if test -n "$cf_new_extra_cppflags" ; then
16416
16417         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16418         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16419
16420 fi
16421
16422                 ;;
16423         esac
16424         ;;
16425 esac
16426
16427 echo "$as_me:16427: checking if you want to perform memory-leak testing" >&5
16428 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
16429
16430 # Check whether --enable-leaks or --disable-leaks was given.
16431 if test "${enable_leaks+set}" = set; then
16432   enableval="$enable_leaks"
16433   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
16434 else
16435   : ${with_no_leaks:=no}
16436 fi;
16437 echo "$as_me:16437: result: $with_no_leaks" >&5
16438 echo "${ECHO_T}$with_no_leaks" >&6
16439
16440 if test "$with_no_leaks" = yes ; then
16441
16442 cat >>confdefs.h <<\EOF
16443 #define NO_LEAKS 1
16444 EOF
16445
16446 cat >>confdefs.h <<\EOF
16447 #define YY_NO_LEAKS 1
16448 EOF
16449
16450 fi
16451
16452 cat >>confdefs.h <<\EOF
16453 #define HAVE_NC_ALLOC_H 1
16454 EOF
16455
16456 ###     use option --enable-expanded to generate certain macros as functions
16457
16458 # Check whether --enable-expanded or --disable-expanded was given.
16459 if test "${enable_expanded+set}" = set; then
16460   enableval="$enable_expanded"
16461   test "x$enableval" = xyes &&
16462 cat >>confdefs.h <<\EOF
16463 #define NCURSES_EXPANDED 1
16464 EOF
16465
16466 fi;
16467
16468 ###     use option --disable-macros to suppress macros in favor of functions
16469
16470 # Check whether --enable-macros or --disable-macros was given.
16471 if test "${enable_macros+set}" = set; then
16472   enableval="$enable_macros"
16473   test "$enableval" = no &&
16474 cat >>confdefs.h <<\EOF
16475 #define NCURSES_NOMACROS 1
16476 EOF
16477
16478 fi;
16479
16480 # Normally we only add trace() to the debug-library.  Allow this to be
16481 # extended to all models of the ncurses library:
16482 cf_all_traces=no
16483 case "$CFLAGS $CPPFLAGS" in
16484 (*-DTRACE*)
16485         cf_all_traces=yes
16486         ;;
16487 esac
16488
16489 echo "$as_me:16489: checking whether to add trace feature to all models" >&5
16490 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
16491
16492 # Check whether --with-trace or --without-trace was given.
16493 if test "${with_trace+set}" = set; then
16494   withval="$with_trace"
16495   cf_with_trace=$withval
16496 else
16497   cf_with_trace=$cf_all_traces
16498 fi;
16499 echo "$as_me:16499: result: $cf_with_trace" >&5
16500 echo "${ECHO_T}$cf_with_trace" >&6
16501
16502 if test "x$cf_with_trace" = xyes ; then
16503         LIB_TRACING=all
16504         ADA_TRACE=TRUE
16505
16506 cf_fix_cppflags=no
16507 cf_new_cflags=
16508 cf_new_cppflags=
16509 cf_new_extra_cppflags=
16510
16511 for cf_add_cflags in -DTRACE
16512 do
16513 case $cf_fix_cppflags in
16514 (no)
16515         case $cf_add_cflags in
16516         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16517                 case $cf_add_cflags in
16518                 (-D*)
16519                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16520
16521                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16522                                 && test -z "${cf_tst_cflags}" \
16523                                 && cf_fix_cppflags=yes
16524
16525                         if test $cf_fix_cppflags = yes ; then
16526
16527         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16528         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16529
16530                                 continue
16531                         elif test "${cf_tst_cflags}" = "\"'" ; then
16532
16533         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16534         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16535
16536                                 continue
16537                         fi
16538                         ;;
16539                 esac
16540                 case "$CPPFLAGS" in
16541                 (*$cf_add_cflags)
16542                         ;;
16543                 (*)
16544                         case $cf_add_cflags in
16545                         (-D*)
16546                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16547
16548 CPPFLAGS=`echo "$CPPFLAGS" | \
16549         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16550                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16551
16552                                 ;;
16553                         esac
16554
16555         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16556         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16557
16558                         ;;
16559                 esac
16560                 ;;
16561         (*)
16562
16563         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16564         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16565
16566                 ;;
16567         esac
16568         ;;
16569 (yes)
16570
16571         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16572         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16573
16574         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16575
16576         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16577                 && test -z "${cf_tst_cflags}" \
16578                 && cf_fix_cppflags=no
16579         ;;
16580 esac
16581 done
16582
16583 if test -n "$cf_new_cflags" ; then
16584
16585         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16586         CFLAGS="${CFLAGS}$cf_new_cflags"
16587
16588 fi
16589
16590 if test -n "$cf_new_cppflags" ; then
16591
16592         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16593         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16594
16595 fi
16596
16597 if test -n "$cf_new_extra_cppflags" ; then
16598
16599         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16600         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16601
16602 fi
16603
16604 cat >>confdefs.h <<\EOF
16605 #define HAVE__TRACEF 1
16606 EOF
16607
16608 else
16609         LIB_TRACING=DEBUG
16610         ADA_TRACE=FALSE
16611 fi
16612
16613 echo "$as_me:16613: checking if we want to use GNAT projects" >&5
16614 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
16615
16616 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
16617 if test "${enable_gnat_projects+set}" = set; then
16618   enableval="$enable_gnat_projects"
16619   test "$enableval" != no && enableval=yes
16620         if test "$enableval" != "yes" ; then
16621     enable_gnat_projects=no
16622         else
16623                 enable_gnat_projects=yes
16624         fi
16625 else
16626   enableval=yes
16627         enable_gnat_projects=yes
16628
16629 fi;
16630 echo "$as_me:16630: result: $enable_gnat_projects" >&5
16631 echo "${ECHO_T}$enable_gnat_projects" >&6
16632
16633 ###     Checks for libraries.
16634 case $cf_cv_system_name in
16635 (*mingw32*|*mingw64*)
16636         CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
16637         LIBS=" -lpsapi $LIBS"
16638         ;;
16639 (*)
16640 echo "$as_me:16640: checking for gettimeofday" >&5
16641 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
16642 if test "${ac_cv_func_gettimeofday+set}" = set; then
16643   echo $ECHO_N "(cached) $ECHO_C" >&6
16644 else
16645   cat >conftest.$ac_ext <<_ACEOF
16646 #line 16646 "configure"
16647 #include "confdefs.h"
16648 #define gettimeofday autoconf_temporary
16649 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16650 #undef gettimeofday
16651
16652 #ifdef __cplusplus
16653 extern "C"
16654 #endif
16655
16656 /* We use char because int might match the return type of a gcc2
16657    builtin and then its argument prototype would still apply.  */
16658 char gettimeofday (void);
16659
16660 int
16661 main (void)
16662 {
16663
16664 /* The GNU C library defines stubs for functions which it implements
16665     to always fail with ENOSYS.  Some functions are actually named
16666     something starting with __ and the normal name is an alias.  */
16667 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
16668 #error found stub for gettimeofday
16669 #endif
16670
16671         return gettimeofday ();
16672   ;
16673   return 0;
16674 }
16675 _ACEOF
16676 rm -f conftest.$ac_objext conftest$ac_exeext
16677 if { (eval echo "$as_me:16677: \"$ac_link\"") >&5
16678   (eval $ac_link) 2>&5
16679   ac_status=$?
16680   echo "$as_me:16680: \$? = $ac_status" >&5
16681   (exit $ac_status); } &&
16682          { ac_try='test -s conftest$ac_exeext'
16683   { (eval echo "$as_me:16683: \"$ac_try\"") >&5
16684   (eval $ac_try) 2>&5
16685   ac_status=$?
16686   echo "$as_me:16686: \$? = $ac_status" >&5
16687   (exit $ac_status); }; }; then
16688   ac_cv_func_gettimeofday=yes
16689 else
16690   echo "$as_me: failed program was:" >&5
16691 cat conftest.$ac_ext >&5
16692 ac_cv_func_gettimeofday=no
16693 fi
16694 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16695 fi
16696 echo "$as_me:16696: result: $ac_cv_func_gettimeofday" >&5
16697 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
16698 if test $ac_cv_func_gettimeofday = yes; then
16699
16700 cat >>confdefs.h <<\EOF
16701 #define HAVE_GETTIMEOFDAY 1
16702 EOF
16703
16704 else
16705
16706 echo "$as_me:16706: checking for gettimeofday in -lbsd" >&5
16707 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
16708 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
16709   echo $ECHO_N "(cached) $ECHO_C" >&6
16710 else
16711   ac_check_lib_save_LIBS=$LIBS
16712 LIBS="-lbsd  $LIBS"
16713 cat >conftest.$ac_ext <<_ACEOF
16714 #line 16714 "configure"
16715 #include "confdefs.h"
16716
16717 /* Override any gcc2 internal prototype to avoid an error.  */
16718 #ifdef __cplusplus
16719 extern "C"
16720 #endif
16721 /* We use char because int might match the return type of a gcc2
16722    builtin and then its argument prototype would still apply.  */
16723 char gettimeofday ();
16724 int
16725 main (void)
16726 {
16727 gettimeofday ();
16728   ;
16729   return 0;
16730 }
16731 _ACEOF
16732 rm -f conftest.$ac_objext conftest$ac_exeext
16733 if { (eval echo "$as_me:16733: \"$ac_link\"") >&5
16734   (eval $ac_link) 2>&5
16735   ac_status=$?
16736   echo "$as_me:16736: \$? = $ac_status" >&5
16737   (exit $ac_status); } &&
16738          { ac_try='test -s conftest$ac_exeext'
16739   { (eval echo "$as_me:16739: \"$ac_try\"") >&5
16740   (eval $ac_try) 2>&5
16741   ac_status=$?
16742   echo "$as_me:16742: \$? = $ac_status" >&5
16743   (exit $ac_status); }; }; then
16744   ac_cv_lib_bsd_gettimeofday=yes
16745 else
16746   echo "$as_me: failed program was:" >&5
16747 cat conftest.$ac_ext >&5
16748 ac_cv_lib_bsd_gettimeofday=no
16749 fi
16750 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16751 LIBS=$ac_check_lib_save_LIBS
16752 fi
16753 echo "$as_me:16753: result: $ac_cv_lib_bsd_gettimeofday" >&5
16754 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
16755 if test $ac_cv_lib_bsd_gettimeofday = yes; then
16756
16757 cat >>confdefs.h <<\EOF
16758 #define HAVE_GETTIMEOFDAY 1
16759 EOF
16760
16761 cf_add_libs="-lbsd"
16762 # Filter out duplicates - this happens with badly-designed ".pc" files...
16763 for cf_add_1lib in $LIBS
16764 do
16765         for cf_add_2lib in $cf_add_libs
16766         do
16767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
16768                 then
16769                         cf_add_1lib=
16770                         break
16771                 fi
16772         done
16773         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16774 done
16775 LIBS="$cf_add_libs"
16776
16777 fi
16778
16779 fi
16780         ;;
16781 esac
16782
16783 echo "$as_me:16783: checking if -lm needed for math functions" >&5
16784 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
16785 if test "${cf_cv_need_libm+set}" = set; then
16786   echo $ECHO_N "(cached) $ECHO_C" >&6
16787 else
16788
16789         cat >conftest.$ac_ext <<_ACEOF
16790 #line 16790 "configure"
16791 #include "confdefs.h"
16792
16793         #include <stdio.h>
16794         #include <stdlib.h>
16795         #include <math.h>
16796
16797 int
16798 main (void)
16799 {
16800 double x = rand(); printf("result = %g\n", pow(sin(x),x))
16801   ;
16802   return 0;
16803 }
16804 _ACEOF
16805 rm -f conftest.$ac_objext conftest$ac_exeext
16806 if { (eval echo "$as_me:16806: \"$ac_link\"") >&5
16807   (eval $ac_link) 2>&5
16808   ac_status=$?
16809   echo "$as_me:16809: \$? = $ac_status" >&5
16810   (exit $ac_status); } &&
16811          { ac_try='test -s conftest$ac_exeext'
16812   { (eval echo "$as_me:16812: \"$ac_try\"") >&5
16813   (eval $ac_try) 2>&5
16814   ac_status=$?
16815   echo "$as_me:16815: \$? = $ac_status" >&5
16816   (exit $ac_status); }; }; then
16817   cf_cv_need_libm=no
16818 else
16819   echo "$as_me: failed program was:" >&5
16820 cat conftest.$ac_ext >&5
16821 cf_cv_need_libm=yes
16822 fi
16823 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16824 fi
16825 echo "$as_me:16825: result: $cf_cv_need_libm" >&5
16826 echo "${ECHO_T}$cf_cv_need_libm" >&6
16827 if test "$cf_cv_need_libm" = yes
16828 then
16829 MATH_LIB=-lm
16830 fi
16831
16832 ###     Checks for header files.
16833 echo "$as_me:16833: checking for ANSI C header files" >&5
16834 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
16835 if test "${ac_cv_header_stdc+set}" = set; then
16836   echo $ECHO_N "(cached) $ECHO_C" >&6
16837 else
16838   cat >conftest.$ac_ext <<_ACEOF
16839 #line 16839 "configure"
16840 #include "confdefs.h"
16841 #include <stdlib.h>
16842 #include <stdarg.h>
16843 #include <string.h>
16844 #include <float.h>
16845
16846 _ACEOF
16847 if { (eval echo "$as_me:16847: \"$ac_cpp conftest.$ac_ext\"") >&5
16848   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16849   ac_status=$?
16850   egrep -v '^ *\+' conftest.er1 >conftest.err
16851   rm -f conftest.er1
16852   cat conftest.err >&5
16853   echo "$as_me:16853: \$? = $ac_status" >&5
16854   (exit $ac_status); } >/dev/null; then
16855   if test -s conftest.err; then
16856     ac_cpp_err=$ac_c_preproc_warn_flag
16857   else
16858     ac_cpp_err=
16859   fi
16860 else
16861   ac_cpp_err=yes
16862 fi
16863 if test -z "$ac_cpp_err"; then
16864   ac_cv_header_stdc=yes
16865 else
16866   echo "$as_me: failed program was:" >&5
16867   cat conftest.$ac_ext >&5
16868   ac_cv_header_stdc=no
16869 fi
16870 rm -f conftest.err conftest.$ac_ext
16871
16872 if test $ac_cv_header_stdc = yes; then
16873   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
16874   cat >conftest.$ac_ext <<_ACEOF
16875 #line 16875 "configure"
16876 #include "confdefs.h"
16877 #include <string.h>
16878
16879 _ACEOF
16880 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16881   egrep "memchr" >/dev/null 2>&1; then
16882   :
16883 else
16884   ac_cv_header_stdc=no
16885 fi
16886 rm -rf conftest*
16887
16888 fi
16889
16890 if test $ac_cv_header_stdc = yes; then
16891   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
16892   cat >conftest.$ac_ext <<_ACEOF
16893 #line 16893 "configure"
16894 #include "confdefs.h"
16895 #include <stdlib.h>
16896
16897 _ACEOF
16898 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16899   egrep "free" >/dev/null 2>&1; then
16900   :
16901 else
16902   ac_cv_header_stdc=no
16903 fi
16904 rm -rf conftest*
16905
16906 fi
16907
16908 if test $ac_cv_header_stdc = yes; then
16909   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
16910   if test "$cross_compiling" = yes; then
16911   :
16912 else
16913   cat >conftest.$ac_ext <<_ACEOF
16914 #line 16914 "configure"
16915 #include "confdefs.h"
16916 #include <ctype.h>
16917 #if ((' ' & 0x0FF) == 0x020)
16918 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
16919 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
16920 #else
16921 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
16922                      || ('j' <= (c) && (c) <= 'r') \
16923                      || ('s' <= (c) && (c) <= 'z'))
16924 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
16925 #endif
16926
16927 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
16928 int
16929 main (void)
16930 {
16931   int i;
16932   for (i = 0; i < 256; i++)
16933     if (XOR (islower (i), ISLOWER (i))
16934         || toupper (i) != TOUPPER (i))
16935       $ac_main_return(2);
16936   $ac_main_return (0);
16937 }
16938 _ACEOF
16939 rm -f conftest$ac_exeext
16940 if { (eval echo "$as_me:16940: \"$ac_link\"") >&5
16941   (eval $ac_link) 2>&5
16942   ac_status=$?
16943   echo "$as_me:16943: \$? = $ac_status" >&5
16944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16945   { (eval echo "$as_me:16945: \"$ac_try\"") >&5
16946   (eval $ac_try) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); }; }; then
16950   :
16951 else
16952   echo "$as_me: program exited with status $ac_status" >&5
16953 echo "$as_me: failed program was:" >&5
16954 cat conftest.$ac_ext >&5
16955 ac_cv_header_stdc=no
16956 fi
16957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16958 fi
16959 fi
16960 fi
16961 echo "$as_me:16961: result: $ac_cv_header_stdc" >&5
16962 echo "${ECHO_T}$ac_cv_header_stdc" >&6
16963 if test $ac_cv_header_stdc = yes; then
16964
16965 cat >>confdefs.h <<\EOF
16966 #define STDC_HEADERS 1
16967 EOF
16968
16969 fi
16970
16971 ac_header_dirent=no
16972 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
16973   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
16974 echo "$as_me:16974: checking for $ac_hdr that defines DIR" >&5
16975 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
16976 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979   cat >conftest.$ac_ext <<_ACEOF
16980 #line 16980 "configure"
16981 #include "confdefs.h"
16982 #include <sys/types.h>
16983 #include <$ac_hdr>
16984
16985 int
16986 main (void)
16987 {
16988 if ((DIR *) 0)
16989 return 0;
16990   ;
16991   return 0;
16992 }
16993 _ACEOF
16994 rm -f conftest.$ac_objext
16995 if { (eval echo "$as_me:16995: \"$ac_compile\"") >&5
16996   (eval $ac_compile) 2>&5
16997   ac_status=$?
16998   echo "$as_me:16998: \$? = $ac_status" >&5
16999   (exit $ac_status); } &&
17000          { ac_try='test -s conftest.$ac_objext'
17001   { (eval echo "$as_me:17001: \"$ac_try\"") >&5
17002   (eval $ac_try) 2>&5
17003   ac_status=$?
17004   echo "$as_me:17004: \$? = $ac_status" >&5
17005   (exit $ac_status); }; }; then
17006   eval "$as_ac_Header=yes"
17007 else
17008   echo "$as_me: failed program was:" >&5
17009 cat conftest.$ac_ext >&5
17010 eval "$as_ac_Header=no"
17011 fi
17012 rm -f conftest.$ac_objext conftest.$ac_ext
17013 fi
17014 echo "$as_me:17014: result: `eval echo '${'$as_ac_Header'}'`" >&5
17015 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17016 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17017   cat >>confdefs.h <<EOF
17018 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
17019 EOF
17020
17021 ac_header_dirent=$ac_hdr; break
17022 fi
17023
17024 done
17025 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
17026 if test $ac_header_dirent = dirent.h; then
17027   echo "$as_me:17027: checking for opendir in -ldir" >&5
17028 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
17029 if test "${ac_cv_lib_dir_opendir+set}" = set; then
17030   echo $ECHO_N "(cached) $ECHO_C" >&6
17031 else
17032   ac_check_lib_save_LIBS=$LIBS
17033 LIBS="-ldir  $LIBS"
17034 cat >conftest.$ac_ext <<_ACEOF
17035 #line 17035 "configure"
17036 #include "confdefs.h"
17037
17038 /* Override any gcc2 internal prototype to avoid an error.  */
17039 #ifdef __cplusplus
17040 extern "C"
17041 #endif
17042 /* We use char because int might match the return type of a gcc2
17043    builtin and then its argument prototype would still apply.  */
17044 char opendir ();
17045 int
17046 main (void)
17047 {
17048 opendir ();
17049   ;
17050   return 0;
17051 }
17052 _ACEOF
17053 rm -f conftest.$ac_objext conftest$ac_exeext
17054 if { (eval echo "$as_me:17054: \"$ac_link\"") >&5
17055   (eval $ac_link) 2>&5
17056   ac_status=$?
17057   echo "$as_me:17057: \$? = $ac_status" >&5
17058   (exit $ac_status); } &&
17059          { ac_try='test -s conftest$ac_exeext'
17060   { (eval echo "$as_me:17060: \"$ac_try\"") >&5
17061   (eval $ac_try) 2>&5
17062   ac_status=$?
17063   echo "$as_me:17063: \$? = $ac_status" >&5
17064   (exit $ac_status); }; }; then
17065   ac_cv_lib_dir_opendir=yes
17066 else
17067   echo "$as_me: failed program was:" >&5
17068 cat conftest.$ac_ext >&5
17069 ac_cv_lib_dir_opendir=no
17070 fi
17071 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17072 LIBS=$ac_check_lib_save_LIBS
17073 fi
17074 echo "$as_me:17074: result: $ac_cv_lib_dir_opendir" >&5
17075 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
17076 if test $ac_cv_lib_dir_opendir = yes; then
17077   LIBS="$LIBS -ldir"
17078 fi
17079
17080 else
17081   echo "$as_me:17081: checking for opendir in -lx" >&5
17082 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
17083 if test "${ac_cv_lib_x_opendir+set}" = set; then
17084   echo $ECHO_N "(cached) $ECHO_C" >&6
17085 else
17086   ac_check_lib_save_LIBS=$LIBS
17087 LIBS="-lx  $LIBS"
17088 cat >conftest.$ac_ext <<_ACEOF
17089 #line 17089 "configure"
17090 #include "confdefs.h"
17091
17092 /* Override any gcc2 internal prototype to avoid an error.  */
17093 #ifdef __cplusplus
17094 extern "C"
17095 #endif
17096 /* We use char because int might match the return type of a gcc2
17097    builtin and then its argument prototype would still apply.  */
17098 char opendir ();
17099 int
17100 main (void)
17101 {
17102 opendir ();
17103   ;
17104   return 0;
17105 }
17106 _ACEOF
17107 rm -f conftest.$ac_objext conftest$ac_exeext
17108 if { (eval echo "$as_me:17108: \"$ac_link\"") >&5
17109   (eval $ac_link) 2>&5
17110   ac_status=$?
17111   echo "$as_me:17111: \$? = $ac_status" >&5
17112   (exit $ac_status); } &&
17113          { ac_try='test -s conftest$ac_exeext'
17114   { (eval echo "$as_me:17114: \"$ac_try\"") >&5
17115   (eval $ac_try) 2>&5
17116   ac_status=$?
17117   echo "$as_me:17117: \$? = $ac_status" >&5
17118   (exit $ac_status); }; }; then
17119   ac_cv_lib_x_opendir=yes
17120 else
17121   echo "$as_me: failed program was:" >&5
17122 cat conftest.$ac_ext >&5
17123 ac_cv_lib_x_opendir=no
17124 fi
17125 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17126 LIBS=$ac_check_lib_save_LIBS
17127 fi
17128 echo "$as_me:17128: result: $ac_cv_lib_x_opendir" >&5
17129 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
17130 if test $ac_cv_lib_x_opendir = yes; then
17131   LIBS="$LIBS -lx"
17132 fi
17133
17134 fi
17135
17136 echo "$as_me:17136: checking whether time.h and sys/time.h may both be included" >&5
17137 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
17138 if test "${ac_cv_header_time+set}" = set; then
17139   echo $ECHO_N "(cached) $ECHO_C" >&6
17140 else
17141   cat >conftest.$ac_ext <<_ACEOF
17142 #line 17142 "configure"
17143 #include "confdefs.h"
17144 #include <sys/types.h>
17145 #include <sys/time.h>
17146 #include <time.h>
17147
17148 int
17149 main (void)
17150 {
17151 if ((struct tm *) 0)
17152 return 0;
17153   ;
17154   return 0;
17155 }
17156 _ACEOF
17157 rm -f conftest.$ac_objext
17158 if { (eval echo "$as_me:17158: \"$ac_compile\"") >&5
17159   (eval $ac_compile) 2>&5
17160   ac_status=$?
17161   echo "$as_me:17161: \$? = $ac_status" >&5
17162   (exit $ac_status); } &&
17163          { ac_try='test -s conftest.$ac_objext'
17164   { (eval echo "$as_me:17164: \"$ac_try\"") >&5
17165   (eval $ac_try) 2>&5
17166   ac_status=$?
17167   echo "$as_me:17167: \$? = $ac_status" >&5
17168   (exit $ac_status); }; }; then
17169   ac_cv_header_time=yes
17170 else
17171   echo "$as_me: failed program was:" >&5
17172 cat conftest.$ac_ext >&5
17173 ac_cv_header_time=no
17174 fi
17175 rm -f conftest.$ac_objext conftest.$ac_ext
17176 fi
17177 echo "$as_me:17177: result: $ac_cv_header_time" >&5
17178 echo "${ECHO_T}$ac_cv_header_time" >&6
17179 if test $ac_cv_header_time = yes; then
17180
17181 cat >>confdefs.h <<\EOF
17182 #define TIME_WITH_SYS_TIME 1
17183 EOF
17184
17185 fi
17186
17187 cf_regex_func=no
17188
17189 cf_regex_libs="regex re"
17190 case $host_os in
17191 (mingw*)
17192         cf_regex_libs="gnurx $cf_regex_libs"
17193         ;;
17194 esac
17195
17196 echo "$as_me:17196: checking for regcomp" >&5
17197 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17198 if test "${ac_cv_func_regcomp+set}" = set; then
17199   echo $ECHO_N "(cached) $ECHO_C" >&6
17200 else
17201   cat >conftest.$ac_ext <<_ACEOF
17202 #line 17202 "configure"
17203 #include "confdefs.h"
17204 #define regcomp autoconf_temporary
17205 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17206 #undef regcomp
17207
17208 #ifdef __cplusplus
17209 extern "C"
17210 #endif
17211
17212 /* We use char because int might match the return type of a gcc2
17213    builtin and then its argument prototype would still apply.  */
17214 char regcomp (void);
17215
17216 int
17217 main (void)
17218 {
17219
17220 /* The GNU C library defines stubs for functions which it implements
17221     to always fail with ENOSYS.  Some functions are actually named
17222     something starting with __ and the normal name is an alias.  */
17223 #if defined (__stub_regcomp) || defined (__stub___regcomp)
17224 #error found stub for regcomp
17225 #endif
17226
17227         return regcomp ();
17228   ;
17229   return 0;
17230 }
17231 _ACEOF
17232 rm -f conftest.$ac_objext conftest$ac_exeext
17233 if { (eval echo "$as_me:17233: \"$ac_link\"") >&5
17234   (eval $ac_link) 2>&5
17235   ac_status=$?
17236   echo "$as_me:17236: \$? = $ac_status" >&5
17237   (exit $ac_status); } &&
17238          { ac_try='test -s conftest$ac_exeext'
17239   { (eval echo "$as_me:17239: \"$ac_try\"") >&5
17240   (eval $ac_try) 2>&5
17241   ac_status=$?
17242   echo "$as_me:17242: \$? = $ac_status" >&5
17243   (exit $ac_status); }; }; then
17244   ac_cv_func_regcomp=yes
17245 else
17246   echo "$as_me: failed program was:" >&5
17247 cat conftest.$ac_ext >&5
17248 ac_cv_func_regcomp=no
17249 fi
17250 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17251 fi
17252 echo "$as_me:17252: result: $ac_cv_func_regcomp" >&5
17253 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17254 if test $ac_cv_func_regcomp = yes; then
17255   cf_regex_func=regcomp
17256 else
17257
17258         for cf_regex_lib in $cf_regex_libs
17259         do
17260                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17261 echo "$as_me:17261: checking for regcomp in -l$cf_regex_lib" >&5
17262 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17263 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17264   echo $ECHO_N "(cached) $ECHO_C" >&6
17265 else
17266   ac_check_lib_save_LIBS=$LIBS
17267 LIBS="-l$cf_regex_lib  $LIBS"
17268 cat >conftest.$ac_ext <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271
17272 /* Override any gcc2 internal prototype to avoid an error.  */
17273 #ifdef __cplusplus
17274 extern "C"
17275 #endif
17276 /* We use char because int might match the return type of a gcc2
17277    builtin and then its argument prototype would still apply.  */
17278 char regcomp ();
17279 int
17280 main (void)
17281 {
17282 regcomp ();
17283   ;
17284   return 0;
17285 }
17286 _ACEOF
17287 rm -f conftest.$ac_objext conftest$ac_exeext
17288 if { (eval echo "$as_me:17288: \"$ac_link\"") >&5
17289   (eval $ac_link) 2>&5
17290   ac_status=$?
17291   echo "$as_me:17291: \$? = $ac_status" >&5
17292   (exit $ac_status); } &&
17293          { ac_try='test -s conftest$ac_exeext'
17294   { (eval echo "$as_me:17294: \"$ac_try\"") >&5
17295   (eval $ac_try) 2>&5
17296   ac_status=$?
17297   echo "$as_me:17297: \$? = $ac_status" >&5
17298   (exit $ac_status); }; }; then
17299   eval "$as_ac_Lib=yes"
17300 else
17301   echo "$as_me: failed program was:" >&5
17302 cat conftest.$ac_ext >&5
17303 eval "$as_ac_Lib=no"
17304 fi
17305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17306 LIBS=$ac_check_lib_save_LIBS
17307 fi
17308 echo "$as_me:17308: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17309 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17310 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17311
17312 cf_add_libs="-l$cf_regex_lib"
17313 # Filter out duplicates - this happens with badly-designed ".pc" files...
17314 for cf_add_1lib in $LIBS
17315 do
17316         for cf_add_2lib in $cf_add_libs
17317         do
17318                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17319                 then
17320                         cf_add_1lib=
17321                         break
17322                 fi
17323         done
17324         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17325 done
17326 LIBS="$cf_add_libs"
17327
17328                                 cf_regex_func=regcomp
17329                                 break
17330 fi
17331
17332         done
17333
17334 fi
17335
17336 if test "$cf_regex_func" = no ; then
17337         echo "$as_me:17337: checking for compile" >&5
17338 echo $ECHO_N "checking for compile... $ECHO_C" >&6
17339 if test "${ac_cv_func_compile+set}" = set; then
17340   echo $ECHO_N "(cached) $ECHO_C" >&6
17341 else
17342   cat >conftest.$ac_ext <<_ACEOF
17343 #line 17343 "configure"
17344 #include "confdefs.h"
17345 #define compile autoconf_temporary
17346 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17347 #undef compile
17348
17349 #ifdef __cplusplus
17350 extern "C"
17351 #endif
17352
17353 /* We use char because int might match the return type of a gcc2
17354    builtin and then its argument prototype would still apply.  */
17355 char compile (void);
17356
17357 int
17358 main (void)
17359 {
17360
17361 /* The GNU C library defines stubs for functions which it implements
17362     to always fail with ENOSYS.  Some functions are actually named
17363     something starting with __ and the normal name is an alias.  */
17364 #if defined (__stub_compile) || defined (__stub___compile)
17365 #error found stub for compile
17366 #endif
17367
17368         return compile ();
17369   ;
17370   return 0;
17371 }
17372 _ACEOF
17373 rm -f conftest.$ac_objext conftest$ac_exeext
17374 if { (eval echo "$as_me:17374: \"$ac_link\"") >&5
17375   (eval $ac_link) 2>&5
17376   ac_status=$?
17377   echo "$as_me:17377: \$? = $ac_status" >&5
17378   (exit $ac_status); } &&
17379          { ac_try='test -s conftest$ac_exeext'
17380   { (eval echo "$as_me:17380: \"$ac_try\"") >&5
17381   (eval $ac_try) 2>&5
17382   ac_status=$?
17383   echo "$as_me:17383: \$? = $ac_status" >&5
17384   (exit $ac_status); }; }; then
17385   ac_cv_func_compile=yes
17386 else
17387   echo "$as_me: failed program was:" >&5
17388 cat conftest.$ac_ext >&5
17389 ac_cv_func_compile=no
17390 fi
17391 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17392 fi
17393 echo "$as_me:17393: result: $ac_cv_func_compile" >&5
17394 echo "${ECHO_T}$ac_cv_func_compile" >&6
17395 if test $ac_cv_func_compile = yes; then
17396   cf_regex_func=compile
17397 else
17398
17399                 echo "$as_me:17399: checking for compile in -lgen" >&5
17400 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
17401 if test "${ac_cv_lib_gen_compile+set}" = set; then
17402   echo $ECHO_N "(cached) $ECHO_C" >&6
17403 else
17404   ac_check_lib_save_LIBS=$LIBS
17405 LIBS="-lgen  $LIBS"
17406 cat >conftest.$ac_ext <<_ACEOF
17407 #line 17407 "configure"
17408 #include "confdefs.h"
17409
17410 /* Override any gcc2 internal prototype to avoid an error.  */
17411 #ifdef __cplusplus
17412 extern "C"
17413 #endif
17414 /* We use char because int might match the return type of a gcc2
17415    builtin and then its argument prototype would still apply.  */
17416 char compile ();
17417 int
17418 main (void)
17419 {
17420 compile ();
17421   ;
17422   return 0;
17423 }
17424 _ACEOF
17425 rm -f conftest.$ac_objext conftest$ac_exeext
17426 if { (eval echo "$as_me:17426: \"$ac_link\"") >&5
17427   (eval $ac_link) 2>&5
17428   ac_status=$?
17429   echo "$as_me:17429: \$? = $ac_status" >&5
17430   (exit $ac_status); } &&
17431          { ac_try='test -s conftest$ac_exeext'
17432   { (eval echo "$as_me:17432: \"$ac_try\"") >&5
17433   (eval $ac_try) 2>&5
17434   ac_status=$?
17435   echo "$as_me:17435: \$? = $ac_status" >&5
17436   (exit $ac_status); }; }; then
17437   ac_cv_lib_gen_compile=yes
17438 else
17439   echo "$as_me: failed program was:" >&5
17440 cat conftest.$ac_ext >&5
17441 ac_cv_lib_gen_compile=no
17442 fi
17443 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17444 LIBS=$ac_check_lib_save_LIBS
17445 fi
17446 echo "$as_me:17446: result: $ac_cv_lib_gen_compile" >&5
17447 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
17448 if test $ac_cv_lib_gen_compile = yes; then
17449
17450 cf_add_libs="-lgen"
17451 # Filter out duplicates - this happens with badly-designed ".pc" files...
17452 for cf_add_1lib in $LIBS
17453 do
17454         for cf_add_2lib in $cf_add_libs
17455         do
17456                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17457                 then
17458                         cf_add_1lib=
17459                         break
17460                 fi
17461         done
17462         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17463 done
17464 LIBS="$cf_add_libs"
17465
17466                                 cf_regex_func=compile
17467 fi
17468
17469 fi
17470
17471 fi
17472
17473 if test "$cf_regex_func" = no ; then
17474         { echo "$as_me:17474: WARNING: cannot find regular expression library" >&5
17475 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
17476 fi
17477
17478 echo "$as_me:17478: checking for regular-expression headers" >&5
17479 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
17480 if test "${cf_cv_regex_hdrs+set}" = set; then
17481   echo $ECHO_N "(cached) $ECHO_C" >&6
17482 else
17483
17484 cf_cv_regex_hdrs=no
17485 case $cf_regex_func in
17486 (compile)
17487         for cf_regex_hdr in regexp.h regexpr.h
17488         do
17489                 cat >conftest.$ac_ext <<_ACEOF
17490 #line 17490 "configure"
17491 #include "confdefs.h"
17492 #include <$cf_regex_hdr>
17493 int
17494 main (void)
17495 {
17496
17497                         char *p = compile("", "", "", 0);
17498                         int x = step("", "");
17499
17500   ;
17501   return 0;
17502 }
17503 _ACEOF
17504 rm -f conftest.$ac_objext conftest$ac_exeext
17505 if { (eval echo "$as_me:17505: \"$ac_link\"") >&5
17506   (eval $ac_link) 2>&5
17507   ac_status=$?
17508   echo "$as_me:17508: \$? = $ac_status" >&5
17509   (exit $ac_status); } &&
17510          { ac_try='test -s conftest$ac_exeext'
17511   { (eval echo "$as_me:17511: \"$ac_try\"") >&5
17512   (eval $ac_try) 2>&5
17513   ac_status=$?
17514   echo "$as_me:17514: \$? = $ac_status" >&5
17515   (exit $ac_status); }; }; then
17516
17517                         cf_cv_regex_hdrs=$cf_regex_hdr
17518                         break
17519
17520 else
17521   echo "$as_me: failed program was:" >&5
17522 cat conftest.$ac_ext >&5
17523 fi
17524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17525         done
17526         ;;
17527 (*)
17528         for cf_regex_hdr in regex.h
17529         do
17530                 cat >conftest.$ac_ext <<_ACEOF
17531 #line 17531 "configure"
17532 #include "confdefs.h"
17533 #include <sys/types.h>
17534 #include <$cf_regex_hdr>
17535 int
17536 main (void)
17537 {
17538
17539                         regex_t *p;
17540                         int x = regcomp(p, "", 0);
17541                         int y = regexec(p, "", 0, 0, 0);
17542                         regfree(p);
17543
17544   ;
17545   return 0;
17546 }
17547 _ACEOF
17548 rm -f conftest.$ac_objext conftest$ac_exeext
17549 if { (eval echo "$as_me:17549: \"$ac_link\"") >&5
17550   (eval $ac_link) 2>&5
17551   ac_status=$?
17552   echo "$as_me:17552: \$? = $ac_status" >&5
17553   (exit $ac_status); } &&
17554          { ac_try='test -s conftest$ac_exeext'
17555   { (eval echo "$as_me:17555: \"$ac_try\"") >&5
17556   (eval $ac_try) 2>&5
17557   ac_status=$?
17558   echo "$as_me:17558: \$? = $ac_status" >&5
17559   (exit $ac_status); }; }; then
17560
17561                         cf_cv_regex_hdrs=$cf_regex_hdr
17562                         break
17563
17564 else
17565   echo "$as_me: failed program was:" >&5
17566 cat conftest.$ac_ext >&5
17567 fi
17568 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17569         done
17570         ;;
17571 esac
17572
17573 fi
17574 echo "$as_me:17574: result: $cf_cv_regex_hdrs" >&5
17575 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
17576
17577 case $cf_cv_regex_hdrs in
17578         (no)            { echo "$as_me:17578: WARNING: no regular expression header found" >&5
17579 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
17580         (regex.h)
17581 cat >>confdefs.h <<\EOF
17582 #define HAVE_REGEX_H_FUNCS 1
17583 EOF
17584  ;;
17585         (regexp.h)
17586 cat >>confdefs.h <<\EOF
17587 #define HAVE_REGEXP_H_FUNCS 1
17588 EOF
17589  ;;
17590         (regexpr.h)
17591 cat >>confdefs.h <<\EOF
17592 #define HAVE_REGEXPR_H_FUNCS 1
17593 EOF
17594  ;;
17595 esac
17596
17597 for ac_header in \
17598 fcntl.h \
17599 getopt.h \
17600 limits.h \
17601 locale.h \
17602 math.h \
17603 poll.h \
17604 sys/bsdtypes.h \
17605 sys/ioctl.h \
17606 sys/param.h \
17607 sys/poll.h \
17608 sys/select.h \
17609 sys/time.h \
17610 sys/times.h \
17611 ttyent.h \
17612 unistd.h \
17613 wctype.h \
17614
17615 do
17616 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17617 echo "$as_me:17617: checking for $ac_header" >&5
17618 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17619 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17620   echo $ECHO_N "(cached) $ECHO_C" >&6
17621 else
17622   cat >conftest.$ac_ext <<_ACEOF
17623 #line 17623 "configure"
17624 #include "confdefs.h"
17625 #include <$ac_header>
17626 _ACEOF
17627 if { (eval echo "$as_me:17627: \"$ac_cpp conftest.$ac_ext\"") >&5
17628   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17629   ac_status=$?
17630   egrep -v '^ *\+' conftest.er1 >conftest.err
17631   rm -f conftest.er1
17632   cat conftest.err >&5
17633   echo "$as_me:17633: \$? = $ac_status" >&5
17634   (exit $ac_status); } >/dev/null; then
17635   if test -s conftest.err; then
17636     ac_cpp_err=$ac_c_preproc_warn_flag
17637   else
17638     ac_cpp_err=
17639   fi
17640 else
17641   ac_cpp_err=yes
17642 fi
17643 if test -z "$ac_cpp_err"; then
17644   eval "$as_ac_Header=yes"
17645 else
17646   echo "$as_me: failed program was:" >&5
17647   cat conftest.$ac_ext >&5
17648   eval "$as_ac_Header=no"
17649 fi
17650 rm -f conftest.err conftest.$ac_ext
17651 fi
17652 echo "$as_me:17652: result: `eval echo '${'$as_ac_Header'}'`" >&5
17653 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17654 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17655   cat >>confdefs.h <<EOF
17656 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17657 EOF
17658
17659 fi
17660 done
17661
17662 for ac_header in unistd.h getopt.h
17663 do
17664 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17665 echo "$as_me:17665: checking for $ac_header" >&5
17666 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17667 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17668   echo $ECHO_N "(cached) $ECHO_C" >&6
17669 else
17670   cat >conftest.$ac_ext <<_ACEOF
17671 #line 17671 "configure"
17672 #include "confdefs.h"
17673 #include <$ac_header>
17674 _ACEOF
17675 if { (eval echo "$as_me:17675: \"$ac_cpp conftest.$ac_ext\"") >&5
17676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17677   ac_status=$?
17678   egrep -v '^ *\+' conftest.er1 >conftest.err
17679   rm -f conftest.er1
17680   cat conftest.err >&5
17681   echo "$as_me:17681: \$? = $ac_status" >&5
17682   (exit $ac_status); } >/dev/null; then
17683   if test -s conftest.err; then
17684     ac_cpp_err=$ac_c_preproc_warn_flag
17685   else
17686     ac_cpp_err=
17687   fi
17688 else
17689   ac_cpp_err=yes
17690 fi
17691 if test -z "$ac_cpp_err"; then
17692   eval "$as_ac_Header=yes"
17693 else
17694   echo "$as_me: failed program was:" >&5
17695   cat conftest.$ac_ext >&5
17696   eval "$as_ac_Header=no"
17697 fi
17698 rm -f conftest.err conftest.$ac_ext
17699 fi
17700 echo "$as_me:17700: result: `eval echo '${'$as_ac_Header'}'`" >&5
17701 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17702 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17703   cat >>confdefs.h <<EOF
17704 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17705 EOF
17706
17707 fi
17708 done
17709
17710 echo "$as_me:17710: checking for header declaring getopt variables" >&5
17711 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
17712 if test "${cf_cv_getopt_header+set}" = set; then
17713   echo $ECHO_N "(cached) $ECHO_C" >&6
17714 else
17715
17716 cf_cv_getopt_header=none
17717 for cf_header in stdio.h stdlib.h unistd.h getopt.h
17718 do
17719 cat >conftest.$ac_ext <<_ACEOF
17720 #line 17720 "configure"
17721 #include "confdefs.h"
17722
17723 #include <$cf_header>
17724 int
17725 main (void)
17726 {
17727 int x = optind; char *y = optarg
17728   ;
17729   return 0;
17730 }
17731 _ACEOF
17732 rm -f conftest.$ac_objext
17733 if { (eval echo "$as_me:17733: \"$ac_compile\"") >&5
17734   (eval $ac_compile) 2>&5
17735   ac_status=$?
17736   echo "$as_me:17736: \$? = $ac_status" >&5
17737   (exit $ac_status); } &&
17738          { ac_try='test -s conftest.$ac_objext'
17739   { (eval echo "$as_me:17739: \"$ac_try\"") >&5
17740   (eval $ac_try) 2>&5
17741   ac_status=$?
17742   echo "$as_me:17742: \$? = $ac_status" >&5
17743   (exit $ac_status); }; }; then
17744   cf_cv_getopt_header=$cf_header
17745  break
17746 else
17747   echo "$as_me: failed program was:" >&5
17748 cat conftest.$ac_ext >&5
17749 fi
17750 rm -f conftest.$ac_objext conftest.$ac_ext
17751 done
17752
17753 fi
17754 echo "$as_me:17754: result: $cf_cv_getopt_header" >&5
17755 echo "${ECHO_T}$cf_cv_getopt_header" >&6
17756 if test $cf_cv_getopt_header != none ; then
17757
17758 cat >>confdefs.h <<\EOF
17759 #define HAVE_GETOPT_HEADER 1
17760 EOF
17761
17762 fi
17763 if test $cf_cv_getopt_header = getopt.h ; then
17764
17765 cat >>confdefs.h <<\EOF
17766 #define NEED_GETOPT_H 1
17767 EOF
17768
17769 fi
17770
17771 # check for ISC (this may also define _POSIX_SOURCE)
17772 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
17773 if test "x$ISC" = xyes ; then
17774
17775 echo "$as_me:17775: checking for main in -lcposix" >&5
17776 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
17777 if test "${ac_cv_lib_cposix_main+set}" = set; then
17778   echo $ECHO_N "(cached) $ECHO_C" >&6
17779 else
17780   ac_check_lib_save_LIBS=$LIBS
17781 LIBS="-lcposix  $LIBS"
17782 cat >conftest.$ac_ext <<_ACEOF
17783 #line 17783 "configure"
17784 #include "confdefs.h"
17785
17786 int
17787 main (void)
17788 {
17789 main ();
17790   ;
17791   return 0;
17792 }
17793 _ACEOF
17794 rm -f conftest.$ac_objext conftest$ac_exeext
17795 if { (eval echo "$as_me:17795: \"$ac_link\"") >&5
17796   (eval $ac_link) 2>&5
17797   ac_status=$?
17798   echo "$as_me:17798: \$? = $ac_status" >&5
17799   (exit $ac_status); } &&
17800          { ac_try='test -s conftest$ac_exeext'
17801   { (eval echo "$as_me:17801: \"$ac_try\"") >&5
17802   (eval $ac_try) 2>&5
17803   ac_status=$?
17804   echo "$as_me:17804: \$? = $ac_status" >&5
17805   (exit $ac_status); }; }; then
17806   ac_cv_lib_cposix_main=yes
17807 else
17808   echo "$as_me: failed program was:" >&5
17809 cat conftest.$ac_ext >&5
17810 ac_cv_lib_cposix_main=no
17811 fi
17812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17813 LIBS=$ac_check_lib_save_LIBS
17814 fi
17815 echo "$as_me:17815: result: $ac_cv_lib_cposix_main" >&5
17816 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
17817 if test $ac_cv_lib_cposix_main = yes; then
17818   cat >>confdefs.h <<EOF
17819 #define HAVE_LIBCPOSIX 1
17820 EOF
17821
17822   LIBS="-lcposix $LIBS"
17823
17824 fi
17825
17826         echo "$as_me:17826: checking for bzero in -linet" >&5
17827 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
17828 if test "${ac_cv_lib_inet_bzero+set}" = set; then
17829   echo $ECHO_N "(cached) $ECHO_C" >&6
17830 else
17831   ac_check_lib_save_LIBS=$LIBS
17832 LIBS="-linet  $LIBS"
17833 cat >conftest.$ac_ext <<_ACEOF
17834 #line 17834 "configure"
17835 #include "confdefs.h"
17836
17837 /* Override any gcc2 internal prototype to avoid an error.  */
17838 #ifdef __cplusplus
17839 extern "C"
17840 #endif
17841 /* We use char because int might match the return type of a gcc2
17842    builtin and then its argument prototype would still apply.  */
17843 char bzero ();
17844 int
17845 main (void)
17846 {
17847 bzero ();
17848   ;
17849   return 0;
17850 }
17851 _ACEOF
17852 rm -f conftest.$ac_objext conftest$ac_exeext
17853 if { (eval echo "$as_me:17853: \"$ac_link\"") >&5
17854   (eval $ac_link) 2>&5
17855   ac_status=$?
17856   echo "$as_me:17856: \$? = $ac_status" >&5
17857   (exit $ac_status); } &&
17858          { ac_try='test -s conftest$ac_exeext'
17859   { (eval echo "$as_me:17859: \"$ac_try\"") >&5
17860   (eval $ac_try) 2>&5
17861   ac_status=$?
17862   echo "$as_me:17862: \$? = $ac_status" >&5
17863   (exit $ac_status); }; }; then
17864   ac_cv_lib_inet_bzero=yes
17865 else
17866   echo "$as_me: failed program was:" >&5
17867 cat conftest.$ac_ext >&5
17868 ac_cv_lib_inet_bzero=no
17869 fi
17870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17871 LIBS=$ac_check_lib_save_LIBS
17872 fi
17873 echo "$as_me:17873: result: $ac_cv_lib_inet_bzero" >&5
17874 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
17875 if test $ac_cv_lib_inet_bzero = yes; then
17876
17877 cf_add_libs="-linet"
17878 # Filter out duplicates - this happens with badly-designed ".pc" files...
17879 for cf_add_1lib in $LIBS
17880 do
17881         for cf_add_2lib in $cf_add_libs
17882         do
17883                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17884                 then
17885                         cf_add_1lib=
17886                         break
17887                 fi
17888         done
17889         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17890 done
17891 LIBS="$cf_add_libs"
17892
17893 fi
17894 fi
17895
17896 echo "$as_me:17896: checking if sys/time.h works with sys/select.h" >&5
17897 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
17898 if test "${cf_cv_sys_time_select+set}" = set; then
17899   echo $ECHO_N "(cached) $ECHO_C" >&6
17900 else
17901
17902 cat >conftest.$ac_ext <<_ACEOF
17903 #line 17903 "configure"
17904 #include "confdefs.h"
17905
17906 #include <sys/types.h>
17907 #ifdef HAVE_SYS_TIME_H
17908 #include <sys/time.h>
17909 #endif
17910 #ifdef HAVE_SYS_SELECT_H
17911 #include <sys/select.h>
17912 #endif
17913
17914 int
17915 main (void)
17916 {
17917
17918   ;
17919   return 0;
17920 }
17921 _ACEOF
17922 rm -f conftest.$ac_objext
17923 if { (eval echo "$as_me:17923: \"$ac_compile\"") >&5
17924   (eval $ac_compile) 2>&5
17925   ac_status=$?
17926   echo "$as_me:17926: \$? = $ac_status" >&5
17927   (exit $ac_status); } &&
17928          { ac_try='test -s conftest.$ac_objext'
17929   { (eval echo "$as_me:17929: \"$ac_try\"") >&5
17930   (eval $ac_try) 2>&5
17931   ac_status=$?
17932   echo "$as_me:17932: \$? = $ac_status" >&5
17933   (exit $ac_status); }; }; then
17934   cf_cv_sys_time_select=yes
17935 else
17936   echo "$as_me: failed program was:" >&5
17937 cat conftest.$ac_ext >&5
17938 cf_cv_sys_time_select=no
17939 fi
17940 rm -f conftest.$ac_objext conftest.$ac_ext
17941
17942 fi
17943
17944 echo "$as_me:17944: result: $cf_cv_sys_time_select" >&5
17945 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
17946 test "$cf_cv_sys_time_select" = yes &&
17947 cat >>confdefs.h <<\EOF
17948 #define HAVE_SYS_TIME_SELECT 1
17949 EOF
17950
17951 ###     checks for compiler characteristics
17952 ac_ext=c
17953 ac_cpp='$CPP $CPPFLAGS'
17954 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17955 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17956 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17957 ac_main_return=return
17958
17959 echo "$as_me:17959: checking for an ANSI C-conforming const" >&5
17960 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
17961 if test "${ac_cv_c_const+set}" = set; then
17962   echo $ECHO_N "(cached) $ECHO_C" >&6
17963 else
17964   cat >conftest.$ac_ext <<_ACEOF
17965 #line 17965 "configure"
17966 #include "confdefs.h"
17967
17968 int
17969 main (void)
17970 {
17971 /* FIXME: Include the comments suggested by Paul. */
17972 #ifndef __cplusplus
17973   /* Ultrix mips cc rejects this.  */
17974   typedef int charset[2];
17975   const charset x;
17976   /* SunOS 4.1.1 cc rejects this.  */
17977   char const *const *ccp;
17978   char **p;
17979   /* NEC SVR4.0.2 mips cc rejects this.  */
17980   struct point {int x, y;};
17981   static struct point const zero = {0,0};
17982   /* AIX XL C 1.02.0.0 rejects this.
17983      It does not let you subtract one const X* pointer from another in
17984      an arm of an if-expression whose if-part is not a constant
17985      expression */
17986   const char *g = "string";
17987   ccp = &g + (g ? g-g : 0);
17988   /* HPUX 7.0 cc rejects these. */
17989   ++ccp;
17990   p = (char**) ccp;
17991   ccp = (char const *const *) p;
17992   { /* SCO 3.2v4 cc rejects this.  */
17993     char *t;
17994     char const *s = 0 ? (char *) 0 : (char const *) 0;
17995
17996     *t++ = 0;
17997   }
17998   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
17999     int x[] = {25, 17};
18000     const int *foo = &x[0];
18001     ++foo;
18002   }
18003   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18004     typedef const int *iptr;
18005     iptr p = 0;
18006     ++p;
18007   }
18008   { /* AIX XL C 1.02.0.0 rejects this saying
18009        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18010     struct s { int j; const int *ap[3]; };
18011     struct s *b; b->j = 5;
18012   }
18013   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18014     const int foo = 10;
18015   }
18016 #endif
18017
18018   ;
18019   return 0;
18020 }
18021 _ACEOF
18022 rm -f conftest.$ac_objext
18023 if { (eval echo "$as_me:18023: \"$ac_compile\"") >&5
18024   (eval $ac_compile) 2>&5
18025   ac_status=$?
18026   echo "$as_me:18026: \$? = $ac_status" >&5
18027   (exit $ac_status); } &&
18028          { ac_try='test -s conftest.$ac_objext'
18029   { (eval echo "$as_me:18029: \"$ac_try\"") >&5
18030   (eval $ac_try) 2>&5
18031   ac_status=$?
18032   echo "$as_me:18032: \$? = $ac_status" >&5
18033   (exit $ac_status); }; }; then
18034   ac_cv_c_const=yes
18035 else
18036   echo "$as_me: failed program was:" >&5
18037 cat conftest.$ac_ext >&5
18038 ac_cv_c_const=no
18039 fi
18040 rm -f conftest.$ac_objext conftest.$ac_ext
18041 fi
18042 echo "$as_me:18042: result: $ac_cv_c_const" >&5
18043 echo "${ECHO_T}$ac_cv_c_const" >&6
18044 if test $ac_cv_c_const = no; then
18045
18046 cat >>confdefs.h <<\EOF
18047 #define const
18048 EOF
18049
18050 fi
18051
18052 echo "$as_me:18052: checking for inline" >&5
18053 echo $ECHO_N "checking for inline... $ECHO_C" >&6
18054 if test "${ac_cv_c_inline+set}" = set; then
18055   echo $ECHO_N "(cached) $ECHO_C" >&6
18056 else
18057   ac_cv_c_inline=no
18058 for ac_kw in inline __inline__ __inline; do
18059   cat >conftest.$ac_ext <<_ACEOF
18060 #line 18060 "configure"
18061 #include "confdefs.h"
18062 #ifndef __cplusplus
18063 static $ac_kw int static_foo () {return 0; }
18064 $ac_kw int foo () {return 0; }
18065 #endif
18066
18067 _ACEOF
18068 rm -f conftest.$ac_objext
18069 if { (eval echo "$as_me:18069: \"$ac_compile\"") >&5
18070   (eval $ac_compile) 2>&5
18071   ac_status=$?
18072   echo "$as_me:18072: \$? = $ac_status" >&5
18073   (exit $ac_status); } &&
18074          { ac_try='test -s conftest.$ac_objext'
18075   { (eval echo "$as_me:18075: \"$ac_try\"") >&5
18076   (eval $ac_try) 2>&5
18077   ac_status=$?
18078   echo "$as_me:18078: \$? = $ac_status" >&5
18079   (exit $ac_status); }; }; then
18080   ac_cv_c_inline=$ac_kw; break
18081 else
18082   echo "$as_me: failed program was:" >&5
18083 cat conftest.$ac_ext >&5
18084 fi
18085 rm -f conftest.$ac_objext conftest.$ac_ext
18086 done
18087
18088 fi
18089 echo "$as_me:18089: result: $ac_cv_c_inline" >&5
18090 echo "${ECHO_T}$ac_cv_c_inline" >&6
18091 case $ac_cv_c_inline in
18092   inline | yes) ;;
18093   no)
18094 cat >>confdefs.h <<\EOF
18095 #define inline
18096 EOF
18097  ;;
18098   *)  cat >>confdefs.h <<EOF
18099 #define inline $ac_cv_c_inline
18100 EOF
18101  ;;
18102 esac
18103
18104 NCURSES_INLINE=
18105 if test "$ac_cv_c_inline" != no ; then
18106         NCURSES_INLINE=inline
18107         if test "$INTEL_COMPILER" = yes
18108         then
18109                 :
18110         elif test "$CLANG_COMPILER" = yes
18111         then
18112                 :
18113         elif test "$GCC" = yes
18114         then
18115                 echo "$as_me:18115: checking if $CC supports options to tune inlining" >&5
18116 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
18117 if test "${cf_cv_gcc_inline+set}" = set; then
18118   echo $ECHO_N "(cached) $ECHO_C" >&6
18119 else
18120
18121                 cf_save_CFLAGS=$CFLAGS
18122                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
18123                 cat >conftest.$ac_ext <<_ACEOF
18124 #line 18124 "configure"
18125 #include "confdefs.h"
18126 inline int foo(void) { return 1; }
18127 int
18128 main (void)
18129 {
18130 ${cf_cv_main_return:-return} foo()
18131   ;
18132   return 0;
18133 }
18134 _ACEOF
18135 rm -f conftest.$ac_objext
18136 if { (eval echo "$as_me:18136: \"$ac_compile\"") >&5
18137   (eval $ac_compile) 2>&5
18138   ac_status=$?
18139   echo "$as_me:18139: \$? = $ac_status" >&5
18140   (exit $ac_status); } &&
18141          { ac_try='test -s conftest.$ac_objext'
18142   { (eval echo "$as_me:18142: \"$ac_try\"") >&5
18143   (eval $ac_try) 2>&5
18144   ac_status=$?
18145   echo "$as_me:18145: \$? = $ac_status" >&5
18146   (exit $ac_status); }; }; then
18147   cf_cv_gcc_inline=yes
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 cat conftest.$ac_ext >&5
18151 cf_cv_gcc_inline=no
18152 fi
18153 rm -f conftest.$ac_objext conftest.$ac_ext
18154                 CFLAGS=$cf_save_CFLAGS
18155
18156 fi
18157 echo "$as_me:18157: result: $cf_cv_gcc_inline" >&5
18158 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
18159                 if test "$cf_cv_gcc_inline" = yes ; then
18160
18161 cf_fix_cppflags=no
18162 cf_new_cflags=
18163 cf_new_cppflags=
18164 cf_new_extra_cppflags=
18165
18166 for cf_add_cflags in --param max-inline-insns-single=1200
18167 do
18168 case $cf_fix_cppflags in
18169 (no)
18170         case $cf_add_cflags in
18171         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18172                 case $cf_add_cflags in
18173                 (-D*)
18174                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18175
18176                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18177                                 && test -z "${cf_tst_cflags}" \
18178                                 && cf_fix_cppflags=yes
18179
18180                         if test $cf_fix_cppflags = yes ; then
18181
18182         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18183         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18184
18185                                 continue
18186                         elif test "${cf_tst_cflags}" = "\"'" ; then
18187
18188         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18189         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18190
18191                                 continue
18192                         fi
18193                         ;;
18194                 esac
18195                 case "$CPPFLAGS" in
18196                 (*$cf_add_cflags)
18197                         ;;
18198                 (*)
18199                         case $cf_add_cflags in
18200                         (-D*)
18201                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18202
18203 CPPFLAGS=`echo "$CPPFLAGS" | \
18204         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18205                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18206
18207                                 ;;
18208                         esac
18209
18210         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18211         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18212
18213                         ;;
18214                 esac
18215                 ;;
18216         (*)
18217
18218         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18219         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18220
18221                 ;;
18222         esac
18223         ;;
18224 (yes)
18225
18226         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18227         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18228
18229         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18230
18231         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18232                 && test -z "${cf_tst_cflags}" \
18233                 && cf_fix_cppflags=no
18234         ;;
18235 esac
18236 done
18237
18238 if test -n "$cf_new_cflags" ; then
18239
18240         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18241         CFLAGS="${CFLAGS}$cf_new_cflags"
18242
18243 fi
18244
18245 if test -n "$cf_new_cppflags" ; then
18246
18247         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18248         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18249
18250 fi
18251
18252 if test -n "$cf_new_extra_cppflags" ; then
18253
18254         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18255         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18256
18257 fi
18258
18259                 fi
18260         fi
18261 fi
18262
18263 echo "$as_me:18263: checking for signal global datatype" >&5
18264 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
18265 if test "${cf_cv_sig_atomic_t+set}" = set; then
18266   echo $ECHO_N "(cached) $ECHO_C" >&6
18267 else
18268
18269         for cf_type in \
18270                 "volatile sig_atomic_t" \
18271                 "sig_atomic_t" \
18272                 "int"
18273         do
18274         cat >conftest.$ac_ext <<_ACEOF
18275 #line 18275 "configure"
18276 #include "confdefs.h"
18277
18278 #include <sys/types.h>
18279 #include <signal.h>
18280 #include <stdio.h>
18281
18282 extern $cf_type x;
18283 $cf_type x;
18284 static void handler(int sig)
18285 {
18286         x = 5;
18287 }
18288 int
18289 main (void)
18290 {
18291 signal(SIGINT, handler);
18292                  x = 1
18293   ;
18294   return 0;
18295 }
18296 _ACEOF
18297 rm -f conftest.$ac_objext
18298 if { (eval echo "$as_me:18298: \"$ac_compile\"") >&5
18299   (eval $ac_compile) 2>&5
18300   ac_status=$?
18301   echo "$as_me:18301: \$? = $ac_status" >&5
18302   (exit $ac_status); } &&
18303          { ac_try='test -s conftest.$ac_objext'
18304   { (eval echo "$as_me:18304: \"$ac_try\"") >&5
18305   (eval $ac_try) 2>&5
18306   ac_status=$?
18307   echo "$as_me:18307: \$? = $ac_status" >&5
18308   (exit $ac_status); }; }; then
18309   cf_cv_sig_atomic_t=$cf_type
18310 else
18311   echo "$as_me: failed program was:" >&5
18312 cat conftest.$ac_ext >&5
18313 cf_cv_sig_atomic_t=no
18314 fi
18315 rm -f conftest.$ac_objext conftest.$ac_ext
18316                 test "$cf_cv_sig_atomic_t" != no && break
18317         done
18318
18319 fi
18320
18321 echo "$as_me:18321: result: $cf_cv_sig_atomic_t" >&5
18322 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
18323 test "$cf_cv_sig_atomic_t" != no &&
18324 cat >>confdefs.h <<EOF
18325 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
18326 EOF
18327
18328 if test $NCURSES_CHTYPE = auto ; then
18329
18330 echo "$as_me:18330: checking for type of chtype" >&5
18331 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
18332 if test "${cf_cv_typeof_chtype+set}" = set; then
18333   echo $ECHO_N "(cached) $ECHO_C" >&6
18334 else
18335
18336                 if test "$cross_compiling" = yes; then
18337   cf_cv_typeof_chtype=long
18338 else
18339   cat >conftest.$ac_ext <<_ACEOF
18340 #line 18340 "configure"
18341 #include "confdefs.h"
18342
18343 #define WANT_BITS 31
18344 #include <stdio.h>
18345 int main(void)
18346 {
18347         FILE *fp = fopen("cf_test.out", "w");
18348         if (fp != 0) {
18349                 char *result = "long";
18350                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
18351                         int n;
18352                         unsigned int x, y;
18353                         for (n = 0; n < WANT_BITS; n++) {
18354                                 x = (1 << n);
18355                                 y = (x >> n);
18356                                 if (y != 1 || x == 0) {
18357                                         x = 0;
18358                                         break;
18359                                 }
18360                         }
18361                         /*
18362                          * If x is nonzero, an int is big enough for the bits
18363                          * that we want.
18364                          */
18365                         result = (x != 0) ? "int" : "long";
18366                 }
18367                 fputs(result, fp);
18368                 fclose(fp);
18369         }
18370         ${cf_cv_main_return:-return}(0);
18371 }
18372
18373 _ACEOF
18374 rm -f 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); } && { ac_try='./conftest$ac_exeext'
18380   { (eval echo "$as_me:18380: \"$ac_try\"") >&5
18381   (eval $ac_try) 2>&5
18382   ac_status=$?
18383   echo "$as_me:18383: \$? = $ac_status" >&5
18384   (exit $ac_status); }; }; then
18385   cf_cv_typeof_chtype=`cat cf_test.out`
18386 else
18387   echo "$as_me: program exited with status $ac_status" >&5
18388 echo "$as_me: failed program was:" >&5
18389 cat conftest.$ac_ext >&5
18390 cf_cv_typeof_chtype=long
18391 fi
18392 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18393 fi
18394                 rm -f cf_test.out
18395
18396 fi
18397
18398 echo "$as_me:18398: result: $cf_cv_typeof_chtype" >&5
18399 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
18400
18401 cat >>confdefs.h <<EOF
18402 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
18403 EOF
18404
18405 else
18406         cf_cv_typeof_chtype=$NCURSES_CHTYPE
18407 fi
18408 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
18409
18410 echo "$as_me:18410: checking if unsigned literals are legal" >&5
18411 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
18412 if test "${cf_cv_unsigned_literals+set}" = set; then
18413   echo $ECHO_N "(cached) $ECHO_C" >&6
18414 else
18415
18416         cat >conftest.$ac_ext <<_ACEOF
18417 #line 18417 "configure"
18418 #include "confdefs.h"
18419
18420 int
18421 main (void)
18422 {
18423 long x = 1L + 1UL + 1U + 1
18424   ;
18425   return 0;
18426 }
18427 _ACEOF
18428 rm -f conftest.$ac_objext
18429 if { (eval echo "$as_me:18429: \"$ac_compile\"") >&5
18430   (eval $ac_compile) 2>&5
18431   ac_status=$?
18432   echo "$as_me:18432: \$? = $ac_status" >&5
18433   (exit $ac_status); } &&
18434          { ac_try='test -s conftest.$ac_objext'
18435   { (eval echo "$as_me:18435: \"$ac_try\"") >&5
18436   (eval $ac_try) 2>&5
18437   ac_status=$?
18438   echo "$as_me:18438: \$? = $ac_status" >&5
18439   (exit $ac_status); }; }; then
18440   cf_cv_unsigned_literals=yes
18441 else
18442   echo "$as_me: failed program was:" >&5
18443 cat conftest.$ac_ext >&5
18444 cf_cv_unsigned_literals=no
18445 fi
18446 rm -f conftest.$ac_objext conftest.$ac_ext
18447
18448 fi
18449
18450 echo "$as_me:18450: result: $cf_cv_unsigned_literals" >&5
18451 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
18452
18453 cf_cv_1UL="1"
18454 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
18455 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
18456
18457 if test $NCURSES_MMASK_T = auto ; then
18458         cf_cv_typeof_mmask_t=long
18459 else
18460         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
18461 fi
18462 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
18463
18464 ###     Checks for external-data
18465
18466 echo "$as_me:18466: checking if external errno is declared" >&5
18467 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
18468 if test "${cf_cv_dcl_errno+set}" = set; then
18469   echo $ECHO_N "(cached) $ECHO_C" >&6
18470 else
18471
18472         cat >conftest.$ac_ext <<_ACEOF
18473 #line 18473 "configure"
18474 #include "confdefs.h"
18475
18476 #ifdef HAVE_STDLIB_H
18477 #include <stdlib.h>
18478 #endif
18479 #include <stdio.h>
18480 #include <sys/types.h>
18481 #include <errno.h>
18482 int
18483 main (void)
18484 {
18485 int x = (int) errno
18486   ;
18487   return 0;
18488 }
18489 _ACEOF
18490 rm -f conftest.$ac_objext
18491 if { (eval echo "$as_me:18491: \"$ac_compile\"") >&5
18492   (eval $ac_compile) 2>&5
18493   ac_status=$?
18494   echo "$as_me:18494: \$? = $ac_status" >&5
18495   (exit $ac_status); } &&
18496          { ac_try='test -s conftest.$ac_objext'
18497   { (eval echo "$as_me:18497: \"$ac_try\"") >&5
18498   (eval $ac_try) 2>&5
18499   ac_status=$?
18500   echo "$as_me:18500: \$? = $ac_status" >&5
18501   (exit $ac_status); }; }; then
18502   cf_cv_dcl_errno=yes
18503 else
18504   echo "$as_me: failed program was:" >&5
18505 cat conftest.$ac_ext >&5
18506 cf_cv_dcl_errno=no
18507 fi
18508 rm -f conftest.$ac_objext conftest.$ac_ext
18509
18510 fi
18511 echo "$as_me:18511: result: $cf_cv_dcl_errno" >&5
18512 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
18513
18514 if test "$cf_cv_dcl_errno" = no ; then
18515
18516 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18517
18518         cat >>confdefs.h <<EOF
18519 #define $cf_result 1
18520 EOF
18521
18522 fi
18523
18524 # It's possible (for near-UNIX clones) that the data doesn't exist
18525
18526 echo "$as_me:18526: checking if external errno exists" >&5
18527 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
18528 if test "${cf_cv_have_errno+set}" = set; then
18529   echo $ECHO_N "(cached) $ECHO_C" >&6
18530 else
18531
18532         cat >conftest.$ac_ext <<_ACEOF
18533 #line 18533 "configure"
18534 #include "confdefs.h"
18535
18536 #undef errno
18537 extern int errno;
18538
18539 int
18540 main (void)
18541 {
18542 errno = 2
18543   ;
18544   return 0;
18545 }
18546 _ACEOF
18547 rm -f conftest.$ac_objext conftest$ac_exeext
18548 if { (eval echo "$as_me:18548: \"$ac_link\"") >&5
18549   (eval $ac_link) 2>&5
18550   ac_status=$?
18551   echo "$as_me:18551: \$? = $ac_status" >&5
18552   (exit $ac_status); } &&
18553          { ac_try='test -s conftest$ac_exeext'
18554   { (eval echo "$as_me:18554: \"$ac_try\"") >&5
18555   (eval $ac_try) 2>&5
18556   ac_status=$?
18557   echo "$as_me:18557: \$? = $ac_status" >&5
18558   (exit $ac_status); }; }; then
18559   cf_cv_have_errno=yes
18560 else
18561   echo "$as_me: failed program was:" >&5
18562 cat conftest.$ac_ext >&5
18563 cf_cv_have_errno=no
18564 fi
18565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18566
18567 fi
18568 echo "$as_me:18568: result: $cf_cv_have_errno" >&5
18569 echo "${ECHO_T}$cf_cv_have_errno" >&6
18570
18571 if test "$cf_cv_have_errno" = yes ; then
18572
18573 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18574
18575         cat >>confdefs.h <<EOF
18576 #define $cf_result 1
18577 EOF
18578
18579 fi
18580
18581 echo "$as_me:18581: checking if data-only library module links" >&5
18582 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
18583 if test "${cf_cv_link_dataonly+set}" = set; then
18584   echo $ECHO_N "(cached) $ECHO_C" >&6
18585 else
18586
18587         rm -f conftest.a
18588         cat >conftest.$ac_ext <<EOF
18589 #line 18589 "configure"
18590 int     testdata[3] = { 123, 456, 789 };
18591 EOF
18592         if { (eval echo "$as_me:18592: \"$ac_compile\"") >&5
18593   (eval $ac_compile) 2>&5
18594   ac_status=$?
18595   echo "$as_me:18595: \$? = $ac_status" >&5
18596   (exit $ac_status); } ; then
18597                 mv conftest.o data.o && \
18598                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
18599         fi
18600         rm -f conftest.$ac_ext data.o
18601         cat >conftest.$ac_ext <<EOF
18602 #line 18602 "configure"
18603 int     testfunc(void)
18604 {
18605 #if defined(NeXT)
18606         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
18607 #else
18608         extern int testdata[3];
18609         return testdata[0] == 123
18610            &&  testdata[1] == 456
18611            &&  testdata[2] == 789;
18612 #endif
18613 }
18614 EOF
18615         if { (eval echo "$as_me:18615: \"$ac_compile\"") >&5
18616   (eval $ac_compile) 2>&5
18617   ac_status=$?
18618   echo "$as_me:18618: \$? = $ac_status" >&5
18619   (exit $ac_status); }; then
18620                 mv conftest.o func.o && \
18621                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
18622         fi
18623         rm -f conftest.$ac_ext func.o
18624         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
18625         cf_saveLIBS="$LIBS"
18626         LIBS="conftest.a $LIBS"
18627         if test "$cross_compiling" = yes; then
18628   cf_cv_link_dataonly=unknown
18629 else
18630   cat >conftest.$ac_ext <<_ACEOF
18631 #line 18631 "configure"
18632 #include "confdefs.h"
18633
18634         int main(void)
18635         {
18636                 extern int testfunc();
18637                 ${cf_cv_main_return:-return} (!testfunc());
18638         }
18639
18640 _ACEOF
18641 rm -f conftest$ac_exeext
18642 if { (eval echo "$as_me:18642: \"$ac_link\"") >&5
18643   (eval $ac_link) 2>&5
18644   ac_status=$?
18645   echo "$as_me:18645: \$? = $ac_status" >&5
18646   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18647   { (eval echo "$as_me:18647: \"$ac_try\"") >&5
18648   (eval $ac_try) 2>&5
18649   ac_status=$?
18650   echo "$as_me:18650: \$? = $ac_status" >&5
18651   (exit $ac_status); }; }; then
18652   cf_cv_link_dataonly=yes
18653 else
18654   echo "$as_me: program exited with status $ac_status" >&5
18655 echo "$as_me: failed program was:" >&5
18656 cat conftest.$ac_ext >&5
18657 cf_cv_link_dataonly=no
18658 fi
18659 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18660 fi
18661         LIBS="$cf_saveLIBS"
18662
18663 fi
18664
18665 echo "$as_me:18665: result: $cf_cv_link_dataonly" >&5
18666 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
18667
18668 if test "$cf_cv_link_dataonly" = no ; then
18669
18670 cat >>confdefs.h <<\EOF
18671 #define BROKEN_LINKER 1
18672 EOF
18673
18674         BROKEN_LINKER=1
18675 fi
18676
18677 ###     Checks for library functions.
18678
18679 for ac_func in \
18680 getcwd \
18681 getegid \
18682 geteuid \
18683 getopt \
18684 getttynam \
18685 issetugid \
18686 poll \
18687 putenv \
18688 remove \
18689 select \
18690 setbuf \
18691 setbuffer \
18692 setenv \
18693 setvbuf \
18694 sigaction \
18695 sigvec \
18696 strdup \
18697 strstr \
18698 sysconf \
18699 tcgetpgrp \
18700 tdestroy \
18701 times \
18702 tsearch \
18703 vsnprintf \
18704
18705 do
18706 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18707 echo "$as_me:18707: checking for $ac_func" >&5
18708 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18709 if eval "test \"\${$as_ac_var+set}\" = set"; then
18710   echo $ECHO_N "(cached) $ECHO_C" >&6
18711 else
18712   cat >conftest.$ac_ext <<_ACEOF
18713 #line 18713 "configure"
18714 #include "confdefs.h"
18715 #define $ac_func autoconf_temporary
18716 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18717 #undef $ac_func
18718
18719 #ifdef __cplusplus
18720 extern "C"
18721 #endif
18722
18723 /* We use char because int might match the return type of a gcc2
18724    builtin and then its argument prototype would still apply.  */
18725 char $ac_func (void);
18726
18727 int
18728 main (void)
18729 {
18730
18731 /* The GNU C library defines stubs for functions which it implements
18732     to always fail with ENOSYS.  Some functions are actually named
18733     something starting with __ and the normal name is an alias.  */
18734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18735 #error found stub for $ac_func
18736 #endif
18737
18738         return $ac_func ();
18739   ;
18740   return 0;
18741 }
18742 _ACEOF
18743 rm -f conftest.$ac_objext conftest$ac_exeext
18744 if { (eval echo "$as_me:18744: \"$ac_link\"") >&5
18745   (eval $ac_link) 2>&5
18746   ac_status=$?
18747   echo "$as_me:18747: \$? = $ac_status" >&5
18748   (exit $ac_status); } &&
18749          { ac_try='test -s conftest$ac_exeext'
18750   { (eval echo "$as_me:18750: \"$ac_try\"") >&5
18751   (eval $ac_try) 2>&5
18752   ac_status=$?
18753   echo "$as_me:18753: \$? = $ac_status" >&5
18754   (exit $ac_status); }; }; then
18755   eval "$as_ac_var=yes"
18756 else
18757   echo "$as_me: failed program was:" >&5
18758 cat conftest.$ac_ext >&5
18759 eval "$as_ac_var=no"
18760 fi
18761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18762 fi
18763 echo "$as_me:18763: result: `eval echo '${'$as_ac_var'}'`" >&5
18764 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18765 if test `eval echo '${'$as_ac_var'}'` = yes; then
18766   cat >>confdefs.h <<EOF
18767 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18768 EOF
18769
18770 fi
18771 done
18772
18773 if test "x$ac_cv_func_getopt" = xno && \
18774    test "x$cf_with_progs$cf_with_tests" != xnono; then
18775         { { echo "$as_me:18775: error: getopt is required for building programs" >&5
18776 echo "$as_me: error: getopt is required for building programs" >&2;}
18777    { (exit 1); exit 1; }; }
18778 fi
18779
18780 if test "x$with_safe_sprintf" = xyes
18781 then
18782         if test "x$ac_cv_func_vsnprintf" = xyes
18783         then
18784                 { echo "$as_me:18784: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
18785 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
18786         else
18787
18788 cat >>confdefs.h <<\EOF
18789 #define USE_SAFE_SPRINTF 1
18790 EOF
18791
18792         fi
18793 fi
18794
18795 if test "x$with_getcap" = "xyes" ; then
18796
18797 echo "$as_me:18797: checking for terminal-capability database functions" >&5
18798 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
18799 if test "${cf_cv_cgetent+set}" = set; then
18800   echo $ECHO_N "(cached) $ECHO_C" >&6
18801 else
18802
18803 cat >conftest.$ac_ext <<_ACEOF
18804 #line 18804 "configure"
18805 #include "confdefs.h"
18806
18807 #include <stdlib.h>
18808 int
18809 main (void)
18810 {
18811
18812         char temp[128];
18813         char *buf = temp;
18814         char *db_array = temp;
18815         cgetent(&buf, &db_array, "vt100");
18816         cgetcap(buf, "tc", '=');
18817         cgetmatch(buf, "tc");
18818
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 rm -f conftest.$ac_objext conftest$ac_exeext
18824 if { (eval echo "$as_me:18824: \"$ac_link\"") >&5
18825   (eval $ac_link) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit $ac_status); } &&
18829          { ac_try='test -s conftest$ac_exeext'
18830   { (eval echo "$as_me:18830: \"$ac_try\"") >&5
18831   (eval $ac_try) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit $ac_status); }; }; then
18835   cf_cv_cgetent=yes
18836 else
18837   echo "$as_me: failed program was:" >&5
18838 cat conftest.$ac_ext >&5
18839 cf_cv_cgetent=no
18840 fi
18841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18842
18843 fi
18844 echo "$as_me:18844: result: $cf_cv_cgetent" >&5
18845 echo "${ECHO_T}$cf_cv_cgetent" >&6
18846
18847 if test "$cf_cv_cgetent" = yes
18848 then
18849
18850 cat >>confdefs.h <<\EOF
18851 #define HAVE_BSD_CGETENT 1
18852 EOF
18853
18854 echo "$as_me:18854: checking if cgetent uses const parameter" >&5
18855 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
18856 if test "${cf_cv_cgetent_const+set}" = set; then
18857   echo $ECHO_N "(cached) $ECHO_C" >&6
18858 else
18859
18860 cat >conftest.$ac_ext <<_ACEOF
18861 #line 18861 "configure"
18862 #include "confdefs.h"
18863
18864 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
18865 #include <stdlib.h>
18866 int
18867 main (void)
18868 {
18869
18870         char temp[128];
18871         char *buf = temp;
18872 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
18873         const char *db_array = temp;
18874         cgetent(&buf, &db_array, "vt100");
18875 #endif
18876         cgetcap(buf, "tc", '=');
18877         cgetmatch(buf, "tc");
18878
18879   ;
18880   return 0;
18881 }
18882 _ACEOF
18883 rm -f conftest.$ac_objext conftest$ac_exeext
18884 if { (eval echo "$as_me:18884: \"$ac_link\"") >&5
18885   (eval $ac_link) 2>&5
18886   ac_status=$?
18887   echo "$as_me:18887: \$? = $ac_status" >&5
18888   (exit $ac_status); } &&
18889          { ac_try='test -s conftest$ac_exeext'
18890   { (eval echo "$as_me:18890: \"$ac_try\"") >&5
18891   (eval $ac_try) 2>&5
18892   ac_status=$?
18893   echo "$as_me:18893: \$? = $ac_status" >&5
18894   (exit $ac_status); }; }; then
18895   cf_cv_cgetent_const=yes
18896 else
18897   echo "$as_me: failed program was:" >&5
18898 cat conftest.$ac_ext >&5
18899 cf_cv_cgetent_const=no
18900 fi
18901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18902
18903 fi
18904 echo "$as_me:18904: result: $cf_cv_cgetent_const" >&5
18905 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
18906         if test "$cf_cv_cgetent_const" = yes
18907         then
18908
18909 cat >>confdefs.h <<EOF
18910 #define CGETENT_CONST const
18911 EOF
18912
18913         fi
18914 fi
18915
18916 fi
18917
18918 echo "$as_me:18918: checking for isascii" >&5
18919 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
18920 if test "${cf_cv_have_isascii+set}" = set; then
18921   echo $ECHO_N "(cached) $ECHO_C" >&6
18922 else
18923
18924         cat >conftest.$ac_ext <<_ACEOF
18925 #line 18925 "configure"
18926 #include "confdefs.h"
18927 #include <ctype.h>
18928 int
18929 main (void)
18930 {
18931 int x = isascii(' ')
18932   ;
18933   return 0;
18934 }
18935 _ACEOF
18936 rm -f conftest.$ac_objext conftest$ac_exeext
18937 if { (eval echo "$as_me:18937: \"$ac_link\"") >&5
18938   (eval $ac_link) 2>&5
18939   ac_status=$?
18940   echo "$as_me:18940: \$? = $ac_status" >&5
18941   (exit $ac_status); } &&
18942          { ac_try='test -s conftest$ac_exeext'
18943   { (eval echo "$as_me:18943: \"$ac_try\"") >&5
18944   (eval $ac_try) 2>&5
18945   ac_status=$?
18946   echo "$as_me:18946: \$? = $ac_status" >&5
18947   (exit $ac_status); }; }; then
18948   cf_cv_have_isascii=yes
18949 else
18950   echo "$as_me: failed program was:" >&5
18951 cat conftest.$ac_ext >&5
18952 cf_cv_have_isascii=no
18953 fi
18954 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18955
18956 fi
18957 echo "$as_me:18957: result: $cf_cv_have_isascii" >&5
18958 echo "${ECHO_T}$cf_cv_have_isascii" >&6
18959 test "$cf_cv_have_isascii" = yes &&
18960 cat >>confdefs.h <<\EOF
18961 #define HAVE_ISASCII 1
18962 EOF
18963
18964 if test "$ac_cv_func_sigaction" = yes; then
18965 echo "$as_me:18965: checking whether sigaction needs _POSIX_SOURCE" >&5
18966 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
18967 cat >conftest.$ac_ext <<_ACEOF
18968 #line 18968 "configure"
18969 #include "confdefs.h"
18970
18971 #include <sys/types.h>
18972 #include <signal.h>
18973 int
18974 main (void)
18975 {
18976 struct sigaction act
18977   ;
18978   return 0;
18979 }
18980 _ACEOF
18981 rm -f conftest.$ac_objext
18982 if { (eval echo "$as_me:18982: \"$ac_compile\"") >&5
18983   (eval $ac_compile) 2>&5
18984   ac_status=$?
18985   echo "$as_me:18985: \$? = $ac_status" >&5
18986   (exit $ac_status); } &&
18987          { ac_try='test -s conftest.$ac_objext'
18988   { (eval echo "$as_me:18988: \"$ac_try\"") >&5
18989   (eval $ac_try) 2>&5
18990   ac_status=$?
18991   echo "$as_me:18991: \$? = $ac_status" >&5
18992   (exit $ac_status); }; }; then
18993   sigact_bad=no
18994 else
18995   echo "$as_me: failed program was:" >&5
18996 cat conftest.$ac_ext >&5
18997
18998 cat >conftest.$ac_ext <<_ACEOF
18999 #line 18999 "configure"
19000 #include "confdefs.h"
19001
19002 #define _POSIX_SOURCE
19003 #include <sys/types.h>
19004 #include <signal.h>
19005 int
19006 main (void)
19007 {
19008 struct sigaction act
19009   ;
19010   return 0;
19011 }
19012 _ACEOF
19013 rm -f conftest.$ac_objext
19014 if { (eval echo "$as_me:19014: \"$ac_compile\"") >&5
19015   (eval $ac_compile) 2>&5
19016   ac_status=$?
19017   echo "$as_me:19017: \$? = $ac_status" >&5
19018   (exit $ac_status); } &&
19019          { ac_try='test -s conftest.$ac_objext'
19020   { (eval echo "$as_me:19020: \"$ac_try\"") >&5
19021   (eval $ac_try) 2>&5
19022   ac_status=$?
19023   echo "$as_me:19023: \$? = $ac_status" >&5
19024   (exit $ac_status); }; }; then
19025   sigact_bad=yes
19026
19027 cat >>confdefs.h <<\EOF
19028 #define _POSIX_SOURCE 1
19029 EOF
19030
19031 else
19032   echo "$as_me: failed program was:" >&5
19033 cat conftest.$ac_ext >&5
19034 sigact_bad=unknown
19035 fi
19036 rm -f conftest.$ac_objext conftest.$ac_ext
19037 fi
19038 rm -f conftest.$ac_objext conftest.$ac_ext
19039 echo "$as_me:19039: result: $sigact_bad" >&5
19040 echo "${ECHO_T}$sigact_bad" >&6
19041 fi
19042
19043 echo "$as_me:19043: checking if nanosleep really works" >&5
19044 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
19045 if test "${cf_cv_func_nanosleep+set}" = set; then
19046   echo $ECHO_N "(cached) $ECHO_C" >&6
19047 else
19048
19049 if test "$cross_compiling" = yes; then
19050   cf_cv_func_nanosleep=unknown
19051 else
19052   cat >conftest.$ac_ext <<_ACEOF
19053 #line 19053 "configure"
19054 #include "confdefs.h"
19055
19056 #include <stdio.h>
19057 #include <errno.h>
19058 #include <time.h>
19059
19060 #ifdef HAVE_SYS_TIME_H
19061 #include <sys/time.h>
19062 #endif
19063
19064 int main(void) {
19065         struct timespec ts1, ts2;
19066         int code;
19067         ts1.tv_sec  = 0;
19068         ts1.tv_nsec = 750000000;
19069         ts2.tv_sec  = 0;
19070         ts2.tv_nsec = 0;
19071         errno = 0;
19072         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
19073         ${cf_cv_main_return:-return}(code != 0);
19074 }
19075
19076 _ACEOF
19077 rm -f conftest$ac_exeext
19078 if { (eval echo "$as_me:19078: \"$ac_link\"") >&5
19079   (eval $ac_link) 2>&5
19080   ac_status=$?
19081   echo "$as_me:19081: \$? = $ac_status" >&5
19082   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19083   { (eval echo "$as_me:19083: \"$ac_try\"") >&5
19084   (eval $ac_try) 2>&5
19085   ac_status=$?
19086   echo "$as_me:19086: \$? = $ac_status" >&5
19087   (exit $ac_status); }; }; then
19088   cf_cv_func_nanosleep=yes
19089 else
19090   echo "$as_me: program exited with status $ac_status" >&5
19091 echo "$as_me: failed program was:" >&5
19092 cat conftest.$ac_ext >&5
19093 cf_cv_func_nanosleep=no
19094 fi
19095 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19096 fi
19097 fi
19098 echo "$as_me:19098: result: $cf_cv_func_nanosleep" >&5
19099 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
19100
19101 test "$cf_cv_func_nanosleep" = "yes" &&
19102 cat >>confdefs.h <<\EOF
19103 #define HAVE_NANOSLEEP 1
19104 EOF
19105
19106 for ac_header in \
19107 termio.h \
19108 termios.h \
19109 unistd.h \
19110 sys/ioctl.h \
19111 sys/termio.h \
19112
19113 do
19114 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19115 echo "$as_me:19115: checking for $ac_header" >&5
19116 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19117 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19118   echo $ECHO_N "(cached) $ECHO_C" >&6
19119 else
19120   cat >conftest.$ac_ext <<_ACEOF
19121 #line 19121 "configure"
19122 #include "confdefs.h"
19123 #include <$ac_header>
19124 _ACEOF
19125 if { (eval echo "$as_me:19125: \"$ac_cpp conftest.$ac_ext\"") >&5
19126   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19127   ac_status=$?
19128   egrep -v '^ *\+' conftest.er1 >conftest.err
19129   rm -f conftest.er1
19130   cat conftest.err >&5
19131   echo "$as_me:19131: \$? = $ac_status" >&5
19132   (exit $ac_status); } >/dev/null; then
19133   if test -s conftest.err; then
19134     ac_cpp_err=$ac_c_preproc_warn_flag
19135   else
19136     ac_cpp_err=
19137   fi
19138 else
19139   ac_cpp_err=yes
19140 fi
19141 if test -z "$ac_cpp_err"; then
19142   eval "$as_ac_Header=yes"
19143 else
19144   echo "$as_me: failed program was:" >&5
19145   cat conftest.$ac_ext >&5
19146   eval "$as_ac_Header=no"
19147 fi
19148 rm -f conftest.err conftest.$ac_ext
19149 fi
19150 echo "$as_me:19150: result: `eval echo '${'$as_ac_Header'}'`" >&5
19151 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19152 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19153   cat >>confdefs.h <<EOF
19154 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19155 EOF
19156
19157 fi
19158 done
19159
19160 if test "$ac_cv_header_termios_h" = yes ; then
19161         case "$CFLAGS $CPPFLAGS" in
19162         (*-D_POSIX_SOURCE*)
19163                 termios_bad=dunno ;;
19164         (*)     termios_bad=maybe ;;
19165         esac
19166         if test "$termios_bad" = maybe ; then
19167         echo "$as_me:19167: checking whether termios.h needs _POSIX_SOURCE" >&5
19168 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
19169         cat >conftest.$ac_ext <<_ACEOF
19170 #line 19170 "configure"
19171 #include "confdefs.h"
19172 #include <termios.h>
19173 int
19174 main (void)
19175 {
19176 struct termios foo; int x = foo.c_iflag
19177   ;
19178   return 0;
19179 }
19180 _ACEOF
19181 rm -f conftest.$ac_objext
19182 if { (eval echo "$as_me:19182: \"$ac_compile\"") >&5
19183   (eval $ac_compile) 2>&5
19184   ac_status=$?
19185   echo "$as_me:19185: \$? = $ac_status" >&5
19186   (exit $ac_status); } &&
19187          { ac_try='test -s conftest.$ac_objext'
19188   { (eval echo "$as_me:19188: \"$ac_try\"") >&5
19189   (eval $ac_try) 2>&5
19190   ac_status=$?
19191   echo "$as_me:19191: \$? = $ac_status" >&5
19192   (exit $ac_status); }; }; then
19193   termios_bad=no
19194 else
19195   echo "$as_me: failed program was:" >&5
19196 cat conftest.$ac_ext >&5
19197
19198                 cat >conftest.$ac_ext <<_ACEOF
19199 #line 19199 "configure"
19200 #include "confdefs.h"
19201
19202 #define _POSIX_SOURCE
19203 #include <termios.h>
19204 int
19205 main (void)
19206 {
19207 struct termios foo; int x = foo.c_iflag
19208   ;
19209   return 0;
19210 }
19211 _ACEOF
19212 rm -f conftest.$ac_objext
19213 if { (eval echo "$as_me:19213: \"$ac_compile\"") >&5
19214   (eval $ac_compile) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit $ac_status); } &&
19218          { ac_try='test -s conftest.$ac_objext'
19219   { (eval echo "$as_me:19219: \"$ac_try\"") >&5
19220   (eval $ac_try) 2>&5
19221   ac_status=$?
19222   echo "$as_me:19222: \$? = $ac_status" >&5
19223   (exit $ac_status); }; }; then
19224   termios_bad=unknown
19225 else
19226   echo "$as_me: failed program was:" >&5
19227 cat conftest.$ac_ext >&5
19228 termios_bad=yes
19229 cat >>confdefs.h <<\EOF
19230 #define _POSIX_SOURCE 1
19231 EOF
19232
19233 fi
19234 rm -f conftest.$ac_objext conftest.$ac_ext
19235
19236 fi
19237 rm -f conftest.$ac_objext conftest.$ac_ext
19238         echo "$as_me:19238: result: $termios_bad" >&5
19239 echo "${ECHO_T}$termios_bad" >&6
19240         fi
19241 fi
19242
19243 echo "$as_me:19243: checking for tcgetattr" >&5
19244 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
19245 if test "${cf_cv_have_tcgetattr+set}" = set; then
19246   echo $ECHO_N "(cached) $ECHO_C" >&6
19247 else
19248
19249 cat >conftest.$ac_ext <<_ACEOF
19250 #line 19250 "configure"
19251 #include "confdefs.h"
19252
19253 #include <sys/types.h>
19254 #ifdef HAVE_UNISTD_H
19255 #include <unistd.h>
19256 #endif
19257 #ifdef HAVE_TERMIOS_H
19258 #include <termios.h>
19259 #define TTY struct termios
19260 #else
19261 #ifdef HAVE_TERMIO_H
19262 #include <termio.h>
19263 #define TTY struct termio
19264 #endif
19265 #endif
19266
19267 int
19268 main (void)
19269 {
19270
19271 TTY foo;
19272 tcgetattr(1, &foo);
19273   ;
19274   return 0;
19275 }
19276 _ACEOF
19277 rm -f conftest.$ac_objext conftest$ac_exeext
19278 if { (eval echo "$as_me:19278: \"$ac_link\"") >&5
19279   (eval $ac_link) 2>&5
19280   ac_status=$?
19281   echo "$as_me:19281: \$? = $ac_status" >&5
19282   (exit $ac_status); } &&
19283          { ac_try='test -s conftest$ac_exeext'
19284   { (eval echo "$as_me:19284: \"$ac_try\"") >&5
19285   (eval $ac_try) 2>&5
19286   ac_status=$?
19287   echo "$as_me:19287: \$? = $ac_status" >&5
19288   (exit $ac_status); }; }; then
19289   cf_cv_have_tcgetattr=yes
19290 else
19291   echo "$as_me: failed program was:" >&5
19292 cat conftest.$ac_ext >&5
19293 cf_cv_have_tcgetattr=no
19294 fi
19295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19296 fi
19297 echo "$as_me:19297: result: $cf_cv_have_tcgetattr" >&5
19298 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
19299 test "$cf_cv_have_tcgetattr" = yes &&
19300 cat >>confdefs.h <<\EOF
19301 #define HAVE_TCGETATTR 1
19302 EOF
19303
19304 echo "$as_me:19304: checking for vsscanf function or workaround" >&5
19305 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
19306 if test "${cf_cv_func_vsscanf+set}" = set; then
19307   echo $ECHO_N "(cached) $ECHO_C" >&6
19308 else
19309
19310 cat >conftest.$ac_ext <<_ACEOF
19311 #line 19311 "configure"
19312 #include "confdefs.h"
19313
19314 #include <stdarg.h>
19315 #include <stdio.h>
19316 int
19317 main (void)
19318 {
19319
19320         va_list ap;
19321         vsscanf("from", "%d", ap)
19322   ;
19323   return 0;
19324 }
19325 _ACEOF
19326 rm -f conftest.$ac_objext conftest$ac_exeext
19327 if { (eval echo "$as_me:19327: \"$ac_link\"") >&5
19328   (eval $ac_link) 2>&5
19329   ac_status=$?
19330   echo "$as_me:19330: \$? = $ac_status" >&5
19331   (exit $ac_status); } &&
19332          { ac_try='test -s conftest$ac_exeext'
19333   { (eval echo "$as_me:19333: \"$ac_try\"") >&5
19334   (eval $ac_try) 2>&5
19335   ac_status=$?
19336   echo "$as_me:19336: \$? = $ac_status" >&5
19337   (exit $ac_status); }; }; then
19338   cf_cv_func_vsscanf=vsscanf
19339 else
19340   echo "$as_me: failed program was:" >&5
19341 cat conftest.$ac_ext >&5
19342
19343 cat >conftest.$ac_ext <<_ACEOF
19344 #line 19344 "configure"
19345 #include "confdefs.h"
19346
19347 #include <stdarg.h>
19348 #include <stdio.h>
19349 int
19350 main (void)
19351 {
19352
19353         FILE strbuf;
19354         char *str = "from";
19355
19356         strbuf._flag = _IOREAD;
19357         strbuf._ptr = strbuf._base = (unsigned char *) str;
19358         strbuf._cnt = strlen(str);
19359         strbuf._file = _NFILE;
19360         return (vfscanf(&strbuf, "%d", ap))
19361   ;
19362   return 0;
19363 }
19364 _ACEOF
19365 rm -f conftest.$ac_objext conftest$ac_exeext
19366 if { (eval echo "$as_me:19366: \"$ac_link\"") >&5
19367   (eval $ac_link) 2>&5
19368   ac_status=$?
19369   echo "$as_me:19369: \$? = $ac_status" >&5
19370   (exit $ac_status); } &&
19371          { ac_try='test -s conftest$ac_exeext'
19372   { (eval echo "$as_me:19372: \"$ac_try\"") >&5
19373   (eval $ac_try) 2>&5
19374   ac_status=$?
19375   echo "$as_me:19375: \$? = $ac_status" >&5
19376   (exit $ac_status); }; }; then
19377   cf_cv_func_vsscanf=vfscanf
19378 else
19379   echo "$as_me: failed program was:" >&5
19380 cat conftest.$ac_ext >&5
19381
19382 cat >conftest.$ac_ext <<_ACEOF
19383 #line 19383 "configure"
19384 #include "confdefs.h"
19385
19386 #include <stdarg.h>
19387 #include <stdio.h>
19388 int
19389 main (void)
19390 {
19391
19392         FILE strbuf;
19393         char *str = "from";
19394
19395         strbuf._flag = _IOREAD;
19396         strbuf._ptr = strbuf._base = (unsigned char *) str;
19397         strbuf._cnt = strlen(str);
19398         strbuf._file = _NFILE;
19399         return (_doscan(&strbuf, "%d", ap))
19400   ;
19401   return 0;
19402 }
19403 _ACEOF
19404 rm -f conftest.$ac_objext conftest$ac_exeext
19405 if { (eval echo "$as_me:19405: \"$ac_link\"") >&5
19406   (eval $ac_link) 2>&5
19407   ac_status=$?
19408   echo "$as_me:19408: \$? = $ac_status" >&5
19409   (exit $ac_status); } &&
19410          { ac_try='test -s conftest$ac_exeext'
19411   { (eval echo "$as_me:19411: \"$ac_try\"") >&5
19412   (eval $ac_try) 2>&5
19413   ac_status=$?
19414   echo "$as_me:19414: \$? = $ac_status" >&5
19415   (exit $ac_status); }; }; then
19416   cf_cv_func_vsscanf=_doscan
19417 else
19418   echo "$as_me: failed program was:" >&5
19419 cat conftest.$ac_ext >&5
19420
19421 cf_cv_func_vsscanf=no
19422 fi
19423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19424 fi
19425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19426 fi
19427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19428 fi
19429 echo "$as_me:19429: result: $cf_cv_func_vsscanf" >&5
19430 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
19431
19432 case $cf_cv_func_vsscanf in
19433 (vsscanf)
19434 cat >>confdefs.h <<\EOF
19435 #define HAVE_VSSCANF 1
19436 EOF
19437 ;;
19438 (vfscanf)
19439 cat >>confdefs.h <<\EOF
19440 #define HAVE_VFSCANF 1
19441 EOF
19442 ;;
19443 (_doscan)
19444 cat >>confdefs.h <<\EOF
19445 #define HAVE__DOSCAN 1
19446 EOF
19447 ;;
19448 esac
19449
19450 for ac_header in \
19451 unistd.h \
19452
19453 do
19454 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19455 echo "$as_me:19455: checking for $ac_header" >&5
19456 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19457 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19458   echo $ECHO_N "(cached) $ECHO_C" >&6
19459 else
19460   cat >conftest.$ac_ext <<_ACEOF
19461 #line 19461 "configure"
19462 #include "confdefs.h"
19463 #include <$ac_header>
19464 _ACEOF
19465 if { (eval echo "$as_me:19465: \"$ac_cpp conftest.$ac_ext\"") >&5
19466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19467   ac_status=$?
19468   egrep -v '^ *\+' conftest.er1 >conftest.err
19469   rm -f conftest.er1
19470   cat conftest.err >&5
19471   echo "$as_me:19471: \$? = $ac_status" >&5
19472   (exit $ac_status); } >/dev/null; then
19473   if test -s conftest.err; then
19474     ac_cpp_err=$ac_c_preproc_warn_flag
19475   else
19476     ac_cpp_err=
19477   fi
19478 else
19479   ac_cpp_err=yes
19480 fi
19481 if test -z "$ac_cpp_err"; then
19482   eval "$as_ac_Header=yes"
19483 else
19484   echo "$as_me: failed program was:" >&5
19485   cat conftest.$ac_ext >&5
19486   eval "$as_ac_Header=no"
19487 fi
19488 rm -f conftest.err conftest.$ac_ext
19489 fi
19490 echo "$as_me:19490: result: `eval echo '${'$as_ac_Header'}'`" >&5
19491 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19492 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19493   cat >>confdefs.h <<EOF
19494 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19495 EOF
19496
19497 fi
19498 done
19499
19500 echo "$as_me:19500: checking for working mkstemp" >&5
19501 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
19502 if test "${cf_cv_func_mkstemp+set}" = set; then
19503   echo $ECHO_N "(cached) $ECHO_C" >&6
19504 else
19505
19506 rm -rf conftest*
19507 if test "$cross_compiling" = yes; then
19508   cf_cv_func_mkstemp=maybe
19509 else
19510   cat >conftest.$ac_ext <<_ACEOF
19511 #line 19511 "configure"
19512 #include "confdefs.h"
19513
19514 #include <sys/types.h>
19515 #ifdef HAVE_UNISTD_H
19516 #include <unistd.h>
19517 #endif
19518 #include <stdlib.h>
19519 #include <stdio.h>
19520 #include <string.h>
19521 #include <sys/stat.h>
19522 int main(void)
19523 {
19524         char *tmpl = "conftestXXXXXX";
19525         char name[2][80];
19526         int n;
19527         int result = 0;
19528         int fd;
19529         struct stat sb;
19530
19531         umask(077);
19532         for (n = 0; n < 2; ++n) {
19533                 strcpy(name[n], tmpl);
19534                 if ((fd = mkstemp(name[n])) >= 0) {
19535                         if (!strcmp(name[n], tmpl)
19536                          || stat(name[n], &sb) != 0
19537                          || (sb.st_mode & S_IFMT) != S_IFREG
19538                          || (sb.st_mode & 077) != 0) {
19539                                 result = 1;
19540                         }
19541                         close(fd);
19542                 }
19543         }
19544         if (result == 0
19545          && !strcmp(name[0], name[1]))
19546                 result = 1;
19547         ${cf_cv_main_return:-return}(result);
19548 }
19549
19550 _ACEOF
19551 rm -f conftest$ac_exeext
19552 if { (eval echo "$as_me:19552: \"$ac_link\"") >&5
19553   (eval $ac_link) 2>&5
19554   ac_status=$?
19555   echo "$as_me:19555: \$? = $ac_status" >&5
19556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19557   { (eval echo "$as_me:19557: \"$ac_try\"") >&5
19558   (eval $ac_try) 2>&5
19559   ac_status=$?
19560   echo "$as_me:19560: \$? = $ac_status" >&5
19561   (exit $ac_status); }; }; then
19562   cf_cv_func_mkstemp=yes
19563
19564 else
19565   echo "$as_me: program exited with status $ac_status" >&5
19566 echo "$as_me: failed program was:" >&5
19567 cat conftest.$ac_ext >&5
19568 cf_cv_func_mkstemp=no
19569
19570 fi
19571 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19572 fi
19573
19574 fi
19575 echo "$as_me:19575: result: $cf_cv_func_mkstemp" >&5
19576 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
19577 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
19578         echo "$as_me:19578: checking for mkstemp" >&5
19579 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
19580 if test "${ac_cv_func_mkstemp+set}" = set; then
19581   echo $ECHO_N "(cached) $ECHO_C" >&6
19582 else
19583   cat >conftest.$ac_ext <<_ACEOF
19584 #line 19584 "configure"
19585 #include "confdefs.h"
19586 #define mkstemp autoconf_temporary
19587 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19588 #undef mkstemp
19589
19590 #ifdef __cplusplus
19591 extern "C"
19592 #endif
19593
19594 /* We use char because int might match the return type of a gcc2
19595    builtin and then its argument prototype would still apply.  */
19596 char mkstemp (void);
19597
19598 int
19599 main (void)
19600 {
19601
19602 /* The GNU C library defines stubs for functions which it implements
19603     to always fail with ENOSYS.  Some functions are actually named
19604     something starting with __ and the normal name is an alias.  */
19605 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
19606 #error found stub for mkstemp
19607 #endif
19608
19609         return mkstemp ();
19610   ;
19611   return 0;
19612 }
19613 _ACEOF
19614 rm -f conftest.$ac_objext conftest$ac_exeext
19615 if { (eval echo "$as_me:19615: \"$ac_link\"") >&5
19616   (eval $ac_link) 2>&5
19617   ac_status=$?
19618   echo "$as_me:19618: \$? = $ac_status" >&5
19619   (exit $ac_status); } &&
19620          { ac_try='test -s conftest$ac_exeext'
19621   { (eval echo "$as_me:19621: \"$ac_try\"") >&5
19622   (eval $ac_try) 2>&5
19623   ac_status=$?
19624   echo "$as_me:19624: \$? = $ac_status" >&5
19625   (exit $ac_status); }; }; then
19626   ac_cv_func_mkstemp=yes
19627 else
19628   echo "$as_me: failed program was:" >&5
19629 cat conftest.$ac_ext >&5
19630 ac_cv_func_mkstemp=no
19631 fi
19632 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19633 fi
19634 echo "$as_me:19634: result: $ac_cv_func_mkstemp" >&5
19635 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
19636
19637 fi
19638 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
19639
19640 cat >>confdefs.h <<\EOF
19641 #define HAVE_MKSTEMP 1
19642 EOF
19643
19644 fi
19645
19646 # setup for prototype of fallback for vsscanf()
19647
19648 if test "$cf_cv_func_vsscanf" = vsscanf ; then
19649         HAVE_VSSCANF=1
19650 else
19651         HAVE_VSSCANF=0
19652 fi
19653
19654 if test "x$cross_compiling" = xyes ; then
19655         { echo "$as_me:19655: WARNING: cross compiling: assume setvbuf params not reversed" >&5
19656 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
19657 else
19658         echo "$as_me:19658: checking whether setvbuf arguments are reversed" >&5
19659 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
19660 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
19661   echo $ECHO_N "(cached) $ECHO_C" >&6
19662 else
19663   if test "$cross_compiling" = yes; then
19664   { { echo "$as_me:19664: error: cannot run test program while cross compiling" >&5
19665 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
19666    { (exit 1); exit 1; }; }
19667 else
19668   cat >conftest.$ac_ext <<_ACEOF
19669 #line 19669 "configure"
19670 #include "confdefs.h"
19671 #include <stdio.h>
19672 /* If setvbuf has the reversed format, exit 0. */
19673 int
19674 main (void)
19675 {
19676   /* This call has the arguments reversed.
19677      A reversed system may check and see that the address of main
19678      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
19679   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
19680     $ac_main_return(1);
19681   putc('\r', stdout);
19682   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
19683 }
19684 _ACEOF
19685 rm -f conftest$ac_exeext
19686 if { (eval echo "$as_me:19686: \"$ac_link\"") >&5
19687   (eval $ac_link) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19691   { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692   (eval $ac_try) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit $ac_status); }; }; then
19696   ac_cv_func_setvbuf_reversed=yes
19697 else
19698   echo "$as_me: program exited with status $ac_status" >&5
19699 echo "$as_me: failed program was:" >&5
19700 cat conftest.$ac_ext >&5
19701 ac_cv_func_setvbuf_reversed=no
19702 fi
19703 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19704 fi
19705 rm -f core core.* *.core
19706 fi
19707 echo "$as_me:19707: result: $ac_cv_func_setvbuf_reversed" >&5
19708 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
19709 if test $ac_cv_func_setvbuf_reversed = yes; then
19710
19711 cat >>confdefs.h <<\EOF
19712 #define SETVBUF_REVERSED 1
19713 EOF
19714
19715 fi
19716
19717 fi
19718 echo "$as_me:19718: checking for intptr_t" >&5
19719 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
19720 if test "${ac_cv_type_intptr_t+set}" = set; then
19721   echo $ECHO_N "(cached) $ECHO_C" >&6
19722 else
19723   cat >conftest.$ac_ext <<_ACEOF
19724 #line 19724 "configure"
19725 #include "confdefs.h"
19726 $ac_includes_default
19727 int
19728 main (void)
19729 {
19730 if ((intptr_t *) 0)
19731   return 0;
19732 if (sizeof (intptr_t))
19733   return 0;
19734   ;
19735   return 0;
19736 }
19737 _ACEOF
19738 rm -f conftest.$ac_objext
19739 if { (eval echo "$as_me:19739: \"$ac_compile\"") >&5
19740   (eval $ac_compile) 2>&5
19741   ac_status=$?
19742   echo "$as_me:19742: \$? = $ac_status" >&5
19743   (exit $ac_status); } &&
19744          { ac_try='test -s conftest.$ac_objext'
19745   { (eval echo "$as_me:19745: \"$ac_try\"") >&5
19746   (eval $ac_try) 2>&5
19747   ac_status=$?
19748   echo "$as_me:19748: \$? = $ac_status" >&5
19749   (exit $ac_status); }; }; then
19750   ac_cv_type_intptr_t=yes
19751 else
19752   echo "$as_me: failed program was:" >&5
19753 cat conftest.$ac_ext >&5
19754 ac_cv_type_intptr_t=no
19755 fi
19756 rm -f conftest.$ac_objext conftest.$ac_ext
19757 fi
19758 echo "$as_me:19758: result: $ac_cv_type_intptr_t" >&5
19759 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
19760 if test $ac_cv_type_intptr_t = yes; then
19761   :
19762 else
19763
19764 cat >>confdefs.h <<EOF
19765 #define intptr_t long
19766 EOF
19767
19768 fi
19769
19770 echo "$as_me:19770: checking for ssize_t" >&5
19771 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
19772 if test "${ac_cv_type_ssize_t+set}" = set; then
19773   echo $ECHO_N "(cached) $ECHO_C" >&6
19774 else
19775   cat >conftest.$ac_ext <<_ACEOF
19776 #line 19776 "configure"
19777 #include "confdefs.h"
19778 $ac_includes_default
19779 int
19780 main (void)
19781 {
19782 if ((ssize_t *) 0)
19783   return 0;
19784 if (sizeof (ssize_t))
19785   return 0;
19786   ;
19787   return 0;
19788 }
19789 _ACEOF
19790 rm -f conftest.$ac_objext
19791 if { (eval echo "$as_me:19791: \"$ac_compile\"") >&5
19792   (eval $ac_compile) 2>&5
19793   ac_status=$?
19794   echo "$as_me:19794: \$? = $ac_status" >&5
19795   (exit $ac_status); } &&
19796          { ac_try='test -s conftest.$ac_objext'
19797   { (eval echo "$as_me:19797: \"$ac_try\"") >&5
19798   (eval $ac_try) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit $ac_status); }; }; then
19802   ac_cv_type_ssize_t=yes
19803 else
19804   echo "$as_me: failed program was:" >&5
19805 cat conftest.$ac_ext >&5
19806 ac_cv_type_ssize_t=no
19807 fi
19808 rm -f conftest.$ac_objext conftest.$ac_ext
19809 fi
19810 echo "$as_me:19810: result: $ac_cv_type_ssize_t" >&5
19811 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
19812 if test $ac_cv_type_ssize_t = yes; then
19813   :
19814 else
19815
19816 cat >>confdefs.h <<EOF
19817 #define ssize_t int
19818 EOF
19819
19820 fi
19821
19822 echo "$as_me:19822: checking for type sigaction_t" >&5
19823 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
19824 if test "${cf_cv_type_sigaction+set}" = set; then
19825   echo $ECHO_N "(cached) $ECHO_C" >&6
19826 else
19827
19828         cat >conftest.$ac_ext <<_ACEOF
19829 #line 19829 "configure"
19830 #include "confdefs.h"
19831
19832 #include <signal.h>
19833 int
19834 main (void)
19835 {
19836 sigaction_t x
19837   ;
19838   return 0;
19839 }
19840 _ACEOF
19841 rm -f conftest.$ac_objext
19842 if { (eval echo "$as_me:19842: \"$ac_compile\"") >&5
19843   (eval $ac_compile) 2>&5
19844   ac_status=$?
19845   echo "$as_me:19845: \$? = $ac_status" >&5
19846   (exit $ac_status); } &&
19847          { ac_try='test -s conftest.$ac_objext'
19848   { (eval echo "$as_me:19848: \"$ac_try\"") >&5
19849   (eval $ac_try) 2>&5
19850   ac_status=$?
19851   echo "$as_me:19851: \$? = $ac_status" >&5
19852   (exit $ac_status); }; }; then
19853   cf_cv_type_sigaction=yes
19854 else
19855   echo "$as_me: failed program was:" >&5
19856 cat conftest.$ac_ext >&5
19857 cf_cv_type_sigaction=no
19858 fi
19859 rm -f conftest.$ac_objext conftest.$ac_ext
19860 fi
19861
19862 echo "$as_me:19862: result: $cf_cv_type_sigaction" >&5
19863 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
19864 test "$cf_cv_type_sigaction" = yes &&
19865 cat >>confdefs.h <<\EOF
19866 #define HAVE_TYPE_SIGACTION 1
19867 EOF
19868
19869 echo "$as_me:19869: checking declaration of size-change" >&5
19870 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
19871 if test "${cf_cv_sizechange+set}" = set; then
19872   echo $ECHO_N "(cached) $ECHO_C" >&6
19873 else
19874
19875         cf_cv_sizechange=unknown
19876         cf_save_CPPFLAGS="$CPPFLAGS"
19877
19878 for cf_opts in "" "NEED_PTEM_H"
19879 do
19880
19881         CPPFLAGS="$cf_save_CPPFLAGS"
19882         if test -n "$cf_opts"
19883         then
19884
19885         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19886         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
19887
19888         fi
19889         cat >conftest.$ac_ext <<_ACEOF
19890 #line 19890 "configure"
19891 #include "confdefs.h"
19892 #include <sys/types.h>
19893 #ifdef HAVE_TERMIOS_H
19894 #include <termios.h>
19895 #else
19896 #ifdef HAVE_TERMIO_H
19897 #include <termio.h>
19898 #endif
19899 #endif
19900
19901 #ifdef NEED_PTEM_H
19902 /* This is a workaround for SCO:  they neglected to define struct winsize in
19903  * termios.h -- it's only in termio.h and ptem.h
19904  */
19905 #include <sys/stream.h>
19906 #include <sys/ptem.h>
19907 #endif
19908
19909 #ifdef HAVE_SYS_IOCTL_H
19910 #include <sys/ioctl.h>
19911 #endif
19912
19913 int
19914 main (void)
19915 {
19916
19917 #ifdef TIOCGSIZE
19918         struct ttysize win;     /* SunOS 3.0... */
19919         int y = win.ts_lines;
19920         int x = win.ts_cols;
19921 #else
19922 #ifdef TIOCGWINSZ
19923         struct winsize win;     /* everything else */
19924         int y = win.ws_row;
19925         int x = win.ws_col;
19926 #else
19927         no TIOCGSIZE or TIOCGWINSZ
19928 #endif /* TIOCGWINSZ */
19929 #endif /* TIOCGSIZE */
19930
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f conftest.$ac_objext
19936 if { (eval echo "$as_me:19936: \"$ac_compile\"") >&5
19937   (eval $ac_compile) 2>&5
19938   ac_status=$?
19939   echo "$as_me:19939: \$? = $ac_status" >&5
19940   (exit $ac_status); } &&
19941          { ac_try='test -s conftest.$ac_objext'
19942   { (eval echo "$as_me:19942: \"$ac_try\"") >&5
19943   (eval $ac_try) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit $ac_status); }; }; then
19947   cf_cv_sizechange=yes
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 cat conftest.$ac_ext >&5
19951 cf_cv_sizechange=no
19952 fi
19953 rm -f conftest.$ac_objext conftest.$ac_ext
19954
19955         CPPFLAGS="$cf_save_CPPFLAGS"
19956         if test "$cf_cv_sizechange" = yes ; then
19957                 echo "size-change succeeded ($cf_opts)" >&5
19958                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
19959                 break
19960         fi
19961 done
19962
19963 fi
19964 echo "$as_me:19964: result: $cf_cv_sizechange" >&5
19965 echo "${ECHO_T}$cf_cv_sizechange" >&6
19966 if test "$cf_cv_sizechange" != no ; then
19967
19968 cat >>confdefs.h <<\EOF
19969 #define HAVE_SIZECHANGE 1
19970 EOF
19971
19972         case $cf_cv_sizechange in
19973         (NEED*)
19974                 cat >>confdefs.h <<EOF
19975 #define $cf_cv_sizechange  1
19976 EOF
19977
19978                 ;;
19979         esac
19980 fi
19981
19982 echo "$as_me:19982: checking for memmove" >&5
19983 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
19984 if test "${ac_cv_func_memmove+set}" = set; then
19985   echo $ECHO_N "(cached) $ECHO_C" >&6
19986 else
19987   cat >conftest.$ac_ext <<_ACEOF
19988 #line 19988 "configure"
19989 #include "confdefs.h"
19990 #define memmove autoconf_temporary
19991 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19992 #undef memmove
19993
19994 #ifdef __cplusplus
19995 extern "C"
19996 #endif
19997
19998 /* We use char because int might match the return type of a gcc2
19999    builtin and then its argument prototype would still apply.  */
20000 char memmove (void);
20001
20002 int
20003 main (void)
20004 {
20005
20006 /* The GNU C library defines stubs for functions which it implements
20007     to always fail with ENOSYS.  Some functions are actually named
20008     something starting with __ and the normal name is an alias.  */
20009 #if defined (__stub_memmove) || defined (__stub___memmove)
20010 #error found stub for memmove
20011 #endif
20012
20013         return memmove ();
20014   ;
20015   return 0;
20016 }
20017 _ACEOF
20018 rm -f conftest.$ac_objext conftest$ac_exeext
20019 if { (eval echo "$as_me:20019: \"$ac_link\"") >&5
20020   (eval $ac_link) 2>&5
20021   ac_status=$?
20022   echo "$as_me:20022: \$? = $ac_status" >&5
20023   (exit $ac_status); } &&
20024          { ac_try='test -s conftest$ac_exeext'
20025   { (eval echo "$as_me:20025: \"$ac_try\"") >&5
20026   (eval $ac_try) 2>&5
20027   ac_status=$?
20028   echo "$as_me:20028: \$? = $ac_status" >&5
20029   (exit $ac_status); }; }; then
20030   ac_cv_func_memmove=yes
20031 else
20032   echo "$as_me: failed program was:" >&5
20033 cat conftest.$ac_ext >&5
20034 ac_cv_func_memmove=no
20035 fi
20036 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20037 fi
20038 echo "$as_me:20038: result: $ac_cv_func_memmove" >&5
20039 echo "${ECHO_T}$ac_cv_func_memmove" >&6
20040 if test $ac_cv_func_memmove = yes; then
20041   :
20042 else
20043
20044 echo "$as_me:20044: checking for bcopy" >&5
20045 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
20046 if test "${ac_cv_func_bcopy+set}" = set; then
20047   echo $ECHO_N "(cached) $ECHO_C" >&6
20048 else
20049   cat >conftest.$ac_ext <<_ACEOF
20050 #line 20050 "configure"
20051 #include "confdefs.h"
20052 #define bcopy autoconf_temporary
20053 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20054 #undef bcopy
20055
20056 #ifdef __cplusplus
20057 extern "C"
20058 #endif
20059
20060 /* We use char because int might match the return type of a gcc2
20061    builtin and then its argument prototype would still apply.  */
20062 char bcopy (void);
20063
20064 int
20065 main (void)
20066 {
20067
20068 /* The GNU C library defines stubs for functions which it implements
20069     to always fail with ENOSYS.  Some functions are actually named
20070     something starting with __ and the normal name is an alias.  */
20071 #if defined (__stub_bcopy) || defined (__stub___bcopy)
20072 #error found stub for bcopy
20073 #endif
20074
20075         return bcopy ();
20076   ;
20077   return 0;
20078 }
20079 _ACEOF
20080 rm -f conftest.$ac_objext conftest$ac_exeext
20081 if { (eval echo "$as_me:20081: \"$ac_link\"") >&5
20082   (eval $ac_link) 2>&5
20083   ac_status=$?
20084   echo "$as_me:20084: \$? = $ac_status" >&5
20085   (exit $ac_status); } &&
20086          { ac_try='test -s conftest$ac_exeext'
20087   { (eval echo "$as_me:20087: \"$ac_try\"") >&5
20088   (eval $ac_try) 2>&5
20089   ac_status=$?
20090   echo "$as_me:20090: \$? = $ac_status" >&5
20091   (exit $ac_status); }; }; then
20092   ac_cv_func_bcopy=yes
20093 else
20094   echo "$as_me: failed program was:" >&5
20095 cat conftest.$ac_ext >&5
20096 ac_cv_func_bcopy=no
20097 fi
20098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20099 fi
20100 echo "$as_me:20100: result: $ac_cv_func_bcopy" >&5
20101 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
20102 if test $ac_cv_func_bcopy = yes; then
20103
20104         echo "$as_me:20104: checking if bcopy does overlapping moves" >&5
20105 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
20106 if test "${cf_cv_good_bcopy+set}" = set; then
20107   echo $ECHO_N "(cached) $ECHO_C" >&6
20108 else
20109
20110                 if test "$cross_compiling" = yes; then
20111   cf_cv_good_bcopy=unknown
20112 else
20113   cat >conftest.$ac_ext <<_ACEOF
20114 #line 20114 "configure"
20115 #include "confdefs.h"
20116
20117 int main(void) {
20118         static char data[] = "abcdefghijklmnopqrstuwwxyz";
20119         char temp[40];
20120         bcopy(data, temp, sizeof(data));
20121         bcopy(temp+10, temp, 15);
20122         bcopy(temp+5, temp+15, 10);
20123         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
20124 }
20125
20126 _ACEOF
20127 rm -f conftest$ac_exeext
20128 if { (eval echo "$as_me:20128: \"$ac_link\"") >&5
20129   (eval $ac_link) 2>&5
20130   ac_status=$?
20131   echo "$as_me:20131: \$? = $ac_status" >&5
20132   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20133   { (eval echo "$as_me:20133: \"$ac_try\"") >&5
20134   (eval $ac_try) 2>&5
20135   ac_status=$?
20136   echo "$as_me:20136: \$? = $ac_status" >&5
20137   (exit $ac_status); }; }; then
20138   cf_cv_good_bcopy=yes
20139 else
20140   echo "$as_me: program exited with status $ac_status" >&5
20141 echo "$as_me: failed program was:" >&5
20142 cat conftest.$ac_ext >&5
20143 cf_cv_good_bcopy=no
20144 fi
20145 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20146 fi
20147
20148 fi
20149 echo "$as_me:20149: result: $cf_cv_good_bcopy" >&5
20150 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
20151
20152 else
20153   cf_cv_good_bcopy=no
20154 fi
20155
20156         if test "$cf_cv_good_bcopy" = yes ; then
20157
20158 cat >>confdefs.h <<\EOF
20159 #define USE_OK_BCOPY 1
20160 EOF
20161
20162         else
20163
20164 cat >>confdefs.h <<\EOF
20165 #define USE_MY_MEMMOVE 1
20166 EOF
20167
20168         fi
20169
20170 fi
20171
20172 tty 2>&1 >/dev/null || {
20173 for ac_func in posix_openpt
20174 do
20175 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20176 echo "$as_me:20176: checking for $ac_func" >&5
20177 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20178 if eval "test \"\${$as_ac_var+set}\" = set"; then
20179   echo $ECHO_N "(cached) $ECHO_C" >&6
20180 else
20181   cat >conftest.$ac_ext <<_ACEOF
20182 #line 20182 "configure"
20183 #include "confdefs.h"
20184 #define $ac_func autoconf_temporary
20185 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20186 #undef $ac_func
20187
20188 #ifdef __cplusplus
20189 extern "C"
20190 #endif
20191
20192 /* We use char because int might match the return type of a gcc2
20193    builtin and then its argument prototype would still apply.  */
20194 char $ac_func (void);
20195
20196 int
20197 main (void)
20198 {
20199
20200 /* The GNU C library defines stubs for functions which it implements
20201     to always fail with ENOSYS.  Some functions are actually named
20202     something starting with __ and the normal name is an alias.  */
20203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20204 #error found stub for $ac_func
20205 #endif
20206
20207         return $ac_func ();
20208   ;
20209   return 0;
20210 }
20211 _ACEOF
20212 rm -f conftest.$ac_objext conftest$ac_exeext
20213 if { (eval echo "$as_me:20213: \"$ac_link\"") >&5
20214   (eval $ac_link) 2>&5
20215   ac_status=$?
20216   echo "$as_me:20216: \$? = $ac_status" >&5
20217   (exit $ac_status); } &&
20218          { ac_try='test -s conftest$ac_exeext'
20219   { (eval echo "$as_me:20219: \"$ac_try\"") >&5
20220   (eval $ac_try) 2>&5
20221   ac_status=$?
20222   echo "$as_me:20222: \$? = $ac_status" >&5
20223   (exit $ac_status); }; }; then
20224   eval "$as_ac_var=yes"
20225 else
20226   echo "$as_me: failed program was:" >&5
20227 cat conftest.$ac_ext >&5
20228 eval "$as_ac_var=no"
20229 fi
20230 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20231 fi
20232 echo "$as_me:20232: result: `eval echo '${'$as_ac_var'}'`" >&5
20233 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20234 if test `eval echo '${'$as_ac_var'}'` = yes; then
20235   cat >>confdefs.h <<EOF
20236 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20237 EOF
20238
20239 fi
20240 done
20241  }
20242 echo "$as_me:20242: checking if poll really works" >&5
20243 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
20244 if test "${cf_cv_working_poll+set}" = set; then
20245   echo $ECHO_N "(cached) $ECHO_C" >&6
20246 else
20247
20248 if test "$cross_compiling" = yes; then
20249   cf_cv_working_poll=unknown
20250 else
20251   cat >conftest.$ac_ext <<_ACEOF
20252 #line 20252 "configure"
20253 #include "confdefs.h"
20254
20255 #include <stdlib.h>
20256 #include <stdio.h>
20257 #include <unistd.h>
20258 #include <fcntl.h>
20259 #ifdef HAVE_POLL_H
20260 #include <poll.h>
20261 #else
20262 #include <sys/poll.h>
20263 #endif
20264 int main(void) {
20265         struct pollfd myfds;
20266         int ret;
20267
20268         /* check for Darwin bug with respect to "devices" */
20269         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
20270         if (myfds.fd < 0)
20271                 myfds.fd = 0;
20272         myfds.events = POLLIN;
20273         myfds.revents = 0;
20274
20275         ret = poll(&myfds, 1, 100);
20276
20277         if (ret < 0 || (myfds.revents & POLLNVAL)) {
20278                 ret = -1;
20279         } else {
20280                 int fd = 0;
20281                 if (!isatty(fd)) {
20282                         fd = open("/dev/tty", 2);       /* O_RDWR */
20283                 }
20284 #ifdef HAVE_POSIX_OPENPT
20285                 if (fd < 0) {
20286                         fd = posix_openpt(O_RDWR);
20287                 }
20288 #endif
20289
20290                 if (fd >= 0) {
20291                         /* also check with standard input */
20292                         myfds.fd = fd;
20293                         myfds.events = POLLIN;
20294                         myfds.revents = 0;
20295                         ret = poll(&myfds, 1, 100);
20296                 } else {
20297                         ret = -1;
20298                 }
20299         }
20300         ${cf_cv_main_return:-return}(ret < 0);
20301 }
20302 _ACEOF
20303 rm -f conftest$ac_exeext
20304 if { (eval echo "$as_me:20304: \"$ac_link\"") >&5
20305   (eval $ac_link) 2>&5
20306   ac_status=$?
20307   echo "$as_me:20307: \$? = $ac_status" >&5
20308   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20309   { (eval echo "$as_me:20309: \"$ac_try\"") >&5
20310   (eval $ac_try) 2>&5
20311   ac_status=$?
20312   echo "$as_me:20312: \$? = $ac_status" >&5
20313   (exit $ac_status); }; }; then
20314   cf_cv_working_poll=yes
20315 else
20316   echo "$as_me: program exited with status $ac_status" >&5
20317 echo "$as_me: failed program was:" >&5
20318 cat conftest.$ac_ext >&5
20319 cf_cv_working_poll=no
20320 fi
20321 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20322 fi
20323 fi
20324 echo "$as_me:20324: result: $cf_cv_working_poll" >&5
20325 echo "${ECHO_T}$cf_cv_working_poll" >&6
20326 test "$cf_cv_working_poll" = "yes" &&
20327 cat >>confdefs.h <<\EOF
20328 #define HAVE_WORKING_POLL 1
20329 EOF
20330
20331 echo "$as_me:20331: checking for va_copy" >&5
20332 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
20333 if test "${cf_cv_have_va_copy+set}" = set; then
20334   echo $ECHO_N "(cached) $ECHO_C" >&6
20335 else
20336
20337 cat >conftest.$ac_ext <<_ACEOF
20338 #line 20338 "configure"
20339 #include "confdefs.h"
20340
20341 #include <stdarg.h>
20342
20343 int
20344 main (void)
20345 {
20346
20347         static va_list dst;
20348         static va_list src;
20349         va_copy(dst, src)
20350   ;
20351   return 0;
20352 }
20353 _ACEOF
20354 rm -f conftest.$ac_objext conftest$ac_exeext
20355 if { (eval echo "$as_me:20355: \"$ac_link\"") >&5
20356   (eval $ac_link) 2>&5
20357   ac_status=$?
20358   echo "$as_me:20358: \$? = $ac_status" >&5
20359   (exit $ac_status); } &&
20360          { ac_try='test -s conftest$ac_exeext'
20361   { (eval echo "$as_me:20361: \"$ac_try\"") >&5
20362   (eval $ac_try) 2>&5
20363   ac_status=$?
20364   echo "$as_me:20364: \$? = $ac_status" >&5
20365   (exit $ac_status); }; }; then
20366   cf_cv_have_va_copy=yes
20367 else
20368   echo "$as_me: failed program was:" >&5
20369 cat conftest.$ac_ext >&5
20370 cf_cv_have_va_copy=no
20371 fi
20372 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20373 fi
20374 echo "$as_me:20374: result: $cf_cv_have_va_copy" >&5
20375 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
20376
20377 if test "$cf_cv_have_va_copy" = yes;
20378 then
20379
20380 cat >>confdefs.h <<\EOF
20381 #define HAVE_VA_COPY 1
20382 EOF
20383
20384 else # !cf_cv_have_va_copy
20385
20386 echo "$as_me:20386: checking for __va_copy" >&5
20387 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
20388 if test "${cf_cv_have___va_copy+set}" = set; then
20389   echo $ECHO_N "(cached) $ECHO_C" >&6
20390 else
20391
20392 cat >conftest.$ac_ext <<_ACEOF
20393 #line 20393 "configure"
20394 #include "confdefs.h"
20395
20396 #include <stdarg.h>
20397
20398 int
20399 main (void)
20400 {
20401
20402         static va_list dst;
20403         static va_list src;
20404         __va_copy(dst, src)
20405   ;
20406   return 0;
20407 }
20408 _ACEOF
20409 rm -f conftest.$ac_objext conftest$ac_exeext
20410 if { (eval echo "$as_me:20410: \"$ac_link\"") >&5
20411   (eval $ac_link) 2>&5
20412   ac_status=$?
20413   echo "$as_me:20413: \$? = $ac_status" >&5
20414   (exit $ac_status); } &&
20415          { ac_try='test -s conftest$ac_exeext'
20416   { (eval echo "$as_me:20416: \"$ac_try\"") >&5
20417   (eval $ac_try) 2>&5
20418   ac_status=$?
20419   echo "$as_me:20419: \$? = $ac_status" >&5
20420   (exit $ac_status); }; }; then
20421   cf_cv_have___va_copy=yes
20422 else
20423   echo "$as_me: failed program was:" >&5
20424 cat conftest.$ac_ext >&5
20425 cf_cv_have___va_copy=no
20426 fi
20427 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20428 fi
20429 echo "$as_me:20429: result: $cf_cv_have___va_copy" >&5
20430 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
20431
20432 if test "$cf_cv_have___va_copy" = yes
20433 then
20434
20435 cat >>confdefs.h <<\EOF
20436 #define HAVE___VA_COPY 1
20437 EOF
20438
20439 else # !cf_cv_have___va_copy
20440
20441 echo "$as_me:20441: checking for __builtin_va_copy" >&5
20442 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
20443 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
20444   echo $ECHO_N "(cached) $ECHO_C" >&6
20445 else
20446
20447 cat >conftest.$ac_ext <<_ACEOF
20448 #line 20448 "configure"
20449 #include "confdefs.h"
20450
20451 #include <stdarg.h>
20452
20453 int
20454 main (void)
20455 {
20456
20457         static va_list dst;
20458         static va_list src;
20459         __builtin_va_copy(dst, src)
20460   ;
20461   return 0;
20462 }
20463 _ACEOF
20464 rm -f conftest.$ac_objext conftest$ac_exeext
20465 if { (eval echo "$as_me:20465: \"$ac_link\"") >&5
20466   (eval $ac_link) 2>&5
20467   ac_status=$?
20468   echo "$as_me:20468: \$? = $ac_status" >&5
20469   (exit $ac_status); } &&
20470          { ac_try='test -s conftest$ac_exeext'
20471   { (eval echo "$as_me:20471: \"$ac_try\"") >&5
20472   (eval $ac_try) 2>&5
20473   ac_status=$?
20474   echo "$as_me:20474: \$? = $ac_status" >&5
20475   (exit $ac_status); }; }; then
20476   cf_cv_have___builtin_va_copy=yes
20477 else
20478   echo "$as_me: failed program was:" >&5
20479 cat conftest.$ac_ext >&5
20480 cf_cv_have___builtin_va_copy=no
20481 fi
20482 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20483 fi
20484 echo "$as_me:20484: result: $cf_cv_have___builtin_va_copy" >&5
20485 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
20486
20487 test "$cf_cv_have___builtin_va_copy" = yes &&
20488
20489 cat >>confdefs.h <<\EOF
20490 #define HAVE___BUILTIN_VA_COPY 1
20491 EOF
20492
20493 fi # cf_cv_have___va_copy
20494
20495 fi # cf_cv_have_va_copy
20496
20497 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
20498 (*yes*)
20499         ;;
20500
20501 (*)
20502         echo "$as_me:20502: checking if we can simply copy va_list" >&5
20503 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
20504 if test "${cf_cv_pointer_va_list+set}" = set; then
20505   echo $ECHO_N "(cached) $ECHO_C" >&6
20506 else
20507
20508 cat >conftest.$ac_ext <<_ACEOF
20509 #line 20509 "configure"
20510 #include "confdefs.h"
20511
20512 #include <stdarg.h>
20513
20514 int
20515 main (void)
20516 {
20517
20518         va_list dst;
20519         va_list src;
20520         dst = src
20521   ;
20522   return 0;
20523 }
20524 _ACEOF
20525 rm -f conftest.$ac_objext conftest$ac_exeext
20526 if { (eval echo "$as_me:20526: \"$ac_link\"") >&5
20527   (eval $ac_link) 2>&5
20528   ac_status=$?
20529   echo "$as_me:20529: \$? = $ac_status" >&5
20530   (exit $ac_status); } &&
20531          { ac_try='test -s conftest$ac_exeext'
20532   { (eval echo "$as_me:20532: \"$ac_try\"") >&5
20533   (eval $ac_try) 2>&5
20534   ac_status=$?
20535   echo "$as_me:20535: \$? = $ac_status" >&5
20536   (exit $ac_status); }; }; then
20537   cf_cv_pointer_va_list=yes
20538 else
20539   echo "$as_me: failed program was:" >&5
20540 cat conftest.$ac_ext >&5
20541 cf_cv_pointer_va_list=no
20542 fi
20543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20544 fi
20545 echo "$as_me:20545: result: $cf_cv_pointer_va_list" >&5
20546 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
20547
20548         if test "$cf_cv_pointer_va_list" = no
20549         then
20550                 echo "$as_me:20550: checking if we can copy va_list indirectly" >&5
20551 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
20552 if test "${cf_cv_array_va_list+set}" = set; then
20553   echo $ECHO_N "(cached) $ECHO_C" >&6
20554 else
20555
20556 cat >conftest.$ac_ext <<_ACEOF
20557 #line 20557 "configure"
20558 #include "confdefs.h"
20559
20560 #include <stdarg.h>
20561
20562 int
20563 main (void)
20564 {
20565
20566         va_list dst;
20567         va_list src;
20568         *dst = *src
20569   ;
20570   return 0;
20571 }
20572 _ACEOF
20573 rm -f conftest.$ac_objext conftest$ac_exeext
20574 if { (eval echo "$as_me:20574: \"$ac_link\"") >&5
20575   (eval $ac_link) 2>&5
20576   ac_status=$?
20577   echo "$as_me:20577: \$? = $ac_status" >&5
20578   (exit $ac_status); } &&
20579          { ac_try='test -s conftest$ac_exeext'
20580   { (eval echo "$as_me:20580: \"$ac_try\"") >&5
20581   (eval $ac_try) 2>&5
20582   ac_status=$?
20583   echo "$as_me:20583: \$? = $ac_status" >&5
20584   (exit $ac_status); }; }; then
20585   cf_cv_array_va_list=yes
20586 else
20587   echo "$as_me: failed program was:" >&5
20588 cat conftest.$ac_ext >&5
20589 cf_cv_array_va_list=no
20590 fi
20591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20592 fi
20593 echo "$as_me:20593: result: $cf_cv_array_va_list" >&5
20594 echo "${ECHO_T}$cf_cv_array_va_list" >&6
20595                 test "$cf_cv_array_va_list" = yes &&
20596 cat >>confdefs.h <<\EOF
20597 #define ARRAY_VA_LIST 1
20598 EOF
20599
20600         fi
20601         ;;
20602 esac
20603
20604 echo "$as_me:20604: checking for pid_t" >&5
20605 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
20606 if test "${ac_cv_type_pid_t+set}" = set; then
20607   echo $ECHO_N "(cached) $ECHO_C" >&6
20608 else
20609   cat >conftest.$ac_ext <<_ACEOF
20610 #line 20610 "configure"
20611 #include "confdefs.h"
20612 $ac_includes_default
20613 int
20614 main (void)
20615 {
20616 if ((pid_t *) 0)
20617   return 0;
20618 if (sizeof (pid_t))
20619   return 0;
20620   ;
20621   return 0;
20622 }
20623 _ACEOF
20624 rm -f conftest.$ac_objext
20625 if { (eval echo "$as_me:20625: \"$ac_compile\"") >&5
20626   (eval $ac_compile) 2>&5
20627   ac_status=$?
20628   echo "$as_me:20628: \$? = $ac_status" >&5
20629   (exit $ac_status); } &&
20630          { ac_try='test -s conftest.$ac_objext'
20631   { (eval echo "$as_me:20631: \"$ac_try\"") >&5
20632   (eval $ac_try) 2>&5
20633   ac_status=$?
20634   echo "$as_me:20634: \$? = $ac_status" >&5
20635   (exit $ac_status); }; }; then
20636   ac_cv_type_pid_t=yes
20637 else
20638   echo "$as_me: failed program was:" >&5
20639 cat conftest.$ac_ext >&5
20640 ac_cv_type_pid_t=no
20641 fi
20642 rm -f conftest.$ac_objext conftest.$ac_ext
20643 fi
20644 echo "$as_me:20644: result: $ac_cv_type_pid_t" >&5
20645 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
20646 if test $ac_cv_type_pid_t = yes; then
20647   :
20648 else
20649
20650 cat >>confdefs.h <<EOF
20651 #define pid_t int
20652 EOF
20653
20654 fi
20655
20656 for ac_header in unistd.h vfork.h
20657 do
20658 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20659 echo "$as_me:20659: checking for $ac_header" >&5
20660 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20661 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20662   echo $ECHO_N "(cached) $ECHO_C" >&6
20663 else
20664   cat >conftest.$ac_ext <<_ACEOF
20665 #line 20665 "configure"
20666 #include "confdefs.h"
20667 #include <$ac_header>
20668 _ACEOF
20669 if { (eval echo "$as_me:20669: \"$ac_cpp conftest.$ac_ext\"") >&5
20670   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20671   ac_status=$?
20672   egrep -v '^ *\+' conftest.er1 >conftest.err
20673   rm -f conftest.er1
20674   cat conftest.err >&5
20675   echo "$as_me:20675: \$? = $ac_status" >&5
20676   (exit $ac_status); } >/dev/null; then
20677   if test -s conftest.err; then
20678     ac_cpp_err=$ac_c_preproc_warn_flag
20679   else
20680     ac_cpp_err=
20681   fi
20682 else
20683   ac_cpp_err=yes
20684 fi
20685 if test -z "$ac_cpp_err"; then
20686   eval "$as_ac_Header=yes"
20687 else
20688   echo "$as_me: failed program was:" >&5
20689   cat conftest.$ac_ext >&5
20690   eval "$as_ac_Header=no"
20691 fi
20692 rm -f conftest.err conftest.$ac_ext
20693 fi
20694 echo "$as_me:20694: result: `eval echo '${'$as_ac_Header'}'`" >&5
20695 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
20696 if test `eval echo '${'$as_ac_Header'}'` = yes; then
20697   cat >>confdefs.h <<EOF
20698 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20699 EOF
20700
20701 fi
20702 done
20703
20704 for ac_func in fork vfork
20705 do
20706 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20707 echo "$as_me:20707: checking for $ac_func" >&5
20708 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20709 if eval "test \"\${$as_ac_var+set}\" = set"; then
20710   echo $ECHO_N "(cached) $ECHO_C" >&6
20711 else
20712   cat >conftest.$ac_ext <<_ACEOF
20713 #line 20713 "configure"
20714 #include "confdefs.h"
20715 #define $ac_func autoconf_temporary
20716 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20717 #undef $ac_func
20718
20719 #ifdef __cplusplus
20720 extern "C"
20721 #endif
20722
20723 /* We use char because int might match the return type of a gcc2
20724    builtin and then its argument prototype would still apply.  */
20725 char $ac_func (void);
20726
20727 int
20728 main (void)
20729 {
20730
20731 /* The GNU C library defines stubs for functions which it implements
20732     to always fail with ENOSYS.  Some functions are actually named
20733     something starting with __ and the normal name is an alias.  */
20734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20735 #error found stub for $ac_func
20736 #endif
20737
20738         return $ac_func ();
20739   ;
20740   return 0;
20741 }
20742 _ACEOF
20743 rm -f conftest.$ac_objext conftest$ac_exeext
20744 if { (eval echo "$as_me:20744: \"$ac_link\"") >&5
20745   (eval $ac_link) 2>&5
20746   ac_status=$?
20747   echo "$as_me:20747: \$? = $ac_status" >&5
20748   (exit $ac_status); } &&
20749          { ac_try='test -s conftest$ac_exeext'
20750   { (eval echo "$as_me:20750: \"$ac_try\"") >&5
20751   (eval $ac_try) 2>&5
20752   ac_status=$?
20753   echo "$as_me:20753: \$? = $ac_status" >&5
20754   (exit $ac_status); }; }; then
20755   eval "$as_ac_var=yes"
20756 else
20757   echo "$as_me: failed program was:" >&5
20758 cat conftest.$ac_ext >&5
20759 eval "$as_ac_var=no"
20760 fi
20761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20762 fi
20763 echo "$as_me:20763: result: `eval echo '${'$as_ac_var'}'`" >&5
20764 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20765 if test `eval echo '${'$as_ac_var'}'` = yes; then
20766   cat >>confdefs.h <<EOF
20767 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20768 EOF
20769
20770 fi
20771 done
20772
20773 ac_cv_func_fork_works=$ac_cv_func_fork
20774 if test "x$ac_cv_func_fork" = xyes; then
20775   echo "$as_me:20775: checking for working fork" >&5
20776 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
20777 if test "${ac_cv_func_fork_works+set}" = set; then
20778   echo $ECHO_N "(cached) $ECHO_C" >&6
20779 else
20780   if test "$cross_compiling" = yes; then
20781   ac_cv_func_fork_works=cross
20782 else
20783   cat >conftest.$ac_ext <<_ACEOF
20784 /* By Rüdiger Kuhlmann. */
20785       #include <sys/types.h>
20786       #if HAVE_UNISTD_H
20787       # include <unistd.h>
20788       #endif
20789       /* Some systems only have a dummy stub for fork() */
20790       int main (void)
20791       {
20792         if (fork() < 0)
20793           $ac_main_return (1);
20794         $ac_main_return (0);
20795       }
20796 _ACEOF
20797 rm -f conftest$ac_exeext
20798 if { (eval echo "$as_me:20798: \"$ac_link\"") >&5
20799   (eval $ac_link) 2>&5
20800   ac_status=$?
20801   echo "$as_me:20801: \$? = $ac_status" >&5
20802   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20803   { (eval echo "$as_me:20803: \"$ac_try\"") >&5
20804   (eval $ac_try) 2>&5
20805   ac_status=$?
20806   echo "$as_me:20806: \$? = $ac_status" >&5
20807   (exit $ac_status); }; }; then
20808   ac_cv_func_fork_works=yes
20809 else
20810   echo "$as_me: program exited with status $ac_status" >&5
20811 echo "$as_me: failed program was:" >&5
20812 cat conftest.$ac_ext >&5
20813 ac_cv_func_fork_works=no
20814 fi
20815 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20816 fi
20817 fi
20818 echo "$as_me:20818: result: $ac_cv_func_fork_works" >&5
20819 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
20820
20821 fi
20822 if test "x$ac_cv_func_fork_works" = xcross; then
20823   case $host in
20824     *-*-amigaos* | *-*-msdosdjgpp*)
20825       # Override, as these systems have only a dummy fork() stub
20826       ac_cv_func_fork_works=no
20827       ;;
20828     *)
20829       ac_cv_func_fork_works=yes
20830       ;;
20831   esac
20832   { echo "$as_me:20832: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
20833 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
20834 fi
20835 ac_cv_func_vfork_works=$ac_cv_func_vfork
20836 if test "x$ac_cv_func_vfork" = xyes; then
20837   echo "$as_me:20837: checking for working vfork" >&5
20838 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
20839 if test "${ac_cv_func_vfork_works+set}" = set; then
20840   echo $ECHO_N "(cached) $ECHO_C" >&6
20841 else
20842   if test "$cross_compiling" = yes; then
20843   ac_cv_func_vfork_works=cross
20844 else
20845   cat >conftest.$ac_ext <<_ACEOF
20846 #line 20846 "configure"
20847 #include "confdefs.h"
20848 /* Thanks to Paul Eggert for this test.  */
20849 #include <stdio.h>
20850 #include <sys/types.h>
20851 #include <sys/stat.h>
20852 #if HAVE_UNISTD_H
20853 # include <unistd.h>
20854 #endif
20855 #if HAVE_VFORK_H
20856 # include <vfork.h>
20857 #endif
20858 /* On some sparc systems, changes by the child to local and incoming
20859    argument registers are propagated back to the parent.  The compiler
20860    is told about this with #include <vfork.h>, but some compilers
20861    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
20862    static variable whose address is put into a register that is
20863    clobbered by the vfork.  */
20864 static
20865 #ifdef __cplusplus
20866 sparc_address_test (int arg)
20867 # else
20868 sparc_address_test (arg) int arg;
20869 #endif
20870 {
20871   static pid_t child;
20872   if (!child) {
20873     child = vfork ();
20874     if (child < 0) {
20875       perror ("vfork");
20876       _exit(2);
20877     }
20878     if (!child) {
20879       arg = getpid();
20880       write(-1, "", 0);
20881       _exit (arg);
20882     }
20883   }
20884 }
20885
20886 int
20887 main (void)
20888 {
20889   pid_t parent = getpid ();
20890   pid_t child;
20891
20892   sparc_address_test ();
20893
20894   child = vfork ();
20895
20896   if (child == 0) {
20897     /* Here is another test for sparc vfork register problems.  This
20898        test uses lots of local variables, at least as many local
20899        variables as main has allocated so far including compiler
20900        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
20901        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
20902        reuse the register of parent for one of the local variables,
20903        since it will think that parent can't possibly be used any more
20904        in this routine.  Assigning to the local variable will thus
20905        munge parent in the parent process.  */
20906     pid_t
20907       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
20908       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
20909     /* Convince the compiler that p..p7 are live; otherwise, it might
20910        use the same hardware register for all 8 local variables.  */
20911     if (p != p1 || p != p2 || p != p3 || p != p4
20912         || p != p5 || p != p6 || p != p7)
20913       _exit(1);
20914
20915     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
20916        from child file descriptors.  If the child closes a descriptor
20917        before it execs or exits, this munges the parent's descriptor
20918        as well.  Test for this by closing stdout in the child.  */
20919     _exit(close(fileno(stdout)) != 0);
20920   } else {
20921     int status;
20922     struct stat st;
20923
20924     while (wait(&status) != child)
20925       ;
20926     $ac_main_return(
20927          /* Was there some problem with vforking?  */
20928          child < 0
20929
20930          /* Did the child fail?  (This shouldn't happen.)  */
20931          || status
20932
20933          /* Did the vfork/compiler bug occur?  */
20934          || parent != getpid()
20935
20936          /* Did the file descriptor bug occur?  */
20937          || fstat(fileno(stdout), &st) != 0
20938          );
20939   }
20940 }
20941 _ACEOF
20942 rm -f conftest$ac_exeext
20943 if { (eval echo "$as_me:20943: \"$ac_link\"") >&5
20944   (eval $ac_link) 2>&5
20945   ac_status=$?
20946   echo "$as_me:20946: \$? = $ac_status" >&5
20947   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20948   { (eval echo "$as_me:20948: \"$ac_try\"") >&5
20949   (eval $ac_try) 2>&5
20950   ac_status=$?
20951   echo "$as_me:20951: \$? = $ac_status" >&5
20952   (exit $ac_status); }; }; then
20953   ac_cv_func_vfork_works=yes
20954 else
20955   echo "$as_me: program exited with status $ac_status" >&5
20956 echo "$as_me: failed program was:" >&5
20957 cat conftest.$ac_ext >&5
20958 ac_cv_func_vfork_works=no
20959 fi
20960 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20961 fi
20962 fi
20963 echo "$as_me:20963: result: $ac_cv_func_vfork_works" >&5
20964 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
20965
20966 fi;
20967 if test "x$ac_cv_func_fork_works" = xcross; then
20968   ac_cv_func_vfork_works=ac_cv_func_vfork
20969   { echo "$as_me:20969: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
20970 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
20971 fi
20972
20973 if test "x$ac_cv_func_vfork_works" = xyes; then
20974
20975 cat >>confdefs.h <<\EOF
20976 #define HAVE_WORKING_VFORK 1
20977 EOF
20978
20979 else
20980
20981 cat >>confdefs.h <<\EOF
20982 #define vfork fork
20983 EOF
20984
20985 fi
20986 if test "x$ac_cv_func_fork_works" = xyes; then
20987
20988 cat >>confdefs.h <<\EOF
20989 #define HAVE_WORKING_FORK 1
20990 EOF
20991
20992 fi
20993
20994 # special check for test/ditto.c
20995
20996 echo "$as_me:20996: checking for openpty in -lutil" >&5
20997 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20998 if test "${ac_cv_lib_util_openpty+set}" = set; then
20999   echo $ECHO_N "(cached) $ECHO_C" >&6
21000 else
21001   ac_check_lib_save_LIBS=$LIBS
21002 LIBS="-lutil  $LIBS"
21003 cat >conftest.$ac_ext <<_ACEOF
21004 #line 21004 "configure"
21005 #include "confdefs.h"
21006
21007 /* Override any gcc2 internal prototype to avoid an error.  */
21008 #ifdef __cplusplus
21009 extern "C"
21010 #endif
21011 /* We use char because int might match the return type of a gcc2
21012    builtin and then its argument prototype would still apply.  */
21013 char openpty ();
21014 int
21015 main (void)
21016 {
21017 openpty ();
21018   ;
21019   return 0;
21020 }
21021 _ACEOF
21022 rm -f conftest.$ac_objext conftest$ac_exeext
21023 if { (eval echo "$as_me:21023: \"$ac_link\"") >&5
21024   (eval $ac_link) 2>&5
21025   ac_status=$?
21026   echo "$as_me:21026: \$? = $ac_status" >&5
21027   (exit $ac_status); } &&
21028          { ac_try='test -s conftest$ac_exeext'
21029   { (eval echo "$as_me:21029: \"$ac_try\"") >&5
21030   (eval $ac_try) 2>&5
21031   ac_status=$?
21032   echo "$as_me:21032: \$? = $ac_status" >&5
21033   (exit $ac_status); }; }; then
21034   ac_cv_lib_util_openpty=yes
21035 else
21036   echo "$as_me: failed program was:" >&5
21037 cat conftest.$ac_ext >&5
21038 ac_cv_lib_util_openpty=no
21039 fi
21040 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21041 LIBS=$ac_check_lib_save_LIBS
21042 fi
21043 echo "$as_me:21043: result: $ac_cv_lib_util_openpty" >&5
21044 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
21045 if test $ac_cv_lib_util_openpty = yes; then
21046   cf_cv_lib_util=yes
21047 else
21048   cf_cv_lib_util=no
21049 fi
21050
21051 echo "$as_me:21051: checking for openpty header" >&5
21052 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
21053 if test "${cf_cv_func_openpty+set}" = set; then
21054   echo $ECHO_N "(cached) $ECHO_C" >&6
21055 else
21056
21057         cf_save_LIBS="$LIBS"
21058         test $cf_cv_lib_util = yes && {
21059 cf_add_libs="-lutil"
21060 # Filter out duplicates - this happens with badly-designed ".pc" files...
21061 for cf_add_1lib in $LIBS
21062 do
21063         for cf_add_2lib in $cf_add_libs
21064         do
21065                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21066                 then
21067                         cf_add_1lib=
21068                         break
21069                 fi
21070         done
21071         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21072 done
21073 LIBS="$cf_add_libs"
21074  }
21075         for cf_header in pty.h libutil.h util.h
21076         do
21077         cat >conftest.$ac_ext <<_ACEOF
21078 #line 21078 "configure"
21079 #include "confdefs.h"
21080
21081 #include <$cf_header>
21082
21083 int
21084 main (void)
21085 {
21086
21087         int x = openpty((int *)0, (int *)0, (char *)0,
21088                                    (struct termios *)0, (struct winsize *)0);
21089
21090   ;
21091   return 0;
21092 }
21093 _ACEOF
21094 rm -f conftest.$ac_objext conftest$ac_exeext
21095 if { (eval echo "$as_me:21095: \"$ac_link\"") >&5
21096   (eval $ac_link) 2>&5
21097   ac_status=$?
21098   echo "$as_me:21098: \$? = $ac_status" >&5
21099   (exit $ac_status); } &&
21100          { ac_try='test -s conftest$ac_exeext'
21101   { (eval echo "$as_me:21101: \"$ac_try\"") >&5
21102   (eval $ac_try) 2>&5
21103   ac_status=$?
21104   echo "$as_me:21104: \$? = $ac_status" >&5
21105   (exit $ac_status); }; }; then
21106
21107                 cf_cv_func_openpty=$cf_header
21108                 break
21109
21110 else
21111   echo "$as_me: failed program was:" >&5
21112 cat conftest.$ac_ext >&5
21113
21114                 cf_cv_func_openpty=no
21115
21116 fi
21117 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21118         done
21119         LIBS="$cf_save_LIBS"
21120
21121 fi
21122 echo "$as_me:21122: result: $cf_cv_func_openpty" >&5
21123 echo "${ECHO_T}$cf_cv_func_openpty" >&6
21124
21125 if test "$cf_cv_func_openpty" != no ; then
21126
21127 cat >>confdefs.h <<EOF
21128 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
21129 EOF
21130
21131 cat >>confdefs.h <<\EOF
21132 #define USE_XTERM_PTY 1
21133 EOF
21134
21135         if test "x$cf_cv_lib_util" = xyes ; then
21136
21137 cf_add_libs="-lutil"
21138 # Filter out duplicates - this happens with badly-designed ".pc" files...
21139 for cf_add_1lib in $TEST_LIBS
21140 do
21141         for cf_add_2lib in $cf_add_libs
21142         do
21143                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21144                 then
21145                         cf_add_1lib=
21146                         break
21147                 fi
21148         done
21149         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21150 done
21151 TEST_LIBS="$cf_add_libs"
21152
21153         fi
21154 fi
21155
21156 if test "$with_hashed_db" != no ; then
21157
21158 cat >>confdefs.h <<\EOF
21159 #define USE_HASHED_DB 1
21160 EOF
21161
21162 case $with_hashed_db in
21163 (yes|*able*)
21164         ;;
21165 (*)
21166         if test -d "$with_hashed_db" ; then
21167
21168 if test -n "$with_hashed_db/include" ; then
21169   for cf_add_incdir in $with_hashed_db/include
21170   do
21171         while test $cf_add_incdir != /usr/include
21172         do
21173           if test -d $cf_add_incdir
21174           then
21175                 cf_have_incdir=no
21176                 if test -n "$CFLAGS$CPPFLAGS" ; then
21177                   # a loop is needed to ensure we can add subdirs of existing dirs
21178                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21179                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21180                           cf_have_incdir=yes; break
21181                         fi
21182                   done
21183                 fi
21184
21185                 if test "$cf_have_incdir" = no ; then
21186                   if test "$cf_add_incdir" = /usr/local/include ; then
21187                         if test "$GCC" = yes
21188                         then
21189                           cf_save_CPPFLAGS=$CPPFLAGS
21190
21191         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21192         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21193
21194                           cat >conftest.$ac_ext <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197 #include <stdio.h>
21198 int
21199 main (void)
21200 {
21201 printf("Hello")
21202   ;
21203   return 0;
21204 }
21205 _ACEOF
21206 rm -f conftest.$ac_objext
21207 if { (eval echo "$as_me:21207: \"$ac_compile\"") >&5
21208   (eval $ac_compile) 2>&5
21209   ac_status=$?
21210   echo "$as_me:21210: \$? = $ac_status" >&5
21211   (exit $ac_status); } &&
21212          { ac_try='test -s conftest.$ac_objext'
21213   { (eval echo "$as_me:21213: \"$ac_try\"") >&5
21214   (eval $ac_try) 2>&5
21215   ac_status=$?
21216   echo "$as_me:21216: \$? = $ac_status" >&5
21217   (exit $ac_status); }; }; then
21218   :
21219 else
21220   echo "$as_me: failed program was:" >&5
21221 cat conftest.$ac_ext >&5
21222 cf_have_incdir=yes
21223 fi
21224 rm -f conftest.$ac_objext conftest.$ac_ext
21225                           CPPFLAGS=$cf_save_CPPFLAGS
21226                         fi
21227                   fi
21228                 fi
21229
21230                 if test "$cf_have_incdir" = no ; then
21231                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21232
21233 echo "${as_me:-configure}:21233: testing adding $cf_add_incdir to include-path ..." 1>&5
21234
21235                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21236
21237                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21238                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21239                   cf_add_incdir="$cf_top_incdir"
21240                 else
21241                   break
21242                 fi
21243           else
21244                 break
21245           fi
21246         done
21247   done
21248 fi
21249
21250 if test -n "$with_hashed_db/lib" ; then
21251         for cf_add_libdir in $with_hashed_db/lib
21252         do
21253                 if test $cf_add_libdir = /usr/lib ; then
21254                         :
21255                 elif test -d $cf_add_libdir
21256                 then
21257                         cf_have_libdir=no
21258                         if test -n "$LDFLAGS$LIBS" ; then
21259                                 # a loop is needed to ensure we can add subdirs of existing dirs
21260                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21261                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21262                                                 cf_have_libdir=yes; break
21263                                         fi
21264                                 done
21265                         fi
21266                         if test "$cf_have_libdir" = no ; then
21267                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21268
21269 echo "${as_me:-configure}:21269: testing adding $cf_add_libdir to library-path ..." 1>&5
21270
21271                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21272                         fi
21273                 fi
21274         done
21275 fi
21276
21277         else
21278                 case "$with_hashed_db" in
21279                 (./*|../*|/*)
21280                         { echo "$as_me:21280: WARNING: no such directory $with_hashed_db" >&5
21281 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
21282                         ;;
21283                 (*)
21284
21285 cf_search=
21286
21287 test "x$prefix" != "xNONE" && \
21288 test -d "$prefix" && \
21289  {
21290         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
21291         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
21292         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
21293         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
21294         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
21295         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
21296 }
21297
21298 for cf_subdir_prefix in \
21299         /usr \
21300         /usr/local \
21301         /usr/pkg \
21302         /opt \
21303         /opt/local \
21304         $HOME
21305 do
21306
21307 test "x$cf_subdir_prefix" != "x$prefix" && \
21308 test -d "$cf_subdir_prefix" && \
21309 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21310         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
21311         test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
21312         test -d $cf_subdir_prefix/include/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
21313         test -d $cf_subdir_prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
21314         test -d $cf_subdir_prefix/$with_hashed_db/include &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
21315         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"
21316 }
21317
21318 done
21319
21320         for cf_item in $cf_search
21321         do
21322                 case $cf_item in
21323                 (*/$with_hashed_db)
21324
21325 if test -n "$cf_item" ; then
21326   for cf_add_incdir in $cf_item
21327   do
21328         while test $cf_add_incdir != /usr/include
21329         do
21330           if test -d $cf_add_incdir
21331           then
21332                 cf_have_incdir=no
21333                 if test -n "$CFLAGS$CPPFLAGS" ; then
21334                   # a loop is needed to ensure we can add subdirs of existing dirs
21335                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21336                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21337                           cf_have_incdir=yes; break
21338                         fi
21339                   done
21340                 fi
21341
21342                 if test "$cf_have_incdir" = no ; then
21343                   if test "$cf_add_incdir" = /usr/local/include ; then
21344                         if test "$GCC" = yes
21345                         then
21346                           cf_save_CPPFLAGS=$CPPFLAGS
21347
21348         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21349         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21350
21351                           cat >conftest.$ac_ext <<_ACEOF
21352 #line 21352 "configure"
21353 #include "confdefs.h"
21354 #include <stdio.h>
21355 int
21356 main (void)
21357 {
21358 printf("Hello")
21359   ;
21360   return 0;
21361 }
21362 _ACEOF
21363 rm -f conftest.$ac_objext
21364 if { (eval echo "$as_me:21364: \"$ac_compile\"") >&5
21365   (eval $ac_compile) 2>&5
21366   ac_status=$?
21367   echo "$as_me:21367: \$? = $ac_status" >&5
21368   (exit $ac_status); } &&
21369          { ac_try='test -s conftest.$ac_objext'
21370   { (eval echo "$as_me:21370: \"$ac_try\"") >&5
21371   (eval $ac_try) 2>&5
21372   ac_status=$?
21373   echo "$as_me:21373: \$? = $ac_status" >&5
21374   (exit $ac_status); }; }; then
21375   :
21376 else
21377   echo "$as_me: failed program was:" >&5
21378 cat conftest.$ac_ext >&5
21379 cf_have_incdir=yes
21380 fi
21381 rm -f conftest.$ac_objext conftest.$ac_ext
21382                           CPPFLAGS=$cf_save_CPPFLAGS
21383                         fi
21384                   fi
21385                 fi
21386
21387                 if test "$cf_have_incdir" = no ; then
21388                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
21389
21390 echo "${as_me:-configure}:21390: testing adding $cf_add_incdir to include-path ..." 1>&5
21391
21392                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21393
21394                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
21395                   test "$cf_top_incdir" = "$cf_add_incdir" && break
21396                   cf_add_incdir="$cf_top_incdir"
21397                 else
21398                   break
21399                 fi
21400           else
21401                 break
21402           fi
21403         done
21404   done
21405 fi
21406
21407                         ;;
21408                 esac
21409         done
21410
21411 cf_search=
21412
21413 test "x$prefix" != "xNONE" && \
21414 test -d "$prefix" && \
21415  {
21416         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
21417         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
21418         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
21419         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
21420         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
21421         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
21422 }
21423
21424 for cf_subdir_prefix in \
21425         /usr \
21426         /usr/local \
21427         /usr/pkg \
21428         /opt \
21429         /opt/local \
21430         $HOME
21431 do
21432
21433 test "x$cf_subdir_prefix" != "x$prefix" && \
21434 test -d "$cf_subdir_prefix" && \
21435 (test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
21436         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
21437         test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21438         test -d $cf_subdir_prefix/lib/$with_hashed_db &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
21439         test -d $cf_subdir_prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
21440         test -d $cf_subdir_prefix/$with_hashed_db/lib &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
21441         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"
21442 }
21443
21444 done
21445
21446         for cf_item in $cf_search
21447         do
21448                 case $cf_item in
21449                 (*/$with_hashed_db)
21450
21451 if test -n "$cf_item" ; then
21452         for cf_add_libdir in $cf_item
21453         do
21454                 if test $cf_add_libdir = /usr/lib ; then
21455                         :
21456                 elif test -d $cf_add_libdir
21457                 then
21458                         cf_have_libdir=no
21459                         if test -n "$LDFLAGS$LIBS" ; then
21460                                 # a loop is needed to ensure we can add subdirs of existing dirs
21461                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
21462                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21463                                                 cf_have_libdir=yes; break
21464                                         fi
21465                                 done
21466                         fi
21467                         if test "$cf_have_libdir" = no ; then
21468                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
21469
21470 echo "${as_me:-configure}:21470: testing adding $cf_add_libdir to library-path ..." 1>&5
21471
21472                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21473                         fi
21474                 fi
21475         done
21476 fi
21477
21478                         ;;
21479                 esac
21480         done
21481
21482                         ;;
21483                 esac
21484         fi
21485 esac
21486
21487 echo "$as_me:21487: checking for db.h" >&5
21488 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
21489 if test "${ac_cv_header_db_h+set}" = set; then
21490   echo $ECHO_N "(cached) $ECHO_C" >&6
21491 else
21492   cat >conftest.$ac_ext <<_ACEOF
21493 #line 21493 "configure"
21494 #include "confdefs.h"
21495 #include <db.h>
21496 _ACEOF
21497 if { (eval echo "$as_me:21497: \"$ac_cpp conftest.$ac_ext\"") >&5
21498   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21499   ac_status=$?
21500   egrep -v '^ *\+' conftest.er1 >conftest.err
21501   rm -f conftest.er1
21502   cat conftest.err >&5
21503   echo "$as_me:21503: \$? = $ac_status" >&5
21504   (exit $ac_status); } >/dev/null; then
21505   if test -s conftest.err; then
21506     ac_cpp_err=$ac_c_preproc_warn_flag
21507   else
21508     ac_cpp_err=
21509   fi
21510 else
21511   ac_cpp_err=yes
21512 fi
21513 if test -z "$ac_cpp_err"; then
21514   ac_cv_header_db_h=yes
21515 else
21516   echo "$as_me: failed program was:" >&5
21517   cat conftest.$ac_ext >&5
21518   ac_cv_header_db_h=no
21519 fi
21520 rm -f conftest.err conftest.$ac_ext
21521 fi
21522 echo "$as_me:21522: result: $ac_cv_header_db_h" >&5
21523 echo "${ECHO_T}$ac_cv_header_db_h" >&6
21524 if test $ac_cv_header_db_h = yes; then
21525
21526 echo "$as_me:21526: checking for version of db" >&5
21527 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
21528 if test "${cf_cv_hashed_db_version+set}" = set; then
21529   echo $ECHO_N "(cached) $ECHO_C" >&6
21530 else
21531
21532 cf_cv_hashed_db_version=unknown
21533
21534 for cf_db_version in 1 2 3 4 5 6
21535 do
21536
21537 echo "${as_me:-configure}:21537: testing checking for db version $cf_db_version ..." 1>&5
21538
21539         cat >conftest.$ac_ext <<_ACEOF
21540 #line 21540 "configure"
21541 #include "confdefs.h"
21542
21543 $ac_includes_default
21544 #include <db.h>
21545
21546 #ifdef DB_VERSION_MAJOR
21547         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
21548 #if $cf_db_version == DB_VERSION_MAJOR
21549         /* ok */
21550 #else
21551         make an error
21552 #endif
21553 #else
21554 #if $cf_db_version == 1
21555         /* ok: assuming this is DB 1.8.5 */
21556 #else
21557         make an error
21558 #endif
21559 #endif
21560
21561 int
21562 main (void)
21563 {
21564 DBT *foo = 0
21565   ;
21566   return 0;
21567 }
21568 _ACEOF
21569 rm -f conftest.$ac_objext
21570 if { (eval echo "$as_me:21570: \"$ac_compile\"") >&5
21571   (eval $ac_compile) 2>&5
21572   ac_status=$?
21573   echo "$as_me:21573: \$? = $ac_status" >&5
21574   (exit $ac_status); } &&
21575          { ac_try='test -s conftest.$ac_objext'
21576   { (eval echo "$as_me:21576: \"$ac_try\"") >&5
21577   (eval $ac_try) 2>&5
21578   ac_status=$?
21579   echo "$as_me:21579: \$? = $ac_status" >&5
21580   (exit $ac_status); }; }; then
21581
21582         cf_cv_hashed_db_version=$cf_db_version
21583         break
21584
21585 else
21586   echo "$as_me: failed program was:" >&5
21587 cat conftest.$ac_ext >&5
21588 fi
21589 rm -f conftest.$ac_objext conftest.$ac_ext
21590 done
21591
21592 fi
21593 echo "$as_me:21593: result: $cf_cv_hashed_db_version" >&5
21594 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
21595
21596 if test "$cf_cv_hashed_db_version" = unknown ; then
21597         { { echo "$as_me:21597: error: Cannot determine version of db" >&5
21598 echo "$as_me: error: Cannot determine version of db" >&2;}
21599    { (exit 1); exit 1; }; }
21600 else
21601
21602 echo "$as_me:21602: checking for db libraries" >&5
21603 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
21604 if test "${cf_cv_hashed_db_libs+set}" = set; then
21605   echo $ECHO_N "(cached) $ECHO_C" >&6
21606 else
21607
21608 cf_cv_hashed_db_libs=unknown
21609 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
21610 do
21611         cf_save_libs="$LIBS"
21612         if test -n "$cf_db_libs"; then
21613
21614 cf_add_libs="-l$cf_db_libs"
21615 # Filter out duplicates - this happens with badly-designed ".pc" files...
21616 for cf_add_1lib in $LIBS
21617 do
21618         for cf_add_2lib in $cf_add_libs
21619         do
21620                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21621                 then
21622                         cf_add_1lib=
21623                         break
21624                 fi
21625         done
21626         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21627 done
21628 LIBS="$cf_add_libs"
21629
21630         fi
21631
21632 echo "${as_me:-configure}:21632: testing checking for library "$cf_db_libs" ..." 1>&5
21633
21634         cat >conftest.$ac_ext <<_ACEOF
21635 #line 21635 "configure"
21636 #include "confdefs.h"
21637
21638 $ac_includes_default
21639 #include <db.h>
21640
21641 int
21642 main (void)
21643 {
21644
21645         char *path = "/tmp/foo";
21646 #ifdef DB_VERSION_MAJOR
21647 #if DB_VERSION_MAJOR >= 4
21648         DB *result = 0;
21649         db_create(&result, NULL, 0);
21650         result->open(result,
21651                 NULL,
21652                 path,
21653                 path,
21654                 DB_HASH,
21655                 DB_CREATE,
21656                 0644);
21657 #elif DB_VERSION_MAJOR >= 3
21658         DB *result = 0;
21659         db_create(&result, NULL, 0);
21660         result->open(result,
21661                 path,
21662                 path,
21663                 DB_HASH,
21664                 DB_CREATE,
21665                 0644);
21666 #elif DB_VERSION_MAJOR >= 2
21667         DB *result = 0;
21668         db_open(path,
21669                 DB_HASH,
21670                 DB_CREATE,
21671                 0644,
21672                 (DB_ENV *) 0,
21673                 (DB_INFO *) 0,
21674                 &result);
21675 #endif /* DB_VERSION_MAJOR */
21676 #else
21677         DB *result = dbopen(path,
21678                      2,
21679                      0644,
21680                      DB_HASH,
21681                      0);
21682 #endif
21683         ${cf_cv_main_return:-return}(result != 0)
21684
21685   ;
21686   return 0;
21687 }
21688 _ACEOF
21689 rm -f conftest.$ac_objext conftest$ac_exeext
21690 if { (eval echo "$as_me:21690: \"$ac_link\"") >&5
21691   (eval $ac_link) 2>&5
21692   ac_status=$?
21693   echo "$as_me:21693: \$? = $ac_status" >&5
21694   (exit $ac_status); } &&
21695          { ac_try='test -s conftest$ac_exeext'
21696   { (eval echo "$as_me:21696: \"$ac_try\"") >&5
21697   (eval $ac_try) 2>&5
21698   ac_status=$?
21699   echo "$as_me:21699: \$? = $ac_status" >&5
21700   (exit $ac_status); }; }; then
21701
21702         if test -n "$cf_db_libs" ; then
21703                 cf_cv_hashed_db_libs=$cf_db_libs
21704         else
21705                 cf_cv_hashed_db_libs=default
21706         fi
21707         LIBS="$cf_save_libs"
21708         break
21709
21710 else
21711   echo "$as_me: failed program was:" >&5
21712 cat conftest.$ac_ext >&5
21713 fi
21714 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21715         LIBS="$cf_save_libs"
21716 done
21717
21718 fi
21719 echo "$as_me:21719: result: $cf_cv_hashed_db_libs" >&5
21720 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
21721
21722         if test "$cf_cv_hashed_db_libs" = unknown ; then
21723                 { { echo "$as_me:21723: error: Cannot determine library for db" >&5
21724 echo "$as_me: error: Cannot determine library for db" >&2;}
21725    { (exit 1); exit 1; }; }
21726         elif test "$cf_cv_hashed_db_libs" != default ; then
21727
21728 cf_add_libs="-l$cf_cv_hashed_db_libs"
21729 # Filter out duplicates - this happens with badly-designed ".pc" files...
21730 for cf_add_1lib in $LIBS
21731 do
21732         for cf_add_2lib in $cf_add_libs
21733         do
21734                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21735                 then
21736                         cf_add_1lib=
21737                         break
21738                 fi
21739         done
21740         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21741 done
21742 LIBS="$cf_add_libs"
21743
21744         fi
21745 fi
21746
21747 else
21748
21749         { { echo "$as_me:21749: error: Cannot find db.h" >&5
21750 echo "$as_me: error: Cannot find db.h" >&2;}
21751    { (exit 1); exit 1; }; }
21752
21753 fi
21754
21755 fi
21756
21757 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
21758         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21759         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
21760 fi
21761
21762 # Just in case, check if the C compiler has a bool type.
21763
21764 echo "$as_me:21764: checking if we should include stdbool.h" >&5
21765 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
21766
21767 if test "${cf_cv_header_stdbool_h+set}" = set; then
21768   echo $ECHO_N "(cached) $ECHO_C" >&6
21769 else
21770
21771         cat >conftest.$ac_ext <<_ACEOF
21772 #line 21772 "configure"
21773 #include "confdefs.h"
21774
21775 int
21776 main (void)
21777 {
21778 bool foo = false
21779   ;
21780   return 0;
21781 }
21782 _ACEOF
21783 rm -f conftest.$ac_objext
21784 if { (eval echo "$as_me:21784: \"$ac_compile\"") >&5
21785   (eval $ac_compile) 2>&5
21786   ac_status=$?
21787   echo "$as_me:21787: \$? = $ac_status" >&5
21788   (exit $ac_status); } &&
21789          { ac_try='test -s conftest.$ac_objext'
21790   { (eval echo "$as_me:21790: \"$ac_try\"") >&5
21791   (eval $ac_try) 2>&5
21792   ac_status=$?
21793   echo "$as_me:21793: \$? = $ac_status" >&5
21794   (exit $ac_status); }; }; then
21795   cf_cv_header_stdbool_h=0
21796 else
21797   echo "$as_me: failed program was:" >&5
21798 cat conftest.$ac_ext >&5
21799 cat >conftest.$ac_ext <<_ACEOF
21800 #line 21800 "configure"
21801 #include "confdefs.h"
21802
21803 #ifndef __BEOS__
21804 #include <stdbool.h>
21805 #endif
21806
21807 int
21808 main (void)
21809 {
21810 bool foo = false
21811   ;
21812   return 0;
21813 }
21814 _ACEOF
21815 rm -f conftest.$ac_objext
21816 if { (eval echo "$as_me:21816: \"$ac_compile\"") >&5
21817   (eval $ac_compile) 2>&5
21818   ac_status=$?
21819   echo "$as_me:21819: \$? = $ac_status" >&5
21820   (exit $ac_status); } &&
21821          { ac_try='test -s conftest.$ac_objext'
21822   { (eval echo "$as_me:21822: \"$ac_try\"") >&5
21823   (eval $ac_try) 2>&5
21824   ac_status=$?
21825   echo "$as_me:21825: \$? = $ac_status" >&5
21826   (exit $ac_status); }; }; then
21827   cf_cv_header_stdbool_h=1
21828 else
21829   echo "$as_me: failed program was:" >&5
21830 cat conftest.$ac_ext >&5
21831 cf_cv_header_stdbool_h=0
21832 fi
21833 rm -f conftest.$ac_objext conftest.$ac_ext
21834 fi
21835 rm -f conftest.$ac_objext conftest.$ac_ext
21836 fi
21837
21838 if test "$cf_cv_header_stdbool_h" = 1
21839 then    echo "$as_me:21839: result: yes" >&5
21840 echo "${ECHO_T}yes" >&6
21841 else    echo "$as_me:21841: result: no" >&5
21842 echo "${ECHO_T}no" >&6
21843 fi
21844
21845 echo "$as_me:21845: checking for builtin bool type" >&5
21846 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
21847
21848 if test "${cf_cv_cc_bool_type+set}" = set; then
21849   echo $ECHO_N "(cached) $ECHO_C" >&6
21850 else
21851
21852         cat >conftest.$ac_ext <<_ACEOF
21853 #line 21853 "configure"
21854 #include "confdefs.h"
21855
21856 #include <stdio.h>
21857 #include <sys/types.h>
21858
21859 int
21860 main (void)
21861 {
21862 bool x = false
21863   ;
21864   return 0;
21865 }
21866 _ACEOF
21867 rm -f conftest.$ac_objext
21868 if { (eval echo "$as_me:21868: \"$ac_compile\"") >&5
21869   (eval $ac_compile) 2>&5
21870   ac_status=$?
21871   echo "$as_me:21871: \$? = $ac_status" >&5
21872   (exit $ac_status); } &&
21873          { ac_try='test -s conftest.$ac_objext'
21874   { (eval echo "$as_me:21874: \"$ac_try\"") >&5
21875   (eval $ac_try) 2>&5
21876   ac_status=$?
21877   echo "$as_me:21877: \$? = $ac_status" >&5
21878   (exit $ac_status); }; }; then
21879   cf_cv_cc_bool_type=1
21880 else
21881   echo "$as_me: failed program was:" >&5
21882 cat conftest.$ac_ext >&5
21883 cf_cv_cc_bool_type=0
21884 fi
21885 rm -f conftest.$ac_objext conftest.$ac_ext
21886
21887 fi
21888
21889 if test "$cf_cv_cc_bool_type" = 1
21890 then    echo "$as_me:21890: result: yes" >&5
21891 echo "${ECHO_T}yes" >&6
21892 else    echo "$as_me:21892: result: no" >&5
21893 echo "${ECHO_T}no" >&6
21894 fi
21895
21896 # Check for C++ compiler characteristics (and ensure that it's there!)
21897 if test -n "$CXX" ; then
21898         ac_ext=cc
21899 ac_cpp='$CXXCPP $CPPFLAGS'
21900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
21901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
21902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
21903 ac_main_return=return
21904
21905 if test -n "$GXX" ; then
21906
21907         cf_save="$LIBS"
21908         LIBS="$LIBS $CXXLIBS"
21909         echo "$as_me:21909: checking if we already have C++ library" >&5
21910 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
21911         cat >conftest.$ac_ext <<_ACEOF
21912 #line 21912 "configure"
21913 #include "confdefs.h"
21914
21915                         #include <iostream>
21916 int
21917 main (void)
21918 {
21919
21920                         std::cout << "Hello World!" << std::endl;
21921   ;
21922   return 0;
21923 }
21924 _ACEOF
21925 rm -f conftest.$ac_objext conftest$ac_exeext
21926 if { (eval echo "$as_me:21926: \"$ac_link\"") >&5
21927   (eval $ac_link) 2>&5
21928   ac_status=$?
21929   echo "$as_me:21929: \$? = $ac_status" >&5
21930   (exit $ac_status); } &&
21931          { ac_try='test -s conftest$ac_exeext'
21932   { (eval echo "$as_me:21932: \"$ac_try\"") >&5
21933   (eval $ac_try) 2>&5
21934   ac_status=$?
21935   echo "$as_me:21935: \$? = $ac_status" >&5
21936   (exit $ac_status); }; }; then
21937   cf_have_libstdcpp=yes
21938 else
21939   echo "$as_me: failed program was:" >&5
21940 cat conftest.$ac_ext >&5
21941 cf_have_libstdcpp=no
21942 fi
21943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21944         echo "$as_me:21944: result: $cf_have_libstdcpp" >&5
21945 echo "${ECHO_T}$cf_have_libstdcpp" >&6
21946         LIBS="$cf_save"
21947
21948         if test $cf_have_libstdcpp != yes
21949         then
21950                 case $cf_cv_system_name in
21951                 (os2*)
21952                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
21953                                 cf_stdcpp_libname=stdcpp
21954                         else
21955                                 cf_stdcpp_libname=stdc++
21956                         fi
21957                         ;;
21958                 (*)
21959                         cf_stdcpp_libname=stdc++
21960                         ;;
21961                 esac
21962
21963                 echo "$as_me:21963: checking for library $cf_stdcpp_libname" >&5
21964 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
21965 if test "${cf_cv_libstdcpp+set}" = set; then
21966   echo $ECHO_N "(cached) $ECHO_C" >&6
21967 else
21968
21969                         cf_save="$LIBS"
21970                         LIBS="$LIBS $CXXLIBS"
21971
21972 cf_add_libs="-l$cf_stdcpp_libname"
21973 # Filter out duplicates - this happens with badly-designed ".pc" files...
21974 for cf_add_1lib in $LIBS
21975 do
21976         for cf_add_2lib in $cf_add_libs
21977         do
21978                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
21979                 then
21980                         cf_add_1lib=
21981                         break
21982                 fi
21983         done
21984         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21985 done
21986 LIBS="$cf_add_libs"
21987
21988                 cat >conftest.$ac_ext <<_ACEOF
21989 #line 21989 "configure"
21990 #include "confdefs.h"
21991
21992                                 #include <iostream>
21993 int
21994 main (void)
21995 {
21996
21997                                 std::cout << "Hello World!" << std::endl;
21998   ;
21999   return 0;
22000 }
22001 _ACEOF
22002 rm -f conftest.$ac_objext conftest$ac_exeext
22003 if { (eval echo "$as_me:22003: \"$ac_link\"") >&5
22004   (eval $ac_link) 2>&5
22005   ac_status=$?
22006   echo "$as_me:22006: \$? = $ac_status" >&5
22007   (exit $ac_status); } &&
22008          { ac_try='test -s conftest$ac_exeext'
22009   { (eval echo "$as_me:22009: \"$ac_try\"") >&5
22010   (eval $ac_try) 2>&5
22011   ac_status=$?
22012   echo "$as_me:22012: \$? = $ac_status" >&5
22013   (exit $ac_status); }; }; then
22014   cf_cv_libstdcpp=yes
22015 else
22016   echo "$as_me: failed program was:" >&5
22017 cat conftest.$ac_ext >&5
22018 cf_cv_libstdcpp=no
22019 fi
22020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22021                         LIBS="$cf_save"
22022
22023 fi
22024 echo "$as_me:22024: result: $cf_cv_libstdcpp" >&5
22025 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
22026                 test "$cf_cv_libstdcpp" = yes && {
22027 cf_add_libs="-l$cf_stdcpp_libname"
22028 # Filter out duplicates - this happens with badly-designed ".pc" files...
22029 for cf_add_1lib in $CXXLIBS
22030 do
22031         for cf_add_2lib in $cf_add_libs
22032         do
22033                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22034                 then
22035                         cf_add_1lib=
22036                         break
22037                 fi
22038         done
22039         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22040 done
22041 CXXLIBS="$cf_add_libs"
22042  }
22043         fi
22044 fi
22045
22046         echo "$as_me:22046: checking whether $CXX understands -c and -o together" >&5
22047 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
22048 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
22049   echo $ECHO_N "(cached) $ECHO_C" >&6
22050 else
22051
22052 cat > conftest.$ac_ext <<CF_EOF
22053 int main(void)
22054 {
22055         ${cf_cv_main_return:-return}(0);
22056 }
22057 CF_EOF
22058 # We do the test twice because some compilers refuse to overwrite an
22059 # existing .o file with -o, though they will create one.
22060 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
22061 if { (eval echo "$as_me:22061: \"$ac_try\"") >&5
22062   (eval $ac_try) 2>&5
22063   ac_status=$?
22064   echo "$as_me:22064: \$? = $ac_status" >&5
22065   (exit $ac_status); } &&
22066   test -f conftest2.$ac_objext && { (eval echo "$as_me:22066: \"$ac_try\"") >&5
22067   (eval $ac_try) 2>&5
22068   ac_status=$?
22069   echo "$as_me:22069: \$? = $ac_status" >&5
22070   (exit $ac_status); };
22071 then
22072   eval cf_cv_prog_CXX_c_o=yes
22073 else
22074   eval cf_cv_prog_CXX_c_o=no
22075 fi
22076 rm -rf conftest*
22077
22078 fi
22079 if test $cf_cv_prog_CXX_c_o = yes; then
22080   echo "$as_me:22080: result: yes" >&5
22081 echo "${ECHO_T}yes" >&6
22082 else
22083   echo "$as_me:22083: result: no" >&5
22084 echo "${ECHO_T}no" >&6
22085 fi
22086
22087         case $GXX_VERSION in
22088         (1*|2.0-6*)
22089                 cf_cxx_library=yes
22090                 ;;
22091         (*-2.7*|2.7*)
22092
22093 cf_cxx_library=unknown
22094 case $cf_cv_system_name in
22095 (os2*)
22096         cf_gpp_libname=gpp
22097         ;;
22098 (*)
22099         cf_gpp_libname=g++
22100         ;;
22101 esac
22102 if test "$GXX" = yes; then
22103         echo "$as_me:22103: checking for lib$cf_gpp_libname" >&5
22104 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
22105         cf_save="$LIBS"
22106
22107 cf_add_libs="-l$cf_gpp_libname"
22108 # Filter out duplicates - this happens with badly-designed ".pc" files...
22109 for cf_add_1lib in $LIBS
22110 do
22111         for cf_add_2lib in $cf_add_libs
22112         do
22113                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22114                 then
22115                         cf_add_1lib=
22116                         break
22117                 fi
22118         done
22119         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22120 done
22121 LIBS="$cf_add_libs"
22122
22123         cat >conftest.$ac_ext <<_ACEOF
22124 #line 22124 "configure"
22125 #include "confdefs.h"
22126
22127 #include <$cf_gpp_libname/builtin.h>
22128
22129 int
22130 main (void)
22131 {
22132 two_arg_error_handler_t foo2 = lib_error_handler
22133   ;
22134   return 0;
22135 }
22136 _ACEOF
22137 rm -f conftest.$ac_objext conftest$ac_exeext
22138 if { (eval echo "$as_me:22138: \"$ac_link\"") >&5
22139   (eval $ac_link) 2>&5
22140   ac_status=$?
22141   echo "$as_me:22141: \$? = $ac_status" >&5
22142   (exit $ac_status); } &&
22143          { ac_try='test -s conftest$ac_exeext'
22144   { (eval echo "$as_me:22144: \"$ac_try\"") >&5
22145   (eval $ac_try) 2>&5
22146   ac_status=$?
22147   echo "$as_me:22147: \$? = $ac_status" >&5
22148   (exit $ac_status); }; }; then
22149   cf_cxx_library=yes
22150
22151 cf_add_libs="-l$cf_gpp_libname"
22152 # Filter out duplicates - this happens with badly-designed ".pc" files...
22153 for cf_add_1lib in $CXXLIBS
22154 do
22155         for cf_add_2lib in $cf_add_libs
22156         do
22157                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22158                 then
22159                         cf_add_1lib=
22160                         break
22161                 fi
22162         done
22163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22164 done
22165 CXXLIBS="$cf_add_libs"
22166
22167          if test "$cf_gpp_libname" = cpp ; then
22168
22169 cat >>confdefs.h <<\EOF
22170 #define HAVE_GPP_BUILTIN_H 1
22171 EOF
22172
22173          else
22174
22175 cat >>confdefs.h <<\EOF
22176 #define HAVE_GXX_BUILTIN_H 1
22177 EOF
22178
22179          fi
22180 else
22181   echo "$as_me: failed program was:" >&5
22182 cat conftest.$ac_ext >&5
22183 cat >conftest.$ac_ext <<_ACEOF
22184 #line 22184 "configure"
22185 #include "confdefs.h"
22186
22187 #include <builtin.h>
22188
22189 int
22190 main (void)
22191 {
22192 two_arg_error_handler_t foo2 = lib_error_handler
22193   ;
22194   return 0;
22195 }
22196 _ACEOF
22197 rm -f conftest.$ac_objext conftest$ac_exeext
22198 if { (eval echo "$as_me:22198: \"$ac_link\"") >&5
22199   (eval $ac_link) 2>&5
22200   ac_status=$?
22201   echo "$as_me:22201: \$? = $ac_status" >&5
22202   (exit $ac_status); } &&
22203          { ac_try='test -s conftest$ac_exeext'
22204   { (eval echo "$as_me:22204: \"$ac_try\"") >&5
22205   (eval $ac_try) 2>&5
22206   ac_status=$?
22207   echo "$as_me:22207: \$? = $ac_status" >&5
22208   (exit $ac_status); }; }; then
22209   cf_cxx_library=yes
22210
22211 cf_add_libs="-l$cf_gpp_libname"
22212 # Filter out duplicates - this happens with badly-designed ".pc" files...
22213 for cf_add_1lib in $CXXLIBS
22214 do
22215         for cf_add_2lib in $cf_add_libs
22216         do
22217                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
22218                 then
22219                         cf_add_1lib=
22220                         break
22221                 fi
22222         done
22223         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
22224 done
22225 CXXLIBS="$cf_add_libs"
22226
22227 cat >>confdefs.h <<\EOF
22228 #define HAVE_BUILTIN_H 1
22229 EOF
22230
22231 else
22232   echo "$as_me: failed program was:" >&5
22233 cat conftest.$ac_ext >&5
22234 cf_cxx_library=no
22235 fi
22236 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22237 fi
22238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22239         LIBS="$cf_save"
22240         echo "$as_me:22240: result: $cf_cxx_library" >&5
22241 echo "${ECHO_T}$cf_cxx_library" >&6
22242 fi
22243
22244                 ;;
22245         (*)
22246                 cf_cxx_library=no
22247                 ;;
22248         esac
22249
22250         ac_ext=cc
22251 ac_cpp='$CXXCPP $CPPFLAGS'
22252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22255 ac_main_return=return
22256 echo "$as_me:22256: checking how to run the C++ preprocessor" >&5
22257 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
22258 if test -z "$CXXCPP"; then
22259   if test "${ac_cv_prog_CXXCPP+set}" = set; then
22260   echo $ECHO_N "(cached) $ECHO_C" >&6
22261 else
22262       # Double quotes because CXXCPP needs to be expanded
22263     for CXXCPP in "$CXX -E" "/lib/cpp"
22264     do
22265       ac_preproc_ok=false
22266 for ac_cxx_preproc_warn_flag in '' yes
22267 do
22268   # Use a header file that comes with gcc, so configuring glibc
22269   # with a fresh cross-compiler works.
22270   # On the NeXT, cc -E runs the code through the compiler's parser,
22271   # not just through cpp. "Syntax error" is here to catch this case.
22272   cat >conftest.$ac_ext <<_ACEOF
22273 #line 22273 "configure"
22274 #include "confdefs.h"
22275 #include <assert.h>
22276                      Syntax error
22277 _ACEOF
22278 if { (eval echo "$as_me:22278: \"$ac_cpp conftest.$ac_ext\"") >&5
22279   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22280   ac_status=$?
22281   egrep -v '^ *\+' conftest.er1 >conftest.err
22282   rm -f conftest.er1
22283   cat conftest.err >&5
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit $ac_status); } >/dev/null; then
22286   if test -s conftest.err; then
22287     ac_cpp_err=$ac_cxx_preproc_warn_flag
22288   else
22289     ac_cpp_err=
22290   fi
22291 else
22292   ac_cpp_err=yes
22293 fi
22294 if test -z "$ac_cpp_err"; then
22295   :
22296 else
22297   echo "$as_me: failed program was:" >&5
22298   cat conftest.$ac_ext >&5
22299   # Broken: fails on valid input.
22300 continue
22301 fi
22302 rm -f conftest.err conftest.$ac_ext
22303
22304   # OK, works on sane cases.  Now check whether non-existent headers
22305   # can be detected and how.
22306   cat >conftest.$ac_ext <<_ACEOF
22307 #line 22307 "configure"
22308 #include "confdefs.h"
22309 #include <ac_nonexistent.h>
22310 _ACEOF
22311 if { (eval echo "$as_me:22311: \"$ac_cpp conftest.$ac_ext\"") >&5
22312   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22313   ac_status=$?
22314   egrep -v '^ *\+' conftest.er1 >conftest.err
22315   rm -f conftest.er1
22316   cat conftest.err >&5
22317   echo "$as_me:22317: \$? = $ac_status" >&5
22318   (exit $ac_status); } >/dev/null; then
22319   if test -s conftest.err; then
22320     ac_cpp_err=$ac_cxx_preproc_warn_flag
22321   else
22322     ac_cpp_err=
22323   fi
22324 else
22325   ac_cpp_err=yes
22326 fi
22327 if test -z "$ac_cpp_err"; then
22328   # Broken: success on invalid input.
22329 continue
22330 else
22331   echo "$as_me: failed program was:" >&5
22332   cat conftest.$ac_ext >&5
22333   # Passes both tests.
22334 ac_preproc_ok=:
22335 break
22336 fi
22337 rm -f conftest.err conftest.$ac_ext
22338
22339 done
22340 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22341 rm -f conftest.err conftest.$ac_ext
22342 if $ac_preproc_ok; then
22343   break
22344 fi
22345
22346     done
22347     ac_cv_prog_CXXCPP=$CXXCPP
22348
22349 fi
22350   CXXCPP=$ac_cv_prog_CXXCPP
22351 else
22352   ac_cv_prog_CXXCPP=$CXXCPP
22353 fi
22354 echo "$as_me:22354: result: $CXXCPP" >&5
22355 echo "${ECHO_T}$CXXCPP" >&6
22356 ac_preproc_ok=false
22357 for ac_cxx_preproc_warn_flag in '' yes
22358 do
22359   # Use a header file that comes with gcc, so configuring glibc
22360   # with a fresh cross-compiler works.
22361   # On the NeXT, cc -E runs the code through the compiler's parser,
22362   # not just through cpp. "Syntax error" is here to catch this case.
22363   cat >conftest.$ac_ext <<_ACEOF
22364 #line 22364 "configure"
22365 #include "confdefs.h"
22366 #include <assert.h>
22367                      Syntax error
22368 _ACEOF
22369 if { (eval echo "$as_me:22369: \"$ac_cpp conftest.$ac_ext\"") >&5
22370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22371   ac_status=$?
22372   egrep -v '^ *\+' conftest.er1 >conftest.err
22373   rm -f conftest.er1
22374   cat conftest.err >&5
22375   echo "$as_me:22375: \$? = $ac_status" >&5
22376   (exit $ac_status); } >/dev/null; then
22377   if test -s conftest.err; then
22378     ac_cpp_err=$ac_cxx_preproc_warn_flag
22379   else
22380     ac_cpp_err=
22381   fi
22382 else
22383   ac_cpp_err=yes
22384 fi
22385 if test -z "$ac_cpp_err"; then
22386   :
22387 else
22388   echo "$as_me: failed program was:" >&5
22389   cat conftest.$ac_ext >&5
22390   # Broken: fails on valid input.
22391 continue
22392 fi
22393 rm -f conftest.err conftest.$ac_ext
22394
22395   # OK, works on sane cases.  Now check whether non-existent headers
22396   # can be detected and how.
22397   cat >conftest.$ac_ext <<_ACEOF
22398 #line 22398 "configure"
22399 #include "confdefs.h"
22400 #include <ac_nonexistent.h>
22401 _ACEOF
22402 if { (eval echo "$as_me:22402: \"$ac_cpp conftest.$ac_ext\"") >&5
22403   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22404   ac_status=$?
22405   egrep -v '^ *\+' conftest.er1 >conftest.err
22406   rm -f conftest.er1
22407   cat conftest.err >&5
22408   echo "$as_me:22408: \$? = $ac_status" >&5
22409   (exit $ac_status); } >/dev/null; then
22410   if test -s conftest.err; then
22411     ac_cpp_err=$ac_cxx_preproc_warn_flag
22412   else
22413     ac_cpp_err=
22414   fi
22415 else
22416   ac_cpp_err=yes
22417 fi
22418 if test -z "$ac_cpp_err"; then
22419   # Broken: success on invalid input.
22420 continue
22421 else
22422   echo "$as_me: failed program was:" >&5
22423   cat conftest.$ac_ext >&5
22424   # Passes both tests.
22425 ac_preproc_ok=:
22426 break
22427 fi
22428 rm -f conftest.err conftest.$ac_ext
22429
22430 done
22431 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
22432 rm -f conftest.err conftest.$ac_ext
22433 if $ac_preproc_ok; then
22434   :
22435 else
22436   { { echo "$as_me:22436: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
22437 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
22438    { (exit 1); exit 1; }; }
22439 fi
22440
22441 ac_ext=cc
22442 ac_cpp='$CXXCPP $CPPFLAGS'
22443 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22444 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22445 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22446 ac_main_return=return
22447
22448 for ac_header in typeinfo
22449 do
22450 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22451 echo "$as_me:22451: checking for $ac_header" >&5
22452 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22453 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22454   echo $ECHO_N "(cached) $ECHO_C" >&6
22455 else
22456   cat >conftest.$ac_ext <<_ACEOF
22457 #line 22457 "configure"
22458 #include "confdefs.h"
22459 #include <$ac_header>
22460 _ACEOF
22461 if { (eval echo "$as_me:22461: \"$ac_cpp conftest.$ac_ext\"") >&5
22462   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22463   ac_status=$?
22464   egrep -v '^ *\+' conftest.er1 >conftest.err
22465   rm -f conftest.er1
22466   cat conftest.err >&5
22467   echo "$as_me:22467: \$? = $ac_status" >&5
22468   (exit $ac_status); } >/dev/null; then
22469   if test -s conftest.err; then
22470     ac_cpp_err=$ac_cxx_preproc_warn_flag
22471   else
22472     ac_cpp_err=
22473   fi
22474 else
22475   ac_cpp_err=yes
22476 fi
22477 if test -z "$ac_cpp_err"; then
22478   eval "$as_ac_Header=yes"
22479 else
22480   echo "$as_me: failed program was:" >&5
22481   cat conftest.$ac_ext >&5
22482   eval "$as_ac_Header=no"
22483 fi
22484 rm -f conftest.err conftest.$ac_ext
22485 fi
22486 echo "$as_me:22486: result: `eval echo '${'$as_ac_Header'}'`" >&5
22487 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22488 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22489   cat >>confdefs.h <<EOF
22490 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22491 EOF
22492
22493 fi
22494 done
22495
22496 for ac_header in iostream
22497 do
22498 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22499 echo "$as_me:22499: checking for $ac_header" >&5
22500 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22501 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22502   echo $ECHO_N "(cached) $ECHO_C" >&6
22503 else
22504   cat >conftest.$ac_ext <<_ACEOF
22505 #line 22505 "configure"
22506 #include "confdefs.h"
22507 #include <$ac_header>
22508 _ACEOF
22509 if { (eval echo "$as_me:22509: \"$ac_cpp conftest.$ac_ext\"") >&5
22510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22511   ac_status=$?
22512   egrep -v '^ *\+' conftest.er1 >conftest.err
22513   rm -f conftest.er1
22514   cat conftest.err >&5
22515   echo "$as_me:22515: \$? = $ac_status" >&5
22516   (exit $ac_status); } >/dev/null; then
22517   if test -s conftest.err; then
22518     ac_cpp_err=$ac_cxx_preproc_warn_flag
22519   else
22520     ac_cpp_err=
22521   fi
22522 else
22523   ac_cpp_err=yes
22524 fi
22525 if test -z "$ac_cpp_err"; then
22526   eval "$as_ac_Header=yes"
22527 else
22528   echo "$as_me: failed program was:" >&5
22529   cat conftest.$ac_ext >&5
22530   eval "$as_ac_Header=no"
22531 fi
22532 rm -f conftest.err conftest.$ac_ext
22533 fi
22534 echo "$as_me:22534: result: `eval echo '${'$as_ac_Header'}'`" >&5
22535 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22536 if test `eval echo '${'$as_ac_Header'}'` = yes; then
22537   cat >>confdefs.h <<EOF
22538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22539 EOF
22540
22541 fi
22542 done
22543
22544 if test x"$ac_cv_header_iostream" = xyes ; then
22545         echo "$as_me:22545: checking if iostream uses std-namespace" >&5
22546 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
22547         cat >conftest.$ac_ext <<_ACEOF
22548 #line 22548 "configure"
22549 #include "confdefs.h"
22550
22551 #include <iostream>
22552 using std::endl;
22553 using std::cerr;
22554 int
22555 main (void)
22556 {
22557
22558 cerr << "testing" << endl;
22559
22560   ;
22561   return 0;
22562 }
22563 _ACEOF
22564 rm -f conftest.$ac_objext
22565 if { (eval echo "$as_me:22565: \"$ac_compile\"") >&5
22566   (eval $ac_compile) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit $ac_status); } &&
22570          { ac_try='test -s conftest.$ac_objext'
22571   { (eval echo "$as_me:22571: \"$ac_try\"") >&5
22572   (eval $ac_try) 2>&5
22573   ac_status=$?
22574   echo "$as_me:22574: \$? = $ac_status" >&5
22575   (exit $ac_status); }; }; then
22576   cf_iostream_namespace=yes
22577 else
22578   echo "$as_me: failed program was:" >&5
22579 cat conftest.$ac_ext >&5
22580 cf_iostream_namespace=no
22581 fi
22582 rm -f conftest.$ac_objext conftest.$ac_ext
22583         echo "$as_me:22583: result: $cf_iostream_namespace" >&5
22584 echo "${ECHO_T}$cf_iostream_namespace" >&6
22585         if test "$cf_iostream_namespace" = yes ; then
22586
22587 cat >>confdefs.h <<\EOF
22588 #define IOSTREAM_NAMESPACE 1
22589 EOF
22590
22591         fi
22592 fi
22593
22594 echo "$as_me:22594: checking if we should include stdbool.h" >&5
22595 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
22596
22597 if test "${cf_cv_header_stdbool_h+set}" = set; then
22598   echo $ECHO_N "(cached) $ECHO_C" >&6
22599 else
22600
22601         cat >conftest.$ac_ext <<_ACEOF
22602 #line 22602 "configure"
22603 #include "confdefs.h"
22604
22605 int
22606 main (void)
22607 {
22608 bool foo = false
22609   ;
22610   return 0;
22611 }
22612 _ACEOF
22613 rm -f conftest.$ac_objext
22614 if { (eval echo "$as_me:22614: \"$ac_compile\"") >&5
22615   (eval $ac_compile) 2>&5
22616   ac_status=$?
22617   echo "$as_me:22617: \$? = $ac_status" >&5
22618   (exit $ac_status); } &&
22619          { ac_try='test -s conftest.$ac_objext'
22620   { (eval echo "$as_me:22620: \"$ac_try\"") >&5
22621   (eval $ac_try) 2>&5
22622   ac_status=$?
22623   echo "$as_me:22623: \$? = $ac_status" >&5
22624   (exit $ac_status); }; }; then
22625   cf_cv_header_stdbool_h=0
22626 else
22627   echo "$as_me: failed program was:" >&5
22628 cat conftest.$ac_ext >&5
22629 cat >conftest.$ac_ext <<_ACEOF
22630 #line 22630 "configure"
22631 #include "confdefs.h"
22632
22633 #ifndef __BEOS__
22634 #include <stdbool.h>
22635 #endif
22636
22637 int
22638 main (void)
22639 {
22640 bool foo = false
22641   ;
22642   return 0;
22643 }
22644 _ACEOF
22645 rm -f conftest.$ac_objext
22646 if { (eval echo "$as_me:22646: \"$ac_compile\"") >&5
22647   (eval $ac_compile) 2>&5
22648   ac_status=$?
22649   echo "$as_me:22649: \$? = $ac_status" >&5
22650   (exit $ac_status); } &&
22651          { ac_try='test -s conftest.$ac_objext'
22652   { (eval echo "$as_me:22652: \"$ac_try\"") >&5
22653   (eval $ac_try) 2>&5
22654   ac_status=$?
22655   echo "$as_me:22655: \$? = $ac_status" >&5
22656   (exit $ac_status); }; }; then
22657   cf_cv_header_stdbool_h=1
22658 else
22659   echo "$as_me: failed program was:" >&5
22660 cat conftest.$ac_ext >&5
22661 cf_cv_header_stdbool_h=0
22662 fi
22663 rm -f conftest.$ac_objext conftest.$ac_ext
22664 fi
22665 rm -f conftest.$ac_objext conftest.$ac_ext
22666 fi
22667
22668 if test "$cf_cv_header_stdbool_h" = 1
22669 then    echo "$as_me:22669: result: yes" >&5
22670 echo "${ECHO_T}yes" >&6
22671 else    echo "$as_me:22671: result: no" >&5
22672 echo "${ECHO_T}no" >&6
22673 fi
22674
22675 echo "$as_me:22675: checking for builtin bool type" >&5
22676 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
22677
22678 if test "${cf_cv_builtin_bool+set}" = set; then
22679   echo $ECHO_N "(cached) $ECHO_C" >&6
22680 else
22681
22682         cat >conftest.$ac_ext <<_ACEOF
22683 #line 22683 "configure"
22684 #include "confdefs.h"
22685
22686 #include <stdio.h>
22687 #include <sys/types.h>
22688
22689 int
22690 main (void)
22691 {
22692 bool x = false
22693   ;
22694   return 0;
22695 }
22696 _ACEOF
22697 rm -f conftest.$ac_objext
22698 if { (eval echo "$as_me:22698: \"$ac_compile\"") >&5
22699   (eval $ac_compile) 2>&5
22700   ac_status=$?
22701   echo "$as_me:22701: \$? = $ac_status" >&5
22702   (exit $ac_status); } &&
22703          { ac_try='test -s conftest.$ac_objext'
22704   { (eval echo "$as_me:22704: \"$ac_try\"") >&5
22705   (eval $ac_try) 2>&5
22706   ac_status=$?
22707   echo "$as_me:22707: \$? = $ac_status" >&5
22708   (exit $ac_status); }; }; then
22709   cf_cv_builtin_bool=1
22710 else
22711   echo "$as_me: failed program was:" >&5
22712 cat conftest.$ac_ext >&5
22713 cf_cv_builtin_bool=0
22714 fi
22715 rm -f conftest.$ac_objext conftest.$ac_ext
22716
22717 fi
22718
22719 if test "$cf_cv_builtin_bool" = 1
22720 then    echo "$as_me:22720: result: yes" >&5
22721 echo "${ECHO_T}yes" >&6
22722 else    echo "$as_me:22722: result: no" >&5
22723 echo "${ECHO_T}no" >&6
22724 fi
22725
22726 echo "$as_me:22726: checking for size of bool" >&5
22727 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
22728 if test "${cf_cv_type_of_bool+set}" = set; then
22729   echo $ECHO_N "(cached) $ECHO_C" >&6
22730 else
22731
22732         rm -f cf_test.out
22733         if test "$cross_compiling" = yes; then
22734   cf_cv_type_of_bool=unknown
22735 else
22736   cat >conftest.$ac_ext <<_ACEOF
22737 #line 22737 "configure"
22738 #include "confdefs.h"
22739
22740 #include <stdlib.h>
22741 #include <stdio.h>
22742
22743 #if defined(__cplusplus)
22744
22745 #ifdef HAVE_GXX_BUILTIN_H
22746 #include <g++/builtin.h>
22747 #elif HAVE_GPP_BUILTIN_H
22748 #include <gpp/builtin.h>
22749 #elif HAVE_BUILTIN_H
22750 #include <builtin.h>
22751 #endif
22752
22753 #else
22754
22755 #if $cf_cv_header_stdbool_h
22756 #include <stdbool.h>
22757 #endif
22758
22759 #endif
22760
22761 int main(void)
22762 {
22763         FILE *fp = fopen("cf_test.out", "w");
22764         if (fp != 0) {
22765                 bool x = true;
22766                 if ((bool)(-x) >= 0)
22767                         fputs("unsigned ", fp);
22768                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
22769                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
22770                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
22771                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
22772                 fclose(fp);
22773         }
22774         ${cf_cv_main_return:-return}(0);
22775 }
22776
22777 _ACEOF
22778 rm -f conftest$ac_exeext
22779 if { (eval echo "$as_me:22779: \"$ac_link\"") >&5
22780   (eval $ac_link) 2>&5
22781   ac_status=$?
22782   echo "$as_me:22782: \$? = $ac_status" >&5
22783   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22784   { (eval echo "$as_me:22784: \"$ac_try\"") >&5
22785   (eval $ac_try) 2>&5
22786   ac_status=$?
22787   echo "$as_me:22787: \$? = $ac_status" >&5
22788   (exit $ac_status); }; }; then
22789   cf_cv_type_of_bool=`cat cf_test.out`
22790                  if test -z "$cf_cv_type_of_bool"; then
22791                    cf_cv_type_of_bool=unknown
22792                  fi
22793 else
22794   echo "$as_me: program exited with status $ac_status" >&5
22795 echo "$as_me: failed program was:" >&5
22796 cat conftest.$ac_ext >&5
22797 cf_cv_type_of_bool=unknown
22798 fi
22799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22800 fi
22801
22802 fi
22803
22804         rm -f cf_test.out
22805 echo "$as_me:22805: result: $cf_cv_type_of_bool" >&5
22806 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
22807 if test "$cf_cv_type_of_bool" = unknown ; then
22808         case .$NCURSES_BOOL in
22809         (.auto|.) NCURSES_BOOL=unsigned;;
22810         esac
22811         { echo "$as_me:22811: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
22812 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
22813         cf_cv_type_of_bool=$NCURSES_BOOL
22814 fi
22815
22816 echo "$as_me:22816: checking for special defines needed for etip.h" >&5
22817 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
22818 cf_save_CXXFLAGS="$CXXFLAGS"
22819 cf_result="none"
22820
22821 # etip.h includes ncurses.h which includes ncurses_dll.h
22822 # But ncurses_dll.h is generated - fix here.
22823 test -d include || mkdir include
22824 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
22825
22826 for cf_math in "" MATH_H
22827 do
22828 for cf_excp in "" MATH_EXCEPTION
22829 do
22830         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
22831         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
22832         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
22833 cat >conftest.$ac_ext <<_ACEOF
22834 #line 22834 "configure"
22835 #include "confdefs.h"
22836
22837 #include <etip.h.in>
22838
22839 int
22840 main (void)
22841 {
22842
22843   ;
22844   return 0;
22845 }
22846 _ACEOF
22847 rm -f conftest.$ac_objext
22848 if { (eval echo "$as_me:22848: \"$ac_compile\"") >&5
22849   (eval $ac_compile) 2>&5
22850   ac_status=$?
22851   echo "$as_me:22851: \$? = $ac_status" >&5
22852   (exit $ac_status); } &&
22853          { ac_try='test -s conftest.$ac_objext'
22854   { (eval echo "$as_me:22854: \"$ac_try\"") >&5
22855   (eval $ac_try) 2>&5
22856   ac_status=$?
22857   echo "$as_me:22857: \$? = $ac_status" >&5
22858   (exit $ac_status); }; }; then
22859
22860         test -n "$cf_math" && cat >>confdefs.h <<EOF
22861 #define ETIP_NEEDS_${cf_math} 1
22862 EOF
22863
22864         test -n "$cf_excp" && cat >>confdefs.h <<EOF
22865 #define ETIP_NEEDS_${cf_excp} 1
22866 EOF
22867
22868         cf_result="$cf_math $cf_excp"
22869         break 2
22870
22871 else
22872   echo "$as_me: failed program was:" >&5
22873 cat conftest.$ac_ext >&5
22874 fi
22875 rm -f conftest.$ac_objext conftest.$ac_ext
22876 done
22877 done
22878 echo "$as_me:22878: result: $cf_result" >&5
22879 echo "${ECHO_T}$cf_result" >&6
22880 CXXFLAGS="$cf_save_CXXFLAGS"
22881
22882 if test -n "$CXX"; then
22883 echo "$as_me:22883: checking if $CXX accepts parameter initialization" >&5
22884 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
22885 if test "${cf_cv_cpp_param_init+set}" = set; then
22886   echo $ECHO_N "(cached) $ECHO_C" >&6
22887 else
22888
22889         ac_ext=cc
22890 ac_cpp='$CXXCPP $CPPFLAGS'
22891 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22892 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22893 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22894 ac_main_return=return
22895
22896         if test "$cross_compiling" = yes; then
22897   cf_cv_cpp_param_init=unknown
22898 else
22899   cat >conftest.$ac_ext <<_ACEOF
22900 #line 22900 "configure"
22901 #include "confdefs.h"
22902
22903 class TEST {
22904 private:
22905         int value;
22906 public:
22907         TEST(int x = 1);
22908         ~TEST();
22909 };
22910
22911 TEST::TEST(int x = 1)   // some compilers do not like second initializer
22912 {
22913         value = x;
22914 }
22915 int main(void) { }
22916
22917 _ACEOF
22918 rm -f conftest$ac_exeext
22919 if { (eval echo "$as_me:22919: \"$ac_link\"") >&5
22920   (eval $ac_link) 2>&5
22921   ac_status=$?
22922   echo "$as_me:22922: \$? = $ac_status" >&5
22923   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22924   { (eval echo "$as_me:22924: \"$ac_try\"") >&5
22925   (eval $ac_try) 2>&5
22926   ac_status=$?
22927   echo "$as_me:22927: \$? = $ac_status" >&5
22928   (exit $ac_status); }; }; then
22929   cf_cv_cpp_param_init=yes
22930 else
22931   echo "$as_me: program exited with status $ac_status" >&5
22932 echo "$as_me: failed program was:" >&5
22933 cat conftest.$ac_ext >&5
22934 cf_cv_cpp_param_init=no
22935 fi
22936 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22937 fi
22938         ac_ext=cc
22939 ac_cpp='$CXXCPP $CPPFLAGS'
22940 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22941 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22942 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22943 ac_main_return=return
22944
22945 fi
22946 echo "$as_me:22946: result: $cf_cv_cpp_param_init" >&5
22947 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
22948 fi
22949 test "$cf_cv_cpp_param_init" = yes &&
22950 cat >>confdefs.h <<\EOF
22951 #define CPP_HAS_PARAM_INIT 1
22952 EOF
22953
22954 if test -n "$CXX"; then
22955
22956 echo "$as_me:22956: checking if $CXX accepts static_cast" >&5
22957 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
22958 if test "${cf_cv_cpp_static_cast+set}" = set; then
22959   echo $ECHO_N "(cached) $ECHO_C" >&6
22960 else
22961
22962         ac_ext=cc
22963 ac_cpp='$CXXCPP $CPPFLAGS'
22964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
22965 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
22966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
22967 ac_main_return=return
22968
22969         cat >conftest.$ac_ext <<_ACEOF
22970 #line 22970 "configure"
22971 #include "confdefs.h"
22972
22973 class NCursesPanel
22974 {
22975 public:
22976   NCursesPanel(int nlines,
22977                int ncols,
22978                int begin_y = 0,
22979                int begin_x = 0)
22980   {
22981   }
22982   NCursesPanel();
22983   ~NCursesPanel();
22984 };
22985
22986 template<class T> class NCursesUserPanel : public NCursesPanel
22987 {
22988 public:
22989   NCursesUserPanel (int nlines,
22990                     int ncols,
22991                     int begin_y = 0,
22992                     int begin_x = 0,
22993                     const T* p_UserData = static_cast<T*>(0))
22994     : NCursesPanel (nlines, ncols, begin_y, begin_x)
22995   {
22996   };
22997   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
22998   {
22999   };
23000
23001   virtual ~NCursesUserPanel() {};
23002 };
23003
23004 int
23005 main (void)
23006 {
23007
23008         const char* p_UserData = static_cast<char*>(0)
23009   ;
23010   return 0;
23011 }
23012 _ACEOF
23013 rm -f conftest.$ac_objext
23014 if { (eval echo "$as_me:23014: \"$ac_compile\"") >&5
23015   (eval $ac_compile) 2>&5
23016   ac_status=$?
23017   echo "$as_me:23017: \$? = $ac_status" >&5
23018   (exit $ac_status); } &&
23019          { ac_try='test -s conftest.$ac_objext'
23020   { (eval echo "$as_me:23020: \"$ac_try\"") >&5
23021   (eval $ac_try) 2>&5
23022   ac_status=$?
23023   echo "$as_me:23023: \$? = $ac_status" >&5
23024   (exit $ac_status); }; }; then
23025   cf_cv_cpp_static_cast=yes
23026 else
23027   echo "$as_me: failed program was:" >&5
23028 cat conftest.$ac_ext >&5
23029 cf_cv_cpp_static_cast=no
23030 fi
23031 rm -f conftest.$ac_objext conftest.$ac_ext
23032
23033         ac_ext=cc
23034 ac_cpp='$CXXCPP $CPPFLAGS'
23035 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
23036 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
23037 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
23038 ac_main_return=return
23039
23040 fi
23041 echo "$as_me:23041: result: $cf_cv_cpp_static_cast" >&5
23042 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
23043
23044 fi
23045
23046 test "$cf_cv_cpp_static_cast" = yes &&
23047 cat >>confdefs.h <<\EOF
23048 #define CPP_HAS_STATIC_CAST 1
23049 EOF
23050
23051         CXX_AR='$(AR)'
23052         CXX_ARFLAGS='$(ARFLAGS)'
23053         case $cf_cv_system_name in
23054         (irix*)
23055             if test "$GXX" != yes ; then
23056                 CXX_AR='$(CXX)'
23057                 CXX_ARFLAGS='-ar -o'
23058             fi
23059             ;;
23060         (sco3.2v5*)
23061             CXXLDFLAGS="-u main"
23062             ;;
23063         (solaris2*)
23064             if test "$GXX" != yes ; then
23065                 CXX_AR='$(CXX)'
23066                 CXX_ARFLAGS='-xar -o'
23067             fi
23068             ;;
23069         esac
23070
23071 else
23072         cf_cxx_library=no
23073         cf_cv_builtin_bool=1
23074
23075         # Just because we are not configuring against C++ right now does not
23076         # mean that a user will not want to use C++.  Some distributors disable
23077         # the C++ portion of this configuration as a shortcut (or just to avoid
23078         # compiling the demo in the c++ directory).  So we need a reasonable
23079         # default for the 'bool' type.
23080         #
23081         # Caveat: since the storage of the bool type is not standardized, it
23082         # may change.
23083
23084         if test "$NCURSES_BOOL" != auto ; then
23085                 cf_cv_type_of_bool=$NCURSES_BOOL
23086                 cf_cv_header_stdbool_h=0
23087         else
23088                 if test "$cf_cv_header_stdbool_h" = 1 ; then
23089
23090 echo "$as_me:23090: checking for size of bool" >&5
23091 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
23092 if test "${cf_cv_type_of_bool+set}" = set; then
23093   echo $ECHO_N "(cached) $ECHO_C" >&6
23094 else
23095
23096         rm -f cf_test.out
23097         if test "$cross_compiling" = yes; then
23098   cf_cv_type_of_bool=unknown
23099 else
23100   cat >conftest.$ac_ext <<_ACEOF
23101 #line 23101 "configure"
23102 #include "confdefs.h"
23103
23104 #include <stdlib.h>
23105 #include <stdio.h>
23106
23107 #if defined(__cplusplus)
23108
23109 #ifdef HAVE_GXX_BUILTIN_H
23110 #include <g++/builtin.h>
23111 #elif HAVE_GPP_BUILTIN_H
23112 #include <gpp/builtin.h>
23113 #elif HAVE_BUILTIN_H
23114 #include <builtin.h>
23115 #endif
23116
23117 #else
23118
23119 #if $cf_cv_header_stdbool_h
23120 #include <stdbool.h>
23121 #endif
23122
23123 #endif
23124
23125 int main(void)
23126 {
23127         FILE *fp = fopen("cf_test.out", "w");
23128         if (fp != 0) {
23129                 bool x = true;
23130                 if ((bool)(-x) >= 0)
23131                         fputs("unsigned ", fp);
23132                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
23133                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
23134                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
23135                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
23136                 fclose(fp);
23137         }
23138         ${cf_cv_main_return:-return}(0);
23139 }
23140
23141 _ACEOF
23142 rm -f conftest$ac_exeext
23143 if { (eval echo "$as_me:23143: \"$ac_link\"") >&5
23144   (eval $ac_link) 2>&5
23145   ac_status=$?
23146   echo "$as_me:23146: \$? = $ac_status" >&5
23147   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23148   { (eval echo "$as_me:23148: \"$ac_try\"") >&5
23149   (eval $ac_try) 2>&5
23150   ac_status=$?
23151   echo "$as_me:23151: \$? = $ac_status" >&5
23152   (exit $ac_status); }; }; then
23153   cf_cv_type_of_bool=`cat cf_test.out`
23154                  if test -z "$cf_cv_type_of_bool"; then
23155                    cf_cv_type_of_bool=unknown
23156                  fi
23157 else
23158   echo "$as_me: program exited with status $ac_status" >&5
23159 echo "$as_me: failed program was:" >&5
23160 cat conftest.$ac_ext >&5
23161 cf_cv_type_of_bool=unknown
23162 fi
23163 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23164 fi
23165
23166 fi
23167
23168         rm -f cf_test.out
23169 echo "$as_me:23169: result: $cf_cv_type_of_bool" >&5
23170 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23171 if test "$cf_cv_type_of_bool" = unknown ; then
23172         case .$NCURSES_BOOL in
23173         (.auto|.) NCURSES_BOOL=unsigned;;
23174         esac
23175         { echo "$as_me:23175: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
23176 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
23177         cf_cv_type_of_bool=$NCURSES_BOOL
23178 fi
23179
23180                 else
23181                         echo "$as_me:23181: checking for fallback type of bool" >&5
23182 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
23183                         case "$host_cpu" in
23184                         (i?86)  cf_cv_type_of_bool=char ;;
23185                         (*)     cf_cv_type_of_bool=int  ;;
23186                         esac
23187                         echo "$as_me:23187: result: $cf_cv_type_of_bool" >&5
23188 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
23189                 fi
23190         fi
23191 fi
23192
23193 # If the C compiler did not declare bool, and we did not determine that the C++
23194 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
23195 # ncurses library use the same type as C++ bool.  Note that this allows one to
23196 # specify the type of bool in a configure-script option and postpone
23197 # integration with the C++ compiler provided that the types are compatible.
23198 USE_CXX_BOOL=1
23199 if test $cf_cv_cc_bool_type = 1
23200 then
23201         # oops: C has a bool.  Unlikely, but C++ could differ.
23202         USE_CXX_BOOL=0
23203 elif test $cf_cv_builtin_bool = 0
23204 then
23205         # C++ has no bool
23206         USE_CXX_BOOL=0
23207 else
23208         # this is the normal case
23209         USE_CXX_BOOL='defined(__cplusplus)'
23210 fi
23211
23212 if test -f "${srcdir}/Ada95/Makefile.in" ; then
23213
23214         if test "$cf_with_ada" != "no" ; then
23215                 if test "$with_libtool" != "no"; then
23216                         { echo "$as_me:23216: WARNING: libtool does not support Ada - disabling feature" >&5
23217 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
23218                         cf_with_ada=no
23219                 fi
23220         fi
23221
23222         if test "$cf_with_ada" != "no" ; then
23223
23224 cf_ada_make=gnatmake
23225 cf_ada_config="#"
23226 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
23227 set dummy $cf_ada_make; ac_word=$2
23228 echo "$as_me:23228: checking for $ac_word" >&5
23229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23230 if test "${ac_cv_prog_gnatmake_exists+set}" = set; then
23231   echo $ECHO_N "(cached) $ECHO_C" >&6
23232 else
23233   if test -n "$gnatmake_exists"; then
23234   ac_cv_prog_gnatmake_exists="$gnatmake_exists" # Let the user override the test.
23235 else
23236   ac_save_IFS=$IFS; IFS=$ac_path_separator
23237 ac_dummy="$PATH"
23238 for ac_dir in $ac_dummy; do
23239   IFS=$ac_save_IFS
23240   test -z "$ac_dir" && ac_dir=.
23241   $as_executable_p "$ac_dir/$ac_word" || continue
23242 ac_cv_prog_gnatmake_exists="yes"
23243 echo "$as_me:23243: found $ac_dir/$ac_word" >&5
23244 break
23245 done
23246
23247   test -z "$ac_cv_prog_gnatmake_exists" && ac_cv_prog_gnatmake_exists="no"
23248 fi
23249 fi
23250 gnatmake_exists=$ac_cv_prog_gnatmake_exists
23251 if test -n "$gnatmake_exists"; then
23252   echo "$as_me:23252: result: $gnatmake_exists" >&5
23253 echo "${ECHO_T}$gnatmake_exists" >&6
23254 else
23255   echo "$as_me:23255: result: no" >&5
23256 echo "${ECHO_T}no" >&6
23257 fi
23258
23259 if test "$ac_cv_prog_gnatmake_exists" = no; then
23260         cf_ada_make=
23261         cf_cv_prog_gnat_correct=no
23262 else
23263         # Extract the first word of "gprconfig", so it can be a program name with args.
23264 set dummy gprconfig; ac_word=$2
23265 echo "$as_me:23265: checking for $ac_word" >&5
23266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23267 if test "${ac_cv_prog_gprconfig_exists+set}" = set; then
23268   echo $ECHO_N "(cached) $ECHO_C" >&6
23269 else
23270   if test -n "$gprconfig_exists"; then
23271   ac_cv_prog_gprconfig_exists="$gprconfig_exists" # Let the user override the test.
23272 else
23273   ac_save_IFS=$IFS; IFS=$ac_path_separator
23274 ac_dummy="$PATH"
23275 for ac_dir in $ac_dummy; do
23276   IFS=$ac_save_IFS
23277   test -z "$ac_dir" && ac_dir=.
23278   $as_executable_p "$ac_dir/$ac_word" || continue
23279 ac_cv_prog_gprconfig_exists="yes"
23280 echo "$as_me:23280: found $ac_dir/$ac_word" >&5
23281 break
23282 done
23283
23284   test -z "$ac_cv_prog_gprconfig_exists" && ac_cv_prog_gprconfig_exists="no"
23285 fi
23286 fi
23287 gprconfig_exists=$ac_cv_prog_gprconfig_exists
23288 if test -n "$gprconfig_exists"; then
23289   echo "$as_me:23289: result: $gprconfig_exists" >&5
23290 echo "${ECHO_T}$gprconfig_exists" >&6
23291 else
23292   echo "$as_me:23292: result: no" >&5
23293 echo "${ECHO_T}no" >&6
23294 fi
23295
23296         if test "$ac_cv_prog_gprconfig_exists" = yes
23297         then
23298                 rm -rf conftest* *~conftest*
23299                 if mkdir conftest.src
23300                 then
23301                         cf_ada_config=""
23302                         cd conftest.src
23303                         for cf_gprconfig in Ada C
23304                         do
23305                                 echo "$as_me:23305: checking for gprconfig name for $cf_gprconfig" >&5
23306 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
23307                                 if test $cf_gprconfig = C
23308                                 then
23309                                         for cf_gprconfig_param in \
23310                                                 $cf_gprconfig,,,,GNATGCC \
23311                                                 $cf_gprconfig,,,,GCC \
23312                                                 $cf_gprconfig
23313                                         do
23314                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23315                                                 test -n "$cf_gprconfig_value" && break
23316                                         done
23317                                 else
23318                                         cf_gprconfig_param=$cf_gprconfig
23319                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
23320                                 fi
23321                                 if test -n "$cf_gprconfig_value"
23322                                 then
23323                                         eval cf_ada_config_$cf_gprconfig=$cf_gprconfig_value
23324                                         echo "$as_me:23324: result: $cf_gprconfig_value" >&5
23325 echo "${ECHO_T}$cf_gprconfig_value" >&6
23326                                 else
23327                                         echo "$as_me:23327: result: missing" >&5
23328 echo "${ECHO_T}missing" >&6
23329                                         cf_ada_config="#"
23330                                         break
23331                                 fi
23332                         done
23333                         cd ..
23334                         rm -rf conftest* *~conftest*
23335                 fi
23336         else
23337                 # gprconfig is newer than gnatmake; we can continue...
23338                 cf_ada_config="##"
23339         fi
23340         if test "x$cf_ada_config" != "x#"
23341         then
23342
23343 echo "$as_me:23343: checking for gnat version" >&5
23344 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
23345 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
23346         grep '[0-9].[0-9][0-9]*' |\
23347         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
23348 echo "$as_me:23348: result: $cf_gnat_version" >&5
23349 echo "${ECHO_T}$cf_gnat_version" >&6
23350
23351 case $cf_gnat_version in
23352 (3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9])
23353         cf_cv_prog_gnat_correct=yes
23354         ;;
23355 (*)
23356         { echo "$as_me:23356: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
23357 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
23358         cf_cv_prog_gnat_correct=no
23359         ;;
23360 esac
23361
23362                 # Extract the first word of "m4", so it can be a program name with args.
23363 set dummy m4; ac_word=$2
23364 echo "$as_me:23364: checking for $ac_word" >&5
23365 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23366 if test "${ac_cv_prog_M4_exists+set}" = set; then
23367   echo $ECHO_N "(cached) $ECHO_C" >&6
23368 else
23369   if test -n "$M4_exists"; then
23370   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
23371 else
23372   ac_save_IFS=$IFS; IFS=$ac_path_separator
23373 ac_dummy="$PATH"
23374 for ac_dir in $ac_dummy; do
23375   IFS=$ac_save_IFS
23376   test -z "$ac_dir" && ac_dir=.
23377   $as_executable_p "$ac_dir/$ac_word" || continue
23378 ac_cv_prog_M4_exists="yes"
23379 echo "$as_me:23379: found $ac_dir/$ac_word" >&5
23380 break
23381 done
23382
23383   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
23384 fi
23385 fi
23386 M4_exists=$ac_cv_prog_M4_exists
23387 if test -n "$M4_exists"; then
23388   echo "$as_me:23388: result: $M4_exists" >&5
23389 echo "${ECHO_T}$M4_exists" >&6
23390 else
23391   echo "$as_me:23391: result: no" >&5
23392 echo "${ECHO_T}no" >&6
23393 fi
23394
23395                 if test "$ac_cv_prog_M4_exists" = no; then
23396                         cf_cv_prog_gnat_correct=no
23397                         echo Ada95 binding required program m4 not found. Ada95 binding disabled.
23398                 fi
23399                 if test "$cf_cv_prog_gnat_correct" = yes; then
23400                         echo "$as_me:23400: checking if GNAT works" >&5
23401 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
23402
23403 rm -rf conftest* *~conftest*
23404 cat >>conftest.ads <<CF_EOF
23405 procedure conftest;
23406 CF_EOF
23407 cat >>conftest.adb <<CF_EOF
23408 with Text_IO;
23409 with GNAT.OS_Lib;
23410 procedure conftest is
23411 begin
23412    Text_IO.Put ("Hello World");
23413    Text_IO.New_Line;
23414    GNAT.OS_Lib.OS_Exit (0);
23415 end conftest;
23416 CF_EOF
23417 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23418    if ( ./conftest 1>&5 2>&1 ) ; then
23419       cf_cv_prog_gnat_correct=yes
23420    else
23421       cf_cv_prog_gnat_correct=no
23422    fi
23423 else
23424    cf_cv_prog_gnat_correct=no
23425 fi
23426 rm -rf conftest* *~conftest*
23427
23428                         echo "$as_me:23428: result: $cf_cv_prog_gnat_correct" >&5
23429 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
23430                 fi
23431         else
23432                 cf_cv_prog_gnat_correct=no
23433         fi
23434 fi
23435
23436                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
23437
23438         ADAFLAGS="$ADAFLAGS -gnatpn"
23439
23440         echo "$as_me:23440: checking optimization options for ADAFLAGS" >&5
23441 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
23442         case "$CFLAGS" in
23443         (*-g*)
23444
23445         ADAFLAGS="$ADAFLAGS -g"
23446
23447                 ;;
23448         esac
23449         case "$CFLAGS" in
23450         (*-O*)
23451                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
23452
23453         ADAFLAGS="$ADAFLAGS $cf_O_flag"
23454
23455                 ;;
23456         esac
23457         echo "$as_me:23457: result: $ADAFLAGS" >&5
23458 echo "${ECHO_T}$ADAFLAGS" >&6
23459
23460 echo "$as_me:23460: checking if GNATPREP supports -T option" >&5
23461 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
23462 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
23463   echo $ECHO_N "(cached) $ECHO_C" >&6
23464 else
23465
23466 cf_cv_gnatprep_opt_t=no
23467 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
23468
23469 fi
23470 echo "$as_me:23470: result: $cf_cv_gnatprep_opt_t" >&5
23471 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
23472 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
23473
23474 echo "$as_me:23474: checking if GNAT supports generics" >&5
23475 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
23476 case $cf_gnat_version in
23477 (3.[1-9]*|[4-9].*)
23478         cf_gnat_generics=yes
23479         ;;
23480 (*)
23481         cf_gnat_generics=no
23482         ;;
23483 esac
23484 echo "$as_me:23484: result: $cf_gnat_generics" >&5
23485 echo "${ECHO_T}$cf_gnat_generics" >&6
23486
23487 if test "$cf_gnat_generics" = yes
23488 then
23489         cf_compile_generics=generics
23490         cf_generic_objects="\${GENOBJS}"
23491 else
23492         cf_compile_generics=
23493         cf_generic_objects=
23494 fi
23495
23496 echo "$as_me:23496: checking if GNAT supports SIGINT" >&5
23497 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
23498 if test "${cf_cv_gnat_sigint+set}" = set; then
23499   echo $ECHO_N "(cached) $ECHO_C" >&6
23500 else
23501
23502 rm -rf conftest* *~conftest*
23503 cat >>conftest.ads <<CF_EOF
23504 with Ada.Interrupts.Names;
23505
23506 package ConfTest is
23507
23508    pragma Warnings (Off);  --  the next pragma exists since 3.11p
23509    pragma Unreserve_All_Interrupts;
23510    pragma Warnings (On);
23511
23512    protected Process is
23513       procedure Stop;
23514       function Continue return Boolean;
23515       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
23516    private
23517       Done : Boolean := False;
23518    end Process;
23519
23520 end ConfTest;
23521 CF_EOF
23522 cat >>conftest.adb <<CF_EOF
23523 package body ConfTest is
23524    protected body Process is
23525       procedure Stop is
23526       begin
23527          Done := True;
23528       end Stop;
23529       function Continue return Boolean is
23530       begin
23531          return not Done;
23532       end Continue;
23533    end Process;
23534 end ConfTest;
23535 CF_EOF
23536 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
23537       cf_cv_gnat_sigint=yes
23538 else
23539    cf_cv_gnat_sigint=no
23540 fi
23541 rm -rf conftest* *~conftest*
23542
23543 fi
23544 echo "$as_me:23544: result: $cf_cv_gnat_sigint" >&5
23545 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
23546
23547 if test $cf_cv_gnat_sigint = yes ; then
23548         USE_GNAT_SIGINT=""
23549 else
23550         USE_GNAT_SIGINT="#"
23551 fi
23552
23553 cf_gnat_libraries=no
23554 cf_gnat_projects=no
23555
23556 if test "$enable_gnat_projects" != no ; then
23557 echo "$as_me:23557: checking if GNAT supports project files" >&5
23558 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
23559 case $cf_gnat_version in
23560 (3.[0-9]*)
23561         ;;
23562 (*)
23563         case $cf_cv_system_name in
23564         (cygwin*|msys*)
23565                 ;;
23566         (*)
23567                 rm -rf conftest* *~conftest*
23568                 if mkdir conftest.src conftest.bin conftest.lib
23569                 then
23570                         cd conftest.src
23571                         rm -rf conftest* *~conftest*
23572                         cat >>library.gpr <<CF_EOF
23573 project Library is
23574   Kind := External ("LIB_KIND");
23575   for Library_Name use "ConfTest";
23576   for Object_Dir use ".";
23577   for Library_ALI_Dir use External("LIBRARY_DIR");
23578   for Library_Version use External ("SONAME");
23579   for Library_Kind use Kind;
23580   for Library_Dir use External("BUILD_DIR");
23581   Source_Dir := External ("SOURCE_DIR");
23582   for Source_Dirs use (Source_Dir);
23583 end Library;
23584 CF_EOF
23585                         cat >>confpackage.ads <<CF_EOF
23586 package ConfPackage is
23587    procedure conftest;
23588 end ConfPackage;
23589 CF_EOF
23590                         cat >>confpackage.adb <<CF_EOF
23591 with Text_IO;
23592 package body ConfPackage is
23593    procedure conftest is
23594    begin
23595       Text_IO.Put ("Hello World");
23596       Text_IO.New_Line;
23597    end conftest;
23598 end ConfPackage;
23599 CF_EOF
23600                         if ( $cf_ada_make $ADAFLAGS \
23601                                         -Plibrary.gpr \
23602                                         -XBUILD_DIR=`cd ../conftest.bin;pwd` \
23603                                         -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
23604                                         -XSOURCE_DIR=`pwd` \
23605                                         -XSONAME=libConfTest.so.1 \
23606                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
23607                                 cf_gnat_projects=yes
23608                         fi
23609                         cd ..
23610                 fi
23611                 if test -f conftest.lib/confpackage.ali
23612                 then
23613                         cf_gnat_libraries=yes
23614                 fi
23615                 rm -rf conftest* *~conftest*
23616                 ;;
23617         esac
23618         ;;
23619 esac
23620 echo "$as_me:23620: result: $cf_gnat_projects" >&5
23621 echo "${ECHO_T}$cf_gnat_projects" >&6
23622 fi # enable_gnat_projects
23623
23624 if test $cf_gnat_projects = yes
23625 then
23626         echo "$as_me:23626: checking if GNAT supports libraries" >&5
23627 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
23628         echo "$as_me:23628: result: $cf_gnat_libraries" >&5
23629 echo "${ECHO_T}$cf_gnat_libraries" >&6
23630 fi
23631
23632 if test "$cf_gnat_projects" = yes
23633 then
23634         USE_OLD_MAKERULES="#"
23635         USE_GNAT_PROJECTS=""
23636 else
23637         USE_OLD_MAKERULES=""
23638         USE_GNAT_PROJECTS="#"
23639 fi
23640
23641 if test "$cf_gnat_libraries" = yes
23642 then
23643         USE_GNAT_LIBRARIES=""
23644 else
23645         USE_GNAT_LIBRARIES="#"
23646 fi
23647
23648 echo "$as_me:23648: checking for ada-compiler" >&5
23649 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
23650
23651 # Check whether --with-ada-compiler or --without-ada-compiler was given.
23652 if test "${with_ada_compiler+set}" = set; then
23653   withval="$with_ada_compiler"
23654   cf_ada_compiler=$withval
23655 else
23656   cf_ada_compiler=gnatmake
23657 fi;
23658
23659 echo "$as_me:23659: result: $cf_ada_compiler" >&5
23660 echo "${ECHO_T}$cf_ada_compiler" >&6
23661
23662                         cf_ada_package=terminal_interface
23663
23664 echo "$as_me:23664: checking for ada-include" >&5
23665 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
23666
23667 # Check whether --with-ada-include or --without-ada-include was given.
23668 if test "${with_ada_include+set}" = set; then
23669   withval="$with_ada_include"
23670
23671 else
23672   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
23673 fi; if test -n "$prefix/share/ada/adainclude" ; then
23674
23675 if test "x$prefix" != xNONE; then
23676         cf_path_syntax="$prefix"
23677 else
23678         cf_path_syntax="$ac_default_prefix"
23679 fi
23680
23681 case ".$withval" in
23682 (.\$\(*\)*|.\'*\'*)
23683         ;;
23684 (..|./*|.\\*)
23685         ;;
23686 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23687         ;;
23688 (.\${*prefix}*|.\${*dir}*)
23689         eval withval="$withval"
23690         case ".$withval" in
23691         (.NONE/*)
23692                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23693                 ;;
23694         esac
23695         ;;
23696 (.no|.NONE/*)
23697         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23698         ;;
23699 (*)
23700         { { echo "$as_me:23700: error: expected a pathname, not \"$withval\"" >&5
23701 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23702    { (exit 1); exit 1; }; }
23703         ;;
23704 esac
23705
23706 fi
23707 eval ADA_INCLUDE="$withval"
23708
23709 echo "$as_me:23709: result: $ADA_INCLUDE" >&5
23710 echo "${ECHO_T}$ADA_INCLUDE" >&6
23711
23712 echo "$as_me:23712: checking for ada-objects" >&5
23713 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
23714
23715 # Check whether --with-ada-objects or --without-ada-objects was given.
23716 if test "${with_ada_objects+set}" = set; then
23717   withval="$with_ada_objects"
23718
23719 else
23720   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
23721 fi; if test -n "$prefix/lib/ada/adalib" ; then
23722
23723 if test "x$prefix" != xNONE; then
23724         cf_path_syntax="$prefix"
23725 else
23726         cf_path_syntax="$ac_default_prefix"
23727 fi
23728
23729 case ".$withval" in
23730 (.\$\(*\)*|.\'*\'*)
23731         ;;
23732 (..|./*|.\\*)
23733         ;;
23734 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
23735         ;;
23736 (.\${*prefix}*|.\${*dir}*)
23737         eval withval="$withval"
23738         case ".$withval" in
23739         (.NONE/*)
23740                 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23741                 ;;
23742         esac
23743         ;;
23744 (.no|.NONE/*)
23745         withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
23746         ;;
23747 (*)
23748         { { echo "$as_me:23748: error: expected a pathname, not \"$withval\"" >&5
23749 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
23750    { (exit 1); exit 1; }; }
23751         ;;
23752 esac
23753
23754 fi
23755 eval ADA_OBJECTS="$withval"
23756
23757 echo "$as_me:23757: result: $ADA_OBJECTS" >&5
23758 echo "${ECHO_T}$ADA_OBJECTS" >&6
23759
23760 echo "$as_me:23760: checking if an Ada95 shared-library should be built" >&5
23761 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
23762
23763 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
23764 if test "${with_ada_sharedlib+set}" = set; then
23765   withval="$with_ada_sharedlib"
23766   with_ada_sharedlib=$withval
23767 else
23768   with_ada_sharedlib=no
23769 fi;
23770 echo "$as_me:23770: result: $with_ada_sharedlib" >&5
23771 echo "${ECHO_T}$with_ada_sharedlib" >&6
23772
23773 if test "x$with_ada_sharedlib" != xno
23774 then
23775         if test "x$cf_gnat_projects" != xyes
23776         then
23777                 { echo "$as_me:23777: WARNING: disabling shared-library since GNAT projects are not supported" >&5
23778 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
23779                 with_ada_sharedlib=no
23780         fi
23781 fi
23782
23783 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
23784 MAKE_ADA_SHAREDLIB="#"
23785
23786 if test "x$with_ada_sharedlib" != xno
23787 then
23788         MAKE_ADA_SHAREDLIB=
23789         if test "x$with_ada_sharedlib" != xyes
23790         then
23791                 ADA_SHAREDLIB="$with_ada_sharedlib"
23792         fi
23793 fi
23794
23795                 fi
23796         fi
23797 else
23798         cf_with_ada=no
23799 fi
23800
23801 # do this "late" to avoid conflict with header-checks
23802 if test "x$with_widec" = xyes ; then
23803         echo "$as_me:23803: checking for wchar_t" >&5
23804 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
23805 if test "${ac_cv_type_wchar_t+set}" = set; then
23806   echo $ECHO_N "(cached) $ECHO_C" >&6
23807 else
23808   cat >conftest.$ac_ext <<_ACEOF
23809 #line 23809 "configure"
23810 #include "confdefs.h"
23811 $ac_includes_default
23812 int
23813 main (void)
23814 {
23815 if ((wchar_t *) 0)
23816   return 0;
23817 if (sizeof (wchar_t))
23818   return 0;
23819   ;
23820   return 0;
23821 }
23822 _ACEOF
23823 rm -f conftest.$ac_objext
23824 if { (eval echo "$as_me:23824: \"$ac_compile\"") >&5
23825   (eval $ac_compile) 2>&5
23826   ac_status=$?
23827   echo "$as_me:23827: \$? = $ac_status" >&5
23828   (exit $ac_status); } &&
23829          { ac_try='test -s conftest.$ac_objext'
23830   { (eval echo "$as_me:23830: \"$ac_try\"") >&5
23831   (eval $ac_try) 2>&5
23832   ac_status=$?
23833   echo "$as_me:23833: \$? = $ac_status" >&5
23834   (exit $ac_status); }; }; then
23835   ac_cv_type_wchar_t=yes
23836 else
23837   echo "$as_me: failed program was:" >&5
23838 cat conftest.$ac_ext >&5
23839 ac_cv_type_wchar_t=no
23840 fi
23841 rm -f conftest.$ac_objext conftest.$ac_ext
23842 fi
23843 echo "$as_me:23843: result: $ac_cv_type_wchar_t" >&5
23844 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
23845
23846 echo "$as_me:23846: checking size of wchar_t" >&5
23847 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
23848 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
23849   echo $ECHO_N "(cached) $ECHO_C" >&6
23850 else
23851   if test "$ac_cv_type_wchar_t" = yes; then
23852   if test "$cross_compiling" = yes; then
23853   # Depending upon the size, compute the lo and hi bounds.
23854 cat >conftest.$ac_ext <<_ACEOF
23855 #line 23855 "configure"
23856 #include "confdefs.h"
23857 $ac_includes_default
23858 int
23859 main (void)
23860 {
23861 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
23862   ;
23863   return 0;
23864 }
23865 _ACEOF
23866 rm -f conftest.$ac_objext
23867 if { (eval echo "$as_me:23867: \"$ac_compile\"") >&5
23868   (eval $ac_compile) 2>&5
23869   ac_status=$?
23870   echo "$as_me:23870: \$? = $ac_status" >&5
23871   (exit $ac_status); } &&
23872          { ac_try='test -s conftest.$ac_objext'
23873   { (eval echo "$as_me:23873: \"$ac_try\"") >&5
23874   (eval $ac_try) 2>&5
23875   ac_status=$?
23876   echo "$as_me:23876: \$? = $ac_status" >&5
23877   (exit $ac_status); }; }; then
23878   ac_lo=0 ac_mid=0
23879   while :; do
23880     cat >conftest.$ac_ext <<_ACEOF
23881 #line 23881 "configure"
23882 #include "confdefs.h"
23883 $ac_includes_default
23884 int
23885 main (void)
23886 {
23887 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23888   ;
23889   return 0;
23890 }
23891 _ACEOF
23892 rm -f conftest.$ac_objext
23893 if { (eval echo "$as_me:23893: \"$ac_compile\"") >&5
23894   (eval $ac_compile) 2>&5
23895   ac_status=$?
23896   echo "$as_me:23896: \$? = $ac_status" >&5
23897   (exit $ac_status); } &&
23898          { ac_try='test -s conftest.$ac_objext'
23899   { (eval echo "$as_me:23899: \"$ac_try\"") >&5
23900   (eval $ac_try) 2>&5
23901   ac_status=$?
23902   echo "$as_me:23902: \$? = $ac_status" >&5
23903   (exit $ac_status); }; }; then
23904   ac_hi=$ac_mid; break
23905 else
23906   echo "$as_me: failed program was:" >&5
23907 cat conftest.$ac_ext >&5
23908 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
23909 fi
23910 rm -f conftest.$ac_objext conftest.$ac_ext
23911   done
23912 else
23913   echo "$as_me: failed program was:" >&5
23914 cat conftest.$ac_ext >&5
23915 ac_hi=-1 ac_mid=-1
23916   while :; do
23917     cat >conftest.$ac_ext <<_ACEOF
23918 #line 23918 "configure"
23919 #include "confdefs.h"
23920 $ac_includes_default
23921 int
23922 main (void)
23923 {
23924 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
23925   ;
23926   return 0;
23927 }
23928 _ACEOF
23929 rm -f conftest.$ac_objext
23930 if { (eval echo "$as_me:23930: \"$ac_compile\"") >&5
23931   (eval $ac_compile) 2>&5
23932   ac_status=$?
23933   echo "$as_me:23933: \$? = $ac_status" >&5
23934   (exit $ac_status); } &&
23935          { ac_try='test -s conftest.$ac_objext'
23936   { (eval echo "$as_me:23936: \"$ac_try\"") >&5
23937   (eval $ac_try) 2>&5
23938   ac_status=$?
23939   echo "$as_me:23939: \$? = $ac_status" >&5
23940   (exit $ac_status); }; }; then
23941   ac_lo=$ac_mid; break
23942 else
23943   echo "$as_me: failed program was:" >&5
23944 cat conftest.$ac_ext >&5
23945 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
23946 fi
23947 rm -f conftest.$ac_objext conftest.$ac_ext
23948   done
23949 fi
23950 rm -f conftest.$ac_objext conftest.$ac_ext
23951 # Binary search between lo and hi bounds.
23952 while test "x$ac_lo" != "x$ac_hi"; do
23953   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23954   cat >conftest.$ac_ext <<_ACEOF
23955 #line 23955 "configure"
23956 #include "confdefs.h"
23957 $ac_includes_default
23958 int
23959 main (void)
23960 {
23961 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
23962   ;
23963   return 0;
23964 }
23965 _ACEOF
23966 rm -f conftest.$ac_objext
23967 if { (eval echo "$as_me:23967: \"$ac_compile\"") >&5
23968   (eval $ac_compile) 2>&5
23969   ac_status=$?
23970   echo "$as_me:23970: \$? = $ac_status" >&5
23971   (exit $ac_status); } &&
23972          { ac_try='test -s conftest.$ac_objext'
23973   { (eval echo "$as_me:23973: \"$ac_try\"") >&5
23974   (eval $ac_try) 2>&5
23975   ac_status=$?
23976   echo "$as_me:23976: \$? = $ac_status" >&5
23977   (exit $ac_status); }; }; then
23978   ac_hi=$ac_mid
23979 else
23980   echo "$as_me: failed program was:" >&5
23981 cat conftest.$ac_ext >&5
23982 ac_lo=`expr $ac_mid + 1`
23983 fi
23984 rm -f conftest.$ac_objext conftest.$ac_ext
23985 done
23986 ac_cv_sizeof_wchar_t=$ac_lo
23987 else
23988   if test "$cross_compiling" = yes; then
23989   { { echo "$as_me:23989: error: cannot run test program while cross compiling" >&5
23990 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23991    { (exit 1); exit 1; }; }
23992 else
23993   cat >conftest.$ac_ext <<_ACEOF
23994 #line 23994 "configure"
23995 #include "confdefs.h"
23996 $ac_includes_default
23997 int
23998 main (void)
23999 {
24000 FILE *f = fopen ("conftest.val", "w");
24001 if (!f)
24002   $ac_main_return (1);
24003 fprintf (f, "%d", (sizeof (wchar_t)));
24004 fclose (f);
24005   ;
24006   return 0;
24007 }
24008 _ACEOF
24009 rm -f conftest$ac_exeext
24010 if { (eval echo "$as_me:24010: \"$ac_link\"") >&5
24011   (eval $ac_link) 2>&5
24012   ac_status=$?
24013   echo "$as_me:24013: \$? = $ac_status" >&5
24014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24015   { (eval echo "$as_me:24015: \"$ac_try\"") >&5
24016   (eval $ac_try) 2>&5
24017   ac_status=$?
24018   echo "$as_me:24018: \$? = $ac_status" >&5
24019   (exit $ac_status); }; }; then
24020   ac_cv_sizeof_wchar_t=`cat conftest.val`
24021 else
24022   echo "$as_me: program exited with status $ac_status" >&5
24023 echo "$as_me: failed program was:" >&5
24024 cat conftest.$ac_ext >&5
24025 fi
24026 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24027 fi
24028 fi
24029 rm -f conftest.val
24030 else
24031   ac_cv_sizeof_wchar_t=0
24032 fi
24033 fi
24034 echo "$as_me:24034: result: $ac_cv_sizeof_wchar_t" >&5
24035 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
24036 cat >>confdefs.h <<EOF
24037 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
24038 EOF
24039
24040 fi
24041
24042 ### Construct the ncurses library-subsets, if any, from this set of keywords:
24043 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
24044 ###
24045 ### ticlib modules may be a separate library, otherwise contained in termlib.
24046 ### termlib modules may be a separate library, otherwise contained in ncurses.
24047 ###
24048 ### The of "+" or " " between the tokens controls the way the script
24049 ### chooses to split module lists into libraries.
24050 ###
24051 ### (see CF_LIB_RULES).
24052 echo "$as_me:24052: checking for library subsets" >&5
24053 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
24054 LIB_SUBSETS=
24055
24056 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
24057         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
24058         if test "$with_ticlib" != no ; then
24059                 LIB_SUBSETS="${LIB_SUBSETS} "
24060         else
24061                 LIB_SUBSETS="${LIB_SUBSETS}+"
24062         fi
24063 fi
24064
24065 LIB_SUBSETS="${LIB_SUBSETS}termlib"
24066 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
24067
24068 if test "$with_termlib" != no ; then
24069         LIB_SUBSETS="${LIB_SUBSETS} "
24070 else
24071         LIB_SUBSETS="${LIB_SUBSETS}+"
24072 fi
24073
24074 LIB_SUBSETS="${LIB_SUBSETS}base"
24075
24076 # Most term-driver calls are to tinfo, but some like init_pair are to the
24077 # base library (so it resides in base).
24078 if test "$with_term_driver" != no ; then
24079         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
24080         case $cf_cv_system_name in
24081         (*mingw32*|*mingw64*)
24082                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
24083                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
24084                 ;;
24085         (*)
24086                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
24087                 ;;
24088         esac
24089 fi
24090
24091 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
24092 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
24093
24094 echo "$as_me:24094: result: $LIB_SUBSETS" >&5
24095 echo "${ECHO_T}$LIB_SUBSETS" >&6
24096
24097 ### Construct the list of include-directories to be generated
24098
24099 if test "$srcdir" != "."; then
24100         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
24101 fi
24102 CPPFLAGS="-I../include $CPPFLAGS"
24103 if test "$srcdir" != "."; then
24104         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
24105 fi
24106 CPPFLAGS="-I. $CPPFLAGS"
24107
24108 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
24109 if test "$srcdir" != "."; then
24110         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
24111 fi
24112 if test "$GCC" != yes; then
24113         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24114 elif test "$includedir" != "/usr/include"; then
24115         if test "$includedir" = '${prefix}/include' ; then
24116                 if test x$prefix != x/usr ; then
24117                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24118                 fi
24119         else
24120                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
24121         fi
24122 fi
24123
24124 ### Build up pieces for makefile rules
24125 echo "$as_me:24125: checking default library suffix" >&5
24126 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
24127
24128         case $DFT_LWR_MODEL in
24129         (libtool) DFT_ARG_SUFFIX=''   ;;
24130         (normal)  DFT_ARG_SUFFIX=''   ;;
24131         (debug)   DFT_ARG_SUFFIX='_g' ;;
24132         (profile) DFT_ARG_SUFFIX='_p' ;;
24133         (shared)  DFT_ARG_SUFFIX=''   ;;
24134         esac
24135         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
24136 echo "$as_me:24136: result: $DFT_ARG_SUFFIX" >&5
24137 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
24138
24139 echo "$as_me:24139: checking default library-dependency suffix" >&5
24140 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
24141
24142         case X$DFT_LWR_MODEL in
24143         (Xlibtool)
24144                 DFT_LIB_SUFFIX='.la'
24145                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24146                 ;;
24147         (Xdebug)
24148                 DFT_LIB_SUFFIX='_g.a'
24149                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24150                 ;;
24151         (Xprofile)
24152                 DFT_LIB_SUFFIX='_p.a'
24153                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24154                 ;;
24155         (Xshared)
24156                 case $cf_cv_system_name in
24157                 (aix[5-7]*)
24158                         DFT_LIB_SUFFIX='.so'
24159                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24160                         ;;
24161                 (cygwin*|msys*|mingw*)
24162                         DFT_LIB_SUFFIX='.dll'
24163                         DFT_DEP_SUFFIX='.dll.a'
24164                         ;;
24165                 (darwin*)
24166                         DFT_LIB_SUFFIX='.dylib'
24167                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24168                         ;;
24169                 (hpux*)
24170                         case $target in
24171                         (ia64*)
24172                                 DFT_LIB_SUFFIX='.so'
24173                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24174                                 ;;
24175                         (*)
24176                                 DFT_LIB_SUFFIX='.sl'
24177                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24178                                 ;;
24179                         esac
24180                         ;;
24181                 (*)
24182                         DFT_LIB_SUFFIX='.so'
24183                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24184                         ;;
24185                 esac
24186                 ;;
24187         (*)
24188                 DFT_LIB_SUFFIX='.a'
24189                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
24190                 ;;
24191         esac
24192         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24193         then
24194                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
24195                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
24196         fi
24197 echo "$as_me:24197: result: $DFT_DEP_SUFFIX" >&5
24198 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
24199
24200 echo "$as_me:24200: checking default object directory" >&5
24201 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
24202
24203         case $DFT_LWR_MODEL in
24204         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
24205         (normal)  DFT_OBJ_SUBDIR='objects' ;;
24206         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
24207         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
24208         (shared)
24209                 case $cf_cv_system_name in
24210                 (cygwin|msys)
24211                         DFT_OBJ_SUBDIR='objects' ;;
24212                 (*)
24213                         DFT_OBJ_SUBDIR='obj_s' ;;
24214                 esac
24215         esac
24216 echo "$as_me:24216: result: $DFT_OBJ_SUBDIR" >&5
24217 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
24218
24219 if test "x$cf_with_cxx" = xyes ; then
24220 echo "$as_me:24220: checking c++ library-dependency suffix" >&5
24221 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
24222 if test "$with_libtool" != "no"; then
24223         # libtool thinks it can make c++ shared libraries (perhaps only g++)
24224         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24225 elif test "$with_shared_cxx" != "no"; then
24226         # also for g++ users...
24227         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
24228 else
24229         # we normally make a static library because C/C++ library rules differ
24230
24231         case Xnormal in
24232         (Xlibtool)
24233                 CXX_LIB_SUFFIX='.la'
24234                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24235                 ;;
24236         (Xdebug)
24237                 CXX_LIB_SUFFIX='_g.a'
24238                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24239                 ;;
24240         (Xprofile)
24241                 CXX_LIB_SUFFIX='_p.a'
24242                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24243                 ;;
24244         (Xshared)
24245                 case $cf_cv_system_name in
24246                 (aix[5-7]*)
24247                         CXX_LIB_SUFFIX='.so'
24248                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24249                         ;;
24250                 (cygwin*|msys*|mingw*)
24251                         CXX_LIB_SUFFIX='.dll'
24252                         CXX_DEP_SUFFIX='.dll.a'
24253                         ;;
24254                 (darwin*)
24255                         CXX_LIB_SUFFIX='.dylib'
24256                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24257                         ;;
24258                 (hpux*)
24259                         case $target in
24260                         (ia64*)
24261                                 CXX_LIB_SUFFIX='.so'
24262                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24263                                 ;;
24264                         (*)
24265                                 CXX_LIB_SUFFIX='.sl'
24266                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24267                                 ;;
24268                         esac
24269                         ;;
24270                 (*)
24271                         CXX_LIB_SUFFIX='.so'
24272                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24273                         ;;
24274                 esac
24275                 ;;
24276         (*)
24277                 CXX_LIB_SUFFIX='.a'
24278                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
24279                 ;;
24280         esac
24281         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
24282         then
24283                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
24284                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
24285         fi
24286
24287 fi
24288 echo "$as_me:24288: result: $CXX_LIB_SUFFIX" >&5
24289 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
24290
24291 fi
24292
24293 # do not want -ldl in build except as needed for -lncurses dependency
24294 if test "x$with_dlsym" = xyes ; then
24295 if test $DFT_LWR_MODEL = shared || \
24296    test $DFT_LWR_MODEL = libtool ; then
24297
24298 # remove dl library from $LIBS
24299 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
24300
24301 fi
24302 fi
24303 ### Set up low-level terminfo dependencies for makefiles.
24304
24305 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
24306 # do not need libdl
24307 TICS_LIST=
24308 if test "x$with_dlsym" = xyes ; then
24309
24310 # remove dl library from $SHLIB_LIST
24311 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
24312
24313 fi
24314
24315 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
24316 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
24317 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
24318 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
24319 then
24320         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
24321 fi
24322
24323 if test "$with_ticlib" != no ; then
24324
24325         if test "x$with_ticlib" != xyes ; then
24326                 TICS_NAME=$with_ticlib
24327                 TICS_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24328                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24329                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24330                 TICS_LIB_SUFFIX="${with_ticlib}"
24331         else
24332                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
24333                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
24334                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
24335                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
24336         fi
24337         TICS_LDFLAGS="-L${LIB_DIR}"
24338         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
24339 else
24340         TICS_SUFFIX=${DFT_LIB_SUFFIX}
24341         TICS_LDFLAGS="-L${LIB_DIR}"
24342         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24343 fi
24344
24345 if test "$with_termlib" != no ; then
24346
24347         if test "x$with_termlib" != xyes ; then
24348                 TINFO_NAME=$with_termlib
24349                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${USE_LIB_SUFFIX}//"`"
24350                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${USE_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24351                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
24352                 TINFO_LIB_SUFFIX="${with_termlib}"
24353         else
24354                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24355                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
24356                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
24357                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
24358         fi
24359
24360         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24361         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
24362         if test "$DFT_LWR_MODEL" = "libtool"; then
24363                 TEST_ARGS="${TEST_DEPS}"
24364                 TEST_ARG2="${TEST_DEP2}"
24365                 TINFO_LDFLAGS="-L${LIB_DIR}"
24366                 TINFO_LIBS="$TEST_ARGS"
24367                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
24368                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
24369         else
24370                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
24371                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
24372                 if test "x$with_term_driver" != xno ; then
24373                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24374                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
24375                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24376                 else
24377                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24378                         TINFO_LIBS="$TEST_ARGS"
24379                 fi
24380                 TINFO_LDFLAGS="-L${LIB_DIR}"
24381                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
24382         fi
24383 else
24384         # the next lines are needed for linking libtic over libncurses
24385         TINFO_NAME=${LIB_NAME}
24386         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
24387         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
24388         if test "x$with_tic_depends" = xyes ; then
24389                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
24390         else
24391                 TICS_LIST="$SHLIB_LIST"
24392         fi
24393
24394         TINFO_LDFLAGS="-L${LIB_DIR}"
24395         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
24396 fi
24397
24398 if test "$DFT_LWR_MODEL" = shared ; then
24399         case $cf_cv_system_name in
24400         (cygwin*|msys*)
24401                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
24402                 TINFO_SUFFIX=.dll
24403                 ;;
24404         esac
24405 fi
24406
24407 if test "x$with_dlsym" = xyes ; then
24408
24409 # remove dl library from $TICS_LIST
24410 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
24411
24412 fi
24413
24414 if test "$DFT_LWR_MODEL" = "libtool"; then
24415         OBJEXT=lo
24416 fi
24417
24418 # needed for Ada95
24419 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
24420
24421 case $DFT_LWR_MODEL in
24422 (normal|debug|profile)
24423
24424 if test "$GCC" = yes ; then
24425         case $cf_cv_system_name in
24426         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
24427                 LDFLAGS_STATIC=
24428                 LDFLAGS_SHARED=
24429                 ;;
24430         (*)     # normally, except when broken
24431                 LDFLAGS_STATIC=-static
24432                 LDFLAGS_SHARED=-dynamic
24433                 ;;
24434         esac
24435 else
24436         case $cf_cv_system_name in
24437         (aix[4-7]*)     # from ld manpage
24438                 LDFLAGS_STATIC=-bstatic
24439                 LDFLAGS_SHARED=-bdynamic
24440                 ;;
24441         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
24442                 # We could also use just "archive" and "shared".
24443                 LDFLAGS_STATIC=-Wl,-a,archive_shared
24444                 LDFLAGS_SHARED=-Wl,-a,shared_archive
24445                 ;;
24446         (irix*)         # from ld manpage IRIX64
24447                 LDFLAGS_STATIC=-Bstatic
24448                 LDFLAGS_SHARED=-Bdynamic
24449                 ;;
24450         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
24451                 # alternative "-oldstyle_liblookup" (not in cc manpage)
24452                 LDFLAGS_STATIC=-noso
24453                 LDFLAGS_SHARED=-so_archive
24454                 ;;
24455         (solaris2*)
24456                 LDFLAGS_STATIC=-Bstatic
24457                 LDFLAGS_SHARED=-Bdynamic
24458                 ;;
24459         esac
24460 fi
24461
24462 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
24463 then
24464         echo "$as_me:24464: checking if linker supports switching between static/dynamic" >&5
24465 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
24466
24467         rm -f libconftest.a
24468         cat >conftest.$ac_ext <<EOF
24469 #line 24469 "configure"
24470 #include <stdio.h>
24471 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
24472 EOF
24473         if { (eval echo "$as_me:24473: \"$ac_compile\"") >&5
24474   (eval $ac_compile) 2>&5
24475   ac_status=$?
24476   echo "$as_me:24476: \$? = $ac_status" >&5
24477   (exit $ac_status); } ; then
24478                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
24479                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
24480         fi
24481         rm -f conftest.*
24482
24483         cf_save_LIBS="$LIBS"
24484
24485         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
24486         cat >conftest.$ac_ext <<_ACEOF
24487 #line 24487 "configure"
24488 #include "confdefs.h"
24489
24490 #line 24490 "configure"
24491 #include <stdio.h>
24492 int cf_ldflags_static(FILE *fp);
24493
24494 int
24495 main (void)
24496 {
24497
24498         return cf_ldflags_static(stdin);
24499
24500   ;
24501   return 0;
24502 }
24503 _ACEOF
24504 rm -f conftest.$ac_objext conftest$ac_exeext
24505 if { (eval echo "$as_me:24505: \"$ac_link\"") >&5
24506   (eval $ac_link) 2>&5
24507   ac_status=$?
24508   echo "$as_me:24508: \$? = $ac_status" >&5
24509   (exit $ac_status); } &&
24510          { ac_try='test -s conftest$ac_exeext'
24511   { (eval echo "$as_me:24511: \"$ac_try\"") >&5
24512   (eval $ac_try) 2>&5
24513   ac_status=$?
24514   echo "$as_me:24514: \$? = $ac_status" >&5
24515   (exit $ac_status); }; }; then
24516
24517         # some linkers simply ignore the -dynamic
24518         case x`file conftest$ac_exeext 2>/dev/null` in
24519         (*static*)
24520                 cf_ldflags_static=no
24521                 ;;
24522         (*)
24523                 cf_ldflags_static=yes
24524                 ;;
24525         esac
24526
24527 else
24528   echo "$as_me: failed program was:" >&5
24529 cat conftest.$ac_ext >&5
24530 cf_ldflags_static=no
24531 fi
24532 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24533
24534         rm -f libconftest.*
24535         LIBS="$cf_save_LIBS"
24536
24537         echo "$as_me:24537: result: $cf_ldflags_static" >&5
24538 echo "${ECHO_T}$cf_ldflags_static" >&6
24539
24540         if test $cf_ldflags_static != yes
24541         then
24542                 LDFLAGS_STATIC=
24543                 LDFLAGS_SHARED=
24544         fi
24545 else
24546         LDFLAGS_STATIC=
24547         LDFLAGS_SHARED=
24548 fi
24549
24550         ;;
24551 esac
24552
24553 echo "$as_me:24553: checking where we will install curses.h" >&5
24554 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
24555
24556 includesubdir=
24557 if test "$with_overwrite" = no && \
24558  ( test "x$includedir" = 'x${prefix}/include' || \
24559    test "x$includedir" = "x${prefix}/include" )
24560 then
24561         includesubdir="/ncurses${USE_LIB_SUFFIX}"
24562 fi
24563 echo "$as_me:24563: result: ${includedir}${includesubdir}" >&5
24564 echo "${ECHO_T}${includedir}${includesubdir}" >&6
24565
24566 ### Resolve a conflict between normal and wide-curses by forcing applications
24567 ### that will need libutf8 to add it to their configure script.
24568 if test "$with_overwrite" != no ; then
24569 if test "$NCURSES_LIBUTF8" = 1 ; then
24570         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
24571         { echo "$as_me:24571: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
24572 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
24573 fi
24574 fi
24575 WITH_OVERWRITE=$with_overwrite
24576
24577 # used to separate tack out of the tree
24578 NCURSES_TREE=
24579
24580 ### predefined stuff for the test programs
24581
24582 cat >>confdefs.h <<\EOF
24583 #define HAVE_SLK_COLOR 1
24584 EOF
24585
24586 ### Construct the list of subdirectories for which we'll customize makefiles
24587 ### with the appropriate compile-rules.
24588
24589 echo "$as_me:24589: checking for src modules" >&5
24590 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
24591
24592 # dependencies and linker-arguments for test-programs
24593 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
24594 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
24595 if test "$DFT_LWR_MODEL" = "libtool"; then
24596         TEST_ARGS="${TEST_DEPS}"
24597         TEST_ARG2="${TEST_DEP2}"
24598 else
24599         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
24600         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
24601 fi
24602
24603 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
24604 cf_cv_src_modules=
24605 for cf_dir in $modules_to_build
24606 do
24607         if test -f $srcdir/$cf_dir/modules; then
24608
24609                 # We may/may not have tack in the distribution, though the
24610                 # makefile is.
24611                 if test $cf_dir = tack ; then
24612                         if test "x$cf_with_tack" != "xyes"; then
24613                                 continue
24614                         fi
24615                 fi
24616
24617                 if test -z "$cf_cv_src_modules"; then
24618                         cf_cv_src_modules=$cf_dir
24619                 else
24620                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
24621                 fi
24622
24623                 # Make the ncurses_cfg.h file record the library interface files as
24624                 # well.  These are header files that are the same name as their
24625                 # directory.  Ncurses is the only library that does not follow
24626                 # that pattern.
24627                 if test $cf_dir = tack ; then
24628                         continue
24629                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
24630
24631 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24632
24633                         cat >>confdefs.h <<EOF
24634 #define HAVE_${cf_have_include}_H 1
24635 EOF
24636
24637                         cat >>confdefs.h <<EOF
24638 #define HAVE_LIB${cf_have_include} 1
24639 EOF
24640
24641                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
24642                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
24643                         if test "$DFT_LWR_MODEL" = "libtool"; then
24644                                 TEST_ARGS="${TEST_DEPS}"
24645                                 TEST_ARG2="${TEST_DEP2}"
24646                         else
24647                                 TEST_ARGS="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARGS"
24648                                 TEST_ARG2="-l${cf_dir}${USE_ARG_SUFFIX} $TEST_ARG2"
24649                         fi
24650                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
24651                 fi
24652         fi
24653 done
24654 echo "$as_me:24654: result: $cf_cv_src_modules" >&5
24655 echo "${ECHO_T}$cf_cv_src_modules" >&6
24656
24657 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
24658 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
24659
24660 SRC_SUBDIRS=
24661 if test "x$cf_with_manpages" != xno ; then
24662         SRC_SUBDIRS="$SRC_SUBDIRS man"
24663 fi
24664 SRC_SUBDIRS="$SRC_SUBDIRS include"
24665 for cf_dir in $cf_cv_src_modules
24666 do
24667         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
24668 done
24669 if test "x$cf_with_tests" != "xno" ; then
24670         SRC_SUBDIRS="$SRC_SUBDIRS test"
24671 fi
24672 # always make this, to install the ncurses-config script
24673 SRC_SUBDIRS="$SRC_SUBDIRS misc"
24674 if test "$cf_with_cxx_binding" != no; then
24675         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
24676         SRC_SUBDIRS="$SRC_SUBDIRS c++"
24677 fi
24678
24679 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
24680 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
24681
24682 ADA_SUBDIRS=
24683 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
24684         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
24685         ADA_SUBDIRS="gen src"
24686         if test "x$cf_with_tests" != "xno" ; then
24687                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
24688         fi
24689 fi
24690
24691 SUB_MAKEFILES=
24692 for cf_dir in $SRC_SUBDIRS
24693 do
24694         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
24695 done
24696
24697 if test -n "$ADA_SUBDIRS"; then
24698         for cf_dir in $ADA_SUBDIRS
24699         do
24700                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
24701         done
24702
24703 fi
24704
24705 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
24706    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
24707    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
24708 fi
24709
24710 DIRS_TO_MAKE="lib"
24711 for cf_item in $cf_list_models
24712 do
24713
24714         case $cf_item in
24715         (libtool) cf_subdir='obj_lo'  ;;
24716         (normal)  cf_subdir='objects' ;;
24717         (debug)   cf_subdir='obj_g' ;;
24718         (profile) cf_subdir='obj_p' ;;
24719         (shared)
24720                 case $cf_cv_system_name in
24721                 (cygwin|msys)
24722                         cf_subdir='objects' ;;
24723                 (*)
24724                         cf_subdir='obj_s' ;;
24725                 esac
24726         esac
24727
24728         for cf_item2 in $DIRS_TO_MAKE
24729         do
24730                 test $cf_item2 = $cf_subdir && break
24731         done
24732         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
24733 done
24734 for cf_dir in $DIRS_TO_MAKE
24735 do
24736         test ! -d $cf_dir && mkdir $cf_dir
24737 done
24738
24739 # symbols that differ when compiling Ada95 by itself.
24740 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
24741
24742 # values to use as strings
24743
24744 cat >>confdefs.h <<EOF
24745 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
24746 EOF
24747
24748 cat >>confdefs.h <<EOF
24749 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
24750 EOF
24751
24752 ### Now that we're done running tests, add the compiler-warnings, if any
24753
24754 cf_fix_cppflags=no
24755 cf_new_cflags=
24756 cf_new_cppflags=
24757 cf_new_extra_cppflags=
24758
24759 for cf_add_cflags in $EXTRA_CFLAGS
24760 do
24761 case $cf_fix_cppflags in
24762 (no)
24763         case $cf_add_cflags in
24764         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
24765                 case $cf_add_cflags in
24766                 (-D*)
24767                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
24768
24769                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24770                                 && test -z "${cf_tst_cflags}" \
24771                                 && cf_fix_cppflags=yes
24772
24773                         if test $cf_fix_cppflags = yes ; then
24774
24775         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24776         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24777
24778                                 continue
24779                         elif test "${cf_tst_cflags}" = "\"'" ; then
24780
24781         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24782         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24783
24784                                 continue
24785                         fi
24786                         ;;
24787                 esac
24788                 case "$CPPFLAGS" in
24789                 (*$cf_add_cflags)
24790                         ;;
24791                 (*)
24792                         case $cf_add_cflags in
24793                         (-D*)
24794                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
24795
24796 CPPFLAGS=`echo "$CPPFLAGS" | \
24797         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
24798                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
24799
24800                                 ;;
24801                         esac
24802
24803         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
24804         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
24805
24806                         ;;
24807                 esac
24808                 ;;
24809         (*)
24810
24811         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
24812         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
24813
24814                 ;;
24815         esac
24816         ;;
24817 (yes)
24818
24819         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
24820         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
24821
24822         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
24823
24824         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
24825                 && test -z "${cf_tst_cflags}" \
24826                 && cf_fix_cppflags=no
24827         ;;
24828 esac
24829 done
24830
24831 if test -n "$cf_new_cflags" ; then
24832
24833         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
24834         CFLAGS="${CFLAGS}$cf_new_cflags"
24835
24836 fi
24837
24838 if test -n "$cf_new_cppflags" ; then
24839
24840         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24841         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24842
24843 fi
24844
24845 if test -n "$cf_new_extra_cppflags" ; then
24846
24847         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24848         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24849
24850 fi
24851
24852 ### Define substitutions for header files to avoid name-pollution
24853
24854 if test "x$cf_cv_have_tcgetattr" = xyes ; then
24855         HAVE_TCGETATTR=1
24856 else
24857         HAVE_TCGETATTR=0
24858 fi
24859
24860 if test "x$ac_cv_header_stdint_h" = xyes ; then
24861         HAVE_STDINT_H=1
24862 else
24863         HAVE_STDINT_H=0
24864 fi
24865
24866 if test "x$ac_cv_header_termio_h" = xyes ; then
24867         HAVE_TERMIO_H=1
24868 else
24869         HAVE_TERMIO_H=0
24870 fi
24871
24872 if test "x$ac_cv_header_termios_h" = xyes ; then
24873         HAVE_TERMIOS_H=1
24874 else
24875         HAVE_TERMIOS_H=0
24876 fi
24877
24878 ################################################################################
24879 test "x$use_database" = xyes && \
24880 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
24881
24882 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
24883 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
24884
24885 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
24886 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
24887 fi
24888
24889 # Extract the first word of "tic", so it can be a program name with args.
24890 set dummy tic; ac_word=$2
24891 echo "$as_me:24891: checking for $ac_word" >&5
24892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24893 if test "${ac_cv_path_TIC_PATH+set}" = set; then
24894   echo $ECHO_N "(cached) $ECHO_C" >&6
24895 else
24896   case $TIC_PATH in
24897   [\\/]* | ?:[\\/]*)
24898   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
24899   ;;
24900   *)
24901   ac_save_IFS=$IFS; IFS=$ac_path_separator
24902 ac_dummy="$PATH:/usr/local/ncurses/bin"
24903 for ac_dir in $ac_dummy; do
24904   IFS=$ac_save_IFS
24905   test -z "$ac_dir" && ac_dir=.
24906   if $as_executable_p "$ac_dir/$ac_word"; then
24907    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
24908    echo "$as_me:24908: found $ac_dir/$ac_word" >&5
24909    break
24910 fi
24911 done
24912
24913   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
24914   ;;
24915 esac
24916 fi
24917 TIC_PATH=$ac_cv_path_TIC_PATH
24918
24919 if test -n "$TIC_PATH"; then
24920   echo "$as_me:24920: result: $TIC_PATH" >&5
24921 echo "${ECHO_T}$TIC_PATH" >&6
24922 else
24923   echo "$as_me:24923: result: no" >&5
24924 echo "${ECHO_T}no" >&6
24925 fi
24926
24927 if test -n "$FALLBACK_LIST"
24928 then
24929         if test "$TIC_PATH" = unknown
24930         then
24931                 { echo "$as_me:24931: WARNING: no tic program found for fallbacks" >&5
24932 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
24933         fi
24934 fi
24935
24936 if test "x$cf_with_tests" != xno ; then
24937         MAKE_TESTS=
24938 else
24939         MAKE_TESTS="#"
24940 fi
24941
24942 ADAHTML_DIR=../../doc/html/ada
24943
24944 # these could be configurable, but are not currently
24945 PANEL_NAME=panel
24946 MENU_NAME=menu
24947 FORM_NAME=form
24948 CXX_NAME=ncurses++
24949
24950 # workaround for OS/2 (20151017)
24951 case $cf_cv_system_name in
24952 (os2*)
24953         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
24954         ;;
24955 (*)
24956         LIBTOOL_OPTS_CXX=
24957         ;;
24958 esac
24959
24960 # workaround for g++ versus Solaris (20131116)
24961 case $cf_cv_system_name in
24962 (solaris2*)
24963         case "x$CPPFLAGS" in
24964         (*-D_XOPEN_SOURCE_EXTENDED*)
24965                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
24966
24967 echo "${as_me:-configure}:24967: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
24968
24969                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
24970                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
24971                 ;;
24972         esac
24973         ;;
24974 esac
24975
24976 # Help to automatically enable the extended curses features when using either
24977 # the *-config or the ".pc" files by adding defines.
24978 echo "$as_me:24978: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
24979 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
24980 PKG_CFLAGS=
24981 for cf_loop1 in $CPPFLAGS_after_XOPEN
24982 do
24983         cf_found=no
24984         for cf_loop2 in $CPPFLAGS_before_XOPEN
24985         do
24986                 if test "x$cf_loop1" = "x$cf_loop2"
24987                 then
24988                         cf_found=yes
24989                         break
24990                 fi
24991         done
24992         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
24993 done
24994 echo "$as_me:24994: result: $PKG_CFLAGS" >&5
24995 echo "${ECHO_T}$PKG_CFLAGS" >&6
24996
24997 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
24998 case "x$NCURSES_OSPEED" in
24999 (*short*)
25000         cf_compatible=1
25001         ;;
25002 (*)
25003         cf_compatible=0
25004         ;;
25005 esac
25006
25007 cat >>confdefs.h <<EOF
25008 #define NCURSES_OSPEED_COMPAT $cf_compatible
25009 EOF
25010
25011 case "x$cf_cv_typeof_chtype" in
25012 (xshort|xint|xlong)
25013         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
25014         ;;
25015 esac
25016
25017 case "x$cf_cv_typeof_mmask_t" in
25018 (xshort|xint|xlong)
25019         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
25020         ;;
25021 esac
25022
25023 # substitute into misc/Makefile to suppress
25024 # (un)install.data from the
25025 # (un)install rules.
25026 if test "x$cf_with_db_install" = "xno"; then
25027         MISC_INSTALL_DATA=
25028         MISC_UNINSTALL_DATA=
25029 else
25030         MISC_INSTALL_DATA=install.data
25031         MISC_UNINSTALL_DATA=uninstall.data
25032 fi
25033
25034 SUB_SCRIPTS=
25035
25036 if test -n "$PACKAGE"
25037 then
25038         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
25039         export PACKAGE
25040         echo "package: $PACKAGE"
25041 fi
25042
25043 UNALTERED_SYMS=
25044 cf_filter_syms=no
25045
25046 if test -n "$RESULTING_SYMS"
25047 then
25048         cf_filter_syms=$cf_dft_filter_syms
25049         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
25050
25051 echo "${as_me:-configure}:25051: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
25052
25053 fi
25054
25055 if test "x$WILDCARD_SYMS" = xno
25056 then
25057         cf_filter_syms=yes
25058 fi
25059
25060 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
25061
25062 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
25063 if test $cf_filter_syms = yes
25064 then
25065         RESULTING_SYMS=resulting.map
25066 fi
25067
25068 if test "x$cross_compiling" = xyes ; then
25069         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
25070         CHECK_BUILD="#"
25071 else
25072         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
25073         CHECK_BUILD=
25074 fi
25075
25076 cat >>confdefs.h <<\EOF
25077 #define HAVE_CURSES_DATA_BOOLNAMES 1
25078 EOF
25079
25080 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_SCRIPTS $SUB_MAKEFILES Makefile"
25081 ac_config_commands="$ac_config_commands default"
25082 cat >confcache <<\_ACEOF
25083 # This file is a shell script that caches the results of configure
25084 # tests run on this system so they can be shared between configure
25085 # scripts and configure runs, see configure's option --config-cache.
25086 # It is not useful on other systems.  If it contains results you don't
25087 # want to keep, you may remove or edit it.
25088 #
25089 # config.status only pays attention to the cache file if you give it
25090 # the --recheck option to rerun configure.
25091 #
25092 # `ac_cv_env_foo' variables (set or unset) will be overriden when
25093 # loading this file, other *unset* `ac_cv_foo' will be assigned the
25094 # following values.
25095
25096 _ACEOF
25097
25098 # The following way of writing the cache mishandles newlines in values,
25099 # but we know of no workaround that is simple, portable, and efficient.
25100 # So, don't put newlines in cache variables' values.
25101 # Ultrix sh set writes to stderr and can't be redirected directly,
25102 # and sets the high bit in the cache file unless we assign to the vars.
25103 {
25104   (set) 2>&1 |
25105     case `(ac_space=' '; set | grep ac_space) 2>&1` in
25106     *ac_space=\ *)
25107       # `set' does not quote correctly, so add quotes (double-quote
25108       # substitution turns \\\\ into \\, and sed turns \\ into \).
25109       sed -n \
25110         "s/'/'\\\\''/g;
25111           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
25112       ;;
25113     *)
25114       # `set' quotes correctly as required by POSIX, so do not add quotes.
25115       sed -n \
25116         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
25117       ;;
25118     esac;
25119 } |
25120   sed '
25121      t clear
25122      : clear
25123      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25124      t end
25125      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25126      : end' >>confcache
25127 if cmp -s $cache_file confcache; then :; else
25128   if test -w $cache_file; then
25129     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
25130     cat confcache >$cache_file
25131   else
25132     echo "not updating unwritable cache $cache_file"
25133   fi
25134 fi
25135 rm -f confcache
25136
25137 test "x$prefix" = xNONE && prefix=$ac_default_prefix
25138 # Let make expand exec_prefix.
25139 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
25140
25141 # VPATH may cause trouble with some makes, so we remove $(srcdir),
25142 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
25143 # trailing colons and then remove the whole line if VPATH becomes empty
25144 # (actually we leave an empty line to preserve line numbers).
25145 if test "x$srcdir" = x.; then
25146   ac_vpsub='/^[         ]*VPATH[        ]*=/{
25147 s/:*\$(srcdir):*/:/;
25148 s/:*\${srcdir}:*/:/;
25149 s/:*@srcdir@:*/:/;
25150 s/^\([^=]*=[    ]*\):*/\1/;
25151 s/:*$//;
25152 s/^[^=]*=[      ]*$//;
25153 }'
25154 fi
25155
25156 DEFS=-DHAVE_CONFIG_H
25157
25158 : ${CONFIG_STATUS=./config.status}
25159 ac_clean_files_save=$ac_clean_files
25160 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
25161 { echo "$as_me:25161: creating $CONFIG_STATUS" >&5
25162 echo "$as_me: creating $CONFIG_STATUS" >&6;}
25163 cat >$CONFIG_STATUS <<_ACEOF
25164 #! $SHELL
25165 # Generated automatically by configure.
25166 # Run this file to recreate the current configuration.
25167 # Compiler output produced by configure, useful for debugging
25168 # configure, is in config.log if it exists.
25169
25170 debug=false
25171 SHELL=\${CONFIG_SHELL-$SHELL}
25172 ac_cs_invocation="\$0 \$@"
25173
25174 _ACEOF
25175
25176 cat >>$CONFIG_STATUS <<\_ACEOF
25177 # Be Bourne compatible
25178 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25179   emulate sh
25180   NULLCMD=:
25181 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
25182   set -o posix
25183 fi
25184
25185 # Name of the executable.
25186 as_me=`echo "$0" |sed 's,.*[\\/],,'`
25187
25188 if expr a : '\(a\)' >/dev/null 2>&1; then
25189   as_expr=expr
25190 else
25191   as_expr=false
25192 fi
25193
25194 rm -f conf$$ conf$$.exe conf$$.file
25195 echo >conf$$.file
25196 if ln -s conf$$.file conf$$ 2>/dev/null; then
25197   # We could just check for DJGPP; but this test a) works b) is more generic
25198   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
25199   if test -f conf$$.exe; then
25200     # Don't use ln at all; we don't have any links
25201     as_ln_s='cp -p'
25202   else
25203     as_ln_s='ln -s'
25204   fi
25205 elif ln conf$$.file conf$$ 2>/dev/null; then
25206   as_ln_s=ln
25207 else
25208   as_ln_s='cp -p'
25209 fi
25210 rm -f conf$$ conf$$.exe conf$$.file
25211
25212 as_executable_p="test -f"
25213
25214 # Support unset when possible.
25215 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
25216   as_unset=unset
25217 else
25218   as_unset=false
25219 fi
25220
25221 # NLS nuisances.
25222 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
25223 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
25224 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
25225 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
25226 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
25227 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
25228 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
25229 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
25230
25231 # IFS
25232 # We need space, tab and new line, in precisely that order.
25233 as_nl='
25234 '
25235 IFS="   $as_nl"
25236
25237 # CDPATH.
25238 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
25239
25240 exec 6>&1
25241
25242 _ACEOF
25243
25244 # Files that config.status was made for.
25245 if test -n "$ac_config_files"; then
25246   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
25247 fi
25248
25249 if test -n "$ac_config_headers"; then
25250   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
25251 fi
25252
25253 if test -n "$ac_config_links"; then
25254   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
25255 fi
25256
25257 if test -n "$ac_config_commands"; then
25258   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
25259 fi
25260
25261 cat >>$CONFIG_STATUS <<\EOF
25262
25263 ac_cs_usage="\
25264 \`$as_me' instantiates files from templates according to the
25265 current configuration.
25266
25267 Usage: $0 [OPTIONS] [FILE]...
25268
25269   -h, --help       print this help, then exit
25270   -V, --version    print version number, then exit
25271   -d, --debug      don't remove temporary files
25272       --recheck    update $as_me by reconfiguring in the same conditions
25273   --file=FILE[:TEMPLATE]
25274                    instantiate the configuration file FILE
25275   --header=FILE[:TEMPLATE]
25276                    instantiate the configuration header FILE
25277
25278 Configuration files:
25279 $config_files
25280
25281 Configuration headers:
25282 $config_headers
25283
25284 Configuration commands:
25285 $config_commands
25286
25287 Report bugs to <dickey@invisible-island.net>."
25288 EOF
25289
25290 cat >>$CONFIG_STATUS <<EOF
25291 ac_cs_version="\\
25292 config.status
25293 configured by $0, generated by GNU Autoconf 2.52.20181006,
25294   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25295
25296 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25297 Free Software Foundation, Inc.
25298 This config.status script is free software; the Free Software Foundation
25299 gives unlimited permission to copy, distribute and modify it."
25300 srcdir=$srcdir
25301 INSTALL="$INSTALL"
25302 EOF
25303
25304 cat >>$CONFIG_STATUS <<\EOF
25305 # If no file are specified by the user, then we need to provide default
25306 # value.  By we need to know if files were specified by the user.
25307 ac_need_defaults=:
25308 while test $# != 0
25309 do
25310   case $1 in
25311   --*=*)
25312     ac_option=`expr "x$1" : 'x\([^=]*\)='`
25313     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25314     shift
25315     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25316     shift
25317     ;;
25318   -*);;
25319   *) # This is not an option, so the user has probably given explicit
25320      # arguments.
25321      ac_need_defaults=false;;
25322   esac
25323
25324   case $1 in
25325   # Handling of the options.
25326 EOF
25327 cat >>$CONFIG_STATUS <<EOF
25328   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25329     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25330     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25331 EOF
25332 cat >>$CONFIG_STATUS <<\EOF
25333   --version | --vers* | -V )
25334     echo "$ac_cs_version"; exit 0 ;;
25335   --he | --h)
25336     # Conflict between --help and --header
25337     { { echo "$as_me:25337: error: ambiguous option: $1
25338 Try \`$0 --help' for more information." >&5
25339 echo "$as_me: error: ambiguous option: $1
25340 Try \`$0 --help' for more information." >&2;}
25341    { (exit 1); exit 1; }; };;
25342   --help | --hel | -h )
25343     echo "$ac_cs_usage"; exit 0 ;;
25344   --debug | --d* | -d )
25345     debug=: ;;
25346   --file | --fil | --fi | --f )
25347     shift
25348     CONFIG_FILES="$CONFIG_FILES $1"
25349     ac_need_defaults=false;;
25350   --header | --heade | --head | --hea )
25351     shift
25352     CONFIG_HEADERS="$CONFIG_HEADERS $1"
25353     ac_need_defaults=false;;
25354
25355   # This is an error.
25356   -*) { { echo "$as_me:25356: error: unrecognized option: $1
25357 Try \`$0 --help' for more information." >&5
25358 echo "$as_me: error: unrecognized option: $1
25359 Try \`$0 --help' for more information." >&2;}
25360    { (exit 1); exit 1; }; } ;;
25361
25362   *) ac_config_targets="$ac_config_targets $1" ;;
25363
25364   esac
25365   shift
25366 done
25367
25368 exec 5>>config.log
25369 cat >&5 << _ACEOF
25370
25371 ## ----------------------- ##
25372 ## Running config.status.  ##
25373 ## ----------------------- ##
25374
25375 This file was extended by $as_me 2.52.20181006, executed with
25376   CONFIG_FILES    = $CONFIG_FILES
25377   CONFIG_HEADERS  = $CONFIG_HEADERS
25378   CONFIG_LINKS    = $CONFIG_LINKS
25379   CONFIG_COMMANDS = $CONFIG_COMMANDS
25380   > $ac_cs_invocation
25381 on `(hostname || uname -n) 2>/dev/null | sed 1q`
25382
25383 _ACEOF
25384 EOF
25385
25386 cat >>$CONFIG_STATUS <<EOF
25387 #
25388 # INIT-COMMANDS section.
25389 #
25390
25391 ### Special initialization commands, used to pass information from the
25392 ### configuration-run into config.status
25393
25394 AWK="$AWK"
25395 ALTERNATE_SYMS="$ALTERNATE_SYMS"
25396 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
25397 DFT_LWR_MODEL="$DFT_LWR_MODEL"
25398 ECHO_LD="$ECHO_LD"
25399 EXTRA_SUFFIX="$EXTRA_SUFFIX"
25400 LDCONFIG="$LDCONFIG"
25401 LIBTOOL_VERSION="$LIBTOOL_VERSION"
25402 LIB_NAME="$LIB_NAME"
25403 LIB_PREFIX="$LIB_PREFIX"
25404 LIB_SUBSETS="$LIB_SUBSETS"
25405 LIB_SUFFIX="$LIB_SUFFIX"
25406 LIB_TRACING="$LIB_TRACING"
25407 LN_S="$LN_S"
25408 MAKE_TERMINFO="$MAKE_TERMINFO"
25409 NCURSES_MAJOR="$NCURSES_MAJOR"
25410 NCURSES_MINOR="$NCURSES_MINOR"
25411 NCURSES_OSPEED="$NCURSES_OSPEED"
25412 NCURSES_PATCH="$NCURSES_PATCH"
25413 SRC_SUBDIRS="$SRC_SUBDIRS"
25414 TERMINFO="$TERMINFO"
25415 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
25416 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
25417 TICS_NAME="$TICS_NAME"
25418 TICS_SUFFIX="$TICS_SUFFIX"
25419 TIC_PATH="$TIC_PATH"
25420 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
25421 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
25422 TINFO_NAME="$TINFO_NAME"
25423 TINFO_SUFFIX="$TINFO_SUFFIX"
25424 UNALTERED_SYMS="$UNALTERED_SYMS"
25425 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
25426 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
25427 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
25428 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
25429 WILDCARD_SYMS="$WILDCARD_SYMS"
25430 WITH_CURSES_H="$with_curses_h"
25431 WITH_ECHO="${enable_echo:=yes}"
25432 WITH_OVERWRITE="$with_overwrite"
25433 cf_LIST_MODELS="$cf_list_models"
25434 cf_cv_abi_version="$cf_cv_abi_version"
25435 cf_cv_do_relink="$cf_cv_do_relink"
25436 cf_cv_do_reranlib="$cf_cv_do_reranlib"
25437 cf_cv_do_symlinks="$cf_cv_do_symlinks"
25438 cf_cv_enable_lp64="$cf_cv_enable_lp64"
25439 cf_cv_enable_opaque="$cf_cv_enable_opaque"
25440 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
25441 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
25442 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
25443 cf_cv_rel_version="$cf_cv_rel_version"
25444 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
25445 cf_cv_shared_soname='$cf_cv_shared_soname'
25446 cf_cv_shlib_version="$cf_cv_shlib_version"
25447 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
25448 cf_cv_system_name="$cf_cv_system_name"
25449 cf_cv_term_driver="$with_term_driver"
25450 cf_with_ada="$cf_with_ada"
25451 cf_with_cxx_binding="$cf_with_cxx_binding"
25452 cf_with_db_install="$cf_with_db_install"
25453 cf_with_manpages="$cf_with_manpages"
25454 cf_with_tests="$cf_with_tests"
25455 host="$host"
25456 target="$target"
25457 with_shared_cxx="$with_shared_cxx"
25458
25459 EOF
25460
25461 cat >>$CONFIG_STATUS <<\EOF
25462 for ac_config_target in $ac_config_targets
25463 do
25464   case "$ac_config_target" in
25465   # Handling of arguments.
25466   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
25467   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
25468   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
25469   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
25470   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
25471   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
25472   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
25473   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25474   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
25475   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
25476   *) { { echo "$as_me:25476: error: invalid argument: $ac_config_target" >&5
25477 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25478    { (exit 1); exit 1; }; };;
25479   esac
25480 done
25481
25482 # If the user did not use the arguments to specify the items to instantiate,
25483 # then the envvar interface is used.  Set only those that are not.
25484 # We use the long form for the default assignment because of an extremely
25485 # bizarre bug on SunOS 4.1.3.
25486 if $ac_need_defaults; then
25487   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25488   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25489   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
25490 fi
25491
25492 # Create a temporary directory, and hook for its removal unless debugging.
25493 $debug ||
25494 {
25495   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25496   trap '{ (exit 1); exit 1; }' 1 2 13 15
25497 }
25498
25499 # Create a (secure) tmp directory for tmp files.
25500 : ${TMPDIR=/tmp}
25501 {
25502   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25503   test -n "$tmp" && test -d "$tmp"
25504 }  ||
25505 {
25506   tmp=$TMPDIR/cs$$-$RANDOM
25507   (umask 077 && mkdir $tmp)
25508 } ||
25509 {
25510    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25511    { (exit 1); exit 1; }
25512 }
25513
25514 EOF
25515
25516 cat >>$CONFIG_STATUS <<EOF
25517
25518 #
25519 # CONFIG_FILES section.
25520 #
25521
25522 # No need to generate the scripts if there are no CONFIG_FILES.
25523 # This happens for instance when ./config.status config.h
25524 if test -n "\$CONFIG_FILES"; then
25525   # Protect against being on the right side of a sed subst in config.status.
25526   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25527    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25528 s,@SHELL@,$SHELL,;t t
25529 s,@exec_prefix@,$exec_prefix,;t t
25530 s,@prefix@,$prefix,;t t
25531 s,@program_transform_name@,$program_transform_name,;t t
25532 s,@bindir@,$bindir,;t t
25533 s,@sbindir@,$sbindir,;t t
25534 s,@libexecdir@,$libexecdir,;t t
25535 s,@datarootdir@,$datarootdir,;t t
25536 s,@datadir@,$datadir,;t t
25537 s,@sysconfdir@,$sysconfdir,;t t
25538 s,@sharedstatedir@,$sharedstatedir,;t t
25539 s,@localstatedir@,$localstatedir,;t t
25540 s,@runstatedir@,$runstatedir,;t t
25541 s,@libdir@,$libdir,;t t
25542 s,@includedir@,$includedir,;t t
25543 s,@oldincludedir@,$oldincludedir,;t t
25544 s,@infodir@,$infodir,;t t
25545 s,@mandir@,$mandir,;t t
25546 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25547 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25548 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25549 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25550 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25551 s,@build_alias@,$build_alias,;t t
25552 s,@host_alias@,$host_alias,;t t
25553 s,@target_alias@,$target_alias,;t t
25554 s,@ECHO_C@,$ECHO_C,;t t
25555 s,@ECHO_N@,$ECHO_N,;t t
25556 s,@ECHO_T@,$ECHO_T,;t t
25557 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25558 s,@DEFS@,$DEFS,;t t
25559 s,@LIBS@,$LIBS,;t t
25560 s,@top_builddir@,$top_builddir,;t t
25561 s,@EGREP@,$EGREP,;t t
25562 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
25563 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
25564 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
25565 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
25566 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
25567 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
25568 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
25569 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
25570 s,@VERSION@,$VERSION,;t t
25571 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
25572 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
25573 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
25574 s,@PACKAGE@,$PACKAGE,;t t
25575 s,@build@,$build,;t t
25576 s,@build_cpu@,$build_cpu,;t t
25577 s,@build_vendor@,$build_vendor,;t t
25578 s,@build_os@,$build_os,;t t
25579 s,@host@,$host,;t t
25580 s,@host_cpu@,$host_cpu,;t t
25581 s,@host_vendor@,$host_vendor,;t t
25582 s,@host_os@,$host_os,;t t
25583 s,@target@,$target,;t t
25584 s,@target_cpu@,$target_cpu,;t t
25585 s,@target_vendor@,$target_vendor,;t t
25586 s,@target_os@,$target_os,;t t
25587 s,@CC@,$CC,;t t
25588 s,@CFLAGS@,$CFLAGS,;t t
25589 s,@LDFLAGS@,$LDFLAGS,;t t
25590 s,@CPPFLAGS@,$CPPFLAGS,;t t
25591 s,@ac_ct_CC@,$ac_ct_CC,;t t
25592 s,@EXEEXT@,$EXEEXT,;t t
25593 s,@OBJEXT@,$OBJEXT,;t t
25594 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25595 s,@CPP@,$CPP,;t t
25596 s,@LDCONFIG@,$LDCONFIG,;t t
25597 s,@CXX@,$CXX,;t t
25598 s,@CXXFLAGS@,$CXXFLAGS,;t t
25599 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
25600 s,@AWK@,$AWK,;t t
25601 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25602 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25603 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25604 s,@LINT@,$LINT,;t t
25605 s,@LINT_OPTS@,$LINT_OPTS,;t t
25606 s,@LN_S@,$LN_S,;t t
25607 s,@cf_config_suffix@,$cf_config_suffix,;t t
25608 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25609 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25610 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
25611 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
25612 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
25613 s,@SET_MAKE@,$SET_MAKE,;t t
25614 s,@CTAGS@,$CTAGS,;t t
25615 s,@ETAGS@,$ETAGS,;t t
25616 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25617 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25618 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
25619 s,@RANLIB@,$RANLIB,;t t
25620 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
25621 s,@LD@,$LD,;t t
25622 s,@ac_ct_LD@,$ac_ct_LD,;t t
25623 s,@AR@,$AR,;t t
25624 s,@ac_ct_AR@,$ac_ct_AR,;t t
25625 s,@NM@,$NM,;t t
25626 s,@ac_ct_NM@,$ac_ct_NM,;t t
25627 s,@ARFLAGS@,$ARFLAGS,;t t
25628 s,@DESTDIR@,$DESTDIR,;t t
25629 s,@BUILD_CC@,$BUILD_CC,;t t
25630 s,@BUILD_CPP@,$BUILD_CPP,;t t
25631 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
25632 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
25633 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
25634 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
25635 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
25636 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
25637 s,@cf_list_models@,$cf_list_models,;t t
25638 s,@ABI_VERSION@,$ABI_VERSION,;t t
25639 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
25640 s,@LIBTOOL@,$LIBTOOL,;t t
25641 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
25642 s,@LT_UNDEF@,$LT_UNDEF,;t t
25643 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
25644 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
25645 s,@LIB_CREATE@,$LIB_CREATE,;t t
25646 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
25647 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
25648 s,@LIB_PREP@,$LIB_PREP,;t t
25649 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
25650 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
25651 s,@LIB_LINK@,$LIB_LINK,;t t
25652 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
25653 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
25654 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
25655 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
25656 s,@TICS_NAME@,$TICS_NAME,;t t
25657 s,@TINFO_NAME@,$TINFO_NAME,;t t
25658 s,@LIB_NAME@,$LIB_NAME,;t t
25659 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
25660 s,@CC_G_OPT@,$CC_G_OPT,;t t
25661 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
25662 s,@LD_MODEL@,$LD_MODEL,;t t
25663 s,@shlibdir@,$shlibdir,;t t
25664 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
25665 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
25666 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
25667 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
25668 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
25669 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
25670 s,@LINK_PROGS@,$LINK_PROGS,;t t
25671 s,@LINK_TESTS@,$LINK_TESTS,;t t
25672 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25673 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
25674 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
25675 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
25676 s,@RPATH_LIST@,$RPATH_LIST,;t t
25677 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
25678 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
25679 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
25680 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
25681 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25682 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
25683 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
25684 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
25685 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
25686 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
25687 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
25688 s,@XTERM_KBS@,$XTERM_KBS,;t t
25689 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
25690 s,@TERMINFO@,$TERMINFO,;t t
25691 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
25692 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
25693 s,@TERMPATH@,$TERMPATH,;t t
25694 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
25695 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
25696 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
25697 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
25698 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
25699 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
25700 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
25701 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
25702 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
25703 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
25704 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
25705 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
25706 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
25707 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
25708 s,@RGB_PATH@,$RGB_PATH,;t t
25709 s,@no_x11_rgb@,$no_x11_rgb,;t t
25710 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
25711 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
25712 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
25713 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
25714 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
25715 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
25716 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
25717 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
25718 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
25719 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
25720 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
25721 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
25722 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
25723 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
25724 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
25725 s,@PTHREAD@,$PTHREAD,;t t
25726 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
25727 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
25728 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
25729 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
25730 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
25731 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
25732 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
25733 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
25734 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
25735 s,@ECHO_LT@,$ECHO_LT,;t t
25736 s,@ECHO_LD@,$ECHO_LD,;t t
25737 s,@RULE_CC@,$RULE_CC,;t t
25738 s,@SHOW_CC@,$SHOW_CC,;t t
25739 s,@ECHO_CC@,$ECHO_CC,;t t
25740 s,@ECHO_LINK@,$ECHO_LINK,;t t
25741 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
25742 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
25743 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
25744 s,@ADAFLAGS@,$ADAFLAGS,;t t
25745 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25746 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
25747 s,@ADA_TRACE@,$ADA_TRACE,;t t
25748 s,@MATH_LIB@,$MATH_LIB,;t t
25749 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
25750 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
25751 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
25752 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
25753 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
25754 s,@TEST_LIBS@,$TEST_LIBS,;t t
25755 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
25756 s,@CXXCPP@,$CXXCPP,;t t
25757 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
25758 s,@CXX_AR@,$CXX_AR,;t t
25759 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
25760 s,@CXXLIBS@,$CXXLIBS,;t t
25761 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
25762 s,@gnatmake_exists@,$gnatmake_exists,;t t
25763 s,@gprconfig_exists@,$gprconfig_exists,;t t
25764 s,@M4_exists@,$M4_exists,;t t
25765 s,@cf_ada_make@,$cf_ada_make,;t t
25766 s,@cf_ada_config@,$cf_ada_config,;t t
25767 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
25768 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
25769 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
25770 s,@cf_compile_generics@,$cf_compile_generics,;t t
25771 s,@cf_generic_objects@,$cf_generic_objects,;t t
25772 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
25773 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
25774 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
25775 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
25776 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
25777 s,@cf_ada_package@,$cf_ada_package,;t t
25778 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
25779 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
25780 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
25781 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
25782 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
25783 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
25784 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
25785 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
25786 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
25787 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
25788 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
25789 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
25790 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
25791 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
25792 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
25793 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
25794 s,@TICS_LIBS@,$TICS_LIBS,;t t
25795 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
25796 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
25797 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
25798 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
25799 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
25800 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
25801 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
25802 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
25803 s,@includesubdir@,$includesubdir,;t t
25804 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
25805 s,@TICS_LIST@,$TICS_LIST,;t t
25806 s,@TINFO_LIST@,$TINFO_LIST,;t t
25807 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
25808 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
25809 s,@TEST_ARGS@,$TEST_ARGS,;t t
25810 s,@TEST_DEPS@,$TEST_DEPS,;t t
25811 s,@TEST_ARG2@,$TEST_ARG2,;t t
25812 s,@TEST_DEP2@,$TEST_DEP2,;t t
25813 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
25814 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
25815 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
25816 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
25817 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
25818 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
25819 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
25820 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
25821 s,@cross_compiling@,$cross_compiling,;t t
25822 s,@TIC_PATH@,$TIC_PATH,;t t
25823 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
25824 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
25825 s,@PANEL_NAME@,$PANEL_NAME,;t t
25826 s,@MENU_NAME@,$MENU_NAME,;t t
25827 s,@FORM_NAME@,$FORM_NAME,;t t
25828 s,@CXX_NAME@,$CXX_NAME,;t t
25829 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
25830 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
25831 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
25832 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
25833 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
25834 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
25835 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
25836 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
25837 CEOF
25838
25839 EOF
25840
25841   cat >>$CONFIG_STATUS <<\EOF
25842   # Split the substitutions into bite-sized pieces for seds with
25843   # small command number limits, like on Digital OSF/1 and HP-UX.
25844   ac_max_sed_lines=48
25845   ac_sed_frag=1 # Number of current file.
25846   ac_beg=1 # First line for current file.
25847   ac_end=$ac_max_sed_lines # Line after last line for current file.
25848   ac_more_lines=:
25849   ac_sed_cmds=
25850   while $ac_more_lines; do
25851     if test $ac_beg -gt 1; then
25852       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25853     else
25854       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25855     fi
25856     if test ! -s $tmp/subs.frag; then
25857       ac_more_lines=false
25858     else
25859       # The purpose of the label and of the branching condition is to
25860       # speed up the sed processing (if there are no `@' at all, there
25861       # is no need to browse any of the substitutions).
25862       # These are the two extra sed commands mentioned above.
25863       (echo ':t
25864   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25865       # It is possible to make a multiline substitution using escaped newlines.
25866       # Ensure that we do not split the substitution between script fragments.
25867       ac_BEG=$ac_end
25868       ac_END=`expr $ac_end + $ac_max_sed_lines`
25869       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25870       if test -s $tmp/subs.next; then
25871         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25872         if test ! -s $tmp/subs.edit; then
25873           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25874           if test ! -s $tmp/subs.edit; then
25875             if test $ac_beg -gt 1; then
25876               ac_end=`expr $ac_end - 1`
25877               continue
25878             fi
25879           fi
25880         fi
25881       fi
25882
25883       if test -z "$ac_sed_cmds"; then
25884         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25885       else
25886         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25887       fi
25888       ac_sed_frag=`expr $ac_sed_frag + 1`
25889       ac_beg=$ac_end
25890       ac_end=`expr $ac_end + $ac_max_sed_lines`
25891     fi
25892   done
25893   if test -z "$ac_sed_cmds"; then
25894     ac_sed_cmds=cat
25895   fi
25896 fi # test -n "$CONFIG_FILES"
25897
25898 EOF
25899 cat >>$CONFIG_STATUS <<\EOF
25900 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25901   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25902   case $ac_file in
25903   - | *:- | *:-:* ) # input from stdin
25904         cat >$tmp/stdin
25905         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25906         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25907   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25908         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25909   * )   ac_file_in=$ac_file.in ;;
25910   esac
25911
25912   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25913   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25914          X"$ac_file" : 'X\(//\)[^/]' \| \
25915          X"$ac_file" : 'X\(//\)$' \| \
25916          X"$ac_file" : 'X\(/\)' \| \
25917          .     : '\(.\)' 2>/dev/null ||
25918 echo X"$ac_file" |
25919     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25920           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25921           /^X\(\/\/\)$/{ s//\1/; q; }
25922           /^X\(\/\).*/{ s//\1/; q; }
25923           s/.*/./; q'`
25924   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25925     { case "$ac_dir" in
25926   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25927   *)                      as_incr_dir=.;;
25928 esac
25929 as_dummy="$ac_dir"
25930 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25931   case $as_mkdir_dir in
25932     # Skip DOS drivespec
25933     ?:) as_incr_dir=$as_mkdir_dir ;;
25934     *)
25935       as_incr_dir=$as_incr_dir/$as_mkdir_dir
25936       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25937     ;;
25938   esac
25939 done; }
25940
25941     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25942     # A "../" for each directory in $ac_dir_suffix.
25943     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25944   else
25945     ac_dir_suffix= ac_dots=
25946   fi
25947
25948   case $srcdir in
25949   .)  ac_srcdir=.
25950       if test -z "$ac_dots"; then
25951          ac_top_srcdir=.
25952       else
25953          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
25954       fi ;;
25955   [\\/]* | ?:[\\/]* )
25956       ac_srcdir=$srcdir$ac_dir_suffix;
25957       ac_top_srcdir=$srcdir ;;
25958   *) # Relative path.
25959     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
25960     ac_top_srcdir=$ac_dots$srcdir ;;
25961   esac
25962
25963   case $INSTALL in
25964   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25965   *) ac_INSTALL=$ac_dots$INSTALL ;;
25966   esac
25967
25968   if test x"$ac_file" != x-; then
25969     { echo "$as_me:25969: creating $ac_file" >&5
25970 echo "$as_me: creating $ac_file" >&6;}
25971     rm -f "$ac_file"
25972   fi
25973   # Let's still pretend it is `configure' which instantiates (i.e., don't
25974   # use $as_me), people would be surprised to read:
25975   #    /* config.h.  Generated automatically by config.status.  */
25976   configure_input="Generated automatically from `echo $ac_file_in |
25977                                                  sed 's,.*/,,'` by configure."
25978
25979   # First look for the input files in the build tree, otherwise in the
25980   # src tree.
25981   ac_file_inputs=`IFS=:
25982     for f in $ac_file_in; do
25983       case $f in
25984       -) echo $tmp/stdin ;;
25985       [\\/$]*)
25986          # Absolute (can't be DOS-style, as IFS=:)
25987          test -f "$f" || { { echo "$as_me:25987: error: cannot find input file: $f" >&5
25988 echo "$as_me: error: cannot find input file: $f" >&2;}
25989    { (exit 1); exit 1; }; }
25990          echo $f;;
25991       *) # Relative
25992          if test -f "$f"; then
25993            # Build tree
25994            echo $f
25995          elif test -f "$srcdir/$f"; then
25996            # Source tree
25997            echo $srcdir/$f
25998          else
25999            # /dev/null tree
26000            { { echo "$as_me:26000: error: cannot find input file: $f" >&5
26001 echo "$as_me: error: cannot find input file: $f" >&2;}
26002    { (exit 1); exit 1; }; }
26003          fi;;
26004       esac
26005     done` || { (exit 1); exit 1; }
26006 EOF
26007 cat >>$CONFIG_STATUS <<\EOF
26008   ac_warn_datarootdir=no
26009   if test x"$ac_file" != x-; then
26010     for ac_item in $ac_file_inputs
26011     do
26012       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
26013       if test -n "$ac_seen"; then
26014         ac_used=`grep '@datarootdir@' $ac_item`
26015         if test -z "$ac_used"; then
26016           { echo "$as_me:26016: WARNING: datarootdir was used implicitly but not set:
26017 $ac_seen" >&5
26018 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
26019 $ac_seen" >&2;}
26020           ac_warn_datarootdir=yes
26021         fi
26022       fi
26023       ac_seen=`grep '${datarootdir}' $ac_item`
26024       if test -n "$ac_seen"; then
26025         { echo "$as_me:26025: WARNING: datarootdir was used explicitly but not set:
26026 $ac_seen" >&5
26027 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
26028 $ac_seen" >&2;}
26029         ac_warn_datarootdir=yes
26030       fi
26031     done
26032   fi
26033
26034 if test "x$ac_warn_datarootdir" = xyes; then
26035   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
26036 fi
26037
26038 EOF
26039 cat >>$CONFIG_STATUS <<EOF
26040   sed "$ac_vpsub
26041 $extrasub
26042 EOF
26043 cat >>$CONFIG_STATUS <<\EOF
26044 :t
26045 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
26046 s,@configure_input@,$configure_input,;t t
26047 s,@srcdir@,$ac_srcdir,;t t
26048 s,@top_srcdir@,$ac_top_srcdir,;t t
26049 s,@INSTALL@,$ac_INSTALL,;t t
26050 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
26051   rm -f $tmp/stdin
26052   if test x"$ac_file" != x-; then
26053     cp $tmp/out $ac_file
26054
26055     for ac_name in prefix exec_prefix datarootdir
26056     do
26057         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
26058         if test -n "$ac_seen"; then
26059             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
26060             if test -z "$ac_init"; then
26061               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
26062               { echo "$as_me:26062: WARNING: Variable $ac_name is used but was not set:
26063 $ac_seen" >&5
26064 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
26065 $ac_seen" >&2;}
26066             fi
26067         fi
26068     done
26069     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
26070     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
26071     if test -s $tmp/out; then
26072       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
26073       { echo "$as_me:26073: WARNING: Some variables may not be substituted:
26074 $ac_seen" >&5
26075 echo "$as_me: WARNING: Some variables may not be substituted:
26076 $ac_seen" >&2;}
26077     fi
26078   else
26079     cat $tmp/out
26080   fi
26081   rm -f $tmp/out
26082
26083 done
26084 EOF
26085 cat >>$CONFIG_STATUS <<\EOF
26086
26087 #
26088 # CONFIG_HEADER section.
26089 #
26090
26091 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
26092 # NAME is the cpp macro being defined and VALUE is the value it is being given.
26093 #
26094 # ac_d sets the value in "#define NAME VALUE" lines.
26095 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
26096 ac_dB='[        ].*$,\1#\2'
26097 ac_dC=' '
26098 ac_dD=',;t'
26099 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
26100 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26101 ac_iB='\([      ]\),\1#\2define\3'
26102 ac_iC=' '
26103 ac_iD='\4,;t'
26104 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
26105 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
26106 ac_uB='$,\1#\2define\3'
26107 ac_uC=' '
26108 ac_uD=',;t'
26109
26110 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
26111   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
26112   case $ac_file in
26113   - | *:- | *:-:* ) # input from stdin
26114         cat >$tmp/stdin
26115         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26116         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26117   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
26118         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
26119   * )   ac_file_in=$ac_file.in ;;
26120   esac
26121
26122   test x"$ac_file" != x- && { echo "$as_me:26122: creating $ac_file" >&5
26123 echo "$as_me: creating $ac_file" >&6;}
26124
26125   # First look for the input files in the build tree, otherwise in the
26126   # src tree.
26127   ac_file_inputs=`IFS=:
26128     for f in $ac_file_in; do
26129       case $f in
26130       -) echo $tmp/stdin ;;
26131       [\\/$]*)
26132          # Absolute (can't be DOS-style, as IFS=:)
26133          test -f "$f" || { { echo "$as_me:26133: error: cannot find input file: $f" >&5
26134 echo "$as_me: error: cannot find input file: $f" >&2;}
26135    { (exit 1); exit 1; }; }
26136          echo $f;;
26137       *) # Relative
26138          if test -f "$f"; then
26139            # Build tree
26140            echo $f
26141          elif test -f "$srcdir/$f"; then
26142            # Source tree
26143            echo $srcdir/$f
26144          else
26145            # /dev/null tree
26146            { { echo "$as_me:26146: error: cannot find input file: $f" >&5
26147 echo "$as_me: error: cannot find input file: $f" >&2;}
26148    { (exit 1); exit 1; }; }
26149          fi;;
26150       esac
26151     done` || { (exit 1); exit 1; }
26152   # Remove the trailing spaces.
26153   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
26154
26155 EOF
26156
26157 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
26158 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
26159 # be either 'cat' or 'sort'.
26160 cat confdefs.h | uniq >conftest.vals
26161
26162 # Break up conftest.vals because some shells have a limit on
26163 # the size of here documents, and old seds have small limits too.
26164
26165 rm -f conftest.tail
26166 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
26167 while grep . conftest.vals >/dev/null
26168 do
26169   # Write chunks of a limited-size here document to conftest.frag.
26170   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
26171   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
26172   echo 'CEOF' >> $CONFIG_STATUS
26173   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
26174   rm -f conftest.vals
26175   mv conftest.tail conftest.vals
26176 done
26177 rm -f conftest.vals
26178
26179 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
26180 # marker @DEFS@.
26181 echo '  cat >> conftest.edit <<CEOF
26182 /@DEFS@/r conftest.frag
26183 /@DEFS@/d
26184 CEOF
26185 sed -f conftest.edit $tmp/in > $tmp/out
26186 rm -f $tmp/in
26187 mv $tmp/out $tmp/in
26188 rm -f conftest.edit conftest.frag
26189 ' >> $CONFIG_STATUS
26190
26191 cat >>$CONFIG_STATUS <<\EOF
26192   # Let's still pretend it is `configure' which instantiates (i.e., don't
26193   # use $as_me), people would be surprised to read:
26194   #    /* config.h.  Generated automatically by config.status.  */
26195   if test x"$ac_file" = x-; then
26196     echo "/* Generated automatically by configure.  */" >$tmp/config.h
26197   else
26198     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
26199   fi
26200   cat $tmp/in >>$tmp/config.h
26201   rm -f $tmp/in
26202   if test x"$ac_file" != x-; then
26203     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
26204       { echo "$as_me:26204: $ac_file is unchanged" >&5
26205 echo "$as_me: $ac_file is unchanged" >&6;}
26206     else
26207       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
26208          X"$ac_file" : 'X\(//\)[^/]' \| \
26209          X"$ac_file" : 'X\(//\)$' \| \
26210          X"$ac_file" : 'X\(/\)' \| \
26211          .     : '\(.\)' 2>/dev/null ||
26212 echo X"$ac_file" |
26213     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
26214           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
26215           /^X\(\/\/\)$/{ s//\1/; q; }
26216           /^X\(\/\).*/{ s//\1/; q; }
26217           s/.*/./; q'`
26218       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
26219         { case "$ac_dir" in
26220   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
26221   *)                      as_incr_dir=.;;
26222 esac
26223 as_dummy="$ac_dir"
26224 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
26225   case $as_mkdir_dir in
26226     # Skip DOS drivespec
26227     ?:) as_incr_dir=$as_mkdir_dir ;;
26228     *)
26229       as_incr_dir=$as_incr_dir/$as_mkdir_dir
26230       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
26231     ;;
26232   esac
26233 done; }
26234
26235       fi
26236       rm -f $ac_file
26237       mv $tmp/config.h $ac_file
26238     fi
26239   else
26240     cat $tmp/config.h
26241     rm -f $tmp/config.h
26242   fi
26243 done
26244 EOF
26245 cat >>$CONFIG_STATUS <<\EOF
26246 #
26247 # CONFIG_COMMANDS section.
26248 #
26249 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
26250   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
26251   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
26252
26253   case $ac_dest in
26254     default )
26255 if test "x$cf_with_tests" != xno ; then
26256
26257 for cf_dir in test
26258 do
26259         if test ! -d $srcdir/$cf_dir; then
26260                 continue
26261         elif test -f $srcdir/$cf_dir/programs; then
26262                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
26263         fi
26264 done
26265
26266 fi
26267
26268 cf_prefix=$LIB_PREFIX
26269
26270 case $cf_cv_shlib_version in
26271 (cygdll|msysdll|mingw)
26272         TINFO_NAME=$TINFO_ARG_SUFFIX
26273         TINFO_SUFFIX=.dll
26274         ;;
26275 esac
26276
26277 if test -n "$TINFO_SUFFIX" ; then
26278         case $TINFO_SUFFIX in
26279         (tw*)
26280                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
26281                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw'$EXTRA_SUFFIX'//'`
26282                 ;;
26283         (t*)
26284                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
26285                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t'$EXTRA_SUFFIX'//'`
26286                 ;;
26287         (w*)
26288                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
26289                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w'$EXTRA_SUFFIX'//'`
26290                 ;;
26291         esac
26292 fi
26293
26294 for cf_dir in $SRC_SUBDIRS
26295 do
26296         if test ! -d $srcdir/$cf_dir ; then
26297                 continue
26298         elif test -f $srcdir/$cf_dir/modules; then
26299
26300                 SHARED_LIB=
26301                 Libs_To_Make=
26302                 cf_awk_program=
26303                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
26304                 then
26305                         cf_awk_program="$cf_awk_program\
26306 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
26307 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
26308 "
26309                 fi
26310
26311                 if test "x$WILDCARD_SYMS" = xno
26312                 then
26313                         cf_awk_program="$cf_awk_program\
26314 /[      ]_\\*;/ { skip=1; next; }\
26315 "
26316                 fi
26317
26318                 if test "x$cf_awk_program" != "x"
26319                 then
26320                         cat >>$cf_dir/Makefile <<CF_EOF
26321
26322 # Generated by CF_LIB_RULES
26323 resulting.map: $UNALTERED_SYMS
26324         $AWK 'BEGIN { skip = 1; last=""; } \
26325 $cf_awk_program \
26326 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
26327  skip = 0; last = \$\$0; } \
26328 END { print last; }' < $UNALTERED_SYMS >\$@
26329
26330 distclean::
26331         rm -f resulting.map
26332 CF_EOF
26333                 fi
26334
26335                 for cf_item in $cf_LIST_MODELS
26336                 do
26337
26338         case X$cf_item in
26339         (Xlibtool)
26340                 cf_suffix='.la'
26341                 cf_depsuf=$cf_suffix
26342                 ;;
26343         (Xdebug)
26344                 cf_suffix='_g.a'
26345                 cf_depsuf=$cf_suffix
26346                 ;;
26347         (Xprofile)
26348                 cf_suffix='_p.a'
26349                 cf_depsuf=$cf_suffix
26350                 ;;
26351         (Xshared)
26352                 case $cf_cv_system_name in
26353                 (aix[5-7]*)
26354                         cf_suffix='.so'
26355                         cf_depsuf=$cf_suffix
26356                         ;;
26357                 (cygwin*|msys*|mingw*)
26358                         cf_suffix='.dll'
26359                         cf_depsuf='.dll.a'
26360                         ;;
26361                 (darwin*)
26362                         cf_suffix='.dylib'
26363                         cf_depsuf=$cf_suffix
26364                         ;;
26365                 (hpux*)
26366                         case $target in
26367                         (ia64*)
26368                                 cf_suffix='.so'
26369                                 cf_depsuf=$cf_suffix
26370                                 ;;
26371                         (*)
26372                                 cf_suffix='.sl'
26373                                 cf_depsuf=$cf_suffix
26374                                 ;;
26375                         esac
26376                         ;;
26377                 (*)
26378                         cf_suffix='.so'
26379                         cf_depsuf=$cf_suffix
26380                         ;;
26381                 esac
26382                 ;;
26383         (*)
26384                 cf_suffix='.a'
26385                 cf_depsuf=$cf_suffix
26386                 ;;
26387         esac
26388         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26389         then
26390                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26391                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26392         fi
26393
26394                         cf_libname=$cf_dir
26395                         test "$cf_dir" = c++ && cf_libname=ncurses++
26396                         if test $cf_item = shared ; then
26397                                 if test -n "${LIB_SUFFIX}"
26398                                 then
26399                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26400                                 else
26401                                         cf_shared_suffix="$cf_suffix"
26402                                 fi
26403                                 if test "$cf_cv_do_symlinks" = yes ; then
26404                                         cf_version_name=
26405
26406                                         case "$cf_cv_shlib_version" in
26407                                         (rel)
26408                                                 cf_version_name=REL_VERSION
26409                                                 ;;
26410                                         (abi)
26411                                                 cf_version_name=ABI_VERSION
26412                                                 ;;
26413                                         esac
26414
26415                                         if test -n "$cf_version_name"
26416                                         then
26417                                                 case "$cf_cv_system_name" in
26418                                                 (darwin*)
26419                                                         # "w", etc?
26420                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
26421                                                         ;;
26422                                                 (*)
26423                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
26424                                                         ;;
26425                                                 esac
26426                                         fi
26427                                         if test -n "${USE_LIB_SUFFIX}"
26428                                         then
26429                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
26430                                         else
26431                                                 cf_shared_suffix="$cf_suffix"
26432                                         fi
26433                                 fi
26434                                 # cygwin needs import library, and has unique naming convention
26435                                 # use autodetected ${cf_prefix} for import lib and static lib, but
26436                                 # use 'cyg' prefix for shared lib.
26437                                 case $cf_cv_shlib_version in
26438                                 (cygdll)
26439                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26440                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
26441                                         ;;
26442                                 (msysdll)
26443                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26444                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
26445                                         ;;
26446                                 (mingw)
26447                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
26448                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
26449                                         ;;
26450                                 (*)
26451                                         cf_add_lib=
26452                                         ;;
26453                                 esac
26454                                 if test -n "$cf_add_lib"
26455                                 then
26456                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26457                                         continue
26458                                 fi
26459                         fi
26460                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
26461                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
26462                 done
26463
26464                 if test $cf_dir = ncurses ; then
26465                         cf_subsets="$LIB_SUBSETS"
26466                         cf_r_parts="$cf_subsets"
26467                         cf_liblist="$Libs_To_Make"
26468
26469                         while test -n "$cf_r_parts"
26470                         do
26471                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
26472                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
26473                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
26474                                         cf_add_lib=
26475                                         case $cf_l_parts in
26476                                         (*termlib*)
26477                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
26478                                                 ;;
26479                                         (*ticlib*)
26480                                                 cf_add_lib=`echo $cf_liblist |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
26481                                                 ;;
26482                                         (*)
26483                                                 break
26484                                                 ;;
26485                                         esac
26486                                         if test -n "$cf_add_lib"; then
26487                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
26488                                         fi
26489                                 else
26490                                         break
26491                                 fi
26492                         done
26493                 else
26494                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
26495                 fi
26496
26497                 if test $cf_dir = c++; then
26498                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
26499                                 cf_list=
26500                                 for cf_item in $Libs_To_Make
26501                                 do
26502                                         case $cf_item in
26503                                         (*.a)
26504                                                 ;;
26505                                         (*)
26506                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
26507                                                 ;;
26508                                         esac
26509                                         for cf_test in $cf_list
26510                                         do
26511                                                 if test "$cf_test" = "$cf_item"
26512                                                 then
26513                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
26514                                                         cf_item=
26515                                                         break
26516                                                 fi
26517                                         done
26518                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
26519                                 done
26520                                 Libs_To_Make="$cf_list"
26521                         fi
26522                 fi
26523
26524                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
26525                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
26526                         $cf_dir/Makefile >$cf_dir/Makefile.out
26527                 mv $cf_dir/Makefile.out $cf_dir/Makefile
26528
26529                 $AWK -f $srcdir/mk-0th.awk \
26530                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
26531                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26532
26533                 for cf_subset in $cf_subsets
26534                 do
26535                         cf_subdirs=
26536                         for cf_item in $cf_LIST_MODELS
26537                         do
26538
26539                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
26540
26541 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26542
26543                         CXX_MODEL=$cf_ITEM
26544                         if test "$CXX_MODEL" = SHARED; then
26545                                 case $cf_cv_shlib_version in
26546                                 (cygdll|msysdll|mingw)
26547                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
26548
26549 echo "${as_me:-configure}:26549: testing overriding CXX_MODEL to SHARED ..." 1>&5
26550
26551                                         with_shared_cxx=yes
26552                                         ;;
26553                                 (*)
26554                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
26555                                         ;;
26556                                 esac
26557                         fi
26558
26559         case X$cf_item in
26560         (Xlibtool)
26561                 cf_suffix='.la'
26562                 cf_depsuf=$cf_suffix
26563                 ;;
26564         (Xdebug)
26565                 cf_suffix='_g.a'
26566                 cf_depsuf=$cf_suffix
26567                 ;;
26568         (Xprofile)
26569                 cf_suffix='_p.a'
26570                 cf_depsuf=$cf_suffix
26571                 ;;
26572         (Xshared)
26573                 case $cf_cv_system_name in
26574                 (aix[5-7]*)
26575                         cf_suffix='.so'
26576                         cf_depsuf=$cf_suffix
26577                         ;;
26578                 (cygwin*|msys*|mingw*)
26579                         cf_suffix='.dll'
26580                         cf_depsuf='.dll.a'
26581                         ;;
26582                 (darwin*)
26583                         cf_suffix='.dylib'
26584                         cf_depsuf=$cf_suffix
26585                         ;;
26586                 (hpux*)
26587                         case $target in
26588                         (ia64*)
26589                                 cf_suffix='.so'
26590                                 cf_depsuf=$cf_suffix
26591                                 ;;
26592                         (*)
26593                                 cf_suffix='.sl'
26594                                 cf_depsuf=$cf_suffix
26595                                 ;;
26596                         esac
26597                         ;;
26598                 (*)
26599                         cf_suffix='.so'
26600                         cf_depsuf=$cf_suffix
26601                         ;;
26602                 esac
26603                 ;;
26604         (*)
26605                 cf_suffix='.a'
26606                 cf_depsuf=$cf_suffix
26607                 ;;
26608         esac
26609         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
26610         then
26611                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
26612                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
26613         fi
26614
26615         case $cf_item in
26616         (libtool) cf_subdir='obj_lo'  ;;
26617         (normal)  cf_subdir='objects' ;;
26618         (debug)   cf_subdir='obj_g' ;;
26619         (profile) cf_subdir='obj_p' ;;
26620         (shared)
26621                 case $cf_cv_system_name in
26622                 (cygwin|msys)
26623                         cf_subdir='objects' ;;
26624                 (*)
26625                         cf_subdir='obj_s' ;;
26626                 esac
26627         esac
26628
26629                         # Test for case where we build libtinfo with a different name.
26630                         cf_libname=$cf_dir
26631                         if test $cf_dir = ncurses ; then
26632                                 case $cf_subset in
26633                                 (*base*)
26634                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
26635                                         ;;
26636                                 (*termlib*)
26637                                         cf_libname=$TINFO_LIB_SUFFIX
26638                                         ;;
26639                                 (ticlib*)
26640                                         cf_libname=$TICS_LIB_SUFFIX
26641                                         ;;
26642                                 esac
26643                         elif test $cf_dir = c++ ; then
26644                                 cf_libname=ncurses++$USE_LIB_SUFFIX
26645                         else
26646                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
26647                         fi
26648                         if test -n "${USE_ARG_SUFFIX}" ; then
26649                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
26650                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${USE_LIB_SUFFIX}%%"`
26651                         fi
26652
26653                         # These dependencies really are for development, not
26654                         # builds, but they are useful in porting, too.
26655                         cf_depend="../include/ncurses_cfg.h"
26656                         if test "$srcdir" = "."; then
26657                                 cf_reldir="."
26658                         else
26659                                 cf_reldir="\${srcdir}"
26660                         fi
26661
26662                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
26663                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
26664                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
26665                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
26666                         fi
26667
26668                         cf_dir_suffix=
26669                         old_cf_suffix="$cf_suffix"
26670                         if test "$cf_cv_shlib_version_infix" = yes ; then
26671                         if test -n "$USE_LIB_SUFFIX" ; then
26672                                 case $USE_LIB_SUFFIX in
26673                                 (tw*)
26674                                         cf_libname=`echo $cf_libname | sed 's/tw'$EXTRA_SUFFIX'$//'`
26675                                         cf_suffix=`echo $cf_suffix | sed 's/^tw'$EXTRA_SUFFIX'//'`
26676                                         cf_dir_suffix=tw$EXTRA_SUFFIX
26677                                         ;;
26678                                 (t*)
26679                                         cf_libname=`echo $cf_libname | sed 's/t'$EXTRA_SUFFIX'$//'`
26680                                         cf_suffix=`echo $cf_suffix | sed 's/^t'$EXTRA_SUFFIX'//'`
26681                                         cf_dir_suffix=t$EXTRA_SUFFIX
26682                                         ;;
26683                                 (w*)
26684                                         cf_libname=`echo $cf_libname | sed 's/w'$EXTRA_SUFFIX'$//'`
26685                                         cf_suffix=`echo $cf_suffix | sed 's/^w'$EXTRA_SUFFIX'//'`
26686                                         cf_dir_suffix=w$EXTRA_SUFFIX
26687                                         ;;
26688                                 (*)
26689                                         cf_libname=`echo $cf_libname | sed 's/'$EXTRA_SUFFIX'$//'`
26690                                         cf_suffix=`echo $cf_suffix | sed 's/^'$EXTRA_SUFFIX'//'`
26691                                         cf_dir_suffix=$EXTRA_SUFFIX
26692                                         ;;
26693                                 esac
26694                         fi
26695                         fi
26696
26697                         $AWK -f $srcdir/mk-1st.awk \
26698                                 name=${cf_libname}${cf_dir_suffix} \
26699                                 traces=$LIB_TRACING \
26700                                 MODEL=$cf_ITEM \
26701                                 CXX_MODEL=$CXX_MODEL \
26702                                 model=$cf_subdir \
26703                                 prefix=$cf_prefix \
26704                                 suffix=$cf_suffix \
26705                                 subset=$cf_subset \
26706                                 driver=$cf_cv_term_driver \
26707                                 SymLink="$LN_S" \
26708                                 TermlibRoot=$TINFO_NAME \
26709                                 TermlibSuffix=$TINFO_SUFFIX \
26710                                 ShlibVer=$cf_cv_shlib_version \
26711                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
26712                                 ReLink=${cf_cv_do_relink:-no} \
26713                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
26714                                 DoLinks=$cf_cv_do_symlinks \
26715                                 rmSoLocs=$cf_cv_rm_so_locs \
26716                                 ldconfig="$LDCONFIG" \
26717                                 overwrite=$WITH_OVERWRITE \
26718                                 depend="$cf_depend" \
26719                                 host="$host" \
26720                                 libtool_version="$LIBTOOL_VERSION" \
26721                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26722
26723                         cf_suffix="$old_cf_suffix"
26724
26725                         for cf_subdir2 in $cf_subdirs lib
26726                         do
26727                                 test $cf_subdir = $cf_subdir2 && break
26728                         done
26729                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
26730                         $AWK -f $srcdir/mk-2nd.awk \
26731                                 name=$cf_dir \
26732                                 traces=$LIB_TRACING \
26733                                 MODEL=$cf_ITEM \
26734                                 model=$cf_subdir \
26735                                 subset=$cf_subset \
26736                                 srcdir=$srcdir \
26737                                 echo=$WITH_ECHO \
26738                                 crenames=$cf_cv_prog_CC_c_o \
26739                                 cxxrenames=$cf_cv_prog_CXX_c_o \
26740                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
26741                         cf_subdirs="$cf_subdirs $cf_subdir"
26742                         done
26743                 done
26744         fi
26745
26746         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
26747 done
26748
26749 for cf_dir in $SRC_SUBDIRS
26750 do
26751         if test ! -d $srcdir/$cf_dir ; then
26752                 continue
26753         fi
26754
26755         if test -f $cf_dir/Makefile ; then
26756                 case "$cf_dir" in
26757                 (Ada95)
26758                         echo 'libs \' >> Makefile
26759                         echo 'install.libs \' >> Makefile
26760                         echo 'uninstall.libs ::' >> Makefile
26761                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
26762                         ;;
26763                 esac
26764         fi
26765
26766         if test -f $srcdir/$cf_dir/modules; then
26767                 echo >> Makefile
26768                 if test -f $srcdir/$cf_dir/headers; then
26769 cat >> Makefile <<CF_EOF
26770 install.includes \\
26771 uninstall.includes \\
26772 CF_EOF
26773                 fi
26774 if test "$cf_dir" != "c++" ; then
26775 echo 'lint \' >> Makefile
26776 fi
26777 cat >> Makefile <<CF_EOF
26778 libs \\
26779 lintlib \\
26780 install.libs \\
26781 uninstall.libs \\
26782 install.$cf_dir \\
26783 uninstall.$cf_dir ::
26784         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26785 CF_EOF
26786         elif test -f $srcdir/$cf_dir/headers; then
26787 cat >> Makefile <<CF_EOF
26788
26789 libs \\
26790 install.libs \\
26791 uninstall.libs \\
26792 install.includes \\
26793 uninstall.includes ::
26794         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
26795 CF_EOF
26796 fi
26797 done
26798
26799 if test "x$cf_with_db_install" = xyes; then
26800 cat >> Makefile <<CF_EOF
26801
26802 install.libs uninstall.libs \\
26803 install.data uninstall.data ::
26804 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26805 CF_EOF
26806 else
26807 cat >> Makefile <<CF_EOF
26808
26809 install.libs uninstall.libs ::
26810         cd misc && \${MAKE} \${TOP_MFLAGS} \$@
26811 CF_EOF
26812 fi
26813
26814 if test "x$cf_with_manpages" = xyes; then
26815 cat >> Makefile <<CF_EOF
26816
26817 install.man \\
26818 uninstall.man ::
26819         cd man && \${MAKE} \${TOP_MFLAGS} \$@
26820 CF_EOF
26821 fi
26822
26823 cat >> Makefile <<CF_EOF
26824
26825 distclean ::
26826         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
26827         rm -f headers.sh headers.sed mk_shared_lib.sh
26828         rm -f edit_man.* man_alias.*
26829         rm -rf \${DIRS_TO_MAKE}
26830 CF_EOF
26831
26832 # Special case: tack's manpage lives in its own directory.
26833 if test "x$cf_with_manpages" = xyes; then
26834 if test "x$cf_with_tack" = "xyes"; then
26835 cat >> Makefile <<CF_EOF
26836
26837 install.man \\
26838 uninstall.man ::
26839         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
26840 CF_EOF
26841 fi
26842 fi
26843
26844 rm -f headers.sed headers.sh
26845
26846 echo creating headers.sh
26847 cat >headers.sh <<CF_EOF
26848 #! $SHELL
26849 # This shell script is generated by the 'configure' script.  It is invoked in a
26850 # subdirectory of the build tree.  It generates a sed-script in the parent
26851 # directory that is used to adjust includes for header files that reside in a
26852 # subdirectory of /usr/include, etc.
26853 PRG=""
26854 while test \$# != 3
26855 do
26856 PRG="\$PRG \$1"; shift
26857 done
26858 DST=\$1
26859 REF=\$2
26860 SRC=\$3
26861 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
26862 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
26863 echo installing \$SRC in \$DST
26864 CF_EOF
26865
26866 if test $WITH_CURSES_H = yes; then
26867         cat >>headers.sh <<CF_EOF
26868 case \$DST in
26869 (/*/include/*)
26870         END=\`basename \$DST\`
26871         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26872         do
26873                 NAME=\`basename \$i\`
26874                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26875         done
26876         ;;
26877 (*)
26878         echo "" >> \$TMPSED
26879         ;;
26880 esac
26881 CF_EOF
26882
26883 else
26884         cat >>headers.sh <<CF_EOF
26885 case \$DST in
26886 (/*/include/*)
26887         END=\`basename \$DST\`
26888         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
26889         do
26890                 NAME=\`basename \$i\`
26891                 if test "\$NAME" = "curses.h"
26892                 then
26893                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26894                         NAME=ncurses.h
26895                 fi
26896                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
26897         done
26898         ;;
26899 (*)
26900         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
26901         ;;
26902 esac
26903 CF_EOF
26904 fi
26905 cat >>headers.sh <<CF_EOF
26906 rm -f \$TMPSRC
26907 sed -f \$TMPSED \$SRC > \$TMPSRC
26908 NAME=\`basename \$SRC\`
26909 CF_EOF
26910 if test $WITH_CURSES_H != yes; then
26911         cat >>headers.sh <<CF_EOF
26912 test "\$NAME" = "curses.h" && NAME=ncurses.h
26913 CF_EOF
26914 fi
26915 cat >>headers.sh <<CF_EOF
26916 # Just in case someone gzip'd manpages, remove the conflicting copy.
26917 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
26918
26919 eval \$PRG \$TMPSRC \$DST/\$NAME
26920 rm -f \$TMPSRC \$TMPSED
26921 CF_EOF
26922
26923 chmod 0755 headers.sh
26924
26925 for cf_dir in $SRC_SUBDIRS
26926 do
26927         if test ! -d $srcdir/$cf_dir ; then
26928                 continue
26929         fi
26930
26931         if test -f $srcdir/$cf_dir/headers; then
26932                 $AWK -f $srcdir/mk-hdr.awk \
26933                         subset="$LIB_SUBSETS" \
26934                         compat="$WITH_CURSES_H" \
26935                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
26936         fi
26937
26938         if test -f $srcdir/$cf_dir/modules; then
26939                 if test "$cf_dir" != "c++" ; then
26940                         cat >>$cf_dir/Makefile <<"CF_EOF"
26941 depend : ${AUTO_SRC}
26942         makedepend -- ${CPPFLAGS} -- ${C_SRC}
26943
26944 # DO NOT DELETE THIS LINE -- make depend depends on it.
26945 CF_EOF
26946                 fi
26947         fi
26948 done
26949
26950 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
26951 if test -z "$USE_OLD_MAKERULES" ; then
26952         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
26953 fi
26954 fi
26955  ;;
26956   esac
26957 done
26958 EOF
26959
26960 cat >>$CONFIG_STATUS <<\EOF
26961
26962 { (exit 0); exit 0; }
26963 EOF
26964 chmod +x $CONFIG_STATUS
26965 ac_clean_files=$ac_clean_files_save
26966
26967 # configure is writing to config.log, and then calls config.status.
26968 # config.status does its own redirection, appending to config.log.
26969 # Unfortunately, on DOS this fails, as config.log is still kept open
26970 # by configure, so config.status won't be able to write to it; its
26971 # output is simply discarded.  So we exec the FD to /dev/null,
26972 # effectively closing config.log, so it can be properly (re)opened and
26973 # appended to by config.status.  When coming back to configure, we
26974 # need to make the FD available again.
26975 if test "$no_create" != yes; then
26976   ac_cs_success=:
26977   exec 5>/dev/null
26978   $SHELL $CONFIG_STATUS || ac_cs_success=false
26979   exec 5>>config.log
26980   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26981   # would make configure fail if this is the last instruction.
26982   $ac_cs_success || { (exit 1); exit 1; }
26983 fi
26984 ${MAKE:-make} preinstall