]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20121201
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.560 .
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 strstr \
15242 tcgetpgrp \
15243 times \
15244 vsnprintf \
15245
15246 do
15247 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15248 echo "$as_me:15248: checking for $ac_func" >&5
15249 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15250 if eval "test \"\${$as_ac_var+set}\" = set"; then
15251   echo $ECHO_N "(cached) $ECHO_C" >&6
15252 else
15253   cat >conftest.$ac_ext <<_ACEOF
15254 #line 15254 "configure"
15255 #include "confdefs.h"
15256 /* System header to define __stub macros and hopefully few prototypes,
15257     which can conflict with char $ac_func (); below.  */
15258 #include <assert.h>
15259 /* Override any gcc2 internal prototype to avoid an error.  */
15260 #ifdef __cplusplus
15261 extern "C"
15262 #endif
15263 /* We use char because int might match the return type of a gcc2
15264    builtin and then its argument prototype would still apply.  */
15265 char $ac_func ();
15266 char (*f) ();
15267
15268 int
15269 main ()
15270 {
15271 /* The GNU C library defines this for functions which it implements
15272     to always fail with ENOSYS.  Some functions are actually named
15273     something starting with __ and the normal name is an alias.  */
15274 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15275 choke me
15276 #else
15277 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15278 #endif
15279
15280   ;
15281   return 0;
15282 }
15283 _ACEOF
15284 rm -f conftest.$ac_objext conftest$ac_exeext
15285 if { (eval echo "$as_me:15285: \"$ac_link\"") >&5
15286   (eval $ac_link) 2>&5
15287   ac_status=$?
15288   echo "$as_me:15288: \$? = $ac_status" >&5
15289   (exit $ac_status); } &&
15290          { ac_try='test -s conftest$ac_exeext'
15291   { (eval echo "$as_me:15291: \"$ac_try\"") >&5
15292   (eval $ac_try) 2>&5
15293   ac_status=$?
15294   echo "$as_me:15294: \$? = $ac_status" >&5
15295   (exit $ac_status); }; }; then
15296   eval "$as_ac_var=yes"
15297 else
15298   echo "$as_me: failed program was:" >&5
15299 cat conftest.$ac_ext >&5
15300 eval "$as_ac_var=no"
15301 fi
15302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15303 fi
15304 echo "$as_me:15304: result: `eval echo '${'$as_ac_var'}'`" >&5
15305 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15306 if test `eval echo '${'$as_ac_var'}'` = yes; then
15307   cat >>confdefs.h <<EOF
15308 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15309 EOF
15310
15311 fi
15312 done
15313
15314 if test "x$with_getcap" = "xyes" ; then
15315
15316 echo "$as_me:15316: checking for terminal-capability database functions" >&5
15317 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15318 if test "${cf_cv_cgetent+set}" = set; then
15319   echo $ECHO_N "(cached) $ECHO_C" >&6
15320 else
15321
15322 cat >conftest.$ac_ext <<_ACEOF
15323 #line 15323 "configure"
15324 #include "confdefs.h"
15325
15326 #include <stdlib.h>
15327 int
15328 main ()
15329 {
15330
15331         char temp[128];
15332         char *buf = temp;
15333         char *db_array = temp;
15334         cgetent(&buf, &db_array, "vt100");
15335         cgetcap(buf, "tc", '=');
15336         cgetmatch(buf, "tc");
15337
15338   ;
15339   return 0;
15340 }
15341 _ACEOF
15342 rm -f conftest.$ac_objext conftest$ac_exeext
15343 if { (eval echo "$as_me:15343: \"$ac_link\"") >&5
15344   (eval $ac_link) 2>&5
15345   ac_status=$?
15346   echo "$as_me:15346: \$? = $ac_status" >&5
15347   (exit $ac_status); } &&
15348          { ac_try='test -s conftest$ac_exeext'
15349   { (eval echo "$as_me:15349: \"$ac_try\"") >&5
15350   (eval $ac_try) 2>&5
15351   ac_status=$?
15352   echo "$as_me:15352: \$? = $ac_status" >&5
15353   (exit $ac_status); }; }; then
15354   cf_cv_cgetent=yes
15355 else
15356   echo "$as_me: failed program was:" >&5
15357 cat conftest.$ac_ext >&5
15358 cf_cv_cgetent=no
15359 fi
15360 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15361
15362 fi
15363 echo "$as_me:15363: result: $cf_cv_cgetent" >&5
15364 echo "${ECHO_T}$cf_cv_cgetent" >&6
15365
15366 if test "$cf_cv_cgetent" = yes
15367 then
15368
15369 cat >>confdefs.h <<\EOF
15370 #define HAVE_BSD_CGETENT 1
15371 EOF
15372
15373 echo "$as_me:15373: checking if cgetent uses const parameter" >&5
15374 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
15375 if test "${cf_cv_cgetent_const+set}" = set; then
15376   echo $ECHO_N "(cached) $ECHO_C" >&6
15377 else
15378
15379 cat >conftest.$ac_ext <<_ACEOF
15380 #line 15380 "configure"
15381 #include "confdefs.h"
15382
15383 #include <stdlib.h>
15384 int
15385 main ()
15386 {
15387
15388         char temp[128];
15389         char *buf = temp;
15390 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
15391         const char *db_array = temp;
15392         cgetent(&buf, &db_array, "vt100");
15393 #endif
15394         cgetcap(buf, "tc", '=');
15395         cgetmatch(buf, "tc");
15396
15397   ;
15398   return 0;
15399 }
15400 _ACEOF
15401 rm -f conftest.$ac_objext conftest$ac_exeext
15402 if { (eval echo "$as_me:15402: \"$ac_link\"") >&5
15403   (eval $ac_link) 2>&5
15404   ac_status=$?
15405   echo "$as_me:15405: \$? = $ac_status" >&5
15406   (exit $ac_status); } &&
15407          { ac_try='test -s conftest$ac_exeext'
15408   { (eval echo "$as_me:15408: \"$ac_try\"") >&5
15409   (eval $ac_try) 2>&5
15410   ac_status=$?
15411   echo "$as_me:15411: \$? = $ac_status" >&5
15412   (exit $ac_status); }; }; then
15413   cf_cv_cgetent_const=yes
15414 else
15415   echo "$as_me: failed program was:" >&5
15416 cat conftest.$ac_ext >&5
15417 cf_cv_cgetent_const=no
15418 fi
15419 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15420
15421 fi
15422 echo "$as_me:15422: result: $cf_cv_cgetent_const" >&5
15423 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
15424         if test "$cf_cv_cgetent_const" = yes
15425         then
15426
15427 cat >>confdefs.h <<EOF
15428 #define CGETENT_CONST const
15429 EOF
15430
15431         fi
15432 fi
15433
15434 fi
15435
15436 echo "$as_me:15436: checking for isascii" >&5
15437 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
15438 if test "${cf_cv_have_isascii+set}" = set; then
15439   echo $ECHO_N "(cached) $ECHO_C" >&6
15440 else
15441
15442         cat >conftest.$ac_ext <<_ACEOF
15443 #line 15443 "configure"
15444 #include "confdefs.h"
15445 #include <ctype.h>
15446 int
15447 main ()
15448 {
15449 int x = isascii(' ')
15450   ;
15451   return 0;
15452 }
15453 _ACEOF
15454 rm -f conftest.$ac_objext conftest$ac_exeext
15455 if { (eval echo "$as_me:15455: \"$ac_link\"") >&5
15456   (eval $ac_link) 2>&5
15457   ac_status=$?
15458   echo "$as_me:15458: \$? = $ac_status" >&5
15459   (exit $ac_status); } &&
15460          { ac_try='test -s conftest$ac_exeext'
15461   { (eval echo "$as_me:15461: \"$ac_try\"") >&5
15462   (eval $ac_try) 2>&5
15463   ac_status=$?
15464   echo "$as_me:15464: \$? = $ac_status" >&5
15465   (exit $ac_status); }; }; then
15466   cf_cv_have_isascii=yes
15467 else
15468   echo "$as_me: failed program was:" >&5
15469 cat conftest.$ac_ext >&5
15470 cf_cv_have_isascii=no
15471 fi
15472 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15473
15474 fi
15475 echo "$as_me:15475: result: $cf_cv_have_isascii" >&5
15476 echo "${ECHO_T}$cf_cv_have_isascii" >&6
15477 test "$cf_cv_have_isascii" = yes &&
15478 cat >>confdefs.h <<\EOF
15479 #define HAVE_ISASCII 1
15480 EOF
15481
15482 if test "$ac_cv_func_sigaction" = yes; then
15483 echo "$as_me:15483: checking whether sigaction needs _POSIX_SOURCE" >&5
15484 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
15485 cat >conftest.$ac_ext <<_ACEOF
15486 #line 15486 "configure"
15487 #include "confdefs.h"
15488
15489 #include <sys/types.h>
15490 #include <signal.h>
15491 int
15492 main ()
15493 {
15494 struct sigaction act
15495   ;
15496   return 0;
15497 }
15498 _ACEOF
15499 rm -f conftest.$ac_objext
15500 if { (eval echo "$as_me:15500: \"$ac_compile\"") >&5
15501   (eval $ac_compile) 2>&5
15502   ac_status=$?
15503   echo "$as_me:15503: \$? = $ac_status" >&5
15504   (exit $ac_status); } &&
15505          { ac_try='test -s conftest.$ac_objext'
15506   { (eval echo "$as_me:15506: \"$ac_try\"") >&5
15507   (eval $ac_try) 2>&5
15508   ac_status=$?
15509   echo "$as_me:15509: \$? = $ac_status" >&5
15510   (exit $ac_status); }; }; then
15511   sigact_bad=no
15512 else
15513   echo "$as_me: failed program was:" >&5
15514 cat conftest.$ac_ext >&5
15515
15516 cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519
15520 #define _POSIX_SOURCE
15521 #include <sys/types.h>
15522 #include <signal.h>
15523 int
15524 main ()
15525 {
15526 struct sigaction act
15527   ;
15528   return 0;
15529 }
15530 _ACEOF
15531 rm -f conftest.$ac_objext
15532 if { (eval echo "$as_me:15532: \"$ac_compile\"") >&5
15533   (eval $ac_compile) 2>&5
15534   ac_status=$?
15535   echo "$as_me:15535: \$? = $ac_status" >&5
15536   (exit $ac_status); } &&
15537          { ac_try='test -s conftest.$ac_objext'
15538   { (eval echo "$as_me:15538: \"$ac_try\"") >&5
15539   (eval $ac_try) 2>&5
15540   ac_status=$?
15541   echo "$as_me:15541: \$? = $ac_status" >&5
15542   (exit $ac_status); }; }; then
15543   sigact_bad=yes
15544
15545 cat >>confdefs.h <<\EOF
15546 #define _POSIX_SOURCE 1
15547 EOF
15548
15549 else
15550   echo "$as_me: failed program was:" >&5
15551 cat conftest.$ac_ext >&5
15552 sigact_bad=unknown
15553 fi
15554 rm -f conftest.$ac_objext conftest.$ac_ext
15555 fi
15556 rm -f conftest.$ac_objext conftest.$ac_ext
15557 echo "$as_me:15557: result: $sigact_bad" >&5
15558 echo "${ECHO_T}$sigact_bad" >&6
15559 fi
15560
15561 echo "$as_me:15561: checking if nanosleep really works" >&5
15562 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
15563 if test "${cf_cv_func_nanosleep+set}" = set; then
15564   echo $ECHO_N "(cached) $ECHO_C" >&6
15565 else
15566
15567 if test "$cross_compiling" = yes; then
15568   cf_cv_func_nanosleep=unknown
15569 else
15570   cat >conftest.$ac_ext <<_ACEOF
15571 #line 15571 "configure"
15572 #include "confdefs.h"
15573
15574 #include <stdio.h>
15575 #include <errno.h>
15576 #include <time.h>
15577
15578 #ifdef HAVE_SYS_TIME_H
15579 #include <sys/time.h>
15580 #endif
15581
15582 int main() {
15583         struct timespec ts1, ts2;
15584         int code;
15585         ts1.tv_sec  = 0;
15586         ts1.tv_nsec = 750000000;
15587         ts2.tv_sec  = 0;
15588         ts2.tv_nsec = 0;
15589         errno = 0;
15590         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
15591         ${cf_cv_main_return:-return}(code != 0);
15592 }
15593
15594 _ACEOF
15595 rm -f conftest$ac_exeext
15596 if { (eval echo "$as_me:15596: \"$ac_link\"") >&5
15597   (eval $ac_link) 2>&5
15598   ac_status=$?
15599   echo "$as_me:15599: \$? = $ac_status" >&5
15600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15601   { (eval echo "$as_me:15601: \"$ac_try\"") >&5
15602   (eval $ac_try) 2>&5
15603   ac_status=$?
15604   echo "$as_me:15604: \$? = $ac_status" >&5
15605   (exit $ac_status); }; }; then
15606   cf_cv_func_nanosleep=yes
15607 else
15608   echo "$as_me: program exited with status $ac_status" >&5
15609 echo "$as_me: failed program was:" >&5
15610 cat conftest.$ac_ext >&5
15611 cf_cv_func_nanosleep=no
15612 fi
15613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15614 fi
15615 fi
15616 echo "$as_me:15616: result: $cf_cv_func_nanosleep" >&5
15617 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
15618
15619 test "$cf_cv_func_nanosleep" = "yes" &&
15620 cat >>confdefs.h <<\EOF
15621 #define HAVE_NANOSLEEP 1
15622 EOF
15623
15624 for ac_header in \
15625 termio.h \
15626 termios.h \
15627 unistd.h \
15628
15629 do
15630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15631 echo "$as_me:15631: checking for $ac_header" >&5
15632 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15633 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15634   echo $ECHO_N "(cached) $ECHO_C" >&6
15635 else
15636   cat >conftest.$ac_ext <<_ACEOF
15637 #line 15637 "configure"
15638 #include "confdefs.h"
15639 #include <$ac_header>
15640 _ACEOF
15641 if { (eval echo "$as_me:15641: \"$ac_cpp conftest.$ac_ext\"") >&5
15642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15643   ac_status=$?
15644   egrep -v '^ *\+' conftest.er1 >conftest.err
15645   rm -f conftest.er1
15646   cat conftest.err >&5
15647   echo "$as_me:15647: \$? = $ac_status" >&5
15648   (exit $ac_status); } >/dev/null; then
15649   if test -s conftest.err; then
15650     ac_cpp_err=$ac_c_preproc_warn_flag
15651   else
15652     ac_cpp_err=
15653   fi
15654 else
15655   ac_cpp_err=yes
15656 fi
15657 if test -z "$ac_cpp_err"; then
15658   eval "$as_ac_Header=yes"
15659 else
15660   echo "$as_me: failed program was:" >&5
15661   cat conftest.$ac_ext >&5
15662   eval "$as_ac_Header=no"
15663 fi
15664 rm -f conftest.err conftest.$ac_ext
15665 fi
15666 echo "$as_me:15666: result: `eval echo '${'$as_ac_Header'}'`" >&5
15667 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15668 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15669   cat >>confdefs.h <<EOF
15670 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15671 EOF
15672
15673 fi
15674 done
15675
15676 if test "$ISC" = yes ; then
15677
15678 for ac_header in sys/termio.h
15679 do
15680 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15681 echo "$as_me:15681: checking for $ac_header" >&5
15682 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15683 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15684   echo $ECHO_N "(cached) $ECHO_C" >&6
15685 else
15686   cat >conftest.$ac_ext <<_ACEOF
15687 #line 15687 "configure"
15688 #include "confdefs.h"
15689 #include <$ac_header>
15690 _ACEOF
15691 if { (eval echo "$as_me:15691: \"$ac_cpp conftest.$ac_ext\"") >&5
15692   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15693   ac_status=$?
15694   egrep -v '^ *\+' conftest.er1 >conftest.err
15695   rm -f conftest.er1
15696   cat conftest.err >&5
15697   echo "$as_me:15697: \$? = $ac_status" >&5
15698   (exit $ac_status); } >/dev/null; then
15699   if test -s conftest.err; then
15700     ac_cpp_err=$ac_c_preproc_warn_flag
15701   else
15702     ac_cpp_err=
15703   fi
15704 else
15705   ac_cpp_err=yes
15706 fi
15707 if test -z "$ac_cpp_err"; then
15708   eval "$as_ac_Header=yes"
15709 else
15710   echo "$as_me: failed program was:" >&5
15711   cat conftest.$ac_ext >&5
15712   eval "$as_ac_Header=no"
15713 fi
15714 rm -f conftest.err conftest.$ac_ext
15715 fi
15716 echo "$as_me:15716: result: `eval echo '${'$as_ac_Header'}'`" >&5
15717 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15718 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15719   cat >>confdefs.h <<EOF
15720 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15721 EOF
15722
15723 fi
15724 done
15725
15726 fi
15727 if test "$ac_cv_header_termios_h" = yes ; then
15728         case "$CFLAGS $CPPFLAGS" in
15729         *-D_POSIX_SOURCE*)
15730                 termios_bad=dunno ;;
15731         *)      termios_bad=maybe ;;
15732         esac
15733         if test "$termios_bad" = maybe ; then
15734         echo "$as_me:15734: checking whether termios.h needs _POSIX_SOURCE" >&5
15735 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15736         cat >conftest.$ac_ext <<_ACEOF
15737 #line 15737 "configure"
15738 #include "confdefs.h"
15739 #include <termios.h>
15740 int
15741 main ()
15742 {
15743 struct termios foo; int x = foo.c_iflag
15744   ;
15745   return 0;
15746 }
15747 _ACEOF
15748 rm -f conftest.$ac_objext
15749 if { (eval echo "$as_me:15749: \"$ac_compile\"") >&5
15750   (eval $ac_compile) 2>&5
15751   ac_status=$?
15752   echo "$as_me:15752: \$? = $ac_status" >&5
15753   (exit $ac_status); } &&
15754          { ac_try='test -s conftest.$ac_objext'
15755   { (eval echo "$as_me:15755: \"$ac_try\"") >&5
15756   (eval $ac_try) 2>&5
15757   ac_status=$?
15758   echo "$as_me:15758: \$? = $ac_status" >&5
15759   (exit $ac_status); }; }; then
15760   termios_bad=no
15761 else
15762   echo "$as_me: failed program was:" >&5
15763 cat conftest.$ac_ext >&5
15764
15765                 cat >conftest.$ac_ext <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768
15769 #define _POSIX_SOURCE
15770 #include <termios.h>
15771 int
15772 main ()
15773 {
15774 struct termios foo; int x = foo.c_iflag
15775   ;
15776   return 0;
15777 }
15778 _ACEOF
15779 rm -f conftest.$ac_objext
15780 if { (eval echo "$as_me:15780: \"$ac_compile\"") >&5
15781   (eval $ac_compile) 2>&5
15782   ac_status=$?
15783   echo "$as_me:15783: \$? = $ac_status" >&5
15784   (exit $ac_status); } &&
15785          { ac_try='test -s conftest.$ac_objext'
15786   { (eval echo "$as_me:15786: \"$ac_try\"") >&5
15787   (eval $ac_try) 2>&5
15788   ac_status=$?
15789   echo "$as_me:15789: \$? = $ac_status" >&5
15790   (exit $ac_status); }; }; then
15791   termios_bad=unknown
15792 else
15793   echo "$as_me: failed program was:" >&5
15794 cat conftest.$ac_ext >&5
15795 termios_bad=yes
15796 cat >>confdefs.h <<\EOF
15797 #define _POSIX_SOURCE 1
15798 EOF
15799
15800 fi
15801 rm -f conftest.$ac_objext conftest.$ac_ext
15802
15803 fi
15804 rm -f conftest.$ac_objext conftest.$ac_ext
15805         echo "$as_me:15805: result: $termios_bad" >&5
15806 echo "${ECHO_T}$termios_bad" >&6
15807         fi
15808 fi
15809
15810 echo "$as_me:15810: checking for tcgetattr" >&5
15811 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15812 if test "${cf_cv_have_tcgetattr+set}" = set; then
15813   echo $ECHO_N "(cached) $ECHO_C" >&6
15814 else
15815
15816 cat >conftest.$ac_ext <<_ACEOF
15817 #line 15817 "configure"
15818 #include "confdefs.h"
15819
15820 #include <sys/types.h>
15821 #ifdef HAVE_UNISTD_H
15822 #include <unistd.h>
15823 #endif
15824 #ifdef HAVE_TERMIOS_H
15825 #include <termios.h>
15826 #define TTY struct termios
15827 #else
15828 #ifdef HAVE_TERMIO_H
15829 #include <termio.h>
15830 #define TTY struct termio
15831 #endif
15832 #endif
15833
15834 int
15835 main ()
15836 {
15837
15838 TTY foo;
15839 tcgetattr(1, &foo);
15840   ;
15841   return 0;
15842 }
15843 _ACEOF
15844 rm -f conftest.$ac_objext conftest$ac_exeext
15845 if { (eval echo "$as_me:15845: \"$ac_link\"") >&5
15846   (eval $ac_link) 2>&5
15847   ac_status=$?
15848   echo "$as_me:15848: \$? = $ac_status" >&5
15849   (exit $ac_status); } &&
15850          { ac_try='test -s conftest$ac_exeext'
15851   { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852   (eval $ac_try) 2>&5
15853   ac_status=$?
15854   echo "$as_me:15854: \$? = $ac_status" >&5
15855   (exit $ac_status); }; }; then
15856   cf_cv_have_tcgetattr=yes
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860 cf_cv_have_tcgetattr=no
15861 fi
15862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15863 fi
15864 echo "$as_me:15864: result: $cf_cv_have_tcgetattr" >&5
15865 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15866 test "$cf_cv_have_tcgetattr" = yes &&
15867 cat >>confdefs.h <<\EOF
15868 #define HAVE_TCGETATTR 1
15869 EOF
15870
15871 echo "$as_me:15871: checking for vsscanf function or workaround" >&5
15872 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15873 if test "${cf_cv_func_vsscanf+set}" = set; then
15874   echo $ECHO_N "(cached) $ECHO_C" >&6
15875 else
15876
15877 cat >conftest.$ac_ext <<_ACEOF
15878 #line 15878 "configure"
15879 #include "confdefs.h"
15880
15881 #include <stdarg.h>
15882 #include <stdio.h>
15883 int
15884 main ()
15885 {
15886
15887         va_list ap;
15888         vsscanf("from", "%d", ap)
15889   ;
15890   return 0;
15891 }
15892 _ACEOF
15893 rm -f conftest.$ac_objext conftest$ac_exeext
15894 if { (eval echo "$as_me:15894: \"$ac_link\"") >&5
15895   (eval $ac_link) 2>&5
15896   ac_status=$?
15897   echo "$as_me:15897: \$? = $ac_status" >&5
15898   (exit $ac_status); } &&
15899          { ac_try='test -s conftest$ac_exeext'
15900   { (eval echo "$as_me:15900: \"$ac_try\"") >&5
15901   (eval $ac_try) 2>&5
15902   ac_status=$?
15903   echo "$as_me:15903: \$? = $ac_status" >&5
15904   (exit $ac_status); }; }; then
15905   cf_cv_func_vsscanf=vsscanf
15906 else
15907   echo "$as_me: failed program was:" >&5
15908 cat conftest.$ac_ext >&5
15909
15910 cat >conftest.$ac_ext <<_ACEOF
15911 #line 15911 "configure"
15912 #include "confdefs.h"
15913
15914 #include <stdarg.h>
15915 #include <stdio.h>
15916 int
15917 main ()
15918 {
15919
15920     FILE strbuf;
15921     char *str = "from";
15922
15923     strbuf._flag = _IOREAD;
15924     strbuf._ptr = strbuf._base = (unsigned char *) str;
15925     strbuf._cnt = strlen(str);
15926     strbuf._file = _NFILE;
15927     return (vfscanf(&strbuf, "%d", ap))
15928   ;
15929   return 0;
15930 }
15931 _ACEOF
15932 rm -f conftest.$ac_objext conftest$ac_exeext
15933 if { (eval echo "$as_me:15933: \"$ac_link\"") >&5
15934   (eval $ac_link) 2>&5
15935   ac_status=$?
15936   echo "$as_me:15936: \$? = $ac_status" >&5
15937   (exit $ac_status); } &&
15938          { ac_try='test -s conftest$ac_exeext'
15939   { (eval echo "$as_me:15939: \"$ac_try\"") >&5
15940   (eval $ac_try) 2>&5
15941   ac_status=$?
15942   echo "$as_me:15942: \$? = $ac_status" >&5
15943   (exit $ac_status); }; }; then
15944   cf_cv_func_vsscanf=vfscanf
15945 else
15946   echo "$as_me: failed program was:" >&5
15947 cat conftest.$ac_ext >&5
15948
15949 cat >conftest.$ac_ext <<_ACEOF
15950 #line 15950 "configure"
15951 #include "confdefs.h"
15952
15953 #include <stdarg.h>
15954 #include <stdio.h>
15955 int
15956 main ()
15957 {
15958
15959     FILE strbuf;
15960     char *str = "from";
15961
15962     strbuf._flag = _IOREAD;
15963     strbuf._ptr = strbuf._base = (unsigned char *) str;
15964     strbuf._cnt = strlen(str);
15965     strbuf._file = _NFILE;
15966     return (_doscan(&strbuf, "%d", ap))
15967   ;
15968   return 0;
15969 }
15970 _ACEOF
15971 rm -f conftest.$ac_objext conftest$ac_exeext
15972 if { (eval echo "$as_me:15972: \"$ac_link\"") >&5
15973   (eval $ac_link) 2>&5
15974   ac_status=$?
15975   echo "$as_me:15975: \$? = $ac_status" >&5
15976   (exit $ac_status); } &&
15977          { ac_try='test -s conftest$ac_exeext'
15978   { (eval echo "$as_me:15978: \"$ac_try\"") >&5
15979   (eval $ac_try) 2>&5
15980   ac_status=$?
15981   echo "$as_me:15981: \$? = $ac_status" >&5
15982   (exit $ac_status); }; }; then
15983   cf_cv_func_vsscanf=_doscan
15984 else
15985   echo "$as_me: failed program was:" >&5
15986 cat conftest.$ac_ext >&5
15987
15988 cf_cv_func_vsscanf=no
15989 fi
15990 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15991 fi
15992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15993 fi
15994 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15995 fi
15996 echo "$as_me:15996: result: $cf_cv_func_vsscanf" >&5
15997 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15998
15999 case $cf_cv_func_vsscanf in #(vi
16000 vsscanf)
16001 cat >>confdefs.h <<\EOF
16002 #define HAVE_VSSCANF 1
16003 EOF
16004 ;; #(vi
16005 vfscanf)
16006 cat >>confdefs.h <<\EOF
16007 #define HAVE_VFSCANF 1
16008 EOF
16009 ;; #(vi
16010 _doscan)
16011 cat >>confdefs.h <<\EOF
16012 #define HAVE__DOSCAN 1
16013 EOF
16014 ;;
16015 esac
16016
16017 echo "$as_me:16017: checking for working mkstemp" >&5
16018 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16019 if test "${cf_cv_func_mkstemp+set}" = set; then
16020   echo $ECHO_N "(cached) $ECHO_C" >&6
16021 else
16022
16023 rm -rf conftest*
16024 if test "$cross_compiling" = yes; then
16025   cf_cv_func_mkstemp=maybe
16026 else
16027   cat >conftest.$ac_ext <<_ACEOF
16028 #line 16028 "configure"
16029 #include "confdefs.h"
16030
16031 #include <sys/types.h>
16032 #include <stdlib.h>
16033 #include <stdio.h>
16034 #include <string.h>
16035 #include <sys/stat.h>
16036 int main()
16037 {
16038         char *tmpl = "conftestXXXXXX";
16039         char name[2][80];
16040         int n;
16041         int result = 0;
16042         int fd;
16043         struct stat sb;
16044
16045         umask(077);
16046         for (n = 0; n < 2; ++n) {
16047                 strcpy(name[n], tmpl);
16048                 if ((fd = mkstemp(name[n])) >= 0) {
16049                         if (!strcmp(name[n], tmpl)
16050                          || stat(name[n], &sb) != 0
16051                          || (sb.st_mode & S_IFMT) != S_IFREG
16052                          || (sb.st_mode & 077) != 0) {
16053                                 result = 1;
16054                         }
16055                         close(fd);
16056                 }
16057         }
16058         if (result == 0
16059          && !strcmp(name[0], name[1]))
16060                 result = 1;
16061         ${cf_cv_main_return:-return}(result);
16062 }
16063
16064 _ACEOF
16065 rm -f conftest$ac_exeext
16066 if { (eval echo "$as_me:16066: \"$ac_link\"") >&5
16067   (eval $ac_link) 2>&5
16068   ac_status=$?
16069   echo "$as_me:16069: \$? = $ac_status" >&5
16070   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16071   { (eval echo "$as_me:16071: \"$ac_try\"") >&5
16072   (eval $ac_try) 2>&5
16073   ac_status=$?
16074   echo "$as_me:16074: \$? = $ac_status" >&5
16075   (exit $ac_status); }; }; then
16076   cf_cv_func_mkstemp=yes
16077
16078 else
16079   echo "$as_me: program exited with status $ac_status" >&5
16080 echo "$as_me: failed program was:" >&5
16081 cat conftest.$ac_ext >&5
16082 cf_cv_func_mkstemp=no
16083
16084 fi
16085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16086 fi
16087
16088 fi
16089 echo "$as_me:16089: result: $cf_cv_func_mkstemp" >&5
16090 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16091 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16092         echo "$as_me:16092: checking for mkstemp" >&5
16093 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16094 if test "${ac_cv_func_mkstemp+set}" = set; then
16095   echo $ECHO_N "(cached) $ECHO_C" >&6
16096 else
16097   cat >conftest.$ac_ext <<_ACEOF
16098 #line 16098 "configure"
16099 #include "confdefs.h"
16100 /* System header to define __stub macros and hopefully few prototypes,
16101     which can conflict with char mkstemp (); below.  */
16102 #include <assert.h>
16103 /* Override any gcc2 internal prototype to avoid an error.  */
16104 #ifdef __cplusplus
16105 extern "C"
16106 #endif
16107 /* We use char because int might match the return type of a gcc2
16108    builtin and then its argument prototype would still apply.  */
16109 char mkstemp ();
16110 char (*f) ();
16111
16112 int
16113 main ()
16114 {
16115 /* The GNU C library defines this for functions which it implements
16116     to always fail with ENOSYS.  Some functions are actually named
16117     something starting with __ and the normal name is an alias.  */
16118 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16119 choke me
16120 #else
16121 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16122 #endif
16123
16124   ;
16125   return 0;
16126 }
16127 _ACEOF
16128 rm -f conftest.$ac_objext conftest$ac_exeext
16129 if { (eval echo "$as_me:16129: \"$ac_link\"") >&5
16130   (eval $ac_link) 2>&5
16131   ac_status=$?
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit $ac_status); } &&
16134          { ac_try='test -s conftest$ac_exeext'
16135   { (eval echo "$as_me:16135: \"$ac_try\"") >&5
16136   (eval $ac_try) 2>&5
16137   ac_status=$?
16138   echo "$as_me:16138: \$? = $ac_status" >&5
16139   (exit $ac_status); }; }; then
16140   ac_cv_func_mkstemp=yes
16141 else
16142   echo "$as_me: failed program was:" >&5
16143 cat conftest.$ac_ext >&5
16144 ac_cv_func_mkstemp=no
16145 fi
16146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16147 fi
16148 echo "$as_me:16148: result: $ac_cv_func_mkstemp" >&5
16149 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16150
16151 fi
16152 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16153
16154 cat >>confdefs.h <<\EOF
16155 #define HAVE_MKSTEMP 1
16156 EOF
16157
16158 fi
16159
16160 # setup for prototype of fallback for vsscanf()
16161
16162 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16163         HAVE_VSSCANF=1
16164 else
16165         HAVE_VSSCANF=0
16166 fi
16167
16168 if test "x$cross_compiling" = xyes ; then
16169         { echo "$as_me:16169: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16170 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16171 else
16172         echo "$as_me:16172: checking whether setvbuf arguments are reversed" >&5
16173 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16174 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16175   echo $ECHO_N "(cached) $ECHO_C" >&6
16176 else
16177   if test "$cross_compiling" = yes; then
16178   { { echo "$as_me:16178: error: cannot run test program while cross compiling" >&5
16179 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16180    { (exit 1); exit 1; }; }
16181 else
16182   cat >conftest.$ac_ext <<_ACEOF
16183 #line 16183 "configure"
16184 #include "confdefs.h"
16185 #include <stdio.h>
16186 /* If setvbuf has the reversed format, exit 0. */
16187 int
16188 main ()
16189 {
16190   /* This call has the arguments reversed.
16191      A reversed system may check and see that the address of main
16192      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16193   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16194     $ac_main_return(1);
16195   putc('\r', stdout);
16196   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16197 }
16198 _ACEOF
16199 rm -f conftest$ac_exeext
16200 if { (eval echo "$as_me:16200: \"$ac_link\"") >&5
16201   (eval $ac_link) 2>&5
16202   ac_status=$?
16203   echo "$as_me:16203: \$? = $ac_status" >&5
16204   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16205   { (eval echo "$as_me:16205: \"$ac_try\"") >&5
16206   (eval $ac_try) 2>&5
16207   ac_status=$?
16208   echo "$as_me:16208: \$? = $ac_status" >&5
16209   (exit $ac_status); }; }; then
16210   ac_cv_func_setvbuf_reversed=yes
16211 else
16212   echo "$as_me: program exited with status $ac_status" >&5
16213 echo "$as_me: failed program was:" >&5
16214 cat conftest.$ac_ext >&5
16215 ac_cv_func_setvbuf_reversed=no
16216 fi
16217 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16218 fi
16219 rm -f core core.* *.core
16220 fi
16221 echo "$as_me:16221: result: $ac_cv_func_setvbuf_reversed" >&5
16222 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16223 if test $ac_cv_func_setvbuf_reversed = yes; then
16224
16225 cat >>confdefs.h <<\EOF
16226 #define SETVBUF_REVERSED 1
16227 EOF
16228
16229 fi
16230
16231 fi
16232 echo "$as_me:16232: checking return type of signal handlers" >&5
16233 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
16234 if test "${ac_cv_type_signal+set}" = set; then
16235   echo $ECHO_N "(cached) $ECHO_C" >&6
16236 else
16237   cat >conftest.$ac_ext <<_ACEOF
16238 #line 16238 "configure"
16239 #include "confdefs.h"
16240 #include <sys/types.h>
16241 #include <signal.h>
16242 #ifdef signal
16243 # undef signal
16244 #endif
16245 #ifdef __cplusplus
16246 extern "C" void (*signal (int, void (*)(int)))(int);
16247 #else
16248 void (*signal ()) ();
16249 #endif
16250
16251 int
16252 main ()
16253 {
16254 int i;
16255   ;
16256   return 0;
16257 }
16258 _ACEOF
16259 rm -f conftest.$ac_objext
16260 if { (eval echo "$as_me:16260: \"$ac_compile\"") >&5
16261   (eval $ac_compile) 2>&5
16262   ac_status=$?
16263   echo "$as_me:16263: \$? = $ac_status" >&5
16264   (exit $ac_status); } &&
16265          { ac_try='test -s conftest.$ac_objext'
16266   { (eval echo "$as_me:16266: \"$ac_try\"") >&5
16267   (eval $ac_try) 2>&5
16268   ac_status=$?
16269   echo "$as_me:16269: \$? = $ac_status" >&5
16270   (exit $ac_status); }; }; then
16271   ac_cv_type_signal=void
16272 else
16273   echo "$as_me: failed program was:" >&5
16274 cat conftest.$ac_ext >&5
16275 ac_cv_type_signal=int
16276 fi
16277 rm -f conftest.$ac_objext conftest.$ac_ext
16278 fi
16279 echo "$as_me:16279: result: $ac_cv_type_signal" >&5
16280 echo "${ECHO_T}$ac_cv_type_signal" >&6
16281
16282 cat >>confdefs.h <<EOF
16283 #define RETSIGTYPE $ac_cv_type_signal
16284 EOF
16285
16286 echo "$as_me:16286: checking for intptr_t" >&5
16287 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16288 if test "${ac_cv_type_intptr_t+set}" = set; then
16289   echo $ECHO_N "(cached) $ECHO_C" >&6
16290 else
16291   cat >conftest.$ac_ext <<_ACEOF
16292 #line 16292 "configure"
16293 #include "confdefs.h"
16294 $ac_includes_default
16295 int
16296 main ()
16297 {
16298 if ((intptr_t *) 0)
16299   return 0;
16300 if (sizeof (intptr_t))
16301   return 0;
16302   ;
16303   return 0;
16304 }
16305 _ACEOF
16306 rm -f conftest.$ac_objext
16307 if { (eval echo "$as_me:16307: \"$ac_compile\"") >&5
16308   (eval $ac_compile) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); } &&
16312          { ac_try='test -s conftest.$ac_objext'
16313   { (eval echo "$as_me:16313: \"$ac_try\"") >&5
16314   (eval $ac_try) 2>&5
16315   ac_status=$?
16316   echo "$as_me:16316: \$? = $ac_status" >&5
16317   (exit $ac_status); }; }; then
16318   ac_cv_type_intptr_t=yes
16319 else
16320   echo "$as_me: failed program was:" >&5
16321 cat conftest.$ac_ext >&5
16322 ac_cv_type_intptr_t=no
16323 fi
16324 rm -f conftest.$ac_objext conftest.$ac_ext
16325 fi
16326 echo "$as_me:16326: result: $ac_cv_type_intptr_t" >&5
16327 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16328 if test $ac_cv_type_intptr_t = yes; then
16329   :
16330 else
16331
16332 cat >>confdefs.h <<EOF
16333 #define intptr_t long
16334 EOF
16335
16336 fi
16337
16338 echo "$as_me:16338: checking for type sigaction_t" >&5
16339 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16340 if test "${cf_cv_type_sigaction+set}" = set; then
16341   echo $ECHO_N "(cached) $ECHO_C" >&6
16342 else
16343
16344         cat >conftest.$ac_ext <<_ACEOF
16345 #line 16345 "configure"
16346 #include "confdefs.h"
16347
16348 #include <signal.h>
16349 int
16350 main ()
16351 {
16352 sigaction_t x
16353   ;
16354   return 0;
16355 }
16356 _ACEOF
16357 rm -f conftest.$ac_objext
16358 if { (eval echo "$as_me:16358: \"$ac_compile\"") >&5
16359   (eval $ac_compile) 2>&5
16360   ac_status=$?
16361   echo "$as_me:16361: \$? = $ac_status" >&5
16362   (exit $ac_status); } &&
16363          { ac_try='test -s conftest.$ac_objext'
16364   { (eval echo "$as_me:16364: \"$ac_try\"") >&5
16365   (eval $ac_try) 2>&5
16366   ac_status=$?
16367   echo "$as_me:16367: \$? = $ac_status" >&5
16368   (exit $ac_status); }; }; then
16369   cf_cv_type_sigaction=yes
16370 else
16371   echo "$as_me: failed program was:" >&5
16372 cat conftest.$ac_ext >&5
16373 cf_cv_type_sigaction=no
16374 fi
16375 rm -f conftest.$ac_objext conftest.$ac_ext
16376 fi
16377
16378 echo "$as_me:16378: result: $cf_cv_type_sigaction" >&5
16379 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16380 test "$cf_cv_type_sigaction" = yes &&
16381 cat >>confdefs.h <<\EOF
16382 #define HAVE_TYPE_SIGACTION 1
16383 EOF
16384
16385 echo "$as_me:16385: checking declaration of size-change" >&5
16386 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16387 if test "${cf_cv_sizechange+set}" = set; then
16388   echo $ECHO_N "(cached) $ECHO_C" >&6
16389 else
16390
16391     cf_cv_sizechange=unknown
16392     cf_save_CPPFLAGS="$CPPFLAGS"
16393
16394 for cf_opts in "" "NEED_PTEM_H"
16395 do
16396
16397     CPPFLAGS="$cf_save_CPPFLAGS"
16398     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16399     cat >conftest.$ac_ext <<_ACEOF
16400 #line 16400 "configure"
16401 #include "confdefs.h"
16402 #include <sys/types.h>
16403 #ifdef HAVE_TERMIOS_H
16404 #include <termios.h>
16405 #else
16406 #ifdef HAVE_TERMIO_H
16407 #include <termio.h>
16408 #endif
16409 #endif
16410 #ifdef NEED_PTEM_H
16411 /* This is a workaround for SCO:  they neglected to define struct winsize in
16412  * termios.h -- it's only in termio.h and ptem.h
16413  */
16414 #include        <sys/stream.h>
16415 #include        <sys/ptem.h>
16416 #endif
16417 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16418 #include <sys/ioctl.h>
16419 #endif
16420
16421 int
16422 main ()
16423 {
16424
16425 #ifdef TIOCGSIZE
16426         struct ttysize win;     /* FIXME: what system is this? */
16427         int y = win.ts_lines;
16428         int x = win.ts_cols;
16429 #else
16430 #ifdef TIOCGWINSZ
16431         struct winsize win;
16432         int y = win.ws_row;
16433         int x = win.ws_col;
16434 #else
16435         no TIOCGSIZE or TIOCGWINSZ
16436 #endif /* TIOCGWINSZ */
16437 #endif /* TIOCGSIZE */
16438
16439   ;
16440   return 0;
16441 }
16442 _ACEOF
16443 rm -f conftest.$ac_objext
16444 if { (eval echo "$as_me:16444: \"$ac_compile\"") >&5
16445   (eval $ac_compile) 2>&5
16446   ac_status=$?
16447   echo "$as_me:16447: \$? = $ac_status" >&5
16448   (exit $ac_status); } &&
16449          { ac_try='test -s conftest.$ac_objext'
16450   { (eval echo "$as_me:16450: \"$ac_try\"") >&5
16451   (eval $ac_try) 2>&5
16452   ac_status=$?
16453   echo "$as_me:16453: \$? = $ac_status" >&5
16454   (exit $ac_status); }; }; then
16455   cf_cv_sizechange=yes
16456 else
16457   echo "$as_me: failed program was:" >&5
16458 cat conftest.$ac_ext >&5
16459 cf_cv_sizechange=no
16460 fi
16461 rm -f conftest.$ac_objext conftest.$ac_ext
16462
16463         CPPFLAGS="$cf_save_CPPFLAGS"
16464         if test "$cf_cv_sizechange" = yes ; then
16465                 echo "size-change succeeded ($cf_opts)" >&5
16466                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
16467                 break
16468         fi
16469 done
16470
16471 fi
16472 echo "$as_me:16472: result: $cf_cv_sizechange" >&5
16473 echo "${ECHO_T}$cf_cv_sizechange" >&6
16474 if test "$cf_cv_sizechange" != no ; then
16475
16476 cat >>confdefs.h <<\EOF
16477 #define HAVE_SIZECHANGE 1
16478 EOF
16479
16480         case $cf_cv_sizechange in #(vi
16481         NEED*)
16482                 cat >>confdefs.h <<EOF
16483 #define $cf_cv_sizechange  1
16484 EOF
16485
16486                 ;;
16487         esac
16488 fi
16489
16490 echo "$as_me:16490: checking if poll really works" >&5
16491 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
16492 if test "${cf_cv_working_poll+set}" = set; then
16493   echo $ECHO_N "(cached) $ECHO_C" >&6
16494 else
16495
16496 if test "$cross_compiling" = yes; then
16497   cf_cv_working_poll=unknown
16498 else
16499   cat >conftest.$ac_ext <<_ACEOF
16500 #line 16500 "configure"
16501 #include "confdefs.h"
16502
16503 #include <stdlib.h>
16504 #include <stdio.h>
16505 #include <unistd.h>
16506 #include <fcntl.h>
16507 #ifdef HAVE_POLL_H
16508 #include <poll.h>
16509 #else
16510 #include <sys/poll.h>
16511 #endif
16512 int main() {
16513         struct pollfd myfds;
16514         int ret;
16515
16516         /* check for Darwin bug with respect to "devices" */
16517         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
16518         if (myfds.fd < 0)
16519                 myfds.fd = 0;
16520         myfds.events = POLLIN;
16521         myfds.revents = 0;
16522
16523         ret = poll(&myfds, 1, 100);
16524
16525         if (ret < 0 || (myfds.revents & POLLNVAL)) {
16526                 ret = -1;
16527         } else {
16528                 int fd = 0;
16529                 if (!isatty(fd)) {
16530                         fd = open("/dev/tty", 2);       /* O_RDWR */
16531                 }
16532
16533                 if (fd >= 0) {
16534                         /* also check with standard input */
16535                         myfds.fd = fd;
16536                         myfds.events = POLLIN;
16537                         myfds.revents = 0;
16538                         ret = poll(&myfds, 1, 100);
16539                 } else {
16540                         ret = -1;
16541                 }
16542         }
16543         ${cf_cv_main_return:-return}(ret < 0);
16544 }
16545 _ACEOF
16546 rm -f conftest$ac_exeext
16547 if { (eval echo "$as_me:16547: \"$ac_link\"") >&5
16548   (eval $ac_link) 2>&5
16549   ac_status=$?
16550   echo "$as_me:16550: \$? = $ac_status" >&5
16551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16552   { (eval echo "$as_me:16552: \"$ac_try\"") >&5
16553   (eval $ac_try) 2>&5
16554   ac_status=$?
16555   echo "$as_me:16555: \$? = $ac_status" >&5
16556   (exit $ac_status); }; }; then
16557   cf_cv_working_poll=yes
16558 else
16559   echo "$as_me: program exited with status $ac_status" >&5
16560 echo "$as_me: failed program was:" >&5
16561 cat conftest.$ac_ext >&5
16562 cf_cv_working_poll=no
16563 fi
16564 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16565 fi
16566 fi
16567 echo "$as_me:16567: result: $cf_cv_working_poll" >&5
16568 echo "${ECHO_T}$cf_cv_working_poll" >&6
16569 test "$cf_cv_working_poll" = "yes" &&
16570 cat >>confdefs.h <<\EOF
16571 #define HAVE_WORKING_POLL 1
16572 EOF
16573
16574 echo "$as_me:16574: checking for va_copy" >&5
16575 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16576 if test "${cf_cv_have_va_copy+set}" = set; then
16577   echo $ECHO_N "(cached) $ECHO_C" >&6
16578 else
16579
16580 cat >conftest.$ac_ext <<_ACEOF
16581 #line 16581 "configure"
16582 #include "confdefs.h"
16583
16584 #include <stdarg.h>
16585
16586 int
16587 main ()
16588 {
16589
16590         static va_list dst;
16591         static va_list src;
16592         va_copy(dst, src)
16593   ;
16594   return 0;
16595 }
16596 _ACEOF
16597 rm -f conftest.$ac_objext conftest$ac_exeext
16598 if { (eval echo "$as_me:16598: \"$ac_link\"") >&5
16599   (eval $ac_link) 2>&5
16600   ac_status=$?
16601   echo "$as_me:16601: \$? = $ac_status" >&5
16602   (exit $ac_status); } &&
16603          { ac_try='test -s conftest$ac_exeext'
16604   { (eval echo "$as_me:16604: \"$ac_try\"") >&5
16605   (eval $ac_try) 2>&5
16606   ac_status=$?
16607   echo "$as_me:16607: \$? = $ac_status" >&5
16608   (exit $ac_status); }; }; then
16609   cf_cv_have_va_copy=yes
16610 else
16611   echo "$as_me: failed program was:" >&5
16612 cat conftest.$ac_ext >&5
16613 cf_cv_have_va_copy=no
16614 fi
16615 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16616 fi
16617 echo "$as_me:16617: result: $cf_cv_have_va_copy" >&5
16618 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16619
16620 test "$cf_cv_have_va_copy" = yes &&
16621 cat >>confdefs.h <<\EOF
16622 #define HAVE_VA_COPY 1
16623 EOF
16624
16625 echo "$as_me:16625: checking for __va_copy" >&5
16626 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16627 if test "${cf_cv_have___va_copy+set}" = set; then
16628   echo $ECHO_N "(cached) $ECHO_C" >&6
16629 else
16630
16631 cat >conftest.$ac_ext <<_ACEOF
16632 #line 16632 "configure"
16633 #include "confdefs.h"
16634
16635 #include <stdarg.h>
16636
16637 int
16638 main ()
16639 {
16640
16641         static va_list dst;
16642         static va_list src;
16643         __va_copy(dst, src)
16644   ;
16645   return 0;
16646 }
16647 _ACEOF
16648 rm -f conftest.$ac_objext conftest$ac_exeext
16649 if { (eval echo "$as_me:16649: \"$ac_link\"") >&5
16650   (eval $ac_link) 2>&5
16651   ac_status=$?
16652   echo "$as_me:16652: \$? = $ac_status" >&5
16653   (exit $ac_status); } &&
16654          { ac_try='test -s conftest$ac_exeext'
16655   { (eval echo "$as_me:16655: \"$ac_try\"") >&5
16656   (eval $ac_try) 2>&5
16657   ac_status=$?
16658   echo "$as_me:16658: \$? = $ac_status" >&5
16659   (exit $ac_status); }; }; then
16660   cf_cv_have___va_copy=yes
16661 else
16662   echo "$as_me: failed program was:" >&5
16663 cat conftest.$ac_ext >&5
16664 cf_cv_have___va_copy=no
16665 fi
16666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16667 fi
16668 echo "$as_me:16668: result: $cf_cv_have___va_copy" >&5
16669 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16670
16671 test "$cf_cv_have___va_copy" = yes &&
16672 cat >>confdefs.h <<\EOF
16673 #define HAVE___VA_COPY 1
16674 EOF
16675
16676 echo "$as_me:16676: checking for pid_t" >&5
16677 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16678 if test "${ac_cv_type_pid_t+set}" = set; then
16679   echo $ECHO_N "(cached) $ECHO_C" >&6
16680 else
16681   cat >conftest.$ac_ext <<_ACEOF
16682 #line 16682 "configure"
16683 #include "confdefs.h"
16684 $ac_includes_default
16685 int
16686 main ()
16687 {
16688 if ((pid_t *) 0)
16689   return 0;
16690 if (sizeof (pid_t))
16691   return 0;
16692   ;
16693   return 0;
16694 }
16695 _ACEOF
16696 rm -f conftest.$ac_objext
16697 if { (eval echo "$as_me:16697: \"$ac_compile\"") >&5
16698   (eval $ac_compile) 2>&5
16699   ac_status=$?
16700   echo "$as_me:16700: \$? = $ac_status" >&5
16701   (exit $ac_status); } &&
16702          { ac_try='test -s conftest.$ac_objext'
16703   { (eval echo "$as_me:16703: \"$ac_try\"") >&5
16704   (eval $ac_try) 2>&5
16705   ac_status=$?
16706   echo "$as_me:16706: \$? = $ac_status" >&5
16707   (exit $ac_status); }; }; then
16708   ac_cv_type_pid_t=yes
16709 else
16710   echo "$as_me: failed program was:" >&5
16711 cat conftest.$ac_ext >&5
16712 ac_cv_type_pid_t=no
16713 fi
16714 rm -f conftest.$ac_objext conftest.$ac_ext
16715 fi
16716 echo "$as_me:16716: result: $ac_cv_type_pid_t" >&5
16717 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16718 if test $ac_cv_type_pid_t = yes; then
16719   :
16720 else
16721
16722 cat >>confdefs.h <<EOF
16723 #define pid_t int
16724 EOF
16725
16726 fi
16727
16728 for ac_header in unistd.h vfork.h
16729 do
16730 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16731 echo "$as_me:16731: checking for $ac_header" >&5
16732 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16733 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16734   echo $ECHO_N "(cached) $ECHO_C" >&6
16735 else
16736   cat >conftest.$ac_ext <<_ACEOF
16737 #line 16737 "configure"
16738 #include "confdefs.h"
16739 #include <$ac_header>
16740 _ACEOF
16741 if { (eval echo "$as_me:16741: \"$ac_cpp conftest.$ac_ext\"") >&5
16742   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16743   ac_status=$?
16744   egrep -v '^ *\+' conftest.er1 >conftest.err
16745   rm -f conftest.er1
16746   cat conftest.err >&5
16747   echo "$as_me:16747: \$? = $ac_status" >&5
16748   (exit $ac_status); } >/dev/null; then
16749   if test -s conftest.err; then
16750     ac_cpp_err=$ac_c_preproc_warn_flag
16751   else
16752     ac_cpp_err=
16753   fi
16754 else
16755   ac_cpp_err=yes
16756 fi
16757 if test -z "$ac_cpp_err"; then
16758   eval "$as_ac_Header=yes"
16759 else
16760   echo "$as_me: failed program was:" >&5
16761   cat conftest.$ac_ext >&5
16762   eval "$as_ac_Header=no"
16763 fi
16764 rm -f conftest.err conftest.$ac_ext
16765 fi
16766 echo "$as_me:16766: result: `eval echo '${'$as_ac_Header'}'`" >&5
16767 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16768 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16769   cat >>confdefs.h <<EOF
16770 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16771 EOF
16772
16773 fi
16774 done
16775
16776 for ac_func in fork vfork
16777 do
16778 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16779 echo "$as_me:16779: checking for $ac_func" >&5
16780 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16781 if eval "test \"\${$as_ac_var+set}\" = set"; then
16782   echo $ECHO_N "(cached) $ECHO_C" >&6
16783 else
16784   cat >conftest.$ac_ext <<_ACEOF
16785 #line 16785 "configure"
16786 #include "confdefs.h"
16787 /* System header to define __stub macros and hopefully few prototypes,
16788     which can conflict with char $ac_func (); below.  */
16789 #include <assert.h>
16790 /* Override any gcc2 internal prototype to avoid an error.  */
16791 #ifdef __cplusplus
16792 extern "C"
16793 #endif
16794 /* We use char because int might match the return type of a gcc2
16795    builtin and then its argument prototype would still apply.  */
16796 char $ac_func ();
16797 char (*f) ();
16798
16799 int
16800 main ()
16801 {
16802 /* The GNU C library defines this for functions which it implements
16803     to always fail with ENOSYS.  Some functions are actually named
16804     something starting with __ and the normal name is an alias.  */
16805 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16806 choke me
16807 #else
16808 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16809 #endif
16810
16811   ;
16812   return 0;
16813 }
16814 _ACEOF
16815 rm -f conftest.$ac_objext conftest$ac_exeext
16816 if { (eval echo "$as_me:16816: \"$ac_link\"") >&5
16817   (eval $ac_link) 2>&5
16818   ac_status=$?
16819   echo "$as_me:16819: \$? = $ac_status" >&5
16820   (exit $ac_status); } &&
16821          { ac_try='test -s conftest$ac_exeext'
16822   { (eval echo "$as_me:16822: \"$ac_try\"") >&5
16823   (eval $ac_try) 2>&5
16824   ac_status=$?
16825   echo "$as_me:16825: \$? = $ac_status" >&5
16826   (exit $ac_status); }; }; then
16827   eval "$as_ac_var=yes"
16828 else
16829   echo "$as_me: failed program was:" >&5
16830 cat conftest.$ac_ext >&5
16831 eval "$as_ac_var=no"
16832 fi
16833 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16834 fi
16835 echo "$as_me:16835: result: `eval echo '${'$as_ac_var'}'`" >&5
16836 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16837 if test `eval echo '${'$as_ac_var'}'` = yes; then
16838   cat >>confdefs.h <<EOF
16839 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16840 EOF
16841
16842 fi
16843 done
16844
16845 ac_cv_func_fork_works=$ac_cv_func_fork
16846 if test "x$ac_cv_func_fork" = xyes; then
16847   echo "$as_me:16847: checking for working fork" >&5
16848 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16849 if test "${ac_cv_func_fork_works+set}" = set; then
16850   echo $ECHO_N "(cached) $ECHO_C" >&6
16851 else
16852   if test "$cross_compiling" = yes; then
16853   ac_cv_func_fork_works=cross
16854 else
16855   cat >conftest.$ac_ext <<_ACEOF
16856 /* By Rüdiger Kuhlmann. */
16857       #include <sys/types.h>
16858       #if HAVE_UNISTD_H
16859       # include <unistd.h>
16860       #endif
16861       /* Some systems only have a dummy stub for fork() */
16862       int main ()
16863       {
16864         if (fork() < 0)
16865           $ac_main_return (1);
16866         $ac_main_return (0);
16867       }
16868 _ACEOF
16869 rm -f conftest$ac_exeext
16870 if { (eval echo "$as_me:16870: \"$ac_link\"") >&5
16871   (eval $ac_link) 2>&5
16872   ac_status=$?
16873   echo "$as_me:16873: \$? = $ac_status" >&5
16874   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16875   { (eval echo "$as_me:16875: \"$ac_try\"") >&5
16876   (eval $ac_try) 2>&5
16877   ac_status=$?
16878   echo "$as_me:16878: \$? = $ac_status" >&5
16879   (exit $ac_status); }; }; then
16880   ac_cv_func_fork_works=yes
16881 else
16882   echo "$as_me: program exited with status $ac_status" >&5
16883 echo "$as_me: failed program was:" >&5
16884 cat conftest.$ac_ext >&5
16885 ac_cv_func_fork_works=no
16886 fi
16887 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16888 fi
16889 fi
16890 echo "$as_me:16890: result: $ac_cv_func_fork_works" >&5
16891 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16892
16893 fi
16894 if test "x$ac_cv_func_fork_works" = xcross; then
16895   case $host in
16896     *-*-amigaos* | *-*-msdosdjgpp*)
16897       # Override, as these systems have only a dummy fork() stub
16898       ac_cv_func_fork_works=no
16899       ;;
16900     *)
16901       ac_cv_func_fork_works=yes
16902       ;;
16903   esac
16904   { echo "$as_me:16904: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16905 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16906 fi
16907 ac_cv_func_vfork_works=$ac_cv_func_vfork
16908 if test "x$ac_cv_func_vfork" = xyes; then
16909   echo "$as_me:16909: checking for working vfork" >&5
16910 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16911 if test "${ac_cv_func_vfork_works+set}" = set; then
16912   echo $ECHO_N "(cached) $ECHO_C" >&6
16913 else
16914   if test "$cross_compiling" = yes; then
16915   ac_cv_func_vfork_works=cross
16916 else
16917   cat >conftest.$ac_ext <<_ACEOF
16918 #line 16918 "configure"
16919 #include "confdefs.h"
16920 /* Thanks to Paul Eggert for this test.  */
16921 #include <stdio.h>
16922 #include <sys/types.h>
16923 #include <sys/stat.h>
16924 #if HAVE_UNISTD_H
16925 # include <unistd.h>
16926 #endif
16927 #if HAVE_VFORK_H
16928 # include <vfork.h>
16929 #endif
16930 /* On some sparc systems, changes by the child to local and incoming
16931    argument registers are propagated back to the parent.  The compiler
16932    is told about this with #include <vfork.h>, but some compilers
16933    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16934    static variable whose address is put into a register that is
16935    clobbered by the vfork.  */
16936 static
16937 #ifdef __cplusplus
16938 sparc_address_test (int arg)
16939 # else
16940 sparc_address_test (arg) int arg;
16941 #endif
16942 {
16943   static pid_t child;
16944   if (!child) {
16945     child = vfork ();
16946     if (child < 0) {
16947       perror ("vfork");
16948       _exit(2);
16949     }
16950     if (!child) {
16951       arg = getpid();
16952       write(-1, "", 0);
16953       _exit (arg);
16954     }
16955   }
16956 }
16957
16958 int
16959 main ()
16960 {
16961   pid_t parent = getpid ();
16962   pid_t child;
16963
16964   sparc_address_test ();
16965
16966   child = vfork ();
16967
16968   if (child == 0) {
16969     /* Here is another test for sparc vfork register problems.  This
16970        test uses lots of local variables, at least as many local
16971        variables as main has allocated so far including compiler
16972        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16973        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16974        reuse the register of parent for one of the local variables,
16975        since it will think that parent can't possibly be used any more
16976        in this routine.  Assigning to the local variable will thus
16977        munge parent in the parent process.  */
16978     pid_t
16979       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16980       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16981     /* Convince the compiler that p..p7 are live; otherwise, it might
16982        use the same hardware register for all 8 local variables.  */
16983     if (p != p1 || p != p2 || p != p3 || p != p4
16984         || p != p5 || p != p6 || p != p7)
16985       _exit(1);
16986
16987     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16988        from child file descriptors.  If the child closes a descriptor
16989        before it execs or exits, this munges the parent's descriptor
16990        as well.  Test for this by closing stdout in the child.  */
16991     _exit(close(fileno(stdout)) != 0);
16992   } else {
16993     int status;
16994     struct stat st;
16995
16996     while (wait(&status) != child)
16997       ;
16998     $ac_main_return(
16999          /* Was there some problem with vforking?  */
17000          child < 0
17001
17002          /* Did the child fail?  (This shouldn't happen.)  */
17003          || status
17004
17005          /* Did the vfork/compiler bug occur?  */
17006          || parent != getpid()
17007
17008          /* Did the file descriptor bug occur?  */
17009          || fstat(fileno(stdout), &st) != 0
17010          );
17011   }
17012 }
17013 _ACEOF
17014 rm -f conftest$ac_exeext
17015 if { (eval echo "$as_me:17015: \"$ac_link\"") >&5
17016   (eval $ac_link) 2>&5
17017   ac_status=$?
17018   echo "$as_me:17018: \$? = $ac_status" >&5
17019   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17020   { (eval echo "$as_me:17020: \"$ac_try\"") >&5
17021   (eval $ac_try) 2>&5
17022   ac_status=$?
17023   echo "$as_me:17023: \$? = $ac_status" >&5
17024   (exit $ac_status); }; }; then
17025   ac_cv_func_vfork_works=yes
17026 else
17027   echo "$as_me: program exited with status $ac_status" >&5
17028 echo "$as_me: failed program was:" >&5
17029 cat conftest.$ac_ext >&5
17030 ac_cv_func_vfork_works=no
17031 fi
17032 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17033 fi
17034 fi
17035 echo "$as_me:17035: result: $ac_cv_func_vfork_works" >&5
17036 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17037
17038 fi;
17039 if test "x$ac_cv_func_fork_works" = xcross; then
17040   ac_cv_func_vfork_works=ac_cv_func_vfork
17041   { echo "$as_me:17041: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17042 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17043 fi
17044
17045 if test "x$ac_cv_func_vfork_works" = xyes; then
17046
17047 cat >>confdefs.h <<\EOF
17048 #define HAVE_WORKING_VFORK 1
17049 EOF
17050
17051 else
17052
17053 cat >>confdefs.h <<\EOF
17054 #define vfork fork
17055 EOF
17056
17057 fi
17058 if test "x$ac_cv_func_fork_works" = xyes; then
17059
17060 cat >>confdefs.h <<\EOF
17061 #define HAVE_WORKING_FORK 1
17062 EOF
17063
17064 fi
17065
17066 # special check for test/ditto.c
17067
17068 echo "$as_me:17068: checking for openpty in -lutil" >&5
17069 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17070 if test "${ac_cv_lib_util_openpty+set}" = set; then
17071   echo $ECHO_N "(cached) $ECHO_C" >&6
17072 else
17073   ac_check_lib_save_LIBS=$LIBS
17074 LIBS="-lutil  $LIBS"
17075 cat >conftest.$ac_ext <<_ACEOF
17076 #line 17076 "configure"
17077 #include "confdefs.h"
17078
17079 /* Override any gcc2 internal prototype to avoid an error.  */
17080 #ifdef __cplusplus
17081 extern "C"
17082 #endif
17083 /* We use char because int might match the return type of a gcc2
17084    builtin and then its argument prototype would still apply.  */
17085 char openpty ();
17086 int
17087 main ()
17088 {
17089 openpty ();
17090   ;
17091   return 0;
17092 }
17093 _ACEOF
17094 rm -f conftest.$ac_objext conftest$ac_exeext
17095 if { (eval echo "$as_me:17095: \"$ac_link\"") >&5
17096   (eval $ac_link) 2>&5
17097   ac_status=$?
17098   echo "$as_me:17098: \$? = $ac_status" >&5
17099   (exit $ac_status); } &&
17100          { ac_try='test -s conftest$ac_exeext'
17101   { (eval echo "$as_me:17101: \"$ac_try\"") >&5
17102   (eval $ac_try) 2>&5
17103   ac_status=$?
17104   echo "$as_me:17104: \$? = $ac_status" >&5
17105   (exit $ac_status); }; }; then
17106   ac_cv_lib_util_openpty=yes
17107 else
17108   echo "$as_me: failed program was:" >&5
17109 cat conftest.$ac_ext >&5
17110 ac_cv_lib_util_openpty=no
17111 fi
17112 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17113 LIBS=$ac_check_lib_save_LIBS
17114 fi
17115 echo "$as_me:17115: result: $ac_cv_lib_util_openpty" >&5
17116 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17117 if test $ac_cv_lib_util_openpty = yes; then
17118   cf_cv_lib_util=yes
17119 else
17120   cf_cv_lib_util=no
17121 fi
17122
17123 echo "$as_me:17123: checking for openpty header" >&5
17124 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17125 if test "${cf_cv_func_openpty+set}" = set; then
17126   echo $ECHO_N "(cached) $ECHO_C" >&6
17127 else
17128
17129     cf_save_LIBS="$LIBS"
17130     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
17131     for cf_header in pty.h libutil.h util.h
17132     do
17133     cat >conftest.$ac_ext <<_ACEOF
17134 #line 17134 "configure"
17135 #include "confdefs.h"
17136
17137 #include <$cf_header>
17138
17139 int
17140 main ()
17141 {
17142
17143     int x = openpty((int *)0, (int *)0, (char *)0,
17144                    (struct termios *)0, (struct winsize *)0);
17145
17146   ;
17147   return 0;
17148 }
17149 _ACEOF
17150 rm -f conftest.$ac_objext conftest$ac_exeext
17151 if { (eval echo "$as_me:17151: \"$ac_link\"") >&5
17152   (eval $ac_link) 2>&5
17153   ac_status=$?
17154   echo "$as_me:17154: \$? = $ac_status" >&5
17155   (exit $ac_status); } &&
17156          { ac_try='test -s conftest$ac_exeext'
17157   { (eval echo "$as_me:17157: \"$ac_try\"") >&5
17158   (eval $ac_try) 2>&5
17159   ac_status=$?
17160   echo "$as_me:17160: \$? = $ac_status" >&5
17161   (exit $ac_status); }; }; then
17162
17163         cf_cv_func_openpty=$cf_header
17164         break
17165
17166 else
17167   echo "$as_me: failed program was:" >&5
17168 cat conftest.$ac_ext >&5
17169
17170         cf_cv_func_openpty=no
17171
17172 fi
17173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17174     done
17175     LIBS="$cf_save_LIBS"
17176
17177 fi
17178 echo "$as_me:17178: result: $cf_cv_func_openpty" >&5
17179 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17180
17181 if test "$cf_cv_func_openpty" != no ; then
17182
17183 cat >>confdefs.h <<EOF
17184 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17185 EOF
17186
17187 cat >>confdefs.h <<\EOF
17188 #define USE_XTERM_PTY 1
17189 EOF
17190
17191     if test "x$cf_cv_lib_util" = xyes ; then
17192         TEST_LIBS="-lutil $TEST_LIBS"
17193     fi
17194 fi
17195
17196 if test "$with_hashed_db" != no ; then
17197
17198 cat >>confdefs.h <<\EOF
17199 #define USE_HASHED_DB 1
17200 EOF
17201
17202 case $with_hashed_db in #(vi
17203 yes|*able*) #(vi
17204     ;;
17205 *)
17206     if test -d "$with_hashed_db" ; then
17207
17208 if test -n "$with_hashed_db/include" ; then
17209   for cf_add_incdir in $with_hashed_db/include
17210   do
17211         while test $cf_add_incdir != /usr/include
17212         do
17213           if test -d $cf_add_incdir
17214           then
17215                 cf_have_incdir=no
17216                 if test -n "$CFLAGS$CPPFLAGS" ; then
17217                   # a loop is needed to ensure we can add subdirs of existing dirs
17218                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17219                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17220                           cf_have_incdir=yes; break
17221                         fi
17222                   done
17223                 fi
17224
17225                 if test "$cf_have_incdir" = no ; then
17226                   if test "$cf_add_incdir" = /usr/local/include ; then
17227                         if test "$GCC" = yes
17228                         then
17229                           cf_save_CPPFLAGS=$CPPFLAGS
17230                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17231                           cat >conftest.$ac_ext <<_ACEOF
17232 #line 17232 "configure"
17233 #include "confdefs.h"
17234 #include <stdio.h>
17235 int
17236 main ()
17237 {
17238 printf("Hello")
17239   ;
17240   return 0;
17241 }
17242 _ACEOF
17243 rm -f conftest.$ac_objext
17244 if { (eval echo "$as_me:17244: \"$ac_compile\"") >&5
17245   (eval $ac_compile) 2>&5
17246   ac_status=$?
17247   echo "$as_me:17247: \$? = $ac_status" >&5
17248   (exit $ac_status); } &&
17249          { ac_try='test -s conftest.$ac_objext'
17250   { (eval echo "$as_me:17250: \"$ac_try\"") >&5
17251   (eval $ac_try) 2>&5
17252   ac_status=$?
17253   echo "$as_me:17253: \$? = $ac_status" >&5
17254   (exit $ac_status); }; }; then
17255   :
17256 else
17257   echo "$as_me: failed program was:" >&5
17258 cat conftest.$ac_ext >&5
17259 cf_have_incdir=yes
17260 fi
17261 rm -f conftest.$ac_objext conftest.$ac_ext
17262                           CPPFLAGS=$cf_save_CPPFLAGS
17263                         fi
17264                   fi
17265                 fi
17266
17267                 if test "$cf_have_incdir" = no ; then
17268                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
17269
17270 echo "${as_me:-configure}:17270: testing adding $cf_add_incdir to include-path ..." 1>&5
17271
17272                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17273
17274                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
17275                   test "$cf_top_incdir" = "$cf_add_incdir" && break
17276                   cf_add_incdir="$cf_top_incdir"
17277                 else
17278                   break
17279                 fi
17280           fi
17281         done
17282   done
17283 fi
17284
17285 if test -n "$with_hashed_db/lib" ; then
17286   for cf_add_libdir in $with_hashed_db/lib
17287   do
17288     if test $cf_add_libdir = /usr/lib ; then
17289       :
17290     elif test -d $cf_add_libdir
17291     then
17292       cf_have_libdir=no
17293       if test -n "$LDFLAGS$LIBS" ; then
17294         # a loop is needed to ensure we can add subdirs of existing dirs
17295         for cf_test_libdir in $LDFLAGS $LIBS ; do
17296           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17297             cf_have_libdir=yes; break
17298           fi
17299         done
17300       fi
17301       if test "$cf_have_libdir" = no ; then
17302         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
17303
17304 echo "${as_me:-configure}:17304: testing adding $cf_add_libdir to library-path ..." 1>&5
17305
17306         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17307       fi
17308     fi
17309   done
17310 fi
17311
17312     fi
17313 esac
17314
17315 echo "$as_me:17315: checking for db.h" >&5
17316 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
17317 if test "${ac_cv_header_db_h+set}" = set; then
17318   echo $ECHO_N "(cached) $ECHO_C" >&6
17319 else
17320   cat >conftest.$ac_ext <<_ACEOF
17321 #line 17321 "configure"
17322 #include "confdefs.h"
17323 #include <db.h>
17324 _ACEOF
17325 if { (eval echo "$as_me:17325: \"$ac_cpp conftest.$ac_ext\"") >&5
17326   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17327   ac_status=$?
17328   egrep -v '^ *\+' conftest.er1 >conftest.err
17329   rm -f conftest.er1
17330   cat conftest.err >&5
17331   echo "$as_me:17331: \$? = $ac_status" >&5
17332   (exit $ac_status); } >/dev/null; then
17333   if test -s conftest.err; then
17334     ac_cpp_err=$ac_c_preproc_warn_flag
17335   else
17336     ac_cpp_err=
17337   fi
17338 else
17339   ac_cpp_err=yes
17340 fi
17341 if test -z "$ac_cpp_err"; then
17342   ac_cv_header_db_h=yes
17343 else
17344   echo "$as_me: failed program was:" >&5
17345   cat conftest.$ac_ext >&5
17346   ac_cv_header_db_h=no
17347 fi
17348 rm -f conftest.err conftest.$ac_ext
17349 fi
17350 echo "$as_me:17350: result: $ac_cv_header_db_h" >&5
17351 echo "${ECHO_T}$ac_cv_header_db_h" >&6
17352 if test $ac_cv_header_db_h = yes; then
17353
17354 echo "$as_me:17354: checking for version of db" >&5
17355 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
17356 if test "${cf_cv_hashed_db_version+set}" = set; then
17357   echo $ECHO_N "(cached) $ECHO_C" >&6
17358 else
17359
17360 cf_cv_hashed_db_version=unknown
17361
17362 for cf_db_version in 1 2 3 4 5
17363 do
17364
17365 echo "${as_me:-configure}:17365: testing checking for db version $cf_db_version ..." 1>&5
17366
17367         cat >conftest.$ac_ext <<_ACEOF
17368 #line 17368 "configure"
17369 #include "confdefs.h"
17370
17371 $ac_includes_default
17372 #include <db.h>
17373
17374 #ifdef DB_VERSION_MAJOR
17375         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
17376 #if $cf_db_version == DB_VERSION_MAJOR
17377         /* ok */
17378 #else
17379         make an error
17380 #endif
17381 #else
17382 #if $cf_db_version == 1
17383         /* ok: assuming this is DB 1.8.5 */
17384 #else
17385         make an error
17386 #endif
17387 #endif
17388
17389 int
17390 main ()
17391 {
17392 DBT *foo = 0
17393   ;
17394   return 0;
17395 }
17396 _ACEOF
17397 rm -f conftest.$ac_objext
17398 if { (eval echo "$as_me:17398: \"$ac_compile\"") >&5
17399   (eval $ac_compile) 2>&5
17400   ac_status=$?
17401   echo "$as_me:17401: \$? = $ac_status" >&5
17402   (exit $ac_status); } &&
17403          { ac_try='test -s conftest.$ac_objext'
17404   { (eval echo "$as_me:17404: \"$ac_try\"") >&5
17405   (eval $ac_try) 2>&5
17406   ac_status=$?
17407   echo "$as_me:17407: \$? = $ac_status" >&5
17408   (exit $ac_status); }; }; then
17409
17410         cf_cv_hashed_db_version=$cf_db_version
17411         break
17412
17413 else
17414   echo "$as_me: failed program was:" >&5
17415 cat conftest.$ac_ext >&5
17416 fi
17417 rm -f conftest.$ac_objext conftest.$ac_ext
17418 done
17419
17420 fi
17421 echo "$as_me:17421: result: $cf_cv_hashed_db_version" >&5
17422 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
17423
17424 if test "$cf_cv_hashed_db_version" = unknown ; then
17425         { { echo "$as_me:17425: error: Cannot determine version of db" >&5
17426 echo "$as_me: error: Cannot determine version of db" >&2;}
17427    { (exit 1); exit 1; }; }
17428 else
17429
17430 echo "$as_me:17430: checking for db libraries" >&5
17431 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
17432 if test "${cf_cv_hashed_db_libs+set}" = set; then
17433   echo $ECHO_N "(cached) $ECHO_C" >&6
17434 else
17435
17436 cf_cv_hashed_db_libs=unknown
17437 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
17438 do
17439         cf_save_libs="$LIBS"
17440         if test -n "$cf_db_libs"; then
17441                 LIBS="-l$cf_db_libs $LIBS"
17442         fi
17443
17444 echo "${as_me:-configure}:17444: testing checking for library "$cf_db_libs" ..." 1>&5
17445
17446         cat >conftest.$ac_ext <<_ACEOF
17447 #line 17447 "configure"
17448 #include "confdefs.h"
17449
17450 $ac_includes_default
17451 #include <db.h>
17452
17453 int
17454 main ()
17455 {
17456
17457         char *path = "/tmp/foo";
17458 #ifdef DB_VERSION_MAJOR
17459 #if DB_VERSION_MAJOR >= 4
17460         DB *result = 0;
17461         db_create(&result, NULL, 0);
17462         result->open(result,
17463                 NULL,
17464                 path,
17465                 path,
17466                 DB_HASH,
17467                 DB_CREATE,
17468                 0644);
17469 #elif DB_VERSION_MAJOR >= 3
17470         DB *result = 0;
17471         db_create(&result, NULL, 0);
17472         result->open(result,
17473                 path,
17474                 path,
17475                 DB_HASH,
17476                 DB_CREATE,
17477                 0644);
17478 #elif DB_VERSION_MAJOR >= 2
17479         DB *result = 0;
17480         db_open(path,
17481                 DB_HASH,
17482                 DB_CREATE,
17483                 0644,
17484                 (DB_ENV *) 0,
17485                 (DB_INFO *) 0,
17486                 &result);
17487 #endif /* DB_VERSION_MAJOR */
17488 #else
17489         DB *result = dbopen(path,
17490                      2,
17491                      0644,
17492                      DB_HASH,
17493                      0);
17494 #endif
17495         ${cf_cv_main_return:-return}(result != 0)
17496
17497   ;
17498   return 0;
17499 }
17500 _ACEOF
17501 rm -f conftest.$ac_objext conftest$ac_exeext
17502 if { (eval echo "$as_me:17502: \"$ac_link\"") >&5
17503   (eval $ac_link) 2>&5
17504   ac_status=$?
17505   echo "$as_me:17505: \$? = $ac_status" >&5
17506   (exit $ac_status); } &&
17507          { ac_try='test -s conftest$ac_exeext'
17508   { (eval echo "$as_me:17508: \"$ac_try\"") >&5
17509   (eval $ac_try) 2>&5
17510   ac_status=$?
17511   echo "$as_me:17511: \$? = $ac_status" >&5
17512   (exit $ac_status); }; }; then
17513
17514         if test -n "$cf_db_libs" ; then
17515                 cf_cv_hashed_db_libs=$cf_db_libs
17516         else
17517                 cf_cv_hashed_db_libs=default
17518         fi
17519         LIBS="$cf_save_libs"
17520         break
17521
17522 else
17523   echo "$as_me: failed program was:" >&5
17524 cat conftest.$ac_ext >&5
17525 fi
17526 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17527         LIBS="$cf_save_libs"
17528 done
17529
17530 fi
17531 echo "$as_me:17531: result: $cf_cv_hashed_db_libs" >&5
17532 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
17533
17534         if test "$cf_cv_hashed_db_libs" = unknown ; then
17535                 { { echo "$as_me:17535: error: Cannot determine library for db" >&5
17536 echo "$as_me: error: Cannot determine library for db" >&2;}
17537    { (exit 1); exit 1; }; }
17538         elif test "$cf_cv_hashed_db_libs" != default ; then
17539                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17540         fi
17541 fi
17542
17543 else
17544
17545         { { echo "$as_me:17545: error: Cannot find db.h" >&5
17546 echo "$as_me: error: Cannot find db.h" >&2;}
17547    { (exit 1); exit 1; }; }
17548
17549 fi
17550
17551 fi
17552
17553 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17554         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17555         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17556 fi
17557
17558 # Just in case, check if the C compiler has a bool type.
17559
17560 echo "$as_me:17560: checking if we should include stdbool.h" >&5
17561 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17562
17563 if test "${cf_cv_header_stdbool_h+set}" = set; then
17564   echo $ECHO_N "(cached) $ECHO_C" >&6
17565 else
17566
17567         cat >conftest.$ac_ext <<_ACEOF
17568 #line 17568 "configure"
17569 #include "confdefs.h"
17570
17571 int
17572 main ()
17573 {
17574 bool foo = false
17575   ;
17576   return 0;
17577 }
17578 _ACEOF
17579 rm -f conftest.$ac_objext
17580 if { (eval echo "$as_me:17580: \"$ac_compile\"") >&5
17581   (eval $ac_compile) 2>&5
17582   ac_status=$?
17583   echo "$as_me:17583: \$? = $ac_status" >&5
17584   (exit $ac_status); } &&
17585          { ac_try='test -s conftest.$ac_objext'
17586   { (eval echo "$as_me:17586: \"$ac_try\"") >&5
17587   (eval $ac_try) 2>&5
17588   ac_status=$?
17589   echo "$as_me:17589: \$? = $ac_status" >&5
17590   (exit $ac_status); }; }; then
17591   cf_cv_header_stdbool_h=0
17592 else
17593   echo "$as_me: failed program was:" >&5
17594 cat conftest.$ac_ext >&5
17595 cat >conftest.$ac_ext <<_ACEOF
17596 #line 17596 "configure"
17597 #include "confdefs.h"
17598
17599 #ifndef __BEOS__
17600 #include <stdbool.h>
17601 #endif
17602
17603 int
17604 main ()
17605 {
17606 bool foo = false
17607   ;
17608   return 0;
17609 }
17610 _ACEOF
17611 rm -f conftest.$ac_objext
17612 if { (eval echo "$as_me:17612: \"$ac_compile\"") >&5
17613   (eval $ac_compile) 2>&5
17614   ac_status=$?
17615   echo "$as_me:17615: \$? = $ac_status" >&5
17616   (exit $ac_status); } &&
17617          { ac_try='test -s conftest.$ac_objext'
17618   { (eval echo "$as_me:17618: \"$ac_try\"") >&5
17619   (eval $ac_try) 2>&5
17620   ac_status=$?
17621   echo "$as_me:17621: \$? = $ac_status" >&5
17622   (exit $ac_status); }; }; then
17623   cf_cv_header_stdbool_h=1
17624 else
17625   echo "$as_me: failed program was:" >&5
17626 cat conftest.$ac_ext >&5
17627 cf_cv_header_stdbool_h=0
17628 fi
17629 rm -f conftest.$ac_objext conftest.$ac_ext
17630 fi
17631 rm -f conftest.$ac_objext conftest.$ac_ext
17632 fi
17633
17634 if test "$cf_cv_header_stdbool_h" = 1
17635 then    echo "$as_me:17635: result: yes" >&5
17636 echo "${ECHO_T}yes" >&6
17637 else    echo "$as_me:17637: result: no" >&5
17638 echo "${ECHO_T}no" >&6
17639 fi
17640
17641 echo "$as_me:17641: checking for builtin bool type" >&5
17642 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17643
17644 if test "${cf_cv_cc_bool_type+set}" = set; then
17645   echo $ECHO_N "(cached) $ECHO_C" >&6
17646 else
17647
17648         cat >conftest.$ac_ext <<_ACEOF
17649 #line 17649 "configure"
17650 #include "confdefs.h"
17651
17652 #include <stdio.h>
17653 #include <sys/types.h>
17654
17655 int
17656 main ()
17657 {
17658 bool x = false
17659   ;
17660   return 0;
17661 }
17662 _ACEOF
17663 rm -f conftest.$ac_objext
17664 if { (eval echo "$as_me:17664: \"$ac_compile\"") >&5
17665   (eval $ac_compile) 2>&5
17666   ac_status=$?
17667   echo "$as_me:17667: \$? = $ac_status" >&5
17668   (exit $ac_status); } &&
17669          { ac_try='test -s conftest.$ac_objext'
17670   { (eval echo "$as_me:17670: \"$ac_try\"") >&5
17671   (eval $ac_try) 2>&5
17672   ac_status=$?
17673   echo "$as_me:17673: \$? = $ac_status" >&5
17674   (exit $ac_status); }; }; then
17675   cf_cv_cc_bool_type=1
17676 else
17677   echo "$as_me: failed program was:" >&5
17678 cat conftest.$ac_ext >&5
17679 cf_cv_cc_bool_type=0
17680 fi
17681 rm -f conftest.$ac_objext conftest.$ac_ext
17682
17683 fi
17684
17685 if test "$cf_cv_cc_bool_type" = 1
17686 then    echo "$as_me:17686: result: yes" >&5
17687 echo "${ECHO_T}yes" >&6
17688 else    echo "$as_me:17688: result: no" >&5
17689 echo "${ECHO_T}no" >&6
17690 fi
17691
17692 # Check for C++ compiler characteristics (and ensure that it's there!)
17693 if test -n "$CXX" ; then
17694         ac_ext=cc
17695 ac_cpp='$CXXCPP $CPPFLAGS'
17696 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17697 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17698 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17699 ac_main_return=return
17700
17701 if test -n "$GXX" ; then
17702 case $cf_cv_system_name in #(vi
17703 os2*) #(vi
17704         cf_stdcpp_libname=stdcpp
17705         ;;
17706 *)
17707         cf_stdcpp_libname=stdc++
17708         ;;
17709 esac
17710 echo "$as_me:17710: checking for library $cf_stdcpp_libname" >&5
17711 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17712 if test "${cf_cv_libstdcpp+set}" = set; then
17713   echo $ECHO_N "(cached) $ECHO_C" >&6
17714 else
17715
17716         cf_save="$LIBS"
17717         LIBS="-l$cf_stdcpp_libname $LIBS"
17718 cat >conftest.$ac_ext <<_ACEOF
17719 #line 17719 "configure"
17720 #include "confdefs.h"
17721
17722 #include <strstream.h>
17723 int
17724 main ()
17725 {
17726
17727 char buf[80];
17728 strstreambuf foo(buf, sizeof(buf))
17729
17730   ;
17731   return 0;
17732 }
17733 _ACEOF
17734 rm -f conftest.$ac_objext conftest$ac_exeext
17735 if { (eval echo "$as_me:17735: \"$ac_link\"") >&5
17736   (eval $ac_link) 2>&5
17737   ac_status=$?
17738   echo "$as_me:17738: \$? = $ac_status" >&5
17739   (exit $ac_status); } &&
17740          { ac_try='test -s conftest$ac_exeext'
17741   { (eval echo "$as_me:17741: \"$ac_try\"") >&5
17742   (eval $ac_try) 2>&5
17743   ac_status=$?
17744   echo "$as_me:17744: \$? = $ac_status" >&5
17745   (exit $ac_status); }; }; then
17746   cf_cv_libstdcpp=yes
17747 else
17748   echo "$as_me: failed program was:" >&5
17749 cat conftest.$ac_ext >&5
17750 cf_cv_libstdcpp=no
17751 fi
17752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17753         LIBS="$cf_save"
17754
17755 fi
17756 echo "$as_me:17756: result: $cf_cv_libstdcpp" >&5
17757 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17758 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17759 fi
17760
17761         echo "$as_me:17761: checking whether $CXX understands -c and -o together" >&5
17762 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17763 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17764   echo $ECHO_N "(cached) $ECHO_C" >&6
17765 else
17766
17767 cat > conftest.$ac_ext <<CF_EOF
17768 #include <stdio.h>
17769 int main()
17770 {
17771         ${cf_cv_main_return:-return}(0);
17772 }
17773 CF_EOF
17774 # We do the test twice because some compilers refuse to overwrite an
17775 # existing .o file with -o, though they will create one.
17776 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17777 if { (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); } &&
17782   test -f conftest2.$ac_objext && { (eval echo "$as_me:17782: \"$ac_try\"") >&5
17783   (eval $ac_try) 2>&5
17784   ac_status=$?
17785   echo "$as_me:17785: \$? = $ac_status" >&5
17786   (exit $ac_status); };
17787 then
17788   eval cf_cv_prog_CXX_c_o=yes
17789 else
17790   eval cf_cv_prog_CXX_c_o=no
17791 fi
17792 rm -rf conftest*
17793
17794 fi
17795 if test $cf_cv_prog_CXX_c_o = yes; then
17796   echo "$as_me:17796: result: yes" >&5
17797 echo "${ECHO_T}yes" >&6
17798 else
17799   echo "$as_me:17799: result: no" >&5
17800 echo "${ECHO_T}no" >&6
17801 fi
17802
17803         case $GXX_VERSION in
17804         1*|2.0-6*)
17805                 cf_cxx_library=yes
17806                 ;;
17807         *-2.7*|2.7*)
17808
17809 cf_cxx_library=unknown
17810 case $cf_cv_system_name in #(vi
17811 os2*) #(vi
17812         cf_gpp_libname=gpp
17813         ;;
17814 *)
17815         cf_gpp_libname=g++
17816         ;;
17817 esac
17818 if test "$GXX" = yes; then
17819         echo "$as_me:17819: checking for lib$cf_gpp_libname" >&5
17820 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17821         cf_save="$LIBS"
17822         LIBS="-l$cf_gpp_libname $LIBS"
17823         cat >conftest.$ac_ext <<_ACEOF
17824 #line 17824 "configure"
17825 #include "confdefs.h"
17826
17827 #include <$cf_gpp_libname/builtin.h>
17828
17829 int
17830 main ()
17831 {
17832 two_arg_error_handler_t foo2 = lib_error_handler
17833   ;
17834   return 0;
17835 }
17836 _ACEOF
17837 rm -f conftest.$ac_objext conftest$ac_exeext
17838 if { (eval echo "$as_me:17838: \"$ac_link\"") >&5
17839   (eval $ac_link) 2>&5
17840   ac_status=$?
17841   echo "$as_me:17841: \$? = $ac_status" >&5
17842   (exit $ac_status); } &&
17843          { ac_try='test -s conftest$ac_exeext'
17844   { (eval echo "$as_me:17844: \"$ac_try\"") >&5
17845   (eval $ac_try) 2>&5
17846   ac_status=$?
17847   echo "$as_me:17847: \$? = $ac_status" >&5
17848   (exit $ac_status); }; }; then
17849   cf_cxx_library=yes
17850          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17851          if test "$cf_gpp_libname" = cpp ; then
17852
17853 cat >>confdefs.h <<\EOF
17854 #define HAVE_GPP_BUILTIN_H 1
17855 EOF
17856
17857          else
17858
17859 cat >>confdefs.h <<\EOF
17860 #define HAVE_GXX_BUILTIN_H 1
17861 EOF
17862
17863          fi
17864 else
17865   echo "$as_me: failed program was:" >&5
17866 cat conftest.$ac_ext >&5
17867 cat >conftest.$ac_ext <<_ACEOF
17868 #line 17868 "configure"
17869 #include "confdefs.h"
17870
17871 #include <builtin.h>
17872
17873 int
17874 main ()
17875 {
17876 two_arg_error_handler_t foo2 = lib_error_handler
17877   ;
17878   return 0;
17879 }
17880 _ACEOF
17881 rm -f conftest.$ac_objext conftest$ac_exeext
17882 if { (eval echo "$as_me:17882: \"$ac_link\"") >&5
17883   (eval $ac_link) 2>&5
17884   ac_status=$?
17885   echo "$as_me:17885: \$? = $ac_status" >&5
17886   (exit $ac_status); } &&
17887          { ac_try='test -s conftest$ac_exeext'
17888   { (eval echo "$as_me:17888: \"$ac_try\"") >&5
17889   (eval $ac_try) 2>&5
17890   ac_status=$?
17891   echo "$as_me:17891: \$? = $ac_status" >&5
17892   (exit $ac_status); }; }; then
17893   cf_cxx_library=yes
17894          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17895
17896 cat >>confdefs.h <<\EOF
17897 #define HAVE_BUILTIN_H 1
17898 EOF
17899
17900 else
17901   echo "$as_me: failed program was:" >&5
17902 cat conftest.$ac_ext >&5
17903 cf_cxx_library=no
17904 fi
17905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17906 fi
17907 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17908         LIBS="$cf_save"
17909         echo "$as_me:17909: result: $cf_cxx_library" >&5
17910 echo "${ECHO_T}$cf_cxx_library" >&6
17911 fi
17912
17913                 ;;
17914         *)
17915                 cf_cxx_library=no
17916                 ;;
17917         esac
17918
17919         ac_ext=cc
17920 ac_cpp='$CXXCPP $CPPFLAGS'
17921 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17922 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17923 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17924 ac_main_return=return
17925 echo "$as_me:17925: checking how to run the C++ preprocessor" >&5
17926 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17927 if test -z "$CXXCPP"; then
17928   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17929   echo $ECHO_N "(cached) $ECHO_C" >&6
17930 else
17931       # Double quotes because CXXCPP needs to be expanded
17932     for CXXCPP in "$CXX -E" "/lib/cpp"
17933     do
17934       ac_preproc_ok=false
17935 for ac_cxx_preproc_warn_flag in '' yes
17936 do
17937   # Use a header file that comes with gcc, so configuring glibc
17938   # with a fresh cross-compiler works.
17939   # On the NeXT, cc -E runs the code through the compiler's parser,
17940   # not just through cpp. "Syntax error" is here to catch this case.
17941   cat >conftest.$ac_ext <<_ACEOF
17942 #line 17942 "configure"
17943 #include "confdefs.h"
17944 #include <assert.h>
17945                      Syntax error
17946 _ACEOF
17947 if { (eval echo "$as_me:17947: \"$ac_cpp conftest.$ac_ext\"") >&5
17948   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17949   ac_status=$?
17950   egrep -v '^ *\+' conftest.er1 >conftest.err
17951   rm -f conftest.er1
17952   cat conftest.err >&5
17953   echo "$as_me:17953: \$? = $ac_status" >&5
17954   (exit $ac_status); } >/dev/null; then
17955   if test -s conftest.err; then
17956     ac_cpp_err=$ac_cxx_preproc_warn_flag
17957   else
17958     ac_cpp_err=
17959   fi
17960 else
17961   ac_cpp_err=yes
17962 fi
17963 if test -z "$ac_cpp_err"; then
17964   :
17965 else
17966   echo "$as_me: failed program was:" >&5
17967   cat conftest.$ac_ext >&5
17968   # Broken: fails on valid input.
17969 continue
17970 fi
17971 rm -f conftest.err conftest.$ac_ext
17972
17973   # OK, works on sane cases.  Now check whether non-existent headers
17974   # can be detected and how.
17975   cat >conftest.$ac_ext <<_ACEOF
17976 #line 17976 "configure"
17977 #include "confdefs.h"
17978 #include <ac_nonexistent.h>
17979 _ACEOF
17980 if { (eval echo "$as_me:17980: \"$ac_cpp conftest.$ac_ext\"") >&5
17981   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17982   ac_status=$?
17983   egrep -v '^ *\+' conftest.er1 >conftest.err
17984   rm -f conftest.er1
17985   cat conftest.err >&5
17986   echo "$as_me:17986: \$? = $ac_status" >&5
17987   (exit $ac_status); } >/dev/null; then
17988   if test -s conftest.err; then
17989     ac_cpp_err=$ac_cxx_preproc_warn_flag
17990   else
17991     ac_cpp_err=
17992   fi
17993 else
17994   ac_cpp_err=yes
17995 fi
17996 if test -z "$ac_cpp_err"; then
17997   # Broken: success on invalid input.
17998 continue
17999 else
18000   echo "$as_me: failed program was:" >&5
18001   cat conftest.$ac_ext >&5
18002   # Passes both tests.
18003 ac_preproc_ok=:
18004 break
18005 fi
18006 rm -f conftest.err conftest.$ac_ext
18007
18008 done
18009 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18010 rm -f conftest.err conftest.$ac_ext
18011 if $ac_preproc_ok; then
18012   break
18013 fi
18014
18015     done
18016     ac_cv_prog_CXXCPP=$CXXCPP
18017
18018 fi
18019   CXXCPP=$ac_cv_prog_CXXCPP
18020 else
18021   ac_cv_prog_CXXCPP=$CXXCPP
18022 fi
18023 echo "$as_me:18023: result: $CXXCPP" >&5
18024 echo "${ECHO_T}$CXXCPP" >&6
18025 ac_preproc_ok=false
18026 for ac_cxx_preproc_warn_flag in '' yes
18027 do
18028   # Use a header file that comes with gcc, so configuring glibc
18029   # with a fresh cross-compiler works.
18030   # On the NeXT, cc -E runs the code through the compiler's parser,
18031   # not just through cpp. "Syntax error" is here to catch this case.
18032   cat >conftest.$ac_ext <<_ACEOF
18033 #line 18033 "configure"
18034 #include "confdefs.h"
18035 #include <assert.h>
18036                      Syntax error
18037 _ACEOF
18038 if { (eval echo "$as_me:18038: \"$ac_cpp conftest.$ac_ext\"") >&5
18039   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18040   ac_status=$?
18041   egrep -v '^ *\+' conftest.er1 >conftest.err
18042   rm -f conftest.er1
18043   cat conftest.err >&5
18044   echo "$as_me:18044: \$? = $ac_status" >&5
18045   (exit $ac_status); } >/dev/null; then
18046   if test -s conftest.err; then
18047     ac_cpp_err=$ac_cxx_preproc_warn_flag
18048   else
18049     ac_cpp_err=
18050   fi
18051 else
18052   ac_cpp_err=yes
18053 fi
18054 if test -z "$ac_cpp_err"; then
18055   :
18056 else
18057   echo "$as_me: failed program was:" >&5
18058   cat conftest.$ac_ext >&5
18059   # Broken: fails on valid input.
18060 continue
18061 fi
18062 rm -f conftest.err conftest.$ac_ext
18063
18064   # OK, works on sane cases.  Now check whether non-existent headers
18065   # can be detected and how.
18066   cat >conftest.$ac_ext <<_ACEOF
18067 #line 18067 "configure"
18068 #include "confdefs.h"
18069 #include <ac_nonexistent.h>
18070 _ACEOF
18071 if { (eval echo "$as_me:18071: \"$ac_cpp conftest.$ac_ext\"") >&5
18072   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18073   ac_status=$?
18074   egrep -v '^ *\+' conftest.er1 >conftest.err
18075   rm -f conftest.er1
18076   cat conftest.err >&5
18077   echo "$as_me:18077: \$? = $ac_status" >&5
18078   (exit $ac_status); } >/dev/null; then
18079   if test -s conftest.err; then
18080     ac_cpp_err=$ac_cxx_preproc_warn_flag
18081   else
18082     ac_cpp_err=
18083   fi
18084 else
18085   ac_cpp_err=yes
18086 fi
18087 if test -z "$ac_cpp_err"; then
18088   # Broken: success on invalid input.
18089 continue
18090 else
18091   echo "$as_me: failed program was:" >&5
18092   cat conftest.$ac_ext >&5
18093   # Passes both tests.
18094 ac_preproc_ok=:
18095 break
18096 fi
18097 rm -f conftest.err conftest.$ac_ext
18098
18099 done
18100 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
18101 rm -f conftest.err conftest.$ac_ext
18102 if $ac_preproc_ok; then
18103   :
18104 else
18105   { { echo "$as_me:18105: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
18106 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
18107    { (exit 1); exit 1; }; }
18108 fi
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
18117 for ac_header in typeinfo
18118 do
18119 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18120 echo "$as_me:18120: checking for $ac_header" >&5
18121 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18122 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18123   echo $ECHO_N "(cached) $ECHO_C" >&6
18124 else
18125   cat >conftest.$ac_ext <<_ACEOF
18126 #line 18126 "configure"
18127 #include "confdefs.h"
18128 #include <$ac_header>
18129 _ACEOF
18130 if { (eval echo "$as_me:18130: \"$ac_cpp conftest.$ac_ext\"") >&5
18131   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18132   ac_status=$?
18133   egrep -v '^ *\+' conftest.er1 >conftest.err
18134   rm -f conftest.er1
18135   cat conftest.err >&5
18136   echo "$as_me:18136: \$? = $ac_status" >&5
18137   (exit $ac_status); } >/dev/null; then
18138   if test -s conftest.err; then
18139     ac_cpp_err=$ac_cxx_preproc_warn_flag
18140   else
18141     ac_cpp_err=
18142   fi
18143 else
18144   ac_cpp_err=yes
18145 fi
18146 if test -z "$ac_cpp_err"; then
18147   eval "$as_ac_Header=yes"
18148 else
18149   echo "$as_me: failed program was:" >&5
18150   cat conftest.$ac_ext >&5
18151   eval "$as_ac_Header=no"
18152 fi
18153 rm -f conftest.err conftest.$ac_ext
18154 fi
18155 echo "$as_me:18155: result: `eval echo '${'$as_ac_Header'}'`" >&5
18156 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18157 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18158   cat >>confdefs.h <<EOF
18159 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18160 EOF
18161
18162 fi
18163 done
18164
18165 for ac_header in iostream
18166 do
18167 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18168 echo "$as_me:18168: checking for $ac_header" >&5
18169 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18170 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18171   echo $ECHO_N "(cached) $ECHO_C" >&6
18172 else
18173   cat >conftest.$ac_ext <<_ACEOF
18174 #line 18174 "configure"
18175 #include "confdefs.h"
18176 #include <$ac_header>
18177 _ACEOF
18178 if { (eval echo "$as_me:18178: \"$ac_cpp conftest.$ac_ext\"") >&5
18179   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18180   ac_status=$?
18181   egrep -v '^ *\+' conftest.er1 >conftest.err
18182   rm -f conftest.er1
18183   cat conftest.err >&5
18184   echo "$as_me:18184: \$? = $ac_status" >&5
18185   (exit $ac_status); } >/dev/null; then
18186   if test -s conftest.err; then
18187     ac_cpp_err=$ac_cxx_preproc_warn_flag
18188   else
18189     ac_cpp_err=
18190   fi
18191 else
18192   ac_cpp_err=yes
18193 fi
18194 if test -z "$ac_cpp_err"; then
18195   eval "$as_ac_Header=yes"
18196 else
18197   echo "$as_me: failed program was:" >&5
18198   cat conftest.$ac_ext >&5
18199   eval "$as_ac_Header=no"
18200 fi
18201 rm -f conftest.err conftest.$ac_ext
18202 fi
18203 echo "$as_me:18203: result: `eval echo '${'$as_ac_Header'}'`" >&5
18204 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
18205 if test `eval echo '${'$as_ac_Header'}'` = yes; then
18206   cat >>confdefs.h <<EOF
18207 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18208 EOF
18209
18210 fi
18211 done
18212
18213 if test x"$ac_cv_header_iostream" = xyes ; then
18214         echo "$as_me:18214: checking if iostream uses std-namespace" >&5
18215 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
18216         cat >conftest.$ac_ext <<_ACEOF
18217 #line 18217 "configure"
18218 #include "confdefs.h"
18219
18220 #include <iostream>
18221 using std::endl;
18222 using std::cerr;
18223 int
18224 main ()
18225 {
18226
18227 cerr << "testing" << endl;
18228
18229   ;
18230   return 0;
18231 }
18232 _ACEOF
18233 rm -f conftest.$ac_objext
18234 if { (eval echo "$as_me:18234: \"$ac_compile\"") >&5
18235   (eval $ac_compile) 2>&5
18236   ac_status=$?
18237   echo "$as_me:18237: \$? = $ac_status" >&5
18238   (exit $ac_status); } &&
18239          { ac_try='test -s conftest.$ac_objext'
18240   { (eval echo "$as_me:18240: \"$ac_try\"") >&5
18241   (eval $ac_try) 2>&5
18242   ac_status=$?
18243   echo "$as_me:18243: \$? = $ac_status" >&5
18244   (exit $ac_status); }; }; then
18245   cf_iostream_namespace=yes
18246 else
18247   echo "$as_me: failed program was:" >&5
18248 cat conftest.$ac_ext >&5
18249 cf_iostream_namespace=no
18250 fi
18251 rm -f conftest.$ac_objext conftest.$ac_ext
18252         echo "$as_me:18252: result: $cf_iostream_namespace" >&5
18253 echo "${ECHO_T}$cf_iostream_namespace" >&6
18254         if test "$cf_iostream_namespace" = yes ; then
18255
18256 cat >>confdefs.h <<\EOF
18257 #define IOSTREAM_NAMESPACE 1
18258 EOF
18259
18260         fi
18261 fi
18262
18263 echo "$as_me:18263: checking if we should include stdbool.h" >&5
18264 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18265
18266 if test "${cf_cv_header_stdbool_h+set}" = set; then
18267   echo $ECHO_N "(cached) $ECHO_C" >&6
18268 else
18269
18270         cat >conftest.$ac_ext <<_ACEOF
18271 #line 18271 "configure"
18272 #include "confdefs.h"
18273
18274 int
18275 main ()
18276 {
18277 bool foo = false
18278   ;
18279   return 0;
18280 }
18281 _ACEOF
18282 rm -f conftest.$ac_objext
18283 if { (eval echo "$as_me:18283: \"$ac_compile\"") >&5
18284   (eval $ac_compile) 2>&5
18285   ac_status=$?
18286   echo "$as_me:18286: \$? = $ac_status" >&5
18287   (exit $ac_status); } &&
18288          { ac_try='test -s conftest.$ac_objext'
18289   { (eval echo "$as_me:18289: \"$ac_try\"") >&5
18290   (eval $ac_try) 2>&5
18291   ac_status=$?
18292   echo "$as_me:18292: \$? = $ac_status" >&5
18293   (exit $ac_status); }; }; then
18294   cf_cv_header_stdbool_h=0
18295 else
18296   echo "$as_me: failed program was:" >&5
18297 cat conftest.$ac_ext >&5
18298 cat >conftest.$ac_ext <<_ACEOF
18299 #line 18299 "configure"
18300 #include "confdefs.h"
18301
18302 #ifndef __BEOS__
18303 #include <stdbool.h>
18304 #endif
18305
18306 int
18307 main ()
18308 {
18309 bool foo = false
18310   ;
18311   return 0;
18312 }
18313 _ACEOF
18314 rm -f conftest.$ac_objext
18315 if { (eval echo "$as_me:18315: \"$ac_compile\"") >&5
18316   (eval $ac_compile) 2>&5
18317   ac_status=$?
18318   echo "$as_me:18318: \$? = $ac_status" >&5
18319   (exit $ac_status); } &&
18320          { ac_try='test -s conftest.$ac_objext'
18321   { (eval echo "$as_me:18321: \"$ac_try\"") >&5
18322   (eval $ac_try) 2>&5
18323   ac_status=$?
18324   echo "$as_me:18324: \$? = $ac_status" >&5
18325   (exit $ac_status); }; }; then
18326   cf_cv_header_stdbool_h=1
18327 else
18328   echo "$as_me: failed program was:" >&5
18329 cat conftest.$ac_ext >&5
18330 cf_cv_header_stdbool_h=0
18331 fi
18332 rm -f conftest.$ac_objext conftest.$ac_ext
18333 fi
18334 rm -f conftest.$ac_objext conftest.$ac_ext
18335 fi
18336
18337 if test "$cf_cv_header_stdbool_h" = 1
18338 then    echo "$as_me:18338: result: yes" >&5
18339 echo "${ECHO_T}yes" >&6
18340 else    echo "$as_me:18340: result: no" >&5
18341 echo "${ECHO_T}no" >&6
18342 fi
18343
18344 echo "$as_me:18344: checking for builtin bool type" >&5
18345 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18346
18347 if test "${cf_cv_builtin_bool+set}" = set; then
18348   echo $ECHO_N "(cached) $ECHO_C" >&6
18349 else
18350
18351         cat >conftest.$ac_ext <<_ACEOF
18352 #line 18352 "configure"
18353 #include "confdefs.h"
18354
18355 #include <stdio.h>
18356 #include <sys/types.h>
18357
18358 int
18359 main ()
18360 {
18361 bool x = false
18362   ;
18363   return 0;
18364 }
18365 _ACEOF
18366 rm -f conftest.$ac_objext
18367 if { (eval echo "$as_me:18367: \"$ac_compile\"") >&5
18368   (eval $ac_compile) 2>&5
18369   ac_status=$?
18370   echo "$as_me:18370: \$? = $ac_status" >&5
18371   (exit $ac_status); } &&
18372          { ac_try='test -s conftest.$ac_objext'
18373   { (eval echo "$as_me:18373: \"$ac_try\"") >&5
18374   (eval $ac_try) 2>&5
18375   ac_status=$?
18376   echo "$as_me:18376: \$? = $ac_status" >&5
18377   (exit $ac_status); }; }; then
18378   cf_cv_builtin_bool=1
18379 else
18380   echo "$as_me: failed program was:" >&5
18381 cat conftest.$ac_ext >&5
18382 cf_cv_builtin_bool=0
18383 fi
18384 rm -f conftest.$ac_objext conftest.$ac_ext
18385
18386 fi
18387
18388 if test "$cf_cv_builtin_bool" = 1
18389 then    echo "$as_me:18389: result: yes" >&5
18390 echo "${ECHO_T}yes" >&6
18391 else    echo "$as_me:18391: result: no" >&5
18392 echo "${ECHO_T}no" >&6
18393 fi
18394
18395 echo "$as_me:18395: checking for size of bool" >&5
18396 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18397 if test "${cf_cv_type_of_bool+set}" = set; then
18398   echo $ECHO_N "(cached) $ECHO_C" >&6
18399 else
18400
18401         rm -f cf_test.out
18402         if test "$cross_compiling" = yes; then
18403   cf_cv_type_of_bool=unknown
18404 else
18405   cat >conftest.$ac_ext <<_ACEOF
18406 #line 18406 "configure"
18407 #include "confdefs.h"
18408
18409 #include <stdlib.h>
18410 #include <stdio.h>
18411
18412 #if defined(__cplusplus)
18413
18414 #ifdef HAVE_GXX_BUILTIN_H
18415 #include <g++/builtin.h>
18416 #elif HAVE_GPP_BUILTIN_H
18417 #include <gpp/builtin.h>
18418 #elif HAVE_BUILTIN_H
18419 #include <builtin.h>
18420 #endif
18421
18422 #else
18423
18424 #if $cf_cv_header_stdbool_h
18425 #include <stdbool.h>
18426 #endif
18427
18428 #endif
18429
18430 main()
18431 {
18432         FILE *fp = fopen("cf_test.out", "w");
18433         if (fp != 0) {
18434                 bool x = true;
18435                 if ((bool)(-x) >= 0)
18436                         fputs("unsigned ", fp);
18437                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18438                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18439                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18440                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18441                 fclose(fp);
18442         }
18443         ${cf_cv_main_return:-return}(0);
18444 }
18445
18446 _ACEOF
18447 rm -f conftest$ac_exeext
18448 if { (eval echo "$as_me:18448: \"$ac_link\"") >&5
18449   (eval $ac_link) 2>&5
18450   ac_status=$?
18451   echo "$as_me:18451: \$? = $ac_status" >&5
18452   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18453   { (eval echo "$as_me:18453: \"$ac_try\"") >&5
18454   (eval $ac_try) 2>&5
18455   ac_status=$?
18456   echo "$as_me:18456: \$? = $ac_status" >&5
18457   (exit $ac_status); }; }; then
18458   cf_cv_type_of_bool=`cat cf_test.out`
18459                  if test -z "$cf_cv_type_of_bool"; then
18460                    cf_cv_type_of_bool=unknown
18461                  fi
18462 else
18463   echo "$as_me: program exited with status $ac_status" >&5
18464 echo "$as_me: failed program was:" >&5
18465 cat conftest.$ac_ext >&5
18466 cf_cv_type_of_bool=unknown
18467 fi
18468 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18469 fi
18470
18471 fi
18472
18473         rm -f cf_test.out
18474 echo "$as_me:18474: result: $cf_cv_type_of_bool" >&5
18475 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18476 if test "$cf_cv_type_of_bool" = unknown ; then
18477         case .$NCURSES_BOOL in #(vi
18478         .auto|.) NCURSES_BOOL=unsigned;;
18479         esac
18480         { echo "$as_me:18480: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18481 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18482         cf_cv_type_of_bool=$NCURSES_BOOL
18483 fi
18484
18485 echo "$as_me:18485: checking for special defines needed for etip.h" >&5
18486 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
18487 cf_save_CXXFLAGS="$CXXFLAGS"
18488 cf_result="none"
18489
18490 # etip.h includes ncurses.h which includes ncurses_dll.h
18491 # But ncurses_dll.h is generated - fix here.
18492 test -d include || mkdir include
18493 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
18494
18495 for cf_math in "" MATH_H
18496 do
18497 for cf_excp in "" MATH_EXCEPTION
18498 do
18499         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
18500         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
18501         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
18502 cat >conftest.$ac_ext <<_ACEOF
18503 #line 18503 "configure"
18504 #include "confdefs.h"
18505
18506 #include <etip.h.in>
18507
18508 int
18509 main ()
18510 {
18511
18512   ;
18513   return 0;
18514 }
18515 _ACEOF
18516 rm -f conftest.$ac_objext
18517 if { (eval echo "$as_me:18517: \"$ac_compile\"") >&5
18518   (eval $ac_compile) 2>&5
18519   ac_status=$?
18520   echo "$as_me:18520: \$? = $ac_status" >&5
18521   (exit $ac_status); } &&
18522          { ac_try='test -s conftest.$ac_objext'
18523   { (eval echo "$as_me:18523: \"$ac_try\"") >&5
18524   (eval $ac_try) 2>&5
18525   ac_status=$?
18526   echo "$as_me:18526: \$? = $ac_status" >&5
18527   (exit $ac_status); }; }; then
18528
18529         test -n "$cf_math" && cat >>confdefs.h <<EOF
18530 #define ETIP_NEEDS_${cf_math} 1
18531 EOF
18532
18533         test -n "$cf_excp" && cat >>confdefs.h <<EOF
18534 #define ETIP_NEEDS_${cf_excp} 1
18535 EOF
18536
18537         cf_result="$cf_math $cf_excp"
18538         break 2
18539
18540 else
18541   echo "$as_me: failed program was:" >&5
18542 cat conftest.$ac_ext >&5
18543 fi
18544 rm -f conftest.$ac_objext conftest.$ac_ext
18545 done
18546 done
18547 echo "$as_me:18547: result: $cf_result" >&5
18548 echo "${ECHO_T}$cf_result" >&6
18549 CXXFLAGS="$cf_save_CXXFLAGS"
18550
18551 if test -n "$CXX"; then
18552 echo "$as_me:18552: checking if $CXX accepts parameter initialization" >&5
18553 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
18554 if test "${cf_cv_cpp_param_init+set}" = set; then
18555   echo $ECHO_N "(cached) $ECHO_C" >&6
18556 else
18557
18558         ac_ext=cc
18559 ac_cpp='$CXXCPP $CPPFLAGS'
18560 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18561 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18562 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18563 ac_main_return=return
18564
18565         if test "$cross_compiling" = yes; then
18566   cf_cv_cpp_param_init=unknown
18567 else
18568   cat >conftest.$ac_ext <<_ACEOF
18569 #line 18569 "configure"
18570 #include "confdefs.h"
18571
18572 class TEST {
18573 private:
18574         int value;
18575 public:
18576         TEST(int x = 1);
18577         ~TEST();
18578 };
18579
18580 TEST::TEST(int x = 1)   // some compilers do not like second initializer
18581 {
18582         value = x;
18583 }
18584 int main() { }
18585
18586 _ACEOF
18587 rm -f conftest$ac_exeext
18588 if { (eval echo "$as_me:18588: \"$ac_link\"") >&5
18589   (eval $ac_link) 2>&5
18590   ac_status=$?
18591   echo "$as_me:18591: \$? = $ac_status" >&5
18592   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18593   { (eval echo "$as_me:18593: \"$ac_try\"") >&5
18594   (eval $ac_try) 2>&5
18595   ac_status=$?
18596   echo "$as_me:18596: \$? = $ac_status" >&5
18597   (exit $ac_status); }; }; then
18598   cf_cv_cpp_param_init=yes
18599 else
18600   echo "$as_me: program exited with status $ac_status" >&5
18601 echo "$as_me: failed program was:" >&5
18602 cat conftest.$ac_ext >&5
18603 cf_cv_cpp_param_init=no
18604 fi
18605 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18606 fi
18607         ac_ext=cc
18608 ac_cpp='$CXXCPP $CPPFLAGS'
18609 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18610 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18611 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18612 ac_main_return=return
18613
18614 fi
18615 echo "$as_me:18615: result: $cf_cv_cpp_param_init" >&5
18616 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18617 fi
18618 test "$cf_cv_cpp_param_init" = yes &&
18619 cat >>confdefs.h <<\EOF
18620 #define CPP_HAS_PARAM_INIT 1
18621 EOF
18622
18623 if test -n "$CXX"; then
18624
18625 echo "$as_me:18625: checking if $CXX accepts static_cast" >&5
18626 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18627 if test "${cf_cv_cpp_static_cast+set}" = set; then
18628   echo $ECHO_N "(cached) $ECHO_C" >&6
18629 else
18630
18631         ac_ext=cc
18632 ac_cpp='$CXXCPP $CPPFLAGS'
18633 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18634 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18635 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18636 ac_main_return=return
18637
18638         cat >conftest.$ac_ext <<_ACEOF
18639 #line 18639 "configure"
18640 #include "confdefs.h"
18641
18642 class NCursesPanel
18643 {
18644 public:
18645   NCursesPanel(int nlines,
18646                int ncols,
18647                int begin_y = 0,
18648                int begin_x = 0)
18649   {
18650   }
18651
18652   ~NCursesPanel();
18653 };
18654
18655 template<class T> class NCursesUserPanel : public NCursesPanel
18656 {
18657 public:
18658   NCursesUserPanel (int nlines,
18659                     int ncols,
18660                     int begin_y = 0,
18661                     int begin_x = 0,
18662                     const T* p_UserData = static_cast<T*>(0))
18663     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18664   {
18665   };
18666   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18667   {
18668   };
18669
18670   virtual ~NCursesUserPanel() {};
18671 };
18672
18673 int
18674 main ()
18675 {
18676
18677         const char* p_UserData = static_cast<char*>(0)
18678   ;
18679   return 0;
18680 }
18681 _ACEOF
18682 rm -f conftest.$ac_objext
18683 if { (eval echo "$as_me:18683: \"$ac_compile\"") >&5
18684   (eval $ac_compile) 2>&5
18685   ac_status=$?
18686   echo "$as_me:18686: \$? = $ac_status" >&5
18687   (exit $ac_status); } &&
18688          { ac_try='test -s conftest.$ac_objext'
18689   { (eval echo "$as_me:18689: \"$ac_try\"") >&5
18690   (eval $ac_try) 2>&5
18691   ac_status=$?
18692   echo "$as_me:18692: \$? = $ac_status" >&5
18693   (exit $ac_status); }; }; then
18694   cf_cv_cpp_static_cast=yes
18695 else
18696   echo "$as_me: failed program was:" >&5
18697 cat conftest.$ac_ext >&5
18698 cf_cv_cpp_static_cast=no
18699 fi
18700 rm -f conftest.$ac_objext conftest.$ac_ext
18701
18702         ac_ext=cc
18703 ac_cpp='$CXXCPP $CPPFLAGS'
18704 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18705 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18706 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18707 ac_main_return=return
18708
18709 fi
18710 echo "$as_me:18710: result: $cf_cv_cpp_static_cast" >&5
18711 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18712
18713 fi
18714
18715 test "$cf_cv_cpp_static_cast" = yes &&
18716 cat >>confdefs.h <<\EOF
18717 #define CPP_HAS_STATIC_CAST 1
18718 EOF
18719
18720         CXX_AR='$(AR)'
18721         CXX_ARFLAGS='$(ARFLAGS)'
18722         case $cf_cv_system_name in #(vi
18723         irix*) #(vi
18724             if test "$GXX" != yes ; then
18725                 CXX_AR='$(CXX)'
18726                 CXX_ARFLAGS='-ar -o'
18727             fi
18728             ;;
18729         sco3.2v5*) #(vi
18730             CXXLDFLAGS="-u main"
18731             ;;
18732         solaris2*)
18733             if test "$GXX" != yes ; then
18734                 CXX_AR='$(CXX)'
18735                 CXX_ARFLAGS='-xar -o'
18736             fi
18737             ;;
18738         esac
18739
18740 else
18741         cf_cxx_library=no
18742         cf_cv_builtin_bool=1
18743
18744         # Just because we are not configuring against C++ right now does not
18745         # mean that a user will not want to use C++.  Some distributors disable
18746         # the C++ portion of this configuration as a shortcut (or just to avoid
18747         # compiling the demo in the c++ directory).  So we need a reasonable
18748         # default for the 'bool' type.
18749         #
18750         # Caveat: since the storage of the bool type is not standardized, it
18751         # may change.
18752
18753         if test "$NCURSES_BOOL" != auto ; then
18754                 cf_cv_type_of_bool=$NCURSES_BOOL
18755                 cf_cv_header_stdbool_h=0
18756         else
18757                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18758
18759 echo "$as_me:18759: checking for size of bool" >&5
18760 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18761 if test "${cf_cv_type_of_bool+set}" = set; then
18762   echo $ECHO_N "(cached) $ECHO_C" >&6
18763 else
18764
18765         rm -f cf_test.out
18766         if test "$cross_compiling" = yes; then
18767   cf_cv_type_of_bool=unknown
18768 else
18769   cat >conftest.$ac_ext <<_ACEOF
18770 #line 18770 "configure"
18771 #include "confdefs.h"
18772
18773 #include <stdlib.h>
18774 #include <stdio.h>
18775
18776 #if defined(__cplusplus)
18777
18778 #ifdef HAVE_GXX_BUILTIN_H
18779 #include <g++/builtin.h>
18780 #elif HAVE_GPP_BUILTIN_H
18781 #include <gpp/builtin.h>
18782 #elif HAVE_BUILTIN_H
18783 #include <builtin.h>
18784 #endif
18785
18786 #else
18787
18788 #if $cf_cv_header_stdbool_h
18789 #include <stdbool.h>
18790 #endif
18791
18792 #endif
18793
18794 main()
18795 {
18796         FILE *fp = fopen("cf_test.out", "w");
18797         if (fp != 0) {
18798                 bool x = true;
18799                 if ((bool)(-x) >= 0)
18800                         fputs("unsigned ", fp);
18801                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18802                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18803                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18804                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18805                 fclose(fp);
18806         }
18807         ${cf_cv_main_return:-return}(0);
18808 }
18809
18810 _ACEOF
18811 rm -f conftest$ac_exeext
18812 if { (eval echo "$as_me:18812: \"$ac_link\"") >&5
18813   (eval $ac_link) 2>&5
18814   ac_status=$?
18815   echo "$as_me:18815: \$? = $ac_status" >&5
18816   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18817   { (eval echo "$as_me:18817: \"$ac_try\"") >&5
18818   (eval $ac_try) 2>&5
18819   ac_status=$?
18820   echo "$as_me:18820: \$? = $ac_status" >&5
18821   (exit $ac_status); }; }; then
18822   cf_cv_type_of_bool=`cat cf_test.out`
18823                  if test -z "$cf_cv_type_of_bool"; then
18824                    cf_cv_type_of_bool=unknown
18825                  fi
18826 else
18827   echo "$as_me: program exited with status $ac_status" >&5
18828 echo "$as_me: failed program was:" >&5
18829 cat conftest.$ac_ext >&5
18830 cf_cv_type_of_bool=unknown
18831 fi
18832 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18833 fi
18834
18835 fi
18836
18837         rm -f cf_test.out
18838 echo "$as_me:18838: result: $cf_cv_type_of_bool" >&5
18839 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18840 if test "$cf_cv_type_of_bool" = unknown ; then
18841         case .$NCURSES_BOOL in #(vi
18842         .auto|.) NCURSES_BOOL=unsigned;;
18843         esac
18844         { echo "$as_me:18844: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18845 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18846         cf_cv_type_of_bool=$NCURSES_BOOL
18847 fi
18848
18849                 else
18850                         echo "$as_me:18850: checking for fallback type of bool" >&5
18851 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18852                         case "$host_cpu" in #(vi
18853                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18854                         *)      cf_cv_type_of_bool=int  ;;
18855                         esac
18856                         echo "$as_me:18856: result: $cf_cv_type_of_bool" >&5
18857 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18858                 fi
18859         fi
18860 fi
18861
18862 # If the C compiler did not declare bool, and we did not determine that the C++
18863 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18864 # ncurses library use the same type as C++ bool.  Note that this allows one to
18865 # specify the type of bool in a configure-script option and postpone
18866 # integration with the C++ compiler provided that the types are compatible.
18867 USE_CXX_BOOL=1
18868 if test $cf_cv_cc_bool_type = 1
18869 then
18870         # oops: C has a bool.  Unlikely, but C++ could differ.
18871         USE_CXX_BOOL=0
18872 elif test $cf_cv_builtin_bool = 0
18873 then
18874         # C++ has no bool
18875         USE_CXX_BOOL=0
18876 else
18877         # this is the normal case
18878         USE_CXX_BOOL='defined(__cplusplus)'
18879 fi
18880
18881 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18882
18883         if test "$cf_with_ada" != "no" ; then
18884                 if test "$with_libtool" != "no"; then
18885                         { echo "$as_me:18885: WARNING: libtool does not support Ada - disabling feature" >&5
18886 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18887                         cf_with_ada=no
18888                 fi
18889         fi
18890
18891         if test "$cf_with_ada" != "no" ; then
18892
18893 cf_ada_make=gnatmake
18894 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18895 set dummy $cf_ada_make; ac_word=$2
18896 echo "$as_me:18896: checking for $ac_word" >&5
18897 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18898 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18899   echo $ECHO_N "(cached) $ECHO_C" >&6
18900 else
18901   if test -n "$gnat_exists"; then
18902   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18903 else
18904   ac_save_IFS=$IFS; IFS=$ac_path_separator
18905 ac_dummy="$PATH"
18906 for ac_dir in $ac_dummy; do
18907   IFS=$ac_save_IFS
18908   test -z "$ac_dir" && ac_dir=.
18909   $as_executable_p "$ac_dir/$ac_word" || continue
18910 ac_cv_prog_gnat_exists="yes"
18911 echo "$as_me:18911: found $ac_dir/$ac_word" >&5
18912 break
18913 done
18914
18915   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18916 fi
18917 fi
18918 gnat_exists=$ac_cv_prog_gnat_exists
18919 if test -n "$gnat_exists"; then
18920   echo "$as_me:18920: result: $gnat_exists" >&5
18921 echo "${ECHO_T}$gnat_exists" >&6
18922 else
18923   echo "$as_me:18923: result: no" >&5
18924 echo "${ECHO_T}no" >&6
18925 fi
18926
18927 if test "$ac_cv_prog_gnat_exists" = no; then
18928    cf_ada_make=
18929    cf_cv_prog_gnat_correct=no
18930 else
18931
18932 echo "$as_me:18932: checking for gnat version" >&5
18933 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18934 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18935         grep '[0-9].[0-9][0-9]*' |\
18936     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18937 echo "$as_me:18937: result: $cf_gnat_version" >&5
18938 echo "${ECHO_T}$cf_gnat_version" >&6
18939
18940 case $cf_gnat_version in #(vi
18941 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
18942         cf_cv_prog_gnat_correct=yes
18943         ;;
18944 *)
18945         { echo "$as_me:18945: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18946 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18947         cf_cv_prog_gnat_correct=no
18948         ;;
18949 esac
18950
18951    # Extract the first word of "m4", so it can be a program name with args.
18952 set dummy m4; ac_word=$2
18953 echo "$as_me:18953: checking for $ac_word" >&5
18954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18955 if test "${ac_cv_prog_M4_exists+set}" = set; then
18956   echo $ECHO_N "(cached) $ECHO_C" >&6
18957 else
18958   if test -n "$M4_exists"; then
18959   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18960 else
18961   ac_save_IFS=$IFS; IFS=$ac_path_separator
18962 ac_dummy="$PATH"
18963 for ac_dir in $ac_dummy; do
18964   IFS=$ac_save_IFS
18965   test -z "$ac_dir" && ac_dir=.
18966   $as_executable_p "$ac_dir/$ac_word" || continue
18967 ac_cv_prog_M4_exists="yes"
18968 echo "$as_me:18968: found $ac_dir/$ac_word" >&5
18969 break
18970 done
18971
18972   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18973 fi
18974 fi
18975 M4_exists=$ac_cv_prog_M4_exists
18976 if test -n "$M4_exists"; then
18977   echo "$as_me:18977: result: $M4_exists" >&5
18978 echo "${ECHO_T}$M4_exists" >&6
18979 else
18980   echo "$as_me:18980: result: no" >&5
18981 echo "${ECHO_T}no" >&6
18982 fi
18983
18984    if test "$ac_cv_prog_M4_exists" = no; then
18985       cf_cv_prog_gnat_correct=no
18986       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18987    fi
18988    if test "$cf_cv_prog_gnat_correct" = yes; then
18989       echo "$as_me:18989: checking if GNAT works" >&5
18990 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18991
18992 rm -rf conftest* *~conftest*
18993 cat >>conftest.ads <<CF_EOF
18994 procedure conftest;
18995 CF_EOF
18996 cat >>conftest.adb <<CF_EOF
18997 with Text_IO;
18998 with GNAT.OS_Lib;
18999 procedure conftest is
19000 begin
19001    Text_IO.Put ("Hello World");
19002    Text_IO.New_Line;
19003    GNAT.OS_Lib.OS_Exit (0);
19004 end conftest;
19005 CF_EOF
19006 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19007    if ( ./conftest 1>&5 2>&1 ) ; then
19008       cf_cv_prog_gnat_correct=yes
19009    else
19010       cf_cv_prog_gnat_correct=no
19011    fi
19012 else
19013    cf_cv_prog_gnat_correct=no
19014 fi
19015 rm -rf conftest* *~conftest*
19016
19017       echo "$as_me:19017: result: $cf_cv_prog_gnat_correct" >&5
19018 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
19019    fi
19020 fi
19021
19022                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
19023
19024         ADAFLAGS="$ADAFLAGS -gnatpn"
19025
19026         echo "$as_me:19026: checking optimization options for ADAFLAGS" >&5
19027 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
19028         case "$CFLAGS" in
19029         *-g*)
19030
19031         ADAFLAGS="$ADAFLAGS -g"
19032
19033                 ;;
19034         esac
19035         case "$CFLAGS" in
19036         *-O*)
19037                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
19038
19039         ADAFLAGS="$ADAFLAGS $cf_O_flag"
19040
19041                 ;;
19042         esac
19043         echo "$as_me:19043: result: $ADAFLAGS" >&5
19044 echo "${ECHO_T}$ADAFLAGS" >&6
19045
19046 echo "$as_me:19046: checking if GNAT supports generics" >&5
19047 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
19048 case $cf_gnat_version in #(vi
19049 3.[1-9]*|[4-9].*) #(vi
19050         cf_gnat_generics=yes
19051         ;;
19052 *)
19053         cf_gnat_generics=no
19054         ;;
19055 esac
19056 echo "$as_me:19056: result: $cf_gnat_generics" >&5
19057 echo "${ECHO_T}$cf_gnat_generics" >&6
19058
19059 if test "$cf_gnat_generics" = yes
19060 then
19061         cf_compile_generics=generics
19062         cf_generic_objects="\${GENOBJS}"
19063 else
19064         cf_compile_generics=
19065         cf_generic_objects=
19066 fi
19067
19068 echo "$as_me:19068: checking if GNAT supports SIGINT" >&5
19069 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
19070 if test "${cf_cv_gnat_sigint+set}" = set; then
19071   echo $ECHO_N "(cached) $ECHO_C" >&6
19072 else
19073
19074 rm -rf conftest* *~conftest*
19075 cat >>conftest.ads <<CF_EOF
19076 with Ada.Interrupts.Names;
19077
19078 package ConfTest is
19079
19080    pragma Warnings (Off);  --  the next pragma exists since 3.11p
19081    pragma Unreserve_All_Interrupts;
19082    pragma Warnings (On);
19083
19084    protected Process is
19085       procedure Stop;
19086       function Continue return Boolean;
19087       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
19088    private
19089       Done : Boolean := False;
19090    end Process;
19091
19092 end ConfTest;
19093 CF_EOF
19094 cat >>conftest.adb <<CF_EOF
19095 package body ConfTest is
19096    protected body Process is
19097       procedure Stop is
19098       begin
19099          Done := True;
19100       end Stop;
19101       function Continue return Boolean is
19102       begin
19103          return not Done;
19104       end Continue;
19105    end Process;
19106 end ConfTest;
19107 CF_EOF
19108 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19109       cf_cv_gnat_sigint=yes
19110 else
19111    cf_cv_gnat_sigint=no
19112 fi
19113 rm -rf conftest* *~conftest*
19114
19115 fi
19116 echo "$as_me:19116: result: $cf_cv_gnat_sigint" >&5
19117 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
19118
19119 if test $cf_cv_gnat_sigint = yes ; then
19120         USE_GNAT_SIGINT=""
19121 else
19122         USE_GNAT_SIGINT="#"
19123 fi
19124
19125 echo "$as_me:19125: checking if GNAT pragma Unreferenced works" >&5
19126 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
19127 if test "${cf_cv_pragma_unreferenced+set}" = set; then
19128   echo $ECHO_N "(cached) $ECHO_C" >&6
19129 else
19130
19131 rm -rf conftest* *~conftest*
19132 cat >>conftest.ads <<CF_EOF
19133 procedure conftest;
19134 CF_EOF
19135 cat >>conftest.adb <<CF_EOF
19136 with Text_IO;
19137 with GNAT.OS_Lib;
19138 procedure conftest is
19139    test : Integer;
19140    pragma Unreferenced (test);
19141 begin
19142    test := 1;
19143    Text_IO.Put ("Hello World");
19144    Text_IO.New_Line;
19145    GNAT.OS_Lib.OS_Exit (0);
19146 end conftest;
19147 CF_EOF
19148 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
19149       cf_cv_pragma_unreferenced=yes
19150 else
19151    cf_cv_pragma_unreferenced=no
19152 fi
19153 rm -rf conftest* *~conftest*
19154
19155 fi
19156 echo "$as_me:19156: result: $cf_cv_pragma_unreferenced" >&5
19157 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
19158
19159 # if the pragma is supported, use it (needed in the Trace code).
19160 if test $cf_cv_pragma_unreferenced = yes ; then
19161         PRAGMA_UNREF=TRUE
19162 else
19163         PRAGMA_UNREF=FALSE
19164 fi
19165
19166 cf_gnat_libraries=no
19167 cf_gnat_projects=no
19168
19169 echo "$as_me:19169: checking if GNAT supports project files" >&5
19170 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
19171 case $cf_gnat_version in #(vi
19172 3.[0-9]*) #(vi
19173         ;;
19174 *)
19175         case $cf_cv_system_name in #(vi
19176         cygwin*) #(vi
19177                 ;;
19178         *)
19179                 mkdir conftest.src conftest.bin conftest.lib
19180                 cd conftest.src
19181                 rm -rf conftest* *~conftest*
19182                 cat >>library.gpr <<CF_EOF
19183 project Library is
19184   Kind := External ("LIB_KIND");
19185   for Library_Name use "ConfTest";
19186   for Object_Dir use ".";
19187   for Library_ALI_Dir use External("LIBRARY_DIR");
19188   for Library_Version use External ("SONAME");
19189   for Library_Kind use Kind;
19190   for Library_Dir use External("BUILD_DIR");
19191   Source_Dir := External ("SOURCE_DIR");
19192   for Source_Dirs use (Source_Dir);
19193   package Compiler is
19194      for Default_Switches ("Ada") use
19195        ("-g",
19196         "-O2",
19197         "-gnatafno",
19198         "-gnatVa",   -- All validity checks
19199         "-gnatwa");  -- Activate all optional errors
19200   end Compiler;
19201 end Library;
19202 CF_EOF
19203                 cat >>confpackage.ads <<CF_EOF
19204 package ConfPackage is
19205    procedure conftest;
19206 end ConfPackage;
19207 CF_EOF
19208                 cat >>confpackage.adb <<CF_EOF
19209 with Text_IO;
19210 package body ConfPackage is
19211    procedure conftest is
19212    begin
19213       Text_IO.Put ("Hello World");
19214       Text_IO.New_Line;
19215    end conftest;
19216 end ConfPackage;
19217 CF_EOF
19218                 if ( $cf_ada_make $ADAFLAGS \
19219                                 -Plibrary.gpr \
19220                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
19221                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
19222                                 -XSOURCE_DIR=`pwd` \
19223                                 -XSONAME=libConfTest.so.1 \
19224                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
19225                         cf_gnat_projects=yes
19226                 fi
19227                 cd ..
19228                 if test -f conftest.lib/confpackage.ali
19229                 then
19230                         cf_gnat_libraries=yes
19231                 fi
19232                 rm -rf conftest* *~conftest*
19233                 ;;
19234         esac
19235         ;;
19236 esac
19237 echo "$as_me:19237: result: $cf_gnat_projects" >&5
19238 echo "${ECHO_T}$cf_gnat_projects" >&6
19239
19240 if test $cf_gnat_projects = yes
19241 then
19242         echo "$as_me:19242: checking if GNAT supports libraries" >&5
19243 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
19244         echo "$as_me:19244: result: $cf_gnat_libraries" >&5
19245 echo "${ECHO_T}$cf_gnat_libraries" >&6
19246 fi
19247
19248 if test "$cf_gnat_projects" = yes
19249 then
19250         USE_OLD_MAKERULES="#"
19251         USE_GNAT_PROJECTS=""
19252 else
19253         USE_OLD_MAKERULES=""
19254         USE_GNAT_PROJECTS="#"
19255 fi
19256
19257 if test "$cf_gnat_libraries" = yes
19258 then
19259         USE_GNAT_LIBRARIES=""
19260 else
19261         USE_GNAT_LIBRARIES="#"
19262 fi
19263
19264 echo "$as_me:19264: checking for ada-compiler" >&5
19265 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
19266
19267 # Check whether --with-ada-compiler or --without-ada-compiler was given.
19268 if test "${with_ada_compiler+set}" = set; then
19269   withval="$with_ada_compiler"
19270   cf_ada_compiler=$withval
19271 else
19272   cf_ada_compiler=gnatmake
19273 fi;
19274
19275 echo "$as_me:19275: result: $cf_ada_compiler" >&5
19276 echo "${ECHO_T}$cf_ada_compiler" >&6
19277
19278                         cf_ada_package=terminal_interface
19279
19280 echo "$as_me:19280: checking for ada-include" >&5
19281 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
19282
19283 # Check whether --with-ada-include or --without-ada-include was given.
19284 if test "${with_ada_include+set}" = set; then
19285   withval="$with_ada_include"
19286
19287 else
19288   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
19289 fi; if test -n "$prefix/share/ada/adainclude" ; then
19290
19291 if test "x$prefix" != xNONE; then
19292   cf_path_syntax="$prefix"
19293 else
19294   cf_path_syntax="$ac_default_prefix"
19295 fi
19296
19297 case ".$withval" in #(vi
19298 .\$\(*\)*|.\'*\'*) #(vi
19299   ;;
19300 ..|./*|.\\*) #(vi
19301   ;;
19302 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19303   ;;
19304 .\${*prefix}*|.\${*dir}*) #(vi
19305   eval withval="$withval"
19306   case ".$withval" in #(vi
19307   .NONE/*)
19308     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19309     ;;
19310   esac
19311   ;; #(vi
19312 .no|.NONE/*)
19313   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19314   ;;
19315 *)
19316   { { echo "$as_me:19316: error: expected a pathname, not \"$withval\"" >&5
19317 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19318    { (exit 1); exit 1; }; }
19319   ;;
19320 esac
19321
19322 fi
19323 eval ADA_INCLUDE="$withval"
19324
19325 echo "$as_me:19325: result: $ADA_INCLUDE" >&5
19326 echo "${ECHO_T}$ADA_INCLUDE" >&6
19327
19328 echo "$as_me:19328: checking for ada-objects" >&5
19329 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
19330
19331 # Check whether --with-ada-objects or --without-ada-objects was given.
19332 if test "${with_ada_objects+set}" = set; then
19333   withval="$with_ada_objects"
19334
19335 else
19336   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
19337 fi; if test -n "$prefix/lib/ada/adalib" ; then
19338
19339 if test "x$prefix" != xNONE; then
19340   cf_path_syntax="$prefix"
19341 else
19342   cf_path_syntax="$ac_default_prefix"
19343 fi
19344
19345 case ".$withval" in #(vi
19346 .\$\(*\)*|.\'*\'*) #(vi
19347   ;;
19348 ..|./*|.\\*) #(vi
19349   ;;
19350 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
19351   ;;
19352 .\${*prefix}*|.\${*dir}*) #(vi
19353   eval withval="$withval"
19354   case ".$withval" in #(vi
19355   .NONE/*)
19356     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19357     ;;
19358   esac
19359   ;; #(vi
19360 .no|.NONE/*)
19361   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19362   ;;
19363 *)
19364   { { echo "$as_me:19364: error: expected a pathname, not \"$withval\"" >&5
19365 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19366    { (exit 1); exit 1; }; }
19367   ;;
19368 esac
19369
19370 fi
19371 eval ADA_OBJECTS="$withval"
19372
19373 echo "$as_me:19373: result: $ADA_OBJECTS" >&5
19374 echo "${ECHO_T}$ADA_OBJECTS" >&6
19375
19376 echo "$as_me:19376: checking if an Ada95 shared-library should be built" >&5
19377 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
19378
19379 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
19380 if test "${with_ada_sharedlib+set}" = set; then
19381   withval="$with_ada_sharedlib"
19382   with_ada_sharedlib=$withval
19383 else
19384   with_ada_sharedlib=no
19385 fi;
19386 echo "$as_me:19386: result: $with_ada_sharedlib" >&5
19387 echo "${ECHO_T}$with_ada_sharedlib" >&6
19388
19389 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
19390 MAKE_ADA_SHAREDLIB="#"
19391
19392 if test "x$with_ada_sharedlib" != xno
19393 then
19394         MAKE_ADA_SHAREDLIB=
19395         if test "x$with_ada_sharedlib" != xyes
19396         then
19397                 ADA_SHAREDLIB="$with_ada_sharedlib"
19398         fi
19399 fi
19400
19401                 fi
19402         fi
19403 else
19404         cf_with_ada=no
19405 fi
19406
19407 ### Construct the ncurses library-subsets, if any, from this set of keywords:
19408 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
19409 ###
19410 ### ticlib modules may be a separate library, otherwise contained in termlib.
19411 ### termlib modules may be a separate library, otherwise contained in ncurses.
19412 ###
19413 ### The of "+" or " " between the tokens controls the way the script
19414 ### chooses to split module lists into libraries.
19415 ###
19416 ### (see CF_LIB_RULES).
19417 echo "$as_me:19417: checking for library subsets" >&5
19418 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
19419 LIB_SUBSETS=
19420
19421 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
19422         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
19423         if test "$with_ticlib" != no ; then
19424                 LIB_SUBSETS="${LIB_SUBSETS} "
19425         else
19426                 LIB_SUBSETS="${LIB_SUBSETS}+"
19427         fi
19428 fi
19429
19430 LIB_SUBSETS="${LIB_SUBSETS}termlib"
19431 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
19432
19433 if test "$with_termlib" != no ; then
19434         LIB_SUBSETS="${LIB_SUBSETS} "
19435 else
19436         LIB_SUBSETS="${LIB_SUBSETS}+"
19437 fi
19438
19439 LIB_SUBSETS="${LIB_SUBSETS}base"
19440
19441 # Most term-driver calls are to tinfo, but some like init_pair are to the
19442 # base library (so it resides in base).
19443 if test "$with_term_driver" != no ; then
19444         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
19445         case $cf_cv_system_name in #(vi
19446         *mingw32*) #(vi
19447                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
19448                 ;;
19449         *) #(vi
19450                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
19451                 ;;
19452         esac
19453 fi
19454
19455 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
19456 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
19457
19458 echo "$as_me:19458: result: $LIB_SUBSETS" >&5
19459 echo "${ECHO_T}$LIB_SUBSETS" >&6
19460
19461 ### Construct the list of include-directories to be generated
19462
19463 if test "$GCC" != yes; then
19464         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19465 elif test "$includedir" != "/usr/include"; then
19466         if test "$includedir" = '${prefix}/include' ; then
19467                 if test $prefix != /usr ; then
19468                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
19469                 fi
19470         else
19471                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
19472         fi
19473 fi
19474 if test "$srcdir" != "."; then
19475         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
19476 fi
19477 CPPFLAGS="-I. -I../include $CPPFLAGS"
19478
19479 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
19480 if test "$srcdir" != "."; then
19481         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
19482 fi
19483 if test "$GCC" != yes; then
19484         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19485 elif test "$includedir" != "/usr/include"; then
19486         if test "$includedir" = '${prefix}/include' ; then
19487                 if test $prefix != /usr ; then
19488                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19489                 fi
19490         else
19491                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
19492         fi
19493 fi
19494
19495 ### Build up pieces for makefile rules
19496 echo "$as_me:19496: checking default library suffix" >&5
19497 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
19498
19499         case $DFT_LWR_MODEL in
19500         libtool) DFT_ARG_SUFFIX=''   ;;
19501         normal)  DFT_ARG_SUFFIX=''   ;;
19502         debug)   DFT_ARG_SUFFIX='_g' ;;
19503         profile) DFT_ARG_SUFFIX='_p' ;;
19504         shared)  DFT_ARG_SUFFIX=''   ;;
19505         esac
19506         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
19507 echo "$as_me:19507: result: $DFT_ARG_SUFFIX" >&5
19508 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
19509
19510 echo "$as_me:19510: checking default library-dependency suffix" >&5
19511 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
19512
19513         case $DFT_LWR_MODEL in #(vi
19514         libtool) #(vi
19515                 DFT_LIB_SUFFIX='.la'
19516                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19517                 ;;
19518         normal) #(vi
19519                 DFT_LIB_SUFFIX='.a'
19520                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19521                 ;;
19522         debug) #(vi
19523                 DFT_LIB_SUFFIX='_g.a'
19524                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19525                 ;;
19526         profile) #(vi
19527                 DFT_LIB_SUFFIX='_p.a'
19528                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19529                 ;;
19530         shared) #(vi
19531                 case $cf_cv_system_name in
19532                 aix[5-7]*) #(vi
19533                         DFT_LIB_SUFFIX='.a'
19534                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19535                         ;;
19536                 cygwin*|mingw*) #(vi
19537                         DFT_LIB_SUFFIX='.dll'
19538                         DFT_DEP_SUFFIX='.dll.a'
19539                         ;;
19540                 darwin*) #(vi
19541                         DFT_LIB_SUFFIX='.dylib'
19542                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19543                         ;;
19544                 hpux*) #(vi
19545                         case $target in
19546                         ia64*) #(vi
19547                                 DFT_LIB_SUFFIX='.so'
19548                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19549                                 ;;
19550                         *) #(vi
19551                                 DFT_LIB_SUFFIX='.sl'
19552                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19553                                 ;;
19554                         esac
19555                         ;;
19556                 *)      DFT_LIB_SUFFIX='.so'
19557                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
19558                         ;;
19559                 esac
19560         esac
19561         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
19562         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
19563 echo "$as_me:19563: result: $DFT_DEP_SUFFIX" >&5
19564 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
19565
19566 echo "$as_me:19566: checking default object directory" >&5
19567 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
19568
19569         case $DFT_LWR_MODEL in
19570         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
19571         normal)  DFT_OBJ_SUBDIR='objects' ;;
19572         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
19573         profile) DFT_OBJ_SUBDIR='obj_p' ;;
19574         shared)
19575                 case $cf_cv_system_name in #(vi
19576                 cygwin) #(vi
19577                         DFT_OBJ_SUBDIR='objects' ;;
19578                 *)
19579                         DFT_OBJ_SUBDIR='obj_s' ;;
19580                 esac
19581         esac
19582 echo "$as_me:19582: result: $DFT_OBJ_SUBDIR" >&5
19583 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
19584
19585 # libtool thinks it can make c++ shared libraries (perhaps only g++)
19586 if test "x$cf_with_cxx" = xyes ; then
19587 echo "$as_me:19587: checking c++ library-dependency suffix" >&5
19588 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
19589 if test "$with_libtool" != "no"; then
19590         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
19591 else
19592
19593         case normal in #(vi
19594         libtool) #(vi
19595                 CXX_LIB_SUFFIX='.la'
19596                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19597                 ;;
19598         normal) #(vi
19599                 CXX_LIB_SUFFIX='.a'
19600                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19601                 ;;
19602         debug) #(vi
19603                 CXX_LIB_SUFFIX='_g.a'
19604                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19605                 ;;
19606         profile) #(vi
19607                 CXX_LIB_SUFFIX='_p.a'
19608                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19609                 ;;
19610         shared) #(vi
19611                 case $cf_cv_system_name in
19612                 aix[5-7]*) #(vi
19613                         CXX_LIB_SUFFIX='.a'
19614                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19615                         ;;
19616                 cygwin*|mingw*) #(vi
19617                         CXX_LIB_SUFFIX='.dll'
19618                         CXX_DEP_SUFFIX='.dll.a'
19619                         ;;
19620                 darwin*) #(vi
19621                         CXX_LIB_SUFFIX='.dylib'
19622                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19623                         ;;
19624                 hpux*) #(vi
19625                         case $target in
19626                         ia64*) #(vi
19627                                 CXX_LIB_SUFFIX='.so'
19628                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19629                                 ;;
19630                         *) #(vi
19631                                 CXX_LIB_SUFFIX='.sl'
19632                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19633                                 ;;
19634                         esac
19635                         ;;
19636                 *)      CXX_LIB_SUFFIX='.so'
19637                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19638                         ;;
19639                 esac
19640         esac
19641         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19642         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19643 fi
19644 echo "$as_me:19644: result: $CXX_LIB_SUFFIX" >&5
19645 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19646
19647 fi
19648
19649 # do not want -ldl in build except as needed for -lncurses dependency
19650 if test "x$with_dlsym" = xyes ; then
19651 if test $DFT_LWR_MODEL = shared || \
19652    test $DFT_LWR_MODEL = libtool ; then
19653
19654 # remove dl library from $LIBS
19655 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19656
19657 fi
19658 fi
19659 ### Set up low-level terminfo dependencies for makefiles.
19660
19661 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19662 # do not need libdl
19663 TICS_LIST=
19664 if test "x$with_dlsym" = xyes ; then
19665
19666 # remove dl library from $SHLIB_LIST
19667 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19668
19669 fi
19670
19671 if test "$with_ticlib" != no ; then
19672
19673         if test "x$with_ticlib" != xyes ; then
19674                 TICS_NAME=$with_ticlib
19675                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19676                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19677                 TICS_LIB_SUFFIX="${with_ticlib}"
19678         else
19679                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19680                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19681                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19682         fi
19683         TICS_LDFLAGS="-L${LIB_DIR}"
19684         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
19685 else
19686         TICS_LDFLAGS="-L${LIB_DIR}"
19687         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19688 fi
19689
19690 if test "$with_termlib" != no ; then
19691
19692         if test "x$with_termlib" != xyes ; then
19693                 TINFO_NAME=$with_termlib
19694                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19695                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19696                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19697                 TINFO_LIB_SUFFIX="${with_termlib}"
19698         else
19699                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19700                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19701                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19702                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19703         fi
19704
19705         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19706         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19707         if test "$DFT_LWR_MODEL" = "libtool"; then
19708                 TEST_ARGS="${TEST_DEPS}"
19709                 TEST_ARG2="${TEST_DEP2}"
19710                 TINFO_LDFLAGS="-L${LIB_DIR}"
19711                 TINFO_LIBS="$TEST_ARGS"
19712                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19713                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19714         else
19715                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19716                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19717                 if test "x$with_term_driver" != xno ; then
19718                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19719                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19720                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19721                 else
19722                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19723                         TINFO_LIBS="$TEST_ARGS"
19724                 fi
19725                 TINFO_LDFLAGS="-L${LIB_DIR}"
19726                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19727         fi
19728 else
19729         # the next lines are needed for linking libtic over libncurses
19730         TINFO_NAME=${LIB_NAME}
19731         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19732         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19733         if test "x$with_tic_depends" = xyes ; then
19734                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19735         else
19736                 TICS_LIST="$SHLIB_LIST"
19737         fi
19738
19739         TINFO_LDFLAGS="-L${LIB_DIR}"
19740         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
19741 fi
19742
19743 if test "$DFT_LWR_MODEL" = shared ; then
19744         case $cf_cv_system_name in #(vi
19745         cygwin*)
19746                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19747                 TINFO_SUFFIX=.dll
19748                 ;;
19749         esac
19750 fi
19751
19752 if test "x$with_dlsym" = xyes ; then
19753
19754 # remove dl library from $TICS_LIST
19755 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19756
19757 fi
19758
19759 if test "$DFT_LWR_MODEL" = "libtool"; then
19760     OBJEXT=lo
19761 fi
19762
19763 # needed for Ada95
19764 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
19765
19766 case $DFT_LWR_MODEL in
19767 normal|debug|profile)
19768
19769 if test "$GCC" = yes ; then
19770         case $cf_cv_system_name in #(
19771         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19772                 LDFLAGS_STATIC=
19773                 LDFLAGS_SHARED=
19774                 ;;
19775     *)  #( normally, except when broken
19776         LDFLAGS_STATIC=-static
19777         LDFLAGS_SHARED=-dynamic
19778         ;;
19779     esac
19780 else
19781         case $cf_cv_system_name in #(
19782         aix[4-7]*)      #( from ld manpage
19783                 LDFLAGS_STATIC=-bstatic
19784                 LDFLAGS_SHARED=-bdynamic
19785                 ;;
19786         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19787                 # We could also use just "archive" and "shared".
19788                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19789                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19790                 ;;
19791         irix*)          #( from ld manpage IRIX64
19792                 LDFLAGS_STATIC=-Bstatic
19793                 LDFLAGS_SHARED=-Bdynamic
19794                 ;;
19795         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19796                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19797                 LDFLAGS_STATIC=-noso
19798                 LDFLAGS_SHARED=-so_archive
19799                 ;;
19800         solaris2*)
19801                 LDFLAGS_STATIC=-Bstatic
19802                 LDFLAGS_SHARED=-Bdynamic
19803                 ;;
19804         esac
19805 fi
19806
19807 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19808 then
19809         echo "$as_me:19809: checking if linker supports switching between static/dynamic" >&5
19810 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19811
19812         rm -f libconftest.a
19813         cat >conftest.$ac_ext <<EOF
19814 #line 19814 "configure"
19815 #include <stdio.h>
19816 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19817 EOF
19818         if { (eval echo "$as_me:19818: \"$ac_compile\"") >&5
19819   (eval $ac_compile) 2>&5
19820   ac_status=$?
19821   echo "$as_me:19821: \$? = $ac_status" >&5
19822   (exit $ac_status); } ; then
19823                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19824                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19825         fi
19826         rm -f conftest.*
19827
19828         cf_save_LIBS="$LIBS"
19829
19830         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19831         cat >conftest.$ac_ext <<_ACEOF
19832 #line 19832 "configure"
19833 #include "confdefs.h"
19834
19835 #line 19835 "configure"
19836 #include <stdio.h>
19837 int cf_ldflags_static(FILE *fp);
19838
19839 int
19840 main ()
19841 {
19842
19843         return cf_ldflags_static(stdin);
19844
19845   ;
19846   return 0;
19847 }
19848 _ACEOF
19849 rm -f conftest.$ac_objext conftest$ac_exeext
19850 if { (eval echo "$as_me:19850: \"$ac_link\"") >&5
19851   (eval $ac_link) 2>&5
19852   ac_status=$?
19853   echo "$as_me:19853: \$? = $ac_status" >&5
19854   (exit $ac_status); } &&
19855          { ac_try='test -s conftest$ac_exeext'
19856   { (eval echo "$as_me:19856: \"$ac_try\"") >&5
19857   (eval $ac_try) 2>&5
19858   ac_status=$?
19859   echo "$as_me:19859: \$? = $ac_status" >&5
19860   (exit $ac_status); }; }; then
19861
19862         # some linkers simply ignore the -dynamic
19863         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
19864         *static*) # (vi
19865                 cf_ldflags_static=no
19866                 ;;
19867         *)
19868                 cf_ldflags_static=yes
19869                 ;;
19870         esac
19871
19872 else
19873   echo "$as_me: failed program was:" >&5
19874 cat conftest.$ac_ext >&5
19875 cf_ldflags_static=no
19876 fi
19877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19878
19879         rm -f libconftest.*
19880         LIBS="$cf_save_LIBS"
19881
19882         echo "$as_me:19882: result: $cf_ldflags_static" >&5
19883 echo "${ECHO_T}$cf_ldflags_static" >&6
19884
19885         if test $cf_ldflags_static != yes
19886         then
19887                 LDFLAGS_STATIC=
19888                 LDFLAGS_SHARED=
19889         fi
19890 else
19891         LDFLAGS_STATIC=
19892         LDFLAGS_SHARED=
19893 fi
19894
19895         ;;
19896 esac
19897
19898 echo "$as_me:19898: checking where we will install curses.h" >&5
19899 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19900 test "$with_overwrite" = no && \
19901 test "x$includedir" = 'x${prefix}/include' && \
19902         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19903 echo "$as_me:19903: result: $includedir" >&5
19904 echo "${ECHO_T}$includedir" >&6
19905
19906 ### Resolve a conflict between normal and wide-curses by forcing applications
19907 ### that will need libutf8 to add it to their configure script.
19908 if test "$with_overwrite" != no ; then
19909 if test "$NCURSES_LIBUTF8" = 1 ; then
19910         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19911         { echo "$as_me:19911: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19912 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19913 fi
19914 fi
19915 WITH_OVERWRITE=$with_overwrite
19916
19917 # used to separate tack out of the tree
19918 NCURSES_TREE=
19919
19920 ### predefined stuff for the test programs
19921
19922 cat >>confdefs.h <<\EOF
19923 #define HAVE_SLK_COLOR 1
19924 EOF
19925
19926 ### Construct the list of subdirectories for which we'll customize makefiles
19927 ### with the appropriate compile-rules.
19928
19929 echo "$as_me:19929: checking for src modules" >&5
19930 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19931
19932 # dependencies and linker-arguments for test-programs
19933 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19934 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19935 if test "$DFT_LWR_MODEL" = "libtool"; then
19936         TEST_ARGS="${TEST_DEPS}"
19937         TEST_ARG2="${TEST_DEP2}"
19938 else
19939         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19940         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19941 fi
19942
19943 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
19944 cf_cv_src_modules=
19945 for cf_dir in $modules_to_build
19946 do
19947         if test -f $srcdir/$cf_dir/modules; then
19948
19949                 # We may/may not have tack in the distribution, though the
19950                 # makefile is.
19951                 if test $cf_dir = tack ; then
19952                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19953                                 continue
19954                         fi
19955                 fi
19956
19957                 if test -z "$cf_cv_src_modules"; then
19958                         cf_cv_src_modules=$cf_dir
19959                 else
19960                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19961                 fi
19962
19963                 # Make the ncurses_cfg.h file record the library interface files as
19964                 # well.  These are header files that are the same name as their
19965                 # directory.  Ncurses is the only library that does not follow
19966                 # that pattern.
19967                 if test $cf_dir = tack ; then
19968                         continue
19969                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19970
19971 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19972
19973                         cat >>confdefs.h <<EOF
19974 #define HAVE_${cf_have_include}_H 1
19975 EOF
19976
19977                         cat >>confdefs.h <<EOF
19978 #define HAVE_LIB${cf_have_include} 1
19979 EOF
19980
19981                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19982                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19983                         if test "$DFT_LWR_MODEL" = "libtool"; then
19984                                 TEST_ARGS="${TEST_DEPS}"
19985                                 TEST_ARG2="${TEST_DEP2}"
19986                         else
19987                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19988                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19989                         fi
19990                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
19991                 fi
19992         fi
19993 done
19994 echo "$as_me:19994: result: $cf_cv_src_modules" >&5
19995 echo "${ECHO_T}$cf_cv_src_modules" >&6
19996
19997 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19998 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19999
20000 SRC_SUBDIRS=
20001 if test "x$cf_with_manpages" != xno ; then
20002         SRC_SUBDIRS="$SRC_SUBDIRS man"
20003 fi
20004 SRC_SUBDIRS="$SRC_SUBDIRS include"
20005 for cf_dir in $cf_cv_src_modules
20006 do
20007         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
20008 done
20009 if test "x$cf_with_tests" != "xno" ; then
20010         SRC_SUBDIRS="$SRC_SUBDIRS test"
20011 fi
20012 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
20013 if test "$cf_with_cxx_binding" != no; then
20014         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
20015         SRC_SUBDIRS="$SRC_SUBDIRS c++"
20016 fi
20017
20018 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
20019 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
20020
20021 ADA_SUBDIRS=
20022 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
20023         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
20024         ADA_SUBDIRS="gen src"
20025         if test "x$cf_with_tests" != "xno" ; then
20026                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
20027         fi
20028 fi
20029
20030 SUB_MAKEFILES=
20031 for cf_dir in $SRC_SUBDIRS
20032 do
20033         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
20034 done
20035
20036 if test -n "$ADA_SUBDIRS"; then
20037         for cf_dir in $ADA_SUBDIRS
20038         do
20039                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
20040         done
20041
20042 fi
20043
20044 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
20045    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
20046    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
20047 fi
20048
20049 DIRS_TO_MAKE="lib"
20050 for cf_item in $cf_list_models
20051 do
20052
20053         case $cf_item in
20054         libtool) cf_subdir='obj_lo'  ;;
20055         normal)  cf_subdir='objects' ;;
20056         debug)   cf_subdir='obj_g' ;;
20057         profile) cf_subdir='obj_p' ;;
20058         shared)
20059                 case $cf_cv_system_name in #(vi
20060                 cygwin) #(vi
20061                         cf_subdir='objects' ;;
20062                 *)
20063                         cf_subdir='obj_s' ;;
20064                 esac
20065         esac
20066
20067         for cf_item2 in $DIRS_TO_MAKE
20068         do
20069                 test $cf_item2 = $cf_subdir && break
20070         done
20071         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
20072 done
20073 for cf_dir in $DIRS_TO_MAKE
20074 do
20075         test ! -d $cf_dir && mkdir $cf_dir
20076 done
20077
20078 # symbols that differ when compiling Ada95 by itself.
20079 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
20080
20081 # values to use as strings
20082
20083 cat >>confdefs.h <<EOF
20084 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
20085 EOF
20086
20087 cat >>confdefs.h <<EOF
20088 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
20089 EOF
20090
20091 ### Now that we're done running tests, add the compiler-warnings, if any
20092
20093 cf_fix_cppflags=no
20094 cf_new_cflags=
20095 cf_new_cppflags=
20096 cf_new_extra_cppflags=
20097
20098 for cf_add_cflags in $EXTRA_CFLAGS
20099 do
20100 case $cf_fix_cppflags in
20101 no)
20102         case $cf_add_cflags in #(vi
20103         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
20104                 case $cf_add_cflags in
20105                 -D*)
20106                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20107
20108                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20109                                 && test -z "${cf_tst_cflags}" \
20110                                 && cf_fix_cppflags=yes
20111
20112                         if test $cf_fix_cppflags = yes ; then
20113                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20114                                 continue
20115                         elif test "${cf_tst_cflags}" = "\"'" ; then
20116                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20117                                 continue
20118                         fi
20119                         ;;
20120                 esac
20121                 case "$CPPFLAGS" in
20122                 *$cf_add_cflags) #(vi
20123                         ;;
20124                 *) #(vi
20125                         case $cf_add_cflags in #(vi
20126                         -D*)
20127                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20128
20129 CPPFLAGS=`echo "$CPPFLAGS" | \
20130         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20131                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20132
20133                                 ;;
20134                         esac
20135                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
20136                         ;;
20137                 esac
20138                 ;;
20139         *)
20140                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
20141                 ;;
20142         esac
20143         ;;
20144 yes)
20145         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
20146
20147         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20148
20149         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
20150                 && test -z "${cf_tst_cflags}" \
20151                 && cf_fix_cppflags=no
20152         ;;
20153 esac
20154 done
20155
20156 if test -n "$cf_new_cflags" ; then
20157
20158         CFLAGS="$CFLAGS $cf_new_cflags"
20159 fi
20160
20161 if test -n "$cf_new_cppflags" ; then
20162
20163         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
20164 fi
20165
20166 if test -n "$cf_new_extra_cppflags" ; then
20167
20168         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
20169 fi
20170
20171 ### Define substitutions for header files to avoid name-pollution
20172
20173 if test "x$cf_cv_have_tcgetattr" = xyes ; then
20174         HAVE_TCGETATTR=1
20175 else
20176         HAVE_TCGETATTR=0
20177 fi
20178
20179 if test "x$ac_cv_header_termio_h" = xyes ; then
20180         HAVE_TERMIO_H=1
20181 else
20182         HAVE_TERMIO_H=0
20183 fi
20184
20185 if test "x$ac_cv_header_termios_h" = xyes ; then
20186         HAVE_TERMIOS_H=1
20187 else
20188         HAVE_TERMIOS_H=0
20189 fi
20190
20191 ################################################################################
20192 test "x$use_database" = xyes && \
20193 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
20194
20195 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
20196 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
20197
20198 if test "x$enable_pc_files" = xyes ; then \
20199 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
20200 MAKE_PC_FILES=
20201 else
20202 MAKE_PC_FILES="#"
20203 fi
20204
20205 # Extract the first word of "tic", so it can be a program name with args.
20206 set dummy tic; ac_word=$2
20207 echo "$as_me:20207: checking for $ac_word" >&5
20208 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20209 if test "${ac_cv_path_TIC_PATH+set}" = set; then
20210   echo $ECHO_N "(cached) $ECHO_C" >&6
20211 else
20212   case $TIC_PATH in
20213   [\\/]* | ?:[\\/]*)
20214   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
20215   ;;
20216   *)
20217   ac_save_IFS=$IFS; IFS=$ac_path_separator
20218 ac_dummy="$PATH:/usr/local/ncurses/bin"
20219 for ac_dir in $ac_dummy; do
20220   IFS=$ac_save_IFS
20221   test -z "$ac_dir" && ac_dir=.
20222   if $as_executable_p "$ac_dir/$ac_word"; then
20223    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
20224    echo "$as_me:20224: found $ac_dir/$ac_word" >&5
20225    break
20226 fi
20227 done
20228
20229   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
20230   ;;
20231 esac
20232 fi
20233 TIC_PATH=$ac_cv_path_TIC_PATH
20234
20235 if test -n "$TIC_PATH"; then
20236   echo "$as_me:20236: result: $TIC_PATH" >&5
20237 echo "${ECHO_T}$TIC_PATH" >&6
20238 else
20239   echo "$as_me:20239: result: no" >&5
20240 echo "${ECHO_T}no" >&6
20241 fi
20242
20243 if test -n "$FALLBACK_LIST"
20244 then
20245         if test "$TIC_PATH" = unknown
20246         then
20247                 { echo "$as_me:20247: WARNING: no tic program found for fallbacks" >&5
20248 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
20249         fi
20250 fi
20251
20252 if test "x$cf_with_tests" != xno ; then
20253         MAKE_TESTS=
20254 else
20255         MAKE_TESTS="#"
20256 fi
20257
20258 ADAHTML_DIR=../../doc/html/ada
20259
20260 SUB_SCRIPTS=
20261
20262 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"
20263 ac_config_commands="$ac_config_commands default"
20264 cat >confcache <<\_ACEOF
20265 # This file is a shell script that caches the results of configure
20266 # tests run on this system so they can be shared between configure
20267 # scripts and configure runs, see configure's option --config-cache.
20268 # It is not useful on other systems.  If it contains results you don't
20269 # want to keep, you may remove or edit it.
20270 #
20271 # config.status only pays attention to the cache file if you give it
20272 # the --recheck option to rerun configure.
20273 #
20274 # `ac_cv_env_foo' variables (set or unset) will be overriden when
20275 # loading this file, other *unset* `ac_cv_foo' will be assigned the
20276 # following values.
20277
20278 _ACEOF
20279
20280 # The following way of writing the cache mishandles newlines in values,
20281 # but we know of no workaround that is simple, portable, and efficient.
20282 # So, don't put newlines in cache variables' values.
20283 # Ultrix sh set writes to stderr and can't be redirected directly,
20284 # and sets the high bit in the cache file unless we assign to the vars.
20285 {
20286   (set) 2>&1 |
20287     case `(ac_space=' '; set | grep ac_space) 2>&1` in
20288     *ac_space=\ *)
20289       # `set' does not quote correctly, so add quotes (double-quote
20290       # substitution turns \\\\ into \\, and sed turns \\ into \).
20291       sed -n \
20292         "s/'/'\\\\''/g;
20293           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20294       ;;
20295     *)
20296       # `set' quotes correctly as required by POSIX, so do not add quotes.
20297       sed -n \
20298         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
20299       ;;
20300     esac;
20301 } |
20302   sed '
20303      t clear
20304      : clear
20305      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20306      t end
20307      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20308      : end' >>confcache
20309 if cmp -s $cache_file confcache; then :; else
20310   if test -w $cache_file; then
20311     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20312     cat confcache >$cache_file
20313   else
20314     echo "not updating unwritable cache $cache_file"
20315   fi
20316 fi
20317 rm -f confcache
20318
20319 test "x$prefix" = xNONE && prefix=$ac_default_prefix
20320 # Let make expand exec_prefix.
20321 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20322
20323 # VPATH may cause trouble with some makes, so we remove $(srcdir),
20324 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20325 # trailing colons and then remove the whole line if VPATH becomes empty
20326 # (actually we leave an empty line to preserve line numbers).
20327 if test "x$srcdir" = x.; then
20328   ac_vpsub='/^[         ]*VPATH[        ]*=/{
20329 s/:*\$(srcdir):*/:/;
20330 s/:*\${srcdir}:*/:/;
20331 s/:*@srcdir@:*/:/;
20332 s/^\([^=]*=[    ]*\):*/\1/;
20333 s/:*$//;
20334 s/^[^=]*=[      ]*$//;
20335 }'
20336 fi
20337
20338 DEFS=-DHAVE_CONFIG_H
20339
20340 : ${CONFIG_STATUS=./config.status}
20341 ac_clean_files_save=$ac_clean_files
20342 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20343 { echo "$as_me:20343: creating $CONFIG_STATUS" >&5
20344 echo "$as_me: creating $CONFIG_STATUS" >&6;}
20345 cat >$CONFIG_STATUS <<_ACEOF
20346 #! $SHELL
20347 # Generated automatically by configure.
20348 # Run this file to recreate the current configuration.
20349 # Compiler output produced by configure, useful for debugging
20350 # configure, is in config.log if it exists.
20351
20352 debug=false
20353 SHELL=\${CONFIG_SHELL-$SHELL}
20354 ac_cs_invocation="\$0 \$@"
20355
20356 _ACEOF
20357
20358 cat >>$CONFIG_STATUS <<\_ACEOF
20359 # Be Bourne compatible
20360 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20361   emulate sh
20362   NULLCMD=:
20363 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20364   set -o posix
20365 fi
20366
20367 # Name of the executable.
20368 as_me=`echo "$0" |sed 's,.*[\\/],,'`
20369
20370 if expr a : '\(a\)' >/dev/null 2>&1; then
20371   as_expr=expr
20372 else
20373   as_expr=false
20374 fi
20375
20376 rm -f conf$$ conf$$.exe conf$$.file
20377 echo >conf$$.file
20378 if ln -s conf$$.file conf$$ 2>/dev/null; then
20379   # We could just check for DJGPP; but this test a) works b) is more generic
20380   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20381   if test -f conf$$.exe; then
20382     # Don't use ln at all; we don't have any links
20383     as_ln_s='cp -p'
20384   else
20385     as_ln_s='ln -s'
20386   fi
20387 elif ln conf$$.file conf$$ 2>/dev/null; then
20388   as_ln_s=ln
20389 else
20390   as_ln_s='cp -p'
20391 fi
20392 rm -f conf$$ conf$$.exe conf$$.file
20393
20394 as_executable_p="test -f"
20395
20396 # Support unset when possible.
20397 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
20398   as_unset=unset
20399 else
20400   as_unset=false
20401 fi
20402
20403 # NLS nuisances.
20404 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
20405 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
20406 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
20407 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
20408 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
20409 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
20410 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
20411 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
20412
20413 # IFS
20414 # We need space, tab and new line, in precisely that order.
20415 as_nl='
20416 '
20417 IFS="   $as_nl"
20418
20419 # CDPATH.
20420 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
20421
20422 exec 6>&1
20423
20424 _ACEOF
20425
20426 # Files that config.status was made for.
20427 if test -n "$ac_config_files"; then
20428   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20429 fi
20430
20431 if test -n "$ac_config_headers"; then
20432   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20433 fi
20434
20435 if test -n "$ac_config_links"; then
20436   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20437 fi
20438
20439 if test -n "$ac_config_commands"; then
20440   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20441 fi
20442
20443 cat >>$CONFIG_STATUS <<\EOF
20444
20445 ac_cs_usage="\
20446 \`$as_me' instantiates files from templates according to the
20447 current configuration.
20448
20449 Usage: $0 [OPTIONS] [FILE]...
20450
20451   -h, --help       print this help, then exit
20452   -V, --version    print version number, then exit
20453   -d, --debug      don't remove temporary files
20454       --recheck    update $as_me by reconfiguring in the same conditions
20455   --file=FILE[:TEMPLATE]
20456                    instantiate the configuration file FILE
20457   --header=FILE[:TEMPLATE]
20458                    instantiate the configuration header FILE
20459
20460 Configuration files:
20461 $config_files
20462
20463 Configuration headers:
20464 $config_headers
20465
20466 Configuration commands:
20467 $config_commands
20468
20469 Report bugs to <dickey@invisible-island.net>."
20470 EOF
20471
20472 cat >>$CONFIG_STATUS <<EOF
20473 ac_cs_version="\\
20474 config.status
20475 configured by $0, generated by GNU Autoconf 2.52.20121002,
20476   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20477
20478 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
20479 Free Software Foundation, Inc.
20480 This config.status script is free software; the Free Software Foundation
20481 gives unlimited permission to copy, distribute and modify it."
20482 srcdir=$srcdir
20483 INSTALL="$INSTALL"
20484 EOF
20485
20486 cat >>$CONFIG_STATUS <<\EOF
20487 # If no file are specified by the user, then we need to provide default
20488 # value.  By we need to know if files were specified by the user.
20489 ac_need_defaults=:
20490 while test $# != 0
20491 do
20492   case $1 in
20493   --*=*)
20494     ac_option=`expr "x$1" : 'x\([^=]*\)='`
20495     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
20496     shift
20497     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
20498     shift
20499     ;;
20500   -*);;
20501   *) # This is not an option, so the user has probably given explicit
20502      # arguments.
20503      ac_need_defaults=false;;
20504   esac
20505
20506   case $1 in
20507   # Handling of the options.
20508 EOF
20509 cat >>$CONFIG_STATUS <<EOF
20510   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20511     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
20512     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
20513 EOF
20514 cat >>$CONFIG_STATUS <<\EOF
20515   --version | --vers* | -V )
20516     echo "$ac_cs_version"; exit 0 ;;
20517   --he | --h)
20518     # Conflict between --help and --header
20519     { { echo "$as_me:20519: error: ambiguous option: $1
20520 Try \`$0 --help' for more information." >&5
20521 echo "$as_me: error: ambiguous option: $1
20522 Try \`$0 --help' for more information." >&2;}
20523    { (exit 1); exit 1; }; };;
20524   --help | --hel | -h )
20525     echo "$ac_cs_usage"; exit 0 ;;
20526   --debug | --d* | -d )
20527     debug=: ;;
20528   --file | --fil | --fi | --f )
20529     shift
20530     CONFIG_FILES="$CONFIG_FILES $1"
20531     ac_need_defaults=false;;
20532   --header | --heade | --head | --hea )
20533     shift
20534     CONFIG_HEADERS="$CONFIG_HEADERS $1"
20535     ac_need_defaults=false;;
20536
20537   # This is an error.
20538   -*) { { echo "$as_me:20538: error: unrecognized option: $1
20539 Try \`$0 --help' for more information." >&5
20540 echo "$as_me: error: unrecognized option: $1
20541 Try \`$0 --help' for more information." >&2;}
20542    { (exit 1); exit 1; }; } ;;
20543
20544   *) ac_config_targets="$ac_config_targets $1" ;;
20545
20546   esac
20547   shift
20548 done
20549
20550 exec 5>>config.log
20551 cat >&5 << _ACEOF
20552
20553 ## ----------------------- ##
20554 ## Running config.status.  ##
20555 ## ----------------------- ##
20556
20557 This file was extended by $as_me 2.52.20121002, executed with
20558   CONFIG_FILES    = $CONFIG_FILES
20559   CONFIG_HEADERS  = $CONFIG_HEADERS
20560   CONFIG_LINKS    = $CONFIG_LINKS
20561   CONFIG_COMMANDS = $CONFIG_COMMANDS
20562   > $ac_cs_invocation
20563 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20564
20565 _ACEOF
20566 EOF
20567
20568 cat >>$CONFIG_STATUS <<EOF
20569 #
20570 # INIT-COMMANDS section.
20571 #
20572
20573 ### Special initialization commands, used to pass information from the
20574 ### configuration-run into config.status
20575
20576 AWK="$AWK"
20577 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
20578 DFT_LWR_MODEL="$DFT_LWR_MODEL"
20579 ECHO_LD="$ECHO_LD"
20580 LDCONFIG="$LDCONFIG"
20581 LIBTOOL_VERSION="$LIBTOOL_VERSION"
20582 LIB_NAME="$LIB_NAME"
20583 LIB_PREFIX="$LIB_PREFIX"
20584 LIB_SUBSETS="$LIB_SUBSETS"
20585 LIB_SUFFIX="$LIB_SUFFIX"
20586 LIB_TRACING="$LIB_TRACING"
20587 LN_S="$LN_S"
20588 MAKE_TERMINFO="$MAKE_TERMINFO"
20589 NCURSES_MAJOR="$NCURSES_MAJOR"
20590 NCURSES_MINOR="$NCURSES_MINOR"
20591 NCURSES_OSPEED="$NCURSES_OSPEED"
20592 NCURSES_PATCH="$NCURSES_PATCH"
20593 SRC_SUBDIRS="$SRC_SUBDIRS"
20594 TERMINFO="$TERMINFO"
20595 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
20596 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
20597 TICS_NAME="$TICS_NAME"
20598 TIC_PATH="$TIC_PATH"
20599 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
20600 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
20601 TINFO_NAME="$TINFO_NAME"
20602 TINFO_SUFFIX="$TINFO_SUFFIX"
20603 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
20604 WITH_CURSES_H="$with_curses_h"
20605 WITH_ECHO="${enable_echo:=yes}"
20606 WITH_OVERWRITE="$with_overwrite"
20607 cf_LIST_MODELS="$cf_list_models"
20608 cf_cv_abi_version="$cf_cv_abi_version"
20609 cf_cv_do_relink="$cf_cv_do_relink"
20610 cf_cv_do_symlinks="$cf_cv_do_symlinks"
20611 cf_cv_enable_lp64="$cf_cv_enable_lp64"
20612 cf_cv_enable_opaque="$cf_cv_enable_opaque"
20613 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
20614 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
20615 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
20616 cf_cv_rel_version="$cf_cv_rel_version"
20617 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
20618 cf_cv_shared_soname='$cf_cv_shared_soname'
20619 cf_cv_shlib_version="$cf_cv_shlib_version"
20620 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
20621 cf_cv_system_name="$cf_cv_system_name"
20622 cf_cv_term_driver="$with_term_driver"
20623 cf_with_ada="$cf_with_ada"
20624 cf_with_cxx_binding="$cf_with_cxx_binding"
20625 cf_with_manpages="$cf_with_manpages"
20626 cf_with_tests="$cf_with_tests"
20627 host="$host"
20628 target="$target"
20629
20630 EOF
20631
20632 cat >>$CONFIG_STATUS <<\EOF
20633 for ac_config_target in $ac_config_targets
20634 do
20635   case "$ac_config_target" in
20636   # Handling of arguments.
20637   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20638   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20639   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20640   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20641   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20642   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20643   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20644   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20645   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20646   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20647   *) { { echo "$as_me:20647: error: invalid argument: $ac_config_target" >&5
20648 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20649    { (exit 1); exit 1; }; };;
20650   esac
20651 done
20652
20653 # If the user did not use the arguments to specify the items to instantiate,
20654 # then the envvar interface is used.  Set only those that are not.
20655 # We use the long form for the default assignment because of an extremely
20656 # bizarre bug on SunOS 4.1.3.
20657 if $ac_need_defaults; then
20658   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20659   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20660   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20661 fi
20662
20663 # Create a temporary directory, and hook for its removal unless debugging.
20664 $debug ||
20665 {
20666   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20667   trap '{ (exit 1); exit 1; }' 1 2 13 15
20668 }
20669
20670 # Create a (secure) tmp directory for tmp files.
20671 : ${TMPDIR=/tmp}
20672 {
20673   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20674   test -n "$tmp" && test -d "$tmp"
20675 }  ||
20676 {
20677   tmp=$TMPDIR/cs$$-$RANDOM
20678   (umask 077 && mkdir $tmp)
20679 } ||
20680 {
20681    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20682    { (exit 1); exit 1; }
20683 }
20684
20685 EOF
20686
20687 cat >>$CONFIG_STATUS <<EOF
20688
20689 #
20690 # CONFIG_FILES section.
20691 #
20692
20693 # No need to generate the scripts if there are no CONFIG_FILES.
20694 # This happens for instance when ./config.status config.h
20695 if test -n "\$CONFIG_FILES"; then
20696   # Protect against being on the right side of a sed subst in config.status.
20697   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20698    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20699 s,@SHELL@,$SHELL,;t t
20700 s,@exec_prefix@,$exec_prefix,;t t
20701 s,@prefix@,$prefix,;t t
20702 s,@program_transform_name@,$program_transform_name,;t t
20703 s,@bindir@,$bindir,;t t
20704 s,@sbindir@,$sbindir,;t t
20705 s,@libexecdir@,$libexecdir,;t t
20706 s,@datarootdir@,$datarootdir,;t t
20707 s,@datadir@,$datadir,;t t
20708 s,@sysconfdir@,$sysconfdir,;t t
20709 s,@sharedstatedir@,$sharedstatedir,;t t
20710 s,@localstatedir@,$localstatedir,;t t
20711 s,@libdir@,$libdir,;t t
20712 s,@includedir@,$includedir,;t t
20713 s,@oldincludedir@,$oldincludedir,;t t
20714 s,@infodir@,$infodir,;t t
20715 s,@mandir@,$mandir,;t t
20716 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20717 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20718 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20719 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20720 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20721 s,@build_alias@,$build_alias,;t t
20722 s,@host_alias@,$host_alias,;t t
20723 s,@target_alias@,$target_alias,;t t
20724 s,@ECHO_C@,$ECHO_C,;t t
20725 s,@ECHO_N@,$ECHO_N,;t t
20726 s,@ECHO_T@,$ECHO_T,;t t
20727 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20728 s,@DEFS@,$DEFS,;t t
20729 s,@LIBS@,$LIBS,;t t
20730 s,@top_builddir@,$top_builddir,;t t
20731 s,@EGREP@,$EGREP,;t t
20732 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20733 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20734 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20735 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20736 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20737 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20738 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20739 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20740 s,@build@,$build,;t t
20741 s,@build_cpu@,$build_cpu,;t t
20742 s,@build_vendor@,$build_vendor,;t t
20743 s,@build_os@,$build_os,;t t
20744 s,@host@,$host,;t t
20745 s,@host_cpu@,$host_cpu,;t t
20746 s,@host_vendor@,$host_vendor,;t t
20747 s,@host_os@,$host_os,;t t
20748 s,@target@,$target,;t t
20749 s,@target_cpu@,$target_cpu,;t t
20750 s,@target_vendor@,$target_vendor,;t t
20751 s,@target_os@,$target_os,;t t
20752 s,@CC@,$CC,;t t
20753 s,@CFLAGS@,$CFLAGS,;t t
20754 s,@LDFLAGS@,$LDFLAGS,;t t
20755 s,@CPPFLAGS@,$CPPFLAGS,;t t
20756 s,@ac_ct_CC@,$ac_ct_CC,;t t
20757 s,@EXEEXT@,$EXEEXT,;t t
20758 s,@OBJEXT@,$OBJEXT,;t t
20759 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20760 s,@CPP@,$CPP,;t t
20761 s,@LDCONFIG@,$LDCONFIG,;t t
20762 s,@CXX@,$CXX,;t t
20763 s,@CXXFLAGS@,$CXXFLAGS,;t t
20764 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20765 s,@AWK@,$AWK,;t t
20766 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20767 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20768 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20769 s,@LINT@,$LINT,;t t
20770 s,@LINT_OPTS@,$LINT_OPTS,;t t
20771 s,@LN_S@,$LN_S,;t t
20772 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20773 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20774 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20775 s,@SET_MAKE@,$SET_MAKE,;t t
20776 s,@CTAGS@,$CTAGS,;t t
20777 s,@ETAGS@,$ETAGS,;t t
20778 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20779 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20780 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20781 s,@RANLIB@,$RANLIB,;t t
20782 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20783 s,@LD@,$LD,;t t
20784 s,@ac_ct_LD@,$ac_ct_LD,;t t
20785 s,@AR@,$AR,;t t
20786 s,@ac_ct_AR@,$ac_ct_AR,;t t
20787 s,@ARFLAGS@,$ARFLAGS,;t t
20788 s,@DESTDIR@,$DESTDIR,;t t
20789 s,@BUILD_CC@,$BUILD_CC,;t t
20790 s,@BUILD_CPP@,$BUILD_CPP,;t t
20791 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20792 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20793 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20794 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20795 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20796 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20797 s,@cf_list_models@,$cf_list_models,;t t
20798 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20799 s,@LIBTOOL@,$LIBTOOL,;t t
20800 s,@LT_UNDEF@,$LT_UNDEF,;t t
20801 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20802 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20803 s,@LIB_CREATE@,$LIB_CREATE,;t t
20804 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20805 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20806 s,@LIB_PREP@,$LIB_PREP,;t t
20807 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20808 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20809 s,@LIB_LINK@,$LIB_LINK,;t t
20810 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20811 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20812 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20813 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20814 s,@TICS_NAME@,$TICS_NAME,;t t
20815 s,@TINFO_NAME@,$TINFO_NAME,;t t
20816 s,@LIB_NAME@,$LIB_NAME,;t t
20817 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20818 s,@CC_G_OPT@,$CC_G_OPT,;t t
20819 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20820 s,@LD_MODEL@,$LD_MODEL,;t t
20821 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20822 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20823 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20824 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20825 s,@LINK_PROGS@,$LINK_PROGS,;t t
20826 s,@LINK_TESTS@,$LINK_TESTS,;t t
20827 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20828 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20829 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20830 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20831 s,@RPATH_LIST@,$RPATH_LIST,;t t
20832 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20833 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20834 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20835 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20836 s,@XTERM_KBS@,$XTERM_KBS,;t t
20837 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20838 s,@TERMINFO@,$TERMINFO,;t t
20839 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20840 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20841 s,@TERMPATH@,$TERMPATH,;t t
20842 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20843 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20844 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20845 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20846 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20847 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20848 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20849 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20850 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20851 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20852 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20853 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20854 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20855 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20856 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20857 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
20858 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20859 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20860 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20861 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20862 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20863 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20864 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20865 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20866 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20867 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20868 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20869 s,@PTHREAD@,$PTHREAD,;t t
20870 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20871 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20872 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20873 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20874 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20875 s,@ECHO_LT@,$ECHO_LT,;t t
20876 s,@ECHO_LD@,$ECHO_LD,;t t
20877 s,@RULE_CC@,$RULE_CC,;t t
20878 s,@SHOW_CC@,$SHOW_CC,;t t
20879 s,@ECHO_CC@,$ECHO_CC,;t t
20880 s,@ECHO_LINK@,$ECHO_LINK,;t t
20881 s,@ADAFLAGS@,$ADAFLAGS,;t t
20882 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20883 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20884 s,@ADA_TRACE@,$ADA_TRACE,;t t
20885 s,@MATH_LIB@,$MATH_LIB,;t t
20886 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20887 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20888 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20889 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20890 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20891 s,@TEST_LIBS@,$TEST_LIBS,;t t
20892 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20893 s,@CXXCPP@,$CXXCPP,;t t
20894 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20895 s,@CXX_AR@,$CXX_AR,;t t
20896 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20897 s,@CXXLIBS@,$CXXLIBS,;t t
20898 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20899 s,@gnat_exists@,$gnat_exists,;t t
20900 s,@M4_exists@,$M4_exists,;t t
20901 s,@cf_ada_make@,$cf_ada_make,;t t
20902 s,@cf_compile_generics@,$cf_compile_generics,;t t
20903 s,@cf_generic_objects@,$cf_generic_objects,;t t
20904 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20905 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20906 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20907 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20908 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20909 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20910 s,@cf_ada_package@,$cf_ada_package,;t t
20911 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20912 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20913 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20914 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20915 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20916 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20917 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20918 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20919 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20920 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20921 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20922 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20923 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
20924 s,@TICS_LIBS@,$TICS_LIBS,;t t
20925 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20926 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20927 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20928 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
20929 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
20930 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
20931 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20932 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20933 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20934 s,@TICS_LIST@,$TICS_LIST,;t t
20935 s,@TINFO_LIST@,$TINFO_LIST,;t t
20936 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20937 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20938 s,@TEST_ARGS@,$TEST_ARGS,;t t
20939 s,@TEST_DEPS@,$TEST_DEPS,;t t
20940 s,@TEST_ARG2@,$TEST_ARG2,;t t
20941 s,@TEST_DEP2@,$TEST_DEP2,;t t
20942 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
20943 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20944 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20945 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20946 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20947 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20948 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20949 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20950 s,@cross_compiling@,$cross_compiling,;t t
20951 s,@TIC_PATH@,$TIC_PATH,;t t
20952 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20953 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20954 CEOF
20955
20956 EOF
20957
20958   cat >>$CONFIG_STATUS <<\EOF
20959   # Split the substitutions into bite-sized pieces for seds with
20960   # small command number limits, like on Digital OSF/1 and HP-UX.
20961   ac_max_sed_lines=48
20962   ac_sed_frag=1 # Number of current file.
20963   ac_beg=1 # First line for current file.
20964   ac_end=$ac_max_sed_lines # Line after last line for current file.
20965   ac_more_lines=:
20966   ac_sed_cmds=
20967   while $ac_more_lines; do
20968     if test $ac_beg -gt 1; then
20969       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20970     else
20971       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20972     fi
20973     if test ! -s $tmp/subs.frag; then
20974       ac_more_lines=false
20975     else
20976       # The purpose of the label and of the branching condition is to
20977       # speed up the sed processing (if there are no `@' at all, there
20978       # is no need to browse any of the substitutions).
20979       # These are the two extra sed commands mentioned above.
20980       (echo ':t
20981   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20982       if test -z "$ac_sed_cmds"; then
20983         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20984       else
20985         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20986       fi
20987       ac_sed_frag=`expr $ac_sed_frag + 1`
20988       ac_beg=$ac_end
20989       ac_end=`expr $ac_end + $ac_max_sed_lines`
20990     fi
20991   done
20992   if test -z "$ac_sed_cmds"; then
20993     ac_sed_cmds=cat
20994   fi
20995 fi # test -n "$CONFIG_FILES"
20996
20997 EOF
20998 cat >>$CONFIG_STATUS <<\EOF
20999 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21000   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21001   case $ac_file in
21002   - | *:- | *:-:* ) # input from stdin
21003         cat >$tmp/stdin
21004         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21005         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21006   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21007         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21008   * )   ac_file_in=$ac_file.in ;;
21009   esac
21010
21011   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21012   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21013          X"$ac_file" : 'X\(//\)[^/]' \| \
21014          X"$ac_file" : 'X\(//\)$' \| \
21015          X"$ac_file" : 'X\(/\)' \| \
21016          .     : '\(.\)' 2>/dev/null ||
21017 echo X"$ac_file" |
21018     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21019           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21020           /^X\(\/\/\)$/{ s//\1/; q; }
21021           /^X\(\/\).*/{ s//\1/; q; }
21022           s/.*/./; q'`
21023   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21024     { case "$ac_dir" in
21025   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21026   *)                      as_incr_dir=.;;
21027 esac
21028 as_dummy="$ac_dir"
21029 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21030   case $as_mkdir_dir in
21031     # Skip DOS drivespec
21032     ?:) as_incr_dir=$as_mkdir_dir ;;
21033     *)
21034       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21035       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21036     ;;
21037   esac
21038 done; }
21039
21040     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21041     # A "../" for each directory in $ac_dir_suffix.
21042     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21043   else
21044     ac_dir_suffix= ac_dots=
21045   fi
21046
21047   case $srcdir in
21048   .)  ac_srcdir=.
21049       if test -z "$ac_dots"; then
21050          ac_top_srcdir=.
21051       else
21052          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21053       fi ;;
21054   [\\/]* | ?:[\\/]* )
21055       ac_srcdir=$srcdir$ac_dir_suffix;
21056       ac_top_srcdir=$srcdir ;;
21057   *) # Relative path.
21058     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21059     ac_top_srcdir=$ac_dots$srcdir ;;
21060   esac
21061
21062   case $INSTALL in
21063   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21064   *) ac_INSTALL=$ac_dots$INSTALL ;;
21065   esac
21066
21067   if test x"$ac_file" != x-; then
21068     { echo "$as_me:21068: creating $ac_file" >&5
21069 echo "$as_me: creating $ac_file" >&6;}
21070     rm -f "$ac_file"
21071   fi
21072   # Let's still pretend it is `configure' which instantiates (i.e., don't
21073   # use $as_me), people would be surprised to read:
21074   #    /* config.h.  Generated automatically by config.status.  */
21075   configure_input="Generated automatically from `echo $ac_file_in |
21076                                                  sed 's,.*/,,'` by configure."
21077
21078   # First look for the input files in the build tree, otherwise in the
21079   # src tree.
21080   ac_file_inputs=`IFS=:
21081     for f in $ac_file_in; do
21082       case $f in
21083       -) echo $tmp/stdin ;;
21084       [\\/$]*)
21085          # Absolute (can't be DOS-style, as IFS=:)
21086          test -f "$f" || { { echo "$as_me:21086: error: cannot find input file: $f" >&5
21087 echo "$as_me: error: cannot find input file: $f" >&2;}
21088    { (exit 1); exit 1; }; }
21089          echo $f;;
21090       *) # Relative
21091          if test -f "$f"; then
21092            # Build tree
21093            echo $f
21094          elif test -f "$srcdir/$f"; then
21095            # Source tree
21096            echo $srcdir/$f
21097          else
21098            # /dev/null tree
21099            { { echo "$as_me:21099: error: cannot find input file: $f" >&5
21100 echo "$as_me: error: cannot find input file: $f" >&2;}
21101    { (exit 1); exit 1; }; }
21102          fi;;
21103       esac
21104     done` || { (exit 1); exit 1; }
21105 EOF
21106 cat >>$CONFIG_STATUS <<\EOF
21107   ac_warn_datarootdir=no
21108   if test x"$ac_file" != x-; then
21109     for ac_item in $ac_file_inputs
21110     do
21111       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21112       if test -n "$ac_seen"; then
21113         ac_used=`grep '@datarootdir@' $ac_item`
21114         if test -z "$ac_used"; then
21115           { echo "$as_me:21115: WARNING: datarootdir was used implicitly but not set:
21116 $ac_seen" >&5
21117 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21118 $ac_seen" >&2;}
21119           ac_warn_datarootdir=yes
21120         fi
21121       fi
21122       ac_seen=`grep '${datarootdir}' $ac_item`
21123       if test -n "$ac_seen"; then
21124         { echo "$as_me:21124: WARNING: datarootdir was used explicitly but not set:
21125 $ac_seen" >&5
21126 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21127 $ac_seen" >&2;}
21128         ac_warn_datarootdir=yes
21129       fi
21130     done
21131   fi
21132
21133 if test "x$ac_warn_datarootdir" = xyes; then
21134   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21135 fi
21136
21137 EOF
21138 cat >>$CONFIG_STATUS <<EOF
21139   sed "$ac_vpsub
21140 $extrasub
21141 EOF
21142 cat >>$CONFIG_STATUS <<\EOF
21143 :t
21144 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21145 s,@configure_input@,$configure_input,;t t
21146 s,@srcdir@,$ac_srcdir,;t t
21147 s,@top_srcdir@,$ac_top_srcdir,;t t
21148 s,@INSTALL@,$ac_INSTALL,;t t
21149 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21150   rm -f $tmp/stdin
21151   if test x"$ac_file" != x-; then
21152     cp $tmp/out $ac_file
21153
21154     for ac_name in prefix exec_prefix datarootdir
21155     do
21156         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21157         if test -n "$ac_seen"; then
21158             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
21159             if test -z "$ac_init"; then
21160               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21161               { echo "$as_me:21161: WARNING: Variable $ac_name is used but was not set:
21162 $ac_seen" >&5
21163 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21164 $ac_seen" >&2;}
21165             fi
21166         fi
21167     done
21168     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21169     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21170     if test -s $tmp/out; then
21171       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21172       { echo "$as_me:21172: WARNING: Some variables may not be substituted:
21173 $ac_seen" >&5
21174 echo "$as_me: WARNING: Some variables may not be substituted:
21175 $ac_seen" >&2;}
21176     fi
21177   else
21178     cat $tmp/out
21179   fi
21180   rm -f $tmp/out
21181
21182 done
21183 EOF
21184 cat >>$CONFIG_STATUS <<\EOF
21185
21186 #
21187 # CONFIG_HEADER section.
21188 #
21189
21190 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21191 # NAME is the cpp macro being defined and VALUE is the value it is being given.
21192 #
21193 # ac_d sets the value in "#define NAME VALUE" lines.
21194 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
21195 ac_dB='[        ].*$,\1#\2'
21196 ac_dC=' '
21197 ac_dD=',;t'
21198 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21199 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21200 ac_iB='\([      ]\),\1#\2define\3'
21201 ac_iC=' '
21202 ac_iD='\4,;t'
21203 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21204 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
21205 ac_uB='$,\1#\2define\3'
21206 ac_uC=' '
21207 ac_uD=',;t'
21208
21209 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21210   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21211   case $ac_file in
21212   - | *:- | *:-:* ) # input from stdin
21213         cat >$tmp/stdin
21214         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21215         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21216   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21217         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21218   * )   ac_file_in=$ac_file.in ;;
21219   esac
21220
21221   test x"$ac_file" != x- && { echo "$as_me:21221: creating $ac_file" >&5
21222 echo "$as_me: creating $ac_file" >&6;}
21223
21224   # First look for the input files in the build tree, otherwise in the
21225   # src tree.
21226   ac_file_inputs=`IFS=:
21227     for f in $ac_file_in; do
21228       case $f in
21229       -) echo $tmp/stdin ;;
21230       [\\/$]*)
21231          # Absolute (can't be DOS-style, as IFS=:)
21232          test -f "$f" || { { echo "$as_me:21232: error: cannot find input file: $f" >&5
21233 echo "$as_me: error: cannot find input file: $f" >&2;}
21234    { (exit 1); exit 1; }; }
21235          echo $f;;
21236       *) # Relative
21237          if test -f "$f"; then
21238            # Build tree
21239            echo $f
21240          elif test -f "$srcdir/$f"; then
21241            # Source tree
21242            echo $srcdir/$f
21243          else
21244            # /dev/null tree
21245            { { echo "$as_me:21245: error: cannot find input file: $f" >&5
21246 echo "$as_me: error: cannot find input file: $f" >&2;}
21247    { (exit 1); exit 1; }; }
21248          fi;;
21249       esac
21250     done` || { (exit 1); exit 1; }
21251   # Remove the trailing spaces.
21252   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
21253
21254 EOF
21255
21256 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
21257 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
21258 # be either 'cat' or 'sort'.
21259 cat confdefs.h | uniq >conftest.vals
21260
21261 # Break up conftest.vals because some shells have a limit on
21262 # the size of here documents, and old seds have small limits too.
21263
21264 rm -f conftest.tail
21265 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
21266 while grep . conftest.vals >/dev/null
21267 do
21268   # Write chunks of a limited-size here document to conftest.frag.
21269   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
21270   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
21271   echo 'CEOF' >> $CONFIG_STATUS
21272   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
21273   rm -f conftest.vals
21274   mv conftest.tail conftest.vals
21275 done
21276 rm -f conftest.vals
21277
21278 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
21279 # marker @DEFS@.
21280 echo '  cat >> conftest.edit <<CEOF
21281 /@DEFS@/r conftest.frag
21282 /@DEFS@/d
21283 CEOF
21284 sed -f conftest.edit $tmp/in > $tmp/out
21285 rm -f $tmp/in
21286 mv $tmp/out $tmp/in
21287 rm -f conftest.edit conftest.frag
21288 ' >> $CONFIG_STATUS
21289
21290 cat >>$CONFIG_STATUS <<\EOF
21291   # Let's still pretend it is `configure' which instantiates (i.e., don't
21292   # use $as_me), people would be surprised to read:
21293   #    /* config.h.  Generated automatically by config.status.  */
21294   if test x"$ac_file" = x-; then
21295     echo "/* Generated automatically by configure.  */" >$tmp/config.h
21296   else
21297     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21298   fi
21299   cat $tmp/in >>$tmp/config.h
21300   rm -f $tmp/in
21301   if test x"$ac_file" != x-; then
21302     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21303       { echo "$as_me:21303: $ac_file is unchanged" >&5
21304 echo "$as_me: $ac_file is unchanged" >&6;}
21305     else
21306       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21307          X"$ac_file" : 'X\(//\)[^/]' \| \
21308          X"$ac_file" : 'X\(//\)$' \| \
21309          X"$ac_file" : 'X\(/\)' \| \
21310          .     : '\(.\)' 2>/dev/null ||
21311 echo X"$ac_file" |
21312     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21313           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21314           /^X\(\/\/\)$/{ s//\1/; q; }
21315           /^X\(\/\).*/{ s//\1/; q; }
21316           s/.*/./; q'`
21317       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21318         { case "$ac_dir" in
21319   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21320   *)                      as_incr_dir=.;;
21321 esac
21322 as_dummy="$ac_dir"
21323 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21324   case $as_mkdir_dir in
21325     # Skip DOS drivespec
21326     ?:) as_incr_dir=$as_mkdir_dir ;;
21327     *)
21328       as_incr_dir=$as_incr_dir/$as_mkdir_dir
21329       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21330     ;;
21331   esac
21332 done; }
21333
21334       fi
21335       rm -f $ac_file
21336       mv $tmp/config.h $ac_file
21337     fi
21338   else
21339     cat $tmp/config.h
21340     rm -f $tmp/config.h
21341   fi
21342 done
21343 EOF
21344 cat >>$CONFIG_STATUS <<\EOF
21345 #
21346 # CONFIG_COMMANDS section.
21347 #
21348 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
21349   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
21350   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
21351
21352   case $ac_dest in
21353     default )
21354 if test "x$cf_with_tests" != xno ; then
21355
21356 for cf_dir in test
21357 do
21358         if test ! -d $srcdir/$cf_dir; then
21359                 continue
21360         elif test -f $srcdir/$cf_dir/programs; then
21361                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
21362         fi
21363 done
21364
21365 fi
21366
21367 cf_prefix=$LIB_PREFIX
21368
21369 case $cf_cv_shlib_version in #(vi
21370 cygdll|mingw)
21371         TINFO_NAME=$TINFO_ARG_SUFFIX
21372         TINFO_SUFFIX=.dll
21373         ;;
21374 esac
21375
21376 if test -n "$TINFO_SUFFIX" ; then
21377         case $TINFO_SUFFIX in
21378         tw*)
21379                 TINFO_NAME="${TINFO_NAME}tw"
21380                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
21381                 ;;
21382         t*)
21383                 TINFO_NAME="${TINFO_NAME}t"
21384                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
21385                 ;;
21386         w*)
21387                 TINFO_NAME="${TINFO_NAME}w"
21388                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
21389                 ;;
21390         esac
21391 fi
21392
21393 for cf_dir in $SRC_SUBDIRS
21394 do
21395         if test ! -d $srcdir/$cf_dir ; then
21396                 continue
21397         elif test -f $srcdir/$cf_dir/modules; then
21398
21399                 SHARED_LIB=
21400                 Libs_To_Make=
21401                 for cf_item in $cf_LIST_MODELS
21402                 do
21403
21404         case $cf_item in #(vi
21405         libtool) #(vi
21406                 cf_suffix='.la'
21407                 cf_depsuf=$cf_suffix
21408                 ;;
21409         normal) #(vi
21410                 cf_suffix='.a'
21411                 cf_depsuf=$cf_suffix
21412                 ;;
21413         debug) #(vi
21414                 cf_suffix='_g.a'
21415                 cf_depsuf=$cf_suffix
21416                 ;;
21417         profile) #(vi
21418                 cf_suffix='_p.a'
21419                 cf_depsuf=$cf_suffix
21420                 ;;
21421         shared) #(vi
21422                 case $cf_cv_system_name in
21423                 aix[5-7]*) #(vi
21424                         cf_suffix='.a'
21425                         cf_depsuf=$cf_suffix
21426                         ;;
21427                 cygwin*|mingw*) #(vi
21428                         cf_suffix='.dll'
21429                         cf_depsuf='.dll.a'
21430                         ;;
21431                 darwin*) #(vi
21432                         cf_suffix='.dylib'
21433                         cf_depsuf=$cf_suffix
21434                         ;;
21435                 hpux*) #(vi
21436                         case $target in
21437                         ia64*) #(vi
21438                                 cf_suffix='.so'
21439                                 cf_depsuf=$cf_suffix
21440                                 ;;
21441                         *) #(vi
21442                                 cf_suffix='.sl'
21443                                 cf_depsuf=$cf_suffix
21444                                 ;;
21445                         esac
21446                         ;;
21447                 *)      cf_suffix='.so'
21448                         cf_depsuf=$cf_suffix
21449                         ;;
21450                 esac
21451         esac
21452         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21453         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21454
21455                         if test $cf_item = shared ; then
21456                         if test "$cf_cv_do_symlinks" = yes ; then
21457                                 case "$cf_cv_shlib_version" in #(vi
21458                                 rel) #(vi
21459                                         case "$cf_cv_system_name" in #(vi
21460                                         darwin*)
21461                                         case .${LIB_SUFFIX} in
21462                                         .tw*)
21463                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21464                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
21465                                                 ;;
21466                                         .t*)
21467                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21468                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
21469                                                 ;;
21470                                         .w*)
21471                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21472                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
21473                                                 ;;
21474                                         *)
21475                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
21476                                                 ;;
21477                                         esac
21478                                         ;; #(vi
21479                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
21480                                         esac
21481                                         ;;
21482                                 abi)
21483                                         case "$cf_cv_system_name" in #(vi
21484                                         darwin*)
21485                                         case .${LIB_SUFFIX} in
21486                                         .tw*)
21487                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21488                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
21489                                                 ;;
21490                                         .t*)
21491                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21492                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
21493                                                 ;;
21494                                         .w*)
21495                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21496                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
21497                                                 ;;
21498                                         *)
21499                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
21500                                                 ;;
21501                                         esac
21502                                         ;; #(vi
21503                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
21504                                         esac
21505                                         ;;
21506                                 esac
21507                         fi
21508                         # cygwin needs import library, and has unique naming convention
21509                         # use autodetected ${cf_prefix} for import lib and static lib, but
21510                         # use 'cyg' prefix for shared lib.
21511                         case $cf_cv_shlib_version in #(vi
21512                         cygdll) #(vi
21513                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21514                                 Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_dir}${cf_cygsuf}"
21515                                 continue
21516                                 ;;
21517                         mingw)
21518                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
21519                                 Libs_To_Make="$Libs_To_Make ../lib/lib${cf_dir}${cf_cygsuf}"
21520                                 continue
21521                                 ;;
21522                         esac
21523                         fi
21524                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
21525                 done
21526
21527                 if test $cf_dir = ncurses ; then
21528                         cf_subsets="$LIB_SUBSETS"
21529                         cf_r_parts="$cf_subsets"
21530                         cf_liblist="$Libs_To_Make"
21531
21532                         while test -n "$cf_r_parts"
21533                         do
21534                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
21535                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
21536                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
21537                                         cf_item=
21538                                         case $cf_l_parts in #(vi
21539                                         *termlib*) #(vi
21540                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
21541                                                 ;;
21542                                         *ticlib*)
21543                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
21544                                                 ;;
21545                                         *)
21546                                                 break
21547                                                 ;;
21548                                         esac
21549                                         if test -n "$cf_item"; then
21550                                                 Libs_To_Make="$cf_item $Libs_To_Make"
21551                                         fi
21552                                 else
21553                                         break
21554                                 fi
21555                         done
21556                 else
21557                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
21558                 fi
21559
21560                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
21561                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
21562                         $cf_dir/Makefile >$cf_dir/Makefile.out
21563                 mv $cf_dir/Makefile.out $cf_dir/Makefile
21564
21565                 $AWK -f $srcdir/mk-0th.awk \
21566                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
21567                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21568
21569                 for cf_subset in $cf_subsets
21570                 do
21571                         cf_subdirs=
21572                         for cf_item in $cf_LIST_MODELS
21573                         do
21574                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
21575
21576 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21577
21578         case $cf_item in #(vi
21579         libtool) #(vi
21580                 cf_suffix='.la'
21581                 cf_depsuf=$cf_suffix
21582                 ;;
21583         normal) #(vi
21584                 cf_suffix='.a'
21585                 cf_depsuf=$cf_suffix
21586                 ;;
21587         debug) #(vi
21588                 cf_suffix='_g.a'
21589                 cf_depsuf=$cf_suffix
21590                 ;;
21591         profile) #(vi
21592                 cf_suffix='_p.a'
21593                 cf_depsuf=$cf_suffix
21594                 ;;
21595         shared) #(vi
21596                 case $cf_cv_system_name in
21597                 aix[5-7]*) #(vi
21598                         cf_suffix='.a'
21599                         cf_depsuf=$cf_suffix
21600                         ;;
21601                 cygwin*|mingw*) #(vi
21602                         cf_suffix='.dll'
21603                         cf_depsuf='.dll.a'
21604                         ;;
21605                 darwin*) #(vi
21606                         cf_suffix='.dylib'
21607                         cf_depsuf=$cf_suffix
21608                         ;;
21609                 hpux*) #(vi
21610                         case $target in
21611                         ia64*) #(vi
21612                                 cf_suffix='.so'
21613                                 cf_depsuf=$cf_suffix
21614                                 ;;
21615                         *) #(vi
21616                                 cf_suffix='.sl'
21617                                 cf_depsuf=$cf_suffix
21618                                 ;;
21619                         esac
21620                         ;;
21621                 *)      cf_suffix='.so'
21622                         cf_depsuf=$cf_suffix
21623                         ;;
21624                 esac
21625         esac
21626         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
21627         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
21628
21629         case $cf_item in
21630         libtool) cf_subdir='obj_lo'  ;;
21631         normal)  cf_subdir='objects' ;;
21632         debug)   cf_subdir='obj_g' ;;
21633         profile) cf_subdir='obj_p' ;;
21634         shared)
21635                 case $cf_cv_system_name in #(vi
21636                 cygwin) #(vi
21637                         cf_subdir='objects' ;;
21638                 *)
21639                         cf_subdir='obj_s' ;;
21640                 esac
21641         esac
21642
21643                         # Test for case where we build libtinfo with a different name.
21644                         cf_libname=$cf_dir
21645                         if test $cf_dir = ncurses ; then
21646                                 case $cf_subset in
21647                                 *base*)
21648                                         cf_libname=${cf_libname}$LIB_SUFFIX
21649                                         ;;
21650                                 *termlib*)
21651                                         cf_libname=$TINFO_LIB_SUFFIX
21652                                         ;;
21653                                 ticlib*)
21654                                         cf_libname=$TICS_LIB_SUFFIX
21655                                         ;;
21656                                 esac
21657                         else
21658                                 cf_libname=${cf_libname}$LIB_SUFFIX
21659                         fi
21660                         if test -n "${DFT_ARG_SUFFIX}" ; then
21661                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
21662                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
21663                         fi
21664
21665                         # These dependencies really are for development, not
21666                         # builds, but they are useful in porting, too.
21667                         cf_depend="../include/ncurses_cfg.h"
21668                         if test "$srcdir" = "."; then
21669                                 cf_reldir="."
21670                         else
21671                                 cf_reldir="\${srcdir}"
21672                         fi
21673
21674                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
21675                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
21676                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
21677                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
21678                         fi
21679
21680                         cf_dir_suffix=
21681                         old_cf_suffix="$cf_suffix"
21682                         if test "$cf_cv_shlib_version_infix" = yes ; then
21683                         if test -n "$LIB_SUFFIX" ; then
21684                                 case $LIB_SUFFIX in
21685                                 tw*)
21686                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
21687                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
21688                                         cf_dir_suffix=tw
21689                                         ;;
21690                                 t*)
21691                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
21692                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
21693                                         cf_dir_suffix=t
21694                                         ;;
21695                                 w*)
21696                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
21697                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
21698                                         cf_dir_suffix=w
21699                                         ;;
21700                                 esac
21701                         fi
21702                         fi
21703
21704                         $AWK -f $srcdir/mk-1st.awk \
21705                                 name=${cf_libname}${cf_dir_suffix} \
21706                                 traces=$LIB_TRACING \
21707                                 MODEL=$cf_ITEM \
21708                                 model=$cf_subdir \
21709                                 prefix=$cf_prefix \
21710                                 suffix=$cf_suffix \
21711                                 subset=$cf_subset \
21712                                 driver=$cf_cv_term_driver \
21713                                 SymLink="$LN_S" \
21714                                 TermlibRoot=$TINFO_NAME \
21715                                 TermlibSuffix=$TINFO_SUFFIX \
21716                                 ShlibVer=$cf_cv_shlib_version \
21717                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21718                                 ReLink=${cf_cv_do_relink:-no} \
21719                                 DoLinks=$cf_cv_do_symlinks \
21720                                 rmSoLocs=$cf_cv_rm_so_locs \
21721                                 ldconfig="$LDCONFIG" \
21722                                 overwrite=$WITH_OVERWRITE \
21723                                 depend="$cf_depend" \
21724                                 host="$host" \
21725                                 libtool_version="$LIBTOOL_VERSION" \
21726                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21727
21728                         cf_suffix="$old_cf_suffix"
21729
21730                         for cf_subdir2 in $cf_subdirs lib
21731                         do
21732                                 test $cf_subdir = $cf_subdir2 && break
21733                         done
21734                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21735                         $AWK -f $srcdir/mk-2nd.awk \
21736                                 name=$cf_dir \
21737                                 traces=$LIB_TRACING \
21738                                 MODEL=$cf_ITEM \
21739                                 model=$cf_subdir \
21740                                 subset=$cf_subset \
21741                                 srcdir=$srcdir \
21742                                 echo=$WITH_ECHO \
21743                                 crenames=$cf_cv_prog_CC_c_o \
21744                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21745                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21746                         cf_subdirs="$cf_subdirs $cf_subdir"
21747                         done
21748                 done
21749         fi
21750
21751         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
21752 done
21753
21754 for cf_dir in $SRC_SUBDIRS
21755 do
21756         if test ! -d $srcdir/$cf_dir ; then
21757                 continue
21758         fi
21759
21760         if test -f $cf_dir/Makefile ; then
21761                 case "$cf_dir" in
21762                 Ada95) #(vi
21763                         echo 'libs \' >> Makefile
21764                         echo 'install.libs \' >> Makefile
21765                         echo 'uninstall.libs ::' >> Makefile
21766                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
21767                         ;;
21768                 esac
21769         fi
21770
21771         if test -f $srcdir/$cf_dir/modules; then
21772                 echo >> Makefile
21773                 if test -f $srcdir/$cf_dir/headers; then
21774 cat >> Makefile <<CF_EOF
21775 install.includes \\
21776 uninstall.includes \\
21777 CF_EOF
21778                 fi
21779 if test "$cf_dir" != "c++" ; then
21780 echo 'lint \' >> Makefile
21781 fi
21782 cat >> Makefile <<CF_EOF
21783 libs \\
21784 lintlib \\
21785 install.libs \\
21786 uninstall.libs \\
21787 install.$cf_dir \\
21788 uninstall.$cf_dir ::
21789         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21790 CF_EOF
21791         elif test -f $srcdir/$cf_dir/headers; then
21792 cat >> Makefile <<CF_EOF
21793
21794 libs \\
21795 install.libs \\
21796 uninstall.libs \\
21797 install.includes \\
21798 uninstall.includes ::
21799         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
21800 CF_EOF
21801 fi
21802 done
21803
21804 cat >> Makefile <<CF_EOF
21805
21806 install.libs uninstall.libs \\
21807 install.data uninstall.data ::
21808 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
21809 CF_EOF
21810
21811 if test "x$cf_with_manpages" = xyes; then
21812 cat >> Makefile <<CF_EOF
21813
21814 install.man \\
21815 uninstall.man ::
21816         cd man && \${MAKE} \${TOP_MFLAGS} \$@
21817 CF_EOF
21818 fi
21819
21820 cat >> Makefile <<CF_EOF
21821
21822 distclean ::
21823         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21824         rm -f headers.sh headers.sed mk_shared_lib.sh
21825         rm -f edit_man.* man_alias.*
21826         rm -rf \${DIRS_TO_MAKE}
21827 CF_EOF
21828
21829 # Special case: tack's manpage lives in its own directory.
21830 if test "x$cf_with_manpages" = xyes; then
21831 if test -d tack ; then
21832 if test -f $srcdir/$tack.h; then
21833 cat >> Makefile <<CF_EOF
21834
21835 install.man \\
21836 uninstall.man ::
21837         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
21838 CF_EOF
21839 fi
21840 fi
21841 fi
21842
21843 rm -f headers.sed headers.sh
21844
21845 echo creating headers.sh
21846 cat >headers.sh <<CF_EOF
21847 #! /bin/sh
21848 # This shell script is generated by the 'configure' script.  It is invoked in a
21849 # subdirectory of the build tree.  It generates a sed-script in the parent
21850 # directory that is used to adjust includes for header files that reside in a
21851 # subdirectory of /usr/include, etc.
21852 PRG=""
21853 while test \$# != 3
21854 do
21855 PRG="\$PRG \$1"; shift
21856 done
21857 DST=\$1
21858 REF=\$2
21859 SRC=\$3
21860 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21861 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21862 echo installing \$SRC in \$DST
21863 CF_EOF
21864
21865 if test $WITH_CURSES_H = yes; then
21866         cat >>headers.sh <<CF_EOF
21867 case \$DST in
21868 /*/include/*)
21869         END=\`basename \$DST\`
21870         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21871         do
21872                 NAME=\`basename \$i\`
21873                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21874         done
21875         ;;
21876 *)
21877         echo "" >> \$TMPSED
21878         ;;
21879 esac
21880 CF_EOF
21881
21882 else
21883         cat >>headers.sh <<CF_EOF
21884 case \$DST in
21885 /*/include/*)
21886         END=\`basename \$DST\`
21887         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21888         do
21889                 NAME=\`basename \$i\`
21890                 if test "\$NAME" = "curses.h"
21891                 then
21892                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21893                         NAME=ncurses.h
21894                 fi
21895                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21896         done
21897         ;;
21898 *)
21899         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21900         ;;
21901 esac
21902 CF_EOF
21903 fi
21904 cat >>headers.sh <<CF_EOF
21905 rm -f \$TMPSRC
21906 sed -f \$TMPSED \$SRC > \$TMPSRC
21907 NAME=\`basename \$SRC\`
21908 CF_EOF
21909 if test $WITH_CURSES_H != yes; then
21910         cat >>headers.sh <<CF_EOF
21911 test "\$NAME" = "curses.h" && NAME=ncurses.h
21912 CF_EOF
21913 fi
21914 cat >>headers.sh <<CF_EOF
21915 # Just in case someone gzip'd manpages, remove the conflicting copy.
21916 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21917
21918 eval \$PRG \$TMPSRC \$DST/\$NAME
21919 rm -f \$TMPSRC \$TMPSED
21920 CF_EOF
21921
21922 chmod 0755 headers.sh
21923
21924 for cf_dir in $SRC_SUBDIRS
21925 do
21926         if test ! -d $srcdir/$cf_dir ; then
21927                 continue
21928         fi
21929
21930         if test -f $srcdir/$cf_dir/headers; then
21931                 $AWK -f $srcdir/mk-hdr.awk \
21932                         subset="$LIB_SUBSETS" \
21933                         compat="$WITH_CURSES_H" \
21934                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21935         fi
21936
21937         if test -f $srcdir/$cf_dir/modules; then
21938                 if test "$cf_dir" != "c++" ; then
21939                         cat >>$cf_dir/Makefile <<"CF_EOF"
21940 depend : ${AUTO_SRC}
21941         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21942
21943 # DO NOT DELETE THIS LINE -- make depend depends on it.
21944 CF_EOF
21945                 fi
21946         fi
21947 done
21948
21949 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21950 if test -z "$USE_OLD_MAKERULES" ; then
21951         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21952 fi
21953 fi
21954  ;;
21955   esac
21956 done
21957 EOF
21958
21959 cat >>$CONFIG_STATUS <<\EOF
21960
21961 { (exit 0); exit 0; }
21962 EOF
21963 chmod +x $CONFIG_STATUS
21964 ac_clean_files=$ac_clean_files_save
21965
21966 # configure is writing to config.log, and then calls config.status.
21967 # config.status does its own redirection, appending to config.log.
21968 # Unfortunately, on DOS this fails, as config.log is still kept open
21969 # by configure, so config.status won't be able to write to it; its
21970 # output is simply discarded.  So we exec the FD to /dev/null,
21971 # effectively closing config.log, so it can be properly (re)opened and
21972 # appended to by config.status.  When coming back to configure, we
21973 # need to make the FD available again.
21974 if test "$no_create" != yes; then
21975   ac_cs_success=:
21976   exec 5>/dev/null
21977   $SHELL $CONFIG_STATUS || ac_cs_success=false
21978   exec 5>>config.log
21979   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21980   # would make configure fail if this is the last instruction.
21981   $ac_cs_success || { (exit 1); exit 1; }
21982 fi
21983 ${MAKE:-make} preinstall