]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ecf863ade4e37e4b8c54ded3e424756223e8362a
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.562 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20121002.
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 libdir='${exec_prefix}/lib'
180 includedir='${prefix}/include'
181 oldincludedir='/usr/include'
182 infodir='${datarootdir}/info'
183 mandir='${datarootdir}/man'
184
185 # Identity of this package.
186 PACKAGE_NAME=
187 PACKAGE_TARNAME=
188 PACKAGE_VERSION=
189 PACKAGE_STRING=
190 PACKAGE_BUGREPORT=
191
192 ac_prev=
193 for ac_option
194 do
195   # If the previous option needs an argument, assign it.
196   if test -n "$ac_prev"; then
197     eval "$ac_prev=\$ac_option"
198     ac_prev=
199     continue
200   fi
201
202   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
203
204   # Accept the important Cygnus configure options, so we can diagnose typos.
205
206   case $ac_option in
207
208   -bindir | --bindir | --bindi | --bind | --bin | --bi)
209     ac_prev=bindir ;;
210   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
211     bindir=$ac_optarg ;;
212
213   -build | --build | --buil | --bui | --bu)
214     ac_prev=build_alias ;;
215   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
216     build_alias=$ac_optarg ;;
217
218   -cache-file | --cache-file | --cache-fil | --cache-fi \
219   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
220     ac_prev=cache_file ;;
221   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
222   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
223     cache_file=$ac_optarg ;;
224
225   --config-cache | -C)
226     cache_file=config.cache ;;
227
228   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
229     ac_prev=datadir ;;
230   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
231   | --da=*)
232     datadir=$ac_optarg ;;
233
234   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
235   | --dataroo | --dataro | --datar)
236     ac_prev=datarootdir ;;
237   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
238   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
239     datarootdir=$ac_optarg ;;
240
241   -disable-* | --disable-*)
242     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
243     # Reject names that are not valid shell variable names.
244     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
245       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
246    { (exit 1); exit 1; }; }
247     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
248     eval "enable_$ac_feature=no" ;;
249
250   -enable-* | --enable-*)
251     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
252     # Reject names that are not valid shell variable names.
253     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
254       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
255    { (exit 1); exit 1; }; }
256     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
257     case $ac_option in
258       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
259       *) ac_optarg=yes ;;
260     esac
261     eval "enable_$ac_feature='$ac_optarg'" ;;
262
263   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
264   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
265   | --exec | --exe | --ex)
266     ac_prev=exec_prefix ;;
267   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
268   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
269   | --exec=* | --exe=* | --ex=*)
270     exec_prefix=$ac_optarg ;;
271
272   -gas | --gas | --ga | --g)
273     # Obsolete; use --with-gas.
274     with_gas=yes ;;
275
276   -help | --help | --hel | --he | -h)
277     ac_init_help=long ;;
278   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
279     ac_init_help=recursive ;;
280   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
281     ac_init_help=short ;;
282
283   -host | --host | --hos | --ho)
284     ac_prev=host_alias ;;
285   -host=* | --host=* | --hos=* | --ho=*)
286     host_alias=$ac_optarg ;;
287
288   -includedir | --includedir | --includedi | --included | --include \
289   | --includ | --inclu | --incl | --inc)
290     ac_prev=includedir ;;
291   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292   | --includ=* | --inclu=* | --incl=* | --inc=*)
293     includedir=$ac_optarg ;;
294
295   -infodir | --infodir | --infodi | --infod | --info | --inf)
296     ac_prev=infodir ;;
297   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298     infodir=$ac_optarg ;;
299
300   -libdir | --libdir | --libdi | --libd)
301     ac_prev=libdir ;;
302   -libdir=* | --libdir=* | --libdi=* | --libd=*)
303     libdir=$ac_optarg ;;
304
305   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306   | --libexe | --libex | --libe)
307     ac_prev=libexecdir ;;
308   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309   | --libexe=* | --libex=* | --libe=*)
310     libexecdir=$ac_optarg ;;
311
312   -localstatedir | --localstatedir | --localstatedi | --localstated \
313   | --localstate | --localstat | --localsta | --localst \
314   | --locals | --local | --loca | --loc | --lo)
315     ac_prev=localstatedir ;;
316   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319     localstatedir=$ac_optarg ;;
320
321   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
322     ac_prev=mandir ;;
323   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324     mandir=$ac_optarg ;;
325
326   -nfp | --nfp | --nf)
327     # Obsolete; use --without-fp.
328     with_fp=no ;;
329
330   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
331   | --no-cr | --no-c)
332     no_create=yes ;;
333
334   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
336     no_recursion=yes ;;
337
338   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340   | --oldin | --oldi | --old | --ol | --o)
341     ac_prev=oldincludedir ;;
342   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345     oldincludedir=$ac_optarg ;;
346
347   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
348     ac_prev=prefix ;;
349   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350     prefix=$ac_optarg ;;
351
352   -program-prefix | --program-prefix | --program-prefi | --program-pref \
353   | --program-pre | --program-pr | --program-p)
354     ac_prev=program_prefix ;;
355   -program-prefix=* | --program-prefix=* | --program-prefi=* \
356   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357     program_prefix=$ac_optarg ;;
358
359   -program-suffix | --program-suffix | --program-suffi | --program-suff \
360   | --program-suf | --program-su | --program-s)
361     ac_prev=program_suffix ;;
362   -program-suffix=* | --program-suffix=* | --program-suffi=* \
363   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364     program_suffix=$ac_optarg ;;
365
366   -program-transform-name | --program-transform-name \
367   | --program-transform-nam | --program-transform-na \
368   | --program-transform-n | --program-transform- \
369   | --program-transform | --program-transfor \
370   | --program-transfo | --program-transf \
371   | --program-trans | --program-tran \
372   | --progr-tra | --program-tr | --program-t)
373     ac_prev=program_transform_name ;;
374   -program-transform-name=* | --program-transform-name=* \
375   | --program-transform-nam=* | --program-transform-na=* \
376   | --program-transform-n=* | --program-transform-=* \
377   | --program-transform=* | --program-transfor=* \
378   | --program-transfo=* | --program-transf=* \
379   | --program-trans=* | --program-tran=* \
380   | --progr-tra=* | --program-tr=* | --program-t=*)
381     program_transform_name=$ac_optarg ;;
382
383   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384   | -silent | --silent | --silen | --sile | --sil)
385     silent=yes ;;
386
387   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
388     ac_prev=sbindir ;;
389   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
390   | --sbi=* | --sb=*)
391     sbindir=$ac_optarg ;;
392
393   -sharedstatedir | --sharedstatedir | --sharedstatedi \
394   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395   | --sharedst | --shareds | --shared | --share | --shar \
396   | --sha | --sh)
397     ac_prev=sharedstatedir ;;
398   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
401   | --sha=* | --sh=*)
402     sharedstatedir=$ac_optarg ;;
403
404   -site | --site | --sit)
405     ac_prev=site ;;
406   -site=* | --site=* | --sit=*)
407     site=$ac_optarg ;;
408
409   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
410     ac_prev=srcdir ;;
411   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412     srcdir=$ac_optarg ;;
413
414   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415   | --syscon | --sysco | --sysc | --sys | --sy)
416     ac_prev=sysconfdir ;;
417   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419     sysconfdir=$ac_optarg ;;
420
421   -target | --target | --targe | --targ | --tar | --ta | --t)
422     ac_prev=target_alias ;;
423   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424     target_alias=$ac_optarg ;;
425
426   -v | -verbose | --verbose | --verbos | --verbo | --verb)
427     verbose=yes ;;
428
429   -version | --version | --versio | --versi | --vers | -V)
430     ac_init_version=: ;;
431
432   -with-* | --with-*)
433     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
434     # Reject names that are not valid shell variable names.
435     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
436       { echo "$as_me: error: invalid package name: $ac_package" >&2
437    { (exit 1); exit 1; }; }
438     ac_package=`echo $ac_package| sed 's/-/_/g'`
439     case $ac_option in
440       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
441       *) ac_optarg=yes ;;
442     esac
443     eval "with_$ac_package='$ac_optarg'" ;;
444
445   -without-* | --without-*)
446     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
447     # Reject names that are not valid shell variable names.
448     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449       { echo "$as_me: error: invalid package name: $ac_package" >&2
450    { (exit 1); exit 1; }; }
451     ac_package=`echo $ac_package | sed 's/-/_/g'`
452     eval "with_$ac_package=no" ;;
453
454   --x)
455     # Obsolete; use --with-x.
456     with_x=yes ;;
457
458   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
459   | --x-incl | --x-inc | --x-in | --x-i)
460     ac_prev=x_includes ;;
461   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
462   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
463     x_includes=$ac_optarg ;;
464
465   -x-libraries | --x-libraries | --x-librarie | --x-librari \
466   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
467     ac_prev=x_libraries ;;
468   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
469   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
470     x_libraries=$ac_optarg ;;
471
472   -*) { echo "$as_me: error: unrecognized option: $ac_option
473 Try \`$0 --help' for more information." >&2
474    { (exit 1); exit 1; }; }
475     ;;
476
477   *=*)
478     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
479     # Reject names that are not valid shell variable names.
480     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
481       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
482    { (exit 1); exit 1; }; }
483     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
484     eval "$ac_envvar='$ac_optarg'"
485     export $ac_envvar ;;
486
487   *)
488     # FIXME: should be removed in autoconf 3.0.
489     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
490     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
491       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
492     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
493     ;;
494
495   esac
496 done
497
498 if test -n "$ac_prev"; then
499   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
500   { echo "$as_me: error: missing argument to $ac_option" >&2
501    { (exit 1); exit 1; }; }
502 fi
503
504 # Be sure to have absolute paths.
505 for ac_var in exec_prefix prefix
506 do
507   eval ac_val=$`echo $ac_var`
508   case $ac_val in
509     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
510     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
511    { (exit 1); exit 1; }; };;
512   esac
513 done
514
515 # Be sure to have absolute paths.
516 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
517               localstatedir libdir includedir oldincludedir infodir mandir
518 do
519   eval ac_val=$`echo $ac_var`
520   case $ac_val in
521     [\\/$]* | ?:[\\/]* ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # There might be people who depend on the old broken behavior: `$host'
528 # used to hold the argument of --host etc.
529 build=$build_alias
530 host=$host_alias
531 target=$target_alias
532
533 # FIXME: should be removed in autoconf 3.0.
534 if test "x$host_alias" != x; then
535   if test "x$build_alias" = x; then
536     cross_compiling=maybe
537     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
538     If a cross compiler is detected then cross compile mode will be used." >&2
539   elif test "x$build_alias" != "x$host_alias"; then
540     cross_compiling=yes
541   fi
542 fi
543
544 ac_tool_prefix=
545 test -n "$host_alias" && ac_tool_prefix=$host_alias-
546
547 test "$silent" = yes && exec 6>/dev/null
548
549 # Find the source files, if location was not specified.
550 if test -z "$srcdir"; then
551   ac_srcdir_defaulted=yes
552   # Try the directory containing this script, then its parent.
553   ac_prog=$0
554   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
555   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
556   srcdir=$ac_confdir
557   if test ! -r $srcdir/$ac_unique_file; then
558     srcdir=..
559   fi
560 else
561   ac_srcdir_defaulted=no
562 fi
563 if test ! -r $srcdir/$ac_unique_file; then
564   if test "$ac_srcdir_defaulted" = yes; then
565     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
566    { (exit 1); exit 1; }; }
567   else
568     { echo "$as_me: error: cannot find sources in $srcdir" >&2
569    { (exit 1); exit 1; }; }
570   fi
571 fi
572 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
573 ac_env_build_alias_set=${build_alias+set}
574 ac_env_build_alias_value=$build_alias
575 ac_cv_env_build_alias_set=${build_alias+set}
576 ac_cv_env_build_alias_value=$build_alias
577 ac_env_host_alias_set=${host_alias+set}
578 ac_env_host_alias_value=$host_alias
579 ac_cv_env_host_alias_set=${host_alias+set}
580 ac_cv_env_host_alias_value=$host_alias
581 ac_env_target_alias_set=${target_alias+set}
582 ac_env_target_alias_value=$target_alias
583 ac_cv_env_target_alias_set=${target_alias+set}
584 ac_cv_env_target_alias_value=$target_alias
585 ac_env_CC_set=${CC+set}
586 ac_env_CC_value=$CC
587 ac_cv_env_CC_set=${CC+set}
588 ac_cv_env_CC_value=$CC
589 ac_env_CFLAGS_set=${CFLAGS+set}
590 ac_env_CFLAGS_value=$CFLAGS
591 ac_cv_env_CFLAGS_set=${CFLAGS+set}
592 ac_cv_env_CFLAGS_value=$CFLAGS
593 ac_env_LDFLAGS_set=${LDFLAGS+set}
594 ac_env_LDFLAGS_value=$LDFLAGS
595 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
596 ac_cv_env_LDFLAGS_value=$LDFLAGS
597 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
598 ac_env_CPPFLAGS_value=$CPPFLAGS
599 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
600 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
601 ac_env_CPP_set=${CPP+set}
602 ac_env_CPP_value=$CPP
603 ac_cv_env_CPP_set=${CPP+set}
604 ac_cv_env_CPP_value=$CPP
605 ac_env_CXX_set=${CXX+set}
606 ac_env_CXX_value=$CXX
607 ac_cv_env_CXX_set=${CXX+set}
608 ac_cv_env_CXX_value=$CXX
609 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
610 ac_env_CXXFLAGS_value=$CXXFLAGS
611 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
612 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
613 ac_env_CXXCPP_set=${CXXCPP+set}
614 ac_env_CXXCPP_value=$CXXCPP
615 ac_cv_env_CXXCPP_set=${CXXCPP+set}
616 ac_cv_env_CXXCPP_value=$CXXCPP
617
618 #
619 # Report the --help message.
620 #
621 if test "$ac_init_help" = "long"; then
622   # Omit some internal or obsolete options to make the list less imposing.
623   # This message is too long to be a string in the A/UX 3.1 sh.
624   cat <<EOF
625 \`configure' configures this package to adapt to many kinds of systems.
626
627 Usage: $0 [OPTION]... [VAR=VALUE]...
628
629 To assign environment variables (e.g., CC, CFLAGS...), specify them as
630 VAR=VALUE.  See below for descriptions of some of the useful variables.
631
632 Defaults for the options are specified in brackets.
633
634 Configuration:
635   -h, --help              display this help and exit
636       --help=short        display options specific to this package
637       --help=recursive    display the short help of all the included packages
638   -V, --version           display version information and exit
639   -q, --quiet, --silent   do not print \`checking...' messages
640       --cache-file=FILE   cache test results in FILE [disabled]
641   -C, --config-cache      alias for \`--cache-file=config.cache'
642   -n, --no-create         do not create output files
643       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
644
645 EOF
646
647   cat <<EOF
648 Installation directories:
649   --prefix=PREFIX         install architecture-independent files in PREFIX
650                           [$ac_default_prefix]
651   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
652                           [PREFIX]
653
654 By default, \`make install' will install all the files in
655 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
656 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
657 for instance \`--prefix=\$HOME'.
658
659 For better control, use the options below.
660
661 Fine tuning of the installation directories:
662   --bindir=DIR            user executables [EPREFIX/bin]
663   --sbindir=DIR           system admin executables [EPREFIX/sbin]
664   --libexecdir=DIR        program executables [EPREFIX/libexec]
665   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
666   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
667   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
668   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
669   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
670   --libdir=DIR            object code libraries [EPREFIX/lib]
671   --includedir=DIR        C header files [PREFIX/include]
672   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673   --infodir=DIR           info documentation [DATAROOTDIR/info]
674   --mandir=DIR            man documentation [DATAROOTDIR/man]
675 EOF
676
677   cat <<\EOF
678
679 Program names:
680   --program-prefix=PREFIX            prepend PREFIX to installed program names
681   --program-suffix=SUFFIX            append SUFFIX to installed program names
682   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684 System types:
685   --build=BUILD           configure for building on BUILD [guessed]
686   --host=HOST       build programs to run on HOST [BUILD]
687   --target=TARGET   configure for building compilers for TARGET [HOST]
688 EOF
689 fi
690
691 if test -n "$ac_init_help"; then
692
693   cat <<\EOF
694
695 Optional Packages:
696   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
697   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
698
699 Optional Features:
700   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
701   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
702
703   --with-rel-version=XXX  override derived release version
704   --with-abi-version=XXX  override derived ABI version
705   --with-system-type=XXX  test: override derived host system-type
706   --without-ada           suppress check for Ada95, don't build demo
707   --without-cxx           do not adjust ncurses bool to match C++
708   --without-cxx-binding   do not build C++ binding and demo
709   --without-manpages      suppress install of manpages
710   --without-progs         suppress build with programs (e.g., tic)
711   --without-tests         suppress build with test-programs
712   --without-curses-h      install curses.h as ncurses.h only
713   --with-pkg-config{=path} enable/disable use of pkg-config
714   --with-pkg-config-libdir=XXX use given directory for installing pc-files
715   --enable-pc-files       generate and install .pc files for pkg-config
716   --enable-mixed-case     tic should assume mixed-case filenames
717   --with-install-prefix   prefixes actual install-location ($DESTDIR)
718 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
719   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
720   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
721   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
722   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
723   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
724   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
725 Options to Specify the Libraries Built/Used:
726   --disable-libtool-version  enable to use libtool's incompatible naming scheme
727   --with-libtool          generate libraries with libtool
728   --with-shared           generate shared-libraries
729   --with-normal           generate normal-libraries (default)
730   --with-debug            generate debug-libraries (default)
731   --with-profile          generate profile-libraries
732   --with-lib-prefix       override library-prefix
733   --with-termlib          generate separate terminfo library
734   --with-ticlib           generate separate tic library
735   --with-gpm              use Alessandro Rubini's GPM library
736   --without-dlsym         do not use dlsym() to load GPM dynamically
737   --with-sysmouse         use sysmouse (FreeBSD console)
738   --enable-rpath          use rpath option when generating shared libraries
739   --disable-relink        relink shared libraries during install
740   --with-shlib-version=X  Specify rel or abi version for shared libs
741   --disable-rpath-hack    don't add rpath options for additional libraries
742 Fine-Tuning Your Configuration:
743   --disable-overwrite     leave out the link to -lcurses
744   --disable-database      do not use terminfo, only fallbacks/termcap
745   --with-database=XXX     specify terminfo source to install
746   --with-hashed-db        specify hashed-database library
747   --with-fallbacks=XXX    specify list of fallback terminal descriptions
748   --without-xterm-new     specify if xterm terminfo should be old version
749   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
750   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
751   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
752   --disable-big-core      assume machine has little memory
753   --disable-big-strings   assume compiler has only standard-size strings
754   --enable-termcap        compile in termcap fallback support
755   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
756   --enable-getcap         fast termcap load, no xrefs to terminfo
757   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
758   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
759   --disable-root-environ  restrict environment when running as root
760   --enable-symlinks       make tic use symbolic links not hard links
761   --enable-broken_linker  compile with broken-linker support code
762   --enable-bsdpad         recognize BSD-style prefix padding
763   --enable-widec          compile with wide-char/UTF-8 code
764   --disable-lp64          allow chtype to be long (ignore _LP64)
765   --disable-largefile     omit support for large files
766   --disable-tparm-varargs compile tparm() without varargs interface
767   --disable-tic-depends   link tic library without explicit dependency on ncurses library
768   --with-bool=TYPE        override fallback type of bool variable
769   --with-caps=alt         compile with alternate Caps file
770   --with-chtype=TYPE      override type of chtype
771   --with-ospeed=TYPE      override type of ospeed variable
772   --with-mmask-t=TYPE     override type of mmask_t
773   --with-ccharw-max=XXX   override size CCHARW_MAX
774   --with-tparm-arg=TYPE   override parameter type of tparm
775   --with-rcs-ids          compile-in RCS identifiers
776 Options to Specify How Manpages are Installed:
777   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
778                           optionally formatted/catonly, e.g., gzip,formatted
779   --with-manpage-renames  specify manpage-renaming
780   --with-manpage-aliases  specify manpage-aliases using .so
781   --with-manpage-symlinks specify manpage-aliases using symlinks
782   --with-manpage-tbl      specify manpage processing with tbl
783 Extensions:
784   --disable-ext-funcs     disable function-extensions
785   --enable-sp-funcs       enable experimental SCREEN-extensions
786   --enable-term-driver    enable experimental terminal-driver
787   --enable-const          compile with extra/non-standard const
788   --enable-ext-colors     compile for 256-color support
789   --enable-ext-mouse      compile for extended mouse-encoding
790   --enable-no-padding     compile with $NCURSES_NO_PADDING code
791   --enable-signed-char    compile using signed Boolean's in term.h
792   --enable-sigwinch       compile with SIGWINCH handler
793   --enable-tcap-names     compile with user-definable terminal capabilities
794 Development Code:
795   --without-develop       disable development options
796   --enable-hard-tabs      compile with hard-tabs code
797   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
798 Experimental Code:
799   --disable-assumed-color do not assume anything about default-colors
800   --disable-hashmap       compile without hashmap scrolling-optimization
801   --enable-colorfgbg      compile-in experimental $COLORFGBG code
802   --enable-interop        compile-in experimental interop bindings
803   --with-pthread          use POSIX thread library
804   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
805   --enable-weak-symbols   enable weak-symbols for pthreads
806   --enable-reentrant      compile with experimental reentrant code
807   --with-wrap-prefix=XXX  override prefix used for public variables
808   --enable-safe-sprintf   compile with experimental safe-sprintf code
809   --disable-scroll-hints  compile without scroll-hints code
810   --enable-wgetch-events  compile with experimental wgetch-events code
811 Testing/development Options:
812   --disable-echo          do not display "compiling" commands
813   --enable-warnings       build: turn on GCC compiler warnings
814   --enable-string-hacks   work around bogus compiler/loader warnings
815   --enable-assertions     test: turn on generation of assertion code
816   --with-dmalloc          test: use Gray Watson's dmalloc library
817   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
818   --with-valgrind         test: use valgrind
819   --disable-leaks         test: free permanent memory, analyze leaks
820   --enable-expanded       test: generate functions for certain macros
821   --disable-macros        test: use functions rather than macros
822   --with-trace            test: add trace() function to all models of ncurses
823 Ada95 Binding Options:
824   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
825   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
826   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
827   --with-ada-sharedlib=XX build Ada95 shared-library
828
829 Some influential environment variables:
830   CC          C compiler command
831   CFLAGS      C compiler flags
832   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
833               nonstandard directory <lib dir>
834   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
835               headers in a nonstandard directory <include dir>
836   CPP         C preprocessor
837   CXX         C++ compiler command
838   CXXFLAGS    C++ compiler flags
839   CXXCPP      C++ preprocessor
840
841 Use these variables to override the choices made by `configure' or to help
842 it to find libraries and programs with nonstandard names/locations.
843
844 EOF
845 fi
846
847 if test "$ac_init_help" = "recursive"; then
848   # If there are subdirs, report their specific --help.
849   ac_popdir=`pwd`
850   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
851     cd $ac_subdir
852     # A "../" for each directory in /$ac_subdir.
853     ac_dots=`echo $ac_subdir |
854              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
855
856     case $srcdir in
857     .) # No --srcdir option.  We are building in place.
858       ac_sub_srcdir=$srcdir ;;
859     [\\/]* | ?:[\\/]* ) # Absolute path.
860       ac_sub_srcdir=$srcdir/$ac_subdir ;;
861     *) # Relative path.
862       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
863     esac
864
865     # Check for guested configure; otherwise get Cygnus style configure.
866     if test -f $ac_sub_srcdir/configure.gnu; then
867       echo
868       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
869     elif test -f $ac_sub_srcdir/configure; then
870       echo
871       $SHELL $ac_sub_srcdir/configure  --help=recursive
872     elif test -f $ac_sub_srcdir/configure.ac ||
873            test -f $ac_sub_srcdir/configure.in; then
874       echo
875       $ac_configure --help
876     else
877       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
878     fi
879     cd $ac_popdir
880   done
881 fi
882
883 test -n "$ac_init_help" && exit 0
884 if $ac_init_version; then
885   cat <<\EOF
886
887 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
888 Free Software Foundation, Inc.
889 This configure script is free software; the Free Software Foundation
890 gives unlimited permission to copy, distribute and modify it.
891 EOF
892   exit 0
893 fi
894 exec 5>config.log
895 cat >&5 <<EOF
896 This file contains any messages produced by compilers while
897 running configure, to aid debugging if configure makes a mistake.
898
899 It was created by $as_me, which was
900 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
901
902   $ $0 $@
903
904 EOF
905 {
906 cat <<_ASUNAME
907 ## ---------- ##
908 ## Platform.  ##
909 ## ---------- ##
910
911 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
912 uname -m = `(uname -m) 2>/dev/null || echo unknown`
913 uname -r = `(uname -r) 2>/dev/null || echo unknown`
914 uname -s = `(uname -s) 2>/dev/null || echo unknown`
915 uname -v = `(uname -v) 2>/dev/null || echo unknown`
916
917 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
918 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
919
920 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
921 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
922 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
923 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
924 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
925 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
926 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
927
928 PATH = $PATH
929
930 _ASUNAME
931 } >&5
932
933 cat >&5 <<EOF
934 ## ------------ ##
935 ## Core tests.  ##
936 ## ------------ ##
937
938 EOF
939
940 # Keep a trace of the command line.
941 # Strip out --no-create and --no-recursion so they do not pile up.
942 # Also quote any args containing shell meta-characters.
943 ac_configure_args=
944 ac_sep=
945 for ac_arg
946 do
947   case $ac_arg in
948   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949   | --no-cr | --no-c) ;;
950   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
952   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
953     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
954     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
955     ac_sep=" " ;;
956   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
957      ac_sep=" " ;;
958   esac
959   # Get rid of the leading space.
960 done
961
962 # When interrupted or exit'd, cleanup temporary files, and complete
963 # config.log.  We remove comments because anyway the quotes in there
964 # would cause problems or look ugly.
965 trap 'exit_status=$?
966   # Save into config.log some information that might help in debugging.
967   echo >&5
968   echo "## ----------------- ##" >&5
969   echo "## Cache variables.  ##" >&5
970   echo "## ----------------- ##" >&5
971   echo >&5
972   # The following way of writing the cache mishandles newlines in values,
973 {
974   (set) 2>&1 |
975     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
976     *ac_space=\ *)
977       sed -n \
978         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
979           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
980       ;;
981     *)
982       sed -n \
983         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
984       ;;
985     esac;
986 } >&5
987   sed "/^$/d" confdefs.h >conftest.log
988   if test -s conftest.log; then
989     echo >&5
990     echo "## ------------ ##" >&5
991     echo "## confdefs.h.  ##" >&5
992     echo "## ------------ ##" >&5
993     echo >&5
994     cat conftest.log >&5
995   fi
996   (echo; echo) >&5
997   test "$ac_signal" != 0 &&
998     echo "$as_me: caught signal $ac_signal" >&5
999   echo "$as_me: exit $exit_status" >&5
1000   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1001     exit $exit_status
1002      ' 0
1003 for ac_signal in 1 2 13 15; do
1004   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1005 done
1006 ac_signal=0
1007
1008 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1009 rm -rf conftest* confdefs.h
1010 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1011 echo >confdefs.h
1012
1013 # Let the site file select an alternate cache file if it wants to.
1014 # Prefer explicitly selected file to automatically selected ones.
1015 if test -z "$CONFIG_SITE"; then
1016   if test "x$prefix" != xNONE; then
1017     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1018   else
1019     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1020   fi
1021 fi
1022 for ac_site_file in $CONFIG_SITE; do
1023   if test -r "$ac_site_file"; then
1024     { echo "$as_me:1024: loading site script $ac_site_file" >&5
1025 echo "$as_me: loading site script $ac_site_file" >&6;}
1026     cat "$ac_site_file" >&5
1027     . "$ac_site_file"
1028   fi
1029 done
1030
1031 if test -r "$cache_file"; then
1032   # Some versions of bash will fail to source /dev/null (special
1033   # files actually), so we avoid doing that.
1034   if test -f "$cache_file"; then
1035     { echo "$as_me:1035: loading cache $cache_file" >&5
1036 echo "$as_me: loading cache $cache_file" >&6;}
1037     case $cache_file in
1038       [\\/]* | ?:[\\/]* ) . $cache_file;;
1039       *)                      . ./$cache_file;;
1040     esac
1041   fi
1042 else
1043   { echo "$as_me:1043: creating cache $cache_file" >&5
1044 echo "$as_me: creating cache $cache_file" >&6;}
1045   >$cache_file
1046 fi
1047
1048 # Check that the precious variables saved in the cache have kept the same
1049 # value.
1050 ac_cache_corrupted=false
1051 for ac_var in `(set) 2>&1 |
1052                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1053   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1054   eval ac_new_set=\$ac_env_${ac_var}_set
1055   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1056   eval ac_new_val="\$ac_env_${ac_var}_value"
1057   case $ac_old_set,$ac_new_set in
1058     set,)
1059       { echo "$as_me:1059: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1060 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1061       ac_cache_corrupted=: ;;
1062     ,set)
1063       { echo "$as_me:1063: error: \`$ac_var' was not set in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,);;
1067     *)
1068       if test "x$ac_old_val" != "x$ac_new_val"; then
1069         { echo "$as_me:1069: error: \`$ac_var' has changed since the previous run:" >&5
1070 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1071         { echo "$as_me:1071:   former value:  $ac_old_val" >&5
1072 echo "$as_me:   former value:  $ac_old_val" >&2;}
1073         { echo "$as_me:1073:   current value: $ac_new_val" >&5
1074 echo "$as_me:   current value: $ac_new_val" >&2;}
1075         ac_cache_corrupted=:
1076       fi;;
1077   esac
1078   # Pass precious variables to config.status.  It doesn't matter if
1079   # we pass some twice (in addition to the command line arguments).
1080   if test "$ac_new_set" = set; then
1081     case $ac_new_val in
1082     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1083       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1084       ac_configure_args="$ac_configure_args '$ac_arg'"
1085       ;;
1086     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1087        ;;
1088     esac
1089   fi
1090 done
1091 if $ac_cache_corrupted; then
1092   { echo "$as_me:1092: error: changes in the environment can compromise the build" >&5
1093 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1094   { { echo "$as_me:1094: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1095 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1096    { (exit 1); exit 1; }; }
1097 fi
1098
1099 ac_ext=c
1100 ac_cpp='$CPP $CPPFLAGS'
1101 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1102 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1103 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1104 ac_main_return=return
1105
1106 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1107   *c*,-n*) ECHO_N= ECHO_C='
1108 ' ECHO_T='      ' ;;
1109   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1110   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1111 esac
1112 echo "#! $SHELL" >conftest.sh
1113 echo  "exit 0"   >>conftest.sh
1114 chmod +x conftest.sh
1115 if { (echo "$as_me:1115: PATH=\".;.\"; conftest.sh") >&5
1116   (PATH=".;."; conftest.sh) 2>&5
1117   ac_status=$?
1118   echo "$as_me:1118: \$? = $ac_status" >&5
1119   (exit $ac_status); }; then
1120   ac_path_separator=';'
1121 else
1122   ac_path_separator=:
1123 fi
1124 PATH_SEPARATOR="$ac_path_separator"
1125 rm -f conftest.sh
1126
1127 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1128
1129 top_builddir=`pwd`
1130
1131 echo "$as_me:1131: checking for egrep" >&5
1132 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1133 if test "${ac_cv_prog_egrep+set}" = set; then
1134   echo $ECHO_N "(cached) $ECHO_C" >&6
1135 else
1136   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1137     then ac_cv_prog_egrep='grep -E'
1138     else ac_cv_prog_egrep='egrep'
1139     fi
1140 fi
1141 echo "$as_me:1141: result: $ac_cv_prog_egrep" >&5
1142 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1143  EGREP=$ac_cv_prog_egrep
1144
1145 test -z "$EGREP" && { { echo "$as_me:1145: error: No egrep program found" >&5
1146 echo "$as_me: error: No egrep program found" >&2;}
1147    { (exit 1); exit 1; }; }
1148
1149 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1150 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1151 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1152 cf_cv_abi_version=${NCURSES_MAJOR}
1153 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1154 cf_cv_timestamp=`date`
1155 echo "$as_me:1155: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1156 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1157
1158 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1159
1160 # Check whether --with-rel-version or --without-rel-version was given.
1161 if test "${with_rel_version+set}" = set; then
1162   withval="$with_rel_version"
1163   { echo "$as_me:1163: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1164 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1165  cf_cv_rel_version=$withval
1166 fi;
1167
1168  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1169  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1170
1171 if test -n "$NCURSES_MAJOR" ; then
1172   case $NCURSES_MAJOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1177 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release major-version value is empty" >&5
1183 echo "$as_me: error: Release major-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 if test -n "$NCURSES_MINOR" ; then
1188   case $NCURSES_MINOR in #(vi
1189   [0-9]*) #(vi
1190         ;;
1191   *)
1192         { { echo "$as_me:1192: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1193 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1194    { (exit 1); exit 1; }; }
1195         ;;
1196   esac
1197 else
1198   { { echo "$as_me:1198: error: Release minor-version value is empty" >&5
1199 echo "$as_me: error: Release minor-version value is empty" >&2;}
1200    { (exit 1); exit 1; }; }
1201 fi
1202
1203 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1204
1205 # Check whether --with-abi-version or --without-abi-version was given.
1206 if test "${with_abi_version+set}" = set; then
1207   withval="$with_abi_version"
1208   { echo "$as_me:1208: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1209 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1210  cf_cv_abi_version=$withval
1211 fi;
1212
1213 if test -n "$cf_cv_abi_version" ; then
1214   case $cf_cv_abi_version in #(vi
1215   [0-9]*) #(vi
1216         ;;
1217   *)
1218         { { echo "$as_me:1218: error: ABI version is not a number: $cf_cv_abi_version" >&5
1219 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1220    { (exit 1); exit 1; }; }
1221         ;;
1222   esac
1223 else
1224   { { echo "$as_me:1224: error: ABI version value is empty" >&5
1225 echo "$as_me: error: ABI version value is empty" >&2;}
1226    { (exit 1); exit 1; }; }
1227 fi
1228
1229 ac_aux_dir=
1230 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1231   if test -f $ac_dir/install-sh; then
1232     ac_aux_dir=$ac_dir
1233     ac_install_sh="$ac_aux_dir/install-sh -c"
1234     break
1235   elif test -f $ac_dir/install.sh; then
1236     ac_aux_dir=$ac_dir
1237     ac_install_sh="$ac_aux_dir/install.sh -c"
1238     break
1239   elif test -f $ac_dir/shtool; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/shtool install -c"
1242     break
1243   fi
1244 done
1245 if test -z "$ac_aux_dir"; then
1246   { { echo "$as_me:1246: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1247 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1248    { (exit 1); exit 1; }; }
1249 fi
1250 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1251 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1252 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1253
1254 # Make sure we can run config.sub.
1255 $ac_config_sub sun4 >/dev/null 2>&1 ||
1256   { { echo "$as_me:1256: error: cannot run $ac_config_sub" >&5
1257 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1258    { (exit 1); exit 1; }; }
1259
1260 echo "$as_me:1260: checking build system type" >&5
1261 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1262 if test "${ac_cv_build+set}" = set; then
1263   echo $ECHO_N "(cached) $ECHO_C" >&6
1264 else
1265   ac_cv_build_alias=$build_alias
1266 test -z "$ac_cv_build_alias" &&
1267   ac_cv_build_alias=`$ac_config_guess`
1268 test -z "$ac_cv_build_alias" &&
1269   { { echo "$as_me:1269: error: cannot guess build type; you must specify one" >&5
1270 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1271    { (exit 1); exit 1; }; }
1272 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1273   { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1274 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1275    { (exit 1); exit 1; }; }
1276
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_build" >&5
1279 echo "${ECHO_T}$ac_cv_build" >&6
1280 build=$ac_cv_build
1281 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1282 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1283 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1284
1285 echo "$as_me:1285: checking host system type" >&5
1286 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1287 if test "${ac_cv_host+set}" = set; then
1288   echo $ECHO_N "(cached) $ECHO_C" >&6
1289 else
1290   ac_cv_host_alias=$host_alias
1291 test -z "$ac_cv_host_alias" &&
1292   ac_cv_host_alias=$ac_cv_build_alias
1293 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1294   { { echo "$as_me:1294: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1295 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1296    { (exit 1); exit 1; }; }
1297
1298 fi
1299 echo "$as_me:1299: result: $ac_cv_host" >&5
1300 echo "${ECHO_T}$ac_cv_host" >&6
1301 host=$ac_cv_host
1302 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1303 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1304 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1305
1306 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1307         echo "$as_me:1307: checking target system type" >&5
1308 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1309 if test "${ac_cv_target+set}" = set; then
1310   echo $ECHO_N "(cached) $ECHO_C" >&6
1311 else
1312   ac_cv_target_alias=$target_alias
1313 test "x$ac_cv_target_alias" = "x" &&
1314   ac_cv_target_alias=$ac_cv_host_alias
1315 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1316   { { echo "$as_me:1316: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1317 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320 fi
1321 echo "$as_me:1321: result: $ac_cv_target" >&5
1322 echo "${ECHO_T}$ac_cv_target" >&6
1323 target=$ac_cv_target
1324 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1325 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1326 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1327
1328 # The aliases save the names the user supplied, while $host etc.
1329 # will get canonicalized.
1330 test -n "$target_alias" &&
1331   test "$program_prefix$program_suffix$program_transform_name" = \
1332     NONENONEs,x,x, &&
1333   program_prefix=${target_alias}-
1334         system_name="$host_os"
1335 else
1336         system_name="`(uname -s -r) 2>/dev/null`"
1337         if test -z "$system_name" ; then
1338                 system_name="`(hostname) 2>/dev/null`"
1339         fi
1340 fi
1341 test -n "$system_name" &&
1342 cat >>confdefs.h <<EOF
1343 #define SYSTEM_NAME "$system_name"
1344 EOF
1345
1346 if test "${cf_cv_system_name+set}" = set; then
1347   echo $ECHO_N "(cached) $ECHO_C" >&6
1348 else
1349   cf_cv_system_name="$system_name"
1350 fi
1351
1352 test -z "$system_name" && system_name="$cf_cv_system_name"
1353 test -n "$cf_cv_system_name" && echo "$as_me:1353: result: Configuring for $cf_cv_system_name" >&5
1354 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1355
1356 if test ".$system_name" != ".$cf_cv_system_name" ; then
1357         echo "$as_me:1357: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1358 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1359         { { echo "$as_me:1359: error: \"Please remove config.cache and try again.\"" >&5
1360 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1361    { (exit 1); exit 1; }; }
1362 fi
1363
1364 # Check whether --with-system-type or --without-system-type was given.
1365 if test "${with_system_type+set}" = set; then
1366   withval="$with_system_type"
1367   { echo "$as_me:1367: WARNING: overriding system type to $withval" >&5
1368 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1369         cf_cv_system_name=$withval
1370         host_os=$withval
1371
1372 fi;
1373
1374 ###     Save the given $CFLAGS to allow user-override.
1375 cf_user_CFLAGS="$CFLAGS"
1376
1377 ###     Default install-location
1378
1379 echo "$as_me:1379: checking for prefix" >&5
1380 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1381 if test "x$prefix" = "xNONE" ; then
1382         case "$cf_cv_system_name" in
1383                 # non-vendor systems don't have a conflict
1384         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1385                 prefix=/usr
1386                 ;;
1387         *)      prefix=$ac_default_prefix
1388                 ;;
1389         esac
1390 fi
1391 echo "$as_me:1391: result: $prefix" >&5
1392 echo "${ECHO_T}$prefix" >&6
1393
1394 if test "x$prefix" = "xNONE" ; then
1395 echo "$as_me:1395: checking for default include-directory" >&5
1396 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1397 test -n "$verbose" && echo 1>&6
1398 for cf_symbol in \
1399         $includedir \
1400         $includedir/ncurses \
1401         $prefix/include \
1402         $prefix/include/ncurses \
1403         /usr/local/include \
1404         /usr/local/include/ncurses \
1405         /usr/include \
1406         /usr/include/ncurses
1407 do
1408         cf_dir=`eval echo $cf_symbol`
1409         if test -f $cf_dir/curses.h ; then
1410         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1411                 includedir="$cf_symbol"
1412                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1413                 break
1414         fi
1415         fi
1416         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1417 done
1418 echo "$as_me:1418: result: $includedir" >&5
1419 echo "${ECHO_T}$includedir" >&6
1420 fi
1421
1422 ###     Checks for programs.
1423
1424 # Check whether --with-ada or --without-ada was given.
1425 if test "${with_ada+set}" = set; then
1426   withval="$with_ada"
1427   cf_with_ada=$withval
1428 else
1429   cf_with_ada=yes
1430 fi;
1431 if test "x$cf_with_ada" = xyes
1432 then
1433         cf_PROG_CC="gnatgcc gcc cc"
1434 else
1435         cf_PROG_CC="gcc cc"
1436 fi
1437
1438 ac_ext=c
1439 ac_cpp='$CPP $CPPFLAGS'
1440 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1441 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1442 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1443 ac_main_return=return
1444 if test -n "$ac_tool_prefix"; then
1445   for ac_prog in $cf_PROG_CC
1446   do
1447     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1448 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1449 echo "$as_me:1449: checking for $ac_word" >&5
1450 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1451 if test "${ac_cv_prog_CC+set}" = set; then
1452   echo $ECHO_N "(cached) $ECHO_C" >&6
1453 else
1454   if test -n "$CC"; then
1455   ac_cv_prog_CC="$CC" # Let the user override the test.
1456 else
1457   ac_save_IFS=$IFS; IFS=$ac_path_separator
1458 ac_dummy="$PATH"
1459 for ac_dir in $ac_dummy; do
1460   IFS=$ac_save_IFS
1461   test -z "$ac_dir" && ac_dir=.
1462   $as_executable_p "$ac_dir/$ac_word" || continue
1463 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1464 echo "$as_me:1464: found $ac_dir/$ac_word" >&5
1465 break
1466 done
1467
1468 fi
1469 fi
1470 CC=$ac_cv_prog_CC
1471 if test -n "$CC"; then
1472   echo "$as_me:1472: result: $CC" >&5
1473 echo "${ECHO_T}$CC" >&6
1474 else
1475   echo "$as_me:1475: result: no" >&5
1476 echo "${ECHO_T}no" >&6
1477 fi
1478
1479     test -n "$CC" && break
1480   done
1481 fi
1482 if test -z "$CC"; then
1483   ac_ct_CC=$CC
1484   for ac_prog in $cf_PROG_CC
1485 do
1486   # Extract the first word of "$ac_prog", so it can be a program name with args.
1487 set dummy $ac_prog; ac_word=$2
1488 echo "$as_me:1488: checking for $ac_word" >&5
1489 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1490 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1491   echo $ECHO_N "(cached) $ECHO_C" >&6
1492 else
1493   if test -n "$ac_ct_CC"; then
1494   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1495 else
1496   ac_save_IFS=$IFS; IFS=$ac_path_separator
1497 ac_dummy="$PATH"
1498 for ac_dir in $ac_dummy; do
1499   IFS=$ac_save_IFS
1500   test -z "$ac_dir" && ac_dir=.
1501   $as_executable_p "$ac_dir/$ac_word" || continue
1502 ac_cv_prog_ac_ct_CC="$ac_prog"
1503 echo "$as_me:1503: found $ac_dir/$ac_word" >&5
1504 break
1505 done
1506
1507 fi
1508 fi
1509 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1510 if test -n "$ac_ct_CC"; then
1511   echo "$as_me:1511: result: $ac_ct_CC" >&5
1512 echo "${ECHO_T}$ac_ct_CC" >&6
1513 else
1514   echo "$as_me:1514: result: no" >&5
1515 echo "${ECHO_T}no" >&6
1516 fi
1517
1518   test -n "$ac_ct_CC" && break
1519 done
1520
1521   CC=$ac_ct_CC
1522 fi
1523
1524 test -z "$CC" && { { echo "$as_me:1524: error: no acceptable cc found in \$PATH" >&5
1525 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1526    { (exit 1); exit 1; }; }
1527
1528 # Provide some information about the compiler.
1529 echo "$as_me:1529:" \
1530      "checking for C compiler version" >&5
1531 ac_compiler=`set X $ac_compile; echo $2`
1532 { (eval echo "$as_me:1532: \"$ac_compiler --version </dev/null >&5\"") >&5
1533   (eval $ac_compiler --version </dev/null >&5) 2>&5
1534   ac_status=$?
1535   echo "$as_me:1535: \$? = $ac_status" >&5
1536   (exit $ac_status); }
1537 { (eval echo "$as_me:1537: \"$ac_compiler -v </dev/null >&5\"") >&5
1538   (eval $ac_compiler -v </dev/null >&5) 2>&5
1539   ac_status=$?
1540   echo "$as_me:1540: \$? = $ac_status" >&5
1541   (exit $ac_status); }
1542 { (eval echo "$as_me:1542: \"$ac_compiler -V </dev/null >&5\"") >&5
1543   (eval $ac_compiler -V </dev/null >&5) 2>&5
1544   ac_status=$?
1545   echo "$as_me:1545: \$? = $ac_status" >&5
1546   (exit $ac_status); }
1547
1548 cat >conftest.$ac_ext <<_ACEOF
1549 #line 1549 "configure"
1550 #include "confdefs.h"
1551
1552 int
1553 main ()
1554 {
1555
1556   ;
1557   return 0;
1558 }
1559 _ACEOF
1560 ac_clean_files_save=$ac_clean_files
1561 ac_clean_files="$ac_clean_files a.out a.exe"
1562 # Try to create an executable without -o first, disregard a.out.
1563 # It will help us diagnose broken compilers, and finding out an intuition
1564 # of exeext.
1565 echo "$as_me:1565: checking for C compiler default output" >&5
1566 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1567 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1568 if { (eval echo "$as_me:1568: \"$ac_link_default\"") >&5
1569   (eval $ac_link_default) 2>&5
1570   ac_status=$?
1571   echo "$as_me:1571: \$? = $ac_status" >&5
1572   (exit $ac_status); }; then
1573   # Find the output, starting from the most likely.  This scheme is
1574 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1575 # resort.
1576 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1577                 ls a.out conftest 2>/dev/null;
1578                 ls a.* conftest.* 2>/dev/null`; do
1579   case $ac_file in
1580     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1581     a.out ) # We found the default executable, but exeext='' is most
1582             # certainly right.
1583             break;;
1584     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1585           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1586           export ac_cv_exeext
1587           break;;
1588     * ) break;;
1589   esac
1590 done
1591 else
1592   echo "$as_me: failed program was:" >&5
1593 cat conftest.$ac_ext >&5
1594 { { echo "$as_me:1594: error: C compiler cannot create executables" >&5
1595 echo "$as_me: error: C compiler cannot create executables" >&2;}
1596    { (exit 77); exit 77; }; }
1597 fi
1598
1599 ac_exeext=$ac_cv_exeext
1600 echo "$as_me:1600: result: $ac_file" >&5
1601 echo "${ECHO_T}$ac_file" >&6
1602
1603 # Check the compiler produces executables we can run.  If not, either
1604 # the compiler is broken, or we cross compile.
1605 echo "$as_me:1605: checking whether the C compiler works" >&5
1606 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1607 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1608 # If not cross compiling, check that we can run a simple program.
1609 if test "$cross_compiling" != yes; then
1610   if { ac_try='./$ac_file'
1611   { (eval echo "$as_me:1611: \"$ac_try\"") >&5
1612   (eval $ac_try) 2>&5
1613   ac_status=$?
1614   echo "$as_me:1614: \$? = $ac_status" >&5
1615   (exit $ac_status); }; }; then
1616     cross_compiling=no
1617   else
1618     if test "$cross_compiling" = maybe; then
1619         cross_compiling=yes
1620     else
1621         { { echo "$as_me:1621: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&5
1623 echo "$as_me: error: cannot run C compiled programs.
1624 If you meant to cross compile, use \`--host'." >&2;}
1625    { (exit 1); exit 1; }; }
1626     fi
1627   fi
1628 fi
1629 echo "$as_me:1629: result: yes" >&5
1630 echo "${ECHO_T}yes" >&6
1631
1632 rm -f a.out a.exe conftest$ac_cv_exeext
1633 ac_clean_files=$ac_clean_files_save
1634 # Check the compiler produces executables we can run.  If not, either
1635 # the compiler is broken, or we cross compile.
1636 echo "$as_me:1636: checking whether we are cross compiling" >&5
1637 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1638 echo "$as_me:1638: result: $cross_compiling" >&5
1639 echo "${ECHO_T}$cross_compiling" >&6
1640
1641 echo "$as_me:1641: checking for executable suffix" >&5
1642 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1643 if { (eval echo "$as_me:1643: \"$ac_link\"") >&5
1644   (eval $ac_link) 2>&5
1645   ac_status=$?
1646   echo "$as_me:1646: \$? = $ac_status" >&5
1647   (exit $ac_status); }; then
1648   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1649 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1650 # work properly (i.e., refer to `conftest.exe'), while it won't with
1651 # `rm'.
1652 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1653   case $ac_file in
1654     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1655     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1656           export ac_cv_exeext
1657           break;;
1658     * ) break;;
1659   esac
1660 done
1661 else
1662   { { echo "$as_me:1662: error: cannot compute EXEEXT: cannot compile and link" >&5
1663 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1664    { (exit 1); exit 1; }; }
1665 fi
1666
1667 rm -f conftest$ac_cv_exeext
1668 echo "$as_me:1668: result: $ac_cv_exeext" >&5
1669 echo "${ECHO_T}$ac_cv_exeext" >&6
1670
1671 rm -f conftest.$ac_ext
1672 EXEEXT=$ac_cv_exeext
1673 ac_exeext=$EXEEXT
1674 echo "$as_me:1674: checking for object suffix" >&5
1675 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1676 if test "${ac_cv_objext+set}" = set; then
1677   echo $ECHO_N "(cached) $ECHO_C" >&6
1678 else
1679   cat >conftest.$ac_ext <<_ACEOF
1680 #line 1680 "configure"
1681 #include "confdefs.h"
1682
1683 int
1684 main ()
1685 {
1686
1687   ;
1688   return 0;
1689 }
1690 _ACEOF
1691 rm -f conftest.o conftest.obj
1692 if { (eval echo "$as_me:1692: \"$ac_compile\"") >&5
1693   (eval $ac_compile) 2>&5
1694   ac_status=$?
1695   echo "$as_me:1695: \$? = $ac_status" >&5
1696   (exit $ac_status); }; then
1697   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1698   case $ac_file in
1699     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1700     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1701        break;;
1702   esac
1703 done
1704 else
1705   echo "$as_me: failed program was:" >&5
1706 cat conftest.$ac_ext >&5
1707 { { echo "$as_me:1707: error: cannot compute OBJEXT: cannot compile" >&5
1708 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1709    { (exit 1); exit 1; }; }
1710 fi
1711
1712 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1713 fi
1714 echo "$as_me:1714: result: $ac_cv_objext" >&5
1715 echo "${ECHO_T}$ac_cv_objext" >&6
1716 OBJEXT=$ac_cv_objext
1717 ac_objext=$OBJEXT
1718 echo "$as_me:1718: checking whether we are using the GNU C compiler" >&5
1719 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1720 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1721   echo $ECHO_N "(cached) $ECHO_C" >&6
1722 else
1723   cat >conftest.$ac_ext <<_ACEOF
1724 #line 1724 "configure"
1725 #include "confdefs.h"
1726
1727 int
1728 main ()
1729 {
1730 #ifndef __GNUC__
1731        choke me
1732 #endif
1733
1734   ;
1735   return 0;
1736 }
1737 _ACEOF
1738 rm -f conftest.$ac_objext
1739 if { (eval echo "$as_me:1739: \"$ac_compile\"") >&5
1740   (eval $ac_compile) 2>&5
1741   ac_status=$?
1742   echo "$as_me:1742: \$? = $ac_status" >&5
1743   (exit $ac_status); } &&
1744          { ac_try='test -s conftest.$ac_objext'
1745   { (eval echo "$as_me:1745: \"$ac_try\"") >&5
1746   (eval $ac_try) 2>&5
1747   ac_status=$?
1748   echo "$as_me:1748: \$? = $ac_status" >&5
1749   (exit $ac_status); }; }; then
1750   ac_compiler_gnu=yes
1751 else
1752   echo "$as_me: failed program was:" >&5
1753 cat conftest.$ac_ext >&5
1754 ac_compiler_gnu=no
1755 fi
1756 rm -f conftest.$ac_objext conftest.$ac_ext
1757 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1758
1759 fi
1760 echo "$as_me:1760: result: $ac_cv_c_compiler_gnu" >&5
1761 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1762 GCC=`test $ac_compiler_gnu = yes && echo yes`
1763 ac_test_CFLAGS=${CFLAGS+set}
1764 ac_save_CFLAGS=$CFLAGS
1765 CFLAGS="-g"
1766 echo "$as_me:1766: checking whether $CC accepts -g" >&5
1767 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1768 if test "${ac_cv_prog_cc_g+set}" = set; then
1769   echo $ECHO_N "(cached) $ECHO_C" >&6
1770 else
1771   cat >conftest.$ac_ext <<_ACEOF
1772 #line 1772 "configure"
1773 #include "confdefs.h"
1774
1775 int
1776 main ()
1777 {
1778
1779   ;
1780   return 0;
1781 }
1782 _ACEOF
1783 rm -f conftest.$ac_objext
1784 if { (eval echo "$as_me:1784: \"$ac_compile\"") >&5
1785   (eval $ac_compile) 2>&5
1786   ac_status=$?
1787   echo "$as_me:1787: \$? = $ac_status" >&5
1788   (exit $ac_status); } &&
1789          { ac_try='test -s conftest.$ac_objext'
1790   { (eval echo "$as_me:1790: \"$ac_try\"") >&5
1791   (eval $ac_try) 2>&5
1792   ac_status=$?
1793   echo "$as_me:1793: \$? = $ac_status" >&5
1794   (exit $ac_status); }; }; then
1795   ac_cv_prog_cc_g=yes
1796 else
1797   echo "$as_me: failed program was:" >&5
1798 cat conftest.$ac_ext >&5
1799 ac_cv_prog_cc_g=no
1800 fi
1801 rm -f conftest.$ac_objext conftest.$ac_ext
1802 fi
1803 echo "$as_me:1803: result: $ac_cv_prog_cc_g" >&5
1804 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1805 if test "$ac_test_CFLAGS" = set; then
1806   CFLAGS=$ac_save_CFLAGS
1807 elif test $ac_cv_prog_cc_g = yes; then
1808   if test "$GCC" = yes; then
1809     CFLAGS="-g -O2"
1810   else
1811     CFLAGS="-g"
1812   fi
1813 else
1814   if test "$GCC" = yes; then
1815     CFLAGS="-O2"
1816   else
1817     CFLAGS=
1818   fi
1819 fi
1820 # Some people use a C++ compiler to compile C.  Since we use `exit',
1821 # in C++ we need to declare it.  In case someone uses the same compiler
1822 # for both compiling C and C++ we need to have the C++ compiler decide
1823 # the declaration of exit, since it's the most demanding environment.
1824 cat >conftest.$ac_ext <<_ACEOF
1825 #ifndef __cplusplus
1826   choke me
1827 #endif
1828 _ACEOF
1829 rm -f conftest.$ac_objext
1830 if { (eval echo "$as_me:1830: \"$ac_compile\"") >&5
1831   (eval $ac_compile) 2>&5
1832   ac_status=$?
1833   echo "$as_me:1833: \$? = $ac_status" >&5
1834   (exit $ac_status); } &&
1835          { ac_try='test -s conftest.$ac_objext'
1836   { (eval echo "$as_me:1836: \"$ac_try\"") >&5
1837   (eval $ac_try) 2>&5
1838   ac_status=$?
1839   echo "$as_me:1839: \$? = $ac_status" >&5
1840   (exit $ac_status); }; }; then
1841   for ac_declaration in \
1842    ''\
1843    '#include <stdlib.h>' \
1844    'extern "C" void std::exit (int) throw (); using std::exit;' \
1845    'extern "C" void std::exit (int); using std::exit;' \
1846    'extern "C" void exit (int) throw ();' \
1847    'extern "C" void exit (int);' \
1848    'void exit (int);'
1849 do
1850   cat >conftest.$ac_ext <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1853 #include <stdlib.h>
1854 $ac_declaration
1855 int
1856 main ()
1857 {
1858 exit (42);
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.$ac_objext
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); } &&
1869          { ac_try='test -s conftest.$ac_objext'
1870   { (eval echo "$as_me:1870: \"$ac_try\"") >&5
1871   (eval $ac_try) 2>&5
1872   ac_status=$?
1873   echo "$as_me:1873: \$? = $ac_status" >&5
1874   (exit $ac_status); }; }; then
1875   :
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 continue
1880 fi
1881 rm -f conftest.$ac_objext conftest.$ac_ext
1882   cat >conftest.$ac_ext <<_ACEOF
1883 #line 1883 "configure"
1884 #include "confdefs.h"
1885 $ac_declaration
1886 int
1887 main ()
1888 {
1889 exit (42);
1890   ;
1891   return 0;
1892 }
1893 _ACEOF
1894 rm -f conftest.$ac_objext
1895 if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5
1896   (eval $ac_compile) 2>&5
1897   ac_status=$?
1898   echo "$as_me:1898: \$? = $ac_status" >&5
1899   (exit $ac_status); } &&
1900          { ac_try='test -s conftest.$ac_objext'
1901   { (eval echo "$as_me:1901: \"$ac_try\"") >&5
1902   (eval $ac_try) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); }; }; then
1906   break
1907 else
1908   echo "$as_me: failed program was:" >&5
1909 cat conftest.$ac_ext >&5
1910 fi
1911 rm -f conftest.$ac_objext conftest.$ac_ext
1912 done
1913 rm -rf conftest*
1914 if test -n "$ac_declaration"; then
1915   echo '#ifdef __cplusplus' >>confdefs.h
1916   echo $ac_declaration      >>confdefs.h
1917   echo '#endif'             >>confdefs.h
1918 fi
1919
1920 else
1921   echo "$as_me: failed program was:" >&5
1922 cat conftest.$ac_ext >&5
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_ext=c
1926 ac_cpp='$CPP $CPPFLAGS'
1927 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1928 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1929 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1930 ac_main_return=return
1931
1932 GCC_VERSION=none
1933 if test "$GCC" = yes ; then
1934         echo "$as_me:1934: checking version of $CC" >&5
1935 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1936         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.].*//'`"
1937         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1938         echo "$as_me:1938: result: $GCC_VERSION" >&5
1939 echo "${ECHO_T}$GCC_VERSION" >&6
1940 fi
1941
1942 echo "$as_me:1942: checking for $CC option to accept ANSI C" >&5
1943 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1944 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1945   echo $ECHO_N "(cached) $ECHO_C" >&6
1946 else
1947   ac_cv_prog_cc_stdc=no
1948 ac_save_CC=$CC
1949 cat >conftest.$ac_ext <<_ACEOF
1950 #line 1950 "configure"
1951 #include "confdefs.h"
1952 #include <stdarg.h>
1953 #include <stdio.h>
1954 #include <sys/types.h>
1955 #include <sys/stat.h>
1956 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1957 struct buf { int x; };
1958 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1959 static char *e (p, i)
1960      char **p;
1961      int i;
1962 {
1963   return p[i];
1964 }
1965 static char *f (char * (*g) (char **, int), char **p, ...)
1966 {
1967   char *s;
1968   va_list v;
1969   va_start (v,p);
1970   s = g (p, va_arg (v,int));
1971   va_end (v);
1972   return s;
1973 }
1974 int test (int i, double x);
1975 struct s1 {int (*f) (int a);};
1976 struct s2 {int (*f) (double a);};
1977 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1978 int argc;
1979 char **argv;
1980 int
1981 main ()
1982 {
1983 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1984   ;
1985   return 0;
1986 }
1987 _ACEOF
1988 # Don't try gcc -ansi; that turns off useful extensions and
1989 # breaks some systems' header files.
1990 # AIX                   -qlanglvl=ansi
1991 # Ultrix and OSF/1      -std1
1992 # HP-UX 10.20 and later -Ae
1993 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1994 # SVR4                  -Xc -D__EXTENSIONS__
1995 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1996 do
1997   CC="$ac_save_CC $ac_arg"
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   ac_cv_prog_cc_stdc=$ac_arg
2011 break
2012 else
2013   echo "$as_me: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
2015 fi
2016 rm -f conftest.$ac_objext
2017 done
2018 rm -f conftest.$ac_ext conftest.$ac_objext
2019 CC=$ac_save_CC
2020
2021 fi
2022
2023 case "x$ac_cv_prog_cc_stdc" in
2024   x|xno)
2025     echo "$as_me:2025: result: none needed" >&5
2026 echo "${ECHO_T}none needed" >&6 ;;
2027   *)
2028     echo "$as_me:2028: result: $ac_cv_prog_cc_stdc" >&5
2029 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2030     CC="$CC $ac_cv_prog_cc_stdc" ;;
2031 esac
2032
2033 # This should have been defined by AC_PROG_CC
2034 : ${CC:=cc}
2035
2036 echo "$as_me:2036: checking \$CC variable" >&5
2037 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2038 case "$CC" in #(vi
2039 *[\ \   ]-[IUD]*)
2040         echo "$as_me:2040: result: broken" >&5
2041 echo "${ECHO_T}broken" >&6
2042         { echo "$as_me:2042: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2043 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2044         # humor him...
2045         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2046         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2047
2048 cf_fix_cppflags=no
2049 cf_new_cflags=
2050 cf_new_cppflags=
2051 cf_new_extra_cppflags=
2052
2053 for cf_add_cflags in $cf_flags
2054 do
2055 case $cf_fix_cppflags in
2056 no)
2057         case $cf_add_cflags in #(vi
2058         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2059                 case $cf_add_cflags in
2060                 -D*)
2061                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2062
2063                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2064                                 && test -z "${cf_tst_cflags}" \
2065                                 && cf_fix_cppflags=yes
2066
2067                         if test $cf_fix_cppflags = yes ; then
2068                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2069                                 continue
2070                         elif test "${cf_tst_cflags}" = "\"'" ; then
2071                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2072                                 continue
2073                         fi
2074                         ;;
2075                 esac
2076                 case "$CPPFLAGS" in
2077                 *$cf_add_cflags) #(vi
2078                         ;;
2079                 *) #(vi
2080                         case $cf_add_cflags in #(vi
2081                         -D*)
2082                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2083
2084 CPPFLAGS=`echo "$CPPFLAGS" | \
2085         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2086                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2087
2088                                 ;;
2089                         esac
2090                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2091                         ;;
2092                 esac
2093                 ;;
2094         *)
2095                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2096                 ;;
2097         esac
2098         ;;
2099 yes)
2100         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2101
2102         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2103
2104         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2105                 && test -z "${cf_tst_cflags}" \
2106                 && cf_fix_cppflags=no
2107         ;;
2108 esac
2109 done
2110
2111 if test -n "$cf_new_cflags" ; then
2112
2113         CFLAGS="$CFLAGS $cf_new_cflags"
2114 fi
2115
2116 if test -n "$cf_new_cppflags" ; then
2117
2118         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2119 fi
2120
2121 if test -n "$cf_new_extra_cppflags" ; then
2122
2123         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2124 fi
2125
2126         ;;
2127 *)
2128         echo "$as_me:2128: result: ok" >&5
2129 echo "${ECHO_T}ok" >&6
2130         ;;
2131 esac
2132
2133 ac_ext=c
2134 ac_cpp='$CPP $CPPFLAGS'
2135 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2136 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2137 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2138 ac_main_return=return
2139 echo "$as_me:2139: checking how to run the C preprocessor" >&5
2140 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2141 # On Suns, sometimes $CPP names a directory.
2142 if test -n "$CPP" && test -d "$CPP"; then
2143   CPP=
2144 fi
2145 if test -z "$CPP"; then
2146   if test "${ac_cv_prog_CPP+set}" = set; then
2147   echo $ECHO_N "(cached) $ECHO_C" >&6
2148 else
2149       # Double quotes because CPP needs to be expanded
2150     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2151     do
2152       ac_preproc_ok=false
2153 for ac_c_preproc_warn_flag in '' yes
2154 do
2155   # Use a header file that comes with gcc, so configuring glibc
2156   # with a fresh cross-compiler works.
2157   # On the NeXT, cc -E runs the code through the compiler's parser,
2158   # not just through cpp. "Syntax error" is here to catch this case.
2159   cat >conftest.$ac_ext <<_ACEOF
2160 #line 2160 "configure"
2161 #include "confdefs.h"
2162 #include <assert.h>
2163                      Syntax error
2164 _ACEOF
2165 if { (eval echo "$as_me:2165: \"$ac_cpp conftest.$ac_ext\"") >&5
2166   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2167   ac_status=$?
2168   egrep -v '^ *\+' conftest.er1 >conftest.err
2169   rm -f conftest.er1
2170   cat conftest.err >&5
2171   echo "$as_me:2171: \$? = $ac_status" >&5
2172   (exit $ac_status); } >/dev/null; then
2173   if test -s conftest.err; then
2174     ac_cpp_err=$ac_c_preproc_warn_flag
2175   else
2176     ac_cpp_err=
2177   fi
2178 else
2179   ac_cpp_err=yes
2180 fi
2181 if test -z "$ac_cpp_err"; then
2182   :
2183 else
2184   echo "$as_me: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   # Broken: fails on valid input.
2187 continue
2188 fi
2189 rm -f conftest.err conftest.$ac_ext
2190
2191   # OK, works on sane cases.  Now check whether non-existent headers
2192   # can be detected and how.
2193   cat >conftest.$ac_ext <<_ACEOF
2194 #line 2194 "configure"
2195 #include "confdefs.h"
2196 #include <ac_nonexistent.h>
2197 _ACEOF
2198 if { (eval echo "$as_me:2198: \"$ac_cpp conftest.$ac_ext\"") >&5
2199   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2200   ac_status=$?
2201   egrep -v '^ *\+' conftest.er1 >conftest.err
2202   rm -f conftest.er1
2203   cat conftest.err >&5
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit $ac_status); } >/dev/null; then
2206   if test -s conftest.err; then
2207     ac_cpp_err=$ac_c_preproc_warn_flag
2208   else
2209     ac_cpp_err=
2210   fi
2211 else
2212   ac_cpp_err=yes
2213 fi
2214 if test -z "$ac_cpp_err"; then
2215   # Broken: success on invalid input.
2216 continue
2217 else
2218   echo "$as_me: failed program was:" >&5
2219   cat conftest.$ac_ext >&5
2220   # Passes both tests.
2221 ac_preproc_ok=:
2222 break
2223 fi
2224 rm -f conftest.err conftest.$ac_ext
2225
2226 done
2227 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2228 rm -f conftest.err conftest.$ac_ext
2229 if $ac_preproc_ok; then
2230   break
2231 fi
2232
2233     done
2234     ac_cv_prog_CPP=$CPP
2235
2236 fi
2237   CPP=$ac_cv_prog_CPP
2238 else
2239   ac_cv_prog_CPP=$CPP
2240 fi
2241 echo "$as_me:2241: result: $CPP" >&5
2242 echo "${ECHO_T}$CPP" >&6
2243 ac_preproc_ok=false
2244 for ac_c_preproc_warn_flag in '' yes
2245 do
2246   # Use a header file that comes with gcc, so configuring glibc
2247   # with a fresh cross-compiler works.
2248   # On the NeXT, cc -E runs the code through the compiler's parser,
2249   # not just through cpp. "Syntax error" is here to catch this case.
2250   cat >conftest.$ac_ext <<_ACEOF
2251 #line 2251 "configure"
2252 #include "confdefs.h"
2253 #include <assert.h>
2254                      Syntax error
2255 _ACEOF
2256 if { (eval echo "$as_me:2256: \"$ac_cpp conftest.$ac_ext\"") >&5
2257   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2258   ac_status=$?
2259   egrep -v '^ *\+' conftest.er1 >conftest.err
2260   rm -f conftest.er1
2261   cat conftest.err >&5
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit $ac_status); } >/dev/null; then
2264   if test -s conftest.err; then
2265     ac_cpp_err=$ac_c_preproc_warn_flag
2266   else
2267     ac_cpp_err=
2268   fi
2269 else
2270   ac_cpp_err=yes
2271 fi
2272 if test -z "$ac_cpp_err"; then
2273   :
2274 else
2275   echo "$as_me: failed program was:" >&5
2276   cat conftest.$ac_ext >&5
2277   # Broken: fails on valid input.
2278 continue
2279 fi
2280 rm -f conftest.err conftest.$ac_ext
2281
2282   # OK, works on sane cases.  Now check whether non-existent headers
2283   # can be detected and how.
2284   cat >conftest.$ac_ext <<_ACEOF
2285 #line 2285 "configure"
2286 #include "confdefs.h"
2287 #include <ac_nonexistent.h>
2288 _ACEOF
2289 if { (eval echo "$as_me:2289: \"$ac_cpp conftest.$ac_ext\"") >&5
2290   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2291   ac_status=$?
2292   egrep -v '^ *\+' conftest.er1 >conftest.err
2293   rm -f conftest.er1
2294   cat conftest.err >&5
2295   echo "$as_me:2295: \$? = $ac_status" >&5
2296   (exit $ac_status); } >/dev/null; then
2297   if test -s conftest.err; then
2298     ac_cpp_err=$ac_c_preproc_warn_flag
2299   else
2300     ac_cpp_err=
2301   fi
2302 else
2303   ac_cpp_err=yes
2304 fi
2305 if test -z "$ac_cpp_err"; then
2306   # Broken: success on invalid input.
2307 continue
2308 else
2309   echo "$as_me: failed program was:" >&5
2310   cat conftest.$ac_ext >&5
2311   # Passes both tests.
2312 ac_preproc_ok=:
2313 break
2314 fi
2315 rm -f conftest.err conftest.$ac_ext
2316
2317 done
2318 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2319 rm -f conftest.err conftest.$ac_ext
2320 if $ac_preproc_ok; then
2321   :
2322 else
2323   { { echo "$as_me:2323: error: C preprocessor \"$CPP\" fails sanity check" >&5
2324 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2325    { (exit 1); exit 1; }; }
2326 fi
2327
2328 ac_ext=c
2329 ac_cpp='$CPP $CPPFLAGS'
2330 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2331 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2332 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2333 ac_main_return=return
2334
2335 if test $ac_cv_c_compiler_gnu = yes; then
2336     echo "$as_me:2336: checking whether $CC needs -traditional" >&5
2337 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2338 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2339   echo $ECHO_N "(cached) $ECHO_C" >&6
2340 else
2341     ac_pattern="Autoconf.*'x'"
2342   cat >conftest.$ac_ext <<_ACEOF
2343 #line 2343 "configure"
2344 #include "confdefs.h"
2345 #include <sgtty.h>
2346 int Autoconf = TIOCGETP;
2347 _ACEOF
2348 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349   egrep "$ac_pattern" >/dev/null 2>&1; then
2350   ac_cv_prog_gcc_traditional=yes
2351 else
2352   ac_cv_prog_gcc_traditional=no
2353 fi
2354 rm -rf conftest*
2355
2356   if test $ac_cv_prog_gcc_traditional = no; then
2357     cat >conftest.$ac_ext <<_ACEOF
2358 #line 2358 "configure"
2359 #include "confdefs.h"
2360 #include <termio.h>
2361 int Autoconf = TCGETA;
2362 _ACEOF
2363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2364   egrep "$ac_pattern" >/dev/null 2>&1; then
2365   ac_cv_prog_gcc_traditional=yes
2366 fi
2367 rm -rf conftest*
2368
2369   fi
2370 fi
2371 echo "$as_me:2371: result: $ac_cv_prog_gcc_traditional" >&5
2372 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2373   if test $ac_cv_prog_gcc_traditional = yes; then
2374     CC="$CC -traditional"
2375   fi
2376 fi
2377
2378 echo "$as_me:2378: checking whether $CC understands -c and -o together" >&5
2379 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2380 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2381   echo $ECHO_N "(cached) $ECHO_C" >&6
2382 else
2383
2384 cat > conftest.$ac_ext <<CF_EOF
2385 #include <stdio.h>
2386 int main()
2387 {
2388         ${cf_cv_main_return:-return}(0);
2389 }
2390 CF_EOF
2391 # We do the test twice because some compilers refuse to overwrite an
2392 # existing .o file with -o, though they will create one.
2393 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2394 if { (eval echo "$as_me:2394: \"$ac_try\"") >&5
2395   (eval $ac_try) 2>&5
2396   ac_status=$?
2397   echo "$as_me:2397: \$? = $ac_status" >&5
2398   (exit $ac_status); } &&
2399   test -f conftest2.$ac_objext && { (eval echo "$as_me:2399: \"$ac_try\"") >&5
2400   (eval $ac_try) 2>&5
2401   ac_status=$?
2402   echo "$as_me:2402: \$? = $ac_status" >&5
2403   (exit $ac_status); };
2404 then
2405   eval cf_cv_prog_CC_c_o=yes
2406 else
2407   eval cf_cv_prog_CC_c_o=no
2408 fi
2409 rm -rf conftest*
2410
2411 fi
2412 if test $cf_cv_prog_CC_c_o = yes; then
2413   echo "$as_me:2413: result: yes" >&5
2414 echo "${ECHO_T}yes" >&6
2415 else
2416   echo "$as_me:2416: result: no" >&5
2417 echo "${ECHO_T}no" >&6
2418 fi
2419
2420 if test "$cross_compiling" = yes ; then
2421   LDCONFIG=:
2422 else
2423 case "$cf_cv_system_name" in #(vi
2424 dragonfly*|mirbsd*|freebsd*) #(vi
2425   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2426   ;;
2427 *) LDPATH=$PATH:/sbin:/usr/sbin
2428   # Extract the first word of "ldconfig", so it can be a program name with args.
2429 set dummy ldconfig; ac_word=$2
2430 echo "$as_me:2430: checking for $ac_word" >&5
2431 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2432 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2433   echo $ECHO_N "(cached) $ECHO_C" >&6
2434 else
2435   case $LDCONFIG in
2436   [\\/]* | ?:[\\/]*)
2437   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2438   ;;
2439   *)
2440   ac_save_IFS=$IFS; IFS=$ac_path_separator
2441 ac_dummy="$LDPATH"
2442 for ac_dir in $ac_dummy; do
2443   IFS=$ac_save_IFS
2444   test -z "$ac_dir" && ac_dir=.
2445   if $as_executable_p "$ac_dir/$ac_word"; then
2446    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2447    echo "$as_me:2447: found $ac_dir/$ac_word" >&5
2448    break
2449 fi
2450 done
2451
2452   ;;
2453 esac
2454 fi
2455 LDCONFIG=$ac_cv_path_LDCONFIG
2456
2457 if test -n "$LDCONFIG"; then
2458   echo "$as_me:2458: result: $LDCONFIG" >&5
2459 echo "${ECHO_T}$LDCONFIG" >&6
2460 else
2461   echo "$as_me:2461: result: no" >&5
2462 echo "${ECHO_T}no" >&6
2463 fi
2464
2465   ;;
2466 esac
2467 fi
2468
2469 echo "$as_me:2469: checking if you want to ensure bool is consistent with C++" >&5
2470 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2471
2472 # Check whether --with-cxx or --without-cxx was given.
2473 if test "${with_cxx+set}" = set; then
2474   withval="$with_cxx"
2475   cf_with_cxx=$withval
2476 else
2477   cf_with_cxx=yes
2478 fi;
2479 echo "$as_me:2479: result: $cf_with_cxx" >&5
2480 echo "${ECHO_T}$cf_with_cxx" >&6
2481 if test "X$cf_with_cxx" = Xno ; then
2482         CXX=""
2483         GXX=""
2484 else
2485         # with autoconf 2.13, we can change the error to a warning:
2486                 ac_ext=cc
2487 ac_cpp='$CXXCPP $CPPFLAGS'
2488 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2489 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2490 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2491 ac_main_return=return
2492 if test -n "$ac_tool_prefix"; then
2493   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2494   do
2495     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2496 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2497 echo "$as_me:2497: checking for $ac_word" >&5
2498 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2499 if test "${ac_cv_prog_CXX+set}" = set; then
2500   echo $ECHO_N "(cached) $ECHO_C" >&6
2501 else
2502   if test -n "$CXX"; then
2503   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2504 else
2505   ac_save_IFS=$IFS; IFS=$ac_path_separator
2506 ac_dummy="$PATH"
2507 for ac_dir in $ac_dummy; do
2508   IFS=$ac_save_IFS
2509   test -z "$ac_dir" && ac_dir=.
2510   $as_executable_p "$ac_dir/$ac_word" || continue
2511 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2512 echo "$as_me:2512: found $ac_dir/$ac_word" >&5
2513 break
2514 done
2515
2516 fi
2517 fi
2518 CXX=$ac_cv_prog_CXX
2519 if test -n "$CXX"; then
2520   echo "$as_me:2520: result: $CXX" >&5
2521 echo "${ECHO_T}$CXX" >&6
2522 else
2523   echo "$as_me:2523: result: no" >&5
2524 echo "${ECHO_T}no" >&6
2525 fi
2526
2527     test -n "$CXX" && break
2528   done
2529 fi
2530 if test -z "$CXX"; then
2531   ac_ct_CXX=$CXX
2532   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2533 do
2534   # Extract the first word of "$ac_prog", so it can be a program name with args.
2535 set dummy $ac_prog; ac_word=$2
2536 echo "$as_me:2536: checking for $ac_word" >&5
2537 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2538 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2539   echo $ECHO_N "(cached) $ECHO_C" >&6
2540 else
2541   if test -n "$ac_ct_CXX"; then
2542   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2543 else
2544   ac_save_IFS=$IFS; IFS=$ac_path_separator
2545 ac_dummy="$PATH"
2546 for ac_dir in $ac_dummy; do
2547   IFS=$ac_save_IFS
2548   test -z "$ac_dir" && ac_dir=.
2549   $as_executable_p "$ac_dir/$ac_word" || continue
2550 ac_cv_prog_ac_ct_CXX="$ac_prog"
2551 echo "$as_me:2551: found $ac_dir/$ac_word" >&5
2552 break
2553 done
2554
2555 fi
2556 fi
2557 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2558 if test -n "$ac_ct_CXX"; then
2559   echo "$as_me:2559: result: $ac_ct_CXX" >&5
2560 echo "${ECHO_T}$ac_ct_CXX" >&6
2561 else
2562   echo "$as_me:2562: result: no" >&5
2563 echo "${ECHO_T}no" >&6
2564 fi
2565
2566   test -n "$ac_ct_CXX" && break
2567 done
2568 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2569
2570   CXX=$ac_ct_CXX
2571 fi
2572
2573 # Provide some information about the compiler.
2574 echo "$as_me:2574:" \
2575      "checking for C++ compiler version" >&5
2576 ac_compiler=`set X $ac_compile; echo $2`
2577 { (eval echo "$as_me:2577: \"$ac_compiler --version </dev/null >&5\"") >&5
2578   (eval $ac_compiler --version </dev/null >&5) 2>&5
2579   ac_status=$?
2580   echo "$as_me:2580: \$? = $ac_status" >&5
2581   (exit $ac_status); }
2582 { (eval echo "$as_me:2582: \"$ac_compiler -v </dev/null >&5\"") >&5
2583   (eval $ac_compiler -v </dev/null >&5) 2>&5
2584   ac_status=$?
2585   echo "$as_me:2585: \$? = $ac_status" >&5
2586   (exit $ac_status); }
2587 { (eval echo "$as_me:2587: \"$ac_compiler -V </dev/null >&5\"") >&5
2588   (eval $ac_compiler -V </dev/null >&5) 2>&5
2589   ac_status=$?
2590   echo "$as_me:2590: \$? = $ac_status" >&5
2591   (exit $ac_status); }
2592
2593 echo "$as_me:2593: checking whether we are using the GNU C++ compiler" >&5
2594 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2595 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2596   echo $ECHO_N "(cached) $ECHO_C" >&6
2597 else
2598   cat >conftest.$ac_ext <<_ACEOF
2599 #line 2599 "configure"
2600 #include "confdefs.h"
2601
2602 int
2603 main ()
2604 {
2605 #ifndef __GNUC__
2606        choke me
2607 #endif
2608
2609   ;
2610   return 0;
2611 }
2612 _ACEOF
2613 rm -f conftest.$ac_objext
2614 if { (eval echo "$as_me:2614: \"$ac_compile\"") >&5
2615   (eval $ac_compile) 2>&5
2616   ac_status=$?
2617   echo "$as_me:2617: \$? = $ac_status" >&5
2618   (exit $ac_status); } &&
2619          { ac_try='test -s conftest.$ac_objext'
2620   { (eval echo "$as_me:2620: \"$ac_try\"") >&5
2621   (eval $ac_try) 2>&5
2622   ac_status=$?
2623   echo "$as_me:2623: \$? = $ac_status" >&5
2624   (exit $ac_status); }; }; then
2625   ac_compiler_gnu=yes
2626 else
2627   echo "$as_me: failed program was:" >&5
2628 cat conftest.$ac_ext >&5
2629 ac_compiler_gnu=no
2630 fi
2631 rm -f conftest.$ac_objext conftest.$ac_ext
2632 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2633
2634 fi
2635 echo "$as_me:2635: result: $ac_cv_cxx_compiler_gnu" >&5
2636 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2637 GXX=`test $ac_compiler_gnu = yes && echo yes`
2638 ac_test_CXXFLAGS=${CXXFLAGS+set}
2639 ac_save_CXXFLAGS=$CXXFLAGS
2640 CXXFLAGS="-g"
2641 echo "$as_me:2641: checking whether $CXX accepts -g" >&5
2642 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2643 if test "${ac_cv_prog_cxx_g+set}" = set; then
2644   echo $ECHO_N "(cached) $ECHO_C" >&6
2645 else
2646   cat >conftest.$ac_ext <<_ACEOF
2647 #line 2647 "configure"
2648 #include "confdefs.h"
2649
2650 int
2651 main ()
2652 {
2653
2654   ;
2655   return 0;
2656 }
2657 _ACEOF
2658 rm -f conftest.$ac_objext
2659 if { (eval echo "$as_me:2659: \"$ac_compile\"") >&5
2660   (eval $ac_compile) 2>&5
2661   ac_status=$?
2662   echo "$as_me:2662: \$? = $ac_status" >&5
2663   (exit $ac_status); } &&
2664          { ac_try='test -s conftest.$ac_objext'
2665   { (eval echo "$as_me:2665: \"$ac_try\"") >&5
2666   (eval $ac_try) 2>&5
2667   ac_status=$?
2668   echo "$as_me:2668: \$? = $ac_status" >&5
2669   (exit $ac_status); }; }; then
2670   ac_cv_prog_cxx_g=yes
2671 else
2672   echo "$as_me: failed program was:" >&5
2673 cat conftest.$ac_ext >&5
2674 ac_cv_prog_cxx_g=no
2675 fi
2676 rm -f conftest.$ac_objext conftest.$ac_ext
2677 fi
2678 echo "$as_me:2678: result: $ac_cv_prog_cxx_g" >&5
2679 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2680 if test "$ac_test_CXXFLAGS" = set; then
2681   CXXFLAGS=$ac_save_CXXFLAGS
2682 elif test $ac_cv_prog_cxx_g = yes; then
2683   if test "$GXX" = yes; then
2684     CXXFLAGS="-g -O2"
2685   else
2686     CXXFLAGS="-g"
2687   fi
2688 else
2689   if test "$GXX" = yes; then
2690     CXXFLAGS="-O2"
2691   else
2692     CXXFLAGS=
2693   fi
2694 fi
2695 for ac_declaration in \
2696    ''\
2697    '#include <stdlib.h>' \
2698    'extern "C" void std::exit (int) throw (); using std::exit;' \
2699    'extern "C" void std::exit (int); using std::exit;' \
2700    'extern "C" void exit (int) throw ();' \
2701    'extern "C" void exit (int);' \
2702    'void exit (int);'
2703 do
2704   cat >conftest.$ac_ext <<_ACEOF
2705 #line 2705 "configure"
2706 #include "confdefs.h"
2707 #include <stdlib.h>
2708 $ac_declaration
2709 int
2710 main ()
2711 {
2712 exit (42);
2713   ;
2714   return 0;
2715 }
2716 _ACEOF
2717 rm -f conftest.$ac_objext
2718 if { (eval echo "$as_me:2718: \"$ac_compile\"") >&5
2719   (eval $ac_compile) 2>&5
2720   ac_status=$?
2721   echo "$as_me:2721: \$? = $ac_status" >&5
2722   (exit $ac_status); } &&
2723          { ac_try='test -s conftest.$ac_objext'
2724   { (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); }; }; then
2729   :
2730 else
2731   echo "$as_me: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2733 continue
2734 fi
2735 rm -f conftest.$ac_objext conftest.$ac_ext
2736   cat >conftest.$ac_ext <<_ACEOF
2737 #line 2737 "configure"
2738 #include "confdefs.h"
2739 $ac_declaration
2740 int
2741 main ()
2742 {
2743 exit (42);
2744   ;
2745   return 0;
2746 }
2747 _ACEOF
2748 rm -f conftest.$ac_objext
2749 if { (eval echo "$as_me:2749: \"$ac_compile\"") >&5
2750   (eval $ac_compile) 2>&5
2751   ac_status=$?
2752   echo "$as_me:2752: \$? = $ac_status" >&5
2753   (exit $ac_status); } &&
2754          { ac_try='test -s conftest.$ac_objext'
2755   { (eval echo "$as_me:2755: \"$ac_try\"") >&5
2756   (eval $ac_try) 2>&5
2757   ac_status=$?
2758   echo "$as_me:2758: \$? = $ac_status" >&5
2759   (exit $ac_status); }; }; then
2760   break
2761 else
2762   echo "$as_me: failed program was:" >&5
2763 cat conftest.$ac_ext >&5
2764 fi
2765 rm -f conftest.$ac_objext conftest.$ac_ext
2766 done
2767 rm -rf conftest*
2768 if test -n "$ac_declaration"; then
2769   echo '#ifdef __cplusplus' >>confdefs.h
2770   echo $ac_declaration      >>confdefs.h
2771   echo '#endif'             >>confdefs.h
2772 fi
2773
2774 ac_ext=c
2775 ac_cpp='$CPP $CPPFLAGS'
2776 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2777 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2778 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2779 ac_main_return=return
2780
2781                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2782         if test "$CXX" = "g++" ; then
2783                 # Extract the first word of "g++", so it can be a program name with args.
2784 set dummy g++; ac_word=$2
2785 echo "$as_me:2785: checking for $ac_word" >&5
2786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2787 if test "${ac_cv_path_CXX+set}" = set; then
2788   echo $ECHO_N "(cached) $ECHO_C" >&6
2789 else
2790   case $CXX in
2791   [\\/]* | ?:[\\/]*)
2792   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2793   ;;
2794   *)
2795   ac_save_IFS=$IFS; IFS=$ac_path_separator
2796 ac_dummy="$PATH"
2797 for ac_dir in $ac_dummy; do
2798   IFS=$ac_save_IFS
2799   test -z "$ac_dir" && ac_dir=.
2800   if $as_executable_p "$ac_dir/$ac_word"; then
2801    ac_cv_path_CXX="$ac_dir/$ac_word"
2802    echo "$as_me:2802: found $ac_dir/$ac_word" >&5
2803    break
2804 fi
2805 done
2806
2807   ;;
2808 esac
2809 fi
2810 CXX=$ac_cv_path_CXX
2811
2812 if test -n "$CXX"; then
2813   echo "$as_me:2813: result: $CXX" >&5
2814 echo "${ECHO_T}$CXX" >&6
2815 else
2816   echo "$as_me:2816: result: no" >&5
2817 echo "${ECHO_T}no" >&6
2818 fi
2819
2820         fi
2821         case "x$CXX" in #(vi
2822         x|xg++)
2823                 { echo "$as_me:2823: WARNING: You don't have any C++ compiler, too bad" >&5
2824 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2825                 cf_with_cxx=no; CXX=""; GXX="";
2826                 ;;
2827         esac
2828 fi
2829
2830 GXX_VERSION=none
2831 if test "$GXX" = yes; then
2832         echo "$as_me:2832: checking version of ${CXX:-g++}" >&5
2833 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2834         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2835         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2836         echo "$as_me:2836: result: $GXX_VERSION" >&5
2837 echo "${ECHO_T}$GXX_VERSION" >&6
2838 fi
2839
2840 case $GXX_VERSION in
2841 1*|2.[0-6]*)
2842         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2843         # cf_cxx_library=no
2844         { echo "$as_me:2844: WARNING: templates do not work" >&5
2845 echo "$as_me: WARNING: templates do not work" >&2;}
2846         ;;
2847 esac
2848
2849 echo "$as_me:2849: checking if you want to build C++ binding and demo" >&5
2850 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2851
2852 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2853 if test "${with_cxx_binding+set}" = set; then
2854   withval="$with_cxx_binding"
2855   cf_with_cxx_binding=$withval
2856 else
2857   cf_with_cxx_binding=$cf_with_cxx
2858 fi;
2859 echo "$as_me:2859: result: $cf_with_cxx_binding" >&5
2860 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2861
2862 echo "$as_me:2862: checking if you want to build with Ada95" >&5
2863 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2864 echo "$as_me:2864: result: $cf_with_ada" >&5
2865 echo "${ECHO_T}$cf_with_ada" >&6
2866
2867 echo "$as_me:2867: checking if you want to install manpages" >&5
2868 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2869
2870 # Check whether --with-manpages or --without-manpages was given.
2871 if test "${with_manpages+set}" = set; then
2872   withval="$with_manpages"
2873   cf_with_manpages=$withval
2874 else
2875   cf_with_manpages=yes
2876 fi;
2877 echo "$as_me:2877: result: $cf_with_manpages" >&5
2878 echo "${ECHO_T}$cf_with_manpages" >&6
2879
2880 echo "$as_me:2880: checking if you want to build programs such as tic" >&5
2881 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2882
2883 # Check whether --with-progs or --without-progs was given.
2884 if test "${with_progs+set}" = set; then
2885   withval="$with_progs"
2886   cf_with_progs=$withval
2887 else
2888   cf_with_progs=yes
2889 fi;
2890 echo "$as_me:2890: result: $cf_with_progs" >&5
2891 echo "${ECHO_T}$cf_with_progs" >&6
2892
2893 echo "$as_me:2893: checking if you want to build test-programs" >&5
2894 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2895
2896 # Check whether --with-tests or --without-tests was given.
2897 if test "${with_tests+set}" = set; then
2898   withval="$with_tests"
2899   cf_with_tests=$withval
2900 else
2901   cf_with_tests=yes
2902 fi;
2903 echo "$as_me:2903: result: $cf_with_tests" >&5
2904 echo "${ECHO_T}$cf_with_tests" >&6
2905
2906 echo "$as_me:2906: checking if you wish to install curses.h" >&5
2907 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2908
2909 # Check whether --with-curses-h or --without-curses-h was given.
2910 if test "${with_curses_h+set}" = set; then
2911   withval="$with_curses_h"
2912   with_curses_h=$withval
2913 else
2914   with_curses_h=yes
2915 fi;
2916 echo "$as_me:2916: result: $with_curses_h" >&5
2917 echo "${ECHO_T}$with_curses_h" >&6
2918
2919 modules_to_build="ncurses"
2920 if test "X$cf_with_progs" != Xno ; then
2921 modules_to_build="$modules_to_build progs tack"
2922 fi
2923 modules_to_build="$modules_to_build panel menu form"
2924
2925 test "$program_prefix" != NONE &&
2926   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2927 # Use a double $ so make ignores it.
2928 test "$program_suffix" != NONE &&
2929   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2930 # Double any \ or $.  echo might interpret backslashes.
2931 # By default was `s,x,x', remove it if useless.
2932 cat <<\_ACEOF >conftest.sed
2933 s/[\\$]/&&/g;s/;s,x,x,$//
2934 _ACEOF
2935 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2936 rm conftest.sed
2937
2938 for ac_prog in mawk gawk nawk awk
2939 do
2940   # Extract the first word of "$ac_prog", so it can be a program name with args.
2941 set dummy $ac_prog; ac_word=$2
2942 echo "$as_me:2942: checking for $ac_word" >&5
2943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2944 if test "${ac_cv_prog_AWK+set}" = set; then
2945   echo $ECHO_N "(cached) $ECHO_C" >&6
2946 else
2947   if test -n "$AWK"; then
2948   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2949 else
2950   ac_save_IFS=$IFS; IFS=$ac_path_separator
2951 ac_dummy="$PATH"
2952 for ac_dir in $ac_dummy; do
2953   IFS=$ac_save_IFS
2954   test -z "$ac_dir" && ac_dir=.
2955   $as_executable_p "$ac_dir/$ac_word" || continue
2956 ac_cv_prog_AWK="$ac_prog"
2957 echo "$as_me:2957: found $ac_dir/$ac_word" >&5
2958 break
2959 done
2960
2961 fi
2962 fi
2963 AWK=$ac_cv_prog_AWK
2964 if test -n "$AWK"; then
2965   echo "$as_me:2965: result: $AWK" >&5
2966 echo "${ECHO_T}$AWK" >&6
2967 else
2968   echo "$as_me:2968: result: no" >&5
2969 echo "${ECHO_T}no" >&6
2970 fi
2971
2972   test -n "$AWK" && break
2973 done
2974
2975 test -z "$AWK" && { { echo "$as_me:2975: error: No awk program found" >&5
2976 echo "$as_me: error: No awk program found" >&2;}
2977    { (exit 1); exit 1; }; }
2978
2979 echo "$as_me:2979: checking for egrep" >&5
2980 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2981 if test "${ac_cv_prog_egrep+set}" = set; then
2982   echo $ECHO_N "(cached) $ECHO_C" >&6
2983 else
2984   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2985     then ac_cv_prog_egrep='grep -E'
2986     else ac_cv_prog_egrep='egrep'
2987     fi
2988 fi
2989 echo "$as_me:2989: result: $ac_cv_prog_egrep" >&5
2990 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2991  EGREP=$ac_cv_prog_egrep
2992
2993 test -z "$EGREP" && { { echo "$as_me:2993: error: No egrep program found" >&5
2994 echo "$as_me: error: No egrep program found" >&2;}
2995    { (exit 1); exit 1; }; }
2996
2997 # Find a good install program.  We prefer a C program (faster),
2998 # so one script is as good as another.  But avoid the broken or
2999 # incompatible versions:
3000 # SysV /etc/install, /usr/sbin/install
3001 # SunOS /usr/etc/install
3002 # IRIX /sbin/install
3003 # AIX /bin/install
3004 # AmigaOS /C/install, which installs bootblocks on floppy discs
3005 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3006 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3007 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3008 # ./install, which can be erroneously created by make from ./install.sh.
3009 echo "$as_me:3009: checking for a BSD compatible install" >&5
3010 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3011 if test -z "$INSTALL"; then
3012 if test "${ac_cv_path_install+set}" = set; then
3013   echo $ECHO_N "(cached) $ECHO_C" >&6
3014 else
3015     ac_save_IFS=$IFS; IFS=$ac_path_separator
3016   for ac_dir in $PATH; do
3017     IFS=$ac_save_IFS
3018     # Account for people who put trailing slashes in PATH elements.
3019     case $ac_dir/ in
3020     / | ./ | .// | /cC/* \
3021     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3022     | /usr/ucb/* ) ;;
3023     *)
3024       # OSF1 and SCO ODT 3.0 have their own names for install.
3025       # Don't use installbsd from OSF since it installs stuff as root
3026       # by default.
3027       for ac_prog in ginstall scoinst install; do
3028         if $as_executable_p "$ac_dir/$ac_prog"; then
3029           if test $ac_prog = install &&
3030             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3031             # AIX install.  It has an incompatible calling convention.
3032             :
3033           elif test $ac_prog = install &&
3034             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3035             # program-specific install script used by HP pwplus--don't use.
3036             :
3037           else
3038             ac_cv_path_install="$ac_dir/$ac_prog -c"
3039             break 2
3040           fi
3041         fi
3042       done
3043       ;;
3044     esac
3045   done
3046
3047 fi
3048   if test "${ac_cv_path_install+set}" = set; then
3049     INSTALL=$ac_cv_path_install
3050   else
3051     # As a last resort, use the slow shell script.  We don't cache a
3052     # path for INSTALL within a source directory, because that will
3053     # break other packages using the cache if that directory is
3054     # removed, or if the path is relative.
3055     INSTALL=$ac_install_sh
3056   fi
3057 fi
3058 echo "$as_me:3058: result: $INSTALL" >&5
3059 echo "${ECHO_T}$INSTALL" >&6
3060
3061 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3062 # It thinks the first close brace ends the variable substitution.
3063 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3064
3065 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3066
3067 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3068
3069 case $INSTALL in
3070 /*)
3071   ;;
3072 *)
3073   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3074   test -z "$cf_dir" && cf_dir=.
3075   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3076   ;;
3077 esac
3078
3079 for ac_prog in tdlint lint alint splint lclint
3080 do
3081   # Extract the first word of "$ac_prog", so it can be a program name with args.
3082 set dummy $ac_prog; ac_word=$2
3083 echo "$as_me:3083: checking for $ac_word" >&5
3084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3085 if test "${ac_cv_prog_LINT+set}" = set; then
3086   echo $ECHO_N "(cached) $ECHO_C" >&6
3087 else
3088   if test -n "$LINT"; then
3089   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3090 else
3091   ac_save_IFS=$IFS; IFS=$ac_path_separator
3092 ac_dummy="$PATH"
3093 for ac_dir in $ac_dummy; do
3094   IFS=$ac_save_IFS
3095   test -z "$ac_dir" && ac_dir=.
3096   $as_executable_p "$ac_dir/$ac_word" || continue
3097 ac_cv_prog_LINT="$ac_prog"
3098 echo "$as_me:3098: found $ac_dir/$ac_word" >&5
3099 break
3100 done
3101
3102 fi
3103 fi
3104 LINT=$ac_cv_prog_LINT
3105 if test -n "$LINT"; then
3106   echo "$as_me:3106: result: $LINT" >&5
3107 echo "${ECHO_T}$LINT" >&6
3108 else
3109   echo "$as_me:3109: result: no" >&5
3110 echo "${ECHO_T}no" >&6
3111 fi
3112
3113   test -n "$LINT" && break
3114 done
3115
3116 echo "$as_me:3116: checking whether ln -s works" >&5
3117 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3118 LN_S=$as_ln_s
3119 if test "$LN_S" = "ln -s"; then
3120   echo "$as_me:3120: result: yes" >&5
3121 echo "${ECHO_T}yes" >&6
3122 else
3123   echo "$as_me:3123: result: no, using $LN_S" >&5
3124 echo "${ECHO_T}no, using $LN_S" >&6
3125 fi
3126
3127 echo "$as_me:3127: checking if $LN_S -f options work" >&5
3128 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3129
3130 rm -f conf$$.src conf$$dst
3131 echo >conf$$.dst
3132 echo first >conf$$.src
3133 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3134         cf_prog_ln_sf=yes
3135 else
3136         cf_prog_ln_sf=no
3137 fi
3138 rm -f conf$$.dst conf$$src
3139 echo "$as_me:3139: result: $cf_prog_ln_sf" >&5
3140 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3141
3142 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3143
3144 echo "$as_me:3144: checking for long file names" >&5
3145 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3146 if test "${ac_cv_sys_long_file_names+set}" = set; then
3147   echo $ECHO_N "(cached) $ECHO_C" >&6
3148 else
3149   ac_cv_sys_long_file_names=yes
3150 # Test for long file names in all the places we know might matter:
3151 #      .                the current directory, where building will happen
3152 #      $prefix/lib      where we will be installing things
3153 #      $exec_prefix/lib likewise
3154 # eval it to expand exec_prefix.
3155 #      $TMPDIR          if set, where it might want to write temporary files
3156 # if $TMPDIR is not set:
3157 #      /tmp             where it might want to write temporary files
3158 #      /var/tmp         likewise
3159 #      /usr/tmp         likewise
3160 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3161   ac_tmpdirs=$TMPDIR
3162 else
3163   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3164 fi
3165 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3166   test -d $ac_dir || continue
3167   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3168   ac_xdir=$ac_dir/cf$$
3169   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3170   ac_tf1=$ac_xdir/conftest9012345
3171   ac_tf2=$ac_xdir/conftest9012346
3172   (echo 1 >$ac_tf1) 2>/dev/null
3173   (echo 2 >$ac_tf2) 2>/dev/null
3174   ac_val=`cat $ac_tf1 2>/dev/null`
3175   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3176     ac_cv_sys_long_file_names=no
3177     rm -rf $ac_xdir 2>/dev/null
3178     break
3179   fi
3180   rm -rf $ac_xdir 2>/dev/null
3181 done
3182 fi
3183 echo "$as_me:3183: result: $ac_cv_sys_long_file_names" >&5
3184 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3185 if test $ac_cv_sys_long_file_names = yes; then
3186
3187 cat >>confdefs.h <<\EOF
3188 #define HAVE_LONG_FILE_NAMES 1
3189 EOF
3190
3191 fi
3192
3193 # if we find pkg-config, check if we should install the ".pc" files.
3194
3195 echo "$as_me:3195: checking if you want to use pkg-config" >&5
3196 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3197
3198 # Check whether --with-pkg-config or --without-pkg-config was given.
3199 if test "${with_pkg_config+set}" = set; then
3200   withval="$with_pkg_config"
3201   cf_pkg_config=$withval
3202 else
3203   cf_pkg_config=yes
3204 fi;
3205 echo "$as_me:3205: result: $cf_pkg_config" >&5
3206 echo "${ECHO_T}$cf_pkg_config" >&6
3207
3208 case $cf_pkg_config in #(vi
3209 no) #(vi
3210         PKG_CONFIG=none
3211         ;;
3212 yes) #(vi
3213
3214 if test -n "$ac_tool_prefix"; then
3215   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3216 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3217 echo "$as_me:3217: checking for $ac_word" >&5
3218 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3219 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   case $PKG_CONFIG in
3223   [\\/]* | ?:[\\/]*)
3224   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3225   ;;
3226   *)
3227   ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 ac_dummy="$PATH"
3229 for ac_dir in $ac_dummy; do
3230   IFS=$ac_save_IFS
3231   test -z "$ac_dir" && ac_dir=.
3232   if $as_executable_p "$ac_dir/$ac_word"; then
3233    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3234    echo "$as_me:3234: found $ac_dir/$ac_word" >&5
3235    break
3236 fi
3237 done
3238
3239   ;;
3240 esac
3241 fi
3242 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3243
3244 if test -n "$PKG_CONFIG"; then
3245   echo "$as_me:3245: result: $PKG_CONFIG" >&5
3246 echo "${ECHO_T}$PKG_CONFIG" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252 fi
3253 if test -z "$ac_cv_path_PKG_CONFIG"; then
3254   ac_pt_PKG_CONFIG=$PKG_CONFIG
3255   # Extract the first word of "pkg-config", so it can be a program name with args.
3256 set dummy pkg-config; ac_word=$2
3257 echo "$as_me:3257: checking for $ac_word" >&5
3258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3259 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3260   echo $ECHO_N "(cached) $ECHO_C" >&6
3261 else
3262   case $ac_pt_PKG_CONFIG in
3263   [\\/]* | ?:[\\/]*)
3264   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3265   ;;
3266   *)
3267   ac_save_IFS=$IFS; IFS=$ac_path_separator
3268 ac_dummy="$PATH"
3269 for ac_dir in $ac_dummy; do
3270   IFS=$ac_save_IFS
3271   test -z "$ac_dir" && ac_dir=.
3272   if $as_executable_p "$ac_dir/$ac_word"; then
3273    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3274    echo "$as_me:3274: found $ac_dir/$ac_word" >&5
3275    break
3276 fi
3277 done
3278
3279   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3280   ;;
3281 esac
3282 fi
3283 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3284
3285 if test -n "$ac_pt_PKG_CONFIG"; then
3286   echo "$as_me:3286: result: $ac_pt_PKG_CONFIG" >&5
3287 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3288 else
3289   echo "$as_me:3289: result: no" >&5
3290 echo "${ECHO_T}no" >&6
3291 fi
3292
3293   PKG_CONFIG=$ac_pt_PKG_CONFIG
3294 else
3295   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3296 fi
3297
3298         ;;
3299 *)
3300         PKG_CONFIG=$withval
3301         ;;
3302 esac
3303
3304 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3305 if test "$PKG_CONFIG" != none ; then
3306
3307 if test "x$prefix" != xNONE; then
3308   cf_path_syntax="$prefix"
3309 else
3310   cf_path_syntax="$ac_default_prefix"
3311 fi
3312
3313 case ".$PKG_CONFIG" in #(vi
3314 .\$\(*\)*|.\'*\'*) #(vi
3315   ;;
3316 ..|./*|.\\*) #(vi
3317   ;;
3318 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3319   ;;
3320 .\${*prefix}*|.\${*dir}*) #(vi
3321   eval PKG_CONFIG="$PKG_CONFIG"
3322   case ".$PKG_CONFIG" in #(vi
3323   .NONE/*)
3324     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3325     ;;
3326   esac
3327   ;; #(vi
3328 .no|.NONE/*)
3329   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3330   ;;
3331 *)
3332   { { echo "$as_me:3332: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3333 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3334    { (exit 1); exit 1; }; }
3335   ;;
3336 esac
3337
3338 fi
3339
3340 if test "$PKG_CONFIG" != none ; then
3341         echo "$as_me:3341: checking for $PKG_CONFIG library directory" >&5
3342 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3343
3344 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3345 if test "${with_pkg_config_libdir+set}" = set; then
3346   withval="$with_pkg_config_libdir"
3347   PKG_CONFIG_LIBDIR=$withval
3348 else
3349   PKG_CONFIG_LIBDIR=yes
3350 fi;
3351
3352         case x$PKG_CONFIG_LIBDIR in #(vi
3353         x/*) #(vi
3354                 ;;
3355         xyes) #(vi
3356                 # look for the library directory using the same prefix as the executable
3357                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3358                 case x`(arch) 2>/dev/null` in #(vi
3359                 *64) #(vi
3360                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3361                         do
3362                                 if test -d $cf_config/pkgconfig
3363                                 then
3364                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3365                                         break
3366                                 fi
3367                         done
3368                         ;;
3369                 *)
3370                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3371                         ;;
3372                 esac
3373                 ;;
3374         *)
3375                 ;;
3376         esac
3377
3378         echo "$as_me:3378: result: $PKG_CONFIG_LIBDIR" >&5
3379 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3380 fi
3381
3382 if test "$PKG_CONFIG" != none ; then
3383         echo "$as_me:3383: checking if we should install .pc files for $PKG_CONFIG" >&5
3384 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3385
3386 # Check whether --enable-pc-files or --disable-pc-files was given.
3387 if test "${enable_pc_files+set}" = set; then
3388   enableval="$enable_pc_files"
3389   enable_pc_files=$enableval
3390 else
3391   enable_pc_files=no
3392 fi;
3393         echo "$as_me:3393: result: $enable_pc_files" >&5
3394 echo "${ECHO_T}$enable_pc_files" >&6
3395         if test "$enable_pc_files" != no
3396         then
3397
3398 if test "x$prefix" != xNONE; then
3399   cf_path_syntax="$prefix"
3400 else
3401   cf_path_syntax="$ac_default_prefix"
3402 fi
3403
3404 case ".$PKG_CONFIG_LIBDIR" in #(vi
3405 .\$\(*\)*|.\'*\'*) #(vi
3406   ;;
3407 ..|./*|.\\*) #(vi
3408   ;;
3409 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3410   ;;
3411 .\${*prefix}*|.\${*dir}*) #(vi
3412   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3413   case ".$PKG_CONFIG_LIBDIR" in #(vi
3414   .NONE/*)
3415     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3416     ;;
3417   esac
3418   ;; #(vi
3419 .no|.NONE/*)
3420   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3421   ;;
3422 *)
3423   { { echo "$as_me:3423: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3424 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3425    { (exit 1); exit 1; }; }
3426   ;;
3427 esac
3428
3429         fi
3430 else
3431         enable_pc_files=no
3432 fi
3433
3434 echo "$as_me:3434: checking if we should assume mixed-case filenames" >&5
3435 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3436
3437 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3438 if test "${enable_mixed_case+set}" = set; then
3439   enableval="$enable_mixed_case"
3440   enable_mixedcase=$enableval
3441 else
3442   enable_mixedcase=auto
3443 fi;
3444 echo "$as_me:3444: result: $enable_mixedcase" >&5
3445 echo "${ECHO_T}$enable_mixedcase" >&6
3446 if test "$enable_mixedcase" = "auto" ; then
3447
3448 echo "$as_me:3448: checking if filesystem supports mixed-case filenames" >&5
3449 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3450 if test "${cf_cv_mixedcase+set}" = set; then
3451   echo $ECHO_N "(cached) $ECHO_C" >&6
3452 else
3453
3454 if test "$cross_compiling" = yes ; then
3455         case $target_alias in #(vi
3456         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3457                 cf_cv_mixedcase=no
3458                 ;;
3459         *)
3460                 cf_cv_mixedcase=yes
3461                 ;;
3462         esac
3463 else
3464         rm -f conftest CONFTEST
3465         echo test >conftest
3466         if test -f CONFTEST ; then
3467                 cf_cv_mixedcase=no
3468         else
3469                 cf_cv_mixedcase=yes
3470         fi
3471         rm -f conftest CONFTEST
3472 fi
3473
3474 fi
3475 echo "$as_me:3475: result: $cf_cv_mixedcase" >&5
3476 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3477 test "$cf_cv_mixedcase" = yes &&
3478 cat >>confdefs.h <<\EOF
3479 #define MIXEDCASE_FILENAMES 1
3480 EOF
3481
3482 else
3483     cf_cv_mixedcase=$enable_mixedcase
3484     if test "x$enable_mixedcase" = "xyes" ; then
3485
3486 cat >>confdefs.h <<\EOF
3487 #define MIXEDCASE_FILENAMES 1
3488 EOF
3489
3490     fi
3491 fi
3492
3493 # do this after mixed-case option (tags/TAGS is not as important as tic).
3494 echo "$as_me:3494: checking whether ${MAKE-make} sets \${MAKE}" >&5
3495 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3496 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3497 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3498   echo $ECHO_N "(cached) $ECHO_C" >&6
3499 else
3500   cat >conftest.make <<\EOF
3501 all:
3502         @echo 'ac_maketemp="${MAKE}"'
3503 EOF
3504 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3505 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3506 if test -n "$ac_maketemp"; then
3507   eval ac_cv_prog_make_${ac_make}_set=yes
3508 else
3509   eval ac_cv_prog_make_${ac_make}_set=no
3510 fi
3511 rm -f conftest.make
3512 fi
3513 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3514   echo "$as_me:3514: result: yes" >&5
3515 echo "${ECHO_T}yes" >&6
3516   SET_MAKE=
3517 else
3518   echo "$as_me:3518: result: no" >&5
3519 echo "${ECHO_T}no" >&6
3520   SET_MAKE="MAKE=${MAKE-make}"
3521 fi
3522
3523 for ac_prog in exctags ctags
3524 do
3525   # Extract the first word of "$ac_prog", so it can be a program name with args.
3526 set dummy $ac_prog; ac_word=$2
3527 echo "$as_me:3527: checking for $ac_word" >&5
3528 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3529 if test "${ac_cv_prog_CTAGS+set}" = set; then
3530   echo $ECHO_N "(cached) $ECHO_C" >&6
3531 else
3532   if test -n "$CTAGS"; then
3533   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3534 else
3535   ac_save_IFS=$IFS; IFS=$ac_path_separator
3536 ac_dummy="$PATH"
3537 for ac_dir in $ac_dummy; do
3538   IFS=$ac_save_IFS
3539   test -z "$ac_dir" && ac_dir=.
3540   $as_executable_p "$ac_dir/$ac_word" || continue
3541 ac_cv_prog_CTAGS="$ac_prog"
3542 echo "$as_me:3542: found $ac_dir/$ac_word" >&5
3543 break
3544 done
3545
3546 fi
3547 fi
3548 CTAGS=$ac_cv_prog_CTAGS
3549 if test -n "$CTAGS"; then
3550   echo "$as_me:3550: result: $CTAGS" >&5
3551 echo "${ECHO_T}$CTAGS" >&6
3552 else
3553   echo "$as_me:3553: result: no" >&5
3554 echo "${ECHO_T}no" >&6
3555 fi
3556
3557   test -n "$CTAGS" && break
3558 done
3559
3560 for ac_prog in exetags etags
3561 do
3562   # Extract the first word of "$ac_prog", so it can be a program name with args.
3563 set dummy $ac_prog; ac_word=$2
3564 echo "$as_me:3564: checking for $ac_word" >&5
3565 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3566 if test "${ac_cv_prog_ETAGS+set}" = set; then
3567   echo $ECHO_N "(cached) $ECHO_C" >&6
3568 else
3569   if test -n "$ETAGS"; then
3570   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3571 else
3572   ac_save_IFS=$IFS; IFS=$ac_path_separator
3573 ac_dummy="$PATH"
3574 for ac_dir in $ac_dummy; do
3575   IFS=$ac_save_IFS
3576   test -z "$ac_dir" && ac_dir=.
3577   $as_executable_p "$ac_dir/$ac_word" || continue
3578 ac_cv_prog_ETAGS="$ac_prog"
3579 echo "$as_me:3579: found $ac_dir/$ac_word" >&5
3580 break
3581 done
3582
3583 fi
3584 fi
3585 ETAGS=$ac_cv_prog_ETAGS
3586 if test -n "$ETAGS"; then
3587   echo "$as_me:3587: result: $ETAGS" >&5
3588 echo "${ECHO_T}$ETAGS" >&6
3589 else
3590   echo "$as_me:3590: result: no" >&5
3591 echo "${ECHO_T}no" >&6
3592 fi
3593
3594   test -n "$ETAGS" && break
3595 done
3596
3597 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3598 set dummy ${CTAGS:-ctags}; ac_word=$2
3599 echo "$as_me:3599: checking for $ac_word" >&5
3600 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3601 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3602   echo $ECHO_N "(cached) $ECHO_C" >&6
3603 else
3604   if test -n "$MAKE_LOWER_TAGS"; then
3605   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3606 else
3607   ac_save_IFS=$IFS; IFS=$ac_path_separator
3608 ac_dummy="$PATH"
3609 for ac_dir in $ac_dummy; do
3610   IFS=$ac_save_IFS
3611   test -z "$ac_dir" && ac_dir=.
3612   $as_executable_p "$ac_dir/$ac_word" || continue
3613 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3614 echo "$as_me:3614: found $ac_dir/$ac_word" >&5
3615 break
3616 done
3617
3618   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3619 fi
3620 fi
3621 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3622 if test -n "$MAKE_LOWER_TAGS"; then
3623   echo "$as_me:3623: result: $MAKE_LOWER_TAGS" >&5
3624 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3625 else
3626   echo "$as_me:3626: result: no" >&5
3627 echo "${ECHO_T}no" >&6
3628 fi
3629
3630 if test "$cf_cv_mixedcase" = yes ; then
3631         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3632 set dummy ${ETAGS:-etags}; ac_word=$2
3633 echo "$as_me:3633: checking for $ac_word" >&5
3634 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3635 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3636   echo $ECHO_N "(cached) $ECHO_C" >&6
3637 else
3638   if test -n "$MAKE_UPPER_TAGS"; then
3639   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3640 else
3641   ac_save_IFS=$IFS; IFS=$ac_path_separator
3642 ac_dummy="$PATH"
3643 for ac_dir in $ac_dummy; do
3644   IFS=$ac_save_IFS
3645   test -z "$ac_dir" && ac_dir=.
3646   $as_executable_p "$ac_dir/$ac_word" || continue
3647 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3648 echo "$as_me:3648: found $ac_dir/$ac_word" >&5
3649 break
3650 done
3651
3652   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3653 fi
3654 fi
3655 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3656 if test -n "$MAKE_UPPER_TAGS"; then
3657   echo "$as_me:3657: result: $MAKE_UPPER_TAGS" >&5
3658 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3659 else
3660   echo "$as_me:3660: result: no" >&5
3661 echo "${ECHO_T}no" >&6
3662 fi
3663
3664 else
3665         MAKE_UPPER_TAGS=no
3666 fi
3667
3668 if test "$MAKE_UPPER_TAGS" = yes ; then
3669         MAKE_UPPER_TAGS=
3670 else
3671         MAKE_UPPER_TAGS="#"
3672 fi
3673
3674 if test "$MAKE_LOWER_TAGS" = yes ; then
3675         MAKE_LOWER_TAGS=
3676 else
3677         MAKE_LOWER_TAGS="#"
3678 fi
3679
3680 echo "$as_me:3680: checking for makeflags variable" >&5
3681 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3682 if test "${cf_cv_makeflags+set}" = set; then
3683   echo $ECHO_N "(cached) $ECHO_C" >&6
3684 else
3685
3686         cf_cv_makeflags=''
3687         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3688         do
3689                 cat >cf_makeflags.tmp <<CF_EOF
3690 SHELL = /bin/sh
3691 all :
3692         @ echo '.$cf_option'
3693 CF_EOF
3694                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3695                 case "$cf_result" in
3696                 .*k)
3697                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3698                         case "$cf_result" in
3699                         .*CC=*) cf_cv_makeflags=
3700                                 ;;
3701                         *)      cf_cv_makeflags=$cf_option
3702                                 ;;
3703                         esac
3704                         break
3705                         ;;
3706                 .-)     ;;
3707                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3708                         ;;
3709                 esac
3710         done
3711         rm -f cf_makeflags.tmp
3712
3713 fi
3714 echo "$as_me:3714: result: $cf_cv_makeflags" >&5
3715 echo "${ECHO_T}$cf_cv_makeflags" >&6
3716
3717 if test -n "$ac_tool_prefix"; then
3718   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3719 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3720 echo "$as_me:3720: checking for $ac_word" >&5
3721 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3722 if test "${ac_cv_prog_RANLIB+set}" = set; then
3723   echo $ECHO_N "(cached) $ECHO_C" >&6
3724 else
3725   if test -n "$RANLIB"; then
3726   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3727 else
3728   ac_save_IFS=$IFS; IFS=$ac_path_separator
3729 ac_dummy="$PATH"
3730 for ac_dir in $ac_dummy; do
3731   IFS=$ac_save_IFS
3732   test -z "$ac_dir" && ac_dir=.
3733   $as_executable_p "$ac_dir/$ac_word" || continue
3734 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3735 echo "$as_me:3735: found $ac_dir/$ac_word" >&5
3736 break
3737 done
3738
3739 fi
3740 fi
3741 RANLIB=$ac_cv_prog_RANLIB
3742 if test -n "$RANLIB"; then
3743   echo "$as_me:3743: result: $RANLIB" >&5
3744 echo "${ECHO_T}$RANLIB" >&6
3745 else
3746   echo "$as_me:3746: result: no" >&5
3747 echo "${ECHO_T}no" >&6
3748 fi
3749
3750 fi
3751 if test -z "$ac_cv_prog_RANLIB"; then
3752   ac_ct_RANLIB=$RANLIB
3753   # Extract the first word of "ranlib", so it can be a program name with args.
3754 set dummy ranlib; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$ac_ct_RANLIB"; then
3761   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_ac_ct_RANLIB="ranlib"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3775 fi
3776 fi
3777 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3778 if test -n "$ac_ct_RANLIB"; then
3779   echo "$as_me:3779: result: $ac_ct_RANLIB" >&5
3780 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786   RANLIB=$ac_ct_RANLIB
3787 else
3788   RANLIB="$ac_cv_prog_RANLIB"
3789 fi
3790
3791 if test -n "$ac_tool_prefix"; then
3792   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3793 set dummy ${ac_tool_prefix}ld; ac_word=$2
3794 echo "$as_me:3794: checking for $ac_word" >&5
3795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3796 if test "${ac_cv_prog_LD+set}" = set; then
3797   echo $ECHO_N "(cached) $ECHO_C" >&6
3798 else
3799   if test -n "$LD"; then
3800   ac_cv_prog_LD="$LD" # Let the user override the test.
3801 else
3802   ac_save_IFS=$IFS; IFS=$ac_path_separator
3803 ac_dummy="$PATH"
3804 for ac_dir in $ac_dummy; do
3805   IFS=$ac_save_IFS
3806   test -z "$ac_dir" && ac_dir=.
3807   $as_executable_p "$ac_dir/$ac_word" || continue
3808 ac_cv_prog_LD="${ac_tool_prefix}ld"
3809 echo "$as_me:3809: found $ac_dir/$ac_word" >&5
3810 break
3811 done
3812
3813 fi
3814 fi
3815 LD=$ac_cv_prog_LD
3816 if test -n "$LD"; then
3817   echo "$as_me:3817: result: $LD" >&5
3818 echo "${ECHO_T}$LD" >&6
3819 else
3820   echo "$as_me:3820: result: no" >&5
3821 echo "${ECHO_T}no" >&6
3822 fi
3823
3824 fi
3825 if test -z "$ac_cv_prog_LD"; then
3826   ac_ct_LD=$LD
3827   # Extract the first word of "ld", so it can be a program name with args.
3828 set dummy ld; ac_word=$2
3829 echo "$as_me:3829: checking for $ac_word" >&5
3830 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3831 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3832   echo $ECHO_N "(cached) $ECHO_C" >&6
3833 else
3834   if test -n "$ac_ct_LD"; then
3835   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3836 else
3837   ac_save_IFS=$IFS; IFS=$ac_path_separator
3838 ac_dummy="$PATH"
3839 for ac_dir in $ac_dummy; do
3840   IFS=$ac_save_IFS
3841   test -z "$ac_dir" && ac_dir=.
3842   $as_executable_p "$ac_dir/$ac_word" || continue
3843 ac_cv_prog_ac_ct_LD="ld"
3844 echo "$as_me:3844: found $ac_dir/$ac_word" >&5
3845 break
3846 done
3847
3848   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3849 fi
3850 fi
3851 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3852 if test -n "$ac_ct_LD"; then
3853   echo "$as_me:3853: result: $ac_ct_LD" >&5
3854 echo "${ECHO_T}$ac_ct_LD" >&6
3855 else
3856   echo "$as_me:3856: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858 fi
3859
3860   LD=$ac_ct_LD
3861 else
3862   LD="$ac_cv_prog_LD"
3863 fi
3864
3865 if test -n "$ac_tool_prefix"; then
3866   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3867 set dummy ${ac_tool_prefix}ar; ac_word=$2
3868 echo "$as_me:3868: checking for $ac_word" >&5
3869 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3870 if test "${ac_cv_prog_AR+set}" = set; then
3871   echo $ECHO_N "(cached) $ECHO_C" >&6
3872 else
3873   if test -n "$AR"; then
3874   ac_cv_prog_AR="$AR" # Let the user override the test.
3875 else
3876   ac_save_IFS=$IFS; IFS=$ac_path_separator
3877 ac_dummy="$PATH"
3878 for ac_dir in $ac_dummy; do
3879   IFS=$ac_save_IFS
3880   test -z "$ac_dir" && ac_dir=.
3881   $as_executable_p "$ac_dir/$ac_word" || continue
3882 ac_cv_prog_AR="${ac_tool_prefix}ar"
3883 echo "$as_me:3883: found $ac_dir/$ac_word" >&5
3884 break
3885 done
3886
3887 fi
3888 fi
3889 AR=$ac_cv_prog_AR
3890 if test -n "$AR"; then
3891   echo "$as_me:3891: result: $AR" >&5
3892 echo "${ECHO_T}$AR" >&6
3893 else
3894   echo "$as_me:3894: result: no" >&5
3895 echo "${ECHO_T}no" >&6
3896 fi
3897
3898 fi
3899 if test -z "$ac_cv_prog_AR"; then
3900   ac_ct_AR=$AR
3901   # Extract the first word of "ar", so it can be a program name with args.
3902 set dummy ar; ac_word=$2
3903 echo "$as_me:3903: checking for $ac_word" >&5
3904 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3905 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3906   echo $ECHO_N "(cached) $ECHO_C" >&6
3907 else
3908   if test -n "$ac_ct_AR"; then
3909   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3910 else
3911   ac_save_IFS=$IFS; IFS=$ac_path_separator
3912 ac_dummy="$PATH"
3913 for ac_dir in $ac_dummy; do
3914   IFS=$ac_save_IFS
3915   test -z "$ac_dir" && ac_dir=.
3916   $as_executable_p "$ac_dir/$ac_word" || continue
3917 ac_cv_prog_ac_ct_AR="ar"
3918 echo "$as_me:3918: found $ac_dir/$ac_word" >&5
3919 break
3920 done
3921
3922   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3923 fi
3924 fi
3925 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3926 if test -n "$ac_ct_AR"; then
3927   echo "$as_me:3927: result: $ac_ct_AR" >&5
3928 echo "${ECHO_T}$ac_ct_AR" >&6
3929 else
3930   echo "$as_me:3930: result: no" >&5
3931 echo "${ECHO_T}no" >&6
3932 fi
3933
3934   AR=$ac_ct_AR
3935 else
3936   AR="$ac_cv_prog_AR"
3937 fi
3938
3939 if test -n "$ac_tool_prefix"; then
3940   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3941 set dummy ${ac_tool_prefix}ar; ac_word=$2
3942 echo "$as_me:3942: checking for $ac_word" >&5
3943 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3944 if test "${ac_cv_prog_AR+set}" = set; then
3945   echo $ECHO_N "(cached) $ECHO_C" >&6
3946 else
3947   if test -n "$AR"; then
3948   ac_cv_prog_AR="$AR" # Let the user override the test.
3949 else
3950   ac_save_IFS=$IFS; IFS=$ac_path_separator
3951 ac_dummy="$PATH"
3952 for ac_dir in $ac_dummy; do
3953   IFS=$ac_save_IFS
3954   test -z "$ac_dir" && ac_dir=.
3955   $as_executable_p "$ac_dir/$ac_word" || continue
3956 ac_cv_prog_AR="${ac_tool_prefix}ar"
3957 echo "$as_me:3957: found $ac_dir/$ac_word" >&5
3958 break
3959 done
3960
3961 fi
3962 fi
3963 AR=$ac_cv_prog_AR
3964 if test -n "$AR"; then
3965   echo "$as_me:3965: result: $AR" >&5
3966 echo "${ECHO_T}$AR" >&6
3967 else
3968   echo "$as_me:3968: result: no" >&5
3969 echo "${ECHO_T}no" >&6
3970 fi
3971
3972 fi
3973 if test -z "$ac_cv_prog_AR"; then
3974   ac_ct_AR=$AR
3975   # Extract the first word of "ar", so it can be a program name with args.
3976 set dummy ar; ac_word=$2
3977 echo "$as_me:3977: checking for $ac_word" >&5
3978 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3979 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3980   echo $ECHO_N "(cached) $ECHO_C" >&6
3981 else
3982   if test -n "$ac_ct_AR"; then
3983   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3984 else
3985   ac_save_IFS=$IFS; IFS=$ac_path_separator
3986 ac_dummy="$PATH"
3987 for ac_dir in $ac_dummy; do
3988   IFS=$ac_save_IFS
3989   test -z "$ac_dir" && ac_dir=.
3990   $as_executable_p "$ac_dir/$ac_word" || continue
3991 ac_cv_prog_ac_ct_AR="ar"
3992 echo "$as_me:3992: found $ac_dir/$ac_word" >&5
3993 break
3994 done
3995
3996   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3997 fi
3998 fi
3999 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4000 if test -n "$ac_ct_AR"; then
4001   echo "$as_me:4001: result: $ac_ct_AR" >&5
4002 echo "${ECHO_T}$ac_ct_AR" >&6
4003 else
4004   echo "$as_me:4004: result: no" >&5
4005 echo "${ECHO_T}no" >&6
4006 fi
4007
4008   AR=$ac_ct_AR
4009 else
4010   AR="$ac_cv_prog_AR"
4011 fi
4012
4013 echo "$as_me:4013: checking for options to update archives" >&5
4014 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4015 if test "${cf_cv_ar_flags+set}" = set; then
4016   echo $ECHO_N "(cached) $ECHO_C" >&6
4017 else
4018
4019         cf_cv_ar_flags=unknown
4020         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4021         do
4022
4023                 # check if $ARFLAGS already contains this choice
4024                 if test "x$ARFLAGS" != "x" ; then
4025                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4026                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4027                                 cf_cv_ar_flags=
4028                                 break
4029                         fi
4030                 fi
4031
4032                 rm -f conftest.$ac_cv_objext
4033                 rm -f conftest.a
4034
4035                 cat >conftest.$ac_ext <<EOF
4036 #line 4036 "configure"
4037 int     testdata[3] = { 123, 456, 789 };
4038 EOF
4039                 if { (eval echo "$as_me:4039: \"$ac_compile\"") >&5
4040   (eval $ac_compile) 2>&5
4041   ac_status=$?
4042   echo "$as_me:4042: \$? = $ac_status" >&5
4043   (exit $ac_status); } ; then
4044                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4045                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4046                         if test -f conftest.a ; then
4047                                 cf_cv_ar_flags=$cf_ar_flags
4048                                 break
4049                         fi
4050                 else
4051                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4052
4053 echo "${as_me:-configure}:4053: testing cannot compile test-program ..." 1>&5
4054
4055                         break
4056                 fi
4057         done
4058         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4059
4060 fi
4061 echo "$as_me:4061: result: $cf_cv_ar_flags" >&5
4062 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4063
4064 if test -n "$ARFLAGS" ; then
4065         if test -n "$cf_cv_ar_flags" ; then
4066                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4067         fi
4068 else
4069         ARFLAGS=$cf_cv_ar_flags
4070 fi
4071
4072 echo "$as_me:4072: checking if you have specified an install-prefix" >&5
4073 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4074
4075 # Check whether --with-install-prefix or --without-install-prefix was given.
4076 if test "${with_install_prefix+set}" = set; then
4077   withval="$with_install_prefix"
4078   case "x$withval" in #(vi
4079         xyes|xno) #(vi
4080                 ;;
4081         *)      DESTDIR="$withval"
4082                 ;;
4083         esac
4084 fi;
4085 echo "$as_me:4085: result: $DESTDIR" >&5
4086 echo "${ECHO_T}$DESTDIR" >&6
4087
4088 ###############################################################################
4089
4090 # If we're cross-compiling, allow the user to override the tools and their
4091 # options.  The configure script is oriented toward identifying the host
4092 # compiler, etc., but we need a build compiler to generate parts of the source.
4093
4094 if test "$cross_compiling" = yes ; then
4095
4096         # defaults that we might want to override
4097         : ${BUILD_CFLAGS:=''}
4098         : ${BUILD_CPPFLAGS:=''}
4099         : ${BUILD_LDFLAGS:=''}
4100         : ${BUILD_LIBS:=''}
4101         : ${BUILD_EXEEXT:='$x'}
4102         : ${BUILD_OBJEXT:='o'}
4103
4104 # Check whether --with-build-cc or --without-build-cc was given.
4105 if test "${with_build_cc+set}" = set; then
4106   withval="$with_build_cc"
4107   BUILD_CC="$withval"
4108 else
4109   for ac_prog in gcc cc cl
4110 do
4111   # Extract the first word of "$ac_prog", so it can be a program name with args.
4112 set dummy $ac_prog; ac_word=$2
4113 echo "$as_me:4113: checking for $ac_word" >&5
4114 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4115 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4116   echo $ECHO_N "(cached) $ECHO_C" >&6
4117 else
4118   if test -n "$BUILD_CC"; then
4119   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4120 else
4121   ac_save_IFS=$IFS; IFS=$ac_path_separator
4122 ac_dummy="$PATH"
4123 for ac_dir in $ac_dummy; do
4124   IFS=$ac_save_IFS
4125   test -z "$ac_dir" && ac_dir=.
4126   $as_executable_p "$ac_dir/$ac_word" || continue
4127 ac_cv_prog_BUILD_CC="$ac_prog"
4128 echo "$as_me:4128: found $ac_dir/$ac_word" >&5
4129 break
4130 done
4131
4132 fi
4133 fi
4134 BUILD_CC=$ac_cv_prog_BUILD_CC
4135 if test -n "$BUILD_CC"; then
4136   echo "$as_me:4136: result: $BUILD_CC" >&5
4137 echo "${ECHO_T}$BUILD_CC" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   test -n "$BUILD_CC" && break
4144 done
4145
4146 fi;
4147         echo "$as_me:4147: checking for native build C compiler" >&5
4148 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4149         echo "$as_me:4149: result: $BUILD_CC" >&5
4150 echo "${ECHO_T}$BUILD_CC" >&6
4151
4152         echo "$as_me:4152: checking for native build C preprocessor" >&5
4153 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4154
4155 # Check whether --with-build-cpp or --without-build-cpp was given.
4156 if test "${with_build_cpp+set}" = set; then
4157   withval="$with_build_cpp"
4158   BUILD_CPP="$withval"
4159 else
4160   BUILD_CPP='${BUILD_CC} -E'
4161 fi;
4162         echo "$as_me:4162: result: $BUILD_CPP" >&5
4163 echo "${ECHO_T}$BUILD_CPP" >&6
4164
4165         echo "$as_me:4165: checking for native build C flags" >&5
4166 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4167
4168 # Check whether --with-build-cflags or --without-build-cflags was given.
4169 if test "${with_build_cflags+set}" = set; then
4170   withval="$with_build_cflags"
4171   BUILD_CFLAGS="$withval"
4172 fi;
4173         echo "$as_me:4173: result: $BUILD_CFLAGS" >&5
4174 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4175
4176         echo "$as_me:4176: checking for native build C preprocessor-flags" >&5
4177 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4178
4179 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4180 if test "${with_build_cppflags+set}" = set; then
4181   withval="$with_build_cppflags"
4182   BUILD_CPPFLAGS="$withval"
4183 fi;
4184         echo "$as_me:4184: result: $BUILD_CPPFLAGS" >&5
4185 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4186
4187         echo "$as_me:4187: checking for native build linker-flags" >&5
4188 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4189
4190 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4191 if test "${with_build_ldflags+set}" = set; then
4192   withval="$with_build_ldflags"
4193   BUILD_LDFLAGS="$withval"
4194 fi;
4195         echo "$as_me:4195: result: $BUILD_LDFLAGS" >&5
4196 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4197
4198         echo "$as_me:4198: checking for native build linker-libraries" >&5
4199 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4200
4201 # Check whether --with-build-libs or --without-build-libs was given.
4202 if test "${with_build_libs+set}" = set; then
4203   withval="$with_build_libs"
4204   BUILD_LIBS="$withval"
4205 fi;
4206         echo "$as_me:4206: result: $BUILD_LIBS" >&5
4207 echo "${ECHO_T}$BUILD_LIBS" >&6
4208
4209         # this assumes we're on Unix.
4210         BUILD_EXEEXT=
4211         BUILD_OBJEXT=o
4212
4213         : ${BUILD_CC:='${CC}'}
4214
4215         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4216                 { { echo "$as_me:4216: error: Cross-build requires two compilers.
4217 Use --with-build-cc to specify the native compiler." >&5
4218 echo "$as_me: error: Cross-build requires two compilers.
4219 Use --with-build-cc to specify the native compiler." >&2;}
4220    { (exit 1); exit 1; }; }
4221         fi
4222
4223 else
4224         : ${BUILD_CC:='${CC}'}
4225         : ${BUILD_CPP:='${CPP}'}
4226         : ${BUILD_CFLAGS:='${CFLAGS}'}
4227         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4228         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4229         : ${BUILD_LIBS:='${LIBS}'}
4230         : ${BUILD_EXEEXT:='$x'}
4231         : ${BUILD_OBJEXT:='o'}
4232 fi
4233
4234 ###############################################################################
4235
4236 ### Options to allow the user to specify the set of libraries which are used.
4237 ### Use "--without-normal --with-shared" to allow the default model to be
4238 ### shared, for example.
4239 cf_list_models=""
4240
4241 echo "$as_me:4241: checking if libtool -version-number should be used" >&5
4242 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4243
4244 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4245 if test "${enable_libtool_version+set}" = set; then
4246   enableval="$enable_libtool_version"
4247   test "$enableval" != no && enableval=yes
4248   if test "$enableval" != "yes" ; then
4249     cf_libtool_version=no
4250   else
4251     cf_libtool_version=yes
4252   fi
4253 else
4254   enableval=yes
4255   cf_libtool_version=yes
4256
4257 fi;
4258 echo "$as_me:4258: result: $cf_libtool_version" >&5
4259 echo "${ECHO_T}$cf_libtool_version" >&6
4260
4261 if test "$cf_libtool_version" = yes ; then
4262         LIBTOOL_VERSION="-version-number"
4263 else
4264         LIBTOOL_VERSION="-version-info"
4265 fi
4266
4267 LIBTOOL=
4268
4269 # common library maintenance symbols that are convenient for libtool scripts:
4270 LIB_CREATE='${AR} -cr'
4271 LIB_OBJECT='${OBJECTS}'
4272 LIB_SUFFIX=.a
4273 LIB_PREP="$RANLIB"
4274
4275 # symbols used to prop libtool up to enable it to determine what it should be
4276 # doing:
4277 LIB_CLEAN=
4278 LIB_COMPILE=
4279 LIB_LINK='${CC}'
4280 LIB_INSTALL=
4281 LIB_UNINSTALL=
4282
4283 echo "$as_me:4283: checking if you want to build libraries with libtool" >&5
4284 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4285
4286 # Check whether --with-libtool or --without-libtool was given.
4287 if test "${with_libtool+set}" = set; then
4288   withval="$with_libtool"
4289   with_libtool=$withval
4290 else
4291   with_libtool=no
4292 fi;
4293 echo "$as_me:4293: result: $with_libtool" >&5
4294 echo "${ECHO_T}$with_libtool" >&6
4295 if test "$with_libtool" != "no"; then
4296
4297         if test "$with_libtool" != "yes" ; then
4298
4299 if test "x$prefix" != xNONE; then
4300   cf_path_syntax="$prefix"
4301 else
4302   cf_path_syntax="$ac_default_prefix"
4303 fi
4304
4305 case ".$with_libtool" in #(vi
4306 .\$\(*\)*|.\'*\'*) #(vi
4307   ;;
4308 ..|./*|.\\*) #(vi
4309   ;;
4310 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4311   ;;
4312 .\${*prefix}*|.\${*dir}*) #(vi
4313   eval with_libtool="$with_libtool"
4314   case ".$with_libtool" in #(vi
4315   .NONE/*)
4316     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4317     ;;
4318   esac
4319   ;; #(vi
4320 .no|.NONE/*)
4321   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4322   ;;
4323 *)
4324   { { echo "$as_me:4324: error: expected a pathname, not \"$with_libtool\"" >&5
4325 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4326    { (exit 1); exit 1; }; }
4327   ;;
4328 esac
4329
4330                 LIBTOOL=$with_libtool
4331         else
4332                 # Extract the first word of "libtool", so it can be a program name with args.
4333 set dummy libtool; ac_word=$2
4334 echo "$as_me:4334: checking for $ac_word" >&5
4335 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4336 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4337   echo $ECHO_N "(cached) $ECHO_C" >&6
4338 else
4339   case $LIBTOOL in
4340   [\\/]* | ?:[\\/]*)
4341   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4342   ;;
4343   *)
4344   ac_save_IFS=$IFS; IFS=$ac_path_separator
4345 ac_dummy="$PATH"
4346 for ac_dir in $ac_dummy; do
4347   IFS=$ac_save_IFS
4348   test -z "$ac_dir" && ac_dir=.
4349   if $as_executable_p "$ac_dir/$ac_word"; then
4350    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4351    echo "$as_me:4351: found $ac_dir/$ac_word" >&5
4352    break
4353 fi
4354 done
4355
4356   ;;
4357 esac
4358 fi
4359 LIBTOOL=$ac_cv_path_LIBTOOL
4360
4361 if test -n "$LIBTOOL"; then
4362   echo "$as_me:4362: result: $LIBTOOL" >&5
4363 echo "${ECHO_T}$LIBTOOL" >&6
4364 else
4365   echo "$as_me:4365: result: no" >&5
4366 echo "${ECHO_T}no" >&6
4367 fi
4368
4369         fi
4370         if test -z "$LIBTOOL" ; then
4371                 { { echo "$as_me:4371: error: Cannot find libtool" >&5
4372 echo "$as_me: error: Cannot find libtool" >&2;}
4373    { (exit 1); exit 1; }; }
4374         fi
4375         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4376         LIB_OBJECT='${OBJECTS:.o=.lo}'
4377         LIB_SUFFIX=.la
4378         LIB_CLEAN='${LIBTOOL} --mode=clean'
4379         LIB_COMPILE='${LIBTOOL} --mode=compile'
4380         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4381         LIB_INSTALL='${LIBTOOL} --mode=install'
4382         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4383         LIB_PREP=:
4384
4385         # Show the version of libtool
4386         echo "$as_me:4386: checking version of libtool" >&5
4387 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4388
4389         # Save the version in a cache variable - this is not entirely a good
4390         # thing, but the version string from libtool is very ugly, and for
4391         # bug reports it might be useful to have the original string. "("
4392         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.].*//'`
4393         echo "$as_me:4393: result: $cf_cv_libtool_version" >&5
4394 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4395         if test -z "$cf_cv_libtool_version" ; then
4396                 { { echo "$as_me:4396: error: This is not GNU libtool" >&5
4397 echo "$as_me: error: This is not GNU libtool" >&2;}
4398    { (exit 1); exit 1; }; }
4399         fi
4400
4401         # special hack to add -no-undefined (which libtool should do for itself)
4402         LT_UNDEF=
4403         case "$cf_cv_system_name" in #(vi
4404         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4405                 LT_UNDEF=-no-undefined
4406                 ;;
4407         esac
4408
4409         # special hack to add --tag option for C++ compiler
4410         case $cf_cv_libtool_version in #(vi
4411         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4412                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4413                 LIBTOOL="$LIBTOOL --tag=CC"
4414                 ;;
4415         *)
4416                 LIBTOOL_CXX="$LIBTOOL"
4417                 ;;
4418         esac
4419 else
4420         LIBTOOL=""
4421         LIBTOOL_CXX=""
4422 fi
4423
4424 test -z "$LIBTOOL" && ECHO_LT=
4425
4426 if test "$with_libtool" != "no" ; then
4427
4428 cf_list_models="$cf_list_models libtool"
4429
4430 else
4431
4432 echo "$as_me:4432: checking if you want to build shared libraries" >&5
4433 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4434
4435 # Check whether --with-shared or --without-shared was given.
4436 if test "${with_shared+set}" = set; then
4437   withval="$with_shared"
4438   with_shared=$withval
4439 else
4440   with_shared=no
4441 fi;
4442 echo "$as_me:4442: result: $with_shared" >&5
4443 echo "${ECHO_T}$with_shared" >&6
4444 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4445
4446 echo "$as_me:4446: checking if you want to build static libraries" >&5
4447 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4448
4449 # Check whether --with-normal or --without-normal was given.
4450 if test "${with_normal+set}" = set; then
4451   withval="$with_normal"
4452   with_normal=$withval
4453 else
4454   with_normal=yes
4455 fi;
4456 echo "$as_me:4456: result: $with_normal" >&5
4457 echo "${ECHO_T}$with_normal" >&6
4458 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4459
4460 echo "$as_me:4460: checking if you want to build debug libraries" >&5
4461 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4462
4463 # Check whether --with-debug or --without-debug was given.
4464 if test "${with_debug+set}" = set; then
4465   withval="$with_debug"
4466   with_debug=$withval
4467 else
4468   with_debug=yes
4469 fi;
4470 echo "$as_me:4470: result: $with_debug" >&5
4471 echo "${ECHO_T}$with_debug" >&6
4472 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4473
4474 echo "$as_me:4474: checking if you want to build profiling libraries" >&5
4475 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4476
4477 # Check whether --with-profile or --without-profile was given.
4478 if test "${with_profile+set}" = set; then
4479   withval="$with_profile"
4480   with_profile=$withval
4481 else
4482   with_profile=no
4483 fi;
4484 echo "$as_me:4484: result: $with_profile" >&5
4485 echo "${ECHO_T}$with_profile" >&6
4486 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4487
4488 fi
4489
4490 ###############################################################################
4491
4492 echo "$as_me:4492: checking for specified models" >&5
4493 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4494 test -z "$cf_list_models" && cf_list_models=normal
4495 test "$with_libtool" != "no" && cf_list_models=libtool
4496 echo "$as_me:4496: result: $cf_list_models" >&5
4497 echo "${ECHO_T}$cf_list_models" >&6
4498
4499 ### Use the first model as the default, and save its suffix for use in building
4500 ### up test-applications.
4501 echo "$as_me:4501: checking for default model" >&5
4502 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4503 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4504 echo "$as_me:4504: result: $DFT_LWR_MODEL" >&5
4505 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4506
4507 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4508
4509 TICS_NAME=tic
4510
4511 TINFO_NAME=tinfo
4512
4513 LIB_NAME=ncurses
4514
4515 LIB_DIR=../lib
4516 LIB_2ND=../../lib
4517
4518 echo "$as_me:4518: checking if you want to have a library-prefix" >&5
4519 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4520
4521 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4522 if test "${with_lib_prefix+set}" = set; then
4523   withval="$with_lib_prefix"
4524   with_lib_prefix=$withval
4525 else
4526   with_lib_prefix=auto
4527 fi;
4528 echo "$as_me:4528: result: $with_lib_prefix" >&5
4529 echo "${ECHO_T}$with_lib_prefix" >&6
4530
4531 if test $with_lib_prefix = auto
4532 then
4533
4534         case $cf_cv_system_name in #(vi
4535         OS/2*|os2*) #(vi
4536         LIB_PREFIX=''
4537         ;;
4538         *)      LIB_PREFIX='lib'
4539         ;;
4540         esac
4541 cf_prefix=$LIB_PREFIX
4542
4543 elif test $with_lib_prefix = no
4544 then
4545         LIB_PREFIX=
4546 else
4547         LIB_PREFIX=$with_lib_prefix
4548 fi
4549
4550 LIB_SUFFIX=
4551
4552         echo "$as_me:4552: checking for PATH separator" >&5
4553 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4554         case $cf_cv_system_name in
4555         os2*)   PATH_SEPARATOR=';'  ;;
4556         *)      ${PATH_SEPARATOR:=':'}  ;;
4557         esac
4558
4559         echo "$as_me:4559: result: $PATH_SEPARATOR" >&5
4560 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4561
4562 ###############################################################################
4563
4564 echo "$as_me:4564: checking if you want to build a separate terminfo library" >&5
4565 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4566
4567 # Check whether --with-termlib or --without-termlib was given.
4568 if test "${with_termlib+set}" = set; then
4569   withval="$with_termlib"
4570   with_termlib=$withval
4571 else
4572   with_termlib=no
4573 fi;
4574 echo "$as_me:4574: result: $with_termlib" >&5
4575 echo "${ECHO_T}$with_termlib" >&6
4576
4577 echo "$as_me:4577: checking if you want to build a separate tic library" >&5
4578 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4579
4580 # Check whether --with-ticlib or --without-ticlib was given.
4581 if test "${with_ticlib+set}" = set; then
4582   withval="$with_ticlib"
4583   with_ticlib=$withval
4584 else
4585   with_ticlib=no
4586 fi;
4587 echo "$as_me:4587: result: $with_ticlib" >&5
4588 echo "${ECHO_T}$with_ticlib" >&6
4589
4590 ### Checks for special libraries, must be done up-front.
4591 SHLIB_LIST=""
4592
4593 echo "$as_me:4593: checking if you want to link with the GPM mouse library" >&5
4594 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4595
4596 # Check whether --with-gpm or --without-gpm was given.
4597 if test "${with_gpm+set}" = set; then
4598   withval="$with_gpm"
4599   with_gpm=$withval
4600 else
4601   with_gpm=maybe
4602 fi;
4603 echo "$as_me:4603: result: $with_gpm" >&5
4604 echo "${ECHO_T}$with_gpm" >&6
4605
4606 if test "$with_gpm" != no ; then
4607         echo "$as_me:4607: checking for gpm.h" >&5
4608 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4609 if test "${ac_cv_header_gpm_h+set}" = set; then
4610   echo $ECHO_N "(cached) $ECHO_C" >&6
4611 else
4612   cat >conftest.$ac_ext <<_ACEOF
4613 #line 4613 "configure"
4614 #include "confdefs.h"
4615 #include <gpm.h>
4616 _ACEOF
4617 if { (eval echo "$as_me:4617: \"$ac_cpp conftest.$ac_ext\"") >&5
4618   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4619   ac_status=$?
4620   egrep -v '^ *\+' conftest.er1 >conftest.err
4621   rm -f conftest.er1
4622   cat conftest.err >&5
4623   echo "$as_me:4623: \$? = $ac_status" >&5
4624   (exit $ac_status); } >/dev/null; then
4625   if test -s conftest.err; then
4626     ac_cpp_err=$ac_c_preproc_warn_flag
4627   else
4628     ac_cpp_err=
4629   fi
4630 else
4631   ac_cpp_err=yes
4632 fi
4633 if test -z "$ac_cpp_err"; then
4634   ac_cv_header_gpm_h=yes
4635 else
4636   echo "$as_me: failed program was:" >&5
4637   cat conftest.$ac_ext >&5
4638   ac_cv_header_gpm_h=no
4639 fi
4640 rm -f conftest.err conftest.$ac_ext
4641 fi
4642 echo "$as_me:4642: result: $ac_cv_header_gpm_h" >&5
4643 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4644 if test $ac_cv_header_gpm_h = yes; then
4645
4646 cat >>confdefs.h <<\EOF
4647 #define HAVE_GPM_H 1
4648 EOF
4649
4650                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4651                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4652
4653 echo "${as_me:-configure}:4653: testing assuming we really have GPM library ..." 1>&5
4654
4655 cat >>confdefs.h <<\EOF
4656 #define HAVE_LIBGPM 1
4657 EOF
4658
4659                 else
4660                         echo "$as_me:4660: checking for Gpm_Open in -lgpm" >&5
4661 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4662 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4663   echo $ECHO_N "(cached) $ECHO_C" >&6
4664 else
4665   ac_check_lib_save_LIBS=$LIBS
4666 LIBS="-lgpm  $LIBS"
4667 cat >conftest.$ac_ext <<_ACEOF
4668 #line 4668 "configure"
4669 #include "confdefs.h"
4670
4671 /* Override any gcc2 internal prototype to avoid an error.  */
4672 #ifdef __cplusplus
4673 extern "C"
4674 #endif
4675 /* We use char because int might match the return type of a gcc2
4676    builtin and then its argument prototype would still apply.  */
4677 char Gpm_Open ();
4678 int
4679 main ()
4680 {
4681 Gpm_Open ();
4682   ;
4683   return 0;
4684 }
4685 _ACEOF
4686 rm -f conftest.$ac_objext conftest$ac_exeext
4687 if { (eval echo "$as_me:4687: \"$ac_link\"") >&5
4688   (eval $ac_link) 2>&5
4689   ac_status=$?
4690   echo "$as_me:4690: \$? = $ac_status" >&5
4691   (exit $ac_status); } &&
4692          { ac_try='test -s conftest$ac_exeext'
4693   { (eval echo "$as_me:4693: \"$ac_try\"") >&5
4694   (eval $ac_try) 2>&5
4695   ac_status=$?
4696   echo "$as_me:4696: \$? = $ac_status" >&5
4697   (exit $ac_status); }; }; then
4698   ac_cv_lib_gpm_Gpm_Open=yes
4699 else
4700   echo "$as_me: failed program was:" >&5
4701 cat conftest.$ac_ext >&5
4702 ac_cv_lib_gpm_Gpm_Open=no
4703 fi
4704 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4705 LIBS=$ac_check_lib_save_LIBS
4706 fi
4707 echo "$as_me:4707: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4708 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4709 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4710   :
4711 else
4712
4713                                 { { echo "$as_me:4713: error: Cannot link with GPM library" >&5
4714 echo "$as_me: error: Cannot link with GPM library" >&2;}
4715    { (exit 1); exit 1; }; }
4716                 fi
4717                 with_gpm=yes
4718
4719 fi
4720
4721 else
4722
4723                 test "$with_gpm" != maybe && { echo "$as_me:4723: WARNING: Cannot find GPM header" >&5
4724 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4725                 with_gpm=no
4726
4727 fi
4728
4729 fi
4730
4731 if test "$with_gpm" != no ; then
4732         echo "$as_me:4732: checking if you want to load GPM dynamically" >&5
4733 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4734
4735 # Check whether --with-dlsym or --without-dlsym was given.
4736 if test "${with_dlsym+set}" = set; then
4737   withval="$with_dlsym"
4738   with_dlsym=$withval
4739 else
4740   with_dlsym=yes
4741 fi;
4742         echo "$as_me:4742: result: $with_dlsym" >&5
4743 echo "${ECHO_T}$with_dlsym" >&6
4744         if test "x$with_dlsym" = xyes ; then
4745
4746 cf_have_dlsym=no
4747 echo "$as_me:4747: checking for dlsym" >&5
4748 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4749 if test "${ac_cv_func_dlsym+set}" = set; then
4750   echo $ECHO_N "(cached) $ECHO_C" >&6
4751 else
4752   cat >conftest.$ac_ext <<_ACEOF
4753 #line 4753 "configure"
4754 #include "confdefs.h"
4755 /* System header to define __stub macros and hopefully few prototypes,
4756     which can conflict with char dlsym (); below.  */
4757 #include <assert.h>
4758 /* Override any gcc2 internal prototype to avoid an error.  */
4759 #ifdef __cplusplus
4760 extern "C"
4761 #endif
4762 /* We use char because int might match the return type of a gcc2
4763    builtin and then its argument prototype would still apply.  */
4764 char dlsym ();
4765 char (*f) ();
4766
4767 int
4768 main ()
4769 {
4770 /* The GNU C library defines this for functions which it implements
4771     to always fail with ENOSYS.  Some functions are actually named
4772     something starting with __ and the normal name is an alias.  */
4773 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4774 choke me
4775 #else
4776 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4777 #endif
4778
4779   ;
4780   return 0;
4781 }
4782 _ACEOF
4783 rm -f conftest.$ac_objext conftest$ac_exeext
4784 if { (eval echo "$as_me:4784: \"$ac_link\"") >&5
4785   (eval $ac_link) 2>&5
4786   ac_status=$?
4787   echo "$as_me:4787: \$? = $ac_status" >&5
4788   (exit $ac_status); } &&
4789          { ac_try='test -s conftest$ac_exeext'
4790   { (eval echo "$as_me:4790: \"$ac_try\"") >&5
4791   (eval $ac_try) 2>&5
4792   ac_status=$?
4793   echo "$as_me:4793: \$? = $ac_status" >&5
4794   (exit $ac_status); }; }; then
4795   ac_cv_func_dlsym=yes
4796 else
4797   echo "$as_me: failed program was:" >&5
4798 cat conftest.$ac_ext >&5
4799 ac_cv_func_dlsym=no
4800 fi
4801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4802 fi
4803 echo "$as_me:4803: result: $ac_cv_func_dlsym" >&5
4804 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4805 if test $ac_cv_func_dlsym = yes; then
4806   cf_have_dlsym=yes
4807 else
4808
4809 cf_have_libdl=no
4810 echo "$as_me:4810: checking for dlsym in -ldl" >&5
4811 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4812 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4813   echo $ECHO_N "(cached) $ECHO_C" >&6
4814 else
4815   ac_check_lib_save_LIBS=$LIBS
4816 LIBS="-ldl  $LIBS"
4817 cat >conftest.$ac_ext <<_ACEOF
4818 #line 4818 "configure"
4819 #include "confdefs.h"
4820
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 #ifdef __cplusplus
4823 extern "C"
4824 #endif
4825 /* We use char because int might match the return type of a gcc2
4826    builtin and then its argument prototype would still apply.  */
4827 char dlsym ();
4828 int
4829 main ()
4830 {
4831 dlsym ();
4832   ;
4833   return 0;
4834 }
4835 _ACEOF
4836 rm -f conftest.$ac_objext conftest$ac_exeext
4837 if { (eval echo "$as_me:4837: \"$ac_link\"") >&5
4838   (eval $ac_link) 2>&5
4839   ac_status=$?
4840   echo "$as_me:4840: \$? = $ac_status" >&5
4841   (exit $ac_status); } &&
4842          { ac_try='test -s conftest$ac_exeext'
4843   { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844   (eval $ac_try) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); }; }; then
4848   ac_cv_lib_dl_dlsym=yes
4849 else
4850   echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 ac_cv_lib_dl_dlsym=no
4853 fi
4854 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4855 LIBS=$ac_check_lib_save_LIBS
4856 fi
4857 echo "$as_me:4857: result: $ac_cv_lib_dl_dlsym" >&5
4858 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4859 if test $ac_cv_lib_dl_dlsym = yes; then
4860
4861         cf_have_dlsym=yes
4862         cf_have_libdl=yes
4863 fi
4864
4865 fi
4866
4867 if test "$cf_have_dlsym" = yes ; then
4868         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4869
4870         echo "$as_me:4870: checking whether able to link to dl*() functions" >&5
4871 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4872         cat >conftest.$ac_ext <<_ACEOF
4873 #line 4873 "configure"
4874 #include "confdefs.h"
4875 #include <dlfcn.h>
4876 int
4877 main ()
4878 {
4879
4880                 void *obj;
4881                 if ((obj = dlopen("filename", 0)) != 0) {
4882                         if (dlsym(obj, "symbolname") == 0) {
4883                         dlclose(obj);
4884                         }
4885                 }
4886   ;
4887   return 0;
4888 }
4889 _ACEOF
4890 rm -f conftest.$ac_objext conftest$ac_exeext
4891 if { (eval echo "$as_me:4891: \"$ac_link\"") >&5
4892   (eval $ac_link) 2>&5
4893   ac_status=$?
4894   echo "$as_me:4894: \$? = $ac_status" >&5
4895   (exit $ac_status); } &&
4896          { ac_try='test -s conftest$ac_exeext'
4897   { (eval echo "$as_me:4897: \"$ac_try\"") >&5
4898   (eval $ac_try) 2>&5
4899   ac_status=$?
4900   echo "$as_me:4900: \$? = $ac_status" >&5
4901   (exit $ac_status); }; }; then
4902
4903 cat >>confdefs.h <<\EOF
4904 #define HAVE_LIBDL 1
4905 EOF
4906
4907 else
4908   echo "$as_me: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910
4911                 { { echo "$as_me:4911: error: Cannot link test program for libdl" >&5
4912 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4913    { (exit 1); exit 1; }; }
4914 fi
4915 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4916         echo "$as_me:4916: result: ok" >&5
4917 echo "${ECHO_T}ok" >&6
4918 else
4919         { { echo "$as_me:4919: error: Cannot find dlsym function" >&5
4920 echo "$as_me: error: Cannot find dlsym function" >&2;}
4921    { (exit 1); exit 1; }; }
4922 fi
4923
4924                 if test "x$with_gpm" != xyes ; then
4925                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4926
4927 echo "${as_me:-configure}:4927: testing assuming soname for gpm is $with_gpm ..." 1>&5
4928
4929                         cf_cv_gpm_soname="$with_gpm"
4930                 else
4931
4932 echo "$as_me:4932: checking for soname of gpm library" >&5
4933 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4934 if test "${cf_cv_gpm_soname+set}" = set; then
4935   echo $ECHO_N "(cached) $ECHO_C" >&6
4936 else
4937
4938 cf_cv_gpm_soname=unknown
4939 if test "$cross_compiling" != yes ; then
4940 cat >conftest.$ac_ext <<CF_EOF
4941 #include <gpm.h>
4942 int main()
4943 {
4944 if (Gpm_Open(0,0)) Gpm_Close();
4945         ${cf_cv_main_return:-return}(0);
4946 }
4947 CF_EOF
4948 cf_save_LIBS="$LIBS"
4949         LIBS="-lgpm $LIBS"
4950         if { (eval echo "$as_me:4950: \"$ac_compile\"") >&5
4951   (eval $ac_compile) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); } ; then
4955                 if { (eval echo "$as_me:4955: \"$ac_link\"") >&5
4956   (eval $ac_link) 2>&5
4957   ac_status=$?
4958   echo "$as_me:4958: \$? = $ac_status" >&5
4959   (exit $ac_status); } ; then
4960                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4961                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4962                 fi
4963         fi
4964 rm -rf conftest*
4965 LIBS="$cf_save_LIBS"
4966 fi
4967
4968 fi
4969 echo "$as_me:4969: result: $cf_cv_gpm_soname" >&5
4970 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4971
4972                 fi
4973                 test "$cf_cv_gpm_soname" != "unknown" &&
4974 cat >>confdefs.h <<EOF
4975 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4976 EOF
4977
4978                 SHLIB_LIST="-ldl $SHLIB_LIST"
4979         else
4980                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4981                 TEST_LIBS="-lgpm $TEST_LIBS"
4982         fi
4983
4984 cat >>confdefs.h <<\EOF
4985 #define HAVE_LIBGPM 1
4986 EOF
4987
4988 echo "$as_me:4988: checking for Gpm_Wgetch in -lgpm" >&5
4989 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4990 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4991   echo $ECHO_N "(cached) $ECHO_C" >&6
4992 else
4993   ac_check_lib_save_LIBS=$LIBS
4994 LIBS="-lgpm  $LIBS"
4995 cat >conftest.$ac_ext <<_ACEOF
4996 #line 4996 "configure"
4997 #include "confdefs.h"
4998
4999 /* Override any gcc2 internal prototype to avoid an error.  */
5000 #ifdef __cplusplus
5001 extern "C"
5002 #endif
5003 /* We use char because int might match the return type of a gcc2
5004    builtin and then its argument prototype would still apply.  */
5005 char Gpm_Wgetch ();
5006 int
5007 main ()
5008 {
5009 Gpm_Wgetch ();
5010   ;
5011   return 0;
5012 }
5013 _ACEOF
5014 rm -f conftest.$ac_objext conftest$ac_exeext
5015 if { (eval echo "$as_me:5015: \"$ac_link\"") >&5
5016   (eval $ac_link) 2>&5
5017   ac_status=$?
5018   echo "$as_me:5018: \$? = $ac_status" >&5
5019   (exit $ac_status); } &&
5020          { ac_try='test -s conftest$ac_exeext'
5021   { (eval echo "$as_me:5021: \"$ac_try\"") >&5
5022   (eval $ac_try) 2>&5
5023   ac_status=$?
5024   echo "$as_me:5024: \$? = $ac_status" >&5
5025   (exit $ac_status); }; }; then
5026   ac_cv_lib_gpm_Gpm_Wgetch=yes
5027 else
5028   echo "$as_me: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5030 ac_cv_lib_gpm_Gpm_Wgetch=no
5031 fi
5032 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5033 LIBS=$ac_check_lib_save_LIBS
5034 fi
5035 echo "$as_me:5035: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5036 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5037 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5038
5039 echo "$as_me:5039: checking if GPM is weakly bound to curses library" >&5
5040 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5041 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5042   echo $ECHO_N "(cached) $ECHO_C" >&6
5043 else
5044
5045 cf_cv_check_gpm_wgetch=unknown
5046 if test "$cross_compiling" != yes ; then
5047
5048 cat >conftest.$ac_ext <<CF_EOF
5049 #include <gpm.h>
5050 int main()
5051 {
5052         Gpm_Wgetch();
5053         ${cf_cv_main_return:-return}(0);
5054 }
5055 CF_EOF
5056
5057         cf_save_LIBS="$LIBS"
5058         # This only works if we can look at the symbol table.  If a shared
5059         # library is stripped for install, we cannot use that.  So we're forced
5060         # to rely on the static library, noting that some packagers may not
5061         # include it.
5062         LIBS="-static -lgpm -dynamic $LIBS"
5063         if { (eval echo "$as_me:5063: \"$ac_compile\"") >&5
5064   (eval $ac_compile) 2>&5
5065   ac_status=$?
5066   echo "$as_me:5066: \$? = $ac_status" >&5
5067   (exit $ac_status); } ; then
5068                 if { (eval echo "$as_me:5068: \"$ac_link\"") >&5
5069   (eval $ac_link) 2>&5
5070   ac_status=$?
5071   echo "$as_me:5071: \$? = $ac_status" >&5
5072   (exit $ac_status); } ; then
5073                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5074                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5075                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5076                 fi
5077         fi
5078         rm -rf conftest*
5079         LIBS="$cf_save_LIBS"
5080 fi
5081
5082 fi
5083 echo "$as_me:5083: result: $cf_cv_check_gpm_wgetch" >&5
5084 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5085
5086 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5087         { echo "$as_me:5087: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5088 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5089 fi
5090
5091 fi
5092
5093 fi
5094
5095 # not everyone has "test -c"
5096 if test -c /dev/sysmouse 2>/dev/null ; then
5097 echo "$as_me:5097: checking if you want to use sysmouse" >&5
5098 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5099
5100 # Check whether --with-sysmouse or --without-sysmouse was given.
5101 if test "${with_sysmouse+set}" = set; then
5102   withval="$with_sysmouse"
5103   cf_with_sysmouse=$withval
5104 else
5105   cf_with_sysmouse=maybe
5106 fi;
5107         if test "$cf_with_sysmouse" != no ; then
5108         cat >conftest.$ac_ext <<_ACEOF
5109 #line 5109 "configure"
5110 #include "confdefs.h"
5111
5112 #include <osreldate.h>
5113 #if (__FreeBSD_version >= 400017)
5114 #include <sys/consio.h>
5115 #include <sys/fbio.h>
5116 #else
5117 #include <machine/console.h>
5118 #endif
5119
5120 int
5121 main ()
5122 {
5123
5124         struct mouse_info the_mouse;
5125         ioctl(0, CONS_MOUSECTL, &the_mouse);
5126
5127   ;
5128   return 0;
5129 }
5130 _ACEOF
5131 rm -f conftest.$ac_objext
5132 if { (eval echo "$as_me:5132: \"$ac_compile\"") >&5
5133   (eval $ac_compile) 2>&5
5134   ac_status=$?
5135   echo "$as_me:5135: \$? = $ac_status" >&5
5136   (exit $ac_status); } &&
5137          { ac_try='test -s conftest.$ac_objext'
5138   { (eval echo "$as_me:5138: \"$ac_try\"") >&5
5139   (eval $ac_try) 2>&5
5140   ac_status=$?
5141   echo "$as_me:5141: \$? = $ac_status" >&5
5142   (exit $ac_status); }; }; then
5143   cf_with_sysmouse=yes
5144 else
5145   echo "$as_me: failed program was:" >&5
5146 cat conftest.$ac_ext >&5
5147 cf_with_sysmouse=no
5148 fi
5149 rm -f conftest.$ac_objext conftest.$ac_ext
5150         fi
5151 echo "$as_me:5151: result: $cf_with_sysmouse" >&5
5152 echo "${ECHO_T}$cf_with_sysmouse" >&6
5153 test "$cf_with_sysmouse" = yes &&
5154 cat >>confdefs.h <<\EOF
5155 #define USE_SYSMOUSE 1
5156 EOF
5157
5158 fi
5159
5160 if test X"$CC_G_OPT" = X"" ; then
5161         CC_G_OPT='-g'
5162         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5163 fi
5164
5165 if test X"$CXX_G_OPT" = X"" ; then
5166         CXX_G_OPT='-g'
5167         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5168 fi
5169
5170 echo "$as_me:5170: checking for default loader flags" >&5
5171 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5172 case $DFT_LWR_MODEL in
5173 libtool) LD_MODEL=''   ;;
5174 normal)  LD_MODEL=''   ;;
5175 debug)   LD_MODEL=$CC_G_OPT ;;
5176 profile) LD_MODEL='-pg';;
5177 shared)  LD_MODEL=''   ;;
5178 esac
5179 echo "$as_me:5179: result: $LD_MODEL" >&5
5180 echo "${ECHO_T}$LD_MODEL" >&6
5181
5182 case $DFT_LWR_MODEL in
5183 shared)
5184
5185 echo "$as_me:5185: checking if rpath option should be used" >&5
5186 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5187
5188 # Check whether --enable-rpath or --disable-rpath was given.
5189 if test "${enable_rpath+set}" = set; then
5190   enableval="$enable_rpath"
5191   cf_cv_enable_rpath=$enableval
5192 else
5193   cf_cv_enable_rpath=no
5194 fi;
5195 echo "$as_me:5195: result: $cf_cv_enable_rpath" >&5
5196 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5197
5198 echo "$as_me:5198: checking if shared libraries should be relinked during install" >&5
5199 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5200
5201 # Check whether --enable-relink or --disable-relink was given.
5202 if test "${enable_relink+set}" = set; then
5203   enableval="$enable_relink"
5204   cf_cv_do_relink=$enableval
5205 else
5206   cf_cv_do_relink=yes
5207 fi;
5208 echo "$as_me:5208: result: $cf_cv_do_relink" >&5
5209 echo "${ECHO_T}$cf_cv_do_relink" >&6
5210         ;;
5211 esac
5212
5213 LD_RPATH_OPT=
5214 echo "$as_me:5214: checking for an rpath option" >&5
5215 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5216 case $cf_cv_system_name in #(vi
5217 irix*) #(vi
5218         if test "$GCC" = yes; then
5219                 LD_RPATH_OPT="-Wl,-rpath,"
5220         else
5221                 LD_RPATH_OPT="-rpath "
5222         fi
5223         ;;
5224 linux*|gnu*|k*bsd*-gnu) #(vi
5225         LD_RPATH_OPT="-Wl,-rpath,"
5226         ;;
5227 openbsd[2-9].*|mirbsd*) #(vi
5228         LD_RPATH_OPT="-Wl,-rpath,"
5229         ;;
5230 dragonfly*|freebsd*) #(vi
5231         LD_RPATH_OPT="-rpath "
5232         ;;
5233 netbsd*) #(vi
5234         LD_RPATH_OPT="-Wl,-rpath,"
5235         ;;
5236 osf*|mls+*) #(vi
5237         LD_RPATH_OPT="-rpath "
5238         ;;
5239 solaris2*) #(vi
5240         LD_RPATH_OPT="-R"
5241         ;;
5242 *)
5243         ;;
5244 esac
5245 echo "$as_me:5245: result: $LD_RPATH_OPT" >&5
5246 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5247
5248 case "x$LD_RPATH_OPT" in #(vi
5249 x-R*)
5250         echo "$as_me:5250: checking if we need a space after rpath option" >&5
5251 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5252         cf_save_LIBS="$LIBS"
5253         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5254         cat >conftest.$ac_ext <<_ACEOF
5255 #line 5255 "configure"
5256 #include "confdefs.h"
5257
5258 int
5259 main ()
5260 {
5261
5262   ;
5263   return 0;
5264 }
5265 _ACEOF
5266 rm -f conftest.$ac_objext conftest$ac_exeext
5267 if { (eval echo "$as_me:5267: \"$ac_link\"") >&5
5268   (eval $ac_link) 2>&5
5269   ac_status=$?
5270   echo "$as_me:5270: \$? = $ac_status" >&5
5271   (exit $ac_status); } &&
5272          { ac_try='test -s conftest$ac_exeext'
5273   { (eval echo "$as_me:5273: \"$ac_try\"") >&5
5274   (eval $ac_try) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); }; }; then
5278   cf_rpath_space=no
5279 else
5280   echo "$as_me: failed program was:" >&5
5281 cat conftest.$ac_ext >&5
5282 cf_rpath_space=yes
5283 fi
5284 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5285         LIBS="$cf_save_LIBS"
5286         echo "$as_me:5286: result: $cf_rpath_space" >&5
5287 echo "${ECHO_T}$cf_rpath_space" >&6
5288         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5289         ;;
5290 esac
5291
5292         LOCAL_LDFLAGS=
5293         LOCAL_LDFLAGS2=
5294         LD_SHARED_OPTS=
5295         INSTALL_LIB="-m 644"
5296
5297         cf_cv_do_symlinks=no
5298         cf_ld_rpath_opt=
5299         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5300
5301         echo "$as_me:5301: checking if release/abi version should be used for shared libs" >&5
5302 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5303
5304 # Check whether --with-shlib-version or --without-shlib-version was given.
5305 if test "${with_shlib_version+set}" = set; then
5306   withval="$with_shlib_version"
5307   test -z "$withval" && withval=auto
5308         case $withval in #(vi
5309         yes) #(vi
5310                 cf_cv_shlib_version=auto
5311                 ;;
5312         rel|abi|auto|no) #(vi
5313                 cf_cv_shlib_version=$withval
5314                 ;;
5315         *)
5316                 { { echo "$as_me:5316: error: option value must be one of: rel, abi, auto or no" >&5
5317 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5318    { (exit 1); exit 1; }; }
5319                 ;;
5320         esac
5321
5322 else
5323   cf_cv_shlib_version=auto
5324 fi;
5325         echo "$as_me:5325: result: $cf_cv_shlib_version" >&5
5326 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5327
5328         cf_cv_rm_so_locs=no
5329         cf_try_cflags=
5330
5331         # Some less-capable ports of gcc support only -fpic
5332         CC_SHARED_OPTS=
5333         if test "$GCC" = yes
5334         then
5335                 echo "$as_me:5335: checking which $CC option to use" >&5
5336 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5337                 cf_save_CFLAGS="$CFLAGS"
5338                 for CC_SHARED_OPTS in -fPIC -fpic ''
5339                 do
5340                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5341                         cat >conftest.$ac_ext <<_ACEOF
5342 #line 5342 "configure"
5343 #include "confdefs.h"
5344 #include <stdio.h>
5345 int
5346 main ()
5347 {
5348 int x = 1
5349   ;
5350   return 0;
5351 }
5352 _ACEOF
5353 rm -f conftest.$ac_objext
5354 if { (eval echo "$as_me:5354: \"$ac_compile\"") >&5
5355   (eval $ac_compile) 2>&5
5356   ac_status=$?
5357   echo "$as_me:5357: \$? = $ac_status" >&5
5358   (exit $ac_status); } &&
5359          { ac_try='test -s conftest.$ac_objext'
5360   { (eval echo "$as_me:5360: \"$ac_try\"") >&5
5361   (eval $ac_try) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit $ac_status); }; }; then
5365   break
5366 else
5367   echo "$as_me: failed program was:" >&5
5368 cat conftest.$ac_ext >&5
5369 fi
5370 rm -f conftest.$ac_objext conftest.$ac_ext
5371                 done
5372                 echo "$as_me:5372: result: $CC_SHARED_OPTS" >&5
5373 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5374                 CFLAGS="$cf_save_CFLAGS"
5375         fi
5376
5377         cf_cv_shlib_version_infix=no
5378
5379         case $cf_cv_system_name in #(vi
5380         aix4.3-9*|aix[5-7]*) #(vi
5381                 if test "$GCC" = yes; then
5382                         CC_SHARED_OPTS=
5383                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5384                 else
5385                         # CC_SHARED_OPTS='-qpic=large -G'
5386                         # perhaps "-bM:SRE -bnoentry -bexpall"
5387                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5388                 fi
5389                 ;;
5390         beos*) #(vi
5391                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5392                 ;;
5393         cygwin*) #(vi
5394                 CC_SHARED_OPTS=
5395                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5396                 cf_cv_shlib_version=cygdll
5397                 cf_cv_shlib_version_infix=cygdll
5398                 cat >mk_shared_lib.sh <<-CF_EOF
5399                 #!/bin/sh
5400                 SHARED_LIB=\$1
5401                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5402                 shift
5403                 cat <<-EOF
5404                 Linking shared library
5405                 ** SHARED_LIB \$SHARED_LIB
5406                 ** IMPORT_LIB \$IMPORT_LIB
5407 EOF
5408                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5409 CF_EOF
5410                 chmod +x mk_shared_lib.sh
5411                 ;;
5412         darwin*) #(vi
5413                 cf_try_cflags="no-cpp-precomp"
5414                 CC_SHARED_OPTS="-dynamic"
5415                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5416                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5417                 cf_cv_shlib_version_infix=yes
5418                 echo "$as_me:5418: checking if ld -search_paths_first works" >&5
5419 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5420 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5421   echo $ECHO_N "(cached) $ECHO_C" >&6
5422 else
5423
5424                         cf_save_LDFLAGS=$LDFLAGS
5425                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5426                         cat >conftest.$ac_ext <<_ACEOF
5427 #line 5427 "configure"
5428 #include "confdefs.h"
5429
5430 int
5431 main ()
5432 {
5433 int i;
5434   ;
5435   return 0;
5436 }
5437 _ACEOF
5438 rm -f conftest.$ac_objext conftest$ac_exeext
5439 if { (eval echo "$as_me:5439: \"$ac_link\"") >&5
5440   (eval $ac_link) 2>&5
5441   ac_status=$?
5442   echo "$as_me:5442: \$? = $ac_status" >&5
5443   (exit $ac_status); } &&
5444          { ac_try='test -s conftest$ac_exeext'
5445   { (eval echo "$as_me:5445: \"$ac_try\"") >&5
5446   (eval $ac_try) 2>&5
5447   ac_status=$?
5448   echo "$as_me:5448: \$? = $ac_status" >&5
5449   (exit $ac_status); }; }; then
5450   cf_cv_ldflags_search_paths_first=yes
5451 else
5452   echo "$as_me: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 cf_cv_ldflags_search_paths_first=no
5455 fi
5456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5457                                 LDFLAGS=$cf_save_LDFLAGS
5458 fi
5459 echo "$as_me:5459: result: $cf_cv_ldflags_search_paths_first" >&5
5460 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5461                 if test $cf_cv_ldflags_search_paths_first = yes; then
5462                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5463                 fi
5464                 ;;
5465         hpux[7-8]*) #(vi
5466                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5467                 if test "$GCC" != yes; then
5468                         CC_SHARED_OPTS='+Z'
5469                 fi
5470                 MK_SHARED_LIB='${LD} -b -o $@'
5471                 INSTALL_LIB="-m 555"
5472                 ;;
5473         hpux*) #(vi
5474                 # (tested with gcc 2.7.2 -- I don't have c89)
5475                 if test "$GCC" = yes; then
5476                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5477                 else
5478                         CC_SHARED_OPTS='+Z'
5479                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5480                 fi
5481                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5482                 # HP-UX shared libraries must be executable, and should be
5483                 # readonly to exploit a quirk in the memory manager.
5484                 INSTALL_LIB="-m 555"
5485                 ;;
5486         interix*)
5487                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5488                 if test "$cf_cv_shlib_version" = rel; then
5489                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5490                 else
5491                         cf_shared_soname='`basename `'
5492                 fi
5493                 CC_SHARED_OPTS=
5494                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5495                 ;;
5496         irix*) #(vi
5497                 if test "$cf_cv_enable_rpath" = yes ; then
5498                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5499                 fi
5500                 # tested with IRIX 5.2 and 'cc'.
5501                 if test "$GCC" != yes; then
5502                         CC_SHARED_OPTS='-KPIC'
5503                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5504                 else
5505                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5506                 fi
5507                 cf_cv_rm_so_locs=yes
5508                 ;;
5509         linux*|gnu*|k*bsd*-gnu) #(vi
5510                 if test "$DFT_LWR_MODEL" = "shared" ; then
5511                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5512                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5513                 fi
5514                 if test "$cf_cv_enable_rpath" = yes ; then
5515                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5516                 fi
5517
5518         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5519         if test "$cf_cv_shlib_version" = rel; then
5520                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5521         else
5522                 cf_cv_shared_soname='`basename $@`'
5523         fi
5524
5525                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5526                 ;;
5527         mingw*) #(vi
5528                 cf_cv_shlib_version=mingw
5529                 cf_cv_shlib_version_infix=mingw
5530                 CC_SHARED_OPTS=
5531                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5532                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5533                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5534                 cat >mk_shared_lib.sh <<-CF_EOF
5535                 #!/bin/sh
5536                 SHARED_LIB=\$1
5537                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5538                 shift
5539                 cat <<-EOF
5540                 Linking shared library
5541                 ** SHARED_LIB \$SHARED_LIB
5542                 ** IMPORT_LIB \$IMPORT_LIB
5543 EOF
5544                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5545 CF_EOF
5546                 chmod +x mk_shared_lib.sh
5547                 ;;
5548         openbsd[2-9].*|mirbsd*) #(vi
5549                 if test "$DFT_LWR_MODEL" = "shared" ; then
5550                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5551                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5552                 fi
5553                 if test "$cf_cv_enable_rpath" = yes ; then
5554                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5555                 fi
5556                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5557
5558         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5559         if test "$cf_cv_shlib_version" = rel; then
5560                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5561         else
5562                 cf_cv_shared_soname='`basename $@`'
5563         fi
5564
5565                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5566                 ;;
5567         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5569                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5570                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5571                 ;;
5572         dragonfly*|freebsd*) #(vi
5573                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5574                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5575                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5576                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5577                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5578                 fi
5579
5580         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5581         if test "$cf_cv_shlib_version" = rel; then
5582                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5583         else
5584                 cf_cv_shared_soname='`basename $@`'
5585         fi
5586
5587                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5588                 ;;
5589         netbsd*) #(vi
5590                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5591                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5592                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5593                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5594                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5595                         if test "$cf_cv_shlib_version" = auto; then
5596                         if test -f /usr/libexec/ld.elf_so; then
5597                                 cf_cv_shlib_version=abi
5598                         else
5599                                 cf_cv_shlib_version=rel
5600                         fi
5601                         fi
5602
5603         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5604         if test "$cf_cv_shlib_version" = rel; then
5605                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5606         else
5607                 cf_cv_shared_soname='`basename $@`'
5608         fi
5609
5610                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5611                 else
5612                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5613                 fi
5614                 ;;
5615         osf*|mls+*) #(vi
5616                 # tested with OSF/1 V3.2 and 'cc'
5617                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5618                 # link with shared libs).
5619                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5620                 case $host_os in #(vi
5621                 osf4*)
5622                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5623                         ;;
5624                 esac
5625                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5626                 if test "$DFT_LWR_MODEL" = "shared" ; then
5627                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5628                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5629                 fi
5630                 cf_cv_rm_so_locs=yes
5631                 ;;
5632         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5633                 # tested with osr5.0.5
5634                 if test "$GCC" != yes; then
5635                         CC_SHARED_OPTS='-belf -KPIC'
5636                 fi
5637                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5638                 if test "$cf_cv_enable_rpath" = yes ; then
5639                         # only way is to set LD_RUN_PATH but no switch for it
5640                         RUN_PATH=$libdir
5641                 fi
5642                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5643                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5644                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5645                 ;;
5646         sunos4*) #(vi
5647                 # tested with SunOS 4.1.1 and gcc 2.7.0
5648                 if test "$GCC" != yes; then
5649                         CC_SHARED_OPTS='-KPIC'
5650                 fi
5651                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5652                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5653                 ;;
5654         solaris2*) #(vi
5655                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5656                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5657                 if test "$DFT_LWR_MODEL" = "shared" ; then
5658                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5659                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5660                 fi
5661                 if test "$cf_cv_enable_rpath" = yes ; then
5662                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5663                 fi
5664
5665         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5666         if test "$cf_cv_shlib_version" = rel; then
5667                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5668         else
5669                 cf_cv_shared_soname='`basename $@`'
5670         fi
5671
5672                 if test "$GCC" != yes; then
5673                         cf_save_CFLAGS="$CFLAGS"
5674                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5675                         do
5676                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5677                                 cat >conftest.$ac_ext <<_ACEOF
5678 #line 5678 "configure"
5679 #include "confdefs.h"
5680 #include <stdio.h>
5681 int
5682 main ()
5683 {
5684 printf("Hello\n");
5685   ;
5686   return 0;
5687 }
5688 _ACEOF
5689 rm -f conftest.$ac_objext
5690 if { (eval echo "$as_me:5690: \"$ac_compile\"") >&5
5691   (eval $ac_compile) 2>&5
5692   ac_status=$?
5693   echo "$as_me:5693: \$? = $ac_status" >&5
5694   (exit $ac_status); } &&
5695          { ac_try='test -s conftest.$ac_objext'
5696   { (eval echo "$as_me:5696: \"$ac_try\"") >&5
5697   (eval $ac_try) 2>&5
5698   ac_status=$?
5699   echo "$as_me:5699: \$? = $ac_status" >&5
5700   (exit $ac_status); }; }; then
5701   break
5702 else
5703   echo "$as_me: failed program was:" >&5
5704 cat conftest.$ac_ext >&5
5705 fi
5706 rm -f conftest.$ac_objext conftest.$ac_ext
5707                         done
5708                         CFLAGS="$cf_save_CFLAGS"
5709                         CC_SHARED_OPTS=$cf_shared_opts
5710                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5711                 else
5712                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5713                 fi
5714                 ;;
5715         sysv5uw7*|unix_sv*) #(vi
5716                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5717                 if test "$GCC" != yes; then
5718                         CC_SHARED_OPTS='-KPIC'
5719                 fi
5720                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5721                 ;;
5722         *)
5723                 CC_SHARED_OPTS='unknown'
5724                 MK_SHARED_LIB='echo unknown'
5725                 ;;
5726         esac
5727
5728         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5729         case "$cf_cv_shlib_version" in #(vi
5730         rel|abi)
5731                 case "$MK_SHARED_LIB" in #(vi
5732                 *'-o $@') #(vi
5733                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5734                         ;;
5735                 *)
5736                         { echo "$as_me:5736: WARNING: ignored --with-shlib-version" >&5
5737 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5738                         ;;
5739                 esac
5740                 ;;
5741         esac
5742
5743         if test -n "$cf_try_cflags"
5744         then
5745 cat > conftest.$ac_ext <<EOF
5746 #line 5746 "${as_me:-configure}"
5747 #include <stdio.h>
5748 int main(int argc, char *argv[])
5749 {
5750         printf("hello\n");
5751         return (argv[argc-1] == 0) ;
5752 }
5753 EOF
5754                 cf_save_CFLAGS="$CFLAGS"
5755                 for cf_opt in $cf_try_cflags
5756                 do
5757                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
5758                         echo "$as_me:5758: checking if CFLAGS option -$cf_opt works" >&5
5759 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
5760                         if { (eval echo "$as_me:5760: \"$ac_compile\"") >&5
5761   (eval $ac_compile) 2>&5
5762   ac_status=$?
5763   echo "$as_me:5763: \$? = $ac_status" >&5
5764   (exit $ac_status); }; then
5765                                 echo "$as_me:5765: result: yes" >&5
5766 echo "${ECHO_T}yes" >&6
5767                                 cf_save_CFLAGS="$CFLAGS"
5768                         else
5769                                 echo "$as_me:5769: result: no" >&5
5770 echo "${ECHO_T}no" >&6
5771                         fi
5772                 done
5773                 CFLAGS="$cf_save_CFLAGS"
5774         fi
5775
5776         # RPATH_LIST is a colon-separated list of directories
5777         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5778         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5779
5780         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5781
5782 echo "${as_me:-configure}:5782: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5783
5784         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5785
5786 echo "${as_me:-configure}:5786: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5787
5788 if test "$CC_SHARED_OPTS" = "unknown"; then
5789         for model in $cf_list_models; do
5790                 if test "$model" = "shared"; then
5791                         { { echo "$as_me:5791: error: Shared libraries are not supported in this version" >&5
5792 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5793    { (exit 1); exit 1; }; }
5794                 fi
5795         done
5796 fi
5797
5798 ### If we're building with rpath, try to link non-standard libs that way too.
5799 if test "$DFT_LWR_MODEL" = "shared"; then
5800
5801 echo "$as_me:5801: checking if rpath-hack should be disabled" >&5
5802 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5803
5804 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5805 if test "${enable_rpath_hack+set}" = set; then
5806   enableval="$enable_rpath_hack"
5807   test "$enableval" != no && enableval=yes
5808   if test "$enableval" != "yes" ; then
5809     cf_disable_rpath_hack=yes
5810   else
5811     cf_disable_rpath_hack=no
5812   fi
5813 else
5814   enableval=yes
5815   cf_disable_rpath_hack=no
5816
5817 fi;
5818 echo "$as_me:5818: result: $cf_disable_rpath_hack" >&5
5819 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5820 if test "$cf_disable_rpath_hack" = no ; then
5821
5822 echo "$as_me:5822: checking for updated LDFLAGS" >&5
5823 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5824 if test -n "$LD_RPATH_OPT" ; then
5825         echo "$as_me:5825: result: maybe" >&5
5826 echo "${ECHO_T}maybe" >&6
5827
5828         for ac_prog in ldd
5829 do
5830   # Extract the first word of "$ac_prog", so it can be a program name with args.
5831 set dummy $ac_prog; ac_word=$2
5832 echo "$as_me:5832: checking for $ac_word" >&5
5833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5834 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5835   echo $ECHO_N "(cached) $ECHO_C" >&6
5836 else
5837   if test -n "$cf_ldd_prog"; then
5838   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5839 else
5840   ac_save_IFS=$IFS; IFS=$ac_path_separator
5841 ac_dummy="$PATH"
5842 for ac_dir in $ac_dummy; do
5843   IFS=$ac_save_IFS
5844   test -z "$ac_dir" && ac_dir=.
5845   $as_executable_p "$ac_dir/$ac_word" || continue
5846 ac_cv_prog_cf_ldd_prog="$ac_prog"
5847 echo "$as_me:5847: found $ac_dir/$ac_word" >&5
5848 break
5849 done
5850
5851 fi
5852 fi
5853 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5854 if test -n "$cf_ldd_prog"; then
5855   echo "$as_me:5855: result: $cf_ldd_prog" >&5
5856 echo "${ECHO_T}$cf_ldd_prog" >&6
5857 else
5858   echo "$as_me:5858: result: no" >&5
5859 echo "${ECHO_T}no" >&6
5860 fi
5861
5862   test -n "$cf_ldd_prog" && break
5863 done
5864 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5865
5866         cf_rpath_list="/usr/lib /lib"
5867         if test "$cf_ldd_prog" != no
5868         then
5869                 cf_rpath_oops=
5870
5871 cat >conftest.$ac_ext <<_ACEOF
5872 #line 5872 "configure"
5873 #include "confdefs.h"
5874 #include <stdio.h>
5875 int
5876 main ()
5877 {
5878 printf("Hello");
5879   ;
5880   return 0;
5881 }
5882 _ACEOF
5883 rm -f conftest.$ac_objext conftest$ac_exeext
5884 if { (eval echo "$as_me:5884: \"$ac_link\"") >&5
5885   (eval $ac_link) 2>&5
5886   ac_status=$?
5887   echo "$as_me:5887: \$? = $ac_status" >&5
5888   (exit $ac_status); } &&
5889          { ac_try='test -s conftest$ac_exeext'
5890   { (eval echo "$as_me:5890: \"$ac_try\"") >&5
5891   (eval $ac_try) 2>&5
5892   ac_status=$?
5893   echo "$as_me:5893: \$? = $ac_status" >&5
5894   (exit $ac_status); }; }; then
5895   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5896                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5897 else
5898   echo "$as_me: failed program was:" >&5
5899 cat conftest.$ac_ext >&5
5900 fi
5901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5902
5903                 # If we passed the link-test, but get a "not found" on a given library,
5904                 # this could be due to inept reconfiguration of gcc to make it only
5905                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5906                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5907                 # /usr/local libraries.
5908                 if test -n "$cf_rpath_oops"
5909                 then
5910                         for cf_rpath_src in $cf_rpath_oops
5911                         do
5912                                 for cf_rpath_dir in \
5913                                         /usr/local \
5914                                         /usr/pkg \
5915                                         /opt/sfw
5916                                 do
5917                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5918                                         then
5919                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5920
5921 echo "${as_me:-configure}:5921: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5922
5923                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5924                                                 break
5925                                         fi
5926                                 done
5927                         done
5928                 fi
5929         fi
5930
5931         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5932
5933 echo "${as_me:-configure}:5933: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5934
5935 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5936
5937 echo "${as_me:-configure}:5937: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5938
5939 cf_rpath_dst=
5940 for cf_rpath_src in $LDFLAGS
5941 do
5942         case $cf_rpath_src in #(vi
5943         -L*) #(vi
5944
5945                 # check if this refers to a directory which we will ignore
5946                 cf_rpath_skip=no
5947                 if test -n "$cf_rpath_list"
5948                 then
5949                         for cf_rpath_item in $cf_rpath_list
5950                         do
5951                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5952                                 then
5953                                         cf_rpath_skip=yes
5954                                         break
5955                                 fi
5956                         done
5957                 fi
5958
5959                 if test "$cf_rpath_skip" = no
5960                 then
5961                         # transform the option
5962                         if test "$LD_RPATH_OPT" = "-R " ; then
5963                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5964                         else
5965                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5966                         fi
5967
5968                         # if we have not already added this, add it now
5969                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5970                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5971                         then
5972                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5973
5974 echo "${as_me:-configure}:5974: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5975
5976                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5977                         fi
5978                 fi
5979                 ;;
5980         esac
5981         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5982 done
5983 LDFLAGS=$cf_rpath_dst
5984
5985 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5986
5987 echo "${as_me:-configure}:5987: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5988
5989 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5990
5991 echo "${as_me:-configure}:5991: testing ...checking LIBS $LIBS ..." 1>&5
5992
5993 cf_rpath_dst=
5994 for cf_rpath_src in $LIBS
5995 do
5996         case $cf_rpath_src in #(vi
5997         -L*) #(vi
5998
5999                 # check if this refers to a directory which we will ignore
6000                 cf_rpath_skip=no
6001                 if test -n "$cf_rpath_list"
6002                 then
6003                         for cf_rpath_item in $cf_rpath_list
6004                         do
6005                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6006                                 then
6007                                         cf_rpath_skip=yes
6008                                         break
6009                                 fi
6010                         done
6011                 fi
6012
6013                 if test "$cf_rpath_skip" = no
6014                 then
6015                         # transform the option
6016                         if test "$LD_RPATH_OPT" = "-R " ; then
6017                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6018                         else
6019                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6020                         fi
6021
6022                         # if we have not already added this, add it now
6023                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6024                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6025                         then
6026                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6027
6028 echo "${as_me:-configure}:6028: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6029
6030                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6031                         fi
6032                 fi
6033                 ;;
6034         esac
6035         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6036 done
6037 LIBS=$cf_rpath_dst
6038
6039 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6040
6041 echo "${as_me:-configure}:6041: testing ...checked LIBS $LIBS ..." 1>&5
6042
6043         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6044
6045 echo "${as_me:-configure}:6045: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6046
6047 fi
6048
6049 fi
6050
6051 fi
6052
6053 ###############################################################################
6054
6055 ###     use option --disable-overwrite to leave out the link to -lcurses
6056 echo "$as_me:6056: checking if you wish to install ncurses overwriting curses" >&5
6057 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6058
6059 # Check whether --enable-overwrite or --disable-overwrite was given.
6060 if test "${enable_overwrite+set}" = set; then
6061   enableval="$enable_overwrite"
6062   with_overwrite=$enableval
6063 else
6064   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6065 fi;
6066 echo "$as_me:6066: result: $with_overwrite" >&5
6067 echo "${ECHO_T}$with_overwrite" >&6
6068
6069 echo "$as_me:6069: checking if external terminfo-database is used" >&5
6070 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6071
6072 # Check whether --enable-database or --disable-database was given.
6073 if test "${enable_database+set}" = set; then
6074   enableval="$enable_database"
6075   use_database=$enableval
6076 else
6077   use_database=yes
6078 fi;
6079 echo "$as_me:6079: result: $use_database" >&5
6080 echo "${ECHO_T}$use_database" >&6
6081
6082 case $host_os in #(vi
6083 os2*) #(vi
6084         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6085         ;;
6086 *) #(vi
6087         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6088         ;;
6089 esac
6090
6091 if test "$use_database" != no ; then
6092
6093 cat >>confdefs.h <<\EOF
6094 #define USE_DATABASE 1
6095 EOF
6096
6097         echo "$as_me:6097: checking which terminfo source-file will be installed" >&5
6098 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6099
6100 # Check whether --with-database or --without-database was given.
6101 if test "${with_database+set}" = set; then
6102   withval="$with_database"
6103   TERMINFO_SRC=$withval
6104 fi;
6105         echo "$as_me:6105: result: $TERMINFO_SRC" >&5
6106 echo "${ECHO_T}$TERMINFO_SRC" >&6
6107
6108         echo "$as_me:6108: checking whether to use hashed database instead of directory/tree" >&5
6109 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6110
6111 # Check whether --with-hashed-db or --without-hashed-db was given.
6112 if test "${with_hashed_db+set}" = set; then
6113   withval="$with_hashed_db"
6114
6115 else
6116   with_hashed_db=no
6117 fi;
6118         echo "$as_me:6118: result: $with_hashed_db" >&5
6119 echo "${ECHO_T}$with_hashed_db" >&6
6120 else
6121         with_hashed_db=no
6122 fi
6123
6124 echo "$as_me:6124: checking for list of fallback descriptions" >&5
6125 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6126
6127 # Check whether --with-fallbacks or --without-fallbacks was given.
6128 if test "${with_fallbacks+set}" = set; then
6129   withval="$with_fallbacks"
6130   with_fallback=$withval
6131 else
6132   with_fallback=
6133 fi;
6134 echo "$as_me:6134: result: $with_fallback" >&5
6135 echo "${ECHO_T}$with_fallback" >&6
6136 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6137
6138 echo "$as_me:6138: checking if you want modern xterm or antique" >&5
6139 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6140
6141 # Check whether --with-xterm-new or --without-xterm-new was given.
6142 if test "${with_xterm_new+set}" = set; then
6143   withval="$with_xterm_new"
6144   with_xterm_new=$withval
6145 else
6146   with_xterm_new=yes
6147 fi;
6148 case $with_xterm_new in
6149 no)     with_xterm_new=xterm-old;;
6150 *)      with_xterm_new=xterm-new;;
6151 esac
6152 echo "$as_me:6152: result: $with_xterm_new" >&5
6153 echo "${ECHO_T}$with_xterm_new" >&6
6154 WHICH_XTERM=$with_xterm_new
6155
6156 echo "$as_me:6156: checking if xterm backspace sends BS or DEL" >&5
6157 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6158
6159 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6160 if test "${with_xterm_kbs+set}" = set; then
6161   withval="$with_xterm_kbs"
6162   with_xterm_kbs=$withval
6163 else
6164   with_xterm_kbs=BS
6165 fi;
6166 case x$with_xterm_kbs in
6167 xyes|xno|xBS|xbs|x8)
6168         with_xterm_kbs=BS
6169         ;;
6170 xDEL|xdel|x127)
6171         with_xterm_kbs=DEL
6172         ;;
6173 *)
6174         with_xterm_kbs=$withval
6175         ;;
6176 esac
6177 echo "$as_me:6177: result: $with_xterm_kbs" >&5
6178 echo "${ECHO_T}$with_xterm_kbs" >&6
6179 XTERM_KBS=$with_xterm_kbs
6180
6181 MAKE_TERMINFO=
6182 if test "$use_database" = no ; then
6183         TERMINFO="${datadir}/terminfo"
6184         MAKE_TERMINFO="#"
6185 else
6186
6187 echo "$as_me:6187: checking for list of terminfo directories" >&5
6188 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6189
6190 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6191 if test "${with_terminfo_dirs+set}" = set; then
6192   withval="$with_terminfo_dirs"
6193
6194 else
6195   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6196 fi;
6197 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6198 cf_dst_path=
6199 for cf_src_path in $withval
6200 do
6201
6202 if test "x$prefix" != xNONE; then
6203   cf_path_syntax="$prefix"
6204 else
6205   cf_path_syntax="$ac_default_prefix"
6206 fi
6207
6208 case ".$cf_src_path" in #(vi
6209 .\$\(*\)*|.\'*\'*) #(vi
6210   ;;
6211 ..|./*|.\\*) #(vi
6212   ;;
6213 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6214   ;;
6215 .\${*prefix}*|.\${*dir}*) #(vi
6216   eval cf_src_path="$cf_src_path"
6217   case ".$cf_src_path" in #(vi
6218   .NONE/*)
6219     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6220     ;;
6221   esac
6222   ;; #(vi
6223 .no|.NONE/*)
6224   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6225   ;;
6226 *)
6227   { { echo "$as_me:6227: error: expected a pathname, not \"$cf_src_path\"" >&5
6228 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6229    { (exit 1); exit 1; }; }
6230   ;;
6231 esac
6232
6233   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6234   cf_dst_path="${cf_dst_path}${cf_src_path}"
6235 done
6236 IFS="$ac_save_ifs"
6237
6238 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6239 # so we have to check/work around.  We do prefer the result of "eval"...
6240 eval cf_dst_eval="$cf_dst_path"
6241 case "x$cf_dst_eval" in #(vi
6242 xNONE*) #(vi
6243         TERMINFO_DIRS=$cf_dst_path
6244         ;;
6245 *)
6246         TERMINFO_DIRS="$cf_dst_eval"
6247         ;;
6248 esac
6249
6250 echo "$as_me:6250: result: $TERMINFO_DIRS" >&5
6251 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6252 test -n "$TERMINFO_DIRS" &&
6253 cat >>confdefs.h <<EOF
6254 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6255 EOF
6256
6257 echo "$as_me:6257: checking for default terminfo directory" >&5
6258 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6259
6260 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6261 if test "${with_default_terminfo_dir+set}" = set; then
6262   withval="$with_default_terminfo_dir"
6263
6264 else
6265   withval="${TERMINFO:-${datadir}/terminfo}"
6266 fi; if test -n "${datadir}/terminfo" ; then
6267
6268 if test "x$prefix" != xNONE; then
6269   cf_path_syntax="$prefix"
6270 else
6271   cf_path_syntax="$ac_default_prefix"
6272 fi
6273
6274 case ".$withval" in #(vi
6275 .\$\(*\)*|.\'*\'*) #(vi
6276   ;;
6277 ..|./*|.\\*) #(vi
6278   ;;
6279 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6280   ;;
6281 .\${*prefix}*|.\${*dir}*) #(vi
6282   eval withval="$withval"
6283   case ".$withval" in #(vi
6284   .NONE/*)
6285     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6286     ;;
6287   esac
6288   ;; #(vi
6289 .no|.NONE/*)
6290   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6291   ;;
6292 *)
6293   { { echo "$as_me:6293: error: expected a pathname, not \"$withval\"" >&5
6294 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6295    { (exit 1); exit 1; }; }
6296   ;;
6297 esac
6298
6299 fi
6300 eval TERMINFO="$withval"
6301
6302 echo "$as_me:6302: result: $TERMINFO" >&5
6303 echo "${ECHO_T}$TERMINFO" >&6
6304
6305 cat >>confdefs.h <<EOF
6306 #define TERMINFO "$TERMINFO"
6307 EOF
6308
6309 fi
6310
6311 ###     use option --disable-big-core to make tic run on small machines
6312 ###     We need 4Mb, check if we can allocate 50% more than that.
6313 echo "$as_me:6313: checking if big-core option selected" >&5
6314 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6315
6316 # Check whether --enable-big-core or --disable-big-core was given.
6317 if test "${enable_big_core+set}" = set; then
6318   enableval="$enable_big_core"
6319   with_big_core=$enableval
6320 else
6321   if test "$cross_compiling" = yes; then
6322   with_big_core=no
6323 else
6324   cat >conftest.$ac_ext <<_ACEOF
6325 #line 6325 "configure"
6326 #include "confdefs.h"
6327
6328 #include <stdlib.h>
6329 #include <string.h>
6330 int main() {
6331         unsigned long n = 6000000L;
6332         char *s = malloc(n);
6333         if (s != 0)
6334                 s[0] = s[n-1] = 0;
6335         ${cf_cv_main_return:-return}(s == 0);
6336 }
6337 _ACEOF
6338 rm -f conftest$ac_exeext
6339 if { (eval echo "$as_me:6339: \"$ac_link\"") >&5
6340   (eval $ac_link) 2>&5
6341   ac_status=$?
6342   echo "$as_me:6342: \$? = $ac_status" >&5
6343   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6344   { (eval echo "$as_me:6344: \"$ac_try\"") >&5
6345   (eval $ac_try) 2>&5
6346   ac_status=$?
6347   echo "$as_me:6347: \$? = $ac_status" >&5
6348   (exit $ac_status); }; }; then
6349   with_big_core=yes
6350 else
6351   echo "$as_me: program exited with status $ac_status" >&5
6352 echo "$as_me: failed program was:" >&5
6353 cat conftest.$ac_ext >&5
6354 with_big_core=no
6355 fi
6356 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6357 fi
6358 fi;
6359 echo "$as_me:6359: result: $with_big_core" >&5
6360 echo "${ECHO_T}$with_big_core" >&6
6361 test "x$with_big_core" = "xyes" &&
6362 cat >>confdefs.h <<\EOF
6363 #define HAVE_BIG_CORE 1
6364 EOF
6365
6366 ### ISO C only guarantees 512-char strings, we have tables which load faster
6367 ### when constructed using "big" strings.  More than the C compiler, the awk
6368 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6369 echo "$as_me:6369: checking if big-strings option selected" >&5
6370 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6371
6372 # Check whether --enable-big-strings or --disable-big-strings was given.
6373 if test "${enable_big_strings+set}" = set; then
6374   enableval="$enable_big_strings"
6375   with_big_strings=$enableval
6376 else
6377
6378         case x$AWK in #(vi
6379         x)
6380                 eval with_big_strings=no
6381                 ;;
6382         *) #(vi
6383                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6384                         | $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
6385                         eval with_big_strings=yes
6386                 else
6387                         eval with_big_strings=no
6388                 fi
6389                 ;;
6390         esac
6391
6392 fi;
6393 echo "$as_me:6393: result: $with_big_strings" >&5
6394 echo "${ECHO_T}$with_big_strings" >&6
6395
6396 USE_BIG_STRINGS=0
6397 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6398
6399 ###     use option --enable-termcap to compile in the termcap fallback support
6400 echo "$as_me:6400: checking if you want termcap-fallback support" >&5
6401 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6402
6403 # Check whether --enable-termcap or --disable-termcap was given.
6404 if test "${enable_termcap+set}" = set; then
6405   enableval="$enable_termcap"
6406   with_termcap=$enableval
6407 else
6408   with_termcap=no
6409 fi;
6410 echo "$as_me:6410: result: $with_termcap" >&5
6411 echo "${ECHO_T}$with_termcap" >&6
6412
6413 if test "x$with_termcap" != "xyes" ; then
6414         if test "$use_database" = no ; then
6415                 if test -z "$with_fallback" ; then
6416                         { { echo "$as_me:6416: error: You have disabled the database w/o specifying fallbacks" >&5
6417 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6418    { (exit 1); exit 1; }; }
6419                 fi
6420         fi
6421
6422 cat >>confdefs.h <<\EOF
6423 #define PURE_TERMINFO 1
6424 EOF
6425
6426 else
6427
6428 if test "$with_ticlib" != no ; then
6429         { { echo "$as_me:6429: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6430 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6431    { (exit 1); exit 1; }; }
6432 fi
6433
6434 cat >>confdefs.h <<\EOF
6435 #define USE_TERMCAP 1
6436 EOF
6437
6438 echo "$as_me:6438: checking for list of termcap files" >&5
6439 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6440
6441 # Check whether --with-termpath or --without-termpath was given.
6442 if test "${with_termpath+set}" = set; then
6443   withval="$with_termpath"
6444
6445 else
6446   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6447 fi;
6448 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6449 cf_dst_path=
6450 for cf_src_path in $withval
6451 do
6452
6453 if test "x$prefix" != xNONE; then
6454   cf_path_syntax="$prefix"
6455 else
6456   cf_path_syntax="$ac_default_prefix"
6457 fi
6458
6459 case ".$cf_src_path" in #(vi
6460 .\$\(*\)*|.\'*\'*) #(vi
6461   ;;
6462 ..|./*|.\\*) #(vi
6463   ;;
6464 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6465   ;;
6466 .\${*prefix}*|.\${*dir}*) #(vi
6467   eval cf_src_path="$cf_src_path"
6468   case ".$cf_src_path" in #(vi
6469   .NONE/*)
6470     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6471     ;;
6472   esac
6473   ;; #(vi
6474 .no|.NONE/*)
6475   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6476   ;;
6477 *)
6478   { { echo "$as_me:6478: error: expected a pathname, not \"$cf_src_path\"" >&5
6479 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6480    { (exit 1); exit 1; }; }
6481   ;;
6482 esac
6483
6484   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6485   cf_dst_path="${cf_dst_path}${cf_src_path}"
6486 done
6487 IFS="$ac_save_ifs"
6488
6489 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6490 # so we have to check/work around.  We do prefer the result of "eval"...
6491 eval cf_dst_eval="$cf_dst_path"
6492 case "x$cf_dst_eval" in #(vi
6493 xNONE*) #(vi
6494         TERMPATH=$cf_dst_path
6495         ;;
6496 *)
6497         TERMPATH="$cf_dst_eval"
6498         ;;
6499 esac
6500
6501 echo "$as_me:6501: result: $TERMPATH" >&5
6502 echo "${ECHO_T}$TERMPATH" >&6
6503 test -n "$TERMPATH" &&
6504 cat >>confdefs.h <<EOF
6505 #define TERMPATH "$TERMPATH"
6506 EOF
6507
6508 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6509 echo "$as_me:6509: checking if fast termcap-loader is needed" >&5
6510 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6511
6512 # Check whether --enable-getcap or --disable-getcap was given.
6513 if test "${enable_getcap+set}" = set; then
6514   enableval="$enable_getcap"
6515   with_getcap=$enableval
6516 else
6517   with_getcap=no
6518 fi;
6519 echo "$as_me:6519: result: $with_getcap" >&5
6520 echo "${ECHO_T}$with_getcap" >&6
6521 test "x$with_getcap" = "xyes" &&
6522 cat >>confdefs.h <<\EOF
6523 #define USE_GETCAP 1
6524 EOF
6525
6526 echo "$as_me:6526: checking if translated termcaps will be cached in ~/.terminfo" >&5
6527 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6528
6529 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6530 if test "${enable_getcap_cache+set}" = set; then
6531   enableval="$enable_getcap_cache"
6532   with_getcap_cache=$enableval
6533 else
6534   with_getcap_cache=no
6535 fi;
6536 echo "$as_me:6536: result: $with_getcap_cache" >&5
6537 echo "${ECHO_T}$with_getcap_cache" >&6
6538 test "x$with_getcap_cache" = "xyes" &&
6539 cat >>confdefs.h <<\EOF
6540 #define USE_GETCAP_CACHE 1
6541 EOF
6542
6543 fi
6544
6545 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6546 echo "$as_me:6546: checking if ~/.terminfo is wanted" >&5
6547 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6548
6549 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6550 if test "${enable_home_terminfo+set}" = set; then
6551   enableval="$enable_home_terminfo"
6552   with_home_terminfo=$enableval
6553 else
6554   with_home_terminfo=yes
6555 fi;
6556 echo "$as_me:6556: result: $with_home_terminfo" >&5
6557 echo "${ECHO_T}$with_home_terminfo" >&6
6558 test "x$with_home_terminfo" = "xyes" &&
6559 cat >>confdefs.h <<\EOF
6560 #define USE_HOME_TERMINFO 1
6561 EOF
6562
6563 echo "$as_me:6563: checking if you want to use restricted environment when running as root" >&5
6564 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6565
6566 # Check whether --enable-root-environ or --disable-root-environ was given.
6567 if test "${enable_root_environ+set}" = set; then
6568   enableval="$enable_root_environ"
6569   with_root_environ=$enableval
6570 else
6571   with_root_environ=yes
6572 fi;
6573 echo "$as_me:6573: result: $with_root_environ" >&5
6574 echo "${ECHO_T}$with_root_environ" >&6
6575 test "x$with_root_environ" = xyes &&
6576 cat >>confdefs.h <<\EOF
6577 #define USE_ROOT_ENVIRON 1
6578 EOF
6579
6580 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6581 ###   to reduce storage requirements for the terminfo database.
6582
6583 for ac_func in \
6584         remove \
6585         unlink
6586 do
6587 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6588 echo "$as_me:6588: checking for $ac_func" >&5
6589 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6590 if eval "test \"\${$as_ac_var+set}\" = set"; then
6591   echo $ECHO_N "(cached) $ECHO_C" >&6
6592 else
6593   cat >conftest.$ac_ext <<_ACEOF
6594 #line 6594 "configure"
6595 #include "confdefs.h"
6596 /* System header to define __stub macros and hopefully few prototypes,
6597     which can conflict with char $ac_func (); below.  */
6598 #include <assert.h>
6599 /* Override any gcc2 internal prototype to avoid an error.  */
6600 #ifdef __cplusplus
6601 extern "C"
6602 #endif
6603 /* We use char because int might match the return type of a gcc2
6604    builtin and then its argument prototype would still apply.  */
6605 char $ac_func ();
6606 char (*f) ();
6607
6608 int
6609 main ()
6610 {
6611 /* The GNU C library defines this for functions which it implements
6612     to always fail with ENOSYS.  Some functions are actually named
6613     something starting with __ and the normal name is an alias.  */
6614 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6615 choke me
6616 #else
6617 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6618 #endif
6619
6620   ;
6621   return 0;
6622 }
6623 _ACEOF
6624 rm -f conftest.$ac_objext conftest$ac_exeext
6625 if { (eval echo "$as_me:6625: \"$ac_link\"") >&5
6626   (eval $ac_link) 2>&5
6627   ac_status=$?
6628   echo "$as_me:6628: \$? = $ac_status" >&5
6629   (exit $ac_status); } &&
6630          { ac_try='test -s conftest$ac_exeext'
6631   { (eval echo "$as_me:6631: \"$ac_try\"") >&5
6632   (eval $ac_try) 2>&5
6633   ac_status=$?
6634   echo "$as_me:6634: \$? = $ac_status" >&5
6635   (exit $ac_status); }; }; then
6636   eval "$as_ac_var=yes"
6637 else
6638   echo "$as_me: failed program was:" >&5
6639 cat conftest.$ac_ext >&5
6640 eval "$as_ac_var=no"
6641 fi
6642 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6643 fi
6644 echo "$as_me:6644: result: `eval echo '${'$as_ac_var'}'`" >&5
6645 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6646 if test `eval echo '${'$as_ac_var'}'` = yes; then
6647   cat >>confdefs.h <<EOF
6648 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6649 EOF
6650
6651 fi
6652 done
6653
6654 if test "$cross_compiling" = yes ; then
6655
6656 for ac_func in \
6657                 link \
6658                 symlink
6659 do
6660 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6661 echo "$as_me:6661: checking for $ac_func" >&5
6662 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6663 if eval "test \"\${$as_ac_var+set}\" = set"; then
6664   echo $ECHO_N "(cached) $ECHO_C" >&6
6665 else
6666   cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669 /* System header to define __stub macros and hopefully few prototypes,
6670     which can conflict with char $ac_func (); below.  */
6671 #include <assert.h>
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 #ifdef __cplusplus
6674 extern "C"
6675 #endif
6676 /* We use char because int might match the return type of a gcc2
6677    builtin and then its argument prototype would still apply.  */
6678 char $ac_func ();
6679 char (*f) ();
6680
6681 int
6682 main ()
6683 {
6684 /* The GNU C library defines this for functions which it implements
6685     to always fail with ENOSYS.  Some functions are actually named
6686     something starting with __ and the normal name is an alias.  */
6687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6688 choke me
6689 #else
6690 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6691 #endif
6692
6693   ;
6694   return 0;
6695 }
6696 _ACEOF
6697 rm -f conftest.$ac_objext conftest$ac_exeext
6698 if { (eval echo "$as_me:6698: \"$ac_link\"") >&5
6699   (eval $ac_link) 2>&5
6700   ac_status=$?
6701   echo "$as_me:6701: \$? = $ac_status" >&5
6702   (exit $ac_status); } &&
6703          { ac_try='test -s conftest$ac_exeext'
6704   { (eval echo "$as_me:6704: \"$ac_try\"") >&5
6705   (eval $ac_try) 2>&5
6706   ac_status=$?
6707   echo "$as_me:6707: \$? = $ac_status" >&5
6708   (exit $ac_status); }; }; then
6709   eval "$as_ac_var=yes"
6710 else
6711   echo "$as_me: failed program was:" >&5
6712 cat conftest.$ac_ext >&5
6713 eval "$as_ac_var=no"
6714 fi
6715 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6716 fi
6717 echo "$as_me:6717: result: `eval echo '${'$as_ac_var'}'`" >&5
6718 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6719 if test `eval echo '${'$as_ac_var'}'` = yes; then
6720   cat >>confdefs.h <<EOF
6721 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6722 EOF
6723
6724 fi
6725 done
6726
6727 else
6728         echo "$as_me:6728: checking if link/symlink functions work" >&5
6729 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6730 if test "${cf_cv_link_funcs+set}" = set; then
6731   echo $ECHO_N "(cached) $ECHO_C" >&6
6732 else
6733
6734                 cf_cv_link_funcs=
6735                 for cf_func in link symlink ; do
6736                         if test "$cross_compiling" = yes; then
6737
6738                         eval 'ac_cv_func_'$cf_func'=error'
6739 else
6740   cat >conftest.$ac_ext <<_ACEOF
6741 #line 6741 "configure"
6742 #include "confdefs.h"
6743
6744 #include <sys/types.h>
6745 #include <sys/stat.h>
6746 #ifdef HAVE_UNISTD_H
6747 #include <unistd.h>
6748 #endif
6749 int main()
6750 {
6751         int fail = 0;
6752         char *src = "config.log";
6753         char *dst = "conftest.chk";
6754         struct stat src_sb;
6755         struct stat dst_sb;
6756
6757         stat(src, &src_sb);
6758         fail = ($cf_func("config.log", "conftest.chk") < 0)
6759             || (stat(dst, &dst_sb) < 0)
6760             || (dst_sb.st_mtime != src_sb.st_mtime);
6761 #ifdef HAVE_UNLINK
6762         unlink(dst);
6763 #else
6764         remove(dst);
6765 #endif
6766         ${cf_cv_main_return:-return} (fail);
6767 }
6768
6769 _ACEOF
6770 rm -f conftest$ac_exeext
6771 if { (eval echo "$as_me:6771: \"$ac_link\"") >&5
6772   (eval $ac_link) 2>&5
6773   ac_status=$?
6774   echo "$as_me:6774: \$? = $ac_status" >&5
6775   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6776   { (eval echo "$as_me:6776: \"$ac_try\"") >&5
6777   (eval $ac_try) 2>&5
6778   ac_status=$?
6779   echo "$as_me:6779: \$? = $ac_status" >&5
6780   (exit $ac_status); }; }; then
6781
6782                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6783                         eval 'ac_cv_func_'$cf_func'=yes'
6784 else
6785   echo "$as_me: program exited with status $ac_status" >&5
6786 echo "$as_me: failed program was:" >&5
6787 cat conftest.$ac_ext >&5
6788
6789                         eval 'ac_cv_func_'$cf_func'=no'
6790 fi
6791 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6792 fi
6793                 done
6794                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6795
6796 fi
6797 echo "$as_me:6797: result: $cf_cv_link_funcs" >&5
6798 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6799         test "$ac_cv_func_link"    = yes &&
6800 cat >>confdefs.h <<\EOF
6801 #define HAVE_LINK 1
6802 EOF
6803
6804         test "$ac_cv_func_symlink" = yes &&
6805 cat >>confdefs.h <<\EOF
6806 #define HAVE_SYMLINK 1
6807 EOF
6808
6809 fi
6810
6811 with_links=no
6812 with_symlinks=no
6813
6814 # soft links (symbolic links) are useful for some systems where hard links do
6815 # not work, or to make it simpler to copy terminfo trees around.
6816 if test "x$ac_cv_func_symlink" = xyes ; then
6817     echo "$as_me:6817: checking if tic should use symbolic links" >&5
6818 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6819
6820 # Check whether --enable-symlinks or --disable-symlinks was given.
6821 if test "${enable_symlinks+set}" = set; then
6822   enableval="$enable_symlinks"
6823   with_symlinks=$enableval
6824 else
6825   with_symlinks=no
6826 fi;
6827     echo "$as_me:6827: result: $with_symlinks" >&5
6828 echo "${ECHO_T}$with_symlinks" >&6
6829 fi
6830
6831 # If we have hard links and did not choose to use soft links instead, there is
6832 # no reason to make this choice optional - use the hard links.
6833 if test "$with_symlinks" = no ; then
6834     echo "$as_me:6834: checking if tic should use hard links" >&5
6835 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6836     if test "x$ac_cv_func_link" = xyes ; then
6837         with_links=yes
6838     else
6839         with_links=no
6840     fi
6841     echo "$as_me:6841: result: $with_links" >&5
6842 echo "${ECHO_T}$with_links" >&6
6843 fi
6844
6845 test "x$with_links" = xyes &&
6846 cat >>confdefs.h <<\EOF
6847 #define USE_LINKS 1
6848 EOF
6849
6850 test "x$with_symlinks" = xyes &&
6851 cat >>confdefs.h <<\EOF
6852 #define USE_SYMLINKS 1
6853 EOF
6854
6855 ###   use option --enable-broken-linker to force on use of broken-linker support
6856 echo "$as_me:6856: checking if you want broken-linker support code" >&5
6857 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6858
6859 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6860 if test "${enable_broken_linker+set}" = set; then
6861   enableval="$enable_broken_linker"
6862   with_broken_linker=$enableval
6863 else
6864   with_broken_linker=${BROKEN_LINKER:-no}
6865 fi;
6866 echo "$as_me:6866: result: $with_broken_linker" >&5
6867 echo "${ECHO_T}$with_broken_linker" >&6
6868
6869 BROKEN_LINKER=0
6870 if test "x$with_broken_linker" = xyes ; then
6871
6872 cat >>confdefs.h <<\EOF
6873 #define BROKEN_LINKER 1
6874 EOF
6875
6876         BROKEN_LINKER=1
6877 elif test "$DFT_LWR_MODEL" = shared ; then
6878         case $cf_cv_system_name in #(vi
6879         cygwin*)
6880
6881 cat >>confdefs.h <<\EOF
6882 #define BROKEN_LINKER 1
6883 EOF
6884
6885                 BROKEN_LINKER=1
6886                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6887
6888 echo "${as_me:-configure}:6888: testing cygwin linker is broken anyway ..." 1>&5
6889
6890                 ;;
6891         esac
6892 fi
6893
6894 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6895 echo "$as_me:6895: checking if tputs should process BSD-style prefix padding" >&5
6896 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6897
6898 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6899 if test "${enable_bsdpad+set}" = set; then
6900   enableval="$enable_bsdpad"
6901   with_bsdpad=$enableval
6902 else
6903   with_bsdpad=no
6904 fi;
6905 echo "$as_me:6905: result: $with_bsdpad" >&5
6906 echo "${ECHO_T}$with_bsdpad" >&6
6907 test "x$with_bsdpad" = xyes &&
6908 cat >>confdefs.h <<\EOF
6909 #define BSD_TPUTS 1
6910 EOF
6911
6912 ###   use option --enable-widec to turn on use of wide-character support
6913 NCURSES_CH_T=chtype
6914 NCURSES_LIBUTF8=0
6915
6916 NEED_WCHAR_H=0
6917 NCURSES_MBSTATE_T=0
6918 NCURSES_WCHAR_T=0
6919 NCURSES_WINT_T=0
6920
6921 # Check to define _XOPEN_SOURCE "automatically"
6922
6923 cf_XOPEN_SOURCE=500
6924 cf_POSIX_C_SOURCE=199506L
6925 cf_xopen_source=
6926
6927 case $host_os in #(vi
6928 aix[4-7]*) #(vi
6929         cf_xopen_source="-D_ALL_SOURCE"
6930         ;;
6931 cygwin) #(vi
6932         cf_XOPEN_SOURCE=600
6933         ;;
6934 darwin[0-8].*) #(vi
6935         cf_xopen_source="-D_APPLE_C_SOURCE"
6936         ;;
6937 darwin*) #(vi
6938         cf_xopen_source="-D_DARWIN_C_SOURCE"
6939         cf_XOPEN_SOURCE=
6940         ;;
6941 freebsd*|dragonfly*) #(vi
6942         # 5.x headers associate
6943         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6944         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6945         cf_POSIX_C_SOURCE=200112L
6946         cf_XOPEN_SOURCE=600
6947         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6948         ;;
6949 hpux11*) #(vi
6950         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6951         ;;
6952 hpux*) #(vi
6953         cf_xopen_source="-D_HPUX_SOURCE"
6954         ;;
6955 irix[56].*) #(vi
6956         cf_xopen_source="-D_SGI_SOURCE"
6957         cf_XOPEN_SOURCE=
6958         ;;
6959 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6960
6961 echo "$as_me:6961: checking if we must define _GNU_SOURCE" >&5
6962 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6963 if test "${cf_cv_gnu_source+set}" = set; then
6964   echo $ECHO_N "(cached) $ECHO_C" >&6
6965 else
6966
6967 cat >conftest.$ac_ext <<_ACEOF
6968 #line 6968 "configure"
6969 #include "confdefs.h"
6970 #include <sys/types.h>
6971 int
6972 main ()
6973 {
6974
6975 #ifndef _XOPEN_SOURCE
6976 make an error
6977 #endif
6978   ;
6979   return 0;
6980 }
6981 _ACEOF
6982 rm -f conftest.$ac_objext
6983 if { (eval echo "$as_me:6983: \"$ac_compile\"") >&5
6984   (eval $ac_compile) 2>&5
6985   ac_status=$?
6986   echo "$as_me:6986: \$? = $ac_status" >&5
6987   (exit $ac_status); } &&
6988          { ac_try='test -s conftest.$ac_objext'
6989   { (eval echo "$as_me:6989: \"$ac_try\"") >&5
6990   (eval $ac_try) 2>&5
6991   ac_status=$?
6992   echo "$as_me:6992: \$? = $ac_status" >&5
6993   (exit $ac_status); }; }; then
6994   cf_cv_gnu_source=no
6995 else
6996   echo "$as_me: failed program was:" >&5
6997 cat conftest.$ac_ext >&5
6998 cf_save="$CPPFLAGS"
6999          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7000          cat >conftest.$ac_ext <<_ACEOF
7001 #line 7001 "configure"
7002 #include "confdefs.h"
7003 #include <sys/types.h>
7004 int
7005 main ()
7006 {
7007
7008 #ifdef _XOPEN_SOURCE
7009 make an error
7010 #endif
7011   ;
7012   return 0;
7013 }
7014 _ACEOF
7015 rm -f conftest.$ac_objext
7016 if { (eval echo "$as_me:7016: \"$ac_compile\"") >&5
7017   (eval $ac_compile) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); } &&
7021          { ac_try='test -s conftest.$ac_objext'
7022   { (eval echo "$as_me:7022: \"$ac_try\"") >&5
7023   (eval $ac_try) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); }; }; then
7027   cf_cv_gnu_source=no
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 cf_cv_gnu_source=yes
7032 fi
7033 rm -f conftest.$ac_objext conftest.$ac_ext
7034         CPPFLAGS="$cf_save"
7035
7036 fi
7037 rm -f conftest.$ac_objext conftest.$ac_ext
7038
7039 fi
7040 echo "$as_me:7040: result: $cf_cv_gnu_source" >&5
7041 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7042 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7043
7044         ;;
7045 mirbsd*) #(vi
7046         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7047         cf_XOPEN_SOURCE=
7048
7049 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7050
7051 cf_save_CFLAGS="$CFLAGS"
7052 cf_save_CPPFLAGS="$CPPFLAGS"
7053
7054 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7055         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7056                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7057
7058 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7059         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7060                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7061
7062 echo "$as_me:7062: checking if we should define _POSIX_C_SOURCE" >&5
7063 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7064 if test "${cf_cv_posix_c_source+set}" = set; then
7065   echo $ECHO_N "(cached) $ECHO_C" >&6
7066 else
7067
7068 echo "${as_me:-configure}:7068: testing if the symbol is already defined go no further ..." 1>&5
7069
7070         cat >conftest.$ac_ext <<_ACEOF
7071 #line 7071 "configure"
7072 #include "confdefs.h"
7073 #include <sys/types.h>
7074 int
7075 main ()
7076 {
7077
7078 #ifndef _POSIX_C_SOURCE
7079 make an error
7080 #endif
7081   ;
7082   return 0;
7083 }
7084 _ACEOF
7085 rm -f conftest.$ac_objext
7086 if { (eval echo "$as_me:7086: \"$ac_compile\"") >&5
7087   (eval $ac_compile) 2>&5
7088   ac_status=$?
7089   echo "$as_me:7089: \$? = $ac_status" >&5
7090   (exit $ac_status); } &&
7091          { ac_try='test -s conftest.$ac_objext'
7092   { (eval echo "$as_me:7092: \"$ac_try\"") >&5
7093   (eval $ac_try) 2>&5
7094   ac_status=$?
7095   echo "$as_me:7095: \$? = $ac_status" >&5
7096   (exit $ac_status); }; }; then
7097   cf_cv_posix_c_source=no
7098 else
7099   echo "$as_me: failed program was:" >&5
7100 cat conftest.$ac_ext >&5
7101 cf_want_posix_source=no
7102          case .$cf_POSIX_C_SOURCE in #(vi
7103          .[12]??*) #(vi
7104                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7105                 ;;
7106          .2) #(vi
7107                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7108                 cf_want_posix_source=yes
7109                 ;;
7110          .*)
7111                 cf_want_posix_source=yes
7112                 ;;
7113          esac
7114          if test "$cf_want_posix_source" = yes ; then
7115                 cat >conftest.$ac_ext <<_ACEOF
7116 #line 7116 "configure"
7117 #include "confdefs.h"
7118 #include <sys/types.h>
7119 int
7120 main ()
7121 {
7122
7123 #ifdef _POSIX_SOURCE
7124 make an error
7125 #endif
7126   ;
7127   return 0;
7128 }
7129 _ACEOF
7130 rm -f conftest.$ac_objext
7131 if { (eval echo "$as_me:7131: \"$ac_compile\"") >&5
7132   (eval $ac_compile) 2>&5
7133   ac_status=$?
7134   echo "$as_me:7134: \$? = $ac_status" >&5
7135   (exit $ac_status); } &&
7136          { ac_try='test -s conftest.$ac_objext'
7137   { (eval echo "$as_me:7137: \"$ac_try\"") >&5
7138   (eval $ac_try) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); }; }; then
7142   :
7143 else
7144   echo "$as_me: failed program was:" >&5
7145 cat conftest.$ac_ext >&5
7146 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7147 fi
7148 rm -f conftest.$ac_objext conftest.$ac_ext
7149          fi
7150
7151 echo "${as_me:-configure}:7151: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7152
7153          CFLAGS="$cf_trim_CFLAGS"
7154          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7155
7156 echo "${as_me:-configure}:7156: testing if the second compile does not leave our definition intact error ..." 1>&5
7157
7158          cat >conftest.$ac_ext <<_ACEOF
7159 #line 7159 "configure"
7160 #include "confdefs.h"
7161 #include <sys/types.h>
7162 int
7163 main ()
7164 {
7165
7166 #ifndef _POSIX_C_SOURCE
7167 make an error
7168 #endif
7169   ;
7170   return 0;
7171 }
7172 _ACEOF
7173 rm -f conftest.$ac_objext
7174 if { (eval echo "$as_me:7174: \"$ac_compile\"") >&5
7175   (eval $ac_compile) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); } &&
7179          { ac_try='test -s conftest.$ac_objext'
7180   { (eval echo "$as_me:7180: \"$ac_try\"") >&5
7181   (eval $ac_try) 2>&5
7182   ac_status=$?
7183   echo "$as_me:7183: \$? = $ac_status" >&5
7184   (exit $ac_status); }; }; then
7185   :
7186 else
7187   echo "$as_me: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7189 cf_cv_posix_c_source=no
7190 fi
7191 rm -f conftest.$ac_objext conftest.$ac_ext
7192          CFLAGS="$cf_save_CFLAGS"
7193          CPPFLAGS="$cf_save_CPPFLAGS"
7194
7195 fi
7196 rm -f conftest.$ac_objext conftest.$ac_ext
7197
7198 fi
7199 echo "$as_me:7199: result: $cf_cv_posix_c_source" >&5
7200 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7201
7202 if test "$cf_cv_posix_c_source" != no ; then
7203         CFLAGS="$cf_trim_CFLAGS"
7204         CPPFLAGS="$cf_trim_CPPFLAGS"
7205
7206 cf_fix_cppflags=no
7207 cf_new_cflags=
7208 cf_new_cppflags=
7209 cf_new_extra_cppflags=
7210
7211 for cf_add_cflags in $cf_cv_posix_c_source
7212 do
7213 case $cf_fix_cppflags in
7214 no)
7215         case $cf_add_cflags in #(vi
7216         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7217                 case $cf_add_cflags in
7218                 -D*)
7219                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7220
7221                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7222                                 && test -z "${cf_tst_cflags}" \
7223                                 && cf_fix_cppflags=yes
7224
7225                         if test $cf_fix_cppflags = yes ; then
7226                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7227                                 continue
7228                         elif test "${cf_tst_cflags}" = "\"'" ; then
7229                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7230                                 continue
7231                         fi
7232                         ;;
7233                 esac
7234                 case "$CPPFLAGS" in
7235                 *$cf_add_cflags) #(vi
7236                         ;;
7237                 *) #(vi
7238                         case $cf_add_cflags in #(vi
7239                         -D*)
7240                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7241
7242 CPPFLAGS=`echo "$CPPFLAGS" | \
7243         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7244                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7245
7246                                 ;;
7247                         esac
7248                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7249                         ;;
7250                 esac
7251                 ;;
7252         *)
7253                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7254                 ;;
7255         esac
7256         ;;
7257 yes)
7258         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7259
7260         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7261
7262         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7263                 && test -z "${cf_tst_cflags}" \
7264                 && cf_fix_cppflags=no
7265         ;;
7266 esac
7267 done
7268
7269 if test -n "$cf_new_cflags" ; then
7270
7271         CFLAGS="$CFLAGS $cf_new_cflags"
7272 fi
7273
7274 if test -n "$cf_new_cppflags" ; then
7275
7276         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7277 fi
7278
7279 if test -n "$cf_new_extra_cppflags" ; then
7280
7281         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7282 fi
7283
7284 fi
7285
7286         ;;
7287 netbsd*) #(vi
7288         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7289         ;;
7290 openbsd[4-9]*) #(vi
7291         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7292         cf_xopen_source="-D_BSD_SOURCE"
7293         cf_XOPEN_SOURCE=600
7294         ;;
7295 openbsd*) #(vi
7296         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7297         ;;
7298 osf[45]*) #(vi
7299         cf_xopen_source="-D_OSF_SOURCE"
7300         ;;
7301 nto-qnx*) #(vi
7302         cf_xopen_source="-D_QNX_SOURCE"
7303         ;;
7304 sco*) #(vi
7305         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7306         ;;
7307 solaris2.*) #(vi
7308         cf_xopen_source="-D__EXTENSIONS__"
7309         ;;
7310 *)
7311
7312 echo "$as_me:7312: checking if we should define _XOPEN_SOURCE" >&5
7313 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7314 if test "${cf_cv_xopen_source+set}" = set; then
7315   echo $ECHO_N "(cached) $ECHO_C" >&6
7316 else
7317
7318         cat >conftest.$ac_ext <<_ACEOF
7319 #line 7319 "configure"
7320 #include "confdefs.h"
7321
7322 #include <stdlib.h>
7323 #include <string.h>
7324 #include <sys/types.h>
7325
7326 int
7327 main ()
7328 {
7329
7330 #ifndef _XOPEN_SOURCE
7331 make an error
7332 #endif
7333   ;
7334   return 0;
7335 }
7336 _ACEOF
7337 rm -f conftest.$ac_objext
7338 if { (eval echo "$as_me:7338: \"$ac_compile\"") >&5
7339   (eval $ac_compile) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } &&
7343          { ac_try='test -s conftest.$ac_objext'
7344   { (eval echo "$as_me:7344: \"$ac_try\"") >&5
7345   (eval $ac_try) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit $ac_status); }; }; then
7349   cf_cv_xopen_source=no
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 cf_save="$CPPFLAGS"
7354          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7355          cat >conftest.$ac_ext <<_ACEOF
7356 #line 7356 "configure"
7357 #include "confdefs.h"
7358
7359 #include <stdlib.h>
7360 #include <string.h>
7361 #include <sys/types.h>
7362
7363 int
7364 main ()
7365 {
7366
7367 #ifdef _XOPEN_SOURCE
7368 make an error
7369 #endif
7370   ;
7371   return 0;
7372 }
7373 _ACEOF
7374 rm -f conftest.$ac_objext
7375 if { (eval echo "$as_me:7375: \"$ac_compile\"") >&5
7376   (eval $ac_compile) 2>&5
7377   ac_status=$?
7378   echo "$as_me:7378: \$? = $ac_status" >&5
7379   (exit $ac_status); } &&
7380          { ac_try='test -s conftest.$ac_objext'
7381   { (eval echo "$as_me:7381: \"$ac_try\"") >&5
7382   (eval $ac_try) 2>&5
7383   ac_status=$?
7384   echo "$as_me:7384: \$? = $ac_status" >&5
7385   (exit $ac_status); }; }; then
7386   cf_cv_xopen_source=no
7387 else
7388   echo "$as_me: failed program was:" >&5
7389 cat conftest.$ac_ext >&5
7390 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7391 fi
7392 rm -f conftest.$ac_objext conftest.$ac_ext
7393         CPPFLAGS="$cf_save"
7394
7395 fi
7396 rm -f conftest.$ac_objext conftest.$ac_ext
7397
7398 fi
7399 echo "$as_me:7399: result: $cf_cv_xopen_source" >&5
7400 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7401
7402 if test "$cf_cv_xopen_source" != no ; then
7403
7404 CFLAGS=`echo "$CFLAGS" | \
7405         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7406                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7407
7408 CPPFLAGS=`echo "$CPPFLAGS" | \
7409         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7410                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7411
7412         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7413
7414 cf_fix_cppflags=no
7415 cf_new_cflags=
7416 cf_new_cppflags=
7417 cf_new_extra_cppflags=
7418
7419 for cf_add_cflags in $cf_temp_xopen_source
7420 do
7421 case $cf_fix_cppflags in
7422 no)
7423         case $cf_add_cflags in #(vi
7424         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7425                 case $cf_add_cflags in
7426                 -D*)
7427                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7428
7429                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7430                                 && test -z "${cf_tst_cflags}" \
7431                                 && cf_fix_cppflags=yes
7432
7433                         if test $cf_fix_cppflags = yes ; then
7434                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7435                                 continue
7436                         elif test "${cf_tst_cflags}" = "\"'" ; then
7437                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7438                                 continue
7439                         fi
7440                         ;;
7441                 esac
7442                 case "$CPPFLAGS" in
7443                 *$cf_add_cflags) #(vi
7444                         ;;
7445                 *) #(vi
7446                         case $cf_add_cflags in #(vi
7447                         -D*)
7448                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7449
7450 CPPFLAGS=`echo "$CPPFLAGS" | \
7451         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7452                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7453
7454                                 ;;
7455                         esac
7456                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7457                         ;;
7458                 esac
7459                 ;;
7460         *)
7461                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7462                 ;;
7463         esac
7464         ;;
7465 yes)
7466         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7467
7468         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7469
7470         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7471                 && test -z "${cf_tst_cflags}" \
7472                 && cf_fix_cppflags=no
7473         ;;
7474 esac
7475 done
7476
7477 if test -n "$cf_new_cflags" ; then
7478
7479         CFLAGS="$CFLAGS $cf_new_cflags"
7480 fi
7481
7482 if test -n "$cf_new_cppflags" ; then
7483
7484         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7485 fi
7486
7487 if test -n "$cf_new_extra_cppflags" ; then
7488
7489         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7490 fi
7491
7492 fi
7493
7494 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7495
7496 cf_save_CFLAGS="$CFLAGS"
7497 cf_save_CPPFLAGS="$CPPFLAGS"
7498
7499 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7500         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7501                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7502
7503 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7504         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7505                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7506
7507 echo "$as_me:7507: checking if we should define _POSIX_C_SOURCE" >&5
7508 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7509 if test "${cf_cv_posix_c_source+set}" = set; then
7510   echo $ECHO_N "(cached) $ECHO_C" >&6
7511 else
7512
7513 echo "${as_me:-configure}:7513: testing if the symbol is already defined go no further ..." 1>&5
7514
7515         cat >conftest.$ac_ext <<_ACEOF
7516 #line 7516 "configure"
7517 #include "confdefs.h"
7518 #include <sys/types.h>
7519 int
7520 main ()
7521 {
7522
7523 #ifndef _POSIX_C_SOURCE
7524 make an error
7525 #endif
7526   ;
7527   return 0;
7528 }
7529 _ACEOF
7530 rm -f conftest.$ac_objext
7531 if { (eval echo "$as_me:7531: \"$ac_compile\"") >&5
7532   (eval $ac_compile) 2>&5
7533   ac_status=$?
7534   echo "$as_me:7534: \$? = $ac_status" >&5
7535   (exit $ac_status); } &&
7536          { ac_try='test -s conftest.$ac_objext'
7537   { (eval echo "$as_me:7537: \"$ac_try\"") >&5
7538   (eval $ac_try) 2>&5
7539   ac_status=$?
7540   echo "$as_me:7540: \$? = $ac_status" >&5
7541   (exit $ac_status); }; }; then
7542   cf_cv_posix_c_source=no
7543 else
7544   echo "$as_me: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 cf_want_posix_source=no
7547          case .$cf_POSIX_C_SOURCE in #(vi
7548          .[12]??*) #(vi
7549                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7550                 ;;
7551          .2) #(vi
7552                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7553                 cf_want_posix_source=yes
7554                 ;;
7555          .*)
7556                 cf_want_posix_source=yes
7557                 ;;
7558          esac
7559          if test "$cf_want_posix_source" = yes ; then
7560                 cat >conftest.$ac_ext <<_ACEOF
7561 #line 7561 "configure"
7562 #include "confdefs.h"
7563 #include <sys/types.h>
7564 int
7565 main ()
7566 {
7567
7568 #ifdef _POSIX_SOURCE
7569 make an error
7570 #endif
7571   ;
7572   return 0;
7573 }
7574 _ACEOF
7575 rm -f conftest.$ac_objext
7576 if { (eval echo "$as_me:7576: \"$ac_compile\"") >&5
7577   (eval $ac_compile) 2>&5
7578   ac_status=$?
7579   echo "$as_me:7579: \$? = $ac_status" >&5
7580   (exit $ac_status); } &&
7581          { ac_try='test -s conftest.$ac_objext'
7582   { (eval echo "$as_me:7582: \"$ac_try\"") >&5
7583   (eval $ac_try) 2>&5
7584   ac_status=$?
7585   echo "$as_me:7585: \$? = $ac_status" >&5
7586   (exit $ac_status); }; }; then
7587   :
7588 else
7589   echo "$as_me: failed program was:" >&5
7590 cat conftest.$ac_ext >&5
7591 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7592 fi
7593 rm -f conftest.$ac_objext conftest.$ac_ext
7594          fi
7595
7596 echo "${as_me:-configure}:7596: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7597
7598          CFLAGS="$cf_trim_CFLAGS"
7599          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7600
7601 echo "${as_me:-configure}:7601: testing if the second compile does not leave our definition intact error ..." 1>&5
7602
7603          cat >conftest.$ac_ext <<_ACEOF
7604 #line 7604 "configure"
7605 #include "confdefs.h"
7606 #include <sys/types.h>
7607 int
7608 main ()
7609 {
7610
7611 #ifndef _POSIX_C_SOURCE
7612 make an error
7613 #endif
7614   ;
7615   return 0;
7616 }
7617 _ACEOF
7618 rm -f conftest.$ac_objext
7619 if { (eval echo "$as_me:7619: \"$ac_compile\"") >&5
7620   (eval $ac_compile) 2>&5
7621   ac_status=$?
7622   echo "$as_me:7622: \$? = $ac_status" >&5
7623   (exit $ac_status); } &&
7624          { ac_try='test -s conftest.$ac_objext'
7625   { (eval echo "$as_me:7625: \"$ac_try\"") >&5
7626   (eval $ac_try) 2>&5
7627   ac_status=$?
7628   echo "$as_me:7628: \$? = $ac_status" >&5
7629   (exit $ac_status); }; }; then
7630   :
7631 else
7632   echo "$as_me: failed program was:" >&5
7633 cat conftest.$ac_ext >&5
7634 cf_cv_posix_c_source=no
7635 fi
7636 rm -f conftest.$ac_objext conftest.$ac_ext
7637          CFLAGS="$cf_save_CFLAGS"
7638          CPPFLAGS="$cf_save_CPPFLAGS"
7639
7640 fi
7641 rm -f conftest.$ac_objext conftest.$ac_ext
7642
7643 fi
7644 echo "$as_me:7644: result: $cf_cv_posix_c_source" >&5
7645 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7646
7647 if test "$cf_cv_posix_c_source" != no ; then
7648         CFLAGS="$cf_trim_CFLAGS"
7649         CPPFLAGS="$cf_trim_CPPFLAGS"
7650
7651 cf_fix_cppflags=no
7652 cf_new_cflags=
7653 cf_new_cppflags=
7654 cf_new_extra_cppflags=
7655
7656 for cf_add_cflags in $cf_cv_posix_c_source
7657 do
7658 case $cf_fix_cppflags in
7659 no)
7660         case $cf_add_cflags in #(vi
7661         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7662                 case $cf_add_cflags in
7663                 -D*)
7664                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7665
7666                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7667                                 && test -z "${cf_tst_cflags}" \
7668                                 && cf_fix_cppflags=yes
7669
7670                         if test $cf_fix_cppflags = yes ; then
7671                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7672                                 continue
7673                         elif test "${cf_tst_cflags}" = "\"'" ; then
7674                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7675                                 continue
7676                         fi
7677                         ;;
7678                 esac
7679                 case "$CPPFLAGS" in
7680                 *$cf_add_cflags) #(vi
7681                         ;;
7682                 *) #(vi
7683                         case $cf_add_cflags in #(vi
7684                         -D*)
7685                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7686
7687 CPPFLAGS=`echo "$CPPFLAGS" | \
7688         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7689                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7690
7691                                 ;;
7692                         esac
7693                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7694                         ;;
7695                 esac
7696                 ;;
7697         *)
7698                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7699                 ;;
7700         esac
7701         ;;
7702 yes)
7703         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7704
7705         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7706
7707         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7708                 && test -z "${cf_tst_cflags}" \
7709                 && cf_fix_cppflags=no
7710         ;;
7711 esac
7712 done
7713
7714 if test -n "$cf_new_cflags" ; then
7715
7716         CFLAGS="$CFLAGS $cf_new_cflags"
7717 fi
7718
7719 if test -n "$cf_new_cppflags" ; then
7720
7721         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7722 fi
7723
7724 if test -n "$cf_new_extra_cppflags" ; then
7725
7726         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7727 fi
7728
7729 fi
7730
7731         ;;
7732 esac
7733
7734 if test -n "$cf_xopen_source" ; then
7735
7736 cf_fix_cppflags=no
7737 cf_new_cflags=
7738 cf_new_cppflags=
7739 cf_new_extra_cppflags=
7740
7741 for cf_add_cflags in $cf_xopen_source
7742 do
7743 case $cf_fix_cppflags in
7744 no)
7745         case $cf_add_cflags in #(vi
7746         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7747                 case $cf_add_cflags in
7748                 -D*)
7749                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7750
7751                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7752                                 && test -z "${cf_tst_cflags}" \
7753                                 && cf_fix_cppflags=yes
7754
7755                         if test $cf_fix_cppflags = yes ; then
7756                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7757                                 continue
7758                         elif test "${cf_tst_cflags}" = "\"'" ; then
7759                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7760                                 continue
7761                         fi
7762                         ;;
7763                 esac
7764                 case "$CPPFLAGS" in
7765                 *$cf_add_cflags) #(vi
7766                         ;;
7767                 *) #(vi
7768                         case $cf_add_cflags in #(vi
7769                         -D*)
7770                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7771
7772 CPPFLAGS=`echo "$CPPFLAGS" | \
7773         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7774                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7775
7776                                 ;;
7777                         esac
7778                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7779                         ;;
7780                 esac
7781                 ;;
7782         *)
7783                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7784                 ;;
7785         esac
7786         ;;
7787 yes)
7788         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7789
7790         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7791
7792         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7793                 && test -z "${cf_tst_cflags}" \
7794                 && cf_fix_cppflags=no
7795         ;;
7796 esac
7797 done
7798
7799 if test -n "$cf_new_cflags" ; then
7800
7801         CFLAGS="$CFLAGS $cf_new_cflags"
7802 fi
7803
7804 if test -n "$cf_new_cppflags" ; then
7805
7806         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7807 fi
7808
7809 if test -n "$cf_new_extra_cppflags" ; then
7810
7811         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7812 fi
7813
7814 fi
7815
7816 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7817         echo "$as_me:7817: checking if _XOPEN_SOURCE really is set" >&5
7818 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7819         cat >conftest.$ac_ext <<_ACEOF
7820 #line 7820 "configure"
7821 #include "confdefs.h"
7822 #include <stdlib.h>
7823 int
7824 main ()
7825 {
7826
7827 #ifndef _XOPEN_SOURCE
7828 make an error
7829 #endif
7830   ;
7831   return 0;
7832 }
7833 _ACEOF
7834 rm -f conftest.$ac_objext
7835 if { (eval echo "$as_me:7835: \"$ac_compile\"") >&5
7836   (eval $ac_compile) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit $ac_status); } &&
7840          { ac_try='test -s conftest.$ac_objext'
7841   { (eval echo "$as_me:7841: \"$ac_try\"") >&5
7842   (eval $ac_try) 2>&5
7843   ac_status=$?
7844   echo "$as_me:7844: \$? = $ac_status" >&5
7845   (exit $ac_status); }; }; then
7846   cf_XOPEN_SOURCE_set=yes
7847 else
7848   echo "$as_me: failed program was:" >&5
7849 cat conftest.$ac_ext >&5
7850 cf_XOPEN_SOURCE_set=no
7851 fi
7852 rm -f conftest.$ac_objext conftest.$ac_ext
7853         echo "$as_me:7853: result: $cf_XOPEN_SOURCE_set" >&5
7854 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7855         if test $cf_XOPEN_SOURCE_set = yes
7856         then
7857                 cat >conftest.$ac_ext <<_ACEOF
7858 #line 7858 "configure"
7859 #include "confdefs.h"
7860 #include <stdlib.h>
7861 int
7862 main ()
7863 {
7864
7865 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7866 make an error
7867 #endif
7868   ;
7869   return 0;
7870 }
7871 _ACEOF
7872 rm -f conftest.$ac_objext
7873 if { (eval echo "$as_me:7873: \"$ac_compile\"") >&5
7874   (eval $ac_compile) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); } &&
7878          { ac_try='test -s conftest.$ac_objext'
7879   { (eval echo "$as_me:7879: \"$ac_try\"") >&5
7880   (eval $ac_try) 2>&5
7881   ac_status=$?
7882   echo "$as_me:7882: \$? = $ac_status" >&5
7883   (exit $ac_status); }; }; then
7884   cf_XOPEN_SOURCE_set_ok=yes
7885 else
7886   echo "$as_me: failed program was:" >&5
7887 cat conftest.$ac_ext >&5
7888 cf_XOPEN_SOURCE_set_ok=no
7889 fi
7890 rm -f conftest.$ac_objext conftest.$ac_ext
7891                 if test $cf_XOPEN_SOURCE_set_ok = no
7892                 then
7893                         { echo "$as_me:7893: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7894 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7895                 fi
7896         else
7897
7898 echo "$as_me:7898: checking if we should define _XOPEN_SOURCE" >&5
7899 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7900 if test "${cf_cv_xopen_source+set}" = set; then
7901   echo $ECHO_N "(cached) $ECHO_C" >&6
7902 else
7903
7904         cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907
7908 #include <stdlib.h>
7909 #include <string.h>
7910 #include <sys/types.h>
7911
7912 int
7913 main ()
7914 {
7915
7916 #ifndef _XOPEN_SOURCE
7917 make an error
7918 #endif
7919   ;
7920   return 0;
7921 }
7922 _ACEOF
7923 rm -f conftest.$ac_objext
7924 if { (eval echo "$as_me:7924: \"$ac_compile\"") >&5
7925   (eval $ac_compile) 2>&5
7926   ac_status=$?
7927   echo "$as_me:7927: \$? = $ac_status" >&5
7928   (exit $ac_status); } &&
7929          { ac_try='test -s conftest.$ac_objext'
7930   { (eval echo "$as_me:7930: \"$ac_try\"") >&5
7931   (eval $ac_try) 2>&5
7932   ac_status=$?
7933   echo "$as_me:7933: \$? = $ac_status" >&5
7934   (exit $ac_status); }; }; then
7935   cf_cv_xopen_source=no
7936 else
7937   echo "$as_me: failed program was:" >&5
7938 cat conftest.$ac_ext >&5
7939 cf_save="$CPPFLAGS"
7940          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7941          cat >conftest.$ac_ext <<_ACEOF
7942 #line 7942 "configure"
7943 #include "confdefs.h"
7944
7945 #include <stdlib.h>
7946 #include <string.h>
7947 #include <sys/types.h>
7948
7949 int
7950 main ()
7951 {
7952
7953 #ifdef _XOPEN_SOURCE
7954 make an error
7955 #endif
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 rm -f conftest.$ac_objext
7961 if { (eval echo "$as_me:7961: \"$ac_compile\"") >&5
7962   (eval $ac_compile) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit $ac_status); } &&
7966          { ac_try='test -s conftest.$ac_objext'
7967   { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7968   (eval $ac_try) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit $ac_status); }; }; then
7972   cf_cv_xopen_source=no
7973 else
7974   echo "$as_me: failed program was:" >&5
7975 cat conftest.$ac_ext >&5
7976 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7977 fi
7978 rm -f conftest.$ac_objext conftest.$ac_ext
7979         CPPFLAGS="$cf_save"
7980
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983
7984 fi
7985 echo "$as_me:7985: result: $cf_cv_xopen_source" >&5
7986 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7987
7988 if test "$cf_cv_xopen_source" != no ; then
7989
7990 CFLAGS=`echo "$CFLAGS" | \
7991         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7992                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7993
7994 CPPFLAGS=`echo "$CPPFLAGS" | \
7995         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7996                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7997
7998         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7999
8000 cf_fix_cppflags=no
8001 cf_new_cflags=
8002 cf_new_cppflags=
8003 cf_new_extra_cppflags=
8004
8005 for cf_add_cflags in $cf_temp_xopen_source
8006 do
8007 case $cf_fix_cppflags in
8008 no)
8009         case $cf_add_cflags in #(vi
8010         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8011                 case $cf_add_cflags in
8012                 -D*)
8013                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8014
8015                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8016                                 && test -z "${cf_tst_cflags}" \
8017                                 && cf_fix_cppflags=yes
8018
8019                         if test $cf_fix_cppflags = yes ; then
8020                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8021                                 continue
8022                         elif test "${cf_tst_cflags}" = "\"'" ; then
8023                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8024                                 continue
8025                         fi
8026                         ;;
8027                 esac
8028                 case "$CPPFLAGS" in
8029                 *$cf_add_cflags) #(vi
8030                         ;;
8031                 *) #(vi
8032                         case $cf_add_cflags in #(vi
8033                         -D*)
8034                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8035
8036 CPPFLAGS=`echo "$CPPFLAGS" | \
8037         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8038                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8039
8040                                 ;;
8041                         esac
8042                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8043                         ;;
8044                 esac
8045                 ;;
8046         *)
8047                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8048                 ;;
8049         esac
8050         ;;
8051 yes)
8052         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8053
8054         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8055
8056         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8057                 && test -z "${cf_tst_cflags}" \
8058                 && cf_fix_cppflags=no
8059         ;;
8060 esac
8061 done
8062
8063 if test -n "$cf_new_cflags" ; then
8064
8065         CFLAGS="$CFLAGS $cf_new_cflags"
8066 fi
8067
8068 if test -n "$cf_new_cppflags" ; then
8069
8070         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8071 fi
8072
8073 if test -n "$cf_new_extra_cppflags" ; then
8074
8075         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8076 fi
8077
8078 fi
8079
8080         fi
8081 fi
8082
8083 # Work around breakage on OS X
8084
8085 echo "$as_me:8085: checking if SIGWINCH is defined" >&5
8086 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8087 if test "${cf_cv_define_sigwinch+set}" = set; then
8088   echo $ECHO_N "(cached) $ECHO_C" >&6
8089 else
8090
8091         cat >conftest.$ac_ext <<_ACEOF
8092 #line 8092 "configure"
8093 #include "confdefs.h"
8094
8095 #include <sys/types.h>
8096 #include <sys/signal.h>
8097
8098 int
8099 main ()
8100 {
8101 int x = SIGWINCH
8102   ;
8103   return 0;
8104 }
8105 _ACEOF
8106 rm -f conftest.$ac_objext
8107 if { (eval echo "$as_me:8107: \"$ac_compile\"") >&5
8108   (eval $ac_compile) 2>&5
8109   ac_status=$?
8110   echo "$as_me:8110: \$? = $ac_status" >&5
8111   (exit $ac_status); } &&
8112          { ac_try='test -s conftest.$ac_objext'
8113   { (eval echo "$as_me:8113: \"$ac_try\"") >&5
8114   (eval $ac_try) 2>&5
8115   ac_status=$?
8116   echo "$as_me:8116: \$? = $ac_status" >&5
8117   (exit $ac_status); }; }; then
8118   cf_cv_define_sigwinch=yes
8119 else
8120   echo "$as_me: failed program was:" >&5
8121 cat conftest.$ac_ext >&5
8122 cat >conftest.$ac_ext <<_ACEOF
8123 #line 8123 "configure"
8124 #include "confdefs.h"
8125
8126 #undef _XOPEN_SOURCE
8127 #undef _POSIX_SOURCE
8128 #undef _POSIX_C_SOURCE
8129 #include <sys/types.h>
8130 #include <sys/signal.h>
8131
8132 int
8133 main ()
8134 {
8135 int x = SIGWINCH
8136   ;
8137   return 0;
8138 }
8139 _ACEOF
8140 rm -f conftest.$ac_objext
8141 if { (eval echo "$as_me:8141: \"$ac_compile\"") >&5
8142   (eval $ac_compile) 2>&5
8143   ac_status=$?
8144   echo "$as_me:8144: \$? = $ac_status" >&5
8145   (exit $ac_status); } &&
8146          { ac_try='test -s conftest.$ac_objext'
8147   { (eval echo "$as_me:8147: \"$ac_try\"") >&5
8148   (eval $ac_try) 2>&5
8149   ac_status=$?
8150   echo "$as_me:8150: \$? = $ac_status" >&5
8151   (exit $ac_status); }; }; then
8152   cf_cv_define_sigwinch=maybe
8153 else
8154   echo "$as_me: failed program was:" >&5
8155 cat conftest.$ac_ext >&5
8156 cf_cv_define_sigwinch=no
8157 fi
8158 rm -f conftest.$ac_objext conftest.$ac_ext
8159
8160 fi
8161 rm -f conftest.$ac_objext conftest.$ac_ext
8162
8163 fi
8164 echo "$as_me:8164: result: $cf_cv_define_sigwinch" >&5
8165 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8166
8167 if test "$cf_cv_define_sigwinch" = maybe ; then
8168 echo "$as_me:8168: checking for actual SIGWINCH definition" >&5
8169 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8170 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8171   echo $ECHO_N "(cached) $ECHO_C" >&6
8172 else
8173
8174 cf_cv_fixup_sigwinch=unknown
8175 cf_sigwinch=32
8176 while test $cf_sigwinch != 1
8177 do
8178         cat >conftest.$ac_ext <<_ACEOF
8179 #line 8179 "configure"
8180 #include "confdefs.h"
8181
8182 #undef _XOPEN_SOURCE
8183 #undef _POSIX_SOURCE
8184 #undef _POSIX_C_SOURCE
8185 #include <sys/types.h>
8186 #include <sys/signal.h>
8187
8188 int
8189 main ()
8190 {
8191
8192 #if SIGWINCH != $cf_sigwinch
8193 make an error
8194 #endif
8195 int x = SIGWINCH
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext
8201 if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5
8202   (eval $ac_compile) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest.$ac_objext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212   cf_cv_fixup_sigwinch=$cf_sigwinch
8213          break
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 fi
8218 rm -f conftest.$ac_objext conftest.$ac_ext
8219
8220 cf_sigwinch=`expr $cf_sigwinch - 1`
8221 done
8222
8223 fi
8224 echo "$as_me:8224: result: $cf_cv_fixup_sigwinch" >&5
8225 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8226
8227         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8228                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8229         fi
8230 fi
8231
8232 # Checks for CODESET support.
8233
8234   echo "$as_me:8234: checking for nl_langinfo and CODESET" >&5
8235 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8236 if test "${am_cv_langinfo_codeset+set}" = set; then
8237   echo $ECHO_N "(cached) $ECHO_C" >&6
8238 else
8239   cat >conftest.$ac_ext <<_ACEOF
8240 #line 8240 "configure"
8241 #include "confdefs.h"
8242 #include <langinfo.h>
8243 int
8244 main ()
8245 {
8246 char* cs = nl_langinfo(CODESET);
8247   ;
8248   return 0;
8249 }
8250 _ACEOF
8251 rm -f conftest.$ac_objext conftest$ac_exeext
8252 if { (eval echo "$as_me:8252: \"$ac_link\"") >&5
8253   (eval $ac_link) 2>&5
8254   ac_status=$?
8255   echo "$as_me:8255: \$? = $ac_status" >&5
8256   (exit $ac_status); } &&
8257          { ac_try='test -s conftest$ac_exeext'
8258   { (eval echo "$as_me:8258: \"$ac_try\"") >&5
8259   (eval $ac_try) 2>&5
8260   ac_status=$?
8261   echo "$as_me:8261: \$? = $ac_status" >&5
8262   (exit $ac_status); }; }; then
8263   am_cv_langinfo_codeset=yes
8264 else
8265   echo "$as_me: failed program was:" >&5
8266 cat conftest.$ac_ext >&5
8267 am_cv_langinfo_codeset=no
8268 fi
8269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8270
8271 fi
8272 echo "$as_me:8272: result: $am_cv_langinfo_codeset" >&5
8273 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8274   if test $am_cv_langinfo_codeset = yes; then
8275
8276 cat >>confdefs.h <<\EOF
8277 #define HAVE_LANGINFO_CODESET 1
8278 EOF
8279
8280   fi
8281
8282 # use these variables to work around a defect in gcc's fixincludes.
8283 NCURSES_OK_WCHAR_T=
8284 NCURSES_OK_WINT_T=
8285
8286 echo "$as_me:8286: checking if you want wide-character code" >&5
8287 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8288
8289 # Check whether --enable-widec or --disable-widec was given.
8290 if test "${enable_widec+set}" = set; then
8291   enableval="$enable_widec"
8292   with_widec=$enableval
8293 else
8294   with_widec=no
8295 fi;
8296 echo "$as_me:8296: result: $with_widec" >&5
8297 echo "${ECHO_T}$with_widec" >&6
8298 if test "x$with_widec" = xyes ; then
8299         LIB_SUFFIX="w${LIB_SUFFIX}"
8300
8301 cat >>confdefs.h <<\EOF
8302 #define USE_WIDEC_SUPPORT 1
8303 EOF
8304
8305 cat >>confdefs.h <<\EOF
8306 #define NCURSES_WIDECHAR 1
8307 EOF
8308
8309 echo "$as_me:8309: checking if wchar.h can be used as is" >&5
8310 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8311 if test "${cf_cv_wchar_h_okay+set}" = set; then
8312   echo $ECHO_N "(cached) $ECHO_C" >&6
8313 else
8314
8315 cat >conftest.$ac_ext <<_ACEOF
8316 #line 8316 "configure"
8317 #include "confdefs.h"
8318
8319 #include <stdlib.h>
8320 #include <wchar.h>
8321
8322 int
8323 main ()
8324 {
8325
8326         wint_t foo = 0;
8327         int bar = iswpunct(foo)
8328   ;
8329   return 0;
8330 }
8331 _ACEOF
8332 rm -f conftest.$ac_objext
8333 if { (eval echo "$as_me:8333: \"$ac_compile\"") >&5
8334   (eval $ac_compile) 2>&5
8335   ac_status=$?
8336   echo "$as_me:8336: \$? = $ac_status" >&5
8337   (exit $ac_status); } &&
8338          { ac_try='test -s conftest.$ac_objext'
8339   { (eval echo "$as_me:8339: \"$ac_try\"") >&5
8340   (eval $ac_try) 2>&5
8341   ac_status=$?
8342   echo "$as_me:8342: \$? = $ac_status" >&5
8343   (exit $ac_status); }; }; then
8344   cf_cv_wchar_h_okay=yes
8345 else
8346   echo "$as_me: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8348 cf_cv_wchar_h_okay=no
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351 fi
8352 echo "$as_me:8352: result: $cf_cv_wchar_h_okay" >&5
8353 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8354
8355 if test $cf_cv_wchar_h_okay = no
8356 then
8357
8358 echo "$as_me:8358: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8359 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8360 cat >conftest.$ac_ext <<_ACEOF
8361 #line 8361 "configure"
8362 #include "confdefs.h"
8363 #include <sys/types.h>
8364
8365 int
8366 main ()
8367 {
8368
8369 #ifndef _XOPEN_SOURCE_EXTENDED
8370 make an error
8371 #endif
8372   ;
8373   return 0;
8374 }
8375 _ACEOF
8376 rm -f conftest.$ac_objext
8377 if { (eval echo "$as_me:8377: \"$ac_compile\"") >&5
8378   (eval $ac_compile) 2>&5
8379   ac_status=$?
8380   echo "$as_me:8380: \$? = $ac_status" >&5
8381   (exit $ac_status); } &&
8382          { ac_try='test -s conftest.$ac_objext'
8383   { (eval echo "$as_me:8383: \"$ac_try\"") >&5
8384   (eval $ac_try) 2>&5
8385   ac_status=$?
8386   echo "$as_me:8386: \$? = $ac_status" >&5
8387   (exit $ac_status); }; }; then
8388   cf_result=no
8389 else
8390   echo "$as_me: failed program was:" >&5
8391 cat conftest.$ac_ext >&5
8392 cf_result=yes
8393 fi
8394 rm -f conftest.$ac_objext conftest.$ac_ext
8395 echo "$as_me:8395: result: $cf_result" >&5
8396 echo "${ECHO_T}$cf_result" >&6
8397
8398 if test "$cf_result" = yes ; then
8399         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8400 elif test "x" != "x" ; then
8401         echo "$as_me:8401: checking checking for compatible value versus " >&5
8402 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8403         cat >conftest.$ac_ext <<_ACEOF
8404 #line 8404 "configure"
8405 #include "confdefs.h"
8406 #include <sys/types.h>
8407
8408 int
8409 main ()
8410 {
8411
8412 #if _XOPEN_SOURCE_EXTENDED- < 0
8413 make an error
8414 #endif
8415   ;
8416   return 0;
8417 }
8418 _ACEOF
8419 rm -f conftest.$ac_objext
8420 if { (eval echo "$as_me:8420: \"$ac_compile\"") >&5
8421   (eval $ac_compile) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); } &&
8425          { ac_try='test -s conftest.$ac_objext'
8426   { (eval echo "$as_me:8426: \"$ac_try\"") >&5
8427   (eval $ac_try) 2>&5
8428   ac_status=$?
8429   echo "$as_me:8429: \$? = $ac_status" >&5
8430   (exit $ac_status); }; }; then
8431   cf_result=yes
8432 else
8433   echo "$as_me: failed program was:" >&5
8434 cat conftest.$ac_ext >&5
8435 cf_result=no
8436 fi
8437 rm -f conftest.$ac_objext conftest.$ac_ext
8438         echo "$as_me:8438: result: $cf_result" >&5
8439 echo "${ECHO_T}$cf_result" >&6
8440         if test "$cf_result" = no ; then
8441                 # perhaps we can override it - try...
8442                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8443         fi
8444 fi
8445
8446 fi
8447
8448         # with_overwrite=no
8449         NCURSES_CH_T=cchar_t
8450
8451 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8452 do
8453 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8454 echo "$as_me:8454: checking for $ac_func" >&5
8455 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8456 if eval "test \"\${$as_ac_var+set}\" = set"; then
8457   echo $ECHO_N "(cached) $ECHO_C" >&6
8458 else
8459   cat >conftest.$ac_ext <<_ACEOF
8460 #line 8460 "configure"
8461 #include "confdefs.h"
8462 /* System header to define __stub macros and hopefully few prototypes,
8463     which can conflict with char $ac_func (); below.  */
8464 #include <assert.h>
8465 /* Override any gcc2 internal prototype to avoid an error.  */
8466 #ifdef __cplusplus
8467 extern "C"
8468 #endif
8469 /* We use char because int might match the return type of a gcc2
8470    builtin and then its argument prototype would still apply.  */
8471 char $ac_func ();
8472 char (*f) ();
8473
8474 int
8475 main ()
8476 {
8477 /* The GNU C library defines this for functions which it implements
8478     to always fail with ENOSYS.  Some functions are actually named
8479     something starting with __ and the normal name is an alias.  */
8480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8481 choke me
8482 #else
8483 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8484 #endif
8485
8486   ;
8487   return 0;
8488 }
8489 _ACEOF
8490 rm -f conftest.$ac_objext conftest$ac_exeext
8491 if { (eval echo "$as_me:8491: \"$ac_link\"") >&5
8492   (eval $ac_link) 2>&5
8493   ac_status=$?
8494   echo "$as_me:8494: \$? = $ac_status" >&5
8495   (exit $ac_status); } &&
8496          { ac_try='test -s conftest$ac_exeext'
8497   { (eval echo "$as_me:8497: \"$ac_try\"") >&5
8498   (eval $ac_try) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); }; }; then
8502   eval "$as_ac_var=yes"
8503 else
8504   echo "$as_me: failed program was:" >&5
8505 cat conftest.$ac_ext >&5
8506 eval "$as_ac_var=no"
8507 fi
8508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8509 fi
8510 echo "$as_me:8510: result: `eval echo '${'$as_ac_var'}'`" >&5
8511 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8512 if test `eval echo '${'$as_ac_var'}'` = yes; then
8513   cat >>confdefs.h <<EOF
8514 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8515 EOF
8516
8517 fi
8518 done
8519
8520         if test "x$ac_cv_func_putwc" != xyes ; then
8521
8522 echo "$as_me:8522: checking for multibyte character support" >&5
8523 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8524 if test "${cf_cv_utf8_lib+set}" = set; then
8525   echo $ECHO_N "(cached) $ECHO_C" >&6
8526 else
8527
8528         cf_save_LIBS="$LIBS"
8529         cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 #include <stdlib.h>
8534 int
8535 main ()
8536 {
8537 putwc(0,0);
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554   cf_cv_utf8_lib=yes
8555 else
8556   echo "$as_me: failed program was:" >&5
8557 cat conftest.$ac_ext >&5
8558
8559 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8560 # will be set on completion of the AC_TRY_LINK below.
8561 cf_cv_header_path_utf8=
8562 cf_cv_library_path_utf8=
8563
8564 echo "${as_me:-configure}:8564: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8565
8566 cf_save_LIBS="$LIBS"
8567
8568 cat >conftest.$ac_ext <<_ACEOF
8569 #line 8569 "configure"
8570 #include "confdefs.h"
8571
8572 #include <libutf8.h>
8573 int
8574 main ()
8575 {
8576 putwc(0,0);
8577   ;
8578   return 0;
8579 }
8580 _ACEOF
8581 rm -f conftest.$ac_objext conftest$ac_exeext
8582 if { (eval echo "$as_me:8582: \"$ac_link\"") >&5
8583   (eval $ac_link) 2>&5
8584   ac_status=$?
8585   echo "$as_me:8585: \$? = $ac_status" >&5
8586   (exit $ac_status); } &&
8587          { ac_try='test -s conftest$ac_exeext'
8588   { (eval echo "$as_me:8588: \"$ac_try\"") >&5
8589   (eval $ac_try) 2>&5
8590   ac_status=$?
8591   echo "$as_me:8591: \$? = $ac_status" >&5
8592   (exit $ac_status); }; }; then
8593
8594         cf_cv_find_linkage_utf8=yes
8595         cf_cv_header_path_utf8=/usr/include
8596         cf_cv_library_path_utf8=/usr/lib
8597
8598 else
8599   echo "$as_me: failed program was:" >&5
8600 cat conftest.$ac_ext >&5
8601
8602 LIBS="-lutf8  $cf_save_LIBS"
8603
8604 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607
8608 #include <libutf8.h>
8609 int
8610 main ()
8611 {
8612 putwc(0,0);
8613   ;
8614   return 0;
8615 }
8616 _ACEOF
8617 rm -f conftest.$ac_objext conftest$ac_exeext
8618 if { (eval echo "$as_me:8618: \"$ac_link\"") >&5
8619   (eval $ac_link) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); } &&
8623          { ac_try='test -s conftest$ac_exeext'
8624   { (eval echo "$as_me:8624: \"$ac_try\"") >&5
8625   (eval $ac_try) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); }; }; then
8629
8630         cf_cv_find_linkage_utf8=yes
8631         cf_cv_header_path_utf8=/usr/include
8632         cf_cv_library_path_utf8=/usr/lib
8633         cf_cv_library_file_utf8="-lutf8"
8634
8635 else
8636   echo "$as_me: failed program was:" >&5
8637 cat conftest.$ac_ext >&5
8638
8639         cf_cv_find_linkage_utf8=no
8640         LIBS="$cf_save_LIBS"
8641
8642     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8643
8644 echo "${as_me:-configure}:8644: testing find linkage for utf8 library ..." 1>&5
8645
8646 echo "${as_me:-configure}:8646: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8647
8648     cf_save_CPPFLAGS="$CPPFLAGS"
8649     cf_test_CPPFLAGS="$CPPFLAGS"
8650
8651 cf_search=
8652
8653 # collect the current set of include-directories from compiler flags
8654 cf_header_path_list=""
8655 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8656         for cf_header_path in $CPPFLAGS $CFLAGS
8657         do
8658                 case $cf_header_path in #(vi
8659                 -I*)
8660                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8661
8662 test "$cf_header_path" != "NONE" && \
8663 test -d "$cf_header_path" && \
8664  {
8665         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8666         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8667         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8668         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8669         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8670         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8671 }
8672
8673                         cf_header_path_list="$cf_header_path_list $cf_search"
8674                         ;;
8675                 esac
8676         done
8677 fi
8678
8679 # add the variations for the package we are looking for
8680
8681 cf_search=
8682
8683 test "/usr" != "$prefix" && \
8684 test -d "/usr" && \
8685 (test $prefix = NONE || test "/usr" != "$prefix") && {
8686         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8687         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8688         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8689         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8690         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8691         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8692 }
8693
8694 test "$prefix" != "NONE" && \
8695 test -d "$prefix" && \
8696  {
8697         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8698         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8699         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8700         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8701         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8702         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8703 }
8704
8705 test "/usr/local" != "$prefix" && \
8706 test -d "/usr/local" && \
8707 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8708         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8709         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8710         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8711         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8712         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8713         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8714 }
8715
8716 test "/opt" != "$prefix" && \
8717 test -d "/opt" && \
8718 (test $prefix = NONE || test "/opt" != "$prefix") && {
8719         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8720         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8721         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8722         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8723         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8724         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8725 }
8726
8727 test "$HOME" != "$prefix" && \
8728 test -d "$HOME" && \
8729 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8730         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8731         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8732         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8733         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8734         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8735         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8736 }
8737
8738 test "$includedir" != NONE && \
8739 test "$includedir" != "/usr/include" && \
8740 test -d "$includedir" && {
8741         test -d $includedir &&    cf_search="$cf_search $includedir"
8742         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8743 }
8744
8745 test "$oldincludedir" != NONE && \
8746 test "$oldincludedir" != "/usr/include" && \
8747 test -d "$oldincludedir" && {
8748         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8749         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8750 }
8751
8752 cf_search="$cf_search $cf_header_path_list"
8753
8754     for cf_cv_header_path_utf8 in $cf_search
8755     do
8756       if test -d $cf_cv_header_path_utf8 ; then
8757         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8758
8759 echo "${as_me:-configure}:8759: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8760
8761         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8762         cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765
8766 #include <libutf8.h>
8767 int
8768 main ()
8769 {
8770 putwc(0,0);
8771   ;
8772   return 0;
8773 }
8774 _ACEOF
8775 rm -f conftest.$ac_objext
8776 if { (eval echo "$as_me:8776: \"$ac_compile\"") >&5
8777   (eval $ac_compile) 2>&5
8778   ac_status=$?
8779   echo "$as_me:8779: \$? = $ac_status" >&5
8780   (exit $ac_status); } &&
8781          { ac_try='test -s conftest.$ac_objext'
8782   { (eval echo "$as_me:8782: \"$ac_try\"") >&5
8783   (eval $ac_try) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); }; }; then
8787
8788             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8789
8790 echo "${as_me:-configure}:8790: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8791
8792             cf_cv_find_linkage_utf8=maybe
8793             cf_test_CPPFLAGS="$CPPFLAGS"
8794             break
8795 else
8796   echo "$as_me: failed program was:" >&5
8797 cat conftest.$ac_ext >&5
8798
8799             CPPFLAGS="$cf_save_CPPFLAGS"
8800
8801 fi
8802 rm -f conftest.$ac_objext conftest.$ac_ext
8803       fi
8804     done
8805
8806     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8807
8808 echo "${as_me:-configure}:8808: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8809
8810       cf_save_LIBS="$LIBS"
8811       cf_save_LDFLAGS="$LDFLAGS"
8812
8813       if test "$cf_cv_find_linkage_utf8" != yes ; then
8814
8815 cf_search=
8816 cf_library_path_list=""
8817 if test -n "${LDFLAGS}${LIBS}" ; then
8818         for cf_library_path in $LDFLAGS $LIBS
8819         do
8820                 case $cf_library_path in #(vi
8821                 -L*)
8822                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8823
8824 test "$cf_library_path" != "NONE" && \
8825 test -d "$cf_library_path" && \
8826  {
8827         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8828         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8829         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8830         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8831         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8832         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8833 }
8834
8835                         cf_library_path_list="$cf_library_path_list $cf_search"
8836                         ;;
8837                 esac
8838         done
8839 fi
8840
8841 cf_search=
8842
8843 test "/usr" != "$prefix" && \
8844 test -d "/usr" && \
8845 (test $prefix = NONE || test "/usr" != "$prefix") && {
8846         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8847         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8848         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8849         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8850         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8851         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8852 }
8853
8854 test "$prefix" != "NONE" && \
8855 test -d "$prefix" && \
8856  {
8857         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8858         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8859         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8860         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8861         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8862         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8863 }
8864
8865 test "/usr/local" != "$prefix" && \
8866 test -d "/usr/local" && \
8867 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8868         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8869         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8870         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8871         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8872         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8873         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8874 }
8875
8876 test "/opt" != "$prefix" && \
8877 test -d "/opt" && \
8878 (test $prefix = NONE || test "/opt" != "$prefix") && {
8879         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8880         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8881         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8882         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8883         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8884         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8885 }
8886
8887 test "$HOME" != "$prefix" && \
8888 test -d "$HOME" && \
8889 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8890         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8891         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8892         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8893         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8894         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8895         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8896 }
8897
8898 cf_search="$cf_library_path_list $cf_search"
8899
8900         for cf_cv_library_path_utf8 in $cf_search
8901         do
8902           if test -d $cf_cv_library_path_utf8 ; then
8903             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8904
8905 echo "${as_me:-configure}:8905: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8906
8907             CPPFLAGS="$cf_test_CPPFLAGS"
8908             LIBS="-lutf8  $cf_save_LIBS"
8909             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8910             cat >conftest.$ac_ext <<_ACEOF
8911 #line 8911 "configure"
8912 #include "confdefs.h"
8913
8914 #include <libutf8.h>
8915 int
8916 main ()
8917 {
8918 putwc(0,0);
8919   ;
8920   return 0;
8921 }
8922 _ACEOF
8923 rm -f conftest.$ac_objext conftest$ac_exeext
8924 if { (eval echo "$as_me:8924: \"$ac_link\"") >&5
8925   (eval $ac_link) 2>&5
8926   ac_status=$?
8927   echo "$as_me:8927: \$? = $ac_status" >&5
8928   (exit $ac_status); } &&
8929          { ac_try='test -s conftest$ac_exeext'
8930   { (eval echo "$as_me:8930: \"$ac_try\"") >&5
8931   (eval $ac_try) 2>&5
8932   ac_status=$?
8933   echo "$as_me:8933: \$? = $ac_status" >&5
8934   (exit $ac_status); }; }; then
8935
8936                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8937
8938 echo "${as_me:-configure}:8938: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8939
8940                 cf_cv_find_linkage_utf8=yes
8941                 cf_cv_library_file_utf8="-lutf8"
8942                 break
8943 else
8944   echo "$as_me: failed program was:" >&5
8945 cat conftest.$ac_ext >&5
8946
8947                 CPPFLAGS="$cf_save_CPPFLAGS"
8948                 LIBS="$cf_save_LIBS"
8949                 LDFLAGS="$cf_save_LDFLAGS"
8950
8951 fi
8952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8953           fi
8954         done
8955         CPPFLAGS="$cf_save_CPPFLAGS"
8956         LDFLAGS="$cf_save_LDFLAGS"
8957       fi
8958
8959     else
8960       cf_cv_find_linkage_utf8=no
8961     fi
8962
8963 fi
8964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8965
8966 fi
8967 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8968
8969 LIBS="$cf_save_LIBS"
8970
8971 if test "$cf_cv_find_linkage_utf8" = yes ; then
8972 cf_cv_utf8_lib=add-on
8973 else
8974 cf_cv_utf8_lib=no
8975 fi
8976
8977 fi
8978 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8979 fi
8980 echo "$as_me:8980: result: $cf_cv_utf8_lib" >&5
8981 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8982
8983 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8984 # ncurses/ncursesw:
8985 if test "$cf_cv_utf8_lib" = "add-on" ; then
8986
8987 cat >>confdefs.h <<\EOF
8988 #define HAVE_LIBUTF8_H 1
8989 EOF
8990
8991 if test -n "$cf_cv_header_path_utf8" ; then
8992   for cf_add_incdir in $cf_cv_header_path_utf8
8993   do
8994         while test $cf_add_incdir != /usr/include
8995         do
8996           if test -d $cf_add_incdir
8997           then
8998                 cf_have_incdir=no
8999                 if test -n "$CFLAGS$CPPFLAGS" ; then
9000                   # a loop is needed to ensure we can add subdirs of existing dirs
9001                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9002                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9003                           cf_have_incdir=yes; break
9004                         fi
9005                   done
9006                 fi
9007
9008                 if test "$cf_have_incdir" = no ; then
9009                   if test "$cf_add_incdir" = /usr/local/include ; then
9010                         if test "$GCC" = yes
9011                         then
9012                           cf_save_CPPFLAGS=$CPPFLAGS
9013                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9014                           cat >conftest.$ac_ext <<_ACEOF
9015 #line 9015 "configure"
9016 #include "confdefs.h"
9017 #include <stdio.h>
9018 int
9019 main ()
9020 {
9021 printf("Hello")
9022   ;
9023   return 0;
9024 }
9025 _ACEOF
9026 rm -f conftest.$ac_objext
9027 if { (eval echo "$as_me:9027: \"$ac_compile\"") >&5
9028   (eval $ac_compile) 2>&5
9029   ac_status=$?
9030   echo "$as_me:9030: \$? = $ac_status" >&5
9031   (exit $ac_status); } &&
9032          { ac_try='test -s conftest.$ac_objext'
9033   { (eval echo "$as_me:9033: \"$ac_try\"") >&5
9034   (eval $ac_try) 2>&5
9035   ac_status=$?
9036   echo "$as_me:9036: \$? = $ac_status" >&5
9037   (exit $ac_status); }; }; then
9038   :
9039 else
9040   echo "$as_me: failed program was:" >&5
9041 cat conftest.$ac_ext >&5
9042 cf_have_incdir=yes
9043 fi
9044 rm -f conftest.$ac_objext conftest.$ac_ext
9045                           CPPFLAGS=$cf_save_CPPFLAGS
9046                         fi
9047                   fi
9048                 fi
9049
9050                 if test "$cf_have_incdir" = no ; then
9051                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9052
9053 echo "${as_me:-configure}:9053: testing adding $cf_add_incdir to include-path ..." 1>&5
9054
9055                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9056
9057                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9058                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9059                   cf_add_incdir="$cf_top_incdir"
9060                 else
9061                   break
9062                 fi
9063           fi
9064         done
9065   done
9066 fi
9067
9068 if test -n "$cf_cv_library_path_utf8" ; then
9069   for cf_add_libdir in $cf_cv_library_path_utf8
9070   do
9071     if test $cf_add_libdir = /usr/lib ; then
9072       :
9073     elif test -d $cf_add_libdir
9074     then
9075       cf_have_libdir=no
9076       if test -n "$LDFLAGS$LIBS" ; then
9077         # a loop is needed to ensure we can add subdirs of existing dirs
9078         for cf_test_libdir in $LDFLAGS $LIBS ; do
9079           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9080             cf_have_libdir=yes; break
9081           fi
9082         done
9083       fi
9084       if test "$cf_have_libdir" = no ; then
9085         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9086
9087 echo "${as_me:-configure}:9087: testing adding $cf_add_libdir to library-path ..." 1>&5
9088
9089         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9090       fi
9091     fi
9092   done
9093 fi
9094
9095         LIBS="$cf_cv_library_file_utf8 $LIBS"
9096 fi
9097
9098                 if test "$cf_cv_utf8_lib" != no ; then
9099                         NCURSES_LIBUTF8=1
9100                 fi
9101         fi
9102
9103 # This is needed on Tru64 5.0 to declare mbstate_t
9104 echo "$as_me:9104: checking if we must include wchar.h to declare mbstate_t" >&5
9105 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9106 if test "${cf_cv_mbstate_t+set}" = set; then
9107   echo $ECHO_N "(cached) $ECHO_C" >&6
9108 else
9109
9110 cat >conftest.$ac_ext <<_ACEOF
9111 #line 9111 "configure"
9112 #include "confdefs.h"
9113
9114 #include <stdlib.h>
9115 #include <stdarg.h>
9116 #include <stdio.h>
9117 #ifdef HAVE_LIBUTF8_H
9118 #include <libutf8.h>
9119 #endif
9120 int
9121 main ()
9122 {
9123 mbstate_t state
9124   ;
9125   return 0;
9126 }
9127 _ACEOF
9128 rm -f conftest.$ac_objext
9129 if { (eval echo "$as_me:9129: \"$ac_compile\"") >&5
9130   (eval $ac_compile) 2>&5
9131   ac_status=$?
9132   echo "$as_me:9132: \$? = $ac_status" >&5
9133   (exit $ac_status); } &&
9134          { ac_try='test -s conftest.$ac_objext'
9135   { (eval echo "$as_me:9135: \"$ac_try\"") >&5
9136   (eval $ac_try) 2>&5
9137   ac_status=$?
9138   echo "$as_me:9138: \$? = $ac_status" >&5
9139   (exit $ac_status); }; }; then
9140   cf_cv_mbstate_t=no
9141 else
9142   echo "$as_me: failed program was:" >&5
9143 cat conftest.$ac_ext >&5
9144 cat >conftest.$ac_ext <<_ACEOF
9145 #line 9145 "configure"
9146 #include "confdefs.h"
9147
9148 #include <stdlib.h>
9149 #include <stdarg.h>
9150 #include <stdio.h>
9151 #include <wchar.h>
9152 #ifdef HAVE_LIBUTF8_H
9153 #include <libutf8.h>
9154 #endif
9155 int
9156 main ()
9157 {
9158 mbstate_t value
9159   ;
9160   return 0;
9161 }
9162 _ACEOF
9163 rm -f conftest.$ac_objext
9164 if { (eval echo "$as_me:9164: \"$ac_compile\"") >&5
9165   (eval $ac_compile) 2>&5
9166   ac_status=$?
9167   echo "$as_me:9167: \$? = $ac_status" >&5
9168   (exit $ac_status); } &&
9169          { ac_try='test -s conftest.$ac_objext'
9170   { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171   (eval $ac_try) 2>&5
9172   ac_status=$?
9173   echo "$as_me:9173: \$? = $ac_status" >&5
9174   (exit $ac_status); }; }; then
9175   cf_cv_mbstate_t=yes
9176 else
9177   echo "$as_me: failed program was:" >&5
9178 cat conftest.$ac_ext >&5
9179 cf_cv_mbstate_t=unknown
9180 fi
9181 rm -f conftest.$ac_objext conftest.$ac_ext
9182 fi
9183 rm -f conftest.$ac_objext conftest.$ac_ext
9184 fi
9185 echo "$as_me:9185: result: $cf_cv_mbstate_t" >&5
9186 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9187
9188 if test "$cf_cv_mbstate_t" = yes ; then
9189
9190 cat >>confdefs.h <<\EOF
9191 #define NEED_WCHAR_H 1
9192 EOF
9193
9194         NEED_WCHAR_H=1
9195 fi
9196
9197 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9198 if test "$cf_cv_mbstate_t" = unknown ; then
9199         NCURSES_MBSTATE_T=1
9200 fi
9201
9202 # This is needed on Tru64 5.0 to declare wchar_t
9203 echo "$as_me:9203: checking if we must include wchar.h to declare wchar_t" >&5
9204 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9205 if test "${cf_cv_wchar_t+set}" = set; then
9206   echo $ECHO_N "(cached) $ECHO_C" >&6
9207 else
9208
9209 cat >conftest.$ac_ext <<_ACEOF
9210 #line 9210 "configure"
9211 #include "confdefs.h"
9212
9213 #include <stdlib.h>
9214 #include <stdarg.h>
9215 #include <stdio.h>
9216 #ifdef HAVE_LIBUTF8_H
9217 #include <libutf8.h>
9218 #endif
9219 int
9220 main ()
9221 {
9222 wchar_t state
9223   ;
9224   return 0;
9225 }
9226 _ACEOF
9227 rm -f conftest.$ac_objext
9228 if { (eval echo "$as_me:9228: \"$ac_compile\"") >&5
9229   (eval $ac_compile) 2>&5
9230   ac_status=$?
9231   echo "$as_me:9231: \$? = $ac_status" >&5
9232   (exit $ac_status); } &&
9233          { ac_try='test -s conftest.$ac_objext'
9234   { (eval echo "$as_me:9234: \"$ac_try\"") >&5
9235   (eval $ac_try) 2>&5
9236   ac_status=$?
9237   echo "$as_me:9237: \$? = $ac_status" >&5
9238   (exit $ac_status); }; }; then
9239   cf_cv_wchar_t=no
9240 else
9241   echo "$as_me: failed program was:" >&5
9242 cat conftest.$ac_ext >&5
9243 cat >conftest.$ac_ext <<_ACEOF
9244 #line 9244 "configure"
9245 #include "confdefs.h"
9246
9247 #include <stdlib.h>
9248 #include <stdarg.h>
9249 #include <stdio.h>
9250 #include <wchar.h>
9251 #ifdef HAVE_LIBUTF8_H
9252 #include <libutf8.h>
9253 #endif
9254 int
9255 main ()
9256 {
9257 wchar_t value
9258   ;
9259   return 0;
9260 }
9261 _ACEOF
9262 rm -f conftest.$ac_objext
9263 if { (eval echo "$as_me:9263: \"$ac_compile\"") >&5
9264   (eval $ac_compile) 2>&5
9265   ac_status=$?
9266   echo "$as_me:9266: \$? = $ac_status" >&5
9267   (exit $ac_status); } &&
9268          { ac_try='test -s conftest.$ac_objext'
9269   { (eval echo "$as_me:9269: \"$ac_try\"") >&5
9270   (eval $ac_try) 2>&5
9271   ac_status=$?
9272   echo "$as_me:9272: \$? = $ac_status" >&5
9273   (exit $ac_status); }; }; then
9274   cf_cv_wchar_t=yes
9275 else
9276   echo "$as_me: failed program was:" >&5
9277 cat conftest.$ac_ext >&5
9278 cf_cv_wchar_t=unknown
9279 fi
9280 rm -f conftest.$ac_objext conftest.$ac_ext
9281 fi
9282 rm -f conftest.$ac_objext conftest.$ac_ext
9283 fi
9284 echo "$as_me:9284: result: $cf_cv_wchar_t" >&5
9285 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9286
9287 if test "$cf_cv_wchar_t" = yes ; then
9288
9289 cat >>confdefs.h <<\EOF
9290 #define NEED_WCHAR_H 1
9291 EOF
9292
9293         NEED_WCHAR_H=1
9294 fi
9295
9296 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9297 if test "$cf_cv_wchar_t" = unknown ; then
9298         NCURSES_WCHAR_T=1
9299 fi
9300
9301 # if we find wchar_t in either place, use substitution to provide a fallback.
9302 if test "$cf_cv_wchar_t" != unknown ; then
9303         NCURSES_OK_WCHAR_T=1
9304 fi
9305
9306 # This is needed on Tru64 5.0 to declare wint_t
9307 echo "$as_me:9307: checking if we must include wchar.h to declare wint_t" >&5
9308 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9309 if test "${cf_cv_wint_t+set}" = set; then
9310   echo $ECHO_N "(cached) $ECHO_C" >&6
9311 else
9312
9313 cat >conftest.$ac_ext <<_ACEOF
9314 #line 9314 "configure"
9315 #include "confdefs.h"
9316
9317 #include <stdlib.h>
9318 #include <stdarg.h>
9319 #include <stdio.h>
9320 #ifdef HAVE_LIBUTF8_H
9321 #include <libutf8.h>
9322 #endif
9323 int
9324 main ()
9325 {
9326 wint_t state
9327   ;
9328   return 0;
9329 }
9330 _ACEOF
9331 rm -f conftest.$ac_objext
9332 if { (eval echo "$as_me:9332: \"$ac_compile\"") >&5
9333   (eval $ac_compile) 2>&5
9334   ac_status=$?
9335   echo "$as_me:9335: \$? = $ac_status" >&5
9336   (exit $ac_status); } &&
9337          { ac_try='test -s conftest.$ac_objext'
9338   { (eval echo "$as_me:9338: \"$ac_try\"") >&5
9339   (eval $ac_try) 2>&5
9340   ac_status=$?
9341   echo "$as_me:9341: \$? = $ac_status" >&5
9342   (exit $ac_status); }; }; then
9343   cf_cv_wint_t=no
9344 else
9345   echo "$as_me: failed program was:" >&5
9346 cat conftest.$ac_ext >&5
9347 cat >conftest.$ac_ext <<_ACEOF
9348 #line 9348 "configure"
9349 #include "confdefs.h"
9350
9351 #include <stdlib.h>
9352 #include <stdarg.h>
9353 #include <stdio.h>
9354 #include <wchar.h>
9355 #ifdef HAVE_LIBUTF8_H
9356 #include <libutf8.h>
9357 #endif
9358 int
9359 main ()
9360 {
9361 wint_t value
9362   ;
9363   return 0;
9364 }
9365 _ACEOF
9366 rm -f conftest.$ac_objext
9367 if { (eval echo "$as_me:9367: \"$ac_compile\"") >&5
9368   (eval $ac_compile) 2>&5
9369   ac_status=$?
9370   echo "$as_me:9370: \$? = $ac_status" >&5
9371   (exit $ac_status); } &&
9372          { ac_try='test -s conftest.$ac_objext'
9373   { (eval echo "$as_me:9373: \"$ac_try\"") >&5
9374   (eval $ac_try) 2>&5
9375   ac_status=$?
9376   echo "$as_me:9376: \$? = $ac_status" >&5
9377   (exit $ac_status); }; }; then
9378   cf_cv_wint_t=yes
9379 else
9380   echo "$as_me: failed program was:" >&5
9381 cat conftest.$ac_ext >&5
9382 cf_cv_wint_t=unknown
9383 fi
9384 rm -f conftest.$ac_objext conftest.$ac_ext
9385 fi
9386 rm -f conftest.$ac_objext conftest.$ac_ext
9387 fi
9388 echo "$as_me:9388: result: $cf_cv_wint_t" >&5
9389 echo "${ECHO_T}$cf_cv_wint_t" >&6
9390
9391 if test "$cf_cv_wint_t" = yes ; then
9392
9393 cat >>confdefs.h <<\EOF
9394 #define NEED_WCHAR_H 1
9395 EOF
9396
9397         NEED_WCHAR_H=1
9398 fi
9399
9400 # if we do not find wint_t in either place, use substitution to provide a fallback.
9401 if test "$cf_cv_wint_t" = unknown ; then
9402         NCURSES_WINT_T=1
9403 fi
9404
9405 # if we find wint_t in either place, use substitution to provide a fallback.
9406 if test "$cf_cv_wint_t" != unknown ; then
9407         NCURSES_OK_WINT_T=1
9408 fi
9409
9410         if test "$NCURSES_MBSTATE_T" != 0; then
9411
9412 cat >>confdefs.h <<\EOF
9413 #define NEED_MBSTATE_T_DEF 1
9414 EOF
9415
9416         fi
9417 fi
9418
9419 ###   use option --disable-lp64 to allow long chtype
9420 case $cf_cv_abi_version in
9421 [345]*)
9422         default_with_lp64=no
9423         ;;
9424 *)
9425         default_with_lp64=yes
9426         ;;
9427 esac
9428
9429 echo "$as_me:9429: checking whether to enable _LP64 definition in curses.h" >&5
9430 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9431
9432 # Check whether --enable-lp64 or --disable-lp64 was given.
9433 if test "${enable_lp64+set}" = set; then
9434   enableval="$enable_lp64"
9435   with_lp64=$enableval
9436 else
9437   with_lp64=$default_with_lp64
9438 fi;
9439 echo "$as_me:9439: result: $with_lp64" >&5
9440 echo "${ECHO_T}$with_lp64" >&6
9441
9442 if test "x$with_lp64" = xyes ; then
9443         cf_cv_enable_lp64=1
9444 else
9445         cf_cv_enable_lp64=0
9446 fi
9447
9448 # Check whether --enable-largefile or --disable-largefile was given.
9449 if test "${enable_largefile+set}" = set; then
9450   enableval="$enable_largefile"
9451
9452 fi;
9453 if test "$enable_largefile" != no; then
9454
9455   echo "$as_me:9455: checking for special C compiler options needed for large files" >&5
9456 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9457 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9458   echo $ECHO_N "(cached) $ECHO_C" >&6
9459 else
9460   ac_cv_sys_largefile_CC=no
9461      if test "$GCC" != yes; then
9462        ac_save_CC=$CC
9463        while :; do
9464          # IRIX 6.2 and later do not support large files by default,
9465          # so use the C compiler's -n32 option if that helps.
9466          cat >conftest.$ac_ext <<_ACEOF
9467 #line 9467 "configure"
9468 #include "confdefs.h"
9469 #include <sys/types.h>
9470  /* Check that off_t can represent 2**63 - 1 correctly.
9471     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9472     since some C++ compilers masquerading as C compilers
9473     incorrectly reject 9223372036854775807.  */
9474 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9475   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9476                        && LARGE_OFF_T % 2147483647 == 1)
9477                       ? 1 : -1];
9478 int
9479 main ()
9480 {
9481
9482   ;
9483   return 0;
9484 }
9485 _ACEOF
9486          rm -f conftest.$ac_objext
9487 if { (eval echo "$as_me:9487: \"$ac_compile\"") >&5
9488   (eval $ac_compile) 2>&5
9489   ac_status=$?
9490   echo "$as_me:9490: \$? = $ac_status" >&5
9491   (exit $ac_status); } &&
9492          { ac_try='test -s conftest.$ac_objext'
9493   { (eval echo "$as_me:9493: \"$ac_try\"") >&5
9494   (eval $ac_try) 2>&5
9495   ac_status=$?
9496   echo "$as_me:9496: \$? = $ac_status" >&5
9497   (exit $ac_status); }; }; then
9498   break
9499 else
9500   echo "$as_me: failed program was:" >&5
9501 cat conftest.$ac_ext >&5
9502 fi
9503 rm -f conftest.$ac_objext
9504          CC="$CC -n32"
9505          rm -f conftest.$ac_objext
9506 if { (eval echo "$as_me:9506: \"$ac_compile\"") >&5
9507   (eval $ac_compile) 2>&5
9508   ac_status=$?
9509   echo "$as_me:9509: \$? = $ac_status" >&5
9510   (exit $ac_status); } &&
9511          { ac_try='test -s conftest.$ac_objext'
9512   { (eval echo "$as_me:9512: \"$ac_try\"") >&5
9513   (eval $ac_try) 2>&5
9514   ac_status=$?
9515   echo "$as_me:9515: \$? = $ac_status" >&5
9516   (exit $ac_status); }; }; then
9517   ac_cv_sys_largefile_CC=' -n32'; break
9518 else
9519   echo "$as_me: failed program was:" >&5
9520 cat conftest.$ac_ext >&5
9521 fi
9522 rm -f conftest.$ac_objext
9523          break
9524        done
9525        CC=$ac_save_CC
9526        rm -f conftest.$ac_ext
9527     fi
9528 fi
9529 echo "$as_me:9529: result: $ac_cv_sys_largefile_CC" >&5
9530 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9531   if test "$ac_cv_sys_largefile_CC" != no; then
9532     CC=$CC$ac_cv_sys_largefile_CC
9533   fi
9534
9535   echo "$as_me:9535: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9536 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9537 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9538   echo $ECHO_N "(cached) $ECHO_C" >&6
9539 else
9540   while :; do
9541   ac_cv_sys_file_offset_bits=no
9542   cat >conftest.$ac_ext <<_ACEOF
9543 #line 9543 "configure"
9544 #include "confdefs.h"
9545 #include <sys/types.h>
9546  /* Check that off_t can represent 2**63 - 1 correctly.
9547     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9548     since some C++ compilers masquerading as C compilers
9549     incorrectly reject 9223372036854775807.  */
9550 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9551   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9552                        && LARGE_OFF_T % 2147483647 == 1)
9553                       ? 1 : -1];
9554 int
9555 main ()
9556 {
9557
9558   ;
9559   return 0;
9560 }
9561 _ACEOF
9562 rm -f conftest.$ac_objext
9563 if { (eval echo "$as_me:9563: \"$ac_compile\"") >&5
9564   (eval $ac_compile) 2>&5
9565   ac_status=$?
9566   echo "$as_me:9566: \$? = $ac_status" >&5
9567   (exit $ac_status); } &&
9568          { ac_try='test -s conftest.$ac_objext'
9569   { (eval echo "$as_me:9569: \"$ac_try\"") >&5
9570   (eval $ac_try) 2>&5
9571   ac_status=$?
9572   echo "$as_me:9572: \$? = $ac_status" >&5
9573   (exit $ac_status); }; }; then
9574   break
9575 else
9576   echo "$as_me: failed program was:" >&5
9577 cat conftest.$ac_ext >&5
9578 fi
9579 rm -f conftest.$ac_objext conftest.$ac_ext
9580   cat >conftest.$ac_ext <<_ACEOF
9581 #line 9581 "configure"
9582 #include "confdefs.h"
9583 #define _FILE_OFFSET_BITS 64
9584 #include <sys/types.h>
9585  /* Check that off_t can represent 2**63 - 1 correctly.
9586     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9587     since some C++ compilers masquerading as C compilers
9588     incorrectly reject 9223372036854775807.  */
9589 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9590   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9591                        && LARGE_OFF_T % 2147483647 == 1)
9592                       ? 1 : -1];
9593 int
9594 main ()
9595 {
9596
9597   ;
9598   return 0;
9599 }
9600 _ACEOF
9601 rm -f conftest.$ac_objext
9602 if { (eval echo "$as_me:9602: \"$ac_compile\"") >&5
9603   (eval $ac_compile) 2>&5
9604   ac_status=$?
9605   echo "$as_me:9605: \$? = $ac_status" >&5
9606   (exit $ac_status); } &&
9607          { ac_try='test -s conftest.$ac_objext'
9608   { (eval echo "$as_me:9608: \"$ac_try\"") >&5
9609   (eval $ac_try) 2>&5
9610   ac_status=$?
9611   echo "$as_me:9611: \$? = $ac_status" >&5
9612   (exit $ac_status); }; }; then
9613   ac_cv_sys_file_offset_bits=64; break
9614 else
9615   echo "$as_me: failed program was:" >&5
9616 cat conftest.$ac_ext >&5
9617 fi
9618 rm -f conftest.$ac_objext conftest.$ac_ext
9619   break
9620 done
9621 fi
9622 echo "$as_me:9622: result: $ac_cv_sys_file_offset_bits" >&5
9623 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9624 if test "$ac_cv_sys_file_offset_bits" != no; then
9625
9626 cat >>confdefs.h <<EOF
9627 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9628 EOF
9629
9630 fi
9631 rm -rf conftest*
9632   echo "$as_me:9632: checking for _LARGE_FILES value needed for large files" >&5
9633 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9634 if test "${ac_cv_sys_large_files+set}" = set; then
9635   echo $ECHO_N "(cached) $ECHO_C" >&6
9636 else
9637   while :; do
9638   ac_cv_sys_large_files=no
9639   cat >conftest.$ac_ext <<_ACEOF
9640 #line 9640 "configure"
9641 #include "confdefs.h"
9642 #include <sys/types.h>
9643  /* Check that off_t can represent 2**63 - 1 correctly.
9644     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9645     since some C++ compilers masquerading as C compilers
9646     incorrectly reject 9223372036854775807.  */
9647 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9648   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9649                        && LARGE_OFF_T % 2147483647 == 1)
9650                       ? 1 : -1];
9651 int
9652 main ()
9653 {
9654
9655   ;
9656   return 0;
9657 }
9658 _ACEOF
9659 rm -f conftest.$ac_objext
9660 if { (eval echo "$as_me:9660: \"$ac_compile\"") >&5
9661   (eval $ac_compile) 2>&5
9662   ac_status=$?
9663   echo "$as_me:9663: \$? = $ac_status" >&5
9664   (exit $ac_status); } &&
9665          { ac_try='test -s conftest.$ac_objext'
9666   { (eval echo "$as_me:9666: \"$ac_try\"") >&5
9667   (eval $ac_try) 2>&5
9668   ac_status=$?
9669   echo "$as_me:9669: \$? = $ac_status" >&5
9670   (exit $ac_status); }; }; then
9671   break
9672 else
9673   echo "$as_me: failed program was:" >&5
9674 cat conftest.$ac_ext >&5
9675 fi
9676 rm -f conftest.$ac_objext conftest.$ac_ext
9677   cat >conftest.$ac_ext <<_ACEOF
9678 #line 9678 "configure"
9679 #include "confdefs.h"
9680 #define _LARGE_FILES 1
9681 #include <sys/types.h>
9682  /* Check that off_t can represent 2**63 - 1 correctly.
9683     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9684     since some C++ compilers masquerading as C compilers
9685     incorrectly reject 9223372036854775807.  */
9686 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9687   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9688                        && LARGE_OFF_T % 2147483647 == 1)
9689                       ? 1 : -1];
9690 int
9691 main ()
9692 {
9693
9694   ;
9695   return 0;
9696 }
9697 _ACEOF
9698 rm -f conftest.$ac_objext
9699 if { (eval echo "$as_me:9699: \"$ac_compile\"") >&5
9700   (eval $ac_compile) 2>&5
9701   ac_status=$?
9702   echo "$as_me:9702: \$? = $ac_status" >&5
9703   (exit $ac_status); } &&
9704          { ac_try='test -s conftest.$ac_objext'
9705   { (eval echo "$as_me:9705: \"$ac_try\"") >&5
9706   (eval $ac_try) 2>&5
9707   ac_status=$?
9708   echo "$as_me:9708: \$? = $ac_status" >&5
9709   (exit $ac_status); }; }; then
9710   ac_cv_sys_large_files=1; break
9711 else
9712   echo "$as_me: failed program was:" >&5
9713 cat conftest.$ac_ext >&5
9714 fi
9715 rm -f conftest.$ac_objext conftest.$ac_ext
9716   break
9717 done
9718 fi
9719 echo "$as_me:9719: result: $ac_cv_sys_large_files" >&5
9720 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9721 if test "$ac_cv_sys_large_files" != no; then
9722
9723 cat >>confdefs.h <<EOF
9724 #define _LARGE_FILES $ac_cv_sys_large_files
9725 EOF
9726
9727 fi
9728 rm -rf conftest*
9729 fi
9730
9731     if test "$enable_largefile" != no ; then
9732         echo "$as_me:9732: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9733 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9734 if test "${ac_cv_sys_largefile_source+set}" = set; then
9735   echo $ECHO_N "(cached) $ECHO_C" >&6
9736 else
9737   while :; do
9738   ac_cv_sys_largefile_source=no
9739   cat >conftest.$ac_ext <<_ACEOF
9740 #line 9740 "configure"
9741 #include "confdefs.h"
9742 #include <stdio.h>
9743 int
9744 main ()
9745 {
9746 return !fseeko;
9747   ;
9748   return 0;
9749 }
9750 _ACEOF
9751 rm -f conftest.$ac_objext
9752 if { (eval echo "$as_me:9752: \"$ac_compile\"") >&5
9753   (eval $ac_compile) 2>&5
9754   ac_status=$?
9755   echo "$as_me:9755: \$? = $ac_status" >&5
9756   (exit $ac_status); } &&
9757          { ac_try='test -s conftest.$ac_objext'
9758   { (eval echo "$as_me:9758: \"$ac_try\"") >&5
9759   (eval $ac_try) 2>&5
9760   ac_status=$?
9761   echo "$as_me:9761: \$? = $ac_status" >&5
9762   (exit $ac_status); }; }; then
9763   break
9764 else
9765   echo "$as_me: failed program was:" >&5
9766 cat conftest.$ac_ext >&5
9767 fi
9768 rm -f conftest.$ac_objext conftest.$ac_ext
9769   cat >conftest.$ac_ext <<_ACEOF
9770 #line 9770 "configure"
9771 #include "confdefs.h"
9772 #define _LARGEFILE_SOURCE 1
9773 #include <stdio.h>
9774 int
9775 main ()
9776 {
9777 return !fseeko;
9778   ;
9779   return 0;
9780 }
9781 _ACEOF
9782 rm -f conftest.$ac_objext
9783 if { (eval echo "$as_me:9783: \"$ac_compile\"") >&5
9784   (eval $ac_compile) 2>&5
9785   ac_status=$?
9786   echo "$as_me:9786: \$? = $ac_status" >&5
9787   (exit $ac_status); } &&
9788          { ac_try='test -s conftest.$ac_objext'
9789   { (eval echo "$as_me:9789: \"$ac_try\"") >&5
9790   (eval $ac_try) 2>&5
9791   ac_status=$?
9792   echo "$as_me:9792: \$? = $ac_status" >&5
9793   (exit $ac_status); }; }; then
9794   ac_cv_sys_largefile_source=1; break
9795 else
9796   echo "$as_me: failed program was:" >&5
9797 cat conftest.$ac_ext >&5
9798 fi
9799 rm -f conftest.$ac_objext conftest.$ac_ext
9800   break
9801 done
9802 fi
9803 echo "$as_me:9803: result: $ac_cv_sys_largefile_source" >&5
9804 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9805 if test "$ac_cv_sys_largefile_source" != no; then
9806
9807 cat >>confdefs.h <<EOF
9808 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9809 EOF
9810
9811 fi
9812 rm -rf conftest*
9813
9814 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9815 # in glibc 2.1.3, but that breaks too many other things.
9816 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9817 echo "$as_me:9817: checking for fseeko" >&5
9818 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9819 if test "${ac_cv_func_fseeko+set}" = set; then
9820   echo $ECHO_N "(cached) $ECHO_C" >&6
9821 else
9822   cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 #include <stdio.h>
9826 int
9827 main ()
9828 {
9829 return fseeko && fseeko (stdin, 0, 0);
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -f conftest.$ac_objext conftest$ac_exeext
9835 if { (eval echo "$as_me:9835: \"$ac_link\"") >&5
9836   (eval $ac_link) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -s conftest$ac_exeext'
9841   { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); }; }; then
9846   ac_cv_func_fseeko=yes
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850 ac_cv_func_fseeko=no
9851 fi
9852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9853 fi
9854 echo "$as_me:9854: result: $ac_cv_func_fseeko" >&5
9855 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9856 if test $ac_cv_func_fseeko = yes; then
9857
9858 cat >>confdefs.h <<\EOF
9859 #define HAVE_FSEEKO 1
9860 EOF
9861
9862 fi
9863
9864         # Normally we would collect these definitions in the config.h,
9865         # but (like _XOPEN_SOURCE), some environments rely on having these
9866         # defined before any of the system headers are included.  Another
9867         # case comes up with C++, e.g., on AIX the compiler compiles the
9868         # header files by themselves before looking at the body files it is
9869         # told to compile.  For ncurses, those header files do not include
9870         # the config.h
9871         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9872         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9873         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9874
9875         echo "$as_me:9875: checking whether to use struct dirent64" >&5
9876 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9877 if test "${cf_cv_struct_dirent64+set}" = set; then
9878   echo $ECHO_N "(cached) $ECHO_C" >&6
9879 else
9880
9881                 cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884
9885 #include <sys/types.h>
9886 #include <dirent.h>
9887
9888 int
9889 main ()
9890 {
9891
9892                 /* if transitional largefile support is setup, this is true */
9893                 extern struct dirent64 * readdir(DIR *);
9894                 struct dirent64 *x = readdir((DIR *)0);
9895                 struct dirent *y = readdir((DIR *)0);
9896                 int z = x - y;
9897
9898   ;
9899   return 0;
9900 }
9901 _ACEOF
9902 rm -f conftest.$ac_objext
9903 if { (eval echo "$as_me:9903: \"$ac_compile\"") >&5
9904   (eval $ac_compile) 2>&5
9905   ac_status=$?
9906   echo "$as_me:9906: \$? = $ac_status" >&5
9907   (exit $ac_status); } &&
9908          { ac_try='test -s conftest.$ac_objext'
9909   { (eval echo "$as_me:9909: \"$ac_try\"") >&5
9910   (eval $ac_try) 2>&5
9911   ac_status=$?
9912   echo "$as_me:9912: \$? = $ac_status" >&5
9913   (exit $ac_status); }; }; then
9914   cf_cv_struct_dirent64=yes
9915 else
9916   echo "$as_me: failed program was:" >&5
9917 cat conftest.$ac_ext >&5
9918 cf_cv_struct_dirent64=no
9919 fi
9920 rm -f conftest.$ac_objext conftest.$ac_ext
9921
9922 fi
9923 echo "$as_me:9923: result: $cf_cv_struct_dirent64" >&5
9924 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9925         test "$cf_cv_struct_dirent64" = yes &&
9926 cat >>confdefs.h <<\EOF
9927 #define HAVE_STRUCT_DIRENT64 1
9928 EOF
9929
9930     fi
9931
9932 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9933 echo "$as_me:9933: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9934 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9935
9936 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9937 if test "${enable_tparm_varargs+set}" = set; then
9938   enableval="$enable_tparm_varargs"
9939   with_tparm_varargs=$enableval
9940 else
9941   with_tparm_varargs=yes
9942 fi;
9943 echo "$as_me:9943: result: $with_tparm_varargs" >&5
9944 echo "${ECHO_T}$with_tparm_varargs" >&6
9945 NCURSES_TPARM_VARARGS=0
9946 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9947
9948 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9949 if test "$with_ticlib" != no ; then
9950 echo "$as_me:9950: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9951 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9952
9953 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9954 if test "${enable_tic_depends+set}" = set; then
9955   enableval="$enable_tic_depends"
9956   with_tic_depends=$enableval
9957 else
9958   with_tic_depends=yes
9959 fi;
9960 echo "$as_me:9960: result: $with_tic_depends" >&5
9961 echo "${ECHO_T}$with_tic_depends" >&6
9962 else
9963         with_tic_depends=no
9964 fi
9965
9966 ###   use option --with-bool to override bool's type
9967 echo "$as_me:9967: checking for type of bool" >&5
9968 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9969
9970 # Check whether --with-bool or --without-bool was given.
9971 if test "${with_bool+set}" = set; then
9972   withval="$with_bool"
9973   NCURSES_BOOL="$withval"
9974 else
9975   NCURSES_BOOL=auto
9976 fi;
9977 echo "$as_me:9977: result: $NCURSES_BOOL" >&5
9978 echo "${ECHO_T}$NCURSES_BOOL" >&6
9979
9980 echo "$as_me:9980: checking for alternate terminal capabilities file" >&5
9981 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9982
9983 # Check whether --with-caps or --without-caps was given.
9984 if test "${with_caps+set}" = set; then
9985   withval="$with_caps"
9986   TERMINFO_CAPS=Caps.$withval
9987 else
9988   TERMINFO_CAPS=Caps
9989 fi;
9990 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9991 echo "$as_me:9991: result: $TERMINFO_CAPS" >&5
9992 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9993
9994 ###   use option --with-chtype to override chtype's type
9995 echo "$as_me:9995: checking for type of chtype" >&5
9996 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9997
9998 # Check whether --with-chtype or --without-chtype was given.
9999 if test "${with_chtype+set}" = set; then
10000   withval="$with_chtype"
10001   NCURSES_CHTYPE="$withval"
10002 else
10003   NCURSES_CHTYPE=auto
10004 fi;
10005 echo "$as_me:10005: result: $NCURSES_CHTYPE" >&5
10006 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10007
10008 ###   use option --with-ospeed to override ospeed's type
10009 echo "$as_me:10009: checking for type of ospeed" >&5
10010 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10011
10012 # Check whether --with-ospeed or --without-ospeed was given.
10013 if test "${with_ospeed+set}" = set; then
10014   withval="$with_ospeed"
10015   NCURSES_OSPEED="$withval"
10016 else
10017   NCURSES_OSPEED=short
10018 fi;
10019 echo "$as_me:10019: result: $NCURSES_OSPEED" >&5
10020 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10021
10022 ###   use option --with-mmask-t to override mmask_t's type
10023 echo "$as_me:10023: checking for type of mmask_t" >&5
10024 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10025
10026 # Check whether --with-mmask-t or --without-mmask-t was given.
10027 if test "${with_mmask_t+set}" = set; then
10028   withval="$with_mmask_t"
10029   NCURSES_MMASK_T="$withval"
10030 else
10031   NCURSES_MMASK_T=auto
10032 fi;
10033 echo "$as_me:10033: result: $NCURSES_MMASK_T" >&5
10034 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10035
10036 ###   use option --with-ccharw-max to override CCHARW_MAX size
10037 echo "$as_me:10037: checking for size CCHARW_MAX" >&5
10038 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10039
10040 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10041 if test "${with_ccharw_max+set}" = set; then
10042   withval="$with_ccharw_max"
10043   NCURSES_CCHARW_MAX="$withval"
10044 else
10045   NCURSES_CCHARW_MAX=5
10046 fi;
10047 echo "$as_me:10047: result: $NCURSES_CCHARW_MAX" >&5
10048 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10049
10050 ###   use option --with-tparm-arg to override tparm's argument type
10051 echo "$as_me:10051: checking for type of tparm args" >&5
10052 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10053
10054 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10055 if test "${with_tparm_arg+set}" = set; then
10056   withval="$with_tparm_arg"
10057   NCURSES_TPARM_ARG="$withval"
10058 else
10059   NCURSES_TPARM_ARG=long
10060 fi;
10061 echo "$as_me:10061: result: $NCURSES_TPARM_ARG" >&5
10062 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10063
10064 ### Enable compiling-in rcs id's
10065 echo "$as_me:10065: checking if RCS identifiers should be compiled-in" >&5
10066 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10067
10068 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10069 if test "${with_rcs_ids+set}" = set; then
10070   withval="$with_rcs_ids"
10071   with_rcs_ids=$withval
10072 else
10073   with_rcs_ids=no
10074 fi;
10075 echo "$as_me:10075: result: $with_rcs_ids" >&5
10076 echo "${ECHO_T}$with_rcs_ids" >&6
10077 test "x$with_rcs_ids" = xyes &&
10078 cat >>confdefs.h <<\EOF
10079 #define USE_RCS_IDS 1
10080 EOF
10081
10082 ###############################################################################
10083
10084 echo "$as_me:10084: checking format of man-pages" >&5
10085 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10086
10087 # Check whether --with-manpage-format or --without-manpage-format was given.
10088 if test "${with_manpage_format+set}" = set; then
10089   withval="$with_manpage_format"
10090   MANPAGE_FORMAT=$withval
10091 else
10092   MANPAGE_FORMAT=unknown
10093 fi;
10094
10095 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10096 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10097
10098 cf_unknown=
10099
10100 case $MANPAGE_FORMAT in
10101 unknown)
10102   if test -z "$MANPATH" ; then
10103     MANPATH="/usr/man:/usr/share/man"
10104   fi
10105
10106   # look for the 'date' man-page (it's most likely to be installed!)
10107   MANPAGE_FORMAT=
10108   cf_preform=no
10109   cf_catonly=yes
10110   cf_example=date
10111
10112   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10113   for cf_dir in $MANPATH; do
10114     test -z "$cf_dir" && cf_dir=/usr/man
10115     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
10116     do
10117       cf_test=`echo $cf_name | sed -e 's/*//'`
10118       if test "x$cf_test" = "x$cf_name" ; then
10119
10120         case "$cf_name" in
10121         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10122         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10123         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10124         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10125         esac
10126
10127         case "$cf_name" in
10128         $cf_dir/man*)
10129           cf_catonly=no
10130           ;;
10131         $cf_dir/cat*)
10132           cf_preform=yes
10133           ;;
10134         esac
10135         break
10136       fi
10137
10138       # if we found a match in either man* or cat*, stop looking
10139       if test -n "$MANPAGE_FORMAT" ; then
10140         cf_found=no
10141         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10142         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10143         case "$cf_name" in
10144         $cf_dir/cat*)
10145           cf_found=yes
10146           ;;
10147         esac
10148         test $cf_found=yes && break
10149       fi
10150     done
10151     # only check the first directory in $MANPATH where we find manpages
10152     if test -n "$MANPAGE_FORMAT" ; then
10153        break
10154     fi
10155   done
10156   # if we did not find the example, just assume it is normal
10157   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10158   IFS="$ac_save_ifs"
10159   ;;
10160 *)
10161   for cf_option in $MANPAGE_FORMAT; do
10162      case $cf_option in #(vi
10163      gzip|compress|BSDI|normal|formatted|catonly)
10164        ;;
10165      *)
10166        cf_unknown="$cf_unknown $cf_option"
10167        ;;
10168      esac
10169   done
10170   ;;
10171 esac
10172
10173 echo "$as_me:10173: result: $MANPAGE_FORMAT" >&5
10174 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10175 if test -n "$cf_unknown" ; then
10176   { echo "$as_me:10176: WARNING: Unexpected manpage-format $cf_unknown" >&5
10177 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10178 fi
10179
10180 echo "$as_me:10180: checking for manpage renaming" >&5
10181 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10182
10183 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10184 if test "${with_manpage_renames+set}" = set; then
10185   withval="$with_manpage_renames"
10186   MANPAGE_RENAMES=$withval
10187 else
10188   MANPAGE_RENAMES=yes
10189 fi;
10190
10191 case ".$MANPAGE_RENAMES" in #(vi
10192 .no) #(vi
10193   ;;
10194 .|.yes)
10195   # Debian 'man' program?
10196   if test -f /etc/debian_version ; then
10197     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10198   else
10199     MANPAGE_RENAMES=no
10200   fi
10201   ;;
10202 esac
10203
10204 if test "$MANPAGE_RENAMES" != no ; then
10205   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10206     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10207   elif test ! -f $MANPAGE_RENAMES ; then
10208     { { echo "$as_me:10208: error: not a filename: $MANPAGE_RENAMES" >&5
10209 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10210    { (exit 1); exit 1; }; }
10211   fi
10212
10213   test ! -d man && mkdir man
10214
10215   # Construct a sed-script to perform renaming within man-pages
10216   if test -n "$MANPAGE_RENAMES" ; then
10217     test ! -d man && mkdir man
10218     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10219   fi
10220 fi
10221
10222 echo "$as_me:10222: result: $MANPAGE_RENAMES" >&5
10223 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10224
10225 echo "$as_me:10225: checking if manpage aliases will be installed" >&5
10226 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10227
10228 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10229 if test "${with_manpage_aliases+set}" = set; then
10230   withval="$with_manpage_aliases"
10231   MANPAGE_ALIASES=$withval
10232 else
10233   MANPAGE_ALIASES=yes
10234 fi;
10235
10236 echo "$as_me:10236: result: $MANPAGE_ALIASES" >&5
10237 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10238
10239 case "x$LN_S" in #(vi
10240 xln*) #(vi
10241         cf_use_symlinks=yes
10242         ;;
10243 *)
10244         cf_use_symlinks=no
10245         ;;
10246 esac
10247
10248 MANPAGE_SYMLINKS=no
10249 if test "$MANPAGE_ALIASES" = yes ; then
10250 echo "$as_me:10250: checking if manpage symlinks should be used" >&5
10251 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10252
10253 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10254 if test "${with_manpage_symlinks+set}" = set; then
10255   withval="$with_manpage_symlinks"
10256   MANPAGE_SYMLINKS=$withval
10257 else
10258   MANPAGE_SYMLINKS=$cf_use_symlinks
10259 fi;
10260
10261 if test "$$cf_use_symlinks" = no; then
10262 if test "$MANPAGE_SYMLINKS" = yes ; then
10263         { echo "$as_me:10263: WARNING: cannot make symlinks" >&5
10264 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10265         MANPAGE_SYMLINKS=no
10266 fi
10267 fi
10268
10269 echo "$as_me:10269: result: $MANPAGE_SYMLINKS" >&5
10270 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10271 fi
10272
10273 echo "$as_me:10273: checking for manpage tbl" >&5
10274 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10275
10276 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10277 if test "${with_manpage_tbl+set}" = set; then
10278   withval="$with_manpage_tbl"
10279   MANPAGE_TBL=$withval
10280 else
10281   MANPAGE_TBL=no
10282 fi;
10283
10284 echo "$as_me:10284: result: $MANPAGE_TBL" >&5
10285 echo "${ECHO_T}$MANPAGE_TBL" >&6
10286
10287   if test "$prefix" = "NONE" ; then
10288      cf_prefix="$ac_default_prefix"
10289   else
10290      cf_prefix="$prefix"
10291   fi
10292
10293   case "$MANPAGE_FORMAT" in # (vi
10294   *catonly*) # (vi
10295     cf_format=yes
10296     cf_inboth=no
10297     ;;
10298   *formatted*) # (vi
10299     cf_format=yes
10300     cf_inboth=yes
10301     ;;
10302   *)
10303     cf_format=no
10304     cf_inboth=no
10305     ;;
10306   esac
10307
10308 test ! -d man && mkdir man
10309
10310 cf_so_strip=
10311 cf_compress=
10312 case "$MANPAGE_FORMAT" in #(vi
10313 *compress*) #(vi
10314         cf_so_strip="Z"
10315         cf_compress=compress
10316   ;;
10317 *gzip*)
10318         cf_so_strip="gz"
10319         cf_compress=gzip
10320   ;;
10321 esac
10322
10323 cf_edit_man=./edit_man.sh
10324 cf_man_alias=`pwd`/man_alias.sed
10325
10326 cat >$cf_edit_man <<CF_EOF
10327 #! /bin/sh
10328 # this script is generated by the configure-script CF_MAN_PAGES macro.
10329
10330 prefix="$cf_prefix"
10331 datarootdir="$datarootdir"
10332 datadir="$datadir"
10333
10334 NCURSES_MAJOR="$NCURSES_MAJOR"
10335 NCURSES_MINOR="$NCURSES_MINOR"
10336 NCURSES_PATCH="$NCURSES_PATCH"
10337
10338 NCURSES_OSPEED="$NCURSES_OSPEED"
10339 TERMINFO="$TERMINFO"
10340
10341 INSTALL="$INSTALL"
10342 INSTALL_DATA="$INSTALL_DATA"
10343
10344 transform="$program_transform_name"
10345
10346 TMP=\${TMPDIR:=/tmp}/man\$\$
10347 trap "rm -f \$TMP" 0 1 2 5 15
10348
10349 form=\$1
10350 shift || exit 1
10351
10352 verb=\$1
10353 shift || exit 1
10354
10355 mandir=\$1
10356 shift || exit 1
10357
10358 srcdir=\$1
10359 top_srcdir=\$srcdir/..
10360 shift || exit 1
10361
10362 if test "\$form" = normal ; then
10363         if test "$cf_format" = yes ; then
10364         if test "$cf_inboth" = no ; then
10365                 sh \$0 format \$verb \$mandir \$srcdir \$*
10366                 exit $?
10367         fi
10368         fi
10369         cf_subdir=\$mandir/man
10370         cf_tables=$MANPAGE_TBL
10371 else
10372         cf_subdir=\$mandir/cat
10373         cf_tables=yes
10374 fi
10375
10376 # process the list of source-files
10377 for i in \$* ; do
10378 case \$i in #(vi
10379 *.orig|*.rej) ;; #(vi
10380 *.[0-9]*)
10381         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10382         if test \$verb = installing ; then
10383         if test ! -d \$cf_subdir\${section} ; then
10384                 mkdir -p \$cf_subdir\$section
10385         fi
10386         fi
10387
10388         # replace variables in man page
10389         if test ! -f $cf_man_alias ; then
10390 cat >>$cf_man_alias <<-CF_EOF2
10391                 s,@DATADIR@,\$datadir,g
10392                 s,@TERMINFO@,\$TERMINFO,g
10393                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10394                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10395                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10396                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10397 CF_EOF
10398
10399         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10400         do
10401                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10402                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10403 cat >>$cf_edit_man <<-CF_EOF
10404                 s,@$cf_NAME@,$cf_name,g
10405 CF_EOF
10406         done
10407
10408 cat >>$cf_edit_man <<CF_EOF
10409 CF_EOF2
10410                 echo "...made $cf_man_alias"
10411         fi
10412
10413         aliases=
10414         cf_source=\`basename \$i\`
10415         inalias=\$cf_source
10416         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10417         if test ! -f \$inalias ; then
10418                 echo .. skipped \$cf_source
10419                 continue
10420         fi
10421 CF_EOF
10422
10423 if test "$MANPAGE_ALIASES" != no ; then
10424 cat >>$cf_edit_man <<CF_EOF
10425         nCurses=ignore.3x
10426         test $with_curses_h = yes && nCurses=ncurses.3x
10427         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10428 CF_EOF
10429 fi
10430
10431 if test "$MANPAGE_RENAMES" = no ; then
10432 cat >>$cf_edit_man <<CF_EOF
10433         # perform program transformations for section 1 man pages
10434         if test \$section = 1 ; then
10435                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10436         else
10437                 cf_target=\$cf_subdir\${section}/\$cf_source
10438         fi
10439 CF_EOF
10440 else
10441 cat >>$cf_edit_man <<CF_EOF
10442         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10443         if test -z "\$cf_target" ; then
10444                 echo '? missing rename for '\$cf_source
10445                 cf_target="\$cf_source"
10446         fi
10447         cf_target="\$cf_subdir\${section}/\${cf_target}"
10448
10449 CF_EOF
10450 fi
10451
10452 cat >>$cf_edit_man <<CF_EOF
10453         sed     -f $cf_man_alias \\
10454 CF_EOF
10455
10456 if test -f $MANPAGE_RENAMES ; then
10457 cat >>$cf_edit_man <<CF_EOF
10458                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10459 CF_EOF
10460 else
10461 cat >>$cf_edit_man <<CF_EOF
10462                 < \$i >\$TMP
10463 CF_EOF
10464 fi
10465
10466 cat >>$cf_edit_man <<CF_EOF
10467 if test \$cf_tables = yes ; then
10468         tbl \$TMP >\$TMP.out
10469         mv \$TMP.out \$TMP
10470 fi
10471 CF_EOF
10472
10473 if test $with_overwrite != yes ; then
10474 cat >>$cf_edit_man <<CF_EOF
10475         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10476         mv \$TMP.out \$TMP
10477 CF_EOF
10478 fi
10479
10480 if test $with_curses_h != yes ; then
10481 cat >>$cf_edit_man <<CF_EOF
10482         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10483         mv \$TMP.out \$TMP
10484 CF_EOF
10485 fi
10486
10487 cat >>$cf_edit_man <<CF_EOF
10488         if test \$form = format ; then
10489                 nroff -man \$TMP >\$TMP.out
10490                 mv \$TMP.out \$TMP
10491         fi
10492 CF_EOF
10493
10494 if test -n "$cf_compress" ; then
10495 cat >>$cf_edit_man <<CF_EOF
10496         if test \$verb = installing ; then
10497         if ( $cf_compress -f \$TMP )
10498         then
10499                 mv \$TMP.$cf_so_strip \$TMP
10500         fi
10501         fi
10502         cf_target="\$cf_target.$cf_so_strip"
10503 CF_EOF
10504 fi
10505
10506 case "$MANPAGE_FORMAT" in #(vi
10507 *BSDI*)
10508 cat >>$cf_edit_man <<CF_EOF
10509         if test \$form = format ; then
10510                 # BSDI installs only .0 suffixes in the cat directories
10511                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10512         fi
10513 CF_EOF
10514   ;;
10515 esac
10516
10517 cat >>$cf_edit_man <<CF_EOF
10518         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10519         if test \$verb = installing ; then
10520                 echo \$verb \$cf_target
10521                 \$INSTALL_DATA \$TMP \$cf_target
10522                 test -d \$cf_subdir\${section} &&
10523                 test -n "\$aliases" && (
10524                         cd \$cf_subdir\${section} && (
10525                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10526                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10527                                 cf_target=\`basename \$cf_target\`
10528                                 for cf_alias in \$aliases
10529                                 do
10530                                         if test \$section = 1 ; then
10531                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10532                                         fi
10533
10534                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10535                                                 if test -f \$cf_alias\${suffix} ; then
10536                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10537                                                         then
10538                                                                 continue
10539                                                         fi
10540                                                 fi
10541                                                 echo .. \$verb alias \$cf_alias\${suffix}
10542 CF_EOF
10543 case "x$LN_S" in #(vi
10544 *-f) #(vi
10545 cat >>$cf_edit_man <<CF_EOF
10546                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10547 CF_EOF
10548         ;;
10549 *)
10550 cat >>$cf_edit_man <<CF_EOF
10551                                                 rm -f \$cf_alias\${suffix}
10552                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10553 CF_EOF
10554         ;;
10555 esac
10556 cat >>$cf_edit_man <<CF_EOF
10557                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10558                                                 echo ".so \$cf_source" >\$TMP
10559 CF_EOF
10560 if test -n "$cf_compress" ; then
10561 cat >>$cf_edit_man <<CF_EOF
10562                                                 if test -n "$cf_so_strip" ; then
10563                                                         $cf_compress -f \$TMP
10564                                                         mv \$TMP.$cf_so_strip \$TMP
10565                                                 fi
10566 CF_EOF
10567 fi
10568 cat >>$cf_edit_man <<CF_EOF
10569                                                 echo .. \$verb alias \$cf_alias\${suffix}
10570                                                 rm -f \$cf_alias\${suffix}
10571                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10572                                         fi
10573                                 done
10574                         )
10575                 )
10576         elif test \$verb = removing ; then
10577                 test -f \$cf_target && (
10578                         echo \$verb \$cf_target
10579                         rm -f \$cf_target
10580                 )
10581                 test -d \$cf_subdir\${section} &&
10582                 test -n "\$aliases" && (
10583                         cd \$cf_subdir\${section} && (
10584                                 for cf_alias in \$aliases
10585                                 do
10586                                         if test \$section = 1 ; then
10587                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10588                                         fi
10589
10590                                         echo .. \$verb alias \$cf_alias\${suffix}
10591                                         rm -f \$cf_alias\${suffix}
10592                                 done
10593                         )
10594                 )
10595         else
10596 #               echo ".hy 0"
10597                 cat \$TMP
10598         fi
10599         ;;
10600 esac
10601 done
10602
10603 if test $cf_inboth = yes ; then
10604 if test \$form != format ; then
10605         sh \$0 format \$verb \$mandir \$srcdir \$*
10606 fi
10607 fi
10608
10609 exit 0
10610 CF_EOF
10611 chmod 755 $cf_edit_man
10612
10613 ###############################################################################
10614
10615 ### Note that some functions (such as const) are normally disabled anyway.
10616 echo "$as_me:10616: checking if you want to build with function extensions" >&5
10617 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10618
10619 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10620 if test "${enable_ext_funcs+set}" = set; then
10621   enableval="$enable_ext_funcs"
10622   with_ext_funcs=$enableval
10623 else
10624   with_ext_funcs=yes
10625 fi;
10626 echo "$as_me:10626: result: $with_ext_funcs" >&5
10627 echo "${ECHO_T}$with_ext_funcs" >&6
10628 if test "x$with_ext_funcs" = xyes ; then
10629         NCURSES_EXT_FUNCS=1
10630
10631 cat >>confdefs.h <<\EOF
10632 #define HAVE_ASSUME_DEFAULT_COLORS 1
10633 EOF
10634
10635 cat >>confdefs.h <<\EOF
10636 #define HAVE_CURSES_VERSION 1
10637 EOF
10638
10639 cat >>confdefs.h <<\EOF
10640 #define HAVE_HAS_KEY 1
10641 EOF
10642
10643 cat >>confdefs.h <<\EOF
10644 #define HAVE_RESIZETERM 1
10645 EOF
10646
10647 cat >>confdefs.h <<\EOF
10648 #define HAVE_RESIZE_TERM 1
10649 EOF
10650
10651 cat >>confdefs.h <<\EOF
10652 #define HAVE_TERM_ENTRY_H 1
10653 EOF
10654
10655 cat >>confdefs.h <<\EOF
10656 #define HAVE_USE_DEFAULT_COLORS 1
10657 EOF
10658
10659 cat >>confdefs.h <<\EOF
10660 #define HAVE_USE_SCREEN 1
10661 EOF
10662
10663 cat >>confdefs.h <<\EOF
10664 #define HAVE_USE_WINDOW 1
10665 EOF
10666
10667 cat >>confdefs.h <<\EOF
10668 #define HAVE_WRESIZE 1
10669 EOF
10670
10671 cat >>confdefs.h <<\EOF
10672 #define NCURSES_EXT_FUNCS 1
10673 EOF
10674
10675         GENERATED_EXT_FUNCS=generated
10676 else
10677         NCURSES_EXT_FUNCS=0
10678         GENERATED_EXT_FUNCS=
10679 fi
10680
10681 echo "$as_me:10681: checking if you want to build with experimental SCREEN extensions" >&5
10682 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10683
10684 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10685 if test "${enable_sp_funcs+set}" = set; then
10686   enableval="$enable_sp_funcs"
10687   with_sp_funcs=$enableval
10688 else
10689   with_sp_funcs=no
10690 fi;
10691 echo "$as_me:10691: result: $with_sp_funcs" >&5
10692 echo "${ECHO_T}$with_sp_funcs" >&6
10693 if test "x$with_sp_funcs" = xyes ; then
10694         NCURSES_SP_FUNCS=1
10695
10696 cat >>confdefs.h <<\EOF
10697 #define NCURSES_SP_FUNCS 1
10698 EOF
10699
10700         GENERATED_SP_FUNCS=generated
10701 else
10702         NCURSES_SP_FUNCS=0
10703         GENERATED_SP_FUNCS=
10704 fi
10705
10706 echo "$as_me:10706: checking if you want to build with experimental terminal-driver" >&5
10707 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10708
10709 # Check whether --enable-term-driver or --disable-term-driver was given.
10710 if test "${enable_term_driver+set}" = set; then
10711   enableval="$enable_term_driver"
10712   with_term_driver=$enableval
10713 else
10714   with_term_driver=no
10715 fi;
10716 echo "$as_me:10716: result: $with_term_driver" >&5
10717 echo "${ECHO_T}$with_term_driver" >&6
10718 if test "x$with_term_driver" = xyes ; then
10719
10720 cat >>confdefs.h <<\EOF
10721 #define USE_TERM_DRIVER 1
10722 EOF
10723
10724         if test "x$with_sp_funcs" != xyes ; then
10725                 { { echo "$as_me:10725: error: The term-driver option relies upon sp-funcs" >&5
10726 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10727    { (exit 1); exit 1; }; }
10728         fi
10729 fi
10730
10731 ###   use option --enable-const to turn on use of const beyond that in XSI.
10732 echo "$as_me:10732: checking for extended use of const keyword" >&5
10733 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10734
10735 # Check whether --enable-const or --disable-const was given.
10736 if test "${enable_const+set}" = set; then
10737   enableval="$enable_const"
10738   with_ext_const=$enableval
10739 else
10740   with_ext_const=no
10741 fi;
10742 echo "$as_me:10742: result: $with_ext_const" >&5
10743 echo "${ECHO_T}$with_ext_const" >&6
10744 NCURSES_CONST='/*nothing*/'
10745 if test "x$with_ext_const" = xyes ; then
10746         NCURSES_CONST=const
10747 fi
10748
10749 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10750 echo "$as_me:10750: checking if you want to use extended colors" >&5
10751 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10752
10753 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10754 if test "${enable_ext_colors+set}" = set; then
10755   enableval="$enable_ext_colors"
10756   with_ext_colors=$enableval
10757 else
10758   with_ext_colors=no
10759 fi;
10760 echo "$as_me:10760: result: $with_ext_colors" >&5
10761 echo "${ECHO_T}$with_ext_colors" >&6
10762 NCURSES_EXT_COLORS=0
10763 if test "x$with_ext_colors" = xyes ; then
10764         if test "x$with_widec" != xyes ; then
10765                 { { echo "$as_me:10765: error: This option applies only to wide-character library" >&5
10766 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10767    { (exit 1); exit 1; }; }
10768         else
10769                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10770
10771 if test "${with_abi_version+set}" != set; then
10772         case $cf_cv_rel_version in
10773         5.*)
10774                 cf_cv_rel_version=6.0
10775                 cf_cv_abi_version=6
10776                 { echo "$as_me:10776: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10777 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10778                 ;;
10779         esac
10780 fi
10781
10782         fi
10783         NCURSES_EXT_COLORS=1
10784
10785 cat >>confdefs.h <<\EOF
10786 #define NCURSES_EXT_COLORS 1
10787 EOF
10788
10789 fi
10790
10791 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10792 echo "$as_me:10792: checking if you want to use extended mouse encoding" >&5
10793 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10794
10795 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10796 if test "${enable_ext_mouse+set}" = set; then
10797   enableval="$enable_ext_mouse"
10798   with_ext_mouse=$enableval
10799 else
10800   with_ext_mouse=no
10801 fi;
10802 echo "$as_me:10802: result: $with_ext_mouse" >&5
10803 echo "${ECHO_T}$with_ext_mouse" >&6
10804 NCURSES_MOUSE_VERSION=1
10805 if test "x$with_ext_mouse" = xyes ; then
10806         NCURSES_MOUSE_VERSION=2
10807
10808 if test "${with_abi_version+set}" != set; then
10809         case $cf_cv_rel_version in
10810         5.*)
10811                 cf_cv_rel_version=6.0
10812                 cf_cv_abi_version=6
10813                 { echo "$as_me:10813: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10814 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10815                 ;;
10816         esac
10817 fi
10818
10819 fi
10820
10821 echo "$as_me:10821: checking if you want \$NCURSES_NO_PADDING code" >&5
10822 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10823
10824 # Check whether --enable-no-padding or --disable-no-padding was given.
10825 if test "${enable_no_padding+set}" = set; then
10826   enableval="$enable_no_padding"
10827   with_no_padding=$enableval
10828 else
10829   with_no_padding=$with_ext_funcs
10830 fi;
10831 echo "$as_me:10831: result: $with_no_padding" >&5
10832 echo "${ECHO_T}$with_no_padding" >&6
10833 test "x$with_no_padding" = xyes &&
10834 cat >>confdefs.h <<\EOF
10835 #define NCURSES_NO_PADDING 1
10836 EOF
10837
10838 echo "$as_me:10838: checking for ANSI C header files" >&5
10839 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10840 if test "${ac_cv_header_stdc+set}" = set; then
10841   echo $ECHO_N "(cached) $ECHO_C" >&6
10842 else
10843   cat >conftest.$ac_ext <<_ACEOF
10844 #line 10844 "configure"
10845 #include "confdefs.h"
10846 #include <stdlib.h>
10847 #include <stdarg.h>
10848 #include <string.h>
10849 #include <float.h>
10850
10851 _ACEOF
10852 if { (eval echo "$as_me:10852: \"$ac_cpp conftest.$ac_ext\"") >&5
10853   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10854   ac_status=$?
10855   egrep -v '^ *\+' conftest.er1 >conftest.err
10856   rm -f conftest.er1
10857   cat conftest.err >&5
10858   echo "$as_me:10858: \$? = $ac_status" >&5
10859   (exit $ac_status); } >/dev/null; then
10860   if test -s conftest.err; then
10861     ac_cpp_err=$ac_c_preproc_warn_flag
10862   else
10863     ac_cpp_err=
10864   fi
10865 else
10866   ac_cpp_err=yes
10867 fi
10868 if test -z "$ac_cpp_err"; then
10869   ac_cv_header_stdc=yes
10870 else
10871   echo "$as_me: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   ac_cv_header_stdc=no
10874 fi
10875 rm -f conftest.err conftest.$ac_ext
10876
10877 if test $ac_cv_header_stdc = yes; then
10878   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10879   cat >conftest.$ac_ext <<_ACEOF
10880 #line 10880 "configure"
10881 #include "confdefs.h"
10882 #include <string.h>
10883
10884 _ACEOF
10885 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10886   egrep "memchr" >/dev/null 2>&1; then
10887   :
10888 else
10889   ac_cv_header_stdc=no
10890 fi
10891 rm -rf conftest*
10892
10893 fi
10894
10895 if test $ac_cv_header_stdc = yes; then
10896   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10897   cat >conftest.$ac_ext <<_ACEOF
10898 #line 10898 "configure"
10899 #include "confdefs.h"
10900 #include <stdlib.h>
10901
10902 _ACEOF
10903 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10904   egrep "free" >/dev/null 2>&1; then
10905   :
10906 else
10907   ac_cv_header_stdc=no
10908 fi
10909 rm -rf conftest*
10910
10911 fi
10912
10913 if test $ac_cv_header_stdc = yes; then
10914   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10915   if test "$cross_compiling" = yes; then
10916   :
10917 else
10918   cat >conftest.$ac_ext <<_ACEOF
10919 #line 10919 "configure"
10920 #include "confdefs.h"
10921 #include <ctype.h>
10922 #if ((' ' & 0x0FF) == 0x020)
10923 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10924 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10925 #else
10926 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10927                      || ('j' <= (c) && (c) <= 'r') \
10928                      || ('s' <= (c) && (c) <= 'z'))
10929 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10930 #endif
10931
10932 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10933 int
10934 main ()
10935 {
10936   int i;
10937   for (i = 0; i < 256; i++)
10938     if (XOR (islower (i), ISLOWER (i))
10939         || toupper (i) != TOUPPER (i))
10940       $ac_main_return(2);
10941   $ac_main_return (0);
10942 }
10943 _ACEOF
10944 rm -f conftest$ac_exeext
10945 if { (eval echo "$as_me:10945: \"$ac_link\"") >&5
10946   (eval $ac_link) 2>&5
10947   ac_status=$?
10948   echo "$as_me:10948: \$? = $ac_status" >&5
10949   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10950   { (eval echo "$as_me:10950: \"$ac_try\"") >&5
10951   (eval $ac_try) 2>&5
10952   ac_status=$?
10953   echo "$as_me:10953: \$? = $ac_status" >&5
10954   (exit $ac_status); }; }; then
10955   :
10956 else
10957   echo "$as_me: program exited with status $ac_status" >&5
10958 echo "$as_me: failed program was:" >&5
10959 cat conftest.$ac_ext >&5
10960 ac_cv_header_stdc=no
10961 fi
10962 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10963 fi
10964 fi
10965 fi
10966 echo "$as_me:10966: result: $ac_cv_header_stdc" >&5
10967 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10968 if test $ac_cv_header_stdc = yes; then
10969
10970 cat >>confdefs.h <<\EOF
10971 #define STDC_HEADERS 1
10972 EOF
10973
10974 fi
10975
10976 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10977
10978 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10979                   inttypes.h stdint.h unistd.h
10980 do
10981 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10982 echo "$as_me:10982: checking for $ac_header" >&5
10983 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10984 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10985   echo $ECHO_N "(cached) $ECHO_C" >&6
10986 else
10987   cat >conftest.$ac_ext <<_ACEOF
10988 #line 10988 "configure"
10989 #include "confdefs.h"
10990 $ac_includes_default
10991 #include <$ac_header>
10992 _ACEOF
10993 rm -f conftest.$ac_objext
10994 if { (eval echo "$as_me:10994: \"$ac_compile\"") >&5
10995   (eval $ac_compile) 2>&5
10996   ac_status=$?
10997   echo "$as_me:10997: \$? = $ac_status" >&5
10998   (exit $ac_status); } &&
10999          { ac_try='test -s conftest.$ac_objext'
11000   { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001   (eval $ac_try) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); }; }; then
11005   eval "$as_ac_Header=yes"
11006 else
11007   echo "$as_me: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 eval "$as_ac_Header=no"
11010 fi
11011 rm -f conftest.$ac_objext conftest.$ac_ext
11012 fi
11013 echo "$as_me:11013: result: `eval echo '${'$as_ac_Header'}'`" >&5
11014 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11015 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11016   cat >>confdefs.h <<EOF
11017 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11018 EOF
11019
11020 fi
11021 done
11022
11023 echo "$as_me:11023: checking for signed char" >&5
11024 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11025 if test "${ac_cv_type_signed_char+set}" = set; then
11026   echo $ECHO_N "(cached) $ECHO_C" >&6
11027 else
11028   cat >conftest.$ac_ext <<_ACEOF
11029 #line 11029 "configure"
11030 #include "confdefs.h"
11031 $ac_includes_default
11032 int
11033 main ()
11034 {
11035 if ((signed char *) 0)
11036   return 0;
11037 if (sizeof (signed char))
11038   return 0;
11039   ;
11040   return 0;
11041 }
11042 _ACEOF
11043 rm -f conftest.$ac_objext
11044 if { (eval echo "$as_me:11044: \"$ac_compile\"") >&5
11045   (eval $ac_compile) 2>&5
11046   ac_status=$?
11047   echo "$as_me:11047: \$? = $ac_status" >&5
11048   (exit $ac_status); } &&
11049          { ac_try='test -s conftest.$ac_objext'
11050   { (eval echo "$as_me:11050: \"$ac_try\"") >&5
11051   (eval $ac_try) 2>&5
11052   ac_status=$?
11053   echo "$as_me:11053: \$? = $ac_status" >&5
11054   (exit $ac_status); }; }; then
11055   ac_cv_type_signed_char=yes
11056 else
11057   echo "$as_me: failed program was:" >&5
11058 cat conftest.$ac_ext >&5
11059 ac_cv_type_signed_char=no
11060 fi
11061 rm -f conftest.$ac_objext conftest.$ac_ext
11062 fi
11063 echo "$as_me:11063: result: $ac_cv_type_signed_char" >&5
11064 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11065
11066 echo "$as_me:11066: checking size of signed char" >&5
11067 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11068 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11069   echo $ECHO_N "(cached) $ECHO_C" >&6
11070 else
11071   if test "$ac_cv_type_signed_char" = yes; then
11072   if test "$cross_compiling" = yes; then
11073   # Depending upon the size, compute the lo and hi bounds.
11074 cat >conftest.$ac_ext <<_ACEOF
11075 #line 11075 "configure"
11076 #include "confdefs.h"
11077 $ac_includes_default
11078 int
11079 main ()
11080 {
11081 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11082   ;
11083   return 0;
11084 }
11085 _ACEOF
11086 rm -f conftest.$ac_objext
11087 if { (eval echo "$as_me:11087: \"$ac_compile\"") >&5
11088   (eval $ac_compile) 2>&5
11089   ac_status=$?
11090   echo "$as_me:11090: \$? = $ac_status" >&5
11091   (exit $ac_status); } &&
11092          { ac_try='test -s conftest.$ac_objext'
11093   { (eval echo "$as_me:11093: \"$ac_try\"") >&5
11094   (eval $ac_try) 2>&5
11095   ac_status=$?
11096   echo "$as_me:11096: \$? = $ac_status" >&5
11097   (exit $ac_status); }; }; then
11098   ac_lo=0 ac_mid=0
11099   while :; do
11100     cat >conftest.$ac_ext <<_ACEOF
11101 #line 11101 "configure"
11102 #include "confdefs.h"
11103 $ac_includes_default
11104 int
11105 main ()
11106 {
11107 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11108   ;
11109   return 0;
11110 }
11111 _ACEOF
11112 rm -f conftest.$ac_objext
11113 if { (eval echo "$as_me:11113: \"$ac_compile\"") >&5
11114   (eval $ac_compile) 2>&5
11115   ac_status=$?
11116   echo "$as_me:11116: \$? = $ac_status" >&5
11117   (exit $ac_status); } &&
11118          { ac_try='test -s conftest.$ac_objext'
11119   { (eval echo "$as_me:11119: \"$ac_try\"") >&5
11120   (eval $ac_try) 2>&5
11121   ac_status=$?
11122   echo "$as_me:11122: \$? = $ac_status" >&5
11123   (exit $ac_status); }; }; then
11124   ac_hi=$ac_mid; break
11125 else
11126   echo "$as_me: failed program was:" >&5
11127 cat conftest.$ac_ext >&5
11128 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11129 fi
11130 rm -f conftest.$ac_objext conftest.$ac_ext
11131   done
11132 else
11133   echo "$as_me: failed program was:" >&5
11134 cat conftest.$ac_ext >&5
11135 ac_hi=-1 ac_mid=-1
11136   while :; do
11137     cat >conftest.$ac_ext <<_ACEOF
11138 #line 11138 "configure"
11139 #include "confdefs.h"
11140 $ac_includes_default
11141 int
11142 main ()
11143 {
11144 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11145   ;
11146   return 0;
11147 }
11148 _ACEOF
11149 rm -f conftest.$ac_objext
11150 if { (eval echo "$as_me:11150: \"$ac_compile\"") >&5
11151   (eval $ac_compile) 2>&5
11152   ac_status=$?
11153   echo "$as_me:11153: \$? = $ac_status" >&5
11154   (exit $ac_status); } &&
11155          { ac_try='test -s conftest.$ac_objext'
11156   { (eval echo "$as_me:11156: \"$ac_try\"") >&5
11157   (eval $ac_try) 2>&5
11158   ac_status=$?
11159   echo "$as_me:11159: \$? = $ac_status" >&5
11160   (exit $ac_status); }; }; then
11161   ac_lo=$ac_mid; break
11162 else
11163   echo "$as_me: failed program was:" >&5
11164 cat conftest.$ac_ext >&5
11165 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11166 fi
11167 rm -f conftest.$ac_objext conftest.$ac_ext
11168   done
11169 fi
11170 rm -f conftest.$ac_objext conftest.$ac_ext
11171 # Binary search between lo and hi bounds.
11172 while test "x$ac_lo" != "x$ac_hi"; do
11173   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11174   cat >conftest.$ac_ext <<_ACEOF
11175 #line 11175 "configure"
11176 #include "confdefs.h"
11177 $ac_includes_default
11178 int
11179 main ()
11180 {
11181 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11182   ;
11183   return 0;
11184 }
11185 _ACEOF
11186 rm -f conftest.$ac_objext
11187 if { (eval echo "$as_me:11187: \"$ac_compile\"") >&5
11188   (eval $ac_compile) 2>&5
11189   ac_status=$?
11190   echo "$as_me:11190: \$? = $ac_status" >&5
11191   (exit $ac_status); } &&
11192          { ac_try='test -s conftest.$ac_objext'
11193   { (eval echo "$as_me:11193: \"$ac_try\"") >&5
11194   (eval $ac_try) 2>&5
11195   ac_status=$?
11196   echo "$as_me:11196: \$? = $ac_status" >&5
11197   (exit $ac_status); }; }; then
11198   ac_hi=$ac_mid
11199 else
11200   echo "$as_me: failed program was:" >&5
11201 cat conftest.$ac_ext >&5
11202 ac_lo=`expr $ac_mid + 1`
11203 fi
11204 rm -f conftest.$ac_objext conftest.$ac_ext
11205 done
11206 ac_cv_sizeof_signed_char=$ac_lo
11207 else
11208   if test "$cross_compiling" = yes; then
11209   { { echo "$as_me:11209: error: cannot run test program while cross compiling" >&5
11210 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11211    { (exit 1); exit 1; }; }
11212 else
11213   cat >conftest.$ac_ext <<_ACEOF
11214 #line 11214 "configure"
11215 #include "confdefs.h"
11216 $ac_includes_default
11217 int
11218 main ()
11219 {
11220 FILE *f = fopen ("conftest.val", "w");
11221 if (!f)
11222   $ac_main_return (1);
11223 fprintf (f, "%d", (sizeof (signed char)));
11224 fclose (f);
11225   ;
11226   return 0;
11227 }
11228 _ACEOF
11229 rm -f conftest$ac_exeext
11230 if { (eval echo "$as_me:11230: \"$ac_link\"") >&5
11231   (eval $ac_link) 2>&5
11232   ac_status=$?
11233   echo "$as_me:11233: \$? = $ac_status" >&5
11234   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11235   { (eval echo "$as_me:11235: \"$ac_try\"") >&5
11236   (eval $ac_try) 2>&5
11237   ac_status=$?
11238   echo "$as_me:11238: \$? = $ac_status" >&5
11239   (exit $ac_status); }; }; then
11240   ac_cv_sizeof_signed_char=`cat conftest.val`
11241 else
11242   echo "$as_me: program exited with status $ac_status" >&5
11243 echo "$as_me: failed program was:" >&5
11244 cat conftest.$ac_ext >&5
11245 fi
11246 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11247 fi
11248 fi
11249 rm -f conftest.val
11250 else
11251   ac_cv_sizeof_signed_char=0
11252 fi
11253 fi
11254 echo "$as_me:11254: result: $ac_cv_sizeof_signed_char" >&5
11255 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11256 cat >>confdefs.h <<EOF
11257 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11258 EOF
11259
11260 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11261         NCURSES_SBOOL="signed char"
11262 else
11263         NCURSES_SBOOL="char"
11264 fi
11265 echo "$as_me:11265: checking if you want to use signed Boolean array in term.h" >&5
11266 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11267
11268 # Check whether --enable-signed-char or --disable-signed-char was given.
11269 if test "${enable_signed_char+set}" = set; then
11270   enableval="$enable_signed_char"
11271   with_signed_char=$enableval
11272 else
11273   with_signed_char=no
11274 fi;
11275 echo "$as_me:11275: result: $with_signed_char" >&5
11276 echo "${ECHO_T}$with_signed_char" >&6
11277 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11278
11279 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11280 echo "$as_me:11280: checking if you want SIGWINCH handler" >&5
11281 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11282
11283 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11284 if test "${enable_sigwinch+set}" = set; then
11285   enableval="$enable_sigwinch"
11286   with_sigwinch=$enableval
11287 else
11288   with_sigwinch=$with_ext_funcs
11289 fi;
11290 echo "$as_me:11290: result: $with_sigwinch" >&5
11291 echo "${ECHO_T}$with_sigwinch" >&6
11292 test "x$with_sigwinch" = xyes &&
11293 cat >>confdefs.h <<\EOF
11294 #define USE_SIGWINCH 1
11295 EOF
11296
11297 ###   use option --enable-tcap-names to allow user to define new capabilities
11298 echo "$as_me:11298: checking if you want user-definable terminal capabilities like termcap" >&5
11299 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11300
11301 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11302 if test "${enable_tcap_names+set}" = set; then
11303   enableval="$enable_tcap_names"
11304   with_tcap_names=$enableval
11305 else
11306   with_tcap_names=$with_ext_funcs
11307 fi;
11308 echo "$as_me:11308: result: $with_tcap_names" >&5
11309 echo "${ECHO_T}$with_tcap_names" >&6
11310 NCURSES_XNAMES=0
11311 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11312
11313 ###############################################################################
11314 # These options are relatively safe to experiment with.
11315
11316 echo "$as_me:11316: checking if you want all development code" >&5
11317 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11318
11319 # Check whether --with-develop or --without-develop was given.
11320 if test "${with_develop+set}" = set; then
11321   withval="$with_develop"
11322   with_develop=$withval
11323 else
11324   with_develop=no
11325 fi;
11326 echo "$as_me:11326: result: $with_develop" >&5
11327 echo "${ECHO_T}$with_develop" >&6
11328
11329 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11330 echo "$as_me:11330: checking if you want hard-tabs code" >&5
11331 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11332
11333 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11334 if test "${enable_hard_tabs+set}" = set; then
11335   enableval="$enable_hard_tabs"
11336
11337 else
11338   enable_hard_tabs=$with_develop
11339 fi;
11340 echo "$as_me:11340: result: $enable_hard_tabs" >&5
11341 echo "${ECHO_T}$enable_hard_tabs" >&6
11342 test "x$enable_hard_tabs" = xyes &&
11343 cat >>confdefs.h <<\EOF
11344 #define USE_HARD_TABS 1
11345 EOF
11346
11347 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11348 echo "$as_me:11348: checking if you want limited support for xmc" >&5
11349 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11350
11351 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11352 if test "${enable_xmc_glitch+set}" = set; then
11353   enableval="$enable_xmc_glitch"
11354
11355 else
11356   enable_xmc_glitch=$with_develop
11357 fi;
11358 echo "$as_me:11358: result: $enable_xmc_glitch" >&5
11359 echo "${ECHO_T}$enable_xmc_glitch" >&6
11360 test "x$enable_xmc_glitch" = xyes &&
11361 cat >>confdefs.h <<\EOF
11362 #define USE_XMC_SUPPORT 1
11363 EOF
11364
11365 ###############################################################################
11366 # These are just experimental, probably should not be in a package:
11367
11368 echo "$as_me:11368: checking if you do not want to assume colors are white-on-black" >&5
11369 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11370
11371 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11372 if test "${enable_assumed_color+set}" = set; then
11373   enableval="$enable_assumed_color"
11374   with_assumed_color=$enableval
11375 else
11376   with_assumed_color=yes
11377 fi;
11378 echo "$as_me:11378: result: $with_assumed_color" >&5
11379 echo "${ECHO_T}$with_assumed_color" >&6
11380 test "x$with_assumed_color" = xyes &&
11381 cat >>confdefs.h <<\EOF
11382 #define USE_ASSUMED_COLOR 1
11383 EOF
11384
11385 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11386 echo "$as_me:11386: checking if you want hashmap scrolling-optimization code" >&5
11387 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11388
11389 # Check whether --enable-hashmap or --disable-hashmap was given.
11390 if test "${enable_hashmap+set}" = set; then
11391   enableval="$enable_hashmap"
11392   with_hashmap=$enableval
11393 else
11394   with_hashmap=yes
11395 fi;
11396 echo "$as_me:11396: result: $with_hashmap" >&5
11397 echo "${ECHO_T}$with_hashmap" >&6
11398 test "x$with_hashmap" = xyes &&
11399 cat >>confdefs.h <<\EOF
11400 #define USE_HASHMAP 1
11401 EOF
11402
11403 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11404 echo "$as_me:11404: checking if you want colorfgbg code" >&5
11405 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11406
11407 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11408 if test "${enable_colorfgbg+set}" = set; then
11409   enableval="$enable_colorfgbg"
11410   with_colorfgbg=$enableval
11411 else
11412   with_colorfgbg=no
11413 fi;
11414 echo "$as_me:11414: result: $with_colorfgbg" >&5
11415 echo "${ECHO_T}$with_colorfgbg" >&6
11416 test "x$with_colorfgbg" = xyes &&
11417 cat >>confdefs.h <<\EOF
11418 #define USE_COLORFGBG 1
11419 EOF
11420
11421 ###   use option --enable-interop to turn on use of bindings used for interop
11422 echo "$as_me:11422: checking if you want interop bindings" >&5
11423 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11424
11425 # Check whether --enable-interop or --disable-interop was given.
11426 if test "${enable_interop+set}" = set; then
11427   enableval="$enable_interop"
11428   with_exp_interop=$enableval
11429 else
11430   with_exp_interop=no
11431 fi;
11432 echo "$as_me:11432: result: $with_exp_interop" >&5
11433 echo "${ECHO_T}$with_exp_interop" >&6
11434
11435 NCURSES_INTEROP_FUNCS=0
11436 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11437
11438 # This is still experimental (20080329), but should ultimately be moved to
11439 # the script-block --with-normal, etc.
11440
11441 echo "$as_me:11441: checking if you want to link with the pthread library" >&5
11442 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11443
11444 # Check whether --with-pthread or --without-pthread was given.
11445 if test "${with_pthread+set}" = set; then
11446   withval="$with_pthread"
11447   with_pthread=$withval
11448 else
11449   with_pthread=no
11450 fi;
11451 echo "$as_me:11451: result: $with_pthread" >&5
11452 echo "${ECHO_T}$with_pthread" >&6
11453
11454 if test "$with_pthread" != no ; then
11455     echo "$as_me:11455: checking for pthread.h" >&5
11456 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11457 if test "${ac_cv_header_pthread_h+set}" = set; then
11458   echo $ECHO_N "(cached) $ECHO_C" >&6
11459 else
11460   cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11463 #include <pthread.h>
11464 _ACEOF
11465 if { (eval echo "$as_me:11465: \"$ac_cpp conftest.$ac_ext\"") >&5
11466   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11467   ac_status=$?
11468   egrep -v '^ *\+' conftest.er1 >conftest.err
11469   rm -f conftest.er1
11470   cat conftest.err >&5
11471   echo "$as_me:11471: \$? = $ac_status" >&5
11472   (exit $ac_status); } >/dev/null; then
11473   if test -s conftest.err; then
11474     ac_cpp_err=$ac_c_preproc_warn_flag
11475   else
11476     ac_cpp_err=
11477   fi
11478 else
11479   ac_cpp_err=yes
11480 fi
11481 if test -z "$ac_cpp_err"; then
11482   ac_cv_header_pthread_h=yes
11483 else
11484   echo "$as_me: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   ac_cv_header_pthread_h=no
11487 fi
11488 rm -f conftest.err conftest.$ac_ext
11489 fi
11490 echo "$as_me:11490: result: $ac_cv_header_pthread_h" >&5
11491 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11492 if test $ac_cv_header_pthread_h = yes; then
11493
11494 cat >>confdefs.h <<\EOF
11495 #define HAVE_PTHREADS_H 1
11496 EOF
11497
11498         for cf_lib_pthread in pthread c_r
11499         do
11500             echo "$as_me:11500: checking if we can link with the $cf_lib_pthread library" >&5
11501 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11502             cf_save_LIBS="$LIBS"
11503             LIBS="-l$cf_lib_pthread $LIBS"
11504             cat >conftest.$ac_ext <<_ACEOF
11505 #line 11505 "configure"
11506 #include "confdefs.h"
11507
11508 #include <pthread.h>
11509
11510 int
11511 main ()
11512 {
11513
11514                 int rc = pthread_create(0,0,0,0);
11515                 int r2 = pthread_mutexattr_settype(0, 0);
11516
11517   ;
11518   return 0;
11519 }
11520 _ACEOF
11521 rm -f conftest.$ac_objext conftest$ac_exeext
11522 if { (eval echo "$as_me:11522: \"$ac_link\"") >&5
11523   (eval $ac_link) 2>&5
11524   ac_status=$?
11525   echo "$as_me:11525: \$? = $ac_status" >&5
11526   (exit $ac_status); } &&
11527          { ac_try='test -s conftest$ac_exeext'
11528   { (eval echo "$as_me:11528: \"$ac_try\"") >&5
11529   (eval $ac_try) 2>&5
11530   ac_status=$?
11531   echo "$as_me:11531: \$? = $ac_status" >&5
11532   (exit $ac_status); }; }; then
11533   with_pthread=yes
11534 else
11535   echo "$as_me: failed program was:" >&5
11536 cat conftest.$ac_ext >&5
11537 with_pthread=no
11538 fi
11539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11540             LIBS="$cf_save_LIBS"
11541             echo "$as_me:11541: result: $with_pthread" >&5
11542 echo "${ECHO_T}$with_pthread" >&6
11543             test "$with_pthread" = yes && break
11544         done
11545
11546         if test "$with_pthread" = yes ; then
11547             LIBS="-l$cf_lib_pthread $LIBS"
11548
11549 cat >>confdefs.h <<\EOF
11550 #define HAVE_LIBPTHREADS 1
11551 EOF
11552
11553         else
11554             { { echo "$as_me:11554: error: Cannot link with pthread library" >&5
11555 echo "$as_me: error: Cannot link with pthread library" >&2;}
11556    { (exit 1); exit 1; }; }
11557         fi
11558
11559 fi
11560
11561 fi
11562
11563 if test "x$with_pthread" != xno; then
11564         echo "$as_me:11564: checking for pthread_kill" >&5
11565 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11566 if test "${ac_cv_func_pthread_kill+set}" = set; then
11567   echo $ECHO_N "(cached) $ECHO_C" >&6
11568 else
11569   cat >conftest.$ac_ext <<_ACEOF
11570 #line 11570 "configure"
11571 #include "confdefs.h"
11572 /* System header to define __stub macros and hopefully few prototypes,
11573     which can conflict with char pthread_kill (); below.  */
11574 #include <assert.h>
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 #ifdef __cplusplus
11577 extern "C"
11578 #endif
11579 /* We use char because int might match the return type of a gcc2
11580    builtin and then its argument prototype would still apply.  */
11581 char pthread_kill ();
11582 char (*f) ();
11583
11584 int
11585 main ()
11586 {
11587 /* The GNU C library defines this for functions which it implements
11588     to always fail with ENOSYS.  Some functions are actually named
11589     something starting with __ and the normal name is an alias.  */
11590 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11591 choke me
11592 #else
11593 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11594 #endif
11595
11596   ;
11597   return 0;
11598 }
11599 _ACEOF
11600 rm -f conftest.$ac_objext conftest$ac_exeext
11601 if { (eval echo "$as_me:11601: \"$ac_link\"") >&5
11602   (eval $ac_link) 2>&5
11603   ac_status=$?
11604   echo "$as_me:11604: \$? = $ac_status" >&5
11605   (exit $ac_status); } &&
11606          { ac_try='test -s conftest$ac_exeext'
11607   { (eval echo "$as_me:11607: \"$ac_try\"") >&5
11608   (eval $ac_try) 2>&5
11609   ac_status=$?
11610   echo "$as_me:11610: \$? = $ac_status" >&5
11611   (exit $ac_status); }; }; then
11612   ac_cv_func_pthread_kill=yes
11613 else
11614   echo "$as_me: failed program was:" >&5
11615 cat conftest.$ac_ext >&5
11616 ac_cv_func_pthread_kill=no
11617 fi
11618 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11619 fi
11620 echo "$as_me:11620: result: $ac_cv_func_pthread_kill" >&5
11621 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11622 if test $ac_cv_func_pthread_kill = yes; then
11623
11624                 echo "$as_me:11624: checking if you want to allow EINTR in wgetch with pthreads" >&5
11625 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11626
11627 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11628 if test "${enable_pthreads_eintr+set}" = set; then
11629   enableval="$enable_pthreads_eintr"
11630   use_pthreads_eintr=$enableval
11631 else
11632   use_pthreads_eintr=no
11633 fi;
11634                 echo "$as_me:11634: result: $use_pthreads_eintr" >&5
11635 echo "${ECHO_T}$use_pthreads_eintr" >&6
11636                 if test "x$use_pthreads_eintr" = xyes ; then
11637
11638 cat >>confdefs.h <<\EOF
11639 #define USE_PTHREADS_EINTR 1
11640 EOF
11641
11642                 fi
11643 fi
11644
11645         echo "$as_me:11645: checking if you want to use weak-symbols for pthreads" >&5
11646 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11647
11648 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11649 if test "${enable_weak_symbols+set}" = set; then
11650   enableval="$enable_weak_symbols"
11651   use_weak_symbols=$enableval
11652 else
11653   use_weak_symbols=no
11654 fi;
11655         echo "$as_me:11655: result: $use_weak_symbols" >&5
11656 echo "${ECHO_T}$use_weak_symbols" >&6
11657         if test "x$use_weak_symbols" = xyes ; then
11658
11659 echo "$as_me:11659: checking if $CC supports weak symbols" >&5
11660 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11661 if test "${cf_cv_weak_symbols+set}" = set; then
11662   echo $ECHO_N "(cached) $ECHO_C" >&6
11663 else
11664
11665 cat >conftest.$ac_ext <<_ACEOF
11666 #line 11666 "configure"
11667 #include "confdefs.h"
11668
11669 #include <stdio.h>
11670 int
11671 main ()
11672 {
11673
11674 #if defined(__GNUC__)
11675 #  if defined __USE_ISOC99
11676 #    define _cat_pragma(exp)    _Pragma(#exp)
11677 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11678 #  else
11679 #    define _weak_pragma(exp)
11680 #  endif
11681 #  define _declare(name)        __extension__ extern __typeof__(name) name
11682 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11683 #endif
11684
11685 weak_symbol(fopen);
11686
11687   ;
11688   return 0;
11689 }
11690 _ACEOF
11691 rm -f conftest.$ac_objext
11692 if { (eval echo "$as_me:11692: \"$ac_compile\"") >&5
11693   (eval $ac_compile) 2>&5
11694   ac_status=$?
11695   echo "$as_me:11695: \$? = $ac_status" >&5
11696   (exit $ac_status); } &&
11697          { ac_try='test -s conftest.$ac_objext'
11698   { (eval echo "$as_me:11698: \"$ac_try\"") >&5
11699   (eval $ac_try) 2>&5
11700   ac_status=$?
11701   echo "$as_me:11701: \$? = $ac_status" >&5
11702   (exit $ac_status); }; }; then
11703   cf_cv_weak_symbols=yes
11704 else
11705   echo "$as_me: failed program was:" >&5
11706 cat conftest.$ac_ext >&5
11707 cf_cv_weak_symbols=no
11708 fi
11709 rm -f conftest.$ac_objext conftest.$ac_ext
11710
11711 fi
11712 echo "$as_me:11712: result: $cf_cv_weak_symbols" >&5
11713 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11714
11715         else
11716                 cf_cv_weak_symbols=no
11717         fi
11718
11719         if test "x$cf_cv_weak_symbols" = xyes ; then
11720
11721 cat >>confdefs.h <<\EOF
11722 #define USE_WEAK_SYMBOLS 1
11723 EOF
11724
11725         fi
11726 fi
11727
11728 PTHREAD=
11729 if test "x$with_pthread" = "xyes" ; then
11730
11731 cat >>confdefs.h <<\EOF
11732 #define USE_PTHREADS 1
11733 EOF
11734
11735     enable_reentrant=yes
11736     if test "x$cf_cv_weak_symbols" = xyes ; then
11737         PTHREAD=-lpthread
11738     fi
11739 fi
11740
11741 # Reentrant code has to be opaque; there's little advantage to making ncurses
11742 # opaque outside of that, so there is no --enable-opaque option.  We can use
11743 # this option without --with-pthreads, but this will be always set for
11744 # pthreads.
11745 echo "$as_me:11745: checking if you want experimental reentrant code" >&5
11746 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11747
11748 # Check whether --enable-reentrant or --disable-reentrant was given.
11749 if test "${enable_reentrant+set}" = set; then
11750   enableval="$enable_reentrant"
11751   with_reentrant=$enableval
11752 else
11753   with_reentrant=no
11754 fi;
11755 echo "$as_me:11755: result: $with_reentrant" >&5
11756 echo "${ECHO_T}$with_reentrant" >&6
11757 if test "x$with_reentrant" = xyes ; then
11758         cf_cv_enable_reentrant=1
11759         cf_cv_enable_opaque="NCURSES_INTERNALS"
11760         NCURSES_OPAQUE=1
11761         NCURSES_SIZE_T=int
11762         if test "x$cf_cv_weak_symbols" = xyes ; then
11763
11764 # remove pthread library from $LIBS
11765 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11766
11767                 TEST_LIBS="-lpthread $TEST_LIBS"
11768                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11769         else
11770                 LIB_SUFFIX="t${LIB_SUFFIX}"
11771         fi
11772
11773 cat >>confdefs.h <<\EOF
11774 #define USE_REENTRANT 1
11775 EOF
11776
11777 if test "${with_abi_version+set}" != set; then
11778         case $cf_cv_rel_version in
11779         5.*)
11780                 cf_cv_rel_version=6.0
11781                 cf_cv_abi_version=6
11782                 { echo "$as_me:11782: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11783 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11784                 ;;
11785         esac
11786 fi
11787
11788 else
11789         cf_cv_enable_reentrant=0
11790         cf_cv_enable_opaque="NCURSES_OPAQUE"
11791         NCURSES_OPAQUE=0
11792         NCURSES_SIZE_T=short
11793 fi
11794
11795 ### Allow using a different wrap-prefix
11796 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11797         echo "$as_me:11797: checking for prefix used to wrap public variables" >&5
11798 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11799
11800 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11801 if test "${with_wrap_prefix+set}" = set; then
11802   withval="$with_wrap_prefix"
11803   NCURSES_WRAP_PREFIX=$withval
11804 else
11805   NCURSES_WRAP_PREFIX=_nc_
11806 fi;
11807         echo "$as_me:11807: result: $NCURSES_WRAP_PREFIX" >&5
11808 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11809 else
11810         NCURSES_WRAP_PREFIX=_nc_
11811 fi
11812
11813 cat >>confdefs.h <<EOF
11814 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11815 EOF
11816
11817 echo "$as_me:11817: checking if you want experimental safe-sprintf code" >&5
11818 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11819
11820 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11821 if test "${enable_safe_sprintf+set}" = set; then
11822   enableval="$enable_safe_sprintf"
11823   with_safe_sprintf=$enableval
11824 else
11825   with_safe_sprintf=no
11826 fi;
11827 echo "$as_me:11827: result: $with_safe_sprintf" >&5
11828 echo "${ECHO_T}$with_safe_sprintf" >&6
11829 test "x$with_safe_sprintf" = xyes &&
11830 cat >>confdefs.h <<\EOF
11831 #define USE_SAFE_SPRINTF 1
11832 EOF
11833
11834 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11835 # when hashmap is used scroll hints are useless
11836 if test "$with_hashmap" = no ; then
11837 echo "$as_me:11837: checking if you want to experiment without scrolling-hints code" >&5
11838 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11839
11840 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11841 if test "${enable_scroll_hints+set}" = set; then
11842   enableval="$enable_scroll_hints"
11843   with_scroll_hints=$enableval
11844 else
11845   with_scroll_hints=yes
11846 fi;
11847 echo "$as_me:11847: result: $with_scroll_hints" >&5
11848 echo "${ECHO_T}$with_scroll_hints" >&6
11849 test "x$with_scroll_hints" = xyes &&
11850 cat >>confdefs.h <<\EOF
11851 #define USE_SCROLL_HINTS 1
11852 EOF
11853
11854 fi
11855
11856 echo "$as_me:11856: checking if you want experimental wgetch-events code" >&5
11857 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11858
11859 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11860 if test "${enable_wgetch_events+set}" = set; then
11861   enableval="$enable_wgetch_events"
11862   with_wgetch_events=$enableval
11863 else
11864   with_wgetch_events=no
11865 fi;
11866 echo "$as_me:11866: result: $with_wgetch_events" >&5
11867 echo "${ECHO_T}$with_wgetch_events" >&6
11868 test "x$with_wgetch_events" = xyes &&
11869 cat >>confdefs.h <<\EOF
11870 #define NCURSES_WGETCH_EVENTS 1
11871 EOF
11872
11873 ###############################################################################
11874
11875 ###     use option --disable-echo to suppress full display compiling commands
11876
11877 echo "$as_me:11877: checking if you want to see long compiling messages" >&5
11878 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11879
11880 # Check whether --enable-echo or --disable-echo was given.
11881 if test "${enable_echo+set}" = set; then
11882   enableval="$enable_echo"
11883   test "$enableval" != no && enableval=yes
11884   if test "$enableval" != "yes" ; then
11885
11886     ECHO_LT='--silent'
11887     ECHO_LD='@echo linking $@;'
11888     RULE_CC='@echo compiling $<'
11889     SHOW_CC='@echo compiling $@'
11890     ECHO_CC='@'
11891
11892   else
11893
11894     ECHO_LT=''
11895     ECHO_LD=''
11896     RULE_CC=''
11897     SHOW_CC=''
11898     ECHO_CC=''
11899
11900   fi
11901 else
11902   enableval=yes
11903
11904     ECHO_LT=''
11905     ECHO_LD=''
11906     RULE_CC=''
11907     SHOW_CC=''
11908     ECHO_CC=''
11909
11910 fi;
11911 echo "$as_me:11911: result: $enableval" >&5
11912 echo "${ECHO_T}$enableval" >&6
11913
11914 if test "x$enable_echo" = xyes; then
11915         ECHO_LINK=
11916 else
11917         ECHO_LINK='@ echo linking $@ ... ;'
11918         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11919         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11920 fi
11921
11922 ###     use option --enable-warnings to turn on all gcc warnings
11923 echo "$as_me:11923: checking if you want to see compiler warnings" >&5
11924 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11925
11926 # Check whether --enable-warnings or --disable-warnings was given.
11927 if test "${enable_warnings+set}" = set; then
11928   enableval="$enable_warnings"
11929   with_warnings=$enableval
11930 fi;
11931 echo "$as_me:11931: result: $with_warnings" >&5
11932 echo "${ECHO_T}$with_warnings" >&6
11933
11934 if test "x$with_warnings" = "xyes"; then
11935
11936         ADAFLAGS="$ADAFLAGS -gnatg"
11937
11938 INTEL_COMPILER=no
11939
11940 if test "$GCC" = yes ; then
11941         case $host_os in
11942         linux*|gnu*)
11943                 echo "$as_me:11943: checking if this is really Intel C compiler" >&5
11944 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11945                 cf_save_CFLAGS="$CFLAGS"
11946                 CFLAGS="$CFLAGS -no-gcc"
11947                 cat >conftest.$ac_ext <<_ACEOF
11948 #line 11948 "configure"
11949 #include "confdefs.h"
11950
11951 int
11952 main ()
11953 {
11954
11955 #ifdef __INTEL_COMPILER
11956 #else
11957 make an error
11958 #endif
11959
11960   ;
11961   return 0;
11962 }
11963 _ACEOF
11964 rm -f conftest.$ac_objext
11965 if { (eval echo "$as_me:11965: \"$ac_compile\"") >&5
11966   (eval $ac_compile) 2>&5
11967   ac_status=$?
11968   echo "$as_me:11968: \$? = $ac_status" >&5
11969   (exit $ac_status); } &&
11970          { ac_try='test -s conftest.$ac_objext'
11971   { (eval echo "$as_me:11971: \"$ac_try\"") >&5
11972   (eval $ac_try) 2>&5
11973   ac_status=$?
11974   echo "$as_me:11974: \$? = $ac_status" >&5
11975   (exit $ac_status); }; }; then
11976   INTEL_COMPILER=yes
11977 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11978
11979 else
11980   echo "$as_me: failed program was:" >&5
11981 cat conftest.$ac_ext >&5
11982 fi
11983 rm -f conftest.$ac_objext conftest.$ac_ext
11984                 CFLAGS="$cf_save_CFLAGS"
11985                 echo "$as_me:11985: result: $INTEL_COMPILER" >&5
11986 echo "${ECHO_T}$INTEL_COMPILER" >&6
11987                 ;;
11988         esac
11989 fi
11990
11991 CLANG_COMPILER=no
11992
11993 if test "$GCC" = yes ; then
11994         echo "$as_me:11994: checking if this is really Clang C compiler" >&5
11995 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11996         cf_save_CFLAGS="$CFLAGS"
11997         CFLAGS="$CFLAGS -Qunused-arguments"
11998         cat >conftest.$ac_ext <<_ACEOF
11999 #line 11999 "configure"
12000 #include "confdefs.h"
12001
12002 int
12003 main ()
12004 {
12005
12006 #ifdef __clang__
12007 #else
12008 make an error
12009 #endif
12010
12011   ;
12012   return 0;
12013 }
12014 _ACEOF
12015 rm -f conftest.$ac_objext
12016 if { (eval echo "$as_me:12016: \"$ac_compile\"") >&5
12017   (eval $ac_compile) 2>&5
12018   ac_status=$?
12019   echo "$as_me:12019: \$? = $ac_status" >&5
12020   (exit $ac_status); } &&
12021          { ac_try='test -s conftest.$ac_objext'
12022   { (eval echo "$as_me:12022: \"$ac_try\"") >&5
12023   (eval $ac_try) 2>&5
12024   ac_status=$?
12025   echo "$as_me:12025: \$? = $ac_status" >&5
12026   (exit $ac_status); }; }; then
12027   CLANG_COMPILER=yes
12028 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12029
12030 else
12031   echo "$as_me: failed program was:" >&5
12032 cat conftest.$ac_ext >&5
12033 fi
12034 rm -f conftest.$ac_objext conftest.$ac_ext
12035         CFLAGS="$cf_save_CFLAGS"
12036         echo "$as_me:12036: result: $CLANG_COMPILER" >&5
12037 echo "${ECHO_T}$CLANG_COMPILER" >&6
12038 fi
12039
12040 cat > conftest.$ac_ext <<EOF
12041 #line 12041 "${as_me:-configure}"
12042 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12043 EOF
12044
12045 if test "$INTEL_COMPILER" = yes
12046 then
12047 # The "-wdXXX" options suppress warnings:
12048 # remark #1419: external declaration in primary source file
12049 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12050 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12051 # remark #193: zero used for undefined preprocessing identifier
12052 # remark #593: variable "curs_sb_left_arrow" was set but never used
12053 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12054 # remark #869: parameter "tw" was never referenced
12055 # remark #981: operands are evaluated in unspecified order
12056 # warning #279: controlling expression is constant
12057
12058         { echo "$as_me:12058: checking for $CC warning options..." >&5
12059 echo "$as_me: checking for $CC warning options..." >&6;}
12060         cf_save_CFLAGS="$CFLAGS"
12061         EXTRA_CFLAGS="-Wall"
12062         for cf_opt in \
12063                 wd1419 \
12064                 wd1683 \
12065                 wd1684 \
12066                 wd193 \
12067                 wd593 \
12068                 wd279 \
12069                 wd810 \
12070                 wd869 \
12071                 wd981
12072         do
12073                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12074                 if { (eval echo "$as_me:12074: \"$ac_compile\"") >&5
12075   (eval $ac_compile) 2>&5
12076   ac_status=$?
12077   echo "$as_me:12077: \$? = $ac_status" >&5
12078   (exit $ac_status); }; then
12079                         test -n "$verbose" && echo "$as_me:12079: result: ... -$cf_opt" >&5
12080 echo "${ECHO_T}... -$cf_opt" >&6
12081                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12082                 fi
12083         done
12084         CFLAGS="$cf_save_CFLAGS"
12085
12086 elif test "$GCC" = yes
12087 then
12088         { echo "$as_me:12088: checking for $CC warning options..." >&5
12089 echo "$as_me: checking for $CC warning options..." >&6;}
12090         cf_save_CFLAGS="$CFLAGS"
12091         EXTRA_CFLAGS=
12092         cf_warn_CONST=""
12093         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12094         for cf_opt in W Wall \
12095                 Wbad-function-cast \
12096                 Wcast-align \
12097                 Wcast-qual \
12098                 Winline \
12099                 Wmissing-declarations \
12100                 Wmissing-prototypes \
12101                 Wnested-externs \
12102                 Wpointer-arith \
12103                 Wshadow \
12104                 Wstrict-prototypes \
12105                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12106         do
12107                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12108                 if { (eval echo "$as_me:12108: \"$ac_compile\"") >&5
12109   (eval $ac_compile) 2>&5
12110   ac_status=$?
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); }; then
12113                         test -n "$verbose" && echo "$as_me:12113: result: ... -$cf_opt" >&5
12114 echo "${ECHO_T}... -$cf_opt" >&6
12115                         case $cf_opt in #(vi
12116                         Wcast-qual) #(vi
12117                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12118                                 ;;
12119                         Winline) #(vi
12120                                 case $GCC_VERSION in
12121                                 [34].*)
12122                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12123
12124 echo "${as_me:-configure}:12124: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12125
12126                                         continue;;
12127                                 esac
12128                                 ;;
12129                         Wpointer-arith) #(vi
12130                                 case $GCC_VERSION in
12131                                 [12].*)
12132                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12133
12134 echo "${as_me:-configure}:12134: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12135
12136                                         continue;;
12137                                 esac
12138                                 ;;
12139                         esac
12140                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12141                 fi
12142         done
12143         CFLAGS="$cf_save_CFLAGS"
12144 fi
12145 rm -rf conftest*
12146
12147         if test "x$cf_with_cxx" = xyes ; then
12148
12149 INTEL_CPLUSPLUS=no
12150
12151 if test "$GCC" = yes ; then
12152         case $host_os in
12153         linux*|gnu*)
12154                 echo "$as_me:12154: checking if this is really Intel C++ compiler" >&5
12155 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12156                 cf_save_CFLAGS="$CXXFLAGS"
12157                 CXXFLAGS="$CXXFLAGS -no-gcc"
12158                 cat >conftest.$ac_ext <<_ACEOF
12159 #line 12159 "configure"
12160 #include "confdefs.h"
12161
12162 int
12163 main ()
12164 {
12165
12166 #ifdef __INTEL_COMPILER
12167 #else
12168 make an error
12169 #endif
12170
12171   ;
12172   return 0;
12173 }
12174 _ACEOF
12175 rm -f conftest.$ac_objext
12176 if { (eval echo "$as_me:12176: \"$ac_compile\"") >&5
12177   (eval $ac_compile) 2>&5
12178   ac_status=$?
12179   echo "$as_me:12179: \$? = $ac_status" >&5
12180   (exit $ac_status); } &&
12181          { ac_try='test -s conftest.$ac_objext'
12182   { (eval echo "$as_me:12182: \"$ac_try\"") >&5
12183   (eval $ac_try) 2>&5
12184   ac_status=$?
12185   echo "$as_me:12185: \$? = $ac_status" >&5
12186   (exit $ac_status); }; }; then
12187   INTEL_CPLUSPLUS=yes
12188 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12189
12190 else
12191   echo "$as_me: failed program was:" >&5
12192 cat conftest.$ac_ext >&5
12193 fi
12194 rm -f conftest.$ac_objext conftest.$ac_ext
12195                 CXXFLAGS="$cf_save_CFLAGS"
12196                 echo "$as_me:12196: result: $INTEL_CPLUSPLUS" >&5
12197 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12198                 ;;
12199         esac
12200 fi
12201
12202 CLANG_CPLUSPLUS=no
12203
12204 if test "$GCC" = yes ; then
12205         echo "$as_me:12205: checking if this is really Clang C++ compiler" >&5
12206 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12207         cf_save_CFLAGS="$CXXFLAGS"
12208         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12209         cat >conftest.$ac_ext <<_ACEOF
12210 #line 12210 "configure"
12211 #include "confdefs.h"
12212
12213 int
12214 main ()
12215 {
12216
12217 #ifdef __clang__
12218 #else
12219 make an error
12220 #endif
12221
12222   ;
12223   return 0;
12224 }
12225 _ACEOF
12226 rm -f conftest.$ac_objext
12227 if { (eval echo "$as_me:12227: \"$ac_compile\"") >&5
12228   (eval $ac_compile) 2>&5
12229   ac_status=$?
12230   echo "$as_me:12230: \$? = $ac_status" >&5
12231   (exit $ac_status); } &&
12232          { ac_try='test -s conftest.$ac_objext'
12233   { (eval echo "$as_me:12233: \"$ac_try\"") >&5
12234   (eval $ac_try) 2>&5
12235   ac_status=$?
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); }; }; then
12238   CLANG_CPLUSPLUS=yes
12239 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12240
12241 else
12242   echo "$as_me: failed program was:" >&5
12243 cat conftest.$ac_ext >&5
12244 fi
12245 rm -f conftest.$ac_objext conftest.$ac_ext
12246         CXXFLAGS="$cf_save_CFLAGS"
12247         echo "$as_me:12247: result: $CLANG_CPLUSPLUS" >&5
12248 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12249 fi
12250
12251 ac_ext=cc
12252 ac_cpp='$CXXCPP $CPPFLAGS'
12253 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12254 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12255 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12256 ac_main_return=return
12257
12258 cat > conftest.$ac_ext <<EOF
12259 #line 12259 "configure"
12260 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12261 EOF
12262
12263 if test "$INTEL_CPLUSPLUS" = yes
12264 then
12265 # The "-wdXXX" options suppress warnings:
12266 # remark #1419: external declaration in primary source file
12267 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12268 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12269 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12270 # remark #193: zero used for undefined preprocessing identifier
12271 # remark #593: variable "curs_sb_left_arrow" was set but never used
12272 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12273 # remark #869: parameter "tw" was never referenced
12274 # remark #981: operands are evaluated in unspecified order
12275 # warning #269: invalid format string conversion
12276
12277         { echo "$as_me:12277: checking for $CC warning options..." >&5
12278 echo "$as_me: checking for $CC warning options..." >&6;}
12279         cf_save_CXXFLAGS="$CXXFLAGS"
12280         EXTRA_CXXFLAGS="-Wall"
12281         for cf_opt in \
12282                 wd1419 \
12283                 wd1682 \
12284                 wd1683 \
12285                 wd1684 \
12286                 wd193 \
12287                 wd279 \
12288                 wd593 \
12289                 wd810 \
12290                 wd869 \
12291                 wd981
12292         do
12293                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12294                 if { (eval echo "$as_me:12294: \"$ac_compile\"") >&5
12295   (eval $ac_compile) 2>&5
12296   ac_status=$?
12297   echo "$as_me:12297: \$? = $ac_status" >&5
12298   (exit $ac_status); }; then
12299                         test -n "$verbose" && echo "$as_me:12299: result: ... -$cf_opt" >&5
12300 echo "${ECHO_T}... -$cf_opt" >&6
12301                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12302                 fi
12303         done
12304         CXXFLAGS="$cf_save_CXXFLAGS"
12305
12306 elif test "$GXX" = yes
12307 then
12308         { echo "$as_me:12308: checking for $CXX warning options..." >&5
12309 echo "$as_me: checking for $CXX warning options..." >&6;}
12310         cf_save_CXXFLAGS="$CXXFLAGS"
12311         EXTRA_CXXFLAGS="-W -Wall"
12312         cf_gxx_extra_warnings=""
12313         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12314         case "$GCC_VERSION" in
12315         [1-2].*)
12316                 ;;
12317         *)
12318                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12319                 ;;
12320         esac
12321         for cf_opt in \
12322                 Wabi \
12323                 fabi-version=0 \
12324                 Woverloaded-virtual \
12325                 Wsign-promo \
12326                 Wsynth \
12327                 Wold-style-cast \
12328                 Wcast-align \
12329                 Wcast-qual \
12330                 Wmissing-prototypes \
12331                 Wpointer-arith \
12332                 Wshadow \
12333                 Wstrict-prototypes \
12334                 Wundef $cf_gxx_extra_warnings Wno-unused
12335         do
12336                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12337                 if { (eval echo "$as_me:12337: \"$ac_compile\"") >&5
12338   (eval $ac_compile) 2>&5
12339   ac_status=$?
12340   echo "$as_me:12340: \$? = $ac_status" >&5
12341   (exit $ac_status); }; then
12342                         test -n "$verbose" && echo "$as_me:12342: result: ... -$cf_opt" >&5
12343 echo "${ECHO_T}... -$cf_opt" >&6
12344                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12345                 else
12346                         test -n "$verbose" && echo "$as_me:12346: result: ... no -$cf_opt" >&5
12347 echo "${ECHO_T}... no -$cf_opt" >&6
12348                 fi
12349         done
12350         CXXFLAGS="$cf_save_CXXFLAGS"
12351 fi
12352
12353 rm -rf conftest*
12354 ac_ext=c
12355 ac_cpp='$CPP $CPPFLAGS'
12356 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12357 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12358 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12359 ac_main_return=return
12360
12361         fi
12362 fi
12363
12364 if test "$GCC" = yes
12365 then
12366 cat > conftest.i <<EOF
12367 #ifndef GCC_PRINTF
12368 #define GCC_PRINTF 0
12369 #endif
12370 #ifndef GCC_SCANF
12371 #define GCC_SCANF 0
12372 #endif
12373 #ifndef GCC_NORETURN
12374 #define GCC_NORETURN /* nothing */
12375 #endif
12376 #ifndef GCC_UNUSED
12377 #define GCC_UNUSED /* nothing */
12378 #endif
12379 EOF
12380 if test "$GCC" = yes
12381 then
12382         { echo "$as_me:12382: checking for $CC __attribute__ directives..." >&5
12383 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12384 cat > conftest.$ac_ext <<EOF
12385 #line 12385 "${as_me:-configure}"
12386 #include "confdefs.h"
12387 #include "conftest.h"
12388 #include "conftest.i"
12389 #if     GCC_PRINTF
12390 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12391 #else
12392 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12393 #endif
12394 #if     GCC_SCANF
12395 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12396 #else
12397 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12398 #endif
12399 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12400 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12401 extern void foo(void) GCC_NORETURN;
12402 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12403 EOF
12404         cf_printf_attribute=no
12405         cf_scanf_attribute=no
12406         for cf_attribute in scanf printf unused noreturn
12407         do
12408
12409 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12410
12411                 cf_directive="__attribute__(($cf_attribute))"
12412                 echo "checking for $CC $cf_directive" 1>&5
12413
12414                 case $cf_attribute in #(vi
12415                 printf) #(vi
12416                         cf_printf_attribute=yes
12417                         cat >conftest.h <<EOF
12418 #define GCC_$cf_ATTRIBUTE 1
12419 EOF
12420                         ;;
12421                 scanf) #(vi
12422                         cf_scanf_attribute=yes
12423                         cat >conftest.h <<EOF
12424 #define GCC_$cf_ATTRIBUTE 1
12425 EOF
12426                         ;;
12427                 *) #(vi
12428                         cat >conftest.h <<EOF
12429 #define GCC_$cf_ATTRIBUTE $cf_directive
12430 EOF
12431                         ;;
12432                 esac
12433
12434                 if { (eval echo "$as_me:12434: \"$ac_compile\"") >&5
12435   (eval $ac_compile) 2>&5
12436   ac_status=$?
12437   echo "$as_me:12437: \$? = $ac_status" >&5
12438   (exit $ac_status); }; then
12439                         test -n "$verbose" && echo "$as_me:12439: result: ... $cf_attribute" >&5
12440 echo "${ECHO_T}... $cf_attribute" >&6
12441                         cat conftest.h >>confdefs.h
12442                         case $cf_attribute in #(vi
12443                         noreturn) #(vi
12444
12445 cat >>confdefs.h <<EOF
12446 #define GCC_NORETURN $cf_directive
12447 EOF
12448
12449                                 ;;
12450                         printf) #(vi
12451                                 cf_value='/* nothing */'
12452                                 if test "$cf_printf_attribute" != no ; then
12453                                         cf_value='__attribute__((format(printf,fmt,var)))'
12454
12455 cat >>confdefs.h <<\EOF
12456 #define GCC_PRINTF 1
12457 EOF
12458
12459                                 fi
12460
12461 cat >>confdefs.h <<EOF
12462 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12463 EOF
12464
12465                                 ;;
12466                         scanf) #(vi
12467                                 cf_value='/* nothing */'
12468                                 if test "$cf_scanf_attribute" != no ; then
12469                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12470
12471 cat >>confdefs.h <<\EOF
12472 #define GCC_SCANF 1
12473 EOF
12474
12475                                 fi
12476
12477 cat >>confdefs.h <<EOF
12478 #define GCC_SCANFLIKE(fmt,var) $cf_value
12479 EOF
12480
12481                                 ;;
12482                         unused) #(vi
12483
12484 cat >>confdefs.h <<EOF
12485 #define GCC_UNUSED $cf_directive
12486 EOF
12487
12488                                 ;;
12489                         esac
12490                 fi
12491         done
12492 else
12493         fgrep define conftest.i >>confdefs.h
12494 fi
12495 rm -rf conftest*
12496 fi
12497
12498 echo "$as_me:12498: checking if you want to work around bogus compiler/loader warnings" >&5
12499 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12500
12501 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12502 if test "${enable_string_hacks+set}" = set; then
12503   enableval="$enable_string_hacks"
12504   with_string_hacks=$enableval
12505 else
12506   with_string_hacks=no
12507 fi;
12508 echo "$as_me:12508: result: $with_string_hacks" >&5
12509 echo "${ECHO_T}$with_string_hacks" >&6
12510
12511 if test "x$with_string_hacks" = "xyes"; then
12512
12513 cat >>confdefs.h <<\EOF
12514 #define USE_STRING_HACKS 1
12515 EOF
12516
12517         { echo "$as_me:12517: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12518 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12519
12520 for ac_func in strlcat strlcpy snprintf
12521 do
12522 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12523 echo "$as_me:12523: checking for $ac_func" >&5
12524 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12525 if eval "test \"\${$as_ac_var+set}\" = set"; then
12526   echo $ECHO_N "(cached) $ECHO_C" >&6
12527 else
12528   cat >conftest.$ac_ext <<_ACEOF
12529 #line 12529 "configure"
12530 #include "confdefs.h"
12531 /* System header to define __stub macros and hopefully few prototypes,
12532     which can conflict with char $ac_func (); below.  */
12533 #include <assert.h>
12534 /* Override any gcc2 internal prototype to avoid an error.  */
12535 #ifdef __cplusplus
12536 extern "C"
12537 #endif
12538 /* We use char because int might match the return type of a gcc2
12539    builtin and then its argument prototype would still apply.  */
12540 char $ac_func ();
12541 char (*f) ();
12542
12543 int
12544 main ()
12545 {
12546 /* The GNU C library defines this for functions which it implements
12547     to always fail with ENOSYS.  Some functions are actually named
12548     something starting with __ and the normal name is an alias.  */
12549 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12550 choke me
12551 #else
12552 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12553 #endif
12554
12555   ;
12556   return 0;
12557 }
12558 _ACEOF
12559 rm -f conftest.$ac_objext conftest$ac_exeext
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561   (eval $ac_link) 2>&5
12562   ac_status=$?
12563   echo "$as_me:12563: \$? = $ac_status" >&5
12564   (exit $ac_status); } &&
12565          { ac_try='test -s conftest$ac_exeext'
12566   { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567   (eval $ac_try) 2>&5
12568   ac_status=$?
12569   echo "$as_me:12569: \$? = $ac_status" >&5
12570   (exit $ac_status); }; }; then
12571   eval "$as_ac_var=yes"
12572 else
12573   echo "$as_me: failed program was:" >&5
12574 cat conftest.$ac_ext >&5
12575 eval "$as_ac_var=no"
12576 fi
12577 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12578 fi
12579 echo "$as_me:12579: result: `eval echo '${'$as_ac_var'}'`" >&5
12580 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12581 if test `eval echo '${'$as_ac_var'}'` = yes; then
12582   cat >>confdefs.h <<EOF
12583 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12584 EOF
12585
12586 fi
12587 done
12588
12589 fi
12590
12591 ###     use option --enable-assertions to turn on generation of assertion code
12592 echo "$as_me:12592: checking if you want to enable runtime assertions" >&5
12593 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12594
12595 # Check whether --enable-assertions or --disable-assertions was given.
12596 if test "${enable_assertions+set}" = set; then
12597   enableval="$enable_assertions"
12598   with_assertions=$enableval
12599 else
12600   with_assertions=no
12601 fi;
12602 echo "$as_me:12602: result: $with_assertions" >&5
12603 echo "${ECHO_T}$with_assertions" >&6
12604 if test -n "$GCC"
12605 then
12606         if test "$with_assertions" = no
12607         then
12608                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12609         else
12610
12611         ADAFLAGS="$ADAFLAGS -gnata"
12612
12613         fi
12614 fi
12615
12616 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12617
12618 echo "$as_me:12618: checking if you want to use dmalloc for testing" >&5
12619 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12620
12621 # Check whether --with-dmalloc or --without-dmalloc was given.
12622 if test "${with_dmalloc+set}" = set; then
12623   withval="$with_dmalloc"
12624
12625 cat >>confdefs.h <<EOF
12626 #define USE_DMALLOC 1
12627 EOF
12628
12629         : ${with_cflags:=-g}
12630         : ${with_no_leaks:=yes}
12631          with_dmalloc=yes
12632 else
12633   with_dmalloc=
12634 fi;
12635 echo "$as_me:12635: result: ${with_dmalloc:-no}" >&5
12636 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12637
12638 case .$with_cflags in #(vi
12639 .*-g*)
12640         case .$CFLAGS in #(vi
12641         .*-g*) #(vi
12642                 ;;
12643         *)
12644
12645 cf_fix_cppflags=no
12646 cf_new_cflags=
12647 cf_new_cppflags=
12648 cf_new_extra_cppflags=
12649
12650 for cf_add_cflags in -g
12651 do
12652 case $cf_fix_cppflags in
12653 no)
12654         case $cf_add_cflags in #(vi
12655         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12656                 case $cf_add_cflags in
12657                 -D*)
12658                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12659
12660                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12661                                 && test -z "${cf_tst_cflags}" \
12662                                 && cf_fix_cppflags=yes
12663
12664                         if test $cf_fix_cppflags = yes ; then
12665                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12666                                 continue
12667                         elif test "${cf_tst_cflags}" = "\"'" ; then
12668                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12669                                 continue
12670                         fi
12671                         ;;
12672                 esac
12673                 case "$CPPFLAGS" in
12674                 *$cf_add_cflags) #(vi
12675                         ;;
12676                 *) #(vi
12677                         case $cf_add_cflags in #(vi
12678                         -D*)
12679                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12680
12681 CPPFLAGS=`echo "$CPPFLAGS" | \
12682         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12683                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12684
12685                                 ;;
12686                         esac
12687                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12688                         ;;
12689                 esac
12690                 ;;
12691         *)
12692                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12693                 ;;
12694         esac
12695         ;;
12696 yes)
12697         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12698
12699         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12700
12701         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12702                 && test -z "${cf_tst_cflags}" \
12703                 && cf_fix_cppflags=no
12704         ;;
12705 esac
12706 done
12707
12708 if test -n "$cf_new_cflags" ; then
12709
12710         CFLAGS="$CFLAGS $cf_new_cflags"
12711 fi
12712
12713 if test -n "$cf_new_cppflags" ; then
12714
12715         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12716 fi
12717
12718 if test -n "$cf_new_extra_cppflags" ; then
12719
12720         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12721 fi
12722
12723                 ;;
12724         esac
12725         ;;
12726 esac
12727
12728 if test "$with_dmalloc" = yes ; then
12729         echo "$as_me:12729: checking for dmalloc.h" >&5
12730 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12731 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12732   echo $ECHO_N "(cached) $ECHO_C" >&6
12733 else
12734   cat >conftest.$ac_ext <<_ACEOF
12735 #line 12735 "configure"
12736 #include "confdefs.h"
12737 #include <dmalloc.h>
12738 _ACEOF
12739 if { (eval echo "$as_me:12739: \"$ac_cpp conftest.$ac_ext\"") >&5
12740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12741   ac_status=$?
12742   egrep -v '^ *\+' conftest.er1 >conftest.err
12743   rm -f conftest.er1
12744   cat conftest.err >&5
12745   echo "$as_me:12745: \$? = $ac_status" >&5
12746   (exit $ac_status); } >/dev/null; then
12747   if test -s conftest.err; then
12748     ac_cpp_err=$ac_c_preproc_warn_flag
12749   else
12750     ac_cpp_err=
12751   fi
12752 else
12753   ac_cpp_err=yes
12754 fi
12755 if test -z "$ac_cpp_err"; then
12756   ac_cv_header_dmalloc_h=yes
12757 else
12758   echo "$as_me: failed program was:" >&5
12759   cat conftest.$ac_ext >&5
12760   ac_cv_header_dmalloc_h=no
12761 fi
12762 rm -f conftest.err conftest.$ac_ext
12763 fi
12764 echo "$as_me:12764: result: $ac_cv_header_dmalloc_h" >&5
12765 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12766 if test $ac_cv_header_dmalloc_h = yes; then
12767
12768 echo "$as_me:12768: checking for dmalloc_debug in -ldmalloc" >&5
12769 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12770 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12771   echo $ECHO_N "(cached) $ECHO_C" >&6
12772 else
12773   ac_check_lib_save_LIBS=$LIBS
12774 LIBS="-ldmalloc  $LIBS"
12775 cat >conftest.$ac_ext <<_ACEOF
12776 #line 12776 "configure"
12777 #include "confdefs.h"
12778
12779 /* Override any gcc2 internal prototype to avoid an error.  */
12780 #ifdef __cplusplus
12781 extern "C"
12782 #endif
12783 /* We use char because int might match the return type of a gcc2
12784    builtin and then its argument prototype would still apply.  */
12785 char dmalloc_debug ();
12786 int
12787 main ()
12788 {
12789 dmalloc_debug ();
12790   ;
12791   return 0;
12792 }
12793 _ACEOF
12794 rm -f conftest.$ac_objext conftest$ac_exeext
12795 if { (eval echo "$as_me:12795: \"$ac_link\"") >&5
12796   (eval $ac_link) 2>&5
12797   ac_status=$?
12798   echo "$as_me:12798: \$? = $ac_status" >&5
12799   (exit $ac_status); } &&
12800          { ac_try='test -s conftest$ac_exeext'
12801   { (eval echo "$as_me:12801: \"$ac_try\"") >&5
12802   (eval $ac_try) 2>&5
12803   ac_status=$?
12804   echo "$as_me:12804: \$? = $ac_status" >&5
12805   (exit $ac_status); }; }; then
12806   ac_cv_lib_dmalloc_dmalloc_debug=yes
12807 else
12808   echo "$as_me: failed program was:" >&5
12809 cat conftest.$ac_ext >&5
12810 ac_cv_lib_dmalloc_dmalloc_debug=no
12811 fi
12812 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12813 LIBS=$ac_check_lib_save_LIBS
12814 fi
12815 echo "$as_me:12815: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12816 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12817 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12818   cat >>confdefs.h <<EOF
12819 #define HAVE_LIBDMALLOC 1
12820 EOF
12821
12822   LIBS="-ldmalloc $LIBS"
12823
12824 fi
12825
12826 fi
12827
12828 fi
12829
12830 echo "$as_me:12830: checking if you want to use dbmalloc for testing" >&5
12831 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12832
12833 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12834 if test "${with_dbmalloc+set}" = set; then
12835   withval="$with_dbmalloc"
12836
12837 cat >>confdefs.h <<EOF
12838 #define USE_DBMALLOC 1
12839 EOF
12840
12841         : ${with_cflags:=-g}
12842         : ${with_no_leaks:=yes}
12843          with_dbmalloc=yes
12844 else
12845   with_dbmalloc=
12846 fi;
12847 echo "$as_me:12847: result: ${with_dbmalloc:-no}" >&5
12848 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12849
12850 case .$with_cflags in #(vi
12851 .*-g*)
12852         case .$CFLAGS in #(vi
12853         .*-g*) #(vi
12854                 ;;
12855         *)
12856
12857 cf_fix_cppflags=no
12858 cf_new_cflags=
12859 cf_new_cppflags=
12860 cf_new_extra_cppflags=
12861
12862 for cf_add_cflags in -g
12863 do
12864 case $cf_fix_cppflags in
12865 no)
12866         case $cf_add_cflags in #(vi
12867         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12868                 case $cf_add_cflags in
12869                 -D*)
12870                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12871
12872                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12873                                 && test -z "${cf_tst_cflags}" \
12874                                 && cf_fix_cppflags=yes
12875
12876                         if test $cf_fix_cppflags = yes ; then
12877                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12878                                 continue
12879                         elif test "${cf_tst_cflags}" = "\"'" ; then
12880                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12881                                 continue
12882                         fi
12883                         ;;
12884                 esac
12885                 case "$CPPFLAGS" in
12886                 *$cf_add_cflags) #(vi
12887                         ;;
12888                 *) #(vi
12889                         case $cf_add_cflags in #(vi
12890                         -D*)
12891                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12892
12893 CPPFLAGS=`echo "$CPPFLAGS" | \
12894         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12895                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12896
12897                                 ;;
12898                         esac
12899                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12900                         ;;
12901                 esac
12902                 ;;
12903         *)
12904                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12905                 ;;
12906         esac
12907         ;;
12908 yes)
12909         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12910
12911         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12912
12913         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12914                 && test -z "${cf_tst_cflags}" \
12915                 && cf_fix_cppflags=no
12916         ;;
12917 esac
12918 done
12919
12920 if test -n "$cf_new_cflags" ; then
12921
12922         CFLAGS="$CFLAGS $cf_new_cflags"
12923 fi
12924
12925 if test -n "$cf_new_cppflags" ; then
12926
12927         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12928 fi
12929
12930 if test -n "$cf_new_extra_cppflags" ; then
12931
12932         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12933 fi
12934
12935                 ;;
12936         esac
12937         ;;
12938 esac
12939
12940 if test "$with_dbmalloc" = yes ; then
12941         echo "$as_me:12941: checking for dbmalloc.h" >&5
12942 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12943 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12944   echo $ECHO_N "(cached) $ECHO_C" >&6
12945 else
12946   cat >conftest.$ac_ext <<_ACEOF
12947 #line 12947 "configure"
12948 #include "confdefs.h"
12949 #include <dbmalloc.h>
12950 _ACEOF
12951 if { (eval echo "$as_me:12951: \"$ac_cpp conftest.$ac_ext\"") >&5
12952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12953   ac_status=$?
12954   egrep -v '^ *\+' conftest.er1 >conftest.err
12955   rm -f conftest.er1
12956   cat conftest.err >&5
12957   echo "$as_me:12957: \$? = $ac_status" >&5
12958   (exit $ac_status); } >/dev/null; then
12959   if test -s conftest.err; then
12960     ac_cpp_err=$ac_c_preproc_warn_flag
12961   else
12962     ac_cpp_err=
12963   fi
12964 else
12965   ac_cpp_err=yes
12966 fi
12967 if test -z "$ac_cpp_err"; then
12968   ac_cv_header_dbmalloc_h=yes
12969 else
12970   echo "$as_me: failed program was:" >&5
12971   cat conftest.$ac_ext >&5
12972   ac_cv_header_dbmalloc_h=no
12973 fi
12974 rm -f conftest.err conftest.$ac_ext
12975 fi
12976 echo "$as_me:12976: result: $ac_cv_header_dbmalloc_h" >&5
12977 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12978 if test $ac_cv_header_dbmalloc_h = yes; then
12979
12980 echo "$as_me:12980: checking for debug_malloc in -ldbmalloc" >&5
12981 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12982 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12983   echo $ECHO_N "(cached) $ECHO_C" >&6
12984 else
12985   ac_check_lib_save_LIBS=$LIBS
12986 LIBS="-ldbmalloc  $LIBS"
12987 cat >conftest.$ac_ext <<_ACEOF
12988 #line 12988 "configure"
12989 #include "confdefs.h"
12990
12991 /* Override any gcc2 internal prototype to avoid an error.  */
12992 #ifdef __cplusplus
12993 extern "C"
12994 #endif
12995 /* We use char because int might match the return type of a gcc2
12996    builtin and then its argument prototype would still apply.  */
12997 char debug_malloc ();
12998 int
12999 main ()
13000 {
13001 debug_malloc ();
13002   ;
13003   return 0;
13004 }
13005 _ACEOF
13006 rm -f conftest.$ac_objext conftest$ac_exeext
13007 if { (eval echo "$as_me:13007: \"$ac_link\"") >&5
13008   (eval $ac_link) 2>&5
13009   ac_status=$?
13010   echo "$as_me:13010: \$? = $ac_status" >&5
13011   (exit $ac_status); } &&
13012          { ac_try='test -s conftest$ac_exeext'
13013   { (eval echo "$as_me:13013: \"$ac_try\"") >&5
13014   (eval $ac_try) 2>&5
13015   ac_status=$?
13016   echo "$as_me:13016: \$? = $ac_status" >&5
13017   (exit $ac_status); }; }; then
13018   ac_cv_lib_dbmalloc_debug_malloc=yes
13019 else
13020   echo "$as_me: failed program was:" >&5
13021 cat conftest.$ac_ext >&5
13022 ac_cv_lib_dbmalloc_debug_malloc=no
13023 fi
13024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13025 LIBS=$ac_check_lib_save_LIBS
13026 fi
13027 echo "$as_me:13027: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13028 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13029 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13030   cat >>confdefs.h <<EOF
13031 #define HAVE_LIBDBMALLOC 1
13032 EOF
13033
13034   LIBS="-ldbmalloc $LIBS"
13035
13036 fi
13037
13038 fi
13039
13040 fi
13041
13042 echo "$as_me:13042: checking if you want to use valgrind for testing" >&5
13043 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13044
13045 # Check whether --with-valgrind or --without-valgrind was given.
13046 if test "${with_valgrind+set}" = set; then
13047   withval="$with_valgrind"
13048
13049 cat >>confdefs.h <<EOF
13050 #define USE_VALGRIND 1
13051 EOF
13052
13053         : ${with_cflags:=-g}
13054         : ${with_no_leaks:=yes}
13055          with_valgrind=yes
13056 else
13057   with_valgrind=
13058 fi;
13059 echo "$as_me:13059: result: ${with_valgrind:-no}" >&5
13060 echo "${ECHO_T}${with_valgrind:-no}" >&6
13061
13062 case .$with_cflags in #(vi
13063 .*-g*)
13064         case .$CFLAGS in #(vi
13065         .*-g*) #(vi
13066                 ;;
13067         *)
13068
13069 cf_fix_cppflags=no
13070 cf_new_cflags=
13071 cf_new_cppflags=
13072 cf_new_extra_cppflags=
13073
13074 for cf_add_cflags in -g
13075 do
13076 case $cf_fix_cppflags in
13077 no)
13078         case $cf_add_cflags in #(vi
13079         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13080                 case $cf_add_cflags in
13081                 -D*)
13082                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13083
13084                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13085                                 && test -z "${cf_tst_cflags}" \
13086                                 && cf_fix_cppflags=yes
13087
13088                         if test $cf_fix_cppflags = yes ; then
13089                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13090                                 continue
13091                         elif test "${cf_tst_cflags}" = "\"'" ; then
13092                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13093                                 continue
13094                         fi
13095                         ;;
13096                 esac
13097                 case "$CPPFLAGS" in
13098                 *$cf_add_cflags) #(vi
13099                         ;;
13100                 *) #(vi
13101                         case $cf_add_cflags in #(vi
13102                         -D*)
13103                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13104
13105 CPPFLAGS=`echo "$CPPFLAGS" | \
13106         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13107                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13108
13109                                 ;;
13110                         esac
13111                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13112                         ;;
13113                 esac
13114                 ;;
13115         *)
13116                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13117                 ;;
13118         esac
13119         ;;
13120 yes)
13121         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13122
13123         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13124
13125         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13126                 && test -z "${cf_tst_cflags}" \
13127                 && cf_fix_cppflags=no
13128         ;;
13129 esac
13130 done
13131
13132 if test -n "$cf_new_cflags" ; then
13133
13134         CFLAGS="$CFLAGS $cf_new_cflags"
13135 fi
13136
13137 if test -n "$cf_new_cppflags" ; then
13138
13139         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13140 fi
13141
13142 if test -n "$cf_new_extra_cppflags" ; then
13143
13144         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13145 fi
13146
13147                 ;;
13148         esac
13149         ;;
13150 esac
13151
13152 echo "$as_me:13152: checking if you want to perform memory-leak testing" >&5
13153 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13154
13155 # Check whether --enable-leaks or --disable-leaks was given.
13156 if test "${enable_leaks+set}" = set; then
13157   enableval="$enable_leaks"
13158   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13159 else
13160   : ${with_no_leaks:=no}
13161 fi;
13162 echo "$as_me:13162: result: $with_no_leaks" >&5
13163 echo "${ECHO_T}$with_no_leaks" >&6
13164
13165 if test "$with_no_leaks" = yes ; then
13166
13167 cat >>confdefs.h <<\EOF
13168 #define NO_LEAKS 1
13169 EOF
13170
13171 cat >>confdefs.h <<\EOF
13172 #define YY_NO_LEAKS 1
13173 EOF
13174
13175 fi
13176
13177 cat >>confdefs.h <<\EOF
13178 #define HAVE_NC_ALLOC_H 1
13179 EOF
13180
13181 ###     use option --enable-expanded to generate certain macros as functions
13182
13183 # Check whether --enable-expanded or --disable-expanded was given.
13184 if test "${enable_expanded+set}" = set; then
13185   enableval="$enable_expanded"
13186   test "x$enableval" = xyes &&
13187 cat >>confdefs.h <<\EOF
13188 #define NCURSES_EXPANDED 1
13189 EOF
13190
13191 fi;
13192
13193 ###     use option --disable-macros to suppress macros in favor of functions
13194
13195 # Check whether --enable-macros or --disable-macros was given.
13196 if test "${enable_macros+set}" = set; then
13197   enableval="$enable_macros"
13198   test "$enableval" = no &&
13199 cat >>confdefs.h <<\EOF
13200 #define NCURSES_NOMACROS 1
13201 EOF
13202
13203 fi;
13204
13205 # Normally we only add trace() to the debug-library.  Allow this to be
13206 # extended to all models of the ncurses library:
13207 cf_all_traces=no
13208 case "$CFLAGS $CPPFLAGS" in
13209 *-DTRACE*)
13210         cf_all_traces=yes
13211         ;;
13212 esac
13213
13214 echo "$as_me:13214: checking whether to add trace feature to all models" >&5
13215 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13216
13217 # Check whether --with-trace or --without-trace was given.
13218 if test "${with_trace+set}" = set; then
13219   withval="$with_trace"
13220   cf_with_trace=$withval
13221 else
13222   cf_with_trace=$cf_all_traces
13223 fi;
13224 echo "$as_me:13224: result: $cf_with_trace" >&5
13225 echo "${ECHO_T}$cf_with_trace" >&6
13226
13227 if test "x$cf_with_trace" = xyes ; then
13228         LIB_TRACING=all
13229         ADA_TRACE=TRUE
13230
13231 cf_fix_cppflags=no
13232 cf_new_cflags=
13233 cf_new_cppflags=
13234 cf_new_extra_cppflags=
13235
13236 for cf_add_cflags in -DTRACE
13237 do
13238 case $cf_fix_cppflags in
13239 no)
13240         case $cf_add_cflags in #(vi
13241         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13242                 case $cf_add_cflags in
13243                 -D*)
13244                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13245
13246                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13247                                 && test -z "${cf_tst_cflags}" \
13248                                 && cf_fix_cppflags=yes
13249
13250                         if test $cf_fix_cppflags = yes ; then
13251                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13252                                 continue
13253                         elif test "${cf_tst_cflags}" = "\"'" ; then
13254                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13255                                 continue
13256                         fi
13257                         ;;
13258                 esac
13259                 case "$CPPFLAGS" in
13260                 *$cf_add_cflags) #(vi
13261                         ;;
13262                 *) #(vi
13263                         case $cf_add_cflags in #(vi
13264                         -D*)
13265                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13266
13267 CPPFLAGS=`echo "$CPPFLAGS" | \
13268         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13269                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13270
13271                                 ;;
13272                         esac
13273                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13274                         ;;
13275                 esac
13276                 ;;
13277         *)
13278                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13279                 ;;
13280         esac
13281         ;;
13282 yes)
13283         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13284
13285         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13286
13287         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13288                 && test -z "${cf_tst_cflags}" \
13289                 && cf_fix_cppflags=no
13290         ;;
13291 esac
13292 done
13293
13294 if test -n "$cf_new_cflags" ; then
13295
13296         CFLAGS="$CFLAGS $cf_new_cflags"
13297 fi
13298
13299 if test -n "$cf_new_cppflags" ; then
13300
13301         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13302 fi
13303
13304 if test -n "$cf_new_extra_cppflags" ; then
13305
13306         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13307 fi
13308
13309 else
13310         LIB_TRACING=DEBUG
13311         ADA_TRACE=FALSE
13312 fi
13313
13314 ###     Checks for libraries.
13315 case $cf_cv_system_name in #(vi
13316 *mingw32*) #(vi
13317         ;;
13318 *)
13319 echo "$as_me:13319: checking for gettimeofday" >&5
13320 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13321 if test "${ac_cv_func_gettimeofday+set}" = set; then
13322   echo $ECHO_N "(cached) $ECHO_C" >&6
13323 else
13324   cat >conftest.$ac_ext <<_ACEOF
13325 #line 13325 "configure"
13326 #include "confdefs.h"
13327 /* System header to define __stub macros and hopefully few prototypes,
13328     which can conflict with char gettimeofday (); below.  */
13329 #include <assert.h>
13330 /* Override any gcc2 internal prototype to avoid an error.  */
13331 #ifdef __cplusplus
13332 extern "C"
13333 #endif
13334 /* We use char because int might match the return type of a gcc2
13335    builtin and then its argument prototype would still apply.  */
13336 char gettimeofday ();
13337 char (*f) ();
13338
13339 int
13340 main ()
13341 {
13342 /* The GNU C library defines this for functions which it implements
13343     to always fail with ENOSYS.  Some functions are actually named
13344     something starting with __ and the normal name is an alias.  */
13345 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13346 choke me
13347 #else
13348 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13349 #endif
13350
13351   ;
13352   return 0;
13353 }
13354 _ACEOF
13355 rm -f conftest.$ac_objext conftest$ac_exeext
13356 if { (eval echo "$as_me:13356: \"$ac_link\"") >&5
13357   (eval $ac_link) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); } &&
13361          { ac_try='test -s conftest$ac_exeext'
13362   { (eval echo "$as_me:13362: \"$ac_try\"") >&5
13363   (eval $ac_try) 2>&5
13364   ac_status=$?
13365   echo "$as_me:13365: \$? = $ac_status" >&5
13366   (exit $ac_status); }; }; then
13367   ac_cv_func_gettimeofday=yes
13368 else
13369   echo "$as_me: failed program was:" >&5
13370 cat conftest.$ac_ext >&5
13371 ac_cv_func_gettimeofday=no
13372 fi
13373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13374 fi
13375 echo "$as_me:13375: result: $ac_cv_func_gettimeofday" >&5
13376 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13377 if test $ac_cv_func_gettimeofday = yes; then
13378
13379 cat >>confdefs.h <<\EOF
13380 #define HAVE_GETTIMEOFDAY 1
13381 EOF
13382
13383 else
13384
13385 echo "$as_me:13385: checking for gettimeofday in -lbsd" >&5
13386 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13387 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13388   echo $ECHO_N "(cached) $ECHO_C" >&6
13389 else
13390   ac_check_lib_save_LIBS=$LIBS
13391 LIBS="-lbsd  $LIBS"
13392 cat >conftest.$ac_ext <<_ACEOF
13393 #line 13393 "configure"
13394 #include "confdefs.h"
13395
13396 /* Override any gcc2 internal prototype to avoid an error.  */
13397 #ifdef __cplusplus
13398 extern "C"
13399 #endif
13400 /* We use char because int might match the return type of a gcc2
13401    builtin and then its argument prototype would still apply.  */
13402 char gettimeofday ();
13403 int
13404 main ()
13405 {
13406 gettimeofday ();
13407   ;
13408   return 0;
13409 }
13410 _ACEOF
13411 rm -f conftest.$ac_objext conftest$ac_exeext
13412 if { (eval echo "$as_me:13412: \"$ac_link\"") >&5
13413   (eval $ac_link) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); } &&
13417          { ac_try='test -s conftest$ac_exeext'
13418   { (eval echo "$as_me:13418: \"$ac_try\"") >&5
13419   (eval $ac_try) 2>&5
13420   ac_status=$?
13421   echo "$as_me:13421: \$? = $ac_status" >&5
13422   (exit $ac_status); }; }; then
13423   ac_cv_lib_bsd_gettimeofday=yes
13424 else
13425   echo "$as_me: failed program was:" >&5
13426 cat conftest.$ac_ext >&5
13427 ac_cv_lib_bsd_gettimeofday=no
13428 fi
13429 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13430 LIBS=$ac_check_lib_save_LIBS
13431 fi
13432 echo "$as_me:13432: result: $ac_cv_lib_bsd_gettimeofday" >&5
13433 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13434 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13435
13436 cat >>confdefs.h <<\EOF
13437 #define HAVE_GETTIMEOFDAY 1
13438 EOF
13439
13440         LIBS="-lbsd $LIBS"
13441 fi
13442
13443 fi
13444         ;;
13445 esac
13446
13447 echo "$as_me:13447: checking if -lm needed for math functions" >&5
13448 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13449 if test "${cf_cv_need_libm+set}" = set; then
13450   echo $ECHO_N "(cached) $ECHO_C" >&6
13451 else
13452
13453         cat >conftest.$ac_ext <<_ACEOF
13454 #line 13454 "configure"
13455 #include "confdefs.h"
13456
13457         #include <stdio.h>
13458         #include <math.h>
13459
13460 int
13461 main ()
13462 {
13463 double x = rand(); printf("result = %g\n", sin(x))
13464   ;
13465   return 0;
13466 }
13467 _ACEOF
13468 rm -f conftest.$ac_objext conftest$ac_exeext
13469 if { (eval echo "$as_me:13469: \"$ac_link\"") >&5
13470   (eval $ac_link) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } &&
13474          { ac_try='test -s conftest$ac_exeext'
13475   { (eval echo "$as_me:13475: \"$ac_try\"") >&5
13476   (eval $ac_try) 2>&5
13477   ac_status=$?
13478   echo "$as_me:13478: \$? = $ac_status" >&5
13479   (exit $ac_status); }; }; then
13480   cf_cv_need_libm=no
13481 else
13482   echo "$as_me: failed program was:" >&5
13483 cat conftest.$ac_ext >&5
13484 cf_cv_need_libm=yes
13485 fi
13486 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13487 fi
13488 echo "$as_me:13488: result: $cf_cv_need_libm" >&5
13489 echo "${ECHO_T}$cf_cv_need_libm" >&6
13490 if test "$cf_cv_need_libm" = yes
13491 then
13492 MATH_LIB=-lm
13493 fi
13494
13495 ###     Checks for header files.
13496 echo "$as_me:13496: checking for ANSI C header files" >&5
13497 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13498 if test "${ac_cv_header_stdc+set}" = set; then
13499   echo $ECHO_N "(cached) $ECHO_C" >&6
13500 else
13501   cat >conftest.$ac_ext <<_ACEOF
13502 #line 13502 "configure"
13503 #include "confdefs.h"
13504 #include <stdlib.h>
13505 #include <stdarg.h>
13506 #include <string.h>
13507 #include <float.h>
13508
13509 _ACEOF
13510 if { (eval echo "$as_me:13510: \"$ac_cpp conftest.$ac_ext\"") >&5
13511   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13512   ac_status=$?
13513   egrep -v '^ *\+' conftest.er1 >conftest.err
13514   rm -f conftest.er1
13515   cat conftest.err >&5
13516   echo "$as_me:13516: \$? = $ac_status" >&5
13517   (exit $ac_status); } >/dev/null; then
13518   if test -s conftest.err; then
13519     ac_cpp_err=$ac_c_preproc_warn_flag
13520   else
13521     ac_cpp_err=
13522   fi
13523 else
13524   ac_cpp_err=yes
13525 fi
13526 if test -z "$ac_cpp_err"; then
13527   ac_cv_header_stdc=yes
13528 else
13529   echo "$as_me: failed program was:" >&5
13530   cat conftest.$ac_ext >&5
13531   ac_cv_header_stdc=no
13532 fi
13533 rm -f conftest.err conftest.$ac_ext
13534
13535 if test $ac_cv_header_stdc = yes; then
13536   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13537   cat >conftest.$ac_ext <<_ACEOF
13538 #line 13538 "configure"
13539 #include "confdefs.h"
13540 #include <string.h>
13541
13542 _ACEOF
13543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13544   egrep "memchr" >/dev/null 2>&1; then
13545   :
13546 else
13547   ac_cv_header_stdc=no
13548 fi
13549 rm -rf conftest*
13550
13551 fi
13552
13553 if test $ac_cv_header_stdc = yes; then
13554   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13555   cat >conftest.$ac_ext <<_ACEOF
13556 #line 13556 "configure"
13557 #include "confdefs.h"
13558 #include <stdlib.h>
13559
13560 _ACEOF
13561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13562   egrep "free" >/dev/null 2>&1; then
13563   :
13564 else
13565   ac_cv_header_stdc=no
13566 fi
13567 rm -rf conftest*
13568
13569 fi
13570
13571 if test $ac_cv_header_stdc = yes; then
13572   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13573   if test "$cross_compiling" = yes; then
13574   :
13575 else
13576   cat >conftest.$ac_ext <<_ACEOF
13577 #line 13577 "configure"
13578 #include "confdefs.h"
13579 #include <ctype.h>
13580 #if ((' ' & 0x0FF) == 0x020)
13581 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13582 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13583 #else
13584 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13585                      || ('j' <= (c) && (c) <= 'r') \
13586                      || ('s' <= (c) && (c) <= 'z'))
13587 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13588 #endif
13589
13590 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13591 int
13592 main ()
13593 {
13594   int i;
13595   for (i = 0; i < 256; i++)
13596     if (XOR (islower (i), ISLOWER (i))
13597         || toupper (i) != TOUPPER (i))
13598       $ac_main_return(2);
13599   $ac_main_return (0);
13600 }
13601 _ACEOF
13602 rm -f conftest$ac_exeext
13603 if { (eval echo "$as_me:13603: \"$ac_link\"") >&5
13604   (eval $ac_link) 2>&5
13605   ac_status=$?
13606   echo "$as_me:13606: \$? = $ac_status" >&5
13607   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13608   { (eval echo "$as_me:13608: \"$ac_try\"") >&5
13609   (eval $ac_try) 2>&5
13610   ac_status=$?
13611   echo "$as_me:13611: \$? = $ac_status" >&5
13612   (exit $ac_status); }; }; then
13613   :
13614 else
13615   echo "$as_me: program exited with status $ac_status" >&5
13616 echo "$as_me: failed program was:" >&5
13617 cat conftest.$ac_ext >&5
13618 ac_cv_header_stdc=no
13619 fi
13620 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13621 fi
13622 fi
13623 fi
13624 echo "$as_me:13624: result: $ac_cv_header_stdc" >&5
13625 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13626 if test $ac_cv_header_stdc = yes; then
13627
13628 cat >>confdefs.h <<\EOF
13629 #define STDC_HEADERS 1
13630 EOF
13631
13632 fi
13633
13634 ac_header_dirent=no
13635 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13636   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13637 echo "$as_me:13637: checking for $ac_hdr that defines DIR" >&5
13638 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13639 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13640   echo $ECHO_N "(cached) $ECHO_C" >&6
13641 else
13642   cat >conftest.$ac_ext <<_ACEOF
13643 #line 13643 "configure"
13644 #include "confdefs.h"
13645 #include <sys/types.h>
13646 #include <$ac_hdr>
13647
13648 int
13649 main ()
13650 {
13651 if ((DIR *) 0)
13652 return 0;
13653   ;
13654   return 0;
13655 }
13656 _ACEOF
13657 rm -f conftest.$ac_objext
13658 if { (eval echo "$as_me:13658: \"$ac_compile\"") >&5
13659   (eval $ac_compile) 2>&5
13660   ac_status=$?
13661   echo "$as_me:13661: \$? = $ac_status" >&5
13662   (exit $ac_status); } &&
13663          { ac_try='test -s conftest.$ac_objext'
13664   { (eval echo "$as_me:13664: \"$ac_try\"") >&5
13665   (eval $ac_try) 2>&5
13666   ac_status=$?
13667   echo "$as_me:13667: \$? = $ac_status" >&5
13668   (exit $ac_status); }; }; then
13669   eval "$as_ac_Header=yes"
13670 else
13671   echo "$as_me: failed program was:" >&5
13672 cat conftest.$ac_ext >&5
13673 eval "$as_ac_Header=no"
13674 fi
13675 rm -f conftest.$ac_objext conftest.$ac_ext
13676 fi
13677 echo "$as_me:13677: result: `eval echo '${'$as_ac_Header'}'`" >&5
13678 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13679 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13680   cat >>confdefs.h <<EOF
13681 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13682 EOF
13683
13684 ac_header_dirent=$ac_hdr; break
13685 fi
13686
13687 done
13688 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13689 if test $ac_header_dirent = dirent.h; then
13690   echo "$as_me:13690: checking for opendir in -ldir" >&5
13691 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13692 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13693   echo $ECHO_N "(cached) $ECHO_C" >&6
13694 else
13695   ac_check_lib_save_LIBS=$LIBS
13696 LIBS="-ldir  $LIBS"
13697 cat >conftest.$ac_ext <<_ACEOF
13698 #line 13698 "configure"
13699 #include "confdefs.h"
13700
13701 /* Override any gcc2 internal prototype to avoid an error.  */
13702 #ifdef __cplusplus
13703 extern "C"
13704 #endif
13705 /* We use char because int might match the return type of a gcc2
13706    builtin and then its argument prototype would still apply.  */
13707 char opendir ();
13708 int
13709 main ()
13710 {
13711 opendir ();
13712   ;
13713   return 0;
13714 }
13715 _ACEOF
13716 rm -f conftest.$ac_objext conftest$ac_exeext
13717 if { (eval echo "$as_me:13717: \"$ac_link\"") >&5
13718   (eval $ac_link) 2>&5
13719   ac_status=$?
13720   echo "$as_me:13720: \$? = $ac_status" >&5
13721   (exit $ac_status); } &&
13722          { ac_try='test -s conftest$ac_exeext'
13723   { (eval echo "$as_me:13723: \"$ac_try\"") >&5
13724   (eval $ac_try) 2>&5
13725   ac_status=$?
13726   echo "$as_me:13726: \$? = $ac_status" >&5
13727   (exit $ac_status); }; }; then
13728   ac_cv_lib_dir_opendir=yes
13729 else
13730   echo "$as_me: failed program was:" >&5
13731 cat conftest.$ac_ext >&5
13732 ac_cv_lib_dir_opendir=no
13733 fi
13734 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13735 LIBS=$ac_check_lib_save_LIBS
13736 fi
13737 echo "$as_me:13737: result: $ac_cv_lib_dir_opendir" >&5
13738 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13739 if test $ac_cv_lib_dir_opendir = yes; then
13740   LIBS="$LIBS -ldir"
13741 fi
13742
13743 else
13744   echo "$as_me:13744: checking for opendir in -lx" >&5
13745 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13746 if test "${ac_cv_lib_x_opendir+set}" = set; then
13747   echo $ECHO_N "(cached) $ECHO_C" >&6
13748 else
13749   ac_check_lib_save_LIBS=$LIBS
13750 LIBS="-lx  $LIBS"
13751 cat >conftest.$ac_ext <<_ACEOF
13752 #line 13752 "configure"
13753 #include "confdefs.h"
13754
13755 /* Override any gcc2 internal prototype to avoid an error.  */
13756 #ifdef __cplusplus
13757 extern "C"
13758 #endif
13759 /* We use char because int might match the return type of a gcc2
13760    builtin and then its argument prototype would still apply.  */
13761 char opendir ();
13762 int
13763 main ()
13764 {
13765 opendir ();
13766   ;
13767   return 0;
13768 }
13769 _ACEOF
13770 rm -f conftest.$ac_objext conftest$ac_exeext
13771 if { (eval echo "$as_me:13771: \"$ac_link\"") >&5
13772   (eval $ac_link) 2>&5
13773   ac_status=$?
13774   echo "$as_me:13774: \$? = $ac_status" >&5
13775   (exit $ac_status); } &&
13776          { ac_try='test -s conftest$ac_exeext'
13777   { (eval echo "$as_me:13777: \"$ac_try\"") >&5
13778   (eval $ac_try) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); }; }; then
13782   ac_cv_lib_x_opendir=yes
13783 else
13784   echo "$as_me: failed program was:" >&5
13785 cat conftest.$ac_ext >&5
13786 ac_cv_lib_x_opendir=no
13787 fi
13788 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13789 LIBS=$ac_check_lib_save_LIBS
13790 fi
13791 echo "$as_me:13791: result: $ac_cv_lib_x_opendir" >&5
13792 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13793 if test $ac_cv_lib_x_opendir = yes; then
13794   LIBS="$LIBS -lx"
13795 fi
13796
13797 fi
13798
13799 echo "$as_me:13799: checking whether time.h and sys/time.h may both be included" >&5
13800 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13801 if test "${ac_cv_header_time+set}" = set; then
13802   echo $ECHO_N "(cached) $ECHO_C" >&6
13803 else
13804   cat >conftest.$ac_ext <<_ACEOF
13805 #line 13805 "configure"
13806 #include "confdefs.h"
13807 #include <sys/types.h>
13808 #include <sys/time.h>
13809 #include <time.h>
13810
13811 int
13812 main ()
13813 {
13814 if ((struct tm *) 0)
13815 return 0;
13816   ;
13817   return 0;
13818 }
13819 _ACEOF
13820 rm -f conftest.$ac_objext
13821 if { (eval echo "$as_me:13821: \"$ac_compile\"") >&5
13822   (eval $ac_compile) 2>&5
13823   ac_status=$?
13824   echo "$as_me:13824: \$? = $ac_status" >&5
13825   (exit $ac_status); } &&
13826          { ac_try='test -s conftest.$ac_objext'
13827   { (eval echo "$as_me:13827: \"$ac_try\"") >&5
13828   (eval $ac_try) 2>&5
13829   ac_status=$?
13830   echo "$as_me:13830: \$? = $ac_status" >&5
13831   (exit $ac_status); }; }; then
13832   ac_cv_header_time=yes
13833 else
13834   echo "$as_me: failed program was:" >&5
13835 cat conftest.$ac_ext >&5
13836 ac_cv_header_time=no
13837 fi
13838 rm -f conftest.$ac_objext conftest.$ac_ext
13839 fi
13840 echo "$as_me:13840: result: $ac_cv_header_time" >&5
13841 echo "${ECHO_T}$ac_cv_header_time" >&6
13842 if test $ac_cv_header_time = yes; then
13843
13844 cat >>confdefs.h <<\EOF
13845 #define TIME_WITH_SYS_TIME 1
13846 EOF
13847
13848 fi
13849
13850 cf_regex_func=no
13851
13852 cf_regex_libs="regex re"
13853 case $host_os in #(vi
13854 mingw*)
13855         cf_regex_libs="gnurx $cf_regex_libs"
13856         ;;
13857 esac
13858
13859 echo "$as_me:13859: checking for regcomp" >&5
13860 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13861 if test "${ac_cv_func_regcomp+set}" = set; then
13862   echo $ECHO_N "(cached) $ECHO_C" >&6
13863 else
13864   cat >conftest.$ac_ext <<_ACEOF
13865 #line 13865 "configure"
13866 #include "confdefs.h"
13867 /* System header to define __stub macros and hopefully few prototypes,
13868     which can conflict with char regcomp (); below.  */
13869 #include <assert.h>
13870 /* Override any gcc2 internal prototype to avoid an error.  */
13871 #ifdef __cplusplus
13872 extern "C"
13873 #endif
13874 /* We use char because int might match the return type of a gcc2
13875    builtin and then its argument prototype would still apply.  */
13876 char regcomp ();
13877 char (*f) ();
13878
13879 int
13880 main ()
13881 {
13882 /* The GNU C library defines this for functions which it implements
13883     to always fail with ENOSYS.  Some functions are actually named
13884     something starting with __ and the normal name is an alias.  */
13885 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13886 choke me
13887 #else
13888 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13889 #endif
13890
13891   ;
13892   return 0;
13893 }
13894 _ACEOF
13895 rm -f conftest.$ac_objext conftest$ac_exeext
13896 if { (eval echo "$as_me:13896: \"$ac_link\"") >&5
13897   (eval $ac_link) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit $ac_status); } &&
13901          { ac_try='test -s conftest$ac_exeext'
13902   { (eval echo "$as_me:13902: \"$ac_try\"") >&5
13903   (eval $ac_try) 2>&5
13904   ac_status=$?
13905   echo "$as_me:13905: \$? = $ac_status" >&5
13906   (exit $ac_status); }; }; then
13907   ac_cv_func_regcomp=yes
13908 else
13909   echo "$as_me: failed program was:" >&5
13910 cat conftest.$ac_ext >&5
13911 ac_cv_func_regcomp=no
13912 fi
13913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13914 fi
13915 echo "$as_me:13915: result: $ac_cv_func_regcomp" >&5
13916 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13917 if test $ac_cv_func_regcomp = yes; then
13918   cf_regex_func=regcomp
13919 else
13920
13921         for cf_regex_lib in $cf_regex_libs
13922         do
13923                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13924 echo "$as_me:13924: checking for regcomp in -l$cf_regex_lib" >&5
13925 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13926 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13927   echo $ECHO_N "(cached) $ECHO_C" >&6
13928 else
13929   ac_check_lib_save_LIBS=$LIBS
13930 LIBS="-l$cf_regex_lib  $LIBS"
13931 cat >conftest.$ac_ext <<_ACEOF
13932 #line 13932 "configure"
13933 #include "confdefs.h"
13934
13935 /* Override any gcc2 internal prototype to avoid an error.  */
13936 #ifdef __cplusplus
13937 extern "C"
13938 #endif
13939 /* We use char because int might match the return type of a gcc2
13940    builtin and then its argument prototype would still apply.  */
13941 char regcomp ();
13942 int
13943 main ()
13944 {
13945 regcomp ();
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -f conftest.$ac_objext conftest$ac_exeext
13951 if { (eval echo "$as_me:13951: \"$ac_link\"") >&5
13952   (eval $ac_link) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -s conftest$ac_exeext'
13957   { (eval echo "$as_me:13957: \"$ac_try\"") >&5
13958   (eval $ac_try) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit $ac_status); }; }; then
13962   eval "$as_ac_Lib=yes"
13963 else
13964   echo "$as_me: failed program was:" >&5
13965 cat conftest.$ac_ext >&5
13966 eval "$as_ac_Lib=no"
13967 fi
13968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13969 LIBS=$ac_check_lib_save_LIBS
13970 fi
13971 echo "$as_me:13971: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13972 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13973 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13974
13975                                 LIBS="-l$cf_regex_lib $LIBS"
13976                                 cf_regex_func=regcomp
13977                                 break
13978 fi
13979
13980         done
13981
13982 fi
13983
13984 if test "$cf_regex_func" = no ; then
13985         echo "$as_me:13985: checking for compile" >&5
13986 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13987 if test "${ac_cv_func_compile+set}" = set; then
13988   echo $ECHO_N "(cached) $ECHO_C" >&6
13989 else
13990   cat >conftest.$ac_ext <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 /* System header to define __stub macros and hopefully few prototypes,
13994     which can conflict with char compile (); below.  */
13995 #include <assert.h>
13996 /* Override any gcc2 internal prototype to avoid an error.  */
13997 #ifdef __cplusplus
13998 extern "C"
13999 #endif
14000 /* We use char because int might match the return type of a gcc2
14001    builtin and then its argument prototype would still apply.  */
14002 char compile ();
14003 char (*f) ();
14004
14005 int
14006 main ()
14007 {
14008 /* The GNU C library defines this for functions which it implements
14009     to always fail with ENOSYS.  Some functions are actually named
14010     something starting with __ and the normal name is an alias.  */
14011 #if defined (__stub_compile) || defined (__stub___compile)
14012 choke me
14013 #else
14014 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14015 #endif
14016
14017   ;
14018   return 0;
14019 }
14020 _ACEOF
14021 rm -f conftest.$ac_objext conftest$ac_exeext
14022 if { (eval echo "$as_me:14022: \"$ac_link\"") >&5
14023   (eval $ac_link) 2>&5
14024   ac_status=$?
14025   echo "$as_me:14025: \$? = $ac_status" >&5
14026   (exit $ac_status); } &&
14027          { ac_try='test -s conftest$ac_exeext'
14028   { (eval echo "$as_me:14028: \"$ac_try\"") >&5
14029   (eval $ac_try) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); }; }; then
14033   ac_cv_func_compile=yes
14034 else
14035   echo "$as_me: failed program was:" >&5
14036 cat conftest.$ac_ext >&5
14037 ac_cv_func_compile=no
14038 fi
14039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14040 fi
14041 echo "$as_me:14041: result: $ac_cv_func_compile" >&5
14042 echo "${ECHO_T}$ac_cv_func_compile" >&6
14043 if test $ac_cv_func_compile = yes; then
14044   cf_regex_func=compile
14045 else
14046
14047                 echo "$as_me:14047: checking for compile in -lgen" >&5
14048 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14049 if test "${ac_cv_lib_gen_compile+set}" = set; then
14050   echo $ECHO_N "(cached) $ECHO_C" >&6
14051 else
14052   ac_check_lib_save_LIBS=$LIBS
14053 LIBS="-lgen  $LIBS"
14054 cat >conftest.$ac_ext <<_ACEOF
14055 #line 14055 "configure"
14056 #include "confdefs.h"
14057
14058 /* Override any gcc2 internal prototype to avoid an error.  */
14059 #ifdef __cplusplus
14060 extern "C"
14061 #endif
14062 /* We use char because int might match the return type of a gcc2
14063    builtin and then its argument prototype would still apply.  */
14064 char compile ();
14065 int
14066 main ()
14067 {
14068 compile ();
14069   ;
14070   return 0;
14071 }
14072 _ACEOF
14073 rm -f conftest.$ac_objext conftest$ac_exeext
14074 if { (eval echo "$as_me:14074: \"$ac_link\"") >&5
14075   (eval $ac_link) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest$ac_exeext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085   ac_cv_lib_gen_compile=yes
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat conftest.$ac_ext >&5
14089 ac_cv_lib_gen_compile=no
14090 fi
14091 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14092 LIBS=$ac_check_lib_save_LIBS
14093 fi
14094 echo "$as_me:14094: result: $ac_cv_lib_gen_compile" >&5
14095 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14096 if test $ac_cv_lib_gen_compile = yes; then
14097
14098                                 LIBS="-lgen $LIBS"
14099                                 cf_regex_func=compile
14100 fi
14101
14102 fi
14103
14104 fi
14105
14106 if test "$cf_regex_func" = no ; then
14107         { echo "$as_me:14107: WARNING: cannot find regular expression library" >&5
14108 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14109 fi
14110
14111 echo "$as_me:14111: checking for regular-expression headers" >&5
14112 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14113 if test "${cf_cv_regex_hdrs+set}" = set; then
14114   echo $ECHO_N "(cached) $ECHO_C" >&6
14115 else
14116
14117 cf_cv_regex_hdrs=no
14118 case $cf_regex_func in #(vi
14119 compile) #(vi
14120         for cf_regex_hdr in regexp.h regexpr.h
14121         do
14122                 cat >conftest.$ac_ext <<_ACEOF
14123 #line 14123 "configure"
14124 #include "confdefs.h"
14125 #include <$cf_regex_hdr>
14126 int
14127 main ()
14128 {
14129
14130                         char *p = compile("", "", "", 0);
14131                         int x = step("", "");
14132
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 rm -f conftest.$ac_objext conftest$ac_exeext
14138 if { (eval echo "$as_me:14138: \"$ac_link\"") >&5
14139   (eval $ac_link) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit $ac_status); } &&
14143          { ac_try='test -s conftest$ac_exeext'
14144   { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145   (eval $ac_try) 2>&5
14146   ac_status=$?
14147   echo "$as_me:14147: \$? = $ac_status" >&5
14148   (exit $ac_status); }; }; then
14149
14150                         cf_cv_regex_hdrs=$cf_regex_hdr
14151                         break
14152
14153 else
14154   echo "$as_me: failed program was:" >&5
14155 cat conftest.$ac_ext >&5
14156 fi
14157 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14158         done
14159         ;;
14160 *)
14161         for cf_regex_hdr in regex.h
14162         do
14163                 cat >conftest.$ac_ext <<_ACEOF
14164 #line 14164 "configure"
14165 #include "confdefs.h"
14166 #include <sys/types.h>
14167 #include <$cf_regex_hdr>
14168 int
14169 main ()
14170 {
14171
14172                         regex_t *p;
14173                         int x = regcomp(p, "", 0);
14174                         int y = regexec(p, "", 0, 0, 0);
14175                         regfree(p);
14176
14177   ;
14178   return 0;
14179 }
14180 _ACEOF
14181 rm -f conftest.$ac_objext conftest$ac_exeext
14182 if { (eval echo "$as_me:14182: \"$ac_link\"") >&5
14183   (eval $ac_link) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit $ac_status); } &&
14187          { ac_try='test -s conftest$ac_exeext'
14188   { (eval echo "$as_me:14188: \"$ac_try\"") >&5
14189   (eval $ac_try) 2>&5
14190   ac_status=$?
14191   echo "$as_me:14191: \$? = $ac_status" >&5
14192   (exit $ac_status); }; }; then
14193
14194                         cf_cv_regex_hdrs=$cf_regex_hdr
14195                         break
14196
14197 else
14198   echo "$as_me: failed program was:" >&5
14199 cat conftest.$ac_ext >&5
14200 fi
14201 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14202         done
14203         ;;
14204 esac
14205
14206 fi
14207 echo "$as_me:14207: result: $cf_cv_regex_hdrs" >&5
14208 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14209
14210 case $cf_cv_regex_hdrs in #(vi
14211     no)        { echo "$as_me:14211: WARNING: no regular expression header found" >&5
14212 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14213     regex.h)
14214 cat >>confdefs.h <<\EOF
14215 #define HAVE_REGEX_H_FUNCS 1
14216 EOF
14217  ;; #(vi
14218     regexp.h)
14219 cat >>confdefs.h <<\EOF
14220 #define HAVE_REGEXP_H_FUNCS 1
14221 EOF
14222  ;; #(vi
14223     regexpr.h)
14224 cat >>confdefs.h <<\EOF
14225 #define HAVE_REGEXPR_H_FUNCS 1
14226 EOF
14227  ;;
14228 esac
14229
14230 for ac_header in \
14231 fcntl.h \
14232 getopt.h \
14233 limits.h \
14234 locale.h \
14235 math.h \
14236 poll.h \
14237 sys/bsdtypes.h \
14238 sys/ioctl.h \
14239 sys/param.h \
14240 sys/poll.h \
14241 sys/select.h \
14242 sys/time.h \
14243 sys/times.h \
14244 ttyent.h \
14245 unistd.h \
14246 wctype.h \
14247
14248 do
14249 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14250 echo "$as_me:14250: checking for $ac_header" >&5
14251 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14252 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14253   echo $ECHO_N "(cached) $ECHO_C" >&6
14254 else
14255   cat >conftest.$ac_ext <<_ACEOF
14256 #line 14256 "configure"
14257 #include "confdefs.h"
14258 #include <$ac_header>
14259 _ACEOF
14260 if { (eval echo "$as_me:14260: \"$ac_cpp conftest.$ac_ext\"") >&5
14261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14262   ac_status=$?
14263   egrep -v '^ *\+' conftest.er1 >conftest.err
14264   rm -f conftest.er1
14265   cat conftest.err >&5
14266   echo "$as_me:14266: \$? = $ac_status" >&5
14267   (exit $ac_status); } >/dev/null; then
14268   if test -s conftest.err; then
14269     ac_cpp_err=$ac_c_preproc_warn_flag
14270   else
14271     ac_cpp_err=
14272   fi
14273 else
14274   ac_cpp_err=yes
14275 fi
14276 if test -z "$ac_cpp_err"; then
14277   eval "$as_ac_Header=yes"
14278 else
14279   echo "$as_me: failed program was:" >&5
14280   cat conftest.$ac_ext >&5
14281   eval "$as_ac_Header=no"
14282 fi
14283 rm -f conftest.err conftest.$ac_ext
14284 fi
14285 echo "$as_me:14285: result: `eval echo '${'$as_ac_Header'}'`" >&5
14286 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14287 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14288   cat >>confdefs.h <<EOF
14289 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14290 EOF
14291
14292 fi
14293 done
14294
14295 for ac_header in unistd.h getopt.h
14296 do
14297 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14298 echo "$as_me:14298: checking for $ac_header" >&5
14299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14301   echo $ECHO_N "(cached) $ECHO_C" >&6
14302 else
14303   cat >conftest.$ac_ext <<_ACEOF
14304 #line 14304 "configure"
14305 #include "confdefs.h"
14306 #include <$ac_header>
14307 _ACEOF
14308 if { (eval echo "$as_me:14308: \"$ac_cpp conftest.$ac_ext\"") >&5
14309   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14310   ac_status=$?
14311   egrep -v '^ *\+' conftest.er1 >conftest.err
14312   rm -f conftest.er1
14313   cat conftest.err >&5
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); } >/dev/null; then
14316   if test -s conftest.err; then
14317     ac_cpp_err=$ac_c_preproc_warn_flag
14318   else
14319     ac_cpp_err=
14320   fi
14321 else
14322   ac_cpp_err=yes
14323 fi
14324 if test -z "$ac_cpp_err"; then
14325   eval "$as_ac_Header=yes"
14326 else
14327   echo "$as_me: failed program was:" >&5
14328   cat conftest.$ac_ext >&5
14329   eval "$as_ac_Header=no"
14330 fi
14331 rm -f conftest.err conftest.$ac_ext
14332 fi
14333 echo "$as_me:14333: result: `eval echo '${'$as_ac_Header'}'`" >&5
14334 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14335 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14336   cat >>confdefs.h <<EOF
14337 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14338 EOF
14339
14340 fi
14341 done
14342
14343 echo "$as_me:14343: checking for header declaring getopt variables" >&5
14344 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14345 if test "${cf_cv_getopt_header+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348
14349 cf_cv_getopt_header=none
14350 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14351 do
14352 cat >conftest.$ac_ext <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355
14356 #include <$cf_header>
14357 int
14358 main ()
14359 {
14360 int x = optind; char *y = optarg
14361   ;
14362   return 0;
14363 }
14364 _ACEOF
14365 rm -f conftest.$ac_objext
14366 if { (eval echo "$as_me:14366: \"$ac_compile\"") >&5
14367   (eval $ac_compile) 2>&5
14368   ac_status=$?
14369   echo "$as_me:14369: \$? = $ac_status" >&5
14370   (exit $ac_status); } &&
14371          { ac_try='test -s conftest.$ac_objext'
14372   { (eval echo "$as_me:14372: \"$ac_try\"") >&5
14373   (eval $ac_try) 2>&5
14374   ac_status=$?
14375   echo "$as_me:14375: \$? = $ac_status" >&5
14376   (exit $ac_status); }; }; then
14377   cf_cv_getopt_header=$cf_header
14378  break
14379 else
14380   echo "$as_me: failed program was:" >&5
14381 cat conftest.$ac_ext >&5
14382 fi
14383 rm -f conftest.$ac_objext conftest.$ac_ext
14384 done
14385
14386 fi
14387 echo "$as_me:14387: result: $cf_cv_getopt_header" >&5
14388 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14389 if test $cf_cv_getopt_header != none ; then
14390
14391 cat >>confdefs.h <<\EOF
14392 #define HAVE_GETOPT_HEADER 1
14393 EOF
14394
14395 fi
14396
14397 # check for ISC (this may also define _POSIX_SOURCE)
14398 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14399 if test "x$ISC" = xyes ; then
14400
14401 echo "$as_me:14401: checking for main in -lcposix" >&5
14402 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14403 if test "${ac_cv_lib_cposix_main+set}" = set; then
14404   echo $ECHO_N "(cached) $ECHO_C" >&6
14405 else
14406   ac_check_lib_save_LIBS=$LIBS
14407 LIBS="-lcposix  $LIBS"
14408 cat >conftest.$ac_ext <<_ACEOF
14409 #line 14409 "configure"
14410 #include "confdefs.h"
14411
14412 int
14413 main ()
14414 {
14415 main ();
14416   ;
14417   return 0;
14418 }
14419 _ACEOF
14420 rm -f conftest.$ac_objext conftest$ac_exeext
14421 if { (eval echo "$as_me:14421: \"$ac_link\"") >&5
14422   (eval $ac_link) 2>&5
14423   ac_status=$?
14424   echo "$as_me:14424: \$? = $ac_status" >&5
14425   (exit $ac_status); } &&
14426          { ac_try='test -s conftest$ac_exeext'
14427   { (eval echo "$as_me:14427: \"$ac_try\"") >&5
14428   (eval $ac_try) 2>&5
14429   ac_status=$?
14430   echo "$as_me:14430: \$? = $ac_status" >&5
14431   (exit $ac_status); }; }; then
14432   ac_cv_lib_cposix_main=yes
14433 else
14434   echo "$as_me: failed program was:" >&5
14435 cat conftest.$ac_ext >&5
14436 ac_cv_lib_cposix_main=no
14437 fi
14438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14439 LIBS=$ac_check_lib_save_LIBS
14440 fi
14441 echo "$as_me:14441: result: $ac_cv_lib_cposix_main" >&5
14442 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14443 if test $ac_cv_lib_cposix_main = yes; then
14444   cat >>confdefs.h <<EOF
14445 #define HAVE_LIBCPOSIX 1
14446 EOF
14447
14448   LIBS="-lcposix $LIBS"
14449
14450 fi
14451
14452         echo "$as_me:14452: checking for bzero in -linet" >&5
14453 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14454 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14455   echo $ECHO_N "(cached) $ECHO_C" >&6
14456 else
14457   ac_check_lib_save_LIBS=$LIBS
14458 LIBS="-linet  $LIBS"
14459 cat >conftest.$ac_ext <<_ACEOF
14460 #line 14460 "configure"
14461 #include "confdefs.h"
14462
14463 /* Override any gcc2 internal prototype to avoid an error.  */
14464 #ifdef __cplusplus
14465 extern "C"
14466 #endif
14467 /* We use char because int might match the return type of a gcc2
14468    builtin and then its argument prototype would still apply.  */
14469 char bzero ();
14470 int
14471 main ()
14472 {
14473 bzero ();
14474   ;
14475   return 0;
14476 }
14477 _ACEOF
14478 rm -f conftest.$ac_objext conftest$ac_exeext
14479 if { (eval echo "$as_me:14479: \"$ac_link\"") >&5
14480   (eval $ac_link) 2>&5
14481   ac_status=$?
14482   echo "$as_me:14482: \$? = $ac_status" >&5
14483   (exit $ac_status); } &&
14484          { ac_try='test -s conftest$ac_exeext'
14485   { (eval echo "$as_me:14485: \"$ac_try\"") >&5
14486   (eval $ac_try) 2>&5
14487   ac_status=$?
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); }; }; then
14490   ac_cv_lib_inet_bzero=yes
14491 else
14492   echo "$as_me: failed program was:" >&5
14493 cat conftest.$ac_ext >&5
14494 ac_cv_lib_inet_bzero=no
14495 fi
14496 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14497 LIBS=$ac_check_lib_save_LIBS
14498 fi
14499 echo "$as_me:14499: result: $ac_cv_lib_inet_bzero" >&5
14500 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14501 if test $ac_cv_lib_inet_bzero = yes; then
14502   LIBS="-linet $LIBS"
14503 fi
14504 fi
14505
14506 echo "$as_me:14506: checking if sys/time.h works with sys/select.h" >&5
14507 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14508 if test "${cf_cv_sys_time_select+set}" = set; then
14509   echo $ECHO_N "(cached) $ECHO_C" >&6
14510 else
14511
14512 cat >conftest.$ac_ext <<_ACEOF
14513 #line 14513 "configure"
14514 #include "confdefs.h"
14515
14516 #include <sys/types.h>
14517 #ifdef HAVE_SYS_TIME_H
14518 #include <sys/time.h>
14519 #endif
14520 #ifdef HAVE_SYS_SELECT_H
14521 #include <sys/select.h>
14522 #endif
14523
14524 int
14525 main ()
14526 {
14527
14528   ;
14529   return 0;
14530 }
14531 _ACEOF
14532 rm -f conftest.$ac_objext
14533 if { (eval echo "$as_me:14533: \"$ac_compile\"") >&5
14534   (eval $ac_compile) 2>&5
14535   ac_status=$?
14536   echo "$as_me:14536: \$? = $ac_status" >&5
14537   (exit $ac_status); } &&
14538          { ac_try='test -s conftest.$ac_objext'
14539   { (eval echo "$as_me:14539: \"$ac_try\"") >&5
14540   (eval $ac_try) 2>&5
14541   ac_status=$?
14542   echo "$as_me:14542: \$? = $ac_status" >&5
14543   (exit $ac_status); }; }; then
14544   cf_cv_sys_time_select=yes
14545 else
14546   echo "$as_me: failed program was:" >&5
14547 cat conftest.$ac_ext >&5
14548 cf_cv_sys_time_select=no
14549 fi
14550 rm -f conftest.$ac_objext conftest.$ac_ext
14551
14552 fi
14553
14554 echo "$as_me:14554: result: $cf_cv_sys_time_select" >&5
14555 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14556 test "$cf_cv_sys_time_select" = yes &&
14557 cat >>confdefs.h <<\EOF
14558 #define HAVE_SYS_TIME_SELECT 1
14559 EOF
14560
14561 ###     checks for compiler characteristics
14562 ac_ext=c
14563 ac_cpp='$CPP $CPPFLAGS'
14564 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14565 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14566 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14567 ac_main_return=return
14568
14569 echo "$as_me:14569: checking for an ANSI C-conforming const" >&5
14570 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14571 if test "${ac_cv_c_const+set}" = set; then
14572   echo $ECHO_N "(cached) $ECHO_C" >&6
14573 else
14574   cat >conftest.$ac_ext <<_ACEOF
14575 #line 14575 "configure"
14576 #include "confdefs.h"
14577
14578 int
14579 main ()
14580 {
14581 /* FIXME: Include the comments suggested by Paul. */
14582 #ifndef __cplusplus
14583   /* Ultrix mips cc rejects this.  */
14584   typedef int charset[2];
14585   const charset x;
14586   /* SunOS 4.1.1 cc rejects this.  */
14587   char const *const *ccp;
14588   char **p;
14589   /* NEC SVR4.0.2 mips cc rejects this.  */
14590   struct point {int x, y;};
14591   static struct point const zero = {0,0};
14592   /* AIX XL C 1.02.0.0 rejects this.
14593      It does not let you subtract one const X* pointer from another in
14594      an arm of an if-expression whose if-part is not a constant
14595      expression */
14596   const char *g = "string";
14597   ccp = &g + (g ? g-g : 0);
14598   /* HPUX 7.0 cc rejects these. */
14599   ++ccp;
14600   p = (char**) ccp;
14601   ccp = (char const *const *) p;
14602   { /* SCO 3.2v4 cc rejects this.  */
14603     char *t;
14604     char const *s = 0 ? (char *) 0 : (char const *) 0;
14605
14606     *t++ = 0;
14607   }
14608   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14609     int x[] = {25, 17};
14610     const int *foo = &x[0];
14611     ++foo;
14612   }
14613   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14614     typedef const int *iptr;
14615     iptr p = 0;
14616     ++p;
14617   }
14618   { /* AIX XL C 1.02.0.0 rejects this saying
14619        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14620     struct s { int j; const int *ap[3]; };
14621     struct s *b; b->j = 5;
14622   }
14623   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14624     const int foo = 10;
14625   }
14626 #endif
14627
14628   ;
14629   return 0;
14630 }
14631 _ACEOF
14632 rm -f conftest.$ac_objext
14633 if { (eval echo "$as_me:14633: \"$ac_compile\"") >&5
14634   (eval $ac_compile) 2>&5
14635   ac_status=$?
14636   echo "$as_me:14636: \$? = $ac_status" >&5
14637   (exit $ac_status); } &&
14638          { ac_try='test -s conftest.$ac_objext'
14639   { (eval echo "$as_me:14639: \"$ac_try\"") >&5
14640   (eval $ac_try) 2>&5
14641   ac_status=$?
14642   echo "$as_me:14642: \$? = $ac_status" >&5
14643   (exit $ac_status); }; }; then
14644   ac_cv_c_const=yes
14645 else
14646   echo "$as_me: failed program was:" >&5
14647 cat conftest.$ac_ext >&5
14648 ac_cv_c_const=no
14649 fi
14650 rm -f conftest.$ac_objext conftest.$ac_ext
14651 fi
14652 echo "$as_me:14652: result: $ac_cv_c_const" >&5
14653 echo "${ECHO_T}$ac_cv_c_const" >&6
14654 if test $ac_cv_c_const = no; then
14655
14656 cat >>confdefs.h <<\EOF
14657 #define const
14658 EOF
14659
14660 fi
14661
14662 echo "$as_me:14662: checking for inline" >&5
14663 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14664 if test "${ac_cv_c_inline+set}" = set; then
14665   echo $ECHO_N "(cached) $ECHO_C" >&6
14666 else
14667   ac_cv_c_inline=no
14668 for ac_kw in inline __inline__ __inline; do
14669   cat >conftest.$ac_ext <<_ACEOF
14670 #line 14670 "configure"
14671 #include "confdefs.h"
14672 #ifndef __cplusplus
14673 static $ac_kw int static_foo () {return 0; }
14674 $ac_kw int foo () {return 0; }
14675 #endif
14676
14677 _ACEOF
14678 rm -f conftest.$ac_objext
14679 if { (eval echo "$as_me:14679: \"$ac_compile\"") >&5
14680   (eval $ac_compile) 2>&5
14681   ac_status=$?
14682   echo "$as_me:14682: \$? = $ac_status" >&5
14683   (exit $ac_status); } &&
14684          { ac_try='test -s conftest.$ac_objext'
14685   { (eval echo "$as_me:14685: \"$ac_try\"") >&5
14686   (eval $ac_try) 2>&5
14687   ac_status=$?
14688   echo "$as_me:14688: \$? = $ac_status" >&5
14689   (exit $ac_status); }; }; then
14690   ac_cv_c_inline=$ac_kw; break
14691 else
14692   echo "$as_me: failed program was:" >&5
14693 cat conftest.$ac_ext >&5
14694 fi
14695 rm -f conftest.$ac_objext conftest.$ac_ext
14696 done
14697
14698 fi
14699 echo "$as_me:14699: result: $ac_cv_c_inline" >&5
14700 echo "${ECHO_T}$ac_cv_c_inline" >&6
14701 case $ac_cv_c_inline in
14702   inline | yes) ;;
14703   no)
14704 cat >>confdefs.h <<\EOF
14705 #define inline
14706 EOF
14707  ;;
14708   *)  cat >>confdefs.h <<EOF
14709 #define inline $ac_cv_c_inline
14710 EOF
14711  ;;
14712 esac
14713
14714 NCURSES_INLINE=
14715 if test "$ac_cv_c_inline" != no ; then
14716   NCURSES_INLINE=inline
14717   if test "$INTEL_COMPILER" = yes
14718   then
14719     :
14720   elif test "$CLANG_COMPILER" = yes
14721   then
14722     :
14723   elif test "$GCC" = yes
14724   then
14725     echo "$as_me:14725: checking if $CC supports options to tune inlining" >&5
14726 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14727 if test "${cf_cv_gcc_inline+set}" = set; then
14728   echo $ECHO_N "(cached) $ECHO_C" >&6
14729 else
14730
14731       cf_save_CFLAGS=$CFLAGS
14732       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14733       cat >conftest.$ac_ext <<_ACEOF
14734 #line 14734 "configure"
14735 #include "confdefs.h"
14736 inline int foo(void) { return 1; }
14737 int
14738 main ()
14739 {
14740 ${cf_cv_main_return:-return} foo()
14741   ;
14742   return 0;
14743 }
14744 _ACEOF
14745 rm -f conftest.$ac_objext
14746 if { (eval echo "$as_me:14746: \"$ac_compile\"") >&5
14747   (eval $ac_compile) 2>&5
14748   ac_status=$?
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit $ac_status); } &&
14751          { ac_try='test -s conftest.$ac_objext'
14752   { (eval echo "$as_me:14752: \"$ac_try\"") >&5
14753   (eval $ac_try) 2>&5
14754   ac_status=$?
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit $ac_status); }; }; then
14757   cf_cv_gcc_inline=yes
14758 else
14759   echo "$as_me: failed program was:" >&5
14760 cat conftest.$ac_ext >&5
14761 cf_cv_gcc_inline=no
14762 fi
14763 rm -f conftest.$ac_objext conftest.$ac_ext
14764       CFLAGS=$cf_save_CFLAGS
14765
14766 fi
14767 echo "$as_me:14767: result: $cf_cv_gcc_inline" >&5
14768 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14769     if test "$cf_cv_gcc_inline" = yes ; then
14770
14771 cf_fix_cppflags=no
14772 cf_new_cflags=
14773 cf_new_cppflags=
14774 cf_new_extra_cppflags=
14775
14776 for cf_add_cflags in --param max-inline-insns-single=1200
14777 do
14778 case $cf_fix_cppflags in
14779 no)
14780         case $cf_add_cflags in #(vi
14781         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14782                 case $cf_add_cflags in
14783                 -D*)
14784                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14785
14786                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14787                                 && test -z "${cf_tst_cflags}" \
14788                                 && cf_fix_cppflags=yes
14789
14790                         if test $cf_fix_cppflags = yes ; then
14791                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14792                                 continue
14793                         elif test "${cf_tst_cflags}" = "\"'" ; then
14794                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14795                                 continue
14796                         fi
14797                         ;;
14798                 esac
14799                 case "$CPPFLAGS" in
14800                 *$cf_add_cflags) #(vi
14801                         ;;
14802                 *) #(vi
14803                         case $cf_add_cflags in #(vi
14804                         -D*)
14805                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14806
14807 CPPFLAGS=`echo "$CPPFLAGS" | \
14808         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14809                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14810
14811                                 ;;
14812                         esac
14813                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14814                         ;;
14815                 esac
14816                 ;;
14817         *)
14818                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14819                 ;;
14820         esac
14821         ;;
14822 yes)
14823         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14824
14825         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14826
14827         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14828                 && test -z "${cf_tst_cflags}" \
14829                 && cf_fix_cppflags=no
14830         ;;
14831 esac
14832 done
14833
14834 if test -n "$cf_new_cflags" ; then
14835
14836         CFLAGS="$CFLAGS $cf_new_cflags"
14837 fi
14838
14839 if test -n "$cf_new_cppflags" ; then
14840
14841         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14842 fi
14843
14844 if test -n "$cf_new_extra_cppflags" ; then
14845
14846         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14847 fi
14848
14849     fi
14850   fi
14851 fi
14852
14853 echo "$as_me:14853: checking for signal global datatype" >&5
14854 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14855 if test "${cf_cv_sig_atomic_t+set}" = set; then
14856   echo $ECHO_N "(cached) $ECHO_C" >&6
14857 else
14858
14859         for cf_type in \
14860                 "volatile sig_atomic_t" \
14861                 "sig_atomic_t" \
14862                 "int"
14863         do
14864         cat >conftest.$ac_ext <<_ACEOF
14865 #line 14865 "configure"
14866 #include "confdefs.h"
14867
14868 #include <sys/types.h>
14869 #include <signal.h>
14870 #include <stdio.h>
14871
14872 extern $cf_type x;
14873 $cf_type x;
14874 static void handler(int sig)
14875 {
14876         x = 5;
14877 }
14878 int
14879 main ()
14880 {
14881 signal(SIGINT, handler);
14882                  x = 1
14883   ;
14884   return 0;
14885 }
14886 _ACEOF
14887 rm -f conftest.$ac_objext
14888 if { (eval echo "$as_me:14888: \"$ac_compile\"") >&5
14889   (eval $ac_compile) 2>&5
14890   ac_status=$?
14891   echo "$as_me:14891: \$? = $ac_status" >&5
14892   (exit $ac_status); } &&
14893          { ac_try='test -s conftest.$ac_objext'
14894   { (eval echo "$as_me:14894: \"$ac_try\"") >&5
14895   (eval $ac_try) 2>&5
14896   ac_status=$?
14897   echo "$as_me:14897: \$? = $ac_status" >&5
14898   (exit $ac_status); }; }; then
14899   cf_cv_sig_atomic_t=$cf_type
14900 else
14901   echo "$as_me: failed program was:" >&5
14902 cat conftest.$ac_ext >&5
14903 cf_cv_sig_atomic_t=no
14904 fi
14905 rm -f conftest.$ac_objext conftest.$ac_ext
14906                 test "$cf_cv_sig_atomic_t" != no && break
14907         done
14908
14909 fi
14910
14911 echo "$as_me:14911: result: $cf_cv_sig_atomic_t" >&5
14912 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14913 test "$cf_cv_sig_atomic_t" != no &&
14914 cat >>confdefs.h <<EOF
14915 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14916 EOF
14917
14918 if test $NCURSES_CHTYPE = auto ; then
14919
14920 echo "$as_me:14920: checking for type of chtype" >&5
14921 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14922 if test "${cf_cv_typeof_chtype+set}" = set; then
14923   echo $ECHO_N "(cached) $ECHO_C" >&6
14924 else
14925
14926                 if test "$cross_compiling" = yes; then
14927   cf_cv_typeof_chtype=long
14928 else
14929   cat >conftest.$ac_ext <<_ACEOF
14930 #line 14930 "configure"
14931 #include "confdefs.h"
14932
14933 #define WANT_BITS 31
14934 #include <stdio.h>
14935 int main()
14936 {
14937         FILE *fp = fopen("cf_test.out", "w");
14938         if (fp != 0) {
14939                 char *result = "long";
14940                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14941                         int n;
14942                         unsigned int x, y;
14943                         for (n = 0; n < WANT_BITS; n++) {
14944                                 x = (1 << n);
14945                                 y = (x >> n);
14946                                 if (y != 1 || x == 0) {
14947                                         x = 0;
14948                                         break;
14949                                 }
14950                         }
14951                         /*
14952                          * If x is nonzero, an int is big enough for the bits
14953                          * that we want.
14954                          */
14955                         result = (x != 0) ? "int" : "long";
14956                 }
14957                 fputs(result, fp);
14958                 fclose(fp);
14959         }
14960         ${cf_cv_main_return:-return}(0);
14961 }
14962
14963 _ACEOF
14964 rm -f conftest$ac_exeext
14965 if { (eval echo "$as_me:14965: \"$ac_link\"") >&5
14966   (eval $ac_link) 2>&5
14967   ac_status=$?
14968   echo "$as_me:14968: \$? = $ac_status" >&5
14969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14970   { (eval echo "$as_me:14970: \"$ac_try\"") >&5
14971   (eval $ac_try) 2>&5
14972   ac_status=$?
14973   echo "$as_me:14973: \$? = $ac_status" >&5
14974   (exit $ac_status); }; }; then
14975   cf_cv_typeof_chtype=`cat cf_test.out`
14976 else
14977   echo "$as_me: program exited with status $ac_status" >&5
14978 echo "$as_me: failed program was:" >&5
14979 cat conftest.$ac_ext >&5
14980 cf_cv_typeof_chtype=long
14981 fi
14982 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14983 fi
14984                 rm -f cf_test.out
14985
14986 fi
14987
14988 echo "$as_me:14988: result: $cf_cv_typeof_chtype" >&5
14989 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14990
14991 cat >>confdefs.h <<EOF
14992 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14993 EOF
14994
14995 else
14996         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14997 fi
14998 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14999
15000 echo "$as_me:15000: checking if unsigned literals are legal" >&5
15001 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15002 if test "${cf_cv_unsigned_literals+set}" = set; then
15003   echo $ECHO_N "(cached) $ECHO_C" >&6
15004 else
15005
15006         cat >conftest.$ac_ext <<_ACEOF
15007 #line 15007 "configure"
15008 #include "confdefs.h"
15009
15010 int
15011 main ()
15012 {
15013 long x = 1L + 1UL + 1U + 1
15014   ;
15015   return 0;
15016 }
15017 _ACEOF
15018 rm -f conftest.$ac_objext
15019 if { (eval echo "$as_me:15019: \"$ac_compile\"") >&5
15020   (eval $ac_compile) 2>&5
15021   ac_status=$?
15022   echo "$as_me:15022: \$? = $ac_status" >&5
15023   (exit $ac_status); } &&
15024          { ac_try='test -s conftest.$ac_objext'
15025   { (eval echo "$as_me:15025: \"$ac_try\"") >&5
15026   (eval $ac_try) 2>&5
15027   ac_status=$?
15028   echo "$as_me:15028: \$? = $ac_status" >&5
15029   (exit $ac_status); }; }; then
15030   cf_cv_unsigned_literals=yes
15031 else
15032   echo "$as_me: failed program was:" >&5
15033 cat conftest.$ac_ext >&5
15034 cf_cv_unsigned_literals=no
15035 fi
15036 rm -f conftest.$ac_objext conftest.$ac_ext
15037
15038 fi
15039
15040 echo "$as_me:15040: result: $cf_cv_unsigned_literals" >&5
15041 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15042
15043 cf_cv_1UL="1"
15044 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15045 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15046
15047 if test $NCURSES_MMASK_T = auto ; then
15048         cf_cv_typeof_mmask_t=long
15049 else
15050         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15051 fi
15052 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15053
15054 ###     Checks for external-data
15055
15056 echo "$as_me:15056: checking if external errno is declared" >&5
15057 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15058 if test "${cf_cv_dcl_errno+set}" = set; then
15059   echo $ECHO_N "(cached) $ECHO_C" >&6
15060 else
15061
15062     cat >conftest.$ac_ext <<_ACEOF
15063 #line 15063 "configure"
15064 #include "confdefs.h"
15065
15066 #ifdef HAVE_STDLIB_H
15067 #include <stdlib.h>
15068 #endif
15069 #include <stdio.h>
15070 #include <sys/types.h>
15071 #include <errno.h>
15072 int
15073 main ()
15074 {
15075 int x = (int) errno
15076   ;
15077   return 0;
15078 }
15079 _ACEOF
15080 rm -f conftest.$ac_objext
15081 if { (eval echo "$as_me:15081: \"$ac_compile\"") >&5
15082   (eval $ac_compile) 2>&5
15083   ac_status=$?
15084   echo "$as_me:15084: \$? = $ac_status" >&5
15085   (exit $ac_status); } &&
15086          { ac_try='test -s conftest.$ac_objext'
15087   { (eval echo "$as_me:15087: \"$ac_try\"") >&5
15088   (eval $ac_try) 2>&5
15089   ac_status=$?
15090   echo "$as_me:15090: \$? = $ac_status" >&5
15091   (exit $ac_status); }; }; then
15092   cf_cv_dcl_errno=yes
15093 else
15094   echo "$as_me: failed program was:" >&5
15095 cat conftest.$ac_ext >&5
15096 cf_cv_dcl_errno=no
15097 fi
15098 rm -f conftest.$ac_objext conftest.$ac_ext
15099
15100 fi
15101 echo "$as_me:15101: result: $cf_cv_dcl_errno" >&5
15102 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15103
15104 if test "$cf_cv_dcl_errno" = no ; then
15105
15106 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15107
15108     cat >>confdefs.h <<EOF
15109 #define $cf_result 1
15110 EOF
15111
15112 fi
15113
15114 # It's possible (for near-UNIX clones) that the data doesn't exist
15115
15116 echo "$as_me:15116: checking if external errno exists" >&5
15117 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15118 if test "${cf_cv_have_errno+set}" = set; then
15119   echo $ECHO_N "(cached) $ECHO_C" >&6
15120 else
15121
15122     cat >conftest.$ac_ext <<_ACEOF
15123 #line 15123 "configure"
15124 #include "confdefs.h"
15125
15126 #undef errno
15127 extern int errno;
15128
15129 int
15130 main ()
15131 {
15132 errno = 2
15133   ;
15134   return 0;
15135 }
15136 _ACEOF
15137 rm -f conftest.$ac_objext conftest$ac_exeext
15138 if { (eval echo "$as_me:15138: \"$ac_link\"") >&5
15139   (eval $ac_link) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); } &&
15143          { ac_try='test -s conftest$ac_exeext'
15144   { (eval echo "$as_me:15144: \"$ac_try\"") >&5
15145   (eval $ac_try) 2>&5
15146   ac_status=$?
15147   echo "$as_me:15147: \$? = $ac_status" >&5
15148   (exit $ac_status); }; }; then
15149   cf_cv_have_errno=yes
15150 else
15151   echo "$as_me: failed program was:" >&5
15152 cat conftest.$ac_ext >&5
15153 cf_cv_have_errno=no
15154 fi
15155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15156
15157 fi
15158 echo "$as_me:15158: result: $cf_cv_have_errno" >&5
15159 echo "${ECHO_T}$cf_cv_have_errno" >&6
15160
15161 if test "$cf_cv_have_errno" = yes ; then
15162
15163 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15164
15165     cat >>confdefs.h <<EOF
15166 #define $cf_result 1
15167 EOF
15168
15169 fi
15170
15171 echo "$as_me:15171: checking if data-only library module links" >&5
15172 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15173 if test "${cf_cv_link_dataonly+set}" = set; then
15174   echo $ECHO_N "(cached) $ECHO_C" >&6
15175 else
15176
15177         rm -f conftest.a
15178         cat >conftest.$ac_ext <<EOF
15179 #line 15179 "configure"
15180 int     testdata[3] = { 123, 456, 789 };
15181 EOF
15182         if { (eval echo "$as_me:15182: \"$ac_compile\"") >&5
15183   (eval $ac_compile) 2>&5
15184   ac_status=$?
15185   echo "$as_me:15185: \$? = $ac_status" >&5
15186   (exit $ac_status); } ; then
15187                 mv conftest.o data.o && \
15188                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15189         fi
15190         rm -f conftest.$ac_ext data.o
15191         cat >conftest.$ac_ext <<EOF
15192 #line 15192 "configure"
15193 int     testfunc()
15194 {
15195 #if defined(NeXT)
15196         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15197 #else
15198         extern int testdata[3];
15199         return testdata[0] == 123
15200            &&  testdata[1] == 456
15201            &&  testdata[2] == 789;
15202 #endif
15203 }
15204 EOF
15205         if { (eval echo "$as_me:15205: \"$ac_compile\"") >&5
15206   (eval $ac_compile) 2>&5
15207   ac_status=$?
15208   echo "$as_me:15208: \$? = $ac_status" >&5
15209   (exit $ac_status); }; then
15210                 mv conftest.o func.o && \
15211                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15212         fi
15213         rm -f conftest.$ac_ext func.o
15214         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15215         cf_saveLIBS="$LIBS"
15216         LIBS="conftest.a $LIBS"
15217         if test "$cross_compiling" = yes; then
15218   cf_cv_link_dataonly=unknown
15219 else
15220   cat >conftest.$ac_ext <<_ACEOF
15221 #line 15221 "configure"
15222 #include "confdefs.h"
15223
15224         int main()
15225         {
15226                 extern int testfunc();
15227                 ${cf_cv_main_return:-return} (!testfunc());
15228         }
15229
15230 _ACEOF
15231 rm -f conftest$ac_exeext
15232 if { (eval echo "$as_me:15232: \"$ac_link\"") >&5
15233   (eval $ac_link) 2>&5
15234   ac_status=$?
15235   echo "$as_me:15235: \$? = $ac_status" >&5
15236   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15237   { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:15240: \$? = $ac_status" >&5
15241   (exit $ac_status); }; }; then
15242   cf_cv_link_dataonly=yes
15243 else
15244   echo "$as_me: program exited with status $ac_status" >&5
15245 echo "$as_me: failed program was:" >&5
15246 cat conftest.$ac_ext >&5
15247 cf_cv_link_dataonly=no
15248 fi
15249 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15250 fi
15251         LIBS="$cf_saveLIBS"
15252
15253 fi
15254
15255 echo "$as_me:15255: result: $cf_cv_link_dataonly" >&5
15256 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15257
15258 if test "$cf_cv_link_dataonly" = no ; then
15259
15260 cat >>confdefs.h <<\EOF
15261 #define BROKEN_LINKER 1
15262 EOF
15263
15264         BROKEN_LINKER=1
15265 fi
15266
15267 ###     Checks for library functions.
15268
15269 for ac_func in \
15270 getcwd \
15271 getegid \
15272 geteuid \
15273 getttynam \
15274 issetugid \
15275 poll \
15276 putenv \
15277 remove \
15278 select \
15279 setbuf \
15280 setbuffer \
15281 setenv \
15282 setvbuf \
15283 sigaction \
15284 sigvec \
15285 strdup \
15286 strstr \
15287 tcgetpgrp \
15288 times \
15289 vsnprintf \
15290
15291 do
15292 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15293 echo "$as_me:15293: checking for $ac_func" >&5
15294 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15295 if eval "test \"\${$as_ac_var+set}\" = set"; then
15296   echo $ECHO_N "(cached) $ECHO_C" >&6
15297 else
15298   cat >conftest.$ac_ext <<_ACEOF
15299 #line 15299 "configure"
15300 #include "confdefs.h"
15301 /* System header to define __stub macros and hopefully few prototypes,
15302     which can conflict with char $ac_func (); below.  */
15303 #include <assert.h>
15304 /* Override any gcc2 internal prototype to avoid an error.  */
15305 #ifdef __cplusplus
15306 extern "C"
15307 #endif
15308 /* We use char because int might match the return type of a gcc2
15309    builtin and then its argument prototype would still apply.  */
15310 char $ac_func ();
15311 char (*f) ();
15312
15313 int
15314 main ()
15315 {
15316 /* The GNU C library defines this for functions which it implements
15317     to always fail with ENOSYS.  Some functions are actually named
15318     something starting with __ and the normal name is an alias.  */
15319 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15320 choke me
15321 #else
15322 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15323 #endif
15324
15325   ;
15326   return 0;
15327 }
15328 _ACEOF
15329 rm -f conftest.$ac_objext conftest$ac_exeext
15330 if { (eval echo "$as_me:15330: \"$ac_link\"") >&5
15331   (eval $ac_link) 2>&5
15332   ac_status=$?
15333   echo "$as_me:15333: \$? = $ac_status" >&5
15334   (exit $ac_status); } &&
15335          { ac_try='test -s conftest$ac_exeext'
15336   { (eval echo "$as_me:15336: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:15339: \$? = $ac_status" >&5
15340   (exit $ac_status); }; }; then
15341   eval "$as_ac_var=yes"
15342 else
15343   echo "$as_me: failed program was:" >&5
15344 cat conftest.$ac_ext >&5
15345 eval "$as_ac_var=no"
15346 fi
15347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15348 fi
15349 echo "$as_me:15349: result: `eval echo '${'$as_ac_var'}'`" >&5
15350 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15351 if test `eval echo '${'$as_ac_var'}'` = yes; then
15352   cat >>confdefs.h <<EOF
15353 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15354 EOF
15355
15356 fi
15357 done
15358
15359 if test "x$with_getcap" = "xyes" ; then
15360
15361 echo "$as_me:15361: checking for terminal-capability database functions" >&5
15362 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15363 if test "${cf_cv_cgetent+set}" = set; then
15364   echo $ECHO_N "(cached) $ECHO_C" >&6
15365 else
15366
15367 cat >conftest.$ac_ext <<_ACEOF
15368 #line 15368 "configure"
15369 #include "confdefs.h"
15370
15371 #include <stdlib.h>
15372 int
15373 main ()
15374 {
15375
15376         char temp[128];
15377         char *buf = temp;
15378         char *db_array = temp;
15379         cgetent(&buf, &db_array, "vt100");
15380         cgetcap(buf, "tc", '=');
15381         cgetmatch(buf, "tc");
15382
15383   ;
15384   return 0;
15385 }
15386 _ACEOF
15387 rm -f conftest.$ac_objext conftest$ac_exeext
15388 if { (eval echo "$as_me:15388: \"$ac_link\"") >&5
15389   (eval $ac_link) 2>&5
15390   ac_status=$?
15391   echo "$as_me:15391: \$? = $ac_status" >&5
15392   (exit $ac_status); } &&
15393          { ac_try='test -s conftest$ac_exeext'
15394   { (eval echo "$as_me:15394: \"$ac_try\"") >&5
15395   (eval $ac_try) 2>&5
15396   ac_status=$?
15397   echo "$as_me:15397: \$? = $ac_status" >&5
15398   (exit $ac_status); }; }; then
15399   cf_cv_cgetent=yes
15400 else
15401   echo "$as_me: failed program was:" >&5
15402 cat conftest.$ac_ext >&5
15403 cf_cv_cgetent=no
15404 fi
15405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15406
15407 fi
15408 echo "$as_me:15408: result: $cf_cv_cgetent" >&5
15409 echo "${ECHO_T}$cf_cv_cgetent" >&6
15410
15411 if test "$cf_cv_cgetent" = yes
15412 then
15413
15414 cat >>confdefs.h <<\EOF
15415 #define HAVE_BSD_CGETENT 1
15416 EOF
15417
15418 echo "$as_me:15418: checking if cgetent uses const parameter" >&5
15419 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15420 if test "${cf_cv_cgetent_const+set}" = set; then
15421   echo $ECHO_N "(cached) $ECHO_C" >&6
15422 else
15423
15424 cat >conftest.$ac_ext <<_ACEOF
15425 #line 15425 "configure"
15426 #include "confdefs.h"
15427
15428 #include <stdlib.h>
15429 int
15430 main ()
15431 {
15432
15433         char temp[128];
15434         char *buf = temp;
15435 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15436         const char *db_array = temp;
15437         cgetent(&buf, &db_array, "vt100");
15438 #endif
15439         cgetcap(buf, "tc", '=');
15440         cgetmatch(buf, "tc");
15441
15442   ;
15443   return 0;
15444 }
15445 _ACEOF
15446 rm -f conftest.$ac_objext conftest$ac_exeext
15447 if { (eval echo "$as_me:15447: \"$ac_link\"") >&5
15448   (eval $ac_link) 2>&5
15449   ac_status=$?
15450   echo "$as_me:15450: \$? = $ac_status" >&5
15451   (exit $ac_status); } &&
15452          { ac_try='test -s conftest$ac_exeext'
15453   { (eval echo "$as_me:15453: \"$ac_try\"") >&5
15454   (eval $ac_try) 2>&5
15455   ac_status=$?
15456   echo "$as_me:15456: \$? = $ac_status" >&5
15457   (exit $ac_status); }; }; then
15458   cf_cv_cgetent_const=yes
15459 else
15460   echo "$as_me: failed program was:" >&5
15461 cat conftest.$ac_ext >&5
15462 cf_cv_cgetent_const=no
15463 fi
15464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15465
15466 fi
15467 echo "$as_me:15467: result: $cf_cv_cgetent_const" >&5
15468 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15469         if test "$cf_cv_cgetent_const" = yes
15470         then
15471
15472 cat >>confdefs.h <<EOF
15473 #define CGETENT_CONST const
15474 EOF
15475
15476         fi
15477 fi
15478
15479 fi
15480
15481 echo "$as_me:15481: checking for isascii" >&5
15482 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15483 if test "${cf_cv_have_isascii+set}" = set; then
15484   echo $ECHO_N "(cached) $ECHO_C" >&6
15485 else
15486
15487         cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15490 #include <ctype.h>
15491 int
15492 main ()
15493 {
15494 int x = isascii(' ')
15495   ;
15496   return 0;
15497 }
15498 _ACEOF
15499 rm -f conftest.$ac_objext conftest$ac_exeext
15500 if { (eval echo "$as_me:15500: \"$ac_link\"") >&5
15501   (eval $ac_link) 2>&5
15502   ac_status=$?
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit $ac_status); } &&
15505          { ac_try='test -s conftest$ac_exeext'
15506   { (eval echo "$as_me:15506: \"$ac_try\"") >&5
15507   (eval $ac_try) 2>&5
15508   ac_status=$?
15509   echo "$as_me:15509: \$? = $ac_status" >&5
15510   (exit $ac_status); }; }; then
15511   cf_cv_have_isascii=yes
15512 else
15513   echo "$as_me: failed program was:" >&5
15514 cat conftest.$ac_ext >&5
15515 cf_cv_have_isascii=no
15516 fi
15517 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15518
15519 fi
15520 echo "$as_me:15520: result: $cf_cv_have_isascii" >&5
15521 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15522 test "$cf_cv_have_isascii" = yes &&
15523 cat >>confdefs.h <<\EOF
15524 #define HAVE_ISASCII 1
15525 EOF
15526
15527 if test "$ac_cv_func_sigaction" = yes; then
15528 echo "$as_me:15528: checking whether sigaction needs _POSIX_SOURCE" >&5
15529 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15530 cat >conftest.$ac_ext <<_ACEOF
15531 #line 15531 "configure"
15532 #include "confdefs.h"
15533
15534 #include <sys/types.h>
15535 #include <signal.h>
15536 int
15537 main ()
15538 {
15539 struct sigaction act
15540   ;
15541   return 0;
15542 }
15543 _ACEOF
15544 rm -f conftest.$ac_objext
15545 if { (eval echo "$as_me:15545: \"$ac_compile\"") >&5
15546   (eval $ac_compile) 2>&5
15547   ac_status=$?
15548   echo "$as_me:15548: \$? = $ac_status" >&5
15549   (exit $ac_status); } &&
15550          { ac_try='test -s conftest.$ac_objext'
15551   { (eval echo "$as_me:15551: \"$ac_try\"") >&5
15552   (eval $ac_try) 2>&5
15553   ac_status=$?
15554   echo "$as_me:15554: \$? = $ac_status" >&5
15555   (exit $ac_status); }; }; then
15556   sigact_bad=no
15557 else
15558   echo "$as_me: failed program was:" >&5
15559 cat conftest.$ac_ext >&5
15560
15561 cat >conftest.$ac_ext <<_ACEOF
15562 #line 15562 "configure"
15563 #include "confdefs.h"
15564
15565 #define _POSIX_SOURCE
15566 #include <sys/types.h>
15567 #include <signal.h>
15568 int
15569 main ()
15570 {
15571 struct sigaction act
15572   ;
15573   return 0;
15574 }
15575 _ACEOF
15576 rm -f conftest.$ac_objext
15577 if { (eval echo "$as_me:15577: \"$ac_compile\"") >&5
15578   (eval $ac_compile) 2>&5
15579   ac_status=$?
15580   echo "$as_me:15580: \$? = $ac_status" >&5
15581   (exit $ac_status); } &&
15582          { ac_try='test -s conftest.$ac_objext'
15583   { (eval echo "$as_me:15583: \"$ac_try\"") >&5
15584   (eval $ac_try) 2>&5
15585   ac_status=$?
15586   echo "$as_me:15586: \$? = $ac_status" >&5
15587   (exit $ac_status); }; }; then
15588   sigact_bad=yes
15589
15590 cat >>confdefs.h <<\EOF
15591 #define _POSIX_SOURCE 1
15592 EOF
15593
15594 else
15595   echo "$as_me: failed program was:" >&5
15596 cat conftest.$ac_ext >&5
15597 sigact_bad=unknown
15598 fi
15599 rm -f conftest.$ac_objext conftest.$ac_ext
15600 fi
15601 rm -f conftest.$ac_objext conftest.$ac_ext
15602 echo "$as_me:15602: result: $sigact_bad" >&5
15603 echo "${ECHO_T}$sigact_bad" >&6
15604 fi
15605
15606 echo "$as_me:15606: checking if nanosleep really works" >&5
15607 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15608 if test "${cf_cv_func_nanosleep+set}" = set; then
15609   echo $ECHO_N "(cached) $ECHO_C" >&6
15610 else
15611
15612 if test "$cross_compiling" = yes; then
15613   cf_cv_func_nanosleep=unknown
15614 else
15615   cat >conftest.$ac_ext <<_ACEOF
15616 #line 15616 "configure"
15617 #include "confdefs.h"
15618
15619 #include <stdio.h>
15620 #include <errno.h>
15621 #include <time.h>
15622
15623 #ifdef HAVE_SYS_TIME_H
15624 #include <sys/time.h>
15625 #endif
15626
15627 int main() {
15628         struct timespec ts1, ts2;
15629         int code;
15630         ts1.tv_sec  = 0;
15631         ts1.tv_nsec = 750000000;
15632         ts2.tv_sec  = 0;
15633         ts2.tv_nsec = 0;
15634         errno = 0;
15635         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15636         ${cf_cv_main_return:-return}(code != 0);
15637 }
15638
15639 _ACEOF
15640 rm -f conftest$ac_exeext
15641 if { (eval echo "$as_me:15641: \"$ac_link\"") >&5
15642   (eval $ac_link) 2>&5
15643   ac_status=$?
15644   echo "$as_me:15644: \$? = $ac_status" >&5
15645   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15646   { (eval echo "$as_me:15646: \"$ac_try\"") >&5
15647   (eval $ac_try) 2>&5
15648   ac_status=$?
15649   echo "$as_me:15649: \$? = $ac_status" >&5
15650   (exit $ac_status); }; }; then
15651   cf_cv_func_nanosleep=yes
15652 else
15653   echo "$as_me: program exited with status $ac_status" >&5
15654 echo "$as_me: failed program was:" >&5
15655 cat conftest.$ac_ext >&5
15656 cf_cv_func_nanosleep=no
15657 fi
15658 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15659 fi
15660 fi
15661 echo "$as_me:15661: result: $cf_cv_func_nanosleep" >&5
15662 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15663
15664 test "$cf_cv_func_nanosleep" = "yes" &&
15665 cat >>confdefs.h <<\EOF
15666 #define HAVE_NANOSLEEP 1
15667 EOF
15668
15669 for ac_header in \
15670 termio.h \
15671 termios.h \
15672 unistd.h \
15673
15674 do
15675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15676 echo "$as_me:15676: checking for $ac_header" >&5
15677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15679   echo $ECHO_N "(cached) $ECHO_C" >&6
15680 else
15681   cat >conftest.$ac_ext <<_ACEOF
15682 #line 15682 "configure"
15683 #include "confdefs.h"
15684 #include <$ac_header>
15685 _ACEOF
15686 if { (eval echo "$as_me:15686: \"$ac_cpp conftest.$ac_ext\"") >&5
15687   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15688   ac_status=$?
15689   egrep -v '^ *\+' conftest.er1 >conftest.err
15690   rm -f conftest.er1
15691   cat conftest.err >&5
15692   echo "$as_me:15692: \$? = $ac_status" >&5
15693   (exit $ac_status); } >/dev/null; then
15694   if test -s conftest.err; then
15695     ac_cpp_err=$ac_c_preproc_warn_flag
15696   else
15697     ac_cpp_err=
15698   fi
15699 else
15700   ac_cpp_err=yes
15701 fi
15702 if test -z "$ac_cpp_err"; then
15703   eval "$as_ac_Header=yes"
15704 else
15705   echo "$as_me: failed program was:" >&5
15706   cat conftest.$ac_ext >&5
15707   eval "$as_ac_Header=no"
15708 fi
15709 rm -f conftest.err conftest.$ac_ext
15710 fi
15711 echo "$as_me:15711: result: `eval echo '${'$as_ac_Header'}'`" >&5
15712 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15713 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15714   cat >>confdefs.h <<EOF
15715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15716 EOF
15717
15718 fi
15719 done
15720
15721 if test "$ISC" = yes ; then
15722
15723 for ac_header in sys/termio.h
15724 do
15725 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15726 echo "$as_me:15726: checking for $ac_header" >&5
15727 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15728 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15729   echo $ECHO_N "(cached) $ECHO_C" >&6
15730 else
15731   cat >conftest.$ac_ext <<_ACEOF
15732 #line 15732 "configure"
15733 #include "confdefs.h"
15734 #include <$ac_header>
15735 _ACEOF
15736 if { (eval echo "$as_me:15736: \"$ac_cpp conftest.$ac_ext\"") >&5
15737   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15738   ac_status=$?
15739   egrep -v '^ *\+' conftest.er1 >conftest.err
15740   rm -f conftest.er1
15741   cat conftest.err >&5
15742   echo "$as_me:15742: \$? = $ac_status" >&5
15743   (exit $ac_status); } >/dev/null; then
15744   if test -s conftest.err; then
15745     ac_cpp_err=$ac_c_preproc_warn_flag
15746   else
15747     ac_cpp_err=
15748   fi
15749 else
15750   ac_cpp_err=yes
15751 fi
15752 if test -z "$ac_cpp_err"; then
15753   eval "$as_ac_Header=yes"
15754 else
15755   echo "$as_me: failed program was:" >&5
15756   cat conftest.$ac_ext >&5
15757   eval "$as_ac_Header=no"
15758 fi
15759 rm -f conftest.err conftest.$ac_ext
15760 fi
15761 echo "$as_me:15761: result: `eval echo '${'$as_ac_Header'}'`" >&5
15762 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15763 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15764   cat >>confdefs.h <<EOF
15765 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15766 EOF
15767
15768 fi
15769 done
15770
15771 fi
15772 if test "$ac_cv_header_termios_h" = yes ; then
15773         case "$CFLAGS $CPPFLAGS" in
15774         *-D_POSIX_SOURCE*)
15775                 termios_bad=dunno ;;
15776         *)      termios_bad=maybe ;;
15777         esac
15778         if test "$termios_bad" = maybe ; then
15779         echo "$as_me:15779: checking whether termios.h needs _POSIX_SOURCE" >&5
15780 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15781         cat >conftest.$ac_ext <<_ACEOF
15782 #line 15782 "configure"
15783 #include "confdefs.h"
15784 #include <termios.h>
15785 int
15786 main ()
15787 {
15788 struct termios foo; int x = foo.c_iflag
15789   ;
15790   return 0;
15791 }
15792 _ACEOF
15793 rm -f conftest.$ac_objext
15794 if { (eval echo "$as_me:15794: \"$ac_compile\"") >&5
15795   (eval $ac_compile) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); } &&
15799          { ac_try='test -s conftest.$ac_objext'
15800   { (eval echo "$as_me:15800: \"$ac_try\"") >&5
15801   (eval $ac_try) 2>&5
15802   ac_status=$?
15803   echo "$as_me:15803: \$? = $ac_status" >&5
15804   (exit $ac_status); }; }; then
15805   termios_bad=no
15806 else
15807   echo "$as_me: failed program was:" >&5
15808 cat conftest.$ac_ext >&5
15809
15810                 cat >conftest.$ac_ext <<_ACEOF
15811 #line 15811 "configure"
15812 #include "confdefs.h"
15813
15814 #define _POSIX_SOURCE
15815 #include <termios.h>
15816 int
15817 main ()
15818 {
15819 struct termios foo; int x = foo.c_iflag
15820   ;
15821   return 0;
15822 }
15823 _ACEOF
15824 rm -f conftest.$ac_objext
15825 if { (eval echo "$as_me:15825: \"$ac_compile\"") >&5
15826   (eval $ac_compile) 2>&5
15827   ac_status=$?
15828   echo "$as_me:15828: \$? = $ac_status" >&5
15829   (exit $ac_status); } &&
15830          { ac_try='test -s conftest.$ac_objext'
15831   { (eval echo "$as_me:15831: \"$ac_try\"") >&5
15832   (eval $ac_try) 2>&5
15833   ac_status=$?
15834   echo "$as_me:15834: \$? = $ac_status" >&5
15835   (exit $ac_status); }; }; then
15836   termios_bad=unknown
15837 else
15838   echo "$as_me: failed program was:" >&5
15839 cat conftest.$ac_ext >&5
15840 termios_bad=yes
15841 cat >>confdefs.h <<\EOF
15842 #define _POSIX_SOURCE 1
15843 EOF
15844
15845 fi
15846 rm -f conftest.$ac_objext conftest.$ac_ext
15847
15848 fi
15849 rm -f conftest.$ac_objext conftest.$ac_ext
15850         echo "$as_me:15850: result: $termios_bad" >&5
15851 echo "${ECHO_T}$termios_bad" >&6
15852         fi
15853 fi
15854
15855 echo "$as_me:15855: checking for tcgetattr" >&5
15856 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15857 if test "${cf_cv_have_tcgetattr+set}" = set; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860
15861 cat >conftest.$ac_ext <<_ACEOF
15862 #line 15862 "configure"
15863 #include "confdefs.h"
15864
15865 #include <sys/types.h>
15866 #ifdef HAVE_UNISTD_H
15867 #include <unistd.h>
15868 #endif
15869 #ifdef HAVE_TERMIOS_H
15870 #include <termios.h>
15871 #define TTY struct termios
15872 #else
15873 #ifdef HAVE_TERMIO_H
15874 #include <termio.h>
15875 #define TTY struct termio
15876 #endif
15877 #endif
15878
15879 int
15880 main ()
15881 {
15882
15883 TTY foo;
15884 tcgetattr(1, &foo);
15885   ;
15886   return 0;
15887 }
15888 _ACEOF
15889 rm -f conftest.$ac_objext conftest$ac_exeext
15890 if { (eval echo "$as_me:15890: \"$ac_link\"") >&5
15891   (eval $ac_link) 2>&5
15892   ac_status=$?
15893   echo "$as_me:15893: \$? = $ac_status" >&5
15894   (exit $ac_status); } &&
15895          { ac_try='test -s conftest$ac_exeext'
15896   { (eval echo "$as_me:15896: \"$ac_try\"") >&5
15897   (eval $ac_try) 2>&5
15898   ac_status=$?
15899   echo "$as_me:15899: \$? = $ac_status" >&5
15900   (exit $ac_status); }; }; then
15901   cf_cv_have_tcgetattr=yes
15902 else
15903   echo "$as_me: failed program was:" >&5
15904 cat conftest.$ac_ext >&5
15905 cf_cv_have_tcgetattr=no
15906 fi
15907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15908 fi
15909 echo "$as_me:15909: result: $cf_cv_have_tcgetattr" >&5
15910 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15911 test "$cf_cv_have_tcgetattr" = yes &&
15912 cat >>confdefs.h <<\EOF
15913 #define HAVE_TCGETATTR 1
15914 EOF
15915
15916 echo "$as_me:15916: checking for vsscanf function or workaround" >&5
15917 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15918 if test "${cf_cv_func_vsscanf+set}" = set; then
15919   echo $ECHO_N "(cached) $ECHO_C" >&6
15920 else
15921
15922 cat >conftest.$ac_ext <<_ACEOF
15923 #line 15923 "configure"
15924 #include "confdefs.h"
15925
15926 #include <stdarg.h>
15927 #include <stdio.h>
15928 int
15929 main ()
15930 {
15931
15932         va_list ap;
15933         vsscanf("from", "%d", ap)
15934   ;
15935   return 0;
15936 }
15937 _ACEOF
15938 rm -f conftest.$ac_objext conftest$ac_exeext
15939 if { (eval echo "$as_me:15939: \"$ac_link\"") >&5
15940   (eval $ac_link) 2>&5
15941   ac_status=$?
15942   echo "$as_me:15942: \$? = $ac_status" >&5
15943   (exit $ac_status); } &&
15944          { ac_try='test -s conftest$ac_exeext'
15945   { (eval echo "$as_me:15945: \"$ac_try\"") >&5
15946   (eval $ac_try) 2>&5
15947   ac_status=$?
15948   echo "$as_me:15948: \$? = $ac_status" >&5
15949   (exit $ac_status); }; }; then
15950   cf_cv_func_vsscanf=vsscanf
15951 else
15952   echo "$as_me: failed program was:" >&5
15953 cat conftest.$ac_ext >&5
15954
15955 cat >conftest.$ac_ext <<_ACEOF
15956 #line 15956 "configure"
15957 #include "confdefs.h"
15958
15959 #include <stdarg.h>
15960 #include <stdio.h>
15961 int
15962 main ()
15963 {
15964
15965     FILE strbuf;
15966     char *str = "from";
15967
15968     strbuf._flag = _IOREAD;
15969     strbuf._ptr = strbuf._base = (unsigned char *) str;
15970     strbuf._cnt = strlen(str);
15971     strbuf._file = _NFILE;
15972     return (vfscanf(&strbuf, "%d", ap))
15973   ;
15974   return 0;
15975 }
15976 _ACEOF
15977 rm -f conftest.$ac_objext conftest$ac_exeext
15978 if { (eval echo "$as_me:15978: \"$ac_link\"") >&5
15979   (eval $ac_link) 2>&5
15980   ac_status=$?
15981   echo "$as_me:15981: \$? = $ac_status" >&5
15982   (exit $ac_status); } &&
15983          { ac_try='test -s conftest$ac_exeext'
15984   { (eval echo "$as_me:15984: \"$ac_try\"") >&5
15985   (eval $ac_try) 2>&5
15986   ac_status=$?
15987   echo "$as_me:15987: \$? = $ac_status" >&5
15988   (exit $ac_status); }; }; then
15989   cf_cv_func_vsscanf=vfscanf
15990 else
15991   echo "$as_me: failed program was:" >&5
15992 cat conftest.$ac_ext >&5
15993
15994 cat >conftest.$ac_ext <<_ACEOF
15995 #line 15995 "configure"
15996 #include "confdefs.h"
15997
15998 #include <stdarg.h>
15999 #include <stdio.h>
16000 int
16001 main ()
16002 {
16003
16004     FILE strbuf;
16005     char *str = "from";
16006
16007     strbuf._flag = _IOREAD;
16008     strbuf._ptr = strbuf._base = (unsigned char *) str;
16009     strbuf._cnt = strlen(str);
16010     strbuf._file = _NFILE;
16011     return (_doscan(&strbuf, "%d", ap))
16012   ;
16013   return 0;
16014 }
16015 _ACEOF
16016 rm -f conftest.$ac_objext conftest$ac_exeext
16017 if { (eval echo "$as_me:16017: \"$ac_link\"") >&5
16018   (eval $ac_link) 2>&5
16019   ac_status=$?
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit $ac_status); } &&
16022          { ac_try='test -s conftest$ac_exeext'
16023   { (eval echo "$as_me:16023: \"$ac_try\"") >&5
16024   (eval $ac_try) 2>&5
16025   ac_status=$?
16026   echo "$as_me:16026: \$? = $ac_status" >&5
16027   (exit $ac_status); }; }; then
16028   cf_cv_func_vsscanf=_doscan
16029 else
16030   echo "$as_me: failed program was:" >&5
16031 cat conftest.$ac_ext >&5
16032
16033 cf_cv_func_vsscanf=no
16034 fi
16035 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16036 fi
16037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16038 fi
16039 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16040 fi
16041 echo "$as_me:16041: result: $cf_cv_func_vsscanf" >&5
16042 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16043
16044 case $cf_cv_func_vsscanf in #(vi
16045 vsscanf)
16046 cat >>confdefs.h <<\EOF
16047 #define HAVE_VSSCANF 1
16048 EOF
16049 ;; #(vi
16050 vfscanf)
16051 cat >>confdefs.h <<\EOF
16052 #define HAVE_VFSCANF 1
16053 EOF
16054 ;; #(vi
16055 _doscan)
16056 cat >>confdefs.h <<\EOF
16057 #define HAVE__DOSCAN 1
16058 EOF
16059 ;;
16060 esac
16061
16062 echo "$as_me:16062: checking for working mkstemp" >&5
16063 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16064 if test "${cf_cv_func_mkstemp+set}" = set; then
16065   echo $ECHO_N "(cached) $ECHO_C" >&6
16066 else
16067
16068 rm -rf conftest*
16069 if test "$cross_compiling" = yes; then
16070   cf_cv_func_mkstemp=maybe
16071 else
16072   cat >conftest.$ac_ext <<_ACEOF
16073 #line 16073 "configure"
16074 #include "confdefs.h"
16075
16076 #include <sys/types.h>
16077 #include <stdlib.h>
16078 #include <stdio.h>
16079 #include <string.h>
16080 #include <sys/stat.h>
16081 int main()
16082 {
16083         char *tmpl = "conftestXXXXXX";
16084         char name[2][80];
16085         int n;
16086         int result = 0;
16087         int fd;
16088         struct stat sb;
16089
16090         umask(077);
16091         for (n = 0; n < 2; ++n) {
16092                 strcpy(name[n], tmpl);
16093                 if ((fd = mkstemp(name[n])) >= 0) {
16094                         if (!strcmp(name[n], tmpl)
16095                          || stat(name[n], &sb) != 0
16096                          || (sb.st_mode & S_IFMT) != S_IFREG
16097                          || (sb.st_mode & 077) != 0) {
16098                                 result = 1;
16099                         }
16100                         close(fd);
16101                 }
16102         }
16103         if (result == 0
16104          && !strcmp(name[0], name[1]))
16105                 result = 1;
16106         ${cf_cv_main_return:-return}(result);
16107 }
16108
16109 _ACEOF
16110 rm -f conftest$ac_exeext
16111 if { (eval echo "$as_me:16111: \"$ac_link\"") >&5
16112   (eval $ac_link) 2>&5
16113   ac_status=$?
16114   echo "$as_me:16114: \$? = $ac_status" >&5
16115   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16116   { (eval echo "$as_me:16116: \"$ac_try\"") >&5
16117   (eval $ac_try) 2>&5
16118   ac_status=$?
16119   echo "$as_me:16119: \$? = $ac_status" >&5
16120   (exit $ac_status); }; }; then
16121   cf_cv_func_mkstemp=yes
16122
16123 else
16124   echo "$as_me: program exited with status $ac_status" >&5
16125 echo "$as_me: failed program was:" >&5
16126 cat conftest.$ac_ext >&5
16127 cf_cv_func_mkstemp=no
16128
16129 fi
16130 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16131 fi
16132
16133 fi
16134 echo "$as_me:16134: result: $cf_cv_func_mkstemp" >&5
16135 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16136 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16137         echo "$as_me:16137: checking for mkstemp" >&5
16138 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16139 if test "${ac_cv_func_mkstemp+set}" = set; then
16140   echo $ECHO_N "(cached) $ECHO_C" >&6
16141 else
16142   cat >conftest.$ac_ext <<_ACEOF
16143 #line 16143 "configure"
16144 #include "confdefs.h"
16145 /* System header to define __stub macros and hopefully few prototypes,
16146     which can conflict with char mkstemp (); below.  */
16147 #include <assert.h>
16148 /* Override any gcc2 internal prototype to avoid an error.  */
16149 #ifdef __cplusplus
16150 extern "C"
16151 #endif
16152 /* We use char because int might match the return type of a gcc2
16153    builtin and then its argument prototype would still apply.  */
16154 char mkstemp ();
16155 char (*f) ();
16156
16157 int
16158 main ()
16159 {
16160 /* The GNU C library defines this for functions which it implements
16161     to always fail with ENOSYS.  Some functions are actually named
16162     something starting with __ and the normal name is an alias.  */
16163 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16164 choke me
16165 #else
16166 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16167 #endif
16168
16169   ;
16170   return 0;
16171 }
16172 _ACEOF
16173 rm -f conftest.$ac_objext conftest$ac_exeext
16174 if { (eval echo "$as_me:16174: \"$ac_link\"") >&5
16175   (eval $ac_link) 2>&5
16176   ac_status=$?
16177   echo "$as_me:16177: \$? = $ac_status" >&5
16178   (exit $ac_status); } &&
16179          { ac_try='test -s conftest$ac_exeext'
16180   { (eval echo "$as_me:16180: \"$ac_try\"") >&5
16181   (eval $ac_try) 2>&5
16182   ac_status=$?
16183   echo "$as_me:16183: \$? = $ac_status" >&5
16184   (exit $ac_status); }; }; then
16185   ac_cv_func_mkstemp=yes
16186 else
16187   echo "$as_me: failed program was:" >&5
16188 cat conftest.$ac_ext >&5
16189 ac_cv_func_mkstemp=no
16190 fi
16191 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16192 fi
16193 echo "$as_me:16193: result: $ac_cv_func_mkstemp" >&5
16194 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16195
16196 fi
16197 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16198
16199 cat >>confdefs.h <<\EOF
16200 #define HAVE_MKSTEMP 1
16201 EOF
16202
16203 fi
16204
16205 # setup for prototype of fallback for vsscanf()
16206
16207 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16208         HAVE_VSSCANF=1
16209 else
16210         HAVE_VSSCANF=0
16211 fi
16212
16213 if test "x$cross_compiling" = xyes ; then
16214         { echo "$as_me:16214: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16215 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16216 else
16217         echo "$as_me:16217: checking whether setvbuf arguments are reversed" >&5
16218 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16219 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16220   echo $ECHO_N "(cached) $ECHO_C" >&6
16221 else
16222   if test "$cross_compiling" = yes; then
16223   { { echo "$as_me:16223: error: cannot run test program while cross compiling" >&5
16224 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16225    { (exit 1); exit 1; }; }
16226 else
16227   cat >conftest.$ac_ext <<_ACEOF
16228 #line 16228 "configure"
16229 #include "confdefs.h"
16230 #include <stdio.h>
16231 /* If setvbuf has the reversed format, exit 0. */
16232 int
16233 main ()
16234 {
16235   /* This call has the arguments reversed.
16236      A reversed system may check and see that the address of main
16237      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16238   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16239     $ac_main_return(1);
16240   putc('\r', stdout);
16241   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16242 }
16243 _ACEOF
16244 rm -f conftest$ac_exeext
16245 if { (eval echo "$as_me:16245: \"$ac_link\"") >&5
16246   (eval $ac_link) 2>&5
16247   ac_status=$?
16248   echo "$as_me:16248: \$? = $ac_status" >&5
16249   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16250   { (eval echo "$as_me:16250: \"$ac_try\"") >&5
16251   (eval $ac_try) 2>&5
16252   ac_status=$?
16253   echo "$as_me:16253: \$? = $ac_status" >&5
16254   (exit $ac_status); }; }; then
16255   ac_cv_func_setvbuf_reversed=yes
16256 else
16257   echo "$as_me: program exited with status $ac_status" >&5
16258 echo "$as_me: failed program was:" >&5
16259 cat conftest.$ac_ext >&5
16260 ac_cv_func_setvbuf_reversed=no
16261 fi
16262 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16263 fi
16264 rm -f core core.* *.core
16265 fi
16266 echo "$as_me:16266: result: $ac_cv_func_setvbuf_reversed" >&5
16267 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16268 if test $ac_cv_func_setvbuf_reversed = yes; then
16269
16270 cat >>confdefs.h <<\EOF
16271 #define SETVBUF_REVERSED 1
16272 EOF
16273
16274 fi
16275
16276 fi
16277 echo "$as_me:16277: checking return type of signal handlers" >&5
16278 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16279 if test "${ac_cv_type_signal+set}" = set; then
16280   echo $ECHO_N "(cached) $ECHO_C" >&6
16281 else
16282   cat >conftest.$ac_ext <<_ACEOF
16283 #line 16283 "configure"
16284 #include "confdefs.h"
16285 #include <sys/types.h>
16286 #include <signal.h>
16287 #ifdef signal
16288 # undef signal
16289 #endif
16290 #ifdef __cplusplus
16291 extern "C" void (*signal (int, void (*)(int)))(int);
16292 #else
16293 void (*signal ()) ();
16294 #endif
16295
16296 int
16297 main ()
16298 {
16299 int i;
16300   ;
16301   return 0;
16302 }
16303 _ACEOF
16304 rm -f conftest.$ac_objext
16305 if { (eval echo "$as_me:16305: \"$ac_compile\"") >&5
16306   (eval $ac_compile) 2>&5
16307   ac_status=$?
16308   echo "$as_me:16308: \$? = $ac_status" >&5
16309   (exit $ac_status); } &&
16310          { ac_try='test -s conftest.$ac_objext'
16311   { (eval echo "$as_me:16311: \"$ac_try\"") >&5
16312   (eval $ac_try) 2>&5
16313   ac_status=$?
16314   echo "$as_me:16314: \$? = $ac_status" >&5
16315   (exit $ac_status); }; }; then
16316   ac_cv_type_signal=void
16317 else
16318   echo "$as_me: failed program was:" >&5
16319 cat conftest.$ac_ext >&5
16320 ac_cv_type_signal=int
16321 fi
16322 rm -f conftest.$ac_objext conftest.$ac_ext
16323 fi
16324 echo "$as_me:16324: result: $ac_cv_type_signal" >&5
16325 echo "${ECHO_T}$ac_cv_type_signal" >&6
16326
16327 cat >>confdefs.h <<EOF
16328 #define RETSIGTYPE $ac_cv_type_signal
16329 EOF
16330
16331 echo "$as_me:16331: checking for intptr_t" >&5
16332 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16333 if test "${ac_cv_type_intptr_t+set}" = set; then
16334   echo $ECHO_N "(cached) $ECHO_C" >&6
16335 else
16336   cat >conftest.$ac_ext <<_ACEOF
16337 #line 16337 "configure"
16338 #include "confdefs.h"
16339 $ac_includes_default
16340 int
16341 main ()
16342 {
16343 if ((intptr_t *) 0)
16344   return 0;
16345 if (sizeof (intptr_t))
16346   return 0;
16347   ;
16348   return 0;
16349 }
16350 _ACEOF
16351 rm -f conftest.$ac_objext
16352 if { (eval echo "$as_me:16352: \"$ac_compile\"") >&5
16353   (eval $ac_compile) 2>&5
16354   ac_status=$?
16355   echo "$as_me:16355: \$? = $ac_status" >&5
16356   (exit $ac_status); } &&
16357          { ac_try='test -s conftest.$ac_objext'
16358   { (eval echo "$as_me:16358: \"$ac_try\"") >&5
16359   (eval $ac_try) 2>&5
16360   ac_status=$?
16361   echo "$as_me:16361: \$? = $ac_status" >&5
16362   (exit $ac_status); }; }; then
16363   ac_cv_type_intptr_t=yes
16364 else
16365   echo "$as_me: failed program was:" >&5
16366 cat conftest.$ac_ext >&5
16367 ac_cv_type_intptr_t=no
16368 fi
16369 rm -f conftest.$ac_objext conftest.$ac_ext
16370 fi
16371 echo "$as_me:16371: result: $ac_cv_type_intptr_t" >&5
16372 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16373 if test $ac_cv_type_intptr_t = yes; then
16374   :
16375 else
16376
16377 cat >>confdefs.h <<EOF
16378 #define intptr_t long
16379 EOF
16380
16381 fi
16382
16383 echo "$as_me:16383: checking for type sigaction_t" >&5
16384 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16385 if test "${cf_cv_type_sigaction+set}" = set; then
16386   echo $ECHO_N "(cached) $ECHO_C" >&6
16387 else
16388
16389         cat >conftest.$ac_ext <<_ACEOF
16390 #line 16390 "configure"
16391 #include "confdefs.h"
16392
16393 #include <signal.h>
16394 int
16395 main ()
16396 {
16397 sigaction_t x
16398   ;
16399   return 0;
16400 }
16401 _ACEOF
16402 rm -f conftest.$ac_objext
16403 if { (eval echo "$as_me:16403: \"$ac_compile\"") >&5
16404   (eval $ac_compile) 2>&5
16405   ac_status=$?
16406   echo "$as_me:16406: \$? = $ac_status" >&5
16407   (exit $ac_status); } &&
16408          { ac_try='test -s conftest.$ac_objext'
16409   { (eval echo "$as_me:16409: \"$ac_try\"") >&5
16410   (eval $ac_try) 2>&5
16411   ac_status=$?
16412   echo "$as_me:16412: \$? = $ac_status" >&5
16413   (exit $ac_status); }; }; then
16414   cf_cv_type_sigaction=yes
16415 else
16416   echo "$as_me: failed program was:" >&5
16417 cat conftest.$ac_ext >&5
16418 cf_cv_type_sigaction=no
16419 fi
16420 rm -f conftest.$ac_objext conftest.$ac_ext
16421 fi
16422
16423 echo "$as_me:16423: result: $cf_cv_type_sigaction" >&5
16424 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16425 test "$cf_cv_type_sigaction" = yes &&
16426 cat >>confdefs.h <<\EOF
16427 #define HAVE_TYPE_SIGACTION 1
16428 EOF
16429
16430 echo "$as_me:16430: checking declaration of size-change" >&5
16431 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16432 if test "${cf_cv_sizechange+set}" = set; then
16433   echo $ECHO_N "(cached) $ECHO_C" >&6
16434 else
16435
16436     cf_cv_sizechange=unknown
16437     cf_save_CPPFLAGS="$CPPFLAGS"
16438
16439 for cf_opts in "" "NEED_PTEM_H"
16440 do
16441
16442     CPPFLAGS="$cf_save_CPPFLAGS"
16443     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16444     cat >conftest.$ac_ext <<_ACEOF
16445 #line 16445 "configure"
16446 #include "confdefs.h"
16447 #include <sys/types.h>
16448 #ifdef HAVE_TERMIOS_H
16449 #include <termios.h>
16450 #else
16451 #ifdef HAVE_TERMIO_H
16452 #include <termio.h>
16453 #endif
16454 #endif
16455 #ifdef NEED_PTEM_H
16456 /* This is a workaround for SCO:  they neglected to define struct winsize in
16457  * termios.h -- it's only in termio.h and ptem.h
16458  */
16459 #include        <sys/stream.h>
16460 #include        <sys/ptem.h>
16461 #endif
16462 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16463 #include <sys/ioctl.h>
16464 #endif
16465
16466 int
16467 main ()
16468 {
16469
16470 #ifdef TIOCGSIZE
16471         struct ttysize win;     /* FIXME: what system is this? */
16472         int y = win.ts_lines;
16473         int x = win.ts_cols;
16474 #else
16475 #ifdef TIOCGWINSZ
16476         struct winsize win;
16477         int y = win.ws_row;
16478         int x = win.ws_col;
16479 #else
16480         no TIOCGSIZE or TIOCGWINSZ
16481 #endif /* TIOCGWINSZ */
16482 #endif /* TIOCGSIZE */
16483
16484   ;
16485   return 0;
16486 }
16487 _ACEOF
16488 rm -f conftest.$ac_objext
16489 if { (eval echo "$as_me:16489: \"$ac_compile\"") >&5
16490   (eval $ac_compile) 2>&5
16491   ac_status=$?
16492   echo "$as_me:16492: \$? = $ac_status" >&5
16493   (exit $ac_status); } &&
16494          { ac_try='test -s conftest.$ac_objext'
16495   { (eval echo "$as_me:16495: \"$ac_try\"") >&5
16496   (eval $ac_try) 2>&5
16497   ac_status=$?
16498   echo "$as_me:16498: \$? = $ac_status" >&5
16499   (exit $ac_status); }; }; then
16500   cf_cv_sizechange=yes
16501 else
16502   echo "$as_me: failed program was:" >&5
16503 cat conftest.$ac_ext >&5
16504 cf_cv_sizechange=no
16505 fi
16506 rm -f conftest.$ac_objext conftest.$ac_ext
16507
16508         CPPFLAGS="$cf_save_CPPFLAGS"
16509         if test "$cf_cv_sizechange" = yes ; then
16510                 echo "size-change succeeded ($cf_opts)" >&5
16511                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16512                 break
16513         fi
16514 done
16515
16516 fi
16517 echo "$as_me:16517: result: $cf_cv_sizechange" >&5
16518 echo "${ECHO_T}$cf_cv_sizechange" >&6
16519 if test "$cf_cv_sizechange" != no ; then
16520
16521 cat >>confdefs.h <<\EOF
16522 #define HAVE_SIZECHANGE 1
16523 EOF
16524
16525         case $cf_cv_sizechange in #(vi
16526         NEED*)
16527                 cat >>confdefs.h <<EOF
16528 #define $cf_cv_sizechange  1
16529 EOF
16530
16531                 ;;
16532         esac
16533 fi
16534
16535 echo "$as_me:16535: checking for memmove" >&5
16536 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16537 if test "${ac_cv_func_memmove+set}" = set; then
16538   echo $ECHO_N "(cached) $ECHO_C" >&6
16539 else
16540   cat >conftest.$ac_ext <<_ACEOF
16541 #line 16541 "configure"
16542 #include "confdefs.h"
16543 /* System header to define __stub macros and hopefully few prototypes,
16544     which can conflict with char memmove (); below.  */
16545 #include <assert.h>
16546 /* Override any gcc2 internal prototype to avoid an error.  */
16547 #ifdef __cplusplus
16548 extern "C"
16549 #endif
16550 /* We use char because int might match the return type of a gcc2
16551    builtin and then its argument prototype would still apply.  */
16552 char memmove ();
16553 char (*f) ();
16554
16555 int
16556 main ()
16557 {
16558 /* The GNU C library defines this for functions which it implements
16559     to always fail with ENOSYS.  Some functions are actually named
16560     something starting with __ and the normal name is an alias.  */
16561 #if defined (__stub_memmove) || defined (__stub___memmove)
16562 choke me
16563 #else
16564 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16565 #endif
16566
16567   ;
16568   return 0;
16569 }
16570 _ACEOF
16571 rm -f conftest.$ac_objext conftest$ac_exeext
16572 if { (eval echo "$as_me:16572: \"$ac_link\"") >&5
16573   (eval $ac_link) 2>&5
16574   ac_status=$?
16575   echo "$as_me:16575: \$? = $ac_status" >&5
16576   (exit $ac_status); } &&
16577          { ac_try='test -s conftest$ac_exeext'
16578   { (eval echo "$as_me:16578: \"$ac_try\"") >&5
16579   (eval $ac_try) 2>&5
16580   ac_status=$?
16581   echo "$as_me:16581: \$? = $ac_status" >&5
16582   (exit $ac_status); }; }; then
16583   ac_cv_func_memmove=yes
16584 else
16585   echo "$as_me: failed program was:" >&5
16586 cat conftest.$ac_ext >&5
16587 ac_cv_func_memmove=no
16588 fi
16589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16590 fi
16591 echo "$as_me:16591: result: $ac_cv_func_memmove" >&5
16592 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16593 if test $ac_cv_func_memmove = yes; then
16594   :
16595 else
16596
16597 echo "$as_me:16597: checking for bcopy" >&5
16598 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16599 if test "${ac_cv_func_bcopy+set}" = set; then
16600   echo $ECHO_N "(cached) $ECHO_C" >&6
16601 else
16602   cat >conftest.$ac_ext <<_ACEOF
16603 #line 16603 "configure"
16604 #include "confdefs.h"
16605 /* System header to define __stub macros and hopefully few prototypes,
16606     which can conflict with char bcopy (); below.  */
16607 #include <assert.h>
16608 /* Override any gcc2 internal prototype to avoid an error.  */
16609 #ifdef __cplusplus
16610 extern "C"
16611 #endif
16612 /* We use char because int might match the return type of a gcc2
16613    builtin and then its argument prototype would still apply.  */
16614 char bcopy ();
16615 char (*f) ();
16616
16617 int
16618 main ()
16619 {
16620 /* The GNU C library defines this for functions which it implements
16621     to always fail with ENOSYS.  Some functions are actually named
16622     something starting with __ and the normal name is an alias.  */
16623 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16624 choke me
16625 #else
16626 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16627 #endif
16628
16629   ;
16630   return 0;
16631 }
16632 _ACEOF
16633 rm -f conftest.$ac_objext conftest$ac_exeext
16634 if { (eval echo "$as_me:16634: \"$ac_link\"") >&5
16635   (eval $ac_link) 2>&5
16636   ac_status=$?
16637   echo "$as_me:16637: \$? = $ac_status" >&5
16638   (exit $ac_status); } &&
16639          { ac_try='test -s conftest$ac_exeext'
16640   { (eval echo "$as_me:16640: \"$ac_try\"") >&5
16641   (eval $ac_try) 2>&5
16642   ac_status=$?
16643   echo "$as_me:16643: \$? = $ac_status" >&5
16644   (exit $ac_status); }; }; then
16645   ac_cv_func_bcopy=yes
16646 else
16647   echo "$as_me: failed program was:" >&5
16648 cat conftest.$ac_ext >&5
16649 ac_cv_func_bcopy=no
16650 fi
16651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16652 fi
16653 echo "$as_me:16653: result: $ac_cv_func_bcopy" >&5
16654 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16655 if test $ac_cv_func_bcopy = yes; then
16656
16657         echo "$as_me:16657: checking if bcopy does overlapping moves" >&5
16658 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16659 if test "${cf_cv_good_bcopy+set}" = set; then
16660   echo $ECHO_N "(cached) $ECHO_C" >&6
16661 else
16662
16663                 if test "$cross_compiling" = yes; then
16664   cf_cv_good_bcopy=unknown
16665 else
16666   cat >conftest.$ac_ext <<_ACEOF
16667 #line 16667 "configure"
16668 #include "confdefs.h"
16669
16670 int main() {
16671         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16672         char temp[40];
16673         bcopy(data, temp, sizeof(data));
16674         bcopy(temp+10, temp, 15);
16675         bcopy(temp+5, temp+15, 10);
16676         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16677 }
16678
16679 _ACEOF
16680 rm -f conftest$ac_exeext
16681 if { (eval echo "$as_me:16681: \"$ac_link\"") >&5
16682   (eval $ac_link) 2>&5
16683   ac_status=$?
16684   echo "$as_me:16684: \$? = $ac_status" >&5
16685   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16686   { (eval echo "$as_me:16686: \"$ac_try\"") >&5
16687   (eval $ac_try) 2>&5
16688   ac_status=$?
16689   echo "$as_me:16689: \$? = $ac_status" >&5
16690   (exit $ac_status); }; }; then
16691   cf_cv_good_bcopy=yes
16692 else
16693   echo "$as_me: program exited with status $ac_status" >&5
16694 echo "$as_me: failed program was:" >&5
16695 cat conftest.$ac_ext >&5
16696 cf_cv_good_bcopy=no
16697 fi
16698 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16699 fi
16700
16701 fi
16702 echo "$as_me:16702: result: $cf_cv_good_bcopy" >&5
16703 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16704
16705 else
16706   cf_cv_good_bcopy=no
16707 fi
16708
16709         if test "$cf_cv_good_bcopy" = yes ; then
16710
16711 cat >>confdefs.h <<\EOF
16712 #define USE_OK_BCOPY 1
16713 EOF
16714
16715         else
16716
16717 cat >>confdefs.h <<\EOF
16718 #define USE_MY_MEMMOVE 1
16719 EOF
16720
16721         fi
16722
16723 fi
16724
16725 echo "$as_me:16725: checking if poll really works" >&5
16726 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16727 if test "${cf_cv_working_poll+set}" = set; then
16728   echo $ECHO_N "(cached) $ECHO_C" >&6
16729 else
16730
16731 if test "$cross_compiling" = yes; then
16732   cf_cv_working_poll=unknown
16733 else
16734   cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16737
16738 #include <stdlib.h>
16739 #include <stdio.h>
16740 #include <unistd.h>
16741 #include <fcntl.h>
16742 #ifdef HAVE_POLL_H
16743 #include <poll.h>
16744 #else
16745 #include <sys/poll.h>
16746 #endif
16747 int main() {
16748         struct pollfd myfds;
16749         int ret;
16750
16751         /* check for Darwin bug with respect to "devices" */
16752         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16753         if (myfds.fd < 0)
16754                 myfds.fd = 0;
16755         myfds.events = POLLIN;
16756         myfds.revents = 0;
16757
16758         ret = poll(&myfds, 1, 100);
16759
16760         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16761                 ret = -1;
16762         } else {
16763                 int fd = 0;
16764                 if (!isatty(fd)) {
16765                         fd = open("/dev/tty", 2);       /* O_RDWR */
16766                 }
16767
16768                 if (fd >= 0) {
16769                         /* also check with standard input */
16770                         myfds.fd = fd;
16771                         myfds.events = POLLIN;
16772                         myfds.revents = 0;
16773                         ret = poll(&myfds, 1, 100);
16774                 } else {
16775                         ret = -1;
16776                 }
16777         }
16778         ${cf_cv_main_return:-return}(ret < 0);
16779 }
16780 _ACEOF
16781 rm -f conftest$ac_exeext
16782 if { (eval echo "$as_me:16782: \"$ac_link\"") >&5
16783   (eval $ac_link) 2>&5
16784   ac_status=$?
16785   echo "$as_me:16785: \$? = $ac_status" >&5
16786   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16787   { (eval echo "$as_me:16787: \"$ac_try\"") >&5
16788   (eval $ac_try) 2>&5
16789   ac_status=$?
16790   echo "$as_me:16790: \$? = $ac_status" >&5
16791   (exit $ac_status); }; }; then
16792   cf_cv_working_poll=yes
16793 else
16794   echo "$as_me: program exited with status $ac_status" >&5
16795 echo "$as_me: failed program was:" >&5
16796 cat conftest.$ac_ext >&5
16797 cf_cv_working_poll=no
16798 fi
16799 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16800 fi
16801 fi
16802 echo "$as_me:16802: result: $cf_cv_working_poll" >&5
16803 echo "${ECHO_T}$cf_cv_working_poll" >&6
16804 test "$cf_cv_working_poll" = "yes" &&
16805 cat >>confdefs.h <<\EOF
16806 #define HAVE_WORKING_POLL 1
16807 EOF
16808
16809 echo "$as_me:16809: checking for va_copy" >&5
16810 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16811 if test "${cf_cv_have_va_copy+set}" = set; then
16812   echo $ECHO_N "(cached) $ECHO_C" >&6
16813 else
16814
16815 cat >conftest.$ac_ext <<_ACEOF
16816 #line 16816 "configure"
16817 #include "confdefs.h"
16818
16819 #include <stdarg.h>
16820
16821 int
16822 main ()
16823 {
16824
16825         static va_list dst;
16826         static va_list src;
16827         va_copy(dst, src)
16828   ;
16829   return 0;
16830 }
16831 _ACEOF
16832 rm -f conftest.$ac_objext conftest$ac_exeext
16833 if { (eval echo "$as_me:16833: \"$ac_link\"") >&5
16834   (eval $ac_link) 2>&5
16835   ac_status=$?
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); } &&
16838          { ac_try='test -s conftest$ac_exeext'
16839   { (eval echo "$as_me:16839: \"$ac_try\"") >&5
16840   (eval $ac_try) 2>&5
16841   ac_status=$?
16842   echo "$as_me:16842: \$? = $ac_status" >&5
16843   (exit $ac_status); }; }; then
16844   cf_cv_have_va_copy=yes
16845 else
16846   echo "$as_me: failed program was:" >&5
16847 cat conftest.$ac_ext >&5
16848 cf_cv_have_va_copy=no
16849 fi
16850 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16851 fi
16852 echo "$as_me:16852: result: $cf_cv_have_va_copy" >&5
16853 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16854
16855 test "$cf_cv_have_va_copy" = yes &&
16856 cat >>confdefs.h <<\EOF
16857 #define HAVE_VA_COPY 1
16858 EOF
16859
16860 echo "$as_me:16860: checking for __va_copy" >&5
16861 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16862 if test "${cf_cv_have___va_copy+set}" = set; then
16863   echo $ECHO_N "(cached) $ECHO_C" >&6
16864 else
16865
16866 cat >conftest.$ac_ext <<_ACEOF
16867 #line 16867 "configure"
16868 #include "confdefs.h"
16869
16870 #include <stdarg.h>
16871
16872 int
16873 main ()
16874 {
16875
16876         static va_list dst;
16877         static va_list src;
16878         __va_copy(dst, src)
16879   ;
16880   return 0;
16881 }
16882 _ACEOF
16883 rm -f conftest.$ac_objext conftest$ac_exeext
16884 if { (eval echo "$as_me:16884: \"$ac_link\"") >&5
16885   (eval $ac_link) 2>&5
16886   ac_status=$?
16887   echo "$as_me:16887: \$? = $ac_status" >&5
16888   (exit $ac_status); } &&
16889          { ac_try='test -s conftest$ac_exeext'
16890   { (eval echo "$as_me:16890: \"$ac_try\"") >&5
16891   (eval $ac_try) 2>&5
16892   ac_status=$?
16893   echo "$as_me:16893: \$? = $ac_status" >&5
16894   (exit $ac_status); }; }; then
16895   cf_cv_have___va_copy=yes
16896 else
16897   echo "$as_me: failed program was:" >&5
16898 cat conftest.$ac_ext >&5
16899 cf_cv_have___va_copy=no
16900 fi
16901 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16902 fi
16903 echo "$as_me:16903: result: $cf_cv_have___va_copy" >&5
16904 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16905
16906 test "$cf_cv_have___va_copy" = yes &&
16907 cat >>confdefs.h <<\EOF
16908 #define HAVE___VA_COPY 1
16909 EOF
16910
16911 echo "$as_me:16911: checking for pid_t" >&5
16912 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16913 if test "${ac_cv_type_pid_t+set}" = set; then
16914   echo $ECHO_N "(cached) $ECHO_C" >&6
16915 else
16916   cat >conftest.$ac_ext <<_ACEOF
16917 #line 16917 "configure"
16918 #include "confdefs.h"
16919 $ac_includes_default
16920 int
16921 main ()
16922 {
16923 if ((pid_t *) 0)
16924   return 0;
16925 if (sizeof (pid_t))
16926   return 0;
16927   ;
16928   return 0;
16929 }
16930 _ACEOF
16931 rm -f conftest.$ac_objext
16932 if { (eval echo "$as_me:16932: \"$ac_compile\"") >&5
16933   (eval $ac_compile) 2>&5
16934   ac_status=$?
16935   echo "$as_me:16935: \$? = $ac_status" >&5
16936   (exit $ac_status); } &&
16937          { ac_try='test -s conftest.$ac_objext'
16938   { (eval echo "$as_me:16938: \"$ac_try\"") >&5
16939   (eval $ac_try) 2>&5
16940   ac_status=$?
16941   echo "$as_me:16941: \$? = $ac_status" >&5
16942   (exit $ac_status); }; }; then
16943   ac_cv_type_pid_t=yes
16944 else
16945   echo "$as_me: failed program was:" >&5
16946 cat conftest.$ac_ext >&5
16947 ac_cv_type_pid_t=no
16948 fi
16949 rm -f conftest.$ac_objext conftest.$ac_ext
16950 fi
16951 echo "$as_me:16951: result: $ac_cv_type_pid_t" >&5
16952 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16953 if test $ac_cv_type_pid_t = yes; then
16954   :
16955 else
16956
16957 cat >>confdefs.h <<EOF
16958 #define pid_t int
16959 EOF
16960
16961 fi
16962
16963 for ac_header in unistd.h vfork.h
16964 do
16965 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16966 echo "$as_me:16966: checking for $ac_header" >&5
16967 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16968 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16969   echo $ECHO_N "(cached) $ECHO_C" >&6
16970 else
16971   cat >conftest.$ac_ext <<_ACEOF
16972 #line 16972 "configure"
16973 #include "confdefs.h"
16974 #include <$ac_header>
16975 _ACEOF
16976 if { (eval echo "$as_me:16976: \"$ac_cpp conftest.$ac_ext\"") >&5
16977   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16978   ac_status=$?
16979   egrep -v '^ *\+' conftest.er1 >conftest.err
16980   rm -f conftest.er1
16981   cat conftest.err >&5
16982   echo "$as_me:16982: \$? = $ac_status" >&5
16983   (exit $ac_status); } >/dev/null; then
16984   if test -s conftest.err; then
16985     ac_cpp_err=$ac_c_preproc_warn_flag
16986   else
16987     ac_cpp_err=
16988   fi
16989 else
16990   ac_cpp_err=yes
16991 fi
16992 if test -z "$ac_cpp_err"; then
16993   eval "$as_ac_Header=yes"
16994 else
16995   echo "$as_me: failed program was:" >&5
16996   cat conftest.$ac_ext >&5
16997   eval "$as_ac_Header=no"
16998 fi
16999 rm -f conftest.err conftest.$ac_ext
17000 fi
17001 echo "$as_me:17001: result: `eval echo '${'$as_ac_Header'}'`" >&5
17002 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17003 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17004   cat >>confdefs.h <<EOF
17005 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17006 EOF
17007
17008 fi
17009 done
17010
17011 for ac_func in fork vfork
17012 do
17013 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17014 echo "$as_me:17014: checking for $ac_func" >&5
17015 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17016 if eval "test \"\${$as_ac_var+set}\" = set"; then
17017   echo $ECHO_N "(cached) $ECHO_C" >&6
17018 else
17019   cat >conftest.$ac_ext <<_ACEOF
17020 #line 17020 "configure"
17021 #include "confdefs.h"
17022 /* System header to define __stub macros and hopefully few prototypes,
17023     which can conflict with char $ac_func (); below.  */
17024 #include <assert.h>
17025 /* Override any gcc2 internal prototype to avoid an error.  */
17026 #ifdef __cplusplus
17027 extern "C"
17028 #endif
17029 /* We use char because int might match the return type of a gcc2
17030    builtin and then its argument prototype would still apply.  */
17031 char $ac_func ();
17032 char (*f) ();
17033
17034 int
17035 main ()
17036 {
17037 /* The GNU C library defines this for functions which it implements
17038     to always fail with ENOSYS.  Some functions are actually named
17039     something starting with __ and the normal name is an alias.  */
17040 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17041 choke me
17042 #else
17043 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17044 #endif
17045
17046   ;
17047   return 0;
17048 }
17049 _ACEOF
17050 rm -f conftest.$ac_objext conftest$ac_exeext
17051 if { (eval echo "$as_me:17051: \"$ac_link\"") >&5
17052   (eval $ac_link) 2>&5
17053   ac_status=$?
17054   echo "$as_me:17054: \$? = $ac_status" >&5
17055   (exit $ac_status); } &&
17056          { ac_try='test -s conftest$ac_exeext'
17057   { (eval echo "$as_me:17057: \"$ac_try\"") >&5
17058   (eval $ac_try) 2>&5
17059   ac_status=$?
17060   echo "$as_me:17060: \$? = $ac_status" >&5
17061   (exit $ac_status); }; }; then
17062   eval "$as_ac_var=yes"
17063 else
17064   echo "$as_me: failed program was:" >&5
17065 cat conftest.$ac_ext >&5
17066 eval "$as_ac_var=no"
17067 fi
17068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17069 fi
17070 echo "$as_me:17070: result: `eval echo '${'$as_ac_var'}'`" >&5
17071 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17072 if test `eval echo '${'$as_ac_var'}'` = yes; then
17073   cat >>confdefs.h <<EOF
17074 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17075 EOF
17076
17077 fi
17078 done
17079
17080 ac_cv_func_fork_works=$ac_cv_func_fork
17081 if test "x$ac_cv_func_fork" = xyes; then
17082   echo "$as_me:17082: checking for working fork" >&5
17083 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17084 if test "${ac_cv_func_fork_works+set}" = set; then
17085   echo $ECHO_N "(cached) $ECHO_C" >&6
17086 else
17087   if test "$cross_compiling" = yes; then
17088   ac_cv_func_fork_works=cross
17089 else
17090   cat >conftest.$ac_ext <<_ACEOF
17091 /* By Rüdiger Kuhlmann. */
17092       #include <sys/types.h>
17093       #if HAVE_UNISTD_H
17094       # include <unistd.h>
17095       #endif
17096       /* Some systems only have a dummy stub for fork() */
17097       int main ()
17098       {
17099         if (fork() < 0)
17100           $ac_main_return (1);
17101         $ac_main_return (0);
17102       }
17103 _ACEOF
17104 rm -f conftest$ac_exeext
17105 if { (eval echo "$as_me:17105: \"$ac_link\"") >&5
17106   (eval $ac_link) 2>&5
17107   ac_status=$?
17108   echo "$as_me:17108: \$? = $ac_status" >&5
17109   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17110   { (eval echo "$as_me:17110: \"$ac_try\"") >&5
17111   (eval $ac_try) 2>&5
17112   ac_status=$?
17113   echo "$as_me:17113: \$? = $ac_status" >&5
17114   (exit $ac_status); }; }; then
17115   ac_cv_func_fork_works=yes
17116 else
17117   echo "$as_me: program exited with status $ac_status" >&5
17118 echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 ac_cv_func_fork_works=no
17121 fi
17122 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17123 fi
17124 fi
17125 echo "$as_me:17125: result: $ac_cv_func_fork_works" >&5
17126 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17127
17128 fi
17129 if test "x$ac_cv_func_fork_works" = xcross; then
17130   case $host in
17131     *-*-amigaos* | *-*-msdosdjgpp*)
17132       # Override, as these systems have only a dummy fork() stub
17133       ac_cv_func_fork_works=no
17134       ;;
17135     *)
17136       ac_cv_func_fork_works=yes
17137       ;;
17138   esac
17139   { echo "$as_me:17139: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17140 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17141 fi
17142 ac_cv_func_vfork_works=$ac_cv_func_vfork
17143 if test "x$ac_cv_func_vfork" = xyes; then
17144   echo "$as_me:17144: checking for working vfork" >&5
17145 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17146 if test "${ac_cv_func_vfork_works+set}" = set; then
17147   echo $ECHO_N "(cached) $ECHO_C" >&6
17148 else
17149   if test "$cross_compiling" = yes; then
17150   ac_cv_func_vfork_works=cross
17151 else
17152   cat >conftest.$ac_ext <<_ACEOF
17153 #line 17153 "configure"
17154 #include "confdefs.h"
17155 /* Thanks to Paul Eggert for this test.  */
17156 #include <stdio.h>
17157 #include <sys/types.h>
17158 #include <sys/stat.h>
17159 #if HAVE_UNISTD_H
17160 # include <unistd.h>
17161 #endif
17162 #if HAVE_VFORK_H
17163 # include <vfork.h>
17164 #endif
17165 /* On some sparc systems, changes by the child to local and incoming
17166    argument registers are propagated back to the parent.  The compiler
17167    is told about this with #include <vfork.h>, but some compilers
17168    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17169    static variable whose address is put into a register that is
17170    clobbered by the vfork.  */
17171 static
17172 #ifdef __cplusplus
17173 sparc_address_test (int arg)
17174 # else
17175 sparc_address_test (arg) int arg;
17176 #endif
17177 {
17178   static pid_t child;
17179   if (!child) {
17180     child = vfork ();
17181     if (child < 0) {
17182       perror ("vfork");
17183       _exit(2);
17184     }
17185     if (!child) {
17186       arg = getpid();
17187       write(-1, "", 0);
17188       _exit (arg);
17189     }
17190   }
17191 }
17192
17193 int
17194 main ()
17195 {
17196   pid_t parent = getpid ();
17197   pid_t child;
17198
17199   sparc_address_test ();
17200
17201   child = vfork ();
17202
17203   if (child == 0) {
17204     /* Here is another test for sparc vfork register problems.  This
17205        test uses lots of local variables, at least as many local
17206        variables as main has allocated so far including compiler
17207        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17208        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17209        reuse the register of parent for one of the local variables,
17210        since it will think that parent can't possibly be used any more
17211        in this routine.  Assigning to the local variable will thus
17212        munge parent in the parent process.  */
17213     pid_t
17214       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17215       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17216     /* Convince the compiler that p..p7 are live; otherwise, it might
17217        use the same hardware register for all 8 local variables.  */
17218     if (p != p1 || p != p2 || p != p3 || p != p4
17219         || p != p5 || p != p6 || p != p7)
17220       _exit(1);
17221
17222     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17223        from child file descriptors.  If the child closes a descriptor
17224        before it execs or exits, this munges the parent's descriptor
17225        as well.  Test for this by closing stdout in the child.  */
17226     _exit(close(fileno(stdout)) != 0);
17227   } else {
17228     int status;
17229     struct stat st;
17230
17231     while (wait(&status) != child)
17232       ;
17233     $ac_main_return(
17234          /* Was there some problem with vforking?  */
17235          child < 0
17236
17237          /* Did the child fail?  (This shouldn't happen.)  */
17238          || status
17239
17240          /* Did the vfork/compiler bug occur?  */
17241          || parent != getpid()
17242
17243          /* Did the file descriptor bug occur?  */
17244          || fstat(fileno(stdout), &st) != 0
17245          );
17246   }
17247 }
17248 _ACEOF
17249 rm -f conftest$ac_exeext
17250 if { (eval echo "$as_me:17250: \"$ac_link\"") >&5
17251   (eval $ac_link) 2>&5
17252   ac_status=$?
17253   echo "$as_me:17253: \$? = $ac_status" >&5
17254   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17255   { (eval echo "$as_me:17255: \"$ac_try\"") >&5
17256   (eval $ac_try) 2>&5
17257   ac_status=$?
17258   echo "$as_me:17258: \$? = $ac_status" >&5
17259   (exit $ac_status); }; }; then
17260   ac_cv_func_vfork_works=yes
17261 else
17262   echo "$as_me: program exited with status $ac_status" >&5
17263 echo "$as_me: failed program was:" >&5
17264 cat conftest.$ac_ext >&5
17265 ac_cv_func_vfork_works=no
17266 fi
17267 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17268 fi
17269 fi
17270 echo "$as_me:17270: result: $ac_cv_func_vfork_works" >&5
17271 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17272
17273 fi;
17274 if test "x$ac_cv_func_fork_works" = xcross; then
17275   ac_cv_func_vfork_works=ac_cv_func_vfork
17276   { echo "$as_me:17276: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17277 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17278 fi
17279
17280 if test "x$ac_cv_func_vfork_works" = xyes; then
17281
17282 cat >>confdefs.h <<\EOF
17283 #define HAVE_WORKING_VFORK 1
17284 EOF
17285
17286 else
17287
17288 cat >>confdefs.h <<\EOF
17289 #define vfork fork
17290 EOF
17291
17292 fi
17293 if test "x$ac_cv_func_fork_works" = xyes; then
17294
17295 cat >>confdefs.h <<\EOF
17296 #define HAVE_WORKING_FORK 1
17297 EOF
17298
17299 fi
17300
17301 # special check for test/ditto.c
17302
17303 echo "$as_me:17303: checking for openpty in -lutil" >&5
17304 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17305 if test "${ac_cv_lib_util_openpty+set}" = set; then
17306   echo $ECHO_N "(cached) $ECHO_C" >&6
17307 else
17308   ac_check_lib_save_LIBS=$LIBS
17309 LIBS="-lutil  $LIBS"
17310 cat >conftest.$ac_ext <<_ACEOF
17311 #line 17311 "configure"
17312 #include "confdefs.h"
17313
17314 /* Override any gcc2 internal prototype to avoid an error.  */
17315 #ifdef __cplusplus
17316 extern "C"
17317 #endif
17318 /* We use char because int might match the return type of a gcc2
17319    builtin and then its argument prototype would still apply.  */
17320 char openpty ();
17321 int
17322 main ()
17323 {
17324 openpty ();
17325   ;
17326   return 0;
17327 }
17328 _ACEOF
17329 rm -f conftest.$ac_objext conftest$ac_exeext
17330 if { (eval echo "$as_me:17330: \"$ac_link\"") >&5
17331   (eval $ac_link) 2>&5
17332   ac_status=$?
17333   echo "$as_me:17333: \$? = $ac_status" >&5
17334   (exit $ac_status); } &&
17335          { ac_try='test -s conftest$ac_exeext'
17336   { (eval echo "$as_me:17336: \"$ac_try\"") >&5
17337   (eval $ac_try) 2>&5
17338   ac_status=$?
17339   echo "$as_me:17339: \$? = $ac_status" >&5
17340   (exit $ac_status); }; }; then
17341   ac_cv_lib_util_openpty=yes
17342 else
17343   echo "$as_me: failed program was:" >&5
17344 cat conftest.$ac_ext >&5
17345 ac_cv_lib_util_openpty=no
17346 fi
17347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17348 LIBS=$ac_check_lib_save_LIBS
17349 fi
17350 echo "$as_me:17350: result: $ac_cv_lib_util_openpty" >&5
17351 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17352 if test $ac_cv_lib_util_openpty = yes; then
17353   cf_cv_lib_util=yes
17354 else
17355   cf_cv_lib_util=no
17356 fi
17357
17358 echo "$as_me:17358: checking for openpty header" >&5
17359 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17360 if test "${cf_cv_func_openpty+set}" = set; then
17361   echo $ECHO_N "(cached) $ECHO_C" >&6
17362 else
17363
17364     cf_save_LIBS="$LIBS"
17365     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17366     for cf_header in pty.h libutil.h util.h
17367     do
17368     cat >conftest.$ac_ext <<_ACEOF
17369 #line 17369 "configure"
17370 #include "confdefs.h"
17371
17372 #include <$cf_header>
17373
17374 int
17375 main ()
17376 {
17377
17378     int x = openpty((int *)0, (int *)0, (char *)0,
17379                    (struct termios *)0, (struct winsize *)0);
17380
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 rm -f conftest.$ac_objext conftest$ac_exeext
17386 if { (eval echo "$as_me:17386: \"$ac_link\"") >&5
17387   (eval $ac_link) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit $ac_status); } &&
17391          { ac_try='test -s conftest$ac_exeext'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); }; }; then
17397
17398         cf_cv_func_openpty=$cf_header
17399         break
17400
17401 else
17402   echo "$as_me: failed program was:" >&5
17403 cat conftest.$ac_ext >&5
17404
17405         cf_cv_func_openpty=no
17406
17407 fi
17408 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17409     done
17410     LIBS="$cf_save_LIBS"
17411
17412 fi
17413 echo "$as_me:17413: result: $cf_cv_func_openpty" >&5
17414 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17415
17416 if test "$cf_cv_func_openpty" != no ; then
17417
17418 cat >>confdefs.h <<EOF
17419 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17420 EOF
17421
17422 cat >>confdefs.h <<\EOF
17423 #define USE_XTERM_PTY 1
17424 EOF
17425
17426     if test "x$cf_cv_lib_util" = xyes ; then
17427         TEST_LIBS="-lutil $TEST_LIBS"
17428     fi
17429 fi
17430
17431 if test "$with_hashed_db" != no ; then
17432
17433 cat >>confdefs.h <<\EOF
17434 #define USE_HASHED_DB 1
17435 EOF
17436
17437 case $with_hashed_db in #(vi
17438 yes|*able*) #(vi
17439     ;;
17440 *)
17441     if test -d "$with_hashed_db" ; then
17442
17443 if test -n "$with_hashed_db/include" ; then
17444   for cf_add_incdir in $with_hashed_db/include
17445   do
17446         while test $cf_add_incdir != /usr/include
17447         do
17448           if test -d $cf_add_incdir
17449           then
17450                 cf_have_incdir=no
17451                 if test -n "$CFLAGS$CPPFLAGS" ; then
17452                   # a loop is needed to ensure we can add subdirs of existing dirs
17453                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17454                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17455                           cf_have_incdir=yes; break
17456                         fi
17457                   done
17458                 fi
17459
17460                 if test "$cf_have_incdir" = no ; then
17461                   if test "$cf_add_incdir" = /usr/local/include ; then
17462                         if test "$GCC" = yes
17463                         then
17464                           cf_save_CPPFLAGS=$CPPFLAGS
17465                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17466                           cat >conftest.$ac_ext <<_ACEOF
17467 #line 17467 "configure"
17468 #include "confdefs.h"
17469 #include <stdio.h>
17470 int
17471 main ()
17472 {
17473 printf("Hello")
17474   ;
17475   return 0;
17476 }
17477 _ACEOF
17478 rm -f conftest.$ac_objext
17479 if { (eval echo "$as_me:17479: \"$ac_compile\"") >&5
17480   (eval $ac_compile) 2>&5
17481   ac_status=$?
17482   echo "$as_me:17482: \$? = $ac_status" >&5
17483   (exit $ac_status); } &&
17484          { ac_try='test -s conftest.$ac_objext'
17485   { (eval echo "$as_me:17485: \"$ac_try\"") >&5
17486   (eval $ac_try) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit $ac_status); }; }; then
17490   :
17491 else
17492   echo "$as_me: failed program was:" >&5
17493 cat conftest.$ac_ext >&5
17494 cf_have_incdir=yes
17495 fi
17496 rm -f conftest.$ac_objext conftest.$ac_ext
17497                           CPPFLAGS=$cf_save_CPPFLAGS
17498                         fi
17499                   fi
17500                 fi
17501
17502                 if test "$cf_have_incdir" = no ; then
17503                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17504
17505 echo "${as_me:-configure}:17505: testing adding $cf_add_incdir to include-path ..." 1>&5
17506
17507                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17508
17509                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17510                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17511                   cf_add_incdir="$cf_top_incdir"
17512                 else
17513                   break
17514                 fi
17515           fi
17516         done
17517   done
17518 fi
17519
17520 if test -n "$with_hashed_db/lib" ; then
17521   for cf_add_libdir in $with_hashed_db/lib
17522   do
17523     if test $cf_add_libdir = /usr/lib ; then
17524       :
17525     elif test -d $cf_add_libdir
17526     then
17527       cf_have_libdir=no
17528       if test -n "$LDFLAGS$LIBS" ; then
17529         # a loop is needed to ensure we can add subdirs of existing dirs
17530         for cf_test_libdir in $LDFLAGS $LIBS ; do
17531           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17532             cf_have_libdir=yes; break
17533           fi
17534         done
17535       fi
17536       if test "$cf_have_libdir" = no ; then
17537         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17538
17539 echo "${as_me:-configure}:17539: testing adding $cf_add_libdir to library-path ..." 1>&5
17540
17541         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17542       fi
17543     fi
17544   done
17545 fi
17546
17547     fi
17548 esac
17549
17550 echo "$as_me:17550: checking for db.h" >&5
17551 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17552 if test "${ac_cv_header_db_h+set}" = set; then
17553   echo $ECHO_N "(cached) $ECHO_C" >&6
17554 else
17555   cat >conftest.$ac_ext <<_ACEOF
17556 #line 17556 "configure"
17557 #include "confdefs.h"
17558 #include <db.h>
17559 _ACEOF
17560 if { (eval echo "$as_me:17560: \"$ac_cpp conftest.$ac_ext\"") >&5
17561   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17562   ac_status=$?
17563   egrep -v '^ *\+' conftest.er1 >conftest.err
17564   rm -f conftest.er1
17565   cat conftest.err >&5
17566   echo "$as_me:17566: \$? = $ac_status" >&5
17567   (exit $ac_status); } >/dev/null; then
17568   if test -s conftest.err; then
17569     ac_cpp_err=$ac_c_preproc_warn_flag
17570   else
17571     ac_cpp_err=
17572   fi
17573 else
17574   ac_cpp_err=yes
17575 fi
17576 if test -z "$ac_cpp_err"; then
17577   ac_cv_header_db_h=yes
17578 else
17579   echo "$as_me: failed program was:" >&5
17580   cat conftest.$ac_ext >&5
17581   ac_cv_header_db_h=no
17582 fi
17583 rm -f conftest.err conftest.$ac_ext
17584 fi
17585 echo "$as_me:17585: result: $ac_cv_header_db_h" >&5
17586 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17587 if test $ac_cv_header_db_h = yes; then
17588
17589 echo "$as_me:17589: checking for version of db" >&5
17590 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17591 if test "${cf_cv_hashed_db_version+set}" = set; then
17592   echo $ECHO_N "(cached) $ECHO_C" >&6
17593 else
17594
17595 cf_cv_hashed_db_version=unknown
17596
17597 for cf_db_version in 1 2 3 4 5
17598 do
17599
17600 echo "${as_me:-configure}:17600: testing checking for db version $cf_db_version ..." 1>&5
17601
17602         cat >conftest.$ac_ext <<_ACEOF
17603 #line 17603 "configure"
17604 #include "confdefs.h"
17605
17606 $ac_includes_default
17607 #include <db.h>
17608
17609 #ifdef DB_VERSION_MAJOR
17610         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17611 #if $cf_db_version == DB_VERSION_MAJOR
17612         /* ok */
17613 #else
17614         make an error
17615 #endif
17616 #else
17617 #if $cf_db_version == 1
17618         /* ok: assuming this is DB 1.8.5 */
17619 #else
17620         make an error
17621 #endif
17622 #endif
17623
17624 int
17625 main ()
17626 {
17627 DBT *foo = 0
17628   ;
17629   return 0;
17630 }
17631 _ACEOF
17632 rm -f conftest.$ac_objext
17633 if { (eval echo "$as_me:17633: \"$ac_compile\"") >&5
17634   (eval $ac_compile) 2>&5
17635   ac_status=$?
17636   echo "$as_me:17636: \$? = $ac_status" >&5
17637   (exit $ac_status); } &&
17638          { ac_try='test -s conftest.$ac_objext'
17639   { (eval echo "$as_me:17639: \"$ac_try\"") >&5
17640   (eval $ac_try) 2>&5
17641   ac_status=$?
17642   echo "$as_me:17642: \$? = $ac_status" >&5
17643   (exit $ac_status); }; }; then
17644
17645         cf_cv_hashed_db_version=$cf_db_version
17646         break
17647
17648 else
17649   echo "$as_me: failed program was:" >&5
17650 cat conftest.$ac_ext >&5
17651 fi
17652 rm -f conftest.$ac_objext conftest.$ac_ext
17653 done
17654
17655 fi
17656 echo "$as_me:17656: result: $cf_cv_hashed_db_version" >&5
17657 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17658
17659 if test "$cf_cv_hashed_db_version" = unknown ; then
17660         { { echo "$as_me:17660: error: Cannot determine version of db" >&5
17661 echo "$as_me: error: Cannot determine version of db" >&2;}
17662    { (exit 1); exit 1; }; }
17663 else
17664
17665 echo "$as_me:17665: checking for db libraries" >&5
17666 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17667 if test "${cf_cv_hashed_db_libs+set}" = set; then
17668   echo $ECHO_N "(cached) $ECHO_C" >&6
17669 else
17670
17671 cf_cv_hashed_db_libs=unknown
17672 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17673 do
17674         cf_save_libs="$LIBS"
17675         if test -n "$cf_db_libs"; then
17676                 LIBS="-l$cf_db_libs $LIBS"
17677         fi
17678
17679 echo "${as_me:-configure}:17679: testing checking for library "$cf_db_libs" ..." 1>&5
17680
17681         cat >conftest.$ac_ext <<_ACEOF
17682 #line 17682 "configure"
17683 #include "confdefs.h"
17684
17685 $ac_includes_default
17686 #include <db.h>
17687
17688 int
17689 main ()
17690 {
17691
17692         char *path = "/tmp/foo";
17693 #ifdef DB_VERSION_MAJOR
17694 #if DB_VERSION_MAJOR >= 4
17695         DB *result = 0;
17696         db_create(&result, NULL, 0);
17697         result->open(result,
17698                 NULL,
17699                 path,
17700                 path,
17701                 DB_HASH,
17702                 DB_CREATE,
17703                 0644);
17704 #elif DB_VERSION_MAJOR >= 3
17705         DB *result = 0;
17706         db_create(&result, NULL, 0);
17707         result->open(result,
17708                 path,
17709                 path,
17710                 DB_HASH,
17711                 DB_CREATE,
17712                 0644);
17713 #elif DB_VERSION_MAJOR >= 2
17714         DB *result = 0;
17715         db_open(path,
17716                 DB_HASH,
17717                 DB_CREATE,
17718                 0644,
17719                 (DB_ENV *) 0,
17720                 (DB_INFO *) 0,
17721                 &result);
17722 #endif /* DB_VERSION_MAJOR */
17723 #else
17724         DB *result = dbopen(path,
17725                      2,
17726                      0644,
17727                      DB_HASH,
17728                      0);
17729 #endif
17730         ${cf_cv_main_return:-return}(result != 0)
17731
17732   ;
17733   return 0;
17734 }
17735 _ACEOF
17736 rm -f conftest.$ac_objext conftest$ac_exeext
17737 if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
17738   (eval $ac_link) 2>&5
17739   ac_status=$?
17740   echo "$as_me:17740: \$? = $ac_status" >&5
17741   (exit $ac_status); } &&
17742          { ac_try='test -s conftest$ac_exeext'
17743   { (eval echo "$as_me:17743: \"$ac_try\"") >&5
17744   (eval $ac_try) 2>&5
17745   ac_status=$?
17746   echo "$as_me:17746: \$? = $ac_status" >&5
17747   (exit $ac_status); }; }; then
17748
17749         if test -n "$cf_db_libs" ; then
17750                 cf_cv_hashed_db_libs=$cf_db_libs
17751         else
17752                 cf_cv_hashed_db_libs=default
17753         fi
17754         LIBS="$cf_save_libs"
17755         break
17756
17757 else
17758   echo "$as_me: failed program was:" >&5
17759 cat conftest.$ac_ext >&5
17760 fi
17761 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17762         LIBS="$cf_save_libs"
17763 done
17764
17765 fi
17766 echo "$as_me:17766: result: $cf_cv_hashed_db_libs" >&5
17767 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17768
17769         if test "$cf_cv_hashed_db_libs" = unknown ; then
17770                 { { echo "$as_me:17770: error: Cannot determine library for db" >&5
17771 echo "$as_me: error: Cannot determine library for db" >&2;}
17772    { (exit 1); exit 1; }; }
17773         elif test "$cf_cv_hashed_db_libs" != default ; then
17774                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17775         fi
17776 fi
17777
17778 else
17779
17780         { { echo "$as_me:17780: error: Cannot find db.h" >&5
17781 echo "$as_me: error: Cannot find db.h" >&2;}
17782    { (exit 1); exit 1; }; }
17783
17784 fi
17785
17786 fi
17787
17788 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17789         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17790         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17791 fi
17792
17793 # Just in case, check if the C compiler has a bool type.
17794
17795 echo "$as_me:17795: checking if we should include stdbool.h" >&5
17796 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17797
17798 if test "${cf_cv_header_stdbool_h+set}" = set; then
17799   echo $ECHO_N "(cached) $ECHO_C" >&6
17800 else
17801
17802         cat >conftest.$ac_ext <<_ACEOF
17803 #line 17803 "configure"
17804 #include "confdefs.h"
17805
17806 int
17807 main ()
17808 {
17809 bool foo = false
17810   ;
17811   return 0;
17812 }
17813 _ACEOF
17814 rm -f conftest.$ac_objext
17815 if { (eval echo "$as_me:17815: \"$ac_compile\"") >&5
17816   (eval $ac_compile) 2>&5
17817   ac_status=$?
17818   echo "$as_me:17818: \$? = $ac_status" >&5
17819   (exit $ac_status); } &&
17820          { ac_try='test -s conftest.$ac_objext'
17821   { (eval echo "$as_me:17821: \"$ac_try\"") >&5
17822   (eval $ac_try) 2>&5
17823   ac_status=$?
17824   echo "$as_me:17824: \$? = $ac_status" >&5
17825   (exit $ac_status); }; }; then
17826   cf_cv_header_stdbool_h=0
17827 else
17828   echo "$as_me: failed program was:" >&5
17829 cat conftest.$ac_ext >&5
17830 cat >conftest.$ac_ext <<_ACEOF
17831 #line 17831 "configure"
17832 #include "confdefs.h"
17833
17834 #ifndef __BEOS__
17835 #include <stdbool.h>
17836 #endif
17837
17838 int
17839 main ()
17840 {
17841 bool foo = false
17842   ;
17843   return 0;
17844 }
17845 _ACEOF
17846 rm -f conftest.$ac_objext
17847 if { (eval echo "$as_me:17847: \"$ac_compile\"") >&5
17848   (eval $ac_compile) 2>&5
17849   ac_status=$?
17850   echo "$as_me:17850: \$? = $ac_status" >&5
17851   (exit $ac_status); } &&
17852          { ac_try='test -s conftest.$ac_objext'
17853   { (eval echo "$as_me:17853: \"$ac_try\"") >&5
17854   (eval $ac_try) 2>&5
17855   ac_status=$?
17856   echo "$as_me:17856: \$? = $ac_status" >&5
17857   (exit $ac_status); }; }; then
17858   cf_cv_header_stdbool_h=1
17859 else
17860   echo "$as_me: failed program was:" >&5
17861 cat conftest.$ac_ext >&5
17862 cf_cv_header_stdbool_h=0
17863 fi
17864 rm -f conftest.$ac_objext conftest.$ac_ext
17865 fi
17866 rm -f conftest.$ac_objext conftest.$ac_ext
17867 fi
17868
17869 if test "$cf_cv_header_stdbool_h" = 1
17870 then    echo "$as_me:17870: result: yes" >&5
17871 echo "${ECHO_T}yes" >&6
17872 else    echo "$as_me:17872: result: no" >&5
17873 echo "${ECHO_T}no" >&6
17874 fi
17875
17876 echo "$as_me:17876: checking for builtin bool type" >&5
17877 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17878
17879 if test "${cf_cv_cc_bool_type+set}" = set; then
17880   echo $ECHO_N "(cached) $ECHO_C" >&6
17881 else
17882
17883         cat >conftest.$ac_ext <<_ACEOF
17884 #line 17884 "configure"
17885 #include "confdefs.h"
17886
17887 #include <stdio.h>
17888 #include <sys/types.h>
17889
17890 int
17891 main ()
17892 {
17893 bool x = false
17894   ;
17895   return 0;
17896 }
17897 _ACEOF
17898 rm -f conftest.$ac_objext
17899 if { (eval echo "$as_me:17899: \"$ac_compile\"") >&5
17900   (eval $ac_compile) 2>&5
17901   ac_status=$?
17902   echo "$as_me:17902: \$? = $ac_status" >&5
17903   (exit $ac_status); } &&
17904          { ac_try='test -s conftest.$ac_objext'
17905   { (eval echo "$as_me:17905: \"$ac_try\"") >&5
17906   (eval $ac_try) 2>&5
17907   ac_status=$?
17908   echo "$as_me:17908: \$? = $ac_status" >&5
17909   (exit $ac_status); }; }; then
17910   cf_cv_cc_bool_type=1
17911 else
17912   echo "$as_me: failed program was:" >&5
17913 cat conftest.$ac_ext >&5
17914 cf_cv_cc_bool_type=0
17915 fi
17916 rm -f conftest.$ac_objext conftest.$ac_ext
17917
17918 fi
17919
17920 if test "$cf_cv_cc_bool_type" = 1
17921 then    echo "$as_me:17921: result: yes" >&5
17922 echo "${ECHO_T}yes" >&6
17923 else    echo "$as_me:17923: result: no" >&5
17924 echo "${ECHO_T}no" >&6
17925 fi
17926
17927 # Check for C++ compiler characteristics (and ensure that it's there!)
17928 if test -n "$CXX" ; then
17929         ac_ext=cc
17930 ac_cpp='$CXXCPP $CPPFLAGS'
17931 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17932 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17933 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17934 ac_main_return=return
17935
17936 if test -n "$GXX" ; then
17937 case $cf_cv_system_name in #(vi
17938 os2*) #(vi
17939         cf_stdcpp_libname=stdcpp
17940         ;;
17941 *)
17942         cf_stdcpp_libname=stdc++
17943         ;;
17944 esac
17945 echo "$as_me:17945: checking for library $cf_stdcpp_libname" >&5
17946 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17947 if test "${cf_cv_libstdcpp+set}" = set; then
17948   echo $ECHO_N "(cached) $ECHO_C" >&6
17949 else
17950
17951         cf_save="$LIBS"
17952         LIBS="-l$cf_stdcpp_libname $LIBS"
17953 cat >conftest.$ac_ext <<_ACEOF
17954 #line 17954 "configure"
17955 #include "confdefs.h"
17956
17957 #include <strstream.h>
17958 int
17959 main ()
17960 {
17961
17962 char buf[80];
17963 strstreambuf foo(buf, sizeof(buf))
17964
17965   ;
17966   return 0;
17967 }
17968 _ACEOF
17969 rm -f conftest.$ac_objext conftest$ac_exeext
17970 if { (eval echo "$as_me:17970: \"$ac_link\"") >&5
17971   (eval $ac_link) 2>&5
17972   ac_status=$?
17973   echo "$as_me:17973: \$? = $ac_status" >&5
17974   (exit $ac_status); } &&
17975          { ac_try='test -s conftest$ac_exeext'
17976   { (eval echo "$as_me:17976: \"$ac_try\"") >&5
17977   (eval $ac_try) 2>&5
17978   ac_status=$?
17979   echo "$as_me:17979: \$? = $ac_status" >&5
17980   (exit $ac_status); }; }; then
17981   cf_cv_libstdcpp=yes
17982 else
17983   echo "$as_me: failed program was:" >&5
17984 cat conftest.$ac_ext >&5
17985 cf_cv_libstdcpp=no
17986 fi
17987 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17988         LIBS="$cf_save"
17989
17990 fi
17991 echo "$as_me:17991: result: $cf_cv_libstdcpp" >&5
17992 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17993 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17994 fi
17995
17996         echo "$as_me:17996: checking whether $CXX understands -c and -o together" >&5
17997 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17998 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17999   echo $ECHO_N "(cached) $ECHO_C" >&6
18000 else
18001
18002 cat > conftest.$ac_ext <<CF_EOF
18003 #include <stdio.h>
18004 int main()
18005 {
18006         ${cf_cv_main_return:-return}(0);
18007 }
18008 CF_EOF
18009 # We do the test twice because some compilers refuse to overwrite an
18010 # existing .o file with -o, though they will create one.
18011 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18012 if { (eval echo "$as_me:18012: \"$ac_try\"") >&5
18013   (eval $ac_try) 2>&5
18014   ac_status=$?
18015   echo "$as_me:18015: \$? = $ac_status" >&5
18016   (exit $ac_status); } &&
18017   test -f conftest2.$ac_objext && { (eval echo "$as_me:18017: \"$ac_try\"") >&5
18018   (eval $ac_try) 2>&5
18019   ac_status=$?
18020   echo "$as_me:18020: \$? = $ac_status" >&5
18021   (exit $ac_status); };
18022 then
18023   eval cf_cv_prog_CXX_c_o=yes
18024 else
18025   eval cf_cv_prog_CXX_c_o=no
18026 fi
18027 rm -rf conftest*
18028
18029 fi
18030 if test $cf_cv_prog_CXX_c_o = yes; then
18031   echo "$as_me:18031: result: yes" >&5
18032 echo "${ECHO_T}yes" >&6
18033 else
18034   echo "$as_me:18034: result: no" >&5
18035 echo "${ECHO_T}no" >&6
18036 fi
18037
18038         case $GXX_VERSION in
18039         1*|2.0-6*)
18040                 cf_cxx_library=yes
18041                 ;;
18042         *-2.7*|2.7*)
18043
18044 cf_cxx_library=unknown
18045 case $cf_cv_system_name in #(vi
18046 os2*) #(vi
18047         cf_gpp_libname=gpp
18048         ;;
18049 *)
18050         cf_gpp_libname=g++
18051         ;;
18052 esac
18053 if test "$GXX" = yes; then
18054         echo "$as_me:18054: checking for lib$cf_gpp_libname" >&5
18055 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18056         cf_save="$LIBS"
18057         LIBS="-l$cf_gpp_libname $LIBS"
18058         cat >conftest.$ac_ext <<_ACEOF
18059 #line 18059 "configure"
18060 #include "confdefs.h"
18061
18062 #include <$cf_gpp_libname/builtin.h>
18063
18064 int
18065 main ()
18066 {
18067 two_arg_error_handler_t foo2 = lib_error_handler
18068   ;
18069   return 0;
18070 }
18071 _ACEOF
18072 rm -f conftest.$ac_objext conftest$ac_exeext
18073 if { (eval echo "$as_me:18073: \"$ac_link\"") >&5
18074   (eval $ac_link) 2>&5
18075   ac_status=$?
18076   echo "$as_me:18076: \$? = $ac_status" >&5
18077   (exit $ac_status); } &&
18078          { ac_try='test -s conftest$ac_exeext'
18079   { (eval echo "$as_me:18079: \"$ac_try\"") >&5
18080   (eval $ac_try) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit $ac_status); }; }; then
18084   cf_cxx_library=yes
18085          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18086          if test "$cf_gpp_libname" = cpp ; then
18087
18088 cat >>confdefs.h <<\EOF
18089 #define HAVE_GPP_BUILTIN_H 1
18090 EOF
18091
18092          else
18093
18094 cat >>confdefs.h <<\EOF
18095 #define HAVE_GXX_BUILTIN_H 1
18096 EOF
18097
18098          fi
18099 else
18100   echo "$as_me: failed program was:" >&5
18101 cat conftest.$ac_ext >&5
18102 cat >conftest.$ac_ext <<_ACEOF
18103 #line 18103 "configure"
18104 #include "confdefs.h"
18105
18106 #include <builtin.h>
18107
18108 int
18109 main ()
18110 {
18111 two_arg_error_handler_t foo2 = lib_error_handler
18112   ;
18113   return 0;
18114 }
18115 _ACEOF
18116 rm -f conftest.$ac_objext conftest$ac_exeext
18117 if { (eval echo "$as_me:18117: \"$ac_link\"") >&5
18118   (eval $ac_link) 2>&5
18119   ac_status=$?
18120   echo "$as_me:18120: \$? = $ac_status" >&5
18121   (exit $ac_status); } &&
18122          { ac_try='test -s conftest$ac_exeext'
18123   { (eval echo "$as_me:18123: \"$ac_try\"") >&5
18124   (eval $ac_try) 2>&5
18125   ac_status=$?
18126   echo "$as_me:18126: \$? = $ac_status" >&5
18127   (exit $ac_status); }; }; then
18128   cf_cxx_library=yes
18129          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18130
18131 cat >>confdefs.h <<\EOF
18132 #define HAVE_BUILTIN_H 1
18133 EOF
18134
18135 else
18136   echo "$as_me: failed program was:" >&5
18137 cat conftest.$ac_ext >&5
18138 cf_cxx_library=no
18139 fi
18140 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18141 fi
18142 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18143         LIBS="$cf_save"
18144         echo "$as_me:18144: result: $cf_cxx_library" >&5
18145 echo "${ECHO_T}$cf_cxx_library" >&6
18146 fi
18147
18148                 ;;
18149         *)
18150                 cf_cxx_library=no
18151                 ;;
18152         esac
18153
18154         ac_ext=cc
18155 ac_cpp='$CXXCPP $CPPFLAGS'
18156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18159 ac_main_return=return
18160 echo "$as_me:18160: checking how to run the C++ preprocessor" >&5
18161 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18162 if test -z "$CXXCPP"; then
18163   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18164   echo $ECHO_N "(cached) $ECHO_C" >&6
18165 else
18166       # Double quotes because CXXCPP needs to be expanded
18167     for CXXCPP in "$CXX -E" "/lib/cpp"
18168     do
18169       ac_preproc_ok=false
18170 for ac_cxx_preproc_warn_flag in '' yes
18171 do
18172   # Use a header file that comes with gcc, so configuring glibc
18173   # with a fresh cross-compiler works.
18174   # On the NeXT, cc -E runs the code through the compiler's parser,
18175   # not just through cpp. "Syntax error" is here to catch this case.
18176   cat >conftest.$ac_ext <<_ACEOF
18177 #line 18177 "configure"
18178 #include "confdefs.h"
18179 #include <assert.h>
18180                      Syntax error
18181 _ACEOF
18182 if { (eval echo "$as_me:18182: \"$ac_cpp conftest.$ac_ext\"") >&5
18183   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18184   ac_status=$?
18185   egrep -v '^ *\+' conftest.er1 >conftest.err
18186   rm -f conftest.er1
18187   cat conftest.err >&5
18188   echo "$as_me:18188: \$? = $ac_status" >&5
18189   (exit $ac_status); } >/dev/null; then
18190   if test -s conftest.err; then
18191     ac_cpp_err=$ac_cxx_preproc_warn_flag
18192   else
18193     ac_cpp_err=
18194   fi
18195 else
18196   ac_cpp_err=yes
18197 fi
18198 if test -z "$ac_cpp_err"; then
18199   :
18200 else
18201   echo "$as_me: failed program was:" >&5
18202   cat conftest.$ac_ext >&5
18203   # Broken: fails on valid input.
18204 continue
18205 fi
18206 rm -f conftest.err conftest.$ac_ext
18207
18208   # OK, works on sane cases.  Now check whether non-existent headers
18209   # can be detected and how.
18210   cat >conftest.$ac_ext <<_ACEOF
18211 #line 18211 "configure"
18212 #include "confdefs.h"
18213 #include <ac_nonexistent.h>
18214 _ACEOF
18215 if { (eval echo "$as_me:18215: \"$ac_cpp conftest.$ac_ext\"") >&5
18216   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18217   ac_status=$?
18218   egrep -v '^ *\+' conftest.er1 >conftest.err
18219   rm -f conftest.er1
18220   cat conftest.err >&5
18221   echo "$as_me:18221: \$? = $ac_status" >&5
18222   (exit $ac_status); } >/dev/null; then
18223   if test -s conftest.err; then
18224     ac_cpp_err=$ac_cxx_preproc_warn_flag
18225   else
18226     ac_cpp_err=
18227   fi
18228 else
18229   ac_cpp_err=yes
18230 fi
18231 if test -z "$ac_cpp_err"; then
18232   # Broken: success on invalid input.
18233 continue
18234 else
18235   echo "$as_me: failed program was:" >&5
18236   cat conftest.$ac_ext >&5
18237   # Passes both tests.
18238 ac_preproc_ok=:
18239 break
18240 fi
18241 rm -f conftest.err conftest.$ac_ext
18242
18243 done
18244 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18245 rm -f conftest.err conftest.$ac_ext
18246 if $ac_preproc_ok; then
18247   break
18248 fi
18249
18250     done
18251     ac_cv_prog_CXXCPP=$CXXCPP
18252
18253 fi
18254   CXXCPP=$ac_cv_prog_CXXCPP
18255 else
18256   ac_cv_prog_CXXCPP=$CXXCPP
18257 fi
18258 echo "$as_me:18258: result: $CXXCPP" >&5
18259 echo "${ECHO_T}$CXXCPP" >&6
18260 ac_preproc_ok=false
18261 for ac_cxx_preproc_warn_flag in '' yes
18262 do
18263   # Use a header file that comes with gcc, so configuring glibc
18264   # with a fresh cross-compiler works.
18265   # On the NeXT, cc -E runs the code through the compiler's parser,
18266   # not just through cpp. "Syntax error" is here to catch this case.
18267   cat >conftest.$ac_ext <<_ACEOF
18268 #line 18268 "configure"
18269 #include "confdefs.h"
18270 #include <assert.h>
18271                      Syntax error
18272 _ACEOF
18273 if { (eval echo "$as_me:18273: \"$ac_cpp conftest.$ac_ext\"") >&5
18274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18275   ac_status=$?
18276   egrep -v '^ *\+' conftest.er1 >conftest.err
18277   rm -f conftest.er1
18278   cat conftest.err >&5
18279   echo "$as_me:18279: \$? = $ac_status" >&5
18280   (exit $ac_status); } >/dev/null; then
18281   if test -s conftest.err; then
18282     ac_cpp_err=$ac_cxx_preproc_warn_flag
18283   else
18284     ac_cpp_err=
18285   fi
18286 else
18287   ac_cpp_err=yes
18288 fi
18289 if test -z "$ac_cpp_err"; then
18290   :
18291 else
18292   echo "$as_me: failed program was:" >&5
18293   cat conftest.$ac_ext >&5
18294   # Broken: fails on valid input.
18295 continue
18296 fi
18297 rm -f conftest.err conftest.$ac_ext
18298
18299   # OK, works on sane cases.  Now check whether non-existent headers
18300   # can be detected and how.
18301   cat >conftest.$ac_ext <<_ACEOF
18302 #line 18302 "configure"
18303 #include "confdefs.h"
18304 #include <ac_nonexistent.h>
18305 _ACEOF
18306 if { (eval echo "$as_me:18306: \"$ac_cpp conftest.$ac_ext\"") >&5
18307   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18308   ac_status=$?
18309   egrep -v '^ *\+' conftest.er1 >conftest.err
18310   rm -f conftest.er1
18311   cat conftest.err >&5
18312   echo "$as_me:18312: \$? = $ac_status" >&5
18313   (exit $ac_status); } >/dev/null; then
18314   if test -s conftest.err; then
18315     ac_cpp_err=$ac_cxx_preproc_warn_flag
18316   else
18317     ac_cpp_err=
18318   fi
18319 else
18320   ac_cpp_err=yes
18321 fi
18322 if test -z "$ac_cpp_err"; then
18323   # Broken: success on invalid input.
18324 continue
18325 else
18326   echo "$as_me: failed program was:" >&5
18327   cat conftest.$ac_ext >&5
18328   # Passes both tests.
18329 ac_preproc_ok=:
18330 break
18331 fi
18332 rm -f conftest.err conftest.$ac_ext
18333
18334 done
18335 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18336 rm -f conftest.err conftest.$ac_ext
18337 if $ac_preproc_ok; then
18338   :
18339 else
18340   { { echo "$as_me:18340: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18341 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18342    { (exit 1); exit 1; }; }
18343 fi
18344
18345 ac_ext=cc
18346 ac_cpp='$CXXCPP $CPPFLAGS'
18347 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18348 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18349 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18350 ac_main_return=return
18351
18352 for ac_header in typeinfo
18353 do
18354 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18355 echo "$as_me:18355: checking for $ac_header" >&5
18356 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18357 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18358   echo $ECHO_N "(cached) $ECHO_C" >&6
18359 else
18360   cat >conftest.$ac_ext <<_ACEOF
18361 #line 18361 "configure"
18362 #include "confdefs.h"
18363 #include <$ac_header>
18364 _ACEOF
18365 if { (eval echo "$as_me:18365: \"$ac_cpp conftest.$ac_ext\"") >&5
18366   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18367   ac_status=$?
18368   egrep -v '^ *\+' conftest.er1 >conftest.err
18369   rm -f conftest.er1
18370   cat conftest.err >&5
18371   echo "$as_me:18371: \$? = $ac_status" >&5
18372   (exit $ac_status); } >/dev/null; then
18373   if test -s conftest.err; then
18374     ac_cpp_err=$ac_cxx_preproc_warn_flag
18375   else
18376     ac_cpp_err=
18377   fi
18378 else
18379   ac_cpp_err=yes
18380 fi
18381 if test -z "$ac_cpp_err"; then
18382   eval "$as_ac_Header=yes"
18383 else
18384   echo "$as_me: failed program was:" >&5
18385   cat conftest.$ac_ext >&5
18386   eval "$as_ac_Header=no"
18387 fi
18388 rm -f conftest.err conftest.$ac_ext
18389 fi
18390 echo "$as_me:18390: result: `eval echo '${'$as_ac_Header'}'`" >&5
18391 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18392 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18393   cat >>confdefs.h <<EOF
18394 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18395 EOF
18396
18397 fi
18398 done
18399
18400 for ac_header in iostream
18401 do
18402 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18403 echo "$as_me:18403: checking for $ac_header" >&5
18404 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18405 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18406   echo $ECHO_N "(cached) $ECHO_C" >&6
18407 else
18408   cat >conftest.$ac_ext <<_ACEOF
18409 #line 18409 "configure"
18410 #include "confdefs.h"
18411 #include <$ac_header>
18412 _ACEOF
18413 if { (eval echo "$as_me:18413: \"$ac_cpp conftest.$ac_ext\"") >&5
18414   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18415   ac_status=$?
18416   egrep -v '^ *\+' conftest.er1 >conftest.err
18417   rm -f conftest.er1
18418   cat conftest.err >&5
18419   echo "$as_me:18419: \$? = $ac_status" >&5
18420   (exit $ac_status); } >/dev/null; then
18421   if test -s conftest.err; then
18422     ac_cpp_err=$ac_cxx_preproc_warn_flag
18423   else
18424     ac_cpp_err=
18425   fi
18426 else
18427   ac_cpp_err=yes
18428 fi
18429 if test -z "$ac_cpp_err"; then
18430   eval "$as_ac_Header=yes"
18431 else
18432   echo "$as_me: failed program was:" >&5
18433   cat conftest.$ac_ext >&5
18434   eval "$as_ac_Header=no"
18435 fi
18436 rm -f conftest.err conftest.$ac_ext
18437 fi
18438 echo "$as_me:18438: result: `eval echo '${'$as_ac_Header'}'`" >&5
18439 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18440 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18441   cat >>confdefs.h <<EOF
18442 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18443 EOF
18444
18445 fi
18446 done
18447
18448 if test x"$ac_cv_header_iostream" = xyes ; then
18449         echo "$as_me:18449: checking if iostream uses std-namespace" >&5
18450 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18451         cat >conftest.$ac_ext <<_ACEOF
18452 #line 18452 "configure"
18453 #include "confdefs.h"
18454
18455 #include <iostream>
18456 using std::endl;
18457 using std::cerr;
18458 int
18459 main ()
18460 {
18461
18462 cerr << "testing" << endl;
18463
18464   ;
18465   return 0;
18466 }
18467 _ACEOF
18468 rm -f conftest.$ac_objext
18469 if { (eval echo "$as_me:18469: \"$ac_compile\"") >&5
18470   (eval $ac_compile) 2>&5
18471   ac_status=$?
18472   echo "$as_me:18472: \$? = $ac_status" >&5
18473   (exit $ac_status); } &&
18474          { ac_try='test -s conftest.$ac_objext'
18475   { (eval echo "$as_me:18475: \"$ac_try\"") >&5
18476   (eval $ac_try) 2>&5
18477   ac_status=$?
18478   echo "$as_me:18478: \$? = $ac_status" >&5
18479   (exit $ac_status); }; }; then
18480   cf_iostream_namespace=yes
18481 else
18482   echo "$as_me: failed program was:" >&5
18483 cat conftest.$ac_ext >&5
18484 cf_iostream_namespace=no
18485 fi
18486 rm -f conftest.$ac_objext conftest.$ac_ext
18487         echo "$as_me:18487: result: $cf_iostream_namespace" >&5
18488 echo "${ECHO_T}$cf_iostream_namespace" >&6
18489         if test "$cf_iostream_namespace" = yes ; then
18490
18491 cat >>confdefs.h <<\EOF
18492 #define IOSTREAM_NAMESPACE 1
18493 EOF
18494
18495         fi
18496 fi
18497
18498 echo "$as_me:18498: checking if we should include stdbool.h" >&5
18499 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18500
18501 if test "${cf_cv_header_stdbool_h+set}" = set; then
18502   echo $ECHO_N "(cached) $ECHO_C" >&6
18503 else
18504
18505         cat >conftest.$ac_ext <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508
18509 int
18510 main ()
18511 {
18512 bool foo = false
18513   ;
18514   return 0;
18515 }
18516 _ACEOF
18517 rm -f conftest.$ac_objext
18518 if { (eval echo "$as_me:18518: \"$ac_compile\"") >&5
18519   (eval $ac_compile) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit $ac_status); } &&
18523          { ac_try='test -s conftest.$ac_objext'
18524   { (eval echo "$as_me:18524: \"$ac_try\"") >&5
18525   (eval $ac_try) 2>&5
18526   ac_status=$?
18527   echo "$as_me:18527: \$? = $ac_status" >&5
18528   (exit $ac_status); }; }; then
18529   cf_cv_header_stdbool_h=0
18530 else
18531   echo "$as_me: failed program was:" >&5
18532 cat conftest.$ac_ext >&5
18533 cat >conftest.$ac_ext <<_ACEOF
18534 #line 18534 "configure"
18535 #include "confdefs.h"
18536
18537 #ifndef __BEOS__
18538 #include <stdbool.h>
18539 #endif
18540
18541 int
18542 main ()
18543 {
18544 bool foo = false
18545   ;
18546   return 0;
18547 }
18548 _ACEOF
18549 rm -f conftest.$ac_objext
18550 if { (eval echo "$as_me:18550: \"$ac_compile\"") >&5
18551   (eval $ac_compile) 2>&5
18552   ac_status=$?
18553   echo "$as_me:18553: \$? = $ac_status" >&5
18554   (exit $ac_status); } &&
18555          { ac_try='test -s conftest.$ac_objext'
18556   { (eval echo "$as_me:18556: \"$ac_try\"") >&5
18557   (eval $ac_try) 2>&5
18558   ac_status=$?
18559   echo "$as_me:18559: \$? = $ac_status" >&5
18560   (exit $ac_status); }; }; then
18561   cf_cv_header_stdbool_h=1
18562 else
18563   echo "$as_me: failed program was:" >&5
18564 cat conftest.$ac_ext >&5
18565 cf_cv_header_stdbool_h=0
18566 fi
18567 rm -f conftest.$ac_objext conftest.$ac_ext
18568 fi
18569 rm -f conftest.$ac_objext conftest.$ac_ext
18570 fi
18571
18572 if test "$cf_cv_header_stdbool_h" = 1
18573 then    echo "$as_me:18573: result: yes" >&5
18574 echo "${ECHO_T}yes" >&6
18575 else    echo "$as_me:18575: result: no" >&5
18576 echo "${ECHO_T}no" >&6
18577 fi
18578
18579 echo "$as_me:18579: checking for builtin bool type" >&5
18580 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18581
18582 if test "${cf_cv_builtin_bool+set}" = set; then
18583   echo $ECHO_N "(cached) $ECHO_C" >&6
18584 else
18585
18586         cat >conftest.$ac_ext <<_ACEOF
18587 #line 18587 "configure"
18588 #include "confdefs.h"
18589
18590 #include <stdio.h>
18591 #include <sys/types.h>
18592
18593 int
18594 main ()
18595 {
18596 bool x = false
18597   ;
18598   return 0;
18599 }
18600 _ACEOF
18601 rm -f conftest.$ac_objext
18602 if { (eval echo "$as_me:18602: \"$ac_compile\"") >&5
18603   (eval $ac_compile) 2>&5
18604   ac_status=$?
18605   echo "$as_me:18605: \$? = $ac_status" >&5
18606   (exit $ac_status); } &&
18607          { ac_try='test -s conftest.$ac_objext'
18608   { (eval echo "$as_me:18608: \"$ac_try\"") >&5
18609   (eval $ac_try) 2>&5
18610   ac_status=$?
18611   echo "$as_me:18611: \$? = $ac_status" >&5
18612   (exit $ac_status); }; }; then
18613   cf_cv_builtin_bool=1
18614 else
18615   echo "$as_me: failed program was:" >&5
18616 cat conftest.$ac_ext >&5
18617 cf_cv_builtin_bool=0
18618 fi
18619 rm -f conftest.$ac_objext conftest.$ac_ext
18620
18621 fi
18622
18623 if test "$cf_cv_builtin_bool" = 1
18624 then    echo "$as_me:18624: result: yes" >&5
18625 echo "${ECHO_T}yes" >&6
18626 else    echo "$as_me:18626: result: no" >&5
18627 echo "${ECHO_T}no" >&6
18628 fi
18629
18630 echo "$as_me:18630: checking for size of bool" >&5
18631 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18632 if test "${cf_cv_type_of_bool+set}" = set; then
18633   echo $ECHO_N "(cached) $ECHO_C" >&6
18634 else
18635
18636         rm -f cf_test.out
18637         if test "$cross_compiling" = yes; then
18638   cf_cv_type_of_bool=unknown
18639 else
18640   cat >conftest.$ac_ext <<_ACEOF
18641 #line 18641 "configure"
18642 #include "confdefs.h"
18643
18644 #include <stdlib.h>
18645 #include <stdio.h>
18646
18647 #if defined(__cplusplus)
18648
18649 #ifdef HAVE_GXX_BUILTIN_H
18650 #include <g++/builtin.h>
18651 #elif HAVE_GPP_BUILTIN_H
18652 #include <gpp/builtin.h>
18653 #elif HAVE_BUILTIN_H
18654 #include <builtin.h>
18655 #endif
18656
18657 #else
18658
18659 #if $cf_cv_header_stdbool_h
18660 #include <stdbool.h>
18661 #endif
18662
18663 #endif
18664
18665 main()
18666 {
18667         FILE *fp = fopen("cf_test.out", "w");
18668         if (fp != 0) {
18669                 bool x = true;
18670                 if ((bool)(-x) >= 0)
18671                         fputs("unsigned ", fp);
18672                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18673                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18674                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18675                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18676                 fclose(fp);
18677         }
18678         ${cf_cv_main_return:-return}(0);
18679 }
18680
18681 _ACEOF
18682 rm -f conftest$ac_exeext
18683 if { (eval echo "$as_me:18683: \"$ac_link\"") >&5
18684   (eval $ac_link) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18688   { (eval echo "$as_me:18688: \"$ac_try\"") >&5
18689   (eval $ac_try) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit $ac_status); }; }; then
18693   cf_cv_type_of_bool=`cat cf_test.out`
18694                  if test -z "$cf_cv_type_of_bool"; then
18695                    cf_cv_type_of_bool=unknown
18696                  fi
18697 else
18698   echo "$as_me: program exited with status $ac_status" >&5
18699 echo "$as_me: failed program was:" >&5
18700 cat conftest.$ac_ext >&5
18701 cf_cv_type_of_bool=unknown
18702 fi
18703 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18704 fi
18705
18706 fi
18707
18708         rm -f cf_test.out
18709 echo "$as_me:18709: result: $cf_cv_type_of_bool" >&5
18710 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18711 if test "$cf_cv_type_of_bool" = unknown ; then
18712         case .$NCURSES_BOOL in #(vi
18713         .auto|.) NCURSES_BOOL=unsigned;;
18714         esac
18715         { echo "$as_me:18715: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18716 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18717         cf_cv_type_of_bool=$NCURSES_BOOL
18718 fi
18719
18720 echo "$as_me:18720: checking for special defines needed for etip.h" >&5
18721 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18722 cf_save_CXXFLAGS="$CXXFLAGS"
18723 cf_result="none"
18724
18725 # etip.h includes ncurses.h which includes ncurses_dll.h
18726 # But ncurses_dll.h is generated - fix here.
18727 test -d include || mkdir include
18728 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
18729
18730 for cf_math in "" MATH_H
18731 do
18732 for cf_excp in "" MATH_EXCEPTION
18733 do
18734         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18735         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18736         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18737 cat >conftest.$ac_ext <<_ACEOF
18738 #line 18738 "configure"
18739 #include "confdefs.h"
18740
18741 #include <etip.h.in>
18742
18743 int
18744 main ()
18745 {
18746
18747   ;
18748   return 0;
18749 }
18750 _ACEOF
18751 rm -f conftest.$ac_objext
18752 if { (eval echo "$as_me:18752: \"$ac_compile\"") >&5
18753   (eval $ac_compile) 2>&5
18754   ac_status=$?
18755   echo "$as_me:18755: \$? = $ac_status" >&5
18756   (exit $ac_status); } &&
18757          { ac_try='test -s conftest.$ac_objext'
18758   { (eval echo "$as_me:18758: \"$ac_try\"") >&5
18759   (eval $ac_try) 2>&5
18760   ac_status=$?
18761   echo "$as_me:18761: \$? = $ac_status" >&5
18762   (exit $ac_status); }; }; then
18763
18764         test -n "$cf_math" && cat >>confdefs.h <<EOF
18765 #define ETIP_NEEDS_${cf_math} 1
18766 EOF
18767
18768         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18769 #define ETIP_NEEDS_${cf_excp} 1
18770 EOF
18771
18772         cf_result="$cf_math $cf_excp"
18773         break 2
18774
18775 else
18776   echo "$as_me: failed program was:" >&5
18777 cat conftest.$ac_ext >&5
18778 fi
18779 rm -f conftest.$ac_objext conftest.$ac_ext
18780 done
18781 done
18782 echo "$as_me:18782: result: $cf_result" >&5
18783 echo "${ECHO_T}$cf_result" >&6
18784 CXXFLAGS="$cf_save_CXXFLAGS"
18785
18786 if test -n "$CXX"; then
18787 echo "$as_me:18787: checking if $CXX accepts parameter initialization" >&5
18788 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18789 if test "${cf_cv_cpp_param_init+set}" = set; then
18790   echo $ECHO_N "(cached) $ECHO_C" >&6
18791 else
18792
18793         ac_ext=cc
18794 ac_cpp='$CXXCPP $CPPFLAGS'
18795 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18796 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18797 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18798 ac_main_return=return
18799
18800         if test "$cross_compiling" = yes; then
18801   cf_cv_cpp_param_init=unknown
18802 else
18803   cat >conftest.$ac_ext <<_ACEOF
18804 #line 18804 "configure"
18805 #include "confdefs.h"
18806
18807 class TEST {
18808 private:
18809         int value;
18810 public:
18811         TEST(int x = 1);
18812         ~TEST();
18813 };
18814
18815 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18816 {
18817         value = x;
18818 }
18819 int main() { }
18820
18821 _ACEOF
18822 rm -f conftest$ac_exeext
18823 if { (eval echo "$as_me:18823: \"$ac_link\"") >&5
18824   (eval $ac_link) 2>&5
18825   ac_status=$?
18826   echo "$as_me:18826: \$? = $ac_status" >&5
18827   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18828   { (eval echo "$as_me:18828: \"$ac_try\"") >&5
18829   (eval $ac_try) 2>&5
18830   ac_status=$?
18831   echo "$as_me:18831: \$? = $ac_status" >&5
18832   (exit $ac_status); }; }; then
18833   cf_cv_cpp_param_init=yes
18834 else
18835   echo "$as_me: program exited with status $ac_status" >&5
18836 echo "$as_me: failed program was:" >&5
18837 cat conftest.$ac_ext >&5
18838 cf_cv_cpp_param_init=no
18839 fi
18840 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18841 fi
18842         ac_ext=cc
18843 ac_cpp='$CXXCPP $CPPFLAGS'
18844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18847 ac_main_return=return
18848
18849 fi
18850 echo "$as_me:18850: result: $cf_cv_cpp_param_init" >&5
18851 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18852 fi
18853 test "$cf_cv_cpp_param_init" = yes &&
18854 cat >>confdefs.h <<\EOF
18855 #define CPP_HAS_PARAM_INIT 1
18856 EOF
18857
18858 if test -n "$CXX"; then
18859
18860 echo "$as_me:18860: checking if $CXX accepts static_cast" >&5
18861 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18862 if test "${cf_cv_cpp_static_cast+set}" = set; then
18863   echo $ECHO_N "(cached) $ECHO_C" >&6
18864 else
18865
18866         ac_ext=cc
18867 ac_cpp='$CXXCPP $CPPFLAGS'
18868 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18869 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18870 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18871 ac_main_return=return
18872
18873         cat >conftest.$ac_ext <<_ACEOF
18874 #line 18874 "configure"
18875 #include "confdefs.h"
18876
18877 class NCursesPanel
18878 {
18879 public:
18880   NCursesPanel(int nlines,
18881                int ncols,
18882                int begin_y = 0,
18883                int begin_x = 0)
18884   {
18885   }
18886
18887   ~NCursesPanel();
18888 };
18889
18890 template<class T> class NCursesUserPanel : public NCursesPanel
18891 {
18892 public:
18893   NCursesUserPanel (int nlines,
18894                     int ncols,
18895                     int begin_y = 0,
18896                     int begin_x = 0,
18897                     const T* p_UserData = static_cast<T*>(0))
18898     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18899   {
18900   };
18901   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18902   {
18903   };
18904
18905   virtual ~NCursesUserPanel() {};
18906 };
18907
18908 int
18909 main ()
18910 {
18911
18912         const char* p_UserData = static_cast<char*>(0)
18913   ;
18914   return 0;
18915 }
18916 _ACEOF
18917 rm -f conftest.$ac_objext
18918 if { (eval echo "$as_me:18918: \"$ac_compile\"") >&5
18919   (eval $ac_compile) 2>&5
18920   ac_status=$?
18921   echo "$as_me:18921: \$? = $ac_status" >&5
18922   (exit $ac_status); } &&
18923          { ac_try='test -s conftest.$ac_objext'
18924   { (eval echo "$as_me:18924: \"$ac_try\"") >&5
18925   (eval $ac_try) 2>&5
18926   ac_status=$?
18927   echo "$as_me:18927: \$? = $ac_status" >&5
18928   (exit $ac_status); }; }; then
18929   cf_cv_cpp_static_cast=yes
18930 else
18931   echo "$as_me: failed program was:" >&5
18932 cat conftest.$ac_ext >&5
18933 cf_cv_cpp_static_cast=no
18934 fi
18935 rm -f conftest.$ac_objext conftest.$ac_ext
18936
18937         ac_ext=cc
18938 ac_cpp='$CXXCPP $CPPFLAGS'
18939 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18940 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18941 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18942 ac_main_return=return
18943
18944 fi
18945 echo "$as_me:18945: result: $cf_cv_cpp_static_cast" >&5
18946 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18947
18948 fi
18949
18950 test "$cf_cv_cpp_static_cast" = yes &&
18951 cat >>confdefs.h <<\EOF
18952 #define CPP_HAS_STATIC_CAST 1
18953 EOF
18954
18955         CXX_AR='$(AR)'
18956         CXX_ARFLAGS='$(ARFLAGS)'
18957         case $cf_cv_system_name in #(vi
18958         irix*) #(vi
18959             if test "$GXX" != yes ; then
18960                 CXX_AR='$(CXX)'
18961                 CXX_ARFLAGS='-ar -o'
18962             fi
18963             ;;
18964         sco3.2v5*) #(vi
18965             CXXLDFLAGS="-u main"
18966             ;;
18967         solaris2*)
18968             if test "$GXX" != yes ; then
18969                 CXX_AR='$(CXX)'
18970                 CXX_ARFLAGS='-xar -o'
18971             fi
18972             ;;
18973         esac
18974
18975 else
18976         cf_cxx_library=no
18977         cf_cv_builtin_bool=1
18978
18979         # Just because we are not configuring against C++ right now does not
18980         # mean that a user will not want to use C++.  Some distributors disable
18981         # the C++ portion of this configuration as a shortcut (or just to avoid
18982         # compiling the demo in the c++ directory).  So we need a reasonable
18983         # default for the 'bool' type.
18984         #
18985         # Caveat: since the storage of the bool type is not standardized, it
18986         # may change.
18987
18988         if test "$NCURSES_BOOL" != auto ; then
18989                 cf_cv_type_of_bool=$NCURSES_BOOL
18990                 cf_cv_header_stdbool_h=0
18991         else
18992                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18993
18994 echo "$as_me:18994: checking for size of bool" >&5
18995 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18996 if test "${cf_cv_type_of_bool+set}" = set; then
18997   echo $ECHO_N "(cached) $ECHO_C" >&6
18998 else
18999
19000         rm -f cf_test.out
19001         if test "$cross_compiling" = yes; then
19002   cf_cv_type_of_bool=unknown
19003 else
19004   cat >conftest.$ac_ext <<_ACEOF
19005 #line 19005 "configure"
19006 #include "confdefs.h"
19007
19008 #include <stdlib.h>
19009 #include <stdio.h>
19010
19011 #if defined(__cplusplus)
19012
19013 #ifdef HAVE_GXX_BUILTIN_H
19014 #include <g++/builtin.h>
19015 #elif HAVE_GPP_BUILTIN_H
19016 #include <gpp/builtin.h>
19017 #elif HAVE_BUILTIN_H
19018 #include <builtin.h>
19019 #endif
19020
19021 #else
19022
19023 #if $cf_cv_header_stdbool_h
19024 #include <stdbool.h>
19025 #endif
19026
19027 #endif
19028
19029 main()
19030 {
19031         FILE *fp = fopen("cf_test.out", "w");
19032         if (fp != 0) {
19033                 bool x = true;
19034                 if ((bool)(-x) >= 0)
19035                         fputs("unsigned ", fp);
19036                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19037                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19038                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19039                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19040                 fclose(fp);
19041         }
19042         ${cf_cv_main_return:-return}(0);
19043 }
19044
19045 _ACEOF
19046 rm -f conftest$ac_exeext
19047 if { (eval echo "$as_me:19047: \"$ac_link\"") >&5
19048   (eval $ac_link) 2>&5
19049   ac_status=$?
19050   echo "$as_me:19050: \$? = $ac_status" >&5
19051   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19052   { (eval echo "$as_me:19052: \"$ac_try\"") >&5
19053   (eval $ac_try) 2>&5
19054   ac_status=$?
19055   echo "$as_me:19055: \$? = $ac_status" >&5
19056   (exit $ac_status); }; }; then
19057   cf_cv_type_of_bool=`cat cf_test.out`
19058                  if test -z "$cf_cv_type_of_bool"; then
19059                    cf_cv_type_of_bool=unknown
19060                  fi
19061 else
19062   echo "$as_me: program exited with status $ac_status" >&5
19063 echo "$as_me: failed program was:" >&5
19064 cat conftest.$ac_ext >&5
19065 cf_cv_type_of_bool=unknown
19066 fi
19067 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19068 fi
19069
19070 fi
19071
19072         rm -f cf_test.out
19073 echo "$as_me:19073: result: $cf_cv_type_of_bool" >&5
19074 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19075 if test "$cf_cv_type_of_bool" = unknown ; then
19076         case .$NCURSES_BOOL in #(vi
19077         .auto|.) NCURSES_BOOL=unsigned;;
19078         esac
19079         { echo "$as_me:19079: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19080 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19081         cf_cv_type_of_bool=$NCURSES_BOOL
19082 fi
19083
19084                 else
19085                         echo "$as_me:19085: checking for fallback type of bool" >&5
19086 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19087                         case "$host_cpu" in #(vi
19088                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19089                         *)      cf_cv_type_of_bool=int  ;;
19090                         esac
19091                         echo "$as_me:19091: result: $cf_cv_type_of_bool" >&5
19092 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19093                 fi
19094         fi
19095 fi
19096
19097 # If the C compiler did not declare bool, and we did not determine that the C++
19098 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19099 # ncurses library use the same type as C++ bool.  Note that this allows one to
19100 # specify the type of bool in a configure-script option and postpone
19101 # integration with the C++ compiler provided that the types are compatible.
19102 USE_CXX_BOOL=1
19103 if test $cf_cv_cc_bool_type = 1
19104 then
19105         # oops: C has a bool.  Unlikely, but C++ could differ.
19106         USE_CXX_BOOL=0
19107 elif test $cf_cv_builtin_bool = 0
19108 then
19109         # C++ has no bool
19110         USE_CXX_BOOL=0
19111 else
19112         # this is the normal case
19113         USE_CXX_BOOL='defined(__cplusplus)'
19114 fi
19115
19116 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19117
19118         if test "$cf_with_ada" != "no" ; then
19119                 if test "$with_libtool" != "no"; then
19120                         { echo "$as_me:19120: WARNING: libtool does not support Ada - disabling feature" >&5
19121 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19122                         cf_with_ada=no
19123                 fi
19124         fi
19125
19126         if test "$cf_with_ada" != "no" ; then
19127
19128 cf_ada_make=gnatmake
19129 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19130 set dummy $cf_ada_make; ac_word=$2
19131 echo "$as_me:19131: checking for $ac_word" >&5
19132 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19133 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19134   echo $ECHO_N "(cached) $ECHO_C" >&6
19135 else
19136   if test -n "$gnat_exists"; then
19137   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19138 else
19139   ac_save_IFS=$IFS; IFS=$ac_path_separator
19140 ac_dummy="$PATH"
19141 for ac_dir in $ac_dummy; do
19142   IFS=$ac_save_IFS
19143   test -z "$ac_dir" && ac_dir=.
19144   $as_executable_p "$ac_dir/$ac_word" || continue
19145 ac_cv_prog_gnat_exists="yes"
19146 echo "$as_me:19146: found $ac_dir/$ac_word" >&5
19147 break
19148 done
19149
19150   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19151 fi
19152 fi
19153 gnat_exists=$ac_cv_prog_gnat_exists
19154 if test -n "$gnat_exists"; then
19155   echo "$as_me:19155: result: $gnat_exists" >&5
19156 echo "${ECHO_T}$gnat_exists" >&6
19157 else
19158   echo "$as_me:19158: result: no" >&5
19159 echo "${ECHO_T}no" >&6
19160 fi
19161
19162 if test "$ac_cv_prog_gnat_exists" = no; then
19163    cf_ada_make=
19164    cf_cv_prog_gnat_correct=no
19165 else
19166
19167 echo "$as_me:19167: checking for gnat version" >&5
19168 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19169 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19170         grep '[0-9].[0-9][0-9]*' |\
19171     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19172 echo "$as_me:19172: result: $cf_gnat_version" >&5
19173 echo "${ECHO_T}$cf_gnat_version" >&6
19174
19175 case $cf_gnat_version in #(vi
19176 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19177         cf_cv_prog_gnat_correct=yes
19178         ;;
19179 *)
19180         { echo "$as_me:19180: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19181 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19182         cf_cv_prog_gnat_correct=no
19183         ;;
19184 esac
19185
19186    # Extract the first word of "m4", so it can be a program name with args.
19187 set dummy m4; ac_word=$2
19188 echo "$as_me:19188: checking for $ac_word" >&5
19189 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19190 if test "${ac_cv_prog_M4_exists+set}" = set; then
19191   echo $ECHO_N "(cached) $ECHO_C" >&6
19192 else
19193   if test -n "$M4_exists"; then
19194   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19195 else
19196   ac_save_IFS=$IFS; IFS=$ac_path_separator
19197 ac_dummy="$PATH"
19198 for ac_dir in $ac_dummy; do
19199   IFS=$ac_save_IFS
19200   test -z "$ac_dir" && ac_dir=.
19201   $as_executable_p "$ac_dir/$ac_word" || continue
19202 ac_cv_prog_M4_exists="yes"
19203 echo "$as_me:19203: found $ac_dir/$ac_word" >&5
19204 break
19205 done
19206
19207   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19208 fi
19209 fi
19210 M4_exists=$ac_cv_prog_M4_exists
19211 if test -n "$M4_exists"; then
19212   echo "$as_me:19212: result: $M4_exists" >&5
19213 echo "${ECHO_T}$M4_exists" >&6
19214 else
19215   echo "$as_me:19215: result: no" >&5
19216 echo "${ECHO_T}no" >&6
19217 fi
19218
19219    if test "$ac_cv_prog_M4_exists" = no; then
19220       cf_cv_prog_gnat_correct=no
19221       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19222    fi
19223    if test "$cf_cv_prog_gnat_correct" = yes; then
19224       echo "$as_me:19224: checking if GNAT works" >&5
19225 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19226
19227 rm -rf conftest* *~conftest*
19228 cat >>conftest.ads <<CF_EOF
19229 procedure conftest;
19230 CF_EOF
19231 cat >>conftest.adb <<CF_EOF
19232 with Text_IO;
19233 with GNAT.OS_Lib;
19234 procedure conftest is
19235 begin
19236    Text_IO.Put ("Hello World");
19237    Text_IO.New_Line;
19238    GNAT.OS_Lib.OS_Exit (0);
19239 end conftest;
19240 CF_EOF
19241 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19242    if ( ./conftest 1>&5 2>&1 ) ; then
19243       cf_cv_prog_gnat_correct=yes
19244    else
19245       cf_cv_prog_gnat_correct=no
19246    fi
19247 else
19248    cf_cv_prog_gnat_correct=no
19249 fi
19250 rm -rf conftest* *~conftest*
19251
19252       echo "$as_me:19252: result: $cf_cv_prog_gnat_correct" >&5
19253 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19254    fi
19255 fi
19256
19257                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19258
19259         ADAFLAGS="$ADAFLAGS -gnatpn"
19260
19261         echo "$as_me:19261: checking optimization options for ADAFLAGS" >&5
19262 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19263         case "$CFLAGS" in
19264         *-g*)
19265
19266         ADAFLAGS="$ADAFLAGS -g"
19267
19268                 ;;
19269         esac
19270         case "$CFLAGS" in
19271         *-O*)
19272                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19273
19274         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19275
19276                 ;;
19277         esac
19278         echo "$as_me:19278: result: $ADAFLAGS" >&5
19279 echo "${ECHO_T}$ADAFLAGS" >&6
19280
19281 echo "$as_me:19281: checking if GNAT supports generics" >&5
19282 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19283 case $cf_gnat_version in #(vi
19284 3.[1-9]*|[4-9].*) #(vi
19285         cf_gnat_generics=yes
19286         ;;
19287 *)
19288         cf_gnat_generics=no
19289         ;;
19290 esac
19291 echo "$as_me:19291: result: $cf_gnat_generics" >&5
19292 echo "${ECHO_T}$cf_gnat_generics" >&6
19293
19294 if test "$cf_gnat_generics" = yes
19295 then
19296         cf_compile_generics=generics
19297         cf_generic_objects="\${GENOBJS}"
19298 else
19299         cf_compile_generics=
19300         cf_generic_objects=
19301 fi
19302
19303 echo "$as_me:19303: checking if GNAT supports SIGINT" >&5
19304 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19305 if test "${cf_cv_gnat_sigint+set}" = set; then
19306   echo $ECHO_N "(cached) $ECHO_C" >&6
19307 else
19308
19309 rm -rf conftest* *~conftest*
19310 cat >>conftest.ads <<CF_EOF
19311 with Ada.Interrupts.Names;
19312
19313 package ConfTest is
19314
19315    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19316    pragma Unreserve_All_Interrupts;
19317    pragma Warnings (On);
19318
19319    protected Process is
19320       procedure Stop;
19321       function Continue return Boolean;
19322       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19323    private
19324       Done : Boolean := False;
19325    end Process;
19326
19327 end ConfTest;
19328 CF_EOF
19329 cat >>conftest.adb <<CF_EOF
19330 package body ConfTest is
19331    protected body Process is
19332       procedure Stop is
19333       begin
19334          Done := True;
19335       end Stop;
19336       function Continue return Boolean is
19337       begin
19338          return not Done;
19339       end Continue;
19340    end Process;
19341 end ConfTest;
19342 CF_EOF
19343 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19344       cf_cv_gnat_sigint=yes
19345 else
19346    cf_cv_gnat_sigint=no
19347 fi
19348 rm -rf conftest* *~conftest*
19349
19350 fi
19351 echo "$as_me:19351: result: $cf_cv_gnat_sigint" >&5
19352 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19353
19354 if test $cf_cv_gnat_sigint = yes ; then
19355         USE_GNAT_SIGINT=""
19356 else
19357         USE_GNAT_SIGINT="#"
19358 fi
19359
19360 echo "$as_me:19360: checking if GNAT pragma Unreferenced works" >&5
19361 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19362 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19363   echo $ECHO_N "(cached) $ECHO_C" >&6
19364 else
19365
19366 rm -rf conftest* *~conftest*
19367 cat >>conftest.ads <<CF_EOF
19368 procedure conftest;
19369 CF_EOF
19370 cat >>conftest.adb <<CF_EOF
19371 with Text_IO;
19372 with GNAT.OS_Lib;
19373 procedure conftest is
19374    test : Integer;
19375    pragma Unreferenced (test);
19376 begin
19377    test := 1;
19378    Text_IO.Put ("Hello World");
19379    Text_IO.New_Line;
19380    GNAT.OS_Lib.OS_Exit (0);
19381 end conftest;
19382 CF_EOF
19383 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19384       cf_cv_pragma_unreferenced=yes
19385 else
19386    cf_cv_pragma_unreferenced=no
19387 fi
19388 rm -rf conftest* *~conftest*
19389
19390 fi
19391 echo "$as_me:19391: result: $cf_cv_pragma_unreferenced" >&5
19392 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19393
19394 # if the pragma is supported, use it (needed in the Trace code).
19395 if test $cf_cv_pragma_unreferenced = yes ; then
19396         PRAGMA_UNREF=TRUE
19397 else
19398         PRAGMA_UNREF=FALSE
19399 fi
19400
19401 cf_gnat_libraries=no
19402 cf_gnat_projects=no
19403
19404 echo "$as_me:19404: checking if GNAT supports project files" >&5
19405 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19406 case $cf_gnat_version in #(vi
19407 3.[0-9]*) #(vi
19408         ;;
19409 *)
19410         case $cf_cv_system_name in #(vi
19411         cygwin*) #(vi
19412                 ;;
19413         *)
19414                 mkdir conftest.src conftest.bin conftest.lib
19415                 cd conftest.src
19416                 rm -rf conftest* *~conftest*
19417                 cat >>library.gpr <<CF_EOF
19418 project Library is
19419   Kind := External ("LIB_KIND");
19420   for Library_Name use "ConfTest";
19421   for Object_Dir use ".";
19422   for Library_ALI_Dir use External("LIBRARY_DIR");
19423   for Library_Version use External ("SONAME");
19424   for Library_Kind use Kind;
19425   for Library_Dir use External("BUILD_DIR");
19426   Source_Dir := External ("SOURCE_DIR");
19427   for Source_Dirs use (Source_Dir);
19428   package Compiler is
19429      for Default_Switches ("Ada") use
19430        ("-g",
19431         "-O2",
19432         "-gnatafno",
19433         "-gnatVa",   -- All validity checks
19434         "-gnatwa");  -- Activate all optional errors
19435   end Compiler;
19436 end Library;
19437 CF_EOF
19438                 cat >>confpackage.ads <<CF_EOF
19439 package ConfPackage is
19440    procedure conftest;
19441 end ConfPackage;
19442 CF_EOF
19443                 cat >>confpackage.adb <<CF_EOF
19444 with Text_IO;
19445 package body ConfPackage is
19446    procedure conftest is
19447    begin
19448       Text_IO.Put ("Hello World");
19449       Text_IO.New_Line;
19450    end conftest;
19451 end ConfPackage;
19452 CF_EOF
19453                 if ( $cf_ada_make $ADAFLAGS \
19454                                 -Plibrary.gpr \
19455                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19456                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19457                                 -XSOURCE_DIR=`pwd` \
19458                                 -XSONAME=libConfTest.so.1 \
19459                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19460                         cf_gnat_projects=yes
19461                 fi
19462                 cd ..
19463                 if test -f conftest.lib/confpackage.ali
19464                 then
19465                         cf_gnat_libraries=yes
19466                 fi
19467                 rm -rf conftest* *~conftest*
19468                 ;;
19469         esac
19470         ;;
19471 esac
19472 echo "$as_me:19472: result: $cf_gnat_projects" >&5
19473 echo "${ECHO_T}$cf_gnat_projects" >&6
19474
19475 if test $cf_gnat_projects = yes
19476 then
19477         echo "$as_me:19477: checking if GNAT supports libraries" >&5
19478 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19479         echo "$as_me:19479: result: $cf_gnat_libraries" >&5
19480 echo "${ECHO_T}$cf_gnat_libraries" >&6
19481 fi
19482
19483 if test "$cf_gnat_projects" = yes
19484 then
19485         USE_OLD_MAKERULES="#"
19486         USE_GNAT_PROJECTS=""
19487 else
19488         USE_OLD_MAKERULES=""
19489         USE_GNAT_PROJECTS="#"
19490 fi
19491
19492 if test "$cf_gnat_libraries" = yes
19493 then
19494         USE_GNAT_LIBRARIES=""
19495 else
19496         USE_GNAT_LIBRARIES="#"
19497 fi
19498
19499 echo "$as_me:19499: checking for ada-compiler" >&5
19500 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19501
19502 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19503 if test "${with_ada_compiler+set}" = set; then
19504   withval="$with_ada_compiler"
19505   cf_ada_compiler=$withval
19506 else
19507   cf_ada_compiler=gnatmake
19508 fi;
19509
19510 echo "$as_me:19510: result: $cf_ada_compiler" >&5
19511 echo "${ECHO_T}$cf_ada_compiler" >&6
19512
19513                         cf_ada_package=terminal_interface
19514
19515 echo "$as_me:19515: checking for ada-include" >&5
19516 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19517
19518 # Check whether --with-ada-include or --without-ada-include was given.
19519 if test "${with_ada_include+set}" = set; then
19520   withval="$with_ada_include"
19521
19522 else
19523   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19524 fi; if test -n "$prefix/share/ada/adainclude" ; then
19525
19526 if test "x$prefix" != xNONE; then
19527   cf_path_syntax="$prefix"
19528 else
19529   cf_path_syntax="$ac_default_prefix"
19530 fi
19531
19532 case ".$withval" in #(vi
19533 .\$\(*\)*|.\'*\'*) #(vi
19534   ;;
19535 ..|./*|.\\*) #(vi
19536   ;;
19537 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19538   ;;
19539 .\${*prefix}*|.\${*dir}*) #(vi
19540   eval withval="$withval"
19541   case ".$withval" in #(vi
19542   .NONE/*)
19543     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19544     ;;
19545   esac
19546   ;; #(vi
19547 .no|.NONE/*)
19548   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19549   ;;
19550 *)
19551   { { echo "$as_me:19551: error: expected a pathname, not \"$withval\"" >&5
19552 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19553    { (exit 1); exit 1; }; }
19554   ;;
19555 esac
19556
19557 fi
19558 eval ADA_INCLUDE="$withval"
19559
19560 echo "$as_me:19560: result: $ADA_INCLUDE" >&5
19561 echo "${ECHO_T}$ADA_INCLUDE" >&6
19562
19563 echo "$as_me:19563: checking for ada-objects" >&5
19564 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19565
19566 # Check whether --with-ada-objects or --without-ada-objects was given.
19567 if test "${with_ada_objects+set}" = set; then
19568   withval="$with_ada_objects"
19569
19570 else
19571   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19572 fi; if test -n "$prefix/lib/ada/adalib" ; then
19573
19574 if test "x$prefix" != xNONE; then
19575   cf_path_syntax="$prefix"
19576 else
19577   cf_path_syntax="$ac_default_prefix"
19578 fi
19579
19580 case ".$withval" in #(vi
19581 .\$\(*\)*|.\'*\'*) #(vi
19582   ;;
19583 ..|./*|.\\*) #(vi
19584   ;;
19585 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19586   ;;
19587 .\${*prefix}*|.\${*dir}*) #(vi
19588   eval withval="$withval"
19589   case ".$withval" in #(vi
19590   .NONE/*)
19591     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19592     ;;
19593   esac
19594   ;; #(vi
19595 .no|.NONE/*)
19596   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19597   ;;
19598 *)
19599   { { echo "$as_me:19599: error: expected a pathname, not \"$withval\"" >&5
19600 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19601    { (exit 1); exit 1; }; }
19602   ;;
19603 esac
19604
19605 fi
19606 eval ADA_OBJECTS="$withval"
19607
19608 echo "$as_me:19608: result: $ADA_OBJECTS" >&5
19609 echo "${ECHO_T}$ADA_OBJECTS" >&6
19610
19611 echo "$as_me:19611: checking if an Ada95 shared-library should be built" >&5
19612 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19613
19614 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19615 if test "${with_ada_sharedlib+set}" = set; then
19616   withval="$with_ada_sharedlib"
19617   with_ada_sharedlib=$withval
19618 else
19619   with_ada_sharedlib=no
19620 fi;
19621 echo "$as_me:19621: result: $with_ada_sharedlib" >&5
19622 echo "${ECHO_T}$with_ada_sharedlib" >&6
19623
19624 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19625 MAKE_ADA_SHAREDLIB="#"
19626
19627 if test "x$with_ada_sharedlib" != xno
19628 then
19629         MAKE_ADA_SHAREDLIB=
19630         if test "x$with_ada_sharedlib" != xyes
19631         then
19632                 ADA_SHAREDLIB="$with_ada_sharedlib"
19633         fi
19634 fi
19635
19636                 fi
19637         fi
19638 else
19639         cf_with_ada=no
19640 fi
19641
19642 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19643 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19644 ###
19645 ### ticlib modules may be a separate library, otherwise contained in termlib.
19646 ### termlib modules may be a separate library, otherwise contained in ncurses.
19647 ###
19648 ### The of "+" or " " between the tokens controls the way the script
19649 ### chooses to split module lists into libraries.
19650 ###
19651 ### (see CF_LIB_RULES).
19652 echo "$as_me:19652: checking for library subsets" >&5
19653 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19654 LIB_SUBSETS=
19655
19656 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19657         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19658         if test "$with_ticlib" != no ; then
19659                 LIB_SUBSETS="${LIB_SUBSETS} "
19660         else
19661                 LIB_SUBSETS="${LIB_SUBSETS}+"
19662         fi
19663 fi
19664
19665 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19666 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19667
19668 if test "$with_termlib" != no ; then
19669         LIB_SUBSETS="${LIB_SUBSETS} "
19670 else
19671         LIB_SUBSETS="${LIB_SUBSETS}+"
19672 fi
19673
19674 LIB_SUBSETS="${LIB_SUBSETS}base"
19675
19676 # Most term-driver calls are to tinfo, but some like init_pair are to the
19677 # base library (so it resides in base).
19678 if test "$with_term_driver" != no ; then
19679         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19680         case $cf_cv_system_name in #(vi
19681         *mingw32*) #(vi
19682                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19683                 ;;
19684         *) #(vi
19685                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19686                 ;;
19687         esac
19688 fi
19689
19690 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19691 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19692
19693 echo "$as_me:19693: result: $LIB_SUBSETS" >&5
19694 echo "${ECHO_T}$LIB_SUBSETS" >&6
19695
19696 ### Construct the list of include-directories to be generated
19697
19698 if test "$GCC" != yes; then
19699         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19700 elif test "$includedir" != "/usr/include"; then
19701         if test "$includedir" = '${prefix}/include' ; then
19702                 if test $prefix != /usr ; then
19703                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19704                 fi
19705         else
19706                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19707         fi
19708 fi
19709 if test "$srcdir" != "."; then
19710         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19711 fi
19712 CPPFLAGS="-I. -I../include $CPPFLAGS"
19713
19714 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19715 if test "$srcdir" != "."; then
19716         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19717 fi
19718 if test "$GCC" != yes; then
19719         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19720 elif test "$includedir" != "/usr/include"; then
19721         if test "$includedir" = '${prefix}/include' ; then
19722                 if test $prefix != /usr ; then
19723                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19724                 fi
19725         else
19726                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19727         fi
19728 fi
19729
19730 ### Build up pieces for makefile rules
19731 echo "$as_me:19731: checking default library suffix" >&5
19732 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19733
19734         case $DFT_LWR_MODEL in
19735         libtool) DFT_ARG_SUFFIX=''   ;;
19736         normal)  DFT_ARG_SUFFIX=''   ;;
19737         debug)   DFT_ARG_SUFFIX='_g' ;;
19738         profile) DFT_ARG_SUFFIX='_p' ;;
19739         shared)  DFT_ARG_SUFFIX=''   ;;
19740         esac
19741         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19742 echo "$as_me:19742: result: $DFT_ARG_SUFFIX" >&5
19743 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19744
19745 echo "$as_me:19745: checking default library-dependency suffix" >&5
19746 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19747
19748         case $DFT_LWR_MODEL in #(vi
19749         libtool) #(vi
19750                 DFT_LIB_SUFFIX='.la'
19751                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19752                 ;;
19753         normal) #(vi
19754                 DFT_LIB_SUFFIX='.a'
19755                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19756                 ;;
19757         debug) #(vi
19758                 DFT_LIB_SUFFIX='_g.a'
19759                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19760                 ;;
19761         profile) #(vi
19762                 DFT_LIB_SUFFIX='_p.a'
19763                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19764                 ;;
19765         shared) #(vi
19766                 case $cf_cv_system_name in
19767                 aix[5-7]*) #(vi
19768                         DFT_LIB_SUFFIX='.a'
19769                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19770                         ;;
19771                 cygwin*|mingw*) #(vi
19772                         DFT_LIB_SUFFIX='.dll'
19773                         DFT_DEP_SUFFIX='.dll.a'
19774                         ;;
19775                 darwin*) #(vi
19776                         DFT_LIB_SUFFIX='.dylib'
19777                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19778                         ;;
19779                 hpux*) #(vi
19780                         case $target in
19781                         ia64*) #(vi
19782                                 DFT_LIB_SUFFIX='.so'
19783                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19784                                 ;;
19785                         *) #(vi
19786                                 DFT_LIB_SUFFIX='.sl'
19787                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19788                                 ;;
19789                         esac
19790                         ;;
19791                 *)      DFT_LIB_SUFFIX='.so'
19792                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19793                         ;;
19794                 esac
19795         esac
19796         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19797         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19798 echo "$as_me:19798: result: $DFT_DEP_SUFFIX" >&5
19799 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19800
19801 echo "$as_me:19801: checking default object directory" >&5
19802 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19803
19804         case $DFT_LWR_MODEL in
19805         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19806         normal)  DFT_OBJ_SUBDIR='objects' ;;
19807         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19808         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19809         shared)
19810                 case $cf_cv_system_name in #(vi
19811                 cygwin) #(vi
19812                         DFT_OBJ_SUBDIR='objects' ;;
19813                 *)
19814                         DFT_OBJ_SUBDIR='obj_s' ;;
19815                 esac
19816         esac
19817 echo "$as_me:19817: result: $DFT_OBJ_SUBDIR" >&5
19818 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19819
19820 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19821 if test "x$cf_with_cxx" = xyes ; then
19822 echo "$as_me:19822: checking c++ library-dependency suffix" >&5
19823 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19824 if test "$with_libtool" != "no"; then
19825         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19826 else
19827
19828         case normal in #(vi
19829         libtool) #(vi
19830                 CXX_LIB_SUFFIX='.la'
19831                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19832                 ;;
19833         normal) #(vi
19834                 CXX_LIB_SUFFIX='.a'
19835                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19836                 ;;
19837         debug) #(vi
19838                 CXX_LIB_SUFFIX='_g.a'
19839                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19840                 ;;
19841         profile) #(vi
19842                 CXX_LIB_SUFFIX='_p.a'
19843                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19844                 ;;
19845         shared) #(vi
19846                 case $cf_cv_system_name in
19847                 aix[5-7]*) #(vi
19848                         CXX_LIB_SUFFIX='.a'
19849                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19850                         ;;
19851                 cygwin*|mingw*) #(vi
19852                         CXX_LIB_SUFFIX='.dll'
19853                         CXX_DEP_SUFFIX='.dll.a'
19854                         ;;
19855                 darwin*) #(vi
19856                         CXX_LIB_SUFFIX='.dylib'
19857                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19858                         ;;
19859                 hpux*) #(vi
19860                         case $target in
19861                         ia64*) #(vi
19862                                 CXX_LIB_SUFFIX='.so'
19863                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19864                                 ;;
19865                         *) #(vi
19866                                 CXX_LIB_SUFFIX='.sl'
19867                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19868                                 ;;
19869                         esac
19870                         ;;
19871                 *)      CXX_LIB_SUFFIX='.so'
19872                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19873                         ;;
19874                 esac
19875         esac
19876         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19877         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19878 fi
19879 echo "$as_me:19879: result: $CXX_LIB_SUFFIX" >&5
19880 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19881
19882 fi
19883
19884 # do not want -ldl in build except as needed for -lncurses dependency
19885 if test "x$with_dlsym" = xyes ; then
19886 if test $DFT_LWR_MODEL = shared || \
19887    test $DFT_LWR_MODEL = libtool ; then
19888
19889 # remove dl library from $LIBS
19890 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19891
19892 fi
19893 fi
19894 ### Set up low-level terminfo dependencies for makefiles.
19895
19896 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19897 # do not need libdl
19898 TICS_LIST=
19899 if test "x$with_dlsym" = xyes ; then
19900
19901 # remove dl library from $SHLIB_LIST
19902 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19903
19904 fi
19905
19906 if test "$with_ticlib" != no ; then
19907
19908         if test "x$with_ticlib" != xyes ; then
19909                 TICS_NAME=$with_ticlib
19910                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19911                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19912                 TICS_LIB_SUFFIX="${with_ticlib}"
19913         else
19914                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19915                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19916                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19917         fi
19918         TICS_LDFLAGS="-L${LIB_DIR}"
19919         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19920 else
19921         TICS_LDFLAGS="-L${LIB_DIR}"
19922         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19923 fi
19924
19925 if test "$with_termlib" != no ; then
19926
19927         if test "x$with_termlib" != xyes ; then
19928                 TINFO_NAME=$with_termlib
19929                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19930                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19931                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19932                 TINFO_LIB_SUFFIX="${with_termlib}"
19933         else
19934                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19935                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19936                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19937                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19938         fi
19939
19940         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19941         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19942         if test "$DFT_LWR_MODEL" = "libtool"; then
19943                 TEST_ARGS="${TEST_DEPS}"
19944                 TEST_ARG2="${TEST_DEP2}"
19945                 TINFO_LDFLAGS="-L${LIB_DIR}"
19946                 TINFO_LIBS="$TEST_ARGS"
19947                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19948                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19949         else
19950                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19951                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19952                 if test "x$with_term_driver" != xno ; then
19953                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19954                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19955                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19956                 else
19957                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19958                         TINFO_LIBS="$TEST_ARGS"
19959                 fi
19960                 TINFO_LDFLAGS="-L${LIB_DIR}"
19961                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19962         fi
19963 else
19964         # the next lines are needed for linking libtic over libncurses
19965         TINFO_NAME=${LIB_NAME}
19966         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19967         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19968         if test "x$with_tic_depends" = xyes ; then
19969                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19970         else
19971                 TICS_LIST="$SHLIB_LIST"
19972         fi
19973
19974         TINFO_LDFLAGS="-L${LIB_DIR}"
19975         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19976 fi
19977
19978 if test "$DFT_LWR_MODEL" = shared ; then
19979         case $cf_cv_system_name in #(vi
19980         cygwin*)
19981                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19982                 TINFO_SUFFIX=.dll
19983                 ;;
19984         esac
19985 fi
19986
19987 if test "x$with_dlsym" = xyes ; then
19988
19989 # remove dl library from $TICS_LIST
19990 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19991
19992 fi
19993
19994 if test "$DFT_LWR_MODEL" = "libtool"; then
19995     OBJEXT=lo
19996 fi
19997
19998 # needed for Ada95
19999 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
20000
20001 case $DFT_LWR_MODEL in
20002 normal|debug|profile)
20003
20004 if test "$GCC" = yes ; then
20005         case $cf_cv_system_name in #(
20006         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
20007                 LDFLAGS_STATIC=
20008                 LDFLAGS_SHARED=
20009                 ;;
20010     *)  #( normally, except when broken
20011         LDFLAGS_STATIC=-static
20012         LDFLAGS_SHARED=-dynamic
20013         ;;
20014     esac
20015 else
20016         case $cf_cv_system_name in #(
20017         aix[4-7]*)      #( from ld manpage
20018                 LDFLAGS_STATIC=-bstatic
20019                 LDFLAGS_SHARED=-bdynamic
20020                 ;;
20021         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
20022                 # We could also use just "archive" and "shared".
20023                 LDFLAGS_STATIC=-Wl,-a,archive_shared
20024                 LDFLAGS_SHARED=-Wl,-a,shared_archive
20025                 ;;
20026         irix*)          #( from ld manpage IRIX64
20027                 LDFLAGS_STATIC=-Bstatic
20028                 LDFLAGS_SHARED=-Bdynamic
20029                 ;;
20030         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
20031                 # alternative "-oldstyle_liblookup" (not in cc manpage)
20032                 LDFLAGS_STATIC=-noso
20033                 LDFLAGS_SHARED=-so_archive
20034                 ;;
20035         solaris2*)
20036                 LDFLAGS_STATIC=-Bstatic
20037                 LDFLAGS_SHARED=-Bdynamic
20038                 ;;
20039         esac
20040 fi
20041
20042 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
20043 then
20044         echo "$as_me:20044: checking if linker supports switching between static/dynamic" >&5
20045 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20046
20047         rm -f libconftest.a
20048         cat >conftest.$ac_ext <<EOF
20049 #line 20049 "configure"
20050 #include <stdio.h>
20051 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20052 EOF
20053         if { (eval echo "$as_me:20053: \"$ac_compile\"") >&5
20054   (eval $ac_compile) 2>&5
20055   ac_status=$?
20056   echo "$as_me:20056: \$? = $ac_status" >&5
20057   (exit $ac_status); } ; then
20058                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20059                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20060         fi
20061         rm -f conftest.*
20062
20063         cf_save_LIBS="$LIBS"
20064
20065         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20066         cat >conftest.$ac_ext <<_ACEOF
20067 #line 20067 "configure"
20068 #include "confdefs.h"
20069
20070 #line 20070 "configure"
20071 #include <stdio.h>
20072 int cf_ldflags_static(FILE *fp);
20073
20074 int
20075 main ()
20076 {
20077
20078         return cf_ldflags_static(stdin);
20079
20080   ;
20081   return 0;
20082 }
20083 _ACEOF
20084 rm -f conftest.$ac_objext conftest$ac_exeext
20085 if { (eval echo "$as_me:20085: \"$ac_link\"") >&5
20086   (eval $ac_link) 2>&5
20087   ac_status=$?
20088   echo "$as_me:20088: \$? = $ac_status" >&5
20089   (exit $ac_status); } &&
20090          { ac_try='test -s conftest$ac_exeext'
20091   { (eval echo "$as_me:20091: \"$ac_try\"") >&5
20092   (eval $ac_try) 2>&5
20093   ac_status=$?
20094   echo "$as_me:20094: \$? = $ac_status" >&5
20095   (exit $ac_status); }; }; then
20096
20097         # some linkers simply ignore the -dynamic
20098         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20099         *static*) # (vi
20100                 cf_ldflags_static=no
20101                 ;;
20102         *)
20103                 cf_ldflags_static=yes
20104                 ;;
20105         esac
20106
20107 else
20108   echo "$as_me: failed program was:" >&5
20109 cat conftest.$ac_ext >&5
20110 cf_ldflags_static=no
20111 fi
20112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20113
20114         rm -f libconftest.*
20115         LIBS="$cf_save_LIBS"
20116
20117         echo "$as_me:20117: result: $cf_ldflags_static" >&5
20118 echo "${ECHO_T}$cf_ldflags_static" >&6
20119
20120         if test $cf_ldflags_static != yes
20121         then
20122                 LDFLAGS_STATIC=
20123                 LDFLAGS_SHARED=
20124         fi
20125 else
20126         LDFLAGS_STATIC=
20127         LDFLAGS_SHARED=
20128 fi
20129
20130         ;;
20131 esac
20132
20133 echo "$as_me:20133: checking where we will install curses.h" >&5
20134 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20135 test "$with_overwrite" = no && \
20136 test "x$includedir" = 'x${prefix}/include' && \
20137         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20138 echo "$as_me:20138: result: $includedir" >&5
20139 echo "${ECHO_T}$includedir" >&6
20140
20141 ### Resolve a conflict between normal and wide-curses by forcing applications
20142 ### that will need libutf8 to add it to their configure script.
20143 if test "$with_overwrite" != no ; then
20144 if test "$NCURSES_LIBUTF8" = 1 ; then
20145         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20146         { echo "$as_me:20146: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20147 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20148 fi
20149 fi
20150 WITH_OVERWRITE=$with_overwrite
20151
20152 # used to separate tack out of the tree
20153 NCURSES_TREE=
20154
20155 ### predefined stuff for the test programs
20156
20157 cat >>confdefs.h <<\EOF
20158 #define HAVE_SLK_COLOR 1
20159 EOF
20160
20161 ### Construct the list of subdirectories for which we'll customize makefiles
20162 ### with the appropriate compile-rules.
20163
20164 echo "$as_me:20164: checking for src modules" >&5
20165 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20166
20167 # dependencies and linker-arguments for test-programs
20168 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20169 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20170 if test "$DFT_LWR_MODEL" = "libtool"; then
20171         TEST_ARGS="${TEST_DEPS}"
20172         TEST_ARG2="${TEST_DEP2}"
20173 else
20174         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20175         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20176 fi
20177
20178 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20179 cf_cv_src_modules=
20180 for cf_dir in $modules_to_build
20181 do
20182         if test -f $srcdir/$cf_dir/modules; then
20183
20184                 # We may/may not have tack in the distribution, though the
20185                 # makefile is.
20186                 if test $cf_dir = tack ; then
20187                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20188                                 continue
20189                         fi
20190                 fi
20191
20192                 if test -z "$cf_cv_src_modules"; then
20193                         cf_cv_src_modules=$cf_dir
20194                 else
20195                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20196                 fi
20197
20198                 # Make the ncurses_cfg.h file record the library interface files as
20199                 # well.  These are header files that are the same name as their
20200                 # directory.  Ncurses is the only library that does not follow
20201                 # that pattern.
20202                 if test $cf_dir = tack ; then
20203                         continue
20204                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20205
20206 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20207
20208                         cat >>confdefs.h <<EOF
20209 #define HAVE_${cf_have_include}_H 1
20210 EOF
20211
20212                         cat >>confdefs.h <<EOF
20213 #define HAVE_LIB${cf_have_include} 1
20214 EOF
20215
20216                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20217                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20218                         if test "$DFT_LWR_MODEL" = "libtool"; then
20219                                 TEST_ARGS="${TEST_DEPS}"
20220                                 TEST_ARG2="${TEST_DEP2}"
20221                         else
20222                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20223                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20224                         fi
20225                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20226                 fi
20227         fi
20228 done
20229 echo "$as_me:20229: result: $cf_cv_src_modules" >&5
20230 echo "${ECHO_T}$cf_cv_src_modules" >&6
20231
20232 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20233 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20234
20235 SRC_SUBDIRS=
20236 if test "x$cf_with_manpages" != xno ; then
20237         SRC_SUBDIRS="$SRC_SUBDIRS man"
20238 fi
20239 SRC_SUBDIRS="$SRC_SUBDIRS include"
20240 for cf_dir in $cf_cv_src_modules
20241 do
20242         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20243 done
20244 if test "x$cf_with_tests" != "xno" ; then
20245         SRC_SUBDIRS="$SRC_SUBDIRS test"
20246 fi
20247 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20248 if test "$cf_with_cxx_binding" != no; then
20249         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20250         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20251 fi
20252
20253 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20254 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20255
20256 ADA_SUBDIRS=
20257 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20258         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20259         ADA_SUBDIRS="gen src"
20260         if test "x$cf_with_tests" != "xno" ; then
20261                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20262         fi
20263 fi
20264
20265 SUB_MAKEFILES=
20266 for cf_dir in $SRC_SUBDIRS
20267 do
20268         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20269 done
20270
20271 if test -n "$ADA_SUBDIRS"; then
20272         for cf_dir in $ADA_SUBDIRS
20273         do
20274                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20275         done
20276
20277 fi
20278
20279 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20280    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20281    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20282 fi
20283
20284 DIRS_TO_MAKE="lib"
20285 for cf_item in $cf_list_models
20286 do
20287
20288         case $cf_item in
20289         libtool) cf_subdir='obj_lo'  ;;
20290         normal)  cf_subdir='objects' ;;
20291         debug)   cf_subdir='obj_g' ;;
20292         profile) cf_subdir='obj_p' ;;
20293         shared)
20294                 case $cf_cv_system_name in #(vi
20295                 cygwin) #(vi
20296                         cf_subdir='objects' ;;
20297                 *)
20298                         cf_subdir='obj_s' ;;
20299                 esac
20300         esac
20301
20302         for cf_item2 in $DIRS_TO_MAKE
20303         do
20304                 test $cf_item2 = $cf_subdir && break
20305         done
20306         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20307 done
20308 for cf_dir in $DIRS_TO_MAKE
20309 do
20310         test ! -d $cf_dir && mkdir $cf_dir
20311 done
20312
20313 # symbols that differ when compiling Ada95 by itself.
20314 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20315
20316 # values to use as strings
20317
20318 cat >>confdefs.h <<EOF
20319 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20320 EOF
20321
20322 cat >>confdefs.h <<EOF
20323 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20324 EOF
20325
20326 ### Now that we're done running tests, add the compiler-warnings, if any
20327
20328 cf_fix_cppflags=no
20329 cf_new_cflags=
20330 cf_new_cppflags=
20331 cf_new_extra_cppflags=
20332
20333 for cf_add_cflags in $EXTRA_CFLAGS
20334 do
20335 case $cf_fix_cppflags in
20336 no)
20337         case $cf_add_cflags in #(vi
20338         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20339                 case $cf_add_cflags in
20340                 -D*)
20341                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20342
20343                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20344                                 && test -z "${cf_tst_cflags}" \
20345                                 && cf_fix_cppflags=yes
20346
20347                         if test $cf_fix_cppflags = yes ; then
20348                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20349                                 continue
20350                         elif test "${cf_tst_cflags}" = "\"'" ; then
20351                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20352                                 continue
20353                         fi
20354                         ;;
20355                 esac
20356                 case "$CPPFLAGS" in
20357                 *$cf_add_cflags) #(vi
20358                         ;;
20359                 *) #(vi
20360                         case $cf_add_cflags in #(vi
20361                         -D*)
20362                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20363
20364 CPPFLAGS=`echo "$CPPFLAGS" | \
20365         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20366                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20367
20368                                 ;;
20369                         esac
20370                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20371                         ;;
20372                 esac
20373                 ;;
20374         *)
20375                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20376                 ;;
20377         esac
20378         ;;
20379 yes)
20380         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20381
20382         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20383
20384         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20385                 && test -z "${cf_tst_cflags}" \
20386                 && cf_fix_cppflags=no
20387         ;;
20388 esac
20389 done
20390
20391 if test -n "$cf_new_cflags" ; then
20392
20393         CFLAGS="$CFLAGS $cf_new_cflags"
20394 fi
20395
20396 if test -n "$cf_new_cppflags" ; then
20397
20398         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20399 fi
20400
20401 if test -n "$cf_new_extra_cppflags" ; then
20402
20403         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20404 fi
20405
20406 ### Define substitutions for header files to avoid name-pollution
20407
20408 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20409         HAVE_TCGETATTR=1
20410 else
20411         HAVE_TCGETATTR=0
20412 fi
20413
20414 if test "x$ac_cv_header_termio_h" = xyes ; then
20415         HAVE_TERMIO_H=1
20416 else
20417         HAVE_TERMIO_H=0
20418 fi
20419
20420 if test "x$ac_cv_header_termios_h" = xyes ; then
20421         HAVE_TERMIOS_H=1
20422 else
20423         HAVE_TERMIOS_H=0
20424 fi
20425
20426 ################################################################################
20427 test "x$use_database" = xyes && \
20428 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20429
20430 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20431 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20432
20433 if test "x$enable_pc_files" = xyes ; then \
20434 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20435 MAKE_PC_FILES=
20436 else
20437 MAKE_PC_FILES="#"
20438 fi
20439
20440 # Extract the first word of "tic", so it can be a program name with args.
20441 set dummy tic; ac_word=$2
20442 echo "$as_me:20442: checking for $ac_word" >&5
20443 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20444 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20445   echo $ECHO_N "(cached) $ECHO_C" >&6
20446 else
20447   case $TIC_PATH in
20448   [\\/]* | ?:[\\/]*)
20449   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20450   ;;
20451   *)
20452   ac_save_IFS=$IFS; IFS=$ac_path_separator
20453 ac_dummy="$PATH:/usr/local/ncurses/bin"
20454 for ac_dir in $ac_dummy; do
20455   IFS=$ac_save_IFS
20456   test -z "$ac_dir" && ac_dir=.
20457   if $as_executable_p "$ac_dir/$ac_word"; then
20458    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20459    echo "$as_me:20459: found $ac_dir/$ac_word" >&5
20460    break
20461 fi
20462 done
20463
20464   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20465   ;;
20466 esac
20467 fi
20468 TIC_PATH=$ac_cv_path_TIC_PATH
20469
20470 if test -n "$TIC_PATH"; then
20471   echo "$as_me:20471: result: $TIC_PATH" >&5
20472 echo "${ECHO_T}$TIC_PATH" >&6
20473 else
20474   echo "$as_me:20474: result: no" >&5
20475 echo "${ECHO_T}no" >&6
20476 fi
20477
20478 if test -n "$FALLBACK_LIST"
20479 then
20480         if test "$TIC_PATH" = unknown
20481         then
20482                 { echo "$as_me:20482: WARNING: no tic program found for fallbacks" >&5
20483 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20484         fi
20485 fi
20486
20487 if test "x$cf_with_tests" != xno ; then
20488         MAKE_TESTS=
20489 else
20490         MAKE_TESTS="#"
20491 fi
20492
20493 ADAHTML_DIR=../../doc/html/ada
20494
20495 SUB_SCRIPTS=
20496
20497 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"
20498 ac_config_commands="$ac_config_commands default"
20499 cat >confcache <<\_ACEOF
20500 # This file is a shell script that caches the results of configure
20501 # tests run on this system so they can be shared between configure
20502 # scripts and configure runs, see configure's option --config-cache.
20503 # It is not useful on other systems.  If it contains results you don't
20504 # want to keep, you may remove or edit it.
20505 #
20506 # config.status only pays attention to the cache file if you give it
20507 # the --recheck option to rerun configure.
20508 #
20509 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20510 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20511 # following values.
20512
20513 _ACEOF
20514
20515 # The following way of writing the cache mishandles newlines in values,
20516 # but we know of no workaround that is simple, portable, and efficient.
20517 # So, don't put newlines in cache variables' values.
20518 # Ultrix sh set writes to stderr and can't be redirected directly,
20519 # and sets the high bit in the cache file unless we assign to the vars.
20520 {
20521   (set) 2>&1 |
20522     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20523     *ac_space=\ *)
20524       # `set' does not quote correctly, so add quotes (double-quote
20525       # substitution turns \\\\ into \\, and sed turns \\ into \).
20526       sed -n \
20527         "s/'/'\\\\''/g;
20528           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20529       ;;
20530     *)
20531       # `set' quotes correctly as required by POSIX, so do not add quotes.
20532       sed -n \
20533         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20534       ;;
20535     esac;
20536 } |
20537   sed '
20538      t clear
20539      : clear
20540      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20541      t end
20542      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20543      : end' >>confcache
20544 if cmp -s $cache_file confcache; then :; else
20545   if test -w $cache_file; then
20546     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20547     cat confcache >$cache_file
20548   else
20549     echo "not updating unwritable cache $cache_file"
20550   fi
20551 fi
20552 rm -f confcache
20553
20554 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20555 # Let make expand exec_prefix.
20556 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20557
20558 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20559 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20560 # trailing colons and then remove the whole line if VPATH becomes empty
20561 # (actually we leave an empty line to preserve line numbers).
20562 if test "x$srcdir" = x.; then
20563   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20564 s/:*\$(srcdir):*/:/;
20565 s/:*\${srcdir}:*/:/;
20566 s/:*@srcdir@:*/:/;
20567 s/^\([^=]*=[    ]*\):*/\1/;
20568 s/:*$//;
20569 s/^[^=]*=[      ]*$//;
20570 }'
20571 fi
20572
20573 DEFS=-DHAVE_CONFIG_H
20574
20575 : ${CONFIG_STATUS=./config.status}
20576 ac_clean_files_save=$ac_clean_files
20577 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20578 { echo "$as_me:20578: creating $CONFIG_STATUS" >&5
20579 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20580 cat >$CONFIG_STATUS <<_ACEOF
20581 #! $SHELL
20582 # Generated automatically by configure.
20583 # Run this file to recreate the current configuration.
20584 # Compiler output produced by configure, useful for debugging
20585 # configure, is in config.log if it exists.
20586
20587 debug=false
20588 SHELL=\${CONFIG_SHELL-$SHELL}
20589 ac_cs_invocation="\$0 \$@"
20590
20591 _ACEOF
20592
20593 cat >>$CONFIG_STATUS <<\_ACEOF
20594 # Be Bourne compatible
20595 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20596   emulate sh
20597   NULLCMD=:
20598 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20599   set -o posix
20600 fi
20601
20602 # Name of the executable.
20603 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20604
20605 if expr a : '\(a\)' >/dev/null 2>&1; then
20606   as_expr=expr
20607 else
20608   as_expr=false
20609 fi
20610
20611 rm -f conf$$ conf$$.exe conf$$.file
20612 echo >conf$$.file
20613 if ln -s conf$$.file conf$$ 2>/dev/null; then
20614   # We could just check for DJGPP; but this test a) works b) is more generic
20615   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20616   if test -f conf$$.exe; then
20617     # Don't use ln at all; we don't have any links
20618     as_ln_s='cp -p'
20619   else
20620     as_ln_s='ln -s'
20621   fi
20622 elif ln conf$$.file conf$$ 2>/dev/null; then
20623   as_ln_s=ln
20624 else
20625   as_ln_s='cp -p'
20626 fi
20627 rm -f conf$$ conf$$.exe conf$$.file
20628
20629 as_executable_p="test -f"
20630
20631 # Support unset when possible.
20632 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20633   as_unset=unset
20634 else
20635   as_unset=false
20636 fi
20637
20638 # NLS nuisances.
20639 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20640 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20641 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20642 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20643 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20644 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20645 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20646 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20647
20648 # IFS
20649 # We need space, tab and new line, in precisely that order.
20650 as_nl='
20651 '
20652 IFS="   $as_nl"
20653
20654 # CDPATH.
20655 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20656
20657 exec 6>&1
20658
20659 _ACEOF
20660
20661 # Files that config.status was made for.
20662 if test -n "$ac_config_files"; then
20663   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20664 fi
20665
20666 if test -n "$ac_config_headers"; then
20667   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20668 fi
20669
20670 if test -n "$ac_config_links"; then
20671   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20672 fi
20673
20674 if test -n "$ac_config_commands"; then
20675   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20676 fi
20677
20678 cat >>$CONFIG_STATUS <<\EOF
20679
20680 ac_cs_usage="\
20681 \`$as_me' instantiates files from templates according to the
20682 current configuration.
20683
20684 Usage: $0 [OPTIONS] [FILE]...
20685
20686   -h, --help       print this help, then exit
20687   -V, --version    print version number, then exit
20688   -d, --debug      don't remove temporary files
20689       --recheck    update $as_me by reconfiguring in the same conditions
20690   --file=FILE[:TEMPLATE]
20691                    instantiate the configuration file FILE
20692   --header=FILE[:TEMPLATE]
20693                    instantiate the configuration header FILE
20694
20695 Configuration files:
20696 $config_files
20697
20698 Configuration headers:
20699 $config_headers
20700
20701 Configuration commands:
20702 $config_commands
20703
20704 Report bugs to <dickey@invisible-island.net>."
20705 EOF
20706
20707 cat >>$CONFIG_STATUS <<EOF
20708 ac_cs_version="\\
20709 config.status
20710 configured by $0, generated by GNU Autoconf 2.52.20121002,
20711   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20712
20713 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20714 Free Software Foundation, Inc.
20715 This config.status script is free software; the Free Software Foundation
20716 gives unlimited permission to copy, distribute and modify it."
20717 srcdir=$srcdir
20718 INSTALL="$INSTALL"
20719 EOF
20720
20721 cat >>$CONFIG_STATUS <<\EOF
20722 # If no file are specified by the user, then we need to provide default
20723 # value.  By we need to know if files were specified by the user.
20724 ac_need_defaults=:
20725 while test $# != 0
20726 do
20727   case $1 in
20728   --*=*)
20729     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20730     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20731     shift
20732     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20733     shift
20734     ;;
20735   -*);;
20736   *) # This is not an option, so the user has probably given explicit
20737      # arguments.
20738      ac_need_defaults=false;;
20739   esac
20740
20741   case $1 in
20742   # Handling of the options.
20743 EOF
20744 cat >>$CONFIG_STATUS <<EOF
20745   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20746     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20747     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20748 EOF
20749 cat >>$CONFIG_STATUS <<\EOF
20750   --version | --vers* | -V )
20751     echo "$ac_cs_version"; exit 0 ;;
20752   --he | --h)
20753     # Conflict between --help and --header
20754     { { echo "$as_me:20754: error: ambiguous option: $1
20755 Try \`$0 --help' for more information." >&5
20756 echo "$as_me: error: ambiguous option: $1
20757 Try \`$0 --help' for more information." >&2;}
20758    { (exit 1); exit 1; }; };;
20759   --help | --hel | -h )
20760     echo "$ac_cs_usage"; exit 0 ;;
20761   --debug | --d* | -d )
20762     debug=: ;;
20763   --file | --fil | --fi | --f )
20764     shift
20765     CONFIG_FILES="$CONFIG_FILES $1"
20766     ac_need_defaults=false;;
20767   --header | --heade | --head | --hea )
20768     shift
20769     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20770     ac_need_defaults=false;;
20771
20772   # This is an error.
20773   -*) { { echo "$as_me:20773: error: unrecognized option: $1
20774 Try \`$0 --help' for more information." >&5
20775 echo "$as_me: error: unrecognized option: $1
20776 Try \`$0 --help' for more information." >&2;}
20777    { (exit 1); exit 1; }; } ;;
20778
20779   *) ac_config_targets="$ac_config_targets $1" ;;
20780
20781   esac
20782   shift
20783 done
20784
20785 exec 5>>config.log
20786 cat >&5 << _ACEOF
20787
20788 ## ----------------------- ##
20789 ## Running config.status.  ##
20790 ## ----------------------- ##
20791
20792 This file was extended by $as_me 2.52.20121002, executed with
20793   CONFIG_FILES    = $CONFIG_FILES
20794   CONFIG_HEADERS  = $CONFIG_HEADERS
20795   CONFIG_LINKS    = $CONFIG_LINKS
20796   CONFIG_COMMANDS = $CONFIG_COMMANDS
20797   > $ac_cs_invocation
20798 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20799
20800 _ACEOF
20801 EOF
20802
20803 cat >>$CONFIG_STATUS <<EOF
20804 #
20805 # INIT-COMMANDS section.
20806 #
20807
20808 ### Special initialization commands, used to pass information from the
20809 ### configuration-run into config.status
20810
20811 AWK="$AWK"
20812 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20813 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20814 ECHO_LD="$ECHO_LD"
20815 LDCONFIG="$LDCONFIG"
20816 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20817 LIB_NAME="$LIB_NAME"
20818 LIB_PREFIX="$LIB_PREFIX"
20819 LIB_SUBSETS="$LIB_SUBSETS"
20820 LIB_SUFFIX="$LIB_SUFFIX"
20821 LIB_TRACING="$LIB_TRACING"
20822 LN_S="$LN_S"
20823 MAKE_TERMINFO="$MAKE_TERMINFO"
20824 NCURSES_MAJOR="$NCURSES_MAJOR"
20825 NCURSES_MINOR="$NCURSES_MINOR"
20826 NCURSES_OSPEED="$NCURSES_OSPEED"
20827 NCURSES_PATCH="$NCURSES_PATCH"
20828 SRC_SUBDIRS="$SRC_SUBDIRS"
20829 TERMINFO="$TERMINFO"
20830 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20831 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20832 TICS_NAME="$TICS_NAME"
20833 TIC_PATH="$TIC_PATH"
20834 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20835 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20836 TINFO_NAME="$TINFO_NAME"
20837 TINFO_SUFFIX="$TINFO_SUFFIX"
20838 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20839 WITH_CURSES_H="$with_curses_h"
20840 WITH_ECHO="${enable_echo:=yes}"
20841 WITH_OVERWRITE="$with_overwrite"
20842 cf_LIST_MODELS="$cf_list_models"
20843 cf_cv_abi_version="$cf_cv_abi_version"
20844 cf_cv_do_relink="$cf_cv_do_relink"
20845 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20846 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20847 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20848 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20849 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20850 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20851 cf_cv_rel_version="$cf_cv_rel_version"
20852 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20853 cf_cv_shared_soname='$cf_cv_shared_soname'
20854 cf_cv_shlib_version="$cf_cv_shlib_version"
20855 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20856 cf_cv_system_name="$cf_cv_system_name"
20857 cf_cv_term_driver="$with_term_driver"
20858 cf_with_ada="$cf_with_ada"
20859 cf_with_cxx_binding="$cf_with_cxx_binding"
20860 cf_with_manpages="$cf_with_manpages"
20861 cf_with_tests="$cf_with_tests"
20862 host="$host"
20863 target="$target"
20864
20865 EOF
20866
20867 cat >>$CONFIG_STATUS <<\EOF
20868 for ac_config_target in $ac_config_targets
20869 do
20870   case "$ac_config_target" in
20871   # Handling of arguments.
20872   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20873   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20874   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20875   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20876   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20877   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20878   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20879   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20880   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20881   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20882   *) { { echo "$as_me:20882: error: invalid argument: $ac_config_target" >&5
20883 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20884    { (exit 1); exit 1; }; };;
20885   esac
20886 done
20887
20888 # If the user did not use the arguments to specify the items to instantiate,
20889 # then the envvar interface is used.  Set only those that are not.
20890 # We use the long form for the default assignment because of an extremely
20891 # bizarre bug on SunOS 4.1.3.
20892 if $ac_need_defaults; then
20893   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20894   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20895   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20896 fi
20897
20898 # Create a temporary directory, and hook for its removal unless debugging.
20899 $debug ||
20900 {
20901   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20902   trap '{ (exit 1); exit 1; }' 1 2 13 15
20903 }
20904
20905 # Create a (secure) tmp directory for tmp files.
20906 : ${TMPDIR=/tmp}
20907 {
20908   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20909   test -n "$tmp" && test -d "$tmp"
20910 }  ||
20911 {
20912   tmp=$TMPDIR/cs$$-$RANDOM
20913   (umask 077 && mkdir $tmp)
20914 } ||
20915 {
20916    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20917    { (exit 1); exit 1; }
20918 }
20919
20920 EOF
20921
20922 cat >>$CONFIG_STATUS <<EOF
20923
20924 #
20925 # CONFIG_FILES section.
20926 #
20927
20928 # No need to generate the scripts if there are no CONFIG_FILES.
20929 # This happens for instance when ./config.status config.h
20930 if test -n "\$CONFIG_FILES"; then
20931   # Protect against being on the right side of a sed subst in config.status.
20932   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20933    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20934 s,@SHELL@,$SHELL,;t t
20935 s,@exec_prefix@,$exec_prefix,;t t
20936 s,@prefix@,$prefix,;t t
20937 s,@program_transform_name@,$program_transform_name,;t t
20938 s,@bindir@,$bindir,;t t
20939 s,@sbindir@,$sbindir,;t t
20940 s,@libexecdir@,$libexecdir,;t t
20941 s,@datarootdir@,$datarootdir,;t t
20942 s,@datadir@,$datadir,;t t
20943 s,@sysconfdir@,$sysconfdir,;t t
20944 s,@sharedstatedir@,$sharedstatedir,;t t
20945 s,@localstatedir@,$localstatedir,;t t
20946 s,@libdir@,$libdir,;t t
20947 s,@includedir@,$includedir,;t t
20948 s,@oldincludedir@,$oldincludedir,;t t
20949 s,@infodir@,$infodir,;t t
20950 s,@mandir@,$mandir,;t t
20951 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20952 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20953 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20954 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20955 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20956 s,@build_alias@,$build_alias,;t t
20957 s,@host_alias@,$host_alias,;t t
20958 s,@target_alias@,$target_alias,;t t
20959 s,@ECHO_C@,$ECHO_C,;t t
20960 s,@ECHO_N@,$ECHO_N,;t t
20961 s,@ECHO_T@,$ECHO_T,;t t
20962 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20963 s,@DEFS@,$DEFS,;t t
20964 s,@LIBS@,$LIBS,;t t
20965 s,@top_builddir@,$top_builddir,;t t
20966 s,@EGREP@,$EGREP,;t t
20967 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20968 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20969 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20970 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20971 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20972 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20973 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20974 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20975 s,@build@,$build,;t t
20976 s,@build_cpu@,$build_cpu,;t t
20977 s,@build_vendor@,$build_vendor,;t t
20978 s,@build_os@,$build_os,;t t
20979 s,@host@,$host,;t t
20980 s,@host_cpu@,$host_cpu,;t t
20981 s,@host_vendor@,$host_vendor,;t t
20982 s,@host_os@,$host_os,;t t
20983 s,@target@,$target,;t t
20984 s,@target_cpu@,$target_cpu,;t t
20985 s,@target_vendor@,$target_vendor,;t t
20986 s,@target_os@,$target_os,;t t
20987 s,@CC@,$CC,;t t
20988 s,@CFLAGS@,$CFLAGS,;t t
20989 s,@LDFLAGS@,$LDFLAGS,;t t
20990 s,@CPPFLAGS@,$CPPFLAGS,;t t
20991 s,@ac_ct_CC@,$ac_ct_CC,;t t
20992 s,@EXEEXT@,$EXEEXT,;t t
20993 s,@OBJEXT@,$OBJEXT,;t t
20994 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20995 s,@CPP@,$CPP,;t t
20996 s,@LDCONFIG@,$LDCONFIG,;t t
20997 s,@CXX@,$CXX,;t t
20998 s,@CXXFLAGS@,$CXXFLAGS,;t t
20999 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
21000 s,@AWK@,$AWK,;t t
21001 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21002 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21003 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21004 s,@LINT@,$LINT,;t t
21005 s,@LINT_OPTS@,$LINT_OPTS,;t t
21006 s,@LN_S@,$LN_S,;t t
21007 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21008 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21009 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
21010 s,@SET_MAKE@,$SET_MAKE,;t t
21011 s,@CTAGS@,$CTAGS,;t t
21012 s,@ETAGS@,$ETAGS,;t t
21013 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21014 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21015 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
21016 s,@RANLIB@,$RANLIB,;t t
21017 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21018 s,@LD@,$LD,;t t
21019 s,@ac_ct_LD@,$ac_ct_LD,;t t
21020 s,@AR@,$AR,;t t
21021 s,@ac_ct_AR@,$ac_ct_AR,;t t
21022 s,@ARFLAGS@,$ARFLAGS,;t t
21023 s,@DESTDIR@,$DESTDIR,;t t
21024 s,@BUILD_CC@,$BUILD_CC,;t t
21025 s,@BUILD_CPP@,$BUILD_CPP,;t t
21026 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
21027 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
21028 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
21029 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
21030 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
21031 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
21032 s,@cf_list_models@,$cf_list_models,;t t
21033 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
21034 s,@LIBTOOL@,$LIBTOOL,;t t
21035 s,@LT_UNDEF@,$LT_UNDEF,;t t
21036 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
21037 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
21038 s,@LIB_CREATE@,$LIB_CREATE,;t t
21039 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
21040 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
21041 s,@LIB_PREP@,$LIB_PREP,;t t
21042 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
21043 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21044 s,@LIB_LINK@,$LIB_LINK,;t t
21045 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21046 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21047 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21048 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21049 s,@TICS_NAME@,$TICS_NAME,;t t
21050 s,@TINFO_NAME@,$TINFO_NAME,;t t
21051 s,@LIB_NAME@,$LIB_NAME,;t t
21052 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21053 s,@CC_G_OPT@,$CC_G_OPT,;t t
21054 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21055 s,@LD_MODEL@,$LD_MODEL,;t t
21056 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21057 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21058 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21059 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21060 s,@LINK_PROGS@,$LINK_PROGS,;t t
21061 s,@LINK_TESTS@,$LINK_TESTS,;t t
21062 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21063 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21064 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21065 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21066 s,@RPATH_LIST@,$RPATH_LIST,;t t
21067 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21068 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21069 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21070 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21071 s,@XTERM_KBS@,$XTERM_KBS,;t t
21072 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21073 s,@TERMINFO@,$TERMINFO,;t t
21074 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21075 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21076 s,@TERMPATH@,$TERMPATH,;t t
21077 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21078 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21079 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21080 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21081 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21082 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21083 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21084 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21085 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21086 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21087 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21088 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21089 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21090 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21091 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21092 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21093 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21094 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21095 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21096 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21097 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21098 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21099 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21100 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21101 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21102 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21103 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21104 s,@PTHREAD@,$PTHREAD,;t t
21105 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21106 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21107 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21108 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21109 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21110 s,@ECHO_LT@,$ECHO_LT,;t t
21111 s,@ECHO_LD@,$ECHO_LD,;t t
21112 s,@RULE_CC@,$RULE_CC,;t t
21113 s,@SHOW_CC@,$SHOW_CC,;t t
21114 s,@ECHO_CC@,$ECHO_CC,;t t
21115 s,@ECHO_LINK@,$ECHO_LINK,;t t
21116 s,@ADAFLAGS@,$ADAFLAGS,;t t
21117 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21118 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21119 s,@ADA_TRACE@,$ADA_TRACE,;t t
21120 s,@MATH_LIB@,$MATH_LIB,;t t
21121 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21122 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21123 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21124 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21125 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21126 s,@TEST_LIBS@,$TEST_LIBS,;t t
21127 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21128 s,@CXXCPP@,$CXXCPP,;t t
21129 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21130 s,@CXX_AR@,$CXX_AR,;t t
21131 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21132 s,@CXXLIBS@,$CXXLIBS,;t t
21133 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21134 s,@gnat_exists@,$gnat_exists,;t t
21135 s,@M4_exists@,$M4_exists,;t t
21136 s,@cf_ada_make@,$cf_ada_make,;t t
21137 s,@cf_compile_generics@,$cf_compile_generics,;t t
21138 s,@cf_generic_objects@,$cf_generic_objects,;t t
21139 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21140 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21141 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21142 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21143 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21144 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21145 s,@cf_ada_package@,$cf_ada_package,;t t
21146 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21147 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21148 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21149 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21150 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21151 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21152 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21153 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21154 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21155 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21156 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21157 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21158 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21159 s,@TICS_LIBS@,$TICS_LIBS,;t t
21160 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21161 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21162 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21163 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21164 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21165 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21166 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21167 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21168 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21169 s,@TICS_LIST@,$TICS_LIST,;t t
21170 s,@TINFO_LIST@,$TINFO_LIST,;t t
21171 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21172 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21173 s,@TEST_ARGS@,$TEST_ARGS,;t t
21174 s,@TEST_DEPS@,$TEST_DEPS,;t t
21175 s,@TEST_ARG2@,$TEST_ARG2,;t t
21176 s,@TEST_DEP2@,$TEST_DEP2,;t t
21177 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21178 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21179 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21180 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21181 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21182 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21183 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21184 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21185 s,@cross_compiling@,$cross_compiling,;t t
21186 s,@TIC_PATH@,$TIC_PATH,;t t
21187 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21188 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21189 CEOF
21190
21191 EOF
21192
21193   cat >>$CONFIG_STATUS <<\EOF
21194   # Split the substitutions into bite-sized pieces for seds with
21195   # small command number limits, like on Digital OSF/1 and HP-UX.
21196   ac_max_sed_lines=48
21197   ac_sed_frag=1 # Number of current file.
21198   ac_beg=1 # First line for current file.
21199   ac_end=$ac_max_sed_lines # Line after last line for current file.
21200   ac_more_lines=:
21201   ac_sed_cmds=
21202   while $ac_more_lines; do
21203     if test $ac_beg -gt 1; then
21204       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21205     else
21206       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21207     fi
21208     if test ! -s $tmp/subs.frag; then
21209       ac_more_lines=false
21210     else
21211       # The purpose of the label and of the branching condition is to
21212       # speed up the sed processing (if there are no `@' at all, there
21213       # is no need to browse any of the substitutions).
21214       # These are the two extra sed commands mentioned above.
21215       (echo ':t
21216   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21217       if test -z "$ac_sed_cmds"; then
21218         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21219       else
21220         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21221       fi
21222       ac_sed_frag=`expr $ac_sed_frag + 1`
21223       ac_beg=$ac_end
21224       ac_end=`expr $ac_end + $ac_max_sed_lines`
21225     fi
21226   done
21227   if test -z "$ac_sed_cmds"; then
21228     ac_sed_cmds=cat
21229   fi
21230 fi # test -n "$CONFIG_FILES"
21231
21232 EOF
21233 cat >>$CONFIG_STATUS <<\EOF
21234 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21235   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21236   case $ac_file in
21237   - | *:- | *:-:* ) # input from stdin
21238         cat >$tmp/stdin
21239         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21240         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21241   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21242         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21243   * )   ac_file_in=$ac_file.in ;;
21244   esac
21245
21246   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21247   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21248          X"$ac_file" : 'X\(//\)[^/]' \| \
21249          X"$ac_file" : 'X\(//\)$' \| \
21250          X"$ac_file" : 'X\(/\)' \| \
21251          .     : '\(.\)' 2>/dev/null ||
21252 echo X"$ac_file" |
21253     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21254           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21255           /^X\(\/\/\)$/{ s//\1/; q; }
21256           /^X\(\/\).*/{ s//\1/; q; }
21257           s/.*/./; q'`
21258   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21259     { case "$ac_dir" in
21260   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21261   *)                      as_incr_dir=.;;
21262 esac
21263 as_dummy="$ac_dir"
21264 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21265   case $as_mkdir_dir in
21266     # Skip DOS drivespec
21267     ?:) as_incr_dir=$as_mkdir_dir ;;
21268     *)
21269       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21270       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21271     ;;
21272   esac
21273 done; }
21274
21275     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21276     # A "../" for each directory in $ac_dir_suffix.
21277     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21278   else
21279     ac_dir_suffix= ac_dots=
21280   fi
21281
21282   case $srcdir in
21283   .)  ac_srcdir=.
21284       if test -z "$ac_dots"; then
21285          ac_top_srcdir=.
21286       else
21287          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21288       fi ;;
21289   [\\/]* | ?:[\\/]* )
21290       ac_srcdir=$srcdir$ac_dir_suffix;
21291       ac_top_srcdir=$srcdir ;;
21292   *) # Relative path.
21293     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21294     ac_top_srcdir=$ac_dots$srcdir ;;
21295   esac
21296
21297   case $INSTALL in
21298   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21299   *) ac_INSTALL=$ac_dots$INSTALL ;;
21300   esac
21301
21302   if test x"$ac_file" != x-; then
21303     { echo "$as_me:21303: creating $ac_file" >&5
21304 echo "$as_me: creating $ac_file" >&6;}
21305     rm -f "$ac_file"
21306   fi
21307   # Let's still pretend it is `configure' which instantiates (i.e., don't
21308   # use $as_me), people would be surprised to read:
21309   #    /* config.h.  Generated automatically by config.status.  */
21310   configure_input="Generated automatically from `echo $ac_file_in |
21311                                                  sed 's,.*/,,'` by configure."
21312
21313   # First look for the input files in the build tree, otherwise in the
21314   # src tree.
21315   ac_file_inputs=`IFS=:
21316     for f in $ac_file_in; do
21317       case $f in
21318       -) echo $tmp/stdin ;;
21319       [\\/$]*)
21320          # Absolute (can't be DOS-style, as IFS=:)
21321          test -f "$f" || { { echo "$as_me:21321: error: cannot find input file: $f" >&5
21322 echo "$as_me: error: cannot find input file: $f" >&2;}
21323    { (exit 1); exit 1; }; }
21324          echo $f;;
21325       *) # Relative
21326          if test -f "$f"; then
21327            # Build tree
21328            echo $f
21329          elif test -f "$srcdir/$f"; then
21330            # Source tree
21331            echo $srcdir/$f
21332          else
21333            # /dev/null tree
21334            { { echo "$as_me:21334: error: cannot find input file: $f" >&5
21335 echo "$as_me: error: cannot find input file: $f" >&2;}
21336    { (exit 1); exit 1; }; }
21337          fi;;
21338       esac
21339     done` || { (exit 1); exit 1; }
21340 EOF
21341 cat >>$CONFIG_STATUS <<\EOF
21342   ac_warn_datarootdir=no
21343   if test x"$ac_file" != x-; then
21344     for ac_item in $ac_file_inputs
21345     do
21346       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21347       if test -n "$ac_seen"; then
21348         ac_used=`grep '@datarootdir@' $ac_item`
21349         if test -z "$ac_used"; then
21350           { echo "$as_me:21350: WARNING: datarootdir was used implicitly but not set:
21351 $ac_seen" >&5
21352 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21353 $ac_seen" >&2;}
21354           ac_warn_datarootdir=yes
21355         fi
21356       fi
21357       ac_seen=`grep '${datarootdir}' $ac_item`
21358       if test -n "$ac_seen"; then
21359         { echo "$as_me:21359: WARNING: datarootdir was used explicitly but not set:
21360 $ac_seen" >&5
21361 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21362 $ac_seen" >&2;}
21363         ac_warn_datarootdir=yes
21364       fi
21365     done
21366   fi
21367
21368 if test "x$ac_warn_datarootdir" = xyes; then
21369   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21370 fi
21371
21372 EOF
21373 cat >>$CONFIG_STATUS <<EOF
21374   sed "$ac_vpsub
21375 $extrasub
21376 EOF
21377 cat >>$CONFIG_STATUS <<\EOF
21378 :t
21379 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21380 s,@configure_input@,$configure_input,;t t
21381 s,@srcdir@,$ac_srcdir,;t t
21382 s,@top_srcdir@,$ac_top_srcdir,;t t
21383 s,@INSTALL@,$ac_INSTALL,;t t
21384 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21385   rm -f $tmp/stdin
21386   if test x"$ac_file" != x-; then
21387     cp $tmp/out $ac_file
21388
21389     for ac_name in prefix exec_prefix datarootdir
21390     do
21391         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21392         if test -n "$ac_seen"; then
21393             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21394             if test -z "$ac_init"; then
21395               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21396               { echo "$as_me:21396: WARNING: Variable $ac_name is used but was not set:
21397 $ac_seen" >&5
21398 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21399 $ac_seen" >&2;}
21400             fi
21401         fi
21402     done
21403     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21404     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21405     if test -s $tmp/out; then
21406       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21407       { echo "$as_me:21407: WARNING: Some variables may not be substituted:
21408 $ac_seen" >&5
21409 echo "$as_me: WARNING: Some variables may not be substituted:
21410 $ac_seen" >&2;}
21411     fi
21412   else
21413     cat $tmp/out
21414   fi
21415   rm -f $tmp/out
21416
21417 done
21418 EOF
21419 cat >>$CONFIG_STATUS <<\EOF
21420
21421 #
21422 # CONFIG_HEADER section.
21423 #
21424
21425 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21426 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21427 #
21428 # ac_d sets the value in "#define NAME VALUE" lines.
21429 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21430 ac_dB='[        ].*$,\1#\2'
21431 ac_dC=' '
21432 ac_dD=',;t'
21433 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21434 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21435 ac_iB='\([      ]\),\1#\2define\3'
21436 ac_iC=' '
21437 ac_iD='\4,;t'
21438 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21439 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21440 ac_uB='$,\1#\2define\3'
21441 ac_uC=' '
21442 ac_uD=',;t'
21443
21444 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21445   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21446   case $ac_file in
21447   - | *:- | *:-:* ) # input from stdin
21448         cat >$tmp/stdin
21449         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21450         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21451   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21452         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21453   * )   ac_file_in=$ac_file.in ;;
21454   esac
21455
21456   test x"$ac_file" != x- && { echo "$as_me:21456: creating $ac_file" >&5
21457 echo "$as_me: creating $ac_file" >&6;}
21458
21459   # First look for the input files in the build tree, otherwise in the
21460   # src tree.
21461   ac_file_inputs=`IFS=:
21462     for f in $ac_file_in; do
21463       case $f in
21464       -) echo $tmp/stdin ;;
21465       [\\/$]*)
21466          # Absolute (can't be DOS-style, as IFS=:)
21467          test -f "$f" || { { echo "$as_me:21467: error: cannot find input file: $f" >&5
21468 echo "$as_me: error: cannot find input file: $f" >&2;}
21469    { (exit 1); exit 1; }; }
21470          echo $f;;
21471       *) # Relative
21472          if test -f "$f"; then
21473            # Build tree
21474            echo $f
21475          elif test -f "$srcdir/$f"; then
21476            # Source tree
21477            echo $srcdir/$f
21478          else
21479            # /dev/null tree
21480            { { echo "$as_me:21480: error: cannot find input file: $f" >&5
21481 echo "$as_me: error: cannot find input file: $f" >&2;}
21482    { (exit 1); exit 1; }; }
21483          fi;;
21484       esac
21485     done` || { (exit 1); exit 1; }
21486   # Remove the trailing spaces.
21487   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21488
21489 EOF
21490
21491 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21492 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21493 # be either 'cat' or 'sort'.
21494 cat confdefs.h | uniq >conftest.vals
21495
21496 # Break up conftest.vals because some shells have a limit on
21497 # the size of here documents, and old seds have small limits too.
21498
21499 rm -f conftest.tail
21500 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21501 while grep . conftest.vals >/dev/null
21502 do
21503   # Write chunks of a limited-size here document to conftest.frag.
21504   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21505   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21506   echo 'CEOF' >> $CONFIG_STATUS
21507   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21508   rm -f conftest.vals
21509   mv conftest.tail conftest.vals
21510 done
21511 rm -f conftest.vals
21512
21513 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21514 # marker @DEFS@.
21515 echo '  cat >> conftest.edit <<CEOF
21516 /@DEFS@/r conftest.frag
21517 /@DEFS@/d
21518 CEOF
21519 sed -f conftest.edit $tmp/in > $tmp/out
21520 rm -f $tmp/in
21521 mv $tmp/out $tmp/in
21522 rm -f conftest.edit conftest.frag
21523 ' >> $CONFIG_STATUS
21524
21525 cat >>$CONFIG_STATUS <<\EOF
21526   # Let's still pretend it is `configure' which instantiates (i.e., don't
21527   # use $as_me), people would be surprised to read:
21528   #    /* config.h.  Generated automatically by config.status.  */
21529   if test x"$ac_file" = x-; then
21530     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21531   else
21532     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21533   fi
21534   cat $tmp/in >>$tmp/config.h
21535   rm -f $tmp/in
21536   if test x"$ac_file" != x-; then
21537     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21538       { echo "$as_me:21538: $ac_file is unchanged" >&5
21539 echo "$as_me: $ac_file is unchanged" >&6;}
21540     else
21541       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21542          X"$ac_file" : 'X\(//\)[^/]' \| \
21543          X"$ac_file" : 'X\(//\)$' \| \
21544          X"$ac_file" : 'X\(/\)' \| \
21545          .     : '\(.\)' 2>/dev/null ||
21546 echo X"$ac_file" |
21547     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21548           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21549           /^X\(\/\/\)$/{ s//\1/; q; }
21550           /^X\(\/\).*/{ s//\1/; q; }
21551           s/.*/./; q'`
21552       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21553         { case "$ac_dir" in
21554   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21555   *)                      as_incr_dir=.;;
21556 esac
21557 as_dummy="$ac_dir"
21558 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21559   case $as_mkdir_dir in
21560     # Skip DOS drivespec
21561     ?:) as_incr_dir=$as_mkdir_dir ;;
21562     *)
21563       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21564       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21565     ;;
21566   esac
21567 done; }
21568
21569       fi
21570       rm -f $ac_file
21571       mv $tmp/config.h $ac_file
21572     fi
21573   else
21574     cat $tmp/config.h
21575     rm -f $tmp/config.h
21576   fi
21577 done
21578 EOF
21579 cat >>$CONFIG_STATUS <<\EOF
21580 #
21581 # CONFIG_COMMANDS section.
21582 #
21583 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21584   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21585   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21586
21587   case $ac_dest in
21588     default )
21589 if test "x$cf_with_tests" != xno ; then
21590
21591 for cf_dir in test
21592 do
21593         if test ! -d $srcdir/$cf_dir; then
21594                 continue
21595         elif test -f $srcdir/$cf_dir/programs; then
21596                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21597         fi
21598 done
21599
21600 fi
21601
21602 cf_prefix=$LIB_PREFIX
21603
21604 case $cf_cv_shlib_version in #(vi
21605 cygdll|mingw)
21606         TINFO_NAME=$TINFO_ARG_SUFFIX
21607         TINFO_SUFFIX=.dll
21608         ;;
21609 esac
21610
21611 if test -n "$TINFO_SUFFIX" ; then
21612         case $TINFO_SUFFIX in
21613         tw*)
21614                 TINFO_NAME="${TINFO_NAME}tw"
21615                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21616                 ;;
21617         t*)
21618                 TINFO_NAME="${TINFO_NAME}t"
21619                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21620                 ;;
21621         w*)
21622                 TINFO_NAME="${TINFO_NAME}w"
21623                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21624                 ;;
21625         esac
21626 fi
21627
21628 for cf_dir in $SRC_SUBDIRS
21629 do
21630         if test ! -d $srcdir/$cf_dir ; then
21631                 continue
21632         elif test -f $srcdir/$cf_dir/modules; then
21633
21634                 SHARED_LIB=
21635                 Libs_To_Make=
21636                 for cf_item in $cf_LIST_MODELS
21637                 do
21638
21639         case $cf_item in #(vi
21640         libtool) #(vi
21641                 cf_suffix='.la'
21642                 cf_depsuf=$cf_suffix
21643                 ;;
21644         normal) #(vi
21645                 cf_suffix='.a'
21646                 cf_depsuf=$cf_suffix
21647                 ;;
21648         debug) #(vi
21649                 cf_suffix='_g.a'
21650                 cf_depsuf=$cf_suffix
21651                 ;;
21652         profile) #(vi
21653                 cf_suffix='_p.a'
21654                 cf_depsuf=$cf_suffix
21655                 ;;
21656         shared) #(vi
21657                 case $cf_cv_system_name in
21658                 aix[5-7]*) #(vi
21659                         cf_suffix='.a'
21660                         cf_depsuf=$cf_suffix
21661                         ;;
21662                 cygwin*|mingw*) #(vi
21663                         cf_suffix='.dll'
21664                         cf_depsuf='.dll.a'
21665                         ;;
21666                 darwin*) #(vi
21667                         cf_suffix='.dylib'
21668                         cf_depsuf=$cf_suffix
21669                         ;;
21670                 hpux*) #(vi
21671                         case $target in
21672                         ia64*) #(vi
21673                                 cf_suffix='.so'
21674                                 cf_depsuf=$cf_suffix
21675                                 ;;
21676                         *) #(vi
21677                                 cf_suffix='.sl'
21678                                 cf_depsuf=$cf_suffix
21679                                 ;;
21680                         esac
21681                         ;;
21682                 *)      cf_suffix='.so'
21683                         cf_depsuf=$cf_suffix
21684                         ;;
21685                 esac
21686         esac
21687         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21688         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21689
21690                         if test $cf_item = shared ; then
21691                         if test "$cf_cv_do_symlinks" = yes ; then
21692                                 case "$cf_cv_shlib_version" in #(vi
21693                                 rel) #(vi
21694                                         case "$cf_cv_system_name" in #(vi
21695                                         darwin*)
21696                                         case .${LIB_SUFFIX} in
21697                                         .tw*)
21698                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21699                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21700                                                 ;;
21701                                         .t*)
21702                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21703                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21704                                                 ;;
21705                                         .w*)
21706                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21707                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21708                                                 ;;
21709                                         *)
21710                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21711                                                 ;;
21712                                         esac
21713                                         ;; #(vi
21714                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21715                                         esac
21716                                         ;;
21717                                 abi)
21718                                         case "$cf_cv_system_name" in #(vi
21719                                         darwin*)
21720                                         case .${LIB_SUFFIX} in
21721                                         .tw*)
21722                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21723                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21724                                                 ;;
21725                                         .t*)
21726                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21727                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21728                                                 ;;
21729                                         .w*)
21730                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21731                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21732                                                 ;;
21733                                         *)
21734                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21735                                                 ;;
21736                                         esac
21737                                         ;; #(vi
21738                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21739                                         esac
21740                                         ;;
21741                                 esac
21742                         fi
21743                         # cygwin needs import library, and has unique naming convention
21744                         # use autodetected ${cf_prefix} for import lib and static lib, but
21745                         # use 'cyg' prefix for shared lib.
21746                         case $cf_cv_shlib_version in #(vi
21747                         cygdll) #(vi
21748                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21749                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21750                                 continue
21751                                 ;;
21752                         mingw)
21753                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21754                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21755                                 continue
21756                                 ;;
21757                         esac
21758                         fi
21759                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21760                 done
21761
21762                 if test $cf_dir = ncurses ; then
21763                         cf_subsets="$LIB_SUBSETS"
21764                         cf_r_parts="$cf_subsets"
21765                         cf_liblist="$Libs_To_Make"
21766
21767                         while test -n "$cf_r_parts"
21768                         do
21769                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21770                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21771                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21772                                         cf_item=
21773                                         case $cf_l_parts in #(vi
21774                                         *termlib*) #(vi
21775                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21776                                                 ;;
21777                                         *ticlib*)
21778                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21779                                                 ;;
21780                                         *)
21781                                                 break
21782                                                 ;;
21783                                         esac
21784                                         if test -n "$cf_item"; then
21785                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21786                                         fi
21787                                 else
21788                                         break
21789                                 fi
21790                         done
21791                 else
21792                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21793                 fi
21794
21795                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21796                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21797                         $cf_dir/Makefile >$cf_dir/Makefile.out
21798                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21799
21800                 $AWK -f $srcdir/mk-0th.awk \
21801                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21802                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21803
21804                 for cf_subset in $cf_subsets
21805                 do
21806                         cf_subdirs=
21807                         for cf_item in $cf_LIST_MODELS
21808                         do
21809                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21810
21811 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21812
21813         case $cf_item in #(vi
21814         libtool) #(vi
21815                 cf_suffix='.la'
21816                 cf_depsuf=$cf_suffix
21817                 ;;
21818         normal) #(vi
21819                 cf_suffix='.a'
21820                 cf_depsuf=$cf_suffix
21821                 ;;
21822         debug) #(vi
21823                 cf_suffix='_g.a'
21824                 cf_depsuf=$cf_suffix
21825                 ;;
21826         profile) #(vi
21827                 cf_suffix='_p.a'
21828                 cf_depsuf=$cf_suffix
21829                 ;;
21830         shared) #(vi
21831                 case $cf_cv_system_name in
21832                 aix[5-7]*) #(vi
21833                         cf_suffix='.a'
21834                         cf_depsuf=$cf_suffix
21835                         ;;
21836                 cygwin*|mingw*) #(vi
21837                         cf_suffix='.dll'
21838                         cf_depsuf='.dll.a'
21839                         ;;
21840                 darwin*) #(vi
21841                         cf_suffix='.dylib'
21842                         cf_depsuf=$cf_suffix
21843                         ;;
21844                 hpux*) #(vi
21845                         case $target in
21846                         ia64*) #(vi
21847                                 cf_suffix='.so'
21848                                 cf_depsuf=$cf_suffix
21849                                 ;;
21850                         *) #(vi
21851                                 cf_suffix='.sl'
21852                                 cf_depsuf=$cf_suffix
21853                                 ;;
21854                         esac
21855                         ;;
21856                 *)      cf_suffix='.so'
21857                         cf_depsuf=$cf_suffix
21858                         ;;
21859                 esac
21860         esac
21861         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21862         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21863
21864         case $cf_item in
21865         libtool) cf_subdir='obj_lo'  ;;
21866         normal)  cf_subdir='objects' ;;
21867         debug)   cf_subdir='obj_g' ;;
21868         profile) cf_subdir='obj_p' ;;
21869         shared)
21870                 case $cf_cv_system_name in #(vi
21871                 cygwin) #(vi
21872                         cf_subdir='objects' ;;
21873                 *)
21874                         cf_subdir='obj_s' ;;
21875                 esac
21876         esac
21877
21878                         # Test for case where we build libtinfo with a different name.
21879                         cf_libname=$cf_dir
21880                         if test $cf_dir = ncurses ; then
21881                                 case $cf_subset in
21882                                 *base*)
21883                                         cf_libname=${cf_libname}$LIB_SUFFIX
21884                                         ;;
21885                                 *termlib*)
21886                                         cf_libname=$TINFO_LIB_SUFFIX
21887                                         ;;
21888                                 ticlib*)
21889                                         cf_libname=$TICS_LIB_SUFFIX
21890                                         ;;
21891                                 esac
21892                         else
21893                                 cf_libname=${cf_libname}$LIB_SUFFIX
21894                         fi
21895                         if test -n "${DFT_ARG_SUFFIX}" ; then
21896                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21897                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21898                         fi
21899
21900                         # These dependencies really are for development, not
21901                         # builds, but they are useful in porting, too.
21902                         cf_depend="../include/ncurses_cfg.h"
21903                         if test "$srcdir" = "."; then
21904                                 cf_reldir="."
21905                         else
21906                                 cf_reldir="\${srcdir}"
21907                         fi
21908
21909                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21910                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21911                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21912                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21913                         fi
21914
21915                         cf_dir_suffix=
21916                         old_cf_suffix="$cf_suffix"
21917                         if test "$cf_cv_shlib_version_infix" = yes ; then
21918                         if test -n "$LIB_SUFFIX" ; then
21919                                 case $LIB_SUFFIX in
21920                                 tw*)
21921                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21922                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21923                                         cf_dir_suffix=tw
21924                                         ;;
21925                                 t*)
21926                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21927                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21928                                         cf_dir_suffix=t
21929                                         ;;
21930                                 w*)
21931                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21932                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21933                                         cf_dir_suffix=w
21934                                         ;;
21935                                 esac
21936                         fi
21937                         fi
21938
21939                         $AWK -f $srcdir/mk-1st.awk \
21940                                 name=${cf_libname}${cf_dir_suffix} \
21941                                 traces=$LIB_TRACING \
21942                                 MODEL=$cf_ITEM \
21943                                 model=$cf_subdir \
21944                                 prefix=$cf_prefix \
21945                                 suffix=$cf_suffix \
21946                                 subset=$cf_subset \
21947                                 driver=$cf_cv_term_driver \
21948                                 SymLink="$LN_S" \
21949                                 TermlibRoot=$TINFO_NAME \
21950                                 TermlibSuffix=$TINFO_SUFFIX \
21951                                 ShlibVer=$cf_cv_shlib_version \
21952                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21953                                 ReLink=${cf_cv_do_relink:-no} \
21954                                 DoLinks=$cf_cv_do_symlinks \
21955                                 rmSoLocs=$cf_cv_rm_so_locs \
21956                                 ldconfig="$LDCONFIG" \
21957                                 overwrite=$WITH_OVERWRITE \
21958                                 depend="$cf_depend" \
21959                                 host="$host" \
21960                                 libtool_version="$LIBTOOL_VERSION" \
21961                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21962
21963                         cf_suffix="$old_cf_suffix"
21964
21965                         for cf_subdir2 in $cf_subdirs lib
21966                         do
21967                                 test $cf_subdir = $cf_subdir2 && break
21968                         done
21969                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21970                         $AWK -f $srcdir/mk-2nd.awk \
21971                                 name=$cf_dir \
21972                                 traces=$LIB_TRACING \
21973                                 MODEL=$cf_ITEM \
21974                                 model=$cf_subdir \
21975                                 subset=$cf_subset \
21976                                 srcdir=$srcdir \
21977                                 echo=$WITH_ECHO \
21978                                 crenames=$cf_cv_prog_CC_c_o \
21979                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21980                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21981                         cf_subdirs="$cf_subdirs $cf_subdir"
21982                         done
21983                 done
21984         fi
21985
21986         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21987 done
21988
21989 for cf_dir in $SRC_SUBDIRS
21990 do
21991         if test ! -d $srcdir/$cf_dir ; then
21992                 continue
21993         fi
21994
21995         if test -f $cf_dir/Makefile ; then
21996                 case "$cf_dir" in
21997                 Ada95) #(vi
21998                         echo 'libs \' >> Makefile
21999                         echo 'install.libs \' >> Makefile
22000                         echo 'uninstall.libs ::' >> Makefile
22001                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
22002                         ;;
22003                 esac
22004         fi
22005
22006         if test -f $srcdir/$cf_dir/modules; then
22007                 echo >> Makefile
22008                 if test -f $srcdir/$cf_dir/headers; then
22009 cat >> Makefile <<CF_EOF
22010 install.includes \\
22011 uninstall.includes \\
22012 CF_EOF
22013                 fi
22014 if test "$cf_dir" != "c++" ; then
22015 echo 'lint \' >> Makefile
22016 fi
22017 cat >> Makefile <<CF_EOF
22018 libs \\
22019 lintlib \\
22020 install.libs \\
22021 uninstall.libs \\
22022 install.$cf_dir \\
22023 uninstall.$cf_dir ::
22024         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22025 CF_EOF
22026         elif test -f $srcdir/$cf_dir/headers; then
22027 cat >> Makefile <<CF_EOF
22028
22029 libs \\
22030 install.libs \\
22031 uninstall.libs \\
22032 install.includes \\
22033 uninstall.includes ::
22034         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
22035 CF_EOF
22036 fi
22037 done
22038
22039 cat >> Makefile <<CF_EOF
22040
22041 install.libs uninstall.libs \\
22042 install.data uninstall.data ::
22043 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22044 CF_EOF
22045
22046 if test "x$cf_with_manpages" = xyes; then
22047 cat >> Makefile <<CF_EOF
22048
22049 install.man \\
22050 uninstall.man ::
22051         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22052 CF_EOF
22053 fi
22054
22055 cat >> Makefile <<CF_EOF
22056
22057 distclean ::
22058         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22059         rm -f headers.sh headers.sed mk_shared_lib.sh
22060         rm -f edit_man.* man_alias.*
22061         rm -rf \${DIRS_TO_MAKE}
22062 CF_EOF
22063
22064 # Special case: tack's manpage lives in its own directory.
22065 if test "x$cf_with_manpages" = xyes; then
22066 if test -d tack ; then
22067 if test -f $srcdir/$tack.h; then
22068 cat >> Makefile <<CF_EOF
22069
22070 install.man \\
22071 uninstall.man ::
22072         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22073 CF_EOF
22074 fi
22075 fi
22076 fi
22077
22078 rm -f headers.sed headers.sh
22079
22080 echo creating headers.sh
22081 cat >headers.sh <<CF_EOF
22082 #! /bin/sh
22083 # This shell script is generated by the 'configure' script.  It is invoked in a
22084 # subdirectory of the build tree.  It generates a sed-script in the parent
22085 # directory that is used to adjust includes for header files that reside in a
22086 # subdirectory of /usr/include, etc.
22087 PRG=""
22088 while test \$# != 3
22089 do
22090 PRG="\$PRG \$1"; shift
22091 done
22092 DST=\$1
22093 REF=\$2
22094 SRC=\$3
22095 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22096 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22097 echo installing \$SRC in \$DST
22098 CF_EOF
22099
22100 if test $WITH_CURSES_H = yes; then
22101         cat >>headers.sh <<CF_EOF
22102 case \$DST in
22103 /*/include/*)
22104         END=\`basename \$DST\`
22105         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22106         do
22107                 NAME=\`basename \$i\`
22108                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22109         done
22110         ;;
22111 *)
22112         echo "" >> \$TMPSED
22113         ;;
22114 esac
22115 CF_EOF
22116
22117 else
22118         cat >>headers.sh <<CF_EOF
22119 case \$DST in
22120 /*/include/*)
22121         END=\`basename \$DST\`
22122         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22123         do
22124                 NAME=\`basename \$i\`
22125                 if test "\$NAME" = "curses.h"
22126                 then
22127                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22128                         NAME=ncurses.h
22129                 fi
22130                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22131         done
22132         ;;
22133 *)
22134         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22135         ;;
22136 esac
22137 CF_EOF
22138 fi
22139 cat >>headers.sh <<CF_EOF
22140 rm -f \$TMPSRC
22141 sed -f \$TMPSED \$SRC > \$TMPSRC
22142 NAME=\`basename \$SRC\`
22143 CF_EOF
22144 if test $WITH_CURSES_H != yes; then
22145         cat >>headers.sh <<CF_EOF
22146 test "\$NAME" = "curses.h" && NAME=ncurses.h
22147 CF_EOF
22148 fi
22149 cat >>headers.sh <<CF_EOF
22150 # Just in case someone gzip'd manpages, remove the conflicting copy.
22151 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22152
22153 eval \$PRG \$TMPSRC \$DST/\$NAME
22154 rm -f \$TMPSRC \$TMPSED
22155 CF_EOF
22156
22157 chmod 0755 headers.sh
22158
22159 for cf_dir in $SRC_SUBDIRS
22160 do
22161         if test ! -d $srcdir/$cf_dir ; then
22162                 continue
22163         fi
22164
22165         if test -f $srcdir/$cf_dir/headers; then
22166                 $AWK -f $srcdir/mk-hdr.awk \
22167                         subset="$LIB_SUBSETS" \
22168                         compat="$WITH_CURSES_H" \
22169                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22170         fi
22171
22172         if test -f $srcdir/$cf_dir/modules; then
22173                 if test "$cf_dir" != "c++" ; then
22174                         cat >>$cf_dir/Makefile <<"CF_EOF"
22175 depend : ${AUTO_SRC}
22176         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22177
22178 # DO NOT DELETE THIS LINE -- make depend depends on it.
22179 CF_EOF
22180                 fi
22181         fi
22182 done
22183
22184 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22185 if test -z "$USE_OLD_MAKERULES" ; then
22186         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22187 fi
22188 fi
22189  ;;
22190   esac
22191 done
22192 EOF
22193
22194 cat >>$CONFIG_STATUS <<\EOF
22195
22196 { (exit 0); exit 0; }
22197 EOF
22198 chmod +x $CONFIG_STATUS
22199 ac_clean_files=$ac_clean_files_save
22200
22201 # configure is writing to config.log, and then calls config.status.
22202 # config.status does its own redirection, appending to config.log.
22203 # Unfortunately, on DOS this fails, as config.log is still kept open
22204 # by configure, so config.status won't be able to write to it; its
22205 # output is simply discarded.  So we exec the FD to /dev/null,
22206 # effectively closing config.log, so it can be properly (re)opened and
22207 # appended to by config.status.  When coming back to configure, we
22208 # need to make the FD available again.
22209 if test "$no_create" != yes; then
22210   ac_cs_success=:
22211   exec 5>/dev/null
22212   $SHELL $CONFIG_STATUS || ac_cs_success=false
22213   exec 5>>config.log
22214   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22215   # would make configure fail if this is the last instruction.
22216   $ac_cs_success || { (exit 1); exit 1; }
22217 fi
22218 ${MAKE:-make} preinstall