]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
3edb3708dd34a66dbd3b3c84cfdcae6fb55e2f3c
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.558 .
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 fi;
1371
1372 ###     Save the given $CFLAGS to allow user-override.
1373 cf_user_CFLAGS="$CFLAGS"
1374
1375 ###     Default install-location
1376
1377 echo "$as_me:1377: checking for prefix" >&5
1378 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1379 if test "x$prefix" = "xNONE" ; then
1380         case "$cf_cv_system_name" in
1381                 # non-vendor systems don't have a conflict
1382         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1383                 prefix=/usr
1384                 ;;
1385         *)      prefix=$ac_default_prefix
1386                 ;;
1387         esac
1388 fi
1389 echo "$as_me:1389: result: $prefix" >&5
1390 echo "${ECHO_T}$prefix" >&6
1391
1392 if test "x$prefix" = "xNONE" ; then
1393 echo "$as_me:1393: checking for default include-directory" >&5
1394 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1395 test -n "$verbose" && echo 1>&6
1396 for cf_symbol in \
1397         $includedir \
1398         $includedir/ncurses \
1399         $prefix/include \
1400         $prefix/include/ncurses \
1401         /usr/local/include \
1402         /usr/local/include/ncurses \
1403         /usr/include \
1404         /usr/include/ncurses
1405 do
1406         cf_dir=`eval echo $cf_symbol`
1407         if test -f $cf_dir/curses.h ; then
1408         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1409                 includedir="$cf_symbol"
1410                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1411                 break
1412         fi
1413         fi
1414         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1415 done
1416 echo "$as_me:1416: result: $includedir" >&5
1417 echo "${ECHO_T}$includedir" >&6
1418 fi
1419
1420 ###     Checks for programs.
1421
1422 # Check whether --with-ada or --without-ada was given.
1423 if test "${with_ada+set}" = set; then
1424   withval="$with_ada"
1425   cf_with_ada=$withval
1426 else
1427   cf_with_ada=yes
1428 fi;
1429 if test "x$cf_with_ada" = xyes
1430 then
1431         cf_PROG_CC="gnatgcc gcc cc"
1432 else
1433         cf_PROG_CC="gcc cc"
1434 fi
1435
1436 ac_ext=c
1437 ac_cpp='$CPP $CPPFLAGS'
1438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1441 ac_main_return=return
1442 if test -n "$ac_tool_prefix"; then
1443   for ac_prog in $cf_PROG_CC
1444   do
1445     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1446 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1447 echo "$as_me:1447: checking for $ac_word" >&5
1448 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1449 if test "${ac_cv_prog_CC+set}" = set; then
1450   echo $ECHO_N "(cached) $ECHO_C" >&6
1451 else
1452   if test -n "$CC"; then
1453   ac_cv_prog_CC="$CC" # Let the user override the test.
1454 else
1455   ac_save_IFS=$IFS; IFS=$ac_path_separator
1456 ac_dummy="$PATH"
1457 for ac_dir in $ac_dummy; do
1458   IFS=$ac_save_IFS
1459   test -z "$ac_dir" && ac_dir=.
1460   $as_executable_p "$ac_dir/$ac_word" || continue
1461 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1462 echo "$as_me:1462: found $ac_dir/$ac_word" >&5
1463 break
1464 done
1465
1466 fi
1467 fi
1468 CC=$ac_cv_prog_CC
1469 if test -n "$CC"; then
1470   echo "$as_me:1470: result: $CC" >&5
1471 echo "${ECHO_T}$CC" >&6
1472 else
1473   echo "$as_me:1473: result: no" >&5
1474 echo "${ECHO_T}no" >&6
1475 fi
1476
1477     test -n "$CC" && break
1478   done
1479 fi
1480 if test -z "$CC"; then
1481   ac_ct_CC=$CC
1482   for ac_prog in $cf_PROG_CC
1483 do
1484   # Extract the first word of "$ac_prog", so it can be a program name with args.
1485 set dummy $ac_prog; ac_word=$2
1486 echo "$as_me:1486: checking for $ac_word" >&5
1487 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1488 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1489   echo $ECHO_N "(cached) $ECHO_C" >&6
1490 else
1491   if test -n "$ac_ct_CC"; then
1492   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1493 else
1494   ac_save_IFS=$IFS; IFS=$ac_path_separator
1495 ac_dummy="$PATH"
1496 for ac_dir in $ac_dummy; do
1497   IFS=$ac_save_IFS
1498   test -z "$ac_dir" && ac_dir=.
1499   $as_executable_p "$ac_dir/$ac_word" || continue
1500 ac_cv_prog_ac_ct_CC="$ac_prog"
1501 echo "$as_me:1501: found $ac_dir/$ac_word" >&5
1502 break
1503 done
1504
1505 fi
1506 fi
1507 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1508 if test -n "$ac_ct_CC"; then
1509   echo "$as_me:1509: result: $ac_ct_CC" >&5
1510 echo "${ECHO_T}$ac_ct_CC" >&6
1511 else
1512   echo "$as_me:1512: result: no" >&5
1513 echo "${ECHO_T}no" >&6
1514 fi
1515
1516   test -n "$ac_ct_CC" && break
1517 done
1518
1519   CC=$ac_ct_CC
1520 fi
1521
1522 test -z "$CC" && { { echo "$as_me:1522: error: no acceptable cc found in \$PATH" >&5
1523 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 # Provide some information about the compiler.
1527 echo "$as_me:1527:" \
1528      "checking for C compiler version" >&5
1529 ac_compiler=`set X $ac_compile; echo $2`
1530 { (eval echo "$as_me:1530: \"$ac_compiler --version </dev/null >&5\"") >&5
1531   (eval $ac_compiler --version </dev/null >&5) 2>&5
1532   ac_status=$?
1533   echo "$as_me:1533: \$? = $ac_status" >&5
1534   (exit $ac_status); }
1535 { (eval echo "$as_me:1535: \"$ac_compiler -v </dev/null >&5\"") >&5
1536   (eval $ac_compiler -v </dev/null >&5) 2>&5
1537   ac_status=$?
1538   echo "$as_me:1538: \$? = $ac_status" >&5
1539   (exit $ac_status); }
1540 { (eval echo "$as_me:1540: \"$ac_compiler -V </dev/null >&5\"") >&5
1541   (eval $ac_compiler -V </dev/null >&5) 2>&5
1542   ac_status=$?
1543   echo "$as_me:1543: \$? = $ac_status" >&5
1544   (exit $ac_status); }
1545
1546 cat >conftest.$ac_ext <<_ACEOF
1547 #line 1547 "configure"
1548 #include "confdefs.h"
1549
1550 int
1551 main ()
1552 {
1553
1554   ;
1555   return 0;
1556 }
1557 _ACEOF
1558 ac_clean_files_save=$ac_clean_files
1559 ac_clean_files="$ac_clean_files a.out a.exe"
1560 # Try to create an executable without -o first, disregard a.out.
1561 # It will help us diagnose broken compilers, and finding out an intuition
1562 # of exeext.
1563 echo "$as_me:1563: checking for C compiler default output" >&5
1564 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1565 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1566 if { (eval echo "$as_me:1566: \"$ac_link_default\"") >&5
1567   (eval $ac_link_default) 2>&5
1568   ac_status=$?
1569   echo "$as_me:1569: \$? = $ac_status" >&5
1570   (exit $ac_status); }; then
1571   # Find the output, starting from the most likely.  This scheme is
1572 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1573 # resort.
1574 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1575                 ls a.out conftest 2>/dev/null;
1576                 ls a.* conftest.* 2>/dev/null`; do
1577   case $ac_file in
1578     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1579     a.out ) # We found the default executable, but exeext='' is most
1580             # certainly right.
1581             break;;
1582     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1583           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1584           export ac_cv_exeext
1585           break;;
1586     * ) break;;
1587   esac
1588 done
1589 else
1590   echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: C compiler cannot create executables" >&5
1593 echo "$as_me: error: C compiler cannot create executables" >&2;}
1594    { (exit 77); exit 77; }; }
1595 fi
1596
1597 ac_exeext=$ac_cv_exeext
1598 echo "$as_me:1598: result: $ac_file" >&5
1599 echo "${ECHO_T}$ac_file" >&6
1600
1601 # Check the compiler produces executables we can run.  If not, either
1602 # the compiler is broken, or we cross compile.
1603 echo "$as_me:1603: checking whether the C compiler works" >&5
1604 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1605 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1606 # If not cross compiling, check that we can run a simple program.
1607 if test "$cross_compiling" != yes; then
1608   if { ac_try='./$ac_file'
1609   { (eval echo "$as_me:1609: \"$ac_try\"") >&5
1610   (eval $ac_try) 2>&5
1611   ac_status=$?
1612   echo "$as_me:1612: \$? = $ac_status" >&5
1613   (exit $ac_status); }; }; then
1614     cross_compiling=no
1615   else
1616     if test "$cross_compiling" = maybe; then
1617         cross_compiling=yes
1618     else
1619         { { echo "$as_me:1619: error: cannot run C compiled programs.
1620 If you meant to cross compile, use \`--host'." >&5
1621 echo "$as_me: error: cannot run C compiled programs.
1622 If you meant to cross compile, use \`--host'." >&2;}
1623    { (exit 1); exit 1; }; }
1624     fi
1625   fi
1626 fi
1627 echo "$as_me:1627: result: yes" >&5
1628 echo "${ECHO_T}yes" >&6
1629
1630 rm -f a.out a.exe conftest$ac_cv_exeext
1631 ac_clean_files=$ac_clean_files_save
1632 # Check the compiler produces executables we can run.  If not, either
1633 # the compiler is broken, or we cross compile.
1634 echo "$as_me:1634: checking whether we are cross compiling" >&5
1635 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1636 echo "$as_me:1636: result: $cross_compiling" >&5
1637 echo "${ECHO_T}$cross_compiling" >&6
1638
1639 echo "$as_me:1639: checking for executable suffix" >&5
1640 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1641 if { (eval echo "$as_me:1641: \"$ac_link\"") >&5
1642   (eval $ac_link) 2>&5
1643   ac_status=$?
1644   echo "$as_me:1644: \$? = $ac_status" >&5
1645   (exit $ac_status); }; then
1646   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1647 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1648 # work properly (i.e., refer to `conftest.exe'), while it won't with
1649 # `rm'.
1650 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1651   case $ac_file in
1652     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1653     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1654           export ac_cv_exeext
1655           break;;
1656     * ) break;;
1657   esac
1658 done
1659 else
1660   { { echo "$as_me:1660: error: cannot compute EXEEXT: cannot compile and link" >&5
1661 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1662    { (exit 1); exit 1; }; }
1663 fi
1664
1665 rm -f conftest$ac_cv_exeext
1666 echo "$as_me:1666: result: $ac_cv_exeext" >&5
1667 echo "${ECHO_T}$ac_cv_exeext" >&6
1668
1669 rm -f conftest.$ac_ext
1670 EXEEXT=$ac_cv_exeext
1671 ac_exeext=$EXEEXT
1672 echo "$as_me:1672: checking for object suffix" >&5
1673 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1674 if test "${ac_cv_objext+set}" = set; then
1675   echo $ECHO_N "(cached) $ECHO_C" >&6
1676 else
1677   cat >conftest.$ac_ext <<_ACEOF
1678 #line 1678 "configure"
1679 #include "confdefs.h"
1680
1681 int
1682 main ()
1683 {
1684
1685   ;
1686   return 0;
1687 }
1688 _ACEOF
1689 rm -f conftest.o conftest.obj
1690 if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
1691   (eval $ac_compile) 2>&5
1692   ac_status=$?
1693   echo "$as_me:1693: \$? = $ac_status" >&5
1694   (exit $ac_status); }; then
1695   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1696   case $ac_file in
1697     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1698     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1699        break;;
1700   esac
1701 done
1702 else
1703   echo "$as_me: failed program was:" >&5
1704 cat conftest.$ac_ext >&5
1705 { { echo "$as_me:1705: error: cannot compute OBJEXT: cannot compile" >&5
1706 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1707    { (exit 1); exit 1; }; }
1708 fi
1709
1710 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1711 fi
1712 echo "$as_me:1712: result: $ac_cv_objext" >&5
1713 echo "${ECHO_T}$ac_cv_objext" >&6
1714 OBJEXT=$ac_cv_objext
1715 ac_objext=$OBJEXT
1716 echo "$as_me:1716: checking whether we are using the GNU C compiler" >&5
1717 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1718 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1719   echo $ECHO_N "(cached) $ECHO_C" >&6
1720 else
1721   cat >conftest.$ac_ext <<_ACEOF
1722 #line 1722 "configure"
1723 #include "confdefs.h"
1724
1725 int
1726 main ()
1727 {
1728 #ifndef __GNUC__
1729        choke me
1730 #endif
1731
1732   ;
1733   return 0;
1734 }
1735 _ACEOF
1736 rm -f conftest.$ac_objext
1737 if { (eval echo "$as_me:1737: \"$ac_compile\"") >&5
1738   (eval $ac_compile) 2>&5
1739   ac_status=$?
1740   echo "$as_me:1740: \$? = $ac_status" >&5
1741   (exit $ac_status); } &&
1742          { ac_try='test -s conftest.$ac_objext'
1743   { (eval echo "$as_me:1743: \"$ac_try\"") >&5
1744   (eval $ac_try) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); }; }; then
1748   ac_compiler_gnu=yes
1749 else
1750   echo "$as_me: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1752 ac_compiler_gnu=no
1753 fi
1754 rm -f conftest.$ac_objext conftest.$ac_ext
1755 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1756
1757 fi
1758 echo "$as_me:1758: result: $ac_cv_c_compiler_gnu" >&5
1759 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1760 GCC=`test $ac_compiler_gnu = yes && echo yes`
1761 ac_test_CFLAGS=${CFLAGS+set}
1762 ac_save_CFLAGS=$CFLAGS
1763 CFLAGS="-g"
1764 echo "$as_me:1764: checking whether $CC accepts -g" >&5
1765 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1766 if test "${ac_cv_prog_cc_g+set}" = set; then
1767   echo $ECHO_N "(cached) $ECHO_C" >&6
1768 else
1769   cat >conftest.$ac_ext <<_ACEOF
1770 #line 1770 "configure"
1771 #include "confdefs.h"
1772
1773 int
1774 main ()
1775 {
1776
1777   ;
1778   return 0;
1779 }
1780 _ACEOF
1781 rm -f conftest.$ac_objext
1782 if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
1783   (eval $ac_compile) 2>&5
1784   ac_status=$?
1785   echo "$as_me:1785: \$? = $ac_status" >&5
1786   (exit $ac_status); } &&
1787          { ac_try='test -s conftest.$ac_objext'
1788   { (eval echo "$as_me:1788: \"$ac_try\"") >&5
1789   (eval $ac_try) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); }; }; then
1793   ac_cv_prog_cc_g=yes
1794 else
1795   echo "$as_me: failed program was:" >&5
1796 cat conftest.$ac_ext >&5
1797 ac_cv_prog_cc_g=no
1798 fi
1799 rm -f conftest.$ac_objext conftest.$ac_ext
1800 fi
1801 echo "$as_me:1801: result: $ac_cv_prog_cc_g" >&5
1802 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1803 if test "$ac_test_CFLAGS" = set; then
1804   CFLAGS=$ac_save_CFLAGS
1805 elif test $ac_cv_prog_cc_g = yes; then
1806   if test "$GCC" = yes; then
1807     CFLAGS="-g -O2"
1808   else
1809     CFLAGS="-g"
1810   fi
1811 else
1812   if test "$GCC" = yes; then
1813     CFLAGS="-O2"
1814   else
1815     CFLAGS=
1816   fi
1817 fi
1818 # Some people use a C++ compiler to compile C.  Since we use `exit',
1819 # in C++ we need to declare it.  In case someone uses the same compiler
1820 # for both compiling C and C++ we need to have the C++ compiler decide
1821 # the declaration of exit, since it's the most demanding environment.
1822 cat >conftest.$ac_ext <<_ACEOF
1823 #ifndef __cplusplus
1824   choke me
1825 #endif
1826 _ACEOF
1827 rm -f conftest.$ac_objext
1828 if { (eval echo "$as_me:1828: \"$ac_compile\"") >&5
1829   (eval $ac_compile) 2>&5
1830   ac_status=$?
1831   echo "$as_me:1831: \$? = $ac_status" >&5
1832   (exit $ac_status); } &&
1833          { ac_try='test -s conftest.$ac_objext'
1834   { (eval echo "$as_me:1834: \"$ac_try\"") >&5
1835   (eval $ac_try) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); }; }; then
1839   for ac_declaration in \
1840    ''\
1841    '#include <stdlib.h>' \
1842    'extern "C" void std::exit (int) throw (); using std::exit;' \
1843    'extern "C" void std::exit (int); using std::exit;' \
1844    'extern "C" void exit (int) throw ();' \
1845    'extern "C" void exit (int);' \
1846    'void exit (int);'
1847 do
1848   cat >conftest.$ac_ext <<_ACEOF
1849 #line 1849 "configure"
1850 #include "confdefs.h"
1851 #include <stdlib.h>
1852 $ac_declaration
1853 int
1854 main ()
1855 {
1856 exit (42);
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.$ac_objext
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); } &&
1867          { ac_try='test -s conftest.$ac_objext'
1868   { (eval echo "$as_me:1868: \"$ac_try\"") >&5
1869   (eval $ac_try) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); }; }; then
1873   :
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 continue
1878 fi
1879 rm -f conftest.$ac_objext conftest.$ac_ext
1880   cat >conftest.$ac_ext <<_ACEOF
1881 #line 1881 "configure"
1882 #include "confdefs.h"
1883 $ac_declaration
1884 int
1885 main ()
1886 {
1887 exit (42);
1888   ;
1889   return 0;
1890 }
1891 _ACEOF
1892 rm -f conftest.$ac_objext
1893 if { (eval echo "$as_me:1893: \"$ac_compile\"") >&5
1894   (eval $ac_compile) 2>&5
1895   ac_status=$?
1896   echo "$as_me:1896: \$? = $ac_status" >&5
1897   (exit $ac_status); } &&
1898          { ac_try='test -s conftest.$ac_objext'
1899   { (eval echo "$as_me:1899: \"$ac_try\"") >&5
1900   (eval $ac_try) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); }; }; then
1904   break
1905 else
1906   echo "$as_me: failed program was:" >&5
1907 cat conftest.$ac_ext >&5
1908 fi
1909 rm -f conftest.$ac_objext conftest.$ac_ext
1910 done
1911 rm -rf conftest*
1912 if test -n "$ac_declaration"; then
1913   echo '#ifdef __cplusplus' >>confdefs.h
1914   echo $ac_declaration      >>confdefs.h
1915   echo '#endif'             >>confdefs.h
1916 fi
1917
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 ac_ext=c
1924 ac_cpp='$CPP $CPPFLAGS'
1925 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1928 ac_main_return=return
1929
1930 GCC_VERSION=none
1931 if test "$GCC" = yes ; then
1932         echo "$as_me:1932: checking version of $CC" >&5
1933 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1934         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.].*//'`"
1935         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1936         echo "$as_me:1936: result: $GCC_VERSION" >&5
1937 echo "${ECHO_T}$GCC_VERSION" >&6
1938 fi
1939
1940 echo "$as_me:1940: checking for $CC option to accept ANSI C" >&5
1941 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1942 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1943   echo $ECHO_N "(cached) $ECHO_C" >&6
1944 else
1945   ac_cv_prog_cc_stdc=no
1946 ac_save_CC=$CC
1947 cat >conftest.$ac_ext <<_ACEOF
1948 #line 1948 "configure"
1949 #include "confdefs.h"
1950 #include <stdarg.h>
1951 #include <stdio.h>
1952 #include <sys/types.h>
1953 #include <sys/stat.h>
1954 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1955 struct buf { int x; };
1956 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1957 static char *e (p, i)
1958      char **p;
1959      int i;
1960 {
1961   return p[i];
1962 }
1963 static char *f (char * (*g) (char **, int), char **p, ...)
1964 {
1965   char *s;
1966   va_list v;
1967   va_start (v,p);
1968   s = g (p, va_arg (v,int));
1969   va_end (v);
1970   return s;
1971 }
1972 int test (int i, double x);
1973 struct s1 {int (*f) (int a);};
1974 struct s2 {int (*f) (double a);};
1975 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1976 int argc;
1977 char **argv;
1978 int
1979 main ()
1980 {
1981 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1982   ;
1983   return 0;
1984 }
1985 _ACEOF
1986 # Don't try gcc -ansi; that turns off useful extensions and
1987 # breaks some systems' header files.
1988 # AIX                   -qlanglvl=ansi
1989 # Ultrix and OSF/1      -std1
1990 # HP-UX 10.20 and later -Ae
1991 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1992 # SVR4                  -Xc -D__EXTENSIONS__
1993 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1994 do
1995   CC="$ac_save_CC $ac_arg"
1996   rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   ac_cv_prog_cc_stdc=$ac_arg
2009 break
2010 else
2011   echo "$as_me: failed program was:" >&5
2012 cat conftest.$ac_ext >&5
2013 fi
2014 rm -f conftest.$ac_objext
2015 done
2016 rm -f conftest.$ac_ext conftest.$ac_objext
2017 CC=$ac_save_CC
2018
2019 fi
2020
2021 case "x$ac_cv_prog_cc_stdc" in
2022   x|xno)
2023     echo "$as_me:2023: result: none needed" >&5
2024 echo "${ECHO_T}none needed" >&6 ;;
2025   *)
2026     echo "$as_me:2026: result: $ac_cv_prog_cc_stdc" >&5
2027 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2028     CC="$CC $ac_cv_prog_cc_stdc" ;;
2029 esac
2030
2031 # This should have been defined by AC_PROG_CC
2032 : ${CC:=cc}
2033
2034 echo "$as_me:2034: checking \$CC variable" >&5
2035 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2036 case "$CC" in #(vi
2037 *[\ \   ]-[IUD]*)
2038         echo "$as_me:2038: result: broken" >&5
2039 echo "${ECHO_T}broken" >&6
2040         { echo "$as_me:2040: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2041 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2042         # humor him...
2043         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2044         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2045
2046 cf_fix_cppflags=no
2047 cf_new_cflags=
2048 cf_new_cppflags=
2049 cf_new_extra_cppflags=
2050
2051 for cf_add_cflags in $cf_flags
2052 do
2053 case $cf_fix_cppflags in
2054 no)
2055         case $cf_add_cflags in #(vi
2056         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2057                 case $cf_add_cflags in
2058                 -D*)
2059                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2060
2061                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2062                                 && test -z "${cf_tst_cflags}" \
2063                                 && cf_fix_cppflags=yes
2064
2065                         if test $cf_fix_cppflags = yes ; then
2066                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2067                                 continue
2068                         elif test "${cf_tst_cflags}" = "\"'" ; then
2069                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2070                                 continue
2071                         fi
2072                         ;;
2073                 esac
2074                 case "$CPPFLAGS" in
2075                 *$cf_add_cflags) #(vi
2076                         ;;
2077                 *) #(vi
2078                         case $cf_add_cflags in #(vi
2079                         -D*)
2080                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2081
2082 CPPFLAGS=`echo "$CPPFLAGS" | \
2083         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2084                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2085
2086                                 ;;
2087                         esac
2088                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2089                         ;;
2090                 esac
2091                 ;;
2092         *)
2093                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2094                 ;;
2095         esac
2096         ;;
2097 yes)
2098         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2099
2100         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2101
2102         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2103                 && test -z "${cf_tst_cflags}" \
2104                 && cf_fix_cppflags=no
2105         ;;
2106 esac
2107 done
2108
2109 if test -n "$cf_new_cflags" ; then
2110
2111         CFLAGS="$CFLAGS $cf_new_cflags"
2112 fi
2113
2114 if test -n "$cf_new_cppflags" ; then
2115
2116         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2117 fi
2118
2119 if test -n "$cf_new_extra_cppflags" ; then
2120
2121         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2122 fi
2123
2124         ;;
2125 *)
2126         echo "$as_me:2126: result: ok" >&5
2127 echo "${ECHO_T}ok" >&6
2128         ;;
2129 esac
2130
2131 ac_ext=c
2132 ac_cpp='$CPP $CPPFLAGS'
2133 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2134 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2135 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2136 ac_main_return=return
2137 echo "$as_me:2137: checking how to run the C preprocessor" >&5
2138 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2139 # On Suns, sometimes $CPP names a directory.
2140 if test -n "$CPP" && test -d "$CPP"; then
2141   CPP=
2142 fi
2143 if test -z "$CPP"; then
2144   if test "${ac_cv_prog_CPP+set}" = set; then
2145   echo $ECHO_N "(cached) $ECHO_C" >&6
2146 else
2147       # Double quotes because CPP needs to be expanded
2148     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2149     do
2150       ac_preproc_ok=false
2151 for ac_c_preproc_warn_flag in '' yes
2152 do
2153   # Use a header file that comes with gcc, so configuring glibc
2154   # with a fresh cross-compiler works.
2155   # On the NeXT, cc -E runs the code through the compiler's parser,
2156   # not just through cpp. "Syntax error" is here to catch this case.
2157   cat >conftest.$ac_ext <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160 #include <assert.h>
2161                      Syntax error
2162 _ACEOF
2163 if { (eval echo "$as_me:2163: \"$ac_cpp conftest.$ac_ext\"") >&5
2164   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2165   ac_status=$?
2166   egrep -v '^ *\+' conftest.er1 >conftest.err
2167   rm -f conftest.er1
2168   cat conftest.err >&5
2169   echo "$as_me:2169: \$? = $ac_status" >&5
2170   (exit $ac_status); } >/dev/null; then
2171   if test -s conftest.err; then
2172     ac_cpp_err=$ac_c_preproc_warn_flag
2173   else
2174     ac_cpp_err=
2175   fi
2176 else
2177   ac_cpp_err=yes
2178 fi
2179 if test -z "$ac_cpp_err"; then
2180   :
2181 else
2182   echo "$as_me: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   # Broken: fails on valid input.
2185 continue
2186 fi
2187 rm -f conftest.err conftest.$ac_ext
2188
2189   # OK, works on sane cases.  Now check whether non-existent headers
2190   # can be detected and how.
2191   cat >conftest.$ac_ext <<_ACEOF
2192 #line 2192 "configure"
2193 #include "confdefs.h"
2194 #include <ac_nonexistent.h>
2195 _ACEOF
2196 if { (eval echo "$as_me:2196: \"$ac_cpp conftest.$ac_ext\"") >&5
2197   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2198   ac_status=$?
2199   egrep -v '^ *\+' conftest.er1 >conftest.err
2200   rm -f conftest.er1
2201   cat conftest.err >&5
2202   echo "$as_me:2202: \$? = $ac_status" >&5
2203   (exit $ac_status); } >/dev/null; then
2204   if test -s conftest.err; then
2205     ac_cpp_err=$ac_c_preproc_warn_flag
2206   else
2207     ac_cpp_err=
2208   fi
2209 else
2210   ac_cpp_err=yes
2211 fi
2212 if test -z "$ac_cpp_err"; then
2213   # Broken: success on invalid input.
2214 continue
2215 else
2216   echo "$as_me: failed program was:" >&5
2217   cat conftest.$ac_ext >&5
2218   # Passes both tests.
2219 ac_preproc_ok=:
2220 break
2221 fi
2222 rm -f conftest.err conftest.$ac_ext
2223
2224 done
2225 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2226 rm -f conftest.err conftest.$ac_ext
2227 if $ac_preproc_ok; then
2228   break
2229 fi
2230
2231     done
2232     ac_cv_prog_CPP=$CPP
2233
2234 fi
2235   CPP=$ac_cv_prog_CPP
2236 else
2237   ac_cv_prog_CPP=$CPP
2238 fi
2239 echo "$as_me:2239: result: $CPP" >&5
2240 echo "${ECHO_T}$CPP" >&6
2241 ac_preproc_ok=false
2242 for ac_c_preproc_warn_flag in '' yes
2243 do
2244   # Use a header file that comes with gcc, so configuring glibc
2245   # with a fresh cross-compiler works.
2246   # On the NeXT, cc -E runs the code through the compiler's parser,
2247   # not just through cpp. "Syntax error" is here to catch this case.
2248   cat >conftest.$ac_ext <<_ACEOF
2249 #line 2249 "configure"
2250 #include "confdefs.h"
2251 #include <assert.h>
2252                      Syntax error
2253 _ACEOF
2254 if { (eval echo "$as_me:2254: \"$ac_cpp conftest.$ac_ext\"") >&5
2255   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2256   ac_status=$?
2257   egrep -v '^ *\+' conftest.er1 >conftest.err
2258   rm -f conftest.er1
2259   cat conftest.err >&5
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit $ac_status); } >/dev/null; then
2262   if test -s conftest.err; then
2263     ac_cpp_err=$ac_c_preproc_warn_flag
2264   else
2265     ac_cpp_err=
2266   fi
2267 else
2268   ac_cpp_err=yes
2269 fi
2270 if test -z "$ac_cpp_err"; then
2271   :
2272 else
2273   echo "$as_me: failed program was:" >&5
2274   cat conftest.$ac_ext >&5
2275   # Broken: fails on valid input.
2276 continue
2277 fi
2278 rm -f conftest.err conftest.$ac_ext
2279
2280   # OK, works on sane cases.  Now check whether non-existent headers
2281   # can be detected and how.
2282   cat >conftest.$ac_ext <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285 #include <ac_nonexistent.h>
2286 _ACEOF
2287 if { (eval echo "$as_me:2287: \"$ac_cpp conftest.$ac_ext\"") >&5
2288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2289   ac_status=$?
2290   egrep -v '^ *\+' conftest.er1 >conftest.err
2291   rm -f conftest.er1
2292   cat conftest.err >&5
2293   echo "$as_me:2293: \$? = $ac_status" >&5
2294   (exit $ac_status); } >/dev/null; then
2295   if test -s conftest.err; then
2296     ac_cpp_err=$ac_c_preproc_warn_flag
2297   else
2298     ac_cpp_err=
2299   fi
2300 else
2301   ac_cpp_err=yes
2302 fi
2303 if test -z "$ac_cpp_err"; then
2304   # Broken: success on invalid input.
2305 continue
2306 else
2307   echo "$as_me: failed program was:" >&5
2308   cat conftest.$ac_ext >&5
2309   # Passes both tests.
2310 ac_preproc_ok=:
2311 break
2312 fi
2313 rm -f conftest.err conftest.$ac_ext
2314
2315 done
2316 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2317 rm -f conftest.err conftest.$ac_ext
2318 if $ac_preproc_ok; then
2319   :
2320 else
2321   { { echo "$as_me:2321: error: C preprocessor \"$CPP\" fails sanity check" >&5
2322 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2323    { (exit 1); exit 1; }; }
2324 fi
2325
2326 ac_ext=c
2327 ac_cpp='$CPP $CPPFLAGS'
2328 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2329 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2330 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2331 ac_main_return=return
2332
2333 if test $ac_cv_c_compiler_gnu = yes; then
2334     echo "$as_me:2334: checking whether $CC needs -traditional" >&5
2335 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2336 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2337   echo $ECHO_N "(cached) $ECHO_C" >&6
2338 else
2339     ac_pattern="Autoconf.*'x'"
2340   cat >conftest.$ac_ext <<_ACEOF
2341 #line 2341 "configure"
2342 #include "confdefs.h"
2343 #include <sgtty.h>
2344 int Autoconf = TIOCGETP;
2345 _ACEOF
2346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2347   egrep "$ac_pattern" >/dev/null 2>&1; then
2348   ac_cv_prog_gcc_traditional=yes
2349 else
2350   ac_cv_prog_gcc_traditional=no
2351 fi
2352 rm -rf conftest*
2353
2354   if test $ac_cv_prog_gcc_traditional = no; then
2355     cat >conftest.$ac_ext <<_ACEOF
2356 #line 2356 "configure"
2357 #include "confdefs.h"
2358 #include <termio.h>
2359 int Autoconf = TCGETA;
2360 _ACEOF
2361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2362   egrep "$ac_pattern" >/dev/null 2>&1; then
2363   ac_cv_prog_gcc_traditional=yes
2364 fi
2365 rm -rf conftest*
2366
2367   fi
2368 fi
2369 echo "$as_me:2369: result: $ac_cv_prog_gcc_traditional" >&5
2370 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2371   if test $ac_cv_prog_gcc_traditional = yes; then
2372     CC="$CC -traditional"
2373   fi
2374 fi
2375
2376 echo "$as_me:2376: checking whether $CC understands -c and -o together" >&5
2377 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2378 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2379   echo $ECHO_N "(cached) $ECHO_C" >&6
2380 else
2381
2382 cat > conftest.$ac_ext <<CF_EOF
2383 #include <stdio.h>
2384 int main()
2385 {
2386         ${cf_cv_main_return:-return}(0);
2387 }
2388 CF_EOF
2389 # We do the test twice because some compilers refuse to overwrite an
2390 # existing .o file with -o, though they will create one.
2391 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2392 if { (eval echo "$as_me:2392: \"$ac_try\"") >&5
2393   (eval $ac_try) 2>&5
2394   ac_status=$?
2395   echo "$as_me:2395: \$? = $ac_status" >&5
2396   (exit $ac_status); } &&
2397   test -f conftest2.$ac_objext && { (eval echo "$as_me:2397: \"$ac_try\"") >&5
2398   (eval $ac_try) 2>&5
2399   ac_status=$?
2400   echo "$as_me:2400: \$? = $ac_status" >&5
2401   (exit $ac_status); };
2402 then
2403   eval cf_cv_prog_CC_c_o=yes
2404 else
2405   eval cf_cv_prog_CC_c_o=no
2406 fi
2407 rm -rf conftest*
2408
2409 fi
2410 if test $cf_cv_prog_CC_c_o = yes; then
2411   echo "$as_me:2411: result: yes" >&5
2412 echo "${ECHO_T}yes" >&6
2413 else
2414   echo "$as_me:2414: result: no" >&5
2415 echo "${ECHO_T}no" >&6
2416 fi
2417
2418 if test "$cross_compiling" = yes ; then
2419   LDCONFIG=:
2420 else
2421 case "$cf_cv_system_name" in #(vi
2422 dragonfly*|mirbsd*|freebsd*) #(vi
2423   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2424   ;;
2425 *) LDPATH=$PATH:/sbin:/usr/sbin
2426   # Extract the first word of "ldconfig", so it can be a program name with args.
2427 set dummy ldconfig; ac_word=$2
2428 echo "$as_me:2428: checking for $ac_word" >&5
2429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2430 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2431   echo $ECHO_N "(cached) $ECHO_C" >&6
2432 else
2433   case $LDCONFIG in
2434   [\\/]* | ?:[\\/]*)
2435   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2436   ;;
2437   *)
2438   ac_save_IFS=$IFS; IFS=$ac_path_separator
2439 ac_dummy="$LDPATH"
2440 for ac_dir in $ac_dummy; do
2441   IFS=$ac_save_IFS
2442   test -z "$ac_dir" && ac_dir=.
2443   if $as_executable_p "$ac_dir/$ac_word"; then
2444    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2445    echo "$as_me:2445: found $ac_dir/$ac_word" >&5
2446    break
2447 fi
2448 done
2449
2450   ;;
2451 esac
2452 fi
2453 LDCONFIG=$ac_cv_path_LDCONFIG
2454
2455 if test -n "$LDCONFIG"; then
2456   echo "$as_me:2456: result: $LDCONFIG" >&5
2457 echo "${ECHO_T}$LDCONFIG" >&6
2458 else
2459   echo "$as_me:2459: result: no" >&5
2460 echo "${ECHO_T}no" >&6
2461 fi
2462
2463   ;;
2464 esac
2465 fi
2466
2467 echo "$as_me:2467: checking if you want to ensure bool is consistent with C++" >&5
2468 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2469
2470 # Check whether --with-cxx or --without-cxx was given.
2471 if test "${with_cxx+set}" = set; then
2472   withval="$with_cxx"
2473   cf_with_cxx=$withval
2474 else
2475   cf_with_cxx=yes
2476 fi;
2477 echo "$as_me:2477: result: $cf_with_cxx" >&5
2478 echo "${ECHO_T}$cf_with_cxx" >&6
2479 if test "X$cf_with_cxx" = Xno ; then
2480         CXX=""
2481         GXX=""
2482 else
2483         # with autoconf 2.13, we can change the error to a warning:
2484                 ac_ext=cc
2485 ac_cpp='$CXXCPP $CPPFLAGS'
2486 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2487 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2488 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2489 ac_main_return=return
2490 if test -n "$ac_tool_prefix"; then
2491   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2492   do
2493     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2494 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2495 echo "$as_me:2495: checking for $ac_word" >&5
2496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2497 if test "${ac_cv_prog_CXX+set}" = set; then
2498   echo $ECHO_N "(cached) $ECHO_C" >&6
2499 else
2500   if test -n "$CXX"; then
2501   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2502 else
2503   ac_save_IFS=$IFS; IFS=$ac_path_separator
2504 ac_dummy="$PATH"
2505 for ac_dir in $ac_dummy; do
2506   IFS=$ac_save_IFS
2507   test -z "$ac_dir" && ac_dir=.
2508   $as_executable_p "$ac_dir/$ac_word" || continue
2509 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2510 echo "$as_me:2510: found $ac_dir/$ac_word" >&5
2511 break
2512 done
2513
2514 fi
2515 fi
2516 CXX=$ac_cv_prog_CXX
2517 if test -n "$CXX"; then
2518   echo "$as_me:2518: result: $CXX" >&5
2519 echo "${ECHO_T}$CXX" >&6
2520 else
2521   echo "$as_me:2521: result: no" >&5
2522 echo "${ECHO_T}no" >&6
2523 fi
2524
2525     test -n "$CXX" && break
2526   done
2527 fi
2528 if test -z "$CXX"; then
2529   ac_ct_CXX=$CXX
2530   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2531 do
2532   # Extract the first word of "$ac_prog", so it can be a program name with args.
2533 set dummy $ac_prog; ac_word=$2
2534 echo "$as_me:2534: checking for $ac_word" >&5
2535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2536 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2537   echo $ECHO_N "(cached) $ECHO_C" >&6
2538 else
2539   if test -n "$ac_ct_CXX"; then
2540   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2541 else
2542   ac_save_IFS=$IFS; IFS=$ac_path_separator
2543 ac_dummy="$PATH"
2544 for ac_dir in $ac_dummy; do
2545   IFS=$ac_save_IFS
2546   test -z "$ac_dir" && ac_dir=.
2547   $as_executable_p "$ac_dir/$ac_word" || continue
2548 ac_cv_prog_ac_ct_CXX="$ac_prog"
2549 echo "$as_me:2549: found $ac_dir/$ac_word" >&5
2550 break
2551 done
2552
2553 fi
2554 fi
2555 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2556 if test -n "$ac_ct_CXX"; then
2557   echo "$as_me:2557: result: $ac_ct_CXX" >&5
2558 echo "${ECHO_T}$ac_ct_CXX" >&6
2559 else
2560   echo "$as_me:2560: result: no" >&5
2561 echo "${ECHO_T}no" >&6
2562 fi
2563
2564   test -n "$ac_ct_CXX" && break
2565 done
2566 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2567
2568   CXX=$ac_ct_CXX
2569 fi
2570
2571 # Provide some information about the compiler.
2572 echo "$as_me:2572:" \
2573      "checking for C++ compiler version" >&5
2574 ac_compiler=`set X $ac_compile; echo $2`
2575 { (eval echo "$as_me:2575: \"$ac_compiler --version </dev/null >&5\"") >&5
2576   (eval $ac_compiler --version </dev/null >&5) 2>&5
2577   ac_status=$?
2578   echo "$as_me:2578: \$? = $ac_status" >&5
2579   (exit $ac_status); }
2580 { (eval echo "$as_me:2580: \"$ac_compiler -v </dev/null >&5\"") >&5
2581   (eval $ac_compiler -v </dev/null >&5) 2>&5
2582   ac_status=$?
2583   echo "$as_me:2583: \$? = $ac_status" >&5
2584   (exit $ac_status); }
2585 { (eval echo "$as_me:2585: \"$ac_compiler -V </dev/null >&5\"") >&5
2586   (eval $ac_compiler -V </dev/null >&5) 2>&5
2587   ac_status=$?
2588   echo "$as_me:2588: \$? = $ac_status" >&5
2589   (exit $ac_status); }
2590
2591 echo "$as_me:2591: checking whether we are using the GNU C++ compiler" >&5
2592 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2593 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2594   echo $ECHO_N "(cached) $ECHO_C" >&6
2595 else
2596   cat >conftest.$ac_ext <<_ACEOF
2597 #line 2597 "configure"
2598 #include "confdefs.h"
2599
2600 int
2601 main ()
2602 {
2603 #ifndef __GNUC__
2604        choke me
2605 #endif
2606
2607   ;
2608   return 0;
2609 }
2610 _ACEOF
2611 rm -f conftest.$ac_objext
2612 if { (eval echo "$as_me:2612: \"$ac_compile\"") >&5
2613   (eval $ac_compile) 2>&5
2614   ac_status=$?
2615   echo "$as_me:2615: \$? = $ac_status" >&5
2616   (exit $ac_status); } &&
2617          { ac_try='test -s conftest.$ac_objext'
2618   { (eval echo "$as_me:2618: \"$ac_try\"") >&5
2619   (eval $ac_try) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); }; }; then
2623   ac_compiler_gnu=yes
2624 else
2625   echo "$as_me: failed program was:" >&5
2626 cat conftest.$ac_ext >&5
2627 ac_compiler_gnu=no
2628 fi
2629 rm -f conftest.$ac_objext conftest.$ac_ext
2630 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2631
2632 fi
2633 echo "$as_me:2633: result: $ac_cv_cxx_compiler_gnu" >&5
2634 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2635 GXX=`test $ac_compiler_gnu = yes && echo yes`
2636 ac_test_CXXFLAGS=${CXXFLAGS+set}
2637 ac_save_CXXFLAGS=$CXXFLAGS
2638 CXXFLAGS="-g"
2639 echo "$as_me:2639: checking whether $CXX accepts -g" >&5
2640 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2641 if test "${ac_cv_prog_cxx_g+set}" = set; then
2642   echo $ECHO_N "(cached) $ECHO_C" >&6
2643 else
2644   cat >conftest.$ac_ext <<_ACEOF
2645 #line 2645 "configure"
2646 #include "confdefs.h"
2647
2648 int
2649 main ()
2650 {
2651
2652   ;
2653   return 0;
2654 }
2655 _ACEOF
2656 rm -f conftest.$ac_objext
2657 if { (eval echo "$as_me:2657: \"$ac_compile\"") >&5
2658   (eval $ac_compile) 2>&5
2659   ac_status=$?
2660   echo "$as_me:2660: \$? = $ac_status" >&5
2661   (exit $ac_status); } &&
2662          { ac_try='test -s conftest.$ac_objext'
2663   { (eval echo "$as_me:2663: \"$ac_try\"") >&5
2664   (eval $ac_try) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); }; }; then
2668   ac_cv_prog_cxx_g=yes
2669 else
2670   echo "$as_me: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2672 ac_cv_prog_cxx_g=no
2673 fi
2674 rm -f conftest.$ac_objext conftest.$ac_ext
2675 fi
2676 echo "$as_me:2676: result: $ac_cv_prog_cxx_g" >&5
2677 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2678 if test "$ac_test_CXXFLAGS" = set; then
2679   CXXFLAGS=$ac_save_CXXFLAGS
2680 elif test $ac_cv_prog_cxx_g = yes; then
2681   if test "$GXX" = yes; then
2682     CXXFLAGS="-g -O2"
2683   else
2684     CXXFLAGS="-g"
2685   fi
2686 else
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-O2"
2689   else
2690     CXXFLAGS=
2691   fi
2692 fi
2693 for ac_declaration in \
2694    ''\
2695    '#include <stdlib.h>' \
2696    'extern "C" void std::exit (int) throw (); using std::exit;' \
2697    'extern "C" void std::exit (int); using std::exit;' \
2698    'extern "C" void exit (int) throw ();' \
2699    'extern "C" void exit (int);' \
2700    'void exit (int);'
2701 do
2702   cat >conftest.$ac_ext <<_ACEOF
2703 #line 2703 "configure"
2704 #include "confdefs.h"
2705 #include <stdlib.h>
2706 $ac_declaration
2707 int
2708 main ()
2709 {
2710 exit (42);
2711   ;
2712   return 0;
2713 }
2714 _ACEOF
2715 rm -f conftest.$ac_objext
2716 if { (eval echo "$as_me:2716: \"$ac_compile\"") >&5
2717   (eval $ac_compile) 2>&5
2718   ac_status=$?
2719   echo "$as_me:2719: \$? = $ac_status" >&5
2720   (exit $ac_status); } &&
2721          { ac_try='test -s conftest.$ac_objext'
2722   { (eval echo "$as_me:2722: \"$ac_try\"") >&5
2723   (eval $ac_try) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); }; }; then
2727   :
2728 else
2729   echo "$as_me: failed program was:" >&5
2730 cat conftest.$ac_ext >&5
2731 continue
2732 fi
2733 rm -f conftest.$ac_objext conftest.$ac_ext
2734   cat >conftest.$ac_ext <<_ACEOF
2735 #line 2735 "configure"
2736 #include "confdefs.h"
2737 $ac_declaration
2738 int
2739 main ()
2740 {
2741 exit (42);
2742   ;
2743   return 0;
2744 }
2745 _ACEOF
2746 rm -f conftest.$ac_objext
2747 if { (eval echo "$as_me:2747: \"$ac_compile\"") >&5
2748   (eval $ac_compile) 2>&5
2749   ac_status=$?
2750   echo "$as_me:2750: \$? = $ac_status" >&5
2751   (exit $ac_status); } &&
2752          { ac_try='test -s conftest.$ac_objext'
2753   { (eval echo "$as_me:2753: \"$ac_try\"") >&5
2754   (eval $ac_try) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); }; }; then
2758   break
2759 else
2760   echo "$as_me: failed program was:" >&5
2761 cat conftest.$ac_ext >&5
2762 fi
2763 rm -f conftest.$ac_objext conftest.$ac_ext
2764 done
2765 rm -rf conftest*
2766 if test -n "$ac_declaration"; then
2767   echo '#ifdef __cplusplus' >>confdefs.h
2768   echo $ac_declaration      >>confdefs.h
2769   echo '#endif'             >>confdefs.h
2770 fi
2771
2772 ac_ext=c
2773 ac_cpp='$CPP $CPPFLAGS'
2774 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2775 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2776 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2777 ac_main_return=return
2778
2779                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2780         if test "$CXX" = "g++" ; then
2781                 # Extract the first word of "g++", so it can be a program name with args.
2782 set dummy g++; ac_word=$2
2783 echo "$as_me:2783: checking for $ac_word" >&5
2784 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2785 if test "${ac_cv_path_CXX+set}" = set; then
2786   echo $ECHO_N "(cached) $ECHO_C" >&6
2787 else
2788   case $CXX in
2789   [\\/]* | ?:[\\/]*)
2790   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2791   ;;
2792   *)
2793   ac_save_IFS=$IFS; IFS=$ac_path_separator
2794 ac_dummy="$PATH"
2795 for ac_dir in $ac_dummy; do
2796   IFS=$ac_save_IFS
2797   test -z "$ac_dir" && ac_dir=.
2798   if $as_executable_p "$ac_dir/$ac_word"; then
2799    ac_cv_path_CXX="$ac_dir/$ac_word"
2800    echo "$as_me:2800: found $ac_dir/$ac_word" >&5
2801    break
2802 fi
2803 done
2804
2805   ;;
2806 esac
2807 fi
2808 CXX=$ac_cv_path_CXX
2809
2810 if test -n "$CXX"; then
2811   echo "$as_me:2811: result: $CXX" >&5
2812 echo "${ECHO_T}$CXX" >&6
2813 else
2814   echo "$as_me:2814: result: no" >&5
2815 echo "${ECHO_T}no" >&6
2816 fi
2817
2818         fi
2819         case "x$CXX" in #(vi
2820         x|xg++)
2821                 { echo "$as_me:2821: WARNING: You don't have any C++ compiler, too bad" >&5
2822 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2823                 cf_with_cxx=no; CXX=""; GXX="";
2824                 ;;
2825         esac
2826 fi
2827
2828 GXX_VERSION=none
2829 if test "$GXX" = yes; then
2830         echo "$as_me:2830: checking version of ${CXX:-g++}" >&5
2831 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2832         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2833         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2834         echo "$as_me:2834: result: $GXX_VERSION" >&5
2835 echo "${ECHO_T}$GXX_VERSION" >&6
2836 fi
2837
2838 case $GXX_VERSION in
2839 1*|2.[0-6]*)
2840         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2841         # cf_cxx_library=no
2842         { echo "$as_me:2842: WARNING: templates do not work" >&5
2843 echo "$as_me: WARNING: templates do not work" >&2;}
2844         ;;
2845 esac
2846
2847 echo "$as_me:2847: checking if you want to build C++ binding and demo" >&5
2848 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2851 if test "${with_cxx_binding+set}" = set; then
2852   withval="$with_cxx_binding"
2853   cf_with_cxx_binding=$withval
2854 else
2855   cf_with_cxx_binding=$cf_with_cxx
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx_binding" >&5
2858 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2859
2860 echo "$as_me:2860: checking if you want to build with Ada95" >&5
2861 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2862 echo "$as_me:2862: result: $cf_with_ada" >&5
2863 echo "${ECHO_T}$cf_with_ada" >&6
2864
2865 echo "$as_me:2865: checking if you want to install manpages" >&5
2866 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2867
2868 # Check whether --with-manpages or --without-manpages was given.
2869 if test "${with_manpages+set}" = set; then
2870   withval="$with_manpages"
2871   cf_with_manpages=$withval
2872 else
2873   cf_with_manpages=yes
2874 fi;
2875 echo "$as_me:2875: result: $cf_with_manpages" >&5
2876 echo "${ECHO_T}$cf_with_manpages" >&6
2877
2878 echo "$as_me:2878: checking if you want to build programs such as tic" >&5
2879 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2880
2881 # Check whether --with-progs or --without-progs was given.
2882 if test "${with_progs+set}" = set; then
2883   withval="$with_progs"
2884   cf_with_progs=$withval
2885 else
2886   cf_with_progs=yes
2887 fi;
2888 echo "$as_me:2888: result: $cf_with_progs" >&5
2889 echo "${ECHO_T}$cf_with_progs" >&6
2890
2891 echo "$as_me:2891: checking if you want to build test-programs" >&5
2892 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2893
2894 # Check whether --with-tests or --without-tests was given.
2895 if test "${with_tests+set}" = set; then
2896   withval="$with_tests"
2897   cf_with_tests=$withval
2898 else
2899   cf_with_tests=yes
2900 fi;
2901 echo "$as_me:2901: result: $cf_with_tests" >&5
2902 echo "${ECHO_T}$cf_with_tests" >&6
2903
2904 echo "$as_me:2904: checking if you wish to install curses.h" >&5
2905 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2906
2907 # Check whether --with-curses-h or --without-curses-h was given.
2908 if test "${with_curses_h+set}" = set; then
2909   withval="$with_curses_h"
2910   with_curses_h=$withval
2911 else
2912   with_curses_h=yes
2913 fi;
2914 echo "$as_me:2914: result: $with_curses_h" >&5
2915 echo "${ECHO_T}$with_curses_h" >&6
2916
2917 modules_to_build="ncurses"
2918 if test "X$cf_with_progs" != Xno ; then
2919 modules_to_build="$modules_to_build progs tack"
2920 fi
2921 modules_to_build="$modules_to_build panel menu form"
2922
2923 test "$program_prefix" != NONE &&
2924   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2925 # Use a double $ so make ignores it.
2926 test "$program_suffix" != NONE &&
2927   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2928 # Double any \ or $.  echo might interpret backslashes.
2929 # By default was `s,x,x', remove it if useless.
2930 cat <<\_ACEOF >conftest.sed
2931 s/[\\$]/&&/g;s/;s,x,x,$//
2932 _ACEOF
2933 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2934 rm conftest.sed
2935
2936 for ac_prog in mawk gawk nawk awk
2937 do
2938   # Extract the first word of "$ac_prog", so it can be a program name with args.
2939 set dummy $ac_prog; ac_word=$2
2940 echo "$as_me:2940: checking for $ac_word" >&5
2941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2942 if test "${ac_cv_prog_AWK+set}" = set; then
2943   echo $ECHO_N "(cached) $ECHO_C" >&6
2944 else
2945   if test -n "$AWK"; then
2946   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2947 else
2948   ac_save_IFS=$IFS; IFS=$ac_path_separator
2949 ac_dummy="$PATH"
2950 for ac_dir in $ac_dummy; do
2951   IFS=$ac_save_IFS
2952   test -z "$ac_dir" && ac_dir=.
2953   $as_executable_p "$ac_dir/$ac_word" || continue
2954 ac_cv_prog_AWK="$ac_prog"
2955 echo "$as_me:2955: found $ac_dir/$ac_word" >&5
2956 break
2957 done
2958
2959 fi
2960 fi
2961 AWK=$ac_cv_prog_AWK
2962 if test -n "$AWK"; then
2963   echo "$as_me:2963: result: $AWK" >&5
2964 echo "${ECHO_T}$AWK" >&6
2965 else
2966   echo "$as_me:2966: result: no" >&5
2967 echo "${ECHO_T}no" >&6
2968 fi
2969
2970   test -n "$AWK" && break
2971 done
2972
2973 test -z "$AWK" && { { echo "$as_me:2973: error: No awk program found" >&5
2974 echo "$as_me: error: No awk program found" >&2;}
2975    { (exit 1); exit 1; }; }
2976
2977 echo "$as_me:2977: checking for egrep" >&5
2978 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2979 if test "${ac_cv_prog_egrep+set}" = set; then
2980   echo $ECHO_N "(cached) $ECHO_C" >&6
2981 else
2982   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2983     then ac_cv_prog_egrep='grep -E'
2984     else ac_cv_prog_egrep='egrep'
2985     fi
2986 fi
2987 echo "$as_me:2987: result: $ac_cv_prog_egrep" >&5
2988 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2989  EGREP=$ac_cv_prog_egrep
2990
2991 test -z "$EGREP" && { { echo "$as_me:2991: error: No egrep program found" >&5
2992 echo "$as_me: error: No egrep program found" >&2;}
2993    { (exit 1); exit 1; }; }
2994
2995 # Find a good install program.  We prefer a C program (faster),
2996 # so one script is as good as another.  But avoid the broken or
2997 # incompatible versions:
2998 # SysV /etc/install, /usr/sbin/install
2999 # SunOS /usr/etc/install
3000 # IRIX /sbin/install
3001 # AIX /bin/install
3002 # AmigaOS /C/install, which installs bootblocks on floppy discs
3003 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3004 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3005 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3006 # ./install, which can be erroneously created by make from ./install.sh.
3007 echo "$as_me:3007: checking for a BSD compatible install" >&5
3008 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3009 if test -z "$INSTALL"; then
3010 if test "${ac_cv_path_install+set}" = set; then
3011   echo $ECHO_N "(cached) $ECHO_C" >&6
3012 else
3013     ac_save_IFS=$IFS; IFS=$ac_path_separator
3014   for ac_dir in $PATH; do
3015     IFS=$ac_save_IFS
3016     # Account for people who put trailing slashes in PATH elements.
3017     case $ac_dir/ in
3018     / | ./ | .// | /cC/* \
3019     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3020     | /usr/ucb/* ) ;;
3021     *)
3022       # OSF1 and SCO ODT 3.0 have their own names for install.
3023       # Don't use installbsd from OSF since it installs stuff as root
3024       # by default.
3025       for ac_prog in ginstall scoinst install; do
3026         if $as_executable_p "$ac_dir/$ac_prog"; then
3027           if test $ac_prog = install &&
3028             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3029             # AIX install.  It has an incompatible calling convention.
3030             :
3031           elif test $ac_prog = install &&
3032             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3033             # program-specific install script used by HP pwplus--don't use.
3034             :
3035           else
3036             ac_cv_path_install="$ac_dir/$ac_prog -c"
3037             break 2
3038           fi
3039         fi
3040       done
3041       ;;
3042     esac
3043   done
3044
3045 fi
3046   if test "${ac_cv_path_install+set}" = set; then
3047     INSTALL=$ac_cv_path_install
3048   else
3049     # As a last resort, use the slow shell script.  We don't cache a
3050     # path for INSTALL within a source directory, because that will
3051     # break other packages using the cache if that directory is
3052     # removed, or if the path is relative.
3053     INSTALL=$ac_install_sh
3054   fi
3055 fi
3056 echo "$as_me:3056: result: $INSTALL" >&5
3057 echo "${ECHO_T}$INSTALL" >&6
3058
3059 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3060 # It thinks the first close brace ends the variable substitution.
3061 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3062
3063 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3064
3065 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3066
3067 case $INSTALL in
3068 /*)
3069   ;;
3070 *)
3071   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3072   test -z "$cf_dir" && cf_dir=.
3073   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3074   ;;
3075 esac
3076
3077 for ac_prog in tdlint lint alint splint lclint
3078 do
3079   # Extract the first word of "$ac_prog", so it can be a program name with args.
3080 set dummy $ac_prog; ac_word=$2
3081 echo "$as_me:3081: checking for $ac_word" >&5
3082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3083 if test "${ac_cv_prog_LINT+set}" = set; then
3084   echo $ECHO_N "(cached) $ECHO_C" >&6
3085 else
3086   if test -n "$LINT"; then
3087   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3088 else
3089   ac_save_IFS=$IFS; IFS=$ac_path_separator
3090 ac_dummy="$PATH"
3091 for ac_dir in $ac_dummy; do
3092   IFS=$ac_save_IFS
3093   test -z "$ac_dir" && ac_dir=.
3094   $as_executable_p "$ac_dir/$ac_word" || continue
3095 ac_cv_prog_LINT="$ac_prog"
3096 echo "$as_me:3096: found $ac_dir/$ac_word" >&5
3097 break
3098 done
3099
3100 fi
3101 fi
3102 LINT=$ac_cv_prog_LINT
3103 if test -n "$LINT"; then
3104   echo "$as_me:3104: result: $LINT" >&5
3105 echo "${ECHO_T}$LINT" >&6
3106 else
3107   echo "$as_me:3107: result: no" >&5
3108 echo "${ECHO_T}no" >&6
3109 fi
3110
3111   test -n "$LINT" && break
3112 done
3113
3114 echo "$as_me:3114: checking whether ln -s works" >&5
3115 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3116 LN_S=$as_ln_s
3117 if test "$LN_S" = "ln -s"; then
3118   echo "$as_me:3118: result: yes" >&5
3119 echo "${ECHO_T}yes" >&6
3120 else
3121   echo "$as_me:3121: result: no, using $LN_S" >&5
3122 echo "${ECHO_T}no, using $LN_S" >&6
3123 fi
3124
3125 echo "$as_me:3125: checking if $LN_S -f options work" >&5
3126 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3127
3128 rm -f conf$$.src conf$$dst
3129 echo >conf$$.dst
3130 echo first >conf$$.src
3131 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3132         cf_prog_ln_sf=yes
3133 else
3134         cf_prog_ln_sf=no
3135 fi
3136 rm -f conf$$.dst conf$$src
3137 echo "$as_me:3137: result: $cf_prog_ln_sf" >&5
3138 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3139
3140 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3141
3142 echo "$as_me:3142: checking for long file names" >&5
3143 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3144 if test "${ac_cv_sys_long_file_names+set}" = set; then
3145   echo $ECHO_N "(cached) $ECHO_C" >&6
3146 else
3147   ac_cv_sys_long_file_names=yes
3148 # Test for long file names in all the places we know might matter:
3149 #      .                the current directory, where building will happen
3150 #      $prefix/lib      where we will be installing things
3151 #      $exec_prefix/lib likewise
3152 # eval it to expand exec_prefix.
3153 #      $TMPDIR          if set, where it might want to write temporary files
3154 # if $TMPDIR is not set:
3155 #      /tmp             where it might want to write temporary files
3156 #      /var/tmp         likewise
3157 #      /usr/tmp         likewise
3158 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3159   ac_tmpdirs=$TMPDIR
3160 else
3161   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3162 fi
3163 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3164   test -d $ac_dir || continue
3165   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3166   ac_xdir=$ac_dir/cf$$
3167   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3168   ac_tf1=$ac_xdir/conftest9012345
3169   ac_tf2=$ac_xdir/conftest9012346
3170   (echo 1 >$ac_tf1) 2>/dev/null
3171   (echo 2 >$ac_tf2) 2>/dev/null
3172   ac_val=`cat $ac_tf1 2>/dev/null`
3173   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3174     ac_cv_sys_long_file_names=no
3175     rm -rf $ac_xdir 2>/dev/null
3176     break
3177   fi
3178   rm -rf $ac_xdir 2>/dev/null
3179 done
3180 fi
3181 echo "$as_me:3181: result: $ac_cv_sys_long_file_names" >&5
3182 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3183 if test $ac_cv_sys_long_file_names = yes; then
3184
3185 cat >>confdefs.h <<\EOF
3186 #define HAVE_LONG_FILE_NAMES 1
3187 EOF
3188
3189 fi
3190
3191 # if we find pkg-config, check if we should install the ".pc" files.
3192
3193 echo "$as_me:3193: checking if you want to use pkg-config" >&5
3194 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3195
3196 # Check whether --with-pkg-config or --without-pkg-config was given.
3197 if test "${with_pkg_config+set}" = set; then
3198   withval="$with_pkg_config"
3199   cf_pkg_config=$withval
3200 else
3201   cf_pkg_config=yes
3202 fi;
3203 echo "$as_me:3203: result: $cf_pkg_config" >&5
3204 echo "${ECHO_T}$cf_pkg_config" >&6
3205
3206 case $cf_pkg_config in #(vi
3207 no) #(vi
3208         PKG_CONFIG=none
3209         ;;
3210 yes) #(vi
3211
3212 if test -n "$ac_tool_prefix"; then
3213   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3214 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3215 echo "$as_me:3215: checking for $ac_word" >&5
3216 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3217 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3218   echo $ECHO_N "(cached) $ECHO_C" >&6
3219 else
3220   case $PKG_CONFIG in
3221   [\\/]* | ?:[\\/]*)
3222   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3223   ;;
3224   *)
3225   ac_save_IFS=$IFS; IFS=$ac_path_separator
3226 ac_dummy="$PATH"
3227 for ac_dir in $ac_dummy; do
3228   IFS=$ac_save_IFS
3229   test -z "$ac_dir" && ac_dir=.
3230   if $as_executable_p "$ac_dir/$ac_word"; then
3231    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3232    echo "$as_me:3232: found $ac_dir/$ac_word" >&5
3233    break
3234 fi
3235 done
3236
3237   ;;
3238 esac
3239 fi
3240 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3241
3242 if test -n "$PKG_CONFIG"; then
3243   echo "$as_me:3243: result: $PKG_CONFIG" >&5
3244 echo "${ECHO_T}$PKG_CONFIG" >&6
3245 else
3246   echo "$as_me:3246: result: no" >&5
3247 echo "${ECHO_T}no" >&6
3248 fi
3249
3250 fi
3251 if test -z "$ac_cv_path_PKG_CONFIG"; then
3252   ac_pt_PKG_CONFIG=$PKG_CONFIG
3253   # Extract the first word of "pkg-config", so it can be a program name with args.
3254 set dummy pkg-config; ac_word=$2
3255 echo "$as_me:3255: checking for $ac_word" >&5
3256 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3257 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3258   echo $ECHO_N "(cached) $ECHO_C" >&6
3259 else
3260   case $ac_pt_PKG_CONFIG in
3261   [\\/]* | ?:[\\/]*)
3262   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3263   ;;
3264   *)
3265   ac_save_IFS=$IFS; IFS=$ac_path_separator
3266 ac_dummy="$PATH"
3267 for ac_dir in $ac_dummy; do
3268   IFS=$ac_save_IFS
3269   test -z "$ac_dir" && ac_dir=.
3270   if $as_executable_p "$ac_dir/$ac_word"; then
3271    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3272    echo "$as_me:3272: found $ac_dir/$ac_word" >&5
3273    break
3274 fi
3275 done
3276
3277   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3278   ;;
3279 esac
3280 fi
3281 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3282
3283 if test -n "$ac_pt_PKG_CONFIG"; then
3284   echo "$as_me:3284: result: $ac_pt_PKG_CONFIG" >&5
3285 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3286 else
3287   echo "$as_me:3287: result: no" >&5
3288 echo "${ECHO_T}no" >&6
3289 fi
3290
3291   PKG_CONFIG=$ac_pt_PKG_CONFIG
3292 else
3293   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3294 fi
3295
3296         ;;
3297 *)
3298         PKG_CONFIG=$withval
3299         ;;
3300 esac
3301
3302 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3303 if test "$PKG_CONFIG" != none ; then
3304
3305 if test "x$prefix" != xNONE; then
3306   cf_path_syntax="$prefix"
3307 else
3308   cf_path_syntax="$ac_default_prefix"
3309 fi
3310
3311 case ".$PKG_CONFIG" in #(vi
3312 .\$\(*\)*|.\'*\'*) #(vi
3313   ;;
3314 ..|./*|.\\*) #(vi
3315   ;;
3316 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3317   ;;
3318 .\${*prefix}*|.\${*dir}*) #(vi
3319   eval PKG_CONFIG="$PKG_CONFIG"
3320   case ".$PKG_CONFIG" in #(vi
3321   .NONE/*)
3322     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3323     ;;
3324   esac
3325   ;; #(vi
3326 .no|.NONE/*)
3327   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3328   ;;
3329 *)
3330   { { echo "$as_me:3330: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3331 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3332    { (exit 1); exit 1; }; }
3333   ;;
3334 esac
3335
3336 fi
3337
3338 if test "$PKG_CONFIG" != none ; then
3339         echo "$as_me:3339: checking for $PKG_CONFIG library directory" >&5
3340 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3341
3342 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3343 if test "${with_pkg_config_libdir+set}" = set; then
3344   withval="$with_pkg_config_libdir"
3345   PKG_CONFIG_LIBDIR=$withval
3346 else
3347   PKG_CONFIG_LIBDIR=yes
3348 fi;
3349
3350         case x$PKG_CONFIG_LIBDIR in #(vi
3351         x/*) #(vi
3352                 ;;
3353         xyes) #(vi
3354                 # look for the library directory using the same prefix as the executable
3355                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3356                 case x`(arch) 2>/dev/null` in #(vi
3357                 *64) #(vi
3358                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3359                         do
3360                                 if test -d $cf_config/pkgconfig
3361                                 then
3362                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3363                                         break
3364                                 fi
3365                         done
3366                         ;;
3367                 *)
3368                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3369                         ;;
3370                 esac
3371                 ;;
3372         *)
3373                 ;;
3374         esac
3375
3376         echo "$as_me:3376: result: $PKG_CONFIG_LIBDIR" >&5
3377 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3378 fi
3379
3380 if test "$PKG_CONFIG" != none ; then
3381         echo "$as_me:3381: checking if we should install .pc files for $PKG_CONFIG" >&5
3382 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3383
3384 # Check whether --enable-pc-files or --disable-pc-files was given.
3385 if test "${enable_pc_files+set}" = set; then
3386   enableval="$enable_pc_files"
3387   enable_pc_files=$enableval
3388 else
3389   enable_pc_files=no
3390 fi;
3391         echo "$as_me:3391: result: $enable_pc_files" >&5
3392 echo "${ECHO_T}$enable_pc_files" >&6
3393         if test "$enable_pc_files" != no
3394         then
3395
3396 if test "x$prefix" != xNONE; then
3397   cf_path_syntax="$prefix"
3398 else
3399   cf_path_syntax="$ac_default_prefix"
3400 fi
3401
3402 case ".$PKG_CONFIG_LIBDIR" in #(vi
3403 .\$\(*\)*|.\'*\'*) #(vi
3404   ;;
3405 ..|./*|.\\*) #(vi
3406   ;;
3407 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3408   ;;
3409 .\${*prefix}*|.\${*dir}*) #(vi
3410   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3411   case ".$PKG_CONFIG_LIBDIR" in #(vi
3412   .NONE/*)
3413     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3414     ;;
3415   esac
3416   ;; #(vi
3417 .no|.NONE/*)
3418   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3419   ;;
3420 *)
3421   { { echo "$as_me:3421: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3422 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3423    { (exit 1); exit 1; }; }
3424   ;;
3425 esac
3426
3427         fi
3428 else
3429         enable_pc_files=no
3430 fi
3431
3432 echo "$as_me:3432: checking if we should assume mixed-case filenames" >&5
3433 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3434
3435 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3436 if test "${enable_mixed_case+set}" = set; then
3437   enableval="$enable_mixed_case"
3438   enable_mixedcase=$enableval
3439 else
3440   enable_mixedcase=auto
3441 fi;
3442 echo "$as_me:3442: result: $enable_mixedcase" >&5
3443 echo "${ECHO_T}$enable_mixedcase" >&6
3444 if test "$enable_mixedcase" = "auto" ; then
3445
3446 echo "$as_me:3446: checking if filesystem supports mixed-case filenames" >&5
3447 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3448 if test "${cf_cv_mixedcase+set}" = set; then
3449   echo $ECHO_N "(cached) $ECHO_C" >&6
3450 else
3451
3452 if test "$cross_compiling" = yes ; then
3453         case $target_alias in #(vi
3454         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3455                 cf_cv_mixedcase=no
3456                 ;;
3457         *)
3458                 cf_cv_mixedcase=yes
3459                 ;;
3460         esac
3461 else
3462         rm -f conftest CONFTEST
3463         echo test >conftest
3464         if test -f CONFTEST ; then
3465                 cf_cv_mixedcase=no
3466         else
3467                 cf_cv_mixedcase=yes
3468         fi
3469         rm -f conftest CONFTEST
3470 fi
3471
3472 fi
3473 echo "$as_me:3473: result: $cf_cv_mixedcase" >&5
3474 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3475 test "$cf_cv_mixedcase" = yes &&
3476 cat >>confdefs.h <<\EOF
3477 #define MIXEDCASE_FILENAMES 1
3478 EOF
3479
3480 else
3481     cf_cv_mixedcase=$enable_mixedcase
3482     if test "x$enable_mixedcase" = "xyes" ; then
3483
3484 cat >>confdefs.h <<\EOF
3485 #define MIXEDCASE_FILENAMES 1
3486 EOF
3487
3488     fi
3489 fi
3490
3491 # do this after mixed-case option (tags/TAGS is not as important as tic).
3492 echo "$as_me:3492: checking whether ${MAKE-make} sets \${MAKE}" >&5
3493 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3494 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3495 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3496   echo $ECHO_N "(cached) $ECHO_C" >&6
3497 else
3498   cat >conftest.make <<\EOF
3499 all:
3500         @echo 'ac_maketemp="${MAKE}"'
3501 EOF
3502 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3503 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3504 if test -n "$ac_maketemp"; then
3505   eval ac_cv_prog_make_${ac_make}_set=yes
3506 else
3507   eval ac_cv_prog_make_${ac_make}_set=no
3508 fi
3509 rm -f conftest.make
3510 fi
3511 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3512   echo "$as_me:3512: result: yes" >&5
3513 echo "${ECHO_T}yes" >&6
3514   SET_MAKE=
3515 else
3516   echo "$as_me:3516: result: no" >&5
3517 echo "${ECHO_T}no" >&6
3518   SET_MAKE="MAKE=${MAKE-make}"
3519 fi
3520
3521 for ac_prog in exctags ctags
3522 do
3523   # Extract the first word of "$ac_prog", so it can be a program name with args.
3524 set dummy $ac_prog; ac_word=$2
3525 echo "$as_me:3525: checking for $ac_word" >&5
3526 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3527 if test "${ac_cv_prog_CTAGS+set}" = set; then
3528   echo $ECHO_N "(cached) $ECHO_C" >&6
3529 else
3530   if test -n "$CTAGS"; then
3531   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3532 else
3533   ac_save_IFS=$IFS; IFS=$ac_path_separator
3534 ac_dummy="$PATH"
3535 for ac_dir in $ac_dummy; do
3536   IFS=$ac_save_IFS
3537   test -z "$ac_dir" && ac_dir=.
3538   $as_executable_p "$ac_dir/$ac_word" || continue
3539 ac_cv_prog_CTAGS="$ac_prog"
3540 echo "$as_me:3540: found $ac_dir/$ac_word" >&5
3541 break
3542 done
3543
3544 fi
3545 fi
3546 CTAGS=$ac_cv_prog_CTAGS
3547 if test -n "$CTAGS"; then
3548   echo "$as_me:3548: result: $CTAGS" >&5
3549 echo "${ECHO_T}$CTAGS" >&6
3550 else
3551   echo "$as_me:3551: result: no" >&5
3552 echo "${ECHO_T}no" >&6
3553 fi
3554
3555   test -n "$CTAGS" && break
3556 done
3557
3558 for ac_prog in exetags etags
3559 do
3560   # Extract the first word of "$ac_prog", so it can be a program name with args.
3561 set dummy $ac_prog; ac_word=$2
3562 echo "$as_me:3562: checking for $ac_word" >&5
3563 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3564 if test "${ac_cv_prog_ETAGS+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567   if test -n "$ETAGS"; then
3568   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3569 else
3570   ac_save_IFS=$IFS; IFS=$ac_path_separator
3571 ac_dummy="$PATH"
3572 for ac_dir in $ac_dummy; do
3573   IFS=$ac_save_IFS
3574   test -z "$ac_dir" && ac_dir=.
3575   $as_executable_p "$ac_dir/$ac_word" || continue
3576 ac_cv_prog_ETAGS="$ac_prog"
3577 echo "$as_me:3577: found $ac_dir/$ac_word" >&5
3578 break
3579 done
3580
3581 fi
3582 fi
3583 ETAGS=$ac_cv_prog_ETAGS
3584 if test -n "$ETAGS"; then
3585   echo "$as_me:3585: result: $ETAGS" >&5
3586 echo "${ECHO_T}$ETAGS" >&6
3587 else
3588   echo "$as_me:3588: result: no" >&5
3589 echo "${ECHO_T}no" >&6
3590 fi
3591
3592   test -n "$ETAGS" && break
3593 done
3594
3595 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3596 set dummy ${CTAGS:-ctags}; ac_word=$2
3597 echo "$as_me:3597: checking for $ac_word" >&5
3598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3599 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3600   echo $ECHO_N "(cached) $ECHO_C" >&6
3601 else
3602   if test -n "$MAKE_LOWER_TAGS"; then
3603   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3604 else
3605   ac_save_IFS=$IFS; IFS=$ac_path_separator
3606 ac_dummy="$PATH"
3607 for ac_dir in $ac_dummy; do
3608   IFS=$ac_save_IFS
3609   test -z "$ac_dir" && ac_dir=.
3610   $as_executable_p "$ac_dir/$ac_word" || continue
3611 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3612 echo "$as_me:3612: found $ac_dir/$ac_word" >&5
3613 break
3614 done
3615
3616   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3617 fi
3618 fi
3619 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3620 if test -n "$MAKE_LOWER_TAGS"; then
3621   echo "$as_me:3621: result: $MAKE_LOWER_TAGS" >&5
3622 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3623 else
3624   echo "$as_me:3624: result: no" >&5
3625 echo "${ECHO_T}no" >&6
3626 fi
3627
3628 if test "$cf_cv_mixedcase" = yes ; then
3629         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3630 set dummy ${ETAGS:-etags}; ac_word=$2
3631 echo "$as_me:3631: checking for $ac_word" >&5
3632 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3633 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3634   echo $ECHO_N "(cached) $ECHO_C" >&6
3635 else
3636   if test -n "$MAKE_UPPER_TAGS"; then
3637   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3638 else
3639   ac_save_IFS=$IFS; IFS=$ac_path_separator
3640 ac_dummy="$PATH"
3641 for ac_dir in $ac_dummy; do
3642   IFS=$ac_save_IFS
3643   test -z "$ac_dir" && ac_dir=.
3644   $as_executable_p "$ac_dir/$ac_word" || continue
3645 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3646 echo "$as_me:3646: found $ac_dir/$ac_word" >&5
3647 break
3648 done
3649
3650   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3651 fi
3652 fi
3653 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3654 if test -n "$MAKE_UPPER_TAGS"; then
3655   echo "$as_me:3655: result: $MAKE_UPPER_TAGS" >&5
3656 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3657 else
3658   echo "$as_me:3658: result: no" >&5
3659 echo "${ECHO_T}no" >&6
3660 fi
3661
3662 else
3663         MAKE_UPPER_TAGS=no
3664 fi
3665
3666 if test "$MAKE_UPPER_TAGS" = yes ; then
3667         MAKE_UPPER_TAGS=
3668 else
3669         MAKE_UPPER_TAGS="#"
3670 fi
3671
3672 if test "$MAKE_LOWER_TAGS" = yes ; then
3673         MAKE_LOWER_TAGS=
3674 else
3675         MAKE_LOWER_TAGS="#"
3676 fi
3677
3678 echo "$as_me:3678: checking for makeflags variable" >&5
3679 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3680 if test "${cf_cv_makeflags+set}" = set; then
3681   echo $ECHO_N "(cached) $ECHO_C" >&6
3682 else
3683
3684         cf_cv_makeflags=''
3685         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3686         do
3687                 cat >cf_makeflags.tmp <<CF_EOF
3688 SHELL = /bin/sh
3689 all :
3690         @ echo '.$cf_option'
3691 CF_EOF
3692                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3693                 case "$cf_result" in
3694                 .*k)
3695                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3696                         case "$cf_result" in
3697                         .*CC=*) cf_cv_makeflags=
3698                                 ;;
3699                         *)      cf_cv_makeflags=$cf_option
3700                                 ;;
3701                         esac
3702                         break
3703                         ;;
3704                 .-)     ;;
3705                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3706                         ;;
3707                 esac
3708         done
3709         rm -f cf_makeflags.tmp
3710
3711 fi
3712 echo "$as_me:3712: result: $cf_cv_makeflags" >&5
3713 echo "${ECHO_T}$cf_cv_makeflags" >&6
3714
3715 if test -n "$ac_tool_prefix"; then
3716   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3717 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3718 echo "$as_me:3718: checking for $ac_word" >&5
3719 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3720 if test "${ac_cv_prog_RANLIB+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723   if test -n "$RANLIB"; then
3724   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3725 else
3726   ac_save_IFS=$IFS; IFS=$ac_path_separator
3727 ac_dummy="$PATH"
3728 for ac_dir in $ac_dummy; do
3729   IFS=$ac_save_IFS
3730   test -z "$ac_dir" && ac_dir=.
3731   $as_executable_p "$ac_dir/$ac_word" || continue
3732 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3733 echo "$as_me:3733: found $ac_dir/$ac_word" >&5
3734 break
3735 done
3736
3737 fi
3738 fi
3739 RANLIB=$ac_cv_prog_RANLIB
3740 if test -n "$RANLIB"; then
3741   echo "$as_me:3741: result: $RANLIB" >&5
3742 echo "${ECHO_T}$RANLIB" >&6
3743 else
3744   echo "$as_me:3744: result: no" >&5
3745 echo "${ECHO_T}no" >&6
3746 fi
3747
3748 fi
3749 if test -z "$ac_cv_prog_RANLIB"; then
3750   ac_ct_RANLIB=$RANLIB
3751   # Extract the first word of "ranlib", so it can be a program name with args.
3752 set dummy ranlib; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$ac_ct_RANLIB"; then
3759   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_ac_ct_RANLIB="ranlib"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3773 fi
3774 fi
3775 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3776 if test -n "$ac_ct_RANLIB"; then
3777   echo "$as_me:3777: result: $ac_ct_RANLIB" >&5
3778 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784   RANLIB=$ac_ct_RANLIB
3785 else
3786   RANLIB="$ac_cv_prog_RANLIB"
3787 fi
3788
3789 if test -n "$ac_tool_prefix"; then
3790   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3791 set dummy ${ac_tool_prefix}ld; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_LD+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$LD"; then
3798   ac_cv_prog_LD="$LD" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_LD="${ac_tool_prefix}ld"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811 fi
3812 fi
3813 LD=$ac_cv_prog_LD
3814 if test -n "$LD"; then
3815   echo "$as_me:3815: result: $LD" >&5
3816 echo "${ECHO_T}$LD" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822 fi
3823 if test -z "$ac_cv_prog_LD"; then
3824   ac_ct_LD=$LD
3825   # Extract the first word of "ld", so it can be a program name with args.
3826 set dummy ld; ac_word=$2
3827 echo "$as_me:3827: checking for $ac_word" >&5
3828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3829 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   if test -n "$ac_ct_LD"; then
3833   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3834 else
3835   ac_save_IFS=$IFS; IFS=$ac_path_separator
3836 ac_dummy="$PATH"
3837 for ac_dir in $ac_dummy; do
3838   IFS=$ac_save_IFS
3839   test -z "$ac_dir" && ac_dir=.
3840   $as_executable_p "$ac_dir/$ac_word" || continue
3841 ac_cv_prog_ac_ct_LD="ld"
3842 echo "$as_me:3842: found $ac_dir/$ac_word" >&5
3843 break
3844 done
3845
3846   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3847 fi
3848 fi
3849 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3850 if test -n "$ac_ct_LD"; then
3851   echo "$as_me:3851: result: $ac_ct_LD" >&5
3852 echo "${ECHO_T}$ac_ct_LD" >&6
3853 else
3854   echo "$as_me:3854: result: no" >&5
3855 echo "${ECHO_T}no" >&6
3856 fi
3857
3858   LD=$ac_ct_LD
3859 else
3860   LD="$ac_cv_prog_LD"
3861 fi
3862
3863 if test -n "$ac_tool_prefix"; then
3864   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3865 set dummy ${ac_tool_prefix}ar; ac_word=$2
3866 echo "$as_me:3866: checking for $ac_word" >&5
3867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3868 if test "${ac_cv_prog_AR+set}" = set; then
3869   echo $ECHO_N "(cached) $ECHO_C" >&6
3870 else
3871   if test -n "$AR"; then
3872   ac_cv_prog_AR="$AR" # Let the user override the test.
3873 else
3874   ac_save_IFS=$IFS; IFS=$ac_path_separator
3875 ac_dummy="$PATH"
3876 for ac_dir in $ac_dummy; do
3877   IFS=$ac_save_IFS
3878   test -z "$ac_dir" && ac_dir=.
3879   $as_executable_p "$ac_dir/$ac_word" || continue
3880 ac_cv_prog_AR="${ac_tool_prefix}ar"
3881 echo "$as_me:3881: found $ac_dir/$ac_word" >&5
3882 break
3883 done
3884
3885 fi
3886 fi
3887 AR=$ac_cv_prog_AR
3888 if test -n "$AR"; then
3889   echo "$as_me:3889: result: $AR" >&5
3890 echo "${ECHO_T}$AR" >&6
3891 else
3892   echo "$as_me:3892: result: no" >&5
3893 echo "${ECHO_T}no" >&6
3894 fi
3895
3896 fi
3897 if test -z "$ac_cv_prog_AR"; then
3898   ac_ct_AR=$AR
3899   # Extract the first word of "ar", so it can be a program name with args.
3900 set dummy ar; ac_word=$2
3901 echo "$as_me:3901: checking for $ac_word" >&5
3902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3904   echo $ECHO_N "(cached) $ECHO_C" >&6
3905 else
3906   if test -n "$ac_ct_AR"; then
3907   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3908 else
3909   ac_save_IFS=$IFS; IFS=$ac_path_separator
3910 ac_dummy="$PATH"
3911 for ac_dir in $ac_dummy; do
3912   IFS=$ac_save_IFS
3913   test -z "$ac_dir" && ac_dir=.
3914   $as_executable_p "$ac_dir/$ac_word" || continue
3915 ac_cv_prog_ac_ct_AR="ar"
3916 echo "$as_me:3916: found $ac_dir/$ac_word" >&5
3917 break
3918 done
3919
3920   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3921 fi
3922 fi
3923 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3924 if test -n "$ac_ct_AR"; then
3925   echo "$as_me:3925: result: $ac_ct_AR" >&5
3926 echo "${ECHO_T}$ac_ct_AR" >&6
3927 else
3928   echo "$as_me:3928: result: no" >&5
3929 echo "${ECHO_T}no" >&6
3930 fi
3931
3932   AR=$ac_ct_AR
3933 else
3934   AR="$ac_cv_prog_AR"
3935 fi
3936
3937 if test -n "$ac_tool_prefix"; then
3938   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3939 set dummy ${ac_tool_prefix}ar; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_AR+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$AR"; then
3946   ac_cv_prog_AR="$AR" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_AR="${ac_tool_prefix}ar"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959 fi
3960 fi
3961 AR=$ac_cv_prog_AR
3962 if test -n "$AR"; then
3963   echo "$as_me:3963: result: $AR" >&5
3964 echo "${ECHO_T}$AR" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970 fi
3971 if test -z "$ac_cv_prog_AR"; then
3972   ac_ct_AR=$AR
3973   # Extract the first word of "ar", so it can be a program name with args.
3974 set dummy ar; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$ac_ct_AR"; then
3981   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_ac_ct_AR="ar"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3995 fi
3996 fi
3997 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3998 if test -n "$ac_ct_AR"; then
3999   echo "$as_me:3999: result: $ac_ct_AR" >&5
4000 echo "${ECHO_T}$ac_ct_AR" >&6
4001 else
4002   echo "$as_me:4002: result: no" >&5
4003 echo "${ECHO_T}no" >&6
4004 fi
4005
4006   AR=$ac_ct_AR
4007 else
4008   AR="$ac_cv_prog_AR"
4009 fi
4010
4011 echo "$as_me:4011: checking for options to update archives" >&5
4012 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4013 if test "${cf_cv_ar_flags+set}" = set; then
4014   echo $ECHO_N "(cached) $ECHO_C" >&6
4015 else
4016
4017         cf_cv_ar_flags=unknown
4018         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4019         do
4020
4021                 # check if $ARFLAGS already contains this choice
4022                 if test "x$ARFLAGS" != "x" ; then
4023                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4024                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4025                                 cf_cv_ar_flags=
4026                                 break
4027                         fi
4028                 fi
4029
4030                 rm -f conftest.$ac_cv_objext
4031                 rm -f conftest.a
4032
4033                 cat >conftest.$ac_ext <<EOF
4034 #line 4034 "configure"
4035 int     testdata[3] = { 123, 456, 789 };
4036 EOF
4037                 if { (eval echo "$as_me:4037: \"$ac_compile\"") >&5
4038   (eval $ac_compile) 2>&5
4039   ac_status=$?
4040   echo "$as_me:4040: \$? = $ac_status" >&5
4041   (exit $ac_status); } ; then
4042                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4043                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4044                         if test -f conftest.a ; then
4045                                 cf_cv_ar_flags=$cf_ar_flags
4046                                 break
4047                         fi
4048                 else
4049                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4050
4051 echo "${as_me:-configure}:4051: testing cannot compile test-program ..." 1>&5
4052
4053                         break
4054                 fi
4055         done
4056         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4057
4058 fi
4059 echo "$as_me:4059: result: $cf_cv_ar_flags" >&5
4060 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4061
4062 if test -n "$ARFLAGS" ; then
4063         if test -n "$cf_cv_ar_flags" ; then
4064                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4065         fi
4066 else
4067         ARFLAGS=$cf_cv_ar_flags
4068 fi
4069
4070 echo "$as_me:4070: checking if you have specified an install-prefix" >&5
4071 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4072
4073 # Check whether --with-install-prefix or --without-install-prefix was given.
4074 if test "${with_install_prefix+set}" = set; then
4075   withval="$with_install_prefix"
4076   case "x$withval" in #(vi
4077         xyes|xno) #(vi
4078                 ;;
4079         *)      DESTDIR="$withval"
4080                 ;;
4081         esac
4082 fi;
4083 echo "$as_me:4083: result: $DESTDIR" >&5
4084 echo "${ECHO_T}$DESTDIR" >&6
4085
4086 ###############################################################################
4087
4088 # If we're cross-compiling, allow the user to override the tools and their
4089 # options.  The configure script is oriented toward identifying the host
4090 # compiler, etc., but we need a build compiler to generate parts of the source.
4091
4092 if test "$cross_compiling" = yes ; then
4093
4094         # defaults that we might want to override
4095         : ${BUILD_CFLAGS:=''}
4096         : ${BUILD_CPPFLAGS:=''}
4097         : ${BUILD_LDFLAGS:=''}
4098         : ${BUILD_LIBS:=''}
4099         : ${BUILD_EXEEXT:='$x'}
4100         : ${BUILD_OBJEXT:='o'}
4101
4102 # Check whether --with-build-cc or --without-build-cc was given.
4103 if test "${with_build_cc+set}" = set; then
4104   withval="$with_build_cc"
4105   BUILD_CC="$withval"
4106 else
4107   for ac_prog in gcc cc cl
4108 do
4109   # Extract the first word of "$ac_prog", so it can be a program name with args.
4110 set dummy $ac_prog; ac_word=$2
4111 echo "$as_me:4111: checking for $ac_word" >&5
4112 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4113 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4114   echo $ECHO_N "(cached) $ECHO_C" >&6
4115 else
4116   if test -n "$BUILD_CC"; then
4117   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4118 else
4119   ac_save_IFS=$IFS; IFS=$ac_path_separator
4120 ac_dummy="$PATH"
4121 for ac_dir in $ac_dummy; do
4122   IFS=$ac_save_IFS
4123   test -z "$ac_dir" && ac_dir=.
4124   $as_executable_p "$ac_dir/$ac_word" || continue
4125 ac_cv_prog_BUILD_CC="$ac_prog"
4126 echo "$as_me:4126: found $ac_dir/$ac_word" >&5
4127 break
4128 done
4129
4130 fi
4131 fi
4132 BUILD_CC=$ac_cv_prog_BUILD_CC
4133 if test -n "$BUILD_CC"; then
4134   echo "$as_me:4134: result: $BUILD_CC" >&5
4135 echo "${ECHO_T}$BUILD_CC" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   test -n "$BUILD_CC" && break
4142 done
4143
4144 fi;
4145         echo "$as_me:4145: checking for native build C compiler" >&5
4146 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4147         echo "$as_me:4147: result: $BUILD_CC" >&5
4148 echo "${ECHO_T}$BUILD_CC" >&6
4149
4150         echo "$as_me:4150: checking for native build C preprocessor" >&5
4151 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4152
4153 # Check whether --with-build-cpp or --without-build-cpp was given.
4154 if test "${with_build_cpp+set}" = set; then
4155   withval="$with_build_cpp"
4156   BUILD_CPP="$withval"
4157 else
4158   BUILD_CPP='${BUILD_CC} -E'
4159 fi;
4160         echo "$as_me:4160: result: $BUILD_CPP" >&5
4161 echo "${ECHO_T}$BUILD_CPP" >&6
4162
4163         echo "$as_me:4163: checking for native build C flags" >&5
4164 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4165
4166 # Check whether --with-build-cflags or --without-build-cflags was given.
4167 if test "${with_build_cflags+set}" = set; then
4168   withval="$with_build_cflags"
4169   BUILD_CFLAGS="$withval"
4170 fi;
4171         echo "$as_me:4171: result: $BUILD_CFLAGS" >&5
4172 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4173
4174         echo "$as_me:4174: checking for native build C preprocessor-flags" >&5
4175 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4176
4177 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4178 if test "${with_build_cppflags+set}" = set; then
4179   withval="$with_build_cppflags"
4180   BUILD_CPPFLAGS="$withval"
4181 fi;
4182         echo "$as_me:4182: result: $BUILD_CPPFLAGS" >&5
4183 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4184
4185         echo "$as_me:4185: checking for native build linker-flags" >&5
4186 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4187
4188 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4189 if test "${with_build_ldflags+set}" = set; then
4190   withval="$with_build_ldflags"
4191   BUILD_LDFLAGS="$withval"
4192 fi;
4193         echo "$as_me:4193: result: $BUILD_LDFLAGS" >&5
4194 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4195
4196         echo "$as_me:4196: checking for native build linker-libraries" >&5
4197 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4198
4199 # Check whether --with-build-libs or --without-build-libs was given.
4200 if test "${with_build_libs+set}" = set; then
4201   withval="$with_build_libs"
4202   BUILD_LIBS="$withval"
4203 fi;
4204         echo "$as_me:4204: result: $BUILD_LIBS" >&5
4205 echo "${ECHO_T}$BUILD_LIBS" >&6
4206
4207         # this assumes we're on Unix.
4208         BUILD_EXEEXT=
4209         BUILD_OBJEXT=o
4210
4211         : ${BUILD_CC:='${CC}'}
4212
4213         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4214                 { { echo "$as_me:4214: error: Cross-build requires two compilers.
4215 Use --with-build-cc to specify the native compiler." >&5
4216 echo "$as_me: error: Cross-build requires two compilers.
4217 Use --with-build-cc to specify the native compiler." >&2;}
4218    { (exit 1); exit 1; }; }
4219         fi
4220
4221 else
4222         : ${BUILD_CC:='${CC}'}
4223         : ${BUILD_CPP:='${CPP}'}
4224         : ${BUILD_CFLAGS:='${CFLAGS}'}
4225         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4226         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4227         : ${BUILD_LIBS:='${LIBS}'}
4228         : ${BUILD_EXEEXT:='$x'}
4229         : ${BUILD_OBJEXT:='o'}
4230 fi
4231
4232 ###############################################################################
4233
4234 ### Options to allow the user to specify the set of libraries which are used.
4235 ### Use "--without-normal --with-shared" to allow the default model to be
4236 ### shared, for example.
4237 cf_list_models=""
4238
4239 echo "$as_me:4239: checking if libtool -version-number should be used" >&5
4240 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4241
4242 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4243 if test "${enable_libtool_version+set}" = set; then
4244   enableval="$enable_libtool_version"
4245   test "$enableval" != no && enableval=yes
4246   if test "$enableval" != "yes" ; then
4247     cf_libtool_version=no
4248   else
4249     cf_libtool_version=yes
4250   fi
4251 else
4252   enableval=yes
4253   cf_libtool_version=yes
4254
4255 fi;
4256 echo "$as_me:4256: result: $cf_libtool_version" >&5
4257 echo "${ECHO_T}$cf_libtool_version" >&6
4258
4259 if test "$cf_libtool_version" = yes ; then
4260         LIBTOOL_VERSION="-version-number"
4261 else
4262         LIBTOOL_VERSION="-version-info"
4263 fi
4264
4265 LIBTOOL=
4266
4267 # common library maintenance symbols that are convenient for libtool scripts:
4268 LIB_CREATE='${AR} -cr'
4269 LIB_OBJECT='${OBJECTS}'
4270 LIB_SUFFIX=.a
4271 LIB_PREP="$RANLIB"
4272
4273 # symbols used to prop libtool up to enable it to determine what it should be
4274 # doing:
4275 LIB_CLEAN=
4276 LIB_COMPILE=
4277 LIB_LINK='${CC}'
4278 LIB_INSTALL=
4279 LIB_UNINSTALL=
4280
4281 echo "$as_me:4281: checking if you want to build libraries with libtool" >&5
4282 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4283
4284 # Check whether --with-libtool or --without-libtool was given.
4285 if test "${with_libtool+set}" = set; then
4286   withval="$with_libtool"
4287   with_libtool=$withval
4288 else
4289   with_libtool=no
4290 fi;
4291 echo "$as_me:4291: result: $with_libtool" >&5
4292 echo "${ECHO_T}$with_libtool" >&6
4293 if test "$with_libtool" != "no"; then
4294
4295         if test "$with_libtool" != "yes" ; then
4296
4297 if test "x$prefix" != xNONE; then
4298   cf_path_syntax="$prefix"
4299 else
4300   cf_path_syntax="$ac_default_prefix"
4301 fi
4302
4303 case ".$with_libtool" in #(vi
4304 .\$\(*\)*|.\'*\'*) #(vi
4305   ;;
4306 ..|./*|.\\*) #(vi
4307   ;;
4308 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4309   ;;
4310 .\${*prefix}*|.\${*dir}*) #(vi
4311   eval with_libtool="$with_libtool"
4312   case ".$with_libtool" in #(vi
4313   .NONE/*)
4314     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4315     ;;
4316   esac
4317   ;; #(vi
4318 .no|.NONE/*)
4319   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4320   ;;
4321 *)
4322   { { echo "$as_me:4322: error: expected a pathname, not \"$with_libtool\"" >&5
4323 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4324    { (exit 1); exit 1; }; }
4325   ;;
4326 esac
4327
4328                 LIBTOOL=$with_libtool
4329         else
4330                 # Extract the first word of "libtool", so it can be a program name with args.
4331 set dummy libtool; ac_word=$2
4332 echo "$as_me:4332: checking for $ac_word" >&5
4333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4334 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4335   echo $ECHO_N "(cached) $ECHO_C" >&6
4336 else
4337   case $LIBTOOL in
4338   [\\/]* | ?:[\\/]*)
4339   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4340   ;;
4341   *)
4342   ac_save_IFS=$IFS; IFS=$ac_path_separator
4343 ac_dummy="$PATH"
4344 for ac_dir in $ac_dummy; do
4345   IFS=$ac_save_IFS
4346   test -z "$ac_dir" && ac_dir=.
4347   if $as_executable_p "$ac_dir/$ac_word"; then
4348    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4349    echo "$as_me:4349: found $ac_dir/$ac_word" >&5
4350    break
4351 fi
4352 done
4353
4354   ;;
4355 esac
4356 fi
4357 LIBTOOL=$ac_cv_path_LIBTOOL
4358
4359 if test -n "$LIBTOOL"; then
4360   echo "$as_me:4360: result: $LIBTOOL" >&5
4361 echo "${ECHO_T}$LIBTOOL" >&6
4362 else
4363   echo "$as_me:4363: result: no" >&5
4364 echo "${ECHO_T}no" >&6
4365 fi
4366
4367         fi
4368         if test -z "$LIBTOOL" ; then
4369                 { { echo "$as_me:4369: error: Cannot find libtool" >&5
4370 echo "$as_me: error: Cannot find libtool" >&2;}
4371    { (exit 1); exit 1; }; }
4372         fi
4373         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4374         LIB_OBJECT='${OBJECTS:.o=.lo}'
4375         LIB_SUFFIX=.la
4376         LIB_CLEAN='${LIBTOOL} --mode=clean'
4377         LIB_COMPILE='${LIBTOOL} --mode=compile'
4378         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4379         LIB_INSTALL='${LIBTOOL} --mode=install'
4380         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4381         LIB_PREP=:
4382
4383         # Show the version of libtool
4384         echo "$as_me:4384: checking version of libtool" >&5
4385 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4386
4387         # Save the version in a cache variable - this is not entirely a good
4388         # thing, but the version string from libtool is very ugly, and for
4389         # bug reports it might be useful to have the original string. "("
4390         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.].*//'`
4391         echo "$as_me:4391: result: $cf_cv_libtool_version" >&5
4392 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4393         if test -z "$cf_cv_libtool_version" ; then
4394                 { { echo "$as_me:4394: error: This is not GNU libtool" >&5
4395 echo "$as_me: error: This is not GNU libtool" >&2;}
4396    { (exit 1); exit 1; }; }
4397         fi
4398
4399         # special hack to add -no-undefined (which libtool should do for itself)
4400         LT_UNDEF=
4401         case "$cf_cv_system_name" in #(vi
4402         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4403                 LT_UNDEF=-no-undefined
4404                 ;;
4405         esac
4406
4407         # special hack to add --tag option for C++ compiler
4408         case $cf_cv_libtool_version in #(vi
4409         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4410                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4411                 LIBTOOL="$LIBTOOL --tag=CC"
4412                 ;;
4413         *)
4414                 LIBTOOL_CXX="$LIBTOOL"
4415                 ;;
4416         esac
4417 else
4418         LIBTOOL=""
4419         LIBTOOL_CXX=""
4420 fi
4421
4422 test -z "$LIBTOOL" && ECHO_LT=
4423
4424 if test "$with_libtool" != "no" ; then
4425
4426 cf_list_models="$cf_list_models libtool"
4427
4428 else
4429
4430 echo "$as_me:4430: checking if you want to build shared libraries" >&5
4431 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4432
4433 # Check whether --with-shared or --without-shared was given.
4434 if test "${with_shared+set}" = set; then
4435   withval="$with_shared"
4436   with_shared=$withval
4437 else
4438   with_shared=no
4439 fi;
4440 echo "$as_me:4440: result: $with_shared" >&5
4441 echo "${ECHO_T}$with_shared" >&6
4442 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4443
4444 echo "$as_me:4444: checking if you want to build static libraries" >&5
4445 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4446
4447 # Check whether --with-normal or --without-normal was given.
4448 if test "${with_normal+set}" = set; then
4449   withval="$with_normal"
4450   with_normal=$withval
4451 else
4452   with_normal=yes
4453 fi;
4454 echo "$as_me:4454: result: $with_normal" >&5
4455 echo "${ECHO_T}$with_normal" >&6
4456 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4457
4458 echo "$as_me:4458: checking if you want to build debug libraries" >&5
4459 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4460
4461 # Check whether --with-debug or --without-debug was given.
4462 if test "${with_debug+set}" = set; then
4463   withval="$with_debug"
4464   with_debug=$withval
4465 else
4466   with_debug=yes
4467 fi;
4468 echo "$as_me:4468: result: $with_debug" >&5
4469 echo "${ECHO_T}$with_debug" >&6
4470 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4471
4472 echo "$as_me:4472: checking if you want to build profiling libraries" >&5
4473 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4474
4475 # Check whether --with-profile or --without-profile was given.
4476 if test "${with_profile+set}" = set; then
4477   withval="$with_profile"
4478   with_profile=$withval
4479 else
4480   with_profile=no
4481 fi;
4482 echo "$as_me:4482: result: $with_profile" >&5
4483 echo "${ECHO_T}$with_profile" >&6
4484 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4485
4486 fi
4487
4488 ###############################################################################
4489
4490 echo "$as_me:4490: checking for specified models" >&5
4491 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4492 test -z "$cf_list_models" && cf_list_models=normal
4493 test "$with_libtool" != "no" && cf_list_models=libtool
4494 echo "$as_me:4494: result: $cf_list_models" >&5
4495 echo "${ECHO_T}$cf_list_models" >&6
4496
4497 ### Use the first model as the default, and save its suffix for use in building
4498 ### up test-applications.
4499 echo "$as_me:4499: checking for default model" >&5
4500 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4501 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4502 echo "$as_me:4502: result: $DFT_LWR_MODEL" >&5
4503 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4504
4505 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4506
4507 TICS_NAME=tic
4508
4509 TINFO_NAME=tinfo
4510
4511 LIB_NAME=ncurses
4512
4513 LIB_DIR=../lib
4514 LIB_2ND=../../lib
4515
4516 echo "$as_me:4516: checking if you want to have a library-prefix" >&5
4517 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4518
4519 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4520 if test "${with_lib_prefix+set}" = set; then
4521   withval="$with_lib_prefix"
4522   with_lib_prefix=$withval
4523 else
4524   with_lib_prefix=auto
4525 fi;
4526 echo "$as_me:4526: result: $with_lib_prefix" >&5
4527 echo "${ECHO_T}$with_lib_prefix" >&6
4528
4529 if test $with_lib_prefix = auto
4530 then
4531
4532         case $cf_cv_system_name in #(vi
4533         OS/2*|os2*) #(vi
4534         LIB_PREFIX=''
4535         ;;
4536         *)      LIB_PREFIX='lib'
4537         ;;
4538         esac
4539 cf_prefix=$LIB_PREFIX
4540
4541 elif test $with_lib_prefix = no
4542 then
4543         LIB_PREFIX=
4544 else
4545         LIB_PREFIX=$with_lib_prefix
4546 fi
4547
4548 LIB_SUFFIX=
4549
4550         echo "$as_me:4550: checking for PATH separator" >&5
4551 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4552         case $cf_cv_system_name in
4553         os2*)   PATH_SEPARATOR=';'  ;;
4554         *)      ${PATH_SEPARATOR:=':'}  ;;
4555         esac
4556
4557         echo "$as_me:4557: result: $PATH_SEPARATOR" >&5
4558 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4559
4560 ###############################################################################
4561
4562 echo "$as_me:4562: checking if you want to build a separate terminfo library" >&5
4563 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4564
4565 # Check whether --with-termlib or --without-termlib was given.
4566 if test "${with_termlib+set}" = set; then
4567   withval="$with_termlib"
4568   with_termlib=$withval
4569 else
4570   with_termlib=no
4571 fi;
4572 echo "$as_me:4572: result: $with_termlib" >&5
4573 echo "${ECHO_T}$with_termlib" >&6
4574
4575 echo "$as_me:4575: checking if you want to build a separate tic library" >&5
4576 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4577
4578 # Check whether --with-ticlib or --without-ticlib was given.
4579 if test "${with_ticlib+set}" = set; then
4580   withval="$with_ticlib"
4581   with_ticlib=$withval
4582 else
4583   with_ticlib=no
4584 fi;
4585 echo "$as_me:4585: result: $with_ticlib" >&5
4586 echo "${ECHO_T}$with_ticlib" >&6
4587
4588 ### Checks for special libraries, must be done up-front.
4589 SHLIB_LIST=""
4590
4591 echo "$as_me:4591: checking if you want to link with the GPM mouse library" >&5
4592 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4593
4594 # Check whether --with-gpm or --without-gpm was given.
4595 if test "${with_gpm+set}" = set; then
4596   withval="$with_gpm"
4597   with_gpm=$withval
4598 else
4599   with_gpm=maybe
4600 fi;
4601 echo "$as_me:4601: result: $with_gpm" >&5
4602 echo "${ECHO_T}$with_gpm" >&6
4603
4604 if test "$with_gpm" != no ; then
4605         echo "$as_me:4605: checking for gpm.h" >&5
4606 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4607 if test "${ac_cv_header_gpm_h+set}" = set; then
4608   echo $ECHO_N "(cached) $ECHO_C" >&6
4609 else
4610   cat >conftest.$ac_ext <<_ACEOF
4611 #line 4611 "configure"
4612 #include "confdefs.h"
4613 #include <gpm.h>
4614 _ACEOF
4615 if { (eval echo "$as_me:4615: \"$ac_cpp conftest.$ac_ext\"") >&5
4616   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4617   ac_status=$?
4618   egrep -v '^ *\+' conftest.er1 >conftest.err
4619   rm -f conftest.er1
4620   cat conftest.err >&5
4621   echo "$as_me:4621: \$? = $ac_status" >&5
4622   (exit $ac_status); } >/dev/null; then
4623   if test -s conftest.err; then
4624     ac_cpp_err=$ac_c_preproc_warn_flag
4625   else
4626     ac_cpp_err=
4627   fi
4628 else
4629   ac_cpp_err=yes
4630 fi
4631 if test -z "$ac_cpp_err"; then
4632   ac_cv_header_gpm_h=yes
4633 else
4634   echo "$as_me: failed program was:" >&5
4635   cat conftest.$ac_ext >&5
4636   ac_cv_header_gpm_h=no
4637 fi
4638 rm -f conftest.err conftest.$ac_ext
4639 fi
4640 echo "$as_me:4640: result: $ac_cv_header_gpm_h" >&5
4641 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4642 if test $ac_cv_header_gpm_h = yes; then
4643
4644 cat >>confdefs.h <<\EOF
4645 #define HAVE_GPM_H 1
4646 EOF
4647
4648                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4649                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4650
4651 echo "${as_me:-configure}:4651: testing assuming we really have GPM library ..." 1>&5
4652
4653 cat >>confdefs.h <<\EOF
4654 #define HAVE_LIBGPM 1
4655 EOF
4656
4657                 else
4658                         echo "$as_me:4658: checking for Gpm_Open in -lgpm" >&5
4659 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4660 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4661   echo $ECHO_N "(cached) $ECHO_C" >&6
4662 else
4663   ac_check_lib_save_LIBS=$LIBS
4664 LIBS="-lgpm  $LIBS"
4665 cat >conftest.$ac_ext <<_ACEOF
4666 #line 4666 "configure"
4667 #include "confdefs.h"
4668
4669 /* Override any gcc2 internal prototype to avoid an error.  */
4670 #ifdef __cplusplus
4671 extern "C"
4672 #endif
4673 /* We use char because int might match the return type of a gcc2
4674    builtin and then its argument prototype would still apply.  */
4675 char Gpm_Open ();
4676 int
4677 main ()
4678 {
4679 Gpm_Open ();
4680   ;
4681   return 0;
4682 }
4683 _ACEOF
4684 rm -f conftest.$ac_objext conftest$ac_exeext
4685 if { (eval echo "$as_me:4685: \"$ac_link\"") >&5
4686   (eval $ac_link) 2>&5
4687   ac_status=$?
4688   echo "$as_me:4688: \$? = $ac_status" >&5
4689   (exit $ac_status); } &&
4690          { ac_try='test -s conftest$ac_exeext'
4691   { (eval echo "$as_me:4691: \"$ac_try\"") >&5
4692   (eval $ac_try) 2>&5
4693   ac_status=$?
4694   echo "$as_me:4694: \$? = $ac_status" >&5
4695   (exit $ac_status); }; }; then
4696   ac_cv_lib_gpm_Gpm_Open=yes
4697 else
4698   echo "$as_me: failed program was:" >&5
4699 cat conftest.$ac_ext >&5
4700 ac_cv_lib_gpm_Gpm_Open=no
4701 fi
4702 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4703 LIBS=$ac_check_lib_save_LIBS
4704 fi
4705 echo "$as_me:4705: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4706 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4707 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4708   :
4709 else
4710
4711                                 { { echo "$as_me:4711: error: Cannot link with GPM library" >&5
4712 echo "$as_me: error: Cannot link with GPM library" >&2;}
4713    { (exit 1); exit 1; }; }
4714                 fi
4715                 with_gpm=yes
4716
4717 fi
4718
4719 else
4720
4721                 test "$with_gpm" != maybe && { echo "$as_me:4721: WARNING: Cannot find GPM header" >&5
4722 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4723                 with_gpm=no
4724
4725 fi
4726
4727 fi
4728
4729 if test "$with_gpm" != no ; then
4730         echo "$as_me:4730: checking if you want to load GPM dynamically" >&5
4731 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4732
4733 # Check whether --with-dlsym or --without-dlsym was given.
4734 if test "${with_dlsym+set}" = set; then
4735   withval="$with_dlsym"
4736   with_dlsym=$withval
4737 else
4738   with_dlsym=yes
4739 fi;
4740         echo "$as_me:4740: result: $with_dlsym" >&5
4741 echo "${ECHO_T}$with_dlsym" >&6
4742         if test "x$with_dlsym" = xyes ; then
4743
4744 cf_have_dlsym=no
4745 echo "$as_me:4745: checking for dlsym" >&5
4746 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4747 if test "${ac_cv_func_dlsym+set}" = set; then
4748   echo $ECHO_N "(cached) $ECHO_C" >&6
4749 else
4750   cat >conftest.$ac_ext <<_ACEOF
4751 #line 4751 "configure"
4752 #include "confdefs.h"
4753 /* System header to define __stub macros and hopefully few prototypes,
4754     which can conflict with char dlsym (); below.  */
4755 #include <assert.h>
4756 /* Override any gcc2 internal prototype to avoid an error.  */
4757 #ifdef __cplusplus
4758 extern "C"
4759 #endif
4760 /* We use char because int might match the return type of a gcc2
4761    builtin and then its argument prototype would still apply.  */
4762 char dlsym ();
4763 char (*f) ();
4764
4765 int
4766 main ()
4767 {
4768 /* The GNU C library defines this for functions which it implements
4769     to always fail with ENOSYS.  Some functions are actually named
4770     something starting with __ and the normal name is an alias.  */
4771 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4772 choke me
4773 #else
4774 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4775 #endif
4776
4777   ;
4778   return 0;
4779 }
4780 _ACEOF
4781 rm -f conftest.$ac_objext conftest$ac_exeext
4782 if { (eval echo "$as_me:4782: \"$ac_link\"") >&5
4783   (eval $ac_link) 2>&5
4784   ac_status=$?
4785   echo "$as_me:4785: \$? = $ac_status" >&5
4786   (exit $ac_status); } &&
4787          { ac_try='test -s conftest$ac_exeext'
4788   { (eval echo "$as_me:4788: \"$ac_try\"") >&5
4789   (eval $ac_try) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); }; }; then
4793   ac_cv_func_dlsym=yes
4794 else
4795   echo "$as_me: failed program was:" >&5
4796 cat conftest.$ac_ext >&5
4797 ac_cv_func_dlsym=no
4798 fi
4799 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4800 fi
4801 echo "$as_me:4801: result: $ac_cv_func_dlsym" >&5
4802 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4803 if test $ac_cv_func_dlsym = yes; then
4804   cf_have_dlsym=yes
4805 else
4806
4807 cf_have_libdl=no
4808 echo "$as_me:4808: checking for dlsym in -ldl" >&5
4809 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4810 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4811   echo $ECHO_N "(cached) $ECHO_C" >&6
4812 else
4813   ac_check_lib_save_LIBS=$LIBS
4814 LIBS="-ldl  $LIBS"
4815 cat >conftest.$ac_ext <<_ACEOF
4816 #line 4816 "configure"
4817 #include "confdefs.h"
4818
4819 /* Override any gcc2 internal prototype to avoid an error.  */
4820 #ifdef __cplusplus
4821 extern "C"
4822 #endif
4823 /* We use char because int might match the return type of a gcc2
4824    builtin and then its argument prototype would still apply.  */
4825 char dlsym ();
4826 int
4827 main ()
4828 {
4829 dlsym ();
4830   ;
4831   return 0;
4832 }
4833 _ACEOF
4834 rm -f conftest.$ac_objext conftest$ac_exeext
4835 if { (eval echo "$as_me:4835: \"$ac_link\"") >&5
4836   (eval $ac_link) 2>&5
4837   ac_status=$?
4838   echo "$as_me:4838: \$? = $ac_status" >&5
4839   (exit $ac_status); } &&
4840          { ac_try='test -s conftest$ac_exeext'
4841   { (eval echo "$as_me:4841: \"$ac_try\"") >&5
4842   (eval $ac_try) 2>&5
4843   ac_status=$?
4844   echo "$as_me:4844: \$? = $ac_status" >&5
4845   (exit $ac_status); }; }; then
4846   ac_cv_lib_dl_dlsym=yes
4847 else
4848   echo "$as_me: failed program was:" >&5
4849 cat conftest.$ac_ext >&5
4850 ac_cv_lib_dl_dlsym=no
4851 fi
4852 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4853 LIBS=$ac_check_lib_save_LIBS
4854 fi
4855 echo "$as_me:4855: result: $ac_cv_lib_dl_dlsym" >&5
4856 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4857 if test $ac_cv_lib_dl_dlsym = yes; then
4858
4859         cf_have_dlsym=yes
4860         cf_have_libdl=yes
4861 fi
4862
4863 fi
4864
4865 if test "$cf_have_dlsym" = yes ; then
4866         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4867
4868         echo "$as_me:4868: checking whether able to link to dl*() functions" >&5
4869 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4870         cat >conftest.$ac_ext <<_ACEOF
4871 #line 4871 "configure"
4872 #include "confdefs.h"
4873 #include <dlfcn.h>
4874 int
4875 main ()
4876 {
4877
4878                 void *obj;
4879                 if ((obj = dlopen("filename", 0)) != 0) {
4880                         if (dlsym(obj, "symbolname") == 0) {
4881                         dlclose(obj);
4882                         }
4883                 }
4884   ;
4885   return 0;
4886 }
4887 _ACEOF
4888 rm -f conftest.$ac_objext conftest$ac_exeext
4889 if { (eval echo "$as_me:4889: \"$ac_link\"") >&5
4890   (eval $ac_link) 2>&5
4891   ac_status=$?
4892   echo "$as_me:4892: \$? = $ac_status" >&5
4893   (exit $ac_status); } &&
4894          { ac_try='test -s conftest$ac_exeext'
4895   { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896   (eval $ac_try) 2>&5
4897   ac_status=$?
4898   echo "$as_me:4898: \$? = $ac_status" >&5
4899   (exit $ac_status); }; }; then
4900
4901 cat >>confdefs.h <<\EOF
4902 #define HAVE_LIBDL 1
4903 EOF
4904
4905 else
4906   echo "$as_me: failed program was:" >&5
4907 cat conftest.$ac_ext >&5
4908
4909                 { { echo "$as_me:4909: error: Cannot link test program for libdl" >&5
4910 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4911    { (exit 1); exit 1; }; }
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914         echo "$as_me:4914: result: ok" >&5
4915 echo "${ECHO_T}ok" >&6
4916 else
4917         { { echo "$as_me:4917: error: Cannot find dlsym function" >&5
4918 echo "$as_me: error: Cannot find dlsym function" >&2;}
4919    { (exit 1); exit 1; }; }
4920 fi
4921
4922                 if test "x$with_gpm" != xyes ; then
4923                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4924
4925 echo "${as_me:-configure}:4925: testing assuming soname for gpm is $with_gpm ..." 1>&5
4926
4927                         cf_cv_gpm_soname="$with_gpm"
4928                 else
4929
4930 echo "$as_me:4930: checking for soname of gpm library" >&5
4931 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4932 if test "${cf_cv_gpm_soname+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935
4936 cf_cv_gpm_soname=unknown
4937 if test "$cross_compiling" != yes ; then
4938 cat >conftest.$ac_ext <<CF_EOF
4939 #include <gpm.h>
4940 int main()
4941 {
4942 if (Gpm_Open(0,0)) Gpm_Close();
4943         ${cf_cv_main_return:-return}(0);
4944 }
4945 CF_EOF
4946 cf_save_LIBS="$LIBS"
4947         LIBS="-lgpm $LIBS"
4948         if { (eval echo "$as_me:4948: \"$ac_compile\"") >&5
4949   (eval $ac_compile) 2>&5
4950   ac_status=$?
4951   echo "$as_me:4951: \$? = $ac_status" >&5
4952   (exit $ac_status); } ; then
4953                 if { (eval echo "$as_me:4953: \"$ac_link\"") >&5
4954   (eval $ac_link) 2>&5
4955   ac_status=$?
4956   echo "$as_me:4956: \$? = $ac_status" >&5
4957   (exit $ac_status); } ; then
4958                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4959                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4960                 fi
4961         fi
4962 rm -rf conftest*
4963 LIBS="$cf_save_LIBS"
4964 fi
4965
4966 fi
4967 echo "$as_me:4967: result: $cf_cv_gpm_soname" >&5
4968 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4969
4970                 fi
4971                 test "$cf_cv_gpm_soname" != "unknown" &&
4972 cat >>confdefs.h <<EOF
4973 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4974 EOF
4975
4976                 SHLIB_LIST="-ldl $SHLIB_LIST"
4977         else
4978                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4979                 TEST_LIBS="-lgpm $TEST_LIBS"
4980         fi
4981
4982 cat >>confdefs.h <<\EOF
4983 #define HAVE_LIBGPM 1
4984 EOF
4985
4986 echo "$as_me:4986: checking for Gpm_Wgetch in -lgpm" >&5
4987 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4988 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4989   echo $ECHO_N "(cached) $ECHO_C" >&6
4990 else
4991   ac_check_lib_save_LIBS=$LIBS
4992 LIBS="-lgpm  $LIBS"
4993 cat >conftest.$ac_ext <<_ACEOF
4994 #line 4994 "configure"
4995 #include "confdefs.h"
4996
4997 /* Override any gcc2 internal prototype to avoid an error.  */
4998 #ifdef __cplusplus
4999 extern "C"
5000 #endif
5001 /* We use char because int might match the return type of a gcc2
5002    builtin and then its argument prototype would still apply.  */
5003 char Gpm_Wgetch ();
5004 int
5005 main ()
5006 {
5007 Gpm_Wgetch ();
5008   ;
5009   return 0;
5010 }
5011 _ACEOF
5012 rm -f conftest.$ac_objext conftest$ac_exeext
5013 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } &&
5018          { ac_try='test -s conftest$ac_exeext'
5019   { (eval echo "$as_me:5019: \"$ac_try\"") >&5
5020   (eval $ac_try) 2>&5
5021   ac_status=$?
5022   echo "$as_me:5022: \$? = $ac_status" >&5
5023   (exit $ac_status); }; }; then
5024   ac_cv_lib_gpm_Gpm_Wgetch=yes
5025 else
5026   echo "$as_me: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5028 ac_cv_lib_gpm_Gpm_Wgetch=no
5029 fi
5030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5031 LIBS=$ac_check_lib_save_LIBS
5032 fi
5033 echo "$as_me:5033: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5034 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5035 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5036
5037 echo "$as_me:5037: checking if GPM is weakly bound to curses library" >&5
5038 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5039 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5040   echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042
5043 cf_cv_check_gpm_wgetch=unknown
5044 if test "$cross_compiling" != yes ; then
5045
5046 cat >conftest.$ac_ext <<CF_EOF
5047 #include <gpm.h>
5048 int main()
5049 {
5050         Gpm_Wgetch();
5051         ${cf_cv_main_return:-return}(0);
5052 }
5053 CF_EOF
5054
5055         cf_save_LIBS="$LIBS"
5056         # This only works if we can look at the symbol table.  If a shared
5057         # library is stripped for install, we cannot use that.  So we're forced
5058         # to rely on the static library, noting that some packagers may not
5059         # include it.
5060         LIBS="-static -lgpm -dynamic $LIBS"
5061         if { (eval echo "$as_me:5061: \"$ac_compile\"") >&5
5062   (eval $ac_compile) 2>&5
5063   ac_status=$?
5064   echo "$as_me:5064: \$? = $ac_status" >&5
5065   (exit $ac_status); } ; then
5066                 if { (eval echo "$as_me:5066: \"$ac_link\"") >&5
5067   (eval $ac_link) 2>&5
5068   ac_status=$?
5069   echo "$as_me:5069: \$? = $ac_status" >&5
5070   (exit $ac_status); } ; then
5071                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5072                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5073                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5074                 fi
5075         fi
5076         rm -rf conftest*
5077         LIBS="$cf_save_LIBS"
5078 fi
5079
5080 fi
5081 echo "$as_me:5081: result: $cf_cv_check_gpm_wgetch" >&5
5082 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5083
5084 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5085         { echo "$as_me:5085: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5086 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5087 fi
5088
5089 fi
5090
5091 fi
5092
5093 # not everyone has "test -c"
5094 if test -c /dev/sysmouse 2>/dev/null ; then
5095 echo "$as_me:5095: checking if you want to use sysmouse" >&5
5096 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5097
5098 # Check whether --with-sysmouse or --without-sysmouse was given.
5099 if test "${with_sysmouse+set}" = set; then
5100   withval="$with_sysmouse"
5101   cf_with_sysmouse=$withval
5102 else
5103   cf_with_sysmouse=maybe
5104 fi;
5105         if test "$cf_with_sysmouse" != no ; then
5106         cat >conftest.$ac_ext <<_ACEOF
5107 #line 5107 "configure"
5108 #include "confdefs.h"
5109
5110 #include <osreldate.h>
5111 #if (__FreeBSD_version >= 400017)
5112 #include <sys/consio.h>
5113 #include <sys/fbio.h>
5114 #else
5115 #include <machine/console.h>
5116 #endif
5117
5118 int
5119 main ()
5120 {
5121
5122         struct mouse_info the_mouse;
5123         ioctl(0, CONS_MOUSECTL, &the_mouse);
5124
5125   ;
5126   return 0;
5127 }
5128 _ACEOF
5129 rm -f conftest.$ac_objext
5130 if { (eval echo "$as_me:5130: \"$ac_compile\"") >&5
5131   (eval $ac_compile) 2>&5
5132   ac_status=$?
5133   echo "$as_me:5133: \$? = $ac_status" >&5
5134   (exit $ac_status); } &&
5135          { ac_try='test -s conftest.$ac_objext'
5136   { (eval echo "$as_me:5136: \"$ac_try\"") >&5
5137   (eval $ac_try) 2>&5
5138   ac_status=$?
5139   echo "$as_me:5139: \$? = $ac_status" >&5
5140   (exit $ac_status); }; }; then
5141   cf_with_sysmouse=yes
5142 else
5143   echo "$as_me: failed program was:" >&5
5144 cat conftest.$ac_ext >&5
5145 cf_with_sysmouse=no
5146 fi
5147 rm -f conftest.$ac_objext conftest.$ac_ext
5148         fi
5149 echo "$as_me:5149: result: $cf_with_sysmouse" >&5
5150 echo "${ECHO_T}$cf_with_sysmouse" >&6
5151 test "$cf_with_sysmouse" = yes &&
5152 cat >>confdefs.h <<\EOF
5153 #define USE_SYSMOUSE 1
5154 EOF
5155
5156 fi
5157
5158 if test X"$CC_G_OPT" = X"" ; then
5159         CC_G_OPT='-g'
5160         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5161 fi
5162
5163 if test X"$CXX_G_OPT" = X"" ; then
5164         CXX_G_OPT='-g'
5165         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5166 fi
5167
5168 echo "$as_me:5168: checking for default loader flags" >&5
5169 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5170 case $DFT_LWR_MODEL in
5171 libtool) LD_MODEL=''   ;;
5172 normal)  LD_MODEL=''   ;;
5173 debug)   LD_MODEL=$CC_G_OPT ;;
5174 profile) LD_MODEL='-pg';;
5175 shared)  LD_MODEL=''   ;;
5176 esac
5177 echo "$as_me:5177: result: $LD_MODEL" >&5
5178 echo "${ECHO_T}$LD_MODEL" >&6
5179
5180 case $DFT_LWR_MODEL in
5181 shared)
5182
5183 echo "$as_me:5183: checking if rpath option should be used" >&5
5184 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5185
5186 # Check whether --enable-rpath or --disable-rpath was given.
5187 if test "${enable_rpath+set}" = set; then
5188   enableval="$enable_rpath"
5189   cf_cv_enable_rpath=$enableval
5190 else
5191   cf_cv_enable_rpath=no
5192 fi;
5193 echo "$as_me:5193: result: $cf_cv_enable_rpath" >&5
5194 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5195
5196 echo "$as_me:5196: checking if shared libraries should be relinked during install" >&5
5197 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5198
5199 # Check whether --enable-relink or --disable-relink was given.
5200 if test "${enable_relink+set}" = set; then
5201   enableval="$enable_relink"
5202   cf_cv_do_relink=$enableval
5203 else
5204   cf_cv_do_relink=yes
5205 fi;
5206 echo "$as_me:5206: result: $cf_cv_do_relink" >&5
5207 echo "${ECHO_T}$cf_cv_do_relink" >&6
5208         ;;
5209 esac
5210
5211 LD_RPATH_OPT=
5212 echo "$as_me:5212: checking for an rpath option" >&5
5213 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5214 case $cf_cv_system_name in #(vi
5215 irix*) #(vi
5216         if test "$GCC" = yes; then
5217                 LD_RPATH_OPT="-Wl,-rpath,"
5218         else
5219                 LD_RPATH_OPT="-rpath "
5220         fi
5221         ;;
5222 linux*|gnu*|k*bsd*-gnu) #(vi
5223         LD_RPATH_OPT="-Wl,-rpath,"
5224         ;;
5225 openbsd[2-9].*|mirbsd*) #(vi
5226         LD_RPATH_OPT="-Wl,-rpath,"
5227         ;;
5228 dragonfly*|freebsd*) #(vi
5229         LD_RPATH_OPT="-rpath "
5230         ;;
5231 netbsd*) #(vi
5232         LD_RPATH_OPT="-Wl,-rpath,"
5233         ;;
5234 osf*|mls+*) #(vi
5235         LD_RPATH_OPT="-rpath "
5236         ;;
5237 solaris2*) #(vi
5238         LD_RPATH_OPT="-R"
5239         ;;
5240 *)
5241         ;;
5242 esac
5243 echo "$as_me:5243: result: $LD_RPATH_OPT" >&5
5244 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5245
5246 case "x$LD_RPATH_OPT" in #(vi
5247 x-R*)
5248         echo "$as_me:5248: checking if we need a space after rpath option" >&5
5249 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5250         cf_save_LIBS="$LIBS"
5251         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5252         cat >conftest.$ac_ext <<_ACEOF
5253 #line 5253 "configure"
5254 #include "confdefs.h"
5255
5256 int
5257 main ()
5258 {
5259
5260   ;
5261   return 0;
5262 }
5263 _ACEOF
5264 rm -f conftest.$ac_objext conftest$ac_exeext
5265 if { (eval echo "$as_me:5265: \"$ac_link\"") >&5
5266   (eval $ac_link) 2>&5
5267   ac_status=$?
5268   echo "$as_me:5268: \$? = $ac_status" >&5
5269   (exit $ac_status); } &&
5270          { ac_try='test -s conftest$ac_exeext'
5271   { (eval echo "$as_me:5271: \"$ac_try\"") >&5
5272   (eval $ac_try) 2>&5
5273   ac_status=$?
5274   echo "$as_me:5274: \$? = $ac_status" >&5
5275   (exit $ac_status); }; }; then
5276   cf_rpath_space=no
5277 else
5278   echo "$as_me: failed program was:" >&5
5279 cat conftest.$ac_ext >&5
5280 cf_rpath_space=yes
5281 fi
5282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5283         LIBS="$cf_save_LIBS"
5284         echo "$as_me:5284: result: $cf_rpath_space" >&5
5285 echo "${ECHO_T}$cf_rpath_space" >&6
5286         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5287         ;;
5288 esac
5289
5290         LOCAL_LDFLAGS=
5291         LOCAL_LDFLAGS2=
5292         LD_SHARED_OPTS=
5293         INSTALL_LIB="-m 644"
5294
5295         cf_cv_do_symlinks=no
5296         cf_ld_rpath_opt=
5297         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5298
5299         echo "$as_me:5299: checking if release/abi version should be used for shared libs" >&5
5300 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5301
5302 # Check whether --with-shlib-version or --without-shlib-version was given.
5303 if test "${with_shlib_version+set}" = set; then
5304   withval="$with_shlib_version"
5305   test -z "$withval" && withval=auto
5306         case $withval in #(vi
5307         yes) #(vi
5308                 cf_cv_shlib_version=auto
5309                 ;;
5310         rel|abi|auto|no) #(vi
5311                 cf_cv_shlib_version=$withval
5312                 ;;
5313         *)
5314                 { { echo "$as_me:5314: error: option value must be one of: rel, abi, auto or no" >&5
5315 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5316    { (exit 1); exit 1; }; }
5317                 ;;
5318         esac
5319
5320 else
5321   cf_cv_shlib_version=auto
5322 fi;
5323         echo "$as_me:5323: result: $cf_cv_shlib_version" >&5
5324 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5325
5326         cf_cv_rm_so_locs=no
5327
5328         # Some less-capable ports of gcc support only -fpic
5329         CC_SHARED_OPTS=
5330         if test "$GCC" = yes
5331         then
5332                 echo "$as_me:5332: checking which $CC option to use" >&5
5333 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5334                 cf_save_CFLAGS="$CFLAGS"
5335                 for CC_SHARED_OPTS in -fPIC -fpic ''
5336                 do
5337                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5338                         cat >conftest.$ac_ext <<_ACEOF
5339 #line 5339 "configure"
5340 #include "confdefs.h"
5341 #include <stdio.h>
5342 int
5343 main ()
5344 {
5345 int x = 1
5346   ;
5347   return 0;
5348 }
5349 _ACEOF
5350 rm -f conftest.$ac_objext
5351 if { (eval echo "$as_me:5351: \"$ac_compile\"") >&5
5352   (eval $ac_compile) 2>&5
5353   ac_status=$?
5354   echo "$as_me:5354: \$? = $ac_status" >&5
5355   (exit $ac_status); } &&
5356          { ac_try='test -s conftest.$ac_objext'
5357   { (eval echo "$as_me:5357: \"$ac_try\"") >&5
5358   (eval $ac_try) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit $ac_status); }; }; then
5362   break
5363 else
5364   echo "$as_me: failed program was:" >&5
5365 cat conftest.$ac_ext >&5
5366 fi
5367 rm -f conftest.$ac_objext conftest.$ac_ext
5368                 done
5369                 echo "$as_me:5369: result: $CC_SHARED_OPTS" >&5
5370 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5371                 CFLAGS="$cf_save_CFLAGS"
5372         fi
5373
5374         cf_cv_shlib_version_infix=no
5375
5376         case $cf_cv_system_name in #(vi
5377         aix4.3-9*|aix[5-7]*) #(vi
5378                 if test "$GCC" = yes; then
5379                         CC_SHARED_OPTS=
5380                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5381                 else
5382                         # CC_SHARED_OPTS='-qpic=large -G'
5383                         # perhaps "-bM:SRE -bnoentry -bexpall"
5384                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5385                 fi
5386                 ;;
5387         beos*) #(vi
5388                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5389                 ;;
5390         cygwin*) #(vi
5391                 CC_SHARED_OPTS=
5392                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5393                 cf_cv_shlib_version=cygdll
5394                 cf_cv_shlib_version_infix=cygdll
5395                 cat >mk_shared_lib.sh <<-CF_EOF
5396                 #!/bin/sh
5397                 SHARED_LIB=\$1
5398                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5399                 shift
5400                 cat <<-EOF
5401                 Linking shared library
5402                 ** SHARED_LIB \$SHARED_LIB
5403                 ** IMPORT_LIB \$IMPORT_LIB
5404 EOF
5405                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5406 CF_EOF
5407                 chmod +x mk_shared_lib.sh
5408                 ;;
5409         darwin*) #(vi
5410                 EXTRA_CFLAGS="-no-cpp-precomp"
5411                 CC_SHARED_OPTS="-dynamic"
5412                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5413                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5414                 cf_cv_shlib_version_infix=yes
5415                 echo "$as_me:5415: checking if ld -search_paths_first works" >&5
5416 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5417 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5418   echo $ECHO_N "(cached) $ECHO_C" >&6
5419 else
5420
5421                         cf_save_LDFLAGS=$LDFLAGS
5422                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5423                         cat >conftest.$ac_ext <<_ACEOF
5424 #line 5424 "configure"
5425 #include "confdefs.h"
5426
5427 int
5428 main ()
5429 {
5430 int i;
5431   ;
5432   return 0;
5433 }
5434 _ACEOF
5435 rm -f conftest.$ac_objext conftest$ac_exeext
5436 if { (eval echo "$as_me:5436: \"$ac_link\"") >&5
5437   (eval $ac_link) 2>&5
5438   ac_status=$?
5439   echo "$as_me:5439: \$? = $ac_status" >&5
5440   (exit $ac_status); } &&
5441          { ac_try='test -s conftest$ac_exeext'
5442   { (eval echo "$as_me:5442: \"$ac_try\"") >&5
5443   (eval $ac_try) 2>&5
5444   ac_status=$?
5445   echo "$as_me:5445: \$? = $ac_status" >&5
5446   (exit $ac_status); }; }; then
5447   cf_cv_ldflags_search_paths_first=yes
5448 else
5449   echo "$as_me: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451 cf_cv_ldflags_search_paths_first=no
5452 fi
5453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5454                                 LDFLAGS=$cf_save_LDFLAGS
5455 fi
5456 echo "$as_me:5456: result: $cf_cv_ldflags_search_paths_first" >&5
5457 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5458                 if test $cf_cv_ldflags_search_paths_first = yes; then
5459                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5460                 fi
5461                 ;;
5462         hpux*) #(vi
5463                 # (tested with gcc 2.7.2 -- I don't have c89)
5464                 if test "$GCC" = yes; then
5465                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5466                 else
5467                         CC_SHARED_OPTS='+Z'
5468                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5469                 fi
5470                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5471                 # HP-UX shared libraries must be executable, and should be
5472                 # readonly to exploit a quirk in the memory manager.
5473                 INSTALL_LIB="-m 555"
5474                 ;;
5475         interix*)
5476                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5477                 if test "$cf_cv_shlib_version" = rel; then
5478                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5479                 else
5480                         cf_shared_soname='`basename `'
5481                 fi
5482                 CC_SHARED_OPTS=
5483                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5484                 ;;
5485         irix*) #(vi
5486                 if test "$cf_cv_enable_rpath" = yes ; then
5487                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5488                 fi
5489                 # tested with IRIX 5.2 and 'cc'.
5490                 if test "$GCC" != yes; then
5491                         CC_SHARED_OPTS='-KPIC'
5492                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5493                 else
5494                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5495                 fi
5496                 cf_cv_rm_so_locs=yes
5497                 ;;
5498         linux*|gnu*|k*bsd*-gnu) #(vi
5499                 if test "$DFT_LWR_MODEL" = "shared" ; then
5500                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5501                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5502                 fi
5503                 if test "$cf_cv_enable_rpath" = yes ; then
5504                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5505                 fi
5506
5507         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5508         if test "$cf_cv_shlib_version" = rel; then
5509                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5510         else
5511                 cf_cv_shared_soname='`basename $@`'
5512         fi
5513
5514                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5515                 ;;
5516         mingw*) #(vi
5517                 cf_cv_shlib_version=mingw
5518                 cf_cv_shlib_version_infix=mingw
5519                 CC_SHARED_OPTS=
5520                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5521                 #MK_SHARED_LIB='${CC} ${CFLAGS} -mdll -Wl,-soname,'$cf_cv_shared_soname',-stats -o $[@]'
5522                 #MK_SHARED_LIB='${DLLTOOL} --export-all-symbols --output-exp --output-lib $[@]'
5523                 cat >mk_shared_lib.sh <<-CF_EOF
5524                 #!/bin/sh
5525                 SHARED_LIB=\$1
5526                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5527                 shift
5528                 cat <<-EOF
5529                 Linking shared library
5530                 ** SHARED_LIB \$SHARED_LIB
5531                 ** IMPORT_LIB \$IMPORT_LIB
5532 EOF
5533                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5534 CF_EOF
5535                 chmod +x mk_shared_lib.sh
5536                 ;;
5537         openbsd[2-9].*|mirbsd*) #(vi
5538                 if test "$DFT_LWR_MODEL" = "shared" ; then
5539                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5540                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5541                 fi
5542                 if test "$cf_cv_enable_rpath" = yes ; then
5543                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5544                 fi
5545                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5546
5547         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5548         if test "$cf_cv_shlib_version" = rel; then
5549                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5550         else
5551                 cf_cv_shared_soname='`basename $@`'
5552         fi
5553
5554                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5555                 ;;
5556         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5557                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5558                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5559                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5560                 ;;
5561         dragonfly*|freebsd*) #(vi
5562                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5563                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5564                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5565                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5566                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5567                 fi
5568
5569         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5570         if test "$cf_cv_shlib_version" = rel; then
5571                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5572         else
5573                 cf_cv_shared_soname='`basename $@`'
5574         fi
5575
5576                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5577                 ;;
5578         netbsd*) #(vi
5579                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5580                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5581                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5582                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5583                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5584                         if test "$cf_cv_shlib_version" = auto; then
5585                         if test -f /usr/libexec/ld.elf_so; then
5586                                 cf_cv_shlib_version=abi
5587                         else
5588                                 cf_cv_shlib_version=rel
5589                         fi
5590                         fi
5591
5592         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5593         if test "$cf_cv_shlib_version" = rel; then
5594                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5595         else
5596                 cf_cv_shared_soname='`basename $@`'
5597         fi
5598
5599                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5600                 else
5601                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5602                 fi
5603                 ;;
5604         osf*|mls+*) #(vi
5605                 # tested with OSF/1 V3.2 and 'cc'
5606                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5607                 # link with shared libs).
5608                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5609                 case $host_os in #(vi
5610                 osf4*)
5611                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5612                         ;;
5613                 esac
5614                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5615                 if test "$DFT_LWR_MODEL" = "shared" ; then
5616                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5617                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5618                 fi
5619                 cf_cv_rm_so_locs=yes
5620                 ;;
5621         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5622                 # tested with osr5.0.5
5623                 if test "$GCC" != yes; then
5624                         CC_SHARED_OPTS='-belf -KPIC'
5625                 fi
5626                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5627                 if test "$cf_cv_enable_rpath" = yes ; then
5628                         # only way is to set LD_RUN_PATH but no switch for it
5629                         RUN_PATH=$libdir
5630                 fi
5631                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5632                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5633                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5634                 ;;
5635         sunos4*) #(vi
5636                 # tested with SunOS 4.1.1 and gcc 2.7.0
5637                 if test "$GCC" != yes; then
5638                         CC_SHARED_OPTS='-KPIC'
5639                 fi
5640                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5641                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5642                 ;;
5643         solaris2*) #(vi
5644                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5645                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5646                 if test "$DFT_LWR_MODEL" = "shared" ; then
5647                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5648                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5649                 fi
5650                 if test "$cf_cv_enable_rpath" = yes ; then
5651                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5652                 fi
5653
5654         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5655         if test "$cf_cv_shlib_version" = rel; then
5656                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5657         else
5658                 cf_cv_shared_soname='`basename $@`'
5659         fi
5660
5661                 if test "$GCC" != yes; then
5662                         cf_save_CFLAGS="$CFLAGS"
5663                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5664                         do
5665                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5666                                 cat >conftest.$ac_ext <<_ACEOF
5667 #line 5667 "configure"
5668 #include "confdefs.h"
5669 #include <stdio.h>
5670 int
5671 main ()
5672 {
5673 printf("Hello\n");
5674   ;
5675   return 0;
5676 }
5677 _ACEOF
5678 rm -f conftest.$ac_objext
5679 if { (eval echo "$as_me:5679: \"$ac_compile\"") >&5
5680   (eval $ac_compile) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); } &&
5684          { ac_try='test -s conftest.$ac_objext'
5685   { (eval echo "$as_me:5685: \"$ac_try\"") >&5
5686   (eval $ac_try) 2>&5
5687   ac_status=$?
5688   echo "$as_me:5688: \$? = $ac_status" >&5
5689   (exit $ac_status); }; }; then
5690   break
5691 else
5692   echo "$as_me: failed program was:" >&5
5693 cat conftest.$ac_ext >&5
5694 fi
5695 rm -f conftest.$ac_objext conftest.$ac_ext
5696                         done
5697                         CFLAGS="$cf_save_CFLAGS"
5698                         CC_SHARED_OPTS=$cf_shared_opts
5699                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5700                 else
5701                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5702                 fi
5703                 ;;
5704         sysv5uw7*|unix_sv*) #(vi
5705                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5706                 if test "$GCC" != yes; then
5707                         CC_SHARED_OPTS='-KPIC'
5708                 fi
5709                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5710                 ;;
5711         *)
5712                 CC_SHARED_OPTS='unknown'
5713                 MK_SHARED_LIB='echo unknown'
5714                 ;;
5715         esac
5716
5717         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5718         case "$cf_cv_shlib_version" in #(vi
5719         rel|abi)
5720                 case "$MK_SHARED_LIB" in #(vi
5721                 *'-o $@') #(vi
5722                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5723                         ;;
5724                 *)
5725                         { echo "$as_me:5725: WARNING: ignored --with-shlib-version" >&5
5726 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5727                         ;;
5728                 esac
5729                 ;;
5730         esac
5731
5732         # RPATH_LIST is a colon-separated list of directories
5733         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
5734         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
5735
5736         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
5737
5738 echo "${as_me:-configure}:5738: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
5739
5740         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
5741
5742 echo "${as_me:-configure}:5742: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
5743
5744 if test "$CC_SHARED_OPTS" = "unknown"; then
5745         for model in $cf_list_models; do
5746                 if test "$model" = "shared"; then
5747                         { { echo "$as_me:5747: error: Shared libraries are not supported in this version" >&5
5748 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5749    { (exit 1); exit 1; }; }
5750                 fi
5751         done
5752 fi
5753
5754 ### If we're building with rpath, try to link non-standard libs that way too.
5755 if test "$DFT_LWR_MODEL" = "shared"; then
5756
5757 echo "$as_me:5757: checking if rpath-hack should be disabled" >&5
5758 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
5759
5760 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
5761 if test "${enable_rpath_hack+set}" = set; then
5762   enableval="$enable_rpath_hack"
5763   test "$enableval" != no && enableval=yes
5764   if test "$enableval" != "yes" ; then
5765     cf_disable_rpath_hack=yes
5766   else
5767     cf_disable_rpath_hack=no
5768   fi
5769 else
5770   enableval=yes
5771   cf_disable_rpath_hack=no
5772
5773 fi;
5774 echo "$as_me:5774: result: $cf_disable_rpath_hack" >&5
5775 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
5776 if test "$cf_disable_rpath_hack" = no ; then
5777
5778 echo "$as_me:5778: checking for updated LDFLAGS" >&5
5779 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
5780 if test -n "$LD_RPATH_OPT" ; then
5781         echo "$as_me:5781: result: maybe" >&5
5782 echo "${ECHO_T}maybe" >&6
5783
5784         for ac_prog in ldd
5785 do
5786   # Extract the first word of "$ac_prog", so it can be a program name with args.
5787 set dummy $ac_prog; ac_word=$2
5788 echo "$as_me:5788: checking for $ac_word" >&5
5789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5790 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
5791   echo $ECHO_N "(cached) $ECHO_C" >&6
5792 else
5793   if test -n "$cf_ldd_prog"; then
5794   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
5795 else
5796   ac_save_IFS=$IFS; IFS=$ac_path_separator
5797 ac_dummy="$PATH"
5798 for ac_dir in $ac_dummy; do
5799   IFS=$ac_save_IFS
5800   test -z "$ac_dir" && ac_dir=.
5801   $as_executable_p "$ac_dir/$ac_word" || continue
5802 ac_cv_prog_cf_ldd_prog="$ac_prog"
5803 echo "$as_me:5803: found $ac_dir/$ac_word" >&5
5804 break
5805 done
5806
5807 fi
5808 fi
5809 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
5810 if test -n "$cf_ldd_prog"; then
5811   echo "$as_me:5811: result: $cf_ldd_prog" >&5
5812 echo "${ECHO_T}$cf_ldd_prog" >&6
5813 else
5814   echo "$as_me:5814: result: no" >&5
5815 echo "${ECHO_T}no" >&6
5816 fi
5817
5818   test -n "$cf_ldd_prog" && break
5819 done
5820 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
5821
5822         cf_rpath_list="/usr/lib /lib"
5823         if test "$cf_ldd_prog" != no
5824         then
5825                 cf_rpath_oops=
5826
5827 cat >conftest.$ac_ext <<_ACEOF
5828 #line 5828 "configure"
5829 #include "confdefs.h"
5830 #include <stdio.h>
5831 int
5832 main ()
5833 {
5834 printf("Hello");
5835   ;
5836   return 0;
5837 }
5838 _ACEOF
5839 rm -f conftest.$ac_objext conftest$ac_exeext
5840 if { (eval echo "$as_me:5840: \"$ac_link\"") >&5
5841   (eval $ac_link) 2>&5
5842   ac_status=$?
5843   echo "$as_me:5843: \$? = $ac_status" >&5
5844   (exit $ac_status); } &&
5845          { ac_try='test -s conftest$ac_exeext'
5846   { (eval echo "$as_me:5846: \"$ac_try\"") >&5
5847   (eval $ac_try) 2>&5
5848   ac_status=$?
5849   echo "$as_me:5849: \$? = $ac_status" >&5
5850   (exit $ac_status); }; }; then
5851   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
5852                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
5853 else
5854   echo "$as_me: failed program was:" >&5
5855 cat conftest.$ac_ext >&5
5856 fi
5857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5858
5859                 # If we passed the link-test, but get a "not found" on a given library,
5860                 # this could be due to inept reconfiguration of gcc to make it only
5861                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
5862                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
5863                 # /usr/local libraries.
5864                 if test -n "$cf_rpath_oops"
5865                 then
5866                         for cf_rpath_src in $cf_rpath_oops
5867                         do
5868                                 for cf_rpath_dir in \
5869                                         /usr/local \
5870                                         /usr/pkg \
5871                                         /opt/sfw
5872                                 do
5873                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
5874                                         then
5875                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
5876
5877 echo "${as_me:-configure}:5877: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
5878
5879                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
5880                                                 break
5881                                         fi
5882                                 done
5883                         done
5884                 fi
5885         fi
5886
5887         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
5888
5889 echo "${as_me:-configure}:5889: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
5890
5891 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
5892
5893 echo "${as_me:-configure}:5893: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
5894
5895 cf_rpath_dst=
5896 for cf_rpath_src in $LDFLAGS
5897 do
5898         case $cf_rpath_src in #(vi
5899         -L*) #(vi
5900
5901                 # check if this refers to a directory which we will ignore
5902                 cf_rpath_skip=no
5903                 if test -n "$cf_rpath_list"
5904                 then
5905                         for cf_rpath_item in $cf_rpath_list
5906                         do
5907                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5908                                 then
5909                                         cf_rpath_skip=yes
5910                                         break
5911                                 fi
5912                         done
5913                 fi
5914
5915                 if test "$cf_rpath_skip" = no
5916                 then
5917                         # transform the option
5918                         if test "$LD_RPATH_OPT" = "-R " ; then
5919                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5920                         else
5921                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5922                         fi
5923
5924                         # if we have not already added this, add it now
5925                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5926                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5927                         then
5928                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5929
5930 echo "${as_me:-configure}:5930: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5931
5932                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5933                         fi
5934                 fi
5935                 ;;
5936         esac
5937         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5938 done
5939 LDFLAGS=$cf_rpath_dst
5940
5941 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
5942
5943 echo "${as_me:-configure}:5943: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
5944
5945 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
5946
5947 echo "${as_me:-configure}:5947: testing ...checking LIBS $LIBS ..." 1>&5
5948
5949 cf_rpath_dst=
5950 for cf_rpath_src in $LIBS
5951 do
5952         case $cf_rpath_src in #(vi
5953         -L*) #(vi
5954
5955                 # check if this refers to a directory which we will ignore
5956                 cf_rpath_skip=no
5957                 if test -n "$cf_rpath_list"
5958                 then
5959                         for cf_rpath_item in $cf_rpath_list
5960                         do
5961                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
5962                                 then
5963                                         cf_rpath_skip=yes
5964                                         break
5965                                 fi
5966                         done
5967                 fi
5968
5969                 if test "$cf_rpath_skip" = no
5970                 then
5971                         # transform the option
5972                         if test "$LD_RPATH_OPT" = "-R " ; then
5973                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
5974                         else
5975                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
5976                         fi
5977
5978                         # if we have not already added this, add it now
5979                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
5980                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
5981                         then
5982                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
5983
5984 echo "${as_me:-configure}:5984: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
5985
5986                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
5987                         fi
5988                 fi
5989                 ;;
5990         esac
5991         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
5992 done
5993 LIBS=$cf_rpath_dst
5994
5995 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
5996
5997 echo "${as_me:-configure}:5997: testing ...checked LIBS $LIBS ..." 1>&5
5998
5999         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6000
6001 echo "${as_me:-configure}:6001: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6002
6003 fi
6004
6005 fi
6006
6007 fi
6008
6009 ###############################################################################
6010
6011 ###     use option --disable-overwrite to leave out the link to -lcurses
6012 echo "$as_me:6012: checking if you wish to install ncurses overwriting curses" >&5
6013 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6014
6015 # Check whether --enable-overwrite or --disable-overwrite was given.
6016 if test "${enable_overwrite+set}" = set; then
6017   enableval="$enable_overwrite"
6018   with_overwrite=$enableval
6019 else
6020   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6021 fi;
6022 echo "$as_me:6022: result: $with_overwrite" >&5
6023 echo "${ECHO_T}$with_overwrite" >&6
6024
6025 echo "$as_me:6025: checking if external terminfo-database is used" >&5
6026 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6027
6028 # Check whether --enable-database or --disable-database was given.
6029 if test "${enable_database+set}" = set; then
6030   enableval="$enable_database"
6031   use_database=$enableval
6032 else
6033   use_database=yes
6034 fi;
6035 echo "$as_me:6035: result: $use_database" >&5
6036 echo "${ECHO_T}$use_database" >&6
6037
6038 case $host_os in #(vi
6039 os2*) #(vi
6040         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6041         ;;
6042 *) #(vi
6043         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6044         ;;
6045 esac
6046
6047 if test "$use_database" != no ; then
6048
6049 cat >>confdefs.h <<\EOF
6050 #define USE_DATABASE 1
6051 EOF
6052
6053         echo "$as_me:6053: checking which terminfo source-file will be installed" >&5
6054 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6055
6056 # Check whether --with-database or --without-database was given.
6057 if test "${with_database+set}" = set; then
6058   withval="$with_database"
6059   TERMINFO_SRC=$withval
6060 fi;
6061         echo "$as_me:6061: result: $TERMINFO_SRC" >&5
6062 echo "${ECHO_T}$TERMINFO_SRC" >&6
6063
6064         echo "$as_me:6064: checking whether to use hashed database instead of directory/tree" >&5
6065 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6066
6067 # Check whether --with-hashed-db or --without-hashed-db was given.
6068 if test "${with_hashed_db+set}" = set; then
6069   withval="$with_hashed_db"
6070
6071 else
6072   with_hashed_db=no
6073 fi;
6074         echo "$as_me:6074: result: $with_hashed_db" >&5
6075 echo "${ECHO_T}$with_hashed_db" >&6
6076 else
6077         with_hashed_db=no
6078 fi
6079
6080 echo "$as_me:6080: checking for list of fallback descriptions" >&5
6081 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6082
6083 # Check whether --with-fallbacks or --without-fallbacks was given.
6084 if test "${with_fallbacks+set}" = set; then
6085   withval="$with_fallbacks"
6086   with_fallback=$withval
6087 else
6088   with_fallback=
6089 fi;
6090 echo "$as_me:6090: result: $with_fallback" >&5
6091 echo "${ECHO_T}$with_fallback" >&6
6092 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6093
6094 echo "$as_me:6094: checking if you want modern xterm or antique" >&5
6095 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6096
6097 # Check whether --with-xterm-new or --without-xterm-new was given.
6098 if test "${with_xterm_new+set}" = set; then
6099   withval="$with_xterm_new"
6100   with_xterm_new=$withval
6101 else
6102   with_xterm_new=yes
6103 fi;
6104 case $with_xterm_new in
6105 no)     with_xterm_new=xterm-old;;
6106 *)      with_xterm_new=xterm-new;;
6107 esac
6108 echo "$as_me:6108: result: $with_xterm_new" >&5
6109 echo "${ECHO_T}$with_xterm_new" >&6
6110 WHICH_XTERM=$with_xterm_new
6111
6112 echo "$as_me:6112: checking if xterm backspace sends BS or DEL" >&5
6113 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6114
6115 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6116 if test "${with_xterm_kbs+set}" = set; then
6117   withval="$with_xterm_kbs"
6118   with_xterm_kbs=$withval
6119 else
6120   with_xterm_kbs=BS
6121 fi;
6122 case x$with_xterm_kbs in
6123 xyes|xno|xBS|xbs|x8)
6124         with_xterm_kbs=BS
6125         ;;
6126 xDEL|xdel|x127)
6127         with_xterm_kbs=DEL
6128         ;;
6129 *)
6130         with_xterm_kbs=$withval
6131         ;;
6132 esac
6133 echo "$as_me:6133: result: $with_xterm_kbs" >&5
6134 echo "${ECHO_T}$with_xterm_kbs" >&6
6135 XTERM_KBS=$with_xterm_kbs
6136
6137 MAKE_TERMINFO=
6138 if test "$use_database" = no ; then
6139         TERMINFO="${datadir}/terminfo"
6140         MAKE_TERMINFO="#"
6141 else
6142
6143 echo "$as_me:6143: checking for list of terminfo directories" >&5
6144 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6145
6146 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6147 if test "${with_terminfo_dirs+set}" = set; then
6148   withval="$with_terminfo_dirs"
6149
6150 else
6151   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6152 fi;
6153 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6154 cf_dst_path=
6155 for cf_src_path in $withval
6156 do
6157
6158 if test "x$prefix" != xNONE; then
6159   cf_path_syntax="$prefix"
6160 else
6161   cf_path_syntax="$ac_default_prefix"
6162 fi
6163
6164 case ".$cf_src_path" in #(vi
6165 .\$\(*\)*|.\'*\'*) #(vi
6166   ;;
6167 ..|./*|.\\*) #(vi
6168   ;;
6169 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6170   ;;
6171 .\${*prefix}*|.\${*dir}*) #(vi
6172   eval cf_src_path="$cf_src_path"
6173   case ".$cf_src_path" in #(vi
6174   .NONE/*)
6175     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6176     ;;
6177   esac
6178   ;; #(vi
6179 .no|.NONE/*)
6180   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6181   ;;
6182 *)
6183   { { echo "$as_me:6183: error: expected a pathname, not \"$cf_src_path\"" >&5
6184 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6185    { (exit 1); exit 1; }; }
6186   ;;
6187 esac
6188
6189   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6190   cf_dst_path="${cf_dst_path}${cf_src_path}"
6191 done
6192 IFS="$ac_save_ifs"
6193
6194 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6195 # so we have to check/work around.  We do prefer the result of "eval"...
6196 eval cf_dst_eval="$cf_dst_path"
6197 case "x$cf_dst_eval" in #(vi
6198 xNONE*) #(vi
6199         TERMINFO_DIRS=$cf_dst_path
6200         ;;
6201 *)
6202         TERMINFO_DIRS="$cf_dst_eval"
6203         ;;
6204 esac
6205
6206 echo "$as_me:6206: result: $TERMINFO_DIRS" >&5
6207 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6208 test -n "$TERMINFO_DIRS" &&
6209 cat >>confdefs.h <<EOF
6210 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6211 EOF
6212
6213 echo "$as_me:6213: checking for default terminfo directory" >&5
6214 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6215
6216 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6217 if test "${with_default_terminfo_dir+set}" = set; then
6218   withval="$with_default_terminfo_dir"
6219
6220 else
6221   withval="${TERMINFO:-${datadir}/terminfo}"
6222 fi; if test -n "${datadir}/terminfo" ; then
6223
6224 if test "x$prefix" != xNONE; then
6225   cf_path_syntax="$prefix"
6226 else
6227   cf_path_syntax="$ac_default_prefix"
6228 fi
6229
6230 case ".$withval" in #(vi
6231 .\$\(*\)*|.\'*\'*) #(vi
6232   ;;
6233 ..|./*|.\\*) #(vi
6234   ;;
6235 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6236   ;;
6237 .\${*prefix}*|.\${*dir}*) #(vi
6238   eval withval="$withval"
6239   case ".$withval" in #(vi
6240   .NONE/*)
6241     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6242     ;;
6243   esac
6244   ;; #(vi
6245 .no|.NONE/*)
6246   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6247   ;;
6248 *)
6249   { { echo "$as_me:6249: error: expected a pathname, not \"$withval\"" >&5
6250 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6251    { (exit 1); exit 1; }; }
6252   ;;
6253 esac
6254
6255 fi
6256 eval TERMINFO="$withval"
6257
6258 echo "$as_me:6258: result: $TERMINFO" >&5
6259 echo "${ECHO_T}$TERMINFO" >&6
6260
6261 cat >>confdefs.h <<EOF
6262 #define TERMINFO "$TERMINFO"
6263 EOF
6264
6265 fi
6266
6267 ###     use option --disable-big-core to make tic run on small machines
6268 ###     We need 4Mb, check if we can allocate 50% more than that.
6269 echo "$as_me:6269: checking if big-core option selected" >&5
6270 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6271
6272 # Check whether --enable-big-core or --disable-big-core was given.
6273 if test "${enable_big_core+set}" = set; then
6274   enableval="$enable_big_core"
6275   with_big_core=$enableval
6276 else
6277   if test "$cross_compiling" = yes; then
6278   with_big_core=no
6279 else
6280   cat >conftest.$ac_ext <<_ACEOF
6281 #line 6281 "configure"
6282 #include "confdefs.h"
6283
6284 #include <stdlib.h>
6285 #include <string.h>
6286 int main() {
6287         unsigned long n = 6000000L;
6288         char *s = malloc(n);
6289         if (s != 0)
6290                 s[0] = s[n-1] = 0;
6291         ${cf_cv_main_return:-return}(s == 0);
6292 }
6293 _ACEOF
6294 rm -f conftest$ac_exeext
6295 if { (eval echo "$as_me:6295: \"$ac_link\"") >&5
6296   (eval $ac_link) 2>&5
6297   ac_status=$?
6298   echo "$as_me:6298: \$? = $ac_status" >&5
6299   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6300   { (eval echo "$as_me:6300: \"$ac_try\"") >&5
6301   (eval $ac_try) 2>&5
6302   ac_status=$?
6303   echo "$as_me:6303: \$? = $ac_status" >&5
6304   (exit $ac_status); }; }; then
6305   with_big_core=yes
6306 else
6307   echo "$as_me: program exited with status $ac_status" >&5
6308 echo "$as_me: failed program was:" >&5
6309 cat conftest.$ac_ext >&5
6310 with_big_core=no
6311 fi
6312 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6313 fi
6314 fi;
6315 echo "$as_me:6315: result: $with_big_core" >&5
6316 echo "${ECHO_T}$with_big_core" >&6
6317 test "x$with_big_core" = "xyes" &&
6318 cat >>confdefs.h <<\EOF
6319 #define HAVE_BIG_CORE 1
6320 EOF
6321
6322 ### ISO C only guarantees 512-char strings, we have tables which load faster
6323 ### when constructed using "big" strings.  More than the C compiler, the awk
6324 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6325 echo "$as_me:6325: checking if big-strings option selected" >&5
6326 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6327
6328 # Check whether --enable-big-strings or --disable-big-strings was given.
6329 if test "${enable_big_strings+set}" = set; then
6330   enableval="$enable_big_strings"
6331   with_big_strings=$enableval
6332 else
6333
6334         case x$AWK in #(vi
6335         x)
6336                 eval with_big_strings=no
6337                 ;;
6338         *) #(vi
6339                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6340                         | $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
6341                         eval with_big_strings=yes
6342                 else
6343                         eval with_big_strings=no
6344                 fi
6345                 ;;
6346         esac
6347
6348 fi;
6349 echo "$as_me:6349: result: $with_big_strings" >&5
6350 echo "${ECHO_T}$with_big_strings" >&6
6351
6352 USE_BIG_STRINGS=0
6353 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6354
6355 ###     use option --enable-termcap to compile in the termcap fallback support
6356 echo "$as_me:6356: checking if you want termcap-fallback support" >&5
6357 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6358
6359 # Check whether --enable-termcap or --disable-termcap was given.
6360 if test "${enable_termcap+set}" = set; then
6361   enableval="$enable_termcap"
6362   with_termcap=$enableval
6363 else
6364   with_termcap=no
6365 fi;
6366 echo "$as_me:6366: result: $with_termcap" >&5
6367 echo "${ECHO_T}$with_termcap" >&6
6368
6369 if test "x$with_termcap" != "xyes" ; then
6370         if test "$use_database" = no ; then
6371                 if test -z "$with_fallback" ; then
6372                         { { echo "$as_me:6372: error: You have disabled the database w/o specifying fallbacks" >&5
6373 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6374    { (exit 1); exit 1; }; }
6375                 fi
6376         fi
6377
6378 cat >>confdefs.h <<\EOF
6379 #define PURE_TERMINFO 1
6380 EOF
6381
6382 else
6383
6384 if test "$with_ticlib" != no ; then
6385         { { echo "$as_me:6385: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6386 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6387    { (exit 1); exit 1; }; }
6388 fi
6389
6390 cat >>confdefs.h <<\EOF
6391 #define USE_TERMCAP 1
6392 EOF
6393
6394 echo "$as_me:6394: checking for list of termcap files" >&5
6395 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6396
6397 # Check whether --with-termpath or --without-termpath was given.
6398 if test "${with_termpath+set}" = set; then
6399   withval="$with_termpath"
6400
6401 else
6402   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6403 fi;
6404 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6405 cf_dst_path=
6406 for cf_src_path in $withval
6407 do
6408
6409 if test "x$prefix" != xNONE; then
6410   cf_path_syntax="$prefix"
6411 else
6412   cf_path_syntax="$ac_default_prefix"
6413 fi
6414
6415 case ".$cf_src_path" in #(vi
6416 .\$\(*\)*|.\'*\'*) #(vi
6417   ;;
6418 ..|./*|.\\*) #(vi
6419   ;;
6420 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6421   ;;
6422 .\${*prefix}*|.\${*dir}*) #(vi
6423   eval cf_src_path="$cf_src_path"
6424   case ".$cf_src_path" in #(vi
6425   .NONE/*)
6426     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6427     ;;
6428   esac
6429   ;; #(vi
6430 .no|.NONE/*)
6431   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6432   ;;
6433 *)
6434   { { echo "$as_me:6434: error: expected a pathname, not \"$cf_src_path\"" >&5
6435 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6436    { (exit 1); exit 1; }; }
6437   ;;
6438 esac
6439
6440   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6441   cf_dst_path="${cf_dst_path}${cf_src_path}"
6442 done
6443 IFS="$ac_save_ifs"
6444
6445 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6446 # so we have to check/work around.  We do prefer the result of "eval"...
6447 eval cf_dst_eval="$cf_dst_path"
6448 case "x$cf_dst_eval" in #(vi
6449 xNONE*) #(vi
6450         TERMPATH=$cf_dst_path
6451         ;;
6452 *)
6453         TERMPATH="$cf_dst_eval"
6454         ;;
6455 esac
6456
6457 echo "$as_me:6457: result: $TERMPATH" >&5
6458 echo "${ECHO_T}$TERMPATH" >&6
6459 test -n "$TERMPATH" &&
6460 cat >>confdefs.h <<EOF
6461 #define TERMPATH "$TERMPATH"
6462 EOF
6463
6464 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6465 echo "$as_me:6465: checking if fast termcap-loader is needed" >&5
6466 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6467
6468 # Check whether --enable-getcap or --disable-getcap was given.
6469 if test "${enable_getcap+set}" = set; then
6470   enableval="$enable_getcap"
6471   with_getcap=$enableval
6472 else
6473   with_getcap=no
6474 fi;
6475 echo "$as_me:6475: result: $with_getcap" >&5
6476 echo "${ECHO_T}$with_getcap" >&6
6477 test "x$with_getcap" = "xyes" &&
6478 cat >>confdefs.h <<\EOF
6479 #define USE_GETCAP 1
6480 EOF
6481
6482 echo "$as_me:6482: checking if translated termcaps will be cached in ~/.terminfo" >&5
6483 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6484
6485 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6486 if test "${enable_getcap_cache+set}" = set; then
6487   enableval="$enable_getcap_cache"
6488   with_getcap_cache=$enableval
6489 else
6490   with_getcap_cache=no
6491 fi;
6492 echo "$as_me:6492: result: $with_getcap_cache" >&5
6493 echo "${ECHO_T}$with_getcap_cache" >&6
6494 test "x$with_getcap_cache" = "xyes" &&
6495 cat >>confdefs.h <<\EOF
6496 #define USE_GETCAP_CACHE 1
6497 EOF
6498
6499 fi
6500
6501 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6502 echo "$as_me:6502: checking if ~/.terminfo is wanted" >&5
6503 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6504
6505 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6506 if test "${enable_home_terminfo+set}" = set; then
6507   enableval="$enable_home_terminfo"
6508   with_home_terminfo=$enableval
6509 else
6510   with_home_terminfo=yes
6511 fi;
6512 echo "$as_me:6512: result: $with_home_terminfo" >&5
6513 echo "${ECHO_T}$with_home_terminfo" >&6
6514 test "x$with_home_terminfo" = "xyes" &&
6515 cat >>confdefs.h <<\EOF
6516 #define USE_HOME_TERMINFO 1
6517 EOF
6518
6519 echo "$as_me:6519: checking if you want to use restricted environment when running as root" >&5
6520 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6521
6522 # Check whether --enable-root-environ or --disable-root-environ was given.
6523 if test "${enable_root_environ+set}" = set; then
6524   enableval="$enable_root_environ"
6525   with_root_environ=$enableval
6526 else
6527   with_root_environ=yes
6528 fi;
6529 echo "$as_me:6529: result: $with_root_environ" >&5
6530 echo "${ECHO_T}$with_root_environ" >&6
6531 test "x$with_root_environ" = xyes &&
6532 cat >>confdefs.h <<\EOF
6533 #define USE_ROOT_ENVIRON 1
6534 EOF
6535
6536 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6537 ###   to reduce storage requirements for the terminfo database.
6538
6539 for ac_func in \
6540         remove \
6541         unlink
6542 do
6543 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6544 echo "$as_me:6544: checking for $ac_func" >&5
6545 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6546 if eval "test \"\${$as_ac_var+set}\" = set"; then
6547   echo $ECHO_N "(cached) $ECHO_C" >&6
6548 else
6549   cat >conftest.$ac_ext <<_ACEOF
6550 #line 6550 "configure"
6551 #include "confdefs.h"
6552 /* System header to define __stub macros and hopefully few prototypes,
6553     which can conflict with char $ac_func (); below.  */
6554 #include <assert.h>
6555 /* Override any gcc2 internal prototype to avoid an error.  */
6556 #ifdef __cplusplus
6557 extern "C"
6558 #endif
6559 /* We use char because int might match the return type of a gcc2
6560    builtin and then its argument prototype would still apply.  */
6561 char $ac_func ();
6562 char (*f) ();
6563
6564 int
6565 main ()
6566 {
6567 /* The GNU C library defines this for functions which it implements
6568     to always fail with ENOSYS.  Some functions are actually named
6569     something starting with __ and the normal name is an alias.  */
6570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6571 choke me
6572 #else
6573 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6574 #endif
6575
6576   ;
6577   return 0;
6578 }
6579 _ACEOF
6580 rm -f conftest.$ac_objext conftest$ac_exeext
6581 if { (eval echo "$as_me:6581: \"$ac_link\"") >&5
6582   (eval $ac_link) 2>&5
6583   ac_status=$?
6584   echo "$as_me:6584: \$? = $ac_status" >&5
6585   (exit $ac_status); } &&
6586          { ac_try='test -s conftest$ac_exeext'
6587   { (eval echo "$as_me:6587: \"$ac_try\"") >&5
6588   (eval $ac_try) 2>&5
6589   ac_status=$?
6590   echo "$as_me:6590: \$? = $ac_status" >&5
6591   (exit $ac_status); }; }; then
6592   eval "$as_ac_var=yes"
6593 else
6594   echo "$as_me: failed program was:" >&5
6595 cat conftest.$ac_ext >&5
6596 eval "$as_ac_var=no"
6597 fi
6598 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6599 fi
6600 echo "$as_me:6600: result: `eval echo '${'$as_ac_var'}'`" >&5
6601 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6602 if test `eval echo '${'$as_ac_var'}'` = yes; then
6603   cat >>confdefs.h <<EOF
6604 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6605 EOF
6606
6607 fi
6608 done
6609
6610 if test "$cross_compiling" = yes ; then
6611
6612 for ac_func in \
6613                 link \
6614                 symlink
6615 do
6616 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6617 echo "$as_me:6617: checking for $ac_func" >&5
6618 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6619 if eval "test \"\${$as_ac_var+set}\" = set"; then
6620   echo $ECHO_N "(cached) $ECHO_C" >&6
6621 else
6622   cat >conftest.$ac_ext <<_ACEOF
6623 #line 6623 "configure"
6624 #include "confdefs.h"
6625 /* System header to define __stub macros and hopefully few prototypes,
6626     which can conflict with char $ac_func (); below.  */
6627 #include <assert.h>
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 #ifdef __cplusplus
6630 extern "C"
6631 #endif
6632 /* We use char because int might match the return type of a gcc2
6633    builtin and then its argument prototype would still apply.  */
6634 char $ac_func ();
6635 char (*f) ();
6636
6637 int
6638 main ()
6639 {
6640 /* The GNU C library defines this for functions which it implements
6641     to always fail with ENOSYS.  Some functions are actually named
6642     something starting with __ and the normal name is an alias.  */
6643 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6644 choke me
6645 #else
6646 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6647 #endif
6648
6649   ;
6650   return 0;
6651 }
6652 _ACEOF
6653 rm -f conftest.$ac_objext conftest$ac_exeext
6654 if { (eval echo "$as_me:6654: \"$ac_link\"") >&5
6655   (eval $ac_link) 2>&5
6656   ac_status=$?
6657   echo "$as_me:6657: \$? = $ac_status" >&5
6658   (exit $ac_status); } &&
6659          { ac_try='test -s conftest$ac_exeext'
6660   { (eval echo "$as_me:6660: \"$ac_try\"") >&5
6661   (eval $ac_try) 2>&5
6662   ac_status=$?
6663   echo "$as_me:6663: \$? = $ac_status" >&5
6664   (exit $ac_status); }; }; then
6665   eval "$as_ac_var=yes"
6666 else
6667   echo "$as_me: failed program was:" >&5
6668 cat conftest.$ac_ext >&5
6669 eval "$as_ac_var=no"
6670 fi
6671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6672 fi
6673 echo "$as_me:6673: result: `eval echo '${'$as_ac_var'}'`" >&5
6674 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6675 if test `eval echo '${'$as_ac_var'}'` = yes; then
6676   cat >>confdefs.h <<EOF
6677 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6678 EOF
6679
6680 fi
6681 done
6682
6683 else
6684         echo "$as_me:6684: checking if link/symlink functions work" >&5
6685 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6686 if test "${cf_cv_link_funcs+set}" = set; then
6687   echo $ECHO_N "(cached) $ECHO_C" >&6
6688 else
6689
6690                 cf_cv_link_funcs=
6691                 for cf_func in link symlink ; do
6692                         if test "$cross_compiling" = yes; then
6693
6694                         eval 'ac_cv_func_'$cf_func'=error'
6695 else
6696   cat >conftest.$ac_ext <<_ACEOF
6697 #line 6697 "configure"
6698 #include "confdefs.h"
6699
6700 #include <sys/types.h>
6701 #include <sys/stat.h>
6702 #ifdef HAVE_UNISTD_H
6703 #include <unistd.h>
6704 #endif
6705 int main()
6706 {
6707         int fail = 0;
6708         char *src = "config.log";
6709         char *dst = "conftest.chk";
6710         struct stat src_sb;
6711         struct stat dst_sb;
6712
6713         stat(src, &src_sb);
6714         fail = ($cf_func("config.log", "conftest.chk") < 0)
6715             || (stat(dst, &dst_sb) < 0)
6716             || (dst_sb.st_mtime != src_sb.st_mtime);
6717 #ifdef HAVE_UNLINK
6718         unlink(dst);
6719 #else
6720         remove(dst);
6721 #endif
6722         ${cf_cv_main_return:-return} (fail);
6723 }
6724
6725 _ACEOF
6726 rm -f conftest$ac_exeext
6727 if { (eval echo "$as_me:6727: \"$ac_link\"") >&5
6728   (eval $ac_link) 2>&5
6729   ac_status=$?
6730   echo "$as_me:6730: \$? = $ac_status" >&5
6731   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6732   { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733   (eval $ac_try) 2>&5
6734   ac_status=$?
6735   echo "$as_me:6735: \$? = $ac_status" >&5
6736   (exit $ac_status); }; }; then
6737
6738                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6739                         eval 'ac_cv_func_'$cf_func'=yes'
6740 else
6741   echo "$as_me: program exited with status $ac_status" >&5
6742 echo "$as_me: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6744
6745                         eval 'ac_cv_func_'$cf_func'=no'
6746 fi
6747 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6748 fi
6749                 done
6750                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6751
6752 fi
6753 echo "$as_me:6753: result: $cf_cv_link_funcs" >&5
6754 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6755         test "$ac_cv_func_link"    = yes &&
6756 cat >>confdefs.h <<\EOF
6757 #define HAVE_LINK 1
6758 EOF
6759
6760         test "$ac_cv_func_symlink" = yes &&
6761 cat >>confdefs.h <<\EOF
6762 #define HAVE_SYMLINK 1
6763 EOF
6764
6765 fi
6766
6767 with_links=no
6768 with_symlinks=no
6769
6770 # soft links (symbolic links) are useful for some systems where hard links do
6771 # not work, or to make it simpler to copy terminfo trees around.
6772 if test "x$ac_cv_func_symlink" = xyes ; then
6773     echo "$as_me:6773: checking if tic should use symbolic links" >&5
6774 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6775
6776 # Check whether --enable-symlinks or --disable-symlinks was given.
6777 if test "${enable_symlinks+set}" = set; then
6778   enableval="$enable_symlinks"
6779   with_symlinks=$enableval
6780 else
6781   with_symlinks=no
6782 fi;
6783     echo "$as_me:6783: result: $with_symlinks" >&5
6784 echo "${ECHO_T}$with_symlinks" >&6
6785 fi
6786
6787 # If we have hard links and did not choose to use soft links instead, there is
6788 # no reason to make this choice optional - use the hard links.
6789 if test "$with_symlinks" = no ; then
6790     echo "$as_me:6790: checking if tic should use hard links" >&5
6791 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6792     if test "x$ac_cv_func_link" = xyes ; then
6793         with_links=yes
6794     else
6795         with_links=no
6796     fi
6797     echo "$as_me:6797: result: $with_links" >&5
6798 echo "${ECHO_T}$with_links" >&6
6799 fi
6800
6801 test "x$with_links" = xyes &&
6802 cat >>confdefs.h <<\EOF
6803 #define USE_LINKS 1
6804 EOF
6805
6806 test "x$with_symlinks" = xyes &&
6807 cat >>confdefs.h <<\EOF
6808 #define USE_SYMLINKS 1
6809 EOF
6810
6811 ###   use option --enable-broken-linker to force on use of broken-linker support
6812 echo "$as_me:6812: checking if you want broken-linker support code" >&5
6813 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6814
6815 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6816 if test "${enable_broken_linker+set}" = set; then
6817   enableval="$enable_broken_linker"
6818   with_broken_linker=$enableval
6819 else
6820   with_broken_linker=${BROKEN_LINKER:-no}
6821 fi;
6822 echo "$as_me:6822: result: $with_broken_linker" >&5
6823 echo "${ECHO_T}$with_broken_linker" >&6
6824
6825 BROKEN_LINKER=0
6826 if test "x$with_broken_linker" = xyes ; then
6827
6828 cat >>confdefs.h <<\EOF
6829 #define BROKEN_LINKER 1
6830 EOF
6831
6832         BROKEN_LINKER=1
6833 elif test "$DFT_LWR_MODEL" = shared ; then
6834         case $cf_cv_system_name in #(vi
6835         cygwin*)
6836
6837 cat >>confdefs.h <<\EOF
6838 #define BROKEN_LINKER 1
6839 EOF
6840
6841                 BROKEN_LINKER=1
6842                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6843
6844 echo "${as_me:-configure}:6844: testing cygwin linker is broken anyway ..." 1>&5
6845
6846                 ;;
6847         esac
6848 fi
6849
6850 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6851 echo "$as_me:6851: checking if tputs should process BSD-style prefix padding" >&5
6852 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6853
6854 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6855 if test "${enable_bsdpad+set}" = set; then
6856   enableval="$enable_bsdpad"
6857   with_bsdpad=$enableval
6858 else
6859   with_bsdpad=no
6860 fi;
6861 echo "$as_me:6861: result: $with_bsdpad" >&5
6862 echo "${ECHO_T}$with_bsdpad" >&6
6863 test "x$with_bsdpad" = xyes &&
6864 cat >>confdefs.h <<\EOF
6865 #define BSD_TPUTS 1
6866 EOF
6867
6868 ###   use option --enable-widec to turn on use of wide-character support
6869 NCURSES_CH_T=chtype
6870 NCURSES_LIBUTF8=0
6871
6872 NEED_WCHAR_H=0
6873 NCURSES_MBSTATE_T=0
6874 NCURSES_WCHAR_T=0
6875 NCURSES_WINT_T=0
6876
6877 # Check to define _XOPEN_SOURCE "automatically"
6878
6879 cf_XOPEN_SOURCE=500
6880 cf_POSIX_C_SOURCE=199506L
6881 cf_xopen_source=
6882
6883 case $host_os in #(vi
6884 aix[4-7]*) #(vi
6885         cf_xopen_source="-D_ALL_SOURCE"
6886         ;;
6887 cygwin) #(vi
6888         cf_XOPEN_SOURCE=600
6889         ;;
6890 darwin[0-8].*) #(vi
6891         cf_xopen_source="-D_APPLE_C_SOURCE"
6892         ;;
6893 darwin*) #(vi
6894         cf_xopen_source="-D_DARWIN_C_SOURCE"
6895         cf_XOPEN_SOURCE=
6896         ;;
6897 freebsd*|dragonfly*) #(vi
6898         # 5.x headers associate
6899         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6900         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6901         cf_POSIX_C_SOURCE=200112L
6902         cf_XOPEN_SOURCE=600
6903         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6904         ;;
6905 hpux11*) #(vi
6906         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6907         ;;
6908 hpux*) #(vi
6909         cf_xopen_source="-D_HPUX_SOURCE"
6910         ;;
6911 irix[56].*) #(vi
6912         cf_xopen_source="-D_SGI_SOURCE"
6913         cf_XOPEN_SOURCE=
6914         ;;
6915 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6916
6917 echo "$as_me:6917: checking if we must define _GNU_SOURCE" >&5
6918 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6919 if test "${cf_cv_gnu_source+set}" = set; then
6920   echo $ECHO_N "(cached) $ECHO_C" >&6
6921 else
6922
6923 cat >conftest.$ac_ext <<_ACEOF
6924 #line 6924 "configure"
6925 #include "confdefs.h"
6926 #include <sys/types.h>
6927 int
6928 main ()
6929 {
6930
6931 #ifndef _XOPEN_SOURCE
6932 make an error
6933 #endif
6934   ;
6935   return 0;
6936 }
6937 _ACEOF
6938 rm -f conftest.$ac_objext
6939 if { (eval echo "$as_me:6939: \"$ac_compile\"") >&5
6940   (eval $ac_compile) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); } &&
6944          { ac_try='test -s conftest.$ac_objext'
6945   { (eval echo "$as_me:6945: \"$ac_try\"") >&5
6946   (eval $ac_try) 2>&5
6947   ac_status=$?
6948   echo "$as_me:6948: \$? = $ac_status" >&5
6949   (exit $ac_status); }; }; then
6950   cf_cv_gnu_source=no
6951 else
6952   echo "$as_me: failed program was:" >&5
6953 cat conftest.$ac_ext >&5
6954 cf_save="$CPPFLAGS"
6955          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6956          cat >conftest.$ac_ext <<_ACEOF
6957 #line 6957 "configure"
6958 #include "confdefs.h"
6959 #include <sys/types.h>
6960 int
6961 main ()
6962 {
6963
6964 #ifdef _XOPEN_SOURCE
6965 make an error
6966 #endif
6967   ;
6968   return 0;
6969 }
6970 _ACEOF
6971 rm -f conftest.$ac_objext
6972 if { (eval echo "$as_me:6972: \"$ac_compile\"") >&5
6973   (eval $ac_compile) 2>&5
6974   ac_status=$?
6975   echo "$as_me:6975: \$? = $ac_status" >&5
6976   (exit $ac_status); } &&
6977          { ac_try='test -s conftest.$ac_objext'
6978   { (eval echo "$as_me:6978: \"$ac_try\"") >&5
6979   (eval $ac_try) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); }; }; then
6983   cf_cv_gnu_source=no
6984 else
6985   echo "$as_me: failed program was:" >&5
6986 cat conftest.$ac_ext >&5
6987 cf_cv_gnu_source=yes
6988 fi
6989 rm -f conftest.$ac_objext conftest.$ac_ext
6990         CPPFLAGS="$cf_save"
6991
6992 fi
6993 rm -f conftest.$ac_objext conftest.$ac_ext
6994
6995 fi
6996 echo "$as_me:6996: result: $cf_cv_gnu_source" >&5
6997 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6998 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6999
7000         ;;
7001 mirbsd*) #(vi
7002         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7003         cf_XOPEN_SOURCE=
7004
7005 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7006
7007 cf_save_CFLAGS="$CFLAGS"
7008 cf_save_CPPFLAGS="$CPPFLAGS"
7009
7010 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7011         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7012                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7013
7014 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7015         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7016                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7017
7018 echo "$as_me:7018: checking if we should define _POSIX_C_SOURCE" >&5
7019 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7020 if test "${cf_cv_posix_c_source+set}" = set; then
7021   echo $ECHO_N "(cached) $ECHO_C" >&6
7022 else
7023
7024 echo "${as_me:-configure}:7024: testing if the symbol is already defined go no further ..." 1>&5
7025
7026         cat >conftest.$ac_ext <<_ACEOF
7027 #line 7027 "configure"
7028 #include "confdefs.h"
7029 #include <sys/types.h>
7030 int
7031 main ()
7032 {
7033
7034 #ifndef _POSIX_C_SOURCE
7035 make an error
7036 #endif
7037   ;
7038   return 0;
7039 }
7040 _ACEOF
7041 rm -f conftest.$ac_objext
7042 if { (eval echo "$as_me:7042: \"$ac_compile\"") >&5
7043   (eval $ac_compile) 2>&5
7044   ac_status=$?
7045   echo "$as_me:7045: \$? = $ac_status" >&5
7046   (exit $ac_status); } &&
7047          { ac_try='test -s conftest.$ac_objext'
7048   { (eval echo "$as_me:7048: \"$ac_try\"") >&5
7049   (eval $ac_try) 2>&5
7050   ac_status=$?
7051   echo "$as_me:7051: \$? = $ac_status" >&5
7052   (exit $ac_status); }; }; then
7053   cf_cv_posix_c_source=no
7054 else
7055   echo "$as_me: failed program was:" >&5
7056 cat conftest.$ac_ext >&5
7057 cf_want_posix_source=no
7058          case .$cf_POSIX_C_SOURCE in #(vi
7059          .[12]??*) #(vi
7060                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7061                 ;;
7062          .2) #(vi
7063                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7064                 cf_want_posix_source=yes
7065                 ;;
7066          .*)
7067                 cf_want_posix_source=yes
7068                 ;;
7069          esac
7070          if test "$cf_want_posix_source" = yes ; then
7071                 cat >conftest.$ac_ext <<_ACEOF
7072 #line 7072 "configure"
7073 #include "confdefs.h"
7074 #include <sys/types.h>
7075 int
7076 main ()
7077 {
7078
7079 #ifdef _POSIX_SOURCE
7080 make an error
7081 #endif
7082   ;
7083   return 0;
7084 }
7085 _ACEOF
7086 rm -f conftest.$ac_objext
7087 if { (eval echo "$as_me:7087: \"$ac_compile\"") >&5
7088   (eval $ac_compile) 2>&5
7089   ac_status=$?
7090   echo "$as_me:7090: \$? = $ac_status" >&5
7091   (exit $ac_status); } &&
7092          { ac_try='test -s conftest.$ac_objext'
7093   { (eval echo "$as_me:7093: \"$ac_try\"") >&5
7094   (eval $ac_try) 2>&5
7095   ac_status=$?
7096   echo "$as_me:7096: \$? = $ac_status" >&5
7097   (exit $ac_status); }; }; then
7098   :
7099 else
7100   echo "$as_me: failed program was:" >&5
7101 cat conftest.$ac_ext >&5
7102 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7103 fi
7104 rm -f conftest.$ac_objext conftest.$ac_ext
7105          fi
7106
7107 echo "${as_me:-configure}:7107: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7108
7109          CFLAGS="$cf_trim_CFLAGS"
7110          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7111
7112 echo "${as_me:-configure}:7112: testing if the second compile does not leave our definition intact error ..." 1>&5
7113
7114          cat >conftest.$ac_ext <<_ACEOF
7115 #line 7115 "configure"
7116 #include "confdefs.h"
7117 #include <sys/types.h>
7118 int
7119 main ()
7120 {
7121
7122 #ifndef _POSIX_C_SOURCE
7123 make an error
7124 #endif
7125   ;
7126   return 0;
7127 }
7128 _ACEOF
7129 rm -f conftest.$ac_objext
7130 if { (eval echo "$as_me:7130: \"$ac_compile\"") >&5
7131   (eval $ac_compile) 2>&5
7132   ac_status=$?
7133   echo "$as_me:7133: \$? = $ac_status" >&5
7134   (exit $ac_status); } &&
7135          { ac_try='test -s conftest.$ac_objext'
7136   { (eval echo "$as_me:7136: \"$ac_try\"") >&5
7137   (eval $ac_try) 2>&5
7138   ac_status=$?
7139   echo "$as_me:7139: \$? = $ac_status" >&5
7140   (exit $ac_status); }; }; then
7141   :
7142 else
7143   echo "$as_me: failed program was:" >&5
7144 cat conftest.$ac_ext >&5
7145 cf_cv_posix_c_source=no
7146 fi
7147 rm -f conftest.$ac_objext conftest.$ac_ext
7148          CFLAGS="$cf_save_CFLAGS"
7149          CPPFLAGS="$cf_save_CPPFLAGS"
7150
7151 fi
7152 rm -f conftest.$ac_objext conftest.$ac_ext
7153
7154 fi
7155 echo "$as_me:7155: result: $cf_cv_posix_c_source" >&5
7156 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7157
7158 if test "$cf_cv_posix_c_source" != no ; then
7159         CFLAGS="$cf_trim_CFLAGS"
7160         CPPFLAGS="$cf_trim_CPPFLAGS"
7161
7162 cf_fix_cppflags=no
7163 cf_new_cflags=
7164 cf_new_cppflags=
7165 cf_new_extra_cppflags=
7166
7167 for cf_add_cflags in $cf_cv_posix_c_source
7168 do
7169 case $cf_fix_cppflags in
7170 no)
7171         case $cf_add_cflags in #(vi
7172         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7173                 case $cf_add_cflags in
7174                 -D*)
7175                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7176
7177                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7178                                 && test -z "${cf_tst_cflags}" \
7179                                 && cf_fix_cppflags=yes
7180
7181                         if test $cf_fix_cppflags = yes ; then
7182                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7183                                 continue
7184                         elif test "${cf_tst_cflags}" = "\"'" ; then
7185                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7186                                 continue
7187                         fi
7188                         ;;
7189                 esac
7190                 case "$CPPFLAGS" in
7191                 *$cf_add_cflags) #(vi
7192                         ;;
7193                 *) #(vi
7194                         case $cf_add_cflags in #(vi
7195                         -D*)
7196                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7197
7198 CPPFLAGS=`echo "$CPPFLAGS" | \
7199         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7200                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7201
7202                                 ;;
7203                         esac
7204                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7205                         ;;
7206                 esac
7207                 ;;
7208         *)
7209                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7210                 ;;
7211         esac
7212         ;;
7213 yes)
7214         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7215
7216         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7217
7218         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7219                 && test -z "${cf_tst_cflags}" \
7220                 && cf_fix_cppflags=no
7221         ;;
7222 esac
7223 done
7224
7225 if test -n "$cf_new_cflags" ; then
7226
7227         CFLAGS="$CFLAGS $cf_new_cflags"
7228 fi
7229
7230 if test -n "$cf_new_cppflags" ; then
7231
7232         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7233 fi
7234
7235 if test -n "$cf_new_extra_cppflags" ; then
7236
7237         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7238 fi
7239
7240 fi
7241
7242         ;;
7243 netbsd*) #(vi
7244         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7245         ;;
7246 openbsd[4-9]*) #(vi
7247         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7248         cf_xopen_source="-D_BSD_SOURCE"
7249         cf_XOPEN_SOURCE=600
7250         ;;
7251 openbsd*) #(vi
7252         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7253         ;;
7254 osf[45]*) #(vi
7255         cf_xopen_source="-D_OSF_SOURCE"
7256         ;;
7257 nto-qnx*) #(vi
7258         cf_xopen_source="-D_QNX_SOURCE"
7259         ;;
7260 sco*) #(vi
7261         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7262         ;;
7263 solaris2.*) #(vi
7264         cf_xopen_source="-D__EXTENSIONS__"
7265         ;;
7266 *)
7267
7268 echo "$as_me:7268: checking if we should define _XOPEN_SOURCE" >&5
7269 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7270 if test "${cf_cv_xopen_source+set}" = set; then
7271   echo $ECHO_N "(cached) $ECHO_C" >&6
7272 else
7273
7274         cat >conftest.$ac_ext <<_ACEOF
7275 #line 7275 "configure"
7276 #include "confdefs.h"
7277
7278 #include <stdlib.h>
7279 #include <string.h>
7280 #include <sys/types.h>
7281
7282 int
7283 main ()
7284 {
7285
7286 #ifndef _XOPEN_SOURCE
7287 make an error
7288 #endif
7289   ;
7290   return 0;
7291 }
7292 _ACEOF
7293 rm -f conftest.$ac_objext
7294 if { (eval echo "$as_me:7294: \"$ac_compile\"") >&5
7295   (eval $ac_compile) 2>&5
7296   ac_status=$?
7297   echo "$as_me:7297: \$? = $ac_status" >&5
7298   (exit $ac_status); } &&
7299          { ac_try='test -s conftest.$ac_objext'
7300   { (eval echo "$as_me:7300: \"$ac_try\"") >&5
7301   (eval $ac_try) 2>&5
7302   ac_status=$?
7303   echo "$as_me:7303: \$? = $ac_status" >&5
7304   (exit $ac_status); }; }; then
7305   cf_cv_xopen_source=no
7306 else
7307   echo "$as_me: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
7309 cf_save="$CPPFLAGS"
7310          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7311          cat >conftest.$ac_ext <<_ACEOF
7312 #line 7312 "configure"
7313 #include "confdefs.h"
7314
7315 #include <stdlib.h>
7316 #include <string.h>
7317 #include <sys/types.h>
7318
7319 int
7320 main ()
7321 {
7322
7323 #ifdef _XOPEN_SOURCE
7324 make an error
7325 #endif
7326   ;
7327   return 0;
7328 }
7329 _ACEOF
7330 rm -f conftest.$ac_objext
7331 if { (eval echo "$as_me:7331: \"$ac_compile\"") >&5
7332   (eval $ac_compile) 2>&5
7333   ac_status=$?
7334   echo "$as_me:7334: \$? = $ac_status" >&5
7335   (exit $ac_status); } &&
7336          { ac_try='test -s conftest.$ac_objext'
7337   { (eval echo "$as_me:7337: \"$ac_try\"") >&5
7338   (eval $ac_try) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); }; }; then
7342   cf_cv_xopen_source=no
7343 else
7344   echo "$as_me: failed program was:" >&5
7345 cat conftest.$ac_ext >&5
7346 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7347 fi
7348 rm -f conftest.$ac_objext conftest.$ac_ext
7349         CPPFLAGS="$cf_save"
7350
7351 fi
7352 rm -f conftest.$ac_objext conftest.$ac_ext
7353
7354 fi
7355 echo "$as_me:7355: result: $cf_cv_xopen_source" >&5
7356 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7357
7358 if test "$cf_cv_xopen_source" != no ; then
7359
7360 CFLAGS=`echo "$CFLAGS" | \
7361         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7362                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7363
7364 CPPFLAGS=`echo "$CPPFLAGS" | \
7365         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7366                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7367
7368         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7369
7370 cf_fix_cppflags=no
7371 cf_new_cflags=
7372 cf_new_cppflags=
7373 cf_new_extra_cppflags=
7374
7375 for cf_add_cflags in $cf_temp_xopen_source
7376 do
7377 case $cf_fix_cppflags in
7378 no)
7379         case $cf_add_cflags in #(vi
7380         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7381                 case $cf_add_cflags in
7382                 -D*)
7383                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7384
7385                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7386                                 && test -z "${cf_tst_cflags}" \
7387                                 && cf_fix_cppflags=yes
7388
7389                         if test $cf_fix_cppflags = yes ; then
7390                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7391                                 continue
7392                         elif test "${cf_tst_cflags}" = "\"'" ; then
7393                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7394                                 continue
7395                         fi
7396                         ;;
7397                 esac
7398                 case "$CPPFLAGS" in
7399                 *$cf_add_cflags) #(vi
7400                         ;;
7401                 *) #(vi
7402                         case $cf_add_cflags in #(vi
7403                         -D*)
7404                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7405
7406 CPPFLAGS=`echo "$CPPFLAGS" | \
7407         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7408                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7409
7410                                 ;;
7411                         esac
7412                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7413                         ;;
7414                 esac
7415                 ;;
7416         *)
7417                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7418                 ;;
7419         esac
7420         ;;
7421 yes)
7422         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7423
7424         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7425
7426         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7427                 && test -z "${cf_tst_cflags}" \
7428                 && cf_fix_cppflags=no
7429         ;;
7430 esac
7431 done
7432
7433 if test -n "$cf_new_cflags" ; then
7434
7435         CFLAGS="$CFLAGS $cf_new_cflags"
7436 fi
7437
7438 if test -n "$cf_new_cppflags" ; then
7439
7440         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7441 fi
7442
7443 if test -n "$cf_new_extra_cppflags" ; then
7444
7445         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7446 fi
7447
7448 fi
7449
7450 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7451
7452 cf_save_CFLAGS="$CFLAGS"
7453 cf_save_CPPFLAGS="$CPPFLAGS"
7454
7455 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7456         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7457                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7458
7459 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7460         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7461                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7462
7463 echo "$as_me:7463: checking if we should define _POSIX_C_SOURCE" >&5
7464 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7465 if test "${cf_cv_posix_c_source+set}" = set; then
7466   echo $ECHO_N "(cached) $ECHO_C" >&6
7467 else
7468
7469 echo "${as_me:-configure}:7469: testing if the symbol is already defined go no further ..." 1>&5
7470
7471         cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474 #include <sys/types.h>
7475 int
7476 main ()
7477 {
7478
7479 #ifndef _POSIX_C_SOURCE
7480 make an error
7481 #endif
7482   ;
7483   return 0;
7484 }
7485 _ACEOF
7486 rm -f conftest.$ac_objext
7487 if { (eval echo "$as_me:7487: \"$ac_compile\"") >&5
7488   (eval $ac_compile) 2>&5
7489   ac_status=$?
7490   echo "$as_me:7490: \$? = $ac_status" >&5
7491   (exit $ac_status); } &&
7492          { ac_try='test -s conftest.$ac_objext'
7493   { (eval echo "$as_me:7493: \"$ac_try\"") >&5
7494   (eval $ac_try) 2>&5
7495   ac_status=$?
7496   echo "$as_me:7496: \$? = $ac_status" >&5
7497   (exit $ac_status); }; }; then
7498   cf_cv_posix_c_source=no
7499 else
7500   echo "$as_me: failed program was:" >&5
7501 cat conftest.$ac_ext >&5
7502 cf_want_posix_source=no
7503          case .$cf_POSIX_C_SOURCE in #(vi
7504          .[12]??*) #(vi
7505                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7506                 ;;
7507          .2) #(vi
7508                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7509                 cf_want_posix_source=yes
7510                 ;;
7511          .*)
7512                 cf_want_posix_source=yes
7513                 ;;
7514          esac
7515          if test "$cf_want_posix_source" = yes ; then
7516                 cat >conftest.$ac_ext <<_ACEOF
7517 #line 7517 "configure"
7518 #include "confdefs.h"
7519 #include <sys/types.h>
7520 int
7521 main ()
7522 {
7523
7524 #ifdef _POSIX_SOURCE
7525 make an error
7526 #endif
7527   ;
7528   return 0;
7529 }
7530 _ACEOF
7531 rm -f conftest.$ac_objext
7532 if { (eval echo "$as_me:7532: \"$ac_compile\"") >&5
7533   (eval $ac_compile) 2>&5
7534   ac_status=$?
7535   echo "$as_me:7535: \$? = $ac_status" >&5
7536   (exit $ac_status); } &&
7537          { ac_try='test -s conftest.$ac_objext'
7538   { (eval echo "$as_me:7538: \"$ac_try\"") >&5
7539   (eval $ac_try) 2>&5
7540   ac_status=$?
7541   echo "$as_me:7541: \$? = $ac_status" >&5
7542   (exit $ac_status); }; }; then
7543   :
7544 else
7545   echo "$as_me: failed program was:" >&5
7546 cat conftest.$ac_ext >&5
7547 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7548 fi
7549 rm -f conftest.$ac_objext conftest.$ac_ext
7550          fi
7551
7552 echo "${as_me:-configure}:7552: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7553
7554          CFLAGS="$cf_trim_CFLAGS"
7555          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7556
7557 echo "${as_me:-configure}:7557: testing if the second compile does not leave our definition intact error ..." 1>&5
7558
7559          cat >conftest.$ac_ext <<_ACEOF
7560 #line 7560 "configure"
7561 #include "confdefs.h"
7562 #include <sys/types.h>
7563 int
7564 main ()
7565 {
7566
7567 #ifndef _POSIX_C_SOURCE
7568 make an error
7569 #endif
7570   ;
7571   return 0;
7572 }
7573 _ACEOF
7574 rm -f conftest.$ac_objext
7575 if { (eval echo "$as_me:7575: \"$ac_compile\"") >&5
7576   (eval $ac_compile) 2>&5
7577   ac_status=$?
7578   echo "$as_me:7578: \$? = $ac_status" >&5
7579   (exit $ac_status); } &&
7580          { ac_try='test -s conftest.$ac_objext'
7581   { (eval echo "$as_me:7581: \"$ac_try\"") >&5
7582   (eval $ac_try) 2>&5
7583   ac_status=$?
7584   echo "$as_me:7584: \$? = $ac_status" >&5
7585   (exit $ac_status); }; }; then
7586   :
7587 else
7588   echo "$as_me: failed program was:" >&5
7589 cat conftest.$ac_ext >&5
7590 cf_cv_posix_c_source=no
7591 fi
7592 rm -f conftest.$ac_objext conftest.$ac_ext
7593          CFLAGS="$cf_save_CFLAGS"
7594          CPPFLAGS="$cf_save_CPPFLAGS"
7595
7596 fi
7597 rm -f conftest.$ac_objext conftest.$ac_ext
7598
7599 fi
7600 echo "$as_me:7600: result: $cf_cv_posix_c_source" >&5
7601 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7602
7603 if test "$cf_cv_posix_c_source" != no ; then
7604         CFLAGS="$cf_trim_CFLAGS"
7605         CPPFLAGS="$cf_trim_CPPFLAGS"
7606
7607 cf_fix_cppflags=no
7608 cf_new_cflags=
7609 cf_new_cppflags=
7610 cf_new_extra_cppflags=
7611
7612 for cf_add_cflags in $cf_cv_posix_c_source
7613 do
7614 case $cf_fix_cppflags in
7615 no)
7616         case $cf_add_cflags in #(vi
7617         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7618                 case $cf_add_cflags in
7619                 -D*)
7620                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7621
7622                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7623                                 && test -z "${cf_tst_cflags}" \
7624                                 && cf_fix_cppflags=yes
7625
7626                         if test $cf_fix_cppflags = yes ; then
7627                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7628                                 continue
7629                         elif test "${cf_tst_cflags}" = "\"'" ; then
7630                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7631                                 continue
7632                         fi
7633                         ;;
7634                 esac
7635                 case "$CPPFLAGS" in
7636                 *$cf_add_cflags) #(vi
7637                         ;;
7638                 *) #(vi
7639                         case $cf_add_cflags in #(vi
7640                         -D*)
7641                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7642
7643 CPPFLAGS=`echo "$CPPFLAGS" | \
7644         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7645                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7646
7647                                 ;;
7648                         esac
7649                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7650                         ;;
7651                 esac
7652                 ;;
7653         *)
7654                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7655                 ;;
7656         esac
7657         ;;
7658 yes)
7659         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7660
7661         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7662
7663         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7664                 && test -z "${cf_tst_cflags}" \
7665                 && cf_fix_cppflags=no
7666         ;;
7667 esac
7668 done
7669
7670 if test -n "$cf_new_cflags" ; then
7671
7672         CFLAGS="$CFLAGS $cf_new_cflags"
7673 fi
7674
7675 if test -n "$cf_new_cppflags" ; then
7676
7677         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7678 fi
7679
7680 if test -n "$cf_new_extra_cppflags" ; then
7681
7682         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7683 fi
7684
7685 fi
7686
7687         ;;
7688 esac
7689
7690 if test -n "$cf_xopen_source" ; then
7691
7692 cf_fix_cppflags=no
7693 cf_new_cflags=
7694 cf_new_cppflags=
7695 cf_new_extra_cppflags=
7696
7697 for cf_add_cflags in $cf_xopen_source
7698 do
7699 case $cf_fix_cppflags in
7700 no)
7701         case $cf_add_cflags in #(vi
7702         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7703                 case $cf_add_cflags in
7704                 -D*)
7705                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7706
7707                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7708                                 && test -z "${cf_tst_cflags}" \
7709                                 && cf_fix_cppflags=yes
7710
7711                         if test $cf_fix_cppflags = yes ; then
7712                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7713                                 continue
7714                         elif test "${cf_tst_cflags}" = "\"'" ; then
7715                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7716                                 continue
7717                         fi
7718                         ;;
7719                 esac
7720                 case "$CPPFLAGS" in
7721                 *$cf_add_cflags) #(vi
7722                         ;;
7723                 *) #(vi
7724                         case $cf_add_cflags in #(vi
7725                         -D*)
7726                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7727
7728 CPPFLAGS=`echo "$CPPFLAGS" | \
7729         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7730                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7731
7732                                 ;;
7733                         esac
7734                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7735                         ;;
7736                 esac
7737                 ;;
7738         *)
7739                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7740                 ;;
7741         esac
7742         ;;
7743 yes)
7744         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7745
7746         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7747
7748         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7749                 && test -z "${cf_tst_cflags}" \
7750                 && cf_fix_cppflags=no
7751         ;;
7752 esac
7753 done
7754
7755 if test -n "$cf_new_cflags" ; then
7756
7757         CFLAGS="$CFLAGS $cf_new_cflags"
7758 fi
7759
7760 if test -n "$cf_new_cppflags" ; then
7761
7762         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7763 fi
7764
7765 if test -n "$cf_new_extra_cppflags" ; then
7766
7767         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7768 fi
7769
7770 fi
7771
7772 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
7773         echo "$as_me:7773: checking if _XOPEN_SOURCE really is set" >&5
7774 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
7775         cat >conftest.$ac_ext <<_ACEOF
7776 #line 7776 "configure"
7777 #include "confdefs.h"
7778 #include <stdlib.h>
7779 int
7780 main ()
7781 {
7782
7783 #ifndef _XOPEN_SOURCE
7784 make an error
7785 #endif
7786   ;
7787   return 0;
7788 }
7789 _ACEOF
7790 rm -f conftest.$ac_objext
7791 if { (eval echo "$as_me:7791: \"$ac_compile\"") >&5
7792   (eval $ac_compile) 2>&5
7793   ac_status=$?
7794   echo "$as_me:7794: \$? = $ac_status" >&5
7795   (exit $ac_status); } &&
7796          { ac_try='test -s conftest.$ac_objext'
7797   { (eval echo "$as_me:7797: \"$ac_try\"") >&5
7798   (eval $ac_try) 2>&5
7799   ac_status=$?
7800   echo "$as_me:7800: \$? = $ac_status" >&5
7801   (exit $ac_status); }; }; then
7802   cf_XOPEN_SOURCE_set=yes
7803 else
7804   echo "$as_me: failed program was:" >&5
7805 cat conftest.$ac_ext >&5
7806 cf_XOPEN_SOURCE_set=no
7807 fi
7808 rm -f conftest.$ac_objext conftest.$ac_ext
7809         echo "$as_me:7809: result: $cf_XOPEN_SOURCE_set" >&5
7810 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
7811         if test $cf_XOPEN_SOURCE_set = yes
7812         then
7813                 cat >conftest.$ac_ext <<_ACEOF
7814 #line 7814 "configure"
7815 #include "confdefs.h"
7816 #include <stdlib.h>
7817 int
7818 main ()
7819 {
7820
7821 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
7822 make an error
7823 #endif
7824   ;
7825   return 0;
7826 }
7827 _ACEOF
7828 rm -f conftest.$ac_objext
7829 if { (eval echo "$as_me:7829: \"$ac_compile\"") >&5
7830   (eval $ac_compile) 2>&5
7831   ac_status=$?
7832   echo "$as_me:7832: \$? = $ac_status" >&5
7833   (exit $ac_status); } &&
7834          { ac_try='test -s conftest.$ac_objext'
7835   { (eval echo "$as_me:7835: \"$ac_try\"") >&5
7836   (eval $ac_try) 2>&5
7837   ac_status=$?
7838   echo "$as_me:7838: \$? = $ac_status" >&5
7839   (exit $ac_status); }; }; then
7840   cf_XOPEN_SOURCE_set_ok=yes
7841 else
7842   echo "$as_me: failed program was:" >&5
7843 cat conftest.$ac_ext >&5
7844 cf_XOPEN_SOURCE_set_ok=no
7845 fi
7846 rm -f conftest.$ac_objext conftest.$ac_ext
7847                 if test $cf_XOPEN_SOURCE_set_ok = no
7848                 then
7849                         { echo "$as_me:7849: WARNING: _XOPEN_SOURCE is lower than requested" >&5
7850 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
7851                 fi
7852         else
7853
7854 echo "$as_me:7854: checking if we should define _XOPEN_SOURCE" >&5
7855 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7856 if test "${cf_cv_xopen_source+set}" = set; then
7857   echo $ECHO_N "(cached) $ECHO_C" >&6
7858 else
7859
7860         cat >conftest.$ac_ext <<_ACEOF
7861 #line 7861 "configure"
7862 #include "confdefs.h"
7863
7864 #include <stdlib.h>
7865 #include <string.h>
7866 #include <sys/types.h>
7867
7868 int
7869 main ()
7870 {
7871
7872 #ifndef _XOPEN_SOURCE
7873 make an error
7874 #endif
7875   ;
7876   return 0;
7877 }
7878 _ACEOF
7879 rm -f conftest.$ac_objext
7880 if { (eval echo "$as_me:7880: \"$ac_compile\"") >&5
7881   (eval $ac_compile) 2>&5
7882   ac_status=$?
7883   echo "$as_me:7883: \$? = $ac_status" >&5
7884   (exit $ac_status); } &&
7885          { ac_try='test -s conftest.$ac_objext'
7886   { (eval echo "$as_me:7886: \"$ac_try\"") >&5
7887   (eval $ac_try) 2>&5
7888   ac_status=$?
7889   echo "$as_me:7889: \$? = $ac_status" >&5
7890   (exit $ac_status); }; }; then
7891   cf_cv_xopen_source=no
7892 else
7893   echo "$as_me: failed program was:" >&5
7894 cat conftest.$ac_ext >&5
7895 cf_save="$CPPFLAGS"
7896          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7897          cat >conftest.$ac_ext <<_ACEOF
7898 #line 7898 "configure"
7899 #include "confdefs.h"
7900
7901 #include <stdlib.h>
7902 #include <string.h>
7903 #include <sys/types.h>
7904
7905 int
7906 main ()
7907 {
7908
7909 #ifdef _XOPEN_SOURCE
7910 make an error
7911 #endif
7912   ;
7913   return 0;
7914 }
7915 _ACEOF
7916 rm -f conftest.$ac_objext
7917 if { (eval echo "$as_me:7917: \"$ac_compile\"") >&5
7918   (eval $ac_compile) 2>&5
7919   ac_status=$?
7920   echo "$as_me:7920: \$? = $ac_status" >&5
7921   (exit $ac_status); } &&
7922          { ac_try='test -s conftest.$ac_objext'
7923   { (eval echo "$as_me:7923: \"$ac_try\"") >&5
7924   (eval $ac_try) 2>&5
7925   ac_status=$?
7926   echo "$as_me:7926: \$? = $ac_status" >&5
7927   (exit $ac_status); }; }; then
7928   cf_cv_xopen_source=no
7929 else
7930   echo "$as_me: failed program was:" >&5
7931 cat conftest.$ac_ext >&5
7932 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7933 fi
7934 rm -f conftest.$ac_objext conftest.$ac_ext
7935         CPPFLAGS="$cf_save"
7936
7937 fi
7938 rm -f conftest.$ac_objext conftest.$ac_ext
7939
7940 fi
7941 echo "$as_me:7941: result: $cf_cv_xopen_source" >&5
7942 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7943
7944 if test "$cf_cv_xopen_source" != no ; then
7945
7946 CFLAGS=`echo "$CFLAGS" | \
7947         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7948                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7949
7950 CPPFLAGS=`echo "$CPPFLAGS" | \
7951         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7952                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7953
7954         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7955
7956 cf_fix_cppflags=no
7957 cf_new_cflags=
7958 cf_new_cppflags=
7959 cf_new_extra_cppflags=
7960
7961 for cf_add_cflags in $cf_temp_xopen_source
7962 do
7963 case $cf_fix_cppflags in
7964 no)
7965         case $cf_add_cflags in #(vi
7966         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7967                 case $cf_add_cflags in
7968                 -D*)
7969                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7970
7971                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7972                                 && test -z "${cf_tst_cflags}" \
7973                                 && cf_fix_cppflags=yes
7974
7975                         if test $cf_fix_cppflags = yes ; then
7976                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7977                                 continue
7978                         elif test "${cf_tst_cflags}" = "\"'" ; then
7979                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7980                                 continue
7981                         fi
7982                         ;;
7983                 esac
7984                 case "$CPPFLAGS" in
7985                 *$cf_add_cflags) #(vi
7986                         ;;
7987                 *) #(vi
7988                         case $cf_add_cflags in #(vi
7989                         -D*)
7990                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7991
7992 CPPFLAGS=`echo "$CPPFLAGS" | \
7993         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7994                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7995
7996                                 ;;
7997                         esac
7998                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7999                         ;;
8000                 esac
8001                 ;;
8002         *)
8003                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8004                 ;;
8005         esac
8006         ;;
8007 yes)
8008         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8009
8010         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8011
8012         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8013                 && test -z "${cf_tst_cflags}" \
8014                 && cf_fix_cppflags=no
8015         ;;
8016 esac
8017 done
8018
8019 if test -n "$cf_new_cflags" ; then
8020
8021         CFLAGS="$CFLAGS $cf_new_cflags"
8022 fi
8023
8024 if test -n "$cf_new_cppflags" ; then
8025
8026         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8027 fi
8028
8029 if test -n "$cf_new_extra_cppflags" ; then
8030
8031         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8032 fi
8033
8034 fi
8035
8036         fi
8037 fi
8038
8039 # Work around breakage on OS X
8040
8041 echo "$as_me:8041: checking if SIGWINCH is defined" >&5
8042 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8043 if test "${cf_cv_define_sigwinch+set}" = set; then
8044   echo $ECHO_N "(cached) $ECHO_C" >&6
8045 else
8046
8047         cat >conftest.$ac_ext <<_ACEOF
8048 #line 8048 "configure"
8049 #include "confdefs.h"
8050
8051 #include <sys/types.h>
8052 #include <sys/signal.h>
8053
8054 int
8055 main ()
8056 {
8057 int x = SIGWINCH
8058   ;
8059   return 0;
8060 }
8061 _ACEOF
8062 rm -f conftest.$ac_objext
8063 if { (eval echo "$as_me:8063: \"$ac_compile\"") >&5
8064   (eval $ac_compile) 2>&5
8065   ac_status=$?
8066   echo "$as_me:8066: \$? = $ac_status" >&5
8067   (exit $ac_status); } &&
8068          { ac_try='test -s conftest.$ac_objext'
8069   { (eval echo "$as_me:8069: \"$ac_try\"") >&5
8070   (eval $ac_try) 2>&5
8071   ac_status=$?
8072   echo "$as_me:8072: \$? = $ac_status" >&5
8073   (exit $ac_status); }; }; then
8074   cf_cv_define_sigwinch=yes
8075 else
8076   echo "$as_me: failed program was:" >&5
8077 cat conftest.$ac_ext >&5
8078 cat >conftest.$ac_ext <<_ACEOF
8079 #line 8079 "configure"
8080 #include "confdefs.h"
8081
8082 #undef _XOPEN_SOURCE
8083 #undef _POSIX_SOURCE
8084 #undef _POSIX_C_SOURCE
8085 #include <sys/types.h>
8086 #include <sys/signal.h>
8087
8088 int
8089 main ()
8090 {
8091 int x = SIGWINCH
8092   ;
8093   return 0;
8094 }
8095 _ACEOF
8096 rm -f conftest.$ac_objext
8097 if { (eval echo "$as_me:8097: \"$ac_compile\"") >&5
8098   (eval $ac_compile) 2>&5
8099   ac_status=$?
8100   echo "$as_me:8100: \$? = $ac_status" >&5
8101   (exit $ac_status); } &&
8102          { ac_try='test -s conftest.$ac_objext'
8103   { (eval echo "$as_me:8103: \"$ac_try\"") >&5
8104   (eval $ac_try) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); }; }; then
8108   cf_cv_define_sigwinch=maybe
8109 else
8110   echo "$as_me: failed program was:" >&5
8111 cat conftest.$ac_ext >&5
8112 cf_cv_define_sigwinch=no
8113 fi
8114 rm -f conftest.$ac_objext conftest.$ac_ext
8115
8116 fi
8117 rm -f conftest.$ac_objext conftest.$ac_ext
8118
8119 fi
8120 echo "$as_me:8120: result: $cf_cv_define_sigwinch" >&5
8121 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8122
8123 if test "$cf_cv_define_sigwinch" = maybe ; then
8124 echo "$as_me:8124: checking for actual SIGWINCH definition" >&5
8125 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8126 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8127   echo $ECHO_N "(cached) $ECHO_C" >&6
8128 else
8129
8130 cf_cv_fixup_sigwinch=unknown
8131 cf_sigwinch=32
8132 while test $cf_sigwinch != 1
8133 do
8134         cat >conftest.$ac_ext <<_ACEOF
8135 #line 8135 "configure"
8136 #include "confdefs.h"
8137
8138 #undef _XOPEN_SOURCE
8139 #undef _POSIX_SOURCE
8140 #undef _POSIX_C_SOURCE
8141 #include <sys/types.h>
8142 #include <sys/signal.h>
8143
8144 int
8145 main ()
8146 {
8147
8148 #if SIGWINCH != $cf_sigwinch
8149 make an error
8150 #endif
8151 int x = SIGWINCH
8152   ;
8153   return 0;
8154 }
8155 _ACEOF
8156 rm -f conftest.$ac_objext
8157 if { (eval echo "$as_me:8157: \"$ac_compile\"") >&5
8158   (eval $ac_compile) 2>&5
8159   ac_status=$?
8160   echo "$as_me:8160: \$? = $ac_status" >&5
8161   (exit $ac_status); } &&
8162          { ac_try='test -s conftest.$ac_objext'
8163   { (eval echo "$as_me:8163: \"$ac_try\"") >&5
8164   (eval $ac_try) 2>&5
8165   ac_status=$?
8166   echo "$as_me:8166: \$? = $ac_status" >&5
8167   (exit $ac_status); }; }; then
8168   cf_cv_fixup_sigwinch=$cf_sigwinch
8169          break
8170 else
8171   echo "$as_me: failed program was:" >&5
8172 cat conftest.$ac_ext >&5
8173 fi
8174 rm -f conftest.$ac_objext conftest.$ac_ext
8175
8176 cf_sigwinch=`expr $cf_sigwinch - 1`
8177 done
8178
8179 fi
8180 echo "$as_me:8180: result: $cf_cv_fixup_sigwinch" >&5
8181 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8182
8183         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8184                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8185         fi
8186 fi
8187
8188 # Checks for CODESET support.
8189
8190   echo "$as_me:8190: checking for nl_langinfo and CODESET" >&5
8191 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8192 if test "${am_cv_langinfo_codeset+set}" = set; then
8193   echo $ECHO_N "(cached) $ECHO_C" >&6
8194 else
8195   cat >conftest.$ac_ext <<_ACEOF
8196 #line 8196 "configure"
8197 #include "confdefs.h"
8198 #include <langinfo.h>
8199 int
8200 main ()
8201 {
8202 char* cs = nl_langinfo(CODESET);
8203   ;
8204   return 0;
8205 }
8206 _ACEOF
8207 rm -f conftest.$ac_objext conftest$ac_exeext
8208 if { (eval echo "$as_me:8208: \"$ac_link\"") >&5
8209   (eval $ac_link) 2>&5
8210   ac_status=$?
8211   echo "$as_me:8211: \$? = $ac_status" >&5
8212   (exit $ac_status); } &&
8213          { ac_try='test -s conftest$ac_exeext'
8214   { (eval echo "$as_me:8214: \"$ac_try\"") >&5
8215   (eval $ac_try) 2>&5
8216   ac_status=$?
8217   echo "$as_me:8217: \$? = $ac_status" >&5
8218   (exit $ac_status); }; }; then
8219   am_cv_langinfo_codeset=yes
8220 else
8221   echo "$as_me: failed program was:" >&5
8222 cat conftest.$ac_ext >&5
8223 am_cv_langinfo_codeset=no
8224 fi
8225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8226
8227 fi
8228 echo "$as_me:8228: result: $am_cv_langinfo_codeset" >&5
8229 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8230   if test $am_cv_langinfo_codeset = yes; then
8231
8232 cat >>confdefs.h <<\EOF
8233 #define HAVE_LANGINFO_CODESET 1
8234 EOF
8235
8236   fi
8237
8238 # use these variables to work around a defect in gcc's fixincludes.
8239 NCURSES_OK_WCHAR_T=
8240 NCURSES_OK_WINT_T=
8241
8242 echo "$as_me:8242: checking if you want wide-character code" >&5
8243 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8244
8245 # Check whether --enable-widec or --disable-widec was given.
8246 if test "${enable_widec+set}" = set; then
8247   enableval="$enable_widec"
8248   with_widec=$enableval
8249 else
8250   with_widec=no
8251 fi;
8252 echo "$as_me:8252: result: $with_widec" >&5
8253 echo "${ECHO_T}$with_widec" >&6
8254 if test "x$with_widec" = xyes ; then
8255         LIB_SUFFIX="w${LIB_SUFFIX}"
8256
8257 cat >>confdefs.h <<\EOF
8258 #define USE_WIDEC_SUPPORT 1
8259 EOF
8260
8261 cat >>confdefs.h <<\EOF
8262 #define NCURSES_WIDECHAR 1
8263 EOF
8264
8265 echo "$as_me:8265: checking if wchar.h can be used as is" >&5
8266 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8267 if test "${cf_cv_wchar_h_okay+set}" = set; then
8268   echo $ECHO_N "(cached) $ECHO_C" >&6
8269 else
8270
8271 cat >conftest.$ac_ext <<_ACEOF
8272 #line 8272 "configure"
8273 #include "confdefs.h"
8274
8275 #include <stdlib.h>
8276 #include <wchar.h>
8277
8278 int
8279 main ()
8280 {
8281
8282         wint_t foo = 0;
8283         int bar = iswpunct(foo)
8284   ;
8285   return 0;
8286 }
8287 _ACEOF
8288 rm -f conftest.$ac_objext
8289 if { (eval echo "$as_me:8289: \"$ac_compile\"") >&5
8290   (eval $ac_compile) 2>&5
8291   ac_status=$?
8292   echo "$as_me:8292: \$? = $ac_status" >&5
8293   (exit $ac_status); } &&
8294          { ac_try='test -s conftest.$ac_objext'
8295   { (eval echo "$as_me:8295: \"$ac_try\"") >&5
8296   (eval $ac_try) 2>&5
8297   ac_status=$?
8298   echo "$as_me:8298: \$? = $ac_status" >&5
8299   (exit $ac_status); }; }; then
8300   cf_cv_wchar_h_okay=yes
8301 else
8302   echo "$as_me: failed program was:" >&5
8303 cat conftest.$ac_ext >&5
8304 cf_cv_wchar_h_okay=no
8305 fi
8306 rm -f conftest.$ac_objext conftest.$ac_ext
8307 fi
8308 echo "$as_me:8308: result: $cf_cv_wchar_h_okay" >&5
8309 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8310
8311 if test $cf_cv_wchar_h_okay = no
8312 then
8313
8314 echo "$as_me:8314: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8315 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8316 cat >conftest.$ac_ext <<_ACEOF
8317 #line 8317 "configure"
8318 #include "confdefs.h"
8319 #include <sys/types.h>
8320
8321 int
8322 main ()
8323 {
8324
8325 #ifndef _XOPEN_SOURCE_EXTENDED
8326 make an error
8327 #endif
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_result=no
8345 else
8346   echo "$as_me: failed program was:" >&5
8347 cat conftest.$ac_ext >&5
8348 cf_result=yes
8349 fi
8350 rm -f conftest.$ac_objext conftest.$ac_ext
8351 echo "$as_me:8351: result: $cf_result" >&5
8352 echo "${ECHO_T}$cf_result" >&6
8353
8354 if test "$cf_result" = yes ; then
8355         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8356 elif test "x" != "x" ; then
8357         echo "$as_me:8357: checking checking for compatible value versus " >&5
8358 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8359         cat >conftest.$ac_ext <<_ACEOF
8360 #line 8360 "configure"
8361 #include "confdefs.h"
8362 #include <sys/types.h>
8363
8364 int
8365 main ()
8366 {
8367
8368 #if _XOPEN_SOURCE_EXTENDED- < 0
8369 make an error
8370 #endif
8371   ;
8372   return 0;
8373 }
8374 _ACEOF
8375 rm -f conftest.$ac_objext
8376 if { (eval echo "$as_me:8376: \"$ac_compile\"") >&5
8377   (eval $ac_compile) 2>&5
8378   ac_status=$?
8379   echo "$as_me:8379: \$? = $ac_status" >&5
8380   (exit $ac_status); } &&
8381          { ac_try='test -s conftest.$ac_objext'
8382   { (eval echo "$as_me:8382: \"$ac_try\"") >&5
8383   (eval $ac_try) 2>&5
8384   ac_status=$?
8385   echo "$as_me:8385: \$? = $ac_status" >&5
8386   (exit $ac_status); }; }; then
8387   cf_result=yes
8388 else
8389   echo "$as_me: failed program was:" >&5
8390 cat conftest.$ac_ext >&5
8391 cf_result=no
8392 fi
8393 rm -f conftest.$ac_objext conftest.$ac_ext
8394         echo "$as_me:8394: result: $cf_result" >&5
8395 echo "${ECHO_T}$cf_result" >&6
8396         if test "$cf_result" = no ; then
8397                 # perhaps we can override it - try...
8398                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8399         fi
8400 fi
8401
8402 fi
8403
8404         # with_overwrite=no
8405         NCURSES_CH_T=cchar_t
8406
8407 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8408 do
8409 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8410 echo "$as_me:8410: checking for $ac_func" >&5
8411 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8412 if eval "test \"\${$as_ac_var+set}\" = set"; then
8413   echo $ECHO_N "(cached) $ECHO_C" >&6
8414 else
8415   cat >conftest.$ac_ext <<_ACEOF
8416 #line 8416 "configure"
8417 #include "confdefs.h"
8418 /* System header to define __stub macros and hopefully few prototypes,
8419     which can conflict with char $ac_func (); below.  */
8420 #include <assert.h>
8421 /* Override any gcc2 internal prototype to avoid an error.  */
8422 #ifdef __cplusplus
8423 extern "C"
8424 #endif
8425 /* We use char because int might match the return type of a gcc2
8426    builtin and then its argument prototype would still apply.  */
8427 char $ac_func ();
8428 char (*f) ();
8429
8430 int
8431 main ()
8432 {
8433 /* The GNU C library defines this for functions which it implements
8434     to always fail with ENOSYS.  Some functions are actually named
8435     something starting with __ and the normal name is an alias.  */
8436 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8437 choke me
8438 #else
8439 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8440 #endif
8441
8442   ;
8443   return 0;
8444 }
8445 _ACEOF
8446 rm -f conftest.$ac_objext conftest$ac_exeext
8447 if { (eval echo "$as_me:8447: \"$ac_link\"") >&5
8448   (eval $ac_link) 2>&5
8449   ac_status=$?
8450   echo "$as_me:8450: \$? = $ac_status" >&5
8451   (exit $ac_status); } &&
8452          { ac_try='test -s conftest$ac_exeext'
8453   { (eval echo "$as_me:8453: \"$ac_try\"") >&5
8454   (eval $ac_try) 2>&5
8455   ac_status=$?
8456   echo "$as_me:8456: \$? = $ac_status" >&5
8457   (exit $ac_status); }; }; then
8458   eval "$as_ac_var=yes"
8459 else
8460   echo "$as_me: failed program was:" >&5
8461 cat conftest.$ac_ext >&5
8462 eval "$as_ac_var=no"
8463 fi
8464 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8465 fi
8466 echo "$as_me:8466: result: `eval echo '${'$as_ac_var'}'`" >&5
8467 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8468 if test `eval echo '${'$as_ac_var'}'` = yes; then
8469   cat >>confdefs.h <<EOF
8470 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8471 EOF
8472
8473 fi
8474 done
8475
8476         if test "x$ac_cv_func_putwc" != xyes ; then
8477
8478 echo "$as_me:8478: checking for multibyte character support" >&5
8479 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8480 if test "${cf_cv_utf8_lib+set}" = set; then
8481   echo $ECHO_N "(cached) $ECHO_C" >&6
8482 else
8483
8484         cf_save_LIBS="$LIBS"
8485         cat >conftest.$ac_ext <<_ACEOF
8486 #line 8486 "configure"
8487 #include "confdefs.h"
8488
8489 #include <stdlib.h>
8490 int
8491 main ()
8492 {
8493 putwc(0,0);
8494   ;
8495   return 0;
8496 }
8497 _ACEOF
8498 rm -f conftest.$ac_objext conftest$ac_exeext
8499 if { (eval echo "$as_me:8499: \"$ac_link\"") >&5
8500   (eval $ac_link) 2>&5
8501   ac_status=$?
8502   echo "$as_me:8502: \$? = $ac_status" >&5
8503   (exit $ac_status); } &&
8504          { ac_try='test -s conftest$ac_exeext'
8505   { (eval echo "$as_me:8505: \"$ac_try\"") >&5
8506   (eval $ac_try) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); }; }; then
8510   cf_cv_utf8_lib=yes
8511 else
8512   echo "$as_me: failed program was:" >&5
8513 cat conftest.$ac_ext >&5
8514
8515 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8516 # will be set on completion of the AC_TRY_LINK below.
8517 cf_cv_header_path_utf8=
8518 cf_cv_library_path_utf8=
8519
8520 echo "${as_me:-configure}:8520: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8521
8522 cf_save_LIBS="$LIBS"
8523
8524 cat >conftest.$ac_ext <<_ACEOF
8525 #line 8525 "configure"
8526 #include "confdefs.h"
8527
8528 #include <libutf8.h>
8529 int
8530 main ()
8531 {
8532 putwc(0,0);
8533   ;
8534   return 0;
8535 }
8536 _ACEOF
8537 rm -f conftest.$ac_objext conftest$ac_exeext
8538 if { (eval echo "$as_me:8538: \"$ac_link\"") >&5
8539   (eval $ac_link) 2>&5
8540   ac_status=$?
8541   echo "$as_me:8541: \$? = $ac_status" >&5
8542   (exit $ac_status); } &&
8543          { ac_try='test -s conftest$ac_exeext'
8544   { (eval echo "$as_me:8544: \"$ac_try\"") >&5
8545   (eval $ac_try) 2>&5
8546   ac_status=$?
8547   echo "$as_me:8547: \$? = $ac_status" >&5
8548   (exit $ac_status); }; }; then
8549
8550         cf_cv_find_linkage_utf8=yes
8551         cf_cv_header_path_utf8=/usr/include
8552         cf_cv_library_path_utf8=/usr/lib
8553
8554 else
8555   echo "$as_me: failed program was:" >&5
8556 cat conftest.$ac_ext >&5
8557
8558 LIBS="-lutf8  $cf_save_LIBS"
8559
8560 cat >conftest.$ac_ext <<_ACEOF
8561 #line 8561 "configure"
8562 #include "confdefs.h"
8563
8564 #include <libutf8.h>
8565 int
8566 main ()
8567 {
8568 putwc(0,0);
8569   ;
8570   return 0;
8571 }
8572 _ACEOF
8573 rm -f conftest.$ac_objext conftest$ac_exeext
8574 if { (eval echo "$as_me:8574: \"$ac_link\"") >&5
8575   (eval $ac_link) 2>&5
8576   ac_status=$?
8577   echo "$as_me:8577: \$? = $ac_status" >&5
8578   (exit $ac_status); } &&
8579          { ac_try='test -s conftest$ac_exeext'
8580   { (eval echo "$as_me:8580: \"$ac_try\"") >&5
8581   (eval $ac_try) 2>&5
8582   ac_status=$?
8583   echo "$as_me:8583: \$? = $ac_status" >&5
8584   (exit $ac_status); }; }; then
8585
8586         cf_cv_find_linkage_utf8=yes
8587         cf_cv_header_path_utf8=/usr/include
8588         cf_cv_library_path_utf8=/usr/lib
8589         cf_cv_library_file_utf8="-lutf8"
8590
8591 else
8592   echo "$as_me: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594
8595         cf_cv_find_linkage_utf8=no
8596         LIBS="$cf_save_LIBS"
8597
8598     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8599
8600 echo "${as_me:-configure}:8600: testing find linkage for utf8 library ..." 1>&5
8601
8602 echo "${as_me:-configure}:8602: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8603
8604     cf_save_CPPFLAGS="$CPPFLAGS"
8605     cf_test_CPPFLAGS="$CPPFLAGS"
8606
8607 cf_search=
8608
8609 # collect the current set of include-directories from compiler flags
8610 cf_header_path_list=""
8611 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8612         for cf_header_path in $CPPFLAGS $CFLAGS
8613         do
8614                 case $cf_header_path in #(vi
8615                 -I*)
8616                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8617
8618 test "$cf_header_path" != "NONE" && \
8619 test -d "$cf_header_path" && \
8620  {
8621         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8622         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8623         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8624         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8625         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8626         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8627 }
8628
8629                         cf_header_path_list="$cf_header_path_list $cf_search"
8630                         ;;
8631                 esac
8632         done
8633 fi
8634
8635 # add the variations for the package we are looking for
8636
8637 cf_search=
8638
8639 test "/usr" != "$prefix" && \
8640 test -d "/usr" && \
8641 (test $prefix = NONE || test "/usr" != "$prefix") && {
8642         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8643         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8644         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8645         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8646         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8647         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8648 }
8649
8650 test "$prefix" != "NONE" && \
8651 test -d "$prefix" && \
8652  {
8653         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8654         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8655         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8656         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8657         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8658         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8659 }
8660
8661 test "/usr/local" != "$prefix" && \
8662 test -d "/usr/local" && \
8663 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8664         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8665         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8666         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8667         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8668         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8669         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8670 }
8671
8672 test "/opt" != "$prefix" && \
8673 test -d "/opt" && \
8674 (test $prefix = NONE || test "/opt" != "$prefix") && {
8675         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8676         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8677         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8678         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8679         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8680         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8681 }
8682
8683 test "$HOME" != "$prefix" && \
8684 test -d "$HOME" && \
8685 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8686         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8687         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8688         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8689         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8690         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8691         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8692 }
8693
8694 test "$includedir" != NONE && \
8695 test "$includedir" != "/usr/include" && \
8696 test -d "$includedir" && {
8697         test -d $includedir &&    cf_search="$cf_search $includedir"
8698         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8699 }
8700
8701 test "$oldincludedir" != NONE && \
8702 test "$oldincludedir" != "/usr/include" && \
8703 test -d "$oldincludedir" && {
8704         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8705         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8706 }
8707
8708 cf_search="$cf_search $cf_header_path_list"
8709
8710     for cf_cv_header_path_utf8 in $cf_search
8711     do
8712       if test -d $cf_cv_header_path_utf8 ; then
8713         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8714
8715 echo "${as_me:-configure}:8715: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8716
8717         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8718         cat >conftest.$ac_ext <<_ACEOF
8719 #line 8719 "configure"
8720 #include "confdefs.h"
8721
8722 #include <libutf8.h>
8723 int
8724 main ()
8725 {
8726 putwc(0,0);
8727   ;
8728   return 0;
8729 }
8730 _ACEOF
8731 rm -f conftest.$ac_objext
8732 if { (eval echo "$as_me:8732: \"$ac_compile\"") >&5
8733   (eval $ac_compile) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); } &&
8737          { ac_try='test -s conftest.$ac_objext'
8738   { (eval echo "$as_me:8738: \"$ac_try\"") >&5
8739   (eval $ac_try) 2>&5
8740   ac_status=$?
8741   echo "$as_me:8741: \$? = $ac_status" >&5
8742   (exit $ac_status); }; }; then
8743
8744             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8745
8746 echo "${as_me:-configure}:8746: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8747
8748             cf_cv_find_linkage_utf8=maybe
8749             cf_test_CPPFLAGS="$CPPFLAGS"
8750             break
8751 else
8752   echo "$as_me: failed program was:" >&5
8753 cat conftest.$ac_ext >&5
8754
8755             CPPFLAGS="$cf_save_CPPFLAGS"
8756
8757 fi
8758 rm -f conftest.$ac_objext conftest.$ac_ext
8759       fi
8760     done
8761
8762     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8763
8764 echo "${as_me:-configure}:8764: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8765
8766       cf_save_LIBS="$LIBS"
8767       cf_save_LDFLAGS="$LDFLAGS"
8768
8769       if test "$cf_cv_find_linkage_utf8" != yes ; then
8770
8771 cf_search=
8772 cf_library_path_list=""
8773 if test -n "${LDFLAGS}${LIBS}" ; then
8774         for cf_library_path in $LDFLAGS $LIBS
8775         do
8776                 case $cf_library_path in #(vi
8777                 -L*)
8778                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8779
8780 test "$cf_library_path" != "NONE" && \
8781 test -d "$cf_library_path" && \
8782  {
8783         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8784         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8785         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8786         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8787         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8788         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8789 }
8790
8791                         cf_library_path_list="$cf_library_path_list $cf_search"
8792                         ;;
8793                 esac
8794         done
8795 fi
8796
8797 cf_search=
8798
8799 test "/usr" != "$prefix" && \
8800 test -d "/usr" && \
8801 (test $prefix = NONE || test "/usr" != "$prefix") && {
8802         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8803         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8804         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8805         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8806         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8807         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8808 }
8809
8810 test "$prefix" != "NONE" && \
8811 test -d "$prefix" && \
8812  {
8813         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8814         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8815         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8816         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8817         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8818         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8819 }
8820
8821 test "/usr/local" != "$prefix" && \
8822 test -d "/usr/local" && \
8823 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8824         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8825         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8826         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8827         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8828         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8829         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8830 }
8831
8832 test "/opt" != "$prefix" && \
8833 test -d "/opt" && \
8834 (test $prefix = NONE || test "/opt" != "$prefix") && {
8835         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8836         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8837         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8838         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8839         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8840         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8841 }
8842
8843 test "$HOME" != "$prefix" && \
8844 test -d "$HOME" && \
8845 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8846         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8847         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8848         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8849         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8850         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8851         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8852 }
8853
8854 cf_search="$cf_library_path_list $cf_search"
8855
8856         for cf_cv_library_path_utf8 in $cf_search
8857         do
8858           if test -d $cf_cv_library_path_utf8 ; then
8859             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8860
8861 echo "${as_me:-configure}:8861: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8862
8863             CPPFLAGS="$cf_test_CPPFLAGS"
8864             LIBS="-lutf8  $cf_save_LIBS"
8865             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8866             cat >conftest.$ac_ext <<_ACEOF
8867 #line 8867 "configure"
8868 #include "confdefs.h"
8869
8870 #include <libutf8.h>
8871 int
8872 main ()
8873 {
8874 putwc(0,0);
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext conftest$ac_exeext
8880 if { (eval echo "$as_me:8880: \"$ac_link\"") >&5
8881   (eval $ac_link) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest$ac_exeext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891
8892                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8893
8894 echo "${as_me:-configure}:8894: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8895
8896                 cf_cv_find_linkage_utf8=yes
8897                 cf_cv_library_file_utf8="-lutf8"
8898                 break
8899 else
8900   echo "$as_me: failed program was:" >&5
8901 cat conftest.$ac_ext >&5
8902
8903                 CPPFLAGS="$cf_save_CPPFLAGS"
8904                 LIBS="$cf_save_LIBS"
8905                 LDFLAGS="$cf_save_LDFLAGS"
8906
8907 fi
8908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8909           fi
8910         done
8911         CPPFLAGS="$cf_save_CPPFLAGS"
8912         LDFLAGS="$cf_save_LDFLAGS"
8913       fi
8914
8915     else
8916       cf_cv_find_linkage_utf8=no
8917     fi
8918
8919 fi
8920 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8921
8922 fi
8923 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8924
8925 LIBS="$cf_save_LIBS"
8926
8927 if test "$cf_cv_find_linkage_utf8" = yes ; then
8928 cf_cv_utf8_lib=add-on
8929 else
8930 cf_cv_utf8_lib=no
8931 fi
8932
8933 fi
8934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8935 fi
8936 echo "$as_me:8936: result: $cf_cv_utf8_lib" >&5
8937 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8938
8939 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8940 # ncurses/ncursesw:
8941 if test "$cf_cv_utf8_lib" = "add-on" ; then
8942
8943 cat >>confdefs.h <<\EOF
8944 #define HAVE_LIBUTF8_H 1
8945 EOF
8946
8947 if test -n "$cf_cv_header_path_utf8" ; then
8948   for cf_add_incdir in $cf_cv_header_path_utf8
8949   do
8950         while test $cf_add_incdir != /usr/include
8951         do
8952           if test -d $cf_add_incdir
8953           then
8954                 cf_have_incdir=no
8955                 if test -n "$CFLAGS$CPPFLAGS" ; then
8956                   # a loop is needed to ensure we can add subdirs of existing dirs
8957                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8958                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8959                           cf_have_incdir=yes; break
8960                         fi
8961                   done
8962                 fi
8963
8964                 if test "$cf_have_incdir" = no ; then
8965                   if test "$cf_add_incdir" = /usr/local/include ; then
8966                         if test "$GCC" = yes
8967                         then
8968                           cf_save_CPPFLAGS=$CPPFLAGS
8969                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8970                           cat >conftest.$ac_ext <<_ACEOF
8971 #line 8971 "configure"
8972 #include "confdefs.h"
8973 #include <stdio.h>
8974 int
8975 main ()
8976 {
8977 printf("Hello")
8978   ;
8979   return 0;
8980 }
8981 _ACEOF
8982 rm -f conftest.$ac_objext
8983 if { (eval echo "$as_me:8983: \"$ac_compile\"") >&5
8984   (eval $ac_compile) 2>&5
8985   ac_status=$?
8986   echo "$as_me:8986: \$? = $ac_status" >&5
8987   (exit $ac_status); } &&
8988          { ac_try='test -s conftest.$ac_objext'
8989   { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8990   (eval $ac_try) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit $ac_status); }; }; then
8994   :
8995 else
8996   echo "$as_me: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
8998 cf_have_incdir=yes
8999 fi
9000 rm -f conftest.$ac_objext conftest.$ac_ext
9001                           CPPFLAGS=$cf_save_CPPFLAGS
9002                         fi
9003                   fi
9004                 fi
9005
9006                 if test "$cf_have_incdir" = no ; then
9007                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9008
9009 echo "${as_me:-configure}:9009: testing adding $cf_add_incdir to include-path ..." 1>&5
9010
9011                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9012
9013                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9014                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9015                   cf_add_incdir="$cf_top_incdir"
9016                 else
9017                   break
9018                 fi
9019           fi
9020         done
9021   done
9022 fi
9023
9024 if test -n "$cf_cv_library_path_utf8" ; then
9025   for cf_add_libdir in $cf_cv_library_path_utf8
9026   do
9027     if test $cf_add_libdir = /usr/lib ; then
9028       :
9029     elif test -d $cf_add_libdir
9030     then
9031       cf_have_libdir=no
9032       if test -n "$LDFLAGS$LIBS" ; then
9033         # a loop is needed to ensure we can add subdirs of existing dirs
9034         for cf_test_libdir in $LDFLAGS $LIBS ; do
9035           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9036             cf_have_libdir=yes; break
9037           fi
9038         done
9039       fi
9040       if test "$cf_have_libdir" = no ; then
9041         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9042
9043 echo "${as_me:-configure}:9043: testing adding $cf_add_libdir to library-path ..." 1>&5
9044
9045         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9046       fi
9047     fi
9048   done
9049 fi
9050
9051         LIBS="$cf_cv_library_file_utf8 $LIBS"
9052 fi
9053
9054                 if test "$cf_cv_utf8_lib" != no ; then
9055                         NCURSES_LIBUTF8=1
9056                 fi
9057         fi
9058
9059 # This is needed on Tru64 5.0 to declare mbstate_t
9060 echo "$as_me:9060: checking if we must include wchar.h to declare mbstate_t" >&5
9061 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9062 if test "${cf_cv_mbstate_t+set}" = set; then
9063   echo $ECHO_N "(cached) $ECHO_C" >&6
9064 else
9065
9066 cat >conftest.$ac_ext <<_ACEOF
9067 #line 9067 "configure"
9068 #include "confdefs.h"
9069
9070 #include <stdlib.h>
9071 #include <stdarg.h>
9072 #include <stdio.h>
9073 #ifdef HAVE_LIBUTF8_H
9074 #include <libutf8.h>
9075 #endif
9076 int
9077 main ()
9078 {
9079 mbstate_t state
9080   ;
9081   return 0;
9082 }
9083 _ACEOF
9084 rm -f conftest.$ac_objext
9085 if { (eval echo "$as_me:9085: \"$ac_compile\"") >&5
9086   (eval $ac_compile) 2>&5
9087   ac_status=$?
9088   echo "$as_me:9088: \$? = $ac_status" >&5
9089   (exit $ac_status); } &&
9090          { ac_try='test -s conftest.$ac_objext'
9091   { (eval echo "$as_me:9091: \"$ac_try\"") >&5
9092   (eval $ac_try) 2>&5
9093   ac_status=$?
9094   echo "$as_me:9094: \$? = $ac_status" >&5
9095   (exit $ac_status); }; }; then
9096   cf_cv_mbstate_t=no
9097 else
9098   echo "$as_me: failed program was:" >&5
9099 cat conftest.$ac_ext >&5
9100 cat >conftest.$ac_ext <<_ACEOF
9101 #line 9101 "configure"
9102 #include "confdefs.h"
9103
9104 #include <stdlib.h>
9105 #include <stdarg.h>
9106 #include <stdio.h>
9107 #include <wchar.h>
9108 #ifdef HAVE_LIBUTF8_H
9109 #include <libutf8.h>
9110 #endif
9111 int
9112 main ()
9113 {
9114 mbstate_t value
9115   ;
9116   return 0;
9117 }
9118 _ACEOF
9119 rm -f conftest.$ac_objext
9120 if { (eval echo "$as_me:9120: \"$ac_compile\"") >&5
9121   (eval $ac_compile) 2>&5
9122   ac_status=$?
9123   echo "$as_me:9123: \$? = $ac_status" >&5
9124   (exit $ac_status); } &&
9125          { ac_try='test -s conftest.$ac_objext'
9126   { (eval echo "$as_me:9126: \"$ac_try\"") >&5
9127   (eval $ac_try) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); }; }; then
9131   cf_cv_mbstate_t=yes
9132 else
9133   echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9135 cf_cv_mbstate_t=unknown
9136 fi
9137 rm -f conftest.$ac_objext conftest.$ac_ext
9138 fi
9139 rm -f conftest.$ac_objext conftest.$ac_ext
9140 fi
9141 echo "$as_me:9141: result: $cf_cv_mbstate_t" >&5
9142 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9143
9144 if test "$cf_cv_mbstate_t" = yes ; then
9145
9146 cat >>confdefs.h <<\EOF
9147 #define NEED_WCHAR_H 1
9148 EOF
9149
9150         NEED_WCHAR_H=1
9151 fi
9152
9153 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9154 if test "$cf_cv_mbstate_t" = unknown ; then
9155         NCURSES_MBSTATE_T=1
9156 fi
9157
9158 # This is needed on Tru64 5.0 to declare wchar_t
9159 echo "$as_me:9159: checking if we must include wchar.h to declare wchar_t" >&5
9160 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9161 if test "${cf_cv_wchar_t+set}" = set; then
9162   echo $ECHO_N "(cached) $ECHO_C" >&6
9163 else
9164
9165 cat >conftest.$ac_ext <<_ACEOF
9166 #line 9166 "configure"
9167 #include "confdefs.h"
9168
9169 #include <stdlib.h>
9170 #include <stdarg.h>
9171 #include <stdio.h>
9172 #ifdef HAVE_LIBUTF8_H
9173 #include <libutf8.h>
9174 #endif
9175 int
9176 main ()
9177 {
9178 wchar_t state
9179   ;
9180   return 0;
9181 }
9182 _ACEOF
9183 rm -f conftest.$ac_objext
9184 if { (eval echo "$as_me:9184: \"$ac_compile\"") >&5
9185   (eval $ac_compile) 2>&5
9186   ac_status=$?
9187   echo "$as_me:9187: \$? = $ac_status" >&5
9188   (exit $ac_status); } &&
9189          { ac_try='test -s conftest.$ac_objext'
9190   { (eval echo "$as_me:9190: \"$ac_try\"") >&5
9191   (eval $ac_try) 2>&5
9192   ac_status=$?
9193   echo "$as_me:9193: \$? = $ac_status" >&5
9194   (exit $ac_status); }; }; then
9195   cf_cv_wchar_t=no
9196 else
9197   echo "$as_me: failed program was:" >&5
9198 cat conftest.$ac_ext >&5
9199 cat >conftest.$ac_ext <<_ACEOF
9200 #line 9200 "configure"
9201 #include "confdefs.h"
9202
9203 #include <stdlib.h>
9204 #include <stdarg.h>
9205 #include <stdio.h>
9206 #include <wchar.h>
9207 #ifdef HAVE_LIBUTF8_H
9208 #include <libutf8.h>
9209 #endif
9210 int
9211 main ()
9212 {
9213 wchar_t value
9214   ;
9215   return 0;
9216 }
9217 _ACEOF
9218 rm -f conftest.$ac_objext
9219 if { (eval echo "$as_me:9219: \"$ac_compile\"") >&5
9220   (eval $ac_compile) 2>&5
9221   ac_status=$?
9222   echo "$as_me:9222: \$? = $ac_status" >&5
9223   (exit $ac_status); } &&
9224          { ac_try='test -s conftest.$ac_objext'
9225   { (eval echo "$as_me:9225: \"$ac_try\"") >&5
9226   (eval $ac_try) 2>&5
9227   ac_status=$?
9228   echo "$as_me:9228: \$? = $ac_status" >&5
9229   (exit $ac_status); }; }; then
9230   cf_cv_wchar_t=yes
9231 else
9232   echo "$as_me: failed program was:" >&5
9233 cat conftest.$ac_ext >&5
9234 cf_cv_wchar_t=unknown
9235 fi
9236 rm -f conftest.$ac_objext conftest.$ac_ext
9237 fi
9238 rm -f conftest.$ac_objext conftest.$ac_ext
9239 fi
9240 echo "$as_me:9240: result: $cf_cv_wchar_t" >&5
9241 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9242
9243 if test "$cf_cv_wchar_t" = yes ; then
9244
9245 cat >>confdefs.h <<\EOF
9246 #define NEED_WCHAR_H 1
9247 EOF
9248
9249         NEED_WCHAR_H=1
9250 fi
9251
9252 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9253 if test "$cf_cv_wchar_t" = unknown ; then
9254         NCURSES_WCHAR_T=1
9255 fi
9256
9257 # if we find wchar_t in either place, use substitution to provide a fallback.
9258 if test "$cf_cv_wchar_t" != unknown ; then
9259         NCURSES_OK_WCHAR_T=1
9260 fi
9261
9262 # This is needed on Tru64 5.0 to declare wint_t
9263 echo "$as_me:9263: checking if we must include wchar.h to declare wint_t" >&5
9264 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9265 if test "${cf_cv_wint_t+set}" = set; then
9266   echo $ECHO_N "(cached) $ECHO_C" >&6
9267 else
9268
9269 cat >conftest.$ac_ext <<_ACEOF
9270 #line 9270 "configure"
9271 #include "confdefs.h"
9272
9273 #include <stdlib.h>
9274 #include <stdarg.h>
9275 #include <stdio.h>
9276 #ifdef HAVE_LIBUTF8_H
9277 #include <libutf8.h>
9278 #endif
9279 int
9280 main ()
9281 {
9282 wint_t state
9283   ;
9284   return 0;
9285 }
9286 _ACEOF
9287 rm -f conftest.$ac_objext
9288 if { (eval echo "$as_me:9288: \"$ac_compile\"") >&5
9289   (eval $ac_compile) 2>&5
9290   ac_status=$?
9291   echo "$as_me:9291: \$? = $ac_status" >&5
9292   (exit $ac_status); } &&
9293          { ac_try='test -s conftest.$ac_objext'
9294   { (eval echo "$as_me:9294: \"$ac_try\"") >&5
9295   (eval $ac_try) 2>&5
9296   ac_status=$?
9297   echo "$as_me:9297: \$? = $ac_status" >&5
9298   (exit $ac_status); }; }; then
9299   cf_cv_wint_t=no
9300 else
9301   echo "$as_me: failed program was:" >&5
9302 cat conftest.$ac_ext >&5
9303 cat >conftest.$ac_ext <<_ACEOF
9304 #line 9304 "configure"
9305 #include "confdefs.h"
9306
9307 #include <stdlib.h>
9308 #include <stdarg.h>
9309 #include <stdio.h>
9310 #include <wchar.h>
9311 #ifdef HAVE_LIBUTF8_H
9312 #include <libutf8.h>
9313 #endif
9314 int
9315 main ()
9316 {
9317 wint_t value
9318   ;
9319   return 0;
9320 }
9321 _ACEOF
9322 rm -f conftest.$ac_objext
9323 if { (eval echo "$as_me:9323: \"$ac_compile\"") >&5
9324   (eval $ac_compile) 2>&5
9325   ac_status=$?
9326   echo "$as_me:9326: \$? = $ac_status" >&5
9327   (exit $ac_status); } &&
9328          { ac_try='test -s conftest.$ac_objext'
9329   { (eval echo "$as_me:9329: \"$ac_try\"") >&5
9330   (eval $ac_try) 2>&5
9331   ac_status=$?
9332   echo "$as_me:9332: \$? = $ac_status" >&5
9333   (exit $ac_status); }; }; then
9334   cf_cv_wint_t=yes
9335 else
9336   echo "$as_me: failed program was:" >&5
9337 cat conftest.$ac_ext >&5
9338 cf_cv_wint_t=unknown
9339 fi
9340 rm -f conftest.$ac_objext conftest.$ac_ext
9341 fi
9342 rm -f conftest.$ac_objext conftest.$ac_ext
9343 fi
9344 echo "$as_me:9344: result: $cf_cv_wint_t" >&5
9345 echo "${ECHO_T}$cf_cv_wint_t" >&6
9346
9347 if test "$cf_cv_wint_t" = yes ; then
9348
9349 cat >>confdefs.h <<\EOF
9350 #define NEED_WCHAR_H 1
9351 EOF
9352
9353         NEED_WCHAR_H=1
9354 fi
9355
9356 # if we do not find wint_t in either place, use substitution to provide a fallback.
9357 if test "$cf_cv_wint_t" = unknown ; then
9358         NCURSES_WINT_T=1
9359 fi
9360
9361 # if we find wint_t in either place, use substitution to provide a fallback.
9362 if test "$cf_cv_wint_t" != unknown ; then
9363         NCURSES_OK_WINT_T=1
9364 fi
9365
9366         if test "$NCURSES_MBSTATE_T" != 0; then
9367
9368 cat >>confdefs.h <<\EOF
9369 #define NEED_MBSTATE_T_DEF 1
9370 EOF
9371
9372         fi
9373 fi
9374
9375 ###   use option --disable-lp64 to allow long chtype
9376 case $cf_cv_abi_version in
9377 [345]*)
9378         default_with_lp64=no
9379         ;;
9380 *)
9381         default_with_lp64=yes
9382         ;;
9383 esac
9384
9385 echo "$as_me:9385: checking whether to enable _LP64 definition in curses.h" >&5
9386 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9387
9388 # Check whether --enable-lp64 or --disable-lp64 was given.
9389 if test "${enable_lp64+set}" = set; then
9390   enableval="$enable_lp64"
9391   with_lp64=$enableval
9392 else
9393   with_lp64=$default_with_lp64
9394 fi;
9395 echo "$as_me:9395: result: $with_lp64" >&5
9396 echo "${ECHO_T}$with_lp64" >&6
9397
9398 if test "x$with_lp64" = xyes ; then
9399         cf_cv_enable_lp64=1
9400 else
9401         cf_cv_enable_lp64=0
9402 fi
9403
9404 # Check whether --enable-largefile or --disable-largefile was given.
9405 if test "${enable_largefile+set}" = set; then
9406   enableval="$enable_largefile"
9407
9408 fi;
9409 if test "$enable_largefile" != no; then
9410
9411   echo "$as_me:9411: checking for special C compiler options needed for large files" >&5
9412 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9413 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9414   echo $ECHO_N "(cached) $ECHO_C" >&6
9415 else
9416   ac_cv_sys_largefile_CC=no
9417      if test "$GCC" != yes; then
9418        ac_save_CC=$CC
9419        while :; do
9420          # IRIX 6.2 and later do not support large files by default,
9421          # so use the C compiler's -n32 option if that helps.
9422          cat >conftest.$ac_ext <<_ACEOF
9423 #line 9423 "configure"
9424 #include "confdefs.h"
9425 #include <sys/types.h>
9426  /* Check that off_t can represent 2**63 - 1 correctly.
9427     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9428     since some C++ compilers masquerading as C compilers
9429     incorrectly reject 9223372036854775807.  */
9430 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9431   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9432                        && LARGE_OFF_T % 2147483647 == 1)
9433                       ? 1 : -1];
9434 int
9435 main ()
9436 {
9437
9438   ;
9439   return 0;
9440 }
9441 _ACEOF
9442          rm -f conftest.$ac_objext
9443 if { (eval echo "$as_me:9443: \"$ac_compile\"") >&5
9444   (eval $ac_compile) 2>&5
9445   ac_status=$?
9446   echo "$as_me:9446: \$? = $ac_status" >&5
9447   (exit $ac_status); } &&
9448          { ac_try='test -s conftest.$ac_objext'
9449   { (eval echo "$as_me:9449: \"$ac_try\"") >&5
9450   (eval $ac_try) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); }; }; then
9454   break
9455 else
9456   echo "$as_me: failed program was:" >&5
9457 cat conftest.$ac_ext >&5
9458 fi
9459 rm -f conftest.$ac_objext
9460          CC="$CC -n32"
9461          rm -f conftest.$ac_objext
9462 if { (eval echo "$as_me:9462: \"$ac_compile\"") >&5
9463   (eval $ac_compile) 2>&5
9464   ac_status=$?
9465   echo "$as_me:9465: \$? = $ac_status" >&5
9466   (exit $ac_status); } &&
9467          { ac_try='test -s conftest.$ac_objext'
9468   { (eval echo "$as_me:9468: \"$ac_try\"") >&5
9469   (eval $ac_try) 2>&5
9470   ac_status=$?
9471   echo "$as_me:9471: \$? = $ac_status" >&5
9472   (exit $ac_status); }; }; then
9473   ac_cv_sys_largefile_CC=' -n32'; break
9474 else
9475   echo "$as_me: failed program was:" >&5
9476 cat conftest.$ac_ext >&5
9477 fi
9478 rm -f conftest.$ac_objext
9479          break
9480        done
9481        CC=$ac_save_CC
9482        rm -f conftest.$ac_ext
9483     fi
9484 fi
9485 echo "$as_me:9485: result: $ac_cv_sys_largefile_CC" >&5
9486 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9487   if test "$ac_cv_sys_largefile_CC" != no; then
9488     CC=$CC$ac_cv_sys_largefile_CC
9489   fi
9490
9491   echo "$as_me:9491: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9492 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9493 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9494   echo $ECHO_N "(cached) $ECHO_C" >&6
9495 else
9496   while :; do
9497   ac_cv_sys_file_offset_bits=no
9498   cat >conftest.$ac_ext <<_ACEOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9501 #include <sys/types.h>
9502  /* Check that off_t can represent 2**63 - 1 correctly.
9503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9504     since some C++ compilers masquerading as C compilers
9505     incorrectly reject 9223372036854775807.  */
9506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9508                        && LARGE_OFF_T % 2147483647 == 1)
9509                       ? 1 : -1];
9510 int
9511 main ()
9512 {
9513
9514   ;
9515   return 0;
9516 }
9517 _ACEOF
9518 rm -f conftest.$ac_objext
9519 if { (eval echo "$as_me:9519: \"$ac_compile\"") >&5
9520   (eval $ac_compile) 2>&5
9521   ac_status=$?
9522   echo "$as_me:9522: \$? = $ac_status" >&5
9523   (exit $ac_status); } &&
9524          { ac_try='test -s conftest.$ac_objext'
9525   { (eval echo "$as_me:9525: \"$ac_try\"") >&5
9526   (eval $ac_try) 2>&5
9527   ac_status=$?
9528   echo "$as_me:9528: \$? = $ac_status" >&5
9529   (exit $ac_status); }; }; then
9530   break
9531 else
9532   echo "$as_me: failed program was:" >&5
9533 cat conftest.$ac_ext >&5
9534 fi
9535 rm -f conftest.$ac_objext conftest.$ac_ext
9536   cat >conftest.$ac_ext <<_ACEOF
9537 #line 9537 "configure"
9538 #include "confdefs.h"
9539 #define _FILE_OFFSET_BITS 64
9540 #include <sys/types.h>
9541  /* Check that off_t can represent 2**63 - 1 correctly.
9542     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9543     since some C++ compilers masquerading as C compilers
9544     incorrectly reject 9223372036854775807.  */
9545 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9546   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9547                        && LARGE_OFF_T % 2147483647 == 1)
9548                       ? 1 : -1];
9549 int
9550 main ()
9551 {
9552
9553   ;
9554   return 0;
9555 }
9556 _ACEOF
9557 rm -f conftest.$ac_objext
9558 if { (eval echo "$as_me:9558: \"$ac_compile\"") >&5
9559   (eval $ac_compile) 2>&5
9560   ac_status=$?
9561   echo "$as_me:9561: \$? = $ac_status" >&5
9562   (exit $ac_status); } &&
9563          { ac_try='test -s conftest.$ac_objext'
9564   { (eval echo "$as_me:9564: \"$ac_try\"") >&5
9565   (eval $ac_try) 2>&5
9566   ac_status=$?
9567   echo "$as_me:9567: \$? = $ac_status" >&5
9568   (exit $ac_status); }; }; then
9569   ac_cv_sys_file_offset_bits=64; break
9570 else
9571   echo "$as_me: failed program was:" >&5
9572 cat conftest.$ac_ext >&5
9573 fi
9574 rm -f conftest.$ac_objext conftest.$ac_ext
9575   break
9576 done
9577 fi
9578 echo "$as_me:9578: result: $ac_cv_sys_file_offset_bits" >&5
9579 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9580 if test "$ac_cv_sys_file_offset_bits" != no; then
9581
9582 cat >>confdefs.h <<EOF
9583 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9584 EOF
9585
9586 fi
9587 rm -rf conftest*
9588   echo "$as_me:9588: checking for _LARGE_FILES value needed for large files" >&5
9589 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9590 if test "${ac_cv_sys_large_files+set}" = set; then
9591   echo $ECHO_N "(cached) $ECHO_C" >&6
9592 else
9593   while :; do
9594   ac_cv_sys_large_files=no
9595   cat >conftest.$ac_ext <<_ACEOF
9596 #line 9596 "configure"
9597 #include "confdefs.h"
9598 #include <sys/types.h>
9599  /* Check that off_t can represent 2**63 - 1 correctly.
9600     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9601     since some C++ compilers masquerading as C compilers
9602     incorrectly reject 9223372036854775807.  */
9603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9604   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9605                        && LARGE_OFF_T % 2147483647 == 1)
9606                       ? 1 : -1];
9607 int
9608 main ()
9609 {
9610
9611   ;
9612   return 0;
9613 }
9614 _ACEOF
9615 rm -f conftest.$ac_objext
9616 if { (eval echo "$as_me:9616: \"$ac_compile\"") >&5
9617   (eval $ac_compile) 2>&5
9618   ac_status=$?
9619   echo "$as_me:9619: \$? = $ac_status" >&5
9620   (exit $ac_status); } &&
9621          { ac_try='test -s conftest.$ac_objext'
9622   { (eval echo "$as_me:9622: \"$ac_try\"") >&5
9623   (eval $ac_try) 2>&5
9624   ac_status=$?
9625   echo "$as_me:9625: \$? = $ac_status" >&5
9626   (exit $ac_status); }; }; then
9627   break
9628 else
9629   echo "$as_me: failed program was:" >&5
9630 cat conftest.$ac_ext >&5
9631 fi
9632 rm -f conftest.$ac_objext conftest.$ac_ext
9633   cat >conftest.$ac_ext <<_ACEOF
9634 #line 9634 "configure"
9635 #include "confdefs.h"
9636 #define _LARGE_FILES 1
9637 #include <sys/types.h>
9638  /* Check that off_t can represent 2**63 - 1 correctly.
9639     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9640     since some C++ compilers masquerading as C compilers
9641     incorrectly reject 9223372036854775807.  */
9642 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9643   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9644                        && LARGE_OFF_T % 2147483647 == 1)
9645                       ? 1 : -1];
9646 int
9647 main ()
9648 {
9649
9650   ;
9651   return 0;
9652 }
9653 _ACEOF
9654 rm -f conftest.$ac_objext
9655 if { (eval echo "$as_me:9655: \"$ac_compile\"") >&5
9656   (eval $ac_compile) 2>&5
9657   ac_status=$?
9658   echo "$as_me:9658: \$? = $ac_status" >&5
9659   (exit $ac_status); } &&
9660          { ac_try='test -s conftest.$ac_objext'
9661   { (eval echo "$as_me:9661: \"$ac_try\"") >&5
9662   (eval $ac_try) 2>&5
9663   ac_status=$?
9664   echo "$as_me:9664: \$? = $ac_status" >&5
9665   (exit $ac_status); }; }; then
9666   ac_cv_sys_large_files=1; break
9667 else
9668   echo "$as_me: failed program was:" >&5
9669 cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest.$ac_objext conftest.$ac_ext
9672   break
9673 done
9674 fi
9675 echo "$as_me:9675: result: $ac_cv_sys_large_files" >&5
9676 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9677 if test "$ac_cv_sys_large_files" != no; then
9678
9679 cat >>confdefs.h <<EOF
9680 #define _LARGE_FILES $ac_cv_sys_large_files
9681 EOF
9682
9683 fi
9684 rm -rf conftest*
9685 fi
9686
9687     if test "$enable_largefile" != no ; then
9688         echo "$as_me:9688: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9689 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9690 if test "${ac_cv_sys_largefile_source+set}" = set; then
9691   echo $ECHO_N "(cached) $ECHO_C" >&6
9692 else
9693   while :; do
9694   ac_cv_sys_largefile_source=no
9695   cat >conftest.$ac_ext <<_ACEOF
9696 #line 9696 "configure"
9697 #include "confdefs.h"
9698 #include <stdio.h>
9699 int
9700 main ()
9701 {
9702 return !fseeko;
9703   ;
9704   return 0;
9705 }
9706 _ACEOF
9707 rm -f conftest.$ac_objext
9708 if { (eval echo "$as_me:9708: \"$ac_compile\"") >&5
9709   (eval $ac_compile) 2>&5
9710   ac_status=$?
9711   echo "$as_me:9711: \$? = $ac_status" >&5
9712   (exit $ac_status); } &&
9713          { ac_try='test -s conftest.$ac_objext'
9714   { (eval echo "$as_me:9714: \"$ac_try\"") >&5
9715   (eval $ac_try) 2>&5
9716   ac_status=$?
9717   echo "$as_me:9717: \$? = $ac_status" >&5
9718   (exit $ac_status); }; }; then
9719   break
9720 else
9721   echo "$as_me: failed program was:" >&5
9722 cat conftest.$ac_ext >&5
9723 fi
9724 rm -f conftest.$ac_objext conftest.$ac_ext
9725   cat >conftest.$ac_ext <<_ACEOF
9726 #line 9726 "configure"
9727 #include "confdefs.h"
9728 #define _LARGEFILE_SOURCE 1
9729 #include <stdio.h>
9730 int
9731 main ()
9732 {
9733 return !fseeko;
9734   ;
9735   return 0;
9736 }
9737 _ACEOF
9738 rm -f conftest.$ac_objext
9739 if { (eval echo "$as_me:9739: \"$ac_compile\"") >&5
9740   (eval $ac_compile) 2>&5
9741   ac_status=$?
9742   echo "$as_me:9742: \$? = $ac_status" >&5
9743   (exit $ac_status); } &&
9744          { ac_try='test -s conftest.$ac_objext'
9745   { (eval echo "$as_me:9745: \"$ac_try\"") >&5
9746   (eval $ac_try) 2>&5
9747   ac_status=$?
9748   echo "$as_me:9748: \$? = $ac_status" >&5
9749   (exit $ac_status); }; }; then
9750   ac_cv_sys_largefile_source=1; break
9751 else
9752   echo "$as_me: failed program was:" >&5
9753 cat conftest.$ac_ext >&5
9754 fi
9755 rm -f conftest.$ac_objext conftest.$ac_ext
9756   break
9757 done
9758 fi
9759 echo "$as_me:9759: result: $ac_cv_sys_largefile_source" >&5
9760 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9761 if test "$ac_cv_sys_largefile_source" != no; then
9762
9763 cat >>confdefs.h <<EOF
9764 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9765 EOF
9766
9767 fi
9768 rm -rf conftest*
9769
9770 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9771 # in glibc 2.1.3, but that breaks too many other things.
9772 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9773 echo "$as_me:9773: checking for fseeko" >&5
9774 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9775 if test "${ac_cv_func_fseeko+set}" = set; then
9776   echo $ECHO_N "(cached) $ECHO_C" >&6
9777 else
9778   cat >conftest.$ac_ext <<_ACEOF
9779 #line 9779 "configure"
9780 #include "confdefs.h"
9781 #include <stdio.h>
9782 int
9783 main ()
9784 {
9785 return fseeko && fseeko (stdin, 0, 0);
9786   ;
9787   return 0;
9788 }
9789 _ACEOF
9790 rm -f conftest.$ac_objext conftest$ac_exeext
9791 if { (eval echo "$as_me:9791: \"$ac_link\"") >&5
9792   (eval $ac_link) 2>&5
9793   ac_status=$?
9794   echo "$as_me:9794: \$? = $ac_status" >&5
9795   (exit $ac_status); } &&
9796          { ac_try='test -s conftest$ac_exeext'
9797   { (eval echo "$as_me:9797: \"$ac_try\"") >&5
9798   (eval $ac_try) 2>&5
9799   ac_status=$?
9800   echo "$as_me:9800: \$? = $ac_status" >&5
9801   (exit $ac_status); }; }; then
9802   ac_cv_func_fseeko=yes
9803 else
9804   echo "$as_me: failed program was:" >&5
9805 cat conftest.$ac_ext >&5
9806 ac_cv_func_fseeko=no
9807 fi
9808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9809 fi
9810 echo "$as_me:9810: result: $ac_cv_func_fseeko" >&5
9811 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9812 if test $ac_cv_func_fseeko = yes; then
9813
9814 cat >>confdefs.h <<\EOF
9815 #define HAVE_FSEEKO 1
9816 EOF
9817
9818 fi
9819
9820         # Normally we would collect these definitions in the config.h,
9821         # but (like _XOPEN_SOURCE), some environments rely on having these
9822         # defined before any of the system headers are included.  Another
9823         # case comes up with C++, e.g., on AIX the compiler compiles the
9824         # header files by themselves before looking at the body files it is
9825         # told to compile.  For ncurses, those header files do not include
9826         # the config.h
9827         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9828         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9829         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9830
9831         echo "$as_me:9831: checking whether to use struct dirent64" >&5
9832 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9833 if test "${cf_cv_struct_dirent64+set}" = set; then
9834   echo $ECHO_N "(cached) $ECHO_C" >&6
9835 else
9836
9837                 cat >conftest.$ac_ext <<_ACEOF
9838 #line 9838 "configure"
9839 #include "confdefs.h"
9840
9841 #include <sys/types.h>
9842 #include <dirent.h>
9843
9844 int
9845 main ()
9846 {
9847
9848                 /* if transitional largefile support is setup, this is true */
9849                 extern struct dirent64 * readdir(DIR *);
9850                 struct dirent64 *x = readdir((DIR *)0);
9851                 struct dirent *y = readdir((DIR *)0);
9852                 int z = x - y;
9853
9854   ;
9855   return 0;
9856 }
9857 _ACEOF
9858 rm -f conftest.$ac_objext
9859 if { (eval echo "$as_me:9859: \"$ac_compile\"") >&5
9860   (eval $ac_compile) 2>&5
9861   ac_status=$?
9862   echo "$as_me:9862: \$? = $ac_status" >&5
9863   (exit $ac_status); } &&
9864          { ac_try='test -s conftest.$ac_objext'
9865   { (eval echo "$as_me:9865: \"$ac_try\"") >&5
9866   (eval $ac_try) 2>&5
9867   ac_status=$?
9868   echo "$as_me:9868: \$? = $ac_status" >&5
9869   (exit $ac_status); }; }; then
9870   cf_cv_struct_dirent64=yes
9871 else
9872   echo "$as_me: failed program was:" >&5
9873 cat conftest.$ac_ext >&5
9874 cf_cv_struct_dirent64=no
9875 fi
9876 rm -f conftest.$ac_objext conftest.$ac_ext
9877
9878 fi
9879 echo "$as_me:9879: result: $cf_cv_struct_dirent64" >&5
9880 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9881         test "$cf_cv_struct_dirent64" = yes &&
9882 cat >>confdefs.h <<\EOF
9883 #define HAVE_STRUCT_DIRENT64 1
9884 EOF
9885
9886     fi
9887
9888 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9889 echo "$as_me:9889: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9890 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9891
9892 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9893 if test "${enable_tparm_varargs+set}" = set; then
9894   enableval="$enable_tparm_varargs"
9895   with_tparm_varargs=$enableval
9896 else
9897   with_tparm_varargs=yes
9898 fi;
9899 echo "$as_me:9899: result: $with_tparm_varargs" >&5
9900 echo "${ECHO_T}$with_tparm_varargs" >&6
9901 NCURSES_TPARM_VARARGS=0
9902 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
9903
9904 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9905 if test "$with_ticlib" != no ; then
9906 echo "$as_me:9906: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9907 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9908
9909 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9910 if test "${enable_tic_depends+set}" = set; then
9911   enableval="$enable_tic_depends"
9912   with_tic_depends=$enableval
9913 else
9914   with_tic_depends=yes
9915 fi;
9916 echo "$as_me:9916: result: $with_tic_depends" >&5
9917 echo "${ECHO_T}$with_tic_depends" >&6
9918 else
9919         with_tic_depends=no
9920 fi
9921
9922 ###   use option --with-bool to override bool's type
9923 echo "$as_me:9923: checking for type of bool" >&5
9924 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9925
9926 # Check whether --with-bool or --without-bool was given.
9927 if test "${with_bool+set}" = set; then
9928   withval="$with_bool"
9929   NCURSES_BOOL="$withval"
9930 else
9931   NCURSES_BOOL=auto
9932 fi;
9933 echo "$as_me:9933: result: $NCURSES_BOOL" >&5
9934 echo "${ECHO_T}$NCURSES_BOOL" >&6
9935
9936 echo "$as_me:9936: checking for alternate terminal capabilities file" >&5
9937 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9938
9939 # Check whether --with-caps or --without-caps was given.
9940 if test "${with_caps+set}" = set; then
9941   withval="$with_caps"
9942   TERMINFO_CAPS=Caps.$withval
9943 else
9944   TERMINFO_CAPS=Caps
9945 fi;
9946 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9947 echo "$as_me:9947: result: $TERMINFO_CAPS" >&5
9948 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9949
9950 ###   use option --with-chtype to override chtype's type
9951 echo "$as_me:9951: checking for type of chtype" >&5
9952 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9953
9954 # Check whether --with-chtype or --without-chtype was given.
9955 if test "${with_chtype+set}" = set; then
9956   withval="$with_chtype"
9957   NCURSES_CHTYPE="$withval"
9958 else
9959   NCURSES_CHTYPE=auto
9960 fi;
9961 echo "$as_me:9961: result: $NCURSES_CHTYPE" >&5
9962 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9963
9964 ###   use option --with-ospeed to override ospeed's type
9965 echo "$as_me:9965: checking for type of ospeed" >&5
9966 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9967
9968 # Check whether --with-ospeed or --without-ospeed was given.
9969 if test "${with_ospeed+set}" = set; then
9970   withval="$with_ospeed"
9971   NCURSES_OSPEED="$withval"
9972 else
9973   NCURSES_OSPEED=short
9974 fi;
9975 echo "$as_me:9975: result: $NCURSES_OSPEED" >&5
9976 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9977
9978 ###   use option --with-mmask-t to override mmask_t's type
9979 echo "$as_me:9979: checking for type of mmask_t" >&5
9980 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9981
9982 # Check whether --with-mmask-t or --without-mmask-t was given.
9983 if test "${with_mmask_t+set}" = set; then
9984   withval="$with_mmask_t"
9985   NCURSES_MMASK_T="$withval"
9986 else
9987   NCURSES_MMASK_T=auto
9988 fi;
9989 echo "$as_me:9989: result: $NCURSES_MMASK_T" >&5
9990 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9991
9992 ###   use option --with-ccharw-max to override CCHARW_MAX size
9993 echo "$as_me:9993: checking for size CCHARW_MAX" >&5
9994 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9995
9996 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9997 if test "${with_ccharw_max+set}" = set; then
9998   withval="$with_ccharw_max"
9999   NCURSES_CCHARW_MAX="$withval"
10000 else
10001   NCURSES_CCHARW_MAX=5
10002 fi;
10003 echo "$as_me:10003: result: $NCURSES_CCHARW_MAX" >&5
10004 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10005
10006 ###   use option --with-tparm-arg to override tparm's argument type
10007 echo "$as_me:10007: checking for type of tparm args" >&5
10008 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10009
10010 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10011 if test "${with_tparm_arg+set}" = set; then
10012   withval="$with_tparm_arg"
10013   NCURSES_TPARM_ARG="$withval"
10014 else
10015   NCURSES_TPARM_ARG=long
10016 fi;
10017 echo "$as_me:10017: result: $NCURSES_TPARM_ARG" >&5
10018 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10019
10020 ### Enable compiling-in rcs id's
10021 echo "$as_me:10021: checking if RCS identifiers should be compiled-in" >&5
10022 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10023
10024 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10025 if test "${with_rcs_ids+set}" = set; then
10026   withval="$with_rcs_ids"
10027   with_rcs_ids=$withval
10028 else
10029   with_rcs_ids=no
10030 fi;
10031 echo "$as_me:10031: result: $with_rcs_ids" >&5
10032 echo "${ECHO_T}$with_rcs_ids" >&6
10033 test "x$with_rcs_ids" = xyes &&
10034 cat >>confdefs.h <<\EOF
10035 #define USE_RCS_IDS 1
10036 EOF
10037
10038 ###############################################################################
10039
10040 echo "$as_me:10040: checking format of man-pages" >&5
10041 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10042
10043 # Check whether --with-manpage-format or --without-manpage-format was given.
10044 if test "${with_manpage_format+set}" = set; then
10045   withval="$with_manpage_format"
10046   MANPAGE_FORMAT=$withval
10047 else
10048   MANPAGE_FORMAT=unknown
10049 fi;
10050
10051 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10052 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10053
10054 cf_unknown=
10055
10056 case $MANPAGE_FORMAT in
10057 unknown)
10058   if test -z "$MANPATH" ; then
10059     MANPATH="/usr/man:/usr/share/man"
10060   fi
10061
10062   # look for the 'date' man-page (it's most likely to be installed!)
10063   MANPAGE_FORMAT=
10064   cf_preform=no
10065   cf_catonly=yes
10066   cf_example=date
10067
10068   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10069   for cf_dir in $MANPATH; do
10070     test -z "$cf_dir" && cf_dir=/usr/man
10071     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
10072     do
10073       cf_test=`echo $cf_name | sed -e 's/*//'`
10074       if test "x$cf_test" = "x$cf_name" ; then
10075
10076         case "$cf_name" in
10077         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10078         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10079         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10080         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10081         esac
10082
10083         case "$cf_name" in
10084         $cf_dir/man*)
10085           cf_catonly=no
10086           ;;
10087         $cf_dir/cat*)
10088           cf_preform=yes
10089           ;;
10090         esac
10091         break
10092       fi
10093
10094       # if we found a match in either man* or cat*, stop looking
10095       if test -n "$MANPAGE_FORMAT" ; then
10096         cf_found=no
10097         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10098         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10099         case "$cf_name" in
10100         $cf_dir/cat*)
10101           cf_found=yes
10102           ;;
10103         esac
10104         test $cf_found=yes && break
10105       fi
10106     done
10107     # only check the first directory in $MANPATH where we find manpages
10108     if test -n "$MANPAGE_FORMAT" ; then
10109        break
10110     fi
10111   done
10112   # if we did not find the example, just assume it is normal
10113   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10114   IFS="$ac_save_ifs"
10115   ;;
10116 *)
10117   for cf_option in $MANPAGE_FORMAT; do
10118      case $cf_option in #(vi
10119      gzip|compress|BSDI|normal|formatted|catonly)
10120        ;;
10121      *)
10122        cf_unknown="$cf_unknown $cf_option"
10123        ;;
10124      esac
10125   done
10126   ;;
10127 esac
10128
10129 echo "$as_me:10129: result: $MANPAGE_FORMAT" >&5
10130 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10131 if test -n "$cf_unknown" ; then
10132   { echo "$as_me:10132: WARNING: Unexpected manpage-format $cf_unknown" >&5
10133 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10134 fi
10135
10136 echo "$as_me:10136: checking for manpage renaming" >&5
10137 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10138
10139 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10140 if test "${with_manpage_renames+set}" = set; then
10141   withval="$with_manpage_renames"
10142   MANPAGE_RENAMES=$withval
10143 else
10144   MANPAGE_RENAMES=yes
10145 fi;
10146
10147 case ".$MANPAGE_RENAMES" in #(vi
10148 .no) #(vi
10149   ;;
10150 .|.yes)
10151   # Debian 'man' program?
10152   if test -f /etc/debian_version ; then
10153     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10154   else
10155     MANPAGE_RENAMES=no
10156   fi
10157   ;;
10158 esac
10159
10160 if test "$MANPAGE_RENAMES" != no ; then
10161   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10162     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10163   elif test ! -f $MANPAGE_RENAMES ; then
10164     { { echo "$as_me:10164: error: not a filename: $MANPAGE_RENAMES" >&5
10165 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10166    { (exit 1); exit 1; }; }
10167   fi
10168
10169   test ! -d man && mkdir man
10170
10171   # Construct a sed-script to perform renaming within man-pages
10172   if test -n "$MANPAGE_RENAMES" ; then
10173     test ! -d man && mkdir man
10174     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10175   fi
10176 fi
10177
10178 echo "$as_me:10178: result: $MANPAGE_RENAMES" >&5
10179 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10180
10181 echo "$as_me:10181: checking if manpage aliases will be installed" >&5
10182 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10183
10184 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10185 if test "${with_manpage_aliases+set}" = set; then
10186   withval="$with_manpage_aliases"
10187   MANPAGE_ALIASES=$withval
10188 else
10189   MANPAGE_ALIASES=yes
10190 fi;
10191
10192 echo "$as_me:10192: result: $MANPAGE_ALIASES" >&5
10193 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10194
10195 case "x$LN_S" in #(vi
10196 xln*) #(vi
10197         cf_use_symlinks=yes
10198         ;;
10199 *)
10200         cf_use_symlinks=no
10201         ;;
10202 esac
10203
10204 MANPAGE_SYMLINKS=no
10205 if test "$MANPAGE_ALIASES" = yes ; then
10206 echo "$as_me:10206: checking if manpage symlinks should be used" >&5
10207 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10208
10209 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10210 if test "${with_manpage_symlinks+set}" = set; then
10211   withval="$with_manpage_symlinks"
10212   MANPAGE_SYMLINKS=$withval
10213 else
10214   MANPAGE_SYMLINKS=$cf_use_symlinks
10215 fi;
10216
10217 if test "$$cf_use_symlinks" = no; then
10218 if test "$MANPAGE_SYMLINKS" = yes ; then
10219         { echo "$as_me:10219: WARNING: cannot make symlinks" >&5
10220 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10221         MANPAGE_SYMLINKS=no
10222 fi
10223 fi
10224
10225 echo "$as_me:10225: result: $MANPAGE_SYMLINKS" >&5
10226 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10227 fi
10228
10229 echo "$as_me:10229: checking for manpage tbl" >&5
10230 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10231
10232 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10233 if test "${with_manpage_tbl+set}" = set; then
10234   withval="$with_manpage_tbl"
10235   MANPAGE_TBL=$withval
10236 else
10237   MANPAGE_TBL=no
10238 fi;
10239
10240 echo "$as_me:10240: result: $MANPAGE_TBL" >&5
10241 echo "${ECHO_T}$MANPAGE_TBL" >&6
10242
10243   if test "$prefix" = "NONE" ; then
10244      cf_prefix="$ac_default_prefix"
10245   else
10246      cf_prefix="$prefix"
10247   fi
10248
10249   case "$MANPAGE_FORMAT" in # (vi
10250   *catonly*) # (vi
10251     cf_format=yes
10252     cf_inboth=no
10253     ;;
10254   *formatted*) # (vi
10255     cf_format=yes
10256     cf_inboth=yes
10257     ;;
10258   *)
10259     cf_format=no
10260     cf_inboth=no
10261     ;;
10262   esac
10263
10264 test ! -d man && mkdir man
10265
10266 cf_so_strip=
10267 cf_compress=
10268 case "$MANPAGE_FORMAT" in #(vi
10269 *compress*) #(vi
10270         cf_so_strip="Z"
10271         cf_compress=compress
10272   ;;
10273 *gzip*)
10274         cf_so_strip="gz"
10275         cf_compress=gzip
10276   ;;
10277 esac
10278
10279 cf_edit_man=./edit_man.sh
10280 cf_man_alias=`pwd`/man_alias.sed
10281
10282 cat >$cf_edit_man <<CF_EOF
10283 #! /bin/sh
10284 # this script is generated by the configure-script CF_MAN_PAGES macro.
10285
10286 prefix="$cf_prefix"
10287 datarootdir="$datarootdir"
10288 datadir="$datadir"
10289
10290 NCURSES_MAJOR="$NCURSES_MAJOR"
10291 NCURSES_MINOR="$NCURSES_MINOR"
10292 NCURSES_PATCH="$NCURSES_PATCH"
10293
10294 NCURSES_OSPEED="$NCURSES_OSPEED"
10295 TERMINFO="$TERMINFO"
10296
10297 INSTALL="$INSTALL"
10298 INSTALL_DATA="$INSTALL_DATA"
10299
10300 transform="$program_transform_name"
10301
10302 TMP=\${TMPDIR:=/tmp}/man\$\$
10303 trap "rm -f \$TMP" 0 1 2 5 15
10304
10305 form=\$1
10306 shift || exit 1
10307
10308 verb=\$1
10309 shift || exit 1
10310
10311 mandir=\$1
10312 shift || exit 1
10313
10314 srcdir=\$1
10315 top_srcdir=\$srcdir/..
10316 shift || exit 1
10317
10318 if test "\$form" = normal ; then
10319         if test "$cf_format" = yes ; then
10320         if test "$cf_inboth" = no ; then
10321                 sh \$0 format \$verb \$mandir \$srcdir \$*
10322                 exit $?
10323         fi
10324         fi
10325         cf_subdir=\$mandir/man
10326         cf_tables=$MANPAGE_TBL
10327 else
10328         cf_subdir=\$mandir/cat
10329         cf_tables=yes
10330 fi
10331
10332 # process the list of source-files
10333 for i in \$* ; do
10334 case \$i in #(vi
10335 *.orig|*.rej) ;; #(vi
10336 *.[0-9]*)
10337         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10338         if test \$verb = installing ; then
10339         if test ! -d \$cf_subdir\${section} ; then
10340                 mkdir -p \$cf_subdir\$section
10341         fi
10342         fi
10343
10344         # replace variables in man page
10345         if test ! -f $cf_man_alias ; then
10346 cat >>$cf_man_alias <<-CF_EOF2
10347                 s,@DATADIR@,\$datadir,g
10348                 s,@TERMINFO@,\$TERMINFO,g
10349                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
10350                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
10351                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
10352                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
10353 CF_EOF
10354
10355         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10356         do
10357                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10358                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10359 cat >>$cf_edit_man <<-CF_EOF
10360                 s,@$cf_NAME@,$cf_name,g
10361 CF_EOF
10362         done
10363
10364 cat >>$cf_edit_man <<CF_EOF
10365 CF_EOF2
10366                 echo "...made $cf_man_alias"
10367         fi
10368
10369         aliases=
10370         cf_source=\`basename \$i\`
10371         inalias=\$cf_source
10372         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10373         if test ! -f \$inalias ; then
10374                 echo .. skipped \$cf_source
10375                 continue
10376         fi
10377 CF_EOF
10378
10379 if test "$MANPAGE_ALIASES" != no ; then
10380 cat >>$cf_edit_man <<CF_EOF
10381         nCurses=ignore.3x
10382         test $with_curses_h = yes && nCurses=ncurses.3x
10383         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10384 CF_EOF
10385 fi
10386
10387 if test "$MANPAGE_RENAMES" = no ; then
10388 cat >>$cf_edit_man <<CF_EOF
10389         # perform program transformations for section 1 man pages
10390         if test \$section = 1 ; then
10391                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10392         else
10393                 cf_target=\$cf_subdir\${section}/\$cf_source
10394         fi
10395 CF_EOF
10396 else
10397 cat >>$cf_edit_man <<CF_EOF
10398         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10399         if test -z "\$cf_target" ; then
10400                 echo '? missing rename for '\$cf_source
10401                 cf_target="\$cf_source"
10402         fi
10403         cf_target="\$cf_subdir\${section}/\${cf_target}"
10404
10405 CF_EOF
10406 fi
10407
10408 cat >>$cf_edit_man <<CF_EOF
10409         sed     -f $cf_man_alias \\
10410 CF_EOF
10411
10412 if test -f $MANPAGE_RENAMES ; then
10413 cat >>$cf_edit_man <<CF_EOF
10414                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10415 CF_EOF
10416 else
10417 cat >>$cf_edit_man <<CF_EOF
10418                 < \$i >\$TMP
10419 CF_EOF
10420 fi
10421
10422 cat >>$cf_edit_man <<CF_EOF
10423 if test \$cf_tables = yes ; then
10424         tbl \$TMP >\$TMP.out
10425         mv \$TMP.out \$TMP
10426 fi
10427 CF_EOF
10428
10429 if test $with_overwrite != yes ; then
10430 cat >>$cf_edit_man <<CF_EOF
10431         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10432         mv \$TMP.out \$TMP
10433 CF_EOF
10434 fi
10435
10436 if test $with_curses_h != yes ; then
10437 cat >>$cf_edit_man <<CF_EOF
10438         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10439         mv \$TMP.out \$TMP
10440 CF_EOF
10441 fi
10442
10443 cat >>$cf_edit_man <<CF_EOF
10444         if test \$form = format ; then
10445                 nroff -man \$TMP >\$TMP.out
10446                 mv \$TMP.out \$TMP
10447         fi
10448 CF_EOF
10449
10450 if test -n "$cf_compress" ; then
10451 cat >>$cf_edit_man <<CF_EOF
10452         if test \$verb = installing ; then
10453         if ( $cf_compress -f \$TMP )
10454         then
10455                 mv \$TMP.$cf_so_strip \$TMP
10456         fi
10457         fi
10458         cf_target="\$cf_target.$cf_so_strip"
10459 CF_EOF
10460 fi
10461
10462 case "$MANPAGE_FORMAT" in #(vi
10463 *BSDI*)
10464 cat >>$cf_edit_man <<CF_EOF
10465         if test \$form = format ; then
10466                 # BSDI installs only .0 suffixes in the cat directories
10467                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10468         fi
10469 CF_EOF
10470   ;;
10471 esac
10472
10473 cat >>$cf_edit_man <<CF_EOF
10474         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10475         if test \$verb = installing ; then
10476                 echo \$verb \$cf_target
10477                 \$INSTALL_DATA \$TMP \$cf_target
10478                 test -d \$cf_subdir\${section} &&
10479                 test -n "\$aliases" && (
10480                         cd \$cf_subdir\${section} && (
10481                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10482                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10483                                 cf_target=\`basename \$cf_target\`
10484                                 for cf_alias in \$aliases
10485                                 do
10486                                         if test \$section = 1 ; then
10487                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10488                                         fi
10489
10490                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10491                                                 if test -f \$cf_alias\${suffix} ; then
10492                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10493                                                         then
10494                                                                 continue
10495                                                         fi
10496                                                 fi
10497                                                 echo .. \$verb alias \$cf_alias\${suffix}
10498 CF_EOF
10499 case "x$LN_S" in #(vi
10500 *-f) #(vi
10501 cat >>$cf_edit_man <<CF_EOF
10502                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10503 CF_EOF
10504         ;;
10505 *)
10506 cat >>$cf_edit_man <<CF_EOF
10507                                                 rm -f \$cf_alias\${suffix}
10508                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10509 CF_EOF
10510         ;;
10511 esac
10512 cat >>$cf_edit_man <<CF_EOF
10513                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10514                                                 echo ".so \$cf_source" >\$TMP
10515 CF_EOF
10516 if test -n "$cf_compress" ; then
10517 cat >>$cf_edit_man <<CF_EOF
10518                                                 if test -n "$cf_so_strip" ; then
10519                                                         $cf_compress -f \$TMP
10520                                                         mv \$TMP.$cf_so_strip \$TMP
10521                                                 fi
10522 CF_EOF
10523 fi
10524 cat >>$cf_edit_man <<CF_EOF
10525                                                 echo .. \$verb alias \$cf_alias\${suffix}
10526                                                 rm -f \$cf_alias\${suffix}
10527                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10528                                         fi
10529                                 done
10530                         )
10531                 )
10532         elif test \$verb = removing ; then
10533                 test -f \$cf_target && (
10534                         echo \$verb \$cf_target
10535                         rm -f \$cf_target
10536                 )
10537                 test -d \$cf_subdir\${section} &&
10538                 test -n "\$aliases" && (
10539                         cd \$cf_subdir\${section} && (
10540                                 for cf_alias in \$aliases
10541                                 do
10542                                         if test \$section = 1 ; then
10543                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10544                                         fi
10545
10546                                         echo .. \$verb alias \$cf_alias\${suffix}
10547                                         rm -f \$cf_alias\${suffix}
10548                                 done
10549                         )
10550                 )
10551         else
10552 #               echo ".hy 0"
10553                 cat \$TMP
10554         fi
10555         ;;
10556 esac
10557 done
10558
10559 if test $cf_inboth = yes ; then
10560 if test \$form != format ; then
10561         sh \$0 format \$verb \$mandir \$srcdir \$*
10562 fi
10563 fi
10564
10565 exit 0
10566 CF_EOF
10567 chmod 755 $cf_edit_man
10568
10569 ###############################################################################
10570
10571 ### Note that some functions (such as const) are normally disabled anyway.
10572 echo "$as_me:10572: checking if you want to build with function extensions" >&5
10573 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10574
10575 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10576 if test "${enable_ext_funcs+set}" = set; then
10577   enableval="$enable_ext_funcs"
10578   with_ext_funcs=$enableval
10579 else
10580   with_ext_funcs=yes
10581 fi;
10582 echo "$as_me:10582: result: $with_ext_funcs" >&5
10583 echo "${ECHO_T}$with_ext_funcs" >&6
10584 if test "x$with_ext_funcs" = xyes ; then
10585         NCURSES_EXT_FUNCS=1
10586
10587 cat >>confdefs.h <<\EOF
10588 #define HAVE_ASSUME_DEFAULT_COLORS 1
10589 EOF
10590
10591 cat >>confdefs.h <<\EOF
10592 #define HAVE_CURSES_VERSION 1
10593 EOF
10594
10595 cat >>confdefs.h <<\EOF
10596 #define HAVE_HAS_KEY 1
10597 EOF
10598
10599 cat >>confdefs.h <<\EOF
10600 #define HAVE_RESIZETERM 1
10601 EOF
10602
10603 cat >>confdefs.h <<\EOF
10604 #define HAVE_RESIZE_TERM 1
10605 EOF
10606
10607 cat >>confdefs.h <<\EOF
10608 #define HAVE_TERM_ENTRY_H 1
10609 EOF
10610
10611 cat >>confdefs.h <<\EOF
10612 #define HAVE_USE_DEFAULT_COLORS 1
10613 EOF
10614
10615 cat >>confdefs.h <<\EOF
10616 #define HAVE_USE_SCREEN 1
10617 EOF
10618
10619 cat >>confdefs.h <<\EOF
10620 #define HAVE_USE_WINDOW 1
10621 EOF
10622
10623 cat >>confdefs.h <<\EOF
10624 #define HAVE_WRESIZE 1
10625 EOF
10626
10627 cat >>confdefs.h <<\EOF
10628 #define NCURSES_EXT_FUNCS 1
10629 EOF
10630
10631         GENERATED_EXT_FUNCS=generated
10632 else
10633         NCURSES_EXT_FUNCS=0
10634         GENERATED_EXT_FUNCS=
10635 fi
10636
10637 echo "$as_me:10637: checking if you want to build with experimental SCREEN extensions" >&5
10638 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10639
10640 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10641 if test "${enable_sp_funcs+set}" = set; then
10642   enableval="$enable_sp_funcs"
10643   with_sp_funcs=$enableval
10644 else
10645   with_sp_funcs=no
10646 fi;
10647 echo "$as_me:10647: result: $with_sp_funcs" >&5
10648 echo "${ECHO_T}$with_sp_funcs" >&6
10649 if test "x$with_sp_funcs" = xyes ; then
10650         NCURSES_SP_FUNCS=1
10651
10652 cat >>confdefs.h <<\EOF
10653 #define NCURSES_SP_FUNCS 1
10654 EOF
10655
10656         GENERATED_SP_FUNCS=generated
10657 else
10658         NCURSES_SP_FUNCS=0
10659         GENERATED_SP_FUNCS=
10660 fi
10661
10662 echo "$as_me:10662: checking if you want to build with experimental terminal-driver" >&5
10663 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10664
10665 # Check whether --enable-term-driver or --disable-term-driver was given.
10666 if test "${enable_term_driver+set}" = set; then
10667   enableval="$enable_term_driver"
10668   with_term_driver=$enableval
10669 else
10670   with_term_driver=no
10671 fi;
10672 echo "$as_me:10672: result: $with_term_driver" >&5
10673 echo "${ECHO_T}$with_term_driver" >&6
10674 if test "x$with_term_driver" = xyes ; then
10675
10676 cat >>confdefs.h <<\EOF
10677 #define USE_TERM_DRIVER 1
10678 EOF
10679
10680         if test "x$with_sp_funcs" != xyes ; then
10681                 { { echo "$as_me:10681: error: The term-driver option relies upon sp-funcs" >&5
10682 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10683    { (exit 1); exit 1; }; }
10684         fi
10685 fi
10686
10687 ###   use option --enable-const to turn on use of const beyond that in XSI.
10688 echo "$as_me:10688: checking for extended use of const keyword" >&5
10689 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10690
10691 # Check whether --enable-const or --disable-const was given.
10692 if test "${enable_const+set}" = set; then
10693   enableval="$enable_const"
10694   with_ext_const=$enableval
10695 else
10696   with_ext_const=no
10697 fi;
10698 echo "$as_me:10698: result: $with_ext_const" >&5
10699 echo "${ECHO_T}$with_ext_const" >&6
10700 NCURSES_CONST='/*nothing*/'
10701 if test "x$with_ext_const" = xyes ; then
10702         NCURSES_CONST=const
10703 fi
10704
10705 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10706 echo "$as_me:10706: checking if you want to use extended colors" >&5
10707 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10708
10709 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10710 if test "${enable_ext_colors+set}" = set; then
10711   enableval="$enable_ext_colors"
10712   with_ext_colors=$enableval
10713 else
10714   with_ext_colors=no
10715 fi;
10716 echo "$as_me:10716: result: $with_ext_colors" >&5
10717 echo "${ECHO_T}$with_ext_colors" >&6
10718 NCURSES_EXT_COLORS=0
10719 if test "x$with_ext_colors" = xyes ; then
10720         if test "x$with_widec" != xyes ; then
10721                 { { echo "$as_me:10721: error: This option applies only to wide-character library" >&5
10722 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10723    { (exit 1); exit 1; }; }
10724         else
10725                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10726
10727 if test "${with_abi_version+set}" != set; then
10728         case $cf_cv_rel_version in
10729         5.*)
10730                 cf_cv_rel_version=6.0
10731                 cf_cv_abi_version=6
10732                 { echo "$as_me:10732: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10733 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10734                 ;;
10735         esac
10736 fi
10737
10738         fi
10739         NCURSES_EXT_COLORS=1
10740
10741 cat >>confdefs.h <<\EOF
10742 #define NCURSES_EXT_COLORS 1
10743 EOF
10744
10745 fi
10746
10747 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10748 echo "$as_me:10748: checking if you want to use extended mouse encoding" >&5
10749 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10750
10751 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10752 if test "${enable_ext_mouse+set}" = set; then
10753   enableval="$enable_ext_mouse"
10754   with_ext_mouse=$enableval
10755 else
10756   with_ext_mouse=no
10757 fi;
10758 echo "$as_me:10758: result: $with_ext_mouse" >&5
10759 echo "${ECHO_T}$with_ext_mouse" >&6
10760 NCURSES_MOUSE_VERSION=1
10761 if test "x$with_ext_mouse" = xyes ; then
10762         NCURSES_MOUSE_VERSION=2
10763
10764 if test "${with_abi_version+set}" != set; then
10765         case $cf_cv_rel_version in
10766         5.*)
10767                 cf_cv_rel_version=6.0
10768                 cf_cv_abi_version=6
10769                 { echo "$as_me:10769: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10770 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10771                 ;;
10772         esac
10773 fi
10774
10775 fi
10776
10777 echo "$as_me:10777: checking if you want \$NCURSES_NO_PADDING code" >&5
10778 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10779
10780 # Check whether --enable-no-padding or --disable-no-padding was given.
10781 if test "${enable_no_padding+set}" = set; then
10782   enableval="$enable_no_padding"
10783   with_no_padding=$enableval
10784 else
10785   with_no_padding=$with_ext_funcs
10786 fi;
10787 echo "$as_me:10787: result: $with_no_padding" >&5
10788 echo "${ECHO_T}$with_no_padding" >&6
10789 test "x$with_no_padding" = xyes &&
10790 cat >>confdefs.h <<\EOF
10791 #define NCURSES_NO_PADDING 1
10792 EOF
10793
10794 echo "$as_me:10794: checking for ANSI C header files" >&5
10795 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10796 if test "${ac_cv_header_stdc+set}" = set; then
10797   echo $ECHO_N "(cached) $ECHO_C" >&6
10798 else
10799   cat >conftest.$ac_ext <<_ACEOF
10800 #line 10800 "configure"
10801 #include "confdefs.h"
10802 #include <stdlib.h>
10803 #include <stdarg.h>
10804 #include <string.h>
10805 #include <float.h>
10806
10807 _ACEOF
10808 if { (eval echo "$as_me:10808: \"$ac_cpp conftest.$ac_ext\"") >&5
10809   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10810   ac_status=$?
10811   egrep -v '^ *\+' conftest.er1 >conftest.err
10812   rm -f conftest.er1
10813   cat conftest.err >&5
10814   echo "$as_me:10814: \$? = $ac_status" >&5
10815   (exit $ac_status); } >/dev/null; then
10816   if test -s conftest.err; then
10817     ac_cpp_err=$ac_c_preproc_warn_flag
10818   else
10819     ac_cpp_err=
10820   fi
10821 else
10822   ac_cpp_err=yes
10823 fi
10824 if test -z "$ac_cpp_err"; then
10825   ac_cv_header_stdc=yes
10826 else
10827   echo "$as_me: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   ac_cv_header_stdc=no
10830 fi
10831 rm -f conftest.err conftest.$ac_ext
10832
10833 if test $ac_cv_header_stdc = yes; then
10834   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10835   cat >conftest.$ac_ext <<_ACEOF
10836 #line 10836 "configure"
10837 #include "confdefs.h"
10838 #include <string.h>
10839
10840 _ACEOF
10841 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10842   egrep "memchr" >/dev/null 2>&1; then
10843   :
10844 else
10845   ac_cv_header_stdc=no
10846 fi
10847 rm -rf conftest*
10848
10849 fi
10850
10851 if test $ac_cv_header_stdc = yes; then
10852   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10853   cat >conftest.$ac_ext <<_ACEOF
10854 #line 10854 "configure"
10855 #include "confdefs.h"
10856 #include <stdlib.h>
10857
10858 _ACEOF
10859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10860   egrep "free" >/dev/null 2>&1; then
10861   :
10862 else
10863   ac_cv_header_stdc=no
10864 fi
10865 rm -rf conftest*
10866
10867 fi
10868
10869 if test $ac_cv_header_stdc = yes; then
10870   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10871   if test "$cross_compiling" = yes; then
10872   :
10873 else
10874   cat >conftest.$ac_ext <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877 #include <ctype.h>
10878 #if ((' ' & 0x0FF) == 0x020)
10879 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10880 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10881 #else
10882 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10883                      || ('j' <= (c) && (c) <= 'r') \
10884                      || ('s' <= (c) && (c) <= 'z'))
10885 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10886 #endif
10887
10888 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10889 int
10890 main ()
10891 {
10892   int i;
10893   for (i = 0; i < 256; i++)
10894     if (XOR (islower (i), ISLOWER (i))
10895         || toupper (i) != TOUPPER (i))
10896       $ac_main_return(2);
10897   $ac_main_return (0);
10898 }
10899 _ACEOF
10900 rm -f conftest$ac_exeext
10901 if { (eval echo "$as_me:10901: \"$ac_link\"") >&5
10902   (eval $ac_link) 2>&5
10903   ac_status=$?
10904   echo "$as_me:10904: \$? = $ac_status" >&5
10905   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10906   { (eval echo "$as_me:10906: \"$ac_try\"") >&5
10907   (eval $ac_try) 2>&5
10908   ac_status=$?
10909   echo "$as_me:10909: \$? = $ac_status" >&5
10910   (exit $ac_status); }; }; then
10911   :
10912 else
10913   echo "$as_me: program exited with status $ac_status" >&5
10914 echo "$as_me: failed program was:" >&5
10915 cat conftest.$ac_ext >&5
10916 ac_cv_header_stdc=no
10917 fi
10918 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10919 fi
10920 fi
10921 fi
10922 echo "$as_me:10922: result: $ac_cv_header_stdc" >&5
10923 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10924 if test $ac_cv_header_stdc = yes; then
10925
10926 cat >>confdefs.h <<\EOF
10927 #define STDC_HEADERS 1
10928 EOF
10929
10930 fi
10931
10932 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10933
10934 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10935                   inttypes.h stdint.h unistd.h
10936 do
10937 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10938 echo "$as_me:10938: checking for $ac_header" >&5
10939 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10940 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10941   echo $ECHO_N "(cached) $ECHO_C" >&6
10942 else
10943   cat >conftest.$ac_ext <<_ACEOF
10944 #line 10944 "configure"
10945 #include "confdefs.h"
10946 $ac_includes_default
10947 #include <$ac_header>
10948 _ACEOF
10949 rm -f conftest.$ac_objext
10950 if { (eval echo "$as_me:10950: \"$ac_compile\"") >&5
10951   (eval $ac_compile) 2>&5
10952   ac_status=$?
10953   echo "$as_me:10953: \$? = $ac_status" >&5
10954   (exit $ac_status); } &&
10955          { ac_try='test -s conftest.$ac_objext'
10956   { (eval echo "$as_me:10956: \"$ac_try\"") >&5
10957   (eval $ac_try) 2>&5
10958   ac_status=$?
10959   echo "$as_me:10959: \$? = $ac_status" >&5
10960   (exit $ac_status); }; }; then
10961   eval "$as_ac_Header=yes"
10962 else
10963   echo "$as_me: failed program was:" >&5
10964 cat conftest.$ac_ext >&5
10965 eval "$as_ac_Header=no"
10966 fi
10967 rm -f conftest.$ac_objext conftest.$ac_ext
10968 fi
10969 echo "$as_me:10969: result: `eval echo '${'$as_ac_Header'}'`" >&5
10970 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10971 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10972   cat >>confdefs.h <<EOF
10973 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10974 EOF
10975
10976 fi
10977 done
10978
10979 echo "$as_me:10979: checking for signed char" >&5
10980 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10981 if test "${ac_cv_type_signed_char+set}" = set; then
10982   echo $ECHO_N "(cached) $ECHO_C" >&6
10983 else
10984   cat >conftest.$ac_ext <<_ACEOF
10985 #line 10985 "configure"
10986 #include "confdefs.h"
10987 $ac_includes_default
10988 int
10989 main ()
10990 {
10991 if ((signed char *) 0)
10992   return 0;
10993 if (sizeof (signed char))
10994   return 0;
10995   ;
10996   return 0;
10997 }
10998 _ACEOF
10999 rm -f conftest.$ac_objext
11000 if { (eval echo "$as_me:11000: \"$ac_compile\"") >&5
11001   (eval $ac_compile) 2>&5
11002   ac_status=$?
11003   echo "$as_me:11003: \$? = $ac_status" >&5
11004   (exit $ac_status); } &&
11005          { ac_try='test -s conftest.$ac_objext'
11006   { (eval echo "$as_me:11006: \"$ac_try\"") >&5
11007   (eval $ac_try) 2>&5
11008   ac_status=$?
11009   echo "$as_me:11009: \$? = $ac_status" >&5
11010   (exit $ac_status); }; }; then
11011   ac_cv_type_signed_char=yes
11012 else
11013   echo "$as_me: failed program was:" >&5
11014 cat conftest.$ac_ext >&5
11015 ac_cv_type_signed_char=no
11016 fi
11017 rm -f conftest.$ac_objext conftest.$ac_ext
11018 fi
11019 echo "$as_me:11019: result: $ac_cv_type_signed_char" >&5
11020 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11021
11022 echo "$as_me:11022: checking size of signed char" >&5
11023 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11024 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11025   echo $ECHO_N "(cached) $ECHO_C" >&6
11026 else
11027   if test "$ac_cv_type_signed_char" = yes; then
11028   if test "$cross_compiling" = yes; then
11029   # Depending upon the size, compute the lo and hi bounds.
11030 cat >conftest.$ac_ext <<_ACEOF
11031 #line 11031 "configure"
11032 #include "confdefs.h"
11033 $ac_includes_default
11034 int
11035 main ()
11036 {
11037 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11038   ;
11039   return 0;
11040 }
11041 _ACEOF
11042 rm -f conftest.$ac_objext
11043 if { (eval echo "$as_me:11043: \"$ac_compile\"") >&5
11044   (eval $ac_compile) 2>&5
11045   ac_status=$?
11046   echo "$as_me:11046: \$? = $ac_status" >&5
11047   (exit $ac_status); } &&
11048          { ac_try='test -s conftest.$ac_objext'
11049   { (eval echo "$as_me:11049: \"$ac_try\"") >&5
11050   (eval $ac_try) 2>&5
11051   ac_status=$?
11052   echo "$as_me:11052: \$? = $ac_status" >&5
11053   (exit $ac_status); }; }; then
11054   ac_lo=0 ac_mid=0
11055   while :; do
11056     cat >conftest.$ac_ext <<_ACEOF
11057 #line 11057 "configure"
11058 #include "confdefs.h"
11059 $ac_includes_default
11060 int
11061 main ()
11062 {
11063 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 rm -f conftest.$ac_objext
11069 if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5
11070   (eval $ac_compile) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit $ac_status); } &&
11074          { ac_try='test -s conftest.$ac_objext'
11075   { (eval echo "$as_me:11075: \"$ac_try\"") >&5
11076   (eval $ac_try) 2>&5
11077   ac_status=$?
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit $ac_status); }; }; then
11080   ac_hi=$ac_mid; break
11081 else
11082   echo "$as_me: failed program was:" >&5
11083 cat conftest.$ac_ext >&5
11084 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11085 fi
11086 rm -f conftest.$ac_objext conftest.$ac_ext
11087   done
11088 else
11089   echo "$as_me: failed program was:" >&5
11090 cat conftest.$ac_ext >&5
11091 ac_hi=-1 ac_mid=-1
11092   while :; do
11093     cat >conftest.$ac_ext <<_ACEOF
11094 #line 11094 "configure"
11095 #include "confdefs.h"
11096 $ac_includes_default
11097 int
11098 main ()
11099 {
11100 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11101   ;
11102   return 0;
11103 }
11104 _ACEOF
11105 rm -f conftest.$ac_objext
11106 if { (eval echo "$as_me:11106: \"$ac_compile\"") >&5
11107   (eval $ac_compile) 2>&5
11108   ac_status=$?
11109   echo "$as_me:11109: \$? = $ac_status" >&5
11110   (exit $ac_status); } &&
11111          { ac_try='test -s conftest.$ac_objext'
11112   { (eval echo "$as_me:11112: \"$ac_try\"") >&5
11113   (eval $ac_try) 2>&5
11114   ac_status=$?
11115   echo "$as_me:11115: \$? = $ac_status" >&5
11116   (exit $ac_status); }; }; then
11117   ac_lo=$ac_mid; break
11118 else
11119   echo "$as_me: failed program was:" >&5
11120 cat conftest.$ac_ext >&5
11121 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11122 fi
11123 rm -f conftest.$ac_objext conftest.$ac_ext
11124   done
11125 fi
11126 rm -f conftest.$ac_objext conftest.$ac_ext
11127 # Binary search between lo and hi bounds.
11128 while test "x$ac_lo" != "x$ac_hi"; do
11129   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11130   cat >conftest.$ac_ext <<_ACEOF
11131 #line 11131 "configure"
11132 #include "confdefs.h"
11133 $ac_includes_default
11134 int
11135 main ()
11136 {
11137 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11138   ;
11139   return 0;
11140 }
11141 _ACEOF
11142 rm -f conftest.$ac_objext
11143 if { (eval echo "$as_me:11143: \"$ac_compile\"") >&5
11144   (eval $ac_compile) 2>&5
11145   ac_status=$?
11146   echo "$as_me:11146: \$? = $ac_status" >&5
11147   (exit $ac_status); } &&
11148          { ac_try='test -s conftest.$ac_objext'
11149   { (eval echo "$as_me:11149: \"$ac_try\"") >&5
11150   (eval $ac_try) 2>&5
11151   ac_status=$?
11152   echo "$as_me:11152: \$? = $ac_status" >&5
11153   (exit $ac_status); }; }; then
11154   ac_hi=$ac_mid
11155 else
11156   echo "$as_me: failed program was:" >&5
11157 cat conftest.$ac_ext >&5
11158 ac_lo=`expr $ac_mid + 1`
11159 fi
11160 rm -f conftest.$ac_objext conftest.$ac_ext
11161 done
11162 ac_cv_sizeof_signed_char=$ac_lo
11163 else
11164   if test "$cross_compiling" = yes; then
11165   { { echo "$as_me:11165: error: cannot run test program while cross compiling" >&5
11166 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11167    { (exit 1); exit 1; }; }
11168 else
11169   cat >conftest.$ac_ext <<_ACEOF
11170 #line 11170 "configure"
11171 #include "confdefs.h"
11172 $ac_includes_default
11173 int
11174 main ()
11175 {
11176 FILE *f = fopen ("conftest.val", "w");
11177 if (!f)
11178   $ac_main_return (1);
11179 fprintf (f, "%d", (sizeof (signed char)));
11180 fclose (f);
11181   ;
11182   return 0;
11183 }
11184 _ACEOF
11185 rm -f conftest$ac_exeext
11186 if { (eval echo "$as_me:11186: \"$ac_link\"") >&5
11187   (eval $ac_link) 2>&5
11188   ac_status=$?
11189   echo "$as_me:11189: \$? = $ac_status" >&5
11190   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11191   { (eval echo "$as_me:11191: \"$ac_try\"") >&5
11192   (eval $ac_try) 2>&5
11193   ac_status=$?
11194   echo "$as_me:11194: \$? = $ac_status" >&5
11195   (exit $ac_status); }; }; then
11196   ac_cv_sizeof_signed_char=`cat conftest.val`
11197 else
11198   echo "$as_me: program exited with status $ac_status" >&5
11199 echo "$as_me: failed program was:" >&5
11200 cat conftest.$ac_ext >&5
11201 fi
11202 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11203 fi
11204 fi
11205 rm -f conftest.val
11206 else
11207   ac_cv_sizeof_signed_char=0
11208 fi
11209 fi
11210 echo "$as_me:11210: result: $ac_cv_sizeof_signed_char" >&5
11211 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11212 cat >>confdefs.h <<EOF
11213 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11214 EOF
11215
11216 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11217         NCURSES_SBOOL="signed char"
11218 else
11219         NCURSES_SBOOL="char"
11220 fi
11221 echo "$as_me:11221: checking if you want to use signed Boolean array in term.h" >&5
11222 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11223
11224 # Check whether --enable-signed-char or --disable-signed-char was given.
11225 if test "${enable_signed_char+set}" = set; then
11226   enableval="$enable_signed_char"
11227   with_signed_char=$enableval
11228 else
11229   with_signed_char=no
11230 fi;
11231 echo "$as_me:11231: result: $with_signed_char" >&5
11232 echo "${ECHO_T}$with_signed_char" >&6
11233 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11234
11235 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11236 echo "$as_me:11236: checking if you want SIGWINCH handler" >&5
11237 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11238
11239 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11240 if test "${enable_sigwinch+set}" = set; then
11241   enableval="$enable_sigwinch"
11242   with_sigwinch=$enableval
11243 else
11244   with_sigwinch=$with_ext_funcs
11245 fi;
11246 echo "$as_me:11246: result: $with_sigwinch" >&5
11247 echo "${ECHO_T}$with_sigwinch" >&6
11248 test "x$with_sigwinch" = xyes &&
11249 cat >>confdefs.h <<\EOF
11250 #define USE_SIGWINCH 1
11251 EOF
11252
11253 ###   use option --enable-tcap-names to allow user to define new capabilities
11254 echo "$as_me:11254: checking if you want user-definable terminal capabilities like termcap" >&5
11255 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11256
11257 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11258 if test "${enable_tcap_names+set}" = set; then
11259   enableval="$enable_tcap_names"
11260   with_tcap_names=$enableval
11261 else
11262   with_tcap_names=$with_ext_funcs
11263 fi;
11264 echo "$as_me:11264: result: $with_tcap_names" >&5
11265 echo "${ECHO_T}$with_tcap_names" >&6
11266 NCURSES_XNAMES=0
11267 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11268
11269 ###############################################################################
11270 # These options are relatively safe to experiment with.
11271
11272 echo "$as_me:11272: checking if you want all development code" >&5
11273 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11274
11275 # Check whether --with-develop or --without-develop was given.
11276 if test "${with_develop+set}" = set; then
11277   withval="$with_develop"
11278   with_develop=$withval
11279 else
11280   with_develop=no
11281 fi;
11282 echo "$as_me:11282: result: $with_develop" >&5
11283 echo "${ECHO_T}$with_develop" >&6
11284
11285 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11286 echo "$as_me:11286: checking if you want hard-tabs code" >&5
11287 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11288
11289 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11290 if test "${enable_hard_tabs+set}" = set; then
11291   enableval="$enable_hard_tabs"
11292
11293 else
11294   enable_hard_tabs=$with_develop
11295 fi;
11296 echo "$as_me:11296: result: $enable_hard_tabs" >&5
11297 echo "${ECHO_T}$enable_hard_tabs" >&6
11298 test "x$enable_hard_tabs" = xyes &&
11299 cat >>confdefs.h <<\EOF
11300 #define USE_HARD_TABS 1
11301 EOF
11302
11303 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11304 echo "$as_me:11304: checking if you want limited support for xmc" >&5
11305 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11306
11307 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11308 if test "${enable_xmc_glitch+set}" = set; then
11309   enableval="$enable_xmc_glitch"
11310
11311 else
11312   enable_xmc_glitch=$with_develop
11313 fi;
11314 echo "$as_me:11314: result: $enable_xmc_glitch" >&5
11315 echo "${ECHO_T}$enable_xmc_glitch" >&6
11316 test "x$enable_xmc_glitch" = xyes &&
11317 cat >>confdefs.h <<\EOF
11318 #define USE_XMC_SUPPORT 1
11319 EOF
11320
11321 ###############################################################################
11322 # These are just experimental, probably should not be in a package:
11323
11324 echo "$as_me:11324: checking if you do not want to assume colors are white-on-black" >&5
11325 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11326
11327 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11328 if test "${enable_assumed_color+set}" = set; then
11329   enableval="$enable_assumed_color"
11330   with_assumed_color=$enableval
11331 else
11332   with_assumed_color=yes
11333 fi;
11334 echo "$as_me:11334: result: $with_assumed_color" >&5
11335 echo "${ECHO_T}$with_assumed_color" >&6
11336 test "x$with_assumed_color" = xyes &&
11337 cat >>confdefs.h <<\EOF
11338 #define USE_ASSUMED_COLOR 1
11339 EOF
11340
11341 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11342 echo "$as_me:11342: checking if you want hashmap scrolling-optimization code" >&5
11343 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11344
11345 # Check whether --enable-hashmap or --disable-hashmap was given.
11346 if test "${enable_hashmap+set}" = set; then
11347   enableval="$enable_hashmap"
11348   with_hashmap=$enableval
11349 else
11350   with_hashmap=yes
11351 fi;
11352 echo "$as_me:11352: result: $with_hashmap" >&5
11353 echo "${ECHO_T}$with_hashmap" >&6
11354 test "x$with_hashmap" = xyes &&
11355 cat >>confdefs.h <<\EOF
11356 #define USE_HASHMAP 1
11357 EOF
11358
11359 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11360 echo "$as_me:11360: checking if you want colorfgbg code" >&5
11361 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11362
11363 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11364 if test "${enable_colorfgbg+set}" = set; then
11365   enableval="$enable_colorfgbg"
11366   with_colorfgbg=$enableval
11367 else
11368   with_colorfgbg=no
11369 fi;
11370 echo "$as_me:11370: result: $with_colorfgbg" >&5
11371 echo "${ECHO_T}$with_colorfgbg" >&6
11372 test "x$with_colorfgbg" = xyes &&
11373 cat >>confdefs.h <<\EOF
11374 #define USE_COLORFGBG 1
11375 EOF
11376
11377 ###   use option --enable-interop to turn on use of bindings used for interop
11378 echo "$as_me:11378: checking if you want interop bindings" >&5
11379 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11380
11381 # Check whether --enable-interop or --disable-interop was given.
11382 if test "${enable_interop+set}" = set; then
11383   enableval="$enable_interop"
11384   with_exp_interop=$enableval
11385 else
11386   with_exp_interop=no
11387 fi;
11388 echo "$as_me:11388: result: $with_exp_interop" >&5
11389 echo "${ECHO_T}$with_exp_interop" >&6
11390
11391 NCURSES_INTEROP_FUNCS=0
11392 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11393
11394 # This is still experimental (20080329), but should ultimately be moved to
11395 # the script-block --with-normal, etc.
11396
11397 echo "$as_me:11397: checking if you want to link with the pthread library" >&5
11398 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11399
11400 # Check whether --with-pthread or --without-pthread was given.
11401 if test "${with_pthread+set}" = set; then
11402   withval="$with_pthread"
11403   with_pthread=$withval
11404 else
11405   with_pthread=no
11406 fi;
11407 echo "$as_me:11407: result: $with_pthread" >&5
11408 echo "${ECHO_T}$with_pthread" >&6
11409
11410 if test "$with_pthread" != no ; then
11411     echo "$as_me:11411: checking for pthread.h" >&5
11412 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11413 if test "${ac_cv_header_pthread_h+set}" = set; then
11414   echo $ECHO_N "(cached) $ECHO_C" >&6
11415 else
11416   cat >conftest.$ac_ext <<_ACEOF
11417 #line 11417 "configure"
11418 #include "confdefs.h"
11419 #include <pthread.h>
11420 _ACEOF
11421 if { (eval echo "$as_me:11421: \"$ac_cpp conftest.$ac_ext\"") >&5
11422   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11423   ac_status=$?
11424   egrep -v '^ *\+' conftest.er1 >conftest.err
11425   rm -f conftest.er1
11426   cat conftest.err >&5
11427   echo "$as_me:11427: \$? = $ac_status" >&5
11428   (exit $ac_status); } >/dev/null; then
11429   if test -s conftest.err; then
11430     ac_cpp_err=$ac_c_preproc_warn_flag
11431   else
11432     ac_cpp_err=
11433   fi
11434 else
11435   ac_cpp_err=yes
11436 fi
11437 if test -z "$ac_cpp_err"; then
11438   ac_cv_header_pthread_h=yes
11439 else
11440   echo "$as_me: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   ac_cv_header_pthread_h=no
11443 fi
11444 rm -f conftest.err conftest.$ac_ext
11445 fi
11446 echo "$as_me:11446: result: $ac_cv_header_pthread_h" >&5
11447 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11448 if test $ac_cv_header_pthread_h = yes; then
11449
11450 cat >>confdefs.h <<\EOF
11451 #define HAVE_PTHREADS_H 1
11452 EOF
11453
11454         for cf_lib_pthread in pthread c_r
11455         do
11456             echo "$as_me:11456: checking if we can link with the $cf_lib_pthread library" >&5
11457 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11458             cf_save_LIBS="$LIBS"
11459             LIBS="-l$cf_lib_pthread $LIBS"
11460             cat >conftest.$ac_ext <<_ACEOF
11461 #line 11461 "configure"
11462 #include "confdefs.h"
11463
11464 #include <pthread.h>
11465
11466 int
11467 main ()
11468 {
11469
11470                 int rc = pthread_create(0,0,0,0);
11471                 int r2 = pthread_mutexattr_settype(0, 0);
11472
11473   ;
11474   return 0;
11475 }
11476 _ACEOF
11477 rm -f conftest.$ac_objext conftest$ac_exeext
11478 if { (eval echo "$as_me:11478: \"$ac_link\"") >&5
11479   (eval $ac_link) 2>&5
11480   ac_status=$?
11481   echo "$as_me:11481: \$? = $ac_status" >&5
11482   (exit $ac_status); } &&
11483          { ac_try='test -s conftest$ac_exeext'
11484   { (eval echo "$as_me:11484: \"$ac_try\"") >&5
11485   (eval $ac_try) 2>&5
11486   ac_status=$?
11487   echo "$as_me:11487: \$? = $ac_status" >&5
11488   (exit $ac_status); }; }; then
11489   with_pthread=yes
11490 else
11491   echo "$as_me: failed program was:" >&5
11492 cat conftest.$ac_ext >&5
11493 with_pthread=no
11494 fi
11495 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11496             LIBS="$cf_save_LIBS"
11497             echo "$as_me:11497: result: $with_pthread" >&5
11498 echo "${ECHO_T}$with_pthread" >&6
11499             test "$with_pthread" = yes && break
11500         done
11501
11502         if test "$with_pthread" = yes ; then
11503             LIBS="-l$cf_lib_pthread $LIBS"
11504
11505 cat >>confdefs.h <<\EOF
11506 #define HAVE_LIBPTHREADS 1
11507 EOF
11508
11509         else
11510             { { echo "$as_me:11510: error: Cannot link with pthread library" >&5
11511 echo "$as_me: error: Cannot link with pthread library" >&2;}
11512    { (exit 1); exit 1; }; }
11513         fi
11514
11515 fi
11516
11517 fi
11518
11519 if test "x$with_pthread" != xno; then
11520         echo "$as_me:11520: checking for pthread_kill" >&5
11521 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11522 if test "${ac_cv_func_pthread_kill+set}" = set; then
11523   echo $ECHO_N "(cached) $ECHO_C" >&6
11524 else
11525   cat >conftest.$ac_ext <<_ACEOF
11526 #line 11526 "configure"
11527 #include "confdefs.h"
11528 /* System header to define __stub macros and hopefully few prototypes,
11529     which can conflict with char pthread_kill (); below.  */
11530 #include <assert.h>
11531 /* Override any gcc2 internal prototype to avoid an error.  */
11532 #ifdef __cplusplus
11533 extern "C"
11534 #endif
11535 /* We use char because int might match the return type of a gcc2
11536    builtin and then its argument prototype would still apply.  */
11537 char pthread_kill ();
11538 char (*f) ();
11539
11540 int
11541 main ()
11542 {
11543 /* The GNU C library defines this for functions which it implements
11544     to always fail with ENOSYS.  Some functions are actually named
11545     something starting with __ and the normal name is an alias.  */
11546 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11547 choke me
11548 #else
11549 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
11550 #endif
11551
11552   ;
11553   return 0;
11554 }
11555 _ACEOF
11556 rm -f conftest.$ac_objext conftest$ac_exeext
11557 if { (eval echo "$as_me:11557: \"$ac_link\"") >&5
11558   (eval $ac_link) 2>&5
11559   ac_status=$?
11560   echo "$as_me:11560: \$? = $ac_status" >&5
11561   (exit $ac_status); } &&
11562          { ac_try='test -s conftest$ac_exeext'
11563   { (eval echo "$as_me:11563: \"$ac_try\"") >&5
11564   (eval $ac_try) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); }; }; then
11568   ac_cv_func_pthread_kill=yes
11569 else
11570   echo "$as_me: failed program was:" >&5
11571 cat conftest.$ac_ext >&5
11572 ac_cv_func_pthread_kill=no
11573 fi
11574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11575 fi
11576 echo "$as_me:11576: result: $ac_cv_func_pthread_kill" >&5
11577 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11578 if test $ac_cv_func_pthread_kill = yes; then
11579
11580                 echo "$as_me:11580: checking if you want to allow EINTR in wgetch with pthreads" >&5
11581 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11582
11583 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11584 if test "${enable_pthreads_eintr+set}" = set; then
11585   enableval="$enable_pthreads_eintr"
11586   use_pthreads_eintr=$enableval
11587 else
11588   use_pthreads_eintr=no
11589 fi;
11590                 echo "$as_me:11590: result: $use_pthreads_eintr" >&5
11591 echo "${ECHO_T}$use_pthreads_eintr" >&6
11592                 if test "x$use_pthreads_eintr" = xyes ; then
11593
11594 cat >>confdefs.h <<\EOF
11595 #define USE_PTHREADS_EINTR 1
11596 EOF
11597
11598                 fi
11599 fi
11600
11601         echo "$as_me:11601: checking if you want to use weak-symbols for pthreads" >&5
11602 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11603
11604 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11605 if test "${enable_weak_symbols+set}" = set; then
11606   enableval="$enable_weak_symbols"
11607   use_weak_symbols=$enableval
11608 else
11609   use_weak_symbols=no
11610 fi;
11611         echo "$as_me:11611: result: $use_weak_symbols" >&5
11612 echo "${ECHO_T}$use_weak_symbols" >&6
11613         if test "x$use_weak_symbols" = xyes ; then
11614
11615 echo "$as_me:11615: checking if $CC supports weak symbols" >&5
11616 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11617 if test "${cf_cv_weak_symbols+set}" = set; then
11618   echo $ECHO_N "(cached) $ECHO_C" >&6
11619 else
11620
11621 cat >conftest.$ac_ext <<_ACEOF
11622 #line 11622 "configure"
11623 #include "confdefs.h"
11624
11625 #include <stdio.h>
11626 int
11627 main ()
11628 {
11629
11630 #if defined(__GNUC__)
11631 #  if defined __USE_ISOC99
11632 #    define _cat_pragma(exp)    _Pragma(#exp)
11633 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11634 #  else
11635 #    define _weak_pragma(exp)
11636 #  endif
11637 #  define _declare(name)        __extension__ extern __typeof__(name) name
11638 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11639 #endif
11640
11641 weak_symbol(fopen);
11642
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 rm -f conftest.$ac_objext
11648 if { (eval echo "$as_me:11648: \"$ac_compile\"") >&5
11649   (eval $ac_compile) 2>&5
11650   ac_status=$?
11651   echo "$as_me:11651: \$? = $ac_status" >&5
11652   (exit $ac_status); } &&
11653          { ac_try='test -s conftest.$ac_objext'
11654   { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655   (eval $ac_try) 2>&5
11656   ac_status=$?
11657   echo "$as_me:11657: \$? = $ac_status" >&5
11658   (exit $ac_status); }; }; then
11659   cf_cv_weak_symbols=yes
11660 else
11661   echo "$as_me: failed program was:" >&5
11662 cat conftest.$ac_ext >&5
11663 cf_cv_weak_symbols=no
11664 fi
11665 rm -f conftest.$ac_objext conftest.$ac_ext
11666
11667 fi
11668 echo "$as_me:11668: result: $cf_cv_weak_symbols" >&5
11669 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11670
11671         else
11672                 cf_cv_weak_symbols=no
11673         fi
11674
11675         if test "x$cf_cv_weak_symbols" = xyes ; then
11676
11677 cat >>confdefs.h <<\EOF
11678 #define USE_WEAK_SYMBOLS 1
11679 EOF
11680
11681         fi
11682 fi
11683
11684 PTHREAD=
11685 if test "x$with_pthread" = "xyes" ; then
11686
11687 cat >>confdefs.h <<\EOF
11688 #define USE_PTHREADS 1
11689 EOF
11690
11691     enable_reentrant=yes
11692     if test "x$cf_cv_weak_symbols" = xyes ; then
11693         PTHREAD=-lpthread
11694     fi
11695 fi
11696
11697 # Reentrant code has to be opaque; there's little advantage to making ncurses
11698 # opaque outside of that, so there is no --enable-opaque option.  We can use
11699 # this option without --with-pthreads, but this will be always set for
11700 # pthreads.
11701 echo "$as_me:11701: checking if you want experimental reentrant code" >&5
11702 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11703
11704 # Check whether --enable-reentrant or --disable-reentrant was given.
11705 if test "${enable_reentrant+set}" = set; then
11706   enableval="$enable_reentrant"
11707   with_reentrant=$enableval
11708 else
11709   with_reentrant=no
11710 fi;
11711 echo "$as_me:11711: result: $with_reentrant" >&5
11712 echo "${ECHO_T}$with_reentrant" >&6
11713 if test "x$with_reentrant" = xyes ; then
11714         cf_cv_enable_reentrant=1
11715         cf_cv_enable_opaque="NCURSES_INTERNALS"
11716         NCURSES_OPAQUE=1
11717         NCURSES_SIZE_T=int
11718         if test "x$cf_cv_weak_symbols" = xyes ; then
11719
11720 # remove pthread library from $LIBS
11721 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11722
11723                 TEST_LIBS="-lpthread $TEST_LIBS"
11724                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11725         else
11726                 LIB_SUFFIX="t${LIB_SUFFIX}"
11727         fi
11728
11729 cat >>confdefs.h <<\EOF
11730 #define USE_REENTRANT 1
11731 EOF
11732
11733 if test "${with_abi_version+set}" != set; then
11734         case $cf_cv_rel_version in
11735         5.*)
11736                 cf_cv_rel_version=6.0
11737                 cf_cv_abi_version=6
11738                 { echo "$as_me:11738: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11739 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11740                 ;;
11741         esac
11742 fi
11743
11744 else
11745         cf_cv_enable_reentrant=0
11746         cf_cv_enable_opaque="NCURSES_OPAQUE"
11747         NCURSES_OPAQUE=0
11748         NCURSES_SIZE_T=short
11749 fi
11750
11751 ### Allow using a different wrap-prefix
11752 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11753         echo "$as_me:11753: checking for prefix used to wrap public variables" >&5
11754 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11755
11756 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11757 if test "${with_wrap_prefix+set}" = set; then
11758   withval="$with_wrap_prefix"
11759   NCURSES_WRAP_PREFIX=$withval
11760 else
11761   NCURSES_WRAP_PREFIX=_nc_
11762 fi;
11763         echo "$as_me:11763: result: $NCURSES_WRAP_PREFIX" >&5
11764 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11765 else
11766         NCURSES_WRAP_PREFIX=_nc_
11767 fi
11768
11769 cat >>confdefs.h <<EOF
11770 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11771 EOF
11772
11773 echo "$as_me:11773: checking if you want experimental safe-sprintf code" >&5
11774 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11775
11776 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11777 if test "${enable_safe_sprintf+set}" = set; then
11778   enableval="$enable_safe_sprintf"
11779   with_safe_sprintf=$enableval
11780 else
11781   with_safe_sprintf=no
11782 fi;
11783 echo "$as_me:11783: result: $with_safe_sprintf" >&5
11784 echo "${ECHO_T}$with_safe_sprintf" >&6
11785 test "x$with_safe_sprintf" = xyes &&
11786 cat >>confdefs.h <<\EOF
11787 #define USE_SAFE_SPRINTF 1
11788 EOF
11789
11790 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11791 # when hashmap is used scroll hints are useless
11792 if test "$with_hashmap" = no ; then
11793 echo "$as_me:11793: checking if you want to experiment without scrolling-hints code" >&5
11794 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11795
11796 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11797 if test "${enable_scroll_hints+set}" = set; then
11798   enableval="$enable_scroll_hints"
11799   with_scroll_hints=$enableval
11800 else
11801   with_scroll_hints=yes
11802 fi;
11803 echo "$as_me:11803: result: $with_scroll_hints" >&5
11804 echo "${ECHO_T}$with_scroll_hints" >&6
11805 test "x$with_scroll_hints" = xyes &&
11806 cat >>confdefs.h <<\EOF
11807 #define USE_SCROLL_HINTS 1
11808 EOF
11809
11810 fi
11811
11812 echo "$as_me:11812: checking if you want experimental wgetch-events code" >&5
11813 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11814
11815 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11816 if test "${enable_wgetch_events+set}" = set; then
11817   enableval="$enable_wgetch_events"
11818   with_wgetch_events=$enableval
11819 else
11820   with_wgetch_events=no
11821 fi;
11822 echo "$as_me:11822: result: $with_wgetch_events" >&5
11823 echo "${ECHO_T}$with_wgetch_events" >&6
11824 test "x$with_wgetch_events" = xyes &&
11825 cat >>confdefs.h <<\EOF
11826 #define NCURSES_WGETCH_EVENTS 1
11827 EOF
11828
11829 ###############################################################################
11830
11831 ###     use option --disable-echo to suppress full display compiling commands
11832
11833 echo "$as_me:11833: checking if you want to see long compiling messages" >&5
11834 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
11835
11836 # Check whether --enable-echo or --disable-echo was given.
11837 if test "${enable_echo+set}" = set; then
11838   enableval="$enable_echo"
11839   test "$enableval" != no && enableval=yes
11840   if test "$enableval" != "yes" ; then
11841
11842     ECHO_LT='--silent'
11843     ECHO_LD='@echo linking $@;'
11844     RULE_CC='@echo compiling $<'
11845     SHOW_CC='@echo compiling $@'
11846     ECHO_CC='@'
11847
11848   else
11849
11850     ECHO_LT=''
11851     ECHO_LD=''
11852     RULE_CC=''
11853     SHOW_CC=''
11854     ECHO_CC=''
11855
11856   fi
11857 else
11858   enableval=yes
11859
11860     ECHO_LT=''
11861     ECHO_LD=''
11862     RULE_CC=''
11863     SHOW_CC=''
11864     ECHO_CC=''
11865
11866 fi;
11867 echo "$as_me:11867: result: $enableval" >&5
11868 echo "${ECHO_T}$enableval" >&6
11869
11870 if test "x$enable_echo" = xyes; then
11871         ECHO_LINK=
11872 else
11873         ECHO_LINK='@ echo linking $@ ... ;'
11874         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11875         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11876 fi
11877
11878 ###     use option --enable-warnings to turn on all gcc warnings
11879 echo "$as_me:11879: checking if you want to see compiler warnings" >&5
11880 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11881
11882 # Check whether --enable-warnings or --disable-warnings was given.
11883 if test "${enable_warnings+set}" = set; then
11884   enableval="$enable_warnings"
11885   with_warnings=$enableval
11886 fi;
11887 echo "$as_me:11887: result: $with_warnings" >&5
11888 echo "${ECHO_T}$with_warnings" >&6
11889
11890 if test "x$with_warnings" = "xyes"; then
11891
11892         ADAFLAGS="$ADAFLAGS -gnatg"
11893
11894 INTEL_COMPILER=no
11895
11896 if test "$GCC" = yes ; then
11897         case $host_os in
11898         linux*|gnu*)
11899                 echo "$as_me:11899: checking if this is really Intel C compiler" >&5
11900 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11901                 cf_save_CFLAGS="$CFLAGS"
11902                 CFLAGS="$CFLAGS -no-gcc"
11903                 cat >conftest.$ac_ext <<_ACEOF
11904 #line 11904 "configure"
11905 #include "confdefs.h"
11906
11907 int
11908 main ()
11909 {
11910
11911 #ifdef __INTEL_COMPILER
11912 #else
11913 make an error
11914 #endif
11915
11916   ;
11917   return 0;
11918 }
11919 _ACEOF
11920 rm -f conftest.$ac_objext
11921 if { (eval echo "$as_me:11921: \"$ac_compile\"") >&5
11922   (eval $ac_compile) 2>&5
11923   ac_status=$?
11924   echo "$as_me:11924: \$? = $ac_status" >&5
11925   (exit $ac_status); } &&
11926          { ac_try='test -s conftest.$ac_objext'
11927   { (eval echo "$as_me:11927: \"$ac_try\"") >&5
11928   (eval $ac_try) 2>&5
11929   ac_status=$?
11930   echo "$as_me:11930: \$? = $ac_status" >&5
11931   (exit $ac_status); }; }; then
11932   INTEL_COMPILER=yes
11933 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11934
11935 else
11936   echo "$as_me: failed program was:" >&5
11937 cat conftest.$ac_ext >&5
11938 fi
11939 rm -f conftest.$ac_objext conftest.$ac_ext
11940                 CFLAGS="$cf_save_CFLAGS"
11941                 echo "$as_me:11941: result: $INTEL_COMPILER" >&5
11942 echo "${ECHO_T}$INTEL_COMPILER" >&6
11943                 ;;
11944         esac
11945 fi
11946
11947 CLANG_COMPILER=no
11948
11949 if test "$GCC" = yes ; then
11950         echo "$as_me:11950: checking if this is really Clang C compiler" >&5
11951 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
11952         cf_save_CFLAGS="$CFLAGS"
11953         CFLAGS="$CFLAGS -Qunused-arguments"
11954         cat >conftest.$ac_ext <<_ACEOF
11955 #line 11955 "configure"
11956 #include "confdefs.h"
11957
11958 int
11959 main ()
11960 {
11961
11962 #ifdef __clang__
11963 #else
11964 make an error
11965 #endif
11966
11967   ;
11968   return 0;
11969 }
11970 _ACEOF
11971 rm -f conftest.$ac_objext
11972 if { (eval echo "$as_me:11972: \"$ac_compile\"") >&5
11973   (eval $ac_compile) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); } &&
11977          { ac_try='test -s conftest.$ac_objext'
11978   { (eval echo "$as_me:11978: \"$ac_try\"") >&5
11979   (eval $ac_try) 2>&5
11980   ac_status=$?
11981   echo "$as_me:11981: \$? = $ac_status" >&5
11982   (exit $ac_status); }; }; then
11983   CLANG_COMPILER=yes
11984 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
11985
11986 else
11987   echo "$as_me: failed program was:" >&5
11988 cat conftest.$ac_ext >&5
11989 fi
11990 rm -f conftest.$ac_objext conftest.$ac_ext
11991         CFLAGS="$cf_save_CFLAGS"
11992         echo "$as_me:11992: result: $CLANG_COMPILER" >&5
11993 echo "${ECHO_T}$CLANG_COMPILER" >&6
11994 fi
11995
11996 cat > conftest.$ac_ext <<EOF
11997 #line 11997 "${as_me:-configure}"
11998 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11999 EOF
12000
12001 if test "$INTEL_COMPILER" = yes
12002 then
12003 # The "-wdXXX" options suppress warnings:
12004 # remark #1419: external declaration in primary source file
12005 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12006 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12007 # remark #193: zero used for undefined preprocessing identifier
12008 # remark #593: variable "curs_sb_left_arrow" was set but never used
12009 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12010 # remark #869: parameter "tw" was never referenced
12011 # remark #981: operands are evaluated in unspecified order
12012 # warning #279: controlling expression is constant
12013
12014         { echo "$as_me:12014: checking for $CC warning options..." >&5
12015 echo "$as_me: checking for $CC warning options..." >&6;}
12016         cf_save_CFLAGS="$CFLAGS"
12017         EXTRA_CFLAGS="-Wall"
12018         for cf_opt in \
12019                 wd1419 \
12020                 wd1683 \
12021                 wd1684 \
12022                 wd193 \
12023                 wd593 \
12024                 wd279 \
12025                 wd810 \
12026                 wd869 \
12027                 wd981
12028         do
12029                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12030                 if { (eval echo "$as_me:12030: \"$ac_compile\"") >&5
12031   (eval $ac_compile) 2>&5
12032   ac_status=$?
12033   echo "$as_me:12033: \$? = $ac_status" >&5
12034   (exit $ac_status); }; then
12035                         test -n "$verbose" && echo "$as_me:12035: result: ... -$cf_opt" >&5
12036 echo "${ECHO_T}... -$cf_opt" >&6
12037                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12038                 fi
12039         done
12040         CFLAGS="$cf_save_CFLAGS"
12041
12042 elif test "$GCC" = yes
12043 then
12044         { echo "$as_me:12044: checking for $CC warning options..." >&5
12045 echo "$as_me: checking for $CC warning options..." >&6;}
12046         cf_save_CFLAGS="$CFLAGS"
12047         EXTRA_CFLAGS=
12048         cf_warn_CONST=""
12049         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12050         for cf_opt in W Wall \
12051                 Wbad-function-cast \
12052                 Wcast-align \
12053                 Wcast-qual \
12054                 Winline \
12055                 Wmissing-declarations \
12056                 Wmissing-prototypes \
12057                 Wnested-externs \
12058                 Wpointer-arith \
12059                 Wshadow \
12060                 Wstrict-prototypes \
12061                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
12062         do
12063                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12064                 if { (eval echo "$as_me:12064: \"$ac_compile\"") >&5
12065   (eval $ac_compile) 2>&5
12066   ac_status=$?
12067   echo "$as_me:12067: \$? = $ac_status" >&5
12068   (exit $ac_status); }; then
12069                         test -n "$verbose" && echo "$as_me:12069: result: ... -$cf_opt" >&5
12070 echo "${ECHO_T}... -$cf_opt" >&6
12071                         case $cf_opt in #(vi
12072                         Wcast-qual) #(vi
12073                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12074                                 ;;
12075                         Winline) #(vi
12076                                 case $GCC_VERSION in
12077                                 [34].*)
12078                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12079
12080 echo "${as_me:-configure}:12080: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12081
12082                                         continue;;
12083                                 esac
12084                                 ;;
12085                         Wpointer-arith) #(vi
12086                                 case $GCC_VERSION in
12087                                 [12].*)
12088                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12089
12090 echo "${as_me:-configure}:12090: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12091
12092                                         continue;;
12093                                 esac
12094                                 ;;
12095                         esac
12096                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12097                 fi
12098         done
12099         CFLAGS="$cf_save_CFLAGS"
12100 fi
12101 rm -rf conftest*
12102
12103         if test "x$cf_with_cxx" = xyes ; then
12104
12105 INTEL_CPLUSPLUS=no
12106
12107 if test "$GCC" = yes ; then
12108         case $host_os in
12109         linux*|gnu*)
12110                 echo "$as_me:12110: checking if this is really Intel C++ compiler" >&5
12111 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12112                 cf_save_CFLAGS="$CXXFLAGS"
12113                 CXXFLAGS="$CXXFLAGS -no-gcc"
12114                 cat >conftest.$ac_ext <<_ACEOF
12115 #line 12115 "configure"
12116 #include "confdefs.h"
12117
12118 int
12119 main ()
12120 {
12121
12122 #ifdef __INTEL_COMPILER
12123 #else
12124 make an error
12125 #endif
12126
12127   ;
12128   return 0;
12129 }
12130 _ACEOF
12131 rm -f conftest.$ac_objext
12132 if { (eval echo "$as_me:12132: \"$ac_compile\"") >&5
12133   (eval $ac_compile) 2>&5
12134   ac_status=$?
12135   echo "$as_me:12135: \$? = $ac_status" >&5
12136   (exit $ac_status); } &&
12137          { ac_try='test -s conftest.$ac_objext'
12138   { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:12141: \$? = $ac_status" >&5
12142   (exit $ac_status); }; }; then
12143   INTEL_CPLUSPLUS=yes
12144 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
12145
12146 else
12147   echo "$as_me: failed program was:" >&5
12148 cat conftest.$ac_ext >&5
12149 fi
12150 rm -f conftest.$ac_objext conftest.$ac_ext
12151                 CXXFLAGS="$cf_save_CFLAGS"
12152                 echo "$as_me:12152: result: $INTEL_CPLUSPLUS" >&5
12153 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12154                 ;;
12155         esac
12156 fi
12157
12158 CLANG_CPLUSPLUS=no
12159
12160 if test "$GCC" = yes ; then
12161         echo "$as_me:12161: checking if this is really Clang C++ compiler" >&5
12162 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12163         cf_save_CFLAGS="$CXXFLAGS"
12164         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12165         cat >conftest.$ac_ext <<_ACEOF
12166 #line 12166 "configure"
12167 #include "confdefs.h"
12168
12169 int
12170 main ()
12171 {
12172
12173 #ifdef __clang__
12174 #else
12175 make an error
12176 #endif
12177
12178   ;
12179   return 0;
12180 }
12181 _ACEOF
12182 rm -f conftest.$ac_objext
12183 if { (eval echo "$as_me:12183: \"$ac_compile\"") >&5
12184   (eval $ac_compile) 2>&5
12185   ac_status=$?
12186   echo "$as_me:12186: \$? = $ac_status" >&5
12187   (exit $ac_status); } &&
12188          { ac_try='test -s conftest.$ac_objext'
12189   { (eval echo "$as_me:12189: \"$ac_try\"") >&5
12190   (eval $ac_try) 2>&5
12191   ac_status=$?
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); }; }; then
12194   CLANG_CPLUSPLUS=yes
12195 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12196
12197 else
12198   echo "$as_me: failed program was:" >&5
12199 cat conftest.$ac_ext >&5
12200 fi
12201 rm -f conftest.$ac_objext conftest.$ac_ext
12202         CXXFLAGS="$cf_save_CFLAGS"
12203         echo "$as_me:12203: result: $CLANG_CPLUSPLUS" >&5
12204 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12205 fi
12206
12207 ac_ext=cc
12208 ac_cpp='$CXXCPP $CPPFLAGS'
12209 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12210 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12211 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12212 ac_main_return=return
12213
12214 cat > conftest.$ac_ext <<EOF
12215 #line 12215 "configure"
12216 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12217 EOF
12218
12219 if test "$INTEL_CPLUSPLUS" = yes
12220 then
12221 # The "-wdXXX" options suppress warnings:
12222 # remark #1419: external declaration in primary source file
12223 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12224 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12225 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12226 # remark #193: zero used for undefined preprocessing identifier
12227 # remark #593: variable "curs_sb_left_arrow" was set but never used
12228 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12229 # remark #869: parameter "tw" was never referenced
12230 # remark #981: operands are evaluated in unspecified order
12231 # warning #269: invalid format string conversion
12232
12233         { echo "$as_me:12233: checking for $CC warning options..." >&5
12234 echo "$as_me: checking for $CC warning options..." >&6;}
12235         cf_save_CXXFLAGS="$CXXFLAGS"
12236         EXTRA_CXXFLAGS="-Wall"
12237         for cf_opt in \
12238                 wd1419 \
12239                 wd1682 \
12240                 wd1683 \
12241                 wd1684 \
12242                 wd193 \
12243                 wd279 \
12244                 wd593 \
12245                 wd810 \
12246                 wd869 \
12247                 wd981
12248         do
12249                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12250                 if { (eval echo "$as_me:12250: \"$ac_compile\"") >&5
12251   (eval $ac_compile) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); }; then
12255                         test -n "$verbose" && echo "$as_me:12255: result: ... -$cf_opt" >&5
12256 echo "${ECHO_T}... -$cf_opt" >&6
12257                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12258                 fi
12259         done
12260         CXXFLAGS="$cf_save_CXXFLAGS"
12261
12262 elif test "$GXX" = yes
12263 then
12264         { echo "$as_me:12264: checking for $CXX warning options..." >&5
12265 echo "$as_me: checking for $CXX warning options..." >&6;}
12266         cf_save_CXXFLAGS="$CXXFLAGS"
12267         EXTRA_CXXFLAGS="-W -Wall"
12268         cf_gxx_extra_warnings=""
12269         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12270         case "$GCC_VERSION" in
12271         [1-2].*)
12272                 ;;
12273         *)
12274                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12275                 ;;
12276         esac
12277         for cf_opt in \
12278                 Wabi \
12279                 fabi-version=0 \
12280                 Woverloaded-virtual \
12281                 Wsign-promo \
12282                 Wsynth \
12283                 Wold-style-cast \
12284                 Wcast-align \
12285                 Wcast-qual \
12286                 Wmissing-prototypes \
12287                 Wpointer-arith \
12288                 Wshadow \
12289                 Wstrict-prototypes \
12290                 Wundef $cf_gxx_extra_warnings Wno-unused
12291         do
12292                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12293                 if { (eval echo "$as_me:12293: \"$ac_compile\"") >&5
12294   (eval $ac_compile) 2>&5
12295   ac_status=$?
12296   echo "$as_me:12296: \$? = $ac_status" >&5
12297   (exit $ac_status); }; then
12298                         test -n "$verbose" && echo "$as_me:12298: result: ... -$cf_opt" >&5
12299 echo "${ECHO_T}... -$cf_opt" >&6
12300                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12301                 else
12302                         test -n "$verbose" && echo "$as_me:12302: result: ... no -$cf_opt" >&5
12303 echo "${ECHO_T}... no -$cf_opt" >&6
12304                 fi
12305         done
12306         CXXFLAGS="$cf_save_CXXFLAGS"
12307 fi
12308
12309 rm -rf conftest*
12310 ac_ext=c
12311 ac_cpp='$CPP $CPPFLAGS'
12312 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12313 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12315 ac_main_return=return
12316
12317         fi
12318 fi
12319
12320 if test "$GCC" = yes
12321 then
12322 cat > conftest.i <<EOF
12323 #ifndef GCC_PRINTF
12324 #define GCC_PRINTF 0
12325 #endif
12326 #ifndef GCC_SCANF
12327 #define GCC_SCANF 0
12328 #endif
12329 #ifndef GCC_NORETURN
12330 #define GCC_NORETURN /* nothing */
12331 #endif
12332 #ifndef GCC_UNUSED
12333 #define GCC_UNUSED /* nothing */
12334 #endif
12335 EOF
12336 if test "$GCC" = yes
12337 then
12338         { echo "$as_me:12338: checking for $CC __attribute__ directives..." >&5
12339 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12340 cat > conftest.$ac_ext <<EOF
12341 #line 12341 "${as_me:-configure}"
12342 #include "confdefs.h"
12343 #include "conftest.h"
12344 #include "conftest.i"
12345 #if     GCC_PRINTF
12346 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12347 #else
12348 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12349 #endif
12350 #if     GCC_SCANF
12351 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12352 #else
12353 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12354 #endif
12355 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12356 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12357 extern void foo(void) GCC_NORETURN;
12358 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12359 EOF
12360         cf_printf_attribute=no
12361         cf_scanf_attribute=no
12362         for cf_attribute in scanf printf unused noreturn
12363         do
12364
12365 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12366
12367                 cf_directive="__attribute__(($cf_attribute))"
12368                 echo "checking for $CC $cf_directive" 1>&5
12369
12370                 case $cf_attribute in #(vi
12371                 printf) #(vi
12372                         cf_printf_attribute=yes
12373                         cat >conftest.h <<EOF
12374 #define GCC_$cf_ATTRIBUTE 1
12375 EOF
12376                         ;;
12377                 scanf) #(vi
12378                         cf_scanf_attribute=yes
12379                         cat >conftest.h <<EOF
12380 #define GCC_$cf_ATTRIBUTE 1
12381 EOF
12382                         ;;
12383                 *) #(vi
12384                         cat >conftest.h <<EOF
12385 #define GCC_$cf_ATTRIBUTE $cf_directive
12386 EOF
12387                         ;;
12388                 esac
12389
12390                 if { (eval echo "$as_me:12390: \"$ac_compile\"") >&5
12391   (eval $ac_compile) 2>&5
12392   ac_status=$?
12393   echo "$as_me:12393: \$? = $ac_status" >&5
12394   (exit $ac_status); }; then
12395                         test -n "$verbose" && echo "$as_me:12395: result: ... $cf_attribute" >&5
12396 echo "${ECHO_T}... $cf_attribute" >&6
12397                         cat conftest.h >>confdefs.h
12398                         case $cf_attribute in #(vi
12399                         noreturn) #(vi
12400
12401 cat >>confdefs.h <<EOF
12402 #define GCC_NORETURN $cf_directive
12403 EOF
12404
12405                                 ;;
12406                         printf) #(vi
12407                                 cf_value='/* nothing */'
12408                                 if test "$cf_printf_attribute" != no ; then
12409                                         cf_value='__attribute__((format(printf,fmt,var)))'
12410
12411 cat >>confdefs.h <<\EOF
12412 #define GCC_PRINTF 1
12413 EOF
12414
12415                                 fi
12416
12417 cat >>confdefs.h <<EOF
12418 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12419 EOF
12420
12421                                 ;;
12422                         scanf) #(vi
12423                                 cf_value='/* nothing */'
12424                                 if test "$cf_scanf_attribute" != no ; then
12425                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12426
12427 cat >>confdefs.h <<\EOF
12428 #define GCC_SCANF 1
12429 EOF
12430
12431                                 fi
12432
12433 cat >>confdefs.h <<EOF
12434 #define GCC_SCANFLIKE(fmt,var) $cf_value
12435 EOF
12436
12437                                 ;;
12438                         unused) #(vi
12439
12440 cat >>confdefs.h <<EOF
12441 #define GCC_UNUSED $cf_directive
12442 EOF
12443
12444                                 ;;
12445                         esac
12446                 fi
12447         done
12448 else
12449         fgrep define conftest.i >>confdefs.h
12450 fi
12451 rm -rf conftest*
12452 fi
12453
12454 echo "$as_me:12454: checking if you want to work around bogus compiler/loader warnings" >&5
12455 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12456
12457 # Check whether --enable-string-hacks or --disable-string-hacks was given.
12458 if test "${enable_string_hacks+set}" = set; then
12459   enableval="$enable_string_hacks"
12460   with_string_hacks=$enableval
12461 else
12462   with_string_hacks=no
12463 fi;
12464 echo "$as_me:12464: result: $with_string_hacks" >&5
12465 echo "${ECHO_T}$with_string_hacks" >&6
12466
12467 if test "x$with_string_hacks" = "xyes"; then
12468
12469 cat >>confdefs.h <<\EOF
12470 #define USE_STRING_HACKS 1
12471 EOF
12472
12473         { echo "$as_me:12473: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
12474 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
12475
12476 for ac_func in strlcat strlcpy snprintf
12477 do
12478 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479 echo "$as_me:12479: checking for $ac_func" >&5
12480 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12481 if eval "test \"\${$as_ac_var+set}\" = set"; then
12482   echo $ECHO_N "(cached) $ECHO_C" >&6
12483 else
12484   cat >conftest.$ac_ext <<_ACEOF
12485 #line 12485 "configure"
12486 #include "confdefs.h"
12487 /* System header to define __stub macros and hopefully few prototypes,
12488     which can conflict with char $ac_func (); below.  */
12489 #include <assert.h>
12490 /* Override any gcc2 internal prototype to avoid an error.  */
12491 #ifdef __cplusplus
12492 extern "C"
12493 #endif
12494 /* We use char because int might match the return type of a gcc2
12495    builtin and then its argument prototype would still apply.  */
12496 char $ac_func ();
12497 char (*f) ();
12498
12499 int
12500 main ()
12501 {
12502 /* The GNU C library defines this for functions which it implements
12503     to always fail with ENOSYS.  Some functions are actually named
12504     something starting with __ and the normal name is an alias.  */
12505 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12506 choke me
12507 #else
12508 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12509 #endif
12510
12511   ;
12512   return 0;
12513 }
12514 _ACEOF
12515 rm -f conftest.$ac_objext conftest$ac_exeext
12516 if { (eval echo "$as_me:12516: \"$ac_link\"") >&5
12517   (eval $ac_link) 2>&5
12518   ac_status=$?
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit $ac_status); } &&
12521          { ac_try='test -s conftest$ac_exeext'
12522   { (eval echo "$as_me:12522: \"$ac_try\"") >&5
12523   (eval $ac_try) 2>&5
12524   ac_status=$?
12525   echo "$as_me:12525: \$? = $ac_status" >&5
12526   (exit $ac_status); }; }; then
12527   eval "$as_ac_var=yes"
12528 else
12529   echo "$as_me: failed program was:" >&5
12530 cat conftest.$ac_ext >&5
12531 eval "$as_ac_var=no"
12532 fi
12533 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12534 fi
12535 echo "$as_me:12535: result: `eval echo '${'$as_ac_var'}'`" >&5
12536 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12537 if test `eval echo '${'$as_ac_var'}'` = yes; then
12538   cat >>confdefs.h <<EOF
12539 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12540 EOF
12541
12542 fi
12543 done
12544
12545 fi
12546
12547 ###     use option --enable-assertions to turn on generation of assertion code
12548 echo "$as_me:12548: checking if you want to enable runtime assertions" >&5
12549 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
12550
12551 # Check whether --enable-assertions or --disable-assertions was given.
12552 if test "${enable_assertions+set}" = set; then
12553   enableval="$enable_assertions"
12554   with_assertions=$enableval
12555 else
12556   with_assertions=no
12557 fi;
12558 echo "$as_me:12558: result: $with_assertions" >&5
12559 echo "${ECHO_T}$with_assertions" >&6
12560 if test -n "$GCC"
12561 then
12562         if test "$with_assertions" = no
12563         then
12564                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
12565         else
12566
12567         ADAFLAGS="$ADAFLAGS -gnata"
12568
12569         fi
12570 fi
12571
12572 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
12573
12574 echo "$as_me:12574: checking if you want to use dmalloc for testing" >&5
12575 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
12576
12577 # Check whether --with-dmalloc or --without-dmalloc was given.
12578 if test "${with_dmalloc+set}" = set; then
12579   withval="$with_dmalloc"
12580
12581 cat >>confdefs.h <<EOF
12582 #define USE_DMALLOC 1
12583 EOF
12584
12585         : ${with_cflags:=-g}
12586         : ${with_no_leaks:=yes}
12587          with_dmalloc=yes
12588 else
12589   with_dmalloc=
12590 fi;
12591 echo "$as_me:12591: result: ${with_dmalloc:-no}" >&5
12592 echo "${ECHO_T}${with_dmalloc:-no}" >&6
12593
12594 case .$with_cflags in #(vi
12595 .*-g*)
12596         case .$CFLAGS in #(vi
12597         .*-g*) #(vi
12598                 ;;
12599         *)
12600
12601 cf_fix_cppflags=no
12602 cf_new_cflags=
12603 cf_new_cppflags=
12604 cf_new_extra_cppflags=
12605
12606 for cf_add_cflags in -g
12607 do
12608 case $cf_fix_cppflags in
12609 no)
12610         case $cf_add_cflags in #(vi
12611         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12612                 case $cf_add_cflags in
12613                 -D*)
12614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12615
12616                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12617                                 && test -z "${cf_tst_cflags}" \
12618                                 && cf_fix_cppflags=yes
12619
12620                         if test $cf_fix_cppflags = yes ; then
12621                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12622                                 continue
12623                         elif test "${cf_tst_cflags}" = "\"'" ; then
12624                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12625                                 continue
12626                         fi
12627                         ;;
12628                 esac
12629                 case "$CPPFLAGS" in
12630                 *$cf_add_cflags) #(vi
12631                         ;;
12632                 *) #(vi
12633                         case $cf_add_cflags in #(vi
12634                         -D*)
12635                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12636
12637 CPPFLAGS=`echo "$CPPFLAGS" | \
12638         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12639                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12640
12641                                 ;;
12642                         esac
12643                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12644                         ;;
12645                 esac
12646                 ;;
12647         *)
12648                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12649                 ;;
12650         esac
12651         ;;
12652 yes)
12653         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12654
12655         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12656
12657         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12658                 && test -z "${cf_tst_cflags}" \
12659                 && cf_fix_cppflags=no
12660         ;;
12661 esac
12662 done
12663
12664 if test -n "$cf_new_cflags" ; then
12665
12666         CFLAGS="$CFLAGS $cf_new_cflags"
12667 fi
12668
12669 if test -n "$cf_new_cppflags" ; then
12670
12671         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12672 fi
12673
12674 if test -n "$cf_new_extra_cppflags" ; then
12675
12676         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12677 fi
12678
12679                 ;;
12680         esac
12681         ;;
12682 esac
12683
12684 if test "$with_dmalloc" = yes ; then
12685         echo "$as_me:12685: checking for dmalloc.h" >&5
12686 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12687 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12688   echo $ECHO_N "(cached) $ECHO_C" >&6
12689 else
12690   cat >conftest.$ac_ext <<_ACEOF
12691 #line 12691 "configure"
12692 #include "confdefs.h"
12693 #include <dmalloc.h>
12694 _ACEOF
12695 if { (eval echo "$as_me:12695: \"$ac_cpp conftest.$ac_ext\"") >&5
12696   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12697   ac_status=$?
12698   egrep -v '^ *\+' conftest.er1 >conftest.err
12699   rm -f conftest.er1
12700   cat conftest.err >&5
12701   echo "$as_me:12701: \$? = $ac_status" >&5
12702   (exit $ac_status); } >/dev/null; then
12703   if test -s conftest.err; then
12704     ac_cpp_err=$ac_c_preproc_warn_flag
12705   else
12706     ac_cpp_err=
12707   fi
12708 else
12709   ac_cpp_err=yes
12710 fi
12711 if test -z "$ac_cpp_err"; then
12712   ac_cv_header_dmalloc_h=yes
12713 else
12714   echo "$as_me: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   ac_cv_header_dmalloc_h=no
12717 fi
12718 rm -f conftest.err conftest.$ac_ext
12719 fi
12720 echo "$as_me:12720: result: $ac_cv_header_dmalloc_h" >&5
12721 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12722 if test $ac_cv_header_dmalloc_h = yes; then
12723
12724 echo "$as_me:12724: checking for dmalloc_debug in -ldmalloc" >&5
12725 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12726 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12727   echo $ECHO_N "(cached) $ECHO_C" >&6
12728 else
12729   ac_check_lib_save_LIBS=$LIBS
12730 LIBS="-ldmalloc  $LIBS"
12731 cat >conftest.$ac_ext <<_ACEOF
12732 #line 12732 "configure"
12733 #include "confdefs.h"
12734
12735 /* Override any gcc2 internal prototype to avoid an error.  */
12736 #ifdef __cplusplus
12737 extern "C"
12738 #endif
12739 /* We use char because int might match the return type of a gcc2
12740    builtin and then its argument prototype would still apply.  */
12741 char dmalloc_debug ();
12742 int
12743 main ()
12744 {
12745 dmalloc_debug ();
12746   ;
12747   return 0;
12748 }
12749 _ACEOF
12750 rm -f conftest.$ac_objext conftest$ac_exeext
12751 if { (eval echo "$as_me:12751: \"$ac_link\"") >&5
12752   (eval $ac_link) 2>&5
12753   ac_status=$?
12754   echo "$as_me:12754: \$? = $ac_status" >&5
12755   (exit $ac_status); } &&
12756          { ac_try='test -s conftest$ac_exeext'
12757   { (eval echo "$as_me:12757: \"$ac_try\"") >&5
12758   (eval $ac_try) 2>&5
12759   ac_status=$?
12760   echo "$as_me:12760: \$? = $ac_status" >&5
12761   (exit $ac_status); }; }; then
12762   ac_cv_lib_dmalloc_dmalloc_debug=yes
12763 else
12764   echo "$as_me: failed program was:" >&5
12765 cat conftest.$ac_ext >&5
12766 ac_cv_lib_dmalloc_dmalloc_debug=no
12767 fi
12768 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12769 LIBS=$ac_check_lib_save_LIBS
12770 fi
12771 echo "$as_me:12771: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12772 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12773 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12774   cat >>confdefs.h <<EOF
12775 #define HAVE_LIBDMALLOC 1
12776 EOF
12777
12778   LIBS="-ldmalloc $LIBS"
12779
12780 fi
12781
12782 fi
12783
12784 fi
12785
12786 echo "$as_me:12786: checking if you want to use dbmalloc for testing" >&5
12787 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12788
12789 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12790 if test "${with_dbmalloc+set}" = set; then
12791   withval="$with_dbmalloc"
12792
12793 cat >>confdefs.h <<EOF
12794 #define USE_DBMALLOC 1
12795 EOF
12796
12797         : ${with_cflags:=-g}
12798         : ${with_no_leaks:=yes}
12799          with_dbmalloc=yes
12800 else
12801   with_dbmalloc=
12802 fi;
12803 echo "$as_me:12803: result: ${with_dbmalloc:-no}" >&5
12804 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12805
12806 case .$with_cflags in #(vi
12807 .*-g*)
12808         case .$CFLAGS in #(vi
12809         .*-g*) #(vi
12810                 ;;
12811         *)
12812
12813 cf_fix_cppflags=no
12814 cf_new_cflags=
12815 cf_new_cppflags=
12816 cf_new_extra_cppflags=
12817
12818 for cf_add_cflags in -g
12819 do
12820 case $cf_fix_cppflags in
12821 no)
12822         case $cf_add_cflags in #(vi
12823         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12824                 case $cf_add_cflags in
12825                 -D*)
12826                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12827
12828                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12829                                 && test -z "${cf_tst_cflags}" \
12830                                 && cf_fix_cppflags=yes
12831
12832                         if test $cf_fix_cppflags = yes ; then
12833                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12834                                 continue
12835                         elif test "${cf_tst_cflags}" = "\"'" ; then
12836                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12837                                 continue
12838                         fi
12839                         ;;
12840                 esac
12841                 case "$CPPFLAGS" in
12842                 *$cf_add_cflags) #(vi
12843                         ;;
12844                 *) #(vi
12845                         case $cf_add_cflags in #(vi
12846                         -D*)
12847                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12848
12849 CPPFLAGS=`echo "$CPPFLAGS" | \
12850         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12851                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12852
12853                                 ;;
12854                         esac
12855                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12856                         ;;
12857                 esac
12858                 ;;
12859         *)
12860                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12861                 ;;
12862         esac
12863         ;;
12864 yes)
12865         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12866
12867         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12868
12869         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12870                 && test -z "${cf_tst_cflags}" \
12871                 && cf_fix_cppflags=no
12872         ;;
12873 esac
12874 done
12875
12876 if test -n "$cf_new_cflags" ; then
12877
12878         CFLAGS="$CFLAGS $cf_new_cflags"
12879 fi
12880
12881 if test -n "$cf_new_cppflags" ; then
12882
12883         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12884 fi
12885
12886 if test -n "$cf_new_extra_cppflags" ; then
12887
12888         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12889 fi
12890
12891                 ;;
12892         esac
12893         ;;
12894 esac
12895
12896 if test "$with_dbmalloc" = yes ; then
12897         echo "$as_me:12897: checking for dbmalloc.h" >&5
12898 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12899 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12900   echo $ECHO_N "(cached) $ECHO_C" >&6
12901 else
12902   cat >conftest.$ac_ext <<_ACEOF
12903 #line 12903 "configure"
12904 #include "confdefs.h"
12905 #include <dbmalloc.h>
12906 _ACEOF
12907 if { (eval echo "$as_me:12907: \"$ac_cpp conftest.$ac_ext\"") >&5
12908   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12909   ac_status=$?
12910   egrep -v '^ *\+' conftest.er1 >conftest.err
12911   rm -f conftest.er1
12912   cat conftest.err >&5
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); } >/dev/null; then
12915   if test -s conftest.err; then
12916     ac_cpp_err=$ac_c_preproc_warn_flag
12917   else
12918     ac_cpp_err=
12919   fi
12920 else
12921   ac_cpp_err=yes
12922 fi
12923 if test -z "$ac_cpp_err"; then
12924   ac_cv_header_dbmalloc_h=yes
12925 else
12926   echo "$as_me: failed program was:" >&5
12927   cat conftest.$ac_ext >&5
12928   ac_cv_header_dbmalloc_h=no
12929 fi
12930 rm -f conftest.err conftest.$ac_ext
12931 fi
12932 echo "$as_me:12932: result: $ac_cv_header_dbmalloc_h" >&5
12933 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12934 if test $ac_cv_header_dbmalloc_h = yes; then
12935
12936 echo "$as_me:12936: checking for debug_malloc in -ldbmalloc" >&5
12937 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12938 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12939   echo $ECHO_N "(cached) $ECHO_C" >&6
12940 else
12941   ac_check_lib_save_LIBS=$LIBS
12942 LIBS="-ldbmalloc  $LIBS"
12943 cat >conftest.$ac_ext <<_ACEOF
12944 #line 12944 "configure"
12945 #include "confdefs.h"
12946
12947 /* Override any gcc2 internal prototype to avoid an error.  */
12948 #ifdef __cplusplus
12949 extern "C"
12950 #endif
12951 /* We use char because int might match the return type of a gcc2
12952    builtin and then its argument prototype would still apply.  */
12953 char debug_malloc ();
12954 int
12955 main ()
12956 {
12957 debug_malloc ();
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -f conftest.$ac_objext conftest$ac_exeext
12963 if { (eval echo "$as_me:12963: \"$ac_link\"") >&5
12964   (eval $ac_link) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); } &&
12968          { ac_try='test -s conftest$ac_exeext'
12969   { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970   (eval $ac_try) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit $ac_status); }; }; then
12974   ac_cv_lib_dbmalloc_debug_malloc=yes
12975 else
12976   echo "$as_me: failed program was:" >&5
12977 cat conftest.$ac_ext >&5
12978 ac_cv_lib_dbmalloc_debug_malloc=no
12979 fi
12980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12981 LIBS=$ac_check_lib_save_LIBS
12982 fi
12983 echo "$as_me:12983: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12984 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12985 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12986   cat >>confdefs.h <<EOF
12987 #define HAVE_LIBDBMALLOC 1
12988 EOF
12989
12990   LIBS="-ldbmalloc $LIBS"
12991
12992 fi
12993
12994 fi
12995
12996 fi
12997
12998 echo "$as_me:12998: checking if you want to use valgrind for testing" >&5
12999 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13000
13001 # Check whether --with-valgrind or --without-valgrind was given.
13002 if test "${with_valgrind+set}" = set; then
13003   withval="$with_valgrind"
13004
13005 cat >>confdefs.h <<EOF
13006 #define USE_VALGRIND 1
13007 EOF
13008
13009         : ${with_cflags:=-g}
13010         : ${with_no_leaks:=yes}
13011          with_valgrind=yes
13012 else
13013   with_valgrind=
13014 fi;
13015 echo "$as_me:13015: result: ${with_valgrind:-no}" >&5
13016 echo "${ECHO_T}${with_valgrind:-no}" >&6
13017
13018 case .$with_cflags in #(vi
13019 .*-g*)
13020         case .$CFLAGS in #(vi
13021         .*-g*) #(vi
13022                 ;;
13023         *)
13024
13025 cf_fix_cppflags=no
13026 cf_new_cflags=
13027 cf_new_cppflags=
13028 cf_new_extra_cppflags=
13029
13030 for cf_add_cflags in -g
13031 do
13032 case $cf_fix_cppflags in
13033 no)
13034         case $cf_add_cflags in #(vi
13035         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13036                 case $cf_add_cflags in
13037                 -D*)
13038                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13039
13040                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13041                                 && test -z "${cf_tst_cflags}" \
13042                                 && cf_fix_cppflags=yes
13043
13044                         if test $cf_fix_cppflags = yes ; then
13045                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13046                                 continue
13047                         elif test "${cf_tst_cflags}" = "\"'" ; then
13048                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13049                                 continue
13050                         fi
13051                         ;;
13052                 esac
13053                 case "$CPPFLAGS" in
13054                 *$cf_add_cflags) #(vi
13055                         ;;
13056                 *) #(vi
13057                         case $cf_add_cflags in #(vi
13058                         -D*)
13059                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13060
13061 CPPFLAGS=`echo "$CPPFLAGS" | \
13062         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13063                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13064
13065                                 ;;
13066                         esac
13067                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13068                         ;;
13069                 esac
13070                 ;;
13071         *)
13072                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13073                 ;;
13074         esac
13075         ;;
13076 yes)
13077         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13078
13079         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13080
13081         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13082                 && test -z "${cf_tst_cflags}" \
13083                 && cf_fix_cppflags=no
13084         ;;
13085 esac
13086 done
13087
13088 if test -n "$cf_new_cflags" ; then
13089
13090         CFLAGS="$CFLAGS $cf_new_cflags"
13091 fi
13092
13093 if test -n "$cf_new_cppflags" ; then
13094
13095         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13096 fi
13097
13098 if test -n "$cf_new_extra_cppflags" ; then
13099
13100         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13101 fi
13102
13103                 ;;
13104         esac
13105         ;;
13106 esac
13107
13108 echo "$as_me:13108: checking if you want to perform memory-leak testing" >&5
13109 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13110
13111 # Check whether --enable-leaks or --disable-leaks was given.
13112 if test "${enable_leaks+set}" = set; then
13113   enableval="$enable_leaks"
13114   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13115 else
13116   : ${with_no_leaks:=no}
13117 fi;
13118 echo "$as_me:13118: result: $with_no_leaks" >&5
13119 echo "${ECHO_T}$with_no_leaks" >&6
13120
13121 if test "$with_no_leaks" = yes ; then
13122
13123 cat >>confdefs.h <<\EOF
13124 #define NO_LEAKS 1
13125 EOF
13126
13127 cat >>confdefs.h <<\EOF
13128 #define YY_NO_LEAKS 1
13129 EOF
13130
13131 fi
13132
13133 cat >>confdefs.h <<\EOF
13134 #define HAVE_NC_ALLOC_H 1
13135 EOF
13136
13137 ###     use option --enable-expanded to generate certain macros as functions
13138
13139 # Check whether --enable-expanded or --disable-expanded was given.
13140 if test "${enable_expanded+set}" = set; then
13141   enableval="$enable_expanded"
13142   test "x$enableval" = xyes &&
13143 cat >>confdefs.h <<\EOF
13144 #define NCURSES_EXPANDED 1
13145 EOF
13146
13147 fi;
13148
13149 ###     use option --disable-macros to suppress macros in favor of functions
13150
13151 # Check whether --enable-macros or --disable-macros was given.
13152 if test "${enable_macros+set}" = set; then
13153   enableval="$enable_macros"
13154   test "$enableval" = no &&
13155 cat >>confdefs.h <<\EOF
13156 #define NCURSES_NOMACROS 1
13157 EOF
13158
13159 fi;
13160
13161 # Normally we only add trace() to the debug-library.  Allow this to be
13162 # extended to all models of the ncurses library:
13163 cf_all_traces=no
13164 case "$CFLAGS $CPPFLAGS" in
13165 *-DTRACE*)
13166         cf_all_traces=yes
13167         ;;
13168 esac
13169
13170 echo "$as_me:13170: checking whether to add trace feature to all models" >&5
13171 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13172
13173 # Check whether --with-trace or --without-trace was given.
13174 if test "${with_trace+set}" = set; then
13175   withval="$with_trace"
13176   cf_with_trace=$withval
13177 else
13178   cf_with_trace=$cf_all_traces
13179 fi;
13180 echo "$as_me:13180: result: $cf_with_trace" >&5
13181 echo "${ECHO_T}$cf_with_trace" >&6
13182
13183 if test "x$cf_with_trace" = xyes ; then
13184         LIB_TRACING=all
13185         ADA_TRACE=TRUE
13186
13187 cf_fix_cppflags=no
13188 cf_new_cflags=
13189 cf_new_cppflags=
13190 cf_new_extra_cppflags=
13191
13192 for cf_add_cflags in -DTRACE
13193 do
13194 case $cf_fix_cppflags in
13195 no)
13196         case $cf_add_cflags in #(vi
13197         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13198                 case $cf_add_cflags in
13199                 -D*)
13200                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13201
13202                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13203                                 && test -z "${cf_tst_cflags}" \
13204                                 && cf_fix_cppflags=yes
13205
13206                         if test $cf_fix_cppflags = yes ; then
13207                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13208                                 continue
13209                         elif test "${cf_tst_cflags}" = "\"'" ; then
13210                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13211                                 continue
13212                         fi
13213                         ;;
13214                 esac
13215                 case "$CPPFLAGS" in
13216                 *$cf_add_cflags) #(vi
13217                         ;;
13218                 *) #(vi
13219                         case $cf_add_cflags in #(vi
13220                         -D*)
13221                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13222
13223 CPPFLAGS=`echo "$CPPFLAGS" | \
13224         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13225                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13226
13227                                 ;;
13228                         esac
13229                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13230                         ;;
13231                 esac
13232                 ;;
13233         *)
13234                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13235                 ;;
13236         esac
13237         ;;
13238 yes)
13239         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13240
13241         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13242
13243         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13244                 && test -z "${cf_tst_cflags}" \
13245                 && cf_fix_cppflags=no
13246         ;;
13247 esac
13248 done
13249
13250 if test -n "$cf_new_cflags" ; then
13251
13252         CFLAGS="$CFLAGS $cf_new_cflags"
13253 fi
13254
13255 if test -n "$cf_new_cppflags" ; then
13256
13257         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13258 fi
13259
13260 if test -n "$cf_new_extra_cppflags" ; then
13261
13262         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13263 fi
13264
13265 else
13266         LIB_TRACING=DEBUG
13267         ADA_TRACE=FALSE
13268 fi
13269
13270 ###     Checks for libraries.
13271 case $cf_cv_system_name in #(vi
13272 *mingw32*) #(vi
13273         ;;
13274 *)
13275 echo "$as_me:13275: checking for gettimeofday" >&5
13276 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13277 if test "${ac_cv_func_gettimeofday+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280   cat >conftest.$ac_ext <<_ACEOF
13281 #line 13281 "configure"
13282 #include "confdefs.h"
13283 /* System header to define __stub macros and hopefully few prototypes,
13284     which can conflict with char gettimeofday (); below.  */
13285 #include <assert.h>
13286 /* Override any gcc2 internal prototype to avoid an error.  */
13287 #ifdef __cplusplus
13288 extern "C"
13289 #endif
13290 /* We use char because int might match the return type of a gcc2
13291    builtin and then its argument prototype would still apply.  */
13292 char gettimeofday ();
13293 char (*f) ();
13294
13295 int
13296 main ()
13297 {
13298 /* The GNU C library defines this for functions which it implements
13299     to always fail with ENOSYS.  Some functions are actually named
13300     something starting with __ and the normal name is an alias.  */
13301 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13302 choke me
13303 #else
13304 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13305 #endif
13306
13307   ;
13308   return 0;
13309 }
13310 _ACEOF
13311 rm -f conftest.$ac_objext conftest$ac_exeext
13312 if { (eval echo "$as_me:13312: \"$ac_link\"") >&5
13313   (eval $ac_link) 2>&5
13314   ac_status=$?
13315   echo "$as_me:13315: \$? = $ac_status" >&5
13316   (exit $ac_status); } &&
13317          { ac_try='test -s conftest$ac_exeext'
13318   { (eval echo "$as_me:13318: \"$ac_try\"") >&5
13319   (eval $ac_try) 2>&5
13320   ac_status=$?
13321   echo "$as_me:13321: \$? = $ac_status" >&5
13322   (exit $ac_status); }; }; then
13323   ac_cv_func_gettimeofday=yes
13324 else
13325   echo "$as_me: failed program was:" >&5
13326 cat conftest.$ac_ext >&5
13327 ac_cv_func_gettimeofday=no
13328 fi
13329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13330 fi
13331 echo "$as_me:13331: result: $ac_cv_func_gettimeofday" >&5
13332 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13333 if test $ac_cv_func_gettimeofday = yes; then
13334
13335 cat >>confdefs.h <<\EOF
13336 #define HAVE_GETTIMEOFDAY 1
13337 EOF
13338
13339 else
13340
13341 echo "$as_me:13341: checking for gettimeofday in -lbsd" >&5
13342 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13343 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13344   echo $ECHO_N "(cached) $ECHO_C" >&6
13345 else
13346   ac_check_lib_save_LIBS=$LIBS
13347 LIBS="-lbsd  $LIBS"
13348 cat >conftest.$ac_ext <<_ACEOF
13349 #line 13349 "configure"
13350 #include "confdefs.h"
13351
13352 /* Override any gcc2 internal prototype to avoid an error.  */
13353 #ifdef __cplusplus
13354 extern "C"
13355 #endif
13356 /* We use char because int might match the return type of a gcc2
13357    builtin and then its argument prototype would still apply.  */
13358 char gettimeofday ();
13359 int
13360 main ()
13361 {
13362 gettimeofday ();
13363   ;
13364   return 0;
13365 }
13366 _ACEOF
13367 rm -f conftest.$ac_objext conftest$ac_exeext
13368 if { (eval echo "$as_me:13368: \"$ac_link\"") >&5
13369   (eval $ac_link) 2>&5
13370   ac_status=$?
13371   echo "$as_me:13371: \$? = $ac_status" >&5
13372   (exit $ac_status); } &&
13373          { ac_try='test -s conftest$ac_exeext'
13374   { (eval echo "$as_me:13374: \"$ac_try\"") >&5
13375   (eval $ac_try) 2>&5
13376   ac_status=$?
13377   echo "$as_me:13377: \$? = $ac_status" >&5
13378   (exit $ac_status); }; }; then
13379   ac_cv_lib_bsd_gettimeofday=yes
13380 else
13381   echo "$as_me: failed program was:" >&5
13382 cat conftest.$ac_ext >&5
13383 ac_cv_lib_bsd_gettimeofday=no
13384 fi
13385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13386 LIBS=$ac_check_lib_save_LIBS
13387 fi
13388 echo "$as_me:13388: result: $ac_cv_lib_bsd_gettimeofday" >&5
13389 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13390 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13391
13392 cat >>confdefs.h <<\EOF
13393 #define HAVE_GETTIMEOFDAY 1
13394 EOF
13395
13396         LIBS="-lbsd $LIBS"
13397 fi
13398
13399 fi
13400         ;;
13401 esac
13402
13403 echo "$as_me:13403: checking if -lm needed for math functions" >&5
13404 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13405 if test "${cf_cv_need_libm+set}" = set; then
13406   echo $ECHO_N "(cached) $ECHO_C" >&6
13407 else
13408
13409         cat >conftest.$ac_ext <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412
13413         #include <stdio.h>
13414         #include <math.h>
13415
13416 int
13417 main ()
13418 {
13419 double x = rand(); printf("result = %g\n", sin(x))
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424 rm -f conftest.$ac_objext conftest$ac_exeext
13425 if { (eval echo "$as_me:13425: \"$ac_link\"") >&5
13426   (eval $ac_link) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit $ac_status); } &&
13430          { ac_try='test -s conftest$ac_exeext'
13431   { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit $ac_status); }; }; then
13436   cf_cv_need_libm=no
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 cat conftest.$ac_ext >&5
13440 cf_cv_need_libm=yes
13441 fi
13442 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13443 fi
13444 echo "$as_me:13444: result: $cf_cv_need_libm" >&5
13445 echo "${ECHO_T}$cf_cv_need_libm" >&6
13446 if test "$cf_cv_need_libm" = yes
13447 then
13448 MATH_LIB=-lm
13449 fi
13450
13451 ###     Checks for header files.
13452 echo "$as_me:13452: checking for ANSI C header files" >&5
13453 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13454 if test "${ac_cv_header_stdc+set}" = set; then
13455   echo $ECHO_N "(cached) $ECHO_C" >&6
13456 else
13457   cat >conftest.$ac_ext <<_ACEOF
13458 #line 13458 "configure"
13459 #include "confdefs.h"
13460 #include <stdlib.h>
13461 #include <stdarg.h>
13462 #include <string.h>
13463 #include <float.h>
13464
13465 _ACEOF
13466 if { (eval echo "$as_me:13466: \"$ac_cpp conftest.$ac_ext\"") >&5
13467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13468   ac_status=$?
13469   egrep -v '^ *\+' conftest.er1 >conftest.err
13470   rm -f conftest.er1
13471   cat conftest.err >&5
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } >/dev/null; then
13474   if test -s conftest.err; then
13475     ac_cpp_err=$ac_c_preproc_warn_flag
13476   else
13477     ac_cpp_err=
13478   fi
13479 else
13480   ac_cpp_err=yes
13481 fi
13482 if test -z "$ac_cpp_err"; then
13483   ac_cv_header_stdc=yes
13484 else
13485   echo "$as_me: failed program was:" >&5
13486   cat conftest.$ac_ext >&5
13487   ac_cv_header_stdc=no
13488 fi
13489 rm -f conftest.err conftest.$ac_ext
13490
13491 if test $ac_cv_header_stdc = yes; then
13492   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13493   cat >conftest.$ac_ext <<_ACEOF
13494 #line 13494 "configure"
13495 #include "confdefs.h"
13496 #include <string.h>
13497
13498 _ACEOF
13499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13500   egrep "memchr" >/dev/null 2>&1; then
13501   :
13502 else
13503   ac_cv_header_stdc=no
13504 fi
13505 rm -rf conftest*
13506
13507 fi
13508
13509 if test $ac_cv_header_stdc = yes; then
13510   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13511   cat >conftest.$ac_ext <<_ACEOF
13512 #line 13512 "configure"
13513 #include "confdefs.h"
13514 #include <stdlib.h>
13515
13516 _ACEOF
13517 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13518   egrep "free" >/dev/null 2>&1; then
13519   :
13520 else
13521   ac_cv_header_stdc=no
13522 fi
13523 rm -rf conftest*
13524
13525 fi
13526
13527 if test $ac_cv_header_stdc = yes; then
13528   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13529   if test "$cross_compiling" = yes; then
13530   :
13531 else
13532   cat >conftest.$ac_ext <<_ACEOF
13533 #line 13533 "configure"
13534 #include "confdefs.h"
13535 #include <ctype.h>
13536 #if ((' ' & 0x0FF) == 0x020)
13537 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13538 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13539 #else
13540 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13541                      || ('j' <= (c) && (c) <= 'r') \
13542                      || ('s' <= (c) && (c) <= 'z'))
13543 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13544 #endif
13545
13546 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13547 int
13548 main ()
13549 {
13550   int i;
13551   for (i = 0; i < 256; i++)
13552     if (XOR (islower (i), ISLOWER (i))
13553         || toupper (i) != TOUPPER (i))
13554       $ac_main_return(2);
13555   $ac_main_return (0);
13556 }
13557 _ACEOF
13558 rm -f conftest$ac_exeext
13559 if { (eval echo "$as_me:13559: \"$ac_link\"") >&5
13560   (eval $ac_link) 2>&5
13561   ac_status=$?
13562   echo "$as_me:13562: \$? = $ac_status" >&5
13563   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13564   { (eval echo "$as_me:13564: \"$ac_try\"") >&5
13565   (eval $ac_try) 2>&5
13566   ac_status=$?
13567   echo "$as_me:13567: \$? = $ac_status" >&5
13568   (exit $ac_status); }; }; then
13569   :
13570 else
13571   echo "$as_me: program exited with status $ac_status" >&5
13572 echo "$as_me: failed program was:" >&5
13573 cat conftest.$ac_ext >&5
13574 ac_cv_header_stdc=no
13575 fi
13576 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13577 fi
13578 fi
13579 fi
13580 echo "$as_me:13580: result: $ac_cv_header_stdc" >&5
13581 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13582 if test $ac_cv_header_stdc = yes; then
13583
13584 cat >>confdefs.h <<\EOF
13585 #define STDC_HEADERS 1
13586 EOF
13587
13588 fi
13589
13590 ac_header_dirent=no
13591 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
13592   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
13593 echo "$as_me:13593: checking for $ac_hdr that defines DIR" >&5
13594 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
13595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13596   echo $ECHO_N "(cached) $ECHO_C" >&6
13597 else
13598   cat >conftest.$ac_ext <<_ACEOF
13599 #line 13599 "configure"
13600 #include "confdefs.h"
13601 #include <sys/types.h>
13602 #include <$ac_hdr>
13603
13604 int
13605 main ()
13606 {
13607 if ((DIR *) 0)
13608 return 0;
13609   ;
13610   return 0;
13611 }
13612 _ACEOF
13613 rm -f conftest.$ac_objext
13614 if { (eval echo "$as_me:13614: \"$ac_compile\"") >&5
13615   (eval $ac_compile) 2>&5
13616   ac_status=$?
13617   echo "$as_me:13617: \$? = $ac_status" >&5
13618   (exit $ac_status); } &&
13619          { ac_try='test -s conftest.$ac_objext'
13620   { (eval echo "$as_me:13620: \"$ac_try\"") >&5
13621   (eval $ac_try) 2>&5
13622   ac_status=$?
13623   echo "$as_me:13623: \$? = $ac_status" >&5
13624   (exit $ac_status); }; }; then
13625   eval "$as_ac_Header=yes"
13626 else
13627   echo "$as_me: failed program was:" >&5
13628 cat conftest.$ac_ext >&5
13629 eval "$as_ac_Header=no"
13630 fi
13631 rm -f conftest.$ac_objext conftest.$ac_ext
13632 fi
13633 echo "$as_me:13633: result: `eval echo '${'$as_ac_Header'}'`" >&5
13634 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13635 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13636   cat >>confdefs.h <<EOF
13637 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
13638 EOF
13639
13640 ac_header_dirent=$ac_hdr; break
13641 fi
13642
13643 done
13644 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
13645 if test $ac_header_dirent = dirent.h; then
13646   echo "$as_me:13646: checking for opendir in -ldir" >&5
13647 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13648 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13649   echo $ECHO_N "(cached) $ECHO_C" >&6
13650 else
13651   ac_check_lib_save_LIBS=$LIBS
13652 LIBS="-ldir  $LIBS"
13653 cat >conftest.$ac_ext <<_ACEOF
13654 #line 13654 "configure"
13655 #include "confdefs.h"
13656
13657 /* Override any gcc2 internal prototype to avoid an error.  */
13658 #ifdef __cplusplus
13659 extern "C"
13660 #endif
13661 /* We use char because int might match the return type of a gcc2
13662    builtin and then its argument prototype would still apply.  */
13663 char opendir ();
13664 int
13665 main ()
13666 {
13667 opendir ();
13668   ;
13669   return 0;
13670 }
13671 _ACEOF
13672 rm -f conftest.$ac_objext conftest$ac_exeext
13673 if { (eval echo "$as_me:13673: \"$ac_link\"") >&5
13674   (eval $ac_link) 2>&5
13675   ac_status=$?
13676   echo "$as_me:13676: \$? = $ac_status" >&5
13677   (exit $ac_status); } &&
13678          { ac_try='test -s conftest$ac_exeext'
13679   { (eval echo "$as_me:13679: \"$ac_try\"") >&5
13680   (eval $ac_try) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit $ac_status); }; }; then
13684   ac_cv_lib_dir_opendir=yes
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 ac_cv_lib_dir_opendir=no
13689 fi
13690 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13691 LIBS=$ac_check_lib_save_LIBS
13692 fi
13693 echo "$as_me:13693: result: $ac_cv_lib_dir_opendir" >&5
13694 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13695 if test $ac_cv_lib_dir_opendir = yes; then
13696   LIBS="$LIBS -ldir"
13697 fi
13698
13699 else
13700   echo "$as_me:13700: checking for opendir in -lx" >&5
13701 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13702 if test "${ac_cv_lib_x_opendir+set}" = set; then
13703   echo $ECHO_N "(cached) $ECHO_C" >&6
13704 else
13705   ac_check_lib_save_LIBS=$LIBS
13706 LIBS="-lx  $LIBS"
13707 cat >conftest.$ac_ext <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710
13711 /* Override any gcc2 internal prototype to avoid an error.  */
13712 #ifdef __cplusplus
13713 extern "C"
13714 #endif
13715 /* We use char because int might match the return type of a gcc2
13716    builtin and then its argument prototype would still apply.  */
13717 char opendir ();
13718 int
13719 main ()
13720 {
13721 opendir ();
13722   ;
13723   return 0;
13724 }
13725 _ACEOF
13726 rm -f conftest.$ac_objext conftest$ac_exeext
13727 if { (eval echo "$as_me:13727: \"$ac_link\"") >&5
13728   (eval $ac_link) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit $ac_status); } &&
13732          { ac_try='test -s conftest$ac_exeext'
13733   { (eval echo "$as_me:13733: \"$ac_try\"") >&5
13734   (eval $ac_try) 2>&5
13735   ac_status=$?
13736   echo "$as_me:13736: \$? = $ac_status" >&5
13737   (exit $ac_status); }; }; then
13738   ac_cv_lib_x_opendir=yes
13739 else
13740   echo "$as_me: failed program was:" >&5
13741 cat conftest.$ac_ext >&5
13742 ac_cv_lib_x_opendir=no
13743 fi
13744 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13745 LIBS=$ac_check_lib_save_LIBS
13746 fi
13747 echo "$as_me:13747: result: $ac_cv_lib_x_opendir" >&5
13748 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13749 if test $ac_cv_lib_x_opendir = yes; then
13750   LIBS="$LIBS -lx"
13751 fi
13752
13753 fi
13754
13755 echo "$as_me:13755: checking whether time.h and sys/time.h may both be included" >&5
13756 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13757 if test "${ac_cv_header_time+set}" = set; then
13758   echo $ECHO_N "(cached) $ECHO_C" >&6
13759 else
13760   cat >conftest.$ac_ext <<_ACEOF
13761 #line 13761 "configure"
13762 #include "confdefs.h"
13763 #include <sys/types.h>
13764 #include <sys/time.h>
13765 #include <time.h>
13766
13767 int
13768 main ()
13769 {
13770 if ((struct tm *) 0)
13771 return 0;
13772   ;
13773   return 0;
13774 }
13775 _ACEOF
13776 rm -f conftest.$ac_objext
13777 if { (eval echo "$as_me:13777: \"$ac_compile\"") >&5
13778   (eval $ac_compile) 2>&5
13779   ac_status=$?
13780   echo "$as_me:13780: \$? = $ac_status" >&5
13781   (exit $ac_status); } &&
13782          { ac_try='test -s conftest.$ac_objext'
13783   { (eval echo "$as_me:13783: \"$ac_try\"") >&5
13784   (eval $ac_try) 2>&5
13785   ac_status=$?
13786   echo "$as_me:13786: \$? = $ac_status" >&5
13787   (exit $ac_status); }; }; then
13788   ac_cv_header_time=yes
13789 else
13790   echo "$as_me: failed program was:" >&5
13791 cat conftest.$ac_ext >&5
13792 ac_cv_header_time=no
13793 fi
13794 rm -f conftest.$ac_objext conftest.$ac_ext
13795 fi
13796 echo "$as_me:13796: result: $ac_cv_header_time" >&5
13797 echo "${ECHO_T}$ac_cv_header_time" >&6
13798 if test $ac_cv_header_time = yes; then
13799
13800 cat >>confdefs.h <<\EOF
13801 #define TIME_WITH_SYS_TIME 1
13802 EOF
13803
13804 fi
13805
13806 cf_regex_func=no
13807
13808 cf_regex_libs="regex re"
13809 case $host_os in #(vi
13810 mingw*)
13811         cf_regex_libs="gnurx $cf_regex_libs"
13812         ;;
13813 esac
13814
13815 echo "$as_me:13815: checking for regcomp" >&5
13816 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13817 if test "${ac_cv_func_regcomp+set}" = set; then
13818   echo $ECHO_N "(cached) $ECHO_C" >&6
13819 else
13820   cat >conftest.$ac_ext <<_ACEOF
13821 #line 13821 "configure"
13822 #include "confdefs.h"
13823 /* System header to define __stub macros and hopefully few prototypes,
13824     which can conflict with char regcomp (); below.  */
13825 #include <assert.h>
13826 /* Override any gcc2 internal prototype to avoid an error.  */
13827 #ifdef __cplusplus
13828 extern "C"
13829 #endif
13830 /* We use char because int might match the return type of a gcc2
13831    builtin and then its argument prototype would still apply.  */
13832 char regcomp ();
13833 char (*f) ();
13834
13835 int
13836 main ()
13837 {
13838 /* The GNU C library defines this for functions which it implements
13839     to always fail with ENOSYS.  Some functions are actually named
13840     something starting with __ and the normal name is an alias.  */
13841 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13842 choke me
13843 #else
13844 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13845 #endif
13846
13847   ;
13848   return 0;
13849 }
13850 _ACEOF
13851 rm -f conftest.$ac_objext conftest$ac_exeext
13852 if { (eval echo "$as_me:13852: \"$ac_link\"") >&5
13853   (eval $ac_link) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); } &&
13857          { ac_try='test -s conftest$ac_exeext'
13858   { (eval echo "$as_me:13858: \"$ac_try\"") >&5
13859   (eval $ac_try) 2>&5
13860   ac_status=$?
13861   echo "$as_me:13861: \$? = $ac_status" >&5
13862   (exit $ac_status); }; }; then
13863   ac_cv_func_regcomp=yes
13864 else
13865   echo "$as_me: failed program was:" >&5
13866 cat conftest.$ac_ext >&5
13867 ac_cv_func_regcomp=no
13868 fi
13869 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13870 fi
13871 echo "$as_me:13871: result: $ac_cv_func_regcomp" >&5
13872 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13873 if test $ac_cv_func_regcomp = yes; then
13874   cf_regex_func=regcomp
13875 else
13876
13877         for cf_regex_lib in $cf_regex_libs
13878         do
13879                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13880 echo "$as_me:13880: checking for regcomp in -l$cf_regex_lib" >&5
13881 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13882 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13883   echo $ECHO_N "(cached) $ECHO_C" >&6
13884 else
13885   ac_check_lib_save_LIBS=$LIBS
13886 LIBS="-l$cf_regex_lib  $LIBS"
13887 cat >conftest.$ac_ext <<_ACEOF
13888 #line 13888 "configure"
13889 #include "confdefs.h"
13890
13891 /* Override any gcc2 internal prototype to avoid an error.  */
13892 #ifdef __cplusplus
13893 extern "C"
13894 #endif
13895 /* We use char because int might match the return type of a gcc2
13896    builtin and then its argument prototype would still apply.  */
13897 char regcomp ();
13898 int
13899 main ()
13900 {
13901 regcomp ();
13902   ;
13903   return 0;
13904 }
13905 _ACEOF
13906 rm -f conftest.$ac_objext conftest$ac_exeext
13907 if { (eval echo "$as_me:13907: \"$ac_link\"") >&5
13908   (eval $ac_link) 2>&5
13909   ac_status=$?
13910   echo "$as_me:13910: \$? = $ac_status" >&5
13911   (exit $ac_status); } &&
13912          { ac_try='test -s conftest$ac_exeext'
13913   { (eval echo "$as_me:13913: \"$ac_try\"") >&5
13914   (eval $ac_try) 2>&5
13915   ac_status=$?
13916   echo "$as_me:13916: \$? = $ac_status" >&5
13917   (exit $ac_status); }; }; then
13918   eval "$as_ac_Lib=yes"
13919 else
13920   echo "$as_me: failed program was:" >&5
13921 cat conftest.$ac_ext >&5
13922 eval "$as_ac_Lib=no"
13923 fi
13924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13925 LIBS=$ac_check_lib_save_LIBS
13926 fi
13927 echo "$as_me:13927: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13928 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13929 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13930
13931                                 LIBS="-l$cf_regex_lib $LIBS"
13932                                 cf_regex_func=regcomp
13933                                 break
13934 fi
13935
13936         done
13937
13938 fi
13939
13940 if test "$cf_regex_func" = no ; then
13941         echo "$as_me:13941: checking for compile" >&5
13942 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13943 if test "${ac_cv_func_compile+set}" = set; then
13944   echo $ECHO_N "(cached) $ECHO_C" >&6
13945 else
13946   cat >conftest.$ac_ext <<_ACEOF
13947 #line 13947 "configure"
13948 #include "confdefs.h"
13949 /* System header to define __stub macros and hopefully few prototypes,
13950     which can conflict with char compile (); below.  */
13951 #include <assert.h>
13952 /* Override any gcc2 internal prototype to avoid an error.  */
13953 #ifdef __cplusplus
13954 extern "C"
13955 #endif
13956 /* We use char because int might match the return type of a gcc2
13957    builtin and then its argument prototype would still apply.  */
13958 char compile ();
13959 char (*f) ();
13960
13961 int
13962 main ()
13963 {
13964 /* The GNU C library defines this for functions which it implements
13965     to always fail with ENOSYS.  Some functions are actually named
13966     something starting with __ and the normal name is an alias.  */
13967 #if defined (__stub_compile) || defined (__stub___compile)
13968 choke me
13969 #else
13970 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13971 #endif
13972
13973   ;
13974   return 0;
13975 }
13976 _ACEOF
13977 rm -f conftest.$ac_objext conftest$ac_exeext
13978 if { (eval echo "$as_me:13978: \"$ac_link\"") >&5
13979   (eval $ac_link) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit $ac_status); } &&
13983          { ac_try='test -s conftest$ac_exeext'
13984   { (eval echo "$as_me:13984: \"$ac_try\"") >&5
13985   (eval $ac_try) 2>&5
13986   ac_status=$?
13987   echo "$as_me:13987: \$? = $ac_status" >&5
13988   (exit $ac_status); }; }; then
13989   ac_cv_func_compile=yes
13990 else
13991   echo "$as_me: failed program was:" >&5
13992 cat conftest.$ac_ext >&5
13993 ac_cv_func_compile=no
13994 fi
13995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13996 fi
13997 echo "$as_me:13997: result: $ac_cv_func_compile" >&5
13998 echo "${ECHO_T}$ac_cv_func_compile" >&6
13999 if test $ac_cv_func_compile = yes; then
14000   cf_regex_func=compile
14001 else
14002
14003                 echo "$as_me:14003: checking for compile in -lgen" >&5
14004 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14005 if test "${ac_cv_lib_gen_compile+set}" = set; then
14006   echo $ECHO_N "(cached) $ECHO_C" >&6
14007 else
14008   ac_check_lib_save_LIBS=$LIBS
14009 LIBS="-lgen  $LIBS"
14010 cat >conftest.$ac_ext <<_ACEOF
14011 #line 14011 "configure"
14012 #include "confdefs.h"
14013
14014 /* Override any gcc2 internal prototype to avoid an error.  */
14015 #ifdef __cplusplus
14016 extern "C"
14017 #endif
14018 /* We use char because int might match the return type of a gcc2
14019    builtin and then its argument prototype would still apply.  */
14020 char compile ();
14021 int
14022 main ()
14023 {
14024 compile ();
14025   ;
14026   return 0;
14027 }
14028 _ACEOF
14029 rm -f conftest.$ac_objext conftest$ac_exeext
14030 if { (eval echo "$as_me:14030: \"$ac_link\"") >&5
14031   (eval $ac_link) 2>&5
14032   ac_status=$?
14033   echo "$as_me:14033: \$? = $ac_status" >&5
14034   (exit $ac_status); } &&
14035          { ac_try='test -s conftest$ac_exeext'
14036   { (eval echo "$as_me:14036: \"$ac_try\"") >&5
14037   (eval $ac_try) 2>&5
14038   ac_status=$?
14039   echo "$as_me:14039: \$? = $ac_status" >&5
14040   (exit $ac_status); }; }; then
14041   ac_cv_lib_gen_compile=yes
14042 else
14043   echo "$as_me: failed program was:" >&5
14044 cat conftest.$ac_ext >&5
14045 ac_cv_lib_gen_compile=no
14046 fi
14047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14048 LIBS=$ac_check_lib_save_LIBS
14049 fi
14050 echo "$as_me:14050: result: $ac_cv_lib_gen_compile" >&5
14051 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14052 if test $ac_cv_lib_gen_compile = yes; then
14053
14054                                 LIBS="-lgen $LIBS"
14055                                 cf_regex_func=compile
14056 fi
14057
14058 fi
14059
14060 fi
14061
14062 if test "$cf_regex_func" = no ; then
14063         { echo "$as_me:14063: WARNING: cannot find regular expression library" >&5
14064 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14065 fi
14066
14067 echo "$as_me:14067: checking for regular-expression headers" >&5
14068 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14069 if test "${cf_cv_regex_hdrs+set}" = set; then
14070   echo $ECHO_N "(cached) $ECHO_C" >&6
14071 else
14072
14073 cf_cv_regex_hdrs=no
14074 case $cf_regex_func in #(vi
14075 compile) #(vi
14076         for cf_regex_hdr in regexp.h regexpr.h
14077         do
14078                 cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14081 #include <$cf_regex_hdr>
14082 int
14083 main ()
14084 {
14085
14086                         char *p = compile("", "", "", 0);
14087                         int x = step("", "");
14088
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 rm -f conftest.$ac_objext conftest$ac_exeext
14094 if { (eval echo "$as_me:14094: \"$ac_link\"") >&5
14095   (eval $ac_link) 2>&5
14096   ac_status=$?
14097   echo "$as_me:14097: \$? = $ac_status" >&5
14098   (exit $ac_status); } &&
14099          { ac_try='test -s conftest$ac_exeext'
14100   { (eval echo "$as_me:14100: \"$ac_try\"") >&5
14101   (eval $ac_try) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit $ac_status); }; }; then
14105
14106                         cf_cv_regex_hdrs=$cf_regex_hdr
14107                         break
14108
14109 else
14110   echo "$as_me: failed program was:" >&5
14111 cat conftest.$ac_ext >&5
14112 fi
14113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14114         done
14115         ;;
14116 *)
14117         for cf_regex_hdr in regex.h
14118         do
14119                 cat >conftest.$ac_ext <<_ACEOF
14120 #line 14120 "configure"
14121 #include "confdefs.h"
14122 #include <sys/types.h>
14123 #include <$cf_regex_hdr>
14124 int
14125 main ()
14126 {
14127
14128                         regex_t *p;
14129                         int x = regcomp(p, "", 0);
14130                         int y = regexec(p, "", 0, 0, 0);
14131                         regfree(p);
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 esac
14161
14162 fi
14163 echo "$as_me:14163: result: $cf_cv_regex_hdrs" >&5
14164 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14165
14166 case $cf_cv_regex_hdrs in #(vi
14167     no)        { echo "$as_me:14167: WARNING: no regular expression header found" >&5
14168 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14169     regex.h)
14170 cat >>confdefs.h <<\EOF
14171 #define HAVE_REGEX_H_FUNCS 1
14172 EOF
14173  ;; #(vi
14174     regexp.h)
14175 cat >>confdefs.h <<\EOF
14176 #define HAVE_REGEXP_H_FUNCS 1
14177 EOF
14178  ;; #(vi
14179     regexpr.h)
14180 cat >>confdefs.h <<\EOF
14181 #define HAVE_REGEXPR_H_FUNCS 1
14182 EOF
14183  ;;
14184 esac
14185
14186 for ac_header in \
14187 fcntl.h \
14188 getopt.h \
14189 limits.h \
14190 locale.h \
14191 math.h \
14192 poll.h \
14193 sys/bsdtypes.h \
14194 sys/ioctl.h \
14195 sys/param.h \
14196 sys/poll.h \
14197 sys/select.h \
14198 sys/time.h \
14199 sys/times.h \
14200 ttyent.h \
14201 unistd.h \
14202 wctype.h \
14203
14204 do
14205 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14206 echo "$as_me:14206: checking for $ac_header" >&5
14207 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14208 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14209   echo $ECHO_N "(cached) $ECHO_C" >&6
14210 else
14211   cat >conftest.$ac_ext <<_ACEOF
14212 #line 14212 "configure"
14213 #include "confdefs.h"
14214 #include <$ac_header>
14215 _ACEOF
14216 if { (eval echo "$as_me:14216: \"$ac_cpp conftest.$ac_ext\"") >&5
14217   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14218   ac_status=$?
14219   egrep -v '^ *\+' conftest.er1 >conftest.err
14220   rm -f conftest.er1
14221   cat conftest.err >&5
14222   echo "$as_me:14222: \$? = $ac_status" >&5
14223   (exit $ac_status); } >/dev/null; then
14224   if test -s conftest.err; then
14225     ac_cpp_err=$ac_c_preproc_warn_flag
14226   else
14227     ac_cpp_err=
14228   fi
14229 else
14230   ac_cpp_err=yes
14231 fi
14232 if test -z "$ac_cpp_err"; then
14233   eval "$as_ac_Header=yes"
14234 else
14235   echo "$as_me: failed program was:" >&5
14236   cat conftest.$ac_ext >&5
14237   eval "$as_ac_Header=no"
14238 fi
14239 rm -f conftest.err conftest.$ac_ext
14240 fi
14241 echo "$as_me:14241: result: `eval echo '${'$as_ac_Header'}'`" >&5
14242 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14243 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14244   cat >>confdefs.h <<EOF
14245 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14246 EOF
14247
14248 fi
14249 done
14250
14251 for ac_header in unistd.h getopt.h
14252 do
14253 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14254 echo "$as_me:14254: checking for $ac_header" >&5
14255 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14256 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14257   echo $ECHO_N "(cached) $ECHO_C" >&6
14258 else
14259   cat >conftest.$ac_ext <<_ACEOF
14260 #line 14260 "configure"
14261 #include "confdefs.h"
14262 #include <$ac_header>
14263 _ACEOF
14264 if { (eval echo "$as_me:14264: \"$ac_cpp conftest.$ac_ext\"") >&5
14265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14266   ac_status=$?
14267   egrep -v '^ *\+' conftest.er1 >conftest.err
14268   rm -f conftest.er1
14269   cat conftest.err >&5
14270   echo "$as_me:14270: \$? = $ac_status" >&5
14271   (exit $ac_status); } >/dev/null; then
14272   if test -s conftest.err; then
14273     ac_cpp_err=$ac_c_preproc_warn_flag
14274   else
14275     ac_cpp_err=
14276   fi
14277 else
14278   ac_cpp_err=yes
14279 fi
14280 if test -z "$ac_cpp_err"; then
14281   eval "$as_ac_Header=yes"
14282 else
14283   echo "$as_me: failed program was:" >&5
14284   cat conftest.$ac_ext >&5
14285   eval "$as_ac_Header=no"
14286 fi
14287 rm -f conftest.err conftest.$ac_ext
14288 fi
14289 echo "$as_me:14289: result: `eval echo '${'$as_ac_Header'}'`" >&5
14290 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14291 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14292   cat >>confdefs.h <<EOF
14293 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14294 EOF
14295
14296 fi
14297 done
14298
14299 echo "$as_me:14299: checking for header declaring getopt variables" >&5
14300 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14301 if test "${cf_cv_getopt_header+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304
14305 cf_cv_getopt_header=none
14306 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14307 do
14308 cat >conftest.$ac_ext <<_ACEOF
14309 #line 14309 "configure"
14310 #include "confdefs.h"
14311
14312 #include <$cf_header>
14313 int
14314 main ()
14315 {
14316 int x = optind; char *y = optarg
14317   ;
14318   return 0;
14319 }
14320 _ACEOF
14321 rm -f conftest.$ac_objext
14322 if { (eval echo "$as_me:14322: \"$ac_compile\"") >&5
14323   (eval $ac_compile) 2>&5
14324   ac_status=$?
14325   echo "$as_me:14325: \$? = $ac_status" >&5
14326   (exit $ac_status); } &&
14327          { ac_try='test -s conftest.$ac_objext'
14328   { (eval echo "$as_me:14328: \"$ac_try\"") >&5
14329   (eval $ac_try) 2>&5
14330   ac_status=$?
14331   echo "$as_me:14331: \$? = $ac_status" >&5
14332   (exit $ac_status); }; }; then
14333   cf_cv_getopt_header=$cf_header
14334  break
14335 else
14336   echo "$as_me: failed program was:" >&5
14337 cat conftest.$ac_ext >&5
14338 fi
14339 rm -f conftest.$ac_objext conftest.$ac_ext
14340 done
14341
14342 fi
14343 echo "$as_me:14343: result: $cf_cv_getopt_header" >&5
14344 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14345 if test $cf_cv_getopt_header != none ; then
14346
14347 cat >>confdefs.h <<\EOF
14348 #define HAVE_GETOPT_HEADER 1
14349 EOF
14350
14351 fi
14352
14353 # check for ISC (this may also define _POSIX_SOURCE)
14354 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14355 if test "x$ISC" = xyes ; then
14356
14357 echo "$as_me:14357: checking for main in -lcposix" >&5
14358 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14359 if test "${ac_cv_lib_cposix_main+set}" = set; then
14360   echo $ECHO_N "(cached) $ECHO_C" >&6
14361 else
14362   ac_check_lib_save_LIBS=$LIBS
14363 LIBS="-lcposix  $LIBS"
14364 cat >conftest.$ac_ext <<_ACEOF
14365 #line 14365 "configure"
14366 #include "confdefs.h"
14367
14368 int
14369 main ()
14370 {
14371 main ();
14372   ;
14373   return 0;
14374 }
14375 _ACEOF
14376 rm -f conftest.$ac_objext conftest$ac_exeext
14377 if { (eval echo "$as_me:14377: \"$ac_link\"") >&5
14378   (eval $ac_link) 2>&5
14379   ac_status=$?
14380   echo "$as_me:14380: \$? = $ac_status" >&5
14381   (exit $ac_status); } &&
14382          { ac_try='test -s conftest$ac_exeext'
14383   { (eval echo "$as_me:14383: \"$ac_try\"") >&5
14384   (eval $ac_try) 2>&5
14385   ac_status=$?
14386   echo "$as_me:14386: \$? = $ac_status" >&5
14387   (exit $ac_status); }; }; then
14388   ac_cv_lib_cposix_main=yes
14389 else
14390   echo "$as_me: failed program was:" >&5
14391 cat conftest.$ac_ext >&5
14392 ac_cv_lib_cposix_main=no
14393 fi
14394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14395 LIBS=$ac_check_lib_save_LIBS
14396 fi
14397 echo "$as_me:14397: result: $ac_cv_lib_cposix_main" >&5
14398 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
14399 if test $ac_cv_lib_cposix_main = yes; then
14400   cat >>confdefs.h <<EOF
14401 #define HAVE_LIBCPOSIX 1
14402 EOF
14403
14404   LIBS="-lcposix $LIBS"
14405
14406 fi
14407
14408         echo "$as_me:14408: checking for bzero in -linet" >&5
14409 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
14410 if test "${ac_cv_lib_inet_bzero+set}" = set; then
14411   echo $ECHO_N "(cached) $ECHO_C" >&6
14412 else
14413   ac_check_lib_save_LIBS=$LIBS
14414 LIBS="-linet  $LIBS"
14415 cat >conftest.$ac_ext <<_ACEOF
14416 #line 14416 "configure"
14417 #include "confdefs.h"
14418
14419 /* Override any gcc2 internal prototype to avoid an error.  */
14420 #ifdef __cplusplus
14421 extern "C"
14422 #endif
14423 /* We use char because int might match the return type of a gcc2
14424    builtin and then its argument prototype would still apply.  */
14425 char bzero ();
14426 int
14427 main ()
14428 {
14429 bzero ();
14430   ;
14431   return 0;
14432 }
14433 _ACEOF
14434 rm -f conftest.$ac_objext conftest$ac_exeext
14435 if { (eval echo "$as_me:14435: \"$ac_link\"") >&5
14436   (eval $ac_link) 2>&5
14437   ac_status=$?
14438   echo "$as_me:14438: \$? = $ac_status" >&5
14439   (exit $ac_status); } &&
14440          { ac_try='test -s conftest$ac_exeext'
14441   { (eval echo "$as_me:14441: \"$ac_try\"") >&5
14442   (eval $ac_try) 2>&5
14443   ac_status=$?
14444   echo "$as_me:14444: \$? = $ac_status" >&5
14445   (exit $ac_status); }; }; then
14446   ac_cv_lib_inet_bzero=yes
14447 else
14448   echo "$as_me: failed program was:" >&5
14449 cat conftest.$ac_ext >&5
14450 ac_cv_lib_inet_bzero=no
14451 fi
14452 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14453 LIBS=$ac_check_lib_save_LIBS
14454 fi
14455 echo "$as_me:14455: result: $ac_cv_lib_inet_bzero" >&5
14456 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
14457 if test $ac_cv_lib_inet_bzero = yes; then
14458   LIBS="-linet $LIBS"
14459 fi
14460 fi
14461
14462 echo "$as_me:14462: checking if sys/time.h works with sys/select.h" >&5
14463 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14464 if test "${cf_cv_sys_time_select+set}" = set; then
14465   echo $ECHO_N "(cached) $ECHO_C" >&6
14466 else
14467
14468 cat >conftest.$ac_ext <<_ACEOF
14469 #line 14469 "configure"
14470 #include "confdefs.h"
14471
14472 #include <sys/types.h>
14473 #ifdef HAVE_SYS_TIME_H
14474 #include <sys/time.h>
14475 #endif
14476 #ifdef HAVE_SYS_SELECT_H
14477 #include <sys/select.h>
14478 #endif
14479
14480 int
14481 main ()
14482 {
14483
14484   ;
14485   return 0;
14486 }
14487 _ACEOF
14488 rm -f conftest.$ac_objext
14489 if { (eval echo "$as_me:14489: \"$ac_compile\"") >&5
14490   (eval $ac_compile) 2>&5
14491   ac_status=$?
14492   echo "$as_me:14492: \$? = $ac_status" >&5
14493   (exit $ac_status); } &&
14494          { ac_try='test -s conftest.$ac_objext'
14495   { (eval echo "$as_me:14495: \"$ac_try\"") >&5
14496   (eval $ac_try) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); }; }; then
14500   cf_cv_sys_time_select=yes
14501 else
14502   echo "$as_me: failed program was:" >&5
14503 cat conftest.$ac_ext >&5
14504 cf_cv_sys_time_select=no
14505 fi
14506 rm -f conftest.$ac_objext conftest.$ac_ext
14507
14508 fi
14509
14510 echo "$as_me:14510: result: $cf_cv_sys_time_select" >&5
14511 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14512 test "$cf_cv_sys_time_select" = yes &&
14513 cat >>confdefs.h <<\EOF
14514 #define HAVE_SYS_TIME_SELECT 1
14515 EOF
14516
14517 ###     checks for compiler characteristics
14518 ac_ext=c
14519 ac_cpp='$CPP $CPPFLAGS'
14520 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14521 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14522 ac_compiler_gnu=$ac_cv_c_compiler_gnu
14523 ac_main_return=return
14524
14525 echo "$as_me:14525: checking for an ANSI C-conforming const" >&5
14526 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
14527 if test "${ac_cv_c_const+set}" = set; then
14528   echo $ECHO_N "(cached) $ECHO_C" >&6
14529 else
14530   cat >conftest.$ac_ext <<_ACEOF
14531 #line 14531 "configure"
14532 #include "confdefs.h"
14533
14534 int
14535 main ()
14536 {
14537 /* FIXME: Include the comments suggested by Paul. */
14538 #ifndef __cplusplus
14539   /* Ultrix mips cc rejects this.  */
14540   typedef int charset[2];
14541   const charset x;
14542   /* SunOS 4.1.1 cc rejects this.  */
14543   char const *const *ccp;
14544   char **p;
14545   /* NEC SVR4.0.2 mips cc rejects this.  */
14546   struct point {int x, y;};
14547   static struct point const zero = {0,0};
14548   /* AIX XL C 1.02.0.0 rejects this.
14549      It does not let you subtract one const X* pointer from another in
14550      an arm of an if-expression whose if-part is not a constant
14551      expression */
14552   const char *g = "string";
14553   ccp = &g + (g ? g-g : 0);
14554   /* HPUX 7.0 cc rejects these. */
14555   ++ccp;
14556   p = (char**) ccp;
14557   ccp = (char const *const *) p;
14558   { /* SCO 3.2v4 cc rejects this.  */
14559     char *t;
14560     char const *s = 0 ? (char *) 0 : (char const *) 0;
14561
14562     *t++ = 0;
14563   }
14564   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14565     int x[] = {25, 17};
14566     const int *foo = &x[0];
14567     ++foo;
14568   }
14569   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14570     typedef const int *iptr;
14571     iptr p = 0;
14572     ++p;
14573   }
14574   { /* AIX XL C 1.02.0.0 rejects this saying
14575        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14576     struct s { int j; const int *ap[3]; };
14577     struct s *b; b->j = 5;
14578   }
14579   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14580     const int foo = 10;
14581   }
14582 #endif
14583
14584   ;
14585   return 0;
14586 }
14587 _ACEOF
14588 rm -f conftest.$ac_objext
14589 if { (eval echo "$as_me:14589: \"$ac_compile\"") >&5
14590   (eval $ac_compile) 2>&5
14591   ac_status=$?
14592   echo "$as_me:14592: \$? = $ac_status" >&5
14593   (exit $ac_status); } &&
14594          { ac_try='test -s conftest.$ac_objext'
14595   { (eval echo "$as_me:14595: \"$ac_try\"") >&5
14596   (eval $ac_try) 2>&5
14597   ac_status=$?
14598   echo "$as_me:14598: \$? = $ac_status" >&5
14599   (exit $ac_status); }; }; then
14600   ac_cv_c_const=yes
14601 else
14602   echo "$as_me: failed program was:" >&5
14603 cat conftest.$ac_ext >&5
14604 ac_cv_c_const=no
14605 fi
14606 rm -f conftest.$ac_objext conftest.$ac_ext
14607 fi
14608 echo "$as_me:14608: result: $ac_cv_c_const" >&5
14609 echo "${ECHO_T}$ac_cv_c_const" >&6
14610 if test $ac_cv_c_const = no; then
14611
14612 cat >>confdefs.h <<\EOF
14613 #define const
14614 EOF
14615
14616 fi
14617
14618 echo "$as_me:14618: checking for inline" >&5
14619 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14620 if test "${ac_cv_c_inline+set}" = set; then
14621   echo $ECHO_N "(cached) $ECHO_C" >&6
14622 else
14623   ac_cv_c_inline=no
14624 for ac_kw in inline __inline__ __inline; do
14625   cat >conftest.$ac_ext <<_ACEOF
14626 #line 14626 "configure"
14627 #include "confdefs.h"
14628 #ifndef __cplusplus
14629 static $ac_kw int static_foo () {return 0; }
14630 $ac_kw int foo () {return 0; }
14631 #endif
14632
14633 _ACEOF
14634 rm -f conftest.$ac_objext
14635 if { (eval echo "$as_me:14635: \"$ac_compile\"") >&5
14636   (eval $ac_compile) 2>&5
14637   ac_status=$?
14638   echo "$as_me:14638: \$? = $ac_status" >&5
14639   (exit $ac_status); } &&
14640          { ac_try='test -s conftest.$ac_objext'
14641   { (eval echo "$as_me:14641: \"$ac_try\"") >&5
14642   (eval $ac_try) 2>&5
14643   ac_status=$?
14644   echo "$as_me:14644: \$? = $ac_status" >&5
14645   (exit $ac_status); }; }; then
14646   ac_cv_c_inline=$ac_kw; break
14647 else
14648   echo "$as_me: failed program was:" >&5
14649 cat conftest.$ac_ext >&5
14650 fi
14651 rm -f conftest.$ac_objext conftest.$ac_ext
14652 done
14653
14654 fi
14655 echo "$as_me:14655: result: $ac_cv_c_inline" >&5
14656 echo "${ECHO_T}$ac_cv_c_inline" >&6
14657 case $ac_cv_c_inline in
14658   inline | yes) ;;
14659   no)
14660 cat >>confdefs.h <<\EOF
14661 #define inline
14662 EOF
14663  ;;
14664   *)  cat >>confdefs.h <<EOF
14665 #define inline $ac_cv_c_inline
14666 EOF
14667  ;;
14668 esac
14669
14670 NCURSES_INLINE=
14671 if test "$ac_cv_c_inline" != no ; then
14672   NCURSES_INLINE=inline
14673   if test "$INTEL_COMPILER" = yes
14674   then
14675     :
14676   elif test "$CLANG_COMPILER" = yes
14677   then
14678     :
14679   elif test "$GCC" = yes
14680   then
14681     echo "$as_me:14681: checking if $CC supports options to tune inlining" >&5
14682 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14683 if test "${cf_cv_gcc_inline+set}" = set; then
14684   echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686
14687       cf_save_CFLAGS=$CFLAGS
14688       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14689       cat >conftest.$ac_ext <<_ACEOF
14690 #line 14690 "configure"
14691 #include "confdefs.h"
14692 inline int foo(void) { return 1; }
14693 int
14694 main ()
14695 {
14696 ${cf_cv_main_return:-return} foo()
14697   ;
14698   return 0;
14699 }
14700 _ACEOF
14701 rm -f conftest.$ac_objext
14702 if { (eval echo "$as_me:14702: \"$ac_compile\"") >&5
14703   (eval $ac_compile) 2>&5
14704   ac_status=$?
14705   echo "$as_me:14705: \$? = $ac_status" >&5
14706   (exit $ac_status); } &&
14707          { ac_try='test -s conftest.$ac_objext'
14708   { (eval echo "$as_me:14708: \"$ac_try\"") >&5
14709   (eval $ac_try) 2>&5
14710   ac_status=$?
14711   echo "$as_me:14711: \$? = $ac_status" >&5
14712   (exit $ac_status); }; }; then
14713   cf_cv_gcc_inline=yes
14714 else
14715   echo "$as_me: failed program was:" >&5
14716 cat conftest.$ac_ext >&5
14717 cf_cv_gcc_inline=no
14718 fi
14719 rm -f conftest.$ac_objext conftest.$ac_ext
14720       CFLAGS=$cf_save_CFLAGS
14721
14722 fi
14723 echo "$as_me:14723: result: $cf_cv_gcc_inline" >&5
14724 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14725     if test "$cf_cv_gcc_inline" = yes ; then
14726
14727 cf_fix_cppflags=no
14728 cf_new_cflags=
14729 cf_new_cppflags=
14730 cf_new_extra_cppflags=
14731
14732 for cf_add_cflags in --param max-inline-insns-single=1200
14733 do
14734 case $cf_fix_cppflags in
14735 no)
14736         case $cf_add_cflags in #(vi
14737         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14738                 case $cf_add_cflags in
14739                 -D*)
14740                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14741
14742                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14743                                 && test -z "${cf_tst_cflags}" \
14744                                 && cf_fix_cppflags=yes
14745
14746                         if test $cf_fix_cppflags = yes ; then
14747                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14748                                 continue
14749                         elif test "${cf_tst_cflags}" = "\"'" ; then
14750                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14751                                 continue
14752                         fi
14753                         ;;
14754                 esac
14755                 case "$CPPFLAGS" in
14756                 *$cf_add_cflags) #(vi
14757                         ;;
14758                 *) #(vi
14759                         case $cf_add_cflags in #(vi
14760                         -D*)
14761                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14762
14763 CPPFLAGS=`echo "$CPPFLAGS" | \
14764         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14765                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14766
14767                                 ;;
14768                         esac
14769                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14770                         ;;
14771                 esac
14772                 ;;
14773         *)
14774                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14775                 ;;
14776         esac
14777         ;;
14778 yes)
14779         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14780
14781         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14782
14783         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14784                 && test -z "${cf_tst_cflags}" \
14785                 && cf_fix_cppflags=no
14786         ;;
14787 esac
14788 done
14789
14790 if test -n "$cf_new_cflags" ; then
14791
14792         CFLAGS="$CFLAGS $cf_new_cflags"
14793 fi
14794
14795 if test -n "$cf_new_cppflags" ; then
14796
14797         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14798 fi
14799
14800 if test -n "$cf_new_extra_cppflags" ; then
14801
14802         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14803 fi
14804
14805     fi
14806   fi
14807 fi
14808
14809 echo "$as_me:14809: checking for signal global datatype" >&5
14810 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14811 if test "${cf_cv_sig_atomic_t+set}" = set; then
14812   echo $ECHO_N "(cached) $ECHO_C" >&6
14813 else
14814
14815         for cf_type in \
14816                 "volatile sig_atomic_t" \
14817                 "sig_atomic_t" \
14818                 "int"
14819         do
14820         cat >conftest.$ac_ext <<_ACEOF
14821 #line 14821 "configure"
14822 #include "confdefs.h"
14823
14824 #include <sys/types.h>
14825 #include <signal.h>
14826 #include <stdio.h>
14827
14828 extern $cf_type x;
14829 $cf_type x;
14830 static void handler(int sig)
14831 {
14832         x = 5;
14833 }
14834 int
14835 main ()
14836 {
14837 signal(SIGINT, handler);
14838                  x = 1
14839   ;
14840   return 0;
14841 }
14842 _ACEOF
14843 rm -f conftest.$ac_objext
14844 if { (eval echo "$as_me:14844: \"$ac_compile\"") >&5
14845   (eval $ac_compile) 2>&5
14846   ac_status=$?
14847   echo "$as_me:14847: \$? = $ac_status" >&5
14848   (exit $ac_status); } &&
14849          { ac_try='test -s conftest.$ac_objext'
14850   { (eval echo "$as_me:14850: \"$ac_try\"") >&5
14851   (eval $ac_try) 2>&5
14852   ac_status=$?
14853   echo "$as_me:14853: \$? = $ac_status" >&5
14854   (exit $ac_status); }; }; then
14855   cf_cv_sig_atomic_t=$cf_type
14856 else
14857   echo "$as_me: failed program was:" >&5
14858 cat conftest.$ac_ext >&5
14859 cf_cv_sig_atomic_t=no
14860 fi
14861 rm -f conftest.$ac_objext conftest.$ac_ext
14862                 test "$cf_cv_sig_atomic_t" != no && break
14863         done
14864
14865 fi
14866
14867 echo "$as_me:14867: result: $cf_cv_sig_atomic_t" >&5
14868 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14869 test "$cf_cv_sig_atomic_t" != no &&
14870 cat >>confdefs.h <<EOF
14871 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14872 EOF
14873
14874 if test $NCURSES_CHTYPE = auto ; then
14875
14876 echo "$as_me:14876: checking for type of chtype" >&5
14877 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14878 if test "${cf_cv_typeof_chtype+set}" = set; then
14879   echo $ECHO_N "(cached) $ECHO_C" >&6
14880 else
14881
14882                 if test "$cross_compiling" = yes; then
14883   cf_cv_typeof_chtype=long
14884 else
14885   cat >conftest.$ac_ext <<_ACEOF
14886 #line 14886 "configure"
14887 #include "confdefs.h"
14888
14889 #define WANT_BITS 31
14890 #include <stdio.h>
14891 int main()
14892 {
14893         FILE *fp = fopen("cf_test.out", "w");
14894         if (fp != 0) {
14895                 char *result = "long";
14896                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14897                         int n;
14898                         unsigned int x, y;
14899                         for (n = 0; n < WANT_BITS; n++) {
14900                                 x = (1 << n);
14901                                 y = (x >> n);
14902                                 if (y != 1 || x == 0) {
14903                                         x = 0;
14904                                         break;
14905                                 }
14906                         }
14907                         /*
14908                          * If x is nonzero, an int is big enough for the bits
14909                          * that we want.
14910                          */
14911                         result = (x != 0) ? "int" : "long";
14912                 }
14913                 fputs(result, fp);
14914                 fclose(fp);
14915         }
14916         ${cf_cv_main_return:-return}(0);
14917 }
14918
14919 _ACEOF
14920 rm -f conftest$ac_exeext
14921 if { (eval echo "$as_me:14921: \"$ac_link\"") >&5
14922   (eval $ac_link) 2>&5
14923   ac_status=$?
14924   echo "$as_me:14924: \$? = $ac_status" >&5
14925   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14926   { (eval echo "$as_me:14926: \"$ac_try\"") >&5
14927   (eval $ac_try) 2>&5
14928   ac_status=$?
14929   echo "$as_me:14929: \$? = $ac_status" >&5
14930   (exit $ac_status); }; }; then
14931   cf_cv_typeof_chtype=`cat cf_test.out`
14932 else
14933   echo "$as_me: program exited with status $ac_status" >&5
14934 echo "$as_me: failed program was:" >&5
14935 cat conftest.$ac_ext >&5
14936 cf_cv_typeof_chtype=long
14937 fi
14938 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14939 fi
14940                 rm -f cf_test.out
14941
14942 fi
14943
14944 echo "$as_me:14944: result: $cf_cv_typeof_chtype" >&5
14945 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14946
14947 cat >>confdefs.h <<EOF
14948 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14949 EOF
14950
14951 else
14952         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14953 fi
14954 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14955
14956 echo "$as_me:14956: checking if unsigned literals are legal" >&5
14957 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14958 if test "${cf_cv_unsigned_literals+set}" = set; then
14959   echo $ECHO_N "(cached) $ECHO_C" >&6
14960 else
14961
14962         cat >conftest.$ac_ext <<_ACEOF
14963 #line 14963 "configure"
14964 #include "confdefs.h"
14965
14966 int
14967 main ()
14968 {
14969 long x = 1L + 1UL + 1U + 1
14970   ;
14971   return 0;
14972 }
14973 _ACEOF
14974 rm -f conftest.$ac_objext
14975 if { (eval echo "$as_me:14975: \"$ac_compile\"") >&5
14976   (eval $ac_compile) 2>&5
14977   ac_status=$?
14978   echo "$as_me:14978: \$? = $ac_status" >&5
14979   (exit $ac_status); } &&
14980          { ac_try='test -s conftest.$ac_objext'
14981   { (eval echo "$as_me:14981: \"$ac_try\"") >&5
14982   (eval $ac_try) 2>&5
14983   ac_status=$?
14984   echo "$as_me:14984: \$? = $ac_status" >&5
14985   (exit $ac_status); }; }; then
14986   cf_cv_unsigned_literals=yes
14987 else
14988   echo "$as_me: failed program was:" >&5
14989 cat conftest.$ac_ext >&5
14990 cf_cv_unsigned_literals=no
14991 fi
14992 rm -f conftest.$ac_objext conftest.$ac_ext
14993
14994 fi
14995
14996 echo "$as_me:14996: result: $cf_cv_unsigned_literals" >&5
14997 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14998
14999 cf_cv_1UL="1"
15000 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15001 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15002
15003 if test $NCURSES_MMASK_T = auto ; then
15004         cf_cv_typeof_mmask_t=long
15005 else
15006         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15007 fi
15008 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15009
15010 ###     Checks for external-data
15011
15012 echo "$as_me:15012: checking if external errno is declared" >&5
15013 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15014 if test "${cf_cv_dcl_errno+set}" = set; then
15015   echo $ECHO_N "(cached) $ECHO_C" >&6
15016 else
15017
15018     cat >conftest.$ac_ext <<_ACEOF
15019 #line 15019 "configure"
15020 #include "confdefs.h"
15021
15022 #ifdef HAVE_STDLIB_H
15023 #include <stdlib.h>
15024 #endif
15025 #include <stdio.h>
15026 #include <sys/types.h>
15027 #include <errno.h>
15028 int
15029 main ()
15030 {
15031 int x = (int) errno
15032   ;
15033   return 0;
15034 }
15035 _ACEOF
15036 rm -f conftest.$ac_objext
15037 if { (eval echo "$as_me:15037: \"$ac_compile\"") >&5
15038   (eval $ac_compile) 2>&5
15039   ac_status=$?
15040   echo "$as_me:15040: \$? = $ac_status" >&5
15041   (exit $ac_status); } &&
15042          { ac_try='test -s conftest.$ac_objext'
15043   { (eval echo "$as_me:15043: \"$ac_try\"") >&5
15044   (eval $ac_try) 2>&5
15045   ac_status=$?
15046   echo "$as_me:15046: \$? = $ac_status" >&5
15047   (exit $ac_status); }; }; then
15048   cf_cv_dcl_errno=yes
15049 else
15050   echo "$as_me: failed program was:" >&5
15051 cat conftest.$ac_ext >&5
15052 cf_cv_dcl_errno=no
15053 fi
15054 rm -f conftest.$ac_objext conftest.$ac_ext
15055
15056 fi
15057 echo "$as_me:15057: result: $cf_cv_dcl_errno" >&5
15058 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15059
15060 if test "$cf_cv_dcl_errno" = no ; then
15061
15062 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15063
15064     cat >>confdefs.h <<EOF
15065 #define $cf_result 1
15066 EOF
15067
15068 fi
15069
15070 # It's possible (for near-UNIX clones) that the data doesn't exist
15071
15072 echo "$as_me:15072: checking if external errno exists" >&5
15073 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15074 if test "${cf_cv_have_errno+set}" = set; then
15075   echo $ECHO_N "(cached) $ECHO_C" >&6
15076 else
15077
15078     cat >conftest.$ac_ext <<_ACEOF
15079 #line 15079 "configure"
15080 #include "confdefs.h"
15081
15082 #undef errno
15083 extern int errno;
15084
15085 int
15086 main ()
15087 {
15088 errno = 2
15089   ;
15090   return 0;
15091 }
15092 _ACEOF
15093 rm -f conftest.$ac_objext conftest$ac_exeext
15094 if { (eval echo "$as_me:15094: \"$ac_link\"") >&5
15095   (eval $ac_link) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); } &&
15099          { ac_try='test -s conftest$ac_exeext'
15100   { (eval echo "$as_me:15100: \"$ac_try\"") >&5
15101   (eval $ac_try) 2>&5
15102   ac_status=$?
15103   echo "$as_me:15103: \$? = $ac_status" >&5
15104   (exit $ac_status); }; }; then
15105   cf_cv_have_errno=yes
15106 else
15107   echo "$as_me: failed program was:" >&5
15108 cat conftest.$ac_ext >&5
15109 cf_cv_have_errno=no
15110 fi
15111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15112
15113 fi
15114 echo "$as_me:15114: result: $cf_cv_have_errno" >&5
15115 echo "${ECHO_T}$cf_cv_have_errno" >&6
15116
15117 if test "$cf_cv_have_errno" = yes ; then
15118
15119 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15120
15121     cat >>confdefs.h <<EOF
15122 #define $cf_result 1
15123 EOF
15124
15125 fi
15126
15127 echo "$as_me:15127: checking if data-only library module links" >&5
15128 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15129 if test "${cf_cv_link_dataonly+set}" = set; then
15130   echo $ECHO_N "(cached) $ECHO_C" >&6
15131 else
15132
15133         rm -f conftest.a
15134         cat >conftest.$ac_ext <<EOF
15135 #line 15135 "configure"
15136 int     testdata[3] = { 123, 456, 789 };
15137 EOF
15138         if { (eval echo "$as_me:15138: \"$ac_compile\"") >&5
15139   (eval $ac_compile) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); } ; then
15143                 mv conftest.o data.o && \
15144                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15145         fi
15146         rm -f conftest.$ac_ext data.o
15147         cat >conftest.$ac_ext <<EOF
15148 #line 15148 "configure"
15149 int     testfunc()
15150 {
15151 #if defined(NeXT)
15152         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15153 #else
15154         extern int testdata[3];
15155         return testdata[0] == 123
15156            &&  testdata[1] == 456
15157            &&  testdata[2] == 789;
15158 #endif
15159 }
15160 EOF
15161         if { (eval echo "$as_me:15161: \"$ac_compile\"") >&5
15162   (eval $ac_compile) 2>&5
15163   ac_status=$?
15164   echo "$as_me:15164: \$? = $ac_status" >&5
15165   (exit $ac_status); }; then
15166                 mv conftest.o func.o && \
15167                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15168         fi
15169         rm -f conftest.$ac_ext func.o
15170         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15171         cf_saveLIBS="$LIBS"
15172         LIBS="conftest.a $LIBS"
15173         if test "$cross_compiling" = yes; then
15174   cf_cv_link_dataonly=unknown
15175 else
15176   cat >conftest.$ac_ext <<_ACEOF
15177 #line 15177 "configure"
15178 #include "confdefs.h"
15179
15180         int main()
15181         {
15182                 extern int testfunc();
15183                 ${cf_cv_main_return:-return} (!testfunc());
15184         }
15185
15186 _ACEOF
15187 rm -f conftest$ac_exeext
15188 if { (eval echo "$as_me:15188: \"$ac_link\"") >&5
15189   (eval $ac_link) 2>&5
15190   ac_status=$?
15191   echo "$as_me:15191: \$? = $ac_status" >&5
15192   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15193   { (eval echo "$as_me:15193: \"$ac_try\"") >&5
15194   (eval $ac_try) 2>&5
15195   ac_status=$?
15196   echo "$as_me:15196: \$? = $ac_status" >&5
15197   (exit $ac_status); }; }; then
15198   cf_cv_link_dataonly=yes
15199 else
15200   echo "$as_me: program exited with status $ac_status" >&5
15201 echo "$as_me: failed program was:" >&5
15202 cat conftest.$ac_ext >&5
15203 cf_cv_link_dataonly=no
15204 fi
15205 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15206 fi
15207         LIBS="$cf_saveLIBS"
15208
15209 fi
15210
15211 echo "$as_me:15211: result: $cf_cv_link_dataonly" >&5
15212 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15213
15214 if test "$cf_cv_link_dataonly" = no ; then
15215
15216 cat >>confdefs.h <<\EOF
15217 #define BROKEN_LINKER 1
15218 EOF
15219
15220         BROKEN_LINKER=1
15221 fi
15222
15223 ###     Checks for library functions.
15224
15225 for ac_func in \
15226 getcwd \
15227 getegid \
15228 geteuid \
15229 getttynam \
15230 issetugid \
15231 poll \
15232 putenv \
15233 remove \
15234 select \
15235 setbuf \
15236 setbuffer \
15237 setenv \
15238 setvbuf \
15239 sigaction \
15240 sigvec \
15241 strdup \
15242 strstr \
15243 tcgetpgrp \
15244 times \
15245 vsnprintf \
15246
15247 do
15248 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15249 echo "$as_me:15249: checking for $ac_func" >&5
15250 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15251 if eval "test \"\${$as_ac_var+set}\" = set"; then
15252   echo $ECHO_N "(cached) $ECHO_C" >&6
15253 else
15254   cat >conftest.$ac_ext <<_ACEOF
15255 #line 15255 "configure"
15256 #include "confdefs.h"
15257 /* System header to define __stub macros and hopefully few prototypes,
15258     which can conflict with char $ac_func (); below.  */
15259 #include <assert.h>
15260 /* Override any gcc2 internal prototype to avoid an error.  */
15261 #ifdef __cplusplus
15262 extern "C"
15263 #endif
15264 /* We use char because int might match the return type of a gcc2
15265    builtin and then its argument prototype would still apply.  */
15266 char $ac_func ();
15267 char (*f) ();
15268
15269 int
15270 main ()
15271 {
15272 /* The GNU C library defines this for functions which it implements
15273     to always fail with ENOSYS.  Some functions are actually named
15274     something starting with __ and the normal name is an alias.  */
15275 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15276 choke me
15277 #else
15278 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15279 #endif
15280
15281   ;
15282   return 0;
15283 }
15284 _ACEOF
15285 rm -f conftest.$ac_objext conftest$ac_exeext
15286 if { (eval echo "$as_me:15286: \"$ac_link\"") >&5
15287   (eval $ac_link) 2>&5
15288   ac_status=$?
15289   echo "$as_me:15289: \$? = $ac_status" >&5
15290   (exit $ac_status); } &&
15291          { ac_try='test -s conftest$ac_exeext'
15292   { (eval echo "$as_me:15292: \"$ac_try\"") >&5
15293   (eval $ac_try) 2>&5
15294   ac_status=$?
15295   echo "$as_me:15295: \$? = $ac_status" >&5
15296   (exit $ac_status); }; }; then
15297   eval "$as_ac_var=yes"
15298 else
15299   echo "$as_me: failed program was:" >&5
15300 cat conftest.$ac_ext >&5
15301 eval "$as_ac_var=no"
15302 fi
15303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15304 fi
15305 echo "$as_me:15305: result: `eval echo '${'$as_ac_var'}'`" >&5
15306 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15307 if test `eval echo '${'$as_ac_var'}'` = yes; then
15308   cat >>confdefs.h <<EOF
15309 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15310 EOF
15311
15312 fi
15313 done
15314
15315 if test "x$with_getcap" = "xyes" ; then
15316
15317 echo "$as_me:15317: checking for terminal-capability database functions" >&5
15318 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15319 if test "${cf_cv_cgetent+set}" = set; then
15320   echo $ECHO_N "(cached) $ECHO_C" >&6
15321 else
15322
15323 cat >conftest.$ac_ext <<_ACEOF
15324 #line 15324 "configure"
15325 #include "confdefs.h"
15326
15327 #include <stdlib.h>
15328 int
15329 main ()
15330 {
15331
15332         char temp[128];
15333         char *buf = temp;
15334         char *db_array = temp;
15335         cgetent(&buf, &db_array, "vt100");
15336         cgetcap(buf, "tc", '=');
15337         cgetmatch(buf, "tc");
15338
15339   ;
15340   return 0;
15341 }
15342 _ACEOF
15343 rm -f conftest.$ac_objext conftest$ac_exeext
15344 if { (eval echo "$as_me:15344: \"$ac_link\"") >&5
15345   (eval $ac_link) 2>&5
15346   ac_status=$?
15347   echo "$as_me:15347: \$? = $ac_status" >&5
15348   (exit $ac_status); } &&
15349          { ac_try='test -s conftest$ac_exeext'
15350   { (eval echo "$as_me:15350: \"$ac_try\"") >&5
15351   (eval $ac_try) 2>&5
15352   ac_status=$?
15353   echo "$as_me:15353: \$? = $ac_status" >&5
15354   (exit $ac_status); }; }; then
15355   cf_cv_cgetent=yes
15356 else
15357   echo "$as_me: failed program was:" >&5
15358 cat conftest.$ac_ext >&5
15359 cf_cv_cgetent=no
15360 fi
15361 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15362
15363 fi
15364 echo "$as_me:15364: result: $cf_cv_cgetent" >&5
15365 echo "${ECHO_T}$cf_cv_cgetent" >&6
15366
15367 if test "$cf_cv_cgetent" = yes
15368 then
15369
15370 cat >>confdefs.h <<\EOF
15371 #define HAVE_BSD_CGETENT 1
15372 EOF
15373
15374 echo "$as_me:15374: checking if cgetent uses const parameter" >&5
15375 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15376 if test "${cf_cv_cgetent_const+set}" = set; then
15377   echo $ECHO_N "(cached) $ECHO_C" >&6
15378 else
15379
15380 cat >conftest.$ac_ext <<_ACEOF
15381 #line 15381 "configure"
15382 #include "confdefs.h"
15383
15384 #include <stdlib.h>
15385 int
15386 main ()
15387 {
15388
15389         char temp[128];
15390         char *buf = temp;
15391 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15392         const char *db_array = temp;
15393         cgetent(&buf, &db_array, "vt100");
15394 #endif
15395         cgetcap(buf, "tc", '=');
15396         cgetmatch(buf, "tc");
15397
15398   ;
15399   return 0;
15400 }
15401 _ACEOF
15402 rm -f conftest.$ac_objext conftest$ac_exeext
15403 if { (eval echo "$as_me:15403: \"$ac_link\"") >&5
15404   (eval $ac_link) 2>&5
15405   ac_status=$?
15406   echo "$as_me:15406: \$? = $ac_status" >&5
15407   (exit $ac_status); } &&
15408          { ac_try='test -s conftest$ac_exeext'
15409   { (eval echo "$as_me:15409: \"$ac_try\"") >&5
15410   (eval $ac_try) 2>&5
15411   ac_status=$?
15412   echo "$as_me:15412: \$? = $ac_status" >&5
15413   (exit $ac_status); }; }; then
15414   cf_cv_cgetent_const=yes
15415 else
15416   echo "$as_me: failed program was:" >&5
15417 cat conftest.$ac_ext >&5
15418 cf_cv_cgetent_const=no
15419 fi
15420 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15421
15422 fi
15423 echo "$as_me:15423: result: $cf_cv_cgetent_const" >&5
15424 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15425         if test "$cf_cv_cgetent_const" = yes
15426         then
15427
15428 cat >>confdefs.h <<EOF
15429 #define CGETENT_CONST const
15430 EOF
15431
15432         fi
15433 fi
15434
15435 fi
15436
15437 echo "$as_me:15437: checking for isascii" >&5
15438 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15439 if test "${cf_cv_have_isascii+set}" = set; then
15440   echo $ECHO_N "(cached) $ECHO_C" >&6
15441 else
15442
15443         cat >conftest.$ac_ext <<_ACEOF
15444 #line 15444 "configure"
15445 #include "confdefs.h"
15446 #include <ctype.h>
15447 int
15448 main ()
15449 {
15450 int x = isascii(' ')
15451   ;
15452   return 0;
15453 }
15454 _ACEOF
15455 rm -f conftest.$ac_objext conftest$ac_exeext
15456 if { (eval echo "$as_me:15456: \"$ac_link\"") >&5
15457   (eval $ac_link) 2>&5
15458   ac_status=$?
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit $ac_status); } &&
15461          { ac_try='test -s conftest$ac_exeext'
15462   { (eval echo "$as_me:15462: \"$ac_try\"") >&5
15463   (eval $ac_try) 2>&5
15464   ac_status=$?
15465   echo "$as_me:15465: \$? = $ac_status" >&5
15466   (exit $ac_status); }; }; then
15467   cf_cv_have_isascii=yes
15468 else
15469   echo "$as_me: failed program was:" >&5
15470 cat conftest.$ac_ext >&5
15471 cf_cv_have_isascii=no
15472 fi
15473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15474
15475 fi
15476 echo "$as_me:15476: result: $cf_cv_have_isascii" >&5
15477 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15478 test "$cf_cv_have_isascii" = yes &&
15479 cat >>confdefs.h <<\EOF
15480 #define HAVE_ISASCII 1
15481 EOF
15482
15483 if test "$ac_cv_func_sigaction" = yes; then
15484 echo "$as_me:15484: checking whether sigaction needs _POSIX_SOURCE" >&5
15485 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15486 cat >conftest.$ac_ext <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489
15490 #include <sys/types.h>
15491 #include <signal.h>
15492 int
15493 main ()
15494 {
15495 struct sigaction act
15496   ;
15497   return 0;
15498 }
15499 _ACEOF
15500 rm -f conftest.$ac_objext
15501 if { (eval echo "$as_me:15501: \"$ac_compile\"") >&5
15502   (eval $ac_compile) 2>&5
15503   ac_status=$?
15504   echo "$as_me:15504: \$? = $ac_status" >&5
15505   (exit $ac_status); } &&
15506          { ac_try='test -s conftest.$ac_objext'
15507   { (eval echo "$as_me:15507: \"$ac_try\"") >&5
15508   (eval $ac_try) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit $ac_status); }; }; then
15512   sigact_bad=no
15513 else
15514   echo "$as_me: failed program was:" >&5
15515 cat conftest.$ac_ext >&5
15516
15517 cat >conftest.$ac_ext <<_ACEOF
15518 #line 15518 "configure"
15519 #include "confdefs.h"
15520
15521 #define _POSIX_SOURCE
15522 #include <sys/types.h>
15523 #include <signal.h>
15524 int
15525 main ()
15526 {
15527 struct sigaction act
15528   ;
15529   return 0;
15530 }
15531 _ACEOF
15532 rm -f conftest.$ac_objext
15533 if { (eval echo "$as_me:15533: \"$ac_compile\"") >&5
15534   (eval $ac_compile) 2>&5
15535   ac_status=$?
15536   echo "$as_me:15536: \$? = $ac_status" >&5
15537   (exit $ac_status); } &&
15538          { ac_try='test -s conftest.$ac_objext'
15539   { (eval echo "$as_me:15539: \"$ac_try\"") >&5
15540   (eval $ac_try) 2>&5
15541   ac_status=$?
15542   echo "$as_me:15542: \$? = $ac_status" >&5
15543   (exit $ac_status); }; }; then
15544   sigact_bad=yes
15545
15546 cat >>confdefs.h <<\EOF
15547 #define _POSIX_SOURCE 1
15548 EOF
15549
15550 else
15551   echo "$as_me: failed program was:" >&5
15552 cat conftest.$ac_ext >&5
15553 sigact_bad=unknown
15554 fi
15555 rm -f conftest.$ac_objext conftest.$ac_ext
15556 fi
15557 rm -f conftest.$ac_objext conftest.$ac_ext
15558 echo "$as_me:15558: result: $sigact_bad" >&5
15559 echo "${ECHO_T}$sigact_bad" >&6
15560 fi
15561
15562 echo "$as_me:15562: checking if nanosleep really works" >&5
15563 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15564 if test "${cf_cv_func_nanosleep+set}" = set; then
15565   echo $ECHO_N "(cached) $ECHO_C" >&6
15566 else
15567
15568 if test "$cross_compiling" = yes; then
15569   cf_cv_func_nanosleep=unknown
15570 else
15571   cat >conftest.$ac_ext <<_ACEOF
15572 #line 15572 "configure"
15573 #include "confdefs.h"
15574
15575 #include <stdio.h>
15576 #include <errno.h>
15577 #include <time.h>
15578
15579 #ifdef HAVE_SYS_TIME_H
15580 #include <sys/time.h>
15581 #endif
15582
15583 int main() {
15584         struct timespec ts1, ts2;
15585         int code;
15586         ts1.tv_sec  = 0;
15587         ts1.tv_nsec = 750000000;
15588         ts2.tv_sec  = 0;
15589         ts2.tv_nsec = 0;
15590         errno = 0;
15591         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15592         ${cf_cv_main_return:-return}(code != 0);
15593 }
15594
15595 _ACEOF
15596 rm -f conftest$ac_exeext
15597 if { (eval echo "$as_me:15597: \"$ac_link\"") >&5
15598   (eval $ac_link) 2>&5
15599   ac_status=$?
15600   echo "$as_me:15600: \$? = $ac_status" >&5
15601   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15602   { (eval echo "$as_me:15602: \"$ac_try\"") >&5
15603   (eval $ac_try) 2>&5
15604   ac_status=$?
15605   echo "$as_me:15605: \$? = $ac_status" >&5
15606   (exit $ac_status); }; }; then
15607   cf_cv_func_nanosleep=yes
15608 else
15609   echo "$as_me: program exited with status $ac_status" >&5
15610 echo "$as_me: failed program was:" >&5
15611 cat conftest.$ac_ext >&5
15612 cf_cv_func_nanosleep=no
15613 fi
15614 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15615 fi
15616 fi
15617 echo "$as_me:15617: result: $cf_cv_func_nanosleep" >&5
15618 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15619
15620 test "$cf_cv_func_nanosleep" = "yes" &&
15621 cat >>confdefs.h <<\EOF
15622 #define HAVE_NANOSLEEP 1
15623 EOF
15624
15625 for ac_header in \
15626 termio.h \
15627 termios.h \
15628 unistd.h \
15629
15630 do
15631 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15632 echo "$as_me:15632: checking for $ac_header" >&5
15633 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15634 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15635   echo $ECHO_N "(cached) $ECHO_C" >&6
15636 else
15637   cat >conftest.$ac_ext <<_ACEOF
15638 #line 15638 "configure"
15639 #include "confdefs.h"
15640 #include <$ac_header>
15641 _ACEOF
15642 if { (eval echo "$as_me:15642: \"$ac_cpp conftest.$ac_ext\"") >&5
15643   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15644   ac_status=$?
15645   egrep -v '^ *\+' conftest.er1 >conftest.err
15646   rm -f conftest.er1
15647   cat conftest.err >&5
15648   echo "$as_me:15648: \$? = $ac_status" >&5
15649   (exit $ac_status); } >/dev/null; then
15650   if test -s conftest.err; then
15651     ac_cpp_err=$ac_c_preproc_warn_flag
15652   else
15653     ac_cpp_err=
15654   fi
15655 else
15656   ac_cpp_err=yes
15657 fi
15658 if test -z "$ac_cpp_err"; then
15659   eval "$as_ac_Header=yes"
15660 else
15661   echo "$as_me: failed program was:" >&5
15662   cat conftest.$ac_ext >&5
15663   eval "$as_ac_Header=no"
15664 fi
15665 rm -f conftest.err conftest.$ac_ext
15666 fi
15667 echo "$as_me:15667: result: `eval echo '${'$as_ac_Header'}'`" >&5
15668 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15669 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15670   cat >>confdefs.h <<EOF
15671 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15672 EOF
15673
15674 fi
15675 done
15676
15677 if test "$ISC" = yes ; then
15678
15679 for ac_header in sys/termio.h
15680 do
15681 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15682 echo "$as_me:15682: checking for $ac_header" >&5
15683 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15684 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15685   echo $ECHO_N "(cached) $ECHO_C" >&6
15686 else
15687   cat >conftest.$ac_ext <<_ACEOF
15688 #line 15688 "configure"
15689 #include "confdefs.h"
15690 #include <$ac_header>
15691 _ACEOF
15692 if { (eval echo "$as_me:15692: \"$ac_cpp conftest.$ac_ext\"") >&5
15693   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15694   ac_status=$?
15695   egrep -v '^ *\+' conftest.er1 >conftest.err
15696   rm -f conftest.er1
15697   cat conftest.err >&5
15698   echo "$as_me:15698: \$? = $ac_status" >&5
15699   (exit $ac_status); } >/dev/null; then
15700   if test -s conftest.err; then
15701     ac_cpp_err=$ac_c_preproc_warn_flag
15702   else
15703     ac_cpp_err=
15704   fi
15705 else
15706   ac_cpp_err=yes
15707 fi
15708 if test -z "$ac_cpp_err"; then
15709   eval "$as_ac_Header=yes"
15710 else
15711   echo "$as_me: failed program was:" >&5
15712   cat conftest.$ac_ext >&5
15713   eval "$as_ac_Header=no"
15714 fi
15715 rm -f conftest.err conftest.$ac_ext
15716 fi
15717 echo "$as_me:15717: result: `eval echo '${'$as_ac_Header'}'`" >&5
15718 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15719 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15720   cat >>confdefs.h <<EOF
15721 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15722 EOF
15723
15724 fi
15725 done
15726
15727 fi
15728 if test "$ac_cv_header_termios_h" = yes ; then
15729         case "$CFLAGS $CPPFLAGS" in
15730         *-D_POSIX_SOURCE*)
15731                 termios_bad=dunno ;;
15732         *)      termios_bad=maybe ;;
15733         esac
15734         if test "$termios_bad" = maybe ; then
15735         echo "$as_me:15735: checking whether termios.h needs _POSIX_SOURCE" >&5
15736 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15737         cat >conftest.$ac_ext <<_ACEOF
15738 #line 15738 "configure"
15739 #include "confdefs.h"
15740 #include <termios.h>
15741 int
15742 main ()
15743 {
15744 struct termios foo; int x = foo.c_iflag
15745   ;
15746   return 0;
15747 }
15748 _ACEOF
15749 rm -f conftest.$ac_objext
15750 if { (eval echo "$as_me:15750: \"$ac_compile\"") >&5
15751   (eval $ac_compile) 2>&5
15752   ac_status=$?
15753   echo "$as_me:15753: \$? = $ac_status" >&5
15754   (exit $ac_status); } &&
15755          { ac_try='test -s conftest.$ac_objext'
15756   { (eval echo "$as_me:15756: \"$ac_try\"") >&5
15757   (eval $ac_try) 2>&5
15758   ac_status=$?
15759   echo "$as_me:15759: \$? = $ac_status" >&5
15760   (exit $ac_status); }; }; then
15761   termios_bad=no
15762 else
15763   echo "$as_me: failed program was:" >&5
15764 cat conftest.$ac_ext >&5
15765
15766                 cat >conftest.$ac_ext <<_ACEOF
15767 #line 15767 "configure"
15768 #include "confdefs.h"
15769
15770 #define _POSIX_SOURCE
15771 #include <termios.h>
15772 int
15773 main ()
15774 {
15775 struct termios foo; int x = foo.c_iflag
15776   ;
15777   return 0;
15778 }
15779 _ACEOF
15780 rm -f conftest.$ac_objext
15781 if { (eval echo "$as_me:15781: \"$ac_compile\"") >&5
15782   (eval $ac_compile) 2>&5
15783   ac_status=$?
15784   echo "$as_me:15784: \$? = $ac_status" >&5
15785   (exit $ac_status); } &&
15786          { ac_try='test -s conftest.$ac_objext'
15787   { (eval echo "$as_me:15787: \"$ac_try\"") >&5
15788   (eval $ac_try) 2>&5
15789   ac_status=$?
15790   echo "$as_me:15790: \$? = $ac_status" >&5
15791   (exit $ac_status); }; }; then
15792   termios_bad=unknown
15793 else
15794   echo "$as_me: failed program was:" >&5
15795 cat conftest.$ac_ext >&5
15796 termios_bad=yes
15797 cat >>confdefs.h <<\EOF
15798 #define _POSIX_SOURCE 1
15799 EOF
15800
15801 fi
15802 rm -f conftest.$ac_objext conftest.$ac_ext
15803
15804 fi
15805 rm -f conftest.$ac_objext conftest.$ac_ext
15806         echo "$as_me:15806: result: $termios_bad" >&5
15807 echo "${ECHO_T}$termios_bad" >&6
15808         fi
15809 fi
15810
15811 echo "$as_me:15811: checking for tcgetattr" >&5
15812 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15813 if test "${cf_cv_have_tcgetattr+set}" = set; then
15814   echo $ECHO_N "(cached) $ECHO_C" >&6
15815 else
15816
15817 cat >conftest.$ac_ext <<_ACEOF
15818 #line 15818 "configure"
15819 #include "confdefs.h"
15820
15821 #include <sys/types.h>
15822 #ifdef HAVE_UNISTD_H
15823 #include <unistd.h>
15824 #endif
15825 #ifdef HAVE_TERMIOS_H
15826 #include <termios.h>
15827 #define TTY struct termios
15828 #else
15829 #ifdef HAVE_TERMIO_H
15830 #include <termio.h>
15831 #define TTY struct termio
15832 #endif
15833 #endif
15834
15835 int
15836 main ()
15837 {
15838
15839 TTY foo;
15840 tcgetattr(1, &foo);
15841   ;
15842   return 0;
15843 }
15844 _ACEOF
15845 rm -f conftest.$ac_objext conftest$ac_exeext
15846 if { (eval echo "$as_me:15846: \"$ac_link\"") >&5
15847   (eval $ac_link) 2>&5
15848   ac_status=$?
15849   echo "$as_me:15849: \$? = $ac_status" >&5
15850   (exit $ac_status); } &&
15851          { ac_try='test -s conftest$ac_exeext'
15852   { (eval echo "$as_me:15852: \"$ac_try\"") >&5
15853   (eval $ac_try) 2>&5
15854   ac_status=$?
15855   echo "$as_me:15855: \$? = $ac_status" >&5
15856   (exit $ac_status); }; }; then
15857   cf_cv_have_tcgetattr=yes
15858 else
15859   echo "$as_me: failed program was:" >&5
15860 cat conftest.$ac_ext >&5
15861 cf_cv_have_tcgetattr=no
15862 fi
15863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15864 fi
15865 echo "$as_me:15865: result: $cf_cv_have_tcgetattr" >&5
15866 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15867 test "$cf_cv_have_tcgetattr" = yes &&
15868 cat >>confdefs.h <<\EOF
15869 #define HAVE_TCGETATTR 1
15870 EOF
15871
15872 echo "$as_me:15872: checking for vsscanf function or workaround" >&5
15873 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15874 if test "${cf_cv_func_vsscanf+set}" = set; then
15875   echo $ECHO_N "(cached) $ECHO_C" >&6
15876 else
15877
15878 cat >conftest.$ac_ext <<_ACEOF
15879 #line 15879 "configure"
15880 #include "confdefs.h"
15881
15882 #include <stdarg.h>
15883 #include <stdio.h>
15884 int
15885 main ()
15886 {
15887
15888         va_list ap;
15889         vsscanf("from", "%d", ap)
15890   ;
15891   return 0;
15892 }
15893 _ACEOF
15894 rm -f conftest.$ac_objext conftest$ac_exeext
15895 if { (eval echo "$as_me:15895: \"$ac_link\"") >&5
15896   (eval $ac_link) 2>&5
15897   ac_status=$?
15898   echo "$as_me:15898: \$? = $ac_status" >&5
15899   (exit $ac_status); } &&
15900          { ac_try='test -s conftest$ac_exeext'
15901   { (eval echo "$as_me:15901: \"$ac_try\"") >&5
15902   (eval $ac_try) 2>&5
15903   ac_status=$?
15904   echo "$as_me:15904: \$? = $ac_status" >&5
15905   (exit $ac_status); }; }; then
15906   cf_cv_func_vsscanf=vsscanf
15907 else
15908   echo "$as_me: failed program was:" >&5
15909 cat conftest.$ac_ext >&5
15910
15911 cat >conftest.$ac_ext <<_ACEOF
15912 #line 15912 "configure"
15913 #include "confdefs.h"
15914
15915 #include <stdarg.h>
15916 #include <stdio.h>
15917 int
15918 main ()
15919 {
15920
15921     FILE strbuf;
15922     char *str = "from";
15923
15924     strbuf._flag = _IOREAD;
15925     strbuf._ptr = strbuf._base = (unsigned char *) str;
15926     strbuf._cnt = strlen(str);
15927     strbuf._file = _NFILE;
15928     return (vfscanf(&strbuf, "%d", ap))
15929   ;
15930   return 0;
15931 }
15932 _ACEOF
15933 rm -f conftest.$ac_objext conftest$ac_exeext
15934 if { (eval echo "$as_me:15934: \"$ac_link\"") >&5
15935   (eval $ac_link) 2>&5
15936   ac_status=$?
15937   echo "$as_me:15937: \$? = $ac_status" >&5
15938   (exit $ac_status); } &&
15939          { ac_try='test -s conftest$ac_exeext'
15940   { (eval echo "$as_me:15940: \"$ac_try\"") >&5
15941   (eval $ac_try) 2>&5
15942   ac_status=$?
15943   echo "$as_me:15943: \$? = $ac_status" >&5
15944   (exit $ac_status); }; }; then
15945   cf_cv_func_vsscanf=vfscanf
15946 else
15947   echo "$as_me: failed program was:" >&5
15948 cat conftest.$ac_ext >&5
15949
15950 cat >conftest.$ac_ext <<_ACEOF
15951 #line 15951 "configure"
15952 #include "confdefs.h"
15953
15954 #include <stdarg.h>
15955 #include <stdio.h>
15956 int
15957 main ()
15958 {
15959
15960     FILE strbuf;
15961     char *str = "from";
15962
15963     strbuf._flag = _IOREAD;
15964     strbuf._ptr = strbuf._base = (unsigned char *) str;
15965     strbuf._cnt = strlen(str);
15966     strbuf._file = _NFILE;
15967     return (_doscan(&strbuf, "%d", ap))
15968   ;
15969   return 0;
15970 }
15971 _ACEOF
15972 rm -f conftest.$ac_objext conftest$ac_exeext
15973 if { (eval echo "$as_me:15973: \"$ac_link\"") >&5
15974   (eval $ac_link) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); } &&
15978          { ac_try='test -s conftest$ac_exeext'
15979   { (eval echo "$as_me:15979: \"$ac_try\"") >&5
15980   (eval $ac_try) 2>&5
15981   ac_status=$?
15982   echo "$as_me:15982: \$? = $ac_status" >&5
15983   (exit $ac_status); }; }; then
15984   cf_cv_func_vsscanf=_doscan
15985 else
15986   echo "$as_me: failed program was:" >&5
15987 cat conftest.$ac_ext >&5
15988
15989 cf_cv_func_vsscanf=no
15990 fi
15991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15992 fi
15993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15994 fi
15995 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15996 fi
15997 echo "$as_me:15997: result: $cf_cv_func_vsscanf" >&5
15998 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15999
16000 case $cf_cv_func_vsscanf in #(vi
16001 vsscanf)
16002 cat >>confdefs.h <<\EOF
16003 #define HAVE_VSSCANF 1
16004 EOF
16005 ;; #(vi
16006 vfscanf)
16007 cat >>confdefs.h <<\EOF
16008 #define HAVE_VFSCANF 1
16009 EOF
16010 ;; #(vi
16011 _doscan)
16012 cat >>confdefs.h <<\EOF
16013 #define HAVE__DOSCAN 1
16014 EOF
16015 ;;
16016 esac
16017
16018 echo "$as_me:16018: checking for working mkstemp" >&5
16019 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16020 if test "${cf_cv_func_mkstemp+set}" = set; then
16021   echo $ECHO_N "(cached) $ECHO_C" >&6
16022 else
16023
16024 rm -rf conftest*
16025 if test "$cross_compiling" = yes; then
16026   cf_cv_func_mkstemp=maybe
16027 else
16028   cat >conftest.$ac_ext <<_ACEOF
16029 #line 16029 "configure"
16030 #include "confdefs.h"
16031
16032 #include <sys/types.h>
16033 #include <stdlib.h>
16034 #include <stdio.h>
16035 #include <string.h>
16036 #include <sys/stat.h>
16037 int main()
16038 {
16039         char *tmpl = "conftestXXXXXX";
16040         char name[2][80];
16041         int n;
16042         int result = 0;
16043         int fd;
16044         struct stat sb;
16045
16046         umask(077);
16047         for (n = 0; n < 2; ++n) {
16048                 strcpy(name[n], tmpl);
16049                 if ((fd = mkstemp(name[n])) >= 0) {
16050                         if (!strcmp(name[n], tmpl)
16051                          || stat(name[n], &sb) != 0
16052                          || (sb.st_mode & S_IFMT) != S_IFREG
16053                          || (sb.st_mode & 077) != 0) {
16054                                 result = 1;
16055                         }
16056                         close(fd);
16057                 }
16058         }
16059         if (result == 0
16060          && !strcmp(name[0], name[1]))
16061                 result = 1;
16062         ${cf_cv_main_return:-return}(result);
16063 }
16064
16065 _ACEOF
16066 rm -f conftest$ac_exeext
16067 if { (eval echo "$as_me:16067: \"$ac_link\"") >&5
16068   (eval $ac_link) 2>&5
16069   ac_status=$?
16070   echo "$as_me:16070: \$? = $ac_status" >&5
16071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16072   { (eval echo "$as_me:16072: \"$ac_try\"") >&5
16073   (eval $ac_try) 2>&5
16074   ac_status=$?
16075   echo "$as_me:16075: \$? = $ac_status" >&5
16076   (exit $ac_status); }; }; then
16077   cf_cv_func_mkstemp=yes
16078
16079 else
16080   echo "$as_me: program exited with status $ac_status" >&5
16081 echo "$as_me: failed program was:" >&5
16082 cat conftest.$ac_ext >&5
16083 cf_cv_func_mkstemp=no
16084
16085 fi
16086 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16087 fi
16088
16089 fi
16090 echo "$as_me:16090: result: $cf_cv_func_mkstemp" >&5
16091 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16092 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16093         echo "$as_me:16093: checking for mkstemp" >&5
16094 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16095 if test "${ac_cv_func_mkstemp+set}" = set; then
16096   echo $ECHO_N "(cached) $ECHO_C" >&6
16097 else
16098   cat >conftest.$ac_ext <<_ACEOF
16099 #line 16099 "configure"
16100 #include "confdefs.h"
16101 /* System header to define __stub macros and hopefully few prototypes,
16102     which can conflict with char mkstemp (); below.  */
16103 #include <assert.h>
16104 /* Override any gcc2 internal prototype to avoid an error.  */
16105 #ifdef __cplusplus
16106 extern "C"
16107 #endif
16108 /* We use char because int might match the return type of a gcc2
16109    builtin and then its argument prototype would still apply.  */
16110 char mkstemp ();
16111 char (*f) ();
16112
16113 int
16114 main ()
16115 {
16116 /* The GNU C library defines this for functions which it implements
16117     to always fail with ENOSYS.  Some functions are actually named
16118     something starting with __ and the normal name is an alias.  */
16119 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16120 choke me
16121 #else
16122 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16123 #endif
16124
16125   ;
16126   return 0;
16127 }
16128 _ACEOF
16129 rm -f conftest.$ac_objext conftest$ac_exeext
16130 if { (eval echo "$as_me:16130: \"$ac_link\"") >&5
16131   (eval $ac_link) 2>&5
16132   ac_status=$?
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit $ac_status); } &&
16135          { ac_try='test -s conftest$ac_exeext'
16136   { (eval echo "$as_me:16136: \"$ac_try\"") >&5
16137   (eval $ac_try) 2>&5
16138   ac_status=$?
16139   echo "$as_me:16139: \$? = $ac_status" >&5
16140   (exit $ac_status); }; }; then
16141   ac_cv_func_mkstemp=yes
16142 else
16143   echo "$as_me: failed program was:" >&5
16144 cat conftest.$ac_ext >&5
16145 ac_cv_func_mkstemp=no
16146 fi
16147 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16148 fi
16149 echo "$as_me:16149: result: $ac_cv_func_mkstemp" >&5
16150 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16151
16152 fi
16153 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16154
16155 cat >>confdefs.h <<\EOF
16156 #define HAVE_MKSTEMP 1
16157 EOF
16158
16159 fi
16160
16161 # setup for prototype of fallback for vsscanf()
16162
16163 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16164         HAVE_VSSCANF=1
16165 else
16166         HAVE_VSSCANF=0
16167 fi
16168
16169 if test "x$cross_compiling" = xyes ; then
16170         { echo "$as_me:16170: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16171 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16172 else
16173         echo "$as_me:16173: checking whether setvbuf arguments are reversed" >&5
16174 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16175 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16176   echo $ECHO_N "(cached) $ECHO_C" >&6
16177 else
16178   if test "$cross_compiling" = yes; then
16179   { { echo "$as_me:16179: error: cannot run test program while cross compiling" >&5
16180 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16181    { (exit 1); exit 1; }; }
16182 else
16183   cat >conftest.$ac_ext <<_ACEOF
16184 #line 16184 "configure"
16185 #include "confdefs.h"
16186 #include <stdio.h>
16187 /* If setvbuf has the reversed format, exit 0. */
16188 int
16189 main ()
16190 {
16191   /* This call has the arguments reversed.
16192      A reversed system may check and see that the address of main
16193      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16194   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16195     $ac_main_return(1);
16196   putc('\r', stdout);
16197   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16198 }
16199 _ACEOF
16200 rm -f conftest$ac_exeext
16201 if { (eval echo "$as_me:16201: \"$ac_link\"") >&5
16202   (eval $ac_link) 2>&5
16203   ac_status=$?
16204   echo "$as_me:16204: \$? = $ac_status" >&5
16205   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16206   { (eval echo "$as_me:16206: \"$ac_try\"") >&5
16207   (eval $ac_try) 2>&5
16208   ac_status=$?
16209   echo "$as_me:16209: \$? = $ac_status" >&5
16210   (exit $ac_status); }; }; then
16211   ac_cv_func_setvbuf_reversed=yes
16212 else
16213   echo "$as_me: program exited with status $ac_status" >&5
16214 echo "$as_me: failed program was:" >&5
16215 cat conftest.$ac_ext >&5
16216 ac_cv_func_setvbuf_reversed=no
16217 fi
16218 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16219 fi
16220 rm -f core core.* *.core
16221 fi
16222 echo "$as_me:16222: result: $ac_cv_func_setvbuf_reversed" >&5
16223 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16224 if test $ac_cv_func_setvbuf_reversed = yes; then
16225
16226 cat >>confdefs.h <<\EOF
16227 #define SETVBUF_REVERSED 1
16228 EOF
16229
16230 fi
16231
16232 fi
16233 echo "$as_me:16233: checking return type of signal handlers" >&5
16234 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16235 if test "${ac_cv_type_signal+set}" = set; then
16236   echo $ECHO_N "(cached) $ECHO_C" >&6
16237 else
16238   cat >conftest.$ac_ext <<_ACEOF
16239 #line 16239 "configure"
16240 #include "confdefs.h"
16241 #include <sys/types.h>
16242 #include <signal.h>
16243 #ifdef signal
16244 # undef signal
16245 #endif
16246 #ifdef __cplusplus
16247 extern "C" void (*signal (int, void (*)(int)))(int);
16248 #else
16249 void (*signal ()) ();
16250 #endif
16251
16252 int
16253 main ()
16254 {
16255 int i;
16256   ;
16257   return 0;
16258 }
16259 _ACEOF
16260 rm -f conftest.$ac_objext
16261 if { (eval echo "$as_me:16261: \"$ac_compile\"") >&5
16262   (eval $ac_compile) 2>&5
16263   ac_status=$?
16264   echo "$as_me:16264: \$? = $ac_status" >&5
16265   (exit $ac_status); } &&
16266          { ac_try='test -s conftest.$ac_objext'
16267   { (eval echo "$as_me:16267: \"$ac_try\"") >&5
16268   (eval $ac_try) 2>&5
16269   ac_status=$?
16270   echo "$as_me:16270: \$? = $ac_status" >&5
16271   (exit $ac_status); }; }; then
16272   ac_cv_type_signal=void
16273 else
16274   echo "$as_me: failed program was:" >&5
16275 cat conftest.$ac_ext >&5
16276 ac_cv_type_signal=int
16277 fi
16278 rm -f conftest.$ac_objext conftest.$ac_ext
16279 fi
16280 echo "$as_me:16280: result: $ac_cv_type_signal" >&5
16281 echo "${ECHO_T}$ac_cv_type_signal" >&6
16282
16283 cat >>confdefs.h <<EOF
16284 #define RETSIGTYPE $ac_cv_type_signal
16285 EOF
16286
16287 echo "$as_me:16287: checking for intptr_t" >&5
16288 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16289 if test "${ac_cv_type_intptr_t+set}" = set; then
16290   echo $ECHO_N "(cached) $ECHO_C" >&6
16291 else
16292   cat >conftest.$ac_ext <<_ACEOF
16293 #line 16293 "configure"
16294 #include "confdefs.h"
16295 $ac_includes_default
16296 int
16297 main ()
16298 {
16299 if ((intptr_t *) 0)
16300   return 0;
16301 if (sizeof (intptr_t))
16302   return 0;
16303   ;
16304   return 0;
16305 }
16306 _ACEOF
16307 rm -f conftest.$ac_objext
16308 if { (eval echo "$as_me:16308: \"$ac_compile\"") >&5
16309   (eval $ac_compile) 2>&5
16310   ac_status=$?
16311   echo "$as_me:16311: \$? = $ac_status" >&5
16312   (exit $ac_status); } &&
16313          { ac_try='test -s conftest.$ac_objext'
16314   { (eval echo "$as_me:16314: \"$ac_try\"") >&5
16315   (eval $ac_try) 2>&5
16316   ac_status=$?
16317   echo "$as_me:16317: \$? = $ac_status" >&5
16318   (exit $ac_status); }; }; then
16319   ac_cv_type_intptr_t=yes
16320 else
16321   echo "$as_me: failed program was:" >&5
16322 cat conftest.$ac_ext >&5
16323 ac_cv_type_intptr_t=no
16324 fi
16325 rm -f conftest.$ac_objext conftest.$ac_ext
16326 fi
16327 echo "$as_me:16327: result: $ac_cv_type_intptr_t" >&5
16328 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16329 if test $ac_cv_type_intptr_t = yes; then
16330   :
16331 else
16332
16333 cat >>confdefs.h <<EOF
16334 #define intptr_t long
16335 EOF
16336
16337 fi
16338
16339 echo "$as_me:16339: checking for type sigaction_t" >&5
16340 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16341 if test "${cf_cv_type_sigaction+set}" = set; then
16342   echo $ECHO_N "(cached) $ECHO_C" >&6
16343 else
16344
16345         cat >conftest.$ac_ext <<_ACEOF
16346 #line 16346 "configure"
16347 #include "confdefs.h"
16348
16349 #include <signal.h>
16350 int
16351 main ()
16352 {
16353 sigaction_t x
16354   ;
16355   return 0;
16356 }
16357 _ACEOF
16358 rm -f conftest.$ac_objext
16359 if { (eval echo "$as_me:16359: \"$ac_compile\"") >&5
16360   (eval $ac_compile) 2>&5
16361   ac_status=$?
16362   echo "$as_me:16362: \$? = $ac_status" >&5
16363   (exit $ac_status); } &&
16364          { ac_try='test -s conftest.$ac_objext'
16365   { (eval echo "$as_me:16365: \"$ac_try\"") >&5
16366   (eval $ac_try) 2>&5
16367   ac_status=$?
16368   echo "$as_me:16368: \$? = $ac_status" >&5
16369   (exit $ac_status); }; }; then
16370   cf_cv_type_sigaction=yes
16371 else
16372   echo "$as_me: failed program was:" >&5
16373 cat conftest.$ac_ext >&5
16374 cf_cv_type_sigaction=no
16375 fi
16376 rm -f conftest.$ac_objext conftest.$ac_ext
16377 fi
16378
16379 echo "$as_me:16379: result: $cf_cv_type_sigaction" >&5
16380 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16381 test "$cf_cv_type_sigaction" = yes &&
16382 cat >>confdefs.h <<\EOF
16383 #define HAVE_TYPE_SIGACTION 1
16384 EOF
16385
16386 echo "$as_me:16386: checking declaration of size-change" >&5
16387 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16388 if test "${cf_cv_sizechange+set}" = set; then
16389   echo $ECHO_N "(cached) $ECHO_C" >&6
16390 else
16391
16392     cf_cv_sizechange=unknown
16393     cf_save_CPPFLAGS="$CPPFLAGS"
16394
16395 for cf_opts in "" "NEED_PTEM_H"
16396 do
16397
16398     CPPFLAGS="$cf_save_CPPFLAGS"
16399     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16400     cat >conftest.$ac_ext <<_ACEOF
16401 #line 16401 "configure"
16402 #include "confdefs.h"
16403 #include <sys/types.h>
16404 #ifdef HAVE_TERMIOS_H
16405 #include <termios.h>
16406 #else
16407 #ifdef HAVE_TERMIO_H
16408 #include <termio.h>
16409 #endif
16410 #endif
16411 #ifdef NEED_PTEM_H
16412 /* This is a workaround for SCO:  they neglected to define struct winsize in
16413  * termios.h -- it's only in termio.h and ptem.h
16414  */
16415 #include        <sys/stream.h>
16416 #include        <sys/ptem.h>
16417 #endif
16418 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16419 #include <sys/ioctl.h>
16420 #endif
16421
16422 int
16423 main ()
16424 {
16425
16426 #ifdef TIOCGSIZE
16427         struct ttysize win;     /* FIXME: what system is this? */
16428         int y = win.ts_lines;
16429         int x = win.ts_cols;
16430 #else
16431 #ifdef TIOCGWINSZ
16432         struct winsize win;
16433         int y = win.ws_row;
16434         int x = win.ws_col;
16435 #else
16436         no TIOCGSIZE or TIOCGWINSZ
16437 #endif /* TIOCGWINSZ */
16438 #endif /* TIOCGSIZE */
16439
16440   ;
16441   return 0;
16442 }
16443 _ACEOF
16444 rm -f conftest.$ac_objext
16445 if { (eval echo "$as_me:16445: \"$ac_compile\"") >&5
16446   (eval $ac_compile) 2>&5
16447   ac_status=$?
16448   echo "$as_me:16448: \$? = $ac_status" >&5
16449   (exit $ac_status); } &&
16450          { ac_try='test -s conftest.$ac_objext'
16451   { (eval echo "$as_me:16451: \"$ac_try\"") >&5
16452   (eval $ac_try) 2>&5
16453   ac_status=$?
16454   echo "$as_me:16454: \$? = $ac_status" >&5
16455   (exit $ac_status); }; }; then
16456   cf_cv_sizechange=yes
16457 else
16458   echo "$as_me: failed program was:" >&5
16459 cat conftest.$ac_ext >&5
16460 cf_cv_sizechange=no
16461 fi
16462 rm -f conftest.$ac_objext conftest.$ac_ext
16463
16464         CPPFLAGS="$cf_save_CPPFLAGS"
16465         if test "$cf_cv_sizechange" = yes ; then
16466                 echo "size-change succeeded ($cf_opts)" >&5
16467                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16468                 break
16469         fi
16470 done
16471
16472 fi
16473 echo "$as_me:16473: result: $cf_cv_sizechange" >&5
16474 echo "${ECHO_T}$cf_cv_sizechange" >&6
16475 if test "$cf_cv_sizechange" != no ; then
16476
16477 cat >>confdefs.h <<\EOF
16478 #define HAVE_SIZECHANGE 1
16479 EOF
16480
16481         case $cf_cv_sizechange in #(vi
16482         NEED*)
16483                 cat >>confdefs.h <<EOF
16484 #define $cf_cv_sizechange  1
16485 EOF
16486
16487                 ;;
16488         esac
16489 fi
16490
16491 echo "$as_me:16491: checking for memmove" >&5
16492 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
16493 if test "${ac_cv_func_memmove+set}" = set; then
16494   echo $ECHO_N "(cached) $ECHO_C" >&6
16495 else
16496   cat >conftest.$ac_ext <<_ACEOF
16497 #line 16497 "configure"
16498 #include "confdefs.h"
16499 /* System header to define __stub macros and hopefully few prototypes,
16500     which can conflict with char memmove (); below.  */
16501 #include <assert.h>
16502 /* Override any gcc2 internal prototype to avoid an error.  */
16503 #ifdef __cplusplus
16504 extern "C"
16505 #endif
16506 /* We use char because int might match the return type of a gcc2
16507    builtin and then its argument prototype would still apply.  */
16508 char memmove ();
16509 char (*f) ();
16510
16511 int
16512 main ()
16513 {
16514 /* The GNU C library defines this for functions which it implements
16515     to always fail with ENOSYS.  Some functions are actually named
16516     something starting with __ and the normal name is an alias.  */
16517 #if defined (__stub_memmove) || defined (__stub___memmove)
16518 choke me
16519 #else
16520 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16521 #endif
16522
16523   ;
16524   return 0;
16525 }
16526 _ACEOF
16527 rm -f conftest.$ac_objext conftest$ac_exeext
16528 if { (eval echo "$as_me:16528: \"$ac_link\"") >&5
16529   (eval $ac_link) 2>&5
16530   ac_status=$?
16531   echo "$as_me:16531: \$? = $ac_status" >&5
16532   (exit $ac_status); } &&
16533          { ac_try='test -s conftest$ac_exeext'
16534   { (eval echo "$as_me:16534: \"$ac_try\"") >&5
16535   (eval $ac_try) 2>&5
16536   ac_status=$?
16537   echo "$as_me:16537: \$? = $ac_status" >&5
16538   (exit $ac_status); }; }; then
16539   ac_cv_func_memmove=yes
16540 else
16541   echo "$as_me: failed program was:" >&5
16542 cat conftest.$ac_ext >&5
16543 ac_cv_func_memmove=no
16544 fi
16545 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16546 fi
16547 echo "$as_me:16547: result: $ac_cv_func_memmove" >&5
16548 echo "${ECHO_T}$ac_cv_func_memmove" >&6
16549 if test $ac_cv_func_memmove = yes; then
16550   :
16551 else
16552
16553 echo "$as_me:16553: checking for bcopy" >&5
16554 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
16555 if test "${ac_cv_func_bcopy+set}" = set; then
16556   echo $ECHO_N "(cached) $ECHO_C" >&6
16557 else
16558   cat >conftest.$ac_ext <<_ACEOF
16559 #line 16559 "configure"
16560 #include "confdefs.h"
16561 /* System header to define __stub macros and hopefully few prototypes,
16562     which can conflict with char bcopy (); below.  */
16563 #include <assert.h>
16564 /* Override any gcc2 internal prototype to avoid an error.  */
16565 #ifdef __cplusplus
16566 extern "C"
16567 #endif
16568 /* We use char because int might match the return type of a gcc2
16569    builtin and then its argument prototype would still apply.  */
16570 char bcopy ();
16571 char (*f) ();
16572
16573 int
16574 main ()
16575 {
16576 /* The GNU C library defines this for functions which it implements
16577     to always fail with ENOSYS.  Some functions are actually named
16578     something starting with __ and the normal name is an alias.  */
16579 #if defined (__stub_bcopy) || defined (__stub___bcopy)
16580 choke me
16581 #else
16582 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16583 #endif
16584
16585   ;
16586   return 0;
16587 }
16588 _ACEOF
16589 rm -f conftest.$ac_objext conftest$ac_exeext
16590 if { (eval echo "$as_me:16590: \"$ac_link\"") >&5
16591   (eval $ac_link) 2>&5
16592   ac_status=$?
16593   echo "$as_me:16593: \$? = $ac_status" >&5
16594   (exit $ac_status); } &&
16595          { ac_try='test -s conftest$ac_exeext'
16596   { (eval echo "$as_me:16596: \"$ac_try\"") >&5
16597   (eval $ac_try) 2>&5
16598   ac_status=$?
16599   echo "$as_me:16599: \$? = $ac_status" >&5
16600   (exit $ac_status); }; }; then
16601   ac_cv_func_bcopy=yes
16602 else
16603   echo "$as_me: failed program was:" >&5
16604 cat conftest.$ac_ext >&5
16605 ac_cv_func_bcopy=no
16606 fi
16607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16608 fi
16609 echo "$as_me:16609: result: $ac_cv_func_bcopy" >&5
16610 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
16611 if test $ac_cv_func_bcopy = yes; then
16612
16613         echo "$as_me:16613: checking if bcopy does overlapping moves" >&5
16614 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
16615 if test "${cf_cv_good_bcopy+set}" = set; then
16616   echo $ECHO_N "(cached) $ECHO_C" >&6
16617 else
16618
16619                 if test "$cross_compiling" = yes; then
16620   cf_cv_good_bcopy=unknown
16621 else
16622   cat >conftest.$ac_ext <<_ACEOF
16623 #line 16623 "configure"
16624 #include "confdefs.h"
16625
16626 int main() {
16627         static char data[] = "abcdefghijklmnopqrstuwwxyz";
16628         char temp[40];
16629         bcopy(data, temp, sizeof(data));
16630         bcopy(temp+10, temp, 15);
16631         bcopy(temp+5, temp+15, 10);
16632         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
16633 }
16634
16635 _ACEOF
16636 rm -f conftest$ac_exeext
16637 if { (eval echo "$as_me:16637: \"$ac_link\"") >&5
16638   (eval $ac_link) 2>&5
16639   ac_status=$?
16640   echo "$as_me:16640: \$? = $ac_status" >&5
16641   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16642   { (eval echo "$as_me:16642: \"$ac_try\"") >&5
16643   (eval $ac_try) 2>&5
16644   ac_status=$?
16645   echo "$as_me:16645: \$? = $ac_status" >&5
16646   (exit $ac_status); }; }; then
16647   cf_cv_good_bcopy=yes
16648 else
16649   echo "$as_me: program exited with status $ac_status" >&5
16650 echo "$as_me: failed program was:" >&5
16651 cat conftest.$ac_ext >&5
16652 cf_cv_good_bcopy=no
16653 fi
16654 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16655 fi
16656
16657 fi
16658 echo "$as_me:16658: result: $cf_cv_good_bcopy" >&5
16659 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
16660
16661 else
16662   cf_cv_good_bcopy=no
16663 fi
16664
16665         if test "$cf_cv_good_bcopy" = yes ; then
16666
16667 cat >>confdefs.h <<\EOF
16668 #define USE_OK_BCOPY 1
16669 EOF
16670
16671         else
16672
16673 cat >>confdefs.h <<\EOF
16674 #define USE_MY_MEMMOVE 1
16675 EOF
16676
16677         fi
16678
16679 fi
16680
16681 echo "$as_me:16681: checking if poll really works" >&5
16682 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16683 if test "${cf_cv_working_poll+set}" = set; then
16684   echo $ECHO_N "(cached) $ECHO_C" >&6
16685 else
16686
16687 if test "$cross_compiling" = yes; then
16688   cf_cv_working_poll=unknown
16689 else
16690   cat >conftest.$ac_ext <<_ACEOF
16691 #line 16691 "configure"
16692 #include "confdefs.h"
16693
16694 #include <stdlib.h>
16695 #include <stdio.h>
16696 #include <unistd.h>
16697 #include <fcntl.h>
16698 #ifdef HAVE_POLL_H
16699 #include <poll.h>
16700 #else
16701 #include <sys/poll.h>
16702 #endif
16703 int main() {
16704         struct pollfd myfds;
16705         int ret;
16706
16707         /* check for Darwin bug with respect to "devices" */
16708         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16709         if (myfds.fd < 0)
16710                 myfds.fd = 0;
16711         myfds.events = POLLIN;
16712         myfds.revents = 0;
16713
16714         ret = poll(&myfds, 1, 100);
16715
16716         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16717                 ret = -1;
16718         } else {
16719                 int fd = 0;
16720                 if (!isatty(fd)) {
16721                         fd = open("/dev/tty", 2);       /* O_RDWR */
16722                 }
16723
16724                 if (fd >= 0) {
16725                         /* also check with standard input */
16726                         myfds.fd = fd;
16727                         myfds.events = POLLIN;
16728                         myfds.revents = 0;
16729                         ret = poll(&myfds, 1, 100);
16730                 } else {
16731                         ret = -1;
16732                 }
16733         }
16734         ${cf_cv_main_return:-return}(ret < 0);
16735 }
16736 _ACEOF
16737 rm -f conftest$ac_exeext
16738 if { (eval echo "$as_me:16738: \"$ac_link\"") >&5
16739   (eval $ac_link) 2>&5
16740   ac_status=$?
16741   echo "$as_me:16741: \$? = $ac_status" >&5
16742   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16743   { (eval echo "$as_me:16743: \"$ac_try\"") >&5
16744   (eval $ac_try) 2>&5
16745   ac_status=$?
16746   echo "$as_me:16746: \$? = $ac_status" >&5
16747   (exit $ac_status); }; }; then
16748   cf_cv_working_poll=yes
16749 else
16750   echo "$as_me: program exited with status $ac_status" >&5
16751 echo "$as_me: failed program was:" >&5
16752 cat conftest.$ac_ext >&5
16753 cf_cv_working_poll=no
16754 fi
16755 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16756 fi
16757 fi
16758 echo "$as_me:16758: result: $cf_cv_working_poll" >&5
16759 echo "${ECHO_T}$cf_cv_working_poll" >&6
16760 test "$cf_cv_working_poll" = "yes" &&
16761 cat >>confdefs.h <<\EOF
16762 #define HAVE_WORKING_POLL 1
16763 EOF
16764
16765 echo "$as_me:16765: checking for va_copy" >&5
16766 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16767 if test "${cf_cv_have_va_copy+set}" = set; then
16768   echo $ECHO_N "(cached) $ECHO_C" >&6
16769 else
16770
16771 cat >conftest.$ac_ext <<_ACEOF
16772 #line 16772 "configure"
16773 #include "confdefs.h"
16774
16775 #include <stdarg.h>
16776
16777 int
16778 main ()
16779 {
16780
16781         static va_list dst;
16782         static va_list src;
16783         va_copy(dst, src)
16784   ;
16785   return 0;
16786 }
16787 _ACEOF
16788 rm -f conftest.$ac_objext conftest$ac_exeext
16789 if { (eval echo "$as_me:16789: \"$ac_link\"") >&5
16790   (eval $ac_link) 2>&5
16791   ac_status=$?
16792   echo "$as_me:16792: \$? = $ac_status" >&5
16793   (exit $ac_status); } &&
16794          { ac_try='test -s conftest$ac_exeext'
16795   { (eval echo "$as_me:16795: \"$ac_try\"") >&5
16796   (eval $ac_try) 2>&5
16797   ac_status=$?
16798   echo "$as_me:16798: \$? = $ac_status" >&5
16799   (exit $ac_status); }; }; then
16800   cf_cv_have_va_copy=yes
16801 else
16802   echo "$as_me: failed program was:" >&5
16803 cat conftest.$ac_ext >&5
16804 cf_cv_have_va_copy=no
16805 fi
16806 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16807 fi
16808 echo "$as_me:16808: result: $cf_cv_have_va_copy" >&5
16809 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16810
16811 test "$cf_cv_have_va_copy" = yes &&
16812 cat >>confdefs.h <<\EOF
16813 #define HAVE_VA_COPY 1
16814 EOF
16815
16816 echo "$as_me:16816: checking for __va_copy" >&5
16817 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16818 if test "${cf_cv_have___va_copy+set}" = set; then
16819   echo $ECHO_N "(cached) $ECHO_C" >&6
16820 else
16821
16822 cat >conftest.$ac_ext <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825
16826 #include <stdarg.h>
16827
16828 int
16829 main ()
16830 {
16831
16832         static va_list dst;
16833         static va_list src;
16834         __va_copy(dst, src)
16835   ;
16836   return 0;
16837 }
16838 _ACEOF
16839 rm -f conftest.$ac_objext conftest$ac_exeext
16840 if { (eval echo "$as_me:16840: \"$ac_link\"") >&5
16841   (eval $ac_link) 2>&5
16842   ac_status=$?
16843   echo "$as_me:16843: \$? = $ac_status" >&5
16844   (exit $ac_status); } &&
16845          { ac_try='test -s conftest$ac_exeext'
16846   { (eval echo "$as_me:16846: \"$ac_try\"") >&5
16847   (eval $ac_try) 2>&5
16848   ac_status=$?
16849   echo "$as_me:16849: \$? = $ac_status" >&5
16850   (exit $ac_status); }; }; then
16851   cf_cv_have___va_copy=yes
16852 else
16853   echo "$as_me: failed program was:" >&5
16854 cat conftest.$ac_ext >&5
16855 cf_cv_have___va_copy=no
16856 fi
16857 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16858 fi
16859 echo "$as_me:16859: result: $cf_cv_have___va_copy" >&5
16860 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16861
16862 test "$cf_cv_have___va_copy" = yes &&
16863 cat >>confdefs.h <<\EOF
16864 #define HAVE___VA_COPY 1
16865 EOF
16866
16867 echo "$as_me:16867: checking for pid_t" >&5
16868 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16869 if test "${ac_cv_type_pid_t+set}" = set; then
16870   echo $ECHO_N "(cached) $ECHO_C" >&6
16871 else
16872   cat >conftest.$ac_ext <<_ACEOF
16873 #line 16873 "configure"
16874 #include "confdefs.h"
16875 $ac_includes_default
16876 int
16877 main ()
16878 {
16879 if ((pid_t *) 0)
16880   return 0;
16881 if (sizeof (pid_t))
16882   return 0;
16883   ;
16884   return 0;
16885 }
16886 _ACEOF
16887 rm -f conftest.$ac_objext
16888 if { (eval echo "$as_me:16888: \"$ac_compile\"") >&5
16889   (eval $ac_compile) 2>&5
16890   ac_status=$?
16891   echo "$as_me:16891: \$? = $ac_status" >&5
16892   (exit $ac_status); } &&
16893          { ac_try='test -s conftest.$ac_objext'
16894   { (eval echo "$as_me:16894: \"$ac_try\"") >&5
16895   (eval $ac_try) 2>&5
16896   ac_status=$?
16897   echo "$as_me:16897: \$? = $ac_status" >&5
16898   (exit $ac_status); }; }; then
16899   ac_cv_type_pid_t=yes
16900 else
16901   echo "$as_me: failed program was:" >&5
16902 cat conftest.$ac_ext >&5
16903 ac_cv_type_pid_t=no
16904 fi
16905 rm -f conftest.$ac_objext conftest.$ac_ext
16906 fi
16907 echo "$as_me:16907: result: $ac_cv_type_pid_t" >&5
16908 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16909 if test $ac_cv_type_pid_t = yes; then
16910   :
16911 else
16912
16913 cat >>confdefs.h <<EOF
16914 #define pid_t int
16915 EOF
16916
16917 fi
16918
16919 for ac_header in unistd.h vfork.h
16920 do
16921 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16922 echo "$as_me:16922: checking for $ac_header" >&5
16923 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16924 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16925   echo $ECHO_N "(cached) $ECHO_C" >&6
16926 else
16927   cat >conftest.$ac_ext <<_ACEOF
16928 #line 16928 "configure"
16929 #include "confdefs.h"
16930 #include <$ac_header>
16931 _ACEOF
16932 if { (eval echo "$as_me:16932: \"$ac_cpp conftest.$ac_ext\"") >&5
16933   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16934   ac_status=$?
16935   egrep -v '^ *\+' conftest.er1 >conftest.err
16936   rm -f conftest.er1
16937   cat conftest.err >&5
16938   echo "$as_me:16938: \$? = $ac_status" >&5
16939   (exit $ac_status); } >/dev/null; then
16940   if test -s conftest.err; then
16941     ac_cpp_err=$ac_c_preproc_warn_flag
16942   else
16943     ac_cpp_err=
16944   fi
16945 else
16946   ac_cpp_err=yes
16947 fi
16948 if test -z "$ac_cpp_err"; then
16949   eval "$as_ac_Header=yes"
16950 else
16951   echo "$as_me: failed program was:" >&5
16952   cat conftest.$ac_ext >&5
16953   eval "$as_ac_Header=no"
16954 fi
16955 rm -f conftest.err conftest.$ac_ext
16956 fi
16957 echo "$as_me:16957: result: `eval echo '${'$as_ac_Header'}'`" >&5
16958 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16959 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16960   cat >>confdefs.h <<EOF
16961 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16962 EOF
16963
16964 fi
16965 done
16966
16967 for ac_func in fork vfork
16968 do
16969 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16970 echo "$as_me:16970: checking for $ac_func" >&5
16971 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16972 if eval "test \"\${$as_ac_var+set}\" = set"; then
16973   echo $ECHO_N "(cached) $ECHO_C" >&6
16974 else
16975   cat >conftest.$ac_ext <<_ACEOF
16976 #line 16976 "configure"
16977 #include "confdefs.h"
16978 /* System header to define __stub macros and hopefully few prototypes,
16979     which can conflict with char $ac_func (); below.  */
16980 #include <assert.h>
16981 /* Override any gcc2 internal prototype to avoid an error.  */
16982 #ifdef __cplusplus
16983 extern "C"
16984 #endif
16985 /* We use char because int might match the return type of a gcc2
16986    builtin and then its argument prototype would still apply.  */
16987 char $ac_func ();
16988 char (*f) ();
16989
16990 int
16991 main ()
16992 {
16993 /* The GNU C library defines this for functions which it implements
16994     to always fail with ENOSYS.  Some functions are actually named
16995     something starting with __ and the normal name is an alias.  */
16996 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16997 choke me
16998 #else
16999 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17000 #endif
17001
17002   ;
17003   return 0;
17004 }
17005 _ACEOF
17006 rm -f conftest.$ac_objext conftest$ac_exeext
17007 if { (eval echo "$as_me:17007: \"$ac_link\"") >&5
17008   (eval $ac_link) 2>&5
17009   ac_status=$?
17010   echo "$as_me:17010: \$? = $ac_status" >&5
17011   (exit $ac_status); } &&
17012          { ac_try='test -s conftest$ac_exeext'
17013   { (eval echo "$as_me:17013: \"$ac_try\"") >&5
17014   (eval $ac_try) 2>&5
17015   ac_status=$?
17016   echo "$as_me:17016: \$? = $ac_status" >&5
17017   (exit $ac_status); }; }; then
17018   eval "$as_ac_var=yes"
17019 else
17020   echo "$as_me: failed program was:" >&5
17021 cat conftest.$ac_ext >&5
17022 eval "$as_ac_var=no"
17023 fi
17024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17025 fi
17026 echo "$as_me:17026: result: `eval echo '${'$as_ac_var'}'`" >&5
17027 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17028 if test `eval echo '${'$as_ac_var'}'` = yes; then
17029   cat >>confdefs.h <<EOF
17030 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17031 EOF
17032
17033 fi
17034 done
17035
17036 ac_cv_func_fork_works=$ac_cv_func_fork
17037 if test "x$ac_cv_func_fork" = xyes; then
17038   echo "$as_me:17038: checking for working fork" >&5
17039 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17040 if test "${ac_cv_func_fork_works+set}" = set; then
17041   echo $ECHO_N "(cached) $ECHO_C" >&6
17042 else
17043   if test "$cross_compiling" = yes; then
17044   ac_cv_func_fork_works=cross
17045 else
17046   cat >conftest.$ac_ext <<_ACEOF
17047 /* By Rüdiger Kuhlmann. */
17048       #include <sys/types.h>
17049       #if HAVE_UNISTD_H
17050       # include <unistd.h>
17051       #endif
17052       /* Some systems only have a dummy stub for fork() */
17053       int main ()
17054       {
17055         if (fork() < 0)
17056           $ac_main_return (1);
17057         $ac_main_return (0);
17058       }
17059 _ACEOF
17060 rm -f conftest$ac_exeext
17061 if { (eval echo "$as_me:17061: \"$ac_link\"") >&5
17062   (eval $ac_link) 2>&5
17063   ac_status=$?
17064   echo "$as_me:17064: \$? = $ac_status" >&5
17065   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17066   { (eval echo "$as_me:17066: \"$ac_try\"") >&5
17067   (eval $ac_try) 2>&5
17068   ac_status=$?
17069   echo "$as_me:17069: \$? = $ac_status" >&5
17070   (exit $ac_status); }; }; then
17071   ac_cv_func_fork_works=yes
17072 else
17073   echo "$as_me: program exited with status $ac_status" >&5
17074 echo "$as_me: failed program was:" >&5
17075 cat conftest.$ac_ext >&5
17076 ac_cv_func_fork_works=no
17077 fi
17078 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17079 fi
17080 fi
17081 echo "$as_me:17081: result: $ac_cv_func_fork_works" >&5
17082 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17083
17084 fi
17085 if test "x$ac_cv_func_fork_works" = xcross; then
17086   case $host in
17087     *-*-amigaos* | *-*-msdosdjgpp*)
17088       # Override, as these systems have only a dummy fork() stub
17089       ac_cv_func_fork_works=no
17090       ;;
17091     *)
17092       ac_cv_func_fork_works=yes
17093       ;;
17094   esac
17095   { echo "$as_me:17095: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17096 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17097 fi
17098 ac_cv_func_vfork_works=$ac_cv_func_vfork
17099 if test "x$ac_cv_func_vfork" = xyes; then
17100   echo "$as_me:17100: checking for working vfork" >&5
17101 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17102 if test "${ac_cv_func_vfork_works+set}" = set; then
17103   echo $ECHO_N "(cached) $ECHO_C" >&6
17104 else
17105   if test "$cross_compiling" = yes; then
17106   ac_cv_func_vfork_works=cross
17107 else
17108   cat >conftest.$ac_ext <<_ACEOF
17109 #line 17109 "configure"
17110 #include "confdefs.h"
17111 /* Thanks to Paul Eggert for this test.  */
17112 #include <stdio.h>
17113 #include <sys/types.h>
17114 #include <sys/stat.h>
17115 #if HAVE_UNISTD_H
17116 # include <unistd.h>
17117 #endif
17118 #if HAVE_VFORK_H
17119 # include <vfork.h>
17120 #endif
17121 /* On some sparc systems, changes by the child to local and incoming
17122    argument registers are propagated back to the parent.  The compiler
17123    is told about this with #include <vfork.h>, but some compilers
17124    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17125    static variable whose address is put into a register that is
17126    clobbered by the vfork.  */
17127 static
17128 #ifdef __cplusplus
17129 sparc_address_test (int arg)
17130 # else
17131 sparc_address_test (arg) int arg;
17132 #endif
17133 {
17134   static pid_t child;
17135   if (!child) {
17136     child = vfork ();
17137     if (child < 0) {
17138       perror ("vfork");
17139       _exit(2);
17140     }
17141     if (!child) {
17142       arg = getpid();
17143       write(-1, "", 0);
17144       _exit (arg);
17145     }
17146   }
17147 }
17148
17149 int
17150 main ()
17151 {
17152   pid_t parent = getpid ();
17153   pid_t child;
17154
17155   sparc_address_test ();
17156
17157   child = vfork ();
17158
17159   if (child == 0) {
17160     /* Here is another test for sparc vfork register problems.  This
17161        test uses lots of local variables, at least as many local
17162        variables as main has allocated so far including compiler
17163        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17164        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17165        reuse the register of parent for one of the local variables,
17166        since it will think that parent can't possibly be used any more
17167        in this routine.  Assigning to the local variable will thus
17168        munge parent in the parent process.  */
17169     pid_t
17170       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17171       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17172     /* Convince the compiler that p..p7 are live; otherwise, it might
17173        use the same hardware register for all 8 local variables.  */
17174     if (p != p1 || p != p2 || p != p3 || p != p4
17175         || p != p5 || p != p6 || p != p7)
17176       _exit(1);
17177
17178     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17179        from child file descriptors.  If the child closes a descriptor
17180        before it execs or exits, this munges the parent's descriptor
17181        as well.  Test for this by closing stdout in the child.  */
17182     _exit(close(fileno(stdout)) != 0);
17183   } else {
17184     int status;
17185     struct stat st;
17186
17187     while (wait(&status) != child)
17188       ;
17189     $ac_main_return(
17190          /* Was there some problem with vforking?  */
17191          child < 0
17192
17193          /* Did the child fail?  (This shouldn't happen.)  */
17194          || status
17195
17196          /* Did the vfork/compiler bug occur?  */
17197          || parent != getpid()
17198
17199          /* Did the file descriptor bug occur?  */
17200          || fstat(fileno(stdout), &st) != 0
17201          );
17202   }
17203 }
17204 _ACEOF
17205 rm -f conftest$ac_exeext
17206 if { (eval echo "$as_me:17206: \"$ac_link\"") >&5
17207   (eval $ac_link) 2>&5
17208   ac_status=$?
17209   echo "$as_me:17209: \$? = $ac_status" >&5
17210   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17211   { (eval echo "$as_me:17211: \"$ac_try\"") >&5
17212   (eval $ac_try) 2>&5
17213   ac_status=$?
17214   echo "$as_me:17214: \$? = $ac_status" >&5
17215   (exit $ac_status); }; }; then
17216   ac_cv_func_vfork_works=yes
17217 else
17218   echo "$as_me: program exited with status $ac_status" >&5
17219 echo "$as_me: failed program was:" >&5
17220 cat conftest.$ac_ext >&5
17221 ac_cv_func_vfork_works=no
17222 fi
17223 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17224 fi
17225 fi
17226 echo "$as_me:17226: result: $ac_cv_func_vfork_works" >&5
17227 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17228
17229 fi;
17230 if test "x$ac_cv_func_fork_works" = xcross; then
17231   ac_cv_func_vfork_works=ac_cv_func_vfork
17232   { echo "$as_me:17232: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17233 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17234 fi
17235
17236 if test "x$ac_cv_func_vfork_works" = xyes; then
17237
17238 cat >>confdefs.h <<\EOF
17239 #define HAVE_WORKING_VFORK 1
17240 EOF
17241
17242 else
17243
17244 cat >>confdefs.h <<\EOF
17245 #define vfork fork
17246 EOF
17247
17248 fi
17249 if test "x$ac_cv_func_fork_works" = xyes; then
17250
17251 cat >>confdefs.h <<\EOF
17252 #define HAVE_WORKING_FORK 1
17253 EOF
17254
17255 fi
17256
17257 # special check for test/ditto.c
17258
17259 echo "$as_me:17259: checking for openpty in -lutil" >&5
17260 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17261 if test "${ac_cv_lib_util_openpty+set}" = set; then
17262   echo $ECHO_N "(cached) $ECHO_C" >&6
17263 else
17264   ac_check_lib_save_LIBS=$LIBS
17265 LIBS="-lutil  $LIBS"
17266 cat >conftest.$ac_ext <<_ACEOF
17267 #line 17267 "configure"
17268 #include "confdefs.h"
17269
17270 /* Override any gcc2 internal prototype to avoid an error.  */
17271 #ifdef __cplusplus
17272 extern "C"
17273 #endif
17274 /* We use char because int might match the return type of a gcc2
17275    builtin and then its argument prototype would still apply.  */
17276 char openpty ();
17277 int
17278 main ()
17279 {
17280 openpty ();
17281   ;
17282   return 0;
17283 }
17284 _ACEOF
17285 rm -f conftest.$ac_objext conftest$ac_exeext
17286 if { (eval echo "$as_me:17286: \"$ac_link\"") >&5
17287   (eval $ac_link) 2>&5
17288   ac_status=$?
17289   echo "$as_me:17289: \$? = $ac_status" >&5
17290   (exit $ac_status); } &&
17291          { ac_try='test -s conftest$ac_exeext'
17292   { (eval echo "$as_me:17292: \"$ac_try\"") >&5
17293   (eval $ac_try) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit $ac_status); }; }; then
17297   ac_cv_lib_util_openpty=yes
17298 else
17299   echo "$as_me: failed program was:" >&5
17300 cat conftest.$ac_ext >&5
17301 ac_cv_lib_util_openpty=no
17302 fi
17303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17304 LIBS=$ac_check_lib_save_LIBS
17305 fi
17306 echo "$as_me:17306: result: $ac_cv_lib_util_openpty" >&5
17307 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17308 if test $ac_cv_lib_util_openpty = yes; then
17309   cf_cv_lib_util=yes
17310 else
17311   cf_cv_lib_util=no
17312 fi
17313
17314 echo "$as_me:17314: checking for openpty header" >&5
17315 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17316 if test "${cf_cv_func_openpty+set}" = set; then
17317   echo $ECHO_N "(cached) $ECHO_C" >&6
17318 else
17319
17320     cf_save_LIBS="$LIBS"
17321     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17322     for cf_header in pty.h libutil.h util.h
17323     do
17324     cat >conftest.$ac_ext <<_ACEOF
17325 #line 17325 "configure"
17326 #include "confdefs.h"
17327
17328 #include <$cf_header>
17329
17330 int
17331 main ()
17332 {
17333
17334     int x = openpty((int *)0, (int *)0, (char *)0,
17335                    (struct termios *)0, (struct winsize *)0);
17336
17337   ;
17338   return 0;
17339 }
17340 _ACEOF
17341 rm -f conftest.$ac_objext conftest$ac_exeext
17342 if { (eval echo "$as_me:17342: \"$ac_link\"") >&5
17343   (eval $ac_link) 2>&5
17344   ac_status=$?
17345   echo "$as_me:17345: \$? = $ac_status" >&5
17346   (exit $ac_status); } &&
17347          { ac_try='test -s conftest$ac_exeext'
17348   { (eval echo "$as_me:17348: \"$ac_try\"") >&5
17349   (eval $ac_try) 2>&5
17350   ac_status=$?
17351   echo "$as_me:17351: \$? = $ac_status" >&5
17352   (exit $ac_status); }; }; then
17353
17354         cf_cv_func_openpty=$cf_header
17355         break
17356
17357 else
17358   echo "$as_me: failed program was:" >&5
17359 cat conftest.$ac_ext >&5
17360
17361         cf_cv_func_openpty=no
17362
17363 fi
17364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17365     done
17366     LIBS="$cf_save_LIBS"
17367
17368 fi
17369 echo "$as_me:17369: result: $cf_cv_func_openpty" >&5
17370 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17371
17372 if test "$cf_cv_func_openpty" != no ; then
17373
17374 cat >>confdefs.h <<EOF
17375 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17376 EOF
17377
17378 cat >>confdefs.h <<\EOF
17379 #define USE_XTERM_PTY 1
17380 EOF
17381
17382     if test "x$cf_cv_lib_util" = xyes ; then
17383         TEST_LIBS="-lutil $TEST_LIBS"
17384     fi
17385 fi
17386
17387 if test "$with_hashed_db" != no ; then
17388
17389 cat >>confdefs.h <<\EOF
17390 #define USE_HASHED_DB 1
17391 EOF
17392
17393 case $with_hashed_db in #(vi
17394 yes|*able*) #(vi
17395     ;;
17396 *)
17397     if test -d "$with_hashed_db" ; then
17398
17399 if test -n "$with_hashed_db/include" ; then
17400   for cf_add_incdir in $with_hashed_db/include
17401   do
17402         while test $cf_add_incdir != /usr/include
17403         do
17404           if test -d $cf_add_incdir
17405           then
17406                 cf_have_incdir=no
17407                 if test -n "$CFLAGS$CPPFLAGS" ; then
17408                   # a loop is needed to ensure we can add subdirs of existing dirs
17409                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17410                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17411                           cf_have_incdir=yes; break
17412                         fi
17413                   done
17414                 fi
17415
17416                 if test "$cf_have_incdir" = no ; then
17417                   if test "$cf_add_incdir" = /usr/local/include ; then
17418                         if test "$GCC" = yes
17419                         then
17420                           cf_save_CPPFLAGS=$CPPFLAGS
17421                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17422                           cat >conftest.$ac_ext <<_ACEOF
17423 #line 17423 "configure"
17424 #include "confdefs.h"
17425 #include <stdio.h>
17426 int
17427 main ()
17428 {
17429 printf("Hello")
17430   ;
17431   return 0;
17432 }
17433 _ACEOF
17434 rm -f conftest.$ac_objext
17435 if { (eval echo "$as_me:17435: \"$ac_compile\"") >&5
17436   (eval $ac_compile) 2>&5
17437   ac_status=$?
17438   echo "$as_me:17438: \$? = $ac_status" >&5
17439   (exit $ac_status); } &&
17440          { ac_try='test -s conftest.$ac_objext'
17441   { (eval echo "$as_me:17441: \"$ac_try\"") >&5
17442   (eval $ac_try) 2>&5
17443   ac_status=$?
17444   echo "$as_me:17444: \$? = $ac_status" >&5
17445   (exit $ac_status); }; }; then
17446   :
17447 else
17448   echo "$as_me: failed program was:" >&5
17449 cat conftest.$ac_ext >&5
17450 cf_have_incdir=yes
17451 fi
17452 rm -f conftest.$ac_objext conftest.$ac_ext
17453                           CPPFLAGS=$cf_save_CPPFLAGS
17454                         fi
17455                   fi
17456                 fi
17457
17458                 if test "$cf_have_incdir" = no ; then
17459                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17460
17461 echo "${as_me:-configure}:17461: testing adding $cf_add_incdir to include-path ..." 1>&5
17462
17463                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17464
17465                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17466                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17467                   cf_add_incdir="$cf_top_incdir"
17468                 else
17469                   break
17470                 fi
17471           fi
17472         done
17473   done
17474 fi
17475
17476 if test -n "$with_hashed_db/lib" ; then
17477   for cf_add_libdir in $with_hashed_db/lib
17478   do
17479     if test $cf_add_libdir = /usr/lib ; then
17480       :
17481     elif test -d $cf_add_libdir
17482     then
17483       cf_have_libdir=no
17484       if test -n "$LDFLAGS$LIBS" ; then
17485         # a loop is needed to ensure we can add subdirs of existing dirs
17486         for cf_test_libdir in $LDFLAGS $LIBS ; do
17487           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17488             cf_have_libdir=yes; break
17489           fi
17490         done
17491       fi
17492       if test "$cf_have_libdir" = no ; then
17493         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17494
17495 echo "${as_me:-configure}:17495: testing adding $cf_add_libdir to library-path ..." 1>&5
17496
17497         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17498       fi
17499     fi
17500   done
17501 fi
17502
17503     fi
17504 esac
17505
17506 echo "$as_me:17506: checking for db.h" >&5
17507 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17508 if test "${ac_cv_header_db_h+set}" = set; then
17509   echo $ECHO_N "(cached) $ECHO_C" >&6
17510 else
17511   cat >conftest.$ac_ext <<_ACEOF
17512 #line 17512 "configure"
17513 #include "confdefs.h"
17514 #include <db.h>
17515 _ACEOF
17516 if { (eval echo "$as_me:17516: \"$ac_cpp conftest.$ac_ext\"") >&5
17517   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17518   ac_status=$?
17519   egrep -v '^ *\+' conftest.er1 >conftest.err
17520   rm -f conftest.er1
17521   cat conftest.err >&5
17522   echo "$as_me:17522: \$? = $ac_status" >&5
17523   (exit $ac_status); } >/dev/null; then
17524   if test -s conftest.err; then
17525     ac_cpp_err=$ac_c_preproc_warn_flag
17526   else
17527     ac_cpp_err=
17528   fi
17529 else
17530   ac_cpp_err=yes
17531 fi
17532 if test -z "$ac_cpp_err"; then
17533   ac_cv_header_db_h=yes
17534 else
17535   echo "$as_me: failed program was:" >&5
17536   cat conftest.$ac_ext >&5
17537   ac_cv_header_db_h=no
17538 fi
17539 rm -f conftest.err conftest.$ac_ext
17540 fi
17541 echo "$as_me:17541: result: $ac_cv_header_db_h" >&5
17542 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17543 if test $ac_cv_header_db_h = yes; then
17544
17545 echo "$as_me:17545: checking for version of db" >&5
17546 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17547 if test "${cf_cv_hashed_db_version+set}" = set; then
17548   echo $ECHO_N "(cached) $ECHO_C" >&6
17549 else
17550
17551 cf_cv_hashed_db_version=unknown
17552
17553 for cf_db_version in 1 2 3 4 5
17554 do
17555
17556 echo "${as_me:-configure}:17556: testing checking for db version $cf_db_version ..." 1>&5
17557
17558         cat >conftest.$ac_ext <<_ACEOF
17559 #line 17559 "configure"
17560 #include "confdefs.h"
17561
17562 $ac_includes_default
17563 #include <db.h>
17564
17565 #ifdef DB_VERSION_MAJOR
17566         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17567 #if $cf_db_version == DB_VERSION_MAJOR
17568         /* ok */
17569 #else
17570         make an error
17571 #endif
17572 #else
17573 #if $cf_db_version == 1
17574         /* ok: assuming this is DB 1.8.5 */
17575 #else
17576         make an error
17577 #endif
17578 #endif
17579
17580 int
17581 main ()
17582 {
17583 DBT *foo = 0
17584   ;
17585   return 0;
17586 }
17587 _ACEOF
17588 rm -f conftest.$ac_objext
17589 if { (eval echo "$as_me:17589: \"$ac_compile\"") >&5
17590   (eval $ac_compile) 2>&5
17591   ac_status=$?
17592   echo "$as_me:17592: \$? = $ac_status" >&5
17593   (exit $ac_status); } &&
17594          { ac_try='test -s conftest.$ac_objext'
17595   { (eval echo "$as_me:17595: \"$ac_try\"") >&5
17596   (eval $ac_try) 2>&5
17597   ac_status=$?
17598   echo "$as_me:17598: \$? = $ac_status" >&5
17599   (exit $ac_status); }; }; then
17600
17601         cf_cv_hashed_db_version=$cf_db_version
17602         break
17603
17604 else
17605   echo "$as_me: failed program was:" >&5
17606 cat conftest.$ac_ext >&5
17607 fi
17608 rm -f conftest.$ac_objext conftest.$ac_ext
17609 done
17610
17611 fi
17612 echo "$as_me:17612: result: $cf_cv_hashed_db_version" >&5
17613 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17614
17615 if test "$cf_cv_hashed_db_version" = unknown ; then
17616         { { echo "$as_me:17616: error: Cannot determine version of db" >&5
17617 echo "$as_me: error: Cannot determine version of db" >&2;}
17618    { (exit 1); exit 1; }; }
17619 else
17620
17621 echo "$as_me:17621: checking for db libraries" >&5
17622 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17623 if test "${cf_cv_hashed_db_libs+set}" = set; then
17624   echo $ECHO_N "(cached) $ECHO_C" >&6
17625 else
17626
17627 cf_cv_hashed_db_libs=unknown
17628 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17629 do
17630         cf_save_libs="$LIBS"
17631         if test -n "$cf_db_libs"; then
17632                 LIBS="-l$cf_db_libs $LIBS"
17633         fi
17634
17635 echo "${as_me:-configure}:17635: testing checking for library "$cf_db_libs" ..." 1>&5
17636
17637         cat >conftest.$ac_ext <<_ACEOF
17638 #line 17638 "configure"
17639 #include "confdefs.h"
17640
17641 $ac_includes_default
17642 #include <db.h>
17643
17644 int
17645 main ()
17646 {
17647
17648         char *path = "/tmp/foo";
17649 #ifdef DB_VERSION_MAJOR
17650 #if DB_VERSION_MAJOR >= 4
17651         DB *result = 0;
17652         db_create(&result, NULL, 0);
17653         result->open(result,
17654                 NULL,
17655                 path,
17656                 path,
17657                 DB_HASH,
17658                 DB_CREATE,
17659                 0644);
17660 #elif DB_VERSION_MAJOR >= 3
17661         DB *result = 0;
17662         db_create(&result, NULL, 0);
17663         result->open(result,
17664                 path,
17665                 path,
17666                 DB_HASH,
17667                 DB_CREATE,
17668                 0644);
17669 #elif DB_VERSION_MAJOR >= 2
17670         DB *result = 0;
17671         db_open(path,
17672                 DB_HASH,
17673                 DB_CREATE,
17674                 0644,
17675                 (DB_ENV *) 0,
17676                 (DB_INFO *) 0,
17677                 &result);
17678 #endif /* DB_VERSION_MAJOR */
17679 #else
17680         DB *result = dbopen(path,
17681                      2,
17682                      0644,
17683                      DB_HASH,
17684                      0);
17685 #endif
17686         ${cf_cv_main_return:-return}(result != 0)
17687
17688   ;
17689   return 0;
17690 }
17691 _ACEOF
17692 rm -f conftest.$ac_objext conftest$ac_exeext
17693 if { (eval echo "$as_me:17693: \"$ac_link\"") >&5
17694   (eval $ac_link) 2>&5
17695   ac_status=$?
17696   echo "$as_me:17696: \$? = $ac_status" >&5
17697   (exit $ac_status); } &&
17698          { ac_try='test -s conftest$ac_exeext'
17699   { (eval echo "$as_me:17699: \"$ac_try\"") >&5
17700   (eval $ac_try) 2>&5
17701   ac_status=$?
17702   echo "$as_me:17702: \$? = $ac_status" >&5
17703   (exit $ac_status); }; }; then
17704
17705         if test -n "$cf_db_libs" ; then
17706                 cf_cv_hashed_db_libs=$cf_db_libs
17707         else
17708                 cf_cv_hashed_db_libs=default
17709         fi
17710         LIBS="$cf_save_libs"
17711         break
17712
17713 else
17714   echo "$as_me: failed program was:" >&5
17715 cat conftest.$ac_ext >&5
17716 fi
17717 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17718         LIBS="$cf_save_libs"
17719 done
17720
17721 fi
17722 echo "$as_me:17722: result: $cf_cv_hashed_db_libs" >&5
17723 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17724
17725         if test "$cf_cv_hashed_db_libs" = unknown ; then
17726                 { { echo "$as_me:17726: error: Cannot determine library for db" >&5
17727 echo "$as_me: error: Cannot determine library for db" >&2;}
17728    { (exit 1); exit 1; }; }
17729         elif test "$cf_cv_hashed_db_libs" != default ; then
17730                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17731         fi
17732 fi
17733
17734 else
17735
17736         { { echo "$as_me:17736: error: Cannot find db.h" >&5
17737 echo "$as_me: error: Cannot find db.h" >&2;}
17738    { (exit 1); exit 1; }; }
17739
17740 fi
17741
17742 fi
17743
17744 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17745         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17746         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17747 fi
17748
17749 # Just in case, check if the C compiler has a bool type.
17750
17751 echo "$as_me:17751: checking if we should include stdbool.h" >&5
17752 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17753
17754 if test "${cf_cv_header_stdbool_h+set}" = set; then
17755   echo $ECHO_N "(cached) $ECHO_C" >&6
17756 else
17757
17758         cat >conftest.$ac_ext <<_ACEOF
17759 #line 17759 "configure"
17760 #include "confdefs.h"
17761
17762 int
17763 main ()
17764 {
17765 bool foo = false
17766   ;
17767   return 0;
17768 }
17769 _ACEOF
17770 rm -f conftest.$ac_objext
17771 if { (eval echo "$as_me:17771: \"$ac_compile\"") >&5
17772   (eval $ac_compile) 2>&5
17773   ac_status=$?
17774   echo "$as_me:17774: \$? = $ac_status" >&5
17775   (exit $ac_status); } &&
17776          { ac_try='test -s conftest.$ac_objext'
17777   { (eval echo "$as_me:17777: \"$ac_try\"") >&5
17778   (eval $ac_try) 2>&5
17779   ac_status=$?
17780   echo "$as_me:17780: \$? = $ac_status" >&5
17781   (exit $ac_status); }; }; then
17782   cf_cv_header_stdbool_h=0
17783 else
17784   echo "$as_me: failed program was:" >&5
17785 cat conftest.$ac_ext >&5
17786 cat >conftest.$ac_ext <<_ACEOF
17787 #line 17787 "configure"
17788 #include "confdefs.h"
17789
17790 #ifndef __BEOS__
17791 #include <stdbool.h>
17792 #endif
17793
17794 int
17795 main ()
17796 {
17797 bool foo = false
17798   ;
17799   return 0;
17800 }
17801 _ACEOF
17802 rm -f conftest.$ac_objext
17803 if { (eval echo "$as_me:17803: \"$ac_compile\"") >&5
17804   (eval $ac_compile) 2>&5
17805   ac_status=$?
17806   echo "$as_me:17806: \$? = $ac_status" >&5
17807   (exit $ac_status); } &&
17808          { ac_try='test -s conftest.$ac_objext'
17809   { (eval echo "$as_me:17809: \"$ac_try\"") >&5
17810   (eval $ac_try) 2>&5
17811   ac_status=$?
17812   echo "$as_me:17812: \$? = $ac_status" >&5
17813   (exit $ac_status); }; }; then
17814   cf_cv_header_stdbool_h=1
17815 else
17816   echo "$as_me: failed program was:" >&5
17817 cat conftest.$ac_ext >&5
17818 cf_cv_header_stdbool_h=0
17819 fi
17820 rm -f conftest.$ac_objext conftest.$ac_ext
17821 fi
17822 rm -f conftest.$ac_objext conftest.$ac_ext
17823 fi
17824
17825 if test "$cf_cv_header_stdbool_h" = 1
17826 then    echo "$as_me:17826: result: yes" >&5
17827 echo "${ECHO_T}yes" >&6
17828 else    echo "$as_me:17828: result: no" >&5
17829 echo "${ECHO_T}no" >&6
17830 fi
17831
17832 echo "$as_me:17832: checking for builtin bool type" >&5
17833 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17834
17835 if test "${cf_cv_cc_bool_type+set}" = set; then
17836   echo $ECHO_N "(cached) $ECHO_C" >&6
17837 else
17838
17839         cat >conftest.$ac_ext <<_ACEOF
17840 #line 17840 "configure"
17841 #include "confdefs.h"
17842
17843 #include <stdio.h>
17844 #include <sys/types.h>
17845
17846 int
17847 main ()
17848 {
17849 bool x = false
17850   ;
17851   return 0;
17852 }
17853 _ACEOF
17854 rm -f conftest.$ac_objext
17855 if { (eval echo "$as_me:17855: \"$ac_compile\"") >&5
17856   (eval $ac_compile) 2>&5
17857   ac_status=$?
17858   echo "$as_me:17858: \$? = $ac_status" >&5
17859   (exit $ac_status); } &&
17860          { ac_try='test -s conftest.$ac_objext'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); }; }; then
17866   cf_cv_cc_bool_type=1
17867 else
17868   echo "$as_me: failed program was:" >&5
17869 cat conftest.$ac_ext >&5
17870 cf_cv_cc_bool_type=0
17871 fi
17872 rm -f conftest.$ac_objext conftest.$ac_ext
17873
17874 fi
17875
17876 if test "$cf_cv_cc_bool_type" = 1
17877 then    echo "$as_me:17877: result: yes" >&5
17878 echo "${ECHO_T}yes" >&6
17879 else    echo "$as_me:17879: result: no" >&5
17880 echo "${ECHO_T}no" >&6
17881 fi
17882
17883 # Check for C++ compiler characteristics (and ensure that it's there!)
17884 if test -n "$CXX" ; then
17885         ac_ext=cc
17886 ac_cpp='$CXXCPP $CPPFLAGS'
17887 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17888 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17889 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17890 ac_main_return=return
17891
17892 if test -n "$GXX" ; then
17893 case $cf_cv_system_name in #(vi
17894 os2*) #(vi
17895         cf_stdcpp_libname=stdcpp
17896         ;;
17897 *)
17898         cf_stdcpp_libname=stdc++
17899         ;;
17900 esac
17901 echo "$as_me:17901: checking for library $cf_stdcpp_libname" >&5
17902 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17903 if test "${cf_cv_libstdcpp+set}" = set; then
17904   echo $ECHO_N "(cached) $ECHO_C" >&6
17905 else
17906
17907         cf_save="$LIBS"
17908         LIBS="-l$cf_stdcpp_libname $LIBS"
17909 cat >conftest.$ac_ext <<_ACEOF
17910 #line 17910 "configure"
17911 #include "confdefs.h"
17912
17913 #include <strstream.h>
17914 int
17915 main ()
17916 {
17917
17918 char buf[80];
17919 strstreambuf foo(buf, sizeof(buf))
17920
17921   ;
17922   return 0;
17923 }
17924 _ACEOF
17925 rm -f conftest.$ac_objext conftest$ac_exeext
17926 if { (eval echo "$as_me:17926: \"$ac_link\"") >&5
17927   (eval $ac_link) 2>&5
17928   ac_status=$?
17929   echo "$as_me:17929: \$? = $ac_status" >&5
17930   (exit $ac_status); } &&
17931          { ac_try='test -s conftest$ac_exeext'
17932   { (eval echo "$as_me:17932: \"$ac_try\"") >&5
17933   (eval $ac_try) 2>&5
17934   ac_status=$?
17935   echo "$as_me:17935: \$? = $ac_status" >&5
17936   (exit $ac_status); }; }; then
17937   cf_cv_libstdcpp=yes
17938 else
17939   echo "$as_me: failed program was:" >&5
17940 cat conftest.$ac_ext >&5
17941 cf_cv_libstdcpp=no
17942 fi
17943 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17944         LIBS="$cf_save"
17945
17946 fi
17947 echo "$as_me:17947: result: $cf_cv_libstdcpp" >&5
17948 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17949 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17950 fi
17951
17952         echo "$as_me:17952: checking whether $CXX understands -c and -o together" >&5
17953 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17954 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17955   echo $ECHO_N "(cached) $ECHO_C" >&6
17956 else
17957
17958 cat > conftest.$ac_ext <<CF_EOF
17959 #include <stdio.h>
17960 int main()
17961 {
17962         ${cf_cv_main_return:-return}(0);
17963 }
17964 CF_EOF
17965 # We do the test twice because some compilers refuse to overwrite an
17966 # existing .o file with -o, though they will create one.
17967 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17968 if { (eval echo "$as_me:17968: \"$ac_try\"") >&5
17969   (eval $ac_try) 2>&5
17970   ac_status=$?
17971   echo "$as_me:17971: \$? = $ac_status" >&5
17972   (exit $ac_status); } &&
17973   test -f conftest2.$ac_objext && { (eval echo "$as_me:17973: \"$ac_try\"") >&5
17974   (eval $ac_try) 2>&5
17975   ac_status=$?
17976   echo "$as_me:17976: \$? = $ac_status" >&5
17977   (exit $ac_status); };
17978 then
17979   eval cf_cv_prog_CXX_c_o=yes
17980 else
17981   eval cf_cv_prog_CXX_c_o=no
17982 fi
17983 rm -rf conftest*
17984
17985 fi
17986 if test $cf_cv_prog_CXX_c_o = yes; then
17987   echo "$as_me:17987: result: yes" >&5
17988 echo "${ECHO_T}yes" >&6
17989 else
17990   echo "$as_me:17990: result: no" >&5
17991 echo "${ECHO_T}no" >&6
17992 fi
17993
17994         case $GXX_VERSION in
17995         1*|2.0-6*)
17996                 cf_cxx_library=yes
17997                 ;;
17998         *-2.7*|2.7*)
17999
18000 cf_cxx_library=unknown
18001 case $cf_cv_system_name in #(vi
18002 os2*) #(vi
18003         cf_gpp_libname=gpp
18004         ;;
18005 *)
18006         cf_gpp_libname=g++
18007         ;;
18008 esac
18009 if test "$GXX" = yes; then
18010         echo "$as_me:18010: checking for lib$cf_gpp_libname" >&5
18011 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18012         cf_save="$LIBS"
18013         LIBS="-l$cf_gpp_libname $LIBS"
18014         cat >conftest.$ac_ext <<_ACEOF
18015 #line 18015 "configure"
18016 #include "confdefs.h"
18017
18018 #include <$cf_gpp_libname/builtin.h>
18019
18020 int
18021 main ()
18022 {
18023 two_arg_error_handler_t foo2 = lib_error_handler
18024   ;
18025   return 0;
18026 }
18027 _ACEOF
18028 rm -f conftest.$ac_objext conftest$ac_exeext
18029 if { (eval echo "$as_me:18029: \"$ac_link\"") >&5
18030   (eval $ac_link) 2>&5
18031   ac_status=$?
18032   echo "$as_me:18032: \$? = $ac_status" >&5
18033   (exit $ac_status); } &&
18034          { ac_try='test -s conftest$ac_exeext'
18035   { (eval echo "$as_me:18035: \"$ac_try\"") >&5
18036   (eval $ac_try) 2>&5
18037   ac_status=$?
18038   echo "$as_me:18038: \$? = $ac_status" >&5
18039   (exit $ac_status); }; }; then
18040   cf_cxx_library=yes
18041          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
18042          if test "$cf_gpp_libname" = cpp ; then
18043
18044 cat >>confdefs.h <<\EOF
18045 #define HAVE_GPP_BUILTIN_H 1
18046 EOF
18047
18048          else
18049
18050 cat >>confdefs.h <<\EOF
18051 #define HAVE_GXX_BUILTIN_H 1
18052 EOF
18053
18054          fi
18055 else
18056   echo "$as_me: failed program was:" >&5
18057 cat conftest.$ac_ext >&5
18058 cat >conftest.$ac_ext <<_ACEOF
18059 #line 18059 "configure"
18060 #include "confdefs.h"
18061
18062 #include <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
18087 cat >>confdefs.h <<\EOF
18088 #define HAVE_BUILTIN_H 1
18089 EOF
18090
18091 else
18092   echo "$as_me: failed program was:" >&5
18093 cat conftest.$ac_ext >&5
18094 cf_cxx_library=no
18095 fi
18096 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18097 fi
18098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18099         LIBS="$cf_save"
18100         echo "$as_me:18100: result: $cf_cxx_library" >&5
18101 echo "${ECHO_T}$cf_cxx_library" >&6
18102 fi
18103
18104                 ;;
18105         *)
18106                 cf_cxx_library=no
18107                 ;;
18108         esac
18109
18110         ac_ext=cc
18111 ac_cpp='$CXXCPP $CPPFLAGS'
18112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18113 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18115 ac_main_return=return
18116 echo "$as_me:18116: checking how to run the C++ preprocessor" >&5
18117 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
18118 if test -z "$CXXCPP"; then
18119   if test "${ac_cv_prog_CXXCPP+set}" = set; then
18120   echo $ECHO_N "(cached) $ECHO_C" >&6
18121 else
18122       # Double quotes because CXXCPP needs to be expanded
18123     for CXXCPP in "$CXX -E" "/lib/cpp"
18124     do
18125       ac_preproc_ok=false
18126 for ac_cxx_preproc_warn_flag in '' yes
18127 do
18128   # Use a header file that comes with gcc, so configuring glibc
18129   # with a fresh cross-compiler works.
18130   # On the NeXT, cc -E runs the code through the compiler's parser,
18131   # not just through cpp. "Syntax error" is here to catch this case.
18132   cat >conftest.$ac_ext <<_ACEOF
18133 #line 18133 "configure"
18134 #include "confdefs.h"
18135 #include <assert.h>
18136                      Syntax error
18137 _ACEOF
18138 if { (eval echo "$as_me:18138: \"$ac_cpp conftest.$ac_ext\"") >&5
18139   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18140   ac_status=$?
18141   egrep -v '^ *\+' conftest.er1 >conftest.err
18142   rm -f conftest.er1
18143   cat conftest.err >&5
18144   echo "$as_me:18144: \$? = $ac_status" >&5
18145   (exit $ac_status); } >/dev/null; then
18146   if test -s conftest.err; then
18147     ac_cpp_err=$ac_cxx_preproc_warn_flag
18148   else
18149     ac_cpp_err=
18150   fi
18151 else
18152   ac_cpp_err=yes
18153 fi
18154 if test -z "$ac_cpp_err"; then
18155   :
18156 else
18157   echo "$as_me: failed program was:" >&5
18158   cat conftest.$ac_ext >&5
18159   # Broken: fails on valid input.
18160 continue
18161 fi
18162 rm -f conftest.err conftest.$ac_ext
18163
18164   # OK, works on sane cases.  Now check whether non-existent headers
18165   # can be detected and how.
18166   cat >conftest.$ac_ext <<_ACEOF
18167 #line 18167 "configure"
18168 #include "confdefs.h"
18169 #include <ac_nonexistent.h>
18170 _ACEOF
18171 if { (eval echo "$as_me:18171: \"$ac_cpp conftest.$ac_ext\"") >&5
18172   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18173   ac_status=$?
18174   egrep -v '^ *\+' conftest.er1 >conftest.err
18175   rm -f conftest.er1
18176   cat conftest.err >&5
18177   echo "$as_me:18177: \$? = $ac_status" >&5
18178   (exit $ac_status); } >/dev/null; then
18179   if test -s conftest.err; then
18180     ac_cpp_err=$ac_cxx_preproc_warn_flag
18181   else
18182     ac_cpp_err=
18183   fi
18184 else
18185   ac_cpp_err=yes
18186 fi
18187 if test -z "$ac_cpp_err"; then
18188   # Broken: success on invalid input.
18189 continue
18190 else
18191   echo "$as_me: failed program was:" >&5
18192   cat conftest.$ac_ext >&5
18193   # Passes both tests.
18194 ac_preproc_ok=:
18195 break
18196 fi
18197 rm -f conftest.err conftest.$ac_ext
18198
18199 done
18200 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18201 rm -f conftest.err conftest.$ac_ext
18202 if $ac_preproc_ok; then
18203   break
18204 fi
18205
18206     done
18207     ac_cv_prog_CXXCPP=$CXXCPP
18208
18209 fi
18210   CXXCPP=$ac_cv_prog_CXXCPP
18211 else
18212   ac_cv_prog_CXXCPP=$CXXCPP
18213 fi
18214 echo "$as_me:18214: result: $CXXCPP" >&5
18215 echo "${ECHO_T}$CXXCPP" >&6
18216 ac_preproc_ok=false
18217 for ac_cxx_preproc_warn_flag in '' yes
18218 do
18219   # Use a header file that comes with gcc, so configuring glibc
18220   # with a fresh cross-compiler works.
18221   # On the NeXT, cc -E runs the code through the compiler's parser,
18222   # not just through cpp. "Syntax error" is here to catch this case.
18223   cat >conftest.$ac_ext <<_ACEOF
18224 #line 18224 "configure"
18225 #include "confdefs.h"
18226 #include <assert.h>
18227                      Syntax error
18228 _ACEOF
18229 if { (eval echo "$as_me:18229: \"$ac_cpp conftest.$ac_ext\"") >&5
18230   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18231   ac_status=$?
18232   egrep -v '^ *\+' conftest.er1 >conftest.err
18233   rm -f conftest.er1
18234   cat conftest.err >&5
18235   echo "$as_me:18235: \$? = $ac_status" >&5
18236   (exit $ac_status); } >/dev/null; then
18237   if test -s conftest.err; then
18238     ac_cpp_err=$ac_cxx_preproc_warn_flag
18239   else
18240     ac_cpp_err=
18241   fi
18242 else
18243   ac_cpp_err=yes
18244 fi
18245 if test -z "$ac_cpp_err"; then
18246   :
18247 else
18248   echo "$as_me: failed program was:" >&5
18249   cat conftest.$ac_ext >&5
18250   # Broken: fails on valid input.
18251 continue
18252 fi
18253 rm -f conftest.err conftest.$ac_ext
18254
18255   # OK, works on sane cases.  Now check whether non-existent headers
18256   # can be detected and how.
18257   cat >conftest.$ac_ext <<_ACEOF
18258 #line 18258 "configure"
18259 #include "confdefs.h"
18260 #include <ac_nonexistent.h>
18261 _ACEOF
18262 if { (eval echo "$as_me:18262: \"$ac_cpp conftest.$ac_ext\"") >&5
18263   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18264   ac_status=$?
18265   egrep -v '^ *\+' conftest.er1 >conftest.err
18266   rm -f conftest.er1
18267   cat conftest.err >&5
18268   echo "$as_me:18268: \$? = $ac_status" >&5
18269   (exit $ac_status); } >/dev/null; then
18270   if test -s conftest.err; then
18271     ac_cpp_err=$ac_cxx_preproc_warn_flag
18272   else
18273     ac_cpp_err=
18274   fi
18275 else
18276   ac_cpp_err=yes
18277 fi
18278 if test -z "$ac_cpp_err"; then
18279   # Broken: success on invalid input.
18280 continue
18281 else
18282   echo "$as_me: failed program was:" >&5
18283   cat conftest.$ac_ext >&5
18284   # Passes both tests.
18285 ac_preproc_ok=:
18286 break
18287 fi
18288 rm -f conftest.err conftest.$ac_ext
18289
18290 done
18291 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18292 rm -f conftest.err conftest.$ac_ext
18293 if $ac_preproc_ok; then
18294   :
18295 else
18296   { { echo "$as_me:18296: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18297 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18298    { (exit 1); exit 1; }; }
18299 fi
18300
18301 ac_ext=cc
18302 ac_cpp='$CXXCPP $CPPFLAGS'
18303 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18304 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18305 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18306 ac_main_return=return
18307
18308 for ac_header in typeinfo
18309 do
18310 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18311 echo "$as_me:18311: checking for $ac_header" >&5
18312 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18313 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18314   echo $ECHO_N "(cached) $ECHO_C" >&6
18315 else
18316   cat >conftest.$ac_ext <<_ACEOF
18317 #line 18317 "configure"
18318 #include "confdefs.h"
18319 #include <$ac_header>
18320 _ACEOF
18321 if { (eval echo "$as_me:18321: \"$ac_cpp conftest.$ac_ext\"") >&5
18322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18323   ac_status=$?
18324   egrep -v '^ *\+' conftest.er1 >conftest.err
18325   rm -f conftest.er1
18326   cat conftest.err >&5
18327   echo "$as_me:18327: \$? = $ac_status" >&5
18328   (exit $ac_status); } >/dev/null; then
18329   if test -s conftest.err; then
18330     ac_cpp_err=$ac_cxx_preproc_warn_flag
18331   else
18332     ac_cpp_err=
18333   fi
18334 else
18335   ac_cpp_err=yes
18336 fi
18337 if test -z "$ac_cpp_err"; then
18338   eval "$as_ac_Header=yes"
18339 else
18340   echo "$as_me: failed program was:" >&5
18341   cat conftest.$ac_ext >&5
18342   eval "$as_ac_Header=no"
18343 fi
18344 rm -f conftest.err conftest.$ac_ext
18345 fi
18346 echo "$as_me:18346: result: `eval echo '${'$as_ac_Header'}'`" >&5
18347 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18348 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18349   cat >>confdefs.h <<EOF
18350 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18351 EOF
18352
18353 fi
18354 done
18355
18356 for ac_header in iostream
18357 do
18358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18359 echo "$as_me:18359: checking for $ac_header" >&5
18360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18362   echo $ECHO_N "(cached) $ECHO_C" >&6
18363 else
18364   cat >conftest.$ac_ext <<_ACEOF
18365 #line 18365 "configure"
18366 #include "confdefs.h"
18367 #include <$ac_header>
18368 _ACEOF
18369 if { (eval echo "$as_me:18369: \"$ac_cpp conftest.$ac_ext\"") >&5
18370   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18371   ac_status=$?
18372   egrep -v '^ *\+' conftest.er1 >conftest.err
18373   rm -f conftest.er1
18374   cat conftest.err >&5
18375   echo "$as_me:18375: \$? = $ac_status" >&5
18376   (exit $ac_status); } >/dev/null; then
18377   if test -s conftest.err; then
18378     ac_cpp_err=$ac_cxx_preproc_warn_flag
18379   else
18380     ac_cpp_err=
18381   fi
18382 else
18383   ac_cpp_err=yes
18384 fi
18385 if test -z "$ac_cpp_err"; then
18386   eval "$as_ac_Header=yes"
18387 else
18388   echo "$as_me: failed program was:" >&5
18389   cat conftest.$ac_ext >&5
18390   eval "$as_ac_Header=no"
18391 fi
18392 rm -f conftest.err conftest.$ac_ext
18393 fi
18394 echo "$as_me:18394: result: `eval echo '${'$as_ac_Header'}'`" >&5
18395 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18396 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18397   cat >>confdefs.h <<EOF
18398 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18399 EOF
18400
18401 fi
18402 done
18403
18404 if test x"$ac_cv_header_iostream" = xyes ; then
18405         echo "$as_me:18405: checking if iostream uses std-namespace" >&5
18406 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18407         cat >conftest.$ac_ext <<_ACEOF
18408 #line 18408 "configure"
18409 #include "confdefs.h"
18410
18411 #include <iostream>
18412 using std::endl;
18413 using std::cerr;
18414 int
18415 main ()
18416 {
18417
18418 cerr << "testing" << endl;
18419
18420   ;
18421   return 0;
18422 }
18423 _ACEOF
18424 rm -f conftest.$ac_objext
18425 if { (eval echo "$as_me:18425: \"$ac_compile\"") >&5
18426   (eval $ac_compile) 2>&5
18427   ac_status=$?
18428   echo "$as_me:18428: \$? = $ac_status" >&5
18429   (exit $ac_status); } &&
18430          { ac_try='test -s conftest.$ac_objext'
18431   { (eval echo "$as_me:18431: \"$ac_try\"") >&5
18432   (eval $ac_try) 2>&5
18433   ac_status=$?
18434   echo "$as_me:18434: \$? = $ac_status" >&5
18435   (exit $ac_status); }; }; then
18436   cf_iostream_namespace=yes
18437 else
18438   echo "$as_me: failed program was:" >&5
18439 cat conftest.$ac_ext >&5
18440 cf_iostream_namespace=no
18441 fi
18442 rm -f conftest.$ac_objext conftest.$ac_ext
18443         echo "$as_me:18443: result: $cf_iostream_namespace" >&5
18444 echo "${ECHO_T}$cf_iostream_namespace" >&6
18445         if test "$cf_iostream_namespace" = yes ; then
18446
18447 cat >>confdefs.h <<\EOF
18448 #define IOSTREAM_NAMESPACE 1
18449 EOF
18450
18451         fi
18452 fi
18453
18454 echo "$as_me:18454: checking if we should include stdbool.h" >&5
18455 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18456
18457 if test "${cf_cv_header_stdbool_h+set}" = set; then
18458   echo $ECHO_N "(cached) $ECHO_C" >&6
18459 else
18460
18461         cat >conftest.$ac_ext <<_ACEOF
18462 #line 18462 "configure"
18463 #include "confdefs.h"
18464
18465 int
18466 main ()
18467 {
18468 bool foo = false
18469   ;
18470   return 0;
18471 }
18472 _ACEOF
18473 rm -f conftest.$ac_objext
18474 if { (eval echo "$as_me:18474: \"$ac_compile\"") >&5
18475   (eval $ac_compile) 2>&5
18476   ac_status=$?
18477   echo "$as_me:18477: \$? = $ac_status" >&5
18478   (exit $ac_status); } &&
18479          { ac_try='test -s conftest.$ac_objext'
18480   { (eval echo "$as_me:18480: \"$ac_try\"") >&5
18481   (eval $ac_try) 2>&5
18482   ac_status=$?
18483   echo "$as_me:18483: \$? = $ac_status" >&5
18484   (exit $ac_status); }; }; then
18485   cf_cv_header_stdbool_h=0
18486 else
18487   echo "$as_me: failed program was:" >&5
18488 cat conftest.$ac_ext >&5
18489 cat >conftest.$ac_ext <<_ACEOF
18490 #line 18490 "configure"
18491 #include "confdefs.h"
18492
18493 #ifndef __BEOS__
18494 #include <stdbool.h>
18495 #endif
18496
18497 int
18498 main ()
18499 {
18500 bool foo = false
18501   ;
18502   return 0;
18503 }
18504 _ACEOF
18505 rm -f conftest.$ac_objext
18506 if { (eval echo "$as_me:18506: \"$ac_compile\"") >&5
18507   (eval $ac_compile) 2>&5
18508   ac_status=$?
18509   echo "$as_me:18509: \$? = $ac_status" >&5
18510   (exit $ac_status); } &&
18511          { ac_try='test -s conftest.$ac_objext'
18512   { (eval echo "$as_me:18512: \"$ac_try\"") >&5
18513   (eval $ac_try) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit $ac_status); }; }; then
18517   cf_cv_header_stdbool_h=1
18518 else
18519   echo "$as_me: failed program was:" >&5
18520 cat conftest.$ac_ext >&5
18521 cf_cv_header_stdbool_h=0
18522 fi
18523 rm -f conftest.$ac_objext conftest.$ac_ext
18524 fi
18525 rm -f conftest.$ac_objext conftest.$ac_ext
18526 fi
18527
18528 if test "$cf_cv_header_stdbool_h" = 1
18529 then    echo "$as_me:18529: result: yes" >&5
18530 echo "${ECHO_T}yes" >&6
18531 else    echo "$as_me:18531: result: no" >&5
18532 echo "${ECHO_T}no" >&6
18533 fi
18534
18535 echo "$as_me:18535: checking for builtin bool type" >&5
18536 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18537
18538 if test "${cf_cv_builtin_bool+set}" = set; then
18539   echo $ECHO_N "(cached) $ECHO_C" >&6
18540 else
18541
18542         cat >conftest.$ac_ext <<_ACEOF
18543 #line 18543 "configure"
18544 #include "confdefs.h"
18545
18546 #include <stdio.h>
18547 #include <sys/types.h>
18548
18549 int
18550 main ()
18551 {
18552 bool x = false
18553   ;
18554   return 0;
18555 }
18556 _ACEOF
18557 rm -f conftest.$ac_objext
18558 if { (eval echo "$as_me:18558: \"$ac_compile\"") >&5
18559   (eval $ac_compile) 2>&5
18560   ac_status=$?
18561   echo "$as_me:18561: \$? = $ac_status" >&5
18562   (exit $ac_status); } &&
18563          { ac_try='test -s conftest.$ac_objext'
18564   { (eval echo "$as_me:18564: \"$ac_try\"") >&5
18565   (eval $ac_try) 2>&5
18566   ac_status=$?
18567   echo "$as_me:18567: \$? = $ac_status" >&5
18568   (exit $ac_status); }; }; then
18569   cf_cv_builtin_bool=1
18570 else
18571   echo "$as_me: failed program was:" >&5
18572 cat conftest.$ac_ext >&5
18573 cf_cv_builtin_bool=0
18574 fi
18575 rm -f conftest.$ac_objext conftest.$ac_ext
18576
18577 fi
18578
18579 if test "$cf_cv_builtin_bool" = 1
18580 then    echo "$as_me:18580: result: yes" >&5
18581 echo "${ECHO_T}yes" >&6
18582 else    echo "$as_me:18582: result: no" >&5
18583 echo "${ECHO_T}no" >&6
18584 fi
18585
18586 echo "$as_me:18586: checking for size of bool" >&5
18587 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18588 if test "${cf_cv_type_of_bool+set}" = set; then
18589   echo $ECHO_N "(cached) $ECHO_C" >&6
18590 else
18591
18592         rm -f cf_test.out
18593         if test "$cross_compiling" = yes; then
18594   cf_cv_type_of_bool=unknown
18595 else
18596   cat >conftest.$ac_ext <<_ACEOF
18597 #line 18597 "configure"
18598 #include "confdefs.h"
18599
18600 #include <stdlib.h>
18601 #include <stdio.h>
18602
18603 #if defined(__cplusplus)
18604
18605 #ifdef HAVE_GXX_BUILTIN_H
18606 #include <g++/builtin.h>
18607 #elif HAVE_GPP_BUILTIN_H
18608 #include <gpp/builtin.h>
18609 #elif HAVE_BUILTIN_H
18610 #include <builtin.h>
18611 #endif
18612
18613 #else
18614
18615 #if $cf_cv_header_stdbool_h
18616 #include <stdbool.h>
18617 #endif
18618
18619 #endif
18620
18621 main()
18622 {
18623         FILE *fp = fopen("cf_test.out", "w");
18624         if (fp != 0) {
18625                 bool x = true;
18626                 if ((bool)(-x) >= 0)
18627                         fputs("unsigned ", fp);
18628                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18629                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18630                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18631                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18632                 fclose(fp);
18633         }
18634         ${cf_cv_main_return:-return}(0);
18635 }
18636
18637 _ACEOF
18638 rm -f conftest$ac_exeext
18639 if { (eval echo "$as_me:18639: \"$ac_link\"") >&5
18640   (eval $ac_link) 2>&5
18641   ac_status=$?
18642   echo "$as_me:18642: \$? = $ac_status" >&5
18643   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18644   { (eval echo "$as_me:18644: \"$ac_try\"") >&5
18645   (eval $ac_try) 2>&5
18646   ac_status=$?
18647   echo "$as_me:18647: \$? = $ac_status" >&5
18648   (exit $ac_status); }; }; then
18649   cf_cv_type_of_bool=`cat cf_test.out`
18650                  if test -z "$cf_cv_type_of_bool"; then
18651                    cf_cv_type_of_bool=unknown
18652                  fi
18653 else
18654   echo "$as_me: program exited with status $ac_status" >&5
18655 echo "$as_me: failed program was:" >&5
18656 cat conftest.$ac_ext >&5
18657 cf_cv_type_of_bool=unknown
18658 fi
18659 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18660 fi
18661
18662 fi
18663
18664         rm -f cf_test.out
18665 echo "$as_me:18665: result: $cf_cv_type_of_bool" >&5
18666 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18667 if test "$cf_cv_type_of_bool" = unknown ; then
18668         case .$NCURSES_BOOL in #(vi
18669         .auto|.) NCURSES_BOOL=unsigned;;
18670         esac
18671         { echo "$as_me:18671: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18672 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18673         cf_cv_type_of_bool=$NCURSES_BOOL
18674 fi
18675
18676 echo "$as_me:18676: checking for special defines needed for etip.h" >&5
18677 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18678 cf_save_CXXFLAGS="$CXXFLAGS"
18679 cf_result="none"
18680
18681 # etip.h includes ncurses.h which includes ncurses_dll.h
18682 # But ncurses_dll.h is generated - fix here.
18683 test -d include || mkdir include
18684 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
18685
18686 for cf_math in "" MATH_H
18687 do
18688 for cf_excp in "" MATH_EXCEPTION
18689 do
18690         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18691         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18692         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18693 cat >conftest.$ac_ext <<_ACEOF
18694 #line 18694 "configure"
18695 #include "confdefs.h"
18696
18697 #include <etip.h.in>
18698
18699 int
18700 main ()
18701 {
18702
18703   ;
18704   return 0;
18705 }
18706 _ACEOF
18707 rm -f conftest.$ac_objext
18708 if { (eval echo "$as_me:18708: \"$ac_compile\"") >&5
18709   (eval $ac_compile) 2>&5
18710   ac_status=$?
18711   echo "$as_me:18711: \$? = $ac_status" >&5
18712   (exit $ac_status); } &&
18713          { ac_try='test -s conftest.$ac_objext'
18714   { (eval echo "$as_me:18714: \"$ac_try\"") >&5
18715   (eval $ac_try) 2>&5
18716   ac_status=$?
18717   echo "$as_me:18717: \$? = $ac_status" >&5
18718   (exit $ac_status); }; }; then
18719
18720         test -n "$cf_math" && cat >>confdefs.h <<EOF
18721 #define ETIP_NEEDS_${cf_math} 1
18722 EOF
18723
18724         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18725 #define ETIP_NEEDS_${cf_excp} 1
18726 EOF
18727
18728         cf_result="$cf_math $cf_excp"
18729         break 2
18730
18731 else
18732   echo "$as_me: failed program was:" >&5
18733 cat conftest.$ac_ext >&5
18734 fi
18735 rm -f conftest.$ac_objext conftest.$ac_ext
18736 done
18737 done
18738 echo "$as_me:18738: result: $cf_result" >&5
18739 echo "${ECHO_T}$cf_result" >&6
18740 CXXFLAGS="$cf_save_CXXFLAGS"
18741
18742 if test -n "$CXX"; then
18743 echo "$as_me:18743: checking if $CXX accepts parameter initialization" >&5
18744 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18745 if test "${cf_cv_cpp_param_init+set}" = set; then
18746   echo $ECHO_N "(cached) $ECHO_C" >&6
18747 else
18748
18749         ac_ext=cc
18750 ac_cpp='$CXXCPP $CPPFLAGS'
18751 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18752 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18753 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18754 ac_main_return=return
18755
18756         if test "$cross_compiling" = yes; then
18757   cf_cv_cpp_param_init=unknown
18758 else
18759   cat >conftest.$ac_ext <<_ACEOF
18760 #line 18760 "configure"
18761 #include "confdefs.h"
18762
18763 class TEST {
18764 private:
18765         int value;
18766 public:
18767         TEST(int x = 1);
18768         ~TEST();
18769 };
18770
18771 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18772 {
18773         value = x;
18774 }
18775 int main() { }
18776
18777 _ACEOF
18778 rm -f conftest$ac_exeext
18779 if { (eval echo "$as_me:18779: \"$ac_link\"") >&5
18780   (eval $ac_link) 2>&5
18781   ac_status=$?
18782   echo "$as_me:18782: \$? = $ac_status" >&5
18783   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18784   { (eval echo "$as_me:18784: \"$ac_try\"") >&5
18785   (eval $ac_try) 2>&5
18786   ac_status=$?
18787   echo "$as_me:18787: \$? = $ac_status" >&5
18788   (exit $ac_status); }; }; then
18789   cf_cv_cpp_param_init=yes
18790 else
18791   echo "$as_me: program exited with status $ac_status" >&5
18792 echo "$as_me: failed program was:" >&5
18793 cat conftest.$ac_ext >&5
18794 cf_cv_cpp_param_init=no
18795 fi
18796 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18797 fi
18798         ac_ext=cc
18799 ac_cpp='$CXXCPP $CPPFLAGS'
18800 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18801 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18802 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18803 ac_main_return=return
18804
18805 fi
18806 echo "$as_me:18806: result: $cf_cv_cpp_param_init" >&5
18807 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18808 fi
18809 test "$cf_cv_cpp_param_init" = yes &&
18810 cat >>confdefs.h <<\EOF
18811 #define CPP_HAS_PARAM_INIT 1
18812 EOF
18813
18814 if test -n "$CXX"; then
18815
18816 echo "$as_me:18816: checking if $CXX accepts static_cast" >&5
18817 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18818 if test "${cf_cv_cpp_static_cast+set}" = set; then
18819   echo $ECHO_N "(cached) $ECHO_C" >&6
18820 else
18821
18822         ac_ext=cc
18823 ac_cpp='$CXXCPP $CPPFLAGS'
18824 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18825 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18826 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18827 ac_main_return=return
18828
18829         cat >conftest.$ac_ext <<_ACEOF
18830 #line 18830 "configure"
18831 #include "confdefs.h"
18832
18833 class NCursesPanel
18834 {
18835 public:
18836   NCursesPanel(int nlines,
18837                int ncols,
18838                int begin_y = 0,
18839                int begin_x = 0)
18840   {
18841   }
18842
18843   ~NCursesPanel();
18844 };
18845
18846 template<class T> class NCursesUserPanel : public NCursesPanel
18847 {
18848 public:
18849   NCursesUserPanel (int nlines,
18850                     int ncols,
18851                     int begin_y = 0,
18852                     int begin_x = 0,
18853                     const T* p_UserData = static_cast<T*>(0))
18854     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18855   {
18856   };
18857   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18858   {
18859   };
18860
18861   virtual ~NCursesUserPanel() {};
18862 };
18863
18864 int
18865 main ()
18866 {
18867
18868         const char* p_UserData = static_cast<char*>(0)
18869   ;
18870   return 0;
18871 }
18872 _ACEOF
18873 rm -f conftest.$ac_objext
18874 if { (eval echo "$as_me:18874: \"$ac_compile\"") >&5
18875   (eval $ac_compile) 2>&5
18876   ac_status=$?
18877   echo "$as_me:18877: \$? = $ac_status" >&5
18878   (exit $ac_status); } &&
18879          { ac_try='test -s conftest.$ac_objext'
18880   { (eval echo "$as_me:18880: \"$ac_try\"") >&5
18881   (eval $ac_try) 2>&5
18882   ac_status=$?
18883   echo "$as_me:18883: \$? = $ac_status" >&5
18884   (exit $ac_status); }; }; then
18885   cf_cv_cpp_static_cast=yes
18886 else
18887   echo "$as_me: failed program was:" >&5
18888 cat conftest.$ac_ext >&5
18889 cf_cv_cpp_static_cast=no
18890 fi
18891 rm -f conftest.$ac_objext conftest.$ac_ext
18892
18893         ac_ext=cc
18894 ac_cpp='$CXXCPP $CPPFLAGS'
18895 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18896 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18897 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18898 ac_main_return=return
18899
18900 fi
18901 echo "$as_me:18901: result: $cf_cv_cpp_static_cast" >&5
18902 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18903
18904 fi
18905
18906 test "$cf_cv_cpp_static_cast" = yes &&
18907 cat >>confdefs.h <<\EOF
18908 #define CPP_HAS_STATIC_CAST 1
18909 EOF
18910
18911         CXX_AR='$(AR)'
18912         CXX_ARFLAGS='$(ARFLAGS)'
18913         case $cf_cv_system_name in #(vi
18914         irix*) #(vi
18915             if test "$GXX" != yes ; then
18916                 CXX_AR='$(CXX)'
18917                 CXX_ARFLAGS='-ar -o'
18918             fi
18919             ;;
18920         sco3.2v5*) #(vi
18921             CXXLDFLAGS="-u main"
18922             ;;
18923         solaris2*)
18924             if test "$GXX" != yes ; then
18925                 CXX_AR='$(CXX)'
18926                 CXX_ARFLAGS='-xar -o'
18927             fi
18928             ;;
18929         esac
18930
18931 else
18932         cf_cxx_library=no
18933         cf_cv_builtin_bool=1
18934
18935         # Just because we are not configuring against C++ right now does not
18936         # mean that a user will not want to use C++.  Some distributors disable
18937         # the C++ portion of this configuration as a shortcut (or just to avoid
18938         # compiling the demo in the c++ directory).  So we need a reasonable
18939         # default for the 'bool' type.
18940         #
18941         # Caveat: since the storage of the bool type is not standardized, it
18942         # may change.
18943
18944         if test "$NCURSES_BOOL" != auto ; then
18945                 cf_cv_type_of_bool=$NCURSES_BOOL
18946                 cf_cv_header_stdbool_h=0
18947         else
18948                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18949
18950 echo "$as_me:18950: checking for size of bool" >&5
18951 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18952 if test "${cf_cv_type_of_bool+set}" = set; then
18953   echo $ECHO_N "(cached) $ECHO_C" >&6
18954 else
18955
18956         rm -f cf_test.out
18957         if test "$cross_compiling" = yes; then
18958   cf_cv_type_of_bool=unknown
18959 else
18960   cat >conftest.$ac_ext <<_ACEOF
18961 #line 18961 "configure"
18962 #include "confdefs.h"
18963
18964 #include <stdlib.h>
18965 #include <stdio.h>
18966
18967 #if defined(__cplusplus)
18968
18969 #ifdef HAVE_GXX_BUILTIN_H
18970 #include <g++/builtin.h>
18971 #elif HAVE_GPP_BUILTIN_H
18972 #include <gpp/builtin.h>
18973 #elif HAVE_BUILTIN_H
18974 #include <builtin.h>
18975 #endif
18976
18977 #else
18978
18979 #if $cf_cv_header_stdbool_h
18980 #include <stdbool.h>
18981 #endif
18982
18983 #endif
18984
18985 main()
18986 {
18987         FILE *fp = fopen("cf_test.out", "w");
18988         if (fp != 0) {
18989                 bool x = true;
18990                 if ((bool)(-x) >= 0)
18991                         fputs("unsigned ", fp);
18992                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18993                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18994                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18995                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18996                 fclose(fp);
18997         }
18998         ${cf_cv_main_return:-return}(0);
18999 }
19000
19001 _ACEOF
19002 rm -f conftest$ac_exeext
19003 if { (eval echo "$as_me:19003: \"$ac_link\"") >&5
19004   (eval $ac_link) 2>&5
19005   ac_status=$?
19006   echo "$as_me:19006: \$? = $ac_status" >&5
19007   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19008   { (eval echo "$as_me:19008: \"$ac_try\"") >&5
19009   (eval $ac_try) 2>&5
19010   ac_status=$?
19011   echo "$as_me:19011: \$? = $ac_status" >&5
19012   (exit $ac_status); }; }; then
19013   cf_cv_type_of_bool=`cat cf_test.out`
19014                  if test -z "$cf_cv_type_of_bool"; then
19015                    cf_cv_type_of_bool=unknown
19016                  fi
19017 else
19018   echo "$as_me: program exited with status $ac_status" >&5
19019 echo "$as_me: failed program was:" >&5
19020 cat conftest.$ac_ext >&5
19021 cf_cv_type_of_bool=unknown
19022 fi
19023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19024 fi
19025
19026 fi
19027
19028         rm -f cf_test.out
19029 echo "$as_me:19029: result: $cf_cv_type_of_bool" >&5
19030 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19031 if test "$cf_cv_type_of_bool" = unknown ; then
19032         case .$NCURSES_BOOL in #(vi
19033         .auto|.) NCURSES_BOOL=unsigned;;
19034         esac
19035         { echo "$as_me:19035: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19036 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19037         cf_cv_type_of_bool=$NCURSES_BOOL
19038 fi
19039
19040                 else
19041                         echo "$as_me:19041: checking for fallback type of bool" >&5
19042 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
19043                         case "$host_cpu" in #(vi
19044                         i?86)   cf_cv_type_of_bool=char ;; #(vi
19045                         *)      cf_cv_type_of_bool=int  ;;
19046                         esac
19047                         echo "$as_me:19047: result: $cf_cv_type_of_bool" >&5
19048 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19049                 fi
19050         fi
19051 fi
19052
19053 # If the C compiler did not declare bool, and we did not determine that the C++
19054 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
19055 # ncurses library use the same type as C++ bool.  Note that this allows one to
19056 # specify the type of bool in a configure-script option and postpone
19057 # integration with the C++ compiler provided that the types are compatible.
19058 USE_CXX_BOOL=1
19059 if test $cf_cv_cc_bool_type = 1
19060 then
19061         # oops: C has a bool.  Unlikely, but C++ could differ.
19062         USE_CXX_BOOL=0
19063 elif test $cf_cv_builtin_bool = 0
19064 then
19065         # C++ has no bool
19066         USE_CXX_BOOL=0
19067 else
19068         # this is the normal case
19069         USE_CXX_BOOL='defined(__cplusplus)'
19070 fi
19071
19072 if test -f "${srcdir}/Ada95/Makefile.in" ; then
19073
19074         if test "$cf_with_ada" != "no" ; then
19075                 if test "$with_libtool" != "no"; then
19076                         { echo "$as_me:19076: WARNING: libtool does not support Ada - disabling feature" >&5
19077 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
19078                         cf_with_ada=no
19079                 fi
19080         fi
19081
19082         if test "$cf_with_ada" != "no" ; then
19083
19084 cf_ada_make=gnatmake
19085 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
19086 set dummy $cf_ada_make; ac_word=$2
19087 echo "$as_me:19087: checking for $ac_word" >&5
19088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19089 if test "${ac_cv_prog_gnat_exists+set}" = set; then
19090   echo $ECHO_N "(cached) $ECHO_C" >&6
19091 else
19092   if test -n "$gnat_exists"; then
19093   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
19094 else
19095   ac_save_IFS=$IFS; IFS=$ac_path_separator
19096 ac_dummy="$PATH"
19097 for ac_dir in $ac_dummy; do
19098   IFS=$ac_save_IFS
19099   test -z "$ac_dir" && ac_dir=.
19100   $as_executable_p "$ac_dir/$ac_word" || continue
19101 ac_cv_prog_gnat_exists="yes"
19102 echo "$as_me:19102: found $ac_dir/$ac_word" >&5
19103 break
19104 done
19105
19106   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
19107 fi
19108 fi
19109 gnat_exists=$ac_cv_prog_gnat_exists
19110 if test -n "$gnat_exists"; then
19111   echo "$as_me:19111: result: $gnat_exists" >&5
19112 echo "${ECHO_T}$gnat_exists" >&6
19113 else
19114   echo "$as_me:19114: result: no" >&5
19115 echo "${ECHO_T}no" >&6
19116 fi
19117
19118 if test "$ac_cv_prog_gnat_exists" = no; then
19119    cf_ada_make=
19120    cf_cv_prog_gnat_correct=no
19121 else
19122
19123 echo "$as_me:19123: checking for gnat version" >&5
19124 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
19125 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
19126         grep '[0-9].[0-9][0-9]*' |\
19127     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
19128 echo "$as_me:19128: result: $cf_gnat_version" >&5
19129 echo "${ECHO_T}$cf_gnat_version" >&6
19130
19131 case $cf_gnat_version in #(vi
19132 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
19133         cf_cv_prog_gnat_correct=yes
19134         ;;
19135 *)
19136         { echo "$as_me:19136: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
19137 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
19138         cf_cv_prog_gnat_correct=no
19139         ;;
19140 esac
19141
19142    # Extract the first word of "m4", so it can be a program name with args.
19143 set dummy m4; ac_word=$2
19144 echo "$as_me:19144: checking for $ac_word" >&5
19145 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19146 if test "${ac_cv_prog_M4_exists+set}" = set; then
19147   echo $ECHO_N "(cached) $ECHO_C" >&6
19148 else
19149   if test -n "$M4_exists"; then
19150   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
19151 else
19152   ac_save_IFS=$IFS; IFS=$ac_path_separator
19153 ac_dummy="$PATH"
19154 for ac_dir in $ac_dummy; do
19155   IFS=$ac_save_IFS
19156   test -z "$ac_dir" && ac_dir=.
19157   $as_executable_p "$ac_dir/$ac_word" || continue
19158 ac_cv_prog_M4_exists="yes"
19159 echo "$as_me:19159: found $ac_dir/$ac_word" >&5
19160 break
19161 done
19162
19163   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
19164 fi
19165 fi
19166 M4_exists=$ac_cv_prog_M4_exists
19167 if test -n "$M4_exists"; then
19168   echo "$as_me:19168: result: $M4_exists" >&5
19169 echo "${ECHO_T}$M4_exists" >&6
19170 else
19171   echo "$as_me:19171: result: no" >&5
19172 echo "${ECHO_T}no" >&6
19173 fi
19174
19175    if test "$ac_cv_prog_M4_exists" = no; then
19176       cf_cv_prog_gnat_correct=no
19177       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
19178    fi
19179    if test "$cf_cv_prog_gnat_correct" = yes; then
19180       echo "$as_me:19180: checking if GNAT works" >&5
19181 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
19182
19183 rm -rf conftest* *~conftest*
19184 cat >>conftest.ads <<CF_EOF
19185 procedure conftest;
19186 CF_EOF
19187 cat >>conftest.adb <<CF_EOF
19188 with Text_IO;
19189 with GNAT.OS_Lib;
19190 procedure conftest is
19191 begin
19192    Text_IO.Put ("Hello World");
19193    Text_IO.New_Line;
19194    GNAT.OS_Lib.OS_Exit (0);
19195 end conftest;
19196 CF_EOF
19197 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19198    if ( ./conftest 1>&5 2>&1 ) ; then
19199       cf_cv_prog_gnat_correct=yes
19200    else
19201       cf_cv_prog_gnat_correct=no
19202    fi
19203 else
19204    cf_cv_prog_gnat_correct=no
19205 fi
19206 rm -rf conftest* *~conftest*
19207
19208       echo "$as_me:19208: result: $cf_cv_prog_gnat_correct" >&5
19209 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19210    fi
19211 fi
19212
19213                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19214
19215         ADAFLAGS="$ADAFLAGS -gnatpn"
19216
19217         echo "$as_me:19217: checking optimization options for ADAFLAGS" >&5
19218 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19219         case "$CFLAGS" in
19220         *-g*)
19221
19222         ADAFLAGS="$ADAFLAGS -g"
19223
19224                 ;;
19225         esac
19226         case "$CFLAGS" in
19227         *-O*)
19228                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19229
19230         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19231
19232                 ;;
19233         esac
19234         echo "$as_me:19234: result: $ADAFLAGS" >&5
19235 echo "${ECHO_T}$ADAFLAGS" >&6
19236
19237 echo "$as_me:19237: checking if GNAT supports generics" >&5
19238 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19239 case $cf_gnat_version in #(vi
19240 3.[1-9]*|[4-9].*) #(vi
19241         cf_gnat_generics=yes
19242         ;;
19243 *)
19244         cf_gnat_generics=no
19245         ;;
19246 esac
19247 echo "$as_me:19247: result: $cf_gnat_generics" >&5
19248 echo "${ECHO_T}$cf_gnat_generics" >&6
19249
19250 if test "$cf_gnat_generics" = yes
19251 then
19252         cf_compile_generics=generics
19253         cf_generic_objects="\${GENOBJS}"
19254 else
19255         cf_compile_generics=
19256         cf_generic_objects=
19257 fi
19258
19259 echo "$as_me:19259: checking if GNAT supports SIGINT" >&5
19260 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19261 if test "${cf_cv_gnat_sigint+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264
19265 rm -rf conftest* *~conftest*
19266 cat >>conftest.ads <<CF_EOF
19267 with Ada.Interrupts.Names;
19268
19269 package ConfTest is
19270
19271    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19272    pragma Unreserve_All_Interrupts;
19273    pragma Warnings (On);
19274
19275    protected Process is
19276       procedure Stop;
19277       function Continue return Boolean;
19278       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19279    private
19280       Done : Boolean := False;
19281    end Process;
19282
19283 end ConfTest;
19284 CF_EOF
19285 cat >>conftest.adb <<CF_EOF
19286 package body ConfTest is
19287    protected body Process is
19288       procedure Stop is
19289       begin
19290          Done := True;
19291       end Stop;
19292       function Continue return Boolean is
19293       begin
19294          return not Done;
19295       end Continue;
19296    end Process;
19297 end ConfTest;
19298 CF_EOF
19299 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19300       cf_cv_gnat_sigint=yes
19301 else
19302    cf_cv_gnat_sigint=no
19303 fi
19304 rm -rf conftest* *~conftest*
19305
19306 fi
19307 echo "$as_me:19307: result: $cf_cv_gnat_sigint" >&5
19308 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19309
19310 if test $cf_cv_gnat_sigint = yes ; then
19311         USE_GNAT_SIGINT=""
19312 else
19313         USE_GNAT_SIGINT="#"
19314 fi
19315
19316 echo "$as_me:19316: checking if GNAT pragma Unreferenced works" >&5
19317 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19318 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19319   echo $ECHO_N "(cached) $ECHO_C" >&6
19320 else
19321
19322 rm -rf conftest* *~conftest*
19323 cat >>conftest.ads <<CF_EOF
19324 procedure conftest;
19325 CF_EOF
19326 cat >>conftest.adb <<CF_EOF
19327 with Text_IO;
19328 with GNAT.OS_Lib;
19329 procedure conftest is
19330    test : Integer;
19331    pragma Unreferenced (test);
19332 begin
19333    test := 1;
19334    Text_IO.Put ("Hello World");
19335    Text_IO.New_Line;
19336    GNAT.OS_Lib.OS_Exit (0);
19337 end conftest;
19338 CF_EOF
19339 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19340       cf_cv_pragma_unreferenced=yes
19341 else
19342    cf_cv_pragma_unreferenced=no
19343 fi
19344 rm -rf conftest* *~conftest*
19345
19346 fi
19347 echo "$as_me:19347: result: $cf_cv_pragma_unreferenced" >&5
19348 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19349
19350 # if the pragma is supported, use it (needed in the Trace code).
19351 if test $cf_cv_pragma_unreferenced = yes ; then
19352         PRAGMA_UNREF=TRUE
19353 else
19354         PRAGMA_UNREF=FALSE
19355 fi
19356
19357 cf_gnat_libraries=no
19358 cf_gnat_projects=no
19359
19360 echo "$as_me:19360: checking if GNAT supports project files" >&5
19361 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19362 case $cf_gnat_version in #(vi
19363 3.[0-9]*) #(vi
19364         ;;
19365 *)
19366         case $cf_cv_system_name in #(vi
19367         cygwin*) #(vi
19368                 ;;
19369         *)
19370                 mkdir conftest.src conftest.bin conftest.lib
19371                 cd conftest.src
19372                 rm -rf conftest* *~conftest*
19373                 cat >>library.gpr <<CF_EOF
19374 project Library is
19375   Kind := External ("LIB_KIND");
19376   for Library_Name use "ConfTest";
19377   for Object_Dir use ".";
19378   for Library_ALI_Dir use External("LIBRARY_DIR");
19379   for Library_Version use External ("SONAME");
19380   for Library_Kind use Kind;
19381   for Library_Dir use External("BUILD_DIR");
19382   Source_Dir := External ("SOURCE_DIR");
19383   for Source_Dirs use (Source_Dir);
19384   package Compiler is
19385      for Default_Switches ("Ada") use
19386        ("-g",
19387         "-O2",
19388         "-gnatafno",
19389         "-gnatVa",   -- All validity checks
19390         "-gnatwa");  -- Activate all optional errors
19391   end Compiler;
19392 end Library;
19393 CF_EOF
19394                 cat >>confpackage.ads <<CF_EOF
19395 package ConfPackage is
19396    procedure conftest;
19397 end ConfPackage;
19398 CF_EOF
19399                 cat >>confpackage.adb <<CF_EOF
19400 with Text_IO;
19401 package body ConfPackage is
19402    procedure conftest is
19403    begin
19404       Text_IO.Put ("Hello World");
19405       Text_IO.New_Line;
19406    end conftest;
19407 end ConfPackage;
19408 CF_EOF
19409                 if ( $cf_ada_make $ADAFLAGS \
19410                                 -Plibrary.gpr \
19411                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19412                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19413                                 -XSOURCE_DIR=`pwd` \
19414                                 -XSONAME=libConfTest.so.1 \
19415                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19416                         cf_gnat_projects=yes
19417                 fi
19418                 cd ..
19419                 if test -f conftest.lib/confpackage.ali
19420                 then
19421                         cf_gnat_libraries=yes
19422                 fi
19423                 rm -rf conftest* *~conftest*
19424                 ;;
19425         esac
19426         ;;
19427 esac
19428 echo "$as_me:19428: result: $cf_gnat_projects" >&5
19429 echo "${ECHO_T}$cf_gnat_projects" >&6
19430
19431 if test $cf_gnat_projects = yes
19432 then
19433         echo "$as_me:19433: checking if GNAT supports libraries" >&5
19434 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19435         echo "$as_me:19435: result: $cf_gnat_libraries" >&5
19436 echo "${ECHO_T}$cf_gnat_libraries" >&6
19437 fi
19438
19439 if test "$cf_gnat_projects" = yes
19440 then
19441         USE_OLD_MAKERULES="#"
19442         USE_GNAT_PROJECTS=""
19443 else
19444         USE_OLD_MAKERULES=""
19445         USE_GNAT_PROJECTS="#"
19446 fi
19447
19448 if test "$cf_gnat_libraries" = yes
19449 then
19450         USE_GNAT_LIBRARIES=""
19451 else
19452         USE_GNAT_LIBRARIES="#"
19453 fi
19454
19455 echo "$as_me:19455: checking for ada-compiler" >&5
19456 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19457
19458 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19459 if test "${with_ada_compiler+set}" = set; then
19460   withval="$with_ada_compiler"
19461   cf_ada_compiler=$withval
19462 else
19463   cf_ada_compiler=gnatmake
19464 fi;
19465
19466 echo "$as_me:19466: result: $cf_ada_compiler" >&5
19467 echo "${ECHO_T}$cf_ada_compiler" >&6
19468
19469                         cf_ada_package=terminal_interface
19470
19471 echo "$as_me:19471: checking for ada-include" >&5
19472 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19473
19474 # Check whether --with-ada-include or --without-ada-include was given.
19475 if test "${with_ada_include+set}" = set; then
19476   withval="$with_ada_include"
19477
19478 else
19479   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19480 fi; if test -n "$prefix/share/ada/adainclude" ; then
19481
19482 if test "x$prefix" != xNONE; then
19483   cf_path_syntax="$prefix"
19484 else
19485   cf_path_syntax="$ac_default_prefix"
19486 fi
19487
19488 case ".$withval" in #(vi
19489 .\$\(*\)*|.\'*\'*) #(vi
19490   ;;
19491 ..|./*|.\\*) #(vi
19492   ;;
19493 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19494   ;;
19495 .\${*prefix}*|.\${*dir}*) #(vi
19496   eval withval="$withval"
19497   case ".$withval" in #(vi
19498   .NONE/*)
19499     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19500     ;;
19501   esac
19502   ;; #(vi
19503 .no|.NONE/*)
19504   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19505   ;;
19506 *)
19507   { { echo "$as_me:19507: error: expected a pathname, not \"$withval\"" >&5
19508 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19509    { (exit 1); exit 1; }; }
19510   ;;
19511 esac
19512
19513 fi
19514 eval ADA_INCLUDE="$withval"
19515
19516 echo "$as_me:19516: result: $ADA_INCLUDE" >&5
19517 echo "${ECHO_T}$ADA_INCLUDE" >&6
19518
19519 echo "$as_me:19519: checking for ada-objects" >&5
19520 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19521
19522 # Check whether --with-ada-objects or --without-ada-objects was given.
19523 if test "${with_ada_objects+set}" = set; then
19524   withval="$with_ada_objects"
19525
19526 else
19527   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19528 fi; if test -n "$prefix/lib/ada/adalib" ; then
19529
19530 if test "x$prefix" != xNONE; then
19531   cf_path_syntax="$prefix"
19532 else
19533   cf_path_syntax="$ac_default_prefix"
19534 fi
19535
19536 case ".$withval" in #(vi
19537 .\$\(*\)*|.\'*\'*) #(vi
19538   ;;
19539 ..|./*|.\\*) #(vi
19540   ;;
19541 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19542   ;;
19543 .\${*prefix}*|.\${*dir}*) #(vi
19544   eval withval="$withval"
19545   case ".$withval" in #(vi
19546   .NONE/*)
19547     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19548     ;;
19549   esac
19550   ;; #(vi
19551 .no|.NONE/*)
19552   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19553   ;;
19554 *)
19555   { { echo "$as_me:19555: error: expected a pathname, not \"$withval\"" >&5
19556 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19557    { (exit 1); exit 1; }; }
19558   ;;
19559 esac
19560
19561 fi
19562 eval ADA_OBJECTS="$withval"
19563
19564 echo "$as_me:19564: result: $ADA_OBJECTS" >&5
19565 echo "${ECHO_T}$ADA_OBJECTS" >&6
19566
19567 echo "$as_me:19567: checking if an Ada95 shared-library should be built" >&5
19568 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19569
19570 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19571 if test "${with_ada_sharedlib+set}" = set; then
19572   withval="$with_ada_sharedlib"
19573   with_ada_sharedlib=$withval
19574 else
19575   with_ada_sharedlib=no
19576 fi;
19577 echo "$as_me:19577: result: $with_ada_sharedlib" >&5
19578 echo "${ECHO_T}$with_ada_sharedlib" >&6
19579
19580 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19581 MAKE_ADA_SHAREDLIB="#"
19582
19583 if test "x$with_ada_sharedlib" != xno
19584 then
19585         MAKE_ADA_SHAREDLIB=
19586         if test "x$with_ada_sharedlib" != xyes
19587         then
19588                 ADA_SHAREDLIB="$with_ada_sharedlib"
19589         fi
19590 fi
19591
19592                 fi
19593         fi
19594 else
19595         cf_with_ada=no
19596 fi
19597
19598 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19599 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19600 ###
19601 ### ticlib modules may be a separate library, otherwise contained in termlib.
19602 ### termlib modules may be a separate library, otherwise contained in ncurses.
19603 ###
19604 ### The of "+" or " " between the tokens controls the way the script
19605 ### chooses to split module lists into libraries.
19606 ###
19607 ### (see CF_LIB_RULES).
19608 echo "$as_me:19608: checking for library subsets" >&5
19609 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19610 LIB_SUBSETS=
19611
19612 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19613         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19614         if test "$with_ticlib" != no ; then
19615                 LIB_SUBSETS="${LIB_SUBSETS} "
19616         else
19617                 LIB_SUBSETS="${LIB_SUBSETS}+"
19618         fi
19619 fi
19620
19621 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19622 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19623
19624 if test "$with_termlib" != no ; then
19625         LIB_SUBSETS="${LIB_SUBSETS} "
19626 else
19627         LIB_SUBSETS="${LIB_SUBSETS}+"
19628 fi
19629
19630 LIB_SUBSETS="${LIB_SUBSETS}base"
19631
19632 # Most term-driver calls are to tinfo, but some like init_pair are to the
19633 # base library (so it resides in base).
19634 if test "$with_term_driver" != no ; then
19635         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19636         case $cf_cv_system_name in #(vi
19637         *mingw32*) #(vi
19638                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19639                 ;;
19640         *) #(vi
19641                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19642                 ;;
19643         esac
19644 fi
19645
19646 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19647 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19648
19649 echo "$as_me:19649: result: $LIB_SUBSETS" >&5
19650 echo "${ECHO_T}$LIB_SUBSETS" >&6
19651
19652 ### Construct the list of include-directories to be generated
19653
19654 CPPFLAGS="$CPPFLAGS -I. -I../include"
19655 if test "$srcdir" != "."; then
19656         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
19657 fi
19658 if test "$GCC" != yes; then
19659         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19660 elif test "$includedir" != "/usr/include"; then
19661         if test "$includedir" = '${prefix}/include' ; then
19662                 if test $prefix != /usr ; then
19663                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
19664                 fi
19665         else
19666                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
19667         fi
19668 fi
19669
19670 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19671 if test "$srcdir" != "."; then
19672         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19673 fi
19674 if test "$GCC" != yes; then
19675         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19676 elif test "$includedir" != "/usr/include"; then
19677         if test "$includedir" = '${prefix}/include' ; then
19678                 if test $prefix != /usr ; then
19679                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19680                 fi
19681         else
19682                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19683         fi
19684 fi
19685
19686 ### Build up pieces for makefile rules
19687 echo "$as_me:19687: checking default library suffix" >&5
19688 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19689
19690         case $DFT_LWR_MODEL in
19691         libtool) DFT_ARG_SUFFIX=''   ;;
19692         normal)  DFT_ARG_SUFFIX=''   ;;
19693         debug)   DFT_ARG_SUFFIX='_g' ;;
19694         profile) DFT_ARG_SUFFIX='_p' ;;
19695         shared)  DFT_ARG_SUFFIX=''   ;;
19696         esac
19697         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19698 echo "$as_me:19698: result: $DFT_ARG_SUFFIX" >&5
19699 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19700
19701 echo "$as_me:19701: checking default library-dependency suffix" >&5
19702 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19703
19704         case $DFT_LWR_MODEL in #(vi
19705         libtool) #(vi
19706                 DFT_LIB_SUFFIX='.la'
19707                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19708                 ;;
19709         normal) #(vi
19710                 DFT_LIB_SUFFIX='.a'
19711                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19712                 ;;
19713         debug) #(vi
19714                 DFT_LIB_SUFFIX='_g.a'
19715                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19716                 ;;
19717         profile) #(vi
19718                 DFT_LIB_SUFFIX='_p.a'
19719                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19720                 ;;
19721         shared) #(vi
19722                 case $cf_cv_system_name in
19723                 aix[5-7]*) #(vi
19724                         DFT_LIB_SUFFIX='.a'
19725                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19726                         ;;
19727                 cygwin*|mingw*) #(vi
19728                         DFT_LIB_SUFFIX='.dll'
19729                         DFT_DEP_SUFFIX='.dll.a'
19730                         ;;
19731                 darwin*) #(vi
19732                         DFT_LIB_SUFFIX='.dylib'
19733                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19734                         ;;
19735                 hpux*) #(vi
19736                         case $target in
19737                         ia64*) #(vi
19738                                 DFT_LIB_SUFFIX='.so'
19739                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19740                                 ;;
19741                         *) #(vi
19742                                 DFT_LIB_SUFFIX='.sl'
19743                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19744                                 ;;
19745                         esac
19746                         ;;
19747                 *)      DFT_LIB_SUFFIX='.so'
19748                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19749                         ;;
19750                 esac
19751         esac
19752         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19753         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19754 echo "$as_me:19754: result: $DFT_DEP_SUFFIX" >&5
19755 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19756
19757 echo "$as_me:19757: checking default object directory" >&5
19758 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19759
19760         case $DFT_LWR_MODEL in
19761         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19762         normal)  DFT_OBJ_SUBDIR='objects' ;;
19763         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19764         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19765         shared)
19766                 case $cf_cv_system_name in #(vi
19767                 cygwin) #(vi
19768                         DFT_OBJ_SUBDIR='objects' ;;
19769                 *)
19770                         DFT_OBJ_SUBDIR='obj_s' ;;
19771                 esac
19772         esac
19773 echo "$as_me:19773: result: $DFT_OBJ_SUBDIR" >&5
19774 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19775
19776 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19777 if test "x$cf_with_cxx" = xyes ; then
19778 echo "$as_me:19778: checking c++ library-dependency suffix" >&5
19779 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19780 if test "$with_libtool" != "no"; then
19781         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19782 else
19783
19784         case normal in #(vi
19785         libtool) #(vi
19786                 CXX_LIB_SUFFIX='.la'
19787                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19788                 ;;
19789         normal) #(vi
19790                 CXX_LIB_SUFFIX='.a'
19791                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19792                 ;;
19793         debug) #(vi
19794                 CXX_LIB_SUFFIX='_g.a'
19795                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19796                 ;;
19797         profile) #(vi
19798                 CXX_LIB_SUFFIX='_p.a'
19799                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19800                 ;;
19801         shared) #(vi
19802                 case $cf_cv_system_name in
19803                 aix[5-7]*) #(vi
19804                         CXX_LIB_SUFFIX='.a'
19805                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19806                         ;;
19807                 cygwin*|mingw*) #(vi
19808                         CXX_LIB_SUFFIX='.dll'
19809                         CXX_DEP_SUFFIX='.dll.a'
19810                         ;;
19811                 darwin*) #(vi
19812                         CXX_LIB_SUFFIX='.dylib'
19813                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19814                         ;;
19815                 hpux*) #(vi
19816                         case $target in
19817                         ia64*) #(vi
19818                                 CXX_LIB_SUFFIX='.so'
19819                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19820                                 ;;
19821                         *) #(vi
19822                                 CXX_LIB_SUFFIX='.sl'
19823                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19824                                 ;;
19825                         esac
19826                         ;;
19827                 *)      CXX_LIB_SUFFIX='.so'
19828                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19829                         ;;
19830                 esac
19831         esac
19832         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19833         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19834 fi
19835 echo "$as_me:19835: result: $CXX_LIB_SUFFIX" >&5
19836 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19837
19838 fi
19839
19840 # do not want -ldl in build except as needed for -lncurses dependency
19841 if test "x$with_dlsym" = xyes ; then
19842 if test $DFT_LWR_MODEL = shared || \
19843    test $DFT_LWR_MODEL = libtool ; then
19844
19845 # remove dl library from $LIBS
19846 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19847
19848 fi
19849 fi
19850 ### Set up low-level terminfo dependencies for makefiles.
19851
19852 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19853 # do not need libdl
19854 TICS_LIST=
19855 if test "x$with_dlsym" = xyes ; then
19856
19857 # remove dl library from $SHLIB_LIST
19858 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19859
19860 fi
19861
19862 if test "$with_ticlib" != no ; then
19863
19864         if test "x$with_ticlib" != xyes ; then
19865                 TICS_NAME=$with_ticlib
19866                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19867                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19868                 TICS_LIB_SUFFIX="${with_ticlib}"
19869         else
19870                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19871                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19872                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19873         fi
19874         TICS_LDFLAGS="-L${LIB_DIR}"
19875         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19876 else
19877         TICS_LDFLAGS="-L${LIB_DIR}"
19878         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19879 fi
19880
19881 if test "$with_termlib" != no ; then
19882
19883         if test "x$with_termlib" != xyes ; then
19884                 TINFO_NAME=$with_termlib
19885                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19886                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19887                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19888                 TINFO_LIB_SUFFIX="${with_termlib}"
19889         else
19890                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19891                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19892                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19893                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19894         fi
19895
19896         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19897         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19898         if test "$DFT_LWR_MODEL" = "libtool"; then
19899                 TEST_ARGS="${TEST_DEPS}"
19900                 TEST_ARG2="${TEST_DEP2}"
19901                 TINFO_LDFLAGS="-L${LIB_DIR}"
19902                 TINFO_LIBS="$TEST_ARGS"
19903                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19904                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19905         else
19906                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19907                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19908                 if test "x$with_term_driver" != xno ; then
19909                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19910                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19911                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19912                 else
19913                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19914                         TINFO_LIBS="$TEST_ARGS"
19915                 fi
19916                 TINFO_LDFLAGS="-L${LIB_DIR}"
19917                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19918         fi
19919 else
19920         # the next lines are needed for linking libtic over libncurses
19921         TINFO_NAME=${LIB_NAME}
19922         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19923         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19924         if test "x$with_tic_depends" = xyes ; then
19925                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19926         else
19927                 TICS_LIST="$SHLIB_LIST"
19928         fi
19929
19930         TINFO_LDFLAGS="-L${LIB_DIR}"
19931         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19932 fi
19933
19934 if test "$DFT_LWR_MODEL" = shared ; then
19935         case $cf_cv_system_name in #(vi
19936         cygwin*)
19937                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19938                 TINFO_SUFFIX=.dll
19939                 ;;
19940         esac
19941 fi
19942
19943 if test "x$with_dlsym" = xyes ; then
19944
19945 # remove dl library from $TICS_LIST
19946 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19947
19948 fi
19949
19950 if test "$DFT_LWR_MODEL" = "libtool"; then
19951     OBJEXT=lo
19952 fi
19953
19954 # needed for Ada95
19955 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19956
19957 case $DFT_LWR_MODEL in
19958 normal|debug|profile)
19959
19960 if test "$GCC" = yes ; then
19961         case $cf_cv_system_name in #(
19962         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19963                 LDFLAGS_STATIC=
19964                 LDFLAGS_SHARED=
19965                 ;;
19966     *)  #( normally, except when broken
19967         LDFLAGS_STATIC=-static
19968         LDFLAGS_SHARED=-dynamic
19969         ;;
19970     esac
19971 else
19972         case $cf_cv_system_name in #(
19973         aix[4-7]*)      #( from ld manpage
19974                 LDFLAGS_STATIC=-bstatic
19975                 LDFLAGS_SHARED=-bdynamic
19976                 ;;
19977         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19978                 # We could also use just "archive" and "shared".
19979                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19980                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19981                 ;;
19982         irix*)          #( from ld manpage IRIX64
19983                 LDFLAGS_STATIC=-Bstatic
19984                 LDFLAGS_SHARED=-Bdynamic
19985                 ;;
19986         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19987                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19988                 LDFLAGS_STATIC=-noso
19989                 LDFLAGS_SHARED=-so_archive
19990                 ;;
19991         solaris2*)
19992                 LDFLAGS_STATIC=-Bstatic
19993                 LDFLAGS_SHARED=-Bdynamic
19994                 ;;
19995         esac
19996 fi
19997
19998 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19999 then
20000         echo "$as_me:20000: checking if linker supports switching between static/dynamic" >&5
20001 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
20002
20003         rm -f libconftest.a
20004         cat >conftest.$ac_ext <<EOF
20005 #line 20005 "configure"
20006 #include <stdio.h>
20007 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
20008 EOF
20009         if { (eval echo "$as_me:20009: \"$ac_compile\"") >&5
20010   (eval $ac_compile) 2>&5
20011   ac_status=$?
20012   echo "$as_me:20012: \$? = $ac_status" >&5
20013   (exit $ac_status); } ; then
20014                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
20015                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
20016         fi
20017         rm -f conftest.*
20018
20019         cf_save_LIBS="$LIBS"
20020
20021         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
20022         cat >conftest.$ac_ext <<_ACEOF
20023 #line 20023 "configure"
20024 #include "confdefs.h"
20025
20026 #line 20026 "configure"
20027 #include <stdio.h>
20028 int cf_ldflags_static(FILE *fp);
20029
20030 int
20031 main ()
20032 {
20033
20034         return cf_ldflags_static(stdin);
20035
20036   ;
20037   return 0;
20038 }
20039 _ACEOF
20040 rm -f conftest.$ac_objext conftest$ac_exeext
20041 if { (eval echo "$as_me:20041: \"$ac_link\"") >&5
20042   (eval $ac_link) 2>&5
20043   ac_status=$?
20044   echo "$as_me:20044: \$? = $ac_status" >&5
20045   (exit $ac_status); } &&
20046          { ac_try='test -s conftest$ac_exeext'
20047   { (eval echo "$as_me:20047: \"$ac_try\"") >&5
20048   (eval $ac_try) 2>&5
20049   ac_status=$?
20050   echo "$as_me:20050: \$? = $ac_status" >&5
20051   (exit $ac_status); }; }; then
20052
20053         # some linkers simply ignore the -dynamic
20054         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
20055         *static*) # (vi
20056                 cf_ldflags_static=no
20057                 ;;
20058         *)
20059                 cf_ldflags_static=yes
20060                 ;;
20061         esac
20062
20063 else
20064   echo "$as_me: failed program was:" >&5
20065 cat conftest.$ac_ext >&5
20066 cf_ldflags_static=no
20067 fi
20068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20069
20070         rm -f libconftest.*
20071         LIBS="$cf_save_LIBS"
20072
20073         echo "$as_me:20073: result: $cf_ldflags_static" >&5
20074 echo "${ECHO_T}$cf_ldflags_static" >&6
20075
20076         if test $cf_ldflags_static != yes
20077         then
20078                 LDFLAGS_STATIC=
20079                 LDFLAGS_SHARED=
20080         fi
20081 else
20082         LDFLAGS_STATIC=
20083         LDFLAGS_SHARED=
20084 fi
20085
20086         ;;
20087 esac
20088
20089 echo "$as_me:20089: checking where we will install curses.h" >&5
20090 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
20091 test "$with_overwrite" = no && \
20092 test "x$includedir" = 'x${prefix}/include' && \
20093         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
20094 echo "$as_me:20094: result: $includedir" >&5
20095 echo "${ECHO_T}$includedir" >&6
20096
20097 ### Resolve a conflict between normal and wide-curses by forcing applications
20098 ### that will need libutf8 to add it to their configure script.
20099 if test "$with_overwrite" != no ; then
20100 if test "$NCURSES_LIBUTF8" = 1 ; then
20101         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
20102         { echo "$as_me:20102: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
20103 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
20104 fi
20105 fi
20106 WITH_OVERWRITE=$with_overwrite
20107
20108 # used to separate tack out of the tree
20109 NCURSES_TREE=
20110
20111 ### predefined stuff for the test programs
20112
20113 cat >>confdefs.h <<\EOF
20114 #define HAVE_SLK_COLOR 1
20115 EOF
20116
20117 ### Construct the list of subdirectories for which we'll customize makefiles
20118 ### with the appropriate compile-rules.
20119
20120 echo "$as_me:20120: checking for src modules" >&5
20121 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
20122
20123 # dependencies and linker-arguments for test-programs
20124 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
20125 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
20126 if test "$DFT_LWR_MODEL" = "libtool"; then
20127         TEST_ARGS="${TEST_DEPS}"
20128         TEST_ARG2="${TEST_DEP2}"
20129 else
20130         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
20131         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
20132 fi
20133
20134 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
20135 cf_cv_src_modules=
20136 for cf_dir in $modules_to_build
20137 do
20138         if test -f $srcdir/$cf_dir/modules; then
20139
20140                 # We may/may not have tack in the distribution, though the
20141                 # makefile is.
20142                 if test $cf_dir = tack ; then
20143                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
20144                                 continue
20145                         fi
20146                 fi
20147
20148                 if test -z "$cf_cv_src_modules"; then
20149                         cf_cv_src_modules=$cf_dir
20150                 else
20151                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
20152                 fi
20153
20154                 # Make the ncurses_cfg.h file record the library interface files as
20155                 # well.  These are header files that are the same name as their
20156                 # directory.  Ncurses is the only library that does not follow
20157                 # that pattern.
20158                 if test $cf_dir = tack ; then
20159                         continue
20160                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
20161
20162 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20163
20164                         cat >>confdefs.h <<EOF
20165 #define HAVE_${cf_have_include}_H 1
20166 EOF
20167
20168                         cat >>confdefs.h <<EOF
20169 #define HAVE_LIB${cf_have_include} 1
20170 EOF
20171
20172                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
20173                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
20174                         if test "$DFT_LWR_MODEL" = "libtool"; then
20175                                 TEST_ARGS="${TEST_DEPS}"
20176                                 TEST_ARG2="${TEST_DEP2}"
20177                         else
20178                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
20179                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
20180                         fi
20181                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
20182                 fi
20183         fi
20184 done
20185 echo "$as_me:20185: result: $cf_cv_src_modules" >&5
20186 echo "${ECHO_T}$cf_cv_src_modules" >&6
20187
20188 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
20189 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
20190
20191 SRC_SUBDIRS=
20192 if test "x$cf_with_manpages" != xno ; then
20193         SRC_SUBDIRS="$SRC_SUBDIRS man"
20194 fi
20195 SRC_SUBDIRS="$SRC_SUBDIRS include"
20196 for cf_dir in $cf_cv_src_modules
20197 do
20198         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20199 done
20200 if test "x$cf_with_tests" != "xno" ; then
20201         SRC_SUBDIRS="$SRC_SUBDIRS test"
20202 fi
20203 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20204 if test "$cf_with_cxx_binding" != no; then
20205         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20206         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20207 fi
20208
20209 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20210 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20211
20212 ADA_SUBDIRS=
20213 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20214         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20215         ADA_SUBDIRS="gen src"
20216         if test "x$cf_with_tests" != "xno" ; then
20217                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20218         fi
20219 fi
20220
20221 SUB_MAKEFILES=
20222 for cf_dir in $SRC_SUBDIRS
20223 do
20224         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20225 done
20226
20227 if test -n "$ADA_SUBDIRS"; then
20228         for cf_dir in $ADA_SUBDIRS
20229         do
20230                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20231         done
20232
20233 fi
20234
20235 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20236    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20237    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20238 fi
20239
20240 DIRS_TO_MAKE="lib"
20241 for cf_item in $cf_list_models
20242 do
20243
20244         case $cf_item in
20245         libtool) cf_subdir='obj_lo'  ;;
20246         normal)  cf_subdir='objects' ;;
20247         debug)   cf_subdir='obj_g' ;;
20248         profile) cf_subdir='obj_p' ;;
20249         shared)
20250                 case $cf_cv_system_name in #(vi
20251                 cygwin) #(vi
20252                         cf_subdir='objects' ;;
20253                 *)
20254                         cf_subdir='obj_s' ;;
20255                 esac
20256         esac
20257
20258         for cf_item2 in $DIRS_TO_MAKE
20259         do
20260                 test $cf_item2 = $cf_subdir && break
20261         done
20262         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20263 done
20264 for cf_dir in $DIRS_TO_MAKE
20265 do
20266         test ! -d $cf_dir && mkdir $cf_dir
20267 done
20268
20269 # symbols that differ when compiling Ada95 by itself.
20270 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20271
20272 # values to use as strings
20273
20274 cat >>confdefs.h <<EOF
20275 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20276 EOF
20277
20278 cat >>confdefs.h <<EOF
20279 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20280 EOF
20281
20282 ### Now that we're done running tests, add the compiler-warnings, if any
20283
20284 cf_fix_cppflags=no
20285 cf_new_cflags=
20286 cf_new_cppflags=
20287 cf_new_extra_cppflags=
20288
20289 for cf_add_cflags in $EXTRA_CFLAGS
20290 do
20291 case $cf_fix_cppflags in
20292 no)
20293         case $cf_add_cflags in #(vi
20294         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20295                 case $cf_add_cflags in
20296                 -D*)
20297                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20298
20299                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20300                                 && test -z "${cf_tst_cflags}" \
20301                                 && cf_fix_cppflags=yes
20302
20303                         if test $cf_fix_cppflags = yes ; then
20304                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20305                                 continue
20306                         elif test "${cf_tst_cflags}" = "\"'" ; then
20307                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20308                                 continue
20309                         fi
20310                         ;;
20311                 esac
20312                 case "$CPPFLAGS" in
20313                 *$cf_add_cflags) #(vi
20314                         ;;
20315                 *) #(vi
20316                         case $cf_add_cflags in #(vi
20317                         -D*)
20318                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20319
20320 CPPFLAGS=`echo "$CPPFLAGS" | \
20321         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20322                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20323
20324                                 ;;
20325                         esac
20326                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20327                         ;;
20328                 esac
20329                 ;;
20330         *)
20331                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20332                 ;;
20333         esac
20334         ;;
20335 yes)
20336         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20337
20338         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20339
20340         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20341                 && test -z "${cf_tst_cflags}" \
20342                 && cf_fix_cppflags=no
20343         ;;
20344 esac
20345 done
20346
20347 if test -n "$cf_new_cflags" ; then
20348
20349         CFLAGS="$CFLAGS $cf_new_cflags"
20350 fi
20351
20352 if test -n "$cf_new_cppflags" ; then
20353
20354         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20355 fi
20356
20357 if test -n "$cf_new_extra_cppflags" ; then
20358
20359         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20360 fi
20361
20362 ### Define substitutions for header files to avoid name-pollution
20363
20364 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20365         HAVE_TCGETATTR=1
20366 else
20367         HAVE_TCGETATTR=0
20368 fi
20369
20370 if test "x$ac_cv_header_termio_h" = xyes ; then
20371         HAVE_TERMIO_H=1
20372 else
20373         HAVE_TERMIO_H=0
20374 fi
20375
20376 if test "x$ac_cv_header_termios_h" = xyes ; then
20377         HAVE_TERMIOS_H=1
20378 else
20379         HAVE_TERMIOS_H=0
20380 fi
20381
20382 ################################################################################
20383 test "x$use_database" = xyes && \
20384 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20385
20386 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20387 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20388
20389 if test "x$enable_pc_files" = xyes ; then \
20390 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20391 MAKE_PC_FILES=
20392 else
20393 MAKE_PC_FILES="#"
20394 fi
20395
20396 # Extract the first word of "tic", so it can be a program name with args.
20397 set dummy tic; ac_word=$2
20398 echo "$as_me:20398: checking for $ac_word" >&5
20399 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20400 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20401   echo $ECHO_N "(cached) $ECHO_C" >&6
20402 else
20403   case $TIC_PATH in
20404   [\\/]* | ?:[\\/]*)
20405   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20406   ;;
20407   *)
20408   ac_save_IFS=$IFS; IFS=$ac_path_separator
20409 ac_dummy="$PATH:/usr/local/ncurses/bin"
20410 for ac_dir in $ac_dummy; do
20411   IFS=$ac_save_IFS
20412   test -z "$ac_dir" && ac_dir=.
20413   if $as_executable_p "$ac_dir/$ac_word"; then
20414    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20415    echo "$as_me:20415: found $ac_dir/$ac_word" >&5
20416    break
20417 fi
20418 done
20419
20420   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20421   ;;
20422 esac
20423 fi
20424 TIC_PATH=$ac_cv_path_TIC_PATH
20425
20426 if test -n "$TIC_PATH"; then
20427   echo "$as_me:20427: result: $TIC_PATH" >&5
20428 echo "${ECHO_T}$TIC_PATH" >&6
20429 else
20430   echo "$as_me:20430: result: no" >&5
20431 echo "${ECHO_T}no" >&6
20432 fi
20433
20434 if test -n "$FALLBACK_LIST"
20435 then
20436         if test "$TIC_PATH" = unknown
20437         then
20438                 { echo "$as_me:20438: WARNING: no tic program found for fallbacks" >&5
20439 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20440         fi
20441 fi
20442
20443 if test "x$cf_with_tests" != xno ; then
20444         MAKE_TESTS=
20445 else
20446         MAKE_TESTS="#"
20447 fi
20448
20449 ADAHTML_DIR=../../doc/html/ada
20450
20451 SUB_SCRIPTS=
20452
20453 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"
20454 ac_config_commands="$ac_config_commands default"
20455 cat >confcache <<\_ACEOF
20456 # This file is a shell script that caches the results of configure
20457 # tests run on this system so they can be shared between configure
20458 # scripts and configure runs, see configure's option --config-cache.
20459 # It is not useful on other systems.  If it contains results you don't
20460 # want to keep, you may remove or edit it.
20461 #
20462 # config.status only pays attention to the cache file if you give it
20463 # the --recheck option to rerun configure.
20464 #
20465 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20466 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20467 # following values.
20468
20469 _ACEOF
20470
20471 # The following way of writing the cache mishandles newlines in values,
20472 # but we know of no workaround that is simple, portable, and efficient.
20473 # So, don't put newlines in cache variables' values.
20474 # Ultrix sh set writes to stderr and can't be redirected directly,
20475 # and sets the high bit in the cache file unless we assign to the vars.
20476 {
20477   (set) 2>&1 |
20478     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20479     *ac_space=\ *)
20480       # `set' does not quote correctly, so add quotes (double-quote
20481       # substitution turns \\\\ into \\, and sed turns \\ into \).
20482       sed -n \
20483         "s/'/'\\\\''/g;
20484           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20485       ;;
20486     *)
20487       # `set' quotes correctly as required by POSIX, so do not add quotes.
20488       sed -n \
20489         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20490       ;;
20491     esac;
20492 } |
20493   sed '
20494      t clear
20495      : clear
20496      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20497      t end
20498      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20499      : end' >>confcache
20500 if cmp -s $cache_file confcache; then :; else
20501   if test -w $cache_file; then
20502     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20503     cat confcache >$cache_file
20504   else
20505     echo "not updating unwritable cache $cache_file"
20506   fi
20507 fi
20508 rm -f confcache
20509
20510 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20511 # Let make expand exec_prefix.
20512 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20513
20514 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20515 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20516 # trailing colons and then remove the whole line if VPATH becomes empty
20517 # (actually we leave an empty line to preserve line numbers).
20518 if test "x$srcdir" = x.; then
20519   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20520 s/:*\$(srcdir):*/:/;
20521 s/:*\${srcdir}:*/:/;
20522 s/:*@srcdir@:*/:/;
20523 s/^\([^=]*=[    ]*\):*/\1/;
20524 s/:*$//;
20525 s/^[^=]*=[      ]*$//;
20526 }'
20527 fi
20528
20529 DEFS=-DHAVE_CONFIG_H
20530
20531 : ${CONFIG_STATUS=./config.status}
20532 ac_clean_files_save=$ac_clean_files
20533 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20534 { echo "$as_me:20534: creating $CONFIG_STATUS" >&5
20535 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20536 cat >$CONFIG_STATUS <<_ACEOF
20537 #! $SHELL
20538 # Generated automatically by configure.
20539 # Run this file to recreate the current configuration.
20540 # Compiler output produced by configure, useful for debugging
20541 # configure, is in config.log if it exists.
20542
20543 debug=false
20544 SHELL=\${CONFIG_SHELL-$SHELL}
20545 ac_cs_invocation="\$0 \$@"
20546
20547 _ACEOF
20548
20549 cat >>$CONFIG_STATUS <<\_ACEOF
20550 # Be Bourne compatible
20551 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20552   emulate sh
20553   NULLCMD=:
20554 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20555   set -o posix
20556 fi
20557
20558 # Name of the executable.
20559 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20560
20561 if expr a : '\(a\)' >/dev/null 2>&1; then
20562   as_expr=expr
20563 else
20564   as_expr=false
20565 fi
20566
20567 rm -f conf$$ conf$$.exe conf$$.file
20568 echo >conf$$.file
20569 if ln -s conf$$.file conf$$ 2>/dev/null; then
20570   # We could just check for DJGPP; but this test a) works b) is more generic
20571   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20572   if test -f conf$$.exe; then
20573     # Don't use ln at all; we don't have any links
20574     as_ln_s='cp -p'
20575   else
20576     as_ln_s='ln -s'
20577   fi
20578 elif ln conf$$.file conf$$ 2>/dev/null; then
20579   as_ln_s=ln
20580 else
20581   as_ln_s='cp -p'
20582 fi
20583 rm -f conf$$ conf$$.exe conf$$.file
20584
20585 as_executable_p="test -f"
20586
20587 # Support unset when possible.
20588 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20589   as_unset=unset
20590 else
20591   as_unset=false
20592 fi
20593
20594 # NLS nuisances.
20595 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20596 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20597 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20598 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20599 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20600 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20601 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20602 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20603
20604 # IFS
20605 # We need space, tab and new line, in precisely that order.
20606 as_nl='
20607 '
20608 IFS="   $as_nl"
20609
20610 # CDPATH.
20611 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20612
20613 exec 6>&1
20614
20615 _ACEOF
20616
20617 # Files that config.status was made for.
20618 if test -n "$ac_config_files"; then
20619   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20620 fi
20621
20622 if test -n "$ac_config_headers"; then
20623   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20624 fi
20625
20626 if test -n "$ac_config_links"; then
20627   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20628 fi
20629
20630 if test -n "$ac_config_commands"; then
20631   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20632 fi
20633
20634 cat >>$CONFIG_STATUS <<\EOF
20635
20636 ac_cs_usage="\
20637 \`$as_me' instantiates files from templates according to the
20638 current configuration.
20639
20640 Usage: $0 [OPTIONS] [FILE]...
20641
20642   -h, --help       print this help, then exit
20643   -V, --version    print version number, then exit
20644   -d, --debug      don't remove temporary files
20645       --recheck    update $as_me by reconfiguring in the same conditions
20646   --file=FILE[:TEMPLATE]
20647                    instantiate the configuration file FILE
20648   --header=FILE[:TEMPLATE]
20649                    instantiate the configuration header FILE
20650
20651 Configuration files:
20652 $config_files
20653
20654 Configuration headers:
20655 $config_headers
20656
20657 Configuration commands:
20658 $config_commands
20659
20660 Report bugs to <dickey@invisible-island.net>."
20661 EOF
20662
20663 cat >>$CONFIG_STATUS <<EOF
20664 ac_cs_version="\\
20665 config.status
20666 configured by $0, generated by GNU Autoconf 2.52.20121002,
20667   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20668
20669 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20670 Free Software Foundation, Inc.
20671 This config.status script is free software; the Free Software Foundation
20672 gives unlimited permission to copy, distribute and modify it."
20673 srcdir=$srcdir
20674 INSTALL="$INSTALL"
20675 EOF
20676
20677 cat >>$CONFIG_STATUS <<\EOF
20678 # If no file are specified by the user, then we need to provide default
20679 # value.  By we need to know if files were specified by the user.
20680 ac_need_defaults=:
20681 while test $# != 0
20682 do
20683   case $1 in
20684   --*=*)
20685     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20686     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20687     shift
20688     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20689     shift
20690     ;;
20691   -*);;
20692   *) # This is not an option, so the user has probably given explicit
20693      # arguments.
20694      ac_need_defaults=false;;
20695   esac
20696
20697   case $1 in
20698   # Handling of the options.
20699 EOF
20700 cat >>$CONFIG_STATUS <<EOF
20701   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20702     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20703     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20704 EOF
20705 cat >>$CONFIG_STATUS <<\EOF
20706   --version | --vers* | -V )
20707     echo "$ac_cs_version"; exit 0 ;;
20708   --he | --h)
20709     # Conflict between --help and --header
20710     { { echo "$as_me:20710: error: ambiguous option: $1
20711 Try \`$0 --help' for more information." >&5
20712 echo "$as_me: error: ambiguous option: $1
20713 Try \`$0 --help' for more information." >&2;}
20714    { (exit 1); exit 1; }; };;
20715   --help | --hel | -h )
20716     echo "$ac_cs_usage"; exit 0 ;;
20717   --debug | --d* | -d )
20718     debug=: ;;
20719   --file | --fil | --fi | --f )
20720     shift
20721     CONFIG_FILES="$CONFIG_FILES $1"
20722     ac_need_defaults=false;;
20723   --header | --heade | --head | --hea )
20724     shift
20725     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20726     ac_need_defaults=false;;
20727
20728   # This is an error.
20729   -*) { { echo "$as_me:20729: error: unrecognized option: $1
20730 Try \`$0 --help' for more information." >&5
20731 echo "$as_me: error: unrecognized option: $1
20732 Try \`$0 --help' for more information." >&2;}
20733    { (exit 1); exit 1; }; } ;;
20734
20735   *) ac_config_targets="$ac_config_targets $1" ;;
20736
20737   esac
20738   shift
20739 done
20740
20741 exec 5>>config.log
20742 cat >&5 << _ACEOF
20743
20744 ## ----------------------- ##
20745 ## Running config.status.  ##
20746 ## ----------------------- ##
20747
20748 This file was extended by $as_me 2.52.20121002, executed with
20749   CONFIG_FILES    = $CONFIG_FILES
20750   CONFIG_HEADERS  = $CONFIG_HEADERS
20751   CONFIG_LINKS    = $CONFIG_LINKS
20752   CONFIG_COMMANDS = $CONFIG_COMMANDS
20753   > $ac_cs_invocation
20754 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20755
20756 _ACEOF
20757 EOF
20758
20759 cat >>$CONFIG_STATUS <<EOF
20760 #
20761 # INIT-COMMANDS section.
20762 #
20763
20764 ### Special initialization commands, used to pass information from the
20765 ### configuration-run into config.status
20766
20767 AWK="$AWK"
20768 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20769 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20770 ECHO_LD="$ECHO_LD"
20771 LDCONFIG="$LDCONFIG"
20772 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20773 LIB_NAME="$LIB_NAME"
20774 LIB_PREFIX="$LIB_PREFIX"
20775 LIB_SUBSETS="$LIB_SUBSETS"
20776 LIB_SUFFIX="$LIB_SUFFIX"
20777 LIB_TRACING="$LIB_TRACING"
20778 LN_S="$LN_S"
20779 MAKE_TERMINFO="$MAKE_TERMINFO"
20780 NCURSES_MAJOR="$NCURSES_MAJOR"
20781 NCURSES_MINOR="$NCURSES_MINOR"
20782 NCURSES_OSPEED="$NCURSES_OSPEED"
20783 NCURSES_PATCH="$NCURSES_PATCH"
20784 SRC_SUBDIRS="$SRC_SUBDIRS"
20785 TERMINFO="$TERMINFO"
20786 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20787 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20788 TICS_NAME="$TICS_NAME"
20789 TIC_PATH="$TIC_PATH"
20790 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20791 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20792 TINFO_NAME="$TINFO_NAME"
20793 TINFO_SUFFIX="$TINFO_SUFFIX"
20794 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20795 WITH_CURSES_H="$with_curses_h"
20796 WITH_ECHO="${enable_echo:=yes}"
20797 WITH_OVERWRITE="$with_overwrite"
20798 cf_LIST_MODELS="$cf_list_models"
20799 cf_cv_abi_version="$cf_cv_abi_version"
20800 cf_cv_do_relink="$cf_cv_do_relink"
20801 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20802 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20803 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20804 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20805 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20806 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20807 cf_cv_rel_version="$cf_cv_rel_version"
20808 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20809 cf_cv_shared_soname='$cf_cv_shared_soname'
20810 cf_cv_shlib_version="$cf_cv_shlib_version"
20811 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20812 cf_cv_system_name="$cf_cv_system_name"
20813 cf_cv_term_driver="$with_term_driver"
20814 cf_with_ada="$cf_with_ada"
20815 cf_with_cxx_binding="$cf_with_cxx_binding"
20816 cf_with_manpages="$cf_with_manpages"
20817 cf_with_tests="$cf_with_tests"
20818 host="$host"
20819 target="$target"
20820
20821 EOF
20822
20823 cat >>$CONFIG_STATUS <<\EOF
20824 for ac_config_target in $ac_config_targets
20825 do
20826   case "$ac_config_target" in
20827   # Handling of arguments.
20828   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20829   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20830   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20831   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20832   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20833   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20834   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20835   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20836   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20837   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20838   *) { { echo "$as_me:20838: error: invalid argument: $ac_config_target" >&5
20839 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20840    { (exit 1); exit 1; }; };;
20841   esac
20842 done
20843
20844 # If the user did not use the arguments to specify the items to instantiate,
20845 # then the envvar interface is used.  Set only those that are not.
20846 # We use the long form for the default assignment because of an extremely
20847 # bizarre bug on SunOS 4.1.3.
20848 if $ac_need_defaults; then
20849   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20850   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20851   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20852 fi
20853
20854 # Create a temporary directory, and hook for its removal unless debugging.
20855 $debug ||
20856 {
20857   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20858   trap '{ (exit 1); exit 1; }' 1 2 13 15
20859 }
20860
20861 # Create a (secure) tmp directory for tmp files.
20862 : ${TMPDIR=/tmp}
20863 {
20864   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20865   test -n "$tmp" && test -d "$tmp"
20866 }  ||
20867 {
20868   tmp=$TMPDIR/cs$$-$RANDOM
20869   (umask 077 && mkdir $tmp)
20870 } ||
20871 {
20872    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20873    { (exit 1); exit 1; }
20874 }
20875
20876 EOF
20877
20878 cat >>$CONFIG_STATUS <<EOF
20879
20880 #
20881 # CONFIG_FILES section.
20882 #
20883
20884 # No need to generate the scripts if there are no CONFIG_FILES.
20885 # This happens for instance when ./config.status config.h
20886 if test -n "\$CONFIG_FILES"; then
20887   # Protect against being on the right side of a sed subst in config.status.
20888   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20889    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20890 s,@SHELL@,$SHELL,;t t
20891 s,@exec_prefix@,$exec_prefix,;t t
20892 s,@prefix@,$prefix,;t t
20893 s,@program_transform_name@,$program_transform_name,;t t
20894 s,@bindir@,$bindir,;t t
20895 s,@sbindir@,$sbindir,;t t
20896 s,@libexecdir@,$libexecdir,;t t
20897 s,@datarootdir@,$datarootdir,;t t
20898 s,@datadir@,$datadir,;t t
20899 s,@sysconfdir@,$sysconfdir,;t t
20900 s,@sharedstatedir@,$sharedstatedir,;t t
20901 s,@localstatedir@,$localstatedir,;t t
20902 s,@libdir@,$libdir,;t t
20903 s,@includedir@,$includedir,;t t
20904 s,@oldincludedir@,$oldincludedir,;t t
20905 s,@infodir@,$infodir,;t t
20906 s,@mandir@,$mandir,;t t
20907 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20908 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20909 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20910 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20911 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20912 s,@build_alias@,$build_alias,;t t
20913 s,@host_alias@,$host_alias,;t t
20914 s,@target_alias@,$target_alias,;t t
20915 s,@ECHO_C@,$ECHO_C,;t t
20916 s,@ECHO_N@,$ECHO_N,;t t
20917 s,@ECHO_T@,$ECHO_T,;t t
20918 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20919 s,@DEFS@,$DEFS,;t t
20920 s,@LIBS@,$LIBS,;t t
20921 s,@top_builddir@,$top_builddir,;t t
20922 s,@EGREP@,$EGREP,;t t
20923 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20924 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20925 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20926 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20927 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20928 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20929 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20930 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20931 s,@build@,$build,;t t
20932 s,@build_cpu@,$build_cpu,;t t
20933 s,@build_vendor@,$build_vendor,;t t
20934 s,@build_os@,$build_os,;t t
20935 s,@host@,$host,;t t
20936 s,@host_cpu@,$host_cpu,;t t
20937 s,@host_vendor@,$host_vendor,;t t
20938 s,@host_os@,$host_os,;t t
20939 s,@target@,$target,;t t
20940 s,@target_cpu@,$target_cpu,;t t
20941 s,@target_vendor@,$target_vendor,;t t
20942 s,@target_os@,$target_os,;t t
20943 s,@CC@,$CC,;t t
20944 s,@CFLAGS@,$CFLAGS,;t t
20945 s,@LDFLAGS@,$LDFLAGS,;t t
20946 s,@CPPFLAGS@,$CPPFLAGS,;t t
20947 s,@ac_ct_CC@,$ac_ct_CC,;t t
20948 s,@EXEEXT@,$EXEEXT,;t t
20949 s,@OBJEXT@,$OBJEXT,;t t
20950 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20951 s,@CPP@,$CPP,;t t
20952 s,@LDCONFIG@,$LDCONFIG,;t t
20953 s,@CXX@,$CXX,;t t
20954 s,@CXXFLAGS@,$CXXFLAGS,;t t
20955 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20956 s,@AWK@,$AWK,;t t
20957 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20958 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20959 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20960 s,@LINT@,$LINT,;t t
20961 s,@LINT_OPTS@,$LINT_OPTS,;t t
20962 s,@LN_S@,$LN_S,;t t
20963 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20964 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20965 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20966 s,@SET_MAKE@,$SET_MAKE,;t t
20967 s,@CTAGS@,$CTAGS,;t t
20968 s,@ETAGS@,$ETAGS,;t t
20969 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20970 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20971 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20972 s,@RANLIB@,$RANLIB,;t t
20973 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20974 s,@LD@,$LD,;t t
20975 s,@ac_ct_LD@,$ac_ct_LD,;t t
20976 s,@AR@,$AR,;t t
20977 s,@ac_ct_AR@,$ac_ct_AR,;t t
20978 s,@ARFLAGS@,$ARFLAGS,;t t
20979 s,@DESTDIR@,$DESTDIR,;t t
20980 s,@BUILD_CC@,$BUILD_CC,;t t
20981 s,@BUILD_CPP@,$BUILD_CPP,;t t
20982 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20983 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20984 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20985 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20986 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20987 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20988 s,@cf_list_models@,$cf_list_models,;t t
20989 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20990 s,@LIBTOOL@,$LIBTOOL,;t t
20991 s,@LT_UNDEF@,$LT_UNDEF,;t t
20992 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20993 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20994 s,@LIB_CREATE@,$LIB_CREATE,;t t
20995 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20996 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20997 s,@LIB_PREP@,$LIB_PREP,;t t
20998 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20999 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
21000 s,@LIB_LINK@,$LIB_LINK,;t t
21001 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
21002 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
21003 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
21004 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
21005 s,@TICS_NAME@,$TICS_NAME,;t t
21006 s,@TINFO_NAME@,$TINFO_NAME,;t t
21007 s,@LIB_NAME@,$LIB_NAME,;t t
21008 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
21009 s,@CC_G_OPT@,$CC_G_OPT,;t t
21010 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
21011 s,@LD_MODEL@,$LD_MODEL,;t t
21012 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
21013 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
21014 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
21015 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
21016 s,@LINK_PROGS@,$LINK_PROGS,;t t
21017 s,@LINK_TESTS@,$LINK_TESTS,;t t
21018 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21019 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
21020 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
21021 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
21022 s,@RPATH_LIST@,$RPATH_LIST,;t t
21023 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21024 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
21025 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
21026 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
21027 s,@XTERM_KBS@,$XTERM_KBS,;t t
21028 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
21029 s,@TERMINFO@,$TERMINFO,;t t
21030 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
21031 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
21032 s,@TERMPATH@,$TERMPATH,;t t
21033 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
21034 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
21035 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
21036 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
21037 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
21038 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
21039 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
21040 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
21041 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
21042 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
21043 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
21044 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
21045 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
21046 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
21047 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
21048 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
21049 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
21050 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
21051 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
21052 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
21053 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
21054 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
21055 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
21056 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
21057 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
21058 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
21059 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
21060 s,@PTHREAD@,$PTHREAD,;t t
21061 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
21062 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
21063 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
21064 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
21065 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
21066 s,@ECHO_LT@,$ECHO_LT,;t t
21067 s,@ECHO_LD@,$ECHO_LD,;t t
21068 s,@RULE_CC@,$RULE_CC,;t t
21069 s,@SHOW_CC@,$SHOW_CC,;t t
21070 s,@ECHO_CC@,$ECHO_CC,;t t
21071 s,@ECHO_LINK@,$ECHO_LINK,;t t
21072 s,@ADAFLAGS@,$ADAFLAGS,;t t
21073 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21074 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
21075 s,@ADA_TRACE@,$ADA_TRACE,;t t
21076 s,@MATH_LIB@,$MATH_LIB,;t t
21077 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
21078 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
21079 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
21080 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
21081 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
21082 s,@TEST_LIBS@,$TEST_LIBS,;t t
21083 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
21084 s,@CXXCPP@,$CXXCPP,;t t
21085 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
21086 s,@CXX_AR@,$CXX_AR,;t t
21087 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
21088 s,@CXXLIBS@,$CXXLIBS,;t t
21089 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
21090 s,@gnat_exists@,$gnat_exists,;t t
21091 s,@M4_exists@,$M4_exists,;t t
21092 s,@cf_ada_make@,$cf_ada_make,;t t
21093 s,@cf_compile_generics@,$cf_compile_generics,;t t
21094 s,@cf_generic_objects@,$cf_generic_objects,;t t
21095 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
21096 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
21097 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
21098 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
21099 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
21100 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
21101 s,@cf_ada_package@,$cf_ada_package,;t t
21102 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
21103 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
21104 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
21105 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
21106 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
21107 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
21108 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
21109 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
21110 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
21111 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
21112 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
21113 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
21114 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
21115 s,@TICS_LIBS@,$TICS_LIBS,;t t
21116 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
21117 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
21118 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
21119 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
21120 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
21121 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
21122 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
21123 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
21124 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
21125 s,@TICS_LIST@,$TICS_LIST,;t t
21126 s,@TINFO_LIST@,$TINFO_LIST,;t t
21127 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
21128 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
21129 s,@TEST_ARGS@,$TEST_ARGS,;t t
21130 s,@TEST_DEPS@,$TEST_DEPS,;t t
21131 s,@TEST_ARG2@,$TEST_ARG2,;t t
21132 s,@TEST_DEP2@,$TEST_DEP2,;t t
21133 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
21134 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
21135 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
21136 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
21137 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
21138 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
21139 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
21140 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
21141 s,@cross_compiling@,$cross_compiling,;t t
21142 s,@TIC_PATH@,$TIC_PATH,;t t
21143 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
21144 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
21145 CEOF
21146
21147 EOF
21148
21149   cat >>$CONFIG_STATUS <<\EOF
21150   # Split the substitutions into bite-sized pieces for seds with
21151   # small command number limits, like on Digital OSF/1 and HP-UX.
21152   ac_max_sed_lines=48
21153   ac_sed_frag=1 # Number of current file.
21154   ac_beg=1 # First line for current file.
21155   ac_end=$ac_max_sed_lines # Line after last line for current file.
21156   ac_more_lines=:
21157   ac_sed_cmds=
21158   while $ac_more_lines; do
21159     if test $ac_beg -gt 1; then
21160       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21161     else
21162       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21163     fi
21164     if test ! -s $tmp/subs.frag; then
21165       ac_more_lines=false
21166     else
21167       # The purpose of the label and of the branching condition is to
21168       # speed up the sed processing (if there are no `@' at all, there
21169       # is no need to browse any of the substitutions).
21170       # These are the two extra sed commands mentioned above.
21171       (echo ':t
21172   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21173       if test -z "$ac_sed_cmds"; then
21174         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21175       else
21176         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21177       fi
21178       ac_sed_frag=`expr $ac_sed_frag + 1`
21179       ac_beg=$ac_end
21180       ac_end=`expr $ac_end + $ac_max_sed_lines`
21181     fi
21182   done
21183   if test -z "$ac_sed_cmds"; then
21184     ac_sed_cmds=cat
21185   fi
21186 fi # test -n "$CONFIG_FILES"
21187
21188 EOF
21189 cat >>$CONFIG_STATUS <<\EOF
21190 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21191   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21192   case $ac_file in
21193   - | *:- | *:-:* ) # input from stdin
21194         cat >$tmp/stdin
21195         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21196         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21197   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21198         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21199   * )   ac_file_in=$ac_file.in ;;
21200   esac
21201
21202   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21203   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21204          X"$ac_file" : 'X\(//\)[^/]' \| \
21205          X"$ac_file" : 'X\(//\)$' \| \
21206          X"$ac_file" : 'X\(/\)' \| \
21207          .     : '\(.\)' 2>/dev/null ||
21208 echo X"$ac_file" |
21209     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21210           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21211           /^X\(\/\/\)$/{ s//\1/; q; }
21212           /^X\(\/\).*/{ s//\1/; q; }
21213           s/.*/./; q'`
21214   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21215     { case "$ac_dir" in
21216   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21217   *)                      as_incr_dir=.;;
21218 esac
21219 as_dummy="$ac_dir"
21220 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21221   case $as_mkdir_dir in
21222     # Skip DOS drivespec
21223     ?:) as_incr_dir=$as_mkdir_dir ;;
21224     *)
21225       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21226       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21227     ;;
21228   esac
21229 done; }
21230
21231     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21232     # A "../" for each directory in $ac_dir_suffix.
21233     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21234   else
21235     ac_dir_suffix= ac_dots=
21236   fi
21237
21238   case $srcdir in
21239   .)  ac_srcdir=.
21240       if test -z "$ac_dots"; then
21241          ac_top_srcdir=.
21242       else
21243          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21244       fi ;;
21245   [\\/]* | ?:[\\/]* )
21246       ac_srcdir=$srcdir$ac_dir_suffix;
21247       ac_top_srcdir=$srcdir ;;
21248   *) # Relative path.
21249     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21250     ac_top_srcdir=$ac_dots$srcdir ;;
21251   esac
21252
21253   case $INSTALL in
21254   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21255   *) ac_INSTALL=$ac_dots$INSTALL ;;
21256   esac
21257
21258   if test x"$ac_file" != x-; then
21259     { echo "$as_me:21259: creating $ac_file" >&5
21260 echo "$as_me: creating $ac_file" >&6;}
21261     rm -f "$ac_file"
21262   fi
21263   # Let's still pretend it is `configure' which instantiates (i.e., don't
21264   # use $as_me), people would be surprised to read:
21265   #    /* config.h.  Generated automatically by config.status.  */
21266   configure_input="Generated automatically from `echo $ac_file_in |
21267                                                  sed 's,.*/,,'` by configure."
21268
21269   # First look for the input files in the build tree, otherwise in the
21270   # src tree.
21271   ac_file_inputs=`IFS=:
21272     for f in $ac_file_in; do
21273       case $f in
21274       -) echo $tmp/stdin ;;
21275       [\\/$]*)
21276          # Absolute (can't be DOS-style, as IFS=:)
21277          test -f "$f" || { { echo "$as_me:21277: error: cannot find input file: $f" >&5
21278 echo "$as_me: error: cannot find input file: $f" >&2;}
21279    { (exit 1); exit 1; }; }
21280          echo $f;;
21281       *) # Relative
21282          if test -f "$f"; then
21283            # Build tree
21284            echo $f
21285          elif test -f "$srcdir/$f"; then
21286            # Source tree
21287            echo $srcdir/$f
21288          else
21289            # /dev/null tree
21290            { { echo "$as_me:21290: error: cannot find input file: $f" >&5
21291 echo "$as_me: error: cannot find input file: $f" >&2;}
21292    { (exit 1); exit 1; }; }
21293          fi;;
21294       esac
21295     done` || { (exit 1); exit 1; }
21296 EOF
21297 cat >>$CONFIG_STATUS <<\EOF
21298   ac_warn_datarootdir=no
21299   if test x"$ac_file" != x-; then
21300     for ac_item in $ac_file_inputs
21301     do
21302       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21303       if test -n "$ac_seen"; then
21304         ac_used=`grep '@datarootdir@' $ac_item`
21305         if test -z "$ac_used"; then
21306           { echo "$as_me:21306: WARNING: datarootdir was used implicitly but not set:
21307 $ac_seen" >&5
21308 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21309 $ac_seen" >&2;}
21310           ac_warn_datarootdir=yes
21311         fi
21312       fi
21313       ac_seen=`grep '${datarootdir}' $ac_item`
21314       if test -n "$ac_seen"; then
21315         { echo "$as_me:21315: WARNING: datarootdir was used explicitly but not set:
21316 $ac_seen" >&5
21317 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21318 $ac_seen" >&2;}
21319         ac_warn_datarootdir=yes
21320       fi
21321     done
21322   fi
21323
21324 if test "x$ac_warn_datarootdir" = xyes; then
21325   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21326 fi
21327
21328 EOF
21329 cat >>$CONFIG_STATUS <<EOF
21330   sed "$ac_vpsub
21331 $extrasub
21332 EOF
21333 cat >>$CONFIG_STATUS <<\EOF
21334 :t
21335 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21336 s,@configure_input@,$configure_input,;t t
21337 s,@srcdir@,$ac_srcdir,;t t
21338 s,@top_srcdir@,$ac_top_srcdir,;t t
21339 s,@INSTALL@,$ac_INSTALL,;t t
21340 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21341   rm -f $tmp/stdin
21342   if test x"$ac_file" != x-; then
21343     cp $tmp/out $ac_file
21344
21345     for ac_name in prefix exec_prefix datarootdir
21346     do
21347         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21348         if test -n "$ac_seen"; then
21349             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21350             if test -z "$ac_init"; then
21351               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21352               { echo "$as_me:21352: WARNING: Variable $ac_name is used but was not set:
21353 $ac_seen" >&5
21354 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21355 $ac_seen" >&2;}
21356             fi
21357         fi
21358     done
21359     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21360     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21361     if test -s $tmp/out; then
21362       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21363       { echo "$as_me:21363: WARNING: Some variables may not be substituted:
21364 $ac_seen" >&5
21365 echo "$as_me: WARNING: Some variables may not be substituted:
21366 $ac_seen" >&2;}
21367     fi
21368   else
21369     cat $tmp/out
21370   fi
21371   rm -f $tmp/out
21372
21373 done
21374 EOF
21375 cat >>$CONFIG_STATUS <<\EOF
21376
21377 #
21378 # CONFIG_HEADER section.
21379 #
21380
21381 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21382 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21383 #
21384 # ac_d sets the value in "#define NAME VALUE" lines.
21385 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21386 ac_dB='[        ].*$,\1#\2'
21387 ac_dC=' '
21388 ac_dD=',;t'
21389 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21390 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21391 ac_iB='\([      ]\),\1#\2define\3'
21392 ac_iC=' '
21393 ac_iD='\4,;t'
21394 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21395 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21396 ac_uB='$,\1#\2define\3'
21397 ac_uC=' '
21398 ac_uD=',;t'
21399
21400 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21401   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21402   case $ac_file in
21403   - | *:- | *:-:* ) # input from stdin
21404         cat >$tmp/stdin
21405         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21406         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21407   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21408         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21409   * )   ac_file_in=$ac_file.in ;;
21410   esac
21411
21412   test x"$ac_file" != x- && { echo "$as_me:21412: creating $ac_file" >&5
21413 echo "$as_me: creating $ac_file" >&6;}
21414
21415   # First look for the input files in the build tree, otherwise in the
21416   # src tree.
21417   ac_file_inputs=`IFS=:
21418     for f in $ac_file_in; do
21419       case $f in
21420       -) echo $tmp/stdin ;;
21421       [\\/$]*)
21422          # Absolute (can't be DOS-style, as IFS=:)
21423          test -f "$f" || { { echo "$as_me:21423: error: cannot find input file: $f" >&5
21424 echo "$as_me: error: cannot find input file: $f" >&2;}
21425    { (exit 1); exit 1; }; }
21426          echo $f;;
21427       *) # Relative
21428          if test -f "$f"; then
21429            # Build tree
21430            echo $f
21431          elif test -f "$srcdir/$f"; then
21432            # Source tree
21433            echo $srcdir/$f
21434          else
21435            # /dev/null tree
21436            { { echo "$as_me:21436: error: cannot find input file: $f" >&5
21437 echo "$as_me: error: cannot find input file: $f" >&2;}
21438    { (exit 1); exit 1; }; }
21439          fi;;
21440       esac
21441     done` || { (exit 1); exit 1; }
21442   # Remove the trailing spaces.
21443   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21444
21445 EOF
21446
21447 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21448 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21449 # be either 'cat' or 'sort'.
21450 cat confdefs.h | uniq >conftest.vals
21451
21452 # Break up conftest.vals because some shells have a limit on
21453 # the size of here documents, and old seds have small limits too.
21454
21455 rm -f conftest.tail
21456 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21457 while grep . conftest.vals >/dev/null
21458 do
21459   # Write chunks of a limited-size here document to conftest.frag.
21460   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21461   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21462   echo 'CEOF' >> $CONFIG_STATUS
21463   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21464   rm -f conftest.vals
21465   mv conftest.tail conftest.vals
21466 done
21467 rm -f conftest.vals
21468
21469 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21470 # marker @DEFS@.
21471 echo '  cat >> conftest.edit <<CEOF
21472 /@DEFS@/r conftest.frag
21473 /@DEFS@/d
21474 CEOF
21475 sed -f conftest.edit $tmp/in > $tmp/out
21476 rm -f $tmp/in
21477 mv $tmp/out $tmp/in
21478 rm -f conftest.edit conftest.frag
21479 ' >> $CONFIG_STATUS
21480
21481 cat >>$CONFIG_STATUS <<\EOF
21482   # Let's still pretend it is `configure' which instantiates (i.e., don't
21483   # use $as_me), people would be surprised to read:
21484   #    /* config.h.  Generated automatically by config.status.  */
21485   if test x"$ac_file" = x-; then
21486     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21487   else
21488     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21489   fi
21490   cat $tmp/in >>$tmp/config.h
21491   rm -f $tmp/in
21492   if test x"$ac_file" != x-; then
21493     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21494       { echo "$as_me:21494: $ac_file is unchanged" >&5
21495 echo "$as_me: $ac_file is unchanged" >&6;}
21496     else
21497       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21498          X"$ac_file" : 'X\(//\)[^/]' \| \
21499          X"$ac_file" : 'X\(//\)$' \| \
21500          X"$ac_file" : 'X\(/\)' \| \
21501          .     : '\(.\)' 2>/dev/null ||
21502 echo X"$ac_file" |
21503     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21504           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21505           /^X\(\/\/\)$/{ s//\1/; q; }
21506           /^X\(\/\).*/{ s//\1/; q; }
21507           s/.*/./; q'`
21508       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21509         { case "$ac_dir" in
21510   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21511   *)                      as_incr_dir=.;;
21512 esac
21513 as_dummy="$ac_dir"
21514 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21515   case $as_mkdir_dir in
21516     # Skip DOS drivespec
21517     ?:) as_incr_dir=$as_mkdir_dir ;;
21518     *)
21519       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21520       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21521     ;;
21522   esac
21523 done; }
21524
21525       fi
21526       rm -f $ac_file
21527       mv $tmp/config.h $ac_file
21528     fi
21529   else
21530     cat $tmp/config.h
21531     rm -f $tmp/config.h
21532   fi
21533 done
21534 EOF
21535 cat >>$CONFIG_STATUS <<\EOF
21536 #
21537 # CONFIG_COMMANDS section.
21538 #
21539 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21540   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21541   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21542
21543   case $ac_dest in
21544     default )
21545 if test "x$cf_with_tests" != xno ; then
21546
21547 for cf_dir in test
21548 do
21549         if test ! -d $srcdir/$cf_dir; then
21550                 continue
21551         elif test -f $srcdir/$cf_dir/programs; then
21552                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21553         fi
21554 done
21555
21556 fi
21557
21558 cf_prefix=$LIB_PREFIX
21559
21560 case $cf_cv_shlib_version in #(vi
21561 cygdll|mingw)
21562         TINFO_NAME=$TINFO_ARG_SUFFIX
21563         TINFO_SUFFIX=.dll
21564         ;;
21565 esac
21566
21567 if test -n "$TINFO_SUFFIX" ; then
21568         case $TINFO_SUFFIX in
21569         tw*)
21570                 TINFO_NAME="${TINFO_NAME}tw"
21571                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21572                 ;;
21573         t*)
21574                 TINFO_NAME="${TINFO_NAME}t"
21575                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21576                 ;;
21577         w*)
21578                 TINFO_NAME="${TINFO_NAME}w"
21579                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21580                 ;;
21581         esac
21582 fi
21583
21584 for cf_dir in $SRC_SUBDIRS
21585 do
21586         if test ! -d $srcdir/$cf_dir ; then
21587                 continue
21588         elif test -f $srcdir/$cf_dir/modules; then
21589
21590                 SHARED_LIB=
21591                 Libs_To_Make=
21592                 for cf_item in $cf_LIST_MODELS
21593                 do
21594
21595         case $cf_item in #(vi
21596         libtool) #(vi
21597                 cf_suffix='.la'
21598                 cf_depsuf=$cf_suffix
21599                 ;;
21600         normal) #(vi
21601                 cf_suffix='.a'
21602                 cf_depsuf=$cf_suffix
21603                 ;;
21604         debug) #(vi
21605                 cf_suffix='_g.a'
21606                 cf_depsuf=$cf_suffix
21607                 ;;
21608         profile) #(vi
21609                 cf_suffix='_p.a'
21610                 cf_depsuf=$cf_suffix
21611                 ;;
21612         shared) #(vi
21613                 case $cf_cv_system_name in
21614                 aix[5-7]*) #(vi
21615                         cf_suffix='.a'
21616                         cf_depsuf=$cf_suffix
21617                         ;;
21618                 cygwin*|mingw*) #(vi
21619                         cf_suffix='.dll'
21620                         cf_depsuf='.dll.a'
21621                         ;;
21622                 darwin*) #(vi
21623                         cf_suffix='.dylib'
21624                         cf_depsuf=$cf_suffix
21625                         ;;
21626                 hpux*) #(vi
21627                         case $target in
21628                         ia64*) #(vi
21629                                 cf_suffix='.so'
21630                                 cf_depsuf=$cf_suffix
21631                                 ;;
21632                         *) #(vi
21633                                 cf_suffix='.sl'
21634                                 cf_depsuf=$cf_suffix
21635                                 ;;
21636                         esac
21637                         ;;
21638                 *)      cf_suffix='.so'
21639                         cf_depsuf=$cf_suffix
21640                         ;;
21641                 esac
21642         esac
21643         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21644         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21645
21646                         if test $cf_item = shared ; then
21647                         if test "$cf_cv_do_symlinks" = yes ; then
21648                                 case "$cf_cv_shlib_version" in #(vi
21649                                 rel) #(vi
21650                                         case "$cf_cv_system_name" in #(vi
21651                                         darwin*)
21652                                         case .${LIB_SUFFIX} in
21653                                         .tw*)
21654                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21655                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21656                                                 ;;
21657                                         .t*)
21658                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21659                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21660                                                 ;;
21661                                         .w*)
21662                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21663                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21664                                                 ;;
21665                                         *)
21666                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21667                                                 ;;
21668                                         esac
21669                                         ;; #(vi
21670                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21671                                         esac
21672                                         ;;
21673                                 abi)
21674                                         case "$cf_cv_system_name" in #(vi
21675                                         darwin*)
21676                                         case .${LIB_SUFFIX} in
21677                                         .tw*)
21678                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21679                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21680                                                 ;;
21681                                         .t*)
21682                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21683                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21684                                                 ;;
21685                                         .w*)
21686                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21687                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21688                                                 ;;
21689                                         *)
21690                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21691                                                 ;;
21692                                         esac
21693                                         ;; #(vi
21694                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21695                                         esac
21696                                         ;;
21697                                 esac
21698                         fi
21699                         # cygwin needs import library, and has unique naming convention
21700                         # use autodetected ${cf_prefix} for import lib and static lib, but
21701                         # use 'cyg' prefix for shared lib.
21702                         case $cf_cv_shlib_version in #(vi
21703                         cygdll) #(vi
21704                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21705                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21706                                 continue
21707                                 ;;
21708                         mingw)
21709                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21710                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21711                                 continue
21712                                 ;;
21713                         esac
21714                         fi
21715                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21716                 done
21717
21718                 if test $cf_dir = ncurses ; then
21719                         cf_subsets="$LIB_SUBSETS"
21720                         cf_r_parts="$cf_subsets"
21721                         cf_liblist="$Libs_To_Make"
21722
21723                         while test -n "$cf_r_parts"
21724                         do
21725                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21726                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21727                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21728                                         cf_item=
21729                                         case $cf_l_parts in #(vi
21730                                         *termlib*) #(vi
21731                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21732                                                 ;;
21733                                         *ticlib*)
21734                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21735                                                 ;;
21736                                         *)
21737                                                 break
21738                                                 ;;
21739                                         esac
21740                                         if test -n "$cf_item"; then
21741                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21742                                         fi
21743                                 else
21744                                         break
21745                                 fi
21746                         done
21747                 else
21748                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21749                 fi
21750
21751                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21752                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21753                         $cf_dir/Makefile >$cf_dir/Makefile.out
21754                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21755
21756                 $AWK -f $srcdir/mk-0th.awk \
21757                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21758                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21759
21760                 for cf_subset in $cf_subsets
21761                 do
21762                         cf_subdirs=
21763                         for cf_item in $cf_LIST_MODELS
21764                         do
21765                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21766
21767 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21768
21769         case $cf_item in #(vi
21770         libtool) #(vi
21771                 cf_suffix='.la'
21772                 cf_depsuf=$cf_suffix
21773                 ;;
21774         normal) #(vi
21775                 cf_suffix='.a'
21776                 cf_depsuf=$cf_suffix
21777                 ;;
21778         debug) #(vi
21779                 cf_suffix='_g.a'
21780                 cf_depsuf=$cf_suffix
21781                 ;;
21782         profile) #(vi
21783                 cf_suffix='_p.a'
21784                 cf_depsuf=$cf_suffix
21785                 ;;
21786         shared) #(vi
21787                 case $cf_cv_system_name in
21788                 aix[5-7]*) #(vi
21789                         cf_suffix='.a'
21790                         cf_depsuf=$cf_suffix
21791                         ;;
21792                 cygwin*|mingw*) #(vi
21793                         cf_suffix='.dll'
21794                         cf_depsuf='.dll.a'
21795                         ;;
21796                 darwin*) #(vi
21797                         cf_suffix='.dylib'
21798                         cf_depsuf=$cf_suffix
21799                         ;;
21800                 hpux*) #(vi
21801                         case $target in
21802                         ia64*) #(vi
21803                                 cf_suffix='.so'
21804                                 cf_depsuf=$cf_suffix
21805                                 ;;
21806                         *) #(vi
21807                                 cf_suffix='.sl'
21808                                 cf_depsuf=$cf_suffix
21809                                 ;;
21810                         esac
21811                         ;;
21812                 *)      cf_suffix='.so'
21813                         cf_depsuf=$cf_suffix
21814                         ;;
21815                 esac
21816         esac
21817         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21818         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21819
21820         case $cf_item in
21821         libtool) cf_subdir='obj_lo'  ;;
21822         normal)  cf_subdir='objects' ;;
21823         debug)   cf_subdir='obj_g' ;;
21824         profile) cf_subdir='obj_p' ;;
21825         shared)
21826                 case $cf_cv_system_name in #(vi
21827                 cygwin) #(vi
21828                         cf_subdir='objects' ;;
21829                 *)
21830                         cf_subdir='obj_s' ;;
21831                 esac
21832         esac
21833
21834                         # Test for case where we build libtinfo with a different name.
21835                         cf_libname=$cf_dir
21836                         if test $cf_dir = ncurses ; then
21837                                 case $cf_subset in
21838                                 *base*)
21839                                         cf_libname=${cf_libname}$LIB_SUFFIX
21840                                         ;;
21841                                 *termlib*)
21842                                         cf_libname=$TINFO_LIB_SUFFIX
21843                                         ;;
21844                                 ticlib*)
21845                                         cf_libname=$TICS_LIB_SUFFIX
21846                                         ;;
21847                                 esac
21848                         else
21849                                 cf_libname=${cf_libname}$LIB_SUFFIX
21850                         fi
21851                         if test -n "${DFT_ARG_SUFFIX}" ; then
21852                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21853                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21854                         fi
21855
21856                         # These dependencies really are for development, not
21857                         # builds, but they are useful in porting, too.
21858                         cf_depend="../include/ncurses_cfg.h"
21859                         if test "$srcdir" = "."; then
21860                                 cf_reldir="."
21861                         else
21862                                 cf_reldir="\${srcdir}"
21863                         fi
21864
21865                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21866                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21867                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21868                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21869                         fi
21870
21871                         cf_dir_suffix=
21872                         old_cf_suffix="$cf_suffix"
21873                         if test "$cf_cv_shlib_version_infix" = yes ; then
21874                         if test -n "$LIB_SUFFIX" ; then
21875                                 case $LIB_SUFFIX in
21876                                 tw*)
21877                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21878                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21879                                         cf_dir_suffix=tw
21880                                         ;;
21881                                 t*)
21882                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21883                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21884                                         cf_dir_suffix=t
21885                                         ;;
21886                                 w*)
21887                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21888                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21889                                         cf_dir_suffix=w
21890                                         ;;
21891                                 esac
21892                         fi
21893                         fi
21894
21895                         $AWK -f $srcdir/mk-1st.awk \
21896                                 name=${cf_libname}${cf_dir_suffix} \
21897                                 traces=$LIB_TRACING \
21898                                 MODEL=$cf_ITEM \
21899                                 model=$cf_subdir \
21900                                 prefix=$cf_prefix \
21901                                 suffix=$cf_suffix \
21902                                 subset=$cf_subset \
21903                                 driver=$cf_cv_term_driver \
21904                                 SymLink="$LN_S" \
21905                                 TermlibRoot=$TINFO_NAME \
21906                                 TermlibSuffix=$TINFO_SUFFIX \
21907                                 ShlibVer=$cf_cv_shlib_version \
21908                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21909                                 ReLink=${cf_cv_do_relink:-no} \
21910                                 DoLinks=$cf_cv_do_symlinks \
21911                                 rmSoLocs=$cf_cv_rm_so_locs \
21912                                 ldconfig="$LDCONFIG" \
21913                                 overwrite=$WITH_OVERWRITE \
21914                                 depend="$cf_depend" \
21915                                 host="$host" \
21916                                 libtool_version="$LIBTOOL_VERSION" \
21917                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21918
21919                         cf_suffix="$old_cf_suffix"
21920
21921                         for cf_subdir2 in $cf_subdirs lib
21922                         do
21923                                 test $cf_subdir = $cf_subdir2 && break
21924                         done
21925                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21926                         $AWK -f $srcdir/mk-2nd.awk \
21927                                 name=$cf_dir \
21928                                 traces=$LIB_TRACING \
21929                                 MODEL=$cf_ITEM \
21930                                 model=$cf_subdir \
21931                                 subset=$cf_subset \
21932                                 srcdir=$srcdir \
21933                                 echo=$WITH_ECHO \
21934                                 crenames=$cf_cv_prog_CC_c_o \
21935                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21936                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21937                         cf_subdirs="$cf_subdirs $cf_subdir"
21938                         done
21939                 done
21940         fi
21941
21942         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21943 done
21944
21945 for cf_dir in $SRC_SUBDIRS
21946 do
21947         if test ! -d $srcdir/$cf_dir ; then
21948                 continue
21949         fi
21950
21951         if test -f $cf_dir/Makefile ; then
21952                 case "$cf_dir" in
21953                 Ada95) #(vi
21954                         echo 'libs \' >> Makefile
21955                         echo 'install.libs \' >> Makefile
21956                         echo 'uninstall.libs ::' >> Makefile
21957                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
21958                         ;;
21959                 esac
21960         fi
21961
21962         if test -f $srcdir/$cf_dir/modules; then
21963                 echo >> Makefile
21964                 if test -f $srcdir/$cf_dir/headers; then
21965 cat >> Makefile <<CF_EOF
21966 install.includes \\
21967 uninstall.includes \\
21968 CF_EOF
21969                 fi
21970 if test "$cf_dir" != "c++" ; then
21971 echo 'lint \' >> Makefile
21972 fi
21973 cat >> Makefile <<CF_EOF
21974 libs \\
21975 lintlib \\
21976 install.libs \\
21977 uninstall.libs \\
21978 install.$cf_dir \\
21979 uninstall.$cf_dir ::
21980         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21981 CF_EOF
21982         elif test -f $srcdir/$cf_dir/headers; then
21983 cat >> Makefile <<CF_EOF
21984
21985 libs \\
21986 install.libs \\
21987 uninstall.libs \\
21988 install.includes \\
21989 uninstall.includes ::
21990         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21991 CF_EOF
21992 fi
21993 done
21994
21995 cat >> Makefile <<CF_EOF
21996
21997 install.libs uninstall.libs \\
21998 install.data uninstall.data ::
21999 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
22000 CF_EOF
22001
22002 if test "x$cf_with_manpages" = xyes; then
22003 cat >> Makefile <<CF_EOF
22004
22005 install.man \\
22006 uninstall.man ::
22007         cd man && \${MAKE} \${TOP_MFLAGS} \$@
22008 CF_EOF
22009 fi
22010
22011 cat >> Makefile <<CF_EOF
22012
22013 distclean ::
22014         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
22015         rm -f headers.sh headers.sed mk_shared_lib.sh
22016         rm -f edit_man.* man_alias.*
22017         rm -rf \${DIRS_TO_MAKE}
22018 CF_EOF
22019
22020 # Special case: tack's manpage lives in its own directory.
22021 if test "x$cf_with_manpages" = xyes; then
22022 if test -d tack ; then
22023 if test -f $srcdir/$tack.h; then
22024 cat >> Makefile <<CF_EOF
22025
22026 install.man \\
22027 uninstall.man ::
22028         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
22029 CF_EOF
22030 fi
22031 fi
22032 fi
22033
22034 rm -f headers.sed headers.sh
22035
22036 echo creating headers.sh
22037 cat >headers.sh <<CF_EOF
22038 #! /bin/sh
22039 # This shell script is generated by the 'configure' script.  It is invoked in a
22040 # subdirectory of the build tree.  It generates a sed-script in the parent
22041 # directory that is used to adjust includes for header files that reside in a
22042 # subdirectory of /usr/include, etc.
22043 PRG=""
22044 while test \$# != 3
22045 do
22046 PRG="\$PRG \$1"; shift
22047 done
22048 DST=\$1
22049 REF=\$2
22050 SRC=\$3
22051 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
22052 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
22053 echo installing \$SRC in \$DST
22054 CF_EOF
22055
22056 if test $WITH_CURSES_H = yes; then
22057         cat >>headers.sh <<CF_EOF
22058 case \$DST in
22059 /*/include/*)
22060         END=\`basename \$DST\`
22061         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22062         do
22063                 NAME=\`basename \$i\`
22064                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22065         done
22066         ;;
22067 *)
22068         echo "" >> \$TMPSED
22069         ;;
22070 esac
22071 CF_EOF
22072
22073 else
22074         cat >>headers.sh <<CF_EOF
22075 case \$DST in
22076 /*/include/*)
22077         END=\`basename \$DST\`
22078         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
22079         do
22080                 NAME=\`basename \$i\`
22081                 if test "\$NAME" = "curses.h"
22082                 then
22083                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22084                         NAME=ncurses.h
22085                 fi
22086                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
22087         done
22088         ;;
22089 *)
22090         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
22091         ;;
22092 esac
22093 CF_EOF
22094 fi
22095 cat >>headers.sh <<CF_EOF
22096 rm -f \$TMPSRC
22097 sed -f \$TMPSED \$SRC > \$TMPSRC
22098 NAME=\`basename \$SRC\`
22099 CF_EOF
22100 if test $WITH_CURSES_H != yes; then
22101         cat >>headers.sh <<CF_EOF
22102 test "\$NAME" = "curses.h" && NAME=ncurses.h
22103 CF_EOF
22104 fi
22105 cat >>headers.sh <<CF_EOF
22106 # Just in case someone gzip'd manpages, remove the conflicting copy.
22107 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
22108
22109 eval \$PRG \$TMPSRC \$DST/\$NAME
22110 rm -f \$TMPSRC \$TMPSED
22111 CF_EOF
22112
22113 chmod 0755 headers.sh
22114
22115 for cf_dir in $SRC_SUBDIRS
22116 do
22117         if test ! -d $srcdir/$cf_dir ; then
22118                 continue
22119         fi
22120
22121         if test -f $srcdir/$cf_dir/headers; then
22122                 $AWK -f $srcdir/mk-hdr.awk \
22123                         subset="$LIB_SUBSETS" \
22124                         compat="$WITH_CURSES_H" \
22125                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
22126         fi
22127
22128         if test -f $srcdir/$cf_dir/modules; then
22129                 if test "$cf_dir" != "c++" ; then
22130                         cat >>$cf_dir/Makefile <<"CF_EOF"
22131 depend : ${AUTO_SRC}
22132         makedepend -- ${CPPFLAGS} -- ${C_SRC}
22133
22134 # DO NOT DELETE THIS LINE -- make depend depends on it.
22135 CF_EOF
22136                 fi
22137         fi
22138 done
22139
22140 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
22141 if test -z "$USE_OLD_MAKERULES" ; then
22142         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
22143 fi
22144 fi
22145  ;;
22146   esac
22147 done
22148 EOF
22149
22150 cat >>$CONFIG_STATUS <<\EOF
22151
22152 { (exit 0); exit 0; }
22153 EOF
22154 chmod +x $CONFIG_STATUS
22155 ac_clean_files=$ac_clean_files_save
22156
22157 # configure is writing to config.log, and then calls config.status.
22158 # config.status does its own redirection, appending to config.log.
22159 # Unfortunately, on DOS this fails, as config.log is still kept open
22160 # by configure, so config.status won't be able to write to it; its
22161 # output is simply discarded.  So we exec the FD to /dev/null,
22162 # effectively closing config.log, so it can be properly (re)opened and
22163 # appended to by config.status.  When coming back to configure, we
22164 # need to make the FD available again.
22165 if test "$no_create" != yes; then
22166   ac_cs_success=:
22167   exec 5>/dev/null
22168   $SHELL $CONFIG_STATUS || ac_cs_success=false
22169   exec 5>>config.log
22170   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22171   # would make configure fail if this is the last instruction.
22172   $ac_cs_success || { (exit 1); exit 1; }
22173 fi
22174 ${MAKE:-make} preinstall