]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20140726
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.582 .
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   --disable-db-install    suppress install of terminal database
710   --without-manpages      suppress install of manpages
711   --without-progs         suppress build/install with programs (e.g., tic)
712   --without-tests         suppress build/install with test-programs
713   --without-curses-h      install curses.h as ncurses.h only
714   --with-pkg-config{=path} enable/disable use of pkg-config
715   --with-pkg-config-libdir=XXX use given directory for installing pc-files
716   --enable-pc-files       generate and install .pc files for pkg-config
717   --enable-mixed-case     tic should assume mixed-case filenames
718   --with-install-prefix   prefixes actual install-location ($DESTDIR)
719 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
720   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
721   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
722   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
723   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
724   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
725   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
726 Options to Specify the Libraries Built/Used:
727   --disable-libtool-version  enable to use libtool's incompatible naming scheme
728   --with-libtool          generate libraries with libtool
729   --with-shared           generate shared-libraries
730   --with-normal           generate normal-libraries (default)
731   --with-debug            generate debug-libraries (default)
732   --with-profile          generate profile-libraries
733   --with-cxx-shared       generate C++ shared-libraries
734   --with-lib-prefix       override library-prefix
735   --with-termlib          generate separate terminfo library
736   --with-ticlib           generate separate tic library
737   --with-gpm              use Alessandro Rubini's GPM library
738   --without-dlsym         do not use dlsym() to load GPM dynamically
739   --with-sysmouse         use sysmouse (FreeBSD console)
740   --enable-rpath          use rpath option when generating shared libraries
741   --disable-relink        relink shared libraries during install
742   --with-shlib-version=X  Specify rel or abi version for shared libs
743   --disable-lib-suffixes  disable library suffixes
744   --disable-rpath-hack    don't add rpath options for additional libraries
745 Fine-Tuning Your Configuration:
746   --disable-overwrite     leave out the link to -lcurses
747   --disable-database      do not use terminfo, only fallbacks/termcap
748   --with-database=XXX     specify terminfo source to install
749   --with-hashed-db        specify hashed-database library
750   --with-fallbacks=XXX    specify list of fallback terminal descriptions
751   --without-xterm-new     specify if xterm terminfo should be old version
752   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
753   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
754   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
755   --disable-big-core      assume machine has little memory
756   --disable-big-strings   assume compiler has only standard-size strings
757   --enable-termcap        compile in termcap fallback support
758   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
759   --enable-getcap         fast termcap load, no xrefs to terminfo
760   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
761   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
762   --disable-root-environ  restrict environment when running as root
763   --enable-symlinks       make tic use symbolic links not hard links
764   --enable-broken_linker  compile with broken-linker support code
765   --enable-bsdpad         recognize BSD-style prefix padding
766   --enable-widec          compile with wide-char/UTF-8 code
767   --disable-lp64          allow chtype to be long (ignore _LP64)
768   --disable-largefile     omit support for large files
769   --disable-tparm-varargs compile tparm() without varargs interface
770   --disable-tic-depends   link tic library without explicit dependency on ncurses library
771   --with-bool=TYPE        override fallback type of bool variable
772   --with-caps=alt         compile with alternate Caps file
773   --with-chtype=TYPE      override type of chtype
774   --with-ospeed=TYPE      override type of ospeed variable
775   --with-mmask-t=TYPE     override type of mmask_t
776   --with-ccharw-max=XXX   override size CCHARW_MAX
777   --with-tparm-arg=TYPE   override parameter type of tparm
778   --with-rcs-ids          compile-in RCS identifiers
779 Options to Specify How Manpages are Installed:
780   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
781                           optionally formatted/catonly, e.g., gzip,formatted
782   --with-manpage-renames  specify manpage-renaming
783   --with-manpage-aliases  specify manpage-aliases using .so
784   --with-manpage-symlinks specify manpage-aliases using symlinks
785   --with-manpage-tbl      specify manpage processing with tbl
786 Extensions:
787   --disable-ext-funcs     disable function-extensions
788   --enable-sp-funcs       enable experimental SCREEN-extensions
789   --enable-term-driver    enable experimental terminal-driver
790   --enable-const          compile with extra/non-standard const
791   --enable-ext-colors     compile for 256-color support
792   --enable-ext-mouse      compile for extended mouse-encoding
793   --enable-no-padding     compile with $NCURSES_NO_PADDING code
794   --enable-signed-char    compile using signed Boolean's in term.h
795   --enable-sigwinch       compile with SIGWINCH handler
796   --enable-tcap-names     compile with user-definable terminal capabilities
797 Development Code:
798   --without-develop       disable development options
799   --enable-hard-tabs      compile with hard-tabs code
800   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
801 Experimental Code:
802   --disable-assumed-color do not assume anything about default-colors
803   --disable-hashmap       compile without hashmap scrolling-optimization
804   --enable-colorfgbg      compile-in experimental $COLORFGBG code
805   --enable-interop        compile-in experimental interop bindings
806   --with-pthread          use POSIX thread library
807   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
808   --enable-weak-symbols   enable weak-symbols for pthreads
809   --enable-reentrant      compile with experimental reentrant code
810   --with-wrap-prefix=XXX  override prefix used for public variables
811   --enable-safe-sprintf   compile with experimental safe-sprintf code
812   --disable-scroll-hints  compile without scroll-hints code
813   --enable-wgetch-events  compile with experimental wgetch-events code
814 Testing/development Options:
815   --disable-echo          do not display "compiling" commands
816   --enable-warnings       build: turn on GCC compiler warnings
817   --enable-string-hacks   work around bogus compiler/loader warnings
818   --enable-assertions     test: turn on generation of assertion code
819   --with-dmalloc          test: use Gray Watson's dmalloc library
820   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
821   --with-valgrind         test: use valgrind
822   --disable-leaks         test: free permanent memory, analyze leaks
823   --enable-expanded       test: generate functions for certain macros
824   --disable-macros        test: use functions rather than macros
825   --with-trace            test: add trace() function to all models of ncurses
826   --disable-gnat-projects test: disable GNAT projects even if usable
827 Ada95 Binding Options:
828   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
829   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
830   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
831   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
832
833 Some influential environment variables:
834   CC          C compiler command
835   CFLAGS      C compiler flags
836   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
837               nonstandard directory <lib dir>
838   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
839               headers in a nonstandard directory <include dir>
840   CPP         C preprocessor
841   CXX         C++ compiler command
842   CXXFLAGS    C++ compiler flags
843   CXXCPP      C++ preprocessor
844
845 Use these variables to override the choices made by `configure' or to help
846 it to find libraries and programs with nonstandard names/locations.
847
848 EOF
849 fi
850
851 if test "$ac_init_help" = "recursive"; then
852   # If there are subdirs, report their specific --help.
853   ac_popdir=`pwd`
854   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
855     cd $ac_subdir
856     # A "../" for each directory in /$ac_subdir.
857     ac_dots=`echo $ac_subdir |
858              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
859
860     case $srcdir in
861     .) # No --srcdir option.  We are building in place.
862       ac_sub_srcdir=$srcdir ;;
863     [\\/]* | ?:[\\/]* ) # Absolute path.
864       ac_sub_srcdir=$srcdir/$ac_subdir ;;
865     *) # Relative path.
866       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
867     esac
868
869     # Check for guested configure; otherwise get Cygnus style configure.
870     if test -f $ac_sub_srcdir/configure.gnu; then
871       echo
872       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
873     elif test -f $ac_sub_srcdir/configure; then
874       echo
875       $SHELL $ac_sub_srcdir/configure  --help=recursive
876     elif test -f $ac_sub_srcdir/configure.ac ||
877            test -f $ac_sub_srcdir/configure.in; then
878       echo
879       $ac_configure --help
880     else
881       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
882     fi
883     cd $ac_popdir
884   done
885 fi
886
887 test -n "$ac_init_help" && exit 0
888 if $ac_init_version; then
889   cat <<\EOF
890
891 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
892 Free Software Foundation, Inc.
893 This configure script is free software; the Free Software Foundation
894 gives unlimited permission to copy, distribute and modify it.
895 EOF
896   exit 0
897 fi
898 exec 5>config.log
899 cat >&5 <<EOF
900 This file contains any messages produced by compilers while
901 running configure, to aid debugging if configure makes a mistake.
902
903 It was created by $as_me, which was
904 generated by GNU Autoconf 2.52.20121002.  Invocation command line was
905
906   $ $0 $@
907
908 EOF
909 {
910 cat <<_ASUNAME
911 ## ---------- ##
912 ## Platform.  ##
913 ## ---------- ##
914
915 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
916 uname -m = `(uname -m) 2>/dev/null || echo unknown`
917 uname -r = `(uname -r) 2>/dev/null || echo unknown`
918 uname -s = `(uname -s) 2>/dev/null || echo unknown`
919 uname -v = `(uname -v) 2>/dev/null || echo unknown`
920
921 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
922 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
923
924 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
925 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
926 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
927 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
928 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
929 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
930 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
931
932 PATH = $PATH
933
934 _ASUNAME
935 } >&5
936
937 cat >&5 <<EOF
938 ## ------------ ##
939 ## Core tests.  ##
940 ## ------------ ##
941
942 EOF
943
944 # Keep a trace of the command line.
945 # Strip out --no-create and --no-recursion so they do not pile up.
946 # Also quote any args containing shell meta-characters.
947 ac_configure_args=
948 ac_sep=
949 for ac_arg
950 do
951   case $ac_arg in
952   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
953   | --no-cr | --no-c) ;;
954   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
955   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
956   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
957     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
958     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
959     ac_sep=" " ;;
960   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
961      ac_sep=" " ;;
962   esac
963   # Get rid of the leading space.
964 done
965
966 # When interrupted or exit'd, cleanup temporary files, and complete
967 # config.log.  We remove comments because anyway the quotes in there
968 # would cause problems or look ugly.
969 trap 'exit_status=$?
970   # Save into config.log some information that might help in debugging.
971   echo >&5
972   echo "## ----------------- ##" >&5
973   echo "## Cache variables.  ##" >&5
974   echo "## ----------------- ##" >&5
975   echo >&5
976   # The following way of writing the cache mishandles newlines in values,
977 {
978   (set) 2>&1 |
979     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
980     *ac_space=\ *)
981       sed -n \
982         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
983           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
984       ;;
985     *)
986       sed -n \
987         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
988       ;;
989     esac;
990 } >&5
991   sed "/^$/d" confdefs.h >conftest.log
992   if test -s conftest.log; then
993     echo >&5
994     echo "## ------------ ##" >&5
995     echo "## confdefs.h.  ##" >&5
996     echo "## ------------ ##" >&5
997     echo >&5
998     cat conftest.log >&5
999   fi
1000   (echo; echo) >&5
1001   test "$ac_signal" != 0 &&
1002     echo "$as_me: caught signal $ac_signal" >&5
1003   echo "$as_me: exit $exit_status" >&5
1004   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1005     exit $exit_status
1006      ' 0
1007 for ac_signal in 1 2 13 15; do
1008   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1009 done
1010 ac_signal=0
1011
1012 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1013 rm -rf conftest* confdefs.h
1014 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1015 echo >confdefs.h
1016
1017 # Let the site file select an alternate cache file if it wants to.
1018 # Prefer explicitly selected file to automatically selected ones.
1019 if test -z "$CONFIG_SITE"; then
1020   if test "x$prefix" != xNONE; then
1021     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1022   else
1023     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1024   fi
1025 fi
1026 for ac_site_file in $CONFIG_SITE; do
1027   if test -r "$ac_site_file"; then
1028     { echo "$as_me:1028: loading site script $ac_site_file" >&5
1029 echo "$as_me: loading site script $ac_site_file" >&6;}
1030     cat "$ac_site_file" >&5
1031     . "$ac_site_file"
1032   fi
1033 done
1034
1035 if test -r "$cache_file"; then
1036   # Some versions of bash will fail to source /dev/null (special
1037   # files actually), so we avoid doing that.
1038   if test -f "$cache_file"; then
1039     { echo "$as_me:1039: loading cache $cache_file" >&5
1040 echo "$as_me: loading cache $cache_file" >&6;}
1041     case $cache_file in
1042       [\\/]* | ?:[\\/]* ) . $cache_file;;
1043       *)                      . ./$cache_file;;
1044     esac
1045   fi
1046 else
1047   { echo "$as_me:1047: creating cache $cache_file" >&5
1048 echo "$as_me: creating cache $cache_file" >&6;}
1049   >$cache_file
1050 fi
1051
1052 # Check that the precious variables saved in the cache have kept the same
1053 # value.
1054 ac_cache_corrupted=false
1055 for ac_var in `(set) 2>&1 |
1056                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1057   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1058   eval ac_new_set=\$ac_env_${ac_var}_set
1059   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1060   eval ac_new_val="\$ac_env_${ac_var}_value"
1061   case $ac_old_set,$ac_new_set in
1062     set,)
1063       { echo "$as_me:1063: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1064 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1065       ac_cache_corrupted=: ;;
1066     ,set)
1067       { echo "$as_me:1067: error: \`$ac_var' was not set in the previous run" >&5
1068 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1069       ac_cache_corrupted=: ;;
1070     ,);;
1071     *)
1072       if test "x$ac_old_val" != "x$ac_new_val"; then
1073         { echo "$as_me:1073: error: \`$ac_var' has changed since the previous run:" >&5
1074 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1075         { echo "$as_me:1075:   former value:  $ac_old_val" >&5
1076 echo "$as_me:   former value:  $ac_old_val" >&2;}
1077         { echo "$as_me:1077:   current value: $ac_new_val" >&5
1078 echo "$as_me:   current value: $ac_new_val" >&2;}
1079         ac_cache_corrupted=:
1080       fi;;
1081   esac
1082   # Pass precious variables to config.status.  It doesn't matter if
1083   # we pass some twice (in addition to the command line arguments).
1084   if test "$ac_new_set" = set; then
1085     case $ac_new_val in
1086     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1087       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1088       ac_configure_args="$ac_configure_args '$ac_arg'"
1089       ;;
1090     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1091        ;;
1092     esac
1093   fi
1094 done
1095 if $ac_cache_corrupted; then
1096   { echo "$as_me:1096: error: changes in the environment can compromise the build" >&5
1097 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1098   { { echo "$as_me:1098: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1099 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1100    { (exit 1); exit 1; }; }
1101 fi
1102
1103 ac_ext=c
1104 ac_cpp='$CPP $CPPFLAGS'
1105 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1106 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1108 ac_main_return=return
1109
1110 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1111   *c*,-n*) ECHO_N= ECHO_C='
1112 ' ECHO_T='      ' ;;
1113   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1114   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1115 esac
1116 echo "#! $SHELL" >conftest.sh
1117 echo  "exit 0"   >>conftest.sh
1118 chmod +x conftest.sh
1119 if { (echo "$as_me:1119: PATH=\".;.\"; conftest.sh") >&5
1120   (PATH=".;."; conftest.sh) 2>&5
1121   ac_status=$?
1122   echo "$as_me:1122: \$? = $ac_status" >&5
1123   (exit $ac_status); }; then
1124   ac_path_separator=';'
1125 else
1126   ac_path_separator=:
1127 fi
1128 PATH_SEPARATOR="$ac_path_separator"
1129 rm -f conftest.sh
1130
1131 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1132
1133 top_builddir=`pwd`
1134
1135 echo "$as_me:1135: checking for egrep" >&5
1136 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1137 if test "${ac_cv_prog_egrep+set}" = set; then
1138   echo $ECHO_N "(cached) $ECHO_C" >&6
1139 else
1140   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1141     then ac_cv_prog_egrep='grep -E'
1142     else ac_cv_prog_egrep='egrep'
1143     fi
1144 fi
1145 echo "$as_me:1145: result: $ac_cv_prog_egrep" >&5
1146 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1147  EGREP=$ac_cv_prog_egrep
1148
1149 test -z "$EGREP" && { { echo "$as_me:1149: error: No egrep program found" >&5
1150 echo "$as_me: error: No egrep program found" >&2;}
1151    { (exit 1); exit 1; }; }
1152
1153 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1154 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1155 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1156 cf_cv_abi_version=${NCURSES_MAJOR}
1157 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1158 cf_cv_timestamp=`date`
1159 echo "$as_me:1159: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1160 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1161
1162 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1163
1164 # Check whether --with-rel-version or --without-rel-version was given.
1165 if test "${with_rel_version+set}" = set; then
1166   withval="$with_rel_version"
1167   { echo "$as_me:1167: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1168 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1169  cf_cv_rel_version=$withval
1170 fi;
1171
1172  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1173  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1174
1175 if test -n "$NCURSES_MAJOR" ; then
1176   case $NCURSES_MAJOR in #(vi
1177   [0-9]*) #(vi
1178         ;;
1179   *)
1180         { { echo "$as_me:1180: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1181 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1182    { (exit 1); exit 1; }; }
1183         ;;
1184   esac
1185 else
1186   { { echo "$as_me:1186: error: Release major-version value is empty" >&5
1187 echo "$as_me: error: Release major-version value is empty" >&2;}
1188    { (exit 1); exit 1; }; }
1189 fi
1190
1191 if test -n "$NCURSES_MINOR" ; then
1192   case $NCURSES_MINOR in #(vi
1193   [0-9]*) #(vi
1194         ;;
1195   *)
1196         { { echo "$as_me:1196: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1197 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1198    { (exit 1); exit 1; }; }
1199         ;;
1200   esac
1201 else
1202   { { echo "$as_me:1202: error: Release minor-version value is empty" >&5
1203 echo "$as_me: error: Release minor-version value is empty" >&2;}
1204    { (exit 1); exit 1; }; }
1205 fi
1206
1207 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1208
1209 # Check whether --with-abi-version or --without-abi-version was given.
1210 if test "${with_abi_version+set}" = set; then
1211   withval="$with_abi_version"
1212   { echo "$as_me:1212: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1213 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1214  cf_cv_abi_version=$withval
1215 fi;
1216
1217 if test -n "$cf_cv_abi_version" ; then
1218   case $cf_cv_abi_version in #(vi
1219   [0-9]*) #(vi
1220         ;;
1221   *)
1222         { { echo "$as_me:1222: error: ABI version is not a number: $cf_cv_abi_version" >&5
1223 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1224    { (exit 1); exit 1; }; }
1225         ;;
1226   esac
1227 else
1228   { { echo "$as_me:1228: error: ABI version value is empty" >&5
1229 echo "$as_me: error: ABI version value is empty" >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232
1233 ac_aux_dir=
1234 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1235   if 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/install.sh; then
1240     ac_aux_dir=$ac_dir
1241     ac_install_sh="$ac_aux_dir/install.sh -c"
1242     break
1243   elif test -f $ac_dir/shtool; then
1244     ac_aux_dir=$ac_dir
1245     ac_install_sh="$ac_aux_dir/shtool install -c"
1246     break
1247   fi
1248 done
1249 if test -z "$ac_aux_dir"; then
1250   { { echo "$as_me:1250: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1251 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1252    { (exit 1); exit 1; }; }
1253 fi
1254 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1255 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1256 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1257
1258 # Make sure we can run config.sub.
1259 $ac_config_sub sun4 >/dev/null 2>&1 ||
1260   { { echo "$as_me:1260: error: cannot run $ac_config_sub" >&5
1261 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1262    { (exit 1); exit 1; }; }
1263
1264 echo "$as_me:1264: checking build system type" >&5
1265 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1266 if test "${ac_cv_build+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_build_alias=$build_alias
1270 test -z "$ac_cv_build_alias" &&
1271   ac_cv_build_alias=`$ac_config_guess`
1272 test -z "$ac_cv_build_alias" &&
1273   { { echo "$as_me:1273: error: cannot guess build type; you must specify one" >&5
1274 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1275    { (exit 1); exit 1; }; }
1276 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1277   { { echo "$as_me:1277: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1278 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1279    { (exit 1); exit 1; }; }
1280
1281 fi
1282 echo "$as_me:1282: result: $ac_cv_build" >&5
1283 echo "${ECHO_T}$ac_cv_build" >&6
1284 build=$ac_cv_build
1285 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1286 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1287 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1288
1289 echo "$as_me:1289: checking host system type" >&5
1290 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1291 if test "${ac_cv_host+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_host_alias=$host_alias
1295 test -z "$ac_cv_host_alias" &&
1296   ac_cv_host_alias=$ac_cv_build_alias
1297 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_host" >&5
1304 echo "${ECHO_T}$ac_cv_host" >&6
1305 host=$ac_cv_host
1306 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1311         echo "$as_me:1311: checking target system type" >&5
1312 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1313 if test "${ac_cv_target+set}" = set; then
1314   echo $ECHO_N "(cached) $ECHO_C" >&6
1315 else
1316   ac_cv_target_alias=$target_alias
1317 test "x$ac_cv_target_alias" = "x" &&
1318   ac_cv_target_alias=$ac_cv_host_alias
1319 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1320   { { echo "$as_me:1320: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1321 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1322    { (exit 1); exit 1; }; }
1323
1324 fi
1325 echo "$as_me:1325: result: $ac_cv_target" >&5
1326 echo "${ECHO_T}$ac_cv_target" >&6
1327 target=$ac_cv_target
1328 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1329 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1330 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1331
1332 # The aliases save the names the user supplied, while $host etc.
1333 # will get canonicalized.
1334 test -n "$target_alias" &&
1335   test "$program_prefix$program_suffix$program_transform_name" = \
1336     NONENONEs,x,x, &&
1337   program_prefix=${target_alias}-
1338         system_name="$host_os"
1339 else
1340         system_name="`(uname -s -r) 2>/dev/null`"
1341         if test -z "$system_name" ; then
1342                 system_name="`(hostname) 2>/dev/null`"
1343         fi
1344 fi
1345 test -n "$system_name" &&
1346 cat >>confdefs.h <<EOF
1347 #define SYSTEM_NAME "$system_name"
1348 EOF
1349
1350 if test "${cf_cv_system_name+set}" = set; then
1351   echo $ECHO_N "(cached) $ECHO_C" >&6
1352 else
1353   cf_cv_system_name="$system_name"
1354 fi
1355
1356 test -z "$system_name" && system_name="$cf_cv_system_name"
1357 test -n "$cf_cv_system_name" && echo "$as_me:1357: result: Configuring for $cf_cv_system_name" >&5
1358 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1359
1360 if test ".$system_name" != ".$cf_cv_system_name" ; then
1361         echo "$as_me:1361: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1362 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1363         { { echo "$as_me:1363: error: \"Please remove config.cache and try again.\"" >&5
1364 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1365    { (exit 1); exit 1; }; }
1366 fi
1367
1368 # Check whether --with-system-type or --without-system-type was given.
1369 if test "${with_system_type+set}" = set; then
1370   withval="$with_system_type"
1371   { echo "$as_me:1371: WARNING: overriding system type to $withval" >&5
1372 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1373         cf_cv_system_name=$withval
1374         host_os=$withval
1375
1376 fi;
1377
1378 ###     Save the given $CFLAGS to allow user-override.
1379 cf_user_CFLAGS="$CFLAGS"
1380
1381 ###     Default install-location
1382
1383 echo "$as_me:1383: checking for prefix" >&5
1384 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1385 if test "x$prefix" = "xNONE" ; then
1386         case "$cf_cv_system_name" in
1387                 # non-vendor systems don't have a conflict
1388         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1389                 prefix=/usr
1390                 ;;
1391         *)      prefix=$ac_default_prefix
1392                 ;;
1393         esac
1394 fi
1395 echo "$as_me:1395: result: $prefix" >&5
1396 echo "${ECHO_T}$prefix" >&6
1397
1398 if test "x$prefix" = "xNONE" ; then
1399 echo "$as_me:1399: checking for default include-directory" >&5
1400 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1401 test -n "$verbose" && echo 1>&6
1402 for cf_symbol in \
1403         $includedir \
1404         $includedir/ncurses \
1405         $prefix/include \
1406         $prefix/include/ncurses \
1407         /usr/local/include \
1408         /usr/local/include/ncurses \
1409         /usr/include \
1410         /usr/include/ncurses
1411 do
1412         cf_dir=`eval echo $cf_symbol`
1413         if test -f $cf_dir/curses.h ; then
1414         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1415                 includedir="$cf_symbol"
1416                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1417                 break
1418         fi
1419         fi
1420         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1421 done
1422 echo "$as_me:1422: result: $includedir" >&5
1423 echo "${ECHO_T}$includedir" >&6
1424 fi
1425
1426 ###     Checks for programs.
1427
1428 # Check whether --with-ada or --without-ada was given.
1429 if test "${with_ada+set}" = set; then
1430   withval="$with_ada"
1431   cf_with_ada=$withval
1432 else
1433   cf_with_ada=yes
1434 fi;
1435 if test "x$cf_with_ada" = xyes
1436 then
1437         cf_PROG_CC="gnatgcc gcc cc"
1438 else
1439         cf_PROG_CC="gcc cc"
1440 fi
1441
1442 ac_ext=c
1443 ac_cpp='$CPP $CPPFLAGS'
1444 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1445 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1446 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1447 ac_main_return=return
1448 if test -n "$ac_tool_prefix"; then
1449   for ac_prog in $cf_PROG_CC
1450   do
1451     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1452 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1453 echo "$as_me:1453: checking for $ac_word" >&5
1454 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1455 if test "${ac_cv_prog_CC+set}" = set; then
1456   echo $ECHO_N "(cached) $ECHO_C" >&6
1457 else
1458   if test -n "$CC"; then
1459   ac_cv_prog_CC="$CC" # Let the user override the test.
1460 else
1461   ac_save_IFS=$IFS; IFS=$ac_path_separator
1462 ac_dummy="$PATH"
1463 for ac_dir in $ac_dummy; do
1464   IFS=$ac_save_IFS
1465   test -z "$ac_dir" && ac_dir=.
1466   $as_executable_p "$ac_dir/$ac_word" || continue
1467 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1468 echo "$as_me:1468: found $ac_dir/$ac_word" >&5
1469 break
1470 done
1471
1472 fi
1473 fi
1474 CC=$ac_cv_prog_CC
1475 if test -n "$CC"; then
1476   echo "$as_me:1476: result: $CC" >&5
1477 echo "${ECHO_T}$CC" >&6
1478 else
1479   echo "$as_me:1479: result: no" >&5
1480 echo "${ECHO_T}no" >&6
1481 fi
1482
1483     test -n "$CC" && break
1484   done
1485 fi
1486 if test -z "$CC"; then
1487   ac_ct_CC=$CC
1488   for ac_prog in $cf_PROG_CC
1489 do
1490   # Extract the first word of "$ac_prog", so it can be a program name with args.
1491 set dummy $ac_prog; ac_word=$2
1492 echo "$as_me:1492: checking for $ac_word" >&5
1493 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1494 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1495   echo $ECHO_N "(cached) $ECHO_C" >&6
1496 else
1497   if test -n "$ac_ct_CC"; then
1498   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1499 else
1500   ac_save_IFS=$IFS; IFS=$ac_path_separator
1501 ac_dummy="$PATH"
1502 for ac_dir in $ac_dummy; do
1503   IFS=$ac_save_IFS
1504   test -z "$ac_dir" && ac_dir=.
1505   $as_executable_p "$ac_dir/$ac_word" || continue
1506 ac_cv_prog_ac_ct_CC="$ac_prog"
1507 echo "$as_me:1507: found $ac_dir/$ac_word" >&5
1508 break
1509 done
1510
1511 fi
1512 fi
1513 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1514 if test -n "$ac_ct_CC"; then
1515   echo "$as_me:1515: result: $ac_ct_CC" >&5
1516 echo "${ECHO_T}$ac_ct_CC" >&6
1517 else
1518   echo "$as_me:1518: result: no" >&5
1519 echo "${ECHO_T}no" >&6
1520 fi
1521
1522   test -n "$ac_ct_CC" && break
1523 done
1524
1525   CC=$ac_ct_CC
1526 fi
1527
1528 test -z "$CC" && { { echo "$as_me:1528: error: no acceptable cc found in \$PATH" >&5
1529 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1530    { (exit 1); exit 1; }; }
1531
1532 # Provide some information about the compiler.
1533 echo "$as_me:1533:" \
1534      "checking for C compiler version" >&5
1535 ac_compiler=`set X $ac_compile; echo $2`
1536 { (eval echo "$as_me:1536: \"$ac_compiler --version </dev/null >&5\"") >&5
1537   (eval $ac_compiler --version </dev/null >&5) 2>&5
1538   ac_status=$?
1539   echo "$as_me:1539: \$? = $ac_status" >&5
1540   (exit $ac_status); }
1541 { (eval echo "$as_me:1541: \"$ac_compiler -v </dev/null >&5\"") >&5
1542   (eval $ac_compiler -v </dev/null >&5) 2>&5
1543   ac_status=$?
1544   echo "$as_me:1544: \$? = $ac_status" >&5
1545   (exit $ac_status); }
1546 { (eval echo "$as_me:1546: \"$ac_compiler -V </dev/null >&5\"") >&5
1547   (eval $ac_compiler -V </dev/null >&5) 2>&5
1548   ac_status=$?
1549   echo "$as_me:1549: \$? = $ac_status" >&5
1550   (exit $ac_status); }
1551
1552 cat >conftest.$ac_ext <<_ACEOF
1553 #line 1553 "configure"
1554 #include "confdefs.h"
1555
1556 int
1557 main ()
1558 {
1559
1560   ;
1561   return 0;
1562 }
1563 _ACEOF
1564 ac_clean_files_save=$ac_clean_files
1565 ac_clean_files="$ac_clean_files a.out a.exe"
1566 # Try to create an executable without -o first, disregard a.out.
1567 # It will help us diagnose broken compilers, and finding out an intuition
1568 # of exeext.
1569 echo "$as_me:1569: checking for C compiler default output" >&5
1570 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1571 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1572 if { (eval echo "$as_me:1572: \"$ac_link_default\"") >&5
1573   (eval $ac_link_default) 2>&5
1574   ac_status=$?
1575   echo "$as_me:1575: \$? = $ac_status" >&5
1576   (exit $ac_status); }; then
1577   # Find the output, starting from the most likely.  This scheme is
1578 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1579 # resort.
1580 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1581                 ls a.out conftest 2>/dev/null;
1582                 ls a.* conftest.* 2>/dev/null`; do
1583   case $ac_file in
1584     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1585     a.out ) # We found the default executable, but exeext='' is most
1586             # certainly right.
1587             break;;
1588     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1589           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1590           export ac_cv_exeext
1591           break;;
1592     * ) break;;
1593   esac
1594 done
1595 else
1596   echo "$as_me: failed program was:" >&5
1597 cat conftest.$ac_ext >&5
1598 { { echo "$as_me:1598: error: C compiler cannot create executables" >&5
1599 echo "$as_me: error: C compiler cannot create executables" >&2;}
1600    { (exit 77); exit 77; }; }
1601 fi
1602
1603 ac_exeext=$ac_cv_exeext
1604 echo "$as_me:1604: result: $ac_file" >&5
1605 echo "${ECHO_T}$ac_file" >&6
1606
1607 # Check the compiler produces executables we can run.  If not, either
1608 # the compiler is broken, or we cross compile.
1609 echo "$as_me:1609: checking whether the C compiler works" >&5
1610 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1611 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1612 # If not cross compiling, check that we can run a simple program.
1613 if test "$cross_compiling" != yes; then
1614   if { ac_try='./$ac_file'
1615   { (eval echo "$as_me:1615: \"$ac_try\"") >&5
1616   (eval $ac_try) 2>&5
1617   ac_status=$?
1618   echo "$as_me:1618: \$? = $ac_status" >&5
1619   (exit $ac_status); }; }; then
1620     cross_compiling=no
1621   else
1622     if test "$cross_compiling" = maybe; then
1623         cross_compiling=yes
1624     else
1625         { { echo "$as_me:1625: error: cannot run C compiled programs.
1626 If you meant to cross compile, use \`--host'." >&5
1627 echo "$as_me: error: cannot run C compiled programs.
1628 If you meant to cross compile, use \`--host'." >&2;}
1629    { (exit 1); exit 1; }; }
1630     fi
1631   fi
1632 fi
1633 echo "$as_me:1633: result: yes" >&5
1634 echo "${ECHO_T}yes" >&6
1635
1636 rm -f a.out a.exe conftest$ac_cv_exeext
1637 ac_clean_files=$ac_clean_files_save
1638 # Check the compiler produces executables we can run.  If not, either
1639 # the compiler is broken, or we cross compile.
1640 echo "$as_me:1640: checking whether we are cross compiling" >&5
1641 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1642 echo "$as_me:1642: result: $cross_compiling" >&5
1643 echo "${ECHO_T}$cross_compiling" >&6
1644
1645 echo "$as_me:1645: checking for executable suffix" >&5
1646 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1647 if { (eval echo "$as_me:1647: \"$ac_link\"") >&5
1648   (eval $ac_link) 2>&5
1649   ac_status=$?
1650   echo "$as_me:1650: \$? = $ac_status" >&5
1651   (exit $ac_status); }; then
1652   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1653 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1654 # work properly (i.e., refer to `conftest.exe'), while it won't with
1655 # `rm'.
1656 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1657   case $ac_file in
1658     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1659     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1660           export ac_cv_exeext
1661           break;;
1662     * ) break;;
1663   esac
1664 done
1665 else
1666   { { echo "$as_me:1666: error: cannot compute EXEEXT: cannot compile and link" >&5
1667 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1668    { (exit 1); exit 1; }; }
1669 fi
1670
1671 rm -f conftest$ac_cv_exeext
1672 echo "$as_me:1672: result: $ac_cv_exeext" >&5
1673 echo "${ECHO_T}$ac_cv_exeext" >&6
1674
1675 rm -f conftest.$ac_ext
1676 EXEEXT=$ac_cv_exeext
1677 ac_exeext=$EXEEXT
1678 echo "$as_me:1678: checking for object suffix" >&5
1679 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1680 if test "${ac_cv_objext+set}" = set; then
1681   echo $ECHO_N "(cached) $ECHO_C" >&6
1682 else
1683   cat >conftest.$ac_ext <<_ACEOF
1684 #line 1684 "configure"
1685 #include "confdefs.h"
1686
1687 int
1688 main ()
1689 {
1690
1691   ;
1692   return 0;
1693 }
1694 _ACEOF
1695 rm -f conftest.o conftest.obj
1696 if { (eval echo "$as_me:1696: \"$ac_compile\"") >&5
1697   (eval $ac_compile) 2>&5
1698   ac_status=$?
1699   echo "$as_me:1699: \$? = $ac_status" >&5
1700   (exit $ac_status); }; then
1701   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1702   case $ac_file in
1703     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1704     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1705        break;;
1706   esac
1707 done
1708 else
1709   echo "$as_me: failed program was:" >&5
1710 cat conftest.$ac_ext >&5
1711 { { echo "$as_me:1711: error: cannot compute OBJEXT: cannot compile" >&5
1712 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1713    { (exit 1); exit 1; }; }
1714 fi
1715
1716 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1717 fi
1718 echo "$as_me:1718: result: $ac_cv_objext" >&5
1719 echo "${ECHO_T}$ac_cv_objext" >&6
1720 OBJEXT=$ac_cv_objext
1721 ac_objext=$OBJEXT
1722 echo "$as_me:1722: checking whether we are using the GNU C compiler" >&5
1723 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1724 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1725   echo $ECHO_N "(cached) $ECHO_C" >&6
1726 else
1727   cat >conftest.$ac_ext <<_ACEOF
1728 #line 1728 "configure"
1729 #include "confdefs.h"
1730
1731 int
1732 main ()
1733 {
1734 #ifndef __GNUC__
1735        choke me
1736 #endif
1737
1738   ;
1739   return 0;
1740 }
1741 _ACEOF
1742 rm -f conftest.$ac_objext
1743 if { (eval echo "$as_me:1743: \"$ac_compile\"") >&5
1744   (eval $ac_compile) 2>&5
1745   ac_status=$?
1746   echo "$as_me:1746: \$? = $ac_status" >&5
1747   (exit $ac_status); } &&
1748          { ac_try='test -s conftest.$ac_objext'
1749   { (eval echo "$as_me:1749: \"$ac_try\"") >&5
1750   (eval $ac_try) 2>&5
1751   ac_status=$?
1752   echo "$as_me:1752: \$? = $ac_status" >&5
1753   (exit $ac_status); }; }; then
1754   ac_compiler_gnu=yes
1755 else
1756   echo "$as_me: failed program was:" >&5
1757 cat conftest.$ac_ext >&5
1758 ac_compiler_gnu=no
1759 fi
1760 rm -f conftest.$ac_objext conftest.$ac_ext
1761 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1762
1763 fi
1764 echo "$as_me:1764: result: $ac_cv_c_compiler_gnu" >&5
1765 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1766 GCC=`test $ac_compiler_gnu = yes && echo yes`
1767 ac_test_CFLAGS=${CFLAGS+set}
1768 ac_save_CFLAGS=$CFLAGS
1769 CFLAGS="-g"
1770 echo "$as_me:1770: checking whether $CC accepts -g" >&5
1771 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1772 if test "${ac_cv_prog_cc_g+set}" = set; then
1773   echo $ECHO_N "(cached) $ECHO_C" >&6
1774 else
1775   cat >conftest.$ac_ext <<_ACEOF
1776 #line 1776 "configure"
1777 #include "confdefs.h"
1778
1779 int
1780 main ()
1781 {
1782
1783   ;
1784   return 0;
1785 }
1786 _ACEOF
1787 rm -f conftest.$ac_objext
1788 if { (eval echo "$as_me:1788: \"$ac_compile\"") >&5
1789   (eval $ac_compile) 2>&5
1790   ac_status=$?
1791   echo "$as_me:1791: \$? = $ac_status" >&5
1792   (exit $ac_status); } &&
1793          { ac_try='test -s conftest.$ac_objext'
1794   { (eval echo "$as_me:1794: \"$ac_try\"") >&5
1795   (eval $ac_try) 2>&5
1796   ac_status=$?
1797   echo "$as_me:1797: \$? = $ac_status" >&5
1798   (exit $ac_status); }; }; then
1799   ac_cv_prog_cc_g=yes
1800 else
1801   echo "$as_me: failed program was:" >&5
1802 cat conftest.$ac_ext >&5
1803 ac_cv_prog_cc_g=no
1804 fi
1805 rm -f conftest.$ac_objext conftest.$ac_ext
1806 fi
1807 echo "$as_me:1807: result: $ac_cv_prog_cc_g" >&5
1808 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1809 if test "$ac_test_CFLAGS" = set; then
1810   CFLAGS=$ac_save_CFLAGS
1811 elif test $ac_cv_prog_cc_g = yes; then
1812   if test "$GCC" = yes; then
1813     CFLAGS="-g -O2"
1814   else
1815     CFLAGS="-g"
1816   fi
1817 else
1818   if test "$GCC" = yes; then
1819     CFLAGS="-O2"
1820   else
1821     CFLAGS=
1822   fi
1823 fi
1824 # Some people use a C++ compiler to compile C.  Since we use `exit',
1825 # in C++ we need to declare it.  In case someone uses the same compiler
1826 # for both compiling C and C++ we need to have the C++ compiler decide
1827 # the declaration of exit, since it's the most demanding environment.
1828 cat >conftest.$ac_ext <<_ACEOF
1829 #ifndef __cplusplus
1830   choke me
1831 #endif
1832 _ACEOF
1833 rm -f conftest.$ac_objext
1834 if { (eval echo "$as_me:1834: \"$ac_compile\"") >&5
1835   (eval $ac_compile) 2>&5
1836   ac_status=$?
1837   echo "$as_me:1837: \$? = $ac_status" >&5
1838   (exit $ac_status); } &&
1839          { ac_try='test -s conftest.$ac_objext'
1840   { (eval echo "$as_me:1840: \"$ac_try\"") >&5
1841   (eval $ac_try) 2>&5
1842   ac_status=$?
1843   echo "$as_me:1843: \$? = $ac_status" >&5
1844   (exit $ac_status); }; }; then
1845   for ac_declaration in \
1846    ''\
1847    '#include <stdlib.h>' \
1848    'extern "C" void std::exit (int) throw (); using std::exit;' \
1849    'extern "C" void std::exit (int); using std::exit;' \
1850    'extern "C" void exit (int) throw ();' \
1851    'extern "C" void exit (int);' \
1852    'void exit (int);'
1853 do
1854   cat >conftest.$ac_ext <<_ACEOF
1855 #line 1855 "configure"
1856 #include "confdefs.h"
1857 #include <stdlib.h>
1858 $ac_declaration
1859 int
1860 main ()
1861 {
1862 exit (42);
1863   ;
1864   return 0;
1865 }
1866 _ACEOF
1867 rm -f conftest.$ac_objext
1868 if { (eval echo "$as_me:1868: \"$ac_compile\"") >&5
1869   (eval $ac_compile) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit $ac_status); } &&
1873          { ac_try='test -s conftest.$ac_objext'
1874   { (eval echo "$as_me:1874: \"$ac_try\"") >&5
1875   (eval $ac_try) 2>&5
1876   ac_status=$?
1877   echo "$as_me:1877: \$? = $ac_status" >&5
1878   (exit $ac_status); }; }; then
1879   :
1880 else
1881   echo "$as_me: failed program was:" >&5
1882 cat conftest.$ac_ext >&5
1883 continue
1884 fi
1885 rm -f conftest.$ac_objext conftest.$ac_ext
1886   cat >conftest.$ac_ext <<_ACEOF
1887 #line 1887 "configure"
1888 #include "confdefs.h"
1889 $ac_declaration
1890 int
1891 main ()
1892 {
1893 exit (42);
1894   ;
1895   return 0;
1896 }
1897 _ACEOF
1898 rm -f conftest.$ac_objext
1899 if { (eval echo "$as_me:1899: \"$ac_compile\"") >&5
1900   (eval $ac_compile) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit $ac_status); } &&
1904          { ac_try='test -s conftest.$ac_objext'
1905   { (eval echo "$as_me:1905: \"$ac_try\"") >&5
1906   (eval $ac_try) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); }; }; then
1910   break
1911 else
1912   echo "$as_me: failed program was:" >&5
1913 cat conftest.$ac_ext >&5
1914 fi
1915 rm -f conftest.$ac_objext conftest.$ac_ext
1916 done
1917 rm -rf conftest*
1918 if test -n "$ac_declaration"; then
1919   echo '#ifdef __cplusplus' >>confdefs.h
1920   echo $ac_declaration      >>confdefs.h
1921   echo '#endif'             >>confdefs.h
1922 fi
1923
1924 else
1925   echo "$as_me: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_ext=c
1930 ac_cpp='$CPP $CPPFLAGS'
1931 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1932 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1933 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1934 ac_main_return=return
1935
1936 GCC_VERSION=none
1937 if test "$GCC" = yes ; then
1938         echo "$as_me:1938: checking version of $CC" >&5
1939 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1940         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.].*//'`"
1941         test -z "$GCC_VERSION" && GCC_VERSION=unknown
1942         echo "$as_me:1942: result: $GCC_VERSION" >&5
1943 echo "${ECHO_T}$GCC_VERSION" >&6
1944 fi
1945
1946 echo "$as_me:1946: checking for $CC option to accept ANSI C" >&5
1947 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1948 if test "${ac_cv_prog_cc_stdc+set}" = set; then
1949   echo $ECHO_N "(cached) $ECHO_C" >&6
1950 else
1951   ac_cv_prog_cc_stdc=no
1952 ac_save_CC=$CC
1953 cat >conftest.$ac_ext <<_ACEOF
1954 #line 1954 "configure"
1955 #include "confdefs.h"
1956 #include <stdarg.h>
1957 #include <stdio.h>
1958 #include <sys/types.h>
1959 #include <sys/stat.h>
1960 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1961 struct buf { int x; };
1962 FILE * (*rcsopen) (struct buf *, struct stat *, int);
1963 static char *e (p, i)
1964      char **p;
1965      int i;
1966 {
1967   return p[i];
1968 }
1969 static char *f (char * (*g) (char **, int), char **p, ...)
1970 {
1971   char *s;
1972   va_list v;
1973   va_start (v,p);
1974   s = g (p, va_arg (v,int));
1975   va_end (v);
1976   return s;
1977 }
1978 int test (int i, double x);
1979 struct s1 {int (*f) (int a);};
1980 struct s2 {int (*f) (double a);};
1981 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1982 int argc;
1983 char **argv;
1984 int
1985 main ()
1986 {
1987 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1988   ;
1989   return 0;
1990 }
1991 _ACEOF
1992 # Don't try gcc -ansi; that turns off useful extensions and
1993 # breaks some systems' header files.
1994 # AIX                   -qlanglvl=ansi
1995 # Ultrix and OSF/1      -std1
1996 # HP-UX 10.20 and later -Ae
1997 # HP-UX older versions  -Aa -D_HPUX_SOURCE
1998 # SVR4                  -Xc -D__EXTENSIONS__
1999 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2000 do
2001   CC="$ac_save_CC $ac_arg"
2002   rm -f conftest.$ac_objext
2003 if { (eval echo "$as_me:2003: \"$ac_compile\"") >&5
2004   (eval $ac_compile) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); } &&
2008          { ac_try='test -s conftest.$ac_objext'
2009   { (eval echo "$as_me:2009: \"$ac_try\"") >&5
2010   (eval $ac_try) 2>&5
2011   ac_status=$?
2012   echo "$as_me:2012: \$? = $ac_status" >&5
2013   (exit $ac_status); }; }; then
2014   ac_cv_prog_cc_stdc=$ac_arg
2015 break
2016 else
2017   echo "$as_me: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2019 fi
2020 rm -f conftest.$ac_objext
2021 done
2022 rm -f conftest.$ac_ext conftest.$ac_objext
2023 CC=$ac_save_CC
2024
2025 fi
2026
2027 case "x$ac_cv_prog_cc_stdc" in
2028   x|xno)
2029     echo "$as_me:2029: result: none needed" >&5
2030 echo "${ECHO_T}none needed" >&6 ;;
2031   *)
2032     echo "$as_me:2032: result: $ac_cv_prog_cc_stdc" >&5
2033 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2034     CC="$CC $ac_cv_prog_cc_stdc" ;;
2035 esac
2036
2037 # This should have been defined by AC_PROG_CC
2038 : ${CC:=cc}
2039
2040 echo "$as_me:2040: checking \$CC variable" >&5
2041 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2042 case "$CC" in #(vi
2043 *[\ \   ]-[IUD]*)
2044         echo "$as_me:2044: result: broken" >&5
2045 echo "${ECHO_T}broken" >&6
2046         { echo "$as_me:2046: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2047 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2048         # humor him...
2049         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2050         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2051
2052 cf_fix_cppflags=no
2053 cf_new_cflags=
2054 cf_new_cppflags=
2055 cf_new_extra_cppflags=
2056
2057 for cf_add_cflags in $cf_flags
2058 do
2059 case $cf_fix_cppflags in
2060 no)
2061         case $cf_add_cflags in #(vi
2062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2063                 case $cf_add_cflags in
2064                 -D*)
2065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2066
2067                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2068                                 && test -z "${cf_tst_cflags}" \
2069                                 && cf_fix_cppflags=yes
2070
2071                         if test $cf_fix_cppflags = yes ; then
2072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2073                                 continue
2074                         elif test "${cf_tst_cflags}" = "\"'" ; then
2075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2076                                 continue
2077                         fi
2078                         ;;
2079                 esac
2080                 case "$CPPFLAGS" in
2081                 *$cf_add_cflags) #(vi
2082                         ;;
2083                 *) #(vi
2084                         case $cf_add_cflags in #(vi
2085                         -D*)
2086                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2087
2088 CPPFLAGS=`echo "$CPPFLAGS" | \
2089         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2090                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2091
2092                                 ;;
2093                         esac
2094                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2095                         ;;
2096                 esac
2097                 ;;
2098         *)
2099                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2100                 ;;
2101         esac
2102         ;;
2103 yes)
2104         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2105
2106         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2107
2108         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2109                 && test -z "${cf_tst_cflags}" \
2110                 && cf_fix_cppflags=no
2111         ;;
2112 esac
2113 done
2114
2115 if test -n "$cf_new_cflags" ; then
2116
2117         CFLAGS="$CFLAGS $cf_new_cflags"
2118 fi
2119
2120 if test -n "$cf_new_cppflags" ; then
2121
2122         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2123 fi
2124
2125 if test -n "$cf_new_extra_cppflags" ; then
2126
2127         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2128 fi
2129
2130         ;;
2131 *)
2132         echo "$as_me:2132: result: ok" >&5
2133 echo "${ECHO_T}ok" >&6
2134         ;;
2135 esac
2136
2137 ac_ext=c
2138 ac_cpp='$CPP $CPPFLAGS'
2139 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2140 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2141 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2142 ac_main_return=return
2143 echo "$as_me:2143: checking how to run the C preprocessor" >&5
2144 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2145 # On Suns, sometimes $CPP names a directory.
2146 if test -n "$CPP" && test -d "$CPP"; then
2147   CPP=
2148 fi
2149 if test -z "$CPP"; then
2150   if test "${ac_cv_prog_CPP+set}" = set; then
2151   echo $ECHO_N "(cached) $ECHO_C" >&6
2152 else
2153       # Double quotes because CPP needs to be expanded
2154     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2155     do
2156       ac_preproc_ok=false
2157 for ac_c_preproc_warn_flag in '' yes
2158 do
2159   # Use a header file that comes with gcc, so configuring glibc
2160   # with a fresh cross-compiler works.
2161   # On the NeXT, cc -E runs the code through the compiler's parser,
2162   # not just through cpp. "Syntax error" is here to catch this case.
2163   cat >conftest.$ac_ext <<_ACEOF
2164 #line 2164 "configure"
2165 #include "confdefs.h"
2166 #include <assert.h>
2167                      Syntax error
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   :
2187 else
2188   echo "$as_me: failed program was:" >&5
2189   cat conftest.$ac_ext >&5
2190   # Broken: fails on valid input.
2191 continue
2192 fi
2193 rm -f conftest.err conftest.$ac_ext
2194
2195   # OK, works on sane cases.  Now check whether non-existent headers
2196   # can be detected and how.
2197   cat >conftest.$ac_ext <<_ACEOF
2198 #line 2198 "configure"
2199 #include "confdefs.h"
2200 #include <ac_nonexistent.h>
2201 _ACEOF
2202 if { (eval echo "$as_me:2202: \"$ac_cpp conftest.$ac_ext\"") >&5
2203   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2204   ac_status=$?
2205   egrep -v '^ *\+' conftest.er1 >conftest.err
2206   rm -f conftest.er1
2207   cat conftest.err >&5
2208   echo "$as_me:2208: \$? = $ac_status" >&5
2209   (exit $ac_status); } >/dev/null; then
2210   if test -s conftest.err; then
2211     ac_cpp_err=$ac_c_preproc_warn_flag
2212   else
2213     ac_cpp_err=
2214   fi
2215 else
2216   ac_cpp_err=yes
2217 fi
2218 if test -z "$ac_cpp_err"; then
2219   # Broken: success on invalid input.
2220 continue
2221 else
2222   echo "$as_me: failed program was:" >&5
2223   cat conftest.$ac_ext >&5
2224   # Passes both tests.
2225 ac_preproc_ok=:
2226 break
2227 fi
2228 rm -f conftest.err conftest.$ac_ext
2229
2230 done
2231 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2232 rm -f conftest.err conftest.$ac_ext
2233 if $ac_preproc_ok; then
2234   break
2235 fi
2236
2237     done
2238     ac_cv_prog_CPP=$CPP
2239
2240 fi
2241   CPP=$ac_cv_prog_CPP
2242 else
2243   ac_cv_prog_CPP=$CPP
2244 fi
2245 echo "$as_me:2245: result: $CPP" >&5
2246 echo "${ECHO_T}$CPP" >&6
2247 ac_preproc_ok=false
2248 for ac_c_preproc_warn_flag in '' yes
2249 do
2250   # Use a header file that comes with gcc, so configuring glibc
2251   # with a fresh cross-compiler works.
2252   # On the NeXT, cc -E runs the code through the compiler's parser,
2253   # not just through cpp. "Syntax error" is here to catch this case.
2254   cat >conftest.$ac_ext <<_ACEOF
2255 #line 2255 "configure"
2256 #include "confdefs.h"
2257 #include <assert.h>
2258                      Syntax error
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   :
2278 else
2279   echo "$as_me: failed program was:" >&5
2280   cat conftest.$ac_ext >&5
2281   # Broken: fails on valid input.
2282 continue
2283 fi
2284 rm -f conftest.err conftest.$ac_ext
2285
2286   # OK, works on sane cases.  Now check whether non-existent headers
2287   # can be detected and how.
2288   cat >conftest.$ac_ext <<_ACEOF
2289 #line 2289 "configure"
2290 #include "confdefs.h"
2291 #include <ac_nonexistent.h>
2292 _ACEOF
2293 if { (eval echo "$as_me:2293: \"$ac_cpp conftest.$ac_ext\"") >&5
2294   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2295   ac_status=$?
2296   egrep -v '^ *\+' conftest.er1 >conftest.err
2297   rm -f conftest.er1
2298   cat conftest.err >&5
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit $ac_status); } >/dev/null; then
2301   if test -s conftest.err; then
2302     ac_cpp_err=$ac_c_preproc_warn_flag
2303   else
2304     ac_cpp_err=
2305   fi
2306 else
2307   ac_cpp_err=yes
2308 fi
2309 if test -z "$ac_cpp_err"; then
2310   # Broken: success on invalid input.
2311 continue
2312 else
2313   echo "$as_me: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   # Passes both tests.
2316 ac_preproc_ok=:
2317 break
2318 fi
2319 rm -f conftest.err conftest.$ac_ext
2320
2321 done
2322 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2323 rm -f conftest.err conftest.$ac_ext
2324 if $ac_preproc_ok; then
2325   :
2326 else
2327   { { echo "$as_me:2327: error: C preprocessor \"$CPP\" fails sanity check" >&5
2328 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2329    { (exit 1); exit 1; }; }
2330 fi
2331
2332 ac_ext=c
2333 ac_cpp='$CPP $CPPFLAGS'
2334 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2335 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2336 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2337 ac_main_return=return
2338
2339 if test $ac_cv_c_compiler_gnu = yes; then
2340     echo "$as_me:2340: checking whether $CC needs -traditional" >&5
2341 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2342 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2343   echo $ECHO_N "(cached) $ECHO_C" >&6
2344 else
2345     ac_pattern="Autoconf.*'x'"
2346   cat >conftest.$ac_ext <<_ACEOF
2347 #line 2347 "configure"
2348 #include "confdefs.h"
2349 #include <sgtty.h>
2350 int Autoconf = TIOCGETP;
2351 _ACEOF
2352 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2353   egrep "$ac_pattern" >/dev/null 2>&1; then
2354   ac_cv_prog_gcc_traditional=yes
2355 else
2356   ac_cv_prog_gcc_traditional=no
2357 fi
2358 rm -rf conftest*
2359
2360   if test $ac_cv_prog_gcc_traditional = no; then
2361     cat >conftest.$ac_ext <<_ACEOF
2362 #line 2362 "configure"
2363 #include "confdefs.h"
2364 #include <termio.h>
2365 int Autoconf = TCGETA;
2366 _ACEOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "$ac_pattern" >/dev/null 2>&1; then
2369   ac_cv_prog_gcc_traditional=yes
2370 fi
2371 rm -rf conftest*
2372
2373   fi
2374 fi
2375 echo "$as_me:2375: result: $ac_cv_prog_gcc_traditional" >&5
2376 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2377   if test $ac_cv_prog_gcc_traditional = yes; then
2378     CC="$CC -traditional"
2379   fi
2380 fi
2381
2382 echo "$as_me:2382: checking whether $CC understands -c and -o together" >&5
2383 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2384 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2385   echo $ECHO_N "(cached) $ECHO_C" >&6
2386 else
2387
2388 cat > conftest.$ac_ext <<CF_EOF
2389 #include <stdio.h>
2390 int main()
2391 {
2392         ${cf_cv_main_return:-return}(0);
2393 }
2394 CF_EOF
2395 # We do the test twice because some compilers refuse to overwrite an
2396 # existing .o file with -o, though they will create one.
2397 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2398 if { (eval echo "$as_me:2398: \"$ac_try\"") >&5
2399   (eval $ac_try) 2>&5
2400   ac_status=$?
2401   echo "$as_me:2401: \$? = $ac_status" >&5
2402   (exit $ac_status); } &&
2403   test -f conftest2.$ac_objext && { (eval echo "$as_me:2403: \"$ac_try\"") >&5
2404   (eval $ac_try) 2>&5
2405   ac_status=$?
2406   echo "$as_me:2406: \$? = $ac_status" >&5
2407   (exit $ac_status); };
2408 then
2409   eval cf_cv_prog_CC_c_o=yes
2410 else
2411   eval cf_cv_prog_CC_c_o=no
2412 fi
2413 rm -rf conftest*
2414
2415 fi
2416 if test $cf_cv_prog_CC_c_o = yes; then
2417   echo "$as_me:2417: result: yes" >&5
2418 echo "${ECHO_T}yes" >&6
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422 fi
2423
2424 if test "$cross_compiling" = yes ; then
2425   LDCONFIG=:
2426 else
2427 case "$cf_cv_system_name" in #(vi
2428 dragonfly*|mirbsd*|freebsd*) #(vi
2429   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2430   ;;
2431 *) LDPATH=$PATH:/sbin:/usr/sbin
2432   # Extract the first word of "ldconfig", so it can be a program name with args.
2433 set dummy ldconfig; ac_word=$2
2434 echo "$as_me:2434: checking for $ac_word" >&5
2435 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2436 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2437   echo $ECHO_N "(cached) $ECHO_C" >&6
2438 else
2439   case $LDCONFIG in
2440   [\\/]* | ?:[\\/]*)
2441   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2442   ;;
2443   *)
2444   ac_save_IFS=$IFS; IFS=$ac_path_separator
2445 ac_dummy="$LDPATH"
2446 for ac_dir in $ac_dummy; do
2447   IFS=$ac_save_IFS
2448   test -z "$ac_dir" && ac_dir=.
2449   if $as_executable_p "$ac_dir/$ac_word"; then
2450    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2451    echo "$as_me:2451: found $ac_dir/$ac_word" >&5
2452    break
2453 fi
2454 done
2455
2456   ;;
2457 esac
2458 fi
2459 LDCONFIG=$ac_cv_path_LDCONFIG
2460
2461 if test -n "$LDCONFIG"; then
2462   echo "$as_me:2462: result: $LDCONFIG" >&5
2463 echo "${ECHO_T}$LDCONFIG" >&6
2464 else
2465   echo "$as_me:2465: result: no" >&5
2466 echo "${ECHO_T}no" >&6
2467 fi
2468
2469   ;;
2470 esac
2471 fi
2472
2473 echo "$as_me:2473: checking if you want to ensure bool is consistent with C++" >&5
2474 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2475
2476 # Check whether --with-cxx or --without-cxx was given.
2477 if test "${with_cxx+set}" = set; then
2478   withval="$with_cxx"
2479   cf_with_cxx=$withval
2480 else
2481   cf_with_cxx=yes
2482 fi;
2483 echo "$as_me:2483: result: $cf_with_cxx" >&5
2484 echo "${ECHO_T}$cf_with_cxx" >&6
2485 if test "X$cf_with_cxx" = Xno ; then
2486         CXX=""
2487         GXX=""
2488 else
2489         # with autoconf 2.13, we can change the error to a warning:
2490                 ac_ext=cc
2491 ac_cpp='$CXXCPP $CPPFLAGS'
2492 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2495 ac_main_return=return
2496 if test -n "$ac_tool_prefix"; then
2497   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2498   do
2499     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2500 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2501 echo "$as_me:2501: checking for $ac_word" >&5
2502 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2503 if test "${ac_cv_prog_CXX+set}" = set; then
2504   echo $ECHO_N "(cached) $ECHO_C" >&6
2505 else
2506   if test -n "$CXX"; then
2507   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2508 else
2509   ac_save_IFS=$IFS; IFS=$ac_path_separator
2510 ac_dummy="$PATH"
2511 for ac_dir in $ac_dummy; do
2512   IFS=$ac_save_IFS
2513   test -z "$ac_dir" && ac_dir=.
2514   $as_executable_p "$ac_dir/$ac_word" || continue
2515 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2516 echo "$as_me:2516: found $ac_dir/$ac_word" >&5
2517 break
2518 done
2519
2520 fi
2521 fi
2522 CXX=$ac_cv_prog_CXX
2523 if test -n "$CXX"; then
2524   echo "$as_me:2524: result: $CXX" >&5
2525 echo "${ECHO_T}$CXX" >&6
2526 else
2527   echo "$as_me:2527: result: no" >&5
2528 echo "${ECHO_T}no" >&6
2529 fi
2530
2531     test -n "$CXX" && break
2532   done
2533 fi
2534 if test -z "$CXX"; then
2535   ac_ct_CXX=$CXX
2536   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2537 do
2538   # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2543   echo $ECHO_N "(cached) $ECHO_C" >&6
2544 else
2545   if test -n "$ac_ct_CXX"; then
2546   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2547 else
2548   ac_save_IFS=$IFS; IFS=$ac_path_separator
2549 ac_dummy="$PATH"
2550 for ac_dir in $ac_dummy; do
2551   IFS=$ac_save_IFS
2552   test -z "$ac_dir" && ac_dir=.
2553   $as_executable_p "$ac_dir/$ac_word" || continue
2554 ac_cv_prog_ac_ct_CXX="$ac_prog"
2555 echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556 break
2557 done
2558
2559 fi
2560 fi
2561 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2562 if test -n "$ac_ct_CXX"; then
2563   echo "$as_me:2563: result: $ac_ct_CXX" >&5
2564 echo "${ECHO_T}$ac_ct_CXX" >&6
2565 else
2566   echo "$as_me:2566: result: no" >&5
2567 echo "${ECHO_T}no" >&6
2568 fi
2569
2570   test -n "$ac_ct_CXX" && break
2571 done
2572 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2573
2574   CXX=$ac_ct_CXX
2575 fi
2576
2577 # Provide some information about the compiler.
2578 echo "$as_me:2578:" \
2579      "checking for C++ compiler version" >&5
2580 ac_compiler=`set X $ac_compile; echo $2`
2581 { (eval echo "$as_me:2581: \"$ac_compiler --version </dev/null >&5\"") >&5
2582   (eval $ac_compiler --version </dev/null >&5) 2>&5
2583   ac_status=$?
2584   echo "$as_me:2584: \$? = $ac_status" >&5
2585   (exit $ac_status); }
2586 { (eval echo "$as_me:2586: \"$ac_compiler -v </dev/null >&5\"") >&5
2587   (eval $ac_compiler -v </dev/null >&5) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit $ac_status); }
2591 { (eval echo "$as_me:2591: \"$ac_compiler -V </dev/null >&5\"") >&5
2592   (eval $ac_compiler -V </dev/null >&5) 2>&5
2593   ac_status=$?
2594   echo "$as_me:2594: \$? = $ac_status" >&5
2595   (exit $ac_status); }
2596
2597 echo "$as_me:2597: checking whether we are using the GNU C++ compiler" >&5
2598 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2599 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2600   echo $ECHO_N "(cached) $ECHO_C" >&6
2601 else
2602   cat >conftest.$ac_ext <<_ACEOF
2603 #line 2603 "configure"
2604 #include "confdefs.h"
2605
2606 int
2607 main ()
2608 {
2609 #ifndef __GNUC__
2610        choke me
2611 #endif
2612
2613   ;
2614   return 0;
2615 }
2616 _ACEOF
2617 rm -f conftest.$ac_objext
2618 if { (eval echo "$as_me:2618: \"$ac_compile\"") >&5
2619   (eval $ac_compile) 2>&5
2620   ac_status=$?
2621   echo "$as_me:2621: \$? = $ac_status" >&5
2622   (exit $ac_status); } &&
2623          { ac_try='test -s conftest.$ac_objext'
2624   { (eval echo "$as_me:2624: \"$ac_try\"") >&5
2625   (eval $ac_try) 2>&5
2626   ac_status=$?
2627   echo "$as_me:2627: \$? = $ac_status" >&5
2628   (exit $ac_status); }; }; then
2629   ac_compiler_gnu=yes
2630 else
2631   echo "$as_me: failed program was:" >&5
2632 cat conftest.$ac_ext >&5
2633 ac_compiler_gnu=no
2634 fi
2635 rm -f conftest.$ac_objext conftest.$ac_ext
2636 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2637
2638 fi
2639 echo "$as_me:2639: result: $ac_cv_cxx_compiler_gnu" >&5
2640 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2641 GXX=`test $ac_compiler_gnu = yes && echo yes`
2642 ac_test_CXXFLAGS=${CXXFLAGS+set}
2643 ac_save_CXXFLAGS=$CXXFLAGS
2644 CXXFLAGS="-g"
2645 echo "$as_me:2645: checking whether $CXX accepts -g" >&5
2646 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2647 if test "${ac_cv_prog_cxx_g+set}" = set; then
2648   echo $ECHO_N "(cached) $ECHO_C" >&6
2649 else
2650   cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2653
2654 int
2655 main ()
2656 {
2657
2658   ;
2659   return 0;
2660 }
2661 _ACEOF
2662 rm -f conftest.$ac_objext
2663 if { (eval echo "$as_me:2663: \"$ac_compile\"") >&5
2664   (eval $ac_compile) 2>&5
2665   ac_status=$?
2666   echo "$as_me:2666: \$? = $ac_status" >&5
2667   (exit $ac_status); } &&
2668          { ac_try='test -s conftest.$ac_objext'
2669   { (eval echo "$as_me:2669: \"$ac_try\"") >&5
2670   (eval $ac_try) 2>&5
2671   ac_status=$?
2672   echo "$as_me:2672: \$? = $ac_status" >&5
2673   (exit $ac_status); }; }; then
2674   ac_cv_prog_cxx_g=yes
2675 else
2676   echo "$as_me: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 ac_cv_prog_cxx_g=no
2679 fi
2680 rm -f conftest.$ac_objext conftest.$ac_ext
2681 fi
2682 echo "$as_me:2682: result: $ac_cv_prog_cxx_g" >&5
2683 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2684 if test "$ac_test_CXXFLAGS" = set; then
2685   CXXFLAGS=$ac_save_CXXFLAGS
2686 elif test $ac_cv_prog_cxx_g = yes; then
2687   if test "$GXX" = yes; then
2688     CXXFLAGS="-g -O2"
2689   else
2690     CXXFLAGS="-g"
2691   fi
2692 else
2693   if test "$GXX" = yes; then
2694     CXXFLAGS="-O2"
2695   else
2696     CXXFLAGS=
2697   fi
2698 fi
2699 for ac_declaration in \
2700    ''\
2701    '#include <stdlib.h>' \
2702    'extern "C" void std::exit (int) throw (); using std::exit;' \
2703    'extern "C" void std::exit (int); using std::exit;' \
2704    'extern "C" void exit (int) throw ();' \
2705    'extern "C" void exit (int);' \
2706    'void exit (int);'
2707 do
2708   cat >conftest.$ac_ext <<_ACEOF
2709 #line 2709 "configure"
2710 #include "confdefs.h"
2711 #include <stdlib.h>
2712 $ac_declaration
2713 int
2714 main ()
2715 {
2716 exit (42);
2717   ;
2718   return 0;
2719 }
2720 _ACEOF
2721 rm -f conftest.$ac_objext
2722 if { (eval echo "$as_me:2722: \"$ac_compile\"") >&5
2723   (eval $ac_compile) 2>&5
2724   ac_status=$?
2725   echo "$as_me:2725: \$? = $ac_status" >&5
2726   (exit $ac_status); } &&
2727          { ac_try='test -s conftest.$ac_objext'
2728   { (eval echo "$as_me:2728: \"$ac_try\"") >&5
2729   (eval $ac_try) 2>&5
2730   ac_status=$?
2731   echo "$as_me:2731: \$? = $ac_status" >&5
2732   (exit $ac_status); }; }; then
2733   :
2734 else
2735   echo "$as_me: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 continue
2738 fi
2739 rm -f conftest.$ac_objext conftest.$ac_ext
2740   cat >conftest.$ac_ext <<_ACEOF
2741 #line 2741 "configure"
2742 #include "confdefs.h"
2743 $ac_declaration
2744 int
2745 main ()
2746 {
2747 exit (42);
2748   ;
2749   return 0;
2750 }
2751 _ACEOF
2752 rm -f conftest.$ac_objext
2753 if { (eval echo "$as_me:2753: \"$ac_compile\"") >&5
2754   (eval $ac_compile) 2>&5
2755   ac_status=$?
2756   echo "$as_me:2756: \$? = $ac_status" >&5
2757   (exit $ac_status); } &&
2758          { ac_try='test -s conftest.$ac_objext'
2759   { (eval echo "$as_me:2759: \"$ac_try\"") >&5
2760   (eval $ac_try) 2>&5
2761   ac_status=$?
2762   echo "$as_me:2762: \$? = $ac_status" >&5
2763   (exit $ac_status); }; }; then
2764   break
2765 else
2766   echo "$as_me: failed program was:" >&5
2767 cat conftest.$ac_ext >&5
2768 fi
2769 rm -f conftest.$ac_objext conftest.$ac_ext
2770 done
2771 rm -rf conftest*
2772 if test -n "$ac_declaration"; then
2773   echo '#ifdef __cplusplus' >>confdefs.h
2774   echo $ac_declaration      >>confdefs.h
2775   echo '#endif'             >>confdefs.h
2776 fi
2777
2778 ac_ext=c
2779 ac_cpp='$CPP $CPPFLAGS'
2780 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2781 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2782 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2783 ac_main_return=return
2784
2785                 # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
2786         if test "$CXX" = "g++" ; then
2787                 # Extract the first word of "g++", so it can be a program name with args.
2788 set dummy g++; ac_word=$2
2789 echo "$as_me:2789: checking for $ac_word" >&5
2790 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2791 if test "${ac_cv_path_CXX+set}" = set; then
2792   echo $ECHO_N "(cached) $ECHO_C" >&6
2793 else
2794   case $CXX in
2795   [\\/]* | ?:[\\/]*)
2796   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2797   ;;
2798   *)
2799   ac_save_IFS=$IFS; IFS=$ac_path_separator
2800 ac_dummy="$PATH"
2801 for ac_dir in $ac_dummy; do
2802   IFS=$ac_save_IFS
2803   test -z "$ac_dir" && ac_dir=.
2804   if $as_executable_p "$ac_dir/$ac_word"; then
2805    ac_cv_path_CXX="$ac_dir/$ac_word"
2806    echo "$as_me:2806: found $ac_dir/$ac_word" >&5
2807    break
2808 fi
2809 done
2810
2811   ;;
2812 esac
2813 fi
2814 CXX=$ac_cv_path_CXX
2815
2816 if test -n "$CXX"; then
2817   echo "$as_me:2817: result: $CXX" >&5
2818 echo "${ECHO_T}$CXX" >&6
2819 else
2820   echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2822 fi
2823
2824         fi
2825         case "x$CXX" in #(vi
2826         x|xg++)
2827                 { echo "$as_me:2827: WARNING: You don't have any C++ compiler, too bad" >&5
2828 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
2829                 cf_with_cxx=no; CXX=""; GXX="";
2830                 ;;
2831         esac
2832 fi
2833
2834 GXX_VERSION=none
2835 if test "$GXX" = yes; then
2836         echo "$as_me:2836: checking version of ${CXX:-g++}" >&5
2837 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
2838         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2839         test -z "$GXX_VERSION" && GXX_VERSION=unknown
2840         echo "$as_me:2840: result: $GXX_VERSION" >&5
2841 echo "${ECHO_T}$GXX_VERSION" >&6
2842 fi
2843
2844 case $GXX_VERSION in
2845 1*|2.[0-6]*)
2846         # GXX=""; CXX=""; ac_cv_prog_gxx=no
2847         # cf_cxx_library=no
2848         { echo "$as_me:2848: WARNING: templates do not work" >&5
2849 echo "$as_me: WARNING: templates do not work" >&2;}
2850         ;;
2851 esac
2852
2853 echo "$as_me:2853: checking if you want to build C++ binding and demo" >&5
2854 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
2855
2856 # Check whether --with-cxx-binding or --without-cxx-binding was given.
2857 if test "${with_cxx_binding+set}" = set; then
2858   withval="$with_cxx_binding"
2859   cf_with_cxx_binding=$withval
2860 else
2861   cf_with_cxx_binding=$cf_with_cxx
2862 fi;
2863 echo "$as_me:2863: result: $cf_with_cxx_binding" >&5
2864 echo "${ECHO_T}$cf_with_cxx_binding" >&6
2865
2866 echo "$as_me:2866: checking if you want to build with Ada95" >&5
2867 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
2868 echo "$as_me:2868: result: $cf_with_ada" >&5
2869 echo "${ECHO_T}$cf_with_ada" >&6
2870
2871 echo "$as_me:2871: checking if you want to install terminal database" >&5
2872 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
2873
2874 # Check whether --enable-db-install or --disable-db-install was given.
2875 if test "${enable_db_install+set}" = set; then
2876   enableval="$enable_db_install"
2877   cf_with_db_install=$enableval
2878 else
2879   cf_with_db_install=yes
2880 fi;
2881 echo "$as_me:2881: result: $cf_with_db_install" >&5
2882 echo "${ECHO_T}$cf_with_db_install" >&6
2883
2884 echo "$as_me:2884: checking if you want to install manpages" >&5
2885 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
2886
2887 # Check whether --with-manpages or --without-manpages was given.
2888 if test "${with_manpages+set}" = set; then
2889   withval="$with_manpages"
2890   cf_with_manpages=$withval
2891 else
2892   cf_with_manpages=yes
2893 fi;
2894 echo "$as_me:2894: result: $cf_with_manpages" >&5
2895 echo "${ECHO_T}$cf_with_manpages" >&6
2896
2897 echo "$as_me:2897: checking if you want to build programs such as tic" >&5
2898 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
2899
2900 # Check whether --with-progs or --without-progs was given.
2901 if test "${with_progs+set}" = set; then
2902   withval="$with_progs"
2903   cf_with_progs=$withval
2904 else
2905   cf_with_progs=yes
2906 fi;
2907 echo "$as_me:2907: result: $cf_with_progs" >&5
2908 echo "${ECHO_T}$cf_with_progs" >&6
2909
2910 echo "$as_me:2910: checking if you want to build test-programs" >&5
2911 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
2912
2913 # Check whether --with-tests or --without-tests was given.
2914 if test "${with_tests+set}" = set; then
2915   withval="$with_tests"
2916   cf_with_tests=$withval
2917 else
2918   cf_with_tests=yes
2919 fi;
2920 echo "$as_me:2920: result: $cf_with_tests" >&5
2921 echo "${ECHO_T}$cf_with_tests" >&6
2922
2923 echo "$as_me:2923: checking if you wish to install curses.h" >&5
2924 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
2925
2926 # Check whether --with-curses-h or --without-curses-h was given.
2927 if test "${with_curses_h+set}" = set; then
2928   withval="$with_curses_h"
2929   with_curses_h=$withval
2930 else
2931   with_curses_h=yes
2932 fi;
2933 echo "$as_me:2933: result: $with_curses_h" >&5
2934 echo "${ECHO_T}$with_curses_h" >&6
2935
2936 modules_to_build="ncurses"
2937 if test "X$cf_with_progs" != Xno ; then
2938 modules_to_build="$modules_to_build progs tack"
2939 fi
2940 modules_to_build="$modules_to_build panel menu form"
2941
2942 test "$program_prefix" != NONE &&
2943   program_transform_name="s,^,$program_prefix,;$program_transform_name"
2944 # Use a double $ so make ignores it.
2945 test "$program_suffix" != NONE &&
2946   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2947 # Double any \ or $.  echo might interpret backslashes.
2948 # By default was `s,x,x', remove it if useless.
2949 cat <<\_ACEOF >conftest.sed
2950 s/[\\$]/&&/g;s/;s,x,x,$//
2951 _ACEOF
2952 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2953 rm conftest.sed
2954
2955 for ac_prog in mawk gawk nawk awk
2956 do
2957   # Extract the first word of "$ac_prog", so it can be a program name with args.
2958 set dummy $ac_prog; ac_word=$2
2959 echo "$as_me:2959: checking for $ac_word" >&5
2960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2961 if test "${ac_cv_prog_AWK+set}" = set; then
2962   echo $ECHO_N "(cached) $ECHO_C" >&6
2963 else
2964   if test -n "$AWK"; then
2965   ac_cv_prog_AWK="$AWK" # Let the user override the test.
2966 else
2967   ac_save_IFS=$IFS; IFS=$ac_path_separator
2968 ac_dummy="$PATH"
2969 for ac_dir in $ac_dummy; do
2970   IFS=$ac_save_IFS
2971   test -z "$ac_dir" && ac_dir=.
2972   $as_executable_p "$ac_dir/$ac_word" || continue
2973 ac_cv_prog_AWK="$ac_prog"
2974 echo "$as_me:2974: found $ac_dir/$ac_word" >&5
2975 break
2976 done
2977
2978 fi
2979 fi
2980 AWK=$ac_cv_prog_AWK
2981 if test -n "$AWK"; then
2982   echo "$as_me:2982: result: $AWK" >&5
2983 echo "${ECHO_T}$AWK" >&6
2984 else
2985   echo "$as_me:2985: result: no" >&5
2986 echo "${ECHO_T}no" >&6
2987 fi
2988
2989   test -n "$AWK" && break
2990 done
2991
2992 test -z "$AWK" && { { echo "$as_me:2992: error: No awk program found" >&5
2993 echo "$as_me: error: No awk program found" >&2;}
2994    { (exit 1); exit 1; }; }
2995
2996 echo "$as_me:2996: checking for egrep" >&5
2997 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2998 if test "${ac_cv_prog_egrep+set}" = set; then
2999   echo $ECHO_N "(cached) $ECHO_C" >&6
3000 else
3001   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3002     then ac_cv_prog_egrep='grep -E'
3003     else ac_cv_prog_egrep='egrep'
3004     fi
3005 fi
3006 echo "$as_me:3006: result: $ac_cv_prog_egrep" >&5
3007 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3008  EGREP=$ac_cv_prog_egrep
3009
3010 test -z "$EGREP" && { { echo "$as_me:3010: error: No egrep program found" >&5
3011 echo "$as_me: error: No egrep program found" >&2;}
3012    { (exit 1); exit 1; }; }
3013
3014 # Find a good install program.  We prefer a C program (faster),
3015 # so one script is as good as another.  But avoid the broken or
3016 # incompatible versions:
3017 # SysV /etc/install, /usr/sbin/install
3018 # SunOS /usr/etc/install
3019 # IRIX /sbin/install
3020 # AIX /bin/install
3021 # AmigaOS /C/install, which installs bootblocks on floppy discs
3022 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3023 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3024 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3025 # ./install, which can be erroneously created by make from ./install.sh.
3026 echo "$as_me:3026: checking for a BSD compatible install" >&5
3027 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3028 if test -z "$INSTALL"; then
3029 if test "${ac_cv_path_install+set}" = set; then
3030   echo $ECHO_N "(cached) $ECHO_C" >&6
3031 else
3032     ac_save_IFS=$IFS; IFS=$ac_path_separator
3033   for ac_dir in $PATH; do
3034     IFS=$ac_save_IFS
3035     # Account for people who put trailing slashes in PATH elements.
3036     case $ac_dir/ in
3037     / | ./ | .// | /cC/* \
3038     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3039     | /usr/ucb/* ) ;;
3040     *)
3041       # OSF1 and SCO ODT 3.0 have their own names for install.
3042       # Don't use installbsd from OSF since it installs stuff as root
3043       # by default.
3044       for ac_prog in ginstall scoinst install; do
3045         if $as_executable_p "$ac_dir/$ac_prog"; then
3046           if test $ac_prog = install &&
3047             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3048             # AIX install.  It has an incompatible calling convention.
3049             :
3050           elif test $ac_prog = install &&
3051             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3052             # program-specific install script used by HP pwplus--don't use.
3053             :
3054           else
3055             ac_cv_path_install="$ac_dir/$ac_prog -c"
3056             break 2
3057           fi
3058         fi
3059       done
3060       ;;
3061     esac
3062   done
3063
3064 fi
3065   if test "${ac_cv_path_install+set}" = set; then
3066     INSTALL=$ac_cv_path_install
3067   else
3068     # As a last resort, use the slow shell script.  We don't cache a
3069     # path for INSTALL within a source directory, because that will
3070     # break other packages using the cache if that directory is
3071     # removed, or if the path is relative.
3072     INSTALL=$ac_install_sh
3073   fi
3074 fi
3075 echo "$as_me:3075: result: $INSTALL" >&5
3076 echo "${ECHO_T}$INSTALL" >&6
3077
3078 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3079 # It thinks the first close brace ends the variable substitution.
3080 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3081
3082 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3083
3084 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3085
3086 case $INSTALL in
3087 /*)
3088   ;;
3089 *)
3090   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3091   test -z "$cf_dir" && cf_dir=.
3092   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3093   ;;
3094 esac
3095
3096 for ac_prog in tdlint lint alint splint lclint
3097 do
3098   # Extract the first word of "$ac_prog", so it can be a program name with args.
3099 set dummy $ac_prog; ac_word=$2
3100 echo "$as_me:3100: checking for $ac_word" >&5
3101 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102 if test "${ac_cv_prog_LINT+set}" = set; then
3103   echo $ECHO_N "(cached) $ECHO_C" >&6
3104 else
3105   if test -n "$LINT"; then
3106   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3107 else
3108   ac_save_IFS=$IFS; IFS=$ac_path_separator
3109 ac_dummy="$PATH"
3110 for ac_dir in $ac_dummy; do
3111   IFS=$ac_save_IFS
3112   test -z "$ac_dir" && ac_dir=.
3113   $as_executable_p "$ac_dir/$ac_word" || continue
3114 ac_cv_prog_LINT="$ac_prog"
3115 echo "$as_me:3115: found $ac_dir/$ac_word" >&5
3116 break
3117 done
3118
3119 fi
3120 fi
3121 LINT=$ac_cv_prog_LINT
3122 if test -n "$LINT"; then
3123   echo "$as_me:3123: result: $LINT" >&5
3124 echo "${ECHO_T}$LINT" >&6
3125 else
3126   echo "$as_me:3126: result: no" >&5
3127 echo "${ECHO_T}no" >&6
3128 fi
3129
3130   test -n "$LINT" && break
3131 done
3132
3133 echo "$as_me:3133: checking whether ln -s works" >&5
3134 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3135 LN_S=$as_ln_s
3136 if test "$LN_S" = "ln -s"; then
3137   echo "$as_me:3137: result: yes" >&5
3138 echo "${ECHO_T}yes" >&6
3139 else
3140   echo "$as_me:3140: result: no, using $LN_S" >&5
3141 echo "${ECHO_T}no, using $LN_S" >&6
3142 fi
3143
3144 echo "$as_me:3144: checking if $LN_S -f options work" >&5
3145 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3146
3147 rm -f conf$$.src conf$$dst
3148 echo >conf$$.dst
3149 echo first >conf$$.src
3150 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3151         cf_prog_ln_sf=yes
3152 else
3153         cf_prog_ln_sf=no
3154 fi
3155 rm -f conf$$.dst conf$$src
3156 echo "$as_me:3156: result: $cf_prog_ln_sf" >&5
3157 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3158
3159 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3160
3161 echo "$as_me:3161: checking for long file names" >&5
3162 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3163 if test "${ac_cv_sys_long_file_names+set}" = set; then
3164   echo $ECHO_N "(cached) $ECHO_C" >&6
3165 else
3166   ac_cv_sys_long_file_names=yes
3167 # Test for long file names in all the places we know might matter:
3168 #      .                the current directory, where building will happen
3169 #      $prefix/lib      where we will be installing things
3170 #      $exec_prefix/lib likewise
3171 # eval it to expand exec_prefix.
3172 #      $TMPDIR          if set, where it might want to write temporary files
3173 # if $TMPDIR is not set:
3174 #      /tmp             where it might want to write temporary files
3175 #      /var/tmp         likewise
3176 #      /usr/tmp         likewise
3177 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3178   ac_tmpdirs=$TMPDIR
3179 else
3180   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3181 fi
3182 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3183   test -d $ac_dir || continue
3184   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3185   ac_xdir=$ac_dir/cf$$
3186   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3187   ac_tf1=$ac_xdir/conftest9012345
3188   ac_tf2=$ac_xdir/conftest9012346
3189   (echo 1 >$ac_tf1) 2>/dev/null
3190   (echo 2 >$ac_tf2) 2>/dev/null
3191   ac_val=`cat $ac_tf1 2>/dev/null`
3192   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3193     ac_cv_sys_long_file_names=no
3194     rm -rf $ac_xdir 2>/dev/null
3195     break
3196   fi
3197   rm -rf $ac_xdir 2>/dev/null
3198 done
3199 fi
3200 echo "$as_me:3200: result: $ac_cv_sys_long_file_names" >&5
3201 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3202 if test $ac_cv_sys_long_file_names = yes; then
3203
3204 cat >>confdefs.h <<\EOF
3205 #define HAVE_LONG_FILE_NAMES 1
3206 EOF
3207
3208 fi
3209
3210 # if we find pkg-config, check if we should install the ".pc" files.
3211
3212 echo "$as_me:3212: checking if you want to use pkg-config" >&5
3213 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3214
3215 # Check whether --with-pkg-config or --without-pkg-config was given.
3216 if test "${with_pkg_config+set}" = set; then
3217   withval="$with_pkg_config"
3218   cf_pkg_config=$withval
3219 else
3220   cf_pkg_config=yes
3221 fi;
3222 echo "$as_me:3222: result: $cf_pkg_config" >&5
3223 echo "${ECHO_T}$cf_pkg_config" >&6
3224
3225 case $cf_pkg_config in #(vi
3226 no) #(vi
3227         PKG_CONFIG=none
3228         ;;
3229 yes) #(vi
3230
3231 if test -n "$ac_tool_prefix"; then
3232   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3233 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3234 echo "$as_me:3234: checking for $ac_word" >&5
3235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3236 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3237   echo $ECHO_N "(cached) $ECHO_C" >&6
3238 else
3239   case $PKG_CONFIG in
3240   [\\/]* | ?:[\\/]*)
3241   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3242   ;;
3243   *)
3244   ac_save_IFS=$IFS; IFS=$ac_path_separator
3245 ac_dummy="$PATH"
3246 for ac_dir in $ac_dummy; do
3247   IFS=$ac_save_IFS
3248   test -z "$ac_dir" && ac_dir=.
3249   if $as_executable_p "$ac_dir/$ac_word"; then
3250    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3251    echo "$as_me:3251: found $ac_dir/$ac_word" >&5
3252    break
3253 fi
3254 done
3255
3256   ;;
3257 esac
3258 fi
3259 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3260
3261 if test -n "$PKG_CONFIG"; then
3262   echo "$as_me:3262: result: $PKG_CONFIG" >&5
3263 echo "${ECHO_T}$PKG_CONFIG" >&6
3264 else
3265   echo "$as_me:3265: result: no" >&5
3266 echo "${ECHO_T}no" >&6
3267 fi
3268
3269 fi
3270 if test -z "$ac_cv_path_PKG_CONFIG"; then
3271   ac_pt_PKG_CONFIG=$PKG_CONFIG
3272   # Extract the first word of "pkg-config", so it can be a program name with args.
3273 set dummy pkg-config; ac_word=$2
3274 echo "$as_me:3274: checking for $ac_word" >&5
3275 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3276 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279   case $ac_pt_PKG_CONFIG in
3280   [\\/]* | ?:[\\/]*)
3281   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3282   ;;
3283   *)
3284   ac_save_IFS=$IFS; IFS=$ac_path_separator
3285 ac_dummy="$PATH"
3286 for ac_dir in $ac_dummy; do
3287   IFS=$ac_save_IFS
3288   test -z "$ac_dir" && ac_dir=.
3289   if $as_executable_p "$ac_dir/$ac_word"; then
3290    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3291    echo "$as_me:3291: found $ac_dir/$ac_word" >&5
3292    break
3293 fi
3294 done
3295
3296   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3297   ;;
3298 esac
3299 fi
3300 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3301
3302 if test -n "$ac_pt_PKG_CONFIG"; then
3303   echo "$as_me:3303: result: $ac_pt_PKG_CONFIG" >&5
3304 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3305 else
3306   echo "$as_me:3306: result: no" >&5
3307 echo "${ECHO_T}no" >&6
3308 fi
3309
3310   PKG_CONFIG=$ac_pt_PKG_CONFIG
3311 else
3312   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3313 fi
3314
3315         ;;
3316 *)
3317         PKG_CONFIG=$withval
3318         ;;
3319 esac
3320
3321 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3322 if test "$PKG_CONFIG" != none ; then
3323
3324 if test "x$prefix" != xNONE; then
3325   cf_path_syntax="$prefix"
3326 else
3327   cf_path_syntax="$ac_default_prefix"
3328 fi
3329
3330 case ".$PKG_CONFIG" in #(vi
3331 .\$\(*\)*|.\'*\'*) #(vi
3332   ;;
3333 ..|./*|.\\*) #(vi
3334   ;;
3335 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3336   ;;
3337 .\${*prefix}*|.\${*dir}*) #(vi
3338   eval PKG_CONFIG="$PKG_CONFIG"
3339   case ".$PKG_CONFIG" in #(vi
3340   .NONE/*)
3341     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3342     ;;
3343   esac
3344   ;; #(vi
3345 .no|.NONE/*)
3346   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3347   ;;
3348 *)
3349   { { echo "$as_me:3349: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3350 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3351    { (exit 1); exit 1; }; }
3352   ;;
3353 esac
3354
3355 fi
3356
3357 if test "$PKG_CONFIG" != none ; then
3358         echo "$as_me:3358: checking for $PKG_CONFIG library directory" >&5
3359 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
3360
3361 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
3362 if test "${with_pkg_config_libdir+set}" = set; then
3363   withval="$with_pkg_config_libdir"
3364   PKG_CONFIG_LIBDIR=$withval
3365 else
3366   PKG_CONFIG_LIBDIR=yes
3367 fi;
3368
3369         case x$PKG_CONFIG_LIBDIR in #(vi
3370         x/*) #(vi
3371                 ;;
3372         xyes) #(vi
3373                 # look for the library directory using the same prefix as the executable
3374                 cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3375                 case x`(arch) 2>/dev/null` in #(vi
3376                 *64) #(vi
3377                         for cf_config in $cf_path/share $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3378                         do
3379                                 if test -d $cf_config/pkgconfig
3380                                 then
3381                                         PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3382                                         break
3383                                 fi
3384                         done
3385                         ;;
3386                 *)
3387                         PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3388                         ;;
3389                 esac
3390                 ;;
3391         *)
3392                 ;;
3393         esac
3394
3395         echo "$as_me:3395: result: $PKG_CONFIG_LIBDIR" >&5
3396 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
3397 fi
3398
3399 if test "$PKG_CONFIG" != none ; then
3400         echo "$as_me:3400: checking if we should install .pc files for $PKG_CONFIG" >&5
3401 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3402
3403 # Check whether --enable-pc-files or --disable-pc-files was given.
3404 if test "${enable_pc_files+set}" = set; then
3405   enableval="$enable_pc_files"
3406   enable_pc_files=$enableval
3407 else
3408   enable_pc_files=no
3409 fi;
3410         echo "$as_me:3410: result: $enable_pc_files" >&5
3411 echo "${ECHO_T}$enable_pc_files" >&6
3412         if test "$enable_pc_files" != no
3413         then
3414
3415 if test "x$prefix" != xNONE; then
3416   cf_path_syntax="$prefix"
3417 else
3418   cf_path_syntax="$ac_default_prefix"
3419 fi
3420
3421 case ".$PKG_CONFIG_LIBDIR" in #(vi
3422 .\$\(*\)*|.\'*\'*) #(vi
3423   ;;
3424 ..|./*|.\\*) #(vi
3425   ;;
3426 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3427   ;;
3428 .\${*prefix}*|.\${*dir}*) #(vi
3429   eval PKG_CONFIG_LIBDIR="$PKG_CONFIG_LIBDIR"
3430   case ".$PKG_CONFIG_LIBDIR" in #(vi
3431   .NONE/*)
3432     PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3433     ;;
3434   esac
3435   ;; #(vi
3436 .no|.NONE/*)
3437   PKG_CONFIG_LIBDIR=`echo $PKG_CONFIG_LIBDIR | sed -e s%NONE%$cf_path_syntax%`
3438   ;;
3439 *)
3440   { { echo "$as_me:3440: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&5
3441 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG_LIBDIR\"" >&2;}
3442    { (exit 1); exit 1; }; }
3443   ;;
3444 esac
3445
3446         fi
3447 else
3448         enable_pc_files=no
3449 fi
3450
3451 echo "$as_me:3451: checking if we should assume mixed-case filenames" >&5
3452 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3453
3454 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3455 if test "${enable_mixed_case+set}" = set; then
3456   enableval="$enable_mixed_case"
3457   enable_mixedcase=$enableval
3458 else
3459   enable_mixedcase=auto
3460 fi;
3461 echo "$as_me:3461: result: $enable_mixedcase" >&5
3462 echo "${ECHO_T}$enable_mixedcase" >&6
3463 if test "$enable_mixedcase" = "auto" ; then
3464
3465 echo "$as_me:3465: checking if filesystem supports mixed-case filenames" >&5
3466 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3467 if test "${cf_cv_mixedcase+set}" = set; then
3468   echo $ECHO_N "(cached) $ECHO_C" >&6
3469 else
3470
3471 if test "$cross_compiling" = yes ; then
3472         case $target_alias in #(vi
3473         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
3474                 cf_cv_mixedcase=no
3475                 ;;
3476         *)
3477                 cf_cv_mixedcase=yes
3478                 ;;
3479         esac
3480 else
3481         rm -f conftest CONFTEST
3482         echo test >conftest
3483         if test -f CONFTEST ; then
3484                 cf_cv_mixedcase=no
3485         else
3486                 cf_cv_mixedcase=yes
3487         fi
3488         rm -f conftest CONFTEST
3489 fi
3490
3491 fi
3492 echo "$as_me:3492: result: $cf_cv_mixedcase" >&5
3493 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3494 test "$cf_cv_mixedcase" = yes &&
3495 cat >>confdefs.h <<\EOF
3496 #define MIXEDCASE_FILENAMES 1
3497 EOF
3498
3499 else
3500     cf_cv_mixedcase=$enable_mixedcase
3501     if test "x$enable_mixedcase" = "xyes" ; then
3502
3503 cat >>confdefs.h <<\EOF
3504 #define MIXEDCASE_FILENAMES 1
3505 EOF
3506
3507     fi
3508 fi
3509
3510 # do this after mixed-case option (tags/TAGS is not as important as tic).
3511 echo "$as_me:3511: checking whether ${MAKE-make} sets \${MAKE}" >&5
3512 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3513 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3514 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3515   echo $ECHO_N "(cached) $ECHO_C" >&6
3516 else
3517   cat >conftest.make <<\EOF
3518 all:
3519         @echo 'ac_maketemp="${MAKE}"'
3520 EOF
3521 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3522 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3523 if test -n "$ac_maketemp"; then
3524   eval ac_cv_prog_make_${ac_make}_set=yes
3525 else
3526   eval ac_cv_prog_make_${ac_make}_set=no
3527 fi
3528 rm -f conftest.make
3529 fi
3530 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3531   echo "$as_me:3531: result: yes" >&5
3532 echo "${ECHO_T}yes" >&6
3533   SET_MAKE=
3534 else
3535   echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537   SET_MAKE="MAKE=${MAKE-make}"
3538 fi
3539
3540 for ac_prog in exctags ctags
3541 do
3542   # Extract the first word of "$ac_prog", so it can be a program name with args.
3543 set dummy $ac_prog; ac_word=$2
3544 echo "$as_me:3544: checking for $ac_word" >&5
3545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3546 if test "${ac_cv_prog_CTAGS+set}" = set; then
3547   echo $ECHO_N "(cached) $ECHO_C" >&6
3548 else
3549   if test -n "$CTAGS"; then
3550   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3551 else
3552   ac_save_IFS=$IFS; IFS=$ac_path_separator
3553 ac_dummy="$PATH"
3554 for ac_dir in $ac_dummy; do
3555   IFS=$ac_save_IFS
3556   test -z "$ac_dir" && ac_dir=.
3557   $as_executable_p "$ac_dir/$ac_word" || continue
3558 ac_cv_prog_CTAGS="$ac_prog"
3559 echo "$as_me:3559: found $ac_dir/$ac_word" >&5
3560 break
3561 done
3562
3563 fi
3564 fi
3565 CTAGS=$ac_cv_prog_CTAGS
3566 if test -n "$CTAGS"; then
3567   echo "$as_me:3567: result: $CTAGS" >&5
3568 echo "${ECHO_T}$CTAGS" >&6
3569 else
3570   echo "$as_me:3570: result: no" >&5
3571 echo "${ECHO_T}no" >&6
3572 fi
3573
3574   test -n "$CTAGS" && break
3575 done
3576
3577 for ac_prog in exetags etags
3578 do
3579   # Extract the first word of "$ac_prog", so it can be a program name with args.
3580 set dummy $ac_prog; ac_word=$2
3581 echo "$as_me:3581: checking for $ac_word" >&5
3582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3583 if test "${ac_cv_prog_ETAGS+set}" = set; then
3584   echo $ECHO_N "(cached) $ECHO_C" >&6
3585 else
3586   if test -n "$ETAGS"; then
3587   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3588 else
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   $as_executable_p "$ac_dir/$ac_word" || continue
3595 ac_cv_prog_ETAGS="$ac_prog"
3596 echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597 break
3598 done
3599
3600 fi
3601 fi
3602 ETAGS=$ac_cv_prog_ETAGS
3603 if test -n "$ETAGS"; then
3604   echo "$as_me:3604: result: $ETAGS" >&5
3605 echo "${ECHO_T}$ETAGS" >&6
3606 else
3607   echo "$as_me:3607: result: no" >&5
3608 echo "${ECHO_T}no" >&6
3609 fi
3610
3611   test -n "$ETAGS" && break
3612 done
3613
3614 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3615 set dummy ${CTAGS:-ctags}; ac_word=$2
3616 echo "$as_me:3616: checking for $ac_word" >&5
3617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3618 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3619   echo $ECHO_N "(cached) $ECHO_C" >&6
3620 else
3621   if test -n "$MAKE_LOWER_TAGS"; then
3622   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3623 else
3624   ac_save_IFS=$IFS; IFS=$ac_path_separator
3625 ac_dummy="$PATH"
3626 for ac_dir in $ac_dummy; do
3627   IFS=$ac_save_IFS
3628   test -z "$ac_dir" && ac_dir=.
3629   $as_executable_p "$ac_dir/$ac_word" || continue
3630 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3631 echo "$as_me:3631: found $ac_dir/$ac_word" >&5
3632 break
3633 done
3634
3635   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3636 fi
3637 fi
3638 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3639 if test -n "$MAKE_LOWER_TAGS"; then
3640   echo "$as_me:3640: result: $MAKE_LOWER_TAGS" >&5
3641 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3642 else
3643   echo "$as_me:3643: result: no" >&5
3644 echo "${ECHO_T}no" >&6
3645 fi
3646
3647 if test "$cf_cv_mixedcase" = yes ; then
3648         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3649 set dummy ${ETAGS:-etags}; ac_word=$2
3650 echo "$as_me:3650: checking for $ac_word" >&5
3651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3652 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3653   echo $ECHO_N "(cached) $ECHO_C" >&6
3654 else
3655   if test -n "$MAKE_UPPER_TAGS"; then
3656   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3657 else
3658   ac_save_IFS=$IFS; IFS=$ac_path_separator
3659 ac_dummy="$PATH"
3660 for ac_dir in $ac_dummy; do
3661   IFS=$ac_save_IFS
3662   test -z "$ac_dir" && ac_dir=.
3663   $as_executable_p "$ac_dir/$ac_word" || continue
3664 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3665 echo "$as_me:3665: found $ac_dir/$ac_word" >&5
3666 break
3667 done
3668
3669   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3670 fi
3671 fi
3672 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3673 if test -n "$MAKE_UPPER_TAGS"; then
3674   echo "$as_me:3674: result: $MAKE_UPPER_TAGS" >&5
3675 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3676 else
3677   echo "$as_me:3677: result: no" >&5
3678 echo "${ECHO_T}no" >&6
3679 fi
3680
3681 else
3682         MAKE_UPPER_TAGS=no
3683 fi
3684
3685 if test "$MAKE_UPPER_TAGS" = yes ; then
3686         MAKE_UPPER_TAGS=
3687 else
3688         MAKE_UPPER_TAGS="#"
3689 fi
3690
3691 if test "$MAKE_LOWER_TAGS" = yes ; then
3692         MAKE_LOWER_TAGS=
3693 else
3694         MAKE_LOWER_TAGS="#"
3695 fi
3696
3697 echo "$as_me:3697: checking for makeflags variable" >&5
3698 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3699 if test "${cf_cv_makeflags+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702
3703         cf_cv_makeflags=''
3704         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3705         do
3706                 cat >cf_makeflags.tmp <<CF_EOF
3707 SHELL = /bin/sh
3708 all :
3709         @ echo '.$cf_option'
3710 CF_EOF
3711                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
3712                 case "$cf_result" in
3713                 .*k|.*kw)
3714                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3715                         case "$cf_result" in
3716                         .*CC=*) cf_cv_makeflags=
3717                                 ;;
3718                         *)      cf_cv_makeflags=$cf_option
3719                                 ;;
3720                         esac
3721                         break
3722                         ;;
3723                 .-)     ;;
3724                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3725                         ;;
3726                 esac
3727         done
3728         rm -f cf_makeflags.tmp
3729
3730 fi
3731 echo "$as_me:3731: result: $cf_cv_makeflags" >&5
3732 echo "${ECHO_T}$cf_cv_makeflags" >&6
3733
3734 if test -n "$ac_tool_prefix"; then
3735   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3736 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3737 echo "$as_me:3737: checking for $ac_word" >&5
3738 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3739 if test "${ac_cv_prog_RANLIB+set}" = set; then
3740   echo $ECHO_N "(cached) $ECHO_C" >&6
3741 else
3742   if test -n "$RANLIB"; then
3743   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3744 else
3745   ac_save_IFS=$IFS; IFS=$ac_path_separator
3746 ac_dummy="$PATH"
3747 for ac_dir in $ac_dummy; do
3748   IFS=$ac_save_IFS
3749   test -z "$ac_dir" && ac_dir=.
3750   $as_executable_p "$ac_dir/$ac_word" || continue
3751 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3752 echo "$as_me:3752: found $ac_dir/$ac_word" >&5
3753 break
3754 done
3755
3756 fi
3757 fi
3758 RANLIB=$ac_cv_prog_RANLIB
3759 if test -n "$RANLIB"; then
3760   echo "$as_me:3760: result: $RANLIB" >&5
3761 echo "${ECHO_T}$RANLIB" >&6
3762 else
3763   echo "$as_me:3763: result: no" >&5
3764 echo "${ECHO_T}no" >&6
3765 fi
3766
3767 fi
3768 if test -z "$ac_cv_prog_RANLIB"; then
3769   ac_ct_RANLIB=$RANLIB
3770   # Extract the first word of "ranlib", so it can be a program name with args.
3771 set dummy ranlib; ac_word=$2
3772 echo "$as_me:3772: checking for $ac_word" >&5
3773 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3774 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3775   echo $ECHO_N "(cached) $ECHO_C" >&6
3776 else
3777   if test -n "$ac_ct_RANLIB"; then
3778   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3779 else
3780   ac_save_IFS=$IFS; IFS=$ac_path_separator
3781 ac_dummy="$PATH"
3782 for ac_dir in $ac_dummy; do
3783   IFS=$ac_save_IFS
3784   test -z "$ac_dir" && ac_dir=.
3785   $as_executable_p "$ac_dir/$ac_word" || continue
3786 ac_cv_prog_ac_ct_RANLIB="ranlib"
3787 echo "$as_me:3787: found $ac_dir/$ac_word" >&5
3788 break
3789 done
3790
3791   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3792 fi
3793 fi
3794 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3795 if test -n "$ac_ct_RANLIB"; then
3796   echo "$as_me:3796: result: $ac_ct_RANLIB" >&5
3797 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3798 else
3799   echo "$as_me:3799: result: no" >&5
3800 echo "${ECHO_T}no" >&6
3801 fi
3802
3803   RANLIB=$ac_ct_RANLIB
3804 else
3805   RANLIB="$ac_cv_prog_RANLIB"
3806 fi
3807
3808 if test -n "$ac_tool_prefix"; then
3809   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3810 set dummy ${ac_tool_prefix}ld; ac_word=$2
3811 echo "$as_me:3811: checking for $ac_word" >&5
3812 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3813 if test "${ac_cv_prog_LD+set}" = set; then
3814   echo $ECHO_N "(cached) $ECHO_C" >&6
3815 else
3816   if test -n "$LD"; then
3817   ac_cv_prog_LD="$LD" # Let the user override the test.
3818 else
3819   ac_save_IFS=$IFS; IFS=$ac_path_separator
3820 ac_dummy="$PATH"
3821 for ac_dir in $ac_dummy; do
3822   IFS=$ac_save_IFS
3823   test -z "$ac_dir" && ac_dir=.
3824   $as_executable_p "$ac_dir/$ac_word" || continue
3825 ac_cv_prog_LD="${ac_tool_prefix}ld"
3826 echo "$as_me:3826: found $ac_dir/$ac_word" >&5
3827 break
3828 done
3829
3830 fi
3831 fi
3832 LD=$ac_cv_prog_LD
3833 if test -n "$LD"; then
3834   echo "$as_me:3834: result: $LD" >&5
3835 echo "${ECHO_T}$LD" >&6
3836 else
3837   echo "$as_me:3837: result: no" >&5
3838 echo "${ECHO_T}no" >&6
3839 fi
3840
3841 fi
3842 if test -z "$ac_cv_prog_LD"; then
3843   ac_ct_LD=$LD
3844   # Extract the first word of "ld", so it can be a program name with args.
3845 set dummy ld; ac_word=$2
3846 echo "$as_me:3846: checking for $ac_word" >&5
3847 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3848 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3849   echo $ECHO_N "(cached) $ECHO_C" >&6
3850 else
3851   if test -n "$ac_ct_LD"; then
3852   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3853 else
3854   ac_save_IFS=$IFS; IFS=$ac_path_separator
3855 ac_dummy="$PATH"
3856 for ac_dir in $ac_dummy; do
3857   IFS=$ac_save_IFS
3858   test -z "$ac_dir" && ac_dir=.
3859   $as_executable_p "$ac_dir/$ac_word" || continue
3860 ac_cv_prog_ac_ct_LD="ld"
3861 echo "$as_me:3861: found $ac_dir/$ac_word" >&5
3862 break
3863 done
3864
3865   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3866 fi
3867 fi
3868 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3869 if test -n "$ac_ct_LD"; then
3870   echo "$as_me:3870: result: $ac_ct_LD" >&5
3871 echo "${ECHO_T}$ac_ct_LD" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   LD=$ac_ct_LD
3878 else
3879   LD="$ac_cv_prog_LD"
3880 fi
3881
3882 if test -n "$ac_tool_prefix"; then
3883   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3884 set dummy ${ac_tool_prefix}ar; ac_word=$2
3885 echo "$as_me:3885: checking for $ac_word" >&5
3886 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3887 if test "${ac_cv_prog_AR+set}" = set; then
3888   echo $ECHO_N "(cached) $ECHO_C" >&6
3889 else
3890   if test -n "$AR"; then
3891   ac_cv_prog_AR="$AR" # Let the user override the test.
3892 else
3893   ac_save_IFS=$IFS; IFS=$ac_path_separator
3894 ac_dummy="$PATH"
3895 for ac_dir in $ac_dummy; do
3896   IFS=$ac_save_IFS
3897   test -z "$ac_dir" && ac_dir=.
3898   $as_executable_p "$ac_dir/$ac_word" || continue
3899 ac_cv_prog_AR="${ac_tool_prefix}ar"
3900 echo "$as_me:3900: found $ac_dir/$ac_word" >&5
3901 break
3902 done
3903
3904 fi
3905 fi
3906 AR=$ac_cv_prog_AR
3907 if test -n "$AR"; then
3908   echo "$as_me:3908: result: $AR" >&5
3909 echo "${ECHO_T}$AR" >&6
3910 else
3911   echo "$as_me:3911: result: no" >&5
3912 echo "${ECHO_T}no" >&6
3913 fi
3914
3915 fi
3916 if test -z "$ac_cv_prog_AR"; then
3917   ac_ct_AR=$AR
3918   # Extract the first word of "ar", so it can be a program name with args.
3919 set dummy ar; ac_word=$2
3920 echo "$as_me:3920: checking for $ac_word" >&5
3921 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3922 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3923   echo $ECHO_N "(cached) $ECHO_C" >&6
3924 else
3925   if test -n "$ac_ct_AR"; then
3926   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3927 else
3928   ac_save_IFS=$IFS; IFS=$ac_path_separator
3929 ac_dummy="$PATH"
3930 for ac_dir in $ac_dummy; do
3931   IFS=$ac_save_IFS
3932   test -z "$ac_dir" && ac_dir=.
3933   $as_executable_p "$ac_dir/$ac_word" || continue
3934 ac_cv_prog_ac_ct_AR="ar"
3935 echo "$as_me:3935: found $ac_dir/$ac_word" >&5
3936 break
3937 done
3938
3939   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3940 fi
3941 fi
3942 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3943 if test -n "$ac_ct_AR"; then
3944   echo "$as_me:3944: result: $ac_ct_AR" >&5
3945 echo "${ECHO_T}$ac_ct_AR" >&6
3946 else
3947   echo "$as_me:3947: result: no" >&5
3948 echo "${ECHO_T}no" >&6
3949 fi
3950
3951   AR=$ac_ct_AR
3952 else
3953   AR="$ac_cv_prog_AR"
3954 fi
3955
3956 if test -n "$ac_tool_prefix"; then
3957   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
3958 set dummy ${ac_tool_prefix}nm; ac_word=$2
3959 echo "$as_me:3959: checking for $ac_word" >&5
3960 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3961 if test "${ac_cv_prog_NM+set}" = set; then
3962   echo $ECHO_N "(cached) $ECHO_C" >&6
3963 else
3964   if test -n "$NM"; then
3965   ac_cv_prog_NM="$NM" # Let the user override the test.
3966 else
3967   ac_save_IFS=$IFS; IFS=$ac_path_separator
3968 ac_dummy="$PATH"
3969 for ac_dir in $ac_dummy; do
3970   IFS=$ac_save_IFS
3971   test -z "$ac_dir" && ac_dir=.
3972   $as_executable_p "$ac_dir/$ac_word" || continue
3973 ac_cv_prog_NM="${ac_tool_prefix}nm"
3974 echo "$as_me:3974: found $ac_dir/$ac_word" >&5
3975 break
3976 done
3977
3978 fi
3979 fi
3980 NM=$ac_cv_prog_NM
3981 if test -n "$NM"; then
3982   echo "$as_me:3982: result: $NM" >&5
3983 echo "${ECHO_T}$NM" >&6
3984 else
3985   echo "$as_me:3985: result: no" >&5
3986 echo "${ECHO_T}no" >&6
3987 fi
3988
3989 fi
3990 if test -z "$ac_cv_prog_NM"; then
3991   ac_ct_NM=$NM
3992   # Extract the first word of "nm", so it can be a program name with args.
3993 set dummy nm; ac_word=$2
3994 echo "$as_me:3994: checking for $ac_word" >&5
3995 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3996 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
3997   echo $ECHO_N "(cached) $ECHO_C" >&6
3998 else
3999   if test -n "$ac_ct_NM"; then
4000   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4001 else
4002   ac_save_IFS=$IFS; IFS=$ac_path_separator
4003 ac_dummy="$PATH"
4004 for ac_dir in $ac_dummy; do
4005   IFS=$ac_save_IFS
4006   test -z "$ac_dir" && ac_dir=.
4007   $as_executable_p "$ac_dir/$ac_word" || continue
4008 ac_cv_prog_ac_ct_NM="nm"
4009 echo "$as_me:4009: found $ac_dir/$ac_word" >&5
4010 break
4011 done
4012
4013   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4014 fi
4015 fi
4016 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4017 if test -n "$ac_ct_NM"; then
4018   echo "$as_me:4018: result: $ac_ct_NM" >&5
4019 echo "${ECHO_T}$ac_ct_NM" >&6
4020 else
4021   echo "$as_me:4021: result: no" >&5
4022 echo "${ECHO_T}no" >&6
4023 fi
4024
4025   NM=$ac_ct_NM
4026 else
4027   NM="$ac_cv_prog_NM"
4028 fi
4029
4030 if test -n "$ac_tool_prefix"; then
4031   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4032 set dummy ${ac_tool_prefix}ar; ac_word=$2
4033 echo "$as_me:4033: checking for $ac_word" >&5
4034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4035 if test "${ac_cv_prog_AR+set}" = set; then
4036   echo $ECHO_N "(cached) $ECHO_C" >&6
4037 else
4038   if test -n "$AR"; then
4039   ac_cv_prog_AR="$AR" # Let the user override the test.
4040 else
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   $as_executable_p "$ac_dir/$ac_word" || continue
4047 ac_cv_prog_AR="${ac_tool_prefix}ar"
4048 echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049 break
4050 done
4051
4052 fi
4053 fi
4054 AR=$ac_cv_prog_AR
4055 if test -n "$AR"; then
4056   echo "$as_me:4056: result: $AR" >&5
4057 echo "${ECHO_T}$AR" >&6
4058 else
4059   echo "$as_me:4059: result: no" >&5
4060 echo "${ECHO_T}no" >&6
4061 fi
4062
4063 fi
4064 if test -z "$ac_cv_prog_AR"; then
4065   ac_ct_AR=$AR
4066   # Extract the first word of "ar", so it can be a program name with args.
4067 set dummy ar; ac_word=$2
4068 echo "$as_me:4068: checking for $ac_word" >&5
4069 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4070 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4071   echo $ECHO_N "(cached) $ECHO_C" >&6
4072 else
4073   if test -n "$ac_ct_AR"; then
4074   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4075 else
4076   ac_save_IFS=$IFS; IFS=$ac_path_separator
4077 ac_dummy="$PATH"
4078 for ac_dir in $ac_dummy; do
4079   IFS=$ac_save_IFS
4080   test -z "$ac_dir" && ac_dir=.
4081   $as_executable_p "$ac_dir/$ac_word" || continue
4082 ac_cv_prog_ac_ct_AR="ar"
4083 echo "$as_me:4083: found $ac_dir/$ac_word" >&5
4084 break
4085 done
4086
4087   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4088 fi
4089 fi
4090 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4091 if test -n "$ac_ct_AR"; then
4092   echo "$as_me:4092: result: $ac_ct_AR" >&5
4093 echo "${ECHO_T}$ac_ct_AR" >&6
4094 else
4095   echo "$as_me:4095: result: no" >&5
4096 echo "${ECHO_T}no" >&6
4097 fi
4098
4099   AR=$ac_ct_AR
4100 else
4101   AR="$ac_cv_prog_AR"
4102 fi
4103
4104 echo "$as_me:4104: checking for options to update archives" >&5
4105 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4106 if test "${cf_cv_ar_flags+set}" = set; then
4107   echo $ECHO_N "(cached) $ECHO_C" >&6
4108 else
4109
4110         cf_cv_ar_flags=unknown
4111         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4112         do
4113
4114                 # check if $ARFLAGS already contains this choice
4115                 if test "x$ARFLAGS" != "x" ; then
4116                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4117                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4118                                 cf_cv_ar_flags=
4119                                 break
4120                         fi
4121                 fi
4122
4123                 rm -f conftest.$ac_cv_objext
4124                 rm -f conftest.a
4125
4126                 cat >conftest.$ac_ext <<EOF
4127 #line 4127 "configure"
4128 int     testdata[3] = { 123, 456, 789 };
4129 EOF
4130                 if { (eval echo "$as_me:4130: \"$ac_compile\"") >&5
4131   (eval $ac_compile) 2>&5
4132   ac_status=$?
4133   echo "$as_me:4133: \$? = $ac_status" >&5
4134   (exit $ac_status); } ; then
4135                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4136                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4137                         if test -f conftest.a ; then
4138                                 cf_cv_ar_flags=$cf_ar_flags
4139                                 break
4140                         fi
4141                 else
4142                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4143
4144 echo "${as_me:-configure}:4144: testing cannot compile test-program ..." 1>&5
4145
4146                         break
4147                 fi
4148         done
4149         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4150
4151 fi
4152 echo "$as_me:4152: result: $cf_cv_ar_flags" >&5
4153 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4154
4155 if test -n "$ARFLAGS" ; then
4156         if test -n "$cf_cv_ar_flags" ; then
4157                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4158         fi
4159 else
4160         ARFLAGS=$cf_cv_ar_flags
4161 fi
4162
4163 echo "$as_me:4163: checking if you have specified an install-prefix" >&5
4164 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4165
4166 # Check whether --with-install-prefix or --without-install-prefix was given.
4167 if test "${with_install_prefix+set}" = set; then
4168   withval="$with_install_prefix"
4169   case "x$withval" in #(vi
4170         xyes|xno) #(vi
4171                 ;;
4172         *)      DESTDIR="$withval"
4173                 ;;
4174         esac
4175 fi;
4176 echo "$as_me:4176: result: $DESTDIR" >&5
4177 echo "${ECHO_T}$DESTDIR" >&6
4178
4179 ###############################################################################
4180
4181 # If we're cross-compiling, allow the user to override the tools and their
4182 # options.  The configure script is oriented toward identifying the host
4183 # compiler, etc., but we need a build compiler to generate parts of the source.
4184
4185 if test "$cross_compiling" = yes ; then
4186
4187         # defaults that we might want to override
4188         : ${BUILD_CFLAGS:=''}
4189         : ${BUILD_CPPFLAGS:=''}
4190         : ${BUILD_LDFLAGS:=''}
4191         : ${BUILD_LIBS:=''}
4192         : ${BUILD_EXEEXT:='$x'}
4193         : ${BUILD_OBJEXT:='o'}
4194
4195 # Check whether --with-build-cc or --without-build-cc was given.
4196 if test "${with_build_cc+set}" = set; then
4197   withval="$with_build_cc"
4198   BUILD_CC="$withval"
4199 else
4200   for ac_prog in gcc cc cl
4201 do
4202   # Extract the first word of "$ac_prog", so it can be a program name with args.
4203 set dummy $ac_prog; ac_word=$2
4204 echo "$as_me:4204: checking for $ac_word" >&5
4205 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4206 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4207   echo $ECHO_N "(cached) $ECHO_C" >&6
4208 else
4209   if test -n "$BUILD_CC"; then
4210   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4211 else
4212   ac_save_IFS=$IFS; IFS=$ac_path_separator
4213 ac_dummy="$PATH"
4214 for ac_dir in $ac_dummy; do
4215   IFS=$ac_save_IFS
4216   test -z "$ac_dir" && ac_dir=.
4217   $as_executable_p "$ac_dir/$ac_word" || continue
4218 ac_cv_prog_BUILD_CC="$ac_prog"
4219 echo "$as_me:4219: found $ac_dir/$ac_word" >&5
4220 break
4221 done
4222
4223 fi
4224 fi
4225 BUILD_CC=$ac_cv_prog_BUILD_CC
4226 if test -n "$BUILD_CC"; then
4227   echo "$as_me:4227: result: $BUILD_CC" >&5
4228 echo "${ECHO_T}$BUILD_CC" >&6
4229 else
4230   echo "$as_me:4230: result: no" >&5
4231 echo "${ECHO_T}no" >&6
4232 fi
4233
4234   test -n "$BUILD_CC" && break
4235 done
4236
4237 fi;
4238         echo "$as_me:4238: checking for native build C compiler" >&5
4239 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4240         echo "$as_me:4240: result: $BUILD_CC" >&5
4241 echo "${ECHO_T}$BUILD_CC" >&6
4242
4243         echo "$as_me:4243: checking for native build C preprocessor" >&5
4244 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4245
4246 # Check whether --with-build-cpp or --without-build-cpp was given.
4247 if test "${with_build_cpp+set}" = set; then
4248   withval="$with_build_cpp"
4249   BUILD_CPP="$withval"
4250 else
4251   BUILD_CPP='${BUILD_CC} -E'
4252 fi;
4253         echo "$as_me:4253: result: $BUILD_CPP" >&5
4254 echo "${ECHO_T}$BUILD_CPP" >&6
4255
4256         echo "$as_me:4256: checking for native build C flags" >&5
4257 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4258
4259 # Check whether --with-build-cflags or --without-build-cflags was given.
4260 if test "${with_build_cflags+set}" = set; then
4261   withval="$with_build_cflags"
4262   BUILD_CFLAGS="$withval"
4263 fi;
4264         echo "$as_me:4264: result: $BUILD_CFLAGS" >&5
4265 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4266
4267         echo "$as_me:4267: checking for native build C preprocessor-flags" >&5
4268 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4269
4270 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4271 if test "${with_build_cppflags+set}" = set; then
4272   withval="$with_build_cppflags"
4273   BUILD_CPPFLAGS="$withval"
4274 fi;
4275         echo "$as_me:4275: result: $BUILD_CPPFLAGS" >&5
4276 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4277
4278         echo "$as_me:4278: checking for native build linker-flags" >&5
4279 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4280
4281 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4282 if test "${with_build_ldflags+set}" = set; then
4283   withval="$with_build_ldflags"
4284   BUILD_LDFLAGS="$withval"
4285 fi;
4286         echo "$as_me:4286: result: $BUILD_LDFLAGS" >&5
4287 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4288
4289         echo "$as_me:4289: checking for native build linker-libraries" >&5
4290 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4291
4292 # Check whether --with-build-libs or --without-build-libs was given.
4293 if test "${with_build_libs+set}" = set; then
4294   withval="$with_build_libs"
4295   BUILD_LIBS="$withval"
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_LIBS" >&5
4298 echo "${ECHO_T}$BUILD_LIBS" >&6
4299
4300         # this assumes we're on Unix.
4301         BUILD_EXEEXT=
4302         BUILD_OBJEXT=o
4303
4304         : ${BUILD_CC:='${CC}'}
4305
4306         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4307                 { { echo "$as_me:4307: error: Cross-build requires two compilers.
4308 Use --with-build-cc to specify the native compiler." >&5
4309 echo "$as_me: error: Cross-build requires two compilers.
4310 Use --with-build-cc to specify the native compiler." >&2;}
4311    { (exit 1); exit 1; }; }
4312         fi
4313
4314 else
4315         : ${BUILD_CC:='${CC}'}
4316         : ${BUILD_CPP:='${CPP}'}
4317         : ${BUILD_CFLAGS:='${CFLAGS}'}
4318         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4319         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4320         : ${BUILD_LIBS:='${LIBS}'}
4321         : ${BUILD_EXEEXT:='$x'}
4322         : ${BUILD_OBJEXT:='o'}
4323 fi
4324
4325 ###############################################################################
4326
4327 ### Options to allow the user to specify the set of libraries which are used.
4328 ### Use "--without-normal --with-shared" to allow the default model to be
4329 ### shared, for example.
4330 cf_list_models=""
4331
4332 echo "$as_me:4332: checking if libtool -version-number should be used" >&5
4333 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4334
4335 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4336 if test "${enable_libtool_version+set}" = set; then
4337   enableval="$enable_libtool_version"
4338   test "$enableval" != no && enableval=yes
4339   if test "$enableval" != "yes" ; then
4340     cf_libtool_version=no
4341   else
4342     cf_libtool_version=yes
4343   fi
4344 else
4345   enableval=yes
4346   cf_libtool_version=yes
4347
4348 fi;
4349 echo "$as_me:4349: result: $cf_libtool_version" >&5
4350 echo "${ECHO_T}$cf_libtool_version" >&6
4351
4352 if test "$cf_libtool_version" = yes ; then
4353         LIBTOOL_VERSION="-version-number"
4354 else
4355         LIBTOOL_VERSION="-version-info"
4356 fi
4357
4358 LIBTOOL=
4359
4360 # common library maintenance symbols that are convenient for libtool scripts:
4361 LIB_CREATE='${AR} -cr'
4362 LIB_OBJECT='${OBJECTS}'
4363 LIB_SUFFIX=.a
4364 LIB_PREP="$RANLIB"
4365
4366 # symbols used to prop libtool up to enable it to determine what it should be
4367 # doing:
4368 LIB_CLEAN=
4369 LIB_COMPILE=
4370 LIB_LINK='${CC}'
4371 LIB_INSTALL=
4372 LIB_UNINSTALL=
4373
4374 echo "$as_me:4374: checking if you want to build libraries with libtool" >&5
4375 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4376
4377 # Check whether --with-libtool or --without-libtool was given.
4378 if test "${with_libtool+set}" = set; then
4379   withval="$with_libtool"
4380   with_libtool=$withval
4381 else
4382   with_libtool=no
4383 fi;
4384 echo "$as_me:4384: result: $with_libtool" >&5
4385 echo "${ECHO_T}$with_libtool" >&6
4386 if test "$with_libtool" != "no"; then
4387
4388         if test "$with_libtool" != "yes" ; then
4389
4390 if test "x$prefix" != xNONE; then
4391   cf_path_syntax="$prefix"
4392 else
4393   cf_path_syntax="$ac_default_prefix"
4394 fi
4395
4396 case ".$with_libtool" in #(vi
4397 .\$\(*\)*|.\'*\'*) #(vi
4398   ;;
4399 ..|./*|.\\*) #(vi
4400   ;;
4401 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4402   ;;
4403 .\${*prefix}*|.\${*dir}*) #(vi
4404   eval with_libtool="$with_libtool"
4405   case ".$with_libtool" in #(vi
4406   .NONE/*)
4407     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4408     ;;
4409   esac
4410   ;; #(vi
4411 .no|.NONE/*)
4412   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4413   ;;
4414 *)
4415   { { echo "$as_me:4415: error: expected a pathname, not \"$with_libtool\"" >&5
4416 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4417    { (exit 1); exit 1; }; }
4418   ;;
4419 esac
4420
4421                 LIBTOOL=$with_libtool
4422         else
4423                 if test -n "$ac_tool_prefix"; then
4424   for ac_prog in libtool glibtool
4425   do
4426     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4427 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4428 echo "$as_me:4428: checking for $ac_word" >&5
4429 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4430 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4431   echo $ECHO_N "(cached) $ECHO_C" >&6
4432 else
4433   if test -n "$LIBTOOL"; then
4434   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4435 else
4436   ac_save_IFS=$IFS; IFS=$ac_path_separator
4437 ac_dummy="$PATH"
4438 for ac_dir in $ac_dummy; do
4439   IFS=$ac_save_IFS
4440   test -z "$ac_dir" && ac_dir=.
4441   $as_executable_p "$ac_dir/$ac_word" || continue
4442 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4443 echo "$as_me:4443: found $ac_dir/$ac_word" >&5
4444 break
4445 done
4446
4447 fi
4448 fi
4449 LIBTOOL=$ac_cv_prog_LIBTOOL
4450 if test -n "$LIBTOOL"; then
4451   echo "$as_me:4451: result: $LIBTOOL" >&5
4452 echo "${ECHO_T}$LIBTOOL" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458     test -n "$LIBTOOL" && break
4459   done
4460 fi
4461 if test -z "$LIBTOOL"; then
4462   ac_ct_LIBTOOL=$LIBTOOL
4463   for ac_prog in libtool glibtool
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$ac_ct_LIBTOOL"; then
4473   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4489 if test -n "$ac_ct_LIBTOOL"; then
4490   echo "$as_me:4490: result: $ac_ct_LIBTOOL" >&5
4491 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$ac_ct_LIBTOOL" && break
4498 done
4499 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4500
4501   LIBTOOL=$ac_ct_LIBTOOL
4502 fi
4503
4504 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4505 then
4506         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.].*//'`
4507 else
4508         cf_cv_libtool_version=
4509 fi
4510 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4511
4512                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
4513                 then
4514
4515 unset ac_cv_prog_ac_ct_LIBTOOL
4516 unset ac_ct_LIBTOOL
4517 unset LIBTOOL
4518
4519                         if test -n "$ac_tool_prefix"; then
4520   for ac_prog in glibtool
4521   do
4522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4524 echo "$as_me:4524: checking for $ac_word" >&5
4525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4526 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
4527   echo $ECHO_N "(cached) $ECHO_C" >&6
4528 else
4529   if test -n "$LIBTOOL"; then
4530   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
4531 else
4532   ac_save_IFS=$IFS; IFS=$ac_path_separator
4533 ac_dummy="$PATH"
4534 for ac_dir in $ac_dummy; do
4535   IFS=$ac_save_IFS
4536   test -z "$ac_dir" && ac_dir=.
4537   $as_executable_p "$ac_dir/$ac_word" || continue
4538 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
4539 echo "$as_me:4539: found $ac_dir/$ac_word" >&5
4540 break
4541 done
4542
4543 fi
4544 fi
4545 LIBTOOL=$ac_cv_prog_LIBTOOL
4546 if test -n "$LIBTOOL"; then
4547   echo "$as_me:4547: result: $LIBTOOL" >&5
4548 echo "${ECHO_T}$LIBTOOL" >&6
4549 else
4550   echo "$as_me:4550: result: no" >&5
4551 echo "${ECHO_T}no" >&6
4552 fi
4553
4554     test -n "$LIBTOOL" && break
4555   done
4556 fi
4557 if test -z "$LIBTOOL"; then
4558   ac_ct_LIBTOOL=$LIBTOOL
4559   for ac_prog in glibtool
4560 do
4561   # Extract the first word of "$ac_prog", so it can be a program name with args.
4562 set dummy $ac_prog; ac_word=$2
4563 echo "$as_me:4563: checking for $ac_word" >&5
4564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4565 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
4566   echo $ECHO_N "(cached) $ECHO_C" >&6
4567 else
4568   if test -n "$ac_ct_LIBTOOL"; then
4569   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
4570 else
4571   ac_save_IFS=$IFS; IFS=$ac_path_separator
4572 ac_dummy="$PATH"
4573 for ac_dir in $ac_dummy; do
4574   IFS=$ac_save_IFS
4575   test -z "$ac_dir" && ac_dir=.
4576   $as_executable_p "$ac_dir/$ac_word" || continue
4577 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
4578 echo "$as_me:4578: found $ac_dir/$ac_word" >&5
4579 break
4580 done
4581
4582 fi
4583 fi
4584 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
4585 if test -n "$ac_ct_LIBTOOL"; then
4586   echo "$as_me:4586: result: $ac_ct_LIBTOOL" >&5
4587 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
4588 else
4589   echo "$as_me:4589: result: no" >&5
4590 echo "${ECHO_T}no" >&6
4591 fi
4592
4593   test -n "$ac_ct_LIBTOOL" && break
4594 done
4595 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
4596
4597   LIBTOOL=$ac_ct_LIBTOOL
4598 fi
4599
4600 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4601 then
4602         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.].*//'`
4603 else
4604         cf_cv_libtool_version=
4605 fi
4606 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4607
4608                 fi
4609         fi
4610         if test -z "$LIBTOOL" ; then
4611                 { { echo "$as_me:4611: error: Cannot find libtool" >&5
4612 echo "$as_me: error: Cannot find libtool" >&2;}
4613    { (exit 1); exit 1; }; }
4614         fi
4615         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4616         LIB_OBJECT='${OBJECTS:.o=.lo}'
4617         LIB_SUFFIX=.la
4618         LIB_CLEAN='${LIBTOOL} --mode=clean'
4619         LIB_COMPILE='${LIBTOOL} --mode=compile'
4620         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4621         LIB_INSTALL='${LIBTOOL} --mode=install'
4622         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4623         LIB_PREP=:
4624
4625 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4626 then
4627         echo "$as_me:4627: checking version of $LIBTOOL" >&5
4628 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
4629
4630 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
4631 then
4632         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.].*//'`
4633 else
4634         cf_cv_libtool_version=
4635 fi
4636 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
4637
4638         echo "$as_me:4638: result: $cf_cv_libtool_version" >&5
4639 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4640         if test -z "$cf_cv_libtool_version" ; then
4641                 { { echo "$as_me:4641: error: This is not GNU libtool" >&5
4642 echo "$as_me: error: This is not GNU libtool" >&2;}
4643    { (exit 1); exit 1; }; }
4644         fi
4645 else
4646         { { echo "$as_me:4646: error: GNU libtool has not been found" >&5
4647 echo "$as_me: error: GNU libtool has not been found" >&2;}
4648    { (exit 1); exit 1; }; }
4649 fi
4650
4651         # special hack to add -no-undefined (which libtool should do for itself)
4652         LT_UNDEF=
4653         case "$cf_cv_system_name" in #(vi
4654         cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
4655                 LT_UNDEF=-no-undefined
4656                 ;;
4657         esac
4658
4659         # special hack to add --tag option for C++ compiler
4660         case $cf_cv_libtool_version in #(vi
4661         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4662                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4663                 LIBTOOL="$LIBTOOL --tag=CC"
4664                 ;;
4665         *)
4666                 LIBTOOL_CXX="$LIBTOOL"
4667                 ;;
4668         esac
4669 else
4670         LIBTOOL=""
4671         LIBTOOL_CXX=""
4672 fi
4673
4674 test -z "$LIBTOOL" && ECHO_LT=
4675
4676 if test "$with_libtool" != "no" ; then
4677
4678 cf_list_models="$cf_list_models libtool"
4679
4680 else
4681
4682 echo "$as_me:4682: checking if you want to build shared libraries" >&5
4683 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4684
4685 # Check whether --with-shared or --without-shared was given.
4686 if test "${with_shared+set}" = set; then
4687   withval="$with_shared"
4688   with_shared=$withval
4689 else
4690   with_shared=no
4691 fi;
4692 echo "$as_me:4692: result: $with_shared" >&5
4693 echo "${ECHO_T}$with_shared" >&6
4694 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
4695
4696 echo "$as_me:4696: checking if you want to build static libraries" >&5
4697 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4698
4699 # Check whether --with-normal or --without-normal was given.
4700 if test "${with_normal+set}" = set; then
4701   withval="$with_normal"
4702   with_normal=$withval
4703 else
4704   with_normal=yes
4705 fi;
4706 echo "$as_me:4706: result: $with_normal" >&5
4707 echo "${ECHO_T}$with_normal" >&6
4708 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
4709
4710 echo "$as_me:4710: checking if you want to build debug libraries" >&5
4711 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4712
4713 # Check whether --with-debug or --without-debug was given.
4714 if test "${with_debug+set}" = set; then
4715   withval="$with_debug"
4716   with_debug=$withval
4717 else
4718   with_debug=yes
4719 fi;
4720 echo "$as_me:4720: result: $with_debug" >&5
4721 echo "${ECHO_T}$with_debug" >&6
4722 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
4723
4724 echo "$as_me:4724: checking if you want to build profiling libraries" >&5
4725 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4726
4727 # Check whether --with-profile or --without-profile was given.
4728 if test "${with_profile+set}" = set; then
4729   withval="$with_profile"
4730   with_profile=$withval
4731 else
4732   with_profile=no
4733 fi;
4734 echo "$as_me:4734: result: $with_profile" >&5
4735 echo "${ECHO_T}$with_profile" >&6
4736 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
4737
4738 fi
4739
4740 if test "X$cf_with_cxx_binding" != Xno; then
4741 if test "x$with_shared" = "xyes"; then
4742 echo "$as_me:4742: checking if you want to build C++ shared libraries" >&5
4743 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
4744
4745 # Check whether --with-cxx-shared or --without-cxx-shared was given.
4746 if test "${with_cxx_shared+set}" = set; then
4747   withval="$with_cxx_shared"
4748   with_shared_cxx=$withval
4749 else
4750   with_shared_cxx=no
4751 fi;
4752 echo "$as_me:4752: result: $with_shared_cxx" >&5
4753 echo "${ECHO_T}$with_shared_cxx" >&6
4754 fi
4755 fi
4756
4757 ###############################################################################
4758
4759 echo "$as_me:4759: checking for specified models" >&5
4760 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4761 test -z "$cf_list_models" && cf_list_models=normal
4762 test "$with_libtool" != "no" && cf_list_models=libtool
4763 echo "$as_me:4763: result: $cf_list_models" >&5
4764 echo "${ECHO_T}$cf_list_models" >&6
4765
4766 ### Use the first model as the default, and save its suffix for use in building
4767 ### up test-applications.
4768 echo "$as_me:4768: checking for default model" >&5
4769 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4770 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4771 echo "$as_me:4771: result: $DFT_LWR_MODEL" >&5
4772 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4773
4774 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4775
4776 TICS_NAME=tic
4777
4778 TINFO_NAME=tinfo
4779
4780 LIB_NAME=ncurses
4781
4782 LIB_DIR=../lib
4783 LIB_2ND=../../lib
4784
4785 echo "$as_me:4785: checking if you want to have a library-prefix" >&5
4786 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
4787
4788 # Check whether --with-lib-prefix or --without-lib-prefix was given.
4789 if test "${with_lib_prefix+set}" = set; then
4790   withval="$with_lib_prefix"
4791   with_lib_prefix=$withval
4792 else
4793   with_lib_prefix=auto
4794 fi;
4795 echo "$as_me:4795: result: $with_lib_prefix" >&5
4796 echo "${ECHO_T}$with_lib_prefix" >&6
4797
4798 if test $with_lib_prefix = auto
4799 then
4800
4801         case $cf_cv_system_name in #(vi
4802         OS/2*|os2*) #(vi
4803         LIB_PREFIX=''
4804         ;;
4805         *)      LIB_PREFIX='lib'
4806         ;;
4807         esac
4808 cf_prefix=$LIB_PREFIX
4809
4810 elif test $with_lib_prefix = no
4811 then
4812         LIB_PREFIX=
4813 else
4814         LIB_PREFIX=$with_lib_prefix
4815 fi
4816
4817 LIB_SUFFIX=
4818
4819         echo "$as_me:4819: checking for PATH separator" >&5
4820 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
4821         case $cf_cv_system_name in
4822         os2*)   PATH_SEPARATOR=';'  ;;
4823         *)      ${PATH_SEPARATOR:=':'}  ;;
4824         esac
4825
4826         echo "$as_me:4826: result: $PATH_SEPARATOR" >&5
4827 echo "${ECHO_T}$PATH_SEPARATOR" >&6
4828
4829 ###############################################################################
4830
4831 echo "$as_me:4831: checking if you want to build a separate terminfo library" >&5
4832 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4833
4834 # Check whether --with-termlib or --without-termlib was given.
4835 if test "${with_termlib+set}" = set; then
4836   withval="$with_termlib"
4837   with_termlib=$withval
4838 else
4839   with_termlib=no
4840 fi;
4841 echo "$as_me:4841: result: $with_termlib" >&5
4842 echo "${ECHO_T}$with_termlib" >&6
4843
4844 echo "$as_me:4844: checking if you want to build a separate tic library" >&5
4845 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4846
4847 # Check whether --with-ticlib or --without-ticlib was given.
4848 if test "${with_ticlib+set}" = set; then
4849   withval="$with_ticlib"
4850   with_ticlib=$withval
4851 else
4852   with_ticlib=no
4853 fi;
4854 echo "$as_me:4854: result: $with_ticlib" >&5
4855 echo "${ECHO_T}$with_ticlib" >&6
4856
4857 ### Checks for special libraries, must be done up-front.
4858 SHLIB_LIST=""
4859
4860 echo "$as_me:4860: checking if you want to link with the GPM mouse library" >&5
4861 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4862
4863 # Check whether --with-gpm or --without-gpm was given.
4864 if test "${with_gpm+set}" = set; then
4865   withval="$with_gpm"
4866   with_gpm=$withval
4867 else
4868   with_gpm=maybe
4869 fi;
4870 echo "$as_me:4870: result: $with_gpm" >&5
4871 echo "${ECHO_T}$with_gpm" >&6
4872
4873 if test "$with_gpm" != no ; then
4874         echo "$as_me:4874: checking for gpm.h" >&5
4875 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4876 if test "${ac_cv_header_gpm_h+set}" = set; then
4877   echo $ECHO_N "(cached) $ECHO_C" >&6
4878 else
4879   cat >conftest.$ac_ext <<_ACEOF
4880 #line 4880 "configure"
4881 #include "confdefs.h"
4882 #include <gpm.h>
4883 _ACEOF
4884 if { (eval echo "$as_me:4884: \"$ac_cpp conftest.$ac_ext\"") >&5
4885   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4886   ac_status=$?
4887   egrep -v '^ *\+' conftest.er1 >conftest.err
4888   rm -f conftest.er1
4889   cat conftest.err >&5
4890   echo "$as_me:4890: \$? = $ac_status" >&5
4891   (exit $ac_status); } >/dev/null; then
4892   if test -s conftest.err; then
4893     ac_cpp_err=$ac_c_preproc_warn_flag
4894   else
4895     ac_cpp_err=
4896   fi
4897 else
4898   ac_cpp_err=yes
4899 fi
4900 if test -z "$ac_cpp_err"; then
4901   ac_cv_header_gpm_h=yes
4902 else
4903   echo "$as_me: failed program was:" >&5
4904   cat conftest.$ac_ext >&5
4905   ac_cv_header_gpm_h=no
4906 fi
4907 rm -f conftest.err conftest.$ac_ext
4908 fi
4909 echo "$as_me:4909: result: $ac_cv_header_gpm_h" >&5
4910 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4911 if test $ac_cv_header_gpm_h = yes; then
4912
4913 cat >>confdefs.h <<\EOF
4914 #define HAVE_GPM_H 1
4915 EOF
4916
4917                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4918                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4919
4920 echo "${as_me:-configure}:4920: testing assuming we really have GPM library ..." 1>&5
4921
4922 cat >>confdefs.h <<\EOF
4923 #define HAVE_LIBGPM 1
4924 EOF
4925
4926                 else
4927                         echo "$as_me:4927: checking for Gpm_Open in -lgpm" >&5
4928 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4929 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   ac_check_lib_save_LIBS=$LIBS
4933 LIBS="-lgpm  $LIBS"
4934 cat >conftest.$ac_ext <<_ACEOF
4935 #line 4935 "configure"
4936 #include "confdefs.h"
4937
4938 /* Override any gcc2 internal prototype to avoid an error.  */
4939 #ifdef __cplusplus
4940 extern "C"
4941 #endif
4942 /* We use char because int might match the return type of a gcc2
4943    builtin and then its argument prototype would still apply.  */
4944 char Gpm_Open ();
4945 int
4946 main ()
4947 {
4948 Gpm_Open ();
4949   ;
4950   return 0;
4951 }
4952 _ACEOF
4953 rm -f conftest.$ac_objext conftest$ac_exeext
4954 if { (eval echo "$as_me:4954: \"$ac_link\"") >&5
4955   (eval $ac_link) 2>&5
4956   ac_status=$?
4957   echo "$as_me:4957: \$? = $ac_status" >&5
4958   (exit $ac_status); } &&
4959          { ac_try='test -s conftest$ac_exeext'
4960   { (eval echo "$as_me:4960: \"$ac_try\"") >&5
4961   (eval $ac_try) 2>&5
4962   ac_status=$?
4963   echo "$as_me:4963: \$? = $ac_status" >&5
4964   (exit $ac_status); }; }; then
4965   ac_cv_lib_gpm_Gpm_Open=yes
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969 ac_cv_lib_gpm_Gpm_Open=no
4970 fi
4971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4972 LIBS=$ac_check_lib_save_LIBS
4973 fi
4974 echo "$as_me:4974: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4975 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4976 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4977   :
4978 else
4979
4980                                 { { echo "$as_me:4980: error: Cannot link with GPM library" >&5
4981 echo "$as_me: error: Cannot link with GPM library" >&2;}
4982    { (exit 1); exit 1; }; }
4983                 fi
4984                 with_gpm=yes
4985
4986 fi
4987
4988 else
4989
4990                 test "$with_gpm" != maybe && { echo "$as_me:4990: WARNING: Cannot find GPM header" >&5
4991 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4992                 with_gpm=no
4993
4994 fi
4995
4996 fi
4997
4998 if test "$with_gpm" != no ; then
4999         echo "$as_me:4999: checking if you want to load GPM dynamically" >&5
5000 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5001
5002 # Check whether --with-dlsym or --without-dlsym was given.
5003 if test "${with_dlsym+set}" = set; then
5004   withval="$with_dlsym"
5005   with_dlsym=$withval
5006 else
5007   with_dlsym=yes
5008 fi;
5009         echo "$as_me:5009: result: $with_dlsym" >&5
5010 echo "${ECHO_T}$with_dlsym" >&6
5011         if test "x$with_dlsym" = xyes ; then
5012
5013 cf_have_dlsym=no
5014 echo "$as_me:5014: checking for dlsym" >&5
5015 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5016 if test "${ac_cv_func_dlsym+set}" = set; then
5017   echo $ECHO_N "(cached) $ECHO_C" >&6
5018 else
5019   cat >conftest.$ac_ext <<_ACEOF
5020 #line 5020 "configure"
5021 #include "confdefs.h"
5022 /* System header to define __stub macros and hopefully few prototypes,
5023     which can conflict with char dlsym (); below.  */
5024 #include <assert.h>
5025 /* Override any gcc2 internal prototype to avoid an error.  */
5026 #ifdef __cplusplus
5027 extern "C"
5028 #endif
5029 /* We use char because int might match the return type of a gcc2
5030    builtin and then its argument prototype would still apply.  */
5031 char dlsym ();
5032 char (*f) ();
5033
5034 int
5035 main ()
5036 {
5037 /* The GNU C library defines this for functions which it implements
5038     to always fail with ENOSYS.  Some functions are actually named
5039     something starting with __ and the normal name is an alias.  */
5040 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5041 choke me
5042 #else
5043 f = dlsym; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
5044 #endif
5045
5046   ;
5047   return 0;
5048 }
5049 _ACEOF
5050 rm -f conftest.$ac_objext conftest$ac_exeext
5051 if { (eval echo "$as_me:5051: \"$ac_link\"") >&5
5052   (eval $ac_link) 2>&5
5053   ac_status=$?
5054   echo "$as_me:5054: \$? = $ac_status" >&5
5055   (exit $ac_status); } &&
5056          { ac_try='test -s conftest$ac_exeext'
5057   { (eval echo "$as_me:5057: \"$ac_try\"") >&5
5058   (eval $ac_try) 2>&5
5059   ac_status=$?
5060   echo "$as_me:5060: \$? = $ac_status" >&5
5061   (exit $ac_status); }; }; then
5062   ac_cv_func_dlsym=yes
5063 else
5064   echo "$as_me: failed program was:" >&5
5065 cat conftest.$ac_ext >&5
5066 ac_cv_func_dlsym=no
5067 fi
5068 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5069 fi
5070 echo "$as_me:5070: result: $ac_cv_func_dlsym" >&5
5071 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5072 if test $ac_cv_func_dlsym = yes; then
5073   cf_have_dlsym=yes
5074 else
5075
5076 cf_have_libdl=no
5077 echo "$as_me:5077: checking for dlsym in -ldl" >&5
5078 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5079 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   ac_check_lib_save_LIBS=$LIBS
5083 LIBS="-ldl  $LIBS"
5084 cat >conftest.$ac_ext <<_ACEOF
5085 #line 5085 "configure"
5086 #include "confdefs.h"
5087
5088 /* Override any gcc2 internal prototype to avoid an error.  */
5089 #ifdef __cplusplus
5090 extern "C"
5091 #endif
5092 /* We use char because int might match the return type of a gcc2
5093    builtin and then its argument prototype would still apply.  */
5094 char dlsym ();
5095 int
5096 main ()
5097 {
5098 dlsym ();
5099   ;
5100   return 0;
5101 }
5102 _ACEOF
5103 rm -f conftest.$ac_objext conftest$ac_exeext
5104 if { (eval echo "$as_me:5104: \"$ac_link\"") >&5
5105   (eval $ac_link) 2>&5
5106   ac_status=$?
5107   echo "$as_me:5107: \$? = $ac_status" >&5
5108   (exit $ac_status); } &&
5109          { ac_try='test -s conftest$ac_exeext'
5110   { (eval echo "$as_me:5110: \"$ac_try\"") >&5
5111   (eval $ac_try) 2>&5
5112   ac_status=$?
5113   echo "$as_me:5113: \$? = $ac_status" >&5
5114   (exit $ac_status); }; }; then
5115   ac_cv_lib_dl_dlsym=yes
5116 else
5117   echo "$as_me: failed program was:" >&5
5118 cat conftest.$ac_ext >&5
5119 ac_cv_lib_dl_dlsym=no
5120 fi
5121 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5122 LIBS=$ac_check_lib_save_LIBS
5123 fi
5124 echo "$as_me:5124: result: $ac_cv_lib_dl_dlsym" >&5
5125 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5126 if test $ac_cv_lib_dl_dlsym = yes; then
5127
5128         cf_have_dlsym=yes
5129         cf_have_libdl=yes
5130 fi
5131
5132 fi
5133
5134 if test "$cf_have_dlsym" = yes ; then
5135         test "$cf_have_libdl" = yes &&
5136 cf_add_libs="-ldl"
5137 # Filter out duplicates - this happens with badly-designed ".pc" files...
5138 for cf_add_1lib in $LIBS
5139 do
5140         for cf_add_2lib in $cf_add_libs
5141         do
5142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5143                 then
5144                         cf_add_1lib=
5145                         break
5146                 fi
5147         done
5148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5149 done
5150 LIBS="$cf_add_libs"
5151
5152         echo "$as_me:5152: checking whether able to link to dl*() functions" >&5
5153 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5154         cat >conftest.$ac_ext <<_ACEOF
5155 #line 5155 "configure"
5156 #include "confdefs.h"
5157 #include <dlfcn.h>
5158 int
5159 main ()
5160 {
5161
5162                 void *obj;
5163                 if ((obj = dlopen("filename", 0)) != 0) {
5164                         if (dlsym(obj, "symbolname") == 0) {
5165                         dlclose(obj);
5166                         }
5167                 }
5168   ;
5169   return 0;
5170 }
5171 _ACEOF
5172 rm -f conftest.$ac_objext conftest$ac_exeext
5173 if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
5174   (eval $ac_link) 2>&5
5175   ac_status=$?
5176   echo "$as_me:5176: \$? = $ac_status" >&5
5177   (exit $ac_status); } &&
5178          { ac_try='test -s conftest$ac_exeext'
5179   { (eval echo "$as_me:5179: \"$ac_try\"") >&5
5180   (eval $ac_try) 2>&5
5181   ac_status=$?
5182   echo "$as_me:5182: \$? = $ac_status" >&5
5183   (exit $ac_status); }; }; then
5184
5185 cat >>confdefs.h <<\EOF
5186 #define HAVE_LIBDL 1
5187 EOF
5188
5189 else
5190   echo "$as_me: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192
5193                 { { echo "$as_me:5193: error: Cannot link test program for libdl" >&5
5194 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5195    { (exit 1); exit 1; }; }
5196 fi
5197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5198         echo "$as_me:5198: result: ok" >&5
5199 echo "${ECHO_T}ok" >&6
5200 else
5201         { { echo "$as_me:5201: error: Cannot find dlsym function" >&5
5202 echo "$as_me: error: Cannot find dlsym function" >&2;}
5203    { (exit 1); exit 1; }; }
5204 fi
5205
5206                 if test "x$with_gpm" != xyes ; then
5207                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5208
5209 echo "${as_me:-configure}:5209: testing assuming soname for gpm is $with_gpm ..." 1>&5
5210
5211                         cf_cv_gpm_soname="$with_gpm"
5212                 else
5213
5214 echo "$as_me:5214: checking for soname of gpm library" >&5
5215 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5216 if test "${cf_cv_gpm_soname+set}" = set; then
5217   echo $ECHO_N "(cached) $ECHO_C" >&6
5218 else
5219
5220 cf_cv_gpm_soname=unknown
5221 if test "$cross_compiling" != yes ; then
5222 cat >conftest.$ac_ext <<CF_EOF
5223 #include <gpm.h>
5224 int main()
5225 {
5226 if (Gpm_Open(0,0)) Gpm_Close();
5227         ${cf_cv_main_return:-return}(0);
5228 }
5229 CF_EOF
5230 cf_save_LIBS="$LIBS"
5231
5232 cf_add_libs="-lgpm"
5233 # Filter out duplicates - this happens with badly-designed ".pc" files...
5234 for cf_add_1lib in $LIBS
5235 do
5236         for cf_add_2lib in $cf_add_libs
5237         do
5238                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5239                 then
5240                         cf_add_1lib=
5241                         break
5242                 fi
5243         done
5244         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5245 done
5246 LIBS="$cf_add_libs"
5247
5248         if { (eval echo "$as_me:5248: \"$ac_compile\"") >&5
5249   (eval $ac_compile) 2>&5
5250   ac_status=$?
5251   echo "$as_me:5251: \$? = $ac_status" >&5
5252   (exit $ac_status); } ; then
5253                 if { (eval echo "$as_me:5253: \"$ac_link\"") >&5
5254   (eval $ac_link) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); } ; then
5258                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5259                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5260                 fi
5261         fi
5262 rm -rf conftest*
5263 LIBS="$cf_save_LIBS"
5264 fi
5265
5266 fi
5267 echo "$as_me:5267: result: $cf_cv_gpm_soname" >&5
5268 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5269
5270                 fi
5271                 test "$cf_cv_gpm_soname" != "unknown" &&
5272 cat >>confdefs.h <<EOF
5273 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5274 EOF
5275
5276                 SHLIB_LIST="-ldl $SHLIB_LIST"
5277         else
5278                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5279
5280 cf_add_libs="-lgpm"
5281 # Filter out duplicates - this happens with badly-designed ".pc" files...
5282 for cf_add_1lib in $TEST_LIBS
5283 do
5284         for cf_add_2lib in $cf_add_libs
5285         do
5286                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5287                 then
5288                         cf_add_1lib=
5289                         break
5290                 fi
5291         done
5292         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5293 done
5294 TEST_LIBS="$cf_add_libs"
5295
5296         fi
5297
5298 cat >>confdefs.h <<\EOF
5299 #define HAVE_LIBGPM 1
5300 EOF
5301
5302 echo "$as_me:5302: checking for Gpm_Wgetch in -lgpm" >&5
5303 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5304 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5305   echo $ECHO_N "(cached) $ECHO_C" >&6
5306 else
5307   ac_check_lib_save_LIBS=$LIBS
5308 LIBS="-lgpm  $LIBS"
5309 cat >conftest.$ac_ext <<_ACEOF
5310 #line 5310 "configure"
5311 #include "confdefs.h"
5312
5313 /* Override any gcc2 internal prototype to avoid an error.  */
5314 #ifdef __cplusplus
5315 extern "C"
5316 #endif
5317 /* We use char because int might match the return type of a gcc2
5318    builtin and then its argument prototype would still apply.  */
5319 char Gpm_Wgetch ();
5320 int
5321 main ()
5322 {
5323 Gpm_Wgetch ();
5324   ;
5325   return 0;
5326 }
5327 _ACEOF
5328 rm -f conftest.$ac_objext conftest$ac_exeext
5329 if { (eval echo "$as_me:5329: \"$ac_link\"") >&5
5330   (eval $ac_link) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); } &&
5334          { ac_try='test -s conftest$ac_exeext'
5335   { (eval echo "$as_me:5335: \"$ac_try\"") >&5
5336   (eval $ac_try) 2>&5
5337   ac_status=$?
5338   echo "$as_me:5338: \$? = $ac_status" >&5
5339   (exit $ac_status); }; }; then
5340   ac_cv_lib_gpm_Gpm_Wgetch=yes
5341 else
5342   echo "$as_me: failed program was:" >&5
5343 cat conftest.$ac_ext >&5
5344 ac_cv_lib_gpm_Gpm_Wgetch=no
5345 fi
5346 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5347 LIBS=$ac_check_lib_save_LIBS
5348 fi
5349 echo "$as_me:5349: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5350 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5351 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5352
5353 echo "$as_me:5353: checking if GPM is weakly bound to curses library" >&5
5354 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5355 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5356   echo $ECHO_N "(cached) $ECHO_C" >&6
5357 else
5358
5359 cf_cv_check_gpm_wgetch=unknown
5360 if test "$cross_compiling" != yes ; then
5361
5362 cat >conftest.$ac_ext <<CF_EOF
5363 #include <gpm.h>
5364 int main()
5365 {
5366         Gpm_Wgetch();
5367         ${cf_cv_main_return:-return}(0);
5368 }
5369 CF_EOF
5370
5371         cf_save_LIBS="$LIBS"
5372         # This only works if we can look at the symbol table.  If a shared
5373         # library is stripped for install, we cannot use that.  So we're forced
5374         # to rely on the static library, noting that some packagers may not
5375         # include it.
5376         LIBS="-static -lgpm -dynamic $LIBS"
5377         if { (eval echo "$as_me:5377: \"$ac_compile\"") >&5
5378   (eval $ac_compile) 2>&5
5379   ac_status=$?
5380   echo "$as_me:5380: \$? = $ac_status" >&5
5381   (exit $ac_status); } ; then
5382                 if { (eval echo "$as_me:5382: \"$ac_link\"") >&5
5383   (eval $ac_link) 2>&5
5384   ac_status=$?
5385   echo "$as_me:5385: \$? = $ac_status" >&5
5386   (exit $ac_status); } ; then
5387                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5388                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5389                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5390                 fi
5391         fi
5392         rm -rf conftest*
5393         LIBS="$cf_save_LIBS"
5394 fi
5395
5396 fi
5397 echo "$as_me:5397: result: $cf_cv_check_gpm_wgetch" >&5
5398 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5399
5400 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5401         { echo "$as_me:5401: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5402 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5403 fi
5404
5405 fi
5406
5407 fi
5408
5409 # not everyone has "test -c"
5410 if test -c /dev/sysmouse 2>/dev/null ; then
5411 echo "$as_me:5411: checking if you want to use sysmouse" >&5
5412 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5413
5414 # Check whether --with-sysmouse or --without-sysmouse was given.
5415 if test "${with_sysmouse+set}" = set; then
5416   withval="$with_sysmouse"
5417   cf_with_sysmouse=$withval
5418 else
5419   cf_with_sysmouse=maybe
5420 fi;
5421         if test "$cf_with_sysmouse" != no ; then
5422         cat >conftest.$ac_ext <<_ACEOF
5423 #line 5423 "configure"
5424 #include "confdefs.h"
5425
5426 #include <osreldate.h>
5427 #if (__FreeBSD_version >= 400017)
5428 #include <sys/consio.h>
5429 #include <sys/fbio.h>
5430 #else
5431 #include <machine/console.h>
5432 #endif
5433
5434 int
5435 main ()
5436 {
5437
5438         struct mouse_info the_mouse;
5439         ioctl(0, CONS_MOUSECTL, &the_mouse);
5440
5441   ;
5442   return 0;
5443 }
5444 _ACEOF
5445 rm -f conftest.$ac_objext
5446 if { (eval echo "$as_me:5446: \"$ac_compile\"") >&5
5447   (eval $ac_compile) 2>&5
5448   ac_status=$?
5449   echo "$as_me:5449: \$? = $ac_status" >&5
5450   (exit $ac_status); } &&
5451          { ac_try='test -s conftest.$ac_objext'
5452   { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453   (eval $ac_try) 2>&5
5454   ac_status=$?
5455   echo "$as_me:5455: \$? = $ac_status" >&5
5456   (exit $ac_status); }; }; then
5457   cf_with_sysmouse=yes
5458 else
5459   echo "$as_me: failed program was:" >&5
5460 cat conftest.$ac_ext >&5
5461 cf_with_sysmouse=no
5462 fi
5463 rm -f conftest.$ac_objext conftest.$ac_ext
5464         fi
5465 echo "$as_me:5465: result: $cf_with_sysmouse" >&5
5466 echo "${ECHO_T}$cf_with_sysmouse" >&6
5467 test "$cf_with_sysmouse" = yes &&
5468 cat >>confdefs.h <<\EOF
5469 #define USE_SYSMOUSE 1
5470 EOF
5471
5472 fi
5473
5474 if test X"$CC_G_OPT" = X"" ; then
5475         CC_G_OPT='-g'
5476         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5477 fi
5478
5479 if test X"$CXX_G_OPT" = X"" ; then
5480         CXX_G_OPT='-g'
5481         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5482 fi
5483
5484 echo "$as_me:5484: checking for default loader flags" >&5
5485 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5486 case $DFT_LWR_MODEL in
5487 libtool) LD_MODEL=''   ;;
5488 normal)  LD_MODEL=''   ;;
5489 debug)   LD_MODEL=$CC_G_OPT ;;
5490 profile) LD_MODEL='-pg';;
5491 shared)  LD_MODEL=''   ;;
5492 esac
5493 echo "$as_me:5493: result: $LD_MODEL" >&5
5494 echo "${ECHO_T}$LD_MODEL" >&6
5495
5496 case $DFT_LWR_MODEL in
5497 shared)
5498
5499 echo "$as_me:5499: checking if rpath option should be used" >&5
5500 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5501
5502 # Check whether --enable-rpath or --disable-rpath was given.
5503 if test "${enable_rpath+set}" = set; then
5504   enableval="$enable_rpath"
5505   cf_cv_enable_rpath=$enableval
5506 else
5507   cf_cv_enable_rpath=no
5508 fi;
5509 echo "$as_me:5509: result: $cf_cv_enable_rpath" >&5
5510 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5511
5512 echo "$as_me:5512: checking if shared libraries should be relinked during install" >&5
5513 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5514
5515 # Check whether --enable-relink or --disable-relink was given.
5516 if test "${enable_relink+set}" = set; then
5517   enableval="$enable_relink"
5518   cf_cv_do_relink=$enableval
5519 else
5520   cf_cv_do_relink=yes
5521 fi;
5522 echo "$as_me:5522: result: $cf_cv_do_relink" >&5
5523 echo "${ECHO_T}$cf_cv_do_relink" >&6
5524         ;;
5525 esac
5526
5527 # we will build libraries one-level down.
5528 rel_builddir=..
5529
5530 LD_RPATH_OPT=
5531 echo "$as_me:5531: checking for an rpath option" >&5
5532 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5533 case $cf_cv_system_name in #(vi
5534 irix*) #(vi
5535         if test "$GCC" = yes; then
5536                 LD_RPATH_OPT="-Wl,-rpath,"
5537         else
5538                 LD_RPATH_OPT="-rpath "
5539         fi
5540         ;;
5541 linux*|gnu*|k*bsd*-gnu) #(vi
5542         LD_RPATH_OPT="-Wl,-rpath,"
5543         ;;
5544 openbsd[2-9].*|mirbsd*) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 dragonfly*|freebsd*) #(vi
5548         LD_RPATH_OPT="-rpath "
5549         ;;
5550 netbsd*) #(vi
5551         LD_RPATH_OPT="-Wl,-rpath,"
5552         ;;
5553 osf*|mls+*) #(vi
5554         LD_RPATH_OPT="-rpath "
5555         ;;
5556 solaris2*) #(vi
5557         LD_RPATH_OPT="-R"
5558         ;;
5559 *)
5560         ;;
5561 esac
5562 echo "$as_me:5562: result: $LD_RPATH_OPT" >&5
5563 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5564
5565 case "x$LD_RPATH_OPT" in #(vi
5566 x-R*)
5567         echo "$as_me:5567: checking if we need a space after rpath option" >&5
5568 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5569         cf_save_LIBS="$LIBS"
5570
5571 cf_add_libs="${LD_RPATH_OPT}$libdir"
5572 # Filter out duplicates - this happens with badly-designed ".pc" files...
5573 for cf_add_1lib in $LIBS
5574 do
5575         for cf_add_2lib in $cf_add_libs
5576         do
5577                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
5578                 then
5579                         cf_add_1lib=
5580                         break
5581                 fi
5582         done
5583         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5584 done
5585 LIBS="$cf_add_libs"
5586
5587         cat >conftest.$ac_ext <<_ACEOF
5588 #line 5588 "configure"
5589 #include "confdefs.h"
5590
5591 int
5592 main ()
5593 {
5594
5595   ;
5596   return 0;
5597 }
5598 _ACEOF
5599 rm -f conftest.$ac_objext conftest$ac_exeext
5600 if { (eval echo "$as_me:5600: \"$ac_link\"") >&5
5601   (eval $ac_link) 2>&5
5602   ac_status=$?
5603   echo "$as_me:5603: \$? = $ac_status" >&5
5604   (exit $ac_status); } &&
5605          { ac_try='test -s conftest$ac_exeext'
5606   { (eval echo "$as_me:5606: \"$ac_try\"") >&5
5607   (eval $ac_try) 2>&5
5608   ac_status=$?
5609   echo "$as_me:5609: \$? = $ac_status" >&5
5610   (exit $ac_status); }; }; then
5611   cf_rpath_space=no
5612 else
5613   echo "$as_me: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
5615 cf_rpath_space=yes
5616 fi
5617 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5618         LIBS="$cf_save_LIBS"
5619         echo "$as_me:5619: result: $cf_rpath_space" >&5
5620 echo "${ECHO_T}$cf_rpath_space" >&6
5621         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5622         ;;
5623 esac
5624
5625         RM_SHARED_OPTS=
5626         LOCAL_LDFLAGS=
5627         LOCAL_LDFLAGS2=
5628         LD_SHARED_OPTS=
5629         INSTALL_LIB="-m 644"
5630         : ${rel_builddir:=.}
5631
5632         shlibdir=$libdir
5633
5634         MAKE_DLLS="#"
5635
5636         cf_cv_do_symlinks=no
5637         cf_ld_rpath_opt=
5638         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5639
5640         echo "$as_me:5640: checking if release/abi version should be used for shared libs" >&5
5641 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5642
5643 # Check whether --with-shlib-version or --without-shlib-version was given.
5644 if test "${with_shlib_version+set}" = set; then
5645   withval="$with_shlib_version"
5646   test -z "$withval" && withval=auto
5647         case $withval in #(vi
5648         yes) #(vi
5649                 cf_cv_shlib_version=auto
5650                 ;;
5651         rel|abi|auto|no) #(vi
5652                 cf_cv_shlib_version=$withval
5653                 ;;
5654         *)
5655                 { { echo "$as_me:5655: error: option value must be one of: rel, abi, auto or no" >&5
5656 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5657    { (exit 1); exit 1; }; }
5658                 ;;
5659         esac
5660
5661 else
5662   cf_cv_shlib_version=auto
5663 fi;
5664         echo "$as_me:5664: result: $cf_cv_shlib_version" >&5
5665 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5666
5667         cf_cv_rm_so_locs=no
5668         cf_try_cflags=
5669
5670         # Some less-capable ports of gcc support only -fpic
5671         CC_SHARED_OPTS=
5672         if test "$GCC" = yes
5673         then
5674                 echo "$as_me:5674: checking which $CC option to use" >&5
5675 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5676                 cf_save_CFLAGS="$CFLAGS"
5677                 for CC_SHARED_OPTS in -fPIC -fpic ''
5678                 do
5679                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5680                         cat >conftest.$ac_ext <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5683 #include <stdio.h>
5684 int
5685 main ()
5686 {
5687 int x = 1
5688   ;
5689   return 0;
5690 }
5691 _ACEOF
5692 rm -f conftest.$ac_objext
5693 if { (eval echo "$as_me:5693: \"$ac_compile\"") >&5
5694   (eval $ac_compile) 2>&5
5695   ac_status=$?
5696   echo "$as_me:5696: \$? = $ac_status" >&5
5697   (exit $ac_status); } &&
5698          { ac_try='test -s conftest.$ac_objext'
5699   { (eval echo "$as_me:5699: \"$ac_try\"") >&5
5700   (eval $ac_try) 2>&5
5701   ac_status=$?
5702   echo "$as_me:5702: \$? = $ac_status" >&5
5703   (exit $ac_status); }; }; then
5704   break
5705 else
5706   echo "$as_me: failed program was:" >&5
5707 cat conftest.$ac_ext >&5
5708 fi
5709 rm -f conftest.$ac_objext conftest.$ac_ext
5710                 done
5711                 echo "$as_me:5711: result: $CC_SHARED_OPTS" >&5
5712 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5713                 CFLAGS="$cf_save_CFLAGS"
5714         fi
5715
5716         cf_cv_shlib_version_infix=no
5717
5718         case $cf_cv_system_name in #(vi
5719         aix4.3-9*|aix[5-7]*) #(vi
5720                 if test "$GCC" = yes; then
5721                         CC_SHARED_OPTS=
5722                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5723                 else
5724                         # CC_SHARED_OPTS='-qpic=large -G'
5725                         # perhaps "-bM:SRE -bnoentry -bexpall"
5726                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5727                 fi
5728                 ;;
5729         beos*) #(vi
5730                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5731                 ;;
5732         cygwin*) #(vi
5733                 CC_SHARED_OPTS=
5734                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5735                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5736                 cf_cv_shlib_version=cygdll
5737                 cf_cv_shlib_version_infix=cygdll
5738                 shlibdir=$bindir
5739                 MAKE_DLLS=
5740                 cat >mk_shared_lib.sh <<-CF_EOF
5741                 #!/bin/sh
5742                 SHARED_LIB=\$1
5743                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5744                 shift
5745                 cat <<-EOF
5746                 Linking shared library
5747                 ** SHARED_LIB \$SHARED_LIB
5748                 ** IMPORT_LIB \$IMPORT_LIB
5749 EOF
5750                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5751 CF_EOF
5752                 chmod +x mk_shared_lib.sh
5753                 ;;
5754         msys*) #(vi
5755                 CC_SHARED_OPTS=
5756                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5757                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5758                 cf_cv_shlib_version=msysdll
5759                 cf_cv_shlib_version_infix=msysdll
5760                 shlibdir=$bindir
5761                 MAKE_DLLS=
5762                 cat >mk_shared_lib.sh <<-CF_EOF
5763                 #!/bin/sh
5764                 SHARED_LIB=\$1
5765                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5766                 shift
5767                 cat <<-EOF
5768                 Linking shared library
5769                 ** SHARED_LIB \$SHARED_LIB
5770                 ** IMPORT_LIB \$IMPORT_LIB
5771 EOF
5772                 exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5773 CF_EOF
5774                 chmod +x mk_shared_lib.sh
5775                 ;;
5776         darwin*) #(vi
5777                 cf_try_cflags="no-cpp-precomp"
5778                 CC_SHARED_OPTS="-dynamic"
5779                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5780                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5781                 cf_cv_shlib_version_infix=yes
5782                 echo "$as_me:5782: checking if ld -search_paths_first works" >&5
5783 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5784 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5785   echo $ECHO_N "(cached) $ECHO_C" >&6
5786 else
5787
5788                         cf_save_LDFLAGS=$LDFLAGS
5789                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5790                         cat >conftest.$ac_ext <<_ACEOF
5791 #line 5791 "configure"
5792 #include "confdefs.h"
5793
5794 int
5795 main ()
5796 {
5797 int i;
5798   ;
5799   return 0;
5800 }
5801 _ACEOF
5802 rm -f conftest.$ac_objext conftest$ac_exeext
5803 if { (eval echo "$as_me:5803: \"$ac_link\"") >&5
5804   (eval $ac_link) 2>&5
5805   ac_status=$?
5806   echo "$as_me:5806: \$? = $ac_status" >&5
5807   (exit $ac_status); } &&
5808          { ac_try='test -s conftest$ac_exeext'
5809   { (eval echo "$as_me:5809: \"$ac_try\"") >&5
5810   (eval $ac_try) 2>&5
5811   ac_status=$?
5812   echo "$as_me:5812: \$? = $ac_status" >&5
5813   (exit $ac_status); }; }; then
5814   cf_cv_ldflags_search_paths_first=yes
5815 else
5816   echo "$as_me: failed program was:" >&5
5817 cat conftest.$ac_ext >&5
5818 cf_cv_ldflags_search_paths_first=no
5819 fi
5820 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5821                                 LDFLAGS=$cf_save_LDFLAGS
5822 fi
5823 echo "$as_me:5823: result: $cf_cv_ldflags_search_paths_first" >&5
5824 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5825                 if test $cf_cv_ldflags_search_paths_first = yes; then
5826                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5827                 fi
5828                 ;;
5829         hpux[7-8]*) #(vi
5830                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
5831                 if test "$GCC" != yes; then
5832                         CC_SHARED_OPTS='+Z'
5833                 fi
5834                 MK_SHARED_LIB='${LD} -b -o $@'
5835                 INSTALL_LIB="-m 555"
5836                 ;;
5837         hpux*) #(vi
5838                 # (tested with gcc 2.7.2 -- I don't have c89)
5839                 if test "$GCC" = yes; then
5840                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5841                 else
5842                         CC_SHARED_OPTS='+Z'
5843                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5844                 fi
5845                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5846                 # HP-UX shared libraries must be executable, and should be
5847                 # readonly to exploit a quirk in the memory manager.
5848                 INSTALL_LIB="-m 555"
5849                 ;;
5850         interix*)
5851                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5852                 if test "$cf_cv_shlib_version" = rel; then
5853                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5854                 else
5855                         cf_shared_soname='`basename `'
5856                 fi
5857                 CC_SHARED_OPTS=
5858                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5859                 ;;
5860         irix*) #(vi
5861                 if test "$cf_cv_enable_rpath" = yes ; then
5862                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5863                 fi
5864                 # tested with IRIX 5.2 and 'cc'.
5865                 if test "$GCC" != yes; then
5866                         CC_SHARED_OPTS='-KPIC'
5867                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5868                 else
5869                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5870                 fi
5871                 cf_cv_rm_so_locs=yes
5872                 ;;
5873         linux*|gnu*|k*bsd*-gnu) #(vi
5874                 if test "$DFT_LWR_MODEL" = "shared" ; then
5875                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5876                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5877                 fi
5878                 if test "$cf_cv_enable_rpath" = yes ; then
5879                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5880                 fi
5881
5882         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5883         if test "$cf_cv_shlib_version" = rel; then
5884                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5885         else
5886                 cf_cv_shared_soname='`basename $@`'
5887         fi
5888
5889                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5890                 ;;
5891         mingw*) #(vi
5892                 cf_cv_shlib_version=mingw
5893                 cf_cv_shlib_version_infix=mingw
5894                 shlibdir=$bindir
5895                 MAKE_DLLS=
5896                 if test "$DFT_LWR_MODEL" = "shared" ; then
5897                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
5898                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5899                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
5900                 fi
5901                 CC_SHARED_OPTS=
5902                 MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5903                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
5904                 cat >mk_shared_lib.sh <<-CF_EOF
5905                 #!/bin/sh
5906                 SHARED_LIB=\$1
5907                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
5908                 shift
5909                 cat <<-EOF
5910                 Linking shared library
5911                 ** SHARED_LIB \$SHARED_LIB
5912                 ** IMPORT_LIB \$IMPORT_LIB
5913 EOF
5914                 exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
5915 CF_EOF
5916                 chmod +x mk_shared_lib.sh
5917                 ;;
5918         openbsd[2-9].*|mirbsd*) #(vi
5919                 if test "$DFT_LWR_MODEL" = "shared" ; then
5920                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5921                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5922                 fi
5923                 if test "$cf_cv_enable_rpath" = yes ; then
5924                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5925                 fi
5926                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5927
5928         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5929         if test "$cf_cv_shlib_version" = rel; then
5930                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5931         else
5932                 cf_cv_shared_soname='`basename $@`'
5933         fi
5934
5935                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5936                 ;;
5937         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5938                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5939                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5940                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5941                 ;;
5942         dragonfly*|freebsd*) #(vi
5943                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5944                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5945                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5946                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5947                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5948                 fi
5949
5950         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5951         if test "$cf_cv_shlib_version" = rel; then
5952                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5953         else
5954                 cf_cv_shared_soname='`basename $@`'
5955         fi
5956
5957                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5958                 ;;
5959         netbsd*) #(vi
5960                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5961                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5962                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5963                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5964                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5965                         if test "$cf_cv_shlib_version" = auto; then
5966                         if test -f /usr/libexec/ld.elf_so; then
5967                                 cf_cv_shlib_version=abi
5968                         else
5969                                 cf_cv_shlib_version=rel
5970                         fi
5971                         fi
5972
5973         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5974         if test "$cf_cv_shlib_version" = rel; then
5975                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5976         else
5977                 cf_cv_shared_soname='`basename $@`'
5978         fi
5979
5980                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5981                 else
5982                         MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
5983                 fi
5984                 ;;
5985         osf*|mls+*) #(vi
5986                 # tested with OSF/1 V3.2 and 'cc'
5987                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5988                 # link with shared libs).
5989                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5990                 case $host_os in #(vi
5991                 osf4*)
5992                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5993                         ;;
5994                 esac
5995                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5996                 if test "$DFT_LWR_MODEL" = "shared" ; then
5997                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5998                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5999                 fi
6000                 cf_cv_rm_so_locs=yes
6001                 ;;
6002         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
6003                 # tested with osr5.0.5
6004                 if test "$GCC" != yes; then
6005                         CC_SHARED_OPTS='-belf -KPIC'
6006                 fi
6007                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6008                 if test "$cf_cv_enable_rpath" = yes ; then
6009                         # only way is to set LD_RUN_PATH but no switch for it
6010                         RUN_PATH=$libdir
6011                 fi
6012                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6013                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6014                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6015                 ;;
6016         sunos4*) #(vi
6017                 # tested with SunOS 4.1.1 and gcc 2.7.0
6018                 if test "$GCC" != yes; then
6019                         CC_SHARED_OPTS='-KPIC'
6020                 fi
6021                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
6022                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6023                 ;;
6024         solaris2*) #(vi
6025                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6026                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6027                 if test "$DFT_LWR_MODEL" = "shared" ; then
6028                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6029                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6030                 fi
6031                 if test "$cf_cv_enable_rpath" = yes ; then
6032                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6033                 fi
6034
6035         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6036         if test "$cf_cv_shlib_version" = rel; then
6037                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6038         else
6039                 cf_cv_shared_soname='`basename $@`'
6040         fi
6041
6042                 if test "$GCC" != yes; then
6043                         cf_save_CFLAGS="$CFLAGS"
6044                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6045                         do
6046                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6047                                 cat >conftest.$ac_ext <<_ACEOF
6048 #line 6048 "configure"
6049 #include "confdefs.h"
6050 #include <stdio.h>
6051 int
6052 main ()
6053 {
6054 printf("Hello\n");
6055   ;
6056   return 0;
6057 }
6058 _ACEOF
6059 rm -f conftest.$ac_objext
6060 if { (eval echo "$as_me:6060: \"$ac_compile\"") >&5
6061   (eval $ac_compile) 2>&5
6062   ac_status=$?
6063   echo "$as_me:6063: \$? = $ac_status" >&5
6064   (exit $ac_status); } &&
6065          { ac_try='test -s conftest.$ac_objext'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit $ac_status); }; }; then
6071   break
6072 else
6073   echo "$as_me: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 fi
6076 rm -f conftest.$ac_objext conftest.$ac_ext
6077                         done
6078                         CFLAGS="$cf_save_CFLAGS"
6079                         CC_SHARED_OPTS=$cf_shared_opts
6080                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6081                 else
6082                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6083                 fi
6084                 ;;
6085         sysv5uw7*|unix_sv*) #(vi
6086                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6087                 if test "$GCC" != yes; then
6088                         CC_SHARED_OPTS='-KPIC'
6089                 fi
6090                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6091                 ;;
6092         *)
6093                 CC_SHARED_OPTS='unknown'
6094                 MK_SHARED_LIB='echo unknown'
6095                 ;;
6096         esac
6097
6098         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6099         case "$cf_cv_shlib_version" in #(vi
6100         rel|abi)
6101                 case "$MK_SHARED_LIB" in #(vi
6102                 *'-o $@') #(vi
6103                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6104                         ;;
6105                 *)
6106                         { echo "$as_me:6106: WARNING: ignored --with-shlib-version" >&5
6107 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6108                         ;;
6109                 esac
6110                 ;;
6111         esac
6112
6113         if test -n "$cf_try_cflags"
6114         then
6115 cat > conftest.$ac_ext <<EOF
6116 #line 6116 "${as_me:-configure}"
6117 #include <stdio.h>
6118 int main(int argc, char *argv[])
6119 {
6120         printf("hello\n");
6121         return (argv[argc-1] == 0) ;
6122 }
6123 EOF
6124                 cf_save_CFLAGS="$CFLAGS"
6125                 for cf_opt in $cf_try_cflags
6126                 do
6127                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6128                         echo "$as_me:6128: checking if CFLAGS option -$cf_opt works" >&5
6129 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6130                         if { (eval echo "$as_me:6130: \"$ac_compile\"") >&5
6131   (eval $ac_compile) 2>&5
6132   ac_status=$?
6133   echo "$as_me:6133: \$? = $ac_status" >&5
6134   (exit $ac_status); }; then
6135                                 echo "$as_me:6135: result: yes" >&5
6136 echo "${ECHO_T}yes" >&6
6137                                 cf_save_CFLAGS="$CFLAGS"
6138                         else
6139                                 echo "$as_me:6139: result: no" >&5
6140 echo "${ECHO_T}no" >&6
6141                         fi
6142                 done
6143                 CFLAGS="$cf_save_CFLAGS"
6144         fi
6145
6146         # RPATH_LIST is a colon-separated list of directories
6147         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6148         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6149
6150         test $cf_cv_rm_so_locs = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6151
6152         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6153
6154 echo "${as_me:-configure}:6154: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6155
6156         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6157
6158 echo "${as_me:-configure}:6158: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6159
6160 if test "$CC_SHARED_OPTS" = "unknown"; then
6161         for model in $cf_list_models; do
6162                 if test "$model" = "shared"; then
6163                         { { echo "$as_me:6163: error: Shared libraries are not supported in this version" >&5
6164 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6165    { (exit 1); exit 1; }; }
6166                 fi
6167         done
6168 fi
6169
6170 # pretend that ncurses==ncursesw==ncursest
6171 echo "$as_me:6171: checking if you want to disable library suffixes" >&5
6172 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
6173
6174 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
6175 if test "${enable_lib_suffixes+set}" = set; then
6176   enableval="$enable_lib_suffixes"
6177   disable_lib_suffixes=$enableval
6178 else
6179   disable_lib_suffixes=no
6180 fi;
6181 echo "$as_me:6181: result: $disable_lib_suffixes" >&5
6182 echo "${ECHO_T}$disable_lib_suffixes" >&6
6183
6184 ### If we're building with rpath, try to link non-standard libs that way too.
6185 if test "$DFT_LWR_MODEL" = "shared"; then
6186
6187 echo "$as_me:6187: checking if rpath-hack should be disabled" >&5
6188 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6189
6190 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6191 if test "${enable_rpath_hack+set}" = set; then
6192   enableval="$enable_rpath_hack"
6193   test "$enableval" != no && enableval=yes
6194   if test "$enableval" != "yes" ; then
6195     cf_disable_rpath_hack=yes
6196   else
6197     cf_disable_rpath_hack=no
6198   fi
6199 else
6200   enableval=yes
6201   cf_disable_rpath_hack=no
6202
6203 fi;
6204 echo "$as_me:6204: result: $cf_disable_rpath_hack" >&5
6205 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6206 if test "$cf_disable_rpath_hack" = no ; then
6207
6208 echo "$as_me:6208: checking for updated LDFLAGS" >&5
6209 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6210 if test -n "$LD_RPATH_OPT" ; then
6211         echo "$as_me:6211: result: maybe" >&5
6212 echo "${ECHO_T}maybe" >&6
6213
6214         for ac_prog in ldd
6215 do
6216   # Extract the first word of "$ac_prog", so it can be a program name with args.
6217 set dummy $ac_prog; ac_word=$2
6218 echo "$as_me:6218: checking for $ac_word" >&5
6219 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6220 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6221   echo $ECHO_N "(cached) $ECHO_C" >&6
6222 else
6223   if test -n "$cf_ldd_prog"; then
6224   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6225 else
6226   ac_save_IFS=$IFS; IFS=$ac_path_separator
6227 ac_dummy="$PATH"
6228 for ac_dir in $ac_dummy; do
6229   IFS=$ac_save_IFS
6230   test -z "$ac_dir" && ac_dir=.
6231   $as_executable_p "$ac_dir/$ac_word" || continue
6232 ac_cv_prog_cf_ldd_prog="$ac_prog"
6233 echo "$as_me:6233: found $ac_dir/$ac_word" >&5
6234 break
6235 done
6236
6237 fi
6238 fi
6239 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6240 if test -n "$cf_ldd_prog"; then
6241   echo "$as_me:6241: result: $cf_ldd_prog" >&5
6242 echo "${ECHO_T}$cf_ldd_prog" >&6
6243 else
6244   echo "$as_me:6244: result: no" >&5
6245 echo "${ECHO_T}no" >&6
6246 fi
6247
6248   test -n "$cf_ldd_prog" && break
6249 done
6250 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6251
6252         cf_rpath_list="/usr/lib /lib"
6253         if test "$cf_ldd_prog" != no
6254         then
6255                 cf_rpath_oops=
6256
6257 cat >conftest.$ac_ext <<_ACEOF
6258 #line 6258 "configure"
6259 #include "confdefs.h"
6260 #include <stdio.h>
6261 int
6262 main ()
6263 {
6264 printf("Hello");
6265   ;
6266   return 0;
6267 }
6268 _ACEOF
6269 rm -f conftest.$ac_objext conftest$ac_exeext
6270 if { (eval echo "$as_me:6270: \"$ac_link\"") >&5
6271   (eval $ac_link) 2>&5
6272   ac_status=$?
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit $ac_status); } &&
6275          { ac_try='test -s conftest$ac_exeext'
6276   { (eval echo "$as_me:6276: \"$ac_try\"") >&5
6277   (eval $ac_try) 2>&5
6278   ac_status=$?
6279   echo "$as_me:6279: \$? = $ac_status" >&5
6280   (exit $ac_status); }; }; then
6281   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
6282                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
6283 else
6284   echo "$as_me: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6286 fi
6287 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6288
6289                 # If we passed the link-test, but get a "not found" on a given library,
6290                 # this could be due to inept reconfiguration of gcc to make it only
6291                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6292                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6293                 # /usr/local libraries.
6294                 if test -n "$cf_rpath_oops"
6295                 then
6296                         for cf_rpath_src in $cf_rpath_oops
6297                         do
6298                                 for cf_rpath_dir in \
6299                                         /usr/local \
6300                                         /usr/pkg \
6301                                         /opt/sfw
6302                                 do
6303                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6304                                         then
6305                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6306
6307 echo "${as_me:-configure}:6307: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6308
6309                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6310                                                 break
6311                                         fi
6312                                 done
6313                         done
6314                 fi
6315         fi
6316
6317         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6318
6319 echo "${as_me:-configure}:6319: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6320
6321 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6322
6323 echo "${as_me:-configure}:6323: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6324
6325 cf_rpath_dst=
6326 for cf_rpath_src in $LDFLAGS
6327 do
6328         case $cf_rpath_src in #(vi
6329         -L*) #(vi
6330
6331                 # check if this refers to a directory which we will ignore
6332                 cf_rpath_skip=no
6333                 if test -n "$cf_rpath_list"
6334                 then
6335                         for cf_rpath_item in $cf_rpath_list
6336                         do
6337                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6338                                 then
6339                                         cf_rpath_skip=yes
6340                                         break
6341                                 fi
6342                         done
6343                 fi
6344
6345                 if test "$cf_rpath_skip" = no
6346                 then
6347                         # transform the option
6348                         if test "$LD_RPATH_OPT" = "-R " ; then
6349                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6350                         else
6351                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6352                         fi
6353
6354                         # if we have not already added this, add it now
6355                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6356                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6357                         then
6358                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6359
6360 echo "${as_me:-configure}:6360: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6361
6362                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6363                         fi
6364                 fi
6365                 ;;
6366         esac
6367         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6368 done
6369 LDFLAGS=$cf_rpath_dst
6370
6371 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6372
6373 echo "${as_me:-configure}:6373: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6374
6375 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6376
6377 echo "${as_me:-configure}:6377: testing ...checking LIBS $LIBS ..." 1>&5
6378
6379 cf_rpath_dst=
6380 for cf_rpath_src in $LIBS
6381 do
6382         case $cf_rpath_src in #(vi
6383         -L*) #(vi
6384
6385                 # check if this refers to a directory which we will ignore
6386                 cf_rpath_skip=no
6387                 if test -n "$cf_rpath_list"
6388                 then
6389                         for cf_rpath_item in $cf_rpath_list
6390                         do
6391                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6392                                 then
6393                                         cf_rpath_skip=yes
6394                                         break
6395                                 fi
6396                         done
6397                 fi
6398
6399                 if test "$cf_rpath_skip" = no
6400                 then
6401                         # transform the option
6402                         if test "$LD_RPATH_OPT" = "-R " ; then
6403                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6404                         else
6405                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6406                         fi
6407
6408                         # if we have not already added this, add it now
6409                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6410                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6411                         then
6412                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6413
6414 echo "${as_me:-configure}:6414: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6415
6416                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6417                         fi
6418                 fi
6419                 ;;
6420         esac
6421         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6422 done
6423 LIBS=$cf_rpath_dst
6424
6425 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6426
6427 echo "${as_me:-configure}:6427: testing ...checked LIBS $LIBS ..." 1>&5
6428
6429         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6430
6431 echo "${as_me:-configure}:6431: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6432
6433 else
6434         echo "$as_me:6434: result: no" >&5
6435 echo "${ECHO_T}no" >&6
6436 fi
6437
6438 fi
6439
6440 fi
6441
6442 ###############################################################################
6443
6444 ###     use option --disable-overwrite to leave out the link to -lcurses
6445 echo "$as_me:6445: checking if you wish to install ncurses overwriting curses" >&5
6446 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6447
6448 # Check whether --enable-overwrite or --disable-overwrite was given.
6449 if test "${enable_overwrite+set}" = set; then
6450   enableval="$enable_overwrite"
6451   with_overwrite=$enableval
6452 else
6453   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6454 fi;
6455 echo "$as_me:6455: result: $with_overwrite" >&5
6456 echo "${ECHO_T}$with_overwrite" >&6
6457
6458 echo "$as_me:6458: checking if external terminfo-database is used" >&5
6459 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6460
6461 # Check whether --enable-database or --disable-database was given.
6462 if test "${enable_database+set}" = set; then
6463   enableval="$enable_database"
6464   use_database=$enableval
6465 else
6466   use_database=yes
6467 fi;
6468 echo "$as_me:6468: result: $use_database" >&5
6469 echo "${ECHO_T}$use_database" >&6
6470
6471 case $host_os in #(vi
6472 os2*) #(vi
6473         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6474         ;;
6475 *) #(vi
6476         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6477         ;;
6478 esac
6479
6480 NCURSES_USE_DATABASE=0
6481 if test "$use_database" != no ; then
6482         NCURSES_USE_DATABASE=1
6483
6484         echo "$as_me:6484: checking which terminfo source-file will be installed" >&5
6485 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6486
6487 # Check whether --with-database or --without-database was given.
6488 if test "${with_database+set}" = set; then
6489   withval="$with_database"
6490   TERMINFO_SRC=$withval
6491 fi;
6492         echo "$as_me:6492: result: $TERMINFO_SRC" >&5
6493 echo "${ECHO_T}$TERMINFO_SRC" >&6
6494
6495         echo "$as_me:6495: checking whether to use hashed database instead of directory/tree" >&5
6496 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6497
6498 # Check whether --with-hashed-db or --without-hashed-db was given.
6499 if test "${with_hashed_db+set}" = set; then
6500   withval="$with_hashed_db"
6501
6502 else
6503   with_hashed_db=no
6504 fi;
6505         echo "$as_me:6505: result: $with_hashed_db" >&5
6506 echo "${ECHO_T}$with_hashed_db" >&6
6507 else
6508         with_hashed_db=no
6509 fi
6510
6511 echo "$as_me:6511: checking for list of fallback descriptions" >&5
6512 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6513
6514 # Check whether --with-fallbacks or --without-fallbacks was given.
6515 if test "${with_fallbacks+set}" = set; then
6516   withval="$with_fallbacks"
6517   with_fallback=$withval
6518 else
6519   with_fallback=
6520 fi;
6521 echo "$as_me:6521: result: $with_fallback" >&5
6522 echo "${ECHO_T}$with_fallback" >&6
6523 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6524
6525 echo "$as_me:6525: checking if you want modern xterm or antique" >&5
6526 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6527
6528 # Check whether --with-xterm-new or --without-xterm-new was given.
6529 if test "${with_xterm_new+set}" = set; then
6530   withval="$with_xterm_new"
6531   with_xterm_new=$withval
6532 else
6533   with_xterm_new=yes
6534 fi;
6535 case $with_xterm_new in
6536 no)     with_xterm_new=xterm-old;;
6537 *)      with_xterm_new=xterm-new;;
6538 esac
6539 echo "$as_me:6539: result: $with_xterm_new" >&5
6540 echo "${ECHO_T}$with_xterm_new" >&6
6541 WHICH_XTERM=$with_xterm_new
6542
6543 echo "$as_me:6543: checking if xterm backspace sends BS or DEL" >&5
6544 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
6545
6546 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
6547 if test "${with_xterm_kbs+set}" = set; then
6548   withval="$with_xterm_kbs"
6549   with_xterm_kbs=$withval
6550 else
6551   with_xterm_kbs=BS
6552 fi;
6553 case x$with_xterm_kbs in
6554 xyes|xno|xBS|xbs|x8)
6555         with_xterm_kbs=BS
6556         ;;
6557 xDEL|xdel|x127)
6558         with_xterm_kbs=DEL
6559         ;;
6560 *)
6561         with_xterm_kbs=$withval
6562         ;;
6563 esac
6564 echo "$as_me:6564: result: $with_xterm_kbs" >&5
6565 echo "${ECHO_T}$with_xterm_kbs" >&6
6566 XTERM_KBS=$with_xterm_kbs
6567
6568 MAKE_TERMINFO=
6569 if test "$use_database" = no ; then
6570         TERMINFO="${datadir}/terminfo"
6571         MAKE_TERMINFO="#"
6572 else
6573
6574 echo "$as_me:6574: checking for list of terminfo directories" >&5
6575 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6576
6577 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6578 if test "${with_terminfo_dirs+set}" = set; then
6579   withval="$with_terminfo_dirs"
6580
6581 else
6582   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6583 fi;
6584 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6585 cf_dst_path=
6586 for cf_src_path in $withval
6587 do
6588
6589 if test "x$prefix" != xNONE; then
6590   cf_path_syntax="$prefix"
6591 else
6592   cf_path_syntax="$ac_default_prefix"
6593 fi
6594
6595 case ".$cf_src_path" in #(vi
6596 .\$\(*\)*|.\'*\'*) #(vi
6597   ;;
6598 ..|./*|.\\*) #(vi
6599   ;;
6600 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6601   ;;
6602 .\${*prefix}*|.\${*dir}*) #(vi
6603   eval cf_src_path="$cf_src_path"
6604   case ".$cf_src_path" in #(vi
6605   .NONE/*)
6606     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6607     ;;
6608   esac
6609   ;; #(vi
6610 .no|.NONE/*)
6611   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6612   ;;
6613 *)
6614   { { echo "$as_me:6614: error: expected a pathname, not \"$cf_src_path\"" >&5
6615 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6616    { (exit 1); exit 1; }; }
6617   ;;
6618 esac
6619
6620   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6621   cf_dst_path="${cf_dst_path}${cf_src_path}"
6622 done
6623 IFS="$ac_save_ifs"
6624
6625 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6626 # so we have to check/work around.  We do prefer the result of "eval"...
6627 eval cf_dst_eval="$cf_dst_path"
6628 case "x$cf_dst_eval" in #(vi
6629 xNONE*) #(vi
6630         TERMINFO_DIRS=$cf_dst_path
6631         ;;
6632 *)
6633         TERMINFO_DIRS="$cf_dst_eval"
6634         ;;
6635 esac
6636
6637 echo "$as_me:6637: result: $TERMINFO_DIRS" >&5
6638 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6639 test -n "$TERMINFO_DIRS" &&
6640 cat >>confdefs.h <<EOF
6641 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6642 EOF
6643
6644 echo "$as_me:6644: checking for default terminfo directory" >&5
6645 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6646
6647 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6648 if test "${with_default_terminfo_dir+set}" = set; then
6649   withval="$with_default_terminfo_dir"
6650
6651 else
6652   withval="${TERMINFO:-${datadir}/terminfo}"
6653 fi; if test -n "${datadir}/terminfo" ; then
6654
6655 if test "x$prefix" != xNONE; then
6656   cf_path_syntax="$prefix"
6657 else
6658   cf_path_syntax="$ac_default_prefix"
6659 fi
6660
6661 case ".$withval" in #(vi
6662 .\$\(*\)*|.\'*\'*) #(vi
6663   ;;
6664 ..|./*|.\\*) #(vi
6665   ;;
6666 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6667   ;;
6668 .\${*prefix}*|.\${*dir}*) #(vi
6669   eval withval="$withval"
6670   case ".$withval" in #(vi
6671   .NONE/*)
6672     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6673     ;;
6674   esac
6675   ;; #(vi
6676 .no|.NONE/*)
6677   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6678   ;;
6679 *)
6680   { { echo "$as_me:6680: error: expected a pathname, not \"$withval\"" >&5
6681 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6682    { (exit 1); exit 1; }; }
6683   ;;
6684 esac
6685
6686 fi
6687 eval TERMINFO="$withval"
6688
6689 echo "$as_me:6689: result: $TERMINFO" >&5
6690 echo "${ECHO_T}$TERMINFO" >&6
6691
6692 cat >>confdefs.h <<EOF
6693 #define TERMINFO "$TERMINFO"
6694 EOF
6695
6696 fi
6697
6698 ###     use option --disable-big-core to make tic run on small machines
6699 ###     We need 4Mb, check if we can allocate 50% more than that.
6700 echo "$as_me:6700: checking if big-core option selected" >&5
6701 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6702
6703 # Check whether --enable-big-core or --disable-big-core was given.
6704 if test "${enable_big_core+set}" = set; then
6705   enableval="$enable_big_core"
6706   with_big_core=$enableval
6707 else
6708   if test "$cross_compiling" = yes; then
6709   with_big_core=no
6710 else
6711   cat >conftest.$ac_ext <<_ACEOF
6712 #line 6712 "configure"
6713 #include "confdefs.h"
6714
6715 #include <stdlib.h>
6716 #include <string.h>
6717 int main() {
6718         unsigned long n = 6000000L;
6719         char *s = malloc(n);
6720         if (s != 0)
6721                 s[0] = s[n-1] = 0;
6722         ${cf_cv_main_return:-return}(s == 0);
6723 }
6724 _ACEOF
6725 rm -f conftest$ac_exeext
6726 if { (eval echo "$as_me:6726: \"$ac_link\"") >&5
6727   (eval $ac_link) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6731   { (eval echo "$as_me:6731: \"$ac_try\"") >&5
6732   (eval $ac_try) 2>&5
6733   ac_status=$?
6734   echo "$as_me:6734: \$? = $ac_status" >&5
6735   (exit $ac_status); }; }; then
6736   with_big_core=yes
6737 else
6738   echo "$as_me: program exited with status $ac_status" >&5
6739 echo "$as_me: failed program was:" >&5
6740 cat conftest.$ac_ext >&5
6741 with_big_core=no
6742 fi
6743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6744 fi
6745 fi;
6746 echo "$as_me:6746: result: $with_big_core" >&5
6747 echo "${ECHO_T}$with_big_core" >&6
6748 test "x$with_big_core" = "xyes" &&
6749 cat >>confdefs.h <<\EOF
6750 #define HAVE_BIG_CORE 1
6751 EOF
6752
6753 ### ISO C only guarantees 512-char strings, we have tables which load faster
6754 ### when constructed using "big" strings.  More than the C compiler, the awk
6755 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6756 echo "$as_me:6756: checking if big-strings option selected" >&5
6757 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6758
6759 # Check whether --enable-big-strings or --disable-big-strings was given.
6760 if test "${enable_big_strings+set}" = set; then
6761   enableval="$enable_big_strings"
6762   with_big_strings=$enableval
6763 else
6764
6765         case x$AWK in #(vi
6766         x)
6767                 eval with_big_strings=no
6768                 ;;
6769         *) #(vi
6770                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
6771                         | $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
6772                         eval with_big_strings=yes
6773                 else
6774                         eval with_big_strings=no
6775                 fi
6776                 ;;
6777         esac
6778
6779 fi;
6780 echo "$as_me:6780: result: $with_big_strings" >&5
6781 echo "${ECHO_T}$with_big_strings" >&6
6782
6783 USE_BIG_STRINGS=0
6784 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
6785
6786 ###     use option --enable-termcap to compile in the termcap fallback support
6787 echo "$as_me:6787: checking if you want termcap-fallback support" >&5
6788 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6789
6790 # Check whether --enable-termcap or --disable-termcap was given.
6791 if test "${enable_termcap+set}" = set; then
6792   enableval="$enable_termcap"
6793   with_termcap=$enableval
6794 else
6795   with_termcap=no
6796 fi;
6797 echo "$as_me:6797: result: $with_termcap" >&5
6798 echo "${ECHO_T}$with_termcap" >&6
6799
6800 NCURSES_USE_TERMCAP=0
6801 if test "x$with_termcap" != "xyes" ; then
6802         if test "$use_database" = no ; then
6803                 if test -z "$with_fallback" ; then
6804                         { { echo "$as_me:6804: error: You have disabled the database w/o specifying fallbacks" >&5
6805 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6806    { (exit 1); exit 1; }; }
6807                 fi
6808         fi
6809
6810 cat >>confdefs.h <<\EOF
6811 #define PURE_TERMINFO 1
6812 EOF
6813
6814 else
6815
6816         if test "$with_ticlib" != no ; then
6817                 { { echo "$as_me:6817: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6818 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6819    { (exit 1); exit 1; }; }
6820         fi
6821
6822         NCURSES_USE_TERMCAP=1
6823         echo "$as_me:6823: checking for list of termcap files" >&5
6824 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6825
6826 # Check whether --with-termpath or --without-termpath was given.
6827 if test "${with_termpath+set}" = set; then
6828   withval="$with_termpath"
6829
6830 else
6831   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6832 fi;
6833 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6834 cf_dst_path=
6835 for cf_src_path in $withval
6836 do
6837
6838 if test "x$prefix" != xNONE; then
6839   cf_path_syntax="$prefix"
6840 else
6841   cf_path_syntax="$ac_default_prefix"
6842 fi
6843
6844 case ".$cf_src_path" in #(vi
6845 .\$\(*\)*|.\'*\'*) #(vi
6846   ;;
6847 ..|./*|.\\*) #(vi
6848   ;;
6849 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6850   ;;
6851 .\${*prefix}*|.\${*dir}*) #(vi
6852   eval cf_src_path="$cf_src_path"
6853   case ".$cf_src_path" in #(vi
6854   .NONE/*)
6855     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6856     ;;
6857   esac
6858   ;; #(vi
6859 .no|.NONE/*)
6860   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6861   ;;
6862 *)
6863   { { echo "$as_me:6863: error: expected a pathname, not \"$cf_src_path\"" >&5
6864 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6865    { (exit 1); exit 1; }; }
6866   ;;
6867 esac
6868
6869   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
6870   cf_dst_path="${cf_dst_path}${cf_src_path}"
6871 done
6872 IFS="$ac_save_ifs"
6873
6874 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
6875 # so we have to check/work around.  We do prefer the result of "eval"...
6876 eval cf_dst_eval="$cf_dst_path"
6877 case "x$cf_dst_eval" in #(vi
6878 xNONE*) #(vi
6879         TERMPATH=$cf_dst_path
6880         ;;
6881 *)
6882         TERMPATH="$cf_dst_eval"
6883         ;;
6884 esac
6885
6886         echo "$as_me:6886: result: $TERMPATH" >&5
6887 echo "${ECHO_T}$TERMPATH" >&6
6888         test -n "$TERMPATH" &&
6889 cat >>confdefs.h <<EOF
6890 #define TERMPATH "$TERMPATH"
6891 EOF
6892
6893         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6894         echo "$as_me:6894: checking if fast termcap-loader is needed" >&5
6895 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6896
6897 # Check whether --enable-getcap or --disable-getcap was given.
6898 if test "${enable_getcap+set}" = set; then
6899   enableval="$enable_getcap"
6900   with_getcap=$enableval
6901 else
6902   with_getcap=no
6903 fi;
6904         echo "$as_me:6904: result: $with_getcap" >&5
6905 echo "${ECHO_T}$with_getcap" >&6
6906         test "x$with_getcap" = "xyes" &&
6907 cat >>confdefs.h <<\EOF
6908 #define USE_GETCAP 1
6909 EOF
6910
6911         echo "$as_me:6911: checking if translated termcaps will be cached in ~/.terminfo" >&5
6912 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6913
6914 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6915 if test "${enable_getcap_cache+set}" = set; then
6916   enableval="$enable_getcap_cache"
6917   with_getcap_cache=$enableval
6918 else
6919   with_getcap_cache=no
6920 fi;
6921         echo "$as_me:6921: result: $with_getcap_cache" >&5
6922 echo "${ECHO_T}$with_getcap_cache" >&6
6923         test "x$with_getcap_cache" = "xyes" &&
6924 cat >>confdefs.h <<\EOF
6925 #define USE_GETCAP_CACHE 1
6926 EOF
6927
6928 fi
6929
6930 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6931 echo "$as_me:6931: checking if ~/.terminfo is wanted" >&5
6932 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6933
6934 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6935 if test "${enable_home_terminfo+set}" = set; then
6936   enableval="$enable_home_terminfo"
6937   with_home_terminfo=$enableval
6938 else
6939   with_home_terminfo=yes
6940 fi;
6941 echo "$as_me:6941: result: $with_home_terminfo" >&5
6942 echo "${ECHO_T}$with_home_terminfo" >&6
6943 test "x$with_home_terminfo" = "xyes" &&
6944 cat >>confdefs.h <<\EOF
6945 #define USE_HOME_TERMINFO 1
6946 EOF
6947
6948 echo "$as_me:6948: checking if you want to use restricted environment when running as root" >&5
6949 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6950
6951 # Check whether --enable-root-environ or --disable-root-environ was given.
6952 if test "${enable_root_environ+set}" = set; then
6953   enableval="$enable_root_environ"
6954   with_root_environ=$enableval
6955 else
6956   with_root_environ=yes
6957 fi;
6958 echo "$as_me:6958: result: $with_root_environ" >&5
6959 echo "${ECHO_T}$with_root_environ" >&6
6960 test "x$with_root_environ" = xyes &&
6961 cat >>confdefs.h <<\EOF
6962 #define USE_ROOT_ENVIRON 1
6963 EOF
6964
6965 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6966 ###   to reduce storage requirements for the terminfo database.
6967
6968 for ac_func in \
6969         remove \
6970         unlink
6971 do
6972 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6973 echo "$as_me:6973: checking for $ac_func" >&5
6974 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6975 if eval "test \"\${$as_ac_var+set}\" = set"; then
6976   echo $ECHO_N "(cached) $ECHO_C" >&6
6977 else
6978   cat >conftest.$ac_ext <<_ACEOF
6979 #line 6979 "configure"
6980 #include "confdefs.h"
6981 /* System header to define __stub macros and hopefully few prototypes,
6982     which can conflict with char $ac_func (); below.  */
6983 #include <assert.h>
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 #ifdef __cplusplus
6986 extern "C"
6987 #endif
6988 /* We use char because int might match the return type of a gcc2
6989    builtin and then its argument prototype would still apply.  */
6990 char $ac_func ();
6991 char (*f) ();
6992
6993 int
6994 main ()
6995 {
6996 /* The GNU C library defines this for functions which it implements
6997     to always fail with ENOSYS.  Some functions are actually named
6998     something starting with __ and the normal name is an alias.  */
6999 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7000 choke me
7001 #else
7002 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7003 #endif
7004
7005   ;
7006   return 0;
7007 }
7008 _ACEOF
7009 rm -f conftest.$ac_objext conftest$ac_exeext
7010 if { (eval echo "$as_me:7010: \"$ac_link\"") >&5
7011   (eval $ac_link) 2>&5
7012   ac_status=$?
7013   echo "$as_me:7013: \$? = $ac_status" >&5
7014   (exit $ac_status); } &&
7015          { ac_try='test -s conftest$ac_exeext'
7016   { (eval echo "$as_me:7016: \"$ac_try\"") >&5
7017   (eval $ac_try) 2>&5
7018   ac_status=$?
7019   echo "$as_me:7019: \$? = $ac_status" >&5
7020   (exit $ac_status); }; }; then
7021   eval "$as_ac_var=yes"
7022 else
7023   echo "$as_me: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 eval "$as_ac_var=no"
7026 fi
7027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7028 fi
7029 echo "$as_me:7029: result: `eval echo '${'$as_ac_var'}'`" >&5
7030 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7031 if test `eval echo '${'$as_ac_var'}'` = yes; then
7032   cat >>confdefs.h <<EOF
7033 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7034 EOF
7035
7036 fi
7037 done
7038
7039 if test "$cross_compiling" = yes ; then
7040
7041 for ac_func in \
7042                 link \
7043                 symlink
7044 do
7045 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7046 echo "$as_me:7046: checking for $ac_func" >&5
7047 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7048 if eval "test \"\${$as_ac_var+set}\" = set"; then
7049   echo $ECHO_N "(cached) $ECHO_C" >&6
7050 else
7051   cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 /* System header to define __stub macros and hopefully few prototypes,
7055     which can conflict with char $ac_func (); below.  */
7056 #include <assert.h>
7057 /* Override any gcc2 internal prototype to avoid an error.  */
7058 #ifdef __cplusplus
7059 extern "C"
7060 #endif
7061 /* We use char because int might match the return type of a gcc2
7062    builtin and then its argument prototype would still apply.  */
7063 char $ac_func ();
7064 char (*f) ();
7065
7066 int
7067 main ()
7068 {
7069 /* The GNU C library defines this for functions which it implements
7070     to always fail with ENOSYS.  Some functions are actually named
7071     something starting with __ and the normal name is an alias.  */
7072 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7073 choke me
7074 #else
7075 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7076 #endif
7077
7078   ;
7079   return 0;
7080 }
7081 _ACEOF
7082 rm -f conftest.$ac_objext conftest$ac_exeext
7083 if { (eval echo "$as_me:7083: \"$ac_link\"") >&5
7084   (eval $ac_link) 2>&5
7085   ac_status=$?
7086   echo "$as_me:7086: \$? = $ac_status" >&5
7087   (exit $ac_status); } &&
7088          { ac_try='test -s conftest$ac_exeext'
7089   { (eval echo "$as_me:7089: \"$ac_try\"") >&5
7090   (eval $ac_try) 2>&5
7091   ac_status=$?
7092   echo "$as_me:7092: \$? = $ac_status" >&5
7093   (exit $ac_status); }; }; then
7094   eval "$as_ac_var=yes"
7095 else
7096   echo "$as_me: failed program was:" >&5
7097 cat conftest.$ac_ext >&5
7098 eval "$as_ac_var=no"
7099 fi
7100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7101 fi
7102 echo "$as_me:7102: result: `eval echo '${'$as_ac_var'}'`" >&5
7103 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7104 if test `eval echo '${'$as_ac_var'}'` = yes; then
7105   cat >>confdefs.h <<EOF
7106 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7107 EOF
7108
7109 fi
7110 done
7111
7112 else
7113         echo "$as_me:7113: checking if link/symlink functions work" >&5
7114 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
7115 if test "${cf_cv_link_funcs+set}" = set; then
7116   echo $ECHO_N "(cached) $ECHO_C" >&6
7117 else
7118
7119                 cf_cv_link_funcs=
7120                 for cf_func in link symlink ; do
7121                         if test "$cross_compiling" = yes; then
7122
7123                         eval 'ac_cv_func_'$cf_func'=error'
7124 else
7125   cat >conftest.$ac_ext <<_ACEOF
7126 #line 7126 "configure"
7127 #include "confdefs.h"
7128
7129 #include <sys/types.h>
7130 #include <sys/stat.h>
7131 #ifdef HAVE_UNISTD_H
7132 #include <unistd.h>
7133 #endif
7134 int main()
7135 {
7136         int fail = 0;
7137         char *src = "config.log";
7138         char *dst = "conftest.chk";
7139         struct stat src_sb;
7140         struct stat dst_sb;
7141
7142         stat(src, &src_sb);
7143         fail = ($cf_func("config.log", "conftest.chk") < 0)
7144             || (stat(dst, &dst_sb) < 0)
7145             || (dst_sb.st_mtime != src_sb.st_mtime);
7146 #ifdef HAVE_UNLINK
7147         unlink(dst);
7148 #else
7149         remove(dst);
7150 #endif
7151         ${cf_cv_main_return:-return} (fail);
7152 }
7153
7154 _ACEOF
7155 rm -f conftest$ac_exeext
7156 if { (eval echo "$as_me:7156: \"$ac_link\"") >&5
7157   (eval $ac_link) 2>&5
7158   ac_status=$?
7159   echo "$as_me:7159: \$? = $ac_status" >&5
7160   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7161   { (eval echo "$as_me:7161: \"$ac_try\"") >&5
7162   (eval $ac_try) 2>&5
7163   ac_status=$?
7164   echo "$as_me:7164: \$? = $ac_status" >&5
7165   (exit $ac_status); }; }; then
7166
7167                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
7168                         eval 'ac_cv_func_'$cf_func'=yes'
7169 else
7170   echo "$as_me: program exited with status $ac_status" >&5
7171 echo "$as_me: failed program was:" >&5
7172 cat conftest.$ac_ext >&5
7173
7174                         eval 'ac_cv_func_'$cf_func'=no'
7175 fi
7176 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7177 fi
7178                 done
7179                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
7180
7181 fi
7182 echo "$as_me:7182: result: $cf_cv_link_funcs" >&5
7183 echo "${ECHO_T}$cf_cv_link_funcs" >&6
7184         test "$ac_cv_func_link"    = yes &&
7185 cat >>confdefs.h <<\EOF
7186 #define HAVE_LINK 1
7187 EOF
7188
7189         test "$ac_cv_func_symlink" = yes &&
7190 cat >>confdefs.h <<\EOF
7191 #define HAVE_SYMLINK 1
7192 EOF
7193
7194 fi
7195
7196 with_links=no
7197 with_symlinks=no
7198
7199 # soft links (symbolic links) are useful for some systems where hard links do
7200 # not work, or to make it simpler to copy terminfo trees around.
7201 if test "x$ac_cv_func_symlink" = xyes ; then
7202     echo "$as_me:7202: checking if tic should use symbolic links" >&5
7203 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7204
7205 # Check whether --enable-symlinks or --disable-symlinks was given.
7206 if test "${enable_symlinks+set}" = set; then
7207   enableval="$enable_symlinks"
7208   with_symlinks=$enableval
7209 else
7210   with_symlinks=no
7211 fi;
7212     echo "$as_me:7212: result: $with_symlinks" >&5
7213 echo "${ECHO_T}$with_symlinks" >&6
7214 fi
7215
7216 # If we have hard links and did not choose to use soft links instead, there is
7217 # no reason to make this choice optional - use the hard links.
7218 if test "$with_symlinks" = no ; then
7219     echo "$as_me:7219: checking if tic should use hard links" >&5
7220 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7221     if test "x$ac_cv_func_link" = xyes ; then
7222         with_links=yes
7223     else
7224         with_links=no
7225     fi
7226     echo "$as_me:7226: result: $with_links" >&5
7227 echo "${ECHO_T}$with_links" >&6
7228 fi
7229
7230 test "x$with_links" = xyes &&
7231 cat >>confdefs.h <<\EOF
7232 #define USE_LINKS 1
7233 EOF
7234
7235 test "x$with_symlinks" = xyes &&
7236 cat >>confdefs.h <<\EOF
7237 #define USE_SYMLINKS 1
7238 EOF
7239
7240 ###   use option --enable-broken-linker to force on use of broken-linker support
7241 echo "$as_me:7241: checking if you want broken-linker support code" >&5
7242 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7243
7244 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7245 if test "${enable_broken_linker+set}" = set; then
7246   enableval="$enable_broken_linker"
7247   with_broken_linker=$enableval
7248 else
7249   with_broken_linker=${BROKEN_LINKER:-no}
7250 fi;
7251 echo "$as_me:7251: result: $with_broken_linker" >&5
7252 echo "${ECHO_T}$with_broken_linker" >&6
7253
7254 BROKEN_LINKER=0
7255 if test "x$with_broken_linker" = xyes ; then
7256
7257 cat >>confdefs.h <<\EOF
7258 #define BROKEN_LINKER 1
7259 EOF
7260
7261         BROKEN_LINKER=1
7262 elif test "$DFT_LWR_MODEL" = shared ; then
7263         case $cf_cv_system_name in #(vi
7264         cygwin*)
7265
7266 cat >>confdefs.h <<\EOF
7267 #define BROKEN_LINKER 1
7268 EOF
7269
7270                 BROKEN_LINKER=1
7271                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7272
7273 echo "${as_me:-configure}:7273: testing cygwin linker is broken anyway ..." 1>&5
7274
7275                 ;;
7276         esac
7277 fi
7278
7279 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7280 echo "$as_me:7280: checking if tputs should process BSD-style prefix padding" >&5
7281 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7282
7283 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7284 if test "${enable_bsdpad+set}" = set; then
7285   enableval="$enable_bsdpad"
7286   with_bsdpad=$enableval
7287 else
7288   with_bsdpad=no
7289 fi;
7290 echo "$as_me:7290: result: $with_bsdpad" >&5
7291 echo "${ECHO_T}$with_bsdpad" >&6
7292 test "x$with_bsdpad" = xyes &&
7293 cat >>confdefs.h <<\EOF
7294 #define BSD_TPUTS 1
7295 EOF
7296
7297 ###   use option --enable-widec to turn on use of wide-character support
7298 NCURSES_CH_T=chtype
7299 NCURSES_LIBUTF8=0
7300
7301 NEED_WCHAR_H=0
7302 NCURSES_MBSTATE_T=0
7303 NCURSES_WCHAR_T=0
7304 NCURSES_WINT_T=0
7305
7306 # Check to define _XOPEN_SOURCE "automatically"
7307
7308 cf_XOPEN_SOURCE=500
7309 cf_POSIX_C_SOURCE=199506L
7310 cf_xopen_source=
7311
7312 case $host_os in #(vi
7313 aix[4-7]*) #(vi
7314         cf_xopen_source="-D_ALL_SOURCE"
7315         ;;
7316 cygwin|msys) #(vi
7317         cf_XOPEN_SOURCE=600
7318         ;;
7319 darwin[0-8].*) #(vi
7320         cf_xopen_source="-D_APPLE_C_SOURCE"
7321         ;;
7322 darwin*) #(vi
7323         cf_xopen_source="-D_DARWIN_C_SOURCE"
7324         cf_XOPEN_SOURCE=
7325         ;;
7326 freebsd*|dragonfly*) #(vi
7327         # 5.x headers associate
7328         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7329         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7330         cf_POSIX_C_SOURCE=200112L
7331         cf_XOPEN_SOURCE=600
7332         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7333         ;;
7334 hpux11*) #(vi
7335         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7336         ;;
7337 hpux*) #(vi
7338         cf_xopen_source="-D_HPUX_SOURCE"
7339         ;;
7340 irix[56].*) #(vi
7341         cf_xopen_source="-D_SGI_SOURCE"
7342         cf_XOPEN_SOURCE=
7343         ;;
7344 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7345
7346 echo "$as_me:7346: checking if we must define _GNU_SOURCE" >&5
7347 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7348 if test "${cf_cv_gnu_source+set}" = set; then
7349   echo $ECHO_N "(cached) $ECHO_C" >&6
7350 else
7351
7352 cat >conftest.$ac_ext <<_ACEOF
7353 #line 7353 "configure"
7354 #include "confdefs.h"
7355 #include <sys/types.h>
7356 int
7357 main ()
7358 {
7359
7360 #ifndef _XOPEN_SOURCE
7361 make an error
7362 #endif
7363   ;
7364   return 0;
7365 }
7366 _ACEOF
7367 rm -f conftest.$ac_objext
7368 if { (eval echo "$as_me:7368: \"$ac_compile\"") >&5
7369   (eval $ac_compile) 2>&5
7370   ac_status=$?
7371   echo "$as_me:7371: \$? = $ac_status" >&5
7372   (exit $ac_status); } &&
7373          { ac_try='test -s conftest.$ac_objext'
7374   { (eval echo "$as_me:7374: \"$ac_try\"") >&5
7375   (eval $ac_try) 2>&5
7376   ac_status=$?
7377   echo "$as_me:7377: \$? = $ac_status" >&5
7378   (exit $ac_status); }; }; then
7379   cf_cv_gnu_source=no
7380 else
7381   echo "$as_me: failed program was:" >&5
7382 cat conftest.$ac_ext >&5
7383 cf_save="$CPPFLAGS"
7384          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7385          cat >conftest.$ac_ext <<_ACEOF
7386 #line 7386 "configure"
7387 #include "confdefs.h"
7388 #include <sys/types.h>
7389 int
7390 main ()
7391 {
7392
7393 #ifdef _XOPEN_SOURCE
7394 make an error
7395 #endif
7396   ;
7397   return 0;
7398 }
7399 _ACEOF
7400 rm -f conftest.$ac_objext
7401 if { (eval echo "$as_me:7401: \"$ac_compile\"") >&5
7402   (eval $ac_compile) 2>&5
7403   ac_status=$?
7404   echo "$as_me:7404: \$? = $ac_status" >&5
7405   (exit $ac_status); } &&
7406          { ac_try='test -s conftest.$ac_objext'
7407   { (eval echo "$as_me:7407: \"$ac_try\"") >&5
7408   (eval $ac_try) 2>&5
7409   ac_status=$?
7410   echo "$as_me:7410: \$? = $ac_status" >&5
7411   (exit $ac_status); }; }; then
7412   cf_cv_gnu_source=no
7413 else
7414   echo "$as_me: failed program was:" >&5
7415 cat conftest.$ac_ext >&5
7416 cf_cv_gnu_source=yes
7417 fi
7418 rm -f conftest.$ac_objext conftest.$ac_ext
7419         CPPFLAGS="$cf_save"
7420
7421 fi
7422 rm -f conftest.$ac_objext conftest.$ac_ext
7423
7424 fi
7425 echo "$as_me:7425: result: $cf_cv_gnu_source" >&5
7426 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7427 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7428
7429         ;;
7430 minix*) #(vi
7431         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
7432         ;;
7433 mirbsd*) #(vi
7434         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
7435         cf_XOPEN_SOURCE=
7436
7437 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7438
7439 cf_save_CFLAGS="$CFLAGS"
7440 cf_save_CPPFLAGS="$CPPFLAGS"
7441
7442 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7443         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7444                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7445
7446 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7447         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7448                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7449
7450 echo "$as_me:7450: checking if we should define _POSIX_C_SOURCE" >&5
7451 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7452 if test "${cf_cv_posix_c_source+set}" = set; then
7453   echo $ECHO_N "(cached) $ECHO_C" >&6
7454 else
7455
7456 echo "${as_me:-configure}:7456: testing if the symbol is already defined go no further ..." 1>&5
7457
7458         cat >conftest.$ac_ext <<_ACEOF
7459 #line 7459 "configure"
7460 #include "confdefs.h"
7461 #include <sys/types.h>
7462 int
7463 main ()
7464 {
7465
7466 #ifndef _POSIX_C_SOURCE
7467 make an error
7468 #endif
7469   ;
7470   return 0;
7471 }
7472 _ACEOF
7473 rm -f conftest.$ac_objext
7474 if { (eval echo "$as_me:7474: \"$ac_compile\"") >&5
7475   (eval $ac_compile) 2>&5
7476   ac_status=$?
7477   echo "$as_me:7477: \$? = $ac_status" >&5
7478   (exit $ac_status); } &&
7479          { ac_try='test -s conftest.$ac_objext'
7480   { (eval echo "$as_me:7480: \"$ac_try\"") >&5
7481   (eval $ac_try) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit $ac_status); }; }; then
7485   cf_cv_posix_c_source=no
7486 else
7487   echo "$as_me: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 cf_want_posix_source=no
7490          case .$cf_POSIX_C_SOURCE in #(vi
7491          .[12]??*) #(vi
7492                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7493                 ;;
7494          .2) #(vi
7495                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7496                 cf_want_posix_source=yes
7497                 ;;
7498          .*)
7499                 cf_want_posix_source=yes
7500                 ;;
7501          esac
7502          if test "$cf_want_posix_source" = yes ; then
7503                 cat >conftest.$ac_ext <<_ACEOF
7504 #line 7504 "configure"
7505 #include "confdefs.h"
7506 #include <sys/types.h>
7507 int
7508 main ()
7509 {
7510
7511 #ifdef _POSIX_SOURCE
7512 make an error
7513 #endif
7514   ;
7515   return 0;
7516 }
7517 _ACEOF
7518 rm -f conftest.$ac_objext
7519 if { (eval echo "$as_me:7519: \"$ac_compile\"") >&5
7520   (eval $ac_compile) 2>&5
7521   ac_status=$?
7522   echo "$as_me:7522: \$? = $ac_status" >&5
7523   (exit $ac_status); } &&
7524          { ac_try='test -s conftest.$ac_objext'
7525   { (eval echo "$as_me:7525: \"$ac_try\"") >&5
7526   (eval $ac_try) 2>&5
7527   ac_status=$?
7528   echo "$as_me:7528: \$? = $ac_status" >&5
7529   (exit $ac_status); }; }; then
7530   :
7531 else
7532   echo "$as_me: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7534 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7535 fi
7536 rm -f conftest.$ac_objext conftest.$ac_ext
7537          fi
7538
7539 echo "${as_me:-configure}:7539: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7540
7541          CFLAGS="$cf_trim_CFLAGS"
7542          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7543
7544 echo "${as_me:-configure}:7544: testing if the second compile does not leave our definition intact error ..." 1>&5
7545
7546          cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549 #include <sys/types.h>
7550 int
7551 main ()
7552 {
7553
7554 #ifndef _POSIX_C_SOURCE
7555 make an error
7556 #endif
7557   ;
7558   return 0;
7559 }
7560 _ACEOF
7561 rm -f conftest.$ac_objext
7562 if { (eval echo "$as_me:7562: \"$ac_compile\"") >&5
7563   (eval $ac_compile) 2>&5
7564   ac_status=$?
7565   echo "$as_me:7565: \$? = $ac_status" >&5
7566   (exit $ac_status); } &&
7567          { ac_try='test -s conftest.$ac_objext'
7568   { (eval echo "$as_me:7568: \"$ac_try\"") >&5
7569   (eval $ac_try) 2>&5
7570   ac_status=$?
7571   echo "$as_me:7571: \$? = $ac_status" >&5
7572   (exit $ac_status); }; }; then
7573   :
7574 else
7575   echo "$as_me: failed program was:" >&5
7576 cat conftest.$ac_ext >&5
7577 cf_cv_posix_c_source=no
7578 fi
7579 rm -f conftest.$ac_objext conftest.$ac_ext
7580          CFLAGS="$cf_save_CFLAGS"
7581          CPPFLAGS="$cf_save_CPPFLAGS"
7582
7583 fi
7584 rm -f conftest.$ac_objext conftest.$ac_ext
7585
7586 fi
7587 echo "$as_me:7587: result: $cf_cv_posix_c_source" >&5
7588 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7589
7590 if test "$cf_cv_posix_c_source" != no ; then
7591         CFLAGS="$cf_trim_CFLAGS"
7592         CPPFLAGS="$cf_trim_CPPFLAGS"
7593
7594 cf_fix_cppflags=no
7595 cf_new_cflags=
7596 cf_new_cppflags=
7597 cf_new_extra_cppflags=
7598
7599 for cf_add_cflags in $cf_cv_posix_c_source
7600 do
7601 case $cf_fix_cppflags in
7602 no)
7603         case $cf_add_cflags in #(vi
7604         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7605                 case $cf_add_cflags in
7606                 -D*)
7607                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7608
7609                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7610                                 && test -z "${cf_tst_cflags}" \
7611                                 && cf_fix_cppflags=yes
7612
7613                         if test $cf_fix_cppflags = yes ; then
7614                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7615                                 continue
7616                         elif test "${cf_tst_cflags}" = "\"'" ; then
7617                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7618                                 continue
7619                         fi
7620                         ;;
7621                 esac
7622                 case "$CPPFLAGS" in
7623                 *$cf_add_cflags) #(vi
7624                         ;;
7625                 *) #(vi
7626                         case $cf_add_cflags in #(vi
7627                         -D*)
7628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7629
7630 CPPFLAGS=`echo "$CPPFLAGS" | \
7631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7633
7634                                 ;;
7635                         esac
7636                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7637                         ;;
7638                 esac
7639                 ;;
7640         *)
7641                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7642                 ;;
7643         esac
7644         ;;
7645 yes)
7646         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7647
7648         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7649
7650         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7651                 && test -z "${cf_tst_cflags}" \
7652                 && cf_fix_cppflags=no
7653         ;;
7654 esac
7655 done
7656
7657 if test -n "$cf_new_cflags" ; then
7658
7659         CFLAGS="$CFLAGS $cf_new_cflags"
7660 fi
7661
7662 if test -n "$cf_new_cppflags" ; then
7663
7664         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7665 fi
7666
7667 if test -n "$cf_new_extra_cppflags" ; then
7668
7669         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7670 fi
7671
7672 fi
7673
7674         ;;
7675 netbsd*) #(vi
7676         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7677         ;;
7678 openbsd[4-9]*) #(vi
7679         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
7680         cf_xopen_source="-D_BSD_SOURCE"
7681         cf_XOPEN_SOURCE=600
7682         ;;
7683 openbsd*) #(vi
7684         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7685         ;;
7686 osf[45]*) #(vi
7687         cf_xopen_source="-D_OSF_SOURCE"
7688         ;;
7689 nto-qnx*) #(vi
7690         cf_xopen_source="-D_QNX_SOURCE"
7691         ;;
7692 sco*) #(vi
7693         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7694         ;;
7695 solaris2.*) #(vi
7696         cf_xopen_source="-D__EXTENSIONS__"
7697         cf_cv_xopen_source=broken
7698         ;;
7699 *)
7700
7701 echo "$as_me:7701: checking if we should define _XOPEN_SOURCE" >&5
7702 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7703 if test "${cf_cv_xopen_source+set}" = set; then
7704   echo $ECHO_N "(cached) $ECHO_C" >&6
7705 else
7706
7707         cat >conftest.$ac_ext <<_ACEOF
7708 #line 7708 "configure"
7709 #include "confdefs.h"
7710
7711 #include <stdlib.h>
7712 #include <string.h>
7713 #include <sys/types.h>
7714
7715 int
7716 main ()
7717 {
7718
7719 #ifndef _XOPEN_SOURCE
7720 make an error
7721 #endif
7722   ;
7723   return 0;
7724 }
7725 _ACEOF
7726 rm -f conftest.$ac_objext
7727 if { (eval echo "$as_me:7727: \"$ac_compile\"") >&5
7728   (eval $ac_compile) 2>&5
7729   ac_status=$?
7730   echo "$as_me:7730: \$? = $ac_status" >&5
7731   (exit $ac_status); } &&
7732          { ac_try='test -s conftest.$ac_objext'
7733   { (eval echo "$as_me:7733: \"$ac_try\"") >&5
7734   (eval $ac_try) 2>&5
7735   ac_status=$?
7736   echo "$as_me:7736: \$? = $ac_status" >&5
7737   (exit $ac_status); }; }; then
7738   cf_cv_xopen_source=no
7739 else
7740   echo "$as_me: failed program was:" >&5
7741 cat conftest.$ac_ext >&5
7742 cf_save="$CPPFLAGS"
7743          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7744          cat >conftest.$ac_ext <<_ACEOF
7745 #line 7745 "configure"
7746 #include "confdefs.h"
7747
7748 #include <stdlib.h>
7749 #include <string.h>
7750 #include <sys/types.h>
7751
7752 int
7753 main ()
7754 {
7755
7756 #ifdef _XOPEN_SOURCE
7757 make an error
7758 #endif
7759   ;
7760   return 0;
7761 }
7762 _ACEOF
7763 rm -f conftest.$ac_objext
7764 if { (eval echo "$as_me:7764: \"$ac_compile\"") >&5
7765   (eval $ac_compile) 2>&5
7766   ac_status=$?
7767   echo "$as_me:7767: \$? = $ac_status" >&5
7768   (exit $ac_status); } &&
7769          { ac_try='test -s conftest.$ac_objext'
7770   { (eval echo "$as_me:7770: \"$ac_try\"") >&5
7771   (eval $ac_try) 2>&5
7772   ac_status=$?
7773   echo "$as_me:7773: \$? = $ac_status" >&5
7774   (exit $ac_status); }; }; then
7775   cf_cv_xopen_source=no
7776 else
7777   echo "$as_me: failed program was:" >&5
7778 cat conftest.$ac_ext >&5
7779 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7780 fi
7781 rm -f conftest.$ac_objext conftest.$ac_ext
7782         CPPFLAGS="$cf_save"
7783
7784 fi
7785 rm -f conftest.$ac_objext conftest.$ac_ext
7786
7787 fi
7788 echo "$as_me:7788: result: $cf_cv_xopen_source" >&5
7789 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7790
7791 if test "$cf_cv_xopen_source" != no ; then
7792
7793 CFLAGS=`echo "$CFLAGS" | \
7794         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7795                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7796
7797 CPPFLAGS=`echo "$CPPFLAGS" | \
7798         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7799                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7800
7801         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7802
7803 cf_fix_cppflags=no
7804 cf_new_cflags=
7805 cf_new_cppflags=
7806 cf_new_extra_cppflags=
7807
7808 for cf_add_cflags in $cf_temp_xopen_source
7809 do
7810 case $cf_fix_cppflags in
7811 no)
7812         case $cf_add_cflags in #(vi
7813         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7814                 case $cf_add_cflags in
7815                 -D*)
7816                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7817
7818                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7819                                 && test -z "${cf_tst_cflags}" \
7820                                 && cf_fix_cppflags=yes
7821
7822                         if test $cf_fix_cppflags = yes ; then
7823                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7824                                 continue
7825                         elif test "${cf_tst_cflags}" = "\"'" ; then
7826                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7827                                 continue
7828                         fi
7829                         ;;
7830                 esac
7831                 case "$CPPFLAGS" in
7832                 *$cf_add_cflags) #(vi
7833                         ;;
7834                 *) #(vi
7835                         case $cf_add_cflags in #(vi
7836                         -D*)
7837                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7838
7839 CPPFLAGS=`echo "$CPPFLAGS" | \
7840         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7841                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7842
7843                                 ;;
7844                         esac
7845                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7846                         ;;
7847                 esac
7848                 ;;
7849         *)
7850                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7851                 ;;
7852         esac
7853         ;;
7854 yes)
7855         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7856
7857         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7858
7859         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7860                 && test -z "${cf_tst_cflags}" \
7861                 && cf_fix_cppflags=no
7862         ;;
7863 esac
7864 done
7865
7866 if test -n "$cf_new_cflags" ; then
7867
7868         CFLAGS="$CFLAGS $cf_new_cflags"
7869 fi
7870
7871 if test -n "$cf_new_cppflags" ; then
7872
7873         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7874 fi
7875
7876 if test -n "$cf_new_extra_cppflags" ; then
7877
7878         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7879 fi
7880
7881 fi
7882
7883 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7884
7885 cf_save_CFLAGS="$CFLAGS"
7886 cf_save_CPPFLAGS="$CPPFLAGS"
7887
7888 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7889         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7890                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7891
7892 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7893         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7894                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7895
7896 echo "$as_me:7896: checking if we should define _POSIX_C_SOURCE" >&5
7897 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7898 if test "${cf_cv_posix_c_source+set}" = set; then
7899   echo $ECHO_N "(cached) $ECHO_C" >&6
7900 else
7901
7902 echo "${as_me:-configure}:7902: testing if the symbol is already defined go no further ..." 1>&5
7903
7904         cat >conftest.$ac_ext <<_ACEOF
7905 #line 7905 "configure"
7906 #include "confdefs.h"
7907 #include <sys/types.h>
7908 int
7909 main ()
7910 {
7911
7912 #ifndef _POSIX_C_SOURCE
7913 make an error
7914 #endif
7915   ;
7916   return 0;
7917 }
7918 _ACEOF
7919 rm -f conftest.$ac_objext
7920 if { (eval echo "$as_me:7920: \"$ac_compile\"") >&5
7921   (eval $ac_compile) 2>&5
7922   ac_status=$?
7923   echo "$as_me:7923: \$? = $ac_status" >&5
7924   (exit $ac_status); } &&
7925          { ac_try='test -s conftest.$ac_objext'
7926   { (eval echo "$as_me:7926: \"$ac_try\"") >&5
7927   (eval $ac_try) 2>&5
7928   ac_status=$?
7929   echo "$as_me:7929: \$? = $ac_status" >&5
7930   (exit $ac_status); }; }; then
7931   cf_cv_posix_c_source=no
7932 else
7933   echo "$as_me: failed program was:" >&5
7934 cat conftest.$ac_ext >&5
7935 cf_want_posix_source=no
7936          case .$cf_POSIX_C_SOURCE in #(vi
7937          .[12]??*) #(vi
7938                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7939                 ;;
7940          .2) #(vi
7941                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7942                 cf_want_posix_source=yes
7943                 ;;
7944          .*)
7945                 cf_want_posix_source=yes
7946                 ;;
7947          esac
7948          if test "$cf_want_posix_source" = yes ; then
7949                 cat >conftest.$ac_ext <<_ACEOF
7950 #line 7950 "configure"
7951 #include "confdefs.h"
7952 #include <sys/types.h>
7953 int
7954 main ()
7955 {
7956
7957 #ifdef _POSIX_SOURCE
7958 make an error
7959 #endif
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f conftest.$ac_objext
7965 if { (eval echo "$as_me:7965: \"$ac_compile\"") >&5
7966   (eval $ac_compile) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit $ac_status); } &&
7970          { ac_try='test -s conftest.$ac_objext'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit $ac_status); }; }; then
7976   :
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983          fi
7984
7985 echo "${as_me:-configure}:7985: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7986
7987          CFLAGS="$cf_trim_CFLAGS"
7988          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7989
7990 echo "${as_me:-configure}:7990: testing if the second compile does not leave our definition intact error ..." 1>&5
7991
7992          cat >conftest.$ac_ext <<_ACEOF
7993 #line 7993 "configure"
7994 #include "confdefs.h"
7995 #include <sys/types.h>
7996 int
7997 main ()
7998 {
7999
8000 #ifndef _POSIX_C_SOURCE
8001 make an error
8002 #endif
8003   ;
8004   return 0;
8005 }
8006 _ACEOF
8007 rm -f conftest.$ac_objext
8008 if { (eval echo "$as_me:8008: \"$ac_compile\"") >&5
8009   (eval $ac_compile) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); } &&
8013          { ac_try='test -s conftest.$ac_objext'
8014   { (eval echo "$as_me:8014: \"$ac_try\"") >&5
8015   (eval $ac_try) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit $ac_status); }; }; then
8019   :
8020 else
8021   echo "$as_me: failed program was:" >&5
8022 cat conftest.$ac_ext >&5
8023 cf_cv_posix_c_source=no
8024 fi
8025 rm -f conftest.$ac_objext conftest.$ac_ext
8026          CFLAGS="$cf_save_CFLAGS"
8027          CPPFLAGS="$cf_save_CPPFLAGS"
8028
8029 fi
8030 rm -f conftest.$ac_objext conftest.$ac_ext
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_posix_c_source" >&5
8034 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
8035
8036 if test "$cf_cv_posix_c_source" != no ; then
8037         CFLAGS="$cf_trim_CFLAGS"
8038         CPPFLAGS="$cf_trim_CPPFLAGS"
8039
8040 cf_fix_cppflags=no
8041 cf_new_cflags=
8042 cf_new_cppflags=
8043 cf_new_extra_cppflags=
8044
8045 for cf_add_cflags in $cf_cv_posix_c_source
8046 do
8047 case $cf_fix_cppflags in
8048 no)
8049         case $cf_add_cflags in #(vi
8050         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8051                 case $cf_add_cflags in
8052                 -D*)
8053                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8054
8055                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8056                                 && test -z "${cf_tst_cflags}" \
8057                                 && cf_fix_cppflags=yes
8058
8059                         if test $cf_fix_cppflags = yes ; then
8060                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8061                                 continue
8062                         elif test "${cf_tst_cflags}" = "\"'" ; then
8063                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8064                                 continue
8065                         fi
8066                         ;;
8067                 esac
8068                 case "$CPPFLAGS" in
8069                 *$cf_add_cflags) #(vi
8070                         ;;
8071                 *) #(vi
8072                         case $cf_add_cflags in #(vi
8073                         -D*)
8074                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8075
8076 CPPFLAGS=`echo "$CPPFLAGS" | \
8077         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8078                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8079
8080                                 ;;
8081                         esac
8082                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8083                         ;;
8084                 esac
8085                 ;;
8086         *)
8087                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8088                 ;;
8089         esac
8090         ;;
8091 yes)
8092         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8093
8094         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8095
8096         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8097                 && test -z "${cf_tst_cflags}" \
8098                 && cf_fix_cppflags=no
8099         ;;
8100 esac
8101 done
8102
8103 if test -n "$cf_new_cflags" ; then
8104
8105         CFLAGS="$CFLAGS $cf_new_cflags"
8106 fi
8107
8108 if test -n "$cf_new_cppflags" ; then
8109
8110         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8111 fi
8112
8113 if test -n "$cf_new_extra_cppflags" ; then
8114
8115         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8116 fi
8117
8118 fi
8119
8120         ;;
8121 esac
8122
8123 if test -n "$cf_xopen_source" ; then
8124
8125 cf_fix_cppflags=no
8126 cf_new_cflags=
8127 cf_new_cppflags=
8128 cf_new_extra_cppflags=
8129
8130 for cf_add_cflags in $cf_xopen_source
8131 do
8132 case $cf_fix_cppflags in
8133 no)
8134         case $cf_add_cflags in #(vi
8135         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8136                 case $cf_add_cflags in
8137                 -D*)
8138                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8139
8140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8141                                 && test -z "${cf_tst_cflags}" \
8142                                 && cf_fix_cppflags=yes
8143
8144                         if test $cf_fix_cppflags = yes ; then
8145                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8146                                 continue
8147                         elif test "${cf_tst_cflags}" = "\"'" ; then
8148                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8149                                 continue
8150                         fi
8151                         ;;
8152                 esac
8153                 case "$CPPFLAGS" in
8154                 *$cf_add_cflags) #(vi
8155                         ;;
8156                 *) #(vi
8157                         case $cf_add_cflags in #(vi
8158                         -D*)
8159                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8160
8161 CPPFLAGS=`echo "$CPPFLAGS" | \
8162         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8163                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8164
8165                                 ;;
8166                         esac
8167                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8168                         ;;
8169                 esac
8170                 ;;
8171         *)
8172                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8173                 ;;
8174         esac
8175         ;;
8176 yes)
8177         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8178
8179         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8180
8181         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8182                 && test -z "${cf_tst_cflags}" \
8183                 && cf_fix_cppflags=no
8184         ;;
8185 esac
8186 done
8187
8188 if test -n "$cf_new_cflags" ; then
8189         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
8190
8191 echo "${as_me:-configure}:8191: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8192
8193         CFLAGS="$CFLAGS $cf_new_cflags"
8194 fi
8195
8196 if test -n "$cf_new_cppflags" ; then
8197         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8198
8199 echo "${as_me:-configure}:8199: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8200
8201         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8202 fi
8203
8204 if test -n "$cf_new_extra_cppflags" ; then
8205         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8206
8207 echo "${as_me:-configure}:8207: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8208
8209         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8210 fi
8211
8212 fi
8213
8214 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
8215         echo "$as_me:8215: checking if _XOPEN_SOURCE really is set" >&5
8216 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
8217         cat >conftest.$ac_ext <<_ACEOF
8218 #line 8218 "configure"
8219 #include "confdefs.h"
8220 #include <stdlib.h>
8221 int
8222 main ()
8223 {
8224
8225 #ifndef _XOPEN_SOURCE
8226 make an error
8227 #endif
8228   ;
8229   return 0;
8230 }
8231 _ACEOF
8232 rm -f conftest.$ac_objext
8233 if { (eval echo "$as_me:8233: \"$ac_compile\"") >&5
8234   (eval $ac_compile) 2>&5
8235   ac_status=$?
8236   echo "$as_me:8236: \$? = $ac_status" >&5
8237   (exit $ac_status); } &&
8238          { ac_try='test -s conftest.$ac_objext'
8239   { (eval echo "$as_me:8239: \"$ac_try\"") >&5
8240   (eval $ac_try) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit $ac_status); }; }; then
8244   cf_XOPEN_SOURCE_set=yes
8245 else
8246   echo "$as_me: failed program was:" >&5
8247 cat conftest.$ac_ext >&5
8248 cf_XOPEN_SOURCE_set=no
8249 fi
8250 rm -f conftest.$ac_objext conftest.$ac_ext
8251         echo "$as_me:8251: result: $cf_XOPEN_SOURCE_set" >&5
8252 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
8253         if test $cf_XOPEN_SOURCE_set = yes
8254         then
8255                 cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <stdlib.h>
8259 int
8260 main ()
8261 {
8262
8263 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
8264 make an error
8265 #endif
8266   ;
8267   return 0;
8268 }
8269 _ACEOF
8270 rm -f conftest.$ac_objext
8271 if { (eval echo "$as_me:8271: \"$ac_compile\"") >&5
8272   (eval $ac_compile) 2>&5
8273   ac_status=$?
8274   echo "$as_me:8274: \$? = $ac_status" >&5
8275   (exit $ac_status); } &&
8276          { ac_try='test -s conftest.$ac_objext'
8277   { (eval echo "$as_me:8277: \"$ac_try\"") >&5
8278   (eval $ac_try) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); }; }; then
8282   cf_XOPEN_SOURCE_set_ok=yes
8283 else
8284   echo "$as_me: failed program was:" >&5
8285 cat conftest.$ac_ext >&5
8286 cf_XOPEN_SOURCE_set_ok=no
8287 fi
8288 rm -f conftest.$ac_objext conftest.$ac_ext
8289                 if test $cf_XOPEN_SOURCE_set_ok = no
8290                 then
8291                         { echo "$as_me:8291: WARNING: _XOPEN_SOURCE is lower than requested" >&5
8292 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
8293                 fi
8294         else
8295
8296 echo "$as_me:8296: checking if we should define _XOPEN_SOURCE" >&5
8297 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
8298 if test "${cf_cv_xopen_source+set}" = set; then
8299   echo $ECHO_N "(cached) $ECHO_C" >&6
8300 else
8301
8302         cat >conftest.$ac_ext <<_ACEOF
8303 #line 8303 "configure"
8304 #include "confdefs.h"
8305
8306 #include <stdlib.h>
8307 #include <string.h>
8308 #include <sys/types.h>
8309
8310 int
8311 main ()
8312 {
8313
8314 #ifndef _XOPEN_SOURCE
8315 make an error
8316 #endif
8317   ;
8318   return 0;
8319 }
8320 _ACEOF
8321 rm -f conftest.$ac_objext
8322 if { (eval echo "$as_me:8322: \"$ac_compile\"") >&5
8323   (eval $ac_compile) 2>&5
8324   ac_status=$?
8325   echo "$as_me:8325: \$? = $ac_status" >&5
8326   (exit $ac_status); } &&
8327          { ac_try='test -s conftest.$ac_objext'
8328   { (eval echo "$as_me:8328: \"$ac_try\"") >&5
8329   (eval $ac_try) 2>&5
8330   ac_status=$?
8331   echo "$as_me:8331: \$? = $ac_status" >&5
8332   (exit $ac_status); }; }; then
8333   cf_cv_xopen_source=no
8334 else
8335   echo "$as_me: failed program was:" >&5
8336 cat conftest.$ac_ext >&5
8337 cf_save="$CPPFLAGS"
8338          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
8339          cat >conftest.$ac_ext <<_ACEOF
8340 #line 8340 "configure"
8341 #include "confdefs.h"
8342
8343 #include <stdlib.h>
8344 #include <string.h>
8345 #include <sys/types.h>
8346
8347 int
8348 main ()
8349 {
8350
8351 #ifdef _XOPEN_SOURCE
8352 make an error
8353 #endif
8354   ;
8355   return 0;
8356 }
8357 _ACEOF
8358 rm -f conftest.$ac_objext
8359 if { (eval echo "$as_me:8359: \"$ac_compile\"") >&5
8360   (eval $ac_compile) 2>&5
8361   ac_status=$?
8362   echo "$as_me:8362: \$? = $ac_status" >&5
8363   (exit $ac_status); } &&
8364          { ac_try='test -s conftest.$ac_objext'
8365   { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8366   (eval $ac_try) 2>&5
8367   ac_status=$?
8368   echo "$as_me:8368: \$? = $ac_status" >&5
8369   (exit $ac_status); }; }; then
8370   cf_cv_xopen_source=no
8371 else
8372   echo "$as_me: failed program was:" >&5
8373 cat conftest.$ac_ext >&5
8374 cf_cv_xopen_source=$cf_XOPEN_SOURCE
8375 fi
8376 rm -f conftest.$ac_objext conftest.$ac_ext
8377         CPPFLAGS="$cf_save"
8378
8379 fi
8380 rm -f conftest.$ac_objext conftest.$ac_ext
8381
8382 fi
8383 echo "$as_me:8383: result: $cf_cv_xopen_source" >&5
8384 echo "${ECHO_T}$cf_cv_xopen_source" >&6
8385
8386 if test "$cf_cv_xopen_source" != no ; then
8387
8388 CFLAGS=`echo "$CFLAGS" | \
8389         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8390                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8391
8392 CPPFLAGS=`echo "$CPPFLAGS" | \
8393         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
8394                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
8395
8396         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
8397
8398 cf_fix_cppflags=no
8399 cf_new_cflags=
8400 cf_new_cppflags=
8401 cf_new_extra_cppflags=
8402
8403 for cf_add_cflags in $cf_temp_xopen_source
8404 do
8405 case $cf_fix_cppflags in
8406 no)
8407         case $cf_add_cflags in #(vi
8408         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8409                 case $cf_add_cflags in
8410                 -D*)
8411                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8412
8413                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8414                                 && test -z "${cf_tst_cflags}" \
8415                                 && cf_fix_cppflags=yes
8416
8417                         if test $cf_fix_cppflags = yes ; then
8418                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8419                                 continue
8420                         elif test "${cf_tst_cflags}" = "\"'" ; then
8421                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8422                                 continue
8423                         fi
8424                         ;;
8425                 esac
8426                 case "$CPPFLAGS" in
8427                 *$cf_add_cflags) #(vi
8428                         ;;
8429                 *) #(vi
8430                         case $cf_add_cflags in #(vi
8431                         -D*)
8432                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8433
8434 CPPFLAGS=`echo "$CPPFLAGS" | \
8435         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8436                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8437
8438                                 ;;
8439                         esac
8440                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8441                         ;;
8442                 esac
8443                 ;;
8444         *)
8445                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8446                 ;;
8447         esac
8448         ;;
8449 yes)
8450         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8451
8452         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8453
8454         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8455                 && test -z "${cf_tst_cflags}" \
8456                 && cf_fix_cppflags=no
8457         ;;
8458 esac
8459 done
8460
8461 if test -n "$cf_new_cflags" ; then
8462
8463         CFLAGS="$CFLAGS $cf_new_cflags"
8464 fi
8465
8466 if test -n "$cf_new_cppflags" ; then
8467
8468         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8469 fi
8470
8471 if test -n "$cf_new_extra_cppflags" ; then
8472
8473         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8474 fi
8475
8476 fi
8477
8478         fi
8479 fi
8480
8481 # Work around breakage on OS X
8482
8483 echo "$as_me:8483: checking if SIGWINCH is defined" >&5
8484 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
8485 if test "${cf_cv_define_sigwinch+set}" = set; then
8486   echo $ECHO_N "(cached) $ECHO_C" >&6
8487 else
8488
8489         cat >conftest.$ac_ext <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8492
8493 #include <sys/types.h>
8494 #include <sys/signal.h>
8495
8496 int
8497 main ()
8498 {
8499 int x = SIGWINCH
8500   ;
8501   return 0;
8502 }
8503 _ACEOF
8504 rm -f conftest.$ac_objext
8505 if { (eval echo "$as_me:8505: \"$ac_compile\"") >&5
8506   (eval $ac_compile) 2>&5
8507   ac_status=$?
8508   echo "$as_me:8508: \$? = $ac_status" >&5
8509   (exit $ac_status); } &&
8510          { ac_try='test -s conftest.$ac_objext'
8511   { (eval echo "$as_me:8511: \"$ac_try\"") >&5
8512   (eval $ac_try) 2>&5
8513   ac_status=$?
8514   echo "$as_me:8514: \$? = $ac_status" >&5
8515   (exit $ac_status); }; }; then
8516   cf_cv_define_sigwinch=yes
8517 else
8518   echo "$as_me: failed program was:" >&5
8519 cat conftest.$ac_ext >&5
8520 cat >conftest.$ac_ext <<_ACEOF
8521 #line 8521 "configure"
8522 #include "confdefs.h"
8523
8524 #undef _XOPEN_SOURCE
8525 #undef _POSIX_SOURCE
8526 #undef _POSIX_C_SOURCE
8527 #include <sys/types.h>
8528 #include <sys/signal.h>
8529
8530 int
8531 main ()
8532 {
8533 int x = SIGWINCH
8534   ;
8535   return 0;
8536 }
8537 _ACEOF
8538 rm -f conftest.$ac_objext
8539 if { (eval echo "$as_me:8539: \"$ac_compile\"") >&5
8540   (eval $ac_compile) 2>&5
8541   ac_status=$?
8542   echo "$as_me:8542: \$? = $ac_status" >&5
8543   (exit $ac_status); } &&
8544          { ac_try='test -s conftest.$ac_objext'
8545   { (eval echo "$as_me:8545: \"$ac_try\"") >&5
8546   (eval $ac_try) 2>&5
8547   ac_status=$?
8548   echo "$as_me:8548: \$? = $ac_status" >&5
8549   (exit $ac_status); }; }; then
8550   cf_cv_define_sigwinch=maybe
8551 else
8552   echo "$as_me: failed program was:" >&5
8553 cat conftest.$ac_ext >&5
8554 cf_cv_define_sigwinch=no
8555 fi
8556 rm -f conftest.$ac_objext conftest.$ac_ext
8557
8558 fi
8559 rm -f conftest.$ac_objext conftest.$ac_ext
8560
8561 fi
8562 echo "$as_me:8562: result: $cf_cv_define_sigwinch" >&5
8563 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
8564
8565 if test "$cf_cv_define_sigwinch" = maybe ; then
8566 echo "$as_me:8566: checking for actual SIGWINCH definition" >&5
8567 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
8568 if test "${cf_cv_fixup_sigwinch+set}" = set; then
8569   echo $ECHO_N "(cached) $ECHO_C" >&6
8570 else
8571
8572 cf_cv_fixup_sigwinch=unknown
8573 cf_sigwinch=32
8574 while test $cf_sigwinch != 1
8575 do
8576         cat >conftest.$ac_ext <<_ACEOF
8577 #line 8577 "configure"
8578 #include "confdefs.h"
8579
8580 #undef _XOPEN_SOURCE
8581 #undef _POSIX_SOURCE
8582 #undef _POSIX_C_SOURCE
8583 #include <sys/types.h>
8584 #include <sys/signal.h>
8585
8586 int
8587 main ()
8588 {
8589
8590 #if SIGWINCH != $cf_sigwinch
8591 make an error
8592 #endif
8593 int x = SIGWINCH
8594   ;
8595   return 0;
8596 }
8597 _ACEOF
8598 rm -f conftest.$ac_objext
8599 if { (eval echo "$as_me:8599: \"$ac_compile\"") >&5
8600   (eval $ac_compile) 2>&5
8601   ac_status=$?
8602   echo "$as_me:8602: \$? = $ac_status" >&5
8603   (exit $ac_status); } &&
8604          { ac_try='test -s conftest.$ac_objext'
8605   { (eval echo "$as_me:8605: \"$ac_try\"") >&5
8606   (eval $ac_try) 2>&5
8607   ac_status=$?
8608   echo "$as_me:8608: \$? = $ac_status" >&5
8609   (exit $ac_status); }; }; then
8610   cf_cv_fixup_sigwinch=$cf_sigwinch
8611          break
8612 else
8613   echo "$as_me: failed program was:" >&5
8614 cat conftest.$ac_ext >&5
8615 fi
8616 rm -f conftest.$ac_objext conftest.$ac_ext
8617
8618 cf_sigwinch=`expr $cf_sigwinch - 1`
8619 done
8620
8621 fi
8622 echo "$as_me:8622: result: $cf_cv_fixup_sigwinch" >&5
8623 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
8624
8625         if test "$cf_cv_fixup_sigwinch" != unknown ; then
8626                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
8627         fi
8628 fi
8629
8630 # Checks for CODESET support.
8631
8632   echo "$as_me:8632: checking for nl_langinfo and CODESET" >&5
8633 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
8634 if test "${am_cv_langinfo_codeset+set}" = set; then
8635   echo $ECHO_N "(cached) $ECHO_C" >&6
8636 else
8637   cat >conftest.$ac_ext <<_ACEOF
8638 #line 8638 "configure"
8639 #include "confdefs.h"
8640 #include <langinfo.h>
8641 int
8642 main ()
8643 {
8644 char* cs = nl_langinfo(CODESET);
8645   ;
8646   return 0;
8647 }
8648 _ACEOF
8649 rm -f conftest.$ac_objext conftest$ac_exeext
8650 if { (eval echo "$as_me:8650: \"$ac_link\"") >&5
8651   (eval $ac_link) 2>&5
8652   ac_status=$?
8653   echo "$as_me:8653: \$? = $ac_status" >&5
8654   (exit $ac_status); } &&
8655          { ac_try='test -s conftest$ac_exeext'
8656   { (eval echo "$as_me:8656: \"$ac_try\"") >&5
8657   (eval $ac_try) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit $ac_status); }; }; then
8661   am_cv_langinfo_codeset=yes
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 cat conftest.$ac_ext >&5
8665 am_cv_langinfo_codeset=no
8666 fi
8667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8668
8669 fi
8670 echo "$as_me:8670: result: $am_cv_langinfo_codeset" >&5
8671 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
8672   if test $am_cv_langinfo_codeset = yes; then
8673
8674 cat >>confdefs.h <<\EOF
8675 #define HAVE_LANGINFO_CODESET 1
8676 EOF
8677
8678   fi
8679
8680 # use these variables to work around a defect in gcc's fixincludes.
8681 NCURSES_OK_WCHAR_T=
8682 NCURSES_OK_WINT_T=
8683
8684 echo "$as_me:8684: checking if you want wide-character code" >&5
8685 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
8686
8687 # Check whether --enable-widec or --disable-widec was given.
8688 if test "${enable_widec+set}" = set; then
8689   enableval="$enable_widec"
8690   with_widec=$enableval
8691 else
8692   with_widec=no
8693 fi;
8694 echo "$as_me:8694: result: $with_widec" >&5
8695 echo "${ECHO_T}$with_widec" >&6
8696 if test "x$with_widec" = xyes ; then
8697         if test "x$disable_lib_suffixes" = xno ; then
8698                 LIB_SUFFIX="w${LIB_SUFFIX}"
8699         fi
8700
8701 cat >>confdefs.h <<\EOF
8702 #define USE_WIDEC_SUPPORT 1
8703 EOF
8704
8705 cat >>confdefs.h <<\EOF
8706 #define NCURSES_WIDECHAR 1
8707 EOF
8708
8709 echo "$as_me:8709: checking if wchar.h can be used as is" >&5
8710 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
8711 if test "${cf_cv_wchar_h_okay+set}" = set; then
8712   echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714
8715 cat >conftest.$ac_ext <<_ACEOF
8716 #line 8716 "configure"
8717 #include "confdefs.h"
8718
8719 #include <stdlib.h>
8720 #include <wchar.h>
8721
8722 int
8723 main ()
8724 {
8725
8726         wint_t foo = 0;
8727         int bar = iswpunct(foo)
8728   ;
8729   return 0;
8730 }
8731 _ACEOF
8732 rm -f conftest.$ac_objext
8733 if { (eval echo "$as_me:8733: \"$ac_compile\"") >&5
8734   (eval $ac_compile) 2>&5
8735   ac_status=$?
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit $ac_status); } &&
8738          { ac_try='test -s conftest.$ac_objext'
8739   { (eval echo "$as_me:8739: \"$ac_try\"") >&5
8740   (eval $ac_try) 2>&5
8741   ac_status=$?
8742   echo "$as_me:8742: \$? = $ac_status" >&5
8743   (exit $ac_status); }; }; then
8744   cf_cv_wchar_h_okay=yes
8745 else
8746   echo "$as_me: failed program was:" >&5
8747 cat conftest.$ac_ext >&5
8748 cf_cv_wchar_h_okay=no
8749 fi
8750 rm -f conftest.$ac_objext conftest.$ac_ext
8751 fi
8752 echo "$as_me:8752: result: $cf_cv_wchar_h_okay" >&5
8753 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
8754
8755 if test $cf_cv_wchar_h_okay = no
8756 then
8757
8758 echo "$as_me:8758: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8759 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
8760 cat >conftest.$ac_ext <<_ACEOF
8761 #line 8761 "configure"
8762 #include "confdefs.h"
8763 #include <sys/types.h>
8764
8765 int
8766 main ()
8767 {
8768
8769 #ifndef _XOPEN_SOURCE_EXTENDED
8770 make an error
8771 #endif
8772   ;
8773   return 0;
8774 }
8775 _ACEOF
8776 rm -f conftest.$ac_objext
8777 if { (eval echo "$as_me:8777: \"$ac_compile\"") >&5
8778   (eval $ac_compile) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); } &&
8782          { ac_try='test -s conftest.$ac_objext'
8783   { (eval echo "$as_me:8783: \"$ac_try\"") >&5
8784   (eval $ac_try) 2>&5
8785   ac_status=$?
8786   echo "$as_me:8786: \$? = $ac_status" >&5
8787   (exit $ac_status); }; }; then
8788   cf_result=no
8789 else
8790   echo "$as_me: failed program was:" >&5
8791 cat conftest.$ac_ext >&5
8792 cf_result=yes
8793 fi
8794 rm -f conftest.$ac_objext conftest.$ac_ext
8795 echo "$as_me:8795: result: $cf_result" >&5
8796 echo "${ECHO_T}$cf_result" >&6
8797
8798 if test "$cf_result" = yes ; then
8799         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8800 elif test "x" != "x" ; then
8801         echo "$as_me:8801: checking checking for compatible value versus " >&5
8802 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8803         cat >conftest.$ac_ext <<_ACEOF
8804 #line 8804 "configure"
8805 #include "confdefs.h"
8806 #include <sys/types.h>
8807
8808 int
8809 main ()
8810 {
8811
8812 #if _XOPEN_SOURCE_EXTENDED- < 0
8813 make an error
8814 #endif
8815   ;
8816   return 0;
8817 }
8818 _ACEOF
8819 rm -f conftest.$ac_objext
8820 if { (eval echo "$as_me:8820: \"$ac_compile\"") >&5
8821   (eval $ac_compile) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); } &&
8825          { ac_try='test -s conftest.$ac_objext'
8826   { (eval echo "$as_me:8826: \"$ac_try\"") >&5
8827   (eval $ac_try) 2>&5
8828   ac_status=$?
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); }; }; then
8831   cf_result=yes
8832 else
8833   echo "$as_me: failed program was:" >&5
8834 cat conftest.$ac_ext >&5
8835 cf_result=no
8836 fi
8837 rm -f conftest.$ac_objext conftest.$ac_ext
8838         echo "$as_me:8838: result: $cf_result" >&5
8839 echo "${ECHO_T}$cf_result" >&6
8840         if test "$cf_result" = no ; then
8841                 # perhaps we can override it - try...
8842                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8843         fi
8844 fi
8845
8846 fi
8847
8848         # with_overwrite=no
8849         NCURSES_CH_T=cchar_t
8850
8851 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8852 do
8853 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8854 echo "$as_me:8854: checking for $ac_func" >&5
8855 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8856 if eval "test \"\${$as_ac_var+set}\" = set"; then
8857   echo $ECHO_N "(cached) $ECHO_C" >&6
8858 else
8859   cat >conftest.$ac_ext <<_ACEOF
8860 #line 8860 "configure"
8861 #include "confdefs.h"
8862 /* System header to define __stub macros and hopefully few prototypes,
8863     which can conflict with char $ac_func (); below.  */
8864 #include <assert.h>
8865 /* Override any gcc2 internal prototype to avoid an error.  */
8866 #ifdef __cplusplus
8867 extern "C"
8868 #endif
8869 /* We use char because int might match the return type of a gcc2
8870    builtin and then its argument prototype would still apply.  */
8871 char $ac_func ();
8872 char (*f) ();
8873
8874 int
8875 main ()
8876 {
8877 /* The GNU C library defines this for functions which it implements
8878     to always fail with ENOSYS.  Some functions are actually named
8879     something starting with __ and the normal name is an alias.  */
8880 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8881 choke me
8882 #else
8883 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8884 #endif
8885
8886   ;
8887   return 0;
8888 }
8889 _ACEOF
8890 rm -f conftest.$ac_objext conftest$ac_exeext
8891 if { (eval echo "$as_me:8891: \"$ac_link\"") >&5
8892   (eval $ac_link) 2>&5
8893   ac_status=$?
8894   echo "$as_me:8894: \$? = $ac_status" >&5
8895   (exit $ac_status); } &&
8896          { ac_try='test -s conftest$ac_exeext'
8897   { (eval echo "$as_me:8897: \"$ac_try\"") >&5
8898   (eval $ac_try) 2>&5
8899   ac_status=$?
8900   echo "$as_me:8900: \$? = $ac_status" >&5
8901   (exit $ac_status); }; }; then
8902   eval "$as_ac_var=yes"
8903 else
8904   echo "$as_me: failed program was:" >&5
8905 cat conftest.$ac_ext >&5
8906 eval "$as_ac_var=no"
8907 fi
8908 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8909 fi
8910 echo "$as_me:8910: result: `eval echo '${'$as_ac_var'}'`" >&5
8911 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8912 if test `eval echo '${'$as_ac_var'}'` = yes; then
8913   cat >>confdefs.h <<EOF
8914 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8915 EOF
8916
8917 fi
8918 done
8919
8920         if test "x$ac_cv_func_putwc" != xyes ; then
8921
8922 echo "$as_me:8922: checking for multibyte character support" >&5
8923 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8924 if test "${cf_cv_utf8_lib+set}" = set; then
8925   echo $ECHO_N "(cached) $ECHO_C" >&6
8926 else
8927
8928         cf_save_LIBS="$LIBS"
8929         cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932
8933 #include <stdlib.h>
8934 int
8935 main ()
8936 {
8937 putwc(0,0);
8938   ;
8939   return 0;
8940 }
8941 _ACEOF
8942 rm -f conftest.$ac_objext conftest$ac_exeext
8943 if { (eval echo "$as_me:8943: \"$ac_link\"") >&5
8944   (eval $ac_link) 2>&5
8945   ac_status=$?
8946   echo "$as_me:8946: \$? = $ac_status" >&5
8947   (exit $ac_status); } &&
8948          { ac_try='test -s conftest$ac_exeext'
8949   { (eval echo "$as_me:8949: \"$ac_try\"") >&5
8950   (eval $ac_try) 2>&5
8951   ac_status=$?
8952   echo "$as_me:8952: \$? = $ac_status" >&5
8953   (exit $ac_status); }; }; then
8954   cf_cv_utf8_lib=yes
8955 else
8956   echo "$as_me: failed program was:" >&5
8957 cat conftest.$ac_ext >&5
8958
8959 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8960 # will be set on completion of the AC_TRY_LINK below.
8961 cf_cv_header_path_utf8=
8962 cf_cv_library_path_utf8=
8963
8964 echo "${as_me:-configure}:8964: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8965
8966 cf_save_LIBS="$LIBS"
8967
8968 cat >conftest.$ac_ext <<_ACEOF
8969 #line 8969 "configure"
8970 #include "confdefs.h"
8971
8972 #include <libutf8.h>
8973 int
8974 main ()
8975 {
8976 putwc(0,0);
8977   ;
8978   return 0;
8979 }
8980 _ACEOF
8981 rm -f conftest.$ac_objext conftest$ac_exeext
8982 if { (eval echo "$as_me:8982: \"$ac_link\"") >&5
8983   (eval $ac_link) 2>&5
8984   ac_status=$?
8985   echo "$as_me:8985: \$? = $ac_status" >&5
8986   (exit $ac_status); } &&
8987          { ac_try='test -s conftest$ac_exeext'
8988   { (eval echo "$as_me:8988: \"$ac_try\"") >&5
8989   (eval $ac_try) 2>&5
8990   ac_status=$?
8991   echo "$as_me:8991: \$? = $ac_status" >&5
8992   (exit $ac_status); }; }; then
8993
8994         cf_cv_find_linkage_utf8=yes
8995         cf_cv_header_path_utf8=/usr/include
8996         cf_cv_library_path_utf8=/usr/lib
8997
8998 else
8999   echo "$as_me: failed program was:" >&5
9000 cat conftest.$ac_ext >&5
9001
9002 LIBS="-lutf8  $cf_save_LIBS"
9003
9004 cat >conftest.$ac_ext <<_ACEOF
9005 #line 9005 "configure"
9006 #include "confdefs.h"
9007
9008 #include <libutf8.h>
9009 int
9010 main ()
9011 {
9012 putwc(0,0);
9013   ;
9014   return 0;
9015 }
9016 _ACEOF
9017 rm -f conftest.$ac_objext conftest$ac_exeext
9018 if { (eval echo "$as_me:9018: \"$ac_link\"") >&5
9019   (eval $ac_link) 2>&5
9020   ac_status=$?
9021   echo "$as_me:9021: \$? = $ac_status" >&5
9022   (exit $ac_status); } &&
9023          { ac_try='test -s conftest$ac_exeext'
9024   { (eval echo "$as_me:9024: \"$ac_try\"") >&5
9025   (eval $ac_try) 2>&5
9026   ac_status=$?
9027   echo "$as_me:9027: \$? = $ac_status" >&5
9028   (exit $ac_status); }; }; then
9029
9030         cf_cv_find_linkage_utf8=yes
9031         cf_cv_header_path_utf8=/usr/include
9032         cf_cv_library_path_utf8=/usr/lib
9033         cf_cv_library_file_utf8="-lutf8"
9034
9035 else
9036   echo "$as_me: failed program was:" >&5
9037 cat conftest.$ac_ext >&5
9038
9039         cf_cv_find_linkage_utf8=no
9040         LIBS="$cf_save_LIBS"
9041
9042     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
9043
9044 echo "${as_me:-configure}:9044: testing find linkage for utf8 library ..." 1>&5
9045
9046 echo "${as_me:-configure}:9046: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
9047
9048     cf_save_CPPFLAGS="$CPPFLAGS"
9049     cf_test_CPPFLAGS="$CPPFLAGS"
9050
9051 cf_search=
9052
9053 # collect the current set of include-directories from compiler flags
9054 cf_header_path_list=""
9055 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9056         for cf_header_path in $CPPFLAGS $CFLAGS
9057         do
9058                 case $cf_header_path in #(vi
9059                 -I*)
9060                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9061
9062 test "x$cf_header_path" != "xNONE" && \
9063 test -d "$cf_header_path" && \
9064  {
9065         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
9066         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
9067         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
9068         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
9069         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
9070         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
9071 }
9072
9073                         cf_header_path_list="$cf_header_path_list $cf_search"
9074                         ;;
9075                 esac
9076         done
9077 fi
9078
9079 # add the variations for the package we are looking for
9080
9081 cf_search=
9082
9083 test "x/usr" != "x$prefix" && \
9084 test -d "/usr" && \
9085 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9086         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
9087         test -d /usr/include &&          cf_search="$cf_search /usr/include"
9088         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
9089         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
9090         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
9091         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
9092 }
9093
9094 test "x$prefix" != "xNONE" && \
9095 test -d "$prefix" && \
9096  {
9097         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
9098         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9099         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
9100         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
9101         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
9102         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
9103 }
9104
9105 test "x/usr/local" != "x$prefix" && \
9106 test -d "/usr/local" && \
9107 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9108         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
9109         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
9110         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
9111         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
9112         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
9113         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
9114 }
9115
9116 test "x/opt" != "x$prefix" && \
9117 test -d "/opt" && \
9118 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9119         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
9120         test -d /opt/include &&          cf_search="$cf_search /opt/include"
9121         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
9122         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
9123         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
9124         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
9125 }
9126
9127 test "x$HOME" != "x$prefix" && \
9128 test -d "$HOME" && \
9129 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9130         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
9131         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
9132         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
9133         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
9134         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
9135         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
9136 }
9137
9138 test "$includedir" != NONE && \
9139 test "$includedir" != "/usr/include" && \
9140 test -d "$includedir" && {
9141         test -d $includedir &&    cf_search="$cf_search $includedir"
9142         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
9143 }
9144
9145 test "$oldincludedir" != NONE && \
9146 test "$oldincludedir" != "/usr/include" && \
9147 test -d "$oldincludedir" && {
9148         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9149         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
9150 }
9151
9152 cf_search="$cf_search $cf_header_path_list"
9153
9154     for cf_cv_header_path_utf8 in $cf_search
9155     do
9156       if test -d $cf_cv_header_path_utf8 ; then
9157         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
9158
9159 echo "${as_me:-configure}:9159: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
9160
9161         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
9162         cat >conftest.$ac_ext <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165
9166 #include <libutf8.h>
9167 int
9168 main ()
9169 {
9170 putwc(0,0);
9171   ;
9172   return 0;
9173 }
9174 _ACEOF
9175 rm -f conftest.$ac_objext
9176 if { (eval echo "$as_me:9176: \"$ac_compile\"") >&5
9177   (eval $ac_compile) 2>&5
9178   ac_status=$?
9179   echo "$as_me:9179: \$? = $ac_status" >&5
9180   (exit $ac_status); } &&
9181          { ac_try='test -s conftest.$ac_objext'
9182   { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9183   (eval $ac_try) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit $ac_status); }; }; then
9187
9188             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
9189
9190 echo "${as_me:-configure}:9190: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
9191
9192             cf_cv_find_linkage_utf8=maybe
9193             cf_test_CPPFLAGS="$CPPFLAGS"
9194             break
9195 else
9196   echo "$as_me: failed program was:" >&5
9197 cat conftest.$ac_ext >&5
9198
9199             CPPFLAGS="$cf_save_CPPFLAGS"
9200
9201 fi
9202 rm -f conftest.$ac_objext conftest.$ac_ext
9203       fi
9204     done
9205
9206     if test "$cf_cv_find_linkage_utf8" = maybe ; then
9207
9208 echo "${as_me:-configure}:9208: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
9209
9210       cf_save_LIBS="$LIBS"
9211       cf_save_LDFLAGS="$LDFLAGS"
9212
9213       if test "$cf_cv_find_linkage_utf8" != yes ; then
9214
9215 cf_search=
9216 cf_library_path_list=""
9217 if test -n "${LDFLAGS}${LIBS}" ; then
9218         for cf_library_path in $LDFLAGS $LIBS
9219         do
9220                 case $cf_library_path in #(vi
9221                 -L*)
9222                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9223
9224 test "x$cf_library_path" != "xNONE" && \
9225 test -d "$cf_library_path" && \
9226  {
9227         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
9228         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9229         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
9230         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
9231         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
9232         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
9233 }
9234
9235                         cf_library_path_list="$cf_library_path_list $cf_search"
9236                         ;;
9237                 esac
9238         done
9239 fi
9240
9241 cf_search=
9242
9243 test "x/usr" != "x$prefix" && \
9244 test -d "/usr" && \
9245 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
9246         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
9247         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
9248         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
9249         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
9250         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
9251         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
9252 }
9253
9254 test "x$prefix" != "xNONE" && \
9255 test -d "$prefix" && \
9256  {
9257         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
9258         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9259         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
9260         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
9261         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
9262         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
9263 }
9264
9265 test "x/usr/local" != "x$prefix" && \
9266 test -d "/usr/local" && \
9267 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
9268         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
9269         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
9270         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
9271         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
9272         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
9273         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
9274 }
9275
9276 test "x/opt" != "x$prefix" && \
9277 test -d "/opt" && \
9278 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
9279         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
9280         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
9281         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
9282         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
9283         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
9284         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
9285 }
9286
9287 test "x$HOME" != "x$prefix" && \
9288 test -d "$HOME" && \
9289 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
9290         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
9291         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
9292         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
9293         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
9294         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
9295         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
9296 }
9297
9298 cf_search="$cf_library_path_list $cf_search"
9299
9300         for cf_cv_library_path_utf8 in $cf_search
9301         do
9302           if test -d $cf_cv_library_path_utf8 ; then
9303             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
9304
9305 echo "${as_me:-configure}:9305: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
9306
9307             CPPFLAGS="$cf_test_CPPFLAGS"
9308             LIBS="-lutf8  $cf_save_LIBS"
9309             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
9310             cat >conftest.$ac_ext <<_ACEOF
9311 #line 9311 "configure"
9312 #include "confdefs.h"
9313
9314 #include <libutf8.h>
9315 int
9316 main ()
9317 {
9318 putwc(0,0);
9319   ;
9320   return 0;
9321 }
9322 _ACEOF
9323 rm -f conftest.$ac_objext conftest$ac_exeext
9324 if { (eval echo "$as_me:9324: \"$ac_link\"") >&5
9325   (eval $ac_link) 2>&5
9326   ac_status=$?
9327   echo "$as_me:9327: \$? = $ac_status" >&5
9328   (exit $ac_status); } &&
9329          { ac_try='test -s conftest$ac_exeext'
9330   { (eval echo "$as_me:9330: \"$ac_try\"") >&5
9331   (eval $ac_try) 2>&5
9332   ac_status=$?
9333   echo "$as_me:9333: \$? = $ac_status" >&5
9334   (exit $ac_status); }; }; then
9335
9336                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
9337
9338 echo "${as_me:-configure}:9338: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
9339
9340                 cf_cv_find_linkage_utf8=yes
9341                 cf_cv_library_file_utf8="-lutf8"
9342                 break
9343 else
9344   echo "$as_me: failed program was:" >&5
9345 cat conftest.$ac_ext >&5
9346
9347                 CPPFLAGS="$cf_save_CPPFLAGS"
9348                 LIBS="$cf_save_LIBS"
9349                 LDFLAGS="$cf_save_LDFLAGS"
9350
9351 fi
9352 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9353           fi
9354         done
9355         CPPFLAGS="$cf_save_CPPFLAGS"
9356         LDFLAGS="$cf_save_LDFLAGS"
9357       fi
9358
9359     else
9360       cf_cv_find_linkage_utf8=no
9361     fi
9362
9363 fi
9364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9365
9366 fi
9367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9368
9369 LIBS="$cf_save_LIBS"
9370
9371 if test "$cf_cv_find_linkage_utf8" = yes ; then
9372 cf_cv_utf8_lib=add-on
9373 else
9374 cf_cv_utf8_lib=no
9375 fi
9376
9377 fi
9378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9379 fi
9380 echo "$as_me:9380: result: $cf_cv_utf8_lib" >&5
9381 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
9382
9383 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
9384 # ncurses/ncursesw:
9385 if test "$cf_cv_utf8_lib" = "add-on" ; then
9386
9387 cat >>confdefs.h <<\EOF
9388 #define HAVE_LIBUTF8_H 1
9389 EOF
9390
9391 if test -n "$cf_cv_header_path_utf8" ; then
9392   for cf_add_incdir in $cf_cv_header_path_utf8
9393   do
9394         while test $cf_add_incdir != /usr/include
9395         do
9396           if test -d $cf_add_incdir
9397           then
9398                 cf_have_incdir=no
9399                 if test -n "$CFLAGS$CPPFLAGS" ; then
9400                   # a loop is needed to ensure we can add subdirs of existing dirs
9401                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9402                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9403                           cf_have_incdir=yes; break
9404                         fi
9405                   done
9406                 fi
9407
9408                 if test "$cf_have_incdir" = no ; then
9409                   if test "$cf_add_incdir" = /usr/local/include ; then
9410                         if test "$GCC" = yes
9411                         then
9412                           cf_save_CPPFLAGS=$CPPFLAGS
9413                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9414                           cat >conftest.$ac_ext <<_ACEOF
9415 #line 9415 "configure"
9416 #include "confdefs.h"
9417 #include <stdio.h>
9418 int
9419 main ()
9420 {
9421 printf("Hello")
9422   ;
9423   return 0;
9424 }
9425 _ACEOF
9426 rm -f conftest.$ac_objext
9427 if { (eval echo "$as_me:9427: \"$ac_compile\"") >&5
9428   (eval $ac_compile) 2>&5
9429   ac_status=$?
9430   echo "$as_me:9430: \$? = $ac_status" >&5
9431   (exit $ac_status); } &&
9432          { ac_try='test -s conftest.$ac_objext'
9433   { (eval echo "$as_me:9433: \"$ac_try\"") >&5
9434   (eval $ac_try) 2>&5
9435   ac_status=$?
9436   echo "$as_me:9436: \$? = $ac_status" >&5
9437   (exit $ac_status); }; }; then
9438   :
9439 else
9440   echo "$as_me: failed program was:" >&5
9441 cat conftest.$ac_ext >&5
9442 cf_have_incdir=yes
9443 fi
9444 rm -f conftest.$ac_objext conftest.$ac_ext
9445                           CPPFLAGS=$cf_save_CPPFLAGS
9446                         fi
9447                   fi
9448                 fi
9449
9450                 if test "$cf_have_incdir" = no ; then
9451                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
9452
9453 echo "${as_me:-configure}:9453: testing adding $cf_add_incdir to include-path ..." 1>&5
9454
9455                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9456
9457                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9458                   test "$cf_top_incdir" = "$cf_add_incdir" && break
9459                   cf_add_incdir="$cf_top_incdir"
9460                 else
9461                   break
9462                 fi
9463           fi
9464         done
9465   done
9466 fi
9467
9468 if test -n "$cf_cv_library_path_utf8" ; then
9469   for cf_add_libdir in $cf_cv_library_path_utf8
9470   do
9471     if test $cf_add_libdir = /usr/lib ; then
9472       :
9473     elif test -d $cf_add_libdir
9474     then
9475       cf_have_libdir=no
9476       if test -n "$LDFLAGS$LIBS" ; then
9477         # a loop is needed to ensure we can add subdirs of existing dirs
9478         for cf_test_libdir in $LDFLAGS $LIBS ; do
9479           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9480             cf_have_libdir=yes; break
9481           fi
9482         done
9483       fi
9484       if test "$cf_have_libdir" = no ; then
9485         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
9486
9487 echo "${as_me:-configure}:9487: testing adding $cf_add_libdir to library-path ..." 1>&5
9488
9489         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9490       fi
9491     fi
9492   done
9493 fi
9494
9495 cf_add_libs="$cf_cv_library_file_utf8"
9496 # Filter out duplicates - this happens with badly-designed ".pc" files...
9497 for cf_add_1lib in $LIBS
9498 do
9499         for cf_add_2lib in $cf_add_libs
9500         do
9501                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
9502                 then
9503                         cf_add_1lib=
9504                         break
9505                 fi
9506         done
9507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9508 done
9509 LIBS="$cf_add_libs"
9510
9511 fi
9512
9513                 if test "$cf_cv_utf8_lib" != no ; then
9514                         NCURSES_LIBUTF8=1
9515                 fi
9516         fi
9517
9518 # This is needed on Tru64 5.0 to declare mbstate_t
9519 echo "$as_me:9519: checking if we must include wchar.h to declare mbstate_t" >&5
9520 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
9521 if test "${cf_cv_mbstate_t+set}" = set; then
9522   echo $ECHO_N "(cached) $ECHO_C" >&6
9523 else
9524
9525 cat >conftest.$ac_ext <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528
9529 #include <stdlib.h>
9530 #include <stdarg.h>
9531 #include <stdio.h>
9532 #ifdef HAVE_LIBUTF8_H
9533 #include <libutf8.h>
9534 #endif
9535 int
9536 main ()
9537 {
9538 mbstate_t state
9539   ;
9540   return 0;
9541 }
9542 _ACEOF
9543 rm -f conftest.$ac_objext
9544 if { (eval echo "$as_me:9544: \"$ac_compile\"") >&5
9545   (eval $ac_compile) 2>&5
9546   ac_status=$?
9547   echo "$as_me:9547: \$? = $ac_status" >&5
9548   (exit $ac_status); } &&
9549          { ac_try='test -s conftest.$ac_objext'
9550   { (eval echo "$as_me:9550: \"$ac_try\"") >&5
9551   (eval $ac_try) 2>&5
9552   ac_status=$?
9553   echo "$as_me:9553: \$? = $ac_status" >&5
9554   (exit $ac_status); }; }; then
9555   cf_cv_mbstate_t=no
9556 else
9557   echo "$as_me: failed program was:" >&5
9558 cat conftest.$ac_ext >&5
9559 cat >conftest.$ac_ext <<_ACEOF
9560 #line 9560 "configure"
9561 #include "confdefs.h"
9562
9563 #include <stdlib.h>
9564 #include <stdarg.h>
9565 #include <stdio.h>
9566 #include <wchar.h>
9567 #ifdef HAVE_LIBUTF8_H
9568 #include <libutf8.h>
9569 #endif
9570 int
9571 main ()
9572 {
9573 mbstate_t value
9574   ;
9575   return 0;
9576 }
9577 _ACEOF
9578 rm -f conftest.$ac_objext
9579 if { (eval echo "$as_me:9579: \"$ac_compile\"") >&5
9580   (eval $ac_compile) 2>&5
9581   ac_status=$?
9582   echo "$as_me:9582: \$? = $ac_status" >&5
9583   (exit $ac_status); } &&
9584          { ac_try='test -s conftest.$ac_objext'
9585   { (eval echo "$as_me:9585: \"$ac_try\"") >&5
9586   (eval $ac_try) 2>&5
9587   ac_status=$?
9588   echo "$as_me:9588: \$? = $ac_status" >&5
9589   (exit $ac_status); }; }; then
9590   cf_cv_mbstate_t=yes
9591 else
9592   echo "$as_me: failed program was:" >&5
9593 cat conftest.$ac_ext >&5
9594 cf_cv_mbstate_t=unknown
9595 fi
9596 rm -f conftest.$ac_objext conftest.$ac_ext
9597 fi
9598 rm -f conftest.$ac_objext conftest.$ac_ext
9599 fi
9600 echo "$as_me:9600: result: $cf_cv_mbstate_t" >&5
9601 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
9602
9603 if test "$cf_cv_mbstate_t" = yes ; then
9604
9605 cat >>confdefs.h <<\EOF
9606 #define NEED_WCHAR_H 1
9607 EOF
9608
9609         NEED_WCHAR_H=1
9610 fi
9611
9612 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9613 if test "$cf_cv_mbstate_t" = unknown ; then
9614         NCURSES_MBSTATE_T=1
9615 fi
9616
9617 # This is needed on Tru64 5.0 to declare wchar_t
9618 echo "$as_me:9618: checking if we must include wchar.h to declare wchar_t" >&5
9619 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
9620 if test "${cf_cv_wchar_t+set}" = set; then
9621   echo $ECHO_N "(cached) $ECHO_C" >&6
9622 else
9623
9624 cat >conftest.$ac_ext <<_ACEOF
9625 #line 9625 "configure"
9626 #include "confdefs.h"
9627
9628 #include <stdlib.h>
9629 #include <stdarg.h>
9630 #include <stdio.h>
9631 #ifdef HAVE_LIBUTF8_H
9632 #include <libutf8.h>
9633 #endif
9634 int
9635 main ()
9636 {
9637 wchar_t state
9638   ;
9639   return 0;
9640 }
9641 _ACEOF
9642 rm -f conftest.$ac_objext
9643 if { (eval echo "$as_me:9643: \"$ac_compile\"") >&5
9644   (eval $ac_compile) 2>&5
9645   ac_status=$?
9646   echo "$as_me:9646: \$? = $ac_status" >&5
9647   (exit $ac_status); } &&
9648          { ac_try='test -s conftest.$ac_objext'
9649   { (eval echo "$as_me:9649: \"$ac_try\"") >&5
9650   (eval $ac_try) 2>&5
9651   ac_status=$?
9652   echo "$as_me:9652: \$? = $ac_status" >&5
9653   (exit $ac_status); }; }; then
9654   cf_cv_wchar_t=no
9655 else
9656   echo "$as_me: failed program was:" >&5
9657 cat conftest.$ac_ext >&5
9658 cat >conftest.$ac_ext <<_ACEOF
9659 #line 9659 "configure"
9660 #include "confdefs.h"
9661
9662 #include <stdlib.h>
9663 #include <stdarg.h>
9664 #include <stdio.h>
9665 #include <wchar.h>
9666 #ifdef HAVE_LIBUTF8_H
9667 #include <libutf8.h>
9668 #endif
9669 int
9670 main ()
9671 {
9672 wchar_t value
9673   ;
9674   return 0;
9675 }
9676 _ACEOF
9677 rm -f conftest.$ac_objext
9678 if { (eval echo "$as_me:9678: \"$ac_compile\"") >&5
9679   (eval $ac_compile) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); } &&
9683          { ac_try='test -s conftest.$ac_objext'
9684   { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit $ac_status); }; }; then
9689   cf_cv_wchar_t=yes
9690 else
9691   echo "$as_me: failed program was:" >&5
9692 cat conftest.$ac_ext >&5
9693 cf_cv_wchar_t=unknown
9694 fi
9695 rm -f conftest.$ac_objext conftest.$ac_ext
9696 fi
9697 rm -f conftest.$ac_objext conftest.$ac_ext
9698 fi
9699 echo "$as_me:9699: result: $cf_cv_wchar_t" >&5
9700 echo "${ECHO_T}$cf_cv_wchar_t" >&6
9701
9702 if test "$cf_cv_wchar_t" = yes ; then
9703
9704 cat >>confdefs.h <<\EOF
9705 #define NEED_WCHAR_H 1
9706 EOF
9707
9708         NEED_WCHAR_H=1
9709 fi
9710
9711 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9712 if test "$cf_cv_wchar_t" = unknown ; then
9713         NCURSES_WCHAR_T=1
9714 fi
9715
9716 # if we find wchar_t in either place, use substitution to provide a fallback.
9717 if test "$cf_cv_wchar_t" != unknown ; then
9718         NCURSES_OK_WCHAR_T=1
9719 fi
9720
9721 # This is needed on Tru64 5.0 to declare wint_t
9722 echo "$as_me:9722: checking if we must include wchar.h to declare wint_t" >&5
9723 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
9724 if test "${cf_cv_wint_t+set}" = set; then
9725   echo $ECHO_N "(cached) $ECHO_C" >&6
9726 else
9727
9728 cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731
9732 #include <stdlib.h>
9733 #include <stdarg.h>
9734 #include <stdio.h>
9735 #ifdef HAVE_LIBUTF8_H
9736 #include <libutf8.h>
9737 #endif
9738 int
9739 main ()
9740 {
9741 wint_t state
9742   ;
9743   return 0;
9744 }
9745 _ACEOF
9746 rm -f conftest.$ac_objext
9747 if { (eval echo "$as_me:9747: \"$ac_compile\"") >&5
9748   (eval $ac_compile) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); } &&
9752          { ac_try='test -s conftest.$ac_objext'
9753   { (eval echo "$as_me:9753: \"$ac_try\"") >&5
9754   (eval $ac_try) 2>&5
9755   ac_status=$?
9756   echo "$as_me:9756: \$? = $ac_status" >&5
9757   (exit $ac_status); }; }; then
9758   cf_cv_wint_t=no
9759 else
9760   echo "$as_me: failed program was:" >&5
9761 cat conftest.$ac_ext >&5
9762 cat >conftest.$ac_ext <<_ACEOF
9763 #line 9763 "configure"
9764 #include "confdefs.h"
9765
9766 #include <stdlib.h>
9767 #include <stdarg.h>
9768 #include <stdio.h>
9769 #include <wchar.h>
9770 #ifdef HAVE_LIBUTF8_H
9771 #include <libutf8.h>
9772 #endif
9773 int
9774 main ()
9775 {
9776 wint_t value
9777   ;
9778   return 0;
9779 }
9780 _ACEOF
9781 rm -f conftest.$ac_objext
9782 if { (eval echo "$as_me:9782: \"$ac_compile\"") >&5
9783   (eval $ac_compile) 2>&5
9784   ac_status=$?
9785   echo "$as_me:9785: \$? = $ac_status" >&5
9786   (exit $ac_status); } &&
9787          { ac_try='test -s conftest.$ac_objext'
9788   { (eval echo "$as_me:9788: \"$ac_try\"") >&5
9789   (eval $ac_try) 2>&5
9790   ac_status=$?
9791   echo "$as_me:9791: \$? = $ac_status" >&5
9792   (exit $ac_status); }; }; then
9793   cf_cv_wint_t=yes
9794 else
9795   echo "$as_me: failed program was:" >&5
9796 cat conftest.$ac_ext >&5
9797 cf_cv_wint_t=unknown
9798 fi
9799 rm -f conftest.$ac_objext conftest.$ac_ext
9800 fi
9801 rm -f conftest.$ac_objext conftest.$ac_ext
9802 fi
9803 echo "$as_me:9803: result: $cf_cv_wint_t" >&5
9804 echo "${ECHO_T}$cf_cv_wint_t" >&6
9805
9806 if test "$cf_cv_wint_t" = yes ; then
9807
9808 cat >>confdefs.h <<\EOF
9809 #define NEED_WCHAR_H 1
9810 EOF
9811
9812         NEED_WCHAR_H=1
9813 fi
9814
9815 # if we do not find wint_t in either place, use substitution to provide a fallback.
9816 if test "$cf_cv_wint_t" = unknown ; then
9817         NCURSES_WINT_T=1
9818 fi
9819
9820 # if we find wint_t in either place, use substitution to provide a fallback.
9821 if test "$cf_cv_wint_t" != unknown ; then
9822         NCURSES_OK_WINT_T=1
9823 fi
9824
9825         if test "$NCURSES_MBSTATE_T" != 0; then
9826
9827 cat >>confdefs.h <<\EOF
9828 #define NEED_MBSTATE_T_DEF 1
9829 EOF
9830
9831         fi
9832 fi
9833
9834 ###   use option --disable-lp64 to allow long chtype
9835 case $cf_cv_abi_version in
9836 [345]*)
9837         default_with_lp64=no
9838         ;;
9839 *)
9840         default_with_lp64=yes
9841         ;;
9842 esac
9843
9844 echo "$as_me:9844: checking whether to enable _LP64 definition in curses.h" >&5
9845 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9846
9847 # Check whether --enable-lp64 or --disable-lp64 was given.
9848 if test "${enable_lp64+set}" = set; then
9849   enableval="$enable_lp64"
9850   with_lp64=$enableval
9851 else
9852   with_lp64=$default_with_lp64
9853 fi;
9854 echo "$as_me:9854: result: $with_lp64" >&5
9855 echo "${ECHO_T}$with_lp64" >&6
9856
9857 if test "x$with_lp64" = xyes ; then
9858         cf_cv_enable_lp64=1
9859 else
9860         cf_cv_enable_lp64=0
9861 fi
9862
9863 # Check whether --enable-largefile or --disable-largefile was given.
9864 if test "${enable_largefile+set}" = set; then
9865   enableval="$enable_largefile"
9866
9867 fi;
9868 if test "$enable_largefile" != no; then
9869
9870   echo "$as_me:9870: checking for special C compiler options needed for large files" >&5
9871 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9872 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9873   echo $ECHO_N "(cached) $ECHO_C" >&6
9874 else
9875   ac_cv_sys_largefile_CC=no
9876      if test "$GCC" != yes; then
9877        ac_save_CC=$CC
9878        while :; do
9879          # IRIX 6.2 and later do not support large files by default,
9880          # so use the C compiler's -n32 option if that helps.
9881          cat >conftest.$ac_ext <<_ACEOF
9882 #line 9882 "configure"
9883 #include "confdefs.h"
9884 #include <sys/types.h>
9885  /* Check that off_t can represent 2**63 - 1 correctly.
9886     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9887     since some C++ compilers masquerading as C compilers
9888     incorrectly reject 9223372036854775807.  */
9889 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9890   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9891                        && LARGE_OFF_T % 2147483647 == 1)
9892                       ? 1 : -1];
9893 int
9894 main ()
9895 {
9896
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901          rm -f conftest.$ac_objext
9902 if { (eval echo "$as_me:9902: \"$ac_compile\"") >&5
9903   (eval $ac_compile) 2>&5
9904   ac_status=$?
9905   echo "$as_me:9905: \$? = $ac_status" >&5
9906   (exit $ac_status); } &&
9907          { ac_try='test -s conftest.$ac_objext'
9908   { (eval echo "$as_me:9908: \"$ac_try\"") >&5
9909   (eval $ac_try) 2>&5
9910   ac_status=$?
9911   echo "$as_me:9911: \$? = $ac_status" >&5
9912   (exit $ac_status); }; }; then
9913   break
9914 else
9915   echo "$as_me: failed program was:" >&5
9916 cat conftest.$ac_ext >&5
9917 fi
9918 rm -f conftest.$ac_objext
9919          CC="$CC -n32"
9920          rm -f conftest.$ac_objext
9921 if { (eval echo "$as_me:9921: \"$ac_compile\"") >&5
9922   (eval $ac_compile) 2>&5
9923   ac_status=$?
9924   echo "$as_me:9924: \$? = $ac_status" >&5
9925   (exit $ac_status); } &&
9926          { ac_try='test -s conftest.$ac_objext'
9927   { (eval echo "$as_me:9927: \"$ac_try\"") >&5
9928   (eval $ac_try) 2>&5
9929   ac_status=$?
9930   echo "$as_me:9930: \$? = $ac_status" >&5
9931   (exit $ac_status); }; }; then
9932   ac_cv_sys_largefile_CC=' -n32'; break
9933 else
9934   echo "$as_me: failed program was:" >&5
9935 cat conftest.$ac_ext >&5
9936 fi
9937 rm -f conftest.$ac_objext
9938          break
9939        done
9940        CC=$ac_save_CC
9941        rm -f conftest.$ac_ext
9942     fi
9943 fi
9944 echo "$as_me:9944: result: $ac_cv_sys_largefile_CC" >&5
9945 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9946   if test "$ac_cv_sys_largefile_CC" != no; then
9947     CC=$CC$ac_cv_sys_largefile_CC
9948   fi
9949
9950   echo "$as_me:9950: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9951 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9952 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9953   echo $ECHO_N "(cached) $ECHO_C" >&6
9954 else
9955   while :; do
9956   ac_cv_sys_file_offset_bits=no
9957   cat >conftest.$ac_ext <<_ACEOF
9958 #line 9958 "configure"
9959 #include "confdefs.h"
9960 #include <sys/types.h>
9961  /* Check that off_t can represent 2**63 - 1 correctly.
9962     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9963     since some C++ compilers masquerading as C compilers
9964     incorrectly reject 9223372036854775807.  */
9965 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9966   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9967                        && LARGE_OFF_T % 2147483647 == 1)
9968                       ? 1 : -1];
9969 int
9970 main ()
9971 {
9972
9973   ;
9974   return 0;
9975 }
9976 _ACEOF
9977 rm -f conftest.$ac_objext
9978 if { (eval echo "$as_me:9978: \"$ac_compile\"") >&5
9979   (eval $ac_compile) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit $ac_status); } &&
9983          { ac_try='test -s conftest.$ac_objext'
9984   { (eval echo "$as_me:9984: \"$ac_try\"") >&5
9985   (eval $ac_try) 2>&5
9986   ac_status=$?
9987   echo "$as_me:9987: \$? = $ac_status" >&5
9988   (exit $ac_status); }; }; then
9989   break
9990 else
9991   echo "$as_me: failed program was:" >&5
9992 cat conftest.$ac_ext >&5
9993 fi
9994 rm -f conftest.$ac_objext conftest.$ac_ext
9995   cat >conftest.$ac_ext <<_ACEOF
9996 #line 9996 "configure"
9997 #include "confdefs.h"
9998 #define _FILE_OFFSET_BITS 64
9999 #include <sys/types.h>
10000  /* Check that off_t can represent 2**63 - 1 correctly.
10001     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10002     since some C++ compilers masquerading as C compilers
10003     incorrectly reject 9223372036854775807.  */
10004 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10005   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10006                        && LARGE_OFF_T % 2147483647 == 1)
10007                       ? 1 : -1];
10008 int
10009 main ()
10010 {
10011
10012   ;
10013   return 0;
10014 }
10015 _ACEOF
10016 rm -f conftest.$ac_objext
10017 if { (eval echo "$as_me:10017: \"$ac_compile\"") >&5
10018   (eval $ac_compile) 2>&5
10019   ac_status=$?
10020   echo "$as_me:10020: \$? = $ac_status" >&5
10021   (exit $ac_status); } &&
10022          { ac_try='test -s conftest.$ac_objext'
10023   { (eval echo "$as_me:10023: \"$ac_try\"") >&5
10024   (eval $ac_try) 2>&5
10025   ac_status=$?
10026   echo "$as_me:10026: \$? = $ac_status" >&5
10027   (exit $ac_status); }; }; then
10028   ac_cv_sys_file_offset_bits=64; break
10029 else
10030   echo "$as_me: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10032 fi
10033 rm -f conftest.$ac_objext conftest.$ac_ext
10034   break
10035 done
10036 fi
10037 echo "$as_me:10037: result: $ac_cv_sys_file_offset_bits" >&5
10038 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
10039 if test "$ac_cv_sys_file_offset_bits" != no; then
10040
10041 cat >>confdefs.h <<EOF
10042 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
10043 EOF
10044
10045 fi
10046 rm -rf conftest*
10047   echo "$as_me:10047: checking for _LARGE_FILES value needed for large files" >&5
10048 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
10049 if test "${ac_cv_sys_large_files+set}" = set; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   while :; do
10053   ac_cv_sys_large_files=no
10054   cat >conftest.$ac_ext <<_ACEOF
10055 #line 10055 "configure"
10056 #include "confdefs.h"
10057 #include <sys/types.h>
10058  /* Check that off_t can represent 2**63 - 1 correctly.
10059     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10060     since some C++ compilers masquerading as C compilers
10061     incorrectly reject 9223372036854775807.  */
10062 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10063   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10064                        && LARGE_OFF_T % 2147483647 == 1)
10065                       ? 1 : -1];
10066 int
10067 main ()
10068 {
10069
10070   ;
10071   return 0;
10072 }
10073 _ACEOF
10074 rm -f conftest.$ac_objext
10075 if { (eval echo "$as_me:10075: \"$ac_compile\"") >&5
10076   (eval $ac_compile) 2>&5
10077   ac_status=$?
10078   echo "$as_me:10078: \$? = $ac_status" >&5
10079   (exit $ac_status); } &&
10080          { ac_try='test -s conftest.$ac_objext'
10081   { (eval echo "$as_me:10081: \"$ac_try\"") >&5
10082   (eval $ac_try) 2>&5
10083   ac_status=$?
10084   echo "$as_me:10084: \$? = $ac_status" >&5
10085   (exit $ac_status); }; }; then
10086   break
10087 else
10088   echo "$as_me: failed program was:" >&5
10089 cat conftest.$ac_ext >&5
10090 fi
10091 rm -f conftest.$ac_objext conftest.$ac_ext
10092   cat >conftest.$ac_ext <<_ACEOF
10093 #line 10093 "configure"
10094 #include "confdefs.h"
10095 #define _LARGE_FILES 1
10096 #include <sys/types.h>
10097  /* Check that off_t can represent 2**63 - 1 correctly.
10098     We can't simply define LARGE_OFF_T to be 9223372036854775807,
10099     since some C++ compilers masquerading as C compilers
10100     incorrectly reject 9223372036854775807.  */
10101 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
10102   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
10103                        && LARGE_OFF_T % 2147483647 == 1)
10104                       ? 1 : -1];
10105 int
10106 main ()
10107 {
10108
10109   ;
10110   return 0;
10111 }
10112 _ACEOF
10113 rm -f conftest.$ac_objext
10114 if { (eval echo "$as_me:10114: \"$ac_compile\"") >&5
10115   (eval $ac_compile) 2>&5
10116   ac_status=$?
10117   echo "$as_me:10117: \$? = $ac_status" >&5
10118   (exit $ac_status); } &&
10119          { ac_try='test -s conftest.$ac_objext'
10120   { (eval echo "$as_me:10120: \"$ac_try\"") >&5
10121   (eval $ac_try) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit $ac_status); }; }; then
10125   ac_cv_sys_large_files=1; break
10126 else
10127   echo "$as_me: failed program was:" >&5
10128 cat conftest.$ac_ext >&5
10129 fi
10130 rm -f conftest.$ac_objext conftest.$ac_ext
10131   break
10132 done
10133 fi
10134 echo "$as_me:10134: result: $ac_cv_sys_large_files" >&5
10135 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
10136 if test "$ac_cv_sys_large_files" != no; then
10137
10138 cat >>confdefs.h <<EOF
10139 #define _LARGE_FILES $ac_cv_sys_large_files
10140 EOF
10141
10142 fi
10143 rm -rf conftest*
10144 fi
10145
10146     if test "$enable_largefile" != no ; then
10147         echo "$as_me:10147: checking for _LARGEFILE_SOURCE value needed for large files" >&5
10148 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
10149 if test "${ac_cv_sys_largefile_source+set}" = set; then
10150   echo $ECHO_N "(cached) $ECHO_C" >&6
10151 else
10152   while :; do
10153   ac_cv_sys_largefile_source=no
10154   cat >conftest.$ac_ext <<_ACEOF
10155 #line 10155 "configure"
10156 #include "confdefs.h"
10157 #include <stdio.h>
10158 int
10159 main ()
10160 {
10161 return !fseeko;
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 rm -f conftest.$ac_objext
10167 if { (eval echo "$as_me:10167: \"$ac_compile\"") >&5
10168   (eval $ac_compile) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); } &&
10172          { ac_try='test -s conftest.$ac_objext'
10173   { (eval echo "$as_me:10173: \"$ac_try\"") >&5
10174   (eval $ac_try) 2>&5
10175   ac_status=$?
10176   echo "$as_me:10176: \$? = $ac_status" >&5
10177   (exit $ac_status); }; }; then
10178   break
10179 else
10180   echo "$as_me: failed program was:" >&5
10181 cat conftest.$ac_ext >&5
10182 fi
10183 rm -f conftest.$ac_objext conftest.$ac_ext
10184   cat >conftest.$ac_ext <<_ACEOF
10185 #line 10185 "configure"
10186 #include "confdefs.h"
10187 #define _LARGEFILE_SOURCE 1
10188 #include <stdio.h>
10189 int
10190 main ()
10191 {
10192 return !fseeko;
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 rm -f conftest.$ac_objext
10198 if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5
10199   (eval $ac_compile) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -s conftest.$ac_objext'
10204   { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205   (eval $ac_try) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); }; }; then
10209   ac_cv_sys_largefile_source=1; break
10210 else
10211   echo "$as_me: failed program was:" >&5
10212 cat conftest.$ac_ext >&5
10213 fi
10214 rm -f conftest.$ac_objext conftest.$ac_ext
10215   break
10216 done
10217 fi
10218 echo "$as_me:10218: result: $ac_cv_sys_largefile_source" >&5
10219 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
10220 if test "$ac_cv_sys_largefile_source" != no; then
10221
10222 cat >>confdefs.h <<EOF
10223 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
10224 EOF
10225
10226 fi
10227 rm -rf conftest*
10228
10229 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
10230 # in glibc 2.1.3, but that breaks too many other things.
10231 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
10232 echo "$as_me:10232: checking for fseeko" >&5
10233 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
10234 if test "${ac_cv_func_fseeko+set}" = set; then
10235   echo $ECHO_N "(cached) $ECHO_C" >&6
10236 else
10237   cat >conftest.$ac_ext <<_ACEOF
10238 #line 10238 "configure"
10239 #include "confdefs.h"
10240 #include <stdio.h>
10241 int
10242 main ()
10243 {
10244 return fseeko && fseeko (stdin, 0, 0);
10245   ;
10246   return 0;
10247 }
10248 _ACEOF
10249 rm -f conftest.$ac_objext conftest$ac_exeext
10250 if { (eval echo "$as_me:10250: \"$ac_link\"") >&5
10251   (eval $ac_link) 2>&5
10252   ac_status=$?
10253   echo "$as_me:10253: \$? = $ac_status" >&5
10254   (exit $ac_status); } &&
10255          { ac_try='test -s conftest$ac_exeext'
10256   { (eval echo "$as_me:10256: \"$ac_try\"") >&5
10257   (eval $ac_try) 2>&5
10258   ac_status=$?
10259   echo "$as_me:10259: \$? = $ac_status" >&5
10260   (exit $ac_status); }; }; then
10261   ac_cv_func_fseeko=yes
10262 else
10263   echo "$as_me: failed program was:" >&5
10264 cat conftest.$ac_ext >&5
10265 ac_cv_func_fseeko=no
10266 fi
10267 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10268 fi
10269 echo "$as_me:10269: result: $ac_cv_func_fseeko" >&5
10270 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
10271 if test $ac_cv_func_fseeko = yes; then
10272
10273 cat >>confdefs.h <<\EOF
10274 #define HAVE_FSEEKO 1
10275 EOF
10276
10277 fi
10278
10279         # Normally we would collect these definitions in the config.h,
10280         # but (like _XOPEN_SOURCE), some environments rely on having these
10281         # defined before any of the system headers are included.  Another
10282         # case comes up with C++, e.g., on AIX the compiler compiles the
10283         # header files by themselves before looking at the body files it is
10284         # told to compile.  For ncurses, those header files do not include
10285         # the config.h
10286         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
10287         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
10288         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
10289
10290         echo "$as_me:10290: checking whether to use struct dirent64" >&5
10291 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
10292 if test "${cf_cv_struct_dirent64+set}" = set; then
10293   echo $ECHO_N "(cached) $ECHO_C" >&6
10294 else
10295
10296                 cat >conftest.$ac_ext <<_ACEOF
10297 #line 10297 "configure"
10298 #include "confdefs.h"
10299
10300 #include <sys/types.h>
10301 #include <dirent.h>
10302
10303 int
10304 main ()
10305 {
10306
10307                 /* if transitional largefile support is setup, this is true */
10308                 extern struct dirent64 * readdir(DIR *);
10309                 struct dirent64 *x = readdir((DIR *)0);
10310                 struct dirent *y = readdir((DIR *)0);
10311                 int z = x - y;
10312
10313   ;
10314   return 0;
10315 }
10316 _ACEOF
10317 rm -f conftest.$ac_objext
10318 if { (eval echo "$as_me:10318: \"$ac_compile\"") >&5
10319   (eval $ac_compile) 2>&5
10320   ac_status=$?
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } &&
10323          { ac_try='test -s conftest.$ac_objext'
10324   { (eval echo "$as_me:10324: \"$ac_try\"") >&5
10325   (eval $ac_try) 2>&5
10326   ac_status=$?
10327   echo "$as_me:10327: \$? = $ac_status" >&5
10328   (exit $ac_status); }; }; then
10329   cf_cv_struct_dirent64=yes
10330 else
10331   echo "$as_me: failed program was:" >&5
10332 cat conftest.$ac_ext >&5
10333 cf_cv_struct_dirent64=no
10334 fi
10335 rm -f conftest.$ac_objext conftest.$ac_ext
10336
10337 fi
10338 echo "$as_me:10338: result: $cf_cv_struct_dirent64" >&5
10339 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
10340         test "$cf_cv_struct_dirent64" = yes &&
10341 cat >>confdefs.h <<\EOF
10342 #define HAVE_STRUCT_DIRENT64 1
10343 EOF
10344
10345     fi
10346
10347 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
10348 echo "$as_me:10348: checking if you want tparm not to use X/Open fixed-parameter list" >&5
10349 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
10350
10351 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
10352 if test "${enable_tparm_varargs+set}" = set; then
10353   enableval="$enable_tparm_varargs"
10354   with_tparm_varargs=$enableval
10355 else
10356   with_tparm_varargs=yes
10357 fi;
10358 echo "$as_me:10358: result: $with_tparm_varargs" >&5
10359 echo "${ECHO_T}$with_tparm_varargs" >&6
10360 NCURSES_TPARM_VARARGS=0
10361 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
10362
10363 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
10364 if test "$with_ticlib" != no ; then
10365 echo "$as_me:10365: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
10366 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
10367
10368 # Check whether --enable-tic-depends or --disable-tic-depends was given.
10369 if test "${enable_tic_depends+set}" = set; then
10370   enableval="$enable_tic_depends"
10371   with_tic_depends=$enableval
10372 else
10373   with_tic_depends=yes
10374 fi;
10375 echo "$as_me:10375: result: $with_tic_depends" >&5
10376 echo "${ECHO_T}$with_tic_depends" >&6
10377 else
10378         with_tic_depends=no
10379 fi
10380
10381 ###   use option --with-bool to override bool's type
10382 echo "$as_me:10382: checking for type of bool" >&5
10383 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
10384
10385 # Check whether --with-bool or --without-bool was given.
10386 if test "${with_bool+set}" = set; then
10387   withval="$with_bool"
10388   NCURSES_BOOL="$withval"
10389 else
10390   NCURSES_BOOL=auto
10391 fi;
10392 echo "$as_me:10392: result: $NCURSES_BOOL" >&5
10393 echo "${ECHO_T}$NCURSES_BOOL" >&6
10394
10395 echo "$as_me:10395: checking for alternate terminal capabilities file" >&5
10396 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
10397
10398 # Check whether --with-caps or --without-caps was given.
10399 if test "${with_caps+set}" = set; then
10400   withval="$with_caps"
10401   TERMINFO_CAPS=Caps.$withval
10402 else
10403   TERMINFO_CAPS=Caps
10404 fi;
10405 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
10406 echo "$as_me:10406: result: $TERMINFO_CAPS" >&5
10407 echo "${ECHO_T}$TERMINFO_CAPS" >&6
10408
10409 ###   use option --with-chtype to override chtype's type
10410 echo "$as_me:10410: checking for type of chtype" >&5
10411 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10412
10413 # Check whether --with-chtype or --without-chtype was given.
10414 if test "${with_chtype+set}" = set; then
10415   withval="$with_chtype"
10416   NCURSES_CHTYPE="$withval"
10417 else
10418   NCURSES_CHTYPE=auto
10419 fi;
10420 echo "$as_me:10420: result: $NCURSES_CHTYPE" >&5
10421 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
10422
10423 ###   use option --with-ospeed to override ospeed's type
10424 echo "$as_me:10424: checking for type of ospeed" >&5
10425 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
10426
10427 # Check whether --with-ospeed or --without-ospeed was given.
10428 if test "${with_ospeed+set}" = set; then
10429   withval="$with_ospeed"
10430   NCURSES_OSPEED="$withval"
10431 else
10432   NCURSES_OSPEED=short
10433 fi;
10434 echo "$as_me:10434: result: $NCURSES_OSPEED" >&5
10435 echo "${ECHO_T}$NCURSES_OSPEED" >&6
10436
10437 ###   use option --with-mmask-t to override mmask_t's type
10438 echo "$as_me:10438: checking for type of mmask_t" >&5
10439 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
10440
10441 # Check whether --with-mmask-t or --without-mmask-t was given.
10442 if test "${with_mmask_t+set}" = set; then
10443   withval="$with_mmask_t"
10444   NCURSES_MMASK_T="$withval"
10445 else
10446   NCURSES_MMASK_T=auto
10447 fi;
10448 echo "$as_me:10448: result: $NCURSES_MMASK_T" >&5
10449 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
10450
10451 ###   use option --with-ccharw-max to override CCHARW_MAX size
10452 echo "$as_me:10452: checking for size CCHARW_MAX" >&5
10453 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
10454
10455 # Check whether --with-ccharw-max or --without-ccharw-max was given.
10456 if test "${with_ccharw_max+set}" = set; then
10457   withval="$with_ccharw_max"
10458   NCURSES_CCHARW_MAX="$withval"
10459 else
10460   NCURSES_CCHARW_MAX=5
10461 fi;
10462 echo "$as_me:10462: result: $NCURSES_CCHARW_MAX" >&5
10463 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
10464
10465 ###   use option --with-tparm-arg to override tparm's argument type
10466 echo "$as_me:10466: checking for type of tparm args" >&5
10467 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
10468
10469 # Check whether --with-tparm-arg or --without-tparm-arg was given.
10470 if test "${with_tparm_arg+set}" = set; then
10471   withval="$with_tparm_arg"
10472   NCURSES_TPARM_ARG="$withval"
10473 else
10474   NCURSES_TPARM_ARG=long
10475 fi;
10476 echo "$as_me:10476: result: $NCURSES_TPARM_ARG" >&5
10477 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
10478
10479 ### Enable compiling-in rcs id's
10480 echo "$as_me:10480: checking if RCS identifiers should be compiled-in" >&5
10481 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
10482
10483 # Check whether --with-rcs-ids or --without-rcs-ids was given.
10484 if test "${with_rcs_ids+set}" = set; then
10485   withval="$with_rcs_ids"
10486   with_rcs_ids=$withval
10487 else
10488   with_rcs_ids=no
10489 fi;
10490 echo "$as_me:10490: result: $with_rcs_ids" >&5
10491 echo "${ECHO_T}$with_rcs_ids" >&6
10492 test "x$with_rcs_ids" = xyes &&
10493 cat >>confdefs.h <<\EOF
10494 #define USE_RCS_IDS 1
10495 EOF
10496
10497 ###############################################################################
10498
10499 echo "$as_me:10499: checking format of man-pages" >&5
10500 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
10501
10502 # Check whether --with-manpage-format or --without-manpage-format was given.
10503 if test "${with_manpage_format+set}" = set; then
10504   withval="$with_manpage_format"
10505   MANPAGE_FORMAT=$withval
10506 else
10507   MANPAGE_FORMAT=unknown
10508 fi;
10509
10510 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
10511 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
10512
10513 cf_unknown=
10514
10515 case $MANPAGE_FORMAT in
10516 unknown)
10517   if test -z "$MANPATH" ; then
10518     MANPATH="/usr/man:/usr/share/man"
10519   fi
10520
10521   # look for the 'date' man-page (it's most likely to be installed!)
10522   MANPAGE_FORMAT=
10523   cf_preform=no
10524   cf_catonly=yes
10525   cf_example=date
10526
10527   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10528   for cf_dir in $MANPATH; do
10529     test -z "$cf_dir" && cf_dir=/usr/man
10530     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
10531     do
10532       cf_test=`echo $cf_name | sed -e 's/*//'`
10533       if test "x$cf_test" = "x$cf_name" ; then
10534
10535         case "$cf_name" in
10536         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
10537         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
10538         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
10539         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
10540         esac
10541
10542         case "$cf_name" in
10543         $cf_dir/man*)
10544           cf_catonly=no
10545           ;;
10546         $cf_dir/cat*)
10547           cf_preform=yes
10548           ;;
10549         esac
10550         break
10551       fi
10552
10553       # if we found a match in either man* or cat*, stop looking
10554       if test -n "$MANPAGE_FORMAT" ; then
10555         cf_found=no
10556         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
10557         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
10558         case "$cf_name" in
10559         $cf_dir/cat*)
10560           cf_found=yes
10561           ;;
10562         esac
10563         test $cf_found=yes && break
10564       fi
10565     done
10566     # only check the first directory in $MANPATH where we find manpages
10567     if test -n "$MANPAGE_FORMAT" ; then
10568        break
10569     fi
10570   done
10571   # if we did not find the example, just assume it is normal
10572   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
10573   IFS="$ac_save_ifs"
10574   ;;
10575 *)
10576   for cf_option in $MANPAGE_FORMAT; do
10577      case $cf_option in #(vi
10578      gzip|compress|BSDI|normal|formatted|catonly)
10579        ;;
10580      *)
10581        cf_unknown="$cf_unknown $cf_option"
10582        ;;
10583      esac
10584   done
10585   ;;
10586 esac
10587
10588 echo "$as_me:10588: result: $MANPAGE_FORMAT" >&5
10589 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
10590 if test -n "$cf_unknown" ; then
10591   { echo "$as_me:10591: WARNING: Unexpected manpage-format $cf_unknown" >&5
10592 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
10593 fi
10594
10595 echo "$as_me:10595: checking for manpage renaming" >&5
10596 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
10597
10598 # Check whether --with-manpage-renames or --without-manpage-renames was given.
10599 if test "${with_manpage_renames+set}" = set; then
10600   withval="$with_manpage_renames"
10601   MANPAGE_RENAMES=$withval
10602 else
10603   MANPAGE_RENAMES=yes
10604 fi;
10605
10606 case ".$MANPAGE_RENAMES" in #(vi
10607 .no) #(vi
10608   ;;
10609 .|.yes)
10610   # Debian 'man' program?
10611   if test -f /etc/debian_version ; then
10612     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
10613   else
10614     MANPAGE_RENAMES=no
10615   fi
10616   ;;
10617 esac
10618
10619 if test "$MANPAGE_RENAMES" != no ; then
10620   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
10621     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
10622   elif test ! -f $MANPAGE_RENAMES ; then
10623     { { echo "$as_me:10623: error: not a filename: $MANPAGE_RENAMES" >&5
10624 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
10625    { (exit 1); exit 1; }; }
10626   fi
10627
10628   test ! -d man && mkdir man
10629
10630   # Construct a sed-script to perform renaming within man-pages
10631   if test -n "$MANPAGE_RENAMES" ; then
10632     test ! -d man && mkdir man
10633     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
10634   fi
10635 fi
10636
10637 echo "$as_me:10637: result: $MANPAGE_RENAMES" >&5
10638 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
10639
10640 echo "$as_me:10640: checking if manpage aliases will be installed" >&5
10641 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
10642
10643 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
10644 if test "${with_manpage_aliases+set}" = set; then
10645   withval="$with_manpage_aliases"
10646   MANPAGE_ALIASES=$withval
10647 else
10648   MANPAGE_ALIASES=yes
10649 fi;
10650
10651 echo "$as_me:10651: result: $MANPAGE_ALIASES" >&5
10652 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
10653
10654 case "x$LN_S" in #(vi
10655 xln*) #(vi
10656         cf_use_symlinks=yes
10657         ;;
10658 *)
10659         cf_use_symlinks=no
10660         ;;
10661 esac
10662
10663 MANPAGE_SYMLINKS=no
10664 if test "$MANPAGE_ALIASES" = yes ; then
10665 echo "$as_me:10665: checking if manpage symlinks should be used" >&5
10666 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
10667
10668 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
10669 if test "${with_manpage_symlinks+set}" = set; then
10670   withval="$with_manpage_symlinks"
10671   MANPAGE_SYMLINKS=$withval
10672 else
10673   MANPAGE_SYMLINKS=$cf_use_symlinks
10674 fi;
10675
10676 if test "$$cf_use_symlinks" = no; then
10677 if test "$MANPAGE_SYMLINKS" = yes ; then
10678         { echo "$as_me:10678: WARNING: cannot make symlinks" >&5
10679 echo "$as_me: WARNING: cannot make symlinks" >&2;}
10680         MANPAGE_SYMLINKS=no
10681 fi
10682 fi
10683
10684 echo "$as_me:10684: result: $MANPAGE_SYMLINKS" >&5
10685 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
10686 fi
10687
10688 echo "$as_me:10688: checking for manpage tbl" >&5
10689 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
10690
10691 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
10692 if test "${with_manpage_tbl+set}" = set; then
10693   withval="$with_manpage_tbl"
10694   MANPAGE_TBL=$withval
10695 else
10696   MANPAGE_TBL=no
10697 fi;
10698
10699 echo "$as_me:10699: result: $MANPAGE_TBL" >&5
10700 echo "${ECHO_T}$MANPAGE_TBL" >&6
10701
10702   if test "$prefix" = "NONE" ; then
10703      cf_prefix="$ac_default_prefix"
10704   else
10705      cf_prefix="$prefix"
10706   fi
10707
10708   case "$MANPAGE_FORMAT" in # (vi
10709   *catonly*) # (vi
10710     cf_format=yes
10711     cf_inboth=no
10712     ;;
10713   *formatted*) # (vi
10714     cf_format=yes
10715     cf_inboth=yes
10716     ;;
10717   *)
10718     cf_format=no
10719     cf_inboth=no
10720     ;;
10721   esac
10722
10723 test ! -d man && mkdir man
10724
10725 cf_so_strip=
10726 cf_compress=
10727 case "$MANPAGE_FORMAT" in #(vi
10728 *compress*) #(vi
10729         cf_so_strip="Z"
10730         cf_compress=compress
10731   ;;
10732 *gzip*)
10733         cf_so_strip="gz"
10734         cf_compress=gzip
10735   ;;
10736 esac
10737
10738 cf_edit_man=./edit_man.sh
10739 cf_man_alias=`pwd`/man_alias.sed
10740
10741 cat >$cf_edit_man <<CF_EOF
10742 #! /bin/sh
10743 # this script is generated by the configure-script CF_MAN_PAGES macro.
10744
10745 prefix="$cf_prefix"
10746 datarootdir="$datarootdir"
10747 datadir="$datadir"
10748
10749 NCURSES_MAJOR="$NCURSES_MAJOR"
10750 NCURSES_MINOR="$NCURSES_MINOR"
10751 NCURSES_PATCH="$NCURSES_PATCH"
10752
10753 NCURSES_OSPEED="$NCURSES_OSPEED"
10754 TERMINFO="$TERMINFO"
10755
10756 INSTALL="$INSTALL"
10757 INSTALL_DATA="$INSTALL_DATA"
10758
10759 transform="$program_transform_name"
10760
10761 TMP=\${TMPDIR:=/tmp}/man\$\$
10762 trap "rm -f \$TMP" 0 1 2 5 15
10763
10764 form=\$1
10765 shift || exit 1
10766
10767 verb=\$1
10768 shift || exit 1
10769
10770 mandir=\$1
10771 shift || exit 1
10772
10773 srcdir=\$1
10774 top_srcdir=\$srcdir/..
10775 shift || exit 1
10776
10777 if test "\$form" = normal ; then
10778         if test "$cf_format" = yes ; then
10779         if test "$cf_inboth" = no ; then
10780                 sh \$0 format \$verb \$mandir \$srcdir \$*
10781                 exit $?
10782         fi
10783         fi
10784         cf_subdir=\$mandir/man
10785         cf_tables=$MANPAGE_TBL
10786 else
10787         cf_subdir=\$mandir/cat
10788         cf_tables=yes
10789 fi
10790
10791 # process the list of source-files
10792 for i in \$* ; do
10793 case \$i in #(vi
10794 *.orig|*.rej) ;; #(vi
10795 *.[0-9]*)
10796         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
10797         if test \$verb = installing ; then
10798         if test ! -d \$cf_subdir\${section} ; then
10799                 mkdir -p \$cf_subdir\$section
10800         fi
10801         fi
10802
10803         # replace variables in man page
10804         if test ! -f $cf_man_alias ; then
10805 cat >>$cf_man_alias <<-CF_EOF2
10806                 s,@DATADIR@,\$datadir,g
10807                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
10808                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
10809                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
10810                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
10811                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
10812                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
10813 CF_EOF
10814
10815         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
10816         do
10817                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10818                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10819 cat >>$cf_edit_man <<-CF_EOF
10820                 s,@$cf_NAME@,$cf_name,g
10821 CF_EOF
10822         done
10823
10824 cat >>$cf_edit_man <<CF_EOF
10825 CF_EOF2
10826                 echo "...made $cf_man_alias"
10827         fi
10828
10829         aliases=
10830         cf_source=\`basename \$i\`
10831         inalias=\$cf_source
10832         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10833         if test ! -f \$inalias ; then
10834                 echo .. skipped \$cf_source
10835                 continue
10836         fi
10837 CF_EOF
10838
10839 if test "$MANPAGE_ALIASES" != no ; then
10840 cat >>$cf_edit_man <<CF_EOF
10841         nCurses=ignore.3x
10842         test $with_curses_h = yes && nCurses=ncurses.3x
10843         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u; test \$inalias = \$nCurses && echo curses\`
10844 CF_EOF
10845 fi
10846
10847 if test "$MANPAGE_RENAMES" = no ; then
10848 cat >>$cf_edit_man <<CF_EOF
10849         # perform program transformations for section 1 man pages
10850         if test \$section = 1 ; then
10851                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10852         else
10853                 cf_target=\$cf_subdir\${section}/\$cf_source
10854         fi
10855 CF_EOF
10856 else
10857 cat >>$cf_edit_man <<CF_EOF
10858         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10859         if test -z "\$cf_target" ; then
10860                 echo '? missing rename for '\$cf_source
10861                 cf_target="\$cf_source"
10862         fi
10863         cf_target="\$cf_subdir\${section}/\${cf_target}"
10864
10865 CF_EOF
10866 fi
10867
10868 cat >>$cf_edit_man <<CF_EOF
10869         sed     -f $cf_man_alias \\
10870 CF_EOF
10871
10872 if test -f $MANPAGE_RENAMES ; then
10873 cat >>$cf_edit_man <<CF_EOF
10874                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10875 CF_EOF
10876 else
10877 cat >>$cf_edit_man <<CF_EOF
10878                 < \$i >\$TMP
10879 CF_EOF
10880 fi
10881
10882 cat >>$cf_edit_man <<CF_EOF
10883 if test \$cf_tables = yes ; then
10884         tbl \$TMP >\$TMP.out
10885         mv \$TMP.out \$TMP
10886 fi
10887 CF_EOF
10888
10889 if test $with_overwrite != yes ; then
10890 cat >>$cf_edit_man <<CF_EOF
10891         sed -e "/\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
10892         mv \$TMP.out \$TMP
10893 CF_EOF
10894 fi
10895
10896 if test $with_curses_h != yes ; then
10897 cat >>$cf_edit_man <<CF_EOF
10898         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10899         mv \$TMP.out \$TMP
10900 CF_EOF
10901 fi
10902
10903 cat >>$cf_edit_man <<CF_EOF
10904         if test \$form = format ; then
10905                 nroff -man \$TMP >\$TMP.out
10906                 mv \$TMP.out \$TMP
10907         fi
10908 CF_EOF
10909
10910 if test -n "$cf_compress" ; then
10911 cat >>$cf_edit_man <<CF_EOF
10912         if test \$verb = installing ; then
10913         if ( $cf_compress -f \$TMP )
10914         then
10915                 mv \$TMP.$cf_so_strip \$TMP
10916         fi
10917         fi
10918         cf_target="\$cf_target.$cf_so_strip"
10919 CF_EOF
10920 fi
10921
10922 case "$MANPAGE_FORMAT" in #(vi
10923 *BSDI*)
10924 cat >>$cf_edit_man <<CF_EOF
10925         if test \$form = format ; then
10926                 # BSDI installs only .0 suffixes in the cat directories
10927                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10928         fi
10929 CF_EOF
10930   ;;
10931 esac
10932
10933 cat >>$cf_edit_man <<CF_EOF
10934         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10935         if test \$verb = installing ; then
10936                 echo \$verb \$cf_target
10937                 \$INSTALL_DATA \$TMP \$cf_target
10938                 test -d \$cf_subdir\${section} &&
10939                 test -n "\$aliases" && (
10940                         cd \$cf_subdir\${section} && (
10941                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10942                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10943                                 cf_target=\`basename \$cf_target\`
10944                                 for cf_alias in \$aliases
10945                                 do
10946                                         if test \$section = 1 ; then
10947                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10948                                         fi
10949
10950                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10951                                                 if test -f \$cf_alias\${suffix} ; then
10952                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10953                                                         then
10954                                                                 continue
10955                                                         fi
10956                                                 fi
10957                                                 echo .. \$verb alias \$cf_alias\${suffix}
10958 CF_EOF
10959 case "x$LN_S" in #(vi
10960 *-f) #(vi
10961 cat >>$cf_edit_man <<CF_EOF
10962                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10963 CF_EOF
10964         ;;
10965 *)
10966 cat >>$cf_edit_man <<CF_EOF
10967                                                 rm -f \$cf_alias\${suffix}
10968                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10969 CF_EOF
10970         ;;
10971 esac
10972 cat >>$cf_edit_man <<CF_EOF
10973                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10974                                                 echo ".so \$cf_source" >\$TMP
10975 CF_EOF
10976 if test -n "$cf_compress" ; then
10977 cat >>$cf_edit_man <<CF_EOF
10978                                                 if test -n "$cf_so_strip" ; then
10979                                                         $cf_compress -f \$TMP
10980                                                         mv \$TMP.$cf_so_strip \$TMP
10981                                                 fi
10982 CF_EOF
10983 fi
10984 cat >>$cf_edit_man <<CF_EOF
10985                                                 echo .. \$verb alias \$cf_alias\${suffix}
10986                                                 rm -f \$cf_alias\${suffix}
10987                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10988                                         fi
10989                                 done
10990                         )
10991                 )
10992         elif test \$verb = removing ; then
10993                 test -f \$cf_target && (
10994                         echo \$verb \$cf_target
10995                         rm -f \$cf_target
10996                 )
10997                 test -d \$cf_subdir\${section} &&
10998                 test -n "\$aliases" && (
10999                         cd \$cf_subdir\${section} && (
11000                                 for cf_alias in \$aliases
11001                                 do
11002                                         if test \$section = 1 ; then
11003                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
11004                                         fi
11005
11006                                         echo .. \$verb alias \$cf_alias\${suffix}
11007                                         rm -f \$cf_alias\${suffix}
11008                                 done
11009                         )
11010                 )
11011         else
11012 #               echo ".hy 0"
11013                 cat \$TMP
11014         fi
11015         ;;
11016 esac
11017 done
11018
11019 if test $cf_inboth = yes ; then
11020 if test \$form != format ; then
11021         sh \$0 format \$verb \$mandir \$srcdir \$*
11022 fi
11023 fi
11024
11025 exit 0
11026 CF_EOF
11027 chmod 755 $cf_edit_man
11028
11029 ###############################################################################
11030
11031 ### Note that some functions (such as const) are normally disabled anyway.
11032 echo "$as_me:11032: checking if you want to build with function extensions" >&5
11033 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
11034
11035 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
11036 if test "${enable_ext_funcs+set}" = set; then
11037   enableval="$enable_ext_funcs"
11038   with_ext_funcs=$enableval
11039 else
11040   with_ext_funcs=yes
11041 fi;
11042 echo "$as_me:11042: result: $with_ext_funcs" >&5
11043 echo "${ECHO_T}$with_ext_funcs" >&6
11044 if test "x$with_ext_funcs" = xyes ; then
11045         NCURSES_EXT_FUNCS=1
11046
11047 cat >>confdefs.h <<\EOF
11048 #define HAVE_ASSUME_DEFAULT_COLORS 1
11049 EOF
11050
11051 cat >>confdefs.h <<\EOF
11052 #define HAVE_CURSES_VERSION 1
11053 EOF
11054
11055 cat >>confdefs.h <<\EOF
11056 #define HAVE_HAS_KEY 1
11057 EOF
11058
11059 cat >>confdefs.h <<\EOF
11060 #define HAVE_RESIZETERM 1
11061 EOF
11062
11063 cat >>confdefs.h <<\EOF
11064 #define HAVE_RESIZE_TERM 1
11065 EOF
11066
11067 cat >>confdefs.h <<\EOF
11068 #define HAVE_TERM_ENTRY_H 1
11069 EOF
11070
11071 cat >>confdefs.h <<\EOF
11072 #define HAVE_USE_DEFAULT_COLORS 1
11073 EOF
11074
11075 cat >>confdefs.h <<\EOF
11076 #define HAVE_USE_SCREEN 1
11077 EOF
11078
11079 cat >>confdefs.h <<\EOF
11080 #define HAVE_USE_WINDOW 1
11081 EOF
11082
11083 cat >>confdefs.h <<\EOF
11084 #define HAVE_WRESIZE 1
11085 EOF
11086
11087 cat >>confdefs.h <<\EOF
11088 #define NCURSES_EXT_FUNCS 1
11089 EOF
11090
11091         GENERATED_EXT_FUNCS=generated
11092 else
11093         NCURSES_EXT_FUNCS=0
11094         GENERATED_EXT_FUNCS=
11095 fi
11096
11097 echo "$as_me:11097: checking if you want to build with experimental SCREEN extensions" >&5
11098 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
11099
11100 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
11101 if test "${enable_sp_funcs+set}" = set; then
11102   enableval="$enable_sp_funcs"
11103   with_sp_funcs=$enableval
11104 else
11105   with_sp_funcs=no
11106 fi;
11107 echo "$as_me:11107: result: $with_sp_funcs" >&5
11108 echo "${ECHO_T}$with_sp_funcs" >&6
11109 if test "x$with_sp_funcs" = xyes ; then
11110         NCURSES_SP_FUNCS=1
11111
11112 cat >>confdefs.h <<\EOF
11113 #define NCURSES_SP_FUNCS 1
11114 EOF
11115
11116         GENERATED_SP_FUNCS=generated
11117 else
11118         NCURSES_SP_FUNCS=0
11119         GENERATED_SP_FUNCS=
11120 fi
11121
11122 echo "$as_me:11122: checking if you want to build with experimental terminal-driver" >&5
11123 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
11124
11125 # Check whether --enable-term-driver or --disable-term-driver was given.
11126 if test "${enable_term_driver+set}" = set; then
11127   enableval="$enable_term_driver"
11128   with_term_driver=$enableval
11129 else
11130   with_term_driver=no
11131 fi;
11132 echo "$as_me:11132: result: $with_term_driver" >&5
11133 echo "${ECHO_T}$with_term_driver" >&6
11134 if test "x$with_term_driver" = xyes ; then
11135
11136 cat >>confdefs.h <<\EOF
11137 #define USE_TERM_DRIVER 1
11138 EOF
11139
11140         if test "x$with_sp_funcs" != xyes ; then
11141                 { { echo "$as_me:11141: error: The term-driver option relies upon sp-funcs" >&5
11142 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
11143    { (exit 1); exit 1; }; }
11144         fi
11145 fi
11146
11147 ###   use option --enable-const to turn on use of const beyond that in XSI.
11148 echo "$as_me:11148: checking for extended use of const keyword" >&5
11149 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
11150
11151 # Check whether --enable-const or --disable-const was given.
11152 if test "${enable_const+set}" = set; then
11153   enableval="$enable_const"
11154   with_ext_const=$enableval
11155 else
11156   with_ext_const=no
11157 fi;
11158 echo "$as_me:11158: result: $with_ext_const" >&5
11159 echo "${ECHO_T}$with_ext_const" >&6
11160 NCURSES_CONST='/*nothing*/'
11161 if test "x$with_ext_const" = xyes ; then
11162         NCURSES_CONST=const
11163 fi
11164
11165 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
11166 echo "$as_me:11166: checking if you want to use extended colors" >&5
11167 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
11168
11169 # Check whether --enable-ext-colors or --disable-ext-colors was given.
11170 if test "${enable_ext_colors+set}" = set; then
11171   enableval="$enable_ext_colors"
11172   with_ext_colors=$enableval
11173 else
11174   with_ext_colors=no
11175 fi;
11176 echo "$as_me:11176: result: $with_ext_colors" >&5
11177 echo "${ECHO_T}$with_ext_colors" >&6
11178 NCURSES_EXT_COLORS=0
11179 if test "x$with_ext_colors" = xyes ; then
11180         if test "x$with_widec" != xyes ; then
11181                 { { echo "$as_me:11181: error: This option applies only to wide-character library" >&5
11182 echo "$as_me: error: This option applies only to wide-character library" >&2;}
11183    { (exit 1); exit 1; }; }
11184         else
11185                 # cannot be ABI 5 since it changes sizeof(cchar_t)
11186
11187 if test "${with_abi_version+set}" != set; then
11188         case $cf_cv_rel_version in
11189         5.*)
11190                 cf_cv_rel_version=6.0
11191                 cf_cv_abi_version=6
11192                 { echo "$as_me:11192: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11193 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11194                 ;;
11195         esac
11196 fi
11197
11198         fi
11199         NCURSES_EXT_COLORS=1
11200
11201 cat >>confdefs.h <<\EOF
11202 #define NCURSES_EXT_COLORS 1
11203 EOF
11204
11205 fi
11206
11207 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
11208 echo "$as_me:11208: checking if you want to use extended mouse encoding" >&5
11209 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
11210
11211 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
11212 if test "${enable_ext_mouse+set}" = set; then
11213   enableval="$enable_ext_mouse"
11214   with_ext_mouse=$enableval
11215 else
11216   with_ext_mouse=no
11217 fi;
11218 echo "$as_me:11218: result: $with_ext_mouse" >&5
11219 echo "${ECHO_T}$with_ext_mouse" >&6
11220 NCURSES_MOUSE_VERSION=1
11221 if test "x$with_ext_mouse" = xyes ; then
11222         NCURSES_MOUSE_VERSION=2
11223
11224 if test "${with_abi_version+set}" != set; then
11225         case $cf_cv_rel_version in
11226         5.*)
11227                 cf_cv_rel_version=6.0
11228                 cf_cv_abi_version=6
11229                 { echo "$as_me:11229: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11230 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11231                 ;;
11232         esac
11233 fi
11234
11235 fi
11236
11237 echo "$as_me:11237: checking if you want \$NCURSES_NO_PADDING code" >&5
11238 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
11239
11240 # Check whether --enable-no-padding or --disable-no-padding was given.
11241 if test "${enable_no_padding+set}" = set; then
11242   enableval="$enable_no_padding"
11243   with_no_padding=$enableval
11244 else
11245   with_no_padding=$with_ext_funcs
11246 fi;
11247 echo "$as_me:11247: result: $with_no_padding" >&5
11248 echo "${ECHO_T}$with_no_padding" >&6
11249 test "x$with_no_padding" = xyes &&
11250 cat >>confdefs.h <<\EOF
11251 #define NCURSES_NO_PADDING 1
11252 EOF
11253
11254 echo "$as_me:11254: checking for ANSI C header files" >&5
11255 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11256 if test "${ac_cv_header_stdc+set}" = set; then
11257   echo $ECHO_N "(cached) $ECHO_C" >&6
11258 else
11259   cat >conftest.$ac_ext <<_ACEOF
11260 #line 11260 "configure"
11261 #include "confdefs.h"
11262 #include <stdlib.h>
11263 #include <stdarg.h>
11264 #include <string.h>
11265 #include <float.h>
11266
11267 _ACEOF
11268 if { (eval echo "$as_me:11268: \"$ac_cpp conftest.$ac_ext\"") >&5
11269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11270   ac_status=$?
11271   egrep -v '^ *\+' conftest.er1 >conftest.err
11272   rm -f conftest.er1
11273   cat conftest.err >&5
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit $ac_status); } >/dev/null; then
11276   if test -s conftest.err; then
11277     ac_cpp_err=$ac_c_preproc_warn_flag
11278   else
11279     ac_cpp_err=
11280   fi
11281 else
11282   ac_cpp_err=yes
11283 fi
11284 if test -z "$ac_cpp_err"; then
11285   ac_cv_header_stdc=yes
11286 else
11287   echo "$as_me: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   ac_cv_header_stdc=no
11290 fi
11291 rm -f conftest.err conftest.$ac_ext
11292
11293 if test $ac_cv_header_stdc = yes; then
11294   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11295   cat >conftest.$ac_ext <<_ACEOF
11296 #line 11296 "configure"
11297 #include "confdefs.h"
11298 #include <string.h>
11299
11300 _ACEOF
11301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11302   egrep "memchr" >/dev/null 2>&1; then
11303   :
11304 else
11305   ac_cv_header_stdc=no
11306 fi
11307 rm -rf conftest*
11308
11309 fi
11310
11311 if test $ac_cv_header_stdc = yes; then
11312   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11313   cat >conftest.$ac_ext <<_ACEOF
11314 #line 11314 "configure"
11315 #include "confdefs.h"
11316 #include <stdlib.h>
11317
11318 _ACEOF
11319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11320   egrep "free" >/dev/null 2>&1; then
11321   :
11322 else
11323   ac_cv_header_stdc=no
11324 fi
11325 rm -rf conftest*
11326
11327 fi
11328
11329 if test $ac_cv_header_stdc = yes; then
11330   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11331   if test "$cross_compiling" = yes; then
11332   :
11333 else
11334   cat >conftest.$ac_ext <<_ACEOF
11335 #line 11335 "configure"
11336 #include "confdefs.h"
11337 #include <ctype.h>
11338 #if ((' ' & 0x0FF) == 0x020)
11339 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11340 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11341 #else
11342 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11343                      || ('j' <= (c) && (c) <= 'r') \
11344                      || ('s' <= (c) && (c) <= 'z'))
11345 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11346 #endif
11347
11348 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11349 int
11350 main ()
11351 {
11352   int i;
11353   for (i = 0; i < 256; i++)
11354     if (XOR (islower (i), ISLOWER (i))
11355         || toupper (i) != TOUPPER (i))
11356       $ac_main_return(2);
11357   $ac_main_return (0);
11358 }
11359 _ACEOF
11360 rm -f conftest$ac_exeext
11361 if { (eval echo "$as_me:11361: \"$ac_link\"") >&5
11362   (eval $ac_link) 2>&5
11363   ac_status=$?
11364   echo "$as_me:11364: \$? = $ac_status" >&5
11365   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11366   { (eval echo "$as_me:11366: \"$ac_try\"") >&5
11367   (eval $ac_try) 2>&5
11368   ac_status=$?
11369   echo "$as_me:11369: \$? = $ac_status" >&5
11370   (exit $ac_status); }; }; then
11371   :
11372 else
11373   echo "$as_me: program exited with status $ac_status" >&5
11374 echo "$as_me: failed program was:" >&5
11375 cat conftest.$ac_ext >&5
11376 ac_cv_header_stdc=no
11377 fi
11378 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11379 fi
11380 fi
11381 fi
11382 echo "$as_me:11382: result: $ac_cv_header_stdc" >&5
11383 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11384 if test $ac_cv_header_stdc = yes; then
11385
11386 cat >>confdefs.h <<\EOF
11387 #define STDC_HEADERS 1
11388 EOF
11389
11390 fi
11391
11392 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
11393
11394 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
11395                   inttypes.h stdint.h unistd.h
11396 do
11397 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11398 echo "$as_me:11398: checking for $ac_header" >&5
11399 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11400 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11401   echo $ECHO_N "(cached) $ECHO_C" >&6
11402 else
11403   cat >conftest.$ac_ext <<_ACEOF
11404 #line 11404 "configure"
11405 #include "confdefs.h"
11406 $ac_includes_default
11407 #include <$ac_header>
11408 _ACEOF
11409 rm -f conftest.$ac_objext
11410 if { (eval echo "$as_me:11410: \"$ac_compile\"") >&5
11411   (eval $ac_compile) 2>&5
11412   ac_status=$?
11413   echo "$as_me:11413: \$? = $ac_status" >&5
11414   (exit $ac_status); } &&
11415          { ac_try='test -s conftest.$ac_objext'
11416   { (eval echo "$as_me:11416: \"$ac_try\"") >&5
11417   (eval $ac_try) 2>&5
11418   ac_status=$?
11419   echo "$as_me:11419: \$? = $ac_status" >&5
11420   (exit $ac_status); }; }; then
11421   eval "$as_ac_Header=yes"
11422 else
11423   echo "$as_me: failed program was:" >&5
11424 cat conftest.$ac_ext >&5
11425 eval "$as_ac_Header=no"
11426 fi
11427 rm -f conftest.$ac_objext conftest.$ac_ext
11428 fi
11429 echo "$as_me:11429: result: `eval echo '${'$as_ac_Header'}'`" >&5
11430 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11432   cat >>confdefs.h <<EOF
11433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11434 EOF
11435
11436 fi
11437 done
11438
11439 echo "$as_me:11439: checking for signed char" >&5
11440 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
11441 if test "${ac_cv_type_signed_char+set}" = set; then
11442   echo $ECHO_N "(cached) $ECHO_C" >&6
11443 else
11444   cat >conftest.$ac_ext <<_ACEOF
11445 #line 11445 "configure"
11446 #include "confdefs.h"
11447 $ac_includes_default
11448 int
11449 main ()
11450 {
11451 if ((signed char *) 0)
11452   return 0;
11453 if (sizeof (signed char))
11454   return 0;
11455   ;
11456   return 0;
11457 }
11458 _ACEOF
11459 rm -f conftest.$ac_objext
11460 if { (eval echo "$as_me:11460: \"$ac_compile\"") >&5
11461   (eval $ac_compile) 2>&5
11462   ac_status=$?
11463   echo "$as_me:11463: \$? = $ac_status" >&5
11464   (exit $ac_status); } &&
11465          { ac_try='test -s conftest.$ac_objext'
11466   { (eval echo "$as_me:11466: \"$ac_try\"") >&5
11467   (eval $ac_try) 2>&5
11468   ac_status=$?
11469   echo "$as_me:11469: \$? = $ac_status" >&5
11470   (exit $ac_status); }; }; then
11471   ac_cv_type_signed_char=yes
11472 else
11473   echo "$as_me: failed program was:" >&5
11474 cat conftest.$ac_ext >&5
11475 ac_cv_type_signed_char=no
11476 fi
11477 rm -f conftest.$ac_objext conftest.$ac_ext
11478 fi
11479 echo "$as_me:11479: result: $ac_cv_type_signed_char" >&5
11480 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
11481
11482 echo "$as_me:11482: checking size of signed char" >&5
11483 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
11484 if test "${ac_cv_sizeof_signed_char+set}" = set; then
11485   echo $ECHO_N "(cached) $ECHO_C" >&6
11486 else
11487   if test "$ac_cv_type_signed_char" = yes; then
11488   if test "$cross_compiling" = yes; then
11489   # Depending upon the size, compute the lo and hi bounds.
11490 cat >conftest.$ac_ext <<_ACEOF
11491 #line 11491 "configure"
11492 #include "confdefs.h"
11493 $ac_includes_default
11494 int
11495 main ()
11496 {
11497 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f conftest.$ac_objext
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit $ac_status); } &&
11508          { ac_try='test -s conftest.$ac_objext'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); }; }; then
11514   ac_lo=0 ac_mid=0
11515   while :; do
11516     cat >conftest.$ac_ext <<_ACEOF
11517 #line 11517 "configure"
11518 #include "confdefs.h"
11519 $ac_includes_default
11520 int
11521 main ()
11522 {
11523 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f conftest.$ac_objext
11529 if { (eval echo "$as_me:11529: \"$ac_compile\"") >&5
11530   (eval $ac_compile) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit $ac_status); } &&
11534          { ac_try='test -s conftest.$ac_objext'
11535   { (eval echo "$as_me:11535: \"$ac_try\"") >&5
11536   (eval $ac_try) 2>&5
11537   ac_status=$?
11538   echo "$as_me:11538: \$? = $ac_status" >&5
11539   (exit $ac_status); }; }; then
11540   ac_hi=$ac_mid; break
11541 else
11542   echo "$as_me: failed program was:" >&5
11543 cat conftest.$ac_ext >&5
11544 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
11545 fi
11546 rm -f conftest.$ac_objext conftest.$ac_ext
11547   done
11548 else
11549   echo "$as_me: failed program was:" >&5
11550 cat conftest.$ac_ext >&5
11551 ac_hi=-1 ac_mid=-1
11552   while :; do
11553     cat >conftest.$ac_ext <<_ACEOF
11554 #line 11554 "configure"
11555 #include "confdefs.h"
11556 $ac_includes_default
11557 int
11558 main ()
11559 {
11560 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 rm -f conftest.$ac_objext
11566 if { (eval echo "$as_me:11566: \"$ac_compile\"") >&5
11567   (eval $ac_compile) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit $ac_status); } &&
11571          { ac_try='test -s conftest.$ac_objext'
11572   { (eval echo "$as_me:11572: \"$ac_try\"") >&5
11573   (eval $ac_try) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit $ac_status); }; }; then
11577   ac_lo=$ac_mid; break
11578 else
11579   echo "$as_me: failed program was:" >&5
11580 cat conftest.$ac_ext >&5
11581 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
11582 fi
11583 rm -f conftest.$ac_objext conftest.$ac_ext
11584   done
11585 fi
11586 rm -f conftest.$ac_objext conftest.$ac_ext
11587 # Binary search between lo and hi bounds.
11588 while test "x$ac_lo" != "x$ac_hi"; do
11589   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11590   cat >conftest.$ac_ext <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593 $ac_includes_default
11594 int
11595 main ()
11596 {
11597 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 rm -f conftest.$ac_objext
11603 if { (eval echo "$as_me:11603: \"$ac_compile\"") >&5
11604   (eval $ac_compile) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit $ac_status); } &&
11608          { ac_try='test -s conftest.$ac_objext'
11609   { (eval echo "$as_me:11609: \"$ac_try\"") >&5
11610   (eval $ac_try) 2>&5
11611   ac_status=$?
11612   echo "$as_me:11612: \$? = $ac_status" >&5
11613   (exit $ac_status); }; }; then
11614   ac_hi=$ac_mid
11615 else
11616   echo "$as_me: failed program was:" >&5
11617 cat conftest.$ac_ext >&5
11618 ac_lo=`expr $ac_mid + 1`
11619 fi
11620 rm -f conftest.$ac_objext conftest.$ac_ext
11621 done
11622 ac_cv_sizeof_signed_char=$ac_lo
11623 else
11624   if test "$cross_compiling" = yes; then
11625   { { echo "$as_me:11625: error: cannot run test program while cross compiling" >&5
11626 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11627    { (exit 1); exit 1; }; }
11628 else
11629   cat >conftest.$ac_ext <<_ACEOF
11630 #line 11630 "configure"
11631 #include "confdefs.h"
11632 $ac_includes_default
11633 int
11634 main ()
11635 {
11636 FILE *f = fopen ("conftest.val", "w");
11637 if (!f)
11638   $ac_main_return (1);
11639 fprintf (f, "%d", (sizeof (signed char)));
11640 fclose (f);
11641   ;
11642   return 0;
11643 }
11644 _ACEOF
11645 rm -f conftest$ac_exeext
11646 if { (eval echo "$as_me:11646: \"$ac_link\"") >&5
11647   (eval $ac_link) 2>&5
11648   ac_status=$?
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11651   { (eval echo "$as_me:11651: \"$ac_try\"") >&5
11652   (eval $ac_try) 2>&5
11653   ac_status=$?
11654   echo "$as_me:11654: \$? = $ac_status" >&5
11655   (exit $ac_status); }; }; then
11656   ac_cv_sizeof_signed_char=`cat conftest.val`
11657 else
11658   echo "$as_me: program exited with status $ac_status" >&5
11659 echo "$as_me: failed program was:" >&5
11660 cat conftest.$ac_ext >&5
11661 fi
11662 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11663 fi
11664 fi
11665 rm -f conftest.val
11666 else
11667   ac_cv_sizeof_signed_char=0
11668 fi
11669 fi
11670 echo "$as_me:11670: result: $ac_cv_sizeof_signed_char" >&5
11671 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
11672 cat >>confdefs.h <<EOF
11673 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
11674 EOF
11675
11676 if test "$ac_cv_sizeof_signed_char" = 1 ; then
11677         NCURSES_SBOOL="signed char"
11678 else
11679         NCURSES_SBOOL="char"
11680 fi
11681 echo "$as_me:11681: checking if you want to use signed Boolean array in term.h" >&5
11682 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
11683
11684 # Check whether --enable-signed-char or --disable-signed-char was given.
11685 if test "${enable_signed_char+set}" = set; then
11686   enableval="$enable_signed_char"
11687   with_signed_char=$enableval
11688 else
11689   with_signed_char=no
11690 fi;
11691 echo "$as_me:11691: result: $with_signed_char" >&5
11692 echo "${ECHO_T}$with_signed_char" >&6
11693 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
11694
11695 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
11696 echo "$as_me:11696: checking if you want SIGWINCH handler" >&5
11697 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
11698
11699 # Check whether --enable-sigwinch or --disable-sigwinch was given.
11700 if test "${enable_sigwinch+set}" = set; then
11701   enableval="$enable_sigwinch"
11702   with_sigwinch=$enableval
11703 else
11704   with_sigwinch=$with_ext_funcs
11705 fi;
11706 echo "$as_me:11706: result: $with_sigwinch" >&5
11707 echo "${ECHO_T}$with_sigwinch" >&6
11708 test "x$with_sigwinch" = xyes &&
11709 cat >>confdefs.h <<\EOF
11710 #define USE_SIGWINCH 1
11711 EOF
11712
11713 ###   use option --enable-tcap-names to allow user to define new capabilities
11714 echo "$as_me:11714: checking if you want user-definable terminal capabilities like termcap" >&5
11715 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
11716
11717 # Check whether --enable-tcap-names or --disable-tcap-names was given.
11718 if test "${enable_tcap_names+set}" = set; then
11719   enableval="$enable_tcap_names"
11720   with_tcap_names=$enableval
11721 else
11722   with_tcap_names=$with_ext_funcs
11723 fi;
11724 echo "$as_me:11724: result: $with_tcap_names" >&5
11725 echo "${ECHO_T}$with_tcap_names" >&6
11726 NCURSES_XNAMES=0
11727 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
11728
11729 ###############################################################################
11730 # These options are relatively safe to experiment with.
11731
11732 echo "$as_me:11732: checking if you want all development code" >&5
11733 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
11734
11735 # Check whether --with-develop or --without-develop was given.
11736 if test "${with_develop+set}" = set; then
11737   withval="$with_develop"
11738   with_develop=$withval
11739 else
11740   with_develop=no
11741 fi;
11742 echo "$as_me:11742: result: $with_develop" >&5
11743 echo "${ECHO_T}$with_develop" >&6
11744
11745 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
11746 echo "$as_me:11746: checking if you want hard-tabs code" >&5
11747 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
11748
11749 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
11750 if test "${enable_hard_tabs+set}" = set; then
11751   enableval="$enable_hard_tabs"
11752
11753 else
11754   enable_hard_tabs=$with_develop
11755 fi;
11756 echo "$as_me:11756: result: $enable_hard_tabs" >&5
11757 echo "${ECHO_T}$enable_hard_tabs" >&6
11758 test "x$enable_hard_tabs" = xyes &&
11759 cat >>confdefs.h <<\EOF
11760 #define USE_HARD_TABS 1
11761 EOF
11762
11763 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
11764 echo "$as_me:11764: checking if you want limited support for xmc" >&5
11765 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
11766
11767 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
11768 if test "${enable_xmc_glitch+set}" = set; then
11769   enableval="$enable_xmc_glitch"
11770
11771 else
11772   enable_xmc_glitch=$with_develop
11773 fi;
11774 echo "$as_me:11774: result: $enable_xmc_glitch" >&5
11775 echo "${ECHO_T}$enable_xmc_glitch" >&6
11776 test "x$enable_xmc_glitch" = xyes &&
11777 cat >>confdefs.h <<\EOF
11778 #define USE_XMC_SUPPORT 1
11779 EOF
11780
11781 ###############################################################################
11782 # These are just experimental, probably should not be in a package:
11783
11784 echo "$as_me:11784: checking if you do not want to assume colors are white-on-black" >&5
11785 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
11786
11787 # Check whether --enable-assumed-color or --disable-assumed-color was given.
11788 if test "${enable_assumed_color+set}" = set; then
11789   enableval="$enable_assumed_color"
11790   with_assumed_color=$enableval
11791 else
11792   with_assumed_color=yes
11793 fi;
11794 echo "$as_me:11794: result: $with_assumed_color" >&5
11795 echo "${ECHO_T}$with_assumed_color" >&6
11796 test "x$with_assumed_color" = xyes &&
11797 cat >>confdefs.h <<\EOF
11798 #define USE_ASSUMED_COLOR 1
11799 EOF
11800
11801 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
11802 echo "$as_me:11802: checking if you want hashmap scrolling-optimization code" >&5
11803 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
11804
11805 # Check whether --enable-hashmap or --disable-hashmap was given.
11806 if test "${enable_hashmap+set}" = set; then
11807   enableval="$enable_hashmap"
11808   with_hashmap=$enableval
11809 else
11810   with_hashmap=yes
11811 fi;
11812 echo "$as_me:11812: result: $with_hashmap" >&5
11813 echo "${ECHO_T}$with_hashmap" >&6
11814 test "x$with_hashmap" = xyes &&
11815 cat >>confdefs.h <<\EOF
11816 #define USE_HASHMAP 1
11817 EOF
11818
11819 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
11820 echo "$as_me:11820: checking if you want colorfgbg code" >&5
11821 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
11822
11823 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
11824 if test "${enable_colorfgbg+set}" = set; then
11825   enableval="$enable_colorfgbg"
11826   with_colorfgbg=$enableval
11827 else
11828   with_colorfgbg=no
11829 fi;
11830 echo "$as_me:11830: result: $with_colorfgbg" >&5
11831 echo "${ECHO_T}$with_colorfgbg" >&6
11832 test "x$with_colorfgbg" = xyes &&
11833 cat >>confdefs.h <<\EOF
11834 #define USE_COLORFGBG 1
11835 EOF
11836
11837 ###   use option --enable-interop to turn on use of bindings used for interop
11838 echo "$as_me:11838: checking if you want interop bindings" >&5
11839 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11840
11841 # Check whether --enable-interop or --disable-interop was given.
11842 if test "${enable_interop+set}" = set; then
11843   enableval="$enable_interop"
11844   with_exp_interop=$enableval
11845 else
11846   with_exp_interop=no
11847 fi;
11848 echo "$as_me:11848: result: $with_exp_interop" >&5
11849 echo "${ECHO_T}$with_exp_interop" >&6
11850
11851 NCURSES_INTEROP_FUNCS=0
11852 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
11853
11854 # This is still experimental (20080329), but should ultimately be moved to
11855 # the script-block --with-normal, etc.
11856
11857 echo "$as_me:11857: checking if you want to link with the pthread library" >&5
11858 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11859
11860 # Check whether --with-pthread or --without-pthread was given.
11861 if test "${with_pthread+set}" = set; then
11862   withval="$with_pthread"
11863   with_pthread=$withval
11864 else
11865   with_pthread=no
11866 fi;
11867 echo "$as_me:11867: result: $with_pthread" >&5
11868 echo "${ECHO_T}$with_pthread" >&6
11869
11870 if test "$with_pthread" != no ; then
11871     echo "$as_me:11871: checking for pthread.h" >&5
11872 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11873 if test "${ac_cv_header_pthread_h+set}" = set; then
11874   echo $ECHO_N "(cached) $ECHO_C" >&6
11875 else
11876   cat >conftest.$ac_ext <<_ACEOF
11877 #line 11877 "configure"
11878 #include "confdefs.h"
11879 #include <pthread.h>
11880 _ACEOF
11881 if { (eval echo "$as_me:11881: \"$ac_cpp conftest.$ac_ext\"") >&5
11882   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11883   ac_status=$?
11884   egrep -v '^ *\+' conftest.er1 >conftest.err
11885   rm -f conftest.er1
11886   cat conftest.err >&5
11887   echo "$as_me:11887: \$? = $ac_status" >&5
11888   (exit $ac_status); } >/dev/null; then
11889   if test -s conftest.err; then
11890     ac_cpp_err=$ac_c_preproc_warn_flag
11891   else
11892     ac_cpp_err=
11893   fi
11894 else
11895   ac_cpp_err=yes
11896 fi
11897 if test -z "$ac_cpp_err"; then
11898   ac_cv_header_pthread_h=yes
11899 else
11900   echo "$as_me: failed program was:" >&5
11901   cat conftest.$ac_ext >&5
11902   ac_cv_header_pthread_h=no
11903 fi
11904 rm -f conftest.err conftest.$ac_ext
11905 fi
11906 echo "$as_me:11906: result: $ac_cv_header_pthread_h" >&5
11907 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11908 if test $ac_cv_header_pthread_h = yes; then
11909
11910 cat >>confdefs.h <<\EOF
11911 #define HAVE_PTHREADS_H 1
11912 EOF
11913
11914         for cf_lib_pthread in pthread c_r
11915         do
11916             echo "$as_me:11916: checking if we can link with the $cf_lib_pthread library" >&5
11917 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
11918             cf_save_LIBS="$LIBS"
11919
11920 cf_add_libs="-l$cf_lib_pthread"
11921 # Filter out duplicates - this happens with badly-designed ".pc" files...
11922 for cf_add_1lib in $LIBS
11923 do
11924         for cf_add_2lib in $cf_add_libs
11925         do
11926                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11927                 then
11928                         cf_add_1lib=
11929                         break
11930                 fi
11931         done
11932         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11933 done
11934 LIBS="$cf_add_libs"
11935
11936             cat >conftest.$ac_ext <<_ACEOF
11937 #line 11937 "configure"
11938 #include "confdefs.h"
11939
11940 #include <pthread.h>
11941
11942 int
11943 main ()
11944 {
11945
11946                 int rc = pthread_create(0,0,0,0);
11947                 int r2 = pthread_mutexattr_settype(0, 0);
11948
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f conftest.$ac_objext conftest$ac_exeext
11954 if { (eval echo "$as_me:11954: \"$ac_link\"") >&5
11955   (eval $ac_link) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit $ac_status); } &&
11959          { ac_try='test -s conftest$ac_exeext'
11960   { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961   (eval $ac_try) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit $ac_status); }; }; then
11965   with_pthread=yes
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat conftest.$ac_ext >&5
11969 with_pthread=no
11970 fi
11971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11972             LIBS="$cf_save_LIBS"
11973             echo "$as_me:11973: result: $with_pthread" >&5
11974 echo "${ECHO_T}$with_pthread" >&6
11975             test "$with_pthread" = yes && break
11976         done
11977
11978         if test "$with_pthread" = yes ; then
11979
11980 cf_add_libs="-l$cf_lib_pthread"
11981 # Filter out duplicates - this happens with badly-designed ".pc" files...
11982 for cf_add_1lib in $LIBS
11983 do
11984         for cf_add_2lib in $cf_add_libs
11985         do
11986                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
11987                 then
11988                         cf_add_1lib=
11989                         break
11990                 fi
11991         done
11992         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11993 done
11994 LIBS="$cf_add_libs"
11995
11996 cat >>confdefs.h <<\EOF
11997 #define HAVE_LIBPTHREADS 1
11998 EOF
11999
12000         else
12001             { { echo "$as_me:12001: error: Cannot link with pthread library" >&5
12002 echo "$as_me: error: Cannot link with pthread library" >&2;}
12003    { (exit 1); exit 1; }; }
12004         fi
12005
12006 fi
12007
12008 fi
12009
12010 if test "x$with_pthread" != xno; then
12011         echo "$as_me:12011: checking for pthread_kill" >&5
12012 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
12013 if test "${ac_cv_func_pthread_kill+set}" = set; then
12014   echo $ECHO_N "(cached) $ECHO_C" >&6
12015 else
12016   cat >conftest.$ac_ext <<_ACEOF
12017 #line 12017 "configure"
12018 #include "confdefs.h"
12019 /* System header to define __stub macros and hopefully few prototypes,
12020     which can conflict with char pthread_kill (); below.  */
12021 #include <assert.h>
12022 /* Override any gcc2 internal prototype to avoid an error.  */
12023 #ifdef __cplusplus
12024 extern "C"
12025 #endif
12026 /* We use char because int might match the return type of a gcc2
12027    builtin and then its argument prototype would still apply.  */
12028 char pthread_kill ();
12029 char (*f) ();
12030
12031 int
12032 main ()
12033 {
12034 /* The GNU C library defines this for functions which it implements
12035     to always fail with ENOSYS.  Some functions are actually named
12036     something starting with __ and the normal name is an alias.  */
12037 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
12038 choke me
12039 #else
12040 f = pthread_kill; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12041 #endif
12042
12043   ;
12044   return 0;
12045 }
12046 _ACEOF
12047 rm -f conftest.$ac_objext conftest$ac_exeext
12048 if { (eval echo "$as_me:12048: \"$ac_link\"") >&5
12049   (eval $ac_link) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit $ac_status); } &&
12053          { ac_try='test -s conftest$ac_exeext'
12054   { (eval echo "$as_me:12054: \"$ac_try\"") >&5
12055   (eval $ac_try) 2>&5
12056   ac_status=$?
12057   echo "$as_me:12057: \$? = $ac_status" >&5
12058   (exit $ac_status); }; }; then
12059   ac_cv_func_pthread_kill=yes
12060 else
12061   echo "$as_me: failed program was:" >&5
12062 cat conftest.$ac_ext >&5
12063 ac_cv_func_pthread_kill=no
12064 fi
12065 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12066 fi
12067 echo "$as_me:12067: result: $ac_cv_func_pthread_kill" >&5
12068 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
12069 if test $ac_cv_func_pthread_kill = yes; then
12070
12071                 echo "$as_me:12071: checking if you want to allow EINTR in wgetch with pthreads" >&5
12072 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
12073
12074 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
12075 if test "${enable_pthreads_eintr+set}" = set; then
12076   enableval="$enable_pthreads_eintr"
12077   use_pthreads_eintr=$enableval
12078 else
12079   use_pthreads_eintr=no
12080 fi;
12081                 echo "$as_me:12081: result: $use_pthreads_eintr" >&5
12082 echo "${ECHO_T}$use_pthreads_eintr" >&6
12083                 if test "x$use_pthreads_eintr" = xyes ; then
12084
12085 cat >>confdefs.h <<\EOF
12086 #define USE_PTHREADS_EINTR 1
12087 EOF
12088
12089                 fi
12090 fi
12091
12092         echo "$as_me:12092: checking if you want to use weak-symbols for pthreads" >&5
12093 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
12094
12095 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
12096 if test "${enable_weak_symbols+set}" = set; then
12097   enableval="$enable_weak_symbols"
12098   use_weak_symbols=$enableval
12099 else
12100   use_weak_symbols=no
12101 fi;
12102         echo "$as_me:12102: result: $use_weak_symbols" >&5
12103 echo "${ECHO_T}$use_weak_symbols" >&6
12104         if test "x$use_weak_symbols" = xyes ; then
12105
12106 echo "$as_me:12106: checking if $CC supports weak symbols" >&5
12107 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
12108 if test "${cf_cv_weak_symbols+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111
12112 cat >conftest.$ac_ext <<_ACEOF
12113 #line 12113 "configure"
12114 #include "confdefs.h"
12115
12116 #include <stdio.h>
12117 int
12118 main ()
12119 {
12120
12121 #if defined(__GNUC__)
12122 #  if defined __USE_ISOC99
12123 #    define _cat_pragma(exp)    _Pragma(#exp)
12124 #    define _weak_pragma(exp)   _cat_pragma(weak name)
12125 #  else
12126 #    define _weak_pragma(exp)
12127 #  endif
12128 #  define _declare(name)        __extension__ extern __typeof__(name) name
12129 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
12130 #endif
12131
12132 weak_symbol(fopen);
12133
12134   ;
12135   return 0;
12136 }
12137 _ACEOF
12138 rm -f conftest.$ac_objext
12139 if { (eval echo "$as_me:12139: \"$ac_compile\"") >&5
12140   (eval $ac_compile) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); } &&
12144          { ac_try='test -s conftest.$ac_objext'
12145   { (eval echo "$as_me:12145: \"$ac_try\"") >&5
12146   (eval $ac_try) 2>&5
12147   ac_status=$?
12148   echo "$as_me:12148: \$? = $ac_status" >&5
12149   (exit $ac_status); }; }; then
12150   cf_cv_weak_symbols=yes
12151 else
12152   echo "$as_me: failed program was:" >&5
12153 cat conftest.$ac_ext >&5
12154 cf_cv_weak_symbols=no
12155 fi
12156 rm -f conftest.$ac_objext conftest.$ac_ext
12157
12158 fi
12159 echo "$as_me:12159: result: $cf_cv_weak_symbols" >&5
12160 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
12161
12162         else
12163                 cf_cv_weak_symbols=no
12164         fi
12165
12166         if test "x$cf_cv_weak_symbols" = xyes ; then
12167
12168 cat >>confdefs.h <<\EOF
12169 #define USE_WEAK_SYMBOLS 1
12170 EOF
12171
12172         fi
12173 fi
12174
12175 PTHREAD=
12176 if test "x$with_pthread" = "xyes" ; then
12177
12178 cat >>confdefs.h <<\EOF
12179 #define USE_PTHREADS 1
12180 EOF
12181
12182     enable_reentrant=yes
12183     if test "x$cf_cv_weak_symbols" = xyes ; then
12184         PTHREAD=-lpthread
12185     fi
12186 fi
12187
12188 # Reentrant code has to be opaque; there's little advantage to making ncurses
12189 # opaque outside of that, so there is no --enable-opaque option.  We can use
12190 # this option without --with-pthreads, but this will be always set for
12191 # pthreads.
12192 echo "$as_me:12192: checking if you want experimental reentrant code" >&5
12193 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
12194
12195 # Check whether --enable-reentrant or --disable-reentrant was given.
12196 if test "${enable_reentrant+set}" = set; then
12197   enableval="$enable_reentrant"
12198   with_reentrant=$enableval
12199 else
12200   with_reentrant=no
12201 fi;
12202 echo "$as_me:12202: result: $with_reentrant" >&5
12203 echo "${ECHO_T}$with_reentrant" >&6
12204 if test "x$with_reentrant" = xyes ; then
12205         cf_cv_enable_reentrant=1
12206         cf_cv_enable_opaque="NCURSES_INTERNALS"
12207         NCURSES_OPAQUE=1
12208         NCURSES_SIZE_T=int
12209         if test "x$cf_cv_weak_symbols" = xyes ; then
12210
12211 # remove pthread library from $LIBS
12212 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
12213
12214 cf_add_libs="-lpthread"
12215 # Filter out duplicates - this happens with badly-designed ".pc" files...
12216 for cf_add_1lib in $TEST_LIBS
12217 do
12218         for cf_add_2lib in $cf_add_libs
12219         do
12220                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12221                 then
12222                         cf_add_1lib=
12223                         break
12224                 fi
12225         done
12226         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12227 done
12228 TEST_LIBS="$cf_add_libs"
12229
12230 cf_add_libs="-lpthread"
12231 # Filter out duplicates - this happens with badly-designed ".pc" files...
12232 for cf_add_1lib in $TEST_LIBS2
12233 do
12234         for cf_add_2lib in $cf_add_libs
12235         do
12236                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
12237                 then
12238                         cf_add_1lib=
12239                         break
12240                 fi
12241         done
12242         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12243 done
12244 TEST_LIBS2="$cf_add_libs"
12245
12246         else
12247                 # when not using weak symbols but with_reentrant,
12248                 # add 't' to the library suffix on all platforms
12249                 # except cygwin, where we only do that if ALSO
12250                 # compiling with full thread support.
12251                 case "$host" in
12252                 *cygwin* | *msys*) #(vi
12253                         if test "$with_pthread" = "yes" ; then
12254                                 if test "x$disable_lib_suffixes" = "xno" ; then
12255                                         LIB_SUFFIX="t${LIB_SUFFIX}"
12256                                 fi
12257                         fi ;;
12258                 *)
12259                         if test "x$disable_lib_suffixes" = "xno" ; then
12260                                 LIB_SUFFIX="t${LIB_SUFFIX}"
12261                         fi
12262                         ;;
12263                 esac
12264         fi
12265
12266 cat >>confdefs.h <<\EOF
12267 #define USE_REENTRANT 1
12268 EOF
12269
12270 if test "${with_abi_version+set}" != set; then
12271         case $cf_cv_rel_version in
12272         5.*)
12273                 cf_cv_rel_version=6.0
12274                 cf_cv_abi_version=6
12275                 { echo "$as_me:12275: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
12276 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
12277                 ;;
12278         esac
12279 fi
12280
12281 else
12282         cf_cv_enable_reentrant=0
12283         cf_cv_enable_opaque="NCURSES_OPAQUE"
12284         NCURSES_OPAQUE=0
12285         NCURSES_SIZE_T=short
12286 fi
12287
12288 ### Allow using a different wrap-prefix
12289 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
12290         echo "$as_me:12290: checking for prefix used to wrap public variables" >&5
12291 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
12292
12293 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
12294 if test "${with_wrap_prefix+set}" = set; then
12295   withval="$with_wrap_prefix"
12296   NCURSES_WRAP_PREFIX=$withval
12297 else
12298   NCURSES_WRAP_PREFIX=_nc_
12299 fi;
12300         echo "$as_me:12300: result: $NCURSES_WRAP_PREFIX" >&5
12301 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
12302 else
12303         NCURSES_WRAP_PREFIX=_nc_
12304 fi
12305
12306 cat >>confdefs.h <<EOF
12307 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
12308 EOF
12309
12310 echo "$as_me:12310: checking if you want experimental safe-sprintf code" >&5
12311 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
12312
12313 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
12314 if test "${enable_safe_sprintf+set}" = set; then
12315   enableval="$enable_safe_sprintf"
12316   with_safe_sprintf=$enableval
12317 else
12318   with_safe_sprintf=no
12319 fi;
12320 echo "$as_me:12320: result: $with_safe_sprintf" >&5
12321 echo "${ECHO_T}$with_safe_sprintf" >&6
12322 test "x$with_safe_sprintf" = xyes &&
12323 cat >>confdefs.h <<\EOF
12324 #define USE_SAFE_SPRINTF 1
12325 EOF
12326
12327 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
12328 # when hashmap is used scroll hints are useless
12329 if test "$with_hashmap" = no ; then
12330 echo "$as_me:12330: checking if you want to experiment without scrolling-hints code" >&5
12331 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
12332
12333 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
12334 if test "${enable_scroll_hints+set}" = set; then
12335   enableval="$enable_scroll_hints"
12336   with_scroll_hints=$enableval
12337 else
12338   with_scroll_hints=yes
12339 fi;
12340 echo "$as_me:12340: result: $with_scroll_hints" >&5
12341 echo "${ECHO_T}$with_scroll_hints" >&6
12342 test "x$with_scroll_hints" = xyes &&
12343 cat >>confdefs.h <<\EOF
12344 #define USE_SCROLL_HINTS 1
12345 EOF
12346
12347 fi
12348
12349 echo "$as_me:12349: checking if you want experimental wgetch-events code" >&5
12350 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
12351
12352 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
12353 if test "${enable_wgetch_events+set}" = set; then
12354   enableval="$enable_wgetch_events"
12355   with_wgetch_events=$enableval
12356 else
12357   with_wgetch_events=no
12358 fi;
12359 echo "$as_me:12359: result: $with_wgetch_events" >&5
12360 echo "${ECHO_T}$with_wgetch_events" >&6
12361 test "x$with_wgetch_events" = xyes &&
12362 cat >>confdefs.h <<\EOF
12363 #define NCURSES_WGETCH_EVENTS 1
12364 EOF
12365
12366 ###############################################################################
12367
12368 ###     use option --disable-echo to suppress full display compiling commands
12369
12370 echo "$as_me:12370: checking if you want to see long compiling messages" >&5
12371 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
12372
12373 # Check whether --enable-echo or --disable-echo was given.
12374 if test "${enable_echo+set}" = set; then
12375   enableval="$enable_echo"
12376   test "$enableval" != no && enableval=yes
12377   if test "$enableval" != "yes" ; then
12378
12379     ECHO_LT='--silent'
12380     ECHO_LD='@echo linking $@;'
12381     RULE_CC='@echo compiling $<'
12382     SHOW_CC='@echo compiling $@'
12383     ECHO_CC='@'
12384
12385   else
12386
12387     ECHO_LT=''
12388     ECHO_LD=''
12389     RULE_CC=''
12390     SHOW_CC=''
12391     ECHO_CC=''
12392
12393   fi
12394 else
12395   enableval=yes
12396
12397     ECHO_LT=''
12398     ECHO_LD=''
12399     RULE_CC=''
12400     SHOW_CC=''
12401     ECHO_CC=''
12402
12403 fi;
12404 echo "$as_me:12404: result: $enableval" >&5
12405 echo "${ECHO_T}$enableval" >&6
12406
12407 if test "x$enable_echo" = xyes; then
12408         ECHO_LINK=
12409 else
12410         ECHO_LINK='@ echo linking $@ ... ;'
12411         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
12412         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
12413 fi
12414
12415 ###     use option --enable-warnings to turn on all gcc warnings
12416 echo "$as_me:12416: checking if you want to see compiler warnings" >&5
12417 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
12418
12419 # Check whether --enable-warnings or --disable-warnings was given.
12420 if test "${enable_warnings+set}" = set; then
12421   enableval="$enable_warnings"
12422   with_warnings=$enableval
12423 fi;
12424 echo "$as_me:12424: result: $with_warnings" >&5
12425 echo "${ECHO_T}$with_warnings" >&6
12426
12427 if test "x$with_warnings" = "xyes"; then
12428
12429         ADAFLAGS="$ADAFLAGS -gnatg"
12430
12431 INTEL_COMPILER=no
12432
12433 if test "$GCC" = yes ; then
12434         case $host_os in
12435         linux*|gnu*)
12436                 echo "$as_me:12436: checking if this is really Intel C compiler" >&5
12437 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
12438                 cf_save_CFLAGS="$CFLAGS"
12439                 CFLAGS="$CFLAGS -no-gcc"
12440                 cat >conftest.$ac_ext <<_ACEOF
12441 #line 12441 "configure"
12442 #include "confdefs.h"
12443
12444 int
12445 main ()
12446 {
12447
12448 #ifdef __INTEL_COMPILER
12449 #else
12450 make an error
12451 #endif
12452
12453   ;
12454   return 0;
12455 }
12456 _ACEOF
12457 rm -f conftest.$ac_objext
12458 if { (eval echo "$as_me:12458: \"$ac_compile\"") >&5
12459   (eval $ac_compile) 2>&5
12460   ac_status=$?
12461   echo "$as_me:12461: \$? = $ac_status" >&5
12462   (exit $ac_status); } &&
12463          { ac_try='test -s conftest.$ac_objext'
12464   { (eval echo "$as_me:12464: \"$ac_try\"") >&5
12465   (eval $ac_try) 2>&5
12466   ac_status=$?
12467   echo "$as_me:12467: \$? = $ac_status" >&5
12468   (exit $ac_status); }; }; then
12469   INTEL_COMPILER=yes
12470 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12471
12472 else
12473   echo "$as_me: failed program was:" >&5
12474 cat conftest.$ac_ext >&5
12475 fi
12476 rm -f conftest.$ac_objext conftest.$ac_ext
12477                 CFLAGS="$cf_save_CFLAGS"
12478                 echo "$as_me:12478: result: $INTEL_COMPILER" >&5
12479 echo "${ECHO_T}$INTEL_COMPILER" >&6
12480                 ;;
12481         esac
12482 fi
12483
12484 CLANG_COMPILER=no
12485
12486 if test "$GCC" = yes ; then
12487         echo "$as_me:12487: checking if this is really Clang C compiler" >&5
12488 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
12489         cf_save_CFLAGS="$CFLAGS"
12490         CFLAGS="$CFLAGS -Qunused-arguments"
12491         cat >conftest.$ac_ext <<_ACEOF
12492 #line 12492 "configure"
12493 #include "confdefs.h"
12494
12495 int
12496 main ()
12497 {
12498
12499 #ifdef __clang__
12500 #else
12501 make an error
12502 #endif
12503
12504   ;
12505   return 0;
12506 }
12507 _ACEOF
12508 rm -f conftest.$ac_objext
12509 if { (eval echo "$as_me:12509: \"$ac_compile\"") >&5
12510   (eval $ac_compile) 2>&5
12511   ac_status=$?
12512   echo "$as_me:12512: \$? = $ac_status" >&5
12513   (exit $ac_status); } &&
12514          { ac_try='test -s conftest.$ac_objext'
12515   { (eval echo "$as_me:12515: \"$ac_try\"") >&5
12516   (eval $ac_try) 2>&5
12517   ac_status=$?
12518   echo "$as_me:12518: \$? = $ac_status" >&5
12519   (exit $ac_status); }; }; then
12520   CLANG_COMPILER=yes
12521 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12522
12523 else
12524   echo "$as_me: failed program was:" >&5
12525 cat conftest.$ac_ext >&5
12526 fi
12527 rm -f conftest.$ac_objext conftest.$ac_ext
12528         CFLAGS="$cf_save_CFLAGS"
12529         echo "$as_me:12529: result: $CLANG_COMPILER" >&5
12530 echo "${ECHO_T}$CLANG_COMPILER" >&6
12531 fi
12532
12533 cat > conftest.$ac_ext <<EOF
12534 #line 12534 "${as_me:-configure}"
12535 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12536 EOF
12537
12538 if test "$INTEL_COMPILER" = yes
12539 then
12540 # The "-wdXXX" options suppress warnings:
12541 # remark #1419: external declaration in primary source file
12542 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12543 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12544 # remark #193: zero used for undefined preprocessing identifier
12545 # remark #593: variable "curs_sb_left_arrow" was set but never used
12546 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12547 # remark #869: parameter "tw" was never referenced
12548 # remark #981: operands are evaluated in unspecified order
12549 # warning #279: controlling expression is constant
12550
12551         { echo "$as_me:12551: checking for $CC warning options..." >&5
12552 echo "$as_me: checking for $CC warning options..." >&6;}
12553         cf_save_CFLAGS="$CFLAGS"
12554         EXTRA_CFLAGS="-Wall"
12555         for cf_opt in \
12556                 wd1419 \
12557                 wd1683 \
12558                 wd1684 \
12559                 wd193 \
12560                 wd593 \
12561                 wd279 \
12562                 wd810 \
12563                 wd869 \
12564                 wd981
12565         do
12566                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12567                 if { (eval echo "$as_me:12567: \"$ac_compile\"") >&5
12568   (eval $ac_compile) 2>&5
12569   ac_status=$?
12570   echo "$as_me:12570: \$? = $ac_status" >&5
12571   (exit $ac_status); }; then
12572                         test -n "$verbose" && echo "$as_me:12572: result: ... -$cf_opt" >&5
12573 echo "${ECHO_T}... -$cf_opt" >&6
12574                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12575                 fi
12576         done
12577         CFLAGS="$cf_save_CFLAGS"
12578
12579 elif test "$GCC" = yes
12580 then
12581         { echo "$as_me:12581: checking for $CC warning options..." >&5
12582 echo "$as_me: checking for $CC warning options..." >&6;}
12583         cf_save_CFLAGS="$CFLAGS"
12584         EXTRA_CFLAGS=
12585         cf_warn_CONST=""
12586         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
12587         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
12588         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
12589         for cf_opt in W Wall \
12590                 Wbad-function-cast \
12591                 Wcast-align \
12592                 Wcast-qual \
12593                 Wdeclaration-after-statement \
12594                 Wextra \
12595                 Winline \
12596                 Wmissing-declarations \
12597                 Wmissing-prototypes \
12598                 Wnested-externs \
12599                 Wpointer-arith \
12600                 Wshadow \
12601                 Wstrict-prototypes \
12602                 Wundef $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
12603         do
12604                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
12605                 if { (eval echo "$as_me:12605: \"$ac_compile\"") >&5
12606   (eval $ac_compile) 2>&5
12607   ac_status=$?
12608   echo "$as_me:12608: \$? = $ac_status" >&5
12609   (exit $ac_status); }; then
12610                         test -n "$verbose" && echo "$as_me:12610: result: ... -$cf_opt" >&5
12611 echo "${ECHO_T}... -$cf_opt" >&6
12612                         case $cf_opt in #(vi
12613                         Wcast-qual) #(vi
12614                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
12615                                 ;;
12616                         Winline) #(vi
12617                                 case $GCC_VERSION in
12618                                 [34].*)
12619                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12620
12621 echo "${as_me:-configure}:12621: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12622
12623                                         continue;;
12624                                 esac
12625                                 ;;
12626                         Wpointer-arith) #(vi
12627                                 case $GCC_VERSION in
12628                                 [12].*)
12629                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
12630
12631 echo "${as_me:-configure}:12631: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
12632
12633                                         continue;;
12634                                 esac
12635                                 ;;
12636                         esac
12637                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
12638                 fi
12639         done
12640         CFLAGS="$cf_save_CFLAGS"
12641 fi
12642 rm -rf conftest*
12643
12644         if test "x$cf_with_cxx" = xyes ; then
12645
12646 INTEL_CPLUSPLUS=no
12647
12648 if test "$GCC" = yes ; then
12649         case $host_os in
12650         linux*|gnu*)
12651                 echo "$as_me:12651: checking if this is really Intel C++ compiler" >&5
12652 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
12653                 cf_save_CFLAGS="$CXXFLAGS"
12654                 CXXFLAGS="$CXXFLAGS -no-gcc"
12655                 cat >conftest.$ac_ext <<_ACEOF
12656 #line 12656 "configure"
12657 #include "confdefs.h"
12658
12659 int
12660 main ()
12661 {
12662
12663 #ifdef __INTEL_COMPILER
12664 #else
12665 make an error
12666 #endif
12667
12668   ;
12669   return 0;
12670 }
12671 _ACEOF
12672 rm -f conftest.$ac_objext
12673 if { (eval echo "$as_me:12673: \"$ac_compile\"") >&5
12674   (eval $ac_compile) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); } &&
12678          { ac_try='test -s conftest.$ac_objext'
12679   { (eval echo "$as_me:12679: \"$ac_try\"") >&5
12680   (eval $ac_try) 2>&5
12681   ac_status=$?
12682   echo "$as_me:12682: \$? = $ac_status" >&5
12683   (exit $ac_status); }; }; then
12684   INTEL_CPLUSPLUS=yes
12685 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
12686
12687 else
12688   echo "$as_me: failed program was:" >&5
12689 cat conftest.$ac_ext >&5
12690 fi
12691 rm -f conftest.$ac_objext conftest.$ac_ext
12692                 CXXFLAGS="$cf_save_CFLAGS"
12693                 echo "$as_me:12693: result: $INTEL_CPLUSPLUS" >&5
12694 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
12695                 ;;
12696         esac
12697 fi
12698
12699 CLANG_CPLUSPLUS=no
12700
12701 if test "$GCC" = yes ; then
12702         echo "$as_me:12702: checking if this is really Clang C++ compiler" >&5
12703 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
12704         cf_save_CFLAGS="$CXXFLAGS"
12705         CXXFLAGS="$CXXFLAGS -Qunused-arguments"
12706         cat >conftest.$ac_ext <<_ACEOF
12707 #line 12707 "configure"
12708 #include "confdefs.h"
12709
12710 int
12711 main ()
12712 {
12713
12714 #ifdef __clang__
12715 #else
12716 make an error
12717 #endif
12718
12719   ;
12720   return 0;
12721 }
12722 _ACEOF
12723 rm -f conftest.$ac_objext
12724 if { (eval echo "$as_me:12724: \"$ac_compile\"") >&5
12725   (eval $ac_compile) 2>&5
12726   ac_status=$?
12727   echo "$as_me:12727: \$? = $ac_status" >&5
12728   (exit $ac_status); } &&
12729          { ac_try='test -s conftest.$ac_objext'
12730   { (eval echo "$as_me:12730: \"$ac_try\"") >&5
12731   (eval $ac_try) 2>&5
12732   ac_status=$?
12733   echo "$as_me:12733: \$? = $ac_status" >&5
12734   (exit $ac_status); }; }; then
12735   CLANG_CPLUSPLUS=yes
12736 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
12737
12738 else
12739   echo "$as_me: failed program was:" >&5
12740 cat conftest.$ac_ext >&5
12741 fi
12742 rm -f conftest.$ac_objext conftest.$ac_ext
12743         CXXFLAGS="$cf_save_CFLAGS"
12744         echo "$as_me:12744: result: $CLANG_CPLUSPLUS" >&5
12745 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
12746 fi
12747
12748 ac_ext=cc
12749 ac_cpp='$CXXCPP $CPPFLAGS'
12750 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12751 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12752 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12753 ac_main_return=return
12754
12755 cat > conftest.$ac_ext <<EOF
12756 #line 12756 "configure"
12757 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
12758 EOF
12759
12760 if test "$INTEL_CPLUSPLUS" = yes
12761 then
12762 # The "-wdXXX" options suppress warnings:
12763 # remark #1419: external declaration in primary source file
12764 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12765 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
12766 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
12767 # remark #193: zero used for undefined preprocessing identifier
12768 # remark #593: variable "curs_sb_left_arrow" was set but never used
12769 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
12770 # remark #869: parameter "tw" was never referenced
12771 # remark #981: operands are evaluated in unspecified order
12772 # warning #269: invalid format string conversion
12773
12774         { echo "$as_me:12774: checking for $CC warning options..." >&5
12775 echo "$as_me: checking for $CC warning options..." >&6;}
12776         cf_save_CXXFLAGS="$CXXFLAGS"
12777         EXTRA_CXXFLAGS="-Wall"
12778         for cf_opt in \
12779                 wd1419 \
12780                 wd1682 \
12781                 wd1683 \
12782                 wd1684 \
12783                 wd193 \
12784                 wd279 \
12785                 wd593 \
12786                 wd810 \
12787                 wd869 \
12788                 wd981
12789         do
12790                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
12791                 if { (eval echo "$as_me:12791: \"$ac_compile\"") >&5
12792   (eval $ac_compile) 2>&5
12793   ac_status=$?
12794   echo "$as_me:12794: \$? = $ac_status" >&5
12795   (exit $ac_status); }; then
12796                         test -n "$verbose" && echo "$as_me:12796: result: ... -$cf_opt" >&5
12797 echo "${ECHO_T}... -$cf_opt" >&6
12798                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12799                 fi
12800         done
12801         CXXFLAGS="$cf_save_CXXFLAGS"
12802
12803 elif test "$GXX" = yes
12804 then
12805         { echo "$as_me:12805: checking for $CXX warning options..." >&5
12806 echo "$as_me: checking for $CXX warning options..." >&6;}
12807         cf_save_CXXFLAGS="$CXXFLAGS"
12808         EXTRA_CXXFLAGS="-W -Wall"
12809         cf_gxx_extra_warnings=""
12810         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
12811         case "$GCC_VERSION" in
12812         [1-2].*)
12813                 ;;
12814         *)
12815                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
12816                 ;;
12817         esac
12818         for cf_opt in \
12819                 Wabi \
12820                 fabi-version=0 \
12821                 Wextra \
12822                 Wignored-qualifiers \
12823                 Wlogical-op \
12824                 Woverloaded-virtual \
12825                 Wsign-promo \
12826                 Wsynth \
12827                 Wold-style-cast \
12828                 Wcast-align \
12829                 Wcast-qual \
12830                 Wpointer-arith \
12831                 Wshadow \
12832                 Wundef $cf_gxx_extra_warnings Wno-unused
12833         do
12834                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
12835                 if { (eval echo "$as_me:12835: \"$ac_compile\"") >&5
12836   (eval $ac_compile) 2>&5
12837   ac_status=$?
12838   echo "$as_me:12838: \$? = $ac_status" >&5
12839   (exit $ac_status); }; then
12840                         test -n "$verbose" && echo "$as_me:12840: result: ... -$cf_opt" >&5
12841 echo "${ECHO_T}... -$cf_opt" >&6
12842                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
12843                 else
12844                         test -n "$verbose" && echo "$as_me:12844: result: ... no -$cf_opt" >&5
12845 echo "${ECHO_T}... no -$cf_opt" >&6
12846                 fi
12847         done
12848         CXXFLAGS="$cf_save_CXXFLAGS"
12849 fi
12850
12851 rm -rf conftest*
12852 ac_ext=c
12853 ac_cpp='$CPP $CPPFLAGS'
12854 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12855 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12856 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12857 ac_main_return=return
12858
12859         fi
12860 fi
12861
12862 if test "$GCC" = yes
12863 then
12864 cat > conftest.i <<EOF
12865 #ifndef GCC_PRINTF
12866 #define GCC_PRINTF 0
12867 #endif
12868 #ifndef GCC_SCANF
12869 #define GCC_SCANF 0
12870 #endif
12871 #ifndef GCC_NORETURN
12872 #define GCC_NORETURN /* nothing */
12873 #endif
12874 #ifndef GCC_UNUSED
12875 #define GCC_UNUSED /* nothing */
12876 #endif
12877 EOF
12878 if test "$GCC" = yes
12879 then
12880         { echo "$as_me:12880: checking for $CC __attribute__ directives..." >&5
12881 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
12882 cat > conftest.$ac_ext <<EOF
12883 #line 12883 "${as_me:-configure}"
12884 #include "confdefs.h"
12885 #include "conftest.h"
12886 #include "conftest.i"
12887 #if     GCC_PRINTF
12888 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
12889 #else
12890 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
12891 #endif
12892 #if     GCC_SCANF
12893 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
12894 #else
12895 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
12896 #endif
12897 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
12898 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
12899 extern void foo(void) GCC_NORETURN;
12900 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
12901 EOF
12902         cf_printf_attribute=no
12903         cf_scanf_attribute=no
12904         for cf_attribute in scanf printf unused noreturn
12905         do
12906
12907 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12908
12909                 cf_directive="__attribute__(($cf_attribute))"
12910                 echo "checking for $CC $cf_directive" 1>&5
12911
12912                 case $cf_attribute in #(vi
12913                 printf) #(vi
12914                         cf_printf_attribute=yes
12915                         cat >conftest.h <<EOF
12916 #define GCC_$cf_ATTRIBUTE 1
12917 EOF
12918                         ;;
12919                 scanf) #(vi
12920                         cf_scanf_attribute=yes
12921                         cat >conftest.h <<EOF
12922 #define GCC_$cf_ATTRIBUTE 1
12923 EOF
12924                         ;;
12925                 *) #(vi
12926                         cat >conftest.h <<EOF
12927 #define GCC_$cf_ATTRIBUTE $cf_directive
12928 EOF
12929                         ;;
12930                 esac
12931
12932                 if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933   (eval $ac_compile) 2>&5
12934   ac_status=$?
12935   echo "$as_me:12935: \$? = $ac_status" >&5
12936   (exit $ac_status); }; then
12937                         test -n "$verbose" && echo "$as_me:12937: result: ... $cf_attribute" >&5
12938 echo "${ECHO_T}... $cf_attribute" >&6
12939                         cat conftest.h >>confdefs.h
12940                         case $cf_attribute in #(vi
12941                         noreturn) #(vi
12942
12943 cat >>confdefs.h <<EOF
12944 #define GCC_NORETURN $cf_directive
12945 EOF
12946
12947                                 ;;
12948                         printf) #(vi
12949                                 cf_value='/* nothing */'
12950                                 if test "$cf_printf_attribute" != no ; then
12951                                         cf_value='__attribute__((format(printf,fmt,var)))'
12952
12953 cat >>confdefs.h <<\EOF
12954 #define GCC_PRINTF 1
12955 EOF
12956
12957                                 fi
12958
12959 cat >>confdefs.h <<EOF
12960 #define GCC_PRINTFLIKE(fmt,var) $cf_value
12961 EOF
12962
12963                                 ;;
12964                         scanf) #(vi
12965                                 cf_value='/* nothing */'
12966                                 if test "$cf_scanf_attribute" != no ; then
12967                                         cf_value='__attribute__((format(scanf,fmt,var)))'
12968
12969 cat >>confdefs.h <<\EOF
12970 #define GCC_SCANF 1
12971 EOF
12972
12973                                 fi
12974
12975 cat >>confdefs.h <<EOF
12976 #define GCC_SCANFLIKE(fmt,var) $cf_value
12977 EOF
12978
12979                                 ;;
12980                         unused) #(vi
12981
12982 cat >>confdefs.h <<EOF
12983 #define GCC_UNUSED $cf_directive
12984 EOF
12985
12986                                 ;;
12987                         esac
12988                 fi
12989         done
12990 else
12991         fgrep define conftest.i >>confdefs.h
12992 fi
12993 rm -rf conftest*
12994 fi
12995
12996 echo "$as_me:12996: checking if you want to work around bogus compiler/loader warnings" >&5
12997 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
12998
12999 # Check whether --enable-string-hacks or --disable-string-hacks was given.
13000 if test "${enable_string_hacks+set}" = set; then
13001   enableval="$enable_string_hacks"
13002   with_string_hacks=$enableval
13003 else
13004   with_string_hacks=no
13005 fi;
13006 echo "$as_me:13006: result: $with_string_hacks" >&5
13007 echo "${ECHO_T}$with_string_hacks" >&6
13008
13009 if test "x$with_string_hacks" = "xyes"; then
13010
13011 cat >>confdefs.h <<\EOF
13012 #define USE_STRING_HACKS 1
13013 EOF
13014
13015         { echo "$as_me:13015: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
13016 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
13017
13018 for ac_func in strlcat strlcpy snprintf
13019 do
13020 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13021 echo "$as_me:13021: checking for $ac_func" >&5
13022 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13023 if eval "test \"\${$as_ac_var+set}\" = set"; then
13024   echo $ECHO_N "(cached) $ECHO_C" >&6
13025 else
13026   cat >conftest.$ac_ext <<_ACEOF
13027 #line 13027 "configure"
13028 #include "confdefs.h"
13029 /* System header to define __stub macros and hopefully few prototypes,
13030     which can conflict with char $ac_func (); below.  */
13031 #include <assert.h>
13032 /* Override any gcc2 internal prototype to avoid an error.  */
13033 #ifdef __cplusplus
13034 extern "C"
13035 #endif
13036 /* We use char because int might match the return type of a gcc2
13037    builtin and then its argument prototype would still apply.  */
13038 char $ac_func ();
13039 char (*f) ();
13040
13041 int
13042 main ()
13043 {
13044 /* The GNU C library defines this for functions which it implements
13045     to always fail with ENOSYS.  Some functions are actually named
13046     something starting with __ and the normal name is an alias.  */
13047 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13048 choke me
13049 #else
13050 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13051 #endif
13052
13053   ;
13054   return 0;
13055 }
13056 _ACEOF
13057 rm -f conftest.$ac_objext conftest$ac_exeext
13058 if { (eval echo "$as_me:13058: \"$ac_link\"") >&5
13059   (eval $ac_link) 2>&5
13060   ac_status=$?
13061   echo "$as_me:13061: \$? = $ac_status" >&5
13062   (exit $ac_status); } &&
13063          { ac_try='test -s conftest$ac_exeext'
13064   { (eval echo "$as_me:13064: \"$ac_try\"") >&5
13065   (eval $ac_try) 2>&5
13066   ac_status=$?
13067   echo "$as_me:13067: \$? = $ac_status" >&5
13068   (exit $ac_status); }; }; then
13069   eval "$as_ac_var=yes"
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat conftest.$ac_ext >&5
13073 eval "$as_ac_var=no"
13074 fi
13075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13076 fi
13077 echo "$as_me:13077: result: `eval echo '${'$as_ac_var'}'`" >&5
13078 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13079 if test `eval echo '${'$as_ac_var'}'` = yes; then
13080   cat >>confdefs.h <<EOF
13081 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13082 EOF
13083
13084 fi
13085 done
13086
13087 fi
13088
13089 ###     use option --enable-assertions to turn on generation of assertion code
13090 echo "$as_me:13090: checking if you want to enable runtime assertions" >&5
13091 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
13092
13093 # Check whether --enable-assertions or --disable-assertions was given.
13094 if test "${enable_assertions+set}" = set; then
13095   enableval="$enable_assertions"
13096   with_assertions=$enableval
13097 else
13098   with_assertions=no
13099 fi;
13100 echo "$as_me:13100: result: $with_assertions" >&5
13101 echo "${ECHO_T}$with_assertions" >&6
13102 if test -n "$GCC"
13103 then
13104         if test "$with_assertions" = no
13105         then
13106                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
13107         else
13108
13109         ADAFLAGS="$ADAFLAGS -gnata"
13110
13111         fi
13112 fi
13113
13114 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
13115
13116 echo "$as_me:13116: checking if you want to use dmalloc for testing" >&5
13117 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
13118
13119 # Check whether --with-dmalloc or --without-dmalloc was given.
13120 if test "${with_dmalloc+set}" = set; then
13121   withval="$with_dmalloc"
13122
13123 cat >>confdefs.h <<EOF
13124 #define USE_DMALLOC 1
13125 EOF
13126
13127         : ${with_cflags:=-g}
13128         : ${with_no_leaks:=yes}
13129          with_dmalloc=yes
13130 else
13131   with_dmalloc=
13132 fi;
13133 echo "$as_me:13133: result: ${with_dmalloc:-no}" >&5
13134 echo "${ECHO_T}${with_dmalloc:-no}" >&6
13135
13136 case .$with_cflags in #(vi
13137 .*-g*)
13138         case .$CFLAGS in #(vi
13139         .*-g*) #(vi
13140                 ;;
13141         *)
13142
13143 cf_fix_cppflags=no
13144 cf_new_cflags=
13145 cf_new_cppflags=
13146 cf_new_extra_cppflags=
13147
13148 for cf_add_cflags in -g
13149 do
13150 case $cf_fix_cppflags in
13151 no)
13152         case $cf_add_cflags in #(vi
13153         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13154                 case $cf_add_cflags in
13155                 -D*)
13156                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13157
13158                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13159                                 && test -z "${cf_tst_cflags}" \
13160                                 && cf_fix_cppflags=yes
13161
13162                         if test $cf_fix_cppflags = yes ; then
13163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13164                                 continue
13165                         elif test "${cf_tst_cflags}" = "\"'" ; then
13166                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13167                                 continue
13168                         fi
13169                         ;;
13170                 esac
13171                 case "$CPPFLAGS" in
13172                 *$cf_add_cflags) #(vi
13173                         ;;
13174                 *) #(vi
13175                         case $cf_add_cflags in #(vi
13176                         -D*)
13177                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13178
13179 CPPFLAGS=`echo "$CPPFLAGS" | \
13180         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13181                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13182
13183                                 ;;
13184                         esac
13185                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13186                         ;;
13187                 esac
13188                 ;;
13189         *)
13190                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13191                 ;;
13192         esac
13193         ;;
13194 yes)
13195         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13196
13197         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13198
13199         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13200                 && test -z "${cf_tst_cflags}" \
13201                 && cf_fix_cppflags=no
13202         ;;
13203 esac
13204 done
13205
13206 if test -n "$cf_new_cflags" ; then
13207
13208         CFLAGS="$CFLAGS $cf_new_cflags"
13209 fi
13210
13211 if test -n "$cf_new_cppflags" ; then
13212
13213         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13214 fi
13215
13216 if test -n "$cf_new_extra_cppflags" ; then
13217
13218         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13219 fi
13220
13221                 ;;
13222         esac
13223         ;;
13224 esac
13225
13226 if test "$with_dmalloc" = yes ; then
13227         echo "$as_me:13227: checking for dmalloc.h" >&5
13228 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
13229 if test "${ac_cv_header_dmalloc_h+set}" = set; then
13230   echo $ECHO_N "(cached) $ECHO_C" >&6
13231 else
13232   cat >conftest.$ac_ext <<_ACEOF
13233 #line 13233 "configure"
13234 #include "confdefs.h"
13235 #include <dmalloc.h>
13236 _ACEOF
13237 if { (eval echo "$as_me:13237: \"$ac_cpp conftest.$ac_ext\"") >&5
13238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13239   ac_status=$?
13240   egrep -v '^ *\+' conftest.er1 >conftest.err
13241   rm -f conftest.er1
13242   cat conftest.err >&5
13243   echo "$as_me:13243: \$? = $ac_status" >&5
13244   (exit $ac_status); } >/dev/null; then
13245   if test -s conftest.err; then
13246     ac_cpp_err=$ac_c_preproc_warn_flag
13247   else
13248     ac_cpp_err=
13249   fi
13250 else
13251   ac_cpp_err=yes
13252 fi
13253 if test -z "$ac_cpp_err"; then
13254   ac_cv_header_dmalloc_h=yes
13255 else
13256   echo "$as_me: failed program was:" >&5
13257   cat conftest.$ac_ext >&5
13258   ac_cv_header_dmalloc_h=no
13259 fi
13260 rm -f conftest.err conftest.$ac_ext
13261 fi
13262 echo "$as_me:13262: result: $ac_cv_header_dmalloc_h" >&5
13263 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
13264 if test $ac_cv_header_dmalloc_h = yes; then
13265
13266 echo "$as_me:13266: checking for dmalloc_debug in -ldmalloc" >&5
13267 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
13268 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271   ac_check_lib_save_LIBS=$LIBS
13272 LIBS="-ldmalloc  $LIBS"
13273 cat >conftest.$ac_ext <<_ACEOF
13274 #line 13274 "configure"
13275 #include "confdefs.h"
13276
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 #ifdef __cplusplus
13279 extern "C"
13280 #endif
13281 /* We use char because int might match the return type of a gcc2
13282    builtin and then its argument prototype would still apply.  */
13283 char dmalloc_debug ();
13284 int
13285 main ()
13286 {
13287 dmalloc_debug ();
13288   ;
13289   return 0;
13290 }
13291 _ACEOF
13292 rm -f conftest.$ac_objext conftest$ac_exeext
13293 if { (eval echo "$as_me:13293: \"$ac_link\"") >&5
13294   (eval $ac_link) 2>&5
13295   ac_status=$?
13296   echo "$as_me:13296: \$? = $ac_status" >&5
13297   (exit $ac_status); } &&
13298          { ac_try='test -s conftest$ac_exeext'
13299   { (eval echo "$as_me:13299: \"$ac_try\"") >&5
13300   (eval $ac_try) 2>&5
13301   ac_status=$?
13302   echo "$as_me:13302: \$? = $ac_status" >&5
13303   (exit $ac_status); }; }; then
13304   ac_cv_lib_dmalloc_dmalloc_debug=yes
13305 else
13306   echo "$as_me: failed program was:" >&5
13307 cat conftest.$ac_ext >&5
13308 ac_cv_lib_dmalloc_dmalloc_debug=no
13309 fi
13310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13311 LIBS=$ac_check_lib_save_LIBS
13312 fi
13313 echo "$as_me:13313: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
13314 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
13315 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
13316   cat >>confdefs.h <<EOF
13317 #define HAVE_LIBDMALLOC 1
13318 EOF
13319
13320   LIBS="-ldmalloc $LIBS"
13321
13322 fi
13323
13324 fi
13325
13326 fi
13327
13328 echo "$as_me:13328: checking if you want to use dbmalloc for testing" >&5
13329 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
13330
13331 # Check whether --with-dbmalloc or --without-dbmalloc was given.
13332 if test "${with_dbmalloc+set}" = set; then
13333   withval="$with_dbmalloc"
13334
13335 cat >>confdefs.h <<EOF
13336 #define USE_DBMALLOC 1
13337 EOF
13338
13339         : ${with_cflags:=-g}
13340         : ${with_no_leaks:=yes}
13341          with_dbmalloc=yes
13342 else
13343   with_dbmalloc=
13344 fi;
13345 echo "$as_me:13345: result: ${with_dbmalloc:-no}" >&5
13346 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
13347
13348 case .$with_cflags in #(vi
13349 .*-g*)
13350         case .$CFLAGS in #(vi
13351         .*-g*) #(vi
13352                 ;;
13353         *)
13354
13355 cf_fix_cppflags=no
13356 cf_new_cflags=
13357 cf_new_cppflags=
13358 cf_new_extra_cppflags=
13359
13360 for cf_add_cflags in -g
13361 do
13362 case $cf_fix_cppflags in
13363 no)
13364         case $cf_add_cflags in #(vi
13365         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13366                 case $cf_add_cflags in
13367                 -D*)
13368                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13369
13370                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13371                                 && test -z "${cf_tst_cflags}" \
13372                                 && cf_fix_cppflags=yes
13373
13374                         if test $cf_fix_cppflags = yes ; then
13375                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13376                                 continue
13377                         elif test "${cf_tst_cflags}" = "\"'" ; then
13378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13379                                 continue
13380                         fi
13381                         ;;
13382                 esac
13383                 case "$CPPFLAGS" in
13384                 *$cf_add_cflags) #(vi
13385                         ;;
13386                 *) #(vi
13387                         case $cf_add_cflags in #(vi
13388                         -D*)
13389                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13390
13391 CPPFLAGS=`echo "$CPPFLAGS" | \
13392         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13393                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13394
13395                                 ;;
13396                         esac
13397                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13398                         ;;
13399                 esac
13400                 ;;
13401         *)
13402                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13403                 ;;
13404         esac
13405         ;;
13406 yes)
13407         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13408
13409         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13410
13411         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13412                 && test -z "${cf_tst_cflags}" \
13413                 && cf_fix_cppflags=no
13414         ;;
13415 esac
13416 done
13417
13418 if test -n "$cf_new_cflags" ; then
13419
13420         CFLAGS="$CFLAGS $cf_new_cflags"
13421 fi
13422
13423 if test -n "$cf_new_cppflags" ; then
13424
13425         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13426 fi
13427
13428 if test -n "$cf_new_extra_cppflags" ; then
13429
13430         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13431 fi
13432
13433                 ;;
13434         esac
13435         ;;
13436 esac
13437
13438 if test "$with_dbmalloc" = yes ; then
13439         echo "$as_me:13439: checking for dbmalloc.h" >&5
13440 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
13441 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
13442   echo $ECHO_N "(cached) $ECHO_C" >&6
13443 else
13444   cat >conftest.$ac_ext <<_ACEOF
13445 #line 13445 "configure"
13446 #include "confdefs.h"
13447 #include <dbmalloc.h>
13448 _ACEOF
13449 if { (eval echo "$as_me:13449: \"$ac_cpp conftest.$ac_ext\"") >&5
13450   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13451   ac_status=$?
13452   egrep -v '^ *\+' conftest.er1 >conftest.err
13453   rm -f conftest.er1
13454   cat conftest.err >&5
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } >/dev/null; then
13457   if test -s conftest.err; then
13458     ac_cpp_err=$ac_c_preproc_warn_flag
13459   else
13460     ac_cpp_err=
13461   fi
13462 else
13463   ac_cpp_err=yes
13464 fi
13465 if test -z "$ac_cpp_err"; then
13466   ac_cv_header_dbmalloc_h=yes
13467 else
13468   echo "$as_me: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   ac_cv_header_dbmalloc_h=no
13471 fi
13472 rm -f conftest.err conftest.$ac_ext
13473 fi
13474 echo "$as_me:13474: result: $ac_cv_header_dbmalloc_h" >&5
13475 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
13476 if test $ac_cv_header_dbmalloc_h = yes; then
13477
13478 echo "$as_me:13478: checking for debug_malloc in -ldbmalloc" >&5
13479 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
13480 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
13481   echo $ECHO_N "(cached) $ECHO_C" >&6
13482 else
13483   ac_check_lib_save_LIBS=$LIBS
13484 LIBS="-ldbmalloc  $LIBS"
13485 cat >conftest.$ac_ext <<_ACEOF
13486 #line 13486 "configure"
13487 #include "confdefs.h"
13488
13489 /* Override any gcc2 internal prototype to avoid an error.  */
13490 #ifdef __cplusplus
13491 extern "C"
13492 #endif
13493 /* We use char because int might match the return type of a gcc2
13494    builtin and then its argument prototype would still apply.  */
13495 char debug_malloc ();
13496 int
13497 main ()
13498 {
13499 debug_malloc ();
13500   ;
13501   return 0;
13502 }
13503 _ACEOF
13504 rm -f conftest.$ac_objext conftest$ac_exeext
13505 if { (eval echo "$as_me:13505: \"$ac_link\"") >&5
13506   (eval $ac_link) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit $ac_status); } &&
13510          { ac_try='test -s conftest$ac_exeext'
13511   { (eval echo "$as_me:13511: \"$ac_try\"") >&5
13512   (eval $ac_try) 2>&5
13513   ac_status=$?
13514   echo "$as_me:13514: \$? = $ac_status" >&5
13515   (exit $ac_status); }; }; then
13516   ac_cv_lib_dbmalloc_debug_malloc=yes
13517 else
13518   echo "$as_me: failed program was:" >&5
13519 cat conftest.$ac_ext >&5
13520 ac_cv_lib_dbmalloc_debug_malloc=no
13521 fi
13522 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13523 LIBS=$ac_check_lib_save_LIBS
13524 fi
13525 echo "$as_me:13525: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
13526 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
13527 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
13528   cat >>confdefs.h <<EOF
13529 #define HAVE_LIBDBMALLOC 1
13530 EOF
13531
13532   LIBS="-ldbmalloc $LIBS"
13533
13534 fi
13535
13536 fi
13537
13538 fi
13539
13540 echo "$as_me:13540: checking if you want to use valgrind for testing" >&5
13541 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
13542
13543 # Check whether --with-valgrind or --without-valgrind was given.
13544 if test "${with_valgrind+set}" = set; then
13545   withval="$with_valgrind"
13546
13547 cat >>confdefs.h <<EOF
13548 #define USE_VALGRIND 1
13549 EOF
13550
13551         : ${with_cflags:=-g}
13552         : ${with_no_leaks:=yes}
13553          with_valgrind=yes
13554 else
13555   with_valgrind=
13556 fi;
13557 echo "$as_me:13557: result: ${with_valgrind:-no}" >&5
13558 echo "${ECHO_T}${with_valgrind:-no}" >&6
13559
13560 case .$with_cflags in #(vi
13561 .*-g*)
13562         case .$CFLAGS in #(vi
13563         .*-g*) #(vi
13564                 ;;
13565         *)
13566
13567 cf_fix_cppflags=no
13568 cf_new_cflags=
13569 cf_new_cppflags=
13570 cf_new_extra_cppflags=
13571
13572 for cf_add_cflags in -g
13573 do
13574 case $cf_fix_cppflags in
13575 no)
13576         case $cf_add_cflags in #(vi
13577         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13578                 case $cf_add_cflags in
13579                 -D*)
13580                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13581
13582                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13583                                 && test -z "${cf_tst_cflags}" \
13584                                 && cf_fix_cppflags=yes
13585
13586                         if test $cf_fix_cppflags = yes ; then
13587                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13588                                 continue
13589                         elif test "${cf_tst_cflags}" = "\"'" ; then
13590                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13591                                 continue
13592                         fi
13593                         ;;
13594                 esac
13595                 case "$CPPFLAGS" in
13596                 *$cf_add_cflags) #(vi
13597                         ;;
13598                 *) #(vi
13599                         case $cf_add_cflags in #(vi
13600                         -D*)
13601                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13602
13603 CPPFLAGS=`echo "$CPPFLAGS" | \
13604         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13605                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13606
13607                                 ;;
13608                         esac
13609                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13610                         ;;
13611                 esac
13612                 ;;
13613         *)
13614                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13615                 ;;
13616         esac
13617         ;;
13618 yes)
13619         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13620
13621         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13622
13623         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13624                 && test -z "${cf_tst_cflags}" \
13625                 && cf_fix_cppflags=no
13626         ;;
13627 esac
13628 done
13629
13630 if test -n "$cf_new_cflags" ; then
13631
13632         CFLAGS="$CFLAGS $cf_new_cflags"
13633 fi
13634
13635 if test -n "$cf_new_cppflags" ; then
13636
13637         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13638 fi
13639
13640 if test -n "$cf_new_extra_cppflags" ; then
13641
13642         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13643 fi
13644
13645                 ;;
13646         esac
13647         ;;
13648 esac
13649
13650 echo "$as_me:13650: checking if you want to perform memory-leak testing" >&5
13651 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
13652
13653 # Check whether --enable-leaks or --disable-leaks was given.
13654 if test "${enable_leaks+set}" = set; then
13655   enableval="$enable_leaks"
13656   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
13657 else
13658   : ${with_no_leaks:=no}
13659 fi;
13660 echo "$as_me:13660: result: $with_no_leaks" >&5
13661 echo "${ECHO_T}$with_no_leaks" >&6
13662
13663 if test "$with_no_leaks" = yes ; then
13664
13665 cat >>confdefs.h <<\EOF
13666 #define NO_LEAKS 1
13667 EOF
13668
13669 cat >>confdefs.h <<\EOF
13670 #define YY_NO_LEAKS 1
13671 EOF
13672
13673 fi
13674
13675 cat >>confdefs.h <<\EOF
13676 #define HAVE_NC_ALLOC_H 1
13677 EOF
13678
13679 ###     use option --enable-expanded to generate certain macros as functions
13680
13681 # Check whether --enable-expanded or --disable-expanded was given.
13682 if test "${enable_expanded+set}" = set; then
13683   enableval="$enable_expanded"
13684   test "x$enableval" = xyes &&
13685 cat >>confdefs.h <<\EOF
13686 #define NCURSES_EXPANDED 1
13687 EOF
13688
13689 fi;
13690
13691 ###     use option --disable-macros to suppress macros in favor of functions
13692
13693 # Check whether --enable-macros or --disable-macros was given.
13694 if test "${enable_macros+set}" = set; then
13695   enableval="$enable_macros"
13696   test "$enableval" = no &&
13697 cat >>confdefs.h <<\EOF
13698 #define NCURSES_NOMACROS 1
13699 EOF
13700
13701 fi;
13702
13703 # Normally we only add trace() to the debug-library.  Allow this to be
13704 # extended to all models of the ncurses library:
13705 cf_all_traces=no
13706 case "$CFLAGS $CPPFLAGS" in
13707 *-DTRACE*)
13708         cf_all_traces=yes
13709         ;;
13710 esac
13711
13712 echo "$as_me:13712: checking whether to add trace feature to all models" >&5
13713 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
13714
13715 # Check whether --with-trace or --without-trace was given.
13716 if test "${with_trace+set}" = set; then
13717   withval="$with_trace"
13718   cf_with_trace=$withval
13719 else
13720   cf_with_trace=$cf_all_traces
13721 fi;
13722 echo "$as_me:13722: result: $cf_with_trace" >&5
13723 echo "${ECHO_T}$cf_with_trace" >&6
13724
13725 if test "x$cf_with_trace" = xyes ; then
13726         LIB_TRACING=all
13727         ADA_TRACE=TRUE
13728
13729 cf_fix_cppflags=no
13730 cf_new_cflags=
13731 cf_new_cppflags=
13732 cf_new_extra_cppflags=
13733
13734 for cf_add_cflags in -DTRACE
13735 do
13736 case $cf_fix_cppflags in
13737 no)
13738         case $cf_add_cflags in #(vi
13739         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13740                 case $cf_add_cflags in
13741                 -D*)
13742                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13743
13744                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13745                                 && test -z "${cf_tst_cflags}" \
13746                                 && cf_fix_cppflags=yes
13747
13748                         if test $cf_fix_cppflags = yes ; then
13749                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13750                                 continue
13751                         elif test "${cf_tst_cflags}" = "\"'" ; then
13752                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13753                                 continue
13754                         fi
13755                         ;;
13756                 esac
13757                 case "$CPPFLAGS" in
13758                 *$cf_add_cflags) #(vi
13759                         ;;
13760                 *) #(vi
13761                         case $cf_add_cflags in #(vi
13762                         -D*)
13763                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13764
13765 CPPFLAGS=`echo "$CPPFLAGS" | \
13766         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13767                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13768
13769                                 ;;
13770                         esac
13771                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13772                         ;;
13773                 esac
13774                 ;;
13775         *)
13776                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13777                 ;;
13778         esac
13779         ;;
13780 yes)
13781         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13782
13783         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13784
13785         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13786                 && test -z "${cf_tst_cflags}" \
13787                 && cf_fix_cppflags=no
13788         ;;
13789 esac
13790 done
13791
13792 if test -n "$cf_new_cflags" ; then
13793
13794         CFLAGS="$CFLAGS $cf_new_cflags"
13795 fi
13796
13797 if test -n "$cf_new_cppflags" ; then
13798
13799         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13800 fi
13801
13802 if test -n "$cf_new_extra_cppflags" ; then
13803
13804         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13805 fi
13806
13807 else
13808         LIB_TRACING=DEBUG
13809         ADA_TRACE=FALSE
13810 fi
13811
13812 echo "$as_me:13812: checking if we want to use GNAT projects" >&5
13813 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
13814
13815 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
13816 if test "${enable_gnat_projects+set}" = set; then
13817   enableval="$enable_gnat_projects"
13818   test "$enableval" != no && enableval=yes
13819   if test "$enableval" != "yes" ; then
13820     enable_gnat_projects=no
13821   else
13822     enable_gnat_projects=yes
13823   fi
13824 else
13825   enableval=yes
13826   enable_gnat_projects=yes
13827
13828 fi;
13829 echo "$as_me:13829: result: $enable_gnat_projects" >&5
13830 echo "${ECHO_T}$enable_gnat_projects" >&6
13831
13832 ###     Checks for libraries.
13833 case $cf_cv_system_name in #(vi
13834 *mingw32*) #(vi
13835         LIBS=" -lpsapi $LIBS"
13836         ;;
13837 *)
13838 echo "$as_me:13838: checking for gettimeofday" >&5
13839 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
13840 if test "${ac_cv_func_gettimeofday+set}" = set; then
13841   echo $ECHO_N "(cached) $ECHO_C" >&6
13842 else
13843   cat >conftest.$ac_ext <<_ACEOF
13844 #line 13844 "configure"
13845 #include "confdefs.h"
13846 /* System header to define __stub macros and hopefully few prototypes,
13847     which can conflict with char gettimeofday (); below.  */
13848 #include <assert.h>
13849 /* Override any gcc2 internal prototype to avoid an error.  */
13850 #ifdef __cplusplus
13851 extern "C"
13852 #endif
13853 /* We use char because int might match the return type of a gcc2
13854    builtin and then its argument prototype would still apply.  */
13855 char gettimeofday ();
13856 char (*f) ();
13857
13858 int
13859 main ()
13860 {
13861 /* The GNU C library defines this for functions which it implements
13862     to always fail with ENOSYS.  Some functions are actually named
13863     something starting with __ and the normal name is an alias.  */
13864 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
13865 choke me
13866 #else
13867 f = gettimeofday; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13868 #endif
13869
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 rm -f conftest.$ac_objext conftest$ac_exeext
13875 if { (eval echo "$as_me:13875: \"$ac_link\"") >&5
13876   (eval $ac_link) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); } &&
13880          { ac_try='test -s conftest$ac_exeext'
13881   { (eval echo "$as_me:13881: \"$ac_try\"") >&5
13882   (eval $ac_try) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); }; }; then
13886   ac_cv_func_gettimeofday=yes
13887 else
13888   echo "$as_me: failed program was:" >&5
13889 cat conftest.$ac_ext >&5
13890 ac_cv_func_gettimeofday=no
13891 fi
13892 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13893 fi
13894 echo "$as_me:13894: result: $ac_cv_func_gettimeofday" >&5
13895 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
13896 if test $ac_cv_func_gettimeofday = yes; then
13897
13898 cat >>confdefs.h <<\EOF
13899 #define HAVE_GETTIMEOFDAY 1
13900 EOF
13901
13902 else
13903
13904 echo "$as_me:13904: checking for gettimeofday in -lbsd" >&5
13905 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
13906 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
13907   echo $ECHO_N "(cached) $ECHO_C" >&6
13908 else
13909   ac_check_lib_save_LIBS=$LIBS
13910 LIBS="-lbsd  $LIBS"
13911 cat >conftest.$ac_ext <<_ACEOF
13912 #line 13912 "configure"
13913 #include "confdefs.h"
13914
13915 /* Override any gcc2 internal prototype to avoid an error.  */
13916 #ifdef __cplusplus
13917 extern "C"
13918 #endif
13919 /* We use char because int might match the return type of a gcc2
13920    builtin and then its argument prototype would still apply.  */
13921 char gettimeofday ();
13922 int
13923 main ()
13924 {
13925 gettimeofday ();
13926   ;
13927   return 0;
13928 }
13929 _ACEOF
13930 rm -f conftest.$ac_objext conftest$ac_exeext
13931 if { (eval echo "$as_me:13931: \"$ac_link\"") >&5
13932   (eval $ac_link) 2>&5
13933   ac_status=$?
13934   echo "$as_me:13934: \$? = $ac_status" >&5
13935   (exit $ac_status); } &&
13936          { ac_try='test -s conftest$ac_exeext'
13937   { (eval echo "$as_me:13937: \"$ac_try\"") >&5
13938   (eval $ac_try) 2>&5
13939   ac_status=$?
13940   echo "$as_me:13940: \$? = $ac_status" >&5
13941   (exit $ac_status); }; }; then
13942   ac_cv_lib_bsd_gettimeofday=yes
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 ac_cv_lib_bsd_gettimeofday=no
13947 fi
13948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13949 LIBS=$ac_check_lib_save_LIBS
13950 fi
13951 echo "$as_me:13951: result: $ac_cv_lib_bsd_gettimeofday" >&5
13952 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
13953 if test $ac_cv_lib_bsd_gettimeofday = yes; then
13954
13955 cat >>confdefs.h <<\EOF
13956 #define HAVE_GETTIMEOFDAY 1
13957 EOF
13958
13959 cf_add_libs="-lbsd"
13960 # Filter out duplicates - this happens with badly-designed ".pc" files...
13961 for cf_add_1lib in $LIBS
13962 do
13963         for cf_add_2lib in $cf_add_libs
13964         do
13965                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
13966                 then
13967                         cf_add_1lib=
13968                         break
13969                 fi
13970         done
13971         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13972 done
13973 LIBS="$cf_add_libs"
13974
13975 fi
13976
13977 fi
13978         ;;
13979 esac
13980
13981 echo "$as_me:13981: checking if -lm needed for math functions" >&5
13982 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
13983 if test "${cf_cv_need_libm+set}" = set; then
13984   echo $ECHO_N "(cached) $ECHO_C" >&6
13985 else
13986
13987         cat >conftest.$ac_ext <<_ACEOF
13988 #line 13988 "configure"
13989 #include "confdefs.h"
13990
13991         #include <stdio.h>
13992         #include <math.h>
13993
13994 int
13995 main ()
13996 {
13997 double x = rand(); printf("result = %g\n", pow(sin(x),x))
13998   ;
13999   return 0;
14000 }
14001 _ACEOF
14002 rm -f conftest.$ac_objext conftest$ac_exeext
14003 if { (eval echo "$as_me:14003: \"$ac_link\"") >&5
14004   (eval $ac_link) 2>&5
14005   ac_status=$?
14006   echo "$as_me:14006: \$? = $ac_status" >&5
14007   (exit $ac_status); } &&
14008          { ac_try='test -s conftest$ac_exeext'
14009   { (eval echo "$as_me:14009: \"$ac_try\"") >&5
14010   (eval $ac_try) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit $ac_status); }; }; then
14014   cf_cv_need_libm=no
14015 else
14016   echo "$as_me: failed program was:" >&5
14017 cat conftest.$ac_ext >&5
14018 cf_cv_need_libm=yes
14019 fi
14020 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14021 fi
14022 echo "$as_me:14022: result: $cf_cv_need_libm" >&5
14023 echo "${ECHO_T}$cf_cv_need_libm" >&6
14024 if test "$cf_cv_need_libm" = yes
14025 then
14026 MATH_LIB=-lm
14027 fi
14028
14029 ###     Checks for header files.
14030 echo "$as_me:14030: checking for ANSI C header files" >&5
14031 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14032 if test "${ac_cv_header_stdc+set}" = set; then
14033   echo $ECHO_N "(cached) $ECHO_C" >&6
14034 else
14035   cat >conftest.$ac_ext <<_ACEOF
14036 #line 14036 "configure"
14037 #include "confdefs.h"
14038 #include <stdlib.h>
14039 #include <stdarg.h>
14040 #include <string.h>
14041 #include <float.h>
14042
14043 _ACEOF
14044 if { (eval echo "$as_me:14044: \"$ac_cpp conftest.$ac_ext\"") >&5
14045   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14046   ac_status=$?
14047   egrep -v '^ *\+' conftest.er1 >conftest.err
14048   rm -f conftest.er1
14049   cat conftest.err >&5
14050   echo "$as_me:14050: \$? = $ac_status" >&5
14051   (exit $ac_status); } >/dev/null; then
14052   if test -s conftest.err; then
14053     ac_cpp_err=$ac_c_preproc_warn_flag
14054   else
14055     ac_cpp_err=
14056   fi
14057 else
14058   ac_cpp_err=yes
14059 fi
14060 if test -z "$ac_cpp_err"; then
14061   ac_cv_header_stdc=yes
14062 else
14063   echo "$as_me: failed program was:" >&5
14064   cat conftest.$ac_ext >&5
14065   ac_cv_header_stdc=no
14066 fi
14067 rm -f conftest.err conftest.$ac_ext
14068
14069 if test $ac_cv_header_stdc = yes; then
14070   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14071   cat >conftest.$ac_ext <<_ACEOF
14072 #line 14072 "configure"
14073 #include "confdefs.h"
14074 #include <string.h>
14075
14076 _ACEOF
14077 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14078   egrep "memchr" >/dev/null 2>&1; then
14079   :
14080 else
14081   ac_cv_header_stdc=no
14082 fi
14083 rm -rf conftest*
14084
14085 fi
14086
14087 if test $ac_cv_header_stdc = yes; then
14088   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14089   cat >conftest.$ac_ext <<_ACEOF
14090 #line 14090 "configure"
14091 #include "confdefs.h"
14092 #include <stdlib.h>
14093
14094 _ACEOF
14095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14096   egrep "free" >/dev/null 2>&1; then
14097   :
14098 else
14099   ac_cv_header_stdc=no
14100 fi
14101 rm -rf conftest*
14102
14103 fi
14104
14105 if test $ac_cv_header_stdc = yes; then
14106   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14107   if test "$cross_compiling" = yes; then
14108   :
14109 else
14110   cat >conftest.$ac_ext <<_ACEOF
14111 #line 14111 "configure"
14112 #include "confdefs.h"
14113 #include <ctype.h>
14114 #if ((' ' & 0x0FF) == 0x020)
14115 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14116 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14117 #else
14118 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14119                      || ('j' <= (c) && (c) <= 'r') \
14120                      || ('s' <= (c) && (c) <= 'z'))
14121 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14122 #endif
14123
14124 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14125 int
14126 main ()
14127 {
14128   int i;
14129   for (i = 0; i < 256; i++)
14130     if (XOR (islower (i), ISLOWER (i))
14131         || toupper (i) != TOUPPER (i))
14132       $ac_main_return(2);
14133   $ac_main_return (0);
14134 }
14135 _ACEOF
14136 rm -f conftest$ac_exeext
14137 if { (eval echo "$as_me:14137: \"$ac_link\"") >&5
14138   (eval $ac_link) 2>&5
14139   ac_status=$?
14140   echo "$as_me:14140: \$? = $ac_status" >&5
14141   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14142   { (eval echo "$as_me:14142: \"$ac_try\"") >&5
14143   (eval $ac_try) 2>&5
14144   ac_status=$?
14145   echo "$as_me:14145: \$? = $ac_status" >&5
14146   (exit $ac_status); }; }; then
14147   :
14148 else
14149   echo "$as_me: program exited with status $ac_status" >&5
14150 echo "$as_me: failed program was:" >&5
14151 cat conftest.$ac_ext >&5
14152 ac_cv_header_stdc=no
14153 fi
14154 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14155 fi
14156 fi
14157 fi
14158 echo "$as_me:14158: result: $ac_cv_header_stdc" >&5
14159 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14160 if test $ac_cv_header_stdc = yes; then
14161
14162 cat >>confdefs.h <<\EOF
14163 #define STDC_HEADERS 1
14164 EOF
14165
14166 fi
14167
14168 ac_header_dirent=no
14169 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
14170   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
14171 echo "$as_me:14171: checking for $ac_hdr that defines DIR" >&5
14172 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
14173 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14174   echo $ECHO_N "(cached) $ECHO_C" >&6
14175 else
14176   cat >conftest.$ac_ext <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179 #include <sys/types.h>
14180 #include <$ac_hdr>
14181
14182 int
14183 main ()
14184 {
14185 if ((DIR *) 0)
14186 return 0;
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f conftest.$ac_objext
14192 if { (eval echo "$as_me:14192: \"$ac_compile\"") >&5
14193   (eval $ac_compile) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); } &&
14197          { ac_try='test -s conftest.$ac_objext'
14198   { (eval echo "$as_me:14198: \"$ac_try\"") >&5
14199   (eval $ac_try) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit $ac_status); }; }; then
14203   eval "$as_ac_Header=yes"
14204 else
14205   echo "$as_me: failed program was:" >&5
14206 cat conftest.$ac_ext >&5
14207 eval "$as_ac_Header=no"
14208 fi
14209 rm -f conftest.$ac_objext conftest.$ac_ext
14210 fi
14211 echo "$as_me:14211: result: `eval echo '${'$as_ac_Header'}'`" >&5
14212 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14213 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14214   cat >>confdefs.h <<EOF
14215 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
14216 EOF
14217
14218 ac_header_dirent=$ac_hdr; break
14219 fi
14220
14221 done
14222 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
14223 if test $ac_header_dirent = dirent.h; then
14224   echo "$as_me:14224: checking for opendir in -ldir" >&5
14225 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
14226 if test "${ac_cv_lib_dir_opendir+set}" = set; then
14227   echo $ECHO_N "(cached) $ECHO_C" >&6
14228 else
14229   ac_check_lib_save_LIBS=$LIBS
14230 LIBS="-ldir  $LIBS"
14231 cat >conftest.$ac_ext <<_ACEOF
14232 #line 14232 "configure"
14233 #include "confdefs.h"
14234
14235 /* Override any gcc2 internal prototype to avoid an error.  */
14236 #ifdef __cplusplus
14237 extern "C"
14238 #endif
14239 /* We use char because int might match the return type of a gcc2
14240    builtin and then its argument prototype would still apply.  */
14241 char opendir ();
14242 int
14243 main ()
14244 {
14245 opendir ();
14246   ;
14247   return 0;
14248 }
14249 _ACEOF
14250 rm -f conftest.$ac_objext conftest$ac_exeext
14251 if { (eval echo "$as_me:14251: \"$ac_link\"") >&5
14252   (eval $ac_link) 2>&5
14253   ac_status=$?
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit $ac_status); } &&
14256          { ac_try='test -s conftest$ac_exeext'
14257   { (eval echo "$as_me:14257: \"$ac_try\"") >&5
14258   (eval $ac_try) 2>&5
14259   ac_status=$?
14260   echo "$as_me:14260: \$? = $ac_status" >&5
14261   (exit $ac_status); }; }; then
14262   ac_cv_lib_dir_opendir=yes
14263 else
14264   echo "$as_me: failed program was:" >&5
14265 cat conftest.$ac_ext >&5
14266 ac_cv_lib_dir_opendir=no
14267 fi
14268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14269 LIBS=$ac_check_lib_save_LIBS
14270 fi
14271 echo "$as_me:14271: result: $ac_cv_lib_dir_opendir" >&5
14272 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
14273 if test $ac_cv_lib_dir_opendir = yes; then
14274   LIBS="$LIBS -ldir"
14275 fi
14276
14277 else
14278   echo "$as_me:14278: checking for opendir in -lx" >&5
14279 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
14280 if test "${ac_cv_lib_x_opendir+set}" = set; then
14281   echo $ECHO_N "(cached) $ECHO_C" >&6
14282 else
14283   ac_check_lib_save_LIBS=$LIBS
14284 LIBS="-lx  $LIBS"
14285 cat >conftest.$ac_ext <<_ACEOF
14286 #line 14286 "configure"
14287 #include "confdefs.h"
14288
14289 /* Override any gcc2 internal prototype to avoid an error.  */
14290 #ifdef __cplusplus
14291 extern "C"
14292 #endif
14293 /* We use char because int might match the return type of a gcc2
14294    builtin and then its argument prototype would still apply.  */
14295 char opendir ();
14296 int
14297 main ()
14298 {
14299 opendir ();
14300   ;
14301   return 0;
14302 }
14303 _ACEOF
14304 rm -f conftest.$ac_objext conftest$ac_exeext
14305 if { (eval echo "$as_me:14305: \"$ac_link\"") >&5
14306   (eval $ac_link) 2>&5
14307   ac_status=$?
14308   echo "$as_me:14308: \$? = $ac_status" >&5
14309   (exit $ac_status); } &&
14310          { ac_try='test -s conftest$ac_exeext'
14311   { (eval echo "$as_me:14311: \"$ac_try\"") >&5
14312   (eval $ac_try) 2>&5
14313   ac_status=$?
14314   echo "$as_me:14314: \$? = $ac_status" >&5
14315   (exit $ac_status); }; }; then
14316   ac_cv_lib_x_opendir=yes
14317 else
14318   echo "$as_me: failed program was:" >&5
14319 cat conftest.$ac_ext >&5
14320 ac_cv_lib_x_opendir=no
14321 fi
14322 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14323 LIBS=$ac_check_lib_save_LIBS
14324 fi
14325 echo "$as_me:14325: result: $ac_cv_lib_x_opendir" >&5
14326 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
14327 if test $ac_cv_lib_x_opendir = yes; then
14328   LIBS="$LIBS -lx"
14329 fi
14330
14331 fi
14332
14333 echo "$as_me:14333: checking whether time.h and sys/time.h may both be included" >&5
14334 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14335 if test "${ac_cv_header_time+set}" = set; then
14336   echo $ECHO_N "(cached) $ECHO_C" >&6
14337 else
14338   cat >conftest.$ac_ext <<_ACEOF
14339 #line 14339 "configure"
14340 #include "confdefs.h"
14341 #include <sys/types.h>
14342 #include <sys/time.h>
14343 #include <time.h>
14344
14345 int
14346 main ()
14347 {
14348 if ((struct tm *) 0)
14349 return 0;
14350   ;
14351   return 0;
14352 }
14353 _ACEOF
14354 rm -f conftest.$ac_objext
14355 if { (eval echo "$as_me:14355: \"$ac_compile\"") >&5
14356   (eval $ac_compile) 2>&5
14357   ac_status=$?
14358   echo "$as_me:14358: \$? = $ac_status" >&5
14359   (exit $ac_status); } &&
14360          { ac_try='test -s conftest.$ac_objext'
14361   { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); }; }; then
14366   ac_cv_header_time=yes
14367 else
14368   echo "$as_me: failed program was:" >&5
14369 cat conftest.$ac_ext >&5
14370 ac_cv_header_time=no
14371 fi
14372 rm -f conftest.$ac_objext conftest.$ac_ext
14373 fi
14374 echo "$as_me:14374: result: $ac_cv_header_time" >&5
14375 echo "${ECHO_T}$ac_cv_header_time" >&6
14376 if test $ac_cv_header_time = yes; then
14377
14378 cat >>confdefs.h <<\EOF
14379 #define TIME_WITH_SYS_TIME 1
14380 EOF
14381
14382 fi
14383
14384 cf_regex_func=no
14385
14386 cf_regex_libs="regex re"
14387 case $host_os in #(vi
14388 mingw*)
14389         cf_regex_libs="gnurx $cf_regex_libs"
14390         ;;
14391 esac
14392
14393 echo "$as_me:14393: checking for regcomp" >&5
14394 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
14395 if test "${ac_cv_func_regcomp+set}" = set; then
14396   echo $ECHO_N "(cached) $ECHO_C" >&6
14397 else
14398   cat >conftest.$ac_ext <<_ACEOF
14399 #line 14399 "configure"
14400 #include "confdefs.h"
14401 /* System header to define __stub macros and hopefully few prototypes,
14402     which can conflict with char regcomp (); below.  */
14403 #include <assert.h>
14404 /* Override any gcc2 internal prototype to avoid an error.  */
14405 #ifdef __cplusplus
14406 extern "C"
14407 #endif
14408 /* We use char because int might match the return type of a gcc2
14409    builtin and then its argument prototype would still apply.  */
14410 char regcomp ();
14411 char (*f) ();
14412
14413 int
14414 main ()
14415 {
14416 /* The GNU C library defines this for functions which it implements
14417     to always fail with ENOSYS.  Some functions are actually named
14418     something starting with __ and the normal name is an alias.  */
14419 #if defined (__stub_regcomp) || defined (__stub___regcomp)
14420 choke me
14421 #else
14422 f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14423 #endif
14424
14425   ;
14426   return 0;
14427 }
14428 _ACEOF
14429 rm -f conftest.$ac_objext conftest$ac_exeext
14430 if { (eval echo "$as_me:14430: \"$ac_link\"") >&5
14431   (eval $ac_link) 2>&5
14432   ac_status=$?
14433   echo "$as_me:14433: \$? = $ac_status" >&5
14434   (exit $ac_status); } &&
14435          { ac_try='test -s conftest$ac_exeext'
14436   { (eval echo "$as_me:14436: \"$ac_try\"") >&5
14437   (eval $ac_try) 2>&5
14438   ac_status=$?
14439   echo "$as_me:14439: \$? = $ac_status" >&5
14440   (exit $ac_status); }; }; then
14441   ac_cv_func_regcomp=yes
14442 else
14443   echo "$as_me: failed program was:" >&5
14444 cat conftest.$ac_ext >&5
14445 ac_cv_func_regcomp=no
14446 fi
14447 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14448 fi
14449 echo "$as_me:14449: result: $ac_cv_func_regcomp" >&5
14450 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
14451 if test $ac_cv_func_regcomp = yes; then
14452   cf_regex_func=regcomp
14453 else
14454
14455         for cf_regex_lib in $cf_regex_libs
14456         do
14457                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
14458 echo "$as_me:14458: checking for regcomp in -l$cf_regex_lib" >&5
14459 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
14460 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
14461   echo $ECHO_N "(cached) $ECHO_C" >&6
14462 else
14463   ac_check_lib_save_LIBS=$LIBS
14464 LIBS="-l$cf_regex_lib  $LIBS"
14465 cat >conftest.$ac_ext <<_ACEOF
14466 #line 14466 "configure"
14467 #include "confdefs.h"
14468
14469 /* Override any gcc2 internal prototype to avoid an error.  */
14470 #ifdef __cplusplus
14471 extern "C"
14472 #endif
14473 /* We use char because int might match the return type of a gcc2
14474    builtin and then its argument prototype would still apply.  */
14475 char regcomp ();
14476 int
14477 main ()
14478 {
14479 regcomp ();
14480   ;
14481   return 0;
14482 }
14483 _ACEOF
14484 rm -f conftest.$ac_objext conftest$ac_exeext
14485 if { (eval echo "$as_me:14485: \"$ac_link\"") >&5
14486   (eval $ac_link) 2>&5
14487   ac_status=$?
14488   echo "$as_me:14488: \$? = $ac_status" >&5
14489   (exit $ac_status); } &&
14490          { ac_try='test -s conftest$ac_exeext'
14491   { (eval echo "$as_me:14491: \"$ac_try\"") >&5
14492   (eval $ac_try) 2>&5
14493   ac_status=$?
14494   echo "$as_me:14494: \$? = $ac_status" >&5
14495   (exit $ac_status); }; }; then
14496   eval "$as_ac_Lib=yes"
14497 else
14498   echo "$as_me: failed program was:" >&5
14499 cat conftest.$ac_ext >&5
14500 eval "$as_ac_Lib=no"
14501 fi
14502 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14503 LIBS=$ac_check_lib_save_LIBS
14504 fi
14505 echo "$as_me:14505: result: `eval echo '${'$as_ac_Lib'}'`" >&5
14506 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
14507 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
14508
14509 cf_add_libs="-l$cf_regex_lib"
14510 # Filter out duplicates - this happens with badly-designed ".pc" files...
14511 for cf_add_1lib in $LIBS
14512 do
14513         for cf_add_2lib in $cf_add_libs
14514         do
14515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14516                 then
14517                         cf_add_1lib=
14518                         break
14519                 fi
14520         done
14521         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14522 done
14523 LIBS="$cf_add_libs"
14524
14525                                 cf_regex_func=regcomp
14526                                 break
14527 fi
14528
14529         done
14530
14531 fi
14532
14533 if test "$cf_regex_func" = no ; then
14534         echo "$as_me:14534: checking for compile" >&5
14535 echo $ECHO_N "checking for compile... $ECHO_C" >&6
14536 if test "${ac_cv_func_compile+set}" = set; then
14537   echo $ECHO_N "(cached) $ECHO_C" >&6
14538 else
14539   cat >conftest.$ac_ext <<_ACEOF
14540 #line 14540 "configure"
14541 #include "confdefs.h"
14542 /* System header to define __stub macros and hopefully few prototypes,
14543     which can conflict with char compile (); below.  */
14544 #include <assert.h>
14545 /* Override any gcc2 internal prototype to avoid an error.  */
14546 #ifdef __cplusplus
14547 extern "C"
14548 #endif
14549 /* We use char because int might match the return type of a gcc2
14550    builtin and then its argument prototype would still apply.  */
14551 char compile ();
14552 char (*f) ();
14553
14554 int
14555 main ()
14556 {
14557 /* The GNU C library defines this for functions which it implements
14558     to always fail with ENOSYS.  Some functions are actually named
14559     something starting with __ and the normal name is an alias.  */
14560 #if defined (__stub_compile) || defined (__stub___compile)
14561 choke me
14562 #else
14563 f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14564 #endif
14565
14566   ;
14567   return 0;
14568 }
14569 _ACEOF
14570 rm -f conftest.$ac_objext conftest$ac_exeext
14571 if { (eval echo "$as_me:14571: \"$ac_link\"") >&5
14572   (eval $ac_link) 2>&5
14573   ac_status=$?
14574   echo "$as_me:14574: \$? = $ac_status" >&5
14575   (exit $ac_status); } &&
14576          { ac_try='test -s conftest$ac_exeext'
14577   { (eval echo "$as_me:14577: \"$ac_try\"") >&5
14578   (eval $ac_try) 2>&5
14579   ac_status=$?
14580   echo "$as_me:14580: \$? = $ac_status" >&5
14581   (exit $ac_status); }; }; then
14582   ac_cv_func_compile=yes
14583 else
14584   echo "$as_me: failed program was:" >&5
14585 cat conftest.$ac_ext >&5
14586 ac_cv_func_compile=no
14587 fi
14588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14589 fi
14590 echo "$as_me:14590: result: $ac_cv_func_compile" >&5
14591 echo "${ECHO_T}$ac_cv_func_compile" >&6
14592 if test $ac_cv_func_compile = yes; then
14593   cf_regex_func=compile
14594 else
14595
14596                 echo "$as_me:14596: checking for compile in -lgen" >&5
14597 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
14598 if test "${ac_cv_lib_gen_compile+set}" = set; then
14599   echo $ECHO_N "(cached) $ECHO_C" >&6
14600 else
14601   ac_check_lib_save_LIBS=$LIBS
14602 LIBS="-lgen  $LIBS"
14603 cat >conftest.$ac_ext <<_ACEOF
14604 #line 14604 "configure"
14605 #include "confdefs.h"
14606
14607 /* Override any gcc2 internal prototype to avoid an error.  */
14608 #ifdef __cplusplus
14609 extern "C"
14610 #endif
14611 /* We use char because int might match the return type of a gcc2
14612    builtin and then its argument prototype would still apply.  */
14613 char compile ();
14614 int
14615 main ()
14616 {
14617 compile ();
14618   ;
14619   return 0;
14620 }
14621 _ACEOF
14622 rm -f conftest.$ac_objext conftest$ac_exeext
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624   (eval $ac_link) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); } &&
14628          { ac_try='test -s conftest$ac_exeext'
14629   { (eval echo "$as_me:14629: \"$ac_try\"") >&5
14630   (eval $ac_try) 2>&5
14631   ac_status=$?
14632   echo "$as_me:14632: \$? = $ac_status" >&5
14633   (exit $ac_status); }; }; then
14634   ac_cv_lib_gen_compile=yes
14635 else
14636   echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14638 ac_cv_lib_gen_compile=no
14639 fi
14640 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14641 LIBS=$ac_check_lib_save_LIBS
14642 fi
14643 echo "$as_me:14643: result: $ac_cv_lib_gen_compile" >&5
14644 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
14645 if test $ac_cv_lib_gen_compile = yes; then
14646
14647 cf_add_libs="-lgen"
14648 # Filter out duplicates - this happens with badly-designed ".pc" files...
14649 for cf_add_1lib in $LIBS
14650 do
14651         for cf_add_2lib in $cf_add_libs
14652         do
14653                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
14654                 then
14655                         cf_add_1lib=
14656                         break
14657                 fi
14658         done
14659         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
14660 done
14661 LIBS="$cf_add_libs"
14662
14663                                 cf_regex_func=compile
14664 fi
14665
14666 fi
14667
14668 fi
14669
14670 if test "$cf_regex_func" = no ; then
14671         { echo "$as_me:14671: WARNING: cannot find regular expression library" >&5
14672 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
14673 fi
14674
14675 echo "$as_me:14675: checking for regular-expression headers" >&5
14676 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
14677 if test "${cf_cv_regex_hdrs+set}" = set; then
14678   echo $ECHO_N "(cached) $ECHO_C" >&6
14679 else
14680
14681 cf_cv_regex_hdrs=no
14682 case $cf_regex_func in #(vi
14683 compile) #(vi
14684         for cf_regex_hdr in regexp.h regexpr.h
14685         do
14686                 cat >conftest.$ac_ext <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689 #include <$cf_regex_hdr>
14690 int
14691 main ()
14692 {
14693
14694                         char *p = compile("", "", "", 0);
14695                         int x = step("", "");
14696
14697   ;
14698   return 0;
14699 }
14700 _ACEOF
14701 rm -f conftest.$ac_objext conftest$ac_exeext
14702 if { (eval echo "$as_me:14702: \"$ac_link\"") >&5
14703   (eval $ac_link) 2>&5
14704   ac_status=$?
14705   echo "$as_me:14705: \$? = $ac_status" >&5
14706   (exit $ac_status); } &&
14707          { ac_try='test -s conftest$ac_exeext'
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
14714                         cf_cv_regex_hdrs=$cf_regex_hdr
14715                         break
14716
14717 else
14718   echo "$as_me: failed program was:" >&5
14719 cat conftest.$ac_ext >&5
14720 fi
14721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14722         done
14723         ;;
14724 *)
14725         for cf_regex_hdr in regex.h
14726         do
14727                 cat >conftest.$ac_ext <<_ACEOF
14728 #line 14728 "configure"
14729 #include "confdefs.h"
14730 #include <sys/types.h>
14731 #include <$cf_regex_hdr>
14732 int
14733 main ()
14734 {
14735
14736                         regex_t *p;
14737                         int x = regcomp(p, "", 0);
14738                         int y = regexec(p, "", 0, 0, 0);
14739                         regfree(p);
14740
14741   ;
14742   return 0;
14743 }
14744 _ACEOF
14745 rm -f conftest.$ac_objext conftest$ac_exeext
14746 if { (eval echo "$as_me:14746: \"$ac_link\"") >&5
14747   (eval $ac_link) 2>&5
14748   ac_status=$?
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit $ac_status); } &&
14751          { ac_try='test -s conftest$ac_exeext'
14752   { (eval echo "$as_me:14752: \"$ac_try\"") >&5
14753   (eval $ac_try) 2>&5
14754   ac_status=$?
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit $ac_status); }; }; then
14757
14758                         cf_cv_regex_hdrs=$cf_regex_hdr
14759                         break
14760
14761 else
14762   echo "$as_me: failed program was:" >&5
14763 cat conftest.$ac_ext >&5
14764 fi
14765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14766         done
14767         ;;
14768 esac
14769
14770 fi
14771 echo "$as_me:14771: result: $cf_cv_regex_hdrs" >&5
14772 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
14773
14774 case $cf_cv_regex_hdrs in #(vi
14775     no)        { echo "$as_me:14775: WARNING: no regular expression header found" >&5
14776 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
14777     regex.h)
14778 cat >>confdefs.h <<\EOF
14779 #define HAVE_REGEX_H_FUNCS 1
14780 EOF
14781  ;; #(vi
14782     regexp.h)
14783 cat >>confdefs.h <<\EOF
14784 #define HAVE_REGEXP_H_FUNCS 1
14785 EOF
14786  ;; #(vi
14787     regexpr.h)
14788 cat >>confdefs.h <<\EOF
14789 #define HAVE_REGEXPR_H_FUNCS 1
14790 EOF
14791  ;;
14792 esac
14793
14794 for ac_header in \
14795 fcntl.h \
14796 getopt.h \
14797 limits.h \
14798 locale.h \
14799 math.h \
14800 poll.h \
14801 sys/bsdtypes.h \
14802 sys/ioctl.h \
14803 sys/param.h \
14804 sys/poll.h \
14805 sys/select.h \
14806 sys/time.h \
14807 sys/times.h \
14808 ttyent.h \
14809 unistd.h \
14810 wctype.h \
14811
14812 do
14813 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14814 echo "$as_me:14814: checking for $ac_header" >&5
14815 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14816 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14817   echo $ECHO_N "(cached) $ECHO_C" >&6
14818 else
14819   cat >conftest.$ac_ext <<_ACEOF
14820 #line 14820 "configure"
14821 #include "confdefs.h"
14822 #include <$ac_header>
14823 _ACEOF
14824 if { (eval echo "$as_me:14824: \"$ac_cpp conftest.$ac_ext\"") >&5
14825   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14826   ac_status=$?
14827   egrep -v '^ *\+' conftest.er1 >conftest.err
14828   rm -f conftest.er1
14829   cat conftest.err >&5
14830   echo "$as_me:14830: \$? = $ac_status" >&5
14831   (exit $ac_status); } >/dev/null; then
14832   if test -s conftest.err; then
14833     ac_cpp_err=$ac_c_preproc_warn_flag
14834   else
14835     ac_cpp_err=
14836   fi
14837 else
14838   ac_cpp_err=yes
14839 fi
14840 if test -z "$ac_cpp_err"; then
14841   eval "$as_ac_Header=yes"
14842 else
14843   echo "$as_me: failed program was:" >&5
14844   cat conftest.$ac_ext >&5
14845   eval "$as_ac_Header=no"
14846 fi
14847 rm -f conftest.err conftest.$ac_ext
14848 fi
14849 echo "$as_me:14849: result: `eval echo '${'$as_ac_Header'}'`" >&5
14850 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14851 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14852   cat >>confdefs.h <<EOF
14853 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14854 EOF
14855
14856 fi
14857 done
14858
14859 for ac_header in unistd.h getopt.h
14860 do
14861 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14862 echo "$as_me:14862: checking for $ac_header" >&5
14863 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14864 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14865   echo $ECHO_N "(cached) $ECHO_C" >&6
14866 else
14867   cat >conftest.$ac_ext <<_ACEOF
14868 #line 14868 "configure"
14869 #include "confdefs.h"
14870 #include <$ac_header>
14871 _ACEOF
14872 if { (eval echo "$as_me:14872: \"$ac_cpp conftest.$ac_ext\"") >&5
14873   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14874   ac_status=$?
14875   egrep -v '^ *\+' conftest.er1 >conftest.err
14876   rm -f conftest.er1
14877   cat conftest.err >&5
14878   echo "$as_me:14878: \$? = $ac_status" >&5
14879   (exit $ac_status); } >/dev/null; then
14880   if test -s conftest.err; then
14881     ac_cpp_err=$ac_c_preproc_warn_flag
14882   else
14883     ac_cpp_err=
14884   fi
14885 else
14886   ac_cpp_err=yes
14887 fi
14888 if test -z "$ac_cpp_err"; then
14889   eval "$as_ac_Header=yes"
14890 else
14891   echo "$as_me: failed program was:" >&5
14892   cat conftest.$ac_ext >&5
14893   eval "$as_ac_Header=no"
14894 fi
14895 rm -f conftest.err conftest.$ac_ext
14896 fi
14897 echo "$as_me:14897: result: `eval echo '${'$as_ac_Header'}'`" >&5
14898 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14899 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14900   cat >>confdefs.h <<EOF
14901 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14902 EOF
14903
14904 fi
14905 done
14906
14907 echo "$as_me:14907: checking for header declaring getopt variables" >&5
14908 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
14909 if test "${cf_cv_getopt_header+set}" = set; then
14910   echo $ECHO_N "(cached) $ECHO_C" >&6
14911 else
14912
14913 cf_cv_getopt_header=none
14914 for cf_header in stdio.h stdlib.h unistd.h getopt.h
14915 do
14916 cat >conftest.$ac_ext <<_ACEOF
14917 #line 14917 "configure"
14918 #include "confdefs.h"
14919
14920 #include <$cf_header>
14921 int
14922 main ()
14923 {
14924 int x = optind; char *y = optarg
14925   ;
14926   return 0;
14927 }
14928 _ACEOF
14929 rm -f conftest.$ac_objext
14930 if { (eval echo "$as_me:14930: \"$ac_compile\"") >&5
14931   (eval $ac_compile) 2>&5
14932   ac_status=$?
14933   echo "$as_me:14933: \$? = $ac_status" >&5
14934   (exit $ac_status); } &&
14935          { ac_try='test -s conftest.$ac_objext'
14936   { (eval echo "$as_me:14936: \"$ac_try\"") >&5
14937   (eval $ac_try) 2>&5
14938   ac_status=$?
14939   echo "$as_me:14939: \$? = $ac_status" >&5
14940   (exit $ac_status); }; }; then
14941   cf_cv_getopt_header=$cf_header
14942  break
14943 else
14944   echo "$as_me: failed program was:" >&5
14945 cat conftest.$ac_ext >&5
14946 fi
14947 rm -f conftest.$ac_objext conftest.$ac_ext
14948 done
14949
14950 fi
14951 echo "$as_me:14951: result: $cf_cv_getopt_header" >&5
14952 echo "${ECHO_T}$cf_cv_getopt_header" >&6
14953 if test $cf_cv_getopt_header != none ; then
14954
14955 cat >>confdefs.h <<\EOF
14956 #define HAVE_GETOPT_HEADER 1
14957 EOF
14958
14959 fi
14960 if test $cf_cv_getopt_header = getopt.h ; then
14961
14962 cat >>confdefs.h <<\EOF
14963 #define NEED_GETOPT_H 1
14964 EOF
14965
14966 fi
14967
14968 # check for ISC (this may also define _POSIX_SOURCE)
14969 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
14970 if test "x$ISC" = xyes ; then
14971
14972 echo "$as_me:14972: checking for main in -lcposix" >&5
14973 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
14974 if test "${ac_cv_lib_cposix_main+set}" = set; then
14975   echo $ECHO_N "(cached) $ECHO_C" >&6
14976 else
14977   ac_check_lib_save_LIBS=$LIBS
14978 LIBS="-lcposix  $LIBS"
14979 cat >conftest.$ac_ext <<_ACEOF
14980 #line 14980 "configure"
14981 #include "confdefs.h"
14982
14983 int
14984 main ()
14985 {
14986 main ();
14987   ;
14988   return 0;
14989 }
14990 _ACEOF
14991 rm -f conftest.$ac_objext conftest$ac_exeext
14992 if { (eval echo "$as_me:14992: \"$ac_link\"") >&5
14993   (eval $ac_link) 2>&5
14994   ac_status=$?
14995   echo "$as_me:14995: \$? = $ac_status" >&5
14996   (exit $ac_status); } &&
14997          { ac_try='test -s conftest$ac_exeext'
14998   { (eval echo "$as_me:14998: \"$ac_try\"") >&5
14999   (eval $ac_try) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); }; }; then
15003   ac_cv_lib_cposix_main=yes
15004 else
15005   echo "$as_me: failed program was:" >&5
15006 cat conftest.$ac_ext >&5
15007 ac_cv_lib_cposix_main=no
15008 fi
15009 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15010 LIBS=$ac_check_lib_save_LIBS
15011 fi
15012 echo "$as_me:15012: result: $ac_cv_lib_cposix_main" >&5
15013 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
15014 if test $ac_cv_lib_cposix_main = yes; then
15015   cat >>confdefs.h <<EOF
15016 #define HAVE_LIBCPOSIX 1
15017 EOF
15018
15019   LIBS="-lcposix $LIBS"
15020
15021 fi
15022
15023         echo "$as_me:15023: checking for bzero in -linet" >&5
15024 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
15025 if test "${ac_cv_lib_inet_bzero+set}" = set; then
15026   echo $ECHO_N "(cached) $ECHO_C" >&6
15027 else
15028   ac_check_lib_save_LIBS=$LIBS
15029 LIBS="-linet  $LIBS"
15030 cat >conftest.$ac_ext <<_ACEOF
15031 #line 15031 "configure"
15032 #include "confdefs.h"
15033
15034 /* Override any gcc2 internal prototype to avoid an error.  */
15035 #ifdef __cplusplus
15036 extern "C"
15037 #endif
15038 /* We use char because int might match the return type of a gcc2
15039    builtin and then its argument prototype would still apply.  */
15040 char bzero ();
15041 int
15042 main ()
15043 {
15044 bzero ();
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 rm -f conftest.$ac_objext conftest$ac_exeext
15050 if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
15051   (eval $ac_link) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); } &&
15055          { ac_try='test -s conftest$ac_exeext'
15056   { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); }; }; then
15061   ac_cv_lib_inet_bzero=yes
15062 else
15063   echo "$as_me: failed program was:" >&5
15064 cat conftest.$ac_ext >&5
15065 ac_cv_lib_inet_bzero=no
15066 fi
15067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15068 LIBS=$ac_check_lib_save_LIBS
15069 fi
15070 echo "$as_me:15070: result: $ac_cv_lib_inet_bzero" >&5
15071 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
15072 if test $ac_cv_lib_inet_bzero = yes; then
15073
15074 cf_add_libs="-linet"
15075 # Filter out duplicates - this happens with badly-designed ".pc" files...
15076 for cf_add_1lib in $LIBS
15077 do
15078         for cf_add_2lib in $cf_add_libs
15079         do
15080                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
15081                 then
15082                         cf_add_1lib=
15083                         break
15084                 fi
15085         done
15086         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
15087 done
15088 LIBS="$cf_add_libs"
15089
15090 fi
15091 fi
15092
15093 echo "$as_me:15093: checking if sys/time.h works with sys/select.h" >&5
15094 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
15095 if test "${cf_cv_sys_time_select+set}" = set; then
15096   echo $ECHO_N "(cached) $ECHO_C" >&6
15097 else
15098
15099 cat >conftest.$ac_ext <<_ACEOF
15100 #line 15100 "configure"
15101 #include "confdefs.h"
15102
15103 #include <sys/types.h>
15104 #ifdef HAVE_SYS_TIME_H
15105 #include <sys/time.h>
15106 #endif
15107 #ifdef HAVE_SYS_SELECT_H
15108 #include <sys/select.h>
15109 #endif
15110
15111 int
15112 main ()
15113 {
15114
15115   ;
15116   return 0;
15117 }
15118 _ACEOF
15119 rm -f conftest.$ac_objext
15120 if { (eval echo "$as_me:15120: \"$ac_compile\"") >&5
15121   (eval $ac_compile) 2>&5
15122   ac_status=$?
15123   echo "$as_me:15123: \$? = $ac_status" >&5
15124   (exit $ac_status); } &&
15125          { ac_try='test -s conftest.$ac_objext'
15126   { (eval echo "$as_me:15126: \"$ac_try\"") >&5
15127   (eval $ac_try) 2>&5
15128   ac_status=$?
15129   echo "$as_me:15129: \$? = $ac_status" >&5
15130   (exit $ac_status); }; }; then
15131   cf_cv_sys_time_select=yes
15132 else
15133   echo "$as_me: failed program was:" >&5
15134 cat conftest.$ac_ext >&5
15135 cf_cv_sys_time_select=no
15136 fi
15137 rm -f conftest.$ac_objext conftest.$ac_ext
15138
15139 fi
15140
15141 echo "$as_me:15141: result: $cf_cv_sys_time_select" >&5
15142 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
15143 test "$cf_cv_sys_time_select" = yes &&
15144 cat >>confdefs.h <<\EOF
15145 #define HAVE_SYS_TIME_SELECT 1
15146 EOF
15147
15148 ###     checks for compiler characteristics
15149 ac_ext=c
15150 ac_cpp='$CPP $CPPFLAGS'
15151 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15152 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
15154 ac_main_return=return
15155
15156 echo "$as_me:15156: checking for an ANSI C-conforming const" >&5
15157 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15158 if test "${ac_cv_c_const+set}" = set; then
15159   echo $ECHO_N "(cached) $ECHO_C" >&6
15160 else
15161   cat >conftest.$ac_ext <<_ACEOF
15162 #line 15162 "configure"
15163 #include "confdefs.h"
15164
15165 int
15166 main ()
15167 {
15168 /* FIXME: Include the comments suggested by Paul. */
15169 #ifndef __cplusplus
15170   /* Ultrix mips cc rejects this.  */
15171   typedef int charset[2];
15172   const charset x;
15173   /* SunOS 4.1.1 cc rejects this.  */
15174   char const *const *ccp;
15175   char **p;
15176   /* NEC SVR4.0.2 mips cc rejects this.  */
15177   struct point {int x, y;};
15178   static struct point const zero = {0,0};
15179   /* AIX XL C 1.02.0.0 rejects this.
15180      It does not let you subtract one const X* pointer from another in
15181      an arm of an if-expression whose if-part is not a constant
15182      expression */
15183   const char *g = "string";
15184   ccp = &g + (g ? g-g : 0);
15185   /* HPUX 7.0 cc rejects these. */
15186   ++ccp;
15187   p = (char**) ccp;
15188   ccp = (char const *const *) p;
15189   { /* SCO 3.2v4 cc rejects this.  */
15190     char *t;
15191     char const *s = 0 ? (char *) 0 : (char const *) 0;
15192
15193     *t++ = 0;
15194   }
15195   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
15196     int x[] = {25, 17};
15197     const int *foo = &x[0];
15198     ++foo;
15199   }
15200   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15201     typedef const int *iptr;
15202     iptr p = 0;
15203     ++p;
15204   }
15205   { /* AIX XL C 1.02.0.0 rejects this saying
15206        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15207     struct s { int j; const int *ap[3]; };
15208     struct s *b; b->j = 5;
15209   }
15210   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15211     const int foo = 10;
15212   }
15213 #endif
15214
15215   ;
15216   return 0;
15217 }
15218 _ACEOF
15219 rm -f conftest.$ac_objext
15220 if { (eval echo "$as_me:15220: \"$ac_compile\"") >&5
15221   (eval $ac_compile) 2>&5
15222   ac_status=$?
15223   echo "$as_me:15223: \$? = $ac_status" >&5
15224   (exit $ac_status); } &&
15225          { ac_try='test -s conftest.$ac_objext'
15226   { (eval echo "$as_me:15226: \"$ac_try\"") >&5
15227   (eval $ac_try) 2>&5
15228   ac_status=$?
15229   echo "$as_me:15229: \$? = $ac_status" >&5
15230   (exit $ac_status); }; }; then
15231   ac_cv_c_const=yes
15232 else
15233   echo "$as_me: failed program was:" >&5
15234 cat conftest.$ac_ext >&5
15235 ac_cv_c_const=no
15236 fi
15237 rm -f conftest.$ac_objext conftest.$ac_ext
15238 fi
15239 echo "$as_me:15239: result: $ac_cv_c_const" >&5
15240 echo "${ECHO_T}$ac_cv_c_const" >&6
15241 if test $ac_cv_c_const = no; then
15242
15243 cat >>confdefs.h <<\EOF
15244 #define const
15245 EOF
15246
15247 fi
15248
15249 echo "$as_me:15249: checking for inline" >&5
15250 echo $ECHO_N "checking for inline... $ECHO_C" >&6
15251 if test "${ac_cv_c_inline+set}" = set; then
15252   echo $ECHO_N "(cached) $ECHO_C" >&6
15253 else
15254   ac_cv_c_inline=no
15255 for ac_kw in inline __inline__ __inline; do
15256   cat >conftest.$ac_ext <<_ACEOF
15257 #line 15257 "configure"
15258 #include "confdefs.h"
15259 #ifndef __cplusplus
15260 static $ac_kw int static_foo () {return 0; }
15261 $ac_kw int foo () {return 0; }
15262 #endif
15263
15264 _ACEOF
15265 rm -f conftest.$ac_objext
15266 if { (eval echo "$as_me:15266: \"$ac_compile\"") >&5
15267   (eval $ac_compile) 2>&5
15268   ac_status=$?
15269   echo "$as_me:15269: \$? = $ac_status" >&5
15270   (exit $ac_status); } &&
15271          { ac_try='test -s conftest.$ac_objext'
15272   { (eval echo "$as_me:15272: \"$ac_try\"") >&5
15273   (eval $ac_try) 2>&5
15274   ac_status=$?
15275   echo "$as_me:15275: \$? = $ac_status" >&5
15276   (exit $ac_status); }; }; then
15277   ac_cv_c_inline=$ac_kw; break
15278 else
15279   echo "$as_me: failed program was:" >&5
15280 cat conftest.$ac_ext >&5
15281 fi
15282 rm -f conftest.$ac_objext conftest.$ac_ext
15283 done
15284
15285 fi
15286 echo "$as_me:15286: result: $ac_cv_c_inline" >&5
15287 echo "${ECHO_T}$ac_cv_c_inline" >&6
15288 case $ac_cv_c_inline in
15289   inline | yes) ;;
15290   no)
15291 cat >>confdefs.h <<\EOF
15292 #define inline
15293 EOF
15294  ;;
15295   *)  cat >>confdefs.h <<EOF
15296 #define inline $ac_cv_c_inline
15297 EOF
15298  ;;
15299 esac
15300
15301 NCURSES_INLINE=
15302 if test "$ac_cv_c_inline" != no ; then
15303   NCURSES_INLINE=inline
15304   if test "$INTEL_COMPILER" = yes
15305   then
15306     :
15307   elif test "$CLANG_COMPILER" = yes
15308   then
15309     :
15310   elif test "$GCC" = yes
15311   then
15312     echo "$as_me:15312: checking if $CC supports options to tune inlining" >&5
15313 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
15314 if test "${cf_cv_gcc_inline+set}" = set; then
15315   echo $ECHO_N "(cached) $ECHO_C" >&6
15316 else
15317
15318       cf_save_CFLAGS=$CFLAGS
15319       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
15320       cat >conftest.$ac_ext <<_ACEOF
15321 #line 15321 "configure"
15322 #include "confdefs.h"
15323 inline int foo(void) { return 1; }
15324 int
15325 main ()
15326 {
15327 ${cf_cv_main_return:-return} foo()
15328   ;
15329   return 0;
15330 }
15331 _ACEOF
15332 rm -f conftest.$ac_objext
15333 if { (eval echo "$as_me:15333: \"$ac_compile\"") >&5
15334   (eval $ac_compile) 2>&5
15335   ac_status=$?
15336   echo "$as_me:15336: \$? = $ac_status" >&5
15337   (exit $ac_status); } &&
15338          { ac_try='test -s conftest.$ac_objext'
15339   { (eval echo "$as_me:15339: \"$ac_try\"") >&5
15340   (eval $ac_try) 2>&5
15341   ac_status=$?
15342   echo "$as_me:15342: \$? = $ac_status" >&5
15343   (exit $ac_status); }; }; then
15344   cf_cv_gcc_inline=yes
15345 else
15346   echo "$as_me: failed program was:" >&5
15347 cat conftest.$ac_ext >&5
15348 cf_cv_gcc_inline=no
15349 fi
15350 rm -f conftest.$ac_objext conftest.$ac_ext
15351       CFLAGS=$cf_save_CFLAGS
15352
15353 fi
15354 echo "$as_me:15354: result: $cf_cv_gcc_inline" >&5
15355 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
15356     if test "$cf_cv_gcc_inline" = yes ; then
15357
15358 cf_fix_cppflags=no
15359 cf_new_cflags=
15360 cf_new_cppflags=
15361 cf_new_extra_cppflags=
15362
15363 for cf_add_cflags in --param max-inline-insns-single=1200
15364 do
15365 case $cf_fix_cppflags in
15366 no)
15367         case $cf_add_cflags in #(vi
15368         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15369                 case $cf_add_cflags in
15370                 -D*)
15371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15372
15373                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15374                                 && test -z "${cf_tst_cflags}" \
15375                                 && cf_fix_cppflags=yes
15376
15377                         if test $cf_fix_cppflags = yes ; then
15378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15379                                 continue
15380                         elif test "${cf_tst_cflags}" = "\"'" ; then
15381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15382                                 continue
15383                         fi
15384                         ;;
15385                 esac
15386                 case "$CPPFLAGS" in
15387                 *$cf_add_cflags) #(vi
15388                         ;;
15389                 *) #(vi
15390                         case $cf_add_cflags in #(vi
15391                         -D*)
15392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15393
15394 CPPFLAGS=`echo "$CPPFLAGS" | \
15395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
15396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
15397
15398                                 ;;
15399                         esac
15400                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15401                         ;;
15402                 esac
15403                 ;;
15404         *)
15405                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15406                 ;;
15407         esac
15408         ;;
15409 yes)
15410         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15411
15412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15413
15414         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15415                 && test -z "${cf_tst_cflags}" \
15416                 && cf_fix_cppflags=no
15417         ;;
15418 esac
15419 done
15420
15421 if test -n "$cf_new_cflags" ; then
15422
15423         CFLAGS="$CFLAGS $cf_new_cflags"
15424 fi
15425
15426 if test -n "$cf_new_cppflags" ; then
15427
15428         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
15429 fi
15430
15431 if test -n "$cf_new_extra_cppflags" ; then
15432
15433         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15434 fi
15435
15436     fi
15437   fi
15438 fi
15439
15440 echo "$as_me:15440: checking for signal global datatype" >&5
15441 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
15442 if test "${cf_cv_sig_atomic_t+set}" = set; then
15443   echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445
15446         for cf_type in \
15447                 "volatile sig_atomic_t" \
15448                 "sig_atomic_t" \
15449                 "int"
15450         do
15451         cat >conftest.$ac_ext <<_ACEOF
15452 #line 15452 "configure"
15453 #include "confdefs.h"
15454
15455 #include <sys/types.h>
15456 #include <signal.h>
15457 #include <stdio.h>
15458
15459 extern $cf_type x;
15460 $cf_type x;
15461 static void handler(int sig)
15462 {
15463         x = 5;
15464 }
15465 int
15466 main ()
15467 {
15468 signal(SIGINT, handler);
15469                  x = 1
15470   ;
15471   return 0;
15472 }
15473 _ACEOF
15474 rm -f conftest.$ac_objext
15475 if { (eval echo "$as_me:15475: \"$ac_compile\"") >&5
15476   (eval $ac_compile) 2>&5
15477   ac_status=$?
15478   echo "$as_me:15478: \$? = $ac_status" >&5
15479   (exit $ac_status); } &&
15480          { ac_try='test -s conftest.$ac_objext'
15481   { (eval echo "$as_me:15481: \"$ac_try\"") >&5
15482   (eval $ac_try) 2>&5
15483   ac_status=$?
15484   echo "$as_me:15484: \$? = $ac_status" >&5
15485   (exit $ac_status); }; }; then
15486   cf_cv_sig_atomic_t=$cf_type
15487 else
15488   echo "$as_me: failed program was:" >&5
15489 cat conftest.$ac_ext >&5
15490 cf_cv_sig_atomic_t=no
15491 fi
15492 rm -f conftest.$ac_objext conftest.$ac_ext
15493                 test "$cf_cv_sig_atomic_t" != no && break
15494         done
15495
15496 fi
15497
15498 echo "$as_me:15498: result: $cf_cv_sig_atomic_t" >&5
15499 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
15500 test "$cf_cv_sig_atomic_t" != no &&
15501 cat >>confdefs.h <<EOF
15502 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
15503 EOF
15504
15505 if test $NCURSES_CHTYPE = auto ; then
15506
15507 echo "$as_me:15507: checking for type of chtype" >&5
15508 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
15509 if test "${cf_cv_typeof_chtype+set}" = set; then
15510   echo $ECHO_N "(cached) $ECHO_C" >&6
15511 else
15512
15513                 if test "$cross_compiling" = yes; then
15514   cf_cv_typeof_chtype=long
15515 else
15516   cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519
15520 #define WANT_BITS 31
15521 #include <stdio.h>
15522 int main()
15523 {
15524         FILE *fp = fopen("cf_test.out", "w");
15525         if (fp != 0) {
15526                 char *result = "long";
15527                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
15528                         int n;
15529                         unsigned int x, y;
15530                         for (n = 0; n < WANT_BITS; n++) {
15531                                 x = (1 << n);
15532                                 y = (x >> n);
15533                                 if (y != 1 || x == 0) {
15534                                         x = 0;
15535                                         break;
15536                                 }
15537                         }
15538                         /*
15539                          * If x is nonzero, an int is big enough for the bits
15540                          * that we want.
15541                          */
15542                         result = (x != 0) ? "int" : "long";
15543                 }
15544                 fputs(result, fp);
15545                 fclose(fp);
15546         }
15547         ${cf_cv_main_return:-return}(0);
15548 }
15549
15550 _ACEOF
15551 rm -f conftest$ac_exeext
15552 if { (eval echo "$as_me:15552: \"$ac_link\"") >&5
15553   (eval $ac_link) 2>&5
15554   ac_status=$?
15555   echo "$as_me:15555: \$? = $ac_status" >&5
15556   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15557   { (eval echo "$as_me:15557: \"$ac_try\"") >&5
15558   (eval $ac_try) 2>&5
15559   ac_status=$?
15560   echo "$as_me:15560: \$? = $ac_status" >&5
15561   (exit $ac_status); }; }; then
15562   cf_cv_typeof_chtype=`cat cf_test.out`
15563 else
15564   echo "$as_me: program exited with status $ac_status" >&5
15565 echo "$as_me: failed program was:" >&5
15566 cat conftest.$ac_ext >&5
15567 cf_cv_typeof_chtype=long
15568 fi
15569 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15570 fi
15571                 rm -f cf_test.out
15572
15573 fi
15574
15575 echo "$as_me:15575: result: $cf_cv_typeof_chtype" >&5
15576 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
15577
15578 cat >>confdefs.h <<EOF
15579 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
15580 EOF
15581
15582 else
15583         cf_cv_typeof_chtype=$NCURSES_CHTYPE
15584 fi
15585 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
15586
15587 echo "$as_me:15587: checking if unsigned literals are legal" >&5
15588 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
15589 if test "${cf_cv_unsigned_literals+set}" = set; then
15590   echo $ECHO_N "(cached) $ECHO_C" >&6
15591 else
15592
15593         cat >conftest.$ac_ext <<_ACEOF
15594 #line 15594 "configure"
15595 #include "confdefs.h"
15596
15597 int
15598 main ()
15599 {
15600 long x = 1L + 1UL + 1U + 1
15601   ;
15602   return 0;
15603 }
15604 _ACEOF
15605 rm -f conftest.$ac_objext
15606 if { (eval echo "$as_me:15606: \"$ac_compile\"") >&5
15607   (eval $ac_compile) 2>&5
15608   ac_status=$?
15609   echo "$as_me:15609: \$? = $ac_status" >&5
15610   (exit $ac_status); } &&
15611          { ac_try='test -s conftest.$ac_objext'
15612   { (eval echo "$as_me:15612: \"$ac_try\"") >&5
15613   (eval $ac_try) 2>&5
15614   ac_status=$?
15615   echo "$as_me:15615: \$? = $ac_status" >&5
15616   (exit $ac_status); }; }; then
15617   cf_cv_unsigned_literals=yes
15618 else
15619   echo "$as_me: failed program was:" >&5
15620 cat conftest.$ac_ext >&5
15621 cf_cv_unsigned_literals=no
15622 fi
15623 rm -f conftest.$ac_objext conftest.$ac_ext
15624
15625 fi
15626
15627 echo "$as_me:15627: result: $cf_cv_unsigned_literals" >&5
15628 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
15629
15630 cf_cv_1UL="1"
15631 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
15632 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
15633
15634 if test $NCURSES_MMASK_T = auto ; then
15635         cf_cv_typeof_mmask_t=long
15636 else
15637         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
15638 fi
15639 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
15640
15641 ###     Checks for external-data
15642
15643 echo "$as_me:15643: checking if external errno is declared" >&5
15644 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
15645 if test "${cf_cv_dcl_errno+set}" = set; then
15646   echo $ECHO_N "(cached) $ECHO_C" >&6
15647 else
15648
15649     cat >conftest.$ac_ext <<_ACEOF
15650 #line 15650 "configure"
15651 #include "confdefs.h"
15652
15653 #ifdef HAVE_STDLIB_H
15654 #include <stdlib.h>
15655 #endif
15656 #include <stdio.h>
15657 #include <sys/types.h>
15658 #include <errno.h>
15659 int
15660 main ()
15661 {
15662 int x = (int) errno
15663   ;
15664   return 0;
15665 }
15666 _ACEOF
15667 rm -f conftest.$ac_objext
15668 if { (eval echo "$as_me:15668: \"$ac_compile\"") >&5
15669   (eval $ac_compile) 2>&5
15670   ac_status=$?
15671   echo "$as_me:15671: \$? = $ac_status" >&5
15672   (exit $ac_status); } &&
15673          { ac_try='test -s conftest.$ac_objext'
15674   { (eval echo "$as_me:15674: \"$ac_try\"") >&5
15675   (eval $ac_try) 2>&5
15676   ac_status=$?
15677   echo "$as_me:15677: \$? = $ac_status" >&5
15678   (exit $ac_status); }; }; then
15679   cf_cv_dcl_errno=yes
15680 else
15681   echo "$as_me: failed program was:" >&5
15682 cat conftest.$ac_ext >&5
15683 cf_cv_dcl_errno=no
15684 fi
15685 rm -f conftest.$ac_objext conftest.$ac_ext
15686
15687 fi
15688 echo "$as_me:15688: result: $cf_cv_dcl_errno" >&5
15689 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
15690
15691 if test "$cf_cv_dcl_errno" = no ; then
15692
15693 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15694
15695     cat >>confdefs.h <<EOF
15696 #define $cf_result 1
15697 EOF
15698
15699 fi
15700
15701 # It's possible (for near-UNIX clones) that the data doesn't exist
15702
15703 echo "$as_me:15703: checking if external errno exists" >&5
15704 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
15705 if test "${cf_cv_have_errno+set}" = set; then
15706   echo $ECHO_N "(cached) $ECHO_C" >&6
15707 else
15708
15709     cat >conftest.$ac_ext <<_ACEOF
15710 #line 15710 "configure"
15711 #include "confdefs.h"
15712
15713 #undef errno
15714 extern int errno;
15715
15716 int
15717 main ()
15718 {
15719 errno = 2
15720   ;
15721   return 0;
15722 }
15723 _ACEOF
15724 rm -f conftest.$ac_objext conftest$ac_exeext
15725 if { (eval echo "$as_me:15725: \"$ac_link\"") >&5
15726   (eval $ac_link) 2>&5
15727   ac_status=$?
15728   echo "$as_me:15728: \$? = $ac_status" >&5
15729   (exit $ac_status); } &&
15730          { ac_try='test -s conftest$ac_exeext'
15731   { (eval echo "$as_me:15731: \"$ac_try\"") >&5
15732   (eval $ac_try) 2>&5
15733   ac_status=$?
15734   echo "$as_me:15734: \$? = $ac_status" >&5
15735   (exit $ac_status); }; }; then
15736   cf_cv_have_errno=yes
15737 else
15738   echo "$as_me: failed program was:" >&5
15739 cat conftest.$ac_ext >&5
15740 cf_cv_have_errno=no
15741 fi
15742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15743
15744 fi
15745 echo "$as_me:15745: result: $cf_cv_have_errno" >&5
15746 echo "${ECHO_T}$cf_cv_have_errno" >&6
15747
15748 if test "$cf_cv_have_errno" = yes ; then
15749
15750 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15751
15752     cat >>confdefs.h <<EOF
15753 #define $cf_result 1
15754 EOF
15755
15756 fi
15757
15758 echo "$as_me:15758: checking if data-only library module links" >&5
15759 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
15760 if test "${cf_cv_link_dataonly+set}" = set; then
15761   echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763
15764         rm -f conftest.a
15765         cat >conftest.$ac_ext <<EOF
15766 #line 15766 "configure"
15767 int     testdata[3] = { 123, 456, 789 };
15768 EOF
15769         if { (eval echo "$as_me:15769: \"$ac_compile\"") >&5
15770   (eval $ac_compile) 2>&5
15771   ac_status=$?
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit $ac_status); } ; then
15774                 mv conftest.o data.o && \
15775                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
15776         fi
15777         rm -f conftest.$ac_ext data.o
15778         cat >conftest.$ac_ext <<EOF
15779 #line 15779 "configure"
15780 int     testfunc()
15781 {
15782 #if defined(NeXT)
15783         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
15784 #else
15785         extern int testdata[3];
15786         return testdata[0] == 123
15787            &&  testdata[1] == 456
15788            &&  testdata[2] == 789;
15789 #endif
15790 }
15791 EOF
15792         if { (eval echo "$as_me:15792: \"$ac_compile\"") >&5
15793   (eval $ac_compile) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); }; then
15797                 mv conftest.o func.o && \
15798                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
15799         fi
15800         rm -f conftest.$ac_ext func.o
15801         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
15802         cf_saveLIBS="$LIBS"
15803         LIBS="conftest.a $LIBS"
15804         if test "$cross_compiling" = yes; then
15805   cf_cv_link_dataonly=unknown
15806 else
15807   cat >conftest.$ac_ext <<_ACEOF
15808 #line 15808 "configure"
15809 #include "confdefs.h"
15810
15811         int main()
15812         {
15813                 extern int testfunc();
15814                 ${cf_cv_main_return:-return} (!testfunc());
15815         }
15816
15817 _ACEOF
15818 rm -f conftest$ac_exeext
15819 if { (eval echo "$as_me:15819: \"$ac_link\"") >&5
15820   (eval $ac_link) 2>&5
15821   ac_status=$?
15822   echo "$as_me:15822: \$? = $ac_status" >&5
15823   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15824   { (eval echo "$as_me:15824: \"$ac_try\"") >&5
15825   (eval $ac_try) 2>&5
15826   ac_status=$?
15827   echo "$as_me:15827: \$? = $ac_status" >&5
15828   (exit $ac_status); }; }; then
15829   cf_cv_link_dataonly=yes
15830 else
15831   echo "$as_me: program exited with status $ac_status" >&5
15832 echo "$as_me: failed program was:" >&5
15833 cat conftest.$ac_ext >&5
15834 cf_cv_link_dataonly=no
15835 fi
15836 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15837 fi
15838         LIBS="$cf_saveLIBS"
15839
15840 fi
15841
15842 echo "$as_me:15842: result: $cf_cv_link_dataonly" >&5
15843 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
15844
15845 if test "$cf_cv_link_dataonly" = no ; then
15846
15847 cat >>confdefs.h <<\EOF
15848 #define BROKEN_LINKER 1
15849 EOF
15850
15851         BROKEN_LINKER=1
15852 fi
15853
15854 ###     Checks for library functions.
15855
15856 for ac_func in \
15857 getcwd \
15858 getegid \
15859 geteuid \
15860 getttynam \
15861 issetugid \
15862 poll \
15863 putenv \
15864 remove \
15865 select \
15866 setbuf \
15867 setbuffer \
15868 setenv \
15869 setvbuf \
15870 sigaction \
15871 sigvec \
15872 strdup \
15873 strstr \
15874 tcgetpgrp \
15875 times \
15876 vsnprintf \
15877
15878 do
15879 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15880 echo "$as_me:15880: checking for $ac_func" >&5
15881 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15882 if eval "test \"\${$as_ac_var+set}\" = set"; then
15883   echo $ECHO_N "(cached) $ECHO_C" >&6
15884 else
15885   cat >conftest.$ac_ext <<_ACEOF
15886 #line 15886 "configure"
15887 #include "confdefs.h"
15888 /* System header to define __stub macros and hopefully few prototypes,
15889     which can conflict with char $ac_func (); below.  */
15890 #include <assert.h>
15891 /* Override any gcc2 internal prototype to avoid an error.  */
15892 #ifdef __cplusplus
15893 extern "C"
15894 #endif
15895 /* We use char because int might match the return type of a gcc2
15896    builtin and then its argument prototype would still apply.  */
15897 char $ac_func ();
15898 char (*f) ();
15899
15900 int
15901 main ()
15902 {
15903 /* The GNU C library defines this for functions which it implements
15904     to always fail with ENOSYS.  Some functions are actually named
15905     something starting with __ and the normal name is an alias.  */
15906 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15907 choke me
15908 #else
15909 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15910 #endif
15911
15912   ;
15913   return 0;
15914 }
15915 _ACEOF
15916 rm -f conftest.$ac_objext conftest$ac_exeext
15917 if { (eval echo "$as_me:15917: \"$ac_link\"") >&5
15918   (eval $ac_link) 2>&5
15919   ac_status=$?
15920   echo "$as_me:15920: \$? = $ac_status" >&5
15921   (exit $ac_status); } &&
15922          { ac_try='test -s conftest$ac_exeext'
15923   { (eval echo "$as_me:15923: \"$ac_try\"") >&5
15924   (eval $ac_try) 2>&5
15925   ac_status=$?
15926   echo "$as_me:15926: \$? = $ac_status" >&5
15927   (exit $ac_status); }; }; then
15928   eval "$as_ac_var=yes"
15929 else
15930   echo "$as_me: failed program was:" >&5
15931 cat conftest.$ac_ext >&5
15932 eval "$as_ac_var=no"
15933 fi
15934 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15935 fi
15936 echo "$as_me:15936: result: `eval echo '${'$as_ac_var'}'`" >&5
15937 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15938 if test `eval echo '${'$as_ac_var'}'` = yes; then
15939   cat >>confdefs.h <<EOF
15940 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15941 EOF
15942
15943 fi
15944 done
15945
15946 if test "x$with_getcap" = "xyes" ; then
15947
15948 echo "$as_me:15948: checking for terminal-capability database functions" >&5
15949 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
15950 if test "${cf_cv_cgetent+set}" = set; then
15951   echo $ECHO_N "(cached) $ECHO_C" >&6
15952 else
15953
15954 cat >conftest.$ac_ext <<_ACEOF
15955 #line 15955 "configure"
15956 #include "confdefs.h"
15957
15958 #include <stdlib.h>
15959 int
15960 main ()
15961 {
15962
15963         char temp[128];
15964         char *buf = temp;
15965         char *db_array = temp;
15966         cgetent(&buf, &db_array, "vt100");
15967         cgetcap(buf, "tc", '=');
15968         cgetmatch(buf, "tc");
15969
15970   ;
15971   return 0;
15972 }
15973 _ACEOF
15974 rm -f conftest.$ac_objext conftest$ac_exeext
15975 if { (eval echo "$as_me:15975: \"$ac_link\"") >&5
15976   (eval $ac_link) 2>&5
15977   ac_status=$?
15978   echo "$as_me:15978: \$? = $ac_status" >&5
15979   (exit $ac_status); } &&
15980          { ac_try='test -s conftest$ac_exeext'
15981   { (eval echo "$as_me:15981: \"$ac_try\"") >&5
15982   (eval $ac_try) 2>&5
15983   ac_status=$?
15984   echo "$as_me:15984: \$? = $ac_status" >&5
15985   (exit $ac_status); }; }; then
15986   cf_cv_cgetent=yes
15987 else
15988   echo "$as_me: failed program was:" >&5
15989 cat conftest.$ac_ext >&5
15990 cf_cv_cgetent=no
15991 fi
15992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15993
15994 fi
15995 echo "$as_me:15995: result: $cf_cv_cgetent" >&5
15996 echo "${ECHO_T}$cf_cv_cgetent" >&6
15997
15998 if test "$cf_cv_cgetent" = yes
15999 then
16000
16001 cat >>confdefs.h <<\EOF
16002 #define HAVE_BSD_CGETENT 1
16003 EOF
16004
16005 echo "$as_me:16005: checking if cgetent uses const parameter" >&5
16006 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
16007 if test "${cf_cv_cgetent_const+set}" = set; then
16008   echo $ECHO_N "(cached) $ECHO_C" >&6
16009 else
16010
16011 cat >conftest.$ac_ext <<_ACEOF
16012 #line 16012 "configure"
16013 #include "confdefs.h"
16014
16015 #include <stdlib.h>
16016 int
16017 main ()
16018 {
16019
16020         char temp[128];
16021         char *buf = temp;
16022 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
16023         const char *db_array = temp;
16024         cgetent(&buf, &db_array, "vt100");
16025 #endif
16026         cgetcap(buf, "tc", '=');
16027         cgetmatch(buf, "tc");
16028
16029   ;
16030   return 0;
16031 }
16032 _ACEOF
16033 rm -f conftest.$ac_objext conftest$ac_exeext
16034 if { (eval echo "$as_me:16034: \"$ac_link\"") >&5
16035   (eval $ac_link) 2>&5
16036   ac_status=$?
16037   echo "$as_me:16037: \$? = $ac_status" >&5
16038   (exit $ac_status); } &&
16039          { ac_try='test -s conftest$ac_exeext'
16040   { (eval echo "$as_me:16040: \"$ac_try\"") >&5
16041   (eval $ac_try) 2>&5
16042   ac_status=$?
16043   echo "$as_me:16043: \$? = $ac_status" >&5
16044   (exit $ac_status); }; }; then
16045   cf_cv_cgetent_const=yes
16046 else
16047   echo "$as_me: failed program was:" >&5
16048 cat conftest.$ac_ext >&5
16049 cf_cv_cgetent_const=no
16050 fi
16051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16052
16053 fi
16054 echo "$as_me:16054: result: $cf_cv_cgetent_const" >&5
16055 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
16056         if test "$cf_cv_cgetent_const" = yes
16057         then
16058
16059 cat >>confdefs.h <<EOF
16060 #define CGETENT_CONST const
16061 EOF
16062
16063         fi
16064 fi
16065
16066 fi
16067
16068 echo "$as_me:16068: checking for isascii" >&5
16069 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
16070 if test "${cf_cv_have_isascii+set}" = set; then
16071   echo $ECHO_N "(cached) $ECHO_C" >&6
16072 else
16073
16074         cat >conftest.$ac_ext <<_ACEOF
16075 #line 16075 "configure"
16076 #include "confdefs.h"
16077 #include <ctype.h>
16078 int
16079 main ()
16080 {
16081 int x = isascii(' ')
16082   ;
16083   return 0;
16084 }
16085 _ACEOF
16086 rm -f conftest.$ac_objext conftest$ac_exeext
16087 if { (eval echo "$as_me:16087: \"$ac_link\"") >&5
16088   (eval $ac_link) 2>&5
16089   ac_status=$?
16090   echo "$as_me:16090: \$? = $ac_status" >&5
16091   (exit $ac_status); } &&
16092          { ac_try='test -s conftest$ac_exeext'
16093   { (eval echo "$as_me:16093: \"$ac_try\"") >&5
16094   (eval $ac_try) 2>&5
16095   ac_status=$?
16096   echo "$as_me:16096: \$? = $ac_status" >&5
16097   (exit $ac_status); }; }; then
16098   cf_cv_have_isascii=yes
16099 else
16100   echo "$as_me: failed program was:" >&5
16101 cat conftest.$ac_ext >&5
16102 cf_cv_have_isascii=no
16103 fi
16104 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16105
16106 fi
16107 echo "$as_me:16107: result: $cf_cv_have_isascii" >&5
16108 echo "${ECHO_T}$cf_cv_have_isascii" >&6
16109 test "$cf_cv_have_isascii" = yes &&
16110 cat >>confdefs.h <<\EOF
16111 #define HAVE_ISASCII 1
16112 EOF
16113
16114 if test "$ac_cv_func_sigaction" = yes; then
16115 echo "$as_me:16115: checking whether sigaction needs _POSIX_SOURCE" >&5
16116 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
16117 cat >conftest.$ac_ext <<_ACEOF
16118 #line 16118 "configure"
16119 #include "confdefs.h"
16120
16121 #include <sys/types.h>
16122 #include <signal.h>
16123 int
16124 main ()
16125 {
16126 struct sigaction act
16127   ;
16128   return 0;
16129 }
16130 _ACEOF
16131 rm -f conftest.$ac_objext
16132 if { (eval echo "$as_me:16132: \"$ac_compile\"") >&5
16133   (eval $ac_compile) 2>&5
16134   ac_status=$?
16135   echo "$as_me:16135: \$? = $ac_status" >&5
16136   (exit $ac_status); } &&
16137          { ac_try='test -s conftest.$ac_objext'
16138   { (eval echo "$as_me:16138: \"$ac_try\"") >&5
16139   (eval $ac_try) 2>&5
16140   ac_status=$?
16141   echo "$as_me:16141: \$? = $ac_status" >&5
16142   (exit $ac_status); }; }; then
16143   sigact_bad=no
16144 else
16145   echo "$as_me: failed program was:" >&5
16146 cat conftest.$ac_ext >&5
16147
16148 cat >conftest.$ac_ext <<_ACEOF
16149 #line 16149 "configure"
16150 #include "confdefs.h"
16151
16152 #define _POSIX_SOURCE
16153 #include <sys/types.h>
16154 #include <signal.h>
16155 int
16156 main ()
16157 {
16158 struct sigaction act
16159   ;
16160   return 0;
16161 }
16162 _ACEOF
16163 rm -f conftest.$ac_objext
16164 if { (eval echo "$as_me:16164: \"$ac_compile\"") >&5
16165   (eval $ac_compile) 2>&5
16166   ac_status=$?
16167   echo "$as_me:16167: \$? = $ac_status" >&5
16168   (exit $ac_status); } &&
16169          { ac_try='test -s conftest.$ac_objext'
16170   { (eval echo "$as_me:16170: \"$ac_try\"") >&5
16171   (eval $ac_try) 2>&5
16172   ac_status=$?
16173   echo "$as_me:16173: \$? = $ac_status" >&5
16174   (exit $ac_status); }; }; then
16175   sigact_bad=yes
16176
16177 cat >>confdefs.h <<\EOF
16178 #define _POSIX_SOURCE 1
16179 EOF
16180
16181 else
16182   echo "$as_me: failed program was:" >&5
16183 cat conftest.$ac_ext >&5
16184 sigact_bad=unknown
16185 fi
16186 rm -f conftest.$ac_objext conftest.$ac_ext
16187 fi
16188 rm -f conftest.$ac_objext conftest.$ac_ext
16189 echo "$as_me:16189: result: $sigact_bad" >&5
16190 echo "${ECHO_T}$sigact_bad" >&6
16191 fi
16192
16193 echo "$as_me:16193: checking if nanosleep really works" >&5
16194 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
16195 if test "${cf_cv_func_nanosleep+set}" = set; then
16196   echo $ECHO_N "(cached) $ECHO_C" >&6
16197 else
16198
16199 if test "$cross_compiling" = yes; then
16200   cf_cv_func_nanosleep=unknown
16201 else
16202   cat >conftest.$ac_ext <<_ACEOF
16203 #line 16203 "configure"
16204 #include "confdefs.h"
16205
16206 #include <stdio.h>
16207 #include <errno.h>
16208 #include <time.h>
16209
16210 #ifdef HAVE_SYS_TIME_H
16211 #include <sys/time.h>
16212 #endif
16213
16214 int main() {
16215         struct timespec ts1, ts2;
16216         int code;
16217         ts1.tv_sec  = 0;
16218         ts1.tv_nsec = 750000000;
16219         ts2.tv_sec  = 0;
16220         ts2.tv_nsec = 0;
16221         errno = 0;
16222         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
16223         ${cf_cv_main_return:-return}(code != 0);
16224 }
16225
16226 _ACEOF
16227 rm -f conftest$ac_exeext
16228 if { (eval echo "$as_me:16228: \"$ac_link\"") >&5
16229   (eval $ac_link) 2>&5
16230   ac_status=$?
16231   echo "$as_me:16231: \$? = $ac_status" >&5
16232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16233   { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234   (eval $ac_try) 2>&5
16235   ac_status=$?
16236   echo "$as_me:16236: \$? = $ac_status" >&5
16237   (exit $ac_status); }; }; then
16238   cf_cv_func_nanosleep=yes
16239 else
16240   echo "$as_me: program exited with status $ac_status" >&5
16241 echo "$as_me: failed program was:" >&5
16242 cat conftest.$ac_ext >&5
16243 cf_cv_func_nanosleep=no
16244 fi
16245 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16246 fi
16247 fi
16248 echo "$as_me:16248: result: $cf_cv_func_nanosleep" >&5
16249 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
16250
16251 test "$cf_cv_func_nanosleep" = "yes" &&
16252 cat >>confdefs.h <<\EOF
16253 #define HAVE_NANOSLEEP 1
16254 EOF
16255
16256 for ac_header in \
16257 termio.h \
16258 termios.h \
16259 unistd.h \
16260
16261 do
16262 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16263 echo "$as_me:16263: checking for $ac_header" >&5
16264 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16265 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16266   echo $ECHO_N "(cached) $ECHO_C" >&6
16267 else
16268   cat >conftest.$ac_ext <<_ACEOF
16269 #line 16269 "configure"
16270 #include "confdefs.h"
16271 #include <$ac_header>
16272 _ACEOF
16273 if { (eval echo "$as_me:16273: \"$ac_cpp conftest.$ac_ext\"") >&5
16274   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16275   ac_status=$?
16276   egrep -v '^ *\+' conftest.er1 >conftest.err
16277   rm -f conftest.er1
16278   cat conftest.err >&5
16279   echo "$as_me:16279: \$? = $ac_status" >&5
16280   (exit $ac_status); } >/dev/null; then
16281   if test -s conftest.err; then
16282     ac_cpp_err=$ac_c_preproc_warn_flag
16283   else
16284     ac_cpp_err=
16285   fi
16286 else
16287   ac_cpp_err=yes
16288 fi
16289 if test -z "$ac_cpp_err"; then
16290   eval "$as_ac_Header=yes"
16291 else
16292   echo "$as_me: failed program was:" >&5
16293   cat conftest.$ac_ext >&5
16294   eval "$as_ac_Header=no"
16295 fi
16296 rm -f conftest.err conftest.$ac_ext
16297 fi
16298 echo "$as_me:16298: result: `eval echo '${'$as_ac_Header'}'`" >&5
16299 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16300 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16301   cat >>confdefs.h <<EOF
16302 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16303 EOF
16304
16305 fi
16306 done
16307
16308 if test "$ISC" = yes ; then
16309
16310 for ac_header in sys/termio.h
16311 do
16312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16313 echo "$as_me:16313: checking for $ac_header" >&5
16314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   cat >conftest.$ac_ext <<_ACEOF
16319 #line 16319 "configure"
16320 #include "confdefs.h"
16321 #include <$ac_header>
16322 _ACEOF
16323 if { (eval echo "$as_me:16323: \"$ac_cpp conftest.$ac_ext\"") >&5
16324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16325   ac_status=$?
16326   egrep -v '^ *\+' conftest.er1 >conftest.err
16327   rm -f conftest.er1
16328   cat conftest.err >&5
16329   echo "$as_me:16329: \$? = $ac_status" >&5
16330   (exit $ac_status); } >/dev/null; then
16331   if test -s conftest.err; then
16332     ac_cpp_err=$ac_c_preproc_warn_flag
16333   else
16334     ac_cpp_err=
16335   fi
16336 else
16337   ac_cpp_err=yes
16338 fi
16339 if test -z "$ac_cpp_err"; then
16340   eval "$as_ac_Header=yes"
16341 else
16342   echo "$as_me: failed program was:" >&5
16343   cat conftest.$ac_ext >&5
16344   eval "$as_ac_Header=no"
16345 fi
16346 rm -f conftest.err conftest.$ac_ext
16347 fi
16348 echo "$as_me:16348: result: `eval echo '${'$as_ac_Header'}'`" >&5
16349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16350 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16351   cat >>confdefs.h <<EOF
16352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16353 EOF
16354
16355 fi
16356 done
16357
16358 fi
16359 if test "$ac_cv_header_termios_h" = yes ; then
16360         case "$CFLAGS $CPPFLAGS" in
16361         *-D_POSIX_SOURCE*)
16362                 termios_bad=dunno ;;
16363         *)      termios_bad=maybe ;;
16364         esac
16365         if test "$termios_bad" = maybe ; then
16366         echo "$as_me:16366: checking whether termios.h needs _POSIX_SOURCE" >&5
16367 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
16368         cat >conftest.$ac_ext <<_ACEOF
16369 #line 16369 "configure"
16370 #include "confdefs.h"
16371 #include <termios.h>
16372 int
16373 main ()
16374 {
16375 struct termios foo; int x = foo.c_iflag
16376   ;
16377   return 0;
16378 }
16379 _ACEOF
16380 rm -f conftest.$ac_objext
16381 if { (eval echo "$as_me:16381: \"$ac_compile\"") >&5
16382   (eval $ac_compile) 2>&5
16383   ac_status=$?
16384   echo "$as_me:16384: \$? = $ac_status" >&5
16385   (exit $ac_status); } &&
16386          { ac_try='test -s conftest.$ac_objext'
16387   { (eval echo "$as_me:16387: \"$ac_try\"") >&5
16388   (eval $ac_try) 2>&5
16389   ac_status=$?
16390   echo "$as_me:16390: \$? = $ac_status" >&5
16391   (exit $ac_status); }; }; then
16392   termios_bad=no
16393 else
16394   echo "$as_me: failed program was:" >&5
16395 cat conftest.$ac_ext >&5
16396
16397                 cat >conftest.$ac_ext <<_ACEOF
16398 #line 16398 "configure"
16399 #include "confdefs.h"
16400
16401 #define _POSIX_SOURCE
16402 #include <termios.h>
16403 int
16404 main ()
16405 {
16406 struct termios foo; int x = foo.c_iflag
16407   ;
16408   return 0;
16409 }
16410 _ACEOF
16411 rm -f conftest.$ac_objext
16412 if { (eval echo "$as_me:16412: \"$ac_compile\"") >&5
16413   (eval $ac_compile) 2>&5
16414   ac_status=$?
16415   echo "$as_me:16415: \$? = $ac_status" >&5
16416   (exit $ac_status); } &&
16417          { ac_try='test -s conftest.$ac_objext'
16418   { (eval echo "$as_me:16418: \"$ac_try\"") >&5
16419   (eval $ac_try) 2>&5
16420   ac_status=$?
16421   echo "$as_me:16421: \$? = $ac_status" >&5
16422   (exit $ac_status); }; }; then
16423   termios_bad=unknown
16424 else
16425   echo "$as_me: failed program was:" >&5
16426 cat conftest.$ac_ext >&5
16427 termios_bad=yes
16428 cat >>confdefs.h <<\EOF
16429 #define _POSIX_SOURCE 1
16430 EOF
16431
16432 fi
16433 rm -f conftest.$ac_objext conftest.$ac_ext
16434
16435 fi
16436 rm -f conftest.$ac_objext conftest.$ac_ext
16437         echo "$as_me:16437: result: $termios_bad" >&5
16438 echo "${ECHO_T}$termios_bad" >&6
16439         fi
16440 fi
16441
16442 echo "$as_me:16442: checking for tcgetattr" >&5
16443 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
16444 if test "${cf_cv_have_tcgetattr+set}" = set; then
16445   echo $ECHO_N "(cached) $ECHO_C" >&6
16446 else
16447
16448 cat >conftest.$ac_ext <<_ACEOF
16449 #line 16449 "configure"
16450 #include "confdefs.h"
16451
16452 #include <sys/types.h>
16453 #ifdef HAVE_UNISTD_H
16454 #include <unistd.h>
16455 #endif
16456 #ifdef HAVE_TERMIOS_H
16457 #include <termios.h>
16458 #define TTY struct termios
16459 #else
16460 #ifdef HAVE_TERMIO_H
16461 #include <termio.h>
16462 #define TTY struct termio
16463 #endif
16464 #endif
16465
16466 int
16467 main ()
16468 {
16469
16470 TTY foo;
16471 tcgetattr(1, &foo);
16472   ;
16473   return 0;
16474 }
16475 _ACEOF
16476 rm -f conftest.$ac_objext conftest$ac_exeext
16477 if { (eval echo "$as_me:16477: \"$ac_link\"") >&5
16478   (eval $ac_link) 2>&5
16479   ac_status=$?
16480   echo "$as_me:16480: \$? = $ac_status" >&5
16481   (exit $ac_status); } &&
16482          { ac_try='test -s conftest$ac_exeext'
16483   { (eval echo "$as_me:16483: \"$ac_try\"") >&5
16484   (eval $ac_try) 2>&5
16485   ac_status=$?
16486   echo "$as_me:16486: \$? = $ac_status" >&5
16487   (exit $ac_status); }; }; then
16488   cf_cv_have_tcgetattr=yes
16489 else
16490   echo "$as_me: failed program was:" >&5
16491 cat conftest.$ac_ext >&5
16492 cf_cv_have_tcgetattr=no
16493 fi
16494 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16495 fi
16496 echo "$as_me:16496: result: $cf_cv_have_tcgetattr" >&5
16497 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
16498 test "$cf_cv_have_tcgetattr" = yes &&
16499 cat >>confdefs.h <<\EOF
16500 #define HAVE_TCGETATTR 1
16501 EOF
16502
16503 echo "$as_me:16503: checking for vsscanf function or workaround" >&5
16504 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
16505 if test "${cf_cv_func_vsscanf+set}" = set; then
16506   echo $ECHO_N "(cached) $ECHO_C" >&6
16507 else
16508
16509 cat >conftest.$ac_ext <<_ACEOF
16510 #line 16510 "configure"
16511 #include "confdefs.h"
16512
16513 #include <stdarg.h>
16514 #include <stdio.h>
16515 int
16516 main ()
16517 {
16518
16519         va_list ap;
16520         vsscanf("from", "%d", ap)
16521   ;
16522   return 0;
16523 }
16524 _ACEOF
16525 rm -f conftest.$ac_objext conftest$ac_exeext
16526 if { (eval echo "$as_me:16526: \"$ac_link\"") >&5
16527   (eval $ac_link) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); } &&
16531          { ac_try='test -s conftest$ac_exeext'
16532   { (eval echo "$as_me:16532: \"$ac_try\"") >&5
16533   (eval $ac_try) 2>&5
16534   ac_status=$?
16535   echo "$as_me:16535: \$? = $ac_status" >&5
16536   (exit $ac_status); }; }; then
16537   cf_cv_func_vsscanf=vsscanf
16538 else
16539   echo "$as_me: failed program was:" >&5
16540 cat conftest.$ac_ext >&5
16541
16542 cat >conftest.$ac_ext <<_ACEOF
16543 #line 16543 "configure"
16544 #include "confdefs.h"
16545
16546 #include <stdarg.h>
16547 #include <stdio.h>
16548 int
16549 main ()
16550 {
16551
16552     FILE strbuf;
16553     char *str = "from";
16554
16555     strbuf._flag = _IOREAD;
16556     strbuf._ptr = strbuf._base = (unsigned char *) str;
16557     strbuf._cnt = strlen(str);
16558     strbuf._file = _NFILE;
16559     return (vfscanf(&strbuf, "%d", ap))
16560   ;
16561   return 0;
16562 }
16563 _ACEOF
16564 rm -f conftest.$ac_objext conftest$ac_exeext
16565 if { (eval echo "$as_me:16565: \"$ac_link\"") >&5
16566   (eval $ac_link) 2>&5
16567   ac_status=$?
16568   echo "$as_me:16568: \$? = $ac_status" >&5
16569   (exit $ac_status); } &&
16570          { ac_try='test -s conftest$ac_exeext'
16571   { (eval echo "$as_me:16571: \"$ac_try\"") >&5
16572   (eval $ac_try) 2>&5
16573   ac_status=$?
16574   echo "$as_me:16574: \$? = $ac_status" >&5
16575   (exit $ac_status); }; }; then
16576   cf_cv_func_vsscanf=vfscanf
16577 else
16578   echo "$as_me: failed program was:" >&5
16579 cat conftest.$ac_ext >&5
16580
16581 cat >conftest.$ac_ext <<_ACEOF
16582 #line 16582 "configure"
16583 #include "confdefs.h"
16584
16585 #include <stdarg.h>
16586 #include <stdio.h>
16587 int
16588 main ()
16589 {
16590
16591     FILE strbuf;
16592     char *str = "from";
16593
16594     strbuf._flag = _IOREAD;
16595     strbuf._ptr = strbuf._base = (unsigned char *) str;
16596     strbuf._cnt = strlen(str);
16597     strbuf._file = _NFILE;
16598     return (_doscan(&strbuf, "%d", ap))
16599   ;
16600   return 0;
16601 }
16602 _ACEOF
16603 rm -f conftest.$ac_objext conftest$ac_exeext
16604 if { (eval echo "$as_me:16604: \"$ac_link\"") >&5
16605   (eval $ac_link) 2>&5
16606   ac_status=$?
16607   echo "$as_me:16607: \$? = $ac_status" >&5
16608   (exit $ac_status); } &&
16609          { ac_try='test -s conftest$ac_exeext'
16610   { (eval echo "$as_me:16610: \"$ac_try\"") >&5
16611   (eval $ac_try) 2>&5
16612   ac_status=$?
16613   echo "$as_me:16613: \$? = $ac_status" >&5
16614   (exit $ac_status); }; }; then
16615   cf_cv_func_vsscanf=_doscan
16616 else
16617   echo "$as_me: failed program was:" >&5
16618 cat conftest.$ac_ext >&5
16619
16620 cf_cv_func_vsscanf=no
16621 fi
16622 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16623 fi
16624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16625 fi
16626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16627 fi
16628 echo "$as_me:16628: result: $cf_cv_func_vsscanf" >&5
16629 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
16630
16631 case $cf_cv_func_vsscanf in #(vi
16632 vsscanf)
16633 cat >>confdefs.h <<\EOF
16634 #define HAVE_VSSCANF 1
16635 EOF
16636 ;; #(vi
16637 vfscanf)
16638 cat >>confdefs.h <<\EOF
16639 #define HAVE_VFSCANF 1
16640 EOF
16641 ;; #(vi
16642 _doscan)
16643 cat >>confdefs.h <<\EOF
16644 #define HAVE__DOSCAN 1
16645 EOF
16646 ;;
16647 esac
16648
16649 echo "$as_me:16649: checking for working mkstemp" >&5
16650 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
16651 if test "${cf_cv_func_mkstemp+set}" = set; then
16652   echo $ECHO_N "(cached) $ECHO_C" >&6
16653 else
16654
16655 rm -rf conftest*
16656 if test "$cross_compiling" = yes; then
16657   cf_cv_func_mkstemp=maybe
16658 else
16659   cat >conftest.$ac_ext <<_ACEOF
16660 #line 16660 "configure"
16661 #include "confdefs.h"
16662
16663 #include <sys/types.h>
16664 #include <stdlib.h>
16665 #include <stdio.h>
16666 #include <string.h>
16667 #include <sys/stat.h>
16668 int main()
16669 {
16670         char *tmpl = "conftestXXXXXX";
16671         char name[2][80];
16672         int n;
16673         int result = 0;
16674         int fd;
16675         struct stat sb;
16676
16677         umask(077);
16678         for (n = 0; n < 2; ++n) {
16679                 strcpy(name[n], tmpl);
16680                 if ((fd = mkstemp(name[n])) >= 0) {
16681                         if (!strcmp(name[n], tmpl)
16682                          || stat(name[n], &sb) != 0
16683                          || (sb.st_mode & S_IFMT) != S_IFREG
16684                          || (sb.st_mode & 077) != 0) {
16685                                 result = 1;
16686                         }
16687                         close(fd);
16688                 }
16689         }
16690         if (result == 0
16691          && !strcmp(name[0], name[1]))
16692                 result = 1;
16693         ${cf_cv_main_return:-return}(result);
16694 }
16695
16696 _ACEOF
16697 rm -f conftest$ac_exeext
16698 if { (eval echo "$as_me:16698: \"$ac_link\"") >&5
16699   (eval $ac_link) 2>&5
16700   ac_status=$?
16701   echo "$as_me:16701: \$? = $ac_status" >&5
16702   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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   cf_cv_func_mkstemp=yes
16709
16710 else
16711   echo "$as_me: program exited with status $ac_status" >&5
16712 echo "$as_me: failed program was:" >&5
16713 cat conftest.$ac_ext >&5
16714 cf_cv_func_mkstemp=no
16715
16716 fi
16717 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16718 fi
16719
16720 fi
16721 echo "$as_me:16721: result: $cf_cv_func_mkstemp" >&5
16722 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
16723 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
16724         echo "$as_me:16724: checking for mkstemp" >&5
16725 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
16726 if test "${ac_cv_func_mkstemp+set}" = set; then
16727   echo $ECHO_N "(cached) $ECHO_C" >&6
16728 else
16729   cat >conftest.$ac_ext <<_ACEOF
16730 #line 16730 "configure"
16731 #include "confdefs.h"
16732 /* System header to define __stub macros and hopefully few prototypes,
16733     which can conflict with char mkstemp (); below.  */
16734 #include <assert.h>
16735 /* Override any gcc2 internal prototype to avoid an error.  */
16736 #ifdef __cplusplus
16737 extern "C"
16738 #endif
16739 /* We use char because int might match the return type of a gcc2
16740    builtin and then its argument prototype would still apply.  */
16741 char mkstemp ();
16742 char (*f) ();
16743
16744 int
16745 main ()
16746 {
16747 /* The GNU C library defines this for functions which it implements
16748     to always fail with ENOSYS.  Some functions are actually named
16749     something starting with __ and the normal name is an alias.  */
16750 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
16751 choke me
16752 #else
16753 f = mkstemp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16754 #endif
16755
16756   ;
16757   return 0;
16758 }
16759 _ACEOF
16760 rm -f conftest.$ac_objext conftest$ac_exeext
16761 if { (eval echo "$as_me:16761: \"$ac_link\"") >&5
16762   (eval $ac_link) 2>&5
16763   ac_status=$?
16764   echo "$as_me:16764: \$? = $ac_status" >&5
16765   (exit $ac_status); } &&
16766          { ac_try='test -s conftest$ac_exeext'
16767   { (eval echo "$as_me:16767: \"$ac_try\"") >&5
16768   (eval $ac_try) 2>&5
16769   ac_status=$?
16770   echo "$as_me:16770: \$? = $ac_status" >&5
16771   (exit $ac_status); }; }; then
16772   ac_cv_func_mkstemp=yes
16773 else
16774   echo "$as_me: failed program was:" >&5
16775 cat conftest.$ac_ext >&5
16776 ac_cv_func_mkstemp=no
16777 fi
16778 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16779 fi
16780 echo "$as_me:16780: result: $ac_cv_func_mkstemp" >&5
16781 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
16782
16783 fi
16784 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
16785
16786 cat >>confdefs.h <<\EOF
16787 #define HAVE_MKSTEMP 1
16788 EOF
16789
16790 fi
16791
16792 # setup for prototype of fallback for vsscanf()
16793
16794 if test "$cf_cv_func_vsscanf" = vsscanf ; then
16795         HAVE_VSSCANF=1
16796 else
16797         HAVE_VSSCANF=0
16798 fi
16799
16800 if test "x$cross_compiling" = xyes ; then
16801         { echo "$as_me:16801: WARNING: cross compiling: assume setvbuf params not reversed" >&5
16802 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
16803 else
16804         echo "$as_me:16804: checking whether setvbuf arguments are reversed" >&5
16805 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
16806 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
16807   echo $ECHO_N "(cached) $ECHO_C" >&6
16808 else
16809   if test "$cross_compiling" = yes; then
16810   { { echo "$as_me:16810: error: cannot run test program while cross compiling" >&5
16811 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16812    { (exit 1); exit 1; }; }
16813 else
16814   cat >conftest.$ac_ext <<_ACEOF
16815 #line 16815 "configure"
16816 #include "confdefs.h"
16817 #include <stdio.h>
16818 /* If setvbuf has the reversed format, exit 0. */
16819 int
16820 main ()
16821 {
16822   /* This call has the arguments reversed.
16823      A reversed system may check and see that the address of main
16824      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
16825   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
16826     $ac_main_return(1);
16827   putc('\r', stdout);
16828   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
16829 }
16830 _ACEOF
16831 rm -f conftest$ac_exeext
16832 if { (eval echo "$as_me:16832: \"$ac_link\"") >&5
16833   (eval $ac_link) 2>&5
16834   ac_status=$?
16835   echo "$as_me:16835: \$? = $ac_status" >&5
16836   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16837   { (eval echo "$as_me:16837: \"$ac_try\"") >&5
16838   (eval $ac_try) 2>&5
16839   ac_status=$?
16840   echo "$as_me:16840: \$? = $ac_status" >&5
16841   (exit $ac_status); }; }; then
16842   ac_cv_func_setvbuf_reversed=yes
16843 else
16844   echo "$as_me: program exited with status $ac_status" >&5
16845 echo "$as_me: failed program was:" >&5
16846 cat conftest.$ac_ext >&5
16847 ac_cv_func_setvbuf_reversed=no
16848 fi
16849 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16850 fi
16851 rm -f core core.* *.core
16852 fi
16853 echo "$as_me:16853: result: $ac_cv_func_setvbuf_reversed" >&5
16854 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
16855 if test $ac_cv_func_setvbuf_reversed = yes; then
16856
16857 cat >>confdefs.h <<\EOF
16858 #define SETVBUF_REVERSED 1
16859 EOF
16860
16861 fi
16862
16863 fi
16864 echo "$as_me:16864: checking for intptr_t" >&5
16865 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
16866 if test "${ac_cv_type_intptr_t+set}" = set; then
16867   echo $ECHO_N "(cached) $ECHO_C" >&6
16868 else
16869   cat >conftest.$ac_ext <<_ACEOF
16870 #line 16870 "configure"
16871 #include "confdefs.h"
16872 $ac_includes_default
16873 int
16874 main ()
16875 {
16876 if ((intptr_t *) 0)
16877   return 0;
16878 if (sizeof (intptr_t))
16879   return 0;
16880   ;
16881   return 0;
16882 }
16883 _ACEOF
16884 rm -f conftest.$ac_objext
16885 if { (eval echo "$as_me:16885: \"$ac_compile\"") >&5
16886   (eval $ac_compile) 2>&5
16887   ac_status=$?
16888   echo "$as_me:16888: \$? = $ac_status" >&5
16889   (exit $ac_status); } &&
16890          { ac_try='test -s conftest.$ac_objext'
16891   { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892   (eval $ac_try) 2>&5
16893   ac_status=$?
16894   echo "$as_me:16894: \$? = $ac_status" >&5
16895   (exit $ac_status); }; }; then
16896   ac_cv_type_intptr_t=yes
16897 else
16898   echo "$as_me: failed program was:" >&5
16899 cat conftest.$ac_ext >&5
16900 ac_cv_type_intptr_t=no
16901 fi
16902 rm -f conftest.$ac_objext conftest.$ac_ext
16903 fi
16904 echo "$as_me:16904: result: $ac_cv_type_intptr_t" >&5
16905 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
16906 if test $ac_cv_type_intptr_t = yes; then
16907   :
16908 else
16909
16910 cat >>confdefs.h <<EOF
16911 #define intptr_t long
16912 EOF
16913
16914 fi
16915
16916 echo "$as_me:16916: checking for type sigaction_t" >&5
16917 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
16918 if test "${cf_cv_type_sigaction+set}" = set; then
16919   echo $ECHO_N "(cached) $ECHO_C" >&6
16920 else
16921
16922         cat >conftest.$ac_ext <<_ACEOF
16923 #line 16923 "configure"
16924 #include "confdefs.h"
16925
16926 #include <signal.h>
16927 int
16928 main ()
16929 {
16930 sigaction_t x
16931   ;
16932   return 0;
16933 }
16934 _ACEOF
16935 rm -f conftest.$ac_objext
16936 if { (eval echo "$as_me:16936: \"$ac_compile\"") >&5
16937   (eval $ac_compile) 2>&5
16938   ac_status=$?
16939   echo "$as_me:16939: \$? = $ac_status" >&5
16940   (exit $ac_status); } &&
16941          { ac_try='test -s conftest.$ac_objext'
16942   { (eval echo "$as_me:16942: \"$ac_try\"") >&5
16943   (eval $ac_try) 2>&5
16944   ac_status=$?
16945   echo "$as_me:16945: \$? = $ac_status" >&5
16946   (exit $ac_status); }; }; then
16947   cf_cv_type_sigaction=yes
16948 else
16949   echo "$as_me: failed program was:" >&5
16950 cat conftest.$ac_ext >&5
16951 cf_cv_type_sigaction=no
16952 fi
16953 rm -f conftest.$ac_objext conftest.$ac_ext
16954 fi
16955
16956 echo "$as_me:16956: result: $cf_cv_type_sigaction" >&5
16957 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
16958 test "$cf_cv_type_sigaction" = yes &&
16959 cat >>confdefs.h <<\EOF
16960 #define HAVE_TYPE_SIGACTION 1
16961 EOF
16962
16963 echo "$as_me:16963: checking declaration of size-change" >&5
16964 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
16965 if test "${cf_cv_sizechange+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968
16969     cf_cv_sizechange=unknown
16970     cf_save_CPPFLAGS="$CPPFLAGS"
16971
16972 for cf_opts in "" "NEED_PTEM_H"
16973 do
16974
16975     CPPFLAGS="$cf_save_CPPFLAGS"
16976     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
16977     cat >conftest.$ac_ext <<_ACEOF
16978 #line 16978 "configure"
16979 #include "confdefs.h"
16980 #include <sys/types.h>
16981 #ifdef HAVE_TERMIOS_H
16982 #include <termios.h>
16983 #else
16984 #ifdef HAVE_TERMIO_H
16985 #include <termio.h>
16986 #endif
16987 #endif
16988 #ifdef NEED_PTEM_H
16989 /* This is a workaround for SCO:  they neglected to define struct winsize in
16990  * termios.h -- it's only in termio.h and ptem.h
16991  */
16992 #include        <sys/stream.h>
16993 #include        <sys/ptem.h>
16994 #endif
16995 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
16996 #include <sys/ioctl.h>
16997 #endif
16998
16999 int
17000 main ()
17001 {
17002
17003 #ifdef TIOCGSIZE
17004         struct ttysize win;     /* FIXME: what system is this? */
17005         int y = win.ts_lines;
17006         int x = win.ts_cols;
17007 #else
17008 #ifdef TIOCGWINSZ
17009         struct winsize win;
17010         int y = win.ws_row;
17011         int x = win.ws_col;
17012 #else
17013         no TIOCGSIZE or TIOCGWINSZ
17014 #endif /* TIOCGWINSZ */
17015 #endif /* TIOCGSIZE */
17016
17017   ;
17018   return 0;
17019 }
17020 _ACEOF
17021 rm -f conftest.$ac_objext
17022 if { (eval echo "$as_me:17022: \"$ac_compile\"") >&5
17023   (eval $ac_compile) 2>&5
17024   ac_status=$?
17025   echo "$as_me:17025: \$? = $ac_status" >&5
17026   (exit $ac_status); } &&
17027          { ac_try='test -s conftest.$ac_objext'
17028   { (eval echo "$as_me:17028: \"$ac_try\"") >&5
17029   (eval $ac_try) 2>&5
17030   ac_status=$?
17031   echo "$as_me:17031: \$? = $ac_status" >&5
17032   (exit $ac_status); }; }; then
17033   cf_cv_sizechange=yes
17034 else
17035   echo "$as_me: failed program was:" >&5
17036 cat conftest.$ac_ext >&5
17037 cf_cv_sizechange=no
17038 fi
17039 rm -f conftest.$ac_objext conftest.$ac_ext
17040
17041         CPPFLAGS="$cf_save_CPPFLAGS"
17042         if test "$cf_cv_sizechange" = yes ; then
17043                 echo "size-change succeeded ($cf_opts)" >&5
17044                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
17045                 break
17046         fi
17047 done
17048
17049 fi
17050 echo "$as_me:17050: result: $cf_cv_sizechange" >&5
17051 echo "${ECHO_T}$cf_cv_sizechange" >&6
17052 if test "$cf_cv_sizechange" != no ; then
17053
17054 cat >>confdefs.h <<\EOF
17055 #define HAVE_SIZECHANGE 1
17056 EOF
17057
17058         case $cf_cv_sizechange in #(vi
17059         NEED*)
17060                 cat >>confdefs.h <<EOF
17061 #define $cf_cv_sizechange  1
17062 EOF
17063
17064                 ;;
17065         esac
17066 fi
17067
17068 echo "$as_me:17068: checking for memmove" >&5
17069 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
17070 if test "${ac_cv_func_memmove+set}" = set; then
17071   echo $ECHO_N "(cached) $ECHO_C" >&6
17072 else
17073   cat >conftest.$ac_ext <<_ACEOF
17074 #line 17074 "configure"
17075 #include "confdefs.h"
17076 /* System header to define __stub macros and hopefully few prototypes,
17077     which can conflict with char memmove (); below.  */
17078 #include <assert.h>
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 memmove ();
17086 char (*f) ();
17087
17088 int
17089 main ()
17090 {
17091 /* The GNU C library defines this for functions which it implements
17092     to always fail with ENOSYS.  Some functions are actually named
17093     something starting with __ and the normal name is an alias.  */
17094 #if defined (__stub_memmove) || defined (__stub___memmove)
17095 choke me
17096 #else
17097 f = memmove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17098 #endif
17099
17100   ;
17101   return 0;
17102 }
17103 _ACEOF
17104 rm -f conftest.$ac_objext conftest$ac_exeext
17105 if { (eval echo "$as_me:17105: \"$ac_link\"") >&5
17106   (eval $ac_link) 2>&5
17107   ac_status=$?
17108   echo "$as_me:17108: \$? = $ac_status" >&5
17109   (exit $ac_status); } &&
17110          { ac_try='test -s conftest$ac_exeext'
17111   { (eval echo "$as_me:17111: \"$ac_try\"") >&5
17112   (eval $ac_try) 2>&5
17113   ac_status=$?
17114   echo "$as_me:17114: \$? = $ac_status" >&5
17115   (exit $ac_status); }; }; then
17116   ac_cv_func_memmove=yes
17117 else
17118   echo "$as_me: failed program was:" >&5
17119 cat conftest.$ac_ext >&5
17120 ac_cv_func_memmove=no
17121 fi
17122 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17123 fi
17124 echo "$as_me:17124: result: $ac_cv_func_memmove" >&5
17125 echo "${ECHO_T}$ac_cv_func_memmove" >&6
17126 if test $ac_cv_func_memmove = yes; then
17127   :
17128 else
17129
17130 echo "$as_me:17130: checking for bcopy" >&5
17131 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
17132 if test "${ac_cv_func_bcopy+set}" = set; then
17133   echo $ECHO_N "(cached) $ECHO_C" >&6
17134 else
17135   cat >conftest.$ac_ext <<_ACEOF
17136 #line 17136 "configure"
17137 #include "confdefs.h"
17138 /* System header to define __stub macros and hopefully few prototypes,
17139     which can conflict with char bcopy (); below.  */
17140 #include <assert.h>
17141 /* Override any gcc2 internal prototype to avoid an error.  */
17142 #ifdef __cplusplus
17143 extern "C"
17144 #endif
17145 /* We use char because int might match the return type of a gcc2
17146    builtin and then its argument prototype would still apply.  */
17147 char bcopy ();
17148 char (*f) ();
17149
17150 int
17151 main ()
17152 {
17153 /* The GNU C library defines this for functions which it implements
17154     to always fail with ENOSYS.  Some functions are actually named
17155     something starting with __ and the normal name is an alias.  */
17156 #if defined (__stub_bcopy) || defined (__stub___bcopy)
17157 choke me
17158 #else
17159 f = bcopy; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17160 #endif
17161
17162   ;
17163   return 0;
17164 }
17165 _ACEOF
17166 rm -f conftest.$ac_objext conftest$ac_exeext
17167 if { (eval echo "$as_me:17167: \"$ac_link\"") >&5
17168   (eval $ac_link) 2>&5
17169   ac_status=$?
17170   echo "$as_me:17170: \$? = $ac_status" >&5
17171   (exit $ac_status); } &&
17172          { ac_try='test -s conftest$ac_exeext'
17173   { (eval echo "$as_me:17173: \"$ac_try\"") >&5
17174   (eval $ac_try) 2>&5
17175   ac_status=$?
17176   echo "$as_me:17176: \$? = $ac_status" >&5
17177   (exit $ac_status); }; }; then
17178   ac_cv_func_bcopy=yes
17179 else
17180   echo "$as_me: failed program was:" >&5
17181 cat conftest.$ac_ext >&5
17182 ac_cv_func_bcopy=no
17183 fi
17184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17185 fi
17186 echo "$as_me:17186: result: $ac_cv_func_bcopy" >&5
17187 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
17188 if test $ac_cv_func_bcopy = yes; then
17189
17190         echo "$as_me:17190: checking if bcopy does overlapping moves" >&5
17191 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
17192 if test "${cf_cv_good_bcopy+set}" = set; then
17193   echo $ECHO_N "(cached) $ECHO_C" >&6
17194 else
17195
17196                 if test "$cross_compiling" = yes; then
17197   cf_cv_good_bcopy=unknown
17198 else
17199   cat >conftest.$ac_ext <<_ACEOF
17200 #line 17200 "configure"
17201 #include "confdefs.h"
17202
17203 int main() {
17204         static char data[] = "abcdefghijklmnopqrstuwwxyz";
17205         char temp[40];
17206         bcopy(data, temp, sizeof(data));
17207         bcopy(temp+10, temp, 15);
17208         bcopy(temp+5, temp+15, 10);
17209         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
17210 }
17211
17212 _ACEOF
17213 rm -f conftest$ac_exeext
17214 if { (eval echo "$as_me:17214: \"$ac_link\"") >&5
17215   (eval $ac_link) 2>&5
17216   ac_status=$?
17217   echo "$as_me:17217: \$? = $ac_status" >&5
17218   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17219   { (eval echo "$as_me:17219: \"$ac_try\"") >&5
17220   (eval $ac_try) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit $ac_status); }; }; then
17224   cf_cv_good_bcopy=yes
17225 else
17226   echo "$as_me: program exited with status $ac_status" >&5
17227 echo "$as_me: failed program was:" >&5
17228 cat conftest.$ac_ext >&5
17229 cf_cv_good_bcopy=no
17230 fi
17231 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17232 fi
17233
17234 fi
17235 echo "$as_me:17235: result: $cf_cv_good_bcopy" >&5
17236 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
17237
17238 else
17239   cf_cv_good_bcopy=no
17240 fi
17241
17242         if test "$cf_cv_good_bcopy" = yes ; then
17243
17244 cat >>confdefs.h <<\EOF
17245 #define USE_OK_BCOPY 1
17246 EOF
17247
17248         else
17249
17250 cat >>confdefs.h <<\EOF
17251 #define USE_MY_MEMMOVE 1
17252 EOF
17253
17254         fi
17255
17256 fi
17257
17258 echo "$as_me:17258: checking if poll really works" >&5
17259 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
17260 if test "${cf_cv_working_poll+set}" = set; then
17261   echo $ECHO_N "(cached) $ECHO_C" >&6
17262 else
17263
17264 if test "$cross_compiling" = yes; then
17265   cf_cv_working_poll=unknown
17266 else
17267   cat >conftest.$ac_ext <<_ACEOF
17268 #line 17268 "configure"
17269 #include "confdefs.h"
17270
17271 #include <stdlib.h>
17272 #include <stdio.h>
17273 #include <unistd.h>
17274 #include <fcntl.h>
17275 #ifdef HAVE_POLL_H
17276 #include <poll.h>
17277 #else
17278 #include <sys/poll.h>
17279 #endif
17280 int main() {
17281         struct pollfd myfds;
17282         int ret;
17283
17284         /* check for Darwin bug with respect to "devices" */
17285         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
17286         if (myfds.fd < 0)
17287                 myfds.fd = 0;
17288         myfds.events = POLLIN;
17289         myfds.revents = 0;
17290
17291         ret = poll(&myfds, 1, 100);
17292
17293         if (ret < 0 || (myfds.revents & POLLNVAL)) {
17294                 ret = -1;
17295         } else {
17296                 int fd = 0;
17297                 if (!isatty(fd)) {
17298                         fd = open("/dev/tty", 2);       /* O_RDWR */
17299                 }
17300
17301                 if (fd >= 0) {
17302                         /* also check with standard input */
17303                         myfds.fd = fd;
17304                         myfds.events = POLLIN;
17305                         myfds.revents = 0;
17306                         ret = poll(&myfds, 1, 100);
17307                 } else {
17308                         ret = -1;
17309                 }
17310         }
17311         ${cf_cv_main_return:-return}(ret < 0);
17312 }
17313 _ACEOF
17314 rm -f conftest$ac_exeext
17315 if { (eval echo "$as_me:17315: \"$ac_link\"") >&5
17316   (eval $ac_link) 2>&5
17317   ac_status=$?
17318   echo "$as_me:17318: \$? = $ac_status" >&5
17319   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17320   { (eval echo "$as_me:17320: \"$ac_try\"") >&5
17321   (eval $ac_try) 2>&5
17322   ac_status=$?
17323   echo "$as_me:17323: \$? = $ac_status" >&5
17324   (exit $ac_status); }; }; then
17325   cf_cv_working_poll=yes
17326 else
17327   echo "$as_me: program exited with status $ac_status" >&5
17328 echo "$as_me: failed program was:" >&5
17329 cat conftest.$ac_ext >&5
17330 cf_cv_working_poll=no
17331 fi
17332 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17333 fi
17334 fi
17335 echo "$as_me:17335: result: $cf_cv_working_poll" >&5
17336 echo "${ECHO_T}$cf_cv_working_poll" >&6
17337 test "$cf_cv_working_poll" = "yes" &&
17338 cat >>confdefs.h <<\EOF
17339 #define HAVE_WORKING_POLL 1
17340 EOF
17341
17342 echo "$as_me:17342: checking for va_copy" >&5
17343 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
17344 if test "${cf_cv_have_va_copy+set}" = set; then
17345   echo $ECHO_N "(cached) $ECHO_C" >&6
17346 else
17347
17348 cat >conftest.$ac_ext <<_ACEOF
17349 #line 17349 "configure"
17350 #include "confdefs.h"
17351
17352 #include <stdarg.h>
17353
17354 int
17355 main ()
17356 {
17357
17358         static va_list dst;
17359         static va_list src;
17360         va_copy(dst, src)
17361   ;
17362   return 0;
17363 }
17364 _ACEOF
17365 rm -f conftest.$ac_objext conftest$ac_exeext
17366 if { (eval echo "$as_me:17366: \"$ac_link\"") >&5
17367   (eval $ac_link) 2>&5
17368   ac_status=$?
17369   echo "$as_me:17369: \$? = $ac_status" >&5
17370   (exit $ac_status); } &&
17371          { ac_try='test -s conftest$ac_exeext'
17372   { (eval echo "$as_me:17372: \"$ac_try\"") >&5
17373   (eval $ac_try) 2>&5
17374   ac_status=$?
17375   echo "$as_me:17375: \$? = $ac_status" >&5
17376   (exit $ac_status); }; }; then
17377   cf_cv_have_va_copy=yes
17378 else
17379   echo "$as_me: failed program was:" >&5
17380 cat conftest.$ac_ext >&5
17381 cf_cv_have_va_copy=no
17382 fi
17383 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17384 fi
17385 echo "$as_me:17385: result: $cf_cv_have_va_copy" >&5
17386 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
17387
17388 test "$cf_cv_have_va_copy" = yes &&
17389 cat >>confdefs.h <<\EOF
17390 #define HAVE_VA_COPY 1
17391 EOF
17392
17393 echo "$as_me:17393: checking for __va_copy" >&5
17394 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
17395 if test "${cf_cv_have___va_copy+set}" = set; then
17396   echo $ECHO_N "(cached) $ECHO_C" >&6
17397 else
17398
17399 cat >conftest.$ac_ext <<_ACEOF
17400 #line 17400 "configure"
17401 #include "confdefs.h"
17402
17403 #include <stdarg.h>
17404
17405 int
17406 main ()
17407 {
17408
17409         static va_list dst;
17410         static va_list src;
17411         __va_copy(dst, src)
17412   ;
17413   return 0;
17414 }
17415 _ACEOF
17416 rm -f conftest.$ac_objext conftest$ac_exeext
17417 if { (eval echo "$as_me:17417: \"$ac_link\"") >&5
17418   (eval $ac_link) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit $ac_status); } &&
17422          { ac_try='test -s conftest$ac_exeext'
17423   { (eval echo "$as_me:17423: \"$ac_try\"") >&5
17424   (eval $ac_try) 2>&5
17425   ac_status=$?
17426   echo "$as_me:17426: \$? = $ac_status" >&5
17427   (exit $ac_status); }; }; then
17428   cf_cv_have___va_copy=yes
17429 else
17430   echo "$as_me: failed program was:" >&5
17431 cat conftest.$ac_ext >&5
17432 cf_cv_have___va_copy=no
17433 fi
17434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17435 fi
17436 echo "$as_me:17436: result: $cf_cv_have___va_copy" >&5
17437 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
17438
17439 test "$cf_cv_have___va_copy" = yes &&
17440 cat >>confdefs.h <<\EOF
17441 #define HAVE___VA_COPY 1
17442 EOF
17443
17444 echo "$as_me:17444: checking for pid_t" >&5
17445 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
17446 if test "${ac_cv_type_pid_t+set}" = set; then
17447   echo $ECHO_N "(cached) $ECHO_C" >&6
17448 else
17449   cat >conftest.$ac_ext <<_ACEOF
17450 #line 17450 "configure"
17451 #include "confdefs.h"
17452 $ac_includes_default
17453 int
17454 main ()
17455 {
17456 if ((pid_t *) 0)
17457   return 0;
17458 if (sizeof (pid_t))
17459   return 0;
17460   ;
17461   return 0;
17462 }
17463 _ACEOF
17464 rm -f conftest.$ac_objext
17465 if { (eval echo "$as_me:17465: \"$ac_compile\"") >&5
17466   (eval $ac_compile) 2>&5
17467   ac_status=$?
17468   echo "$as_me:17468: \$? = $ac_status" >&5
17469   (exit $ac_status); } &&
17470          { ac_try='test -s conftest.$ac_objext'
17471   { (eval echo "$as_me:17471: \"$ac_try\"") >&5
17472   (eval $ac_try) 2>&5
17473   ac_status=$?
17474   echo "$as_me:17474: \$? = $ac_status" >&5
17475   (exit $ac_status); }; }; then
17476   ac_cv_type_pid_t=yes
17477 else
17478   echo "$as_me: failed program was:" >&5
17479 cat conftest.$ac_ext >&5
17480 ac_cv_type_pid_t=no
17481 fi
17482 rm -f conftest.$ac_objext conftest.$ac_ext
17483 fi
17484 echo "$as_me:17484: result: $ac_cv_type_pid_t" >&5
17485 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
17486 if test $ac_cv_type_pid_t = yes; then
17487   :
17488 else
17489
17490 cat >>confdefs.h <<EOF
17491 #define pid_t int
17492 EOF
17493
17494 fi
17495
17496 for ac_header in unistd.h vfork.h
17497 do
17498 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17499 echo "$as_me:17499: checking for $ac_header" >&5
17500 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17501 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17502   echo $ECHO_N "(cached) $ECHO_C" >&6
17503 else
17504   cat >conftest.$ac_ext <<_ACEOF
17505 #line 17505 "configure"
17506 #include "confdefs.h"
17507 #include <$ac_header>
17508 _ACEOF
17509 if { (eval echo "$as_me:17509: \"$ac_cpp conftest.$ac_ext\"") >&5
17510   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17511   ac_status=$?
17512   egrep -v '^ *\+' conftest.er1 >conftest.err
17513   rm -f conftest.er1
17514   cat conftest.err >&5
17515   echo "$as_me:17515: \$? = $ac_status" >&5
17516   (exit $ac_status); } >/dev/null; then
17517   if test -s conftest.err; then
17518     ac_cpp_err=$ac_c_preproc_warn_flag
17519   else
17520     ac_cpp_err=
17521   fi
17522 else
17523   ac_cpp_err=yes
17524 fi
17525 if test -z "$ac_cpp_err"; then
17526   eval "$as_ac_Header=yes"
17527 else
17528   echo "$as_me: failed program was:" >&5
17529   cat conftest.$ac_ext >&5
17530   eval "$as_ac_Header=no"
17531 fi
17532 rm -f conftest.err conftest.$ac_ext
17533 fi
17534 echo "$as_me:17534: result: `eval echo '${'$as_ac_Header'}'`" >&5
17535 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17536 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17537   cat >>confdefs.h <<EOF
17538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17539 EOF
17540
17541 fi
17542 done
17543
17544 for ac_func in fork vfork
17545 do
17546 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17547 echo "$as_me:17547: checking for $ac_func" >&5
17548 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17549 if eval "test \"\${$as_ac_var+set}\" = set"; then
17550   echo $ECHO_N "(cached) $ECHO_C" >&6
17551 else
17552   cat >conftest.$ac_ext <<_ACEOF
17553 #line 17553 "configure"
17554 #include "confdefs.h"
17555 /* System header to define __stub macros and hopefully few prototypes,
17556     which can conflict with char $ac_func (); below.  */
17557 #include <assert.h>
17558 /* Override any gcc2 internal prototype to avoid an error.  */
17559 #ifdef __cplusplus
17560 extern "C"
17561 #endif
17562 /* We use char because int might match the return type of a gcc2
17563    builtin and then its argument prototype would still apply.  */
17564 char $ac_func ();
17565 char (*f) ();
17566
17567 int
17568 main ()
17569 {
17570 /* The GNU C library defines this for functions which it implements
17571     to always fail with ENOSYS.  Some functions are actually named
17572     something starting with __ and the normal name is an alias.  */
17573 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17574 choke me
17575 #else
17576 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17577 #endif
17578
17579   ;
17580   return 0;
17581 }
17582 _ACEOF
17583 rm -f conftest.$ac_objext conftest$ac_exeext
17584 if { (eval echo "$as_me:17584: \"$ac_link\"") >&5
17585   (eval $ac_link) 2>&5
17586   ac_status=$?
17587   echo "$as_me:17587: \$? = $ac_status" >&5
17588   (exit $ac_status); } &&
17589          { ac_try='test -s conftest$ac_exeext'
17590   { (eval echo "$as_me:17590: \"$ac_try\"") >&5
17591   (eval $ac_try) 2>&5
17592   ac_status=$?
17593   echo "$as_me:17593: \$? = $ac_status" >&5
17594   (exit $ac_status); }; }; then
17595   eval "$as_ac_var=yes"
17596 else
17597   echo "$as_me: failed program was:" >&5
17598 cat conftest.$ac_ext >&5
17599 eval "$as_ac_var=no"
17600 fi
17601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17602 fi
17603 echo "$as_me:17603: result: `eval echo '${'$as_ac_var'}'`" >&5
17604 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17605 if test `eval echo '${'$as_ac_var'}'` = yes; then
17606   cat >>confdefs.h <<EOF
17607 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17608 EOF
17609
17610 fi
17611 done
17612
17613 ac_cv_func_fork_works=$ac_cv_func_fork
17614 if test "x$ac_cv_func_fork" = xyes; then
17615   echo "$as_me:17615: checking for working fork" >&5
17616 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
17617 if test "${ac_cv_func_fork_works+set}" = set; then
17618   echo $ECHO_N "(cached) $ECHO_C" >&6
17619 else
17620   if test "$cross_compiling" = yes; then
17621   ac_cv_func_fork_works=cross
17622 else
17623   cat >conftest.$ac_ext <<_ACEOF
17624 /* By Rüdiger Kuhlmann. */
17625       #include <sys/types.h>
17626       #if HAVE_UNISTD_H
17627       # include <unistd.h>
17628       #endif
17629       /* Some systems only have a dummy stub for fork() */
17630       int main ()
17631       {
17632         if (fork() < 0)
17633           $ac_main_return (1);
17634         $ac_main_return (0);
17635       }
17636 _ACEOF
17637 rm -f conftest$ac_exeext
17638 if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
17639   (eval $ac_link) 2>&5
17640   ac_status=$?
17641   echo "$as_me:17641: \$? = $ac_status" >&5
17642   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17643   { (eval echo "$as_me:17643: \"$ac_try\"") >&5
17644   (eval $ac_try) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); }; }; then
17648   ac_cv_func_fork_works=yes
17649 else
17650   echo "$as_me: program exited with status $ac_status" >&5
17651 echo "$as_me: failed program was:" >&5
17652 cat conftest.$ac_ext >&5
17653 ac_cv_func_fork_works=no
17654 fi
17655 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17656 fi
17657 fi
17658 echo "$as_me:17658: result: $ac_cv_func_fork_works" >&5
17659 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
17660
17661 fi
17662 if test "x$ac_cv_func_fork_works" = xcross; then
17663   case $host in
17664     *-*-amigaos* | *-*-msdosdjgpp*)
17665       # Override, as these systems have only a dummy fork() stub
17666       ac_cv_func_fork_works=no
17667       ;;
17668     *)
17669       ac_cv_func_fork_works=yes
17670       ;;
17671   esac
17672   { echo "$as_me:17672: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
17673 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
17674 fi
17675 ac_cv_func_vfork_works=$ac_cv_func_vfork
17676 if test "x$ac_cv_func_vfork" = xyes; then
17677   echo "$as_me:17677: checking for working vfork" >&5
17678 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
17679 if test "${ac_cv_func_vfork_works+set}" = set; then
17680   echo $ECHO_N "(cached) $ECHO_C" >&6
17681 else
17682   if test "$cross_compiling" = yes; then
17683   ac_cv_func_vfork_works=cross
17684 else
17685   cat >conftest.$ac_ext <<_ACEOF
17686 #line 17686 "configure"
17687 #include "confdefs.h"
17688 /* Thanks to Paul Eggert for this test.  */
17689 #include <stdio.h>
17690 #include <sys/types.h>
17691 #include <sys/stat.h>
17692 #if HAVE_UNISTD_H
17693 # include <unistd.h>
17694 #endif
17695 #if HAVE_VFORK_H
17696 # include <vfork.h>
17697 #endif
17698 /* On some sparc systems, changes by the child to local and incoming
17699    argument registers are propagated back to the parent.  The compiler
17700    is told about this with #include <vfork.h>, but some compilers
17701    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
17702    static variable whose address is put into a register that is
17703    clobbered by the vfork.  */
17704 static
17705 #ifdef __cplusplus
17706 sparc_address_test (int arg)
17707 # else
17708 sparc_address_test (arg) int arg;
17709 #endif
17710 {
17711   static pid_t child;
17712   if (!child) {
17713     child = vfork ();
17714     if (child < 0) {
17715       perror ("vfork");
17716       _exit(2);
17717     }
17718     if (!child) {
17719       arg = getpid();
17720       write(-1, "", 0);
17721       _exit (arg);
17722     }
17723   }
17724 }
17725
17726 int
17727 main ()
17728 {
17729   pid_t parent = getpid ();
17730   pid_t child;
17731
17732   sparc_address_test ();
17733
17734   child = vfork ();
17735
17736   if (child == 0) {
17737     /* Here is another test for sparc vfork register problems.  This
17738        test uses lots of local variables, at least as many local
17739        variables as main has allocated so far including compiler
17740        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
17741        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
17742        reuse the register of parent for one of the local variables,
17743        since it will think that parent can't possibly be used any more
17744        in this routine.  Assigning to the local variable will thus
17745        munge parent in the parent process.  */
17746     pid_t
17747       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
17748       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
17749     /* Convince the compiler that p..p7 are live; otherwise, it might
17750        use the same hardware register for all 8 local variables.  */
17751     if (p != p1 || p != p2 || p != p3 || p != p4
17752         || p != p5 || p != p6 || p != p7)
17753       _exit(1);
17754
17755     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
17756        from child file descriptors.  If the child closes a descriptor
17757        before it execs or exits, this munges the parent's descriptor
17758        as well.  Test for this by closing stdout in the child.  */
17759     _exit(close(fileno(stdout)) != 0);
17760   } else {
17761     int status;
17762     struct stat st;
17763
17764     while (wait(&status) != child)
17765       ;
17766     $ac_main_return(
17767          /* Was there some problem with vforking?  */
17768          child < 0
17769
17770          /* Did the child fail?  (This shouldn't happen.)  */
17771          || status
17772
17773          /* Did the vfork/compiler bug occur?  */
17774          || parent != getpid()
17775
17776          /* Did the file descriptor bug occur?  */
17777          || fstat(fileno(stdout), &st) != 0
17778          );
17779   }
17780 }
17781 _ACEOF
17782 rm -f conftest$ac_exeext
17783 if { (eval echo "$as_me:17783: \"$ac_link\"") >&5
17784   (eval $ac_link) 2>&5
17785   ac_status=$?
17786   echo "$as_me:17786: \$? = $ac_status" >&5
17787   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17788   { (eval echo "$as_me:17788: \"$ac_try\"") >&5
17789   (eval $ac_try) 2>&5
17790   ac_status=$?
17791   echo "$as_me:17791: \$? = $ac_status" >&5
17792   (exit $ac_status); }; }; then
17793   ac_cv_func_vfork_works=yes
17794 else
17795   echo "$as_me: program exited with status $ac_status" >&5
17796 echo "$as_me: failed program was:" >&5
17797 cat conftest.$ac_ext >&5
17798 ac_cv_func_vfork_works=no
17799 fi
17800 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17801 fi
17802 fi
17803 echo "$as_me:17803: result: $ac_cv_func_vfork_works" >&5
17804 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
17805
17806 fi;
17807 if test "x$ac_cv_func_fork_works" = xcross; then
17808   ac_cv_func_vfork_works=ac_cv_func_vfork
17809   { echo "$as_me:17809: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
17810 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
17811 fi
17812
17813 if test "x$ac_cv_func_vfork_works" = xyes; then
17814
17815 cat >>confdefs.h <<\EOF
17816 #define HAVE_WORKING_VFORK 1
17817 EOF
17818
17819 else
17820
17821 cat >>confdefs.h <<\EOF
17822 #define vfork fork
17823 EOF
17824
17825 fi
17826 if test "x$ac_cv_func_fork_works" = xyes; then
17827
17828 cat >>confdefs.h <<\EOF
17829 #define HAVE_WORKING_FORK 1
17830 EOF
17831
17832 fi
17833
17834 # special check for test/ditto.c
17835
17836 echo "$as_me:17836: checking for openpty in -lutil" >&5
17837 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
17838 if test "${ac_cv_lib_util_openpty+set}" = set; then
17839   echo $ECHO_N "(cached) $ECHO_C" >&6
17840 else
17841   ac_check_lib_save_LIBS=$LIBS
17842 LIBS="-lutil  $LIBS"
17843 cat >conftest.$ac_ext <<_ACEOF
17844 #line 17844 "configure"
17845 #include "confdefs.h"
17846
17847 /* Override any gcc2 internal prototype to avoid an error.  */
17848 #ifdef __cplusplus
17849 extern "C"
17850 #endif
17851 /* We use char because int might match the return type of a gcc2
17852    builtin and then its argument prototype would still apply.  */
17853 char openpty ();
17854 int
17855 main ()
17856 {
17857 openpty ();
17858   ;
17859   return 0;
17860 }
17861 _ACEOF
17862 rm -f conftest.$ac_objext conftest$ac_exeext
17863 if { (eval echo "$as_me:17863: \"$ac_link\"") >&5
17864   (eval $ac_link) 2>&5
17865   ac_status=$?
17866   echo "$as_me:17866: \$? = $ac_status" >&5
17867   (exit $ac_status); } &&
17868          { ac_try='test -s conftest$ac_exeext'
17869   { (eval echo "$as_me:17869: \"$ac_try\"") >&5
17870   (eval $ac_try) 2>&5
17871   ac_status=$?
17872   echo "$as_me:17872: \$? = $ac_status" >&5
17873   (exit $ac_status); }; }; then
17874   ac_cv_lib_util_openpty=yes
17875 else
17876   echo "$as_me: failed program was:" >&5
17877 cat conftest.$ac_ext >&5
17878 ac_cv_lib_util_openpty=no
17879 fi
17880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17881 LIBS=$ac_check_lib_save_LIBS
17882 fi
17883 echo "$as_me:17883: result: $ac_cv_lib_util_openpty" >&5
17884 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
17885 if test $ac_cv_lib_util_openpty = yes; then
17886   cf_cv_lib_util=yes
17887 else
17888   cf_cv_lib_util=no
17889 fi
17890
17891 echo "$as_me:17891: checking for openpty header" >&5
17892 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
17893 if test "${cf_cv_func_openpty+set}" = set; then
17894   echo $ECHO_N "(cached) $ECHO_C" >&6
17895 else
17896
17897     cf_save_LIBS="$LIBS"
17898     test $cf_cv_lib_util = yes &&
17899 cf_add_libs="-lutil"
17900 # Filter out duplicates - this happens with badly-designed ".pc" files...
17901 for cf_add_1lib in $LIBS
17902 do
17903         for cf_add_2lib in $cf_add_libs
17904         do
17905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17906                 then
17907                         cf_add_1lib=
17908                         break
17909                 fi
17910         done
17911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17912 done
17913 LIBS="$cf_add_libs"
17914
17915     for cf_header in pty.h libutil.h util.h
17916     do
17917     cat >conftest.$ac_ext <<_ACEOF
17918 #line 17918 "configure"
17919 #include "confdefs.h"
17920
17921 #include <$cf_header>
17922
17923 int
17924 main ()
17925 {
17926
17927     int x = openpty((int *)0, (int *)0, (char *)0,
17928                    (struct termios *)0, (struct winsize *)0);
17929
17930   ;
17931   return 0;
17932 }
17933 _ACEOF
17934 rm -f conftest.$ac_objext conftest$ac_exeext
17935 if { (eval echo "$as_me:17935: \"$ac_link\"") >&5
17936   (eval $ac_link) 2>&5
17937   ac_status=$?
17938   echo "$as_me:17938: \$? = $ac_status" >&5
17939   (exit $ac_status); } &&
17940          { ac_try='test -s conftest$ac_exeext'
17941   { (eval echo "$as_me:17941: \"$ac_try\"") >&5
17942   (eval $ac_try) 2>&5
17943   ac_status=$?
17944   echo "$as_me:17944: \$? = $ac_status" >&5
17945   (exit $ac_status); }; }; then
17946
17947         cf_cv_func_openpty=$cf_header
17948         break
17949
17950 else
17951   echo "$as_me: failed program was:" >&5
17952 cat conftest.$ac_ext >&5
17953
17954         cf_cv_func_openpty=no
17955
17956 fi
17957 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17958     done
17959     LIBS="$cf_save_LIBS"
17960
17961 fi
17962 echo "$as_me:17962: result: $cf_cv_func_openpty" >&5
17963 echo "${ECHO_T}$cf_cv_func_openpty" >&6
17964
17965 if test "$cf_cv_func_openpty" != no ; then
17966
17967 cat >>confdefs.h <<EOF
17968 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
17969 EOF
17970
17971 cat >>confdefs.h <<\EOF
17972 #define USE_XTERM_PTY 1
17973 EOF
17974
17975     if test "x$cf_cv_lib_util" = xyes ; then
17976
17977 cf_add_libs="-lutil"
17978 # Filter out duplicates - this happens with badly-designed ".pc" files...
17979 for cf_add_1lib in $TEST_LIBS
17980 do
17981         for cf_add_2lib in $cf_add_libs
17982         do
17983                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
17984                 then
17985                         cf_add_1lib=
17986                         break
17987                 fi
17988         done
17989         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17990 done
17991 TEST_LIBS="$cf_add_libs"
17992
17993     fi
17994 fi
17995
17996 if test "$with_hashed_db" != no ; then
17997
17998 cat >>confdefs.h <<\EOF
17999 #define USE_HASHED_DB 1
18000 EOF
18001
18002 case $with_hashed_db in #(vi
18003 yes|*able*) #(vi
18004     ;;
18005 *)
18006     if test -d "$with_hashed_db" ; then
18007
18008 if test -n "$with_hashed_db/include" ; then
18009   for cf_add_incdir in $with_hashed_db/include
18010   do
18011         while test $cf_add_incdir != /usr/include
18012         do
18013           if test -d $cf_add_incdir
18014           then
18015                 cf_have_incdir=no
18016                 if test -n "$CFLAGS$CPPFLAGS" ; then
18017                   # a loop is needed to ensure we can add subdirs of existing dirs
18018                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18019                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18020                           cf_have_incdir=yes; break
18021                         fi
18022                   done
18023                 fi
18024
18025                 if test "$cf_have_incdir" = no ; then
18026                   if test "$cf_add_incdir" = /usr/local/include ; then
18027                         if test "$GCC" = yes
18028                         then
18029                           cf_save_CPPFLAGS=$CPPFLAGS
18030                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18031                           cat >conftest.$ac_ext <<_ACEOF
18032 #line 18032 "configure"
18033 #include "confdefs.h"
18034 #include <stdio.h>
18035 int
18036 main ()
18037 {
18038 printf("Hello")
18039   ;
18040   return 0;
18041 }
18042 _ACEOF
18043 rm -f conftest.$ac_objext
18044 if { (eval echo "$as_me:18044: \"$ac_compile\"") >&5
18045   (eval $ac_compile) 2>&5
18046   ac_status=$?
18047   echo "$as_me:18047: \$? = $ac_status" >&5
18048   (exit $ac_status); } &&
18049          { ac_try='test -s conftest.$ac_objext'
18050   { (eval echo "$as_me:18050: \"$ac_try\"") >&5
18051   (eval $ac_try) 2>&5
18052   ac_status=$?
18053   echo "$as_me:18053: \$? = $ac_status" >&5
18054   (exit $ac_status); }; }; then
18055   :
18056 else
18057   echo "$as_me: failed program was:" >&5
18058 cat conftest.$ac_ext >&5
18059 cf_have_incdir=yes
18060 fi
18061 rm -f conftest.$ac_objext conftest.$ac_ext
18062                           CPPFLAGS=$cf_save_CPPFLAGS
18063                         fi
18064                   fi
18065                 fi
18066
18067                 if test "$cf_have_incdir" = no ; then
18068                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18069
18070 echo "${as_me:-configure}:18070: testing adding $cf_add_incdir to include-path ..." 1>&5
18071
18072                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18073
18074                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18075                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18076                   cf_add_incdir="$cf_top_incdir"
18077                 else
18078                   break
18079                 fi
18080           fi
18081         done
18082   done
18083 fi
18084
18085 if test -n "$with_hashed_db/lib" ; then
18086   for cf_add_libdir in $with_hashed_db/lib
18087   do
18088     if test $cf_add_libdir = /usr/lib ; then
18089       :
18090     elif test -d $cf_add_libdir
18091     then
18092       cf_have_libdir=no
18093       if test -n "$LDFLAGS$LIBS" ; then
18094         # a loop is needed to ensure we can add subdirs of existing dirs
18095         for cf_test_libdir in $LDFLAGS $LIBS ; do
18096           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18097             cf_have_libdir=yes; break
18098           fi
18099         done
18100       fi
18101       if test "$cf_have_libdir" = no ; then
18102         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18103
18104 echo "${as_me:-configure}:18104: testing adding $cf_add_libdir to library-path ..." 1>&5
18105
18106         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18107       fi
18108     fi
18109   done
18110 fi
18111
18112         else
18113                 case "$with_hashed_db" in #(vi
18114                 ./*|../*|/*)
18115                         { echo "$as_me:18115: WARNING: no such directory $with_hashed_db" >&5
18116 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
18117                         ;; #(vi
18118                 *)
18119
18120 cf_search=
18121
18122 test "x/usr" != "x$prefix" && \
18123 test -d "/usr" && \
18124 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18125         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
18126         test -d /usr/include &&          cf_search="$cf_search /usr/include"
18127         test -d /usr/include/$with_hashed_db &&       cf_search="$cf_search /usr/include/$with_hashed_db"
18128         test -d /usr/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/include/$with_hashed_db/include"
18129         test -d /usr/$with_hashed_db/include &&       cf_search="$cf_search /usr/$with_hashed_db/include"
18130         test -d /usr/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/include/$with_hashed_db"
18131 }
18132
18133 test "x$prefix" != "xNONE" && \
18134 test -d "$prefix" && \
18135  {
18136         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
18137         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
18138         test -d $prefix/include/$with_hashed_db &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
18139         test -d $prefix/include/$with_hashed_db/include &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
18140         test -d $prefix/$with_hashed_db/include &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
18141         test -d $prefix/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
18142 }
18143
18144 test "x/usr/local" != "x$prefix" && \
18145 test -d "/usr/local" && \
18146 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18147         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
18148         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
18149         test -d /usr/local/include/$with_hashed_db &&       cf_search="$cf_search /usr/local/include/$with_hashed_db"
18150         test -d /usr/local/include/$with_hashed_db/include &&    cf_search="$cf_search /usr/local/include/$with_hashed_db/include"
18151         test -d /usr/local/$with_hashed_db/include &&       cf_search="$cf_search /usr/local/$with_hashed_db/include"
18152         test -d /usr/local/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/include/$with_hashed_db"
18153 }
18154
18155 test "x/opt" != "x$prefix" && \
18156 test -d "/opt" && \
18157 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18158         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
18159         test -d /opt/include &&          cf_search="$cf_search /opt/include"
18160         test -d /opt/include/$with_hashed_db &&       cf_search="$cf_search /opt/include/$with_hashed_db"
18161         test -d /opt/include/$with_hashed_db/include &&    cf_search="$cf_search /opt/include/$with_hashed_db/include"
18162         test -d /opt/$with_hashed_db/include &&       cf_search="$cf_search /opt/$with_hashed_db/include"
18163         test -d /opt/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/include/$with_hashed_db"
18164 }
18165
18166 test "x$HOME" != "x$prefix" && \
18167 test -d "$HOME" && \
18168 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18169         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
18170         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
18171         test -d $HOME/include/$with_hashed_db &&       cf_search="$cf_search $HOME/include/$with_hashed_db"
18172         test -d $HOME/include/$with_hashed_db/include &&    cf_search="$cf_search $HOME/include/$with_hashed_db/include"
18173         test -d $HOME/$with_hashed_db/include &&       cf_search="$cf_search $HOME/$with_hashed_db/include"
18174         test -d $HOME/$with_hashed_db/include/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/include/$with_hashed_db"
18175 }
18176
18177         for cf_item in $cf_search
18178         do
18179                 case $cf_item in #(vi
18180                 */$with_hashed_db)
18181
18182 if test -n "$cf_item" ; then
18183   for cf_add_incdir in $cf_item
18184   do
18185         while test $cf_add_incdir != /usr/include
18186         do
18187           if test -d $cf_add_incdir
18188           then
18189                 cf_have_incdir=no
18190                 if test -n "$CFLAGS$CPPFLAGS" ; then
18191                   # a loop is needed to ensure we can add subdirs of existing dirs
18192                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18193                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18194                           cf_have_incdir=yes; break
18195                         fi
18196                   done
18197                 fi
18198
18199                 if test "$cf_have_incdir" = no ; then
18200                   if test "$cf_add_incdir" = /usr/local/include ; then
18201                         if test "$GCC" = yes
18202                         then
18203                           cf_save_CPPFLAGS=$CPPFLAGS
18204                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18205                           cat >conftest.$ac_ext <<_ACEOF
18206 #line 18206 "configure"
18207 #include "confdefs.h"
18208 #include <stdio.h>
18209 int
18210 main ()
18211 {
18212 printf("Hello")
18213   ;
18214   return 0;
18215 }
18216 _ACEOF
18217 rm -f conftest.$ac_objext
18218 if { (eval echo "$as_me:18218: \"$ac_compile\"") >&5
18219   (eval $ac_compile) 2>&5
18220   ac_status=$?
18221   echo "$as_me:18221: \$? = $ac_status" >&5
18222   (exit $ac_status); } &&
18223          { ac_try='test -s conftest.$ac_objext'
18224   { (eval echo "$as_me:18224: \"$ac_try\"") >&5
18225   (eval $ac_try) 2>&5
18226   ac_status=$?
18227   echo "$as_me:18227: \$? = $ac_status" >&5
18228   (exit $ac_status); }; }; then
18229   :
18230 else
18231   echo "$as_me: failed program was:" >&5
18232 cat conftest.$ac_ext >&5
18233 cf_have_incdir=yes
18234 fi
18235 rm -f conftest.$ac_objext conftest.$ac_ext
18236                           CPPFLAGS=$cf_save_CPPFLAGS
18237                         fi
18238                   fi
18239                 fi
18240
18241                 if test "$cf_have_incdir" = no ; then
18242                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
18243
18244 echo "${as_me:-configure}:18244: testing adding $cf_add_incdir to include-path ..." 1>&5
18245
18246                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18247
18248                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
18249                   test "$cf_top_incdir" = "$cf_add_incdir" && break
18250                   cf_add_incdir="$cf_top_incdir"
18251                 else
18252                   break
18253                 fi
18254           fi
18255         done
18256   done
18257 fi
18258
18259                         ;;
18260                 esac
18261         done
18262
18263 cf_search=
18264
18265 test "x/usr" != "x$prefix" && \
18266 test -d "/usr" && \
18267 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
18268         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
18269         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
18270         test -d /usr/lib/$with_hashed_db &&       cf_search="$cf_search /usr/lib/$with_hashed_db"
18271         test -d /usr/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/lib/$with_hashed_db/lib"
18272         test -d /usr/$with_hashed_db/lib &&       cf_search="$cf_search /usr/$with_hashed_db/lib"
18273         test -d /usr/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/$with_hashed_db/lib/$with_hashed_db"
18274 }
18275
18276 test "x$prefix" != "xNONE" && \
18277 test -d "$prefix" && \
18278  {
18279         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
18280         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
18281         test -d $prefix/lib/$with_hashed_db &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
18282         test -d $prefix/lib/$with_hashed_db/lib &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
18283         test -d $prefix/$with_hashed_db/lib &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
18284         test -d $prefix/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
18285 }
18286
18287 test "x/usr/local" != "x$prefix" && \
18288 test -d "/usr/local" && \
18289 (test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
18290         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
18291         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
18292         test -d /usr/local/lib/$with_hashed_db &&       cf_search="$cf_search /usr/local/lib/$with_hashed_db"
18293         test -d /usr/local/lib/$with_hashed_db/lib &&    cf_search="$cf_search /usr/local/lib/$with_hashed_db/lib"
18294         test -d /usr/local/$with_hashed_db/lib &&       cf_search="$cf_search /usr/local/$with_hashed_db/lib"
18295         test -d /usr/local/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /usr/local/$with_hashed_db/lib/$with_hashed_db"
18296 }
18297
18298 test "x/opt" != "x$prefix" && \
18299 test -d "/opt" && \
18300 (test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
18301         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
18302         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
18303         test -d /opt/lib/$with_hashed_db &&       cf_search="$cf_search /opt/lib/$with_hashed_db"
18304         test -d /opt/lib/$with_hashed_db/lib &&    cf_search="$cf_search /opt/lib/$with_hashed_db/lib"
18305         test -d /opt/$with_hashed_db/lib &&       cf_search="$cf_search /opt/$with_hashed_db/lib"
18306         test -d /opt/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search /opt/$with_hashed_db/lib/$with_hashed_db"
18307 }
18308
18309 test "x$HOME" != "x$prefix" && \
18310 test -d "$HOME" && \
18311 (test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
18312         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
18313         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
18314         test -d $HOME/lib/$with_hashed_db &&       cf_search="$cf_search $HOME/lib/$with_hashed_db"
18315         test -d $HOME/lib/$with_hashed_db/lib &&    cf_search="$cf_search $HOME/lib/$with_hashed_db/lib"
18316         test -d $HOME/$with_hashed_db/lib &&       cf_search="$cf_search $HOME/$with_hashed_db/lib"
18317         test -d $HOME/$with_hashed_db/lib/$with_hashed_db &&    cf_search="$cf_search $HOME/$with_hashed_db/lib/$with_hashed_db"
18318 }
18319
18320         for cf_item in $cf_search
18321         do
18322                 case $cf_item in #(vi
18323                 */$with_hashed_db)
18324
18325 if test -n "$cf_item" ; then
18326   for cf_add_libdir in $cf_item
18327   do
18328     if test $cf_add_libdir = /usr/lib ; then
18329       :
18330     elif test -d $cf_add_libdir
18331     then
18332       cf_have_libdir=no
18333       if test -n "$LDFLAGS$LIBS" ; then
18334         # a loop is needed to ensure we can add subdirs of existing dirs
18335         for cf_test_libdir in $LDFLAGS $LIBS ; do
18336           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18337             cf_have_libdir=yes; break
18338           fi
18339         done
18340       fi
18341       if test "$cf_have_libdir" = no ; then
18342         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
18343
18344 echo "${as_me:-configure}:18344: testing adding $cf_add_libdir to library-path ..." 1>&5
18345
18346         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18347       fi
18348     fi
18349   done
18350 fi
18351
18352                         ;;
18353                 esac
18354         done
18355
18356                         ;;
18357                 esac
18358     fi
18359 esac
18360
18361 echo "$as_me:18361: checking for db.h" >&5
18362 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
18363 if test "${ac_cv_header_db_h+set}" = set; then
18364   echo $ECHO_N "(cached) $ECHO_C" >&6
18365 else
18366   cat >conftest.$ac_ext <<_ACEOF
18367 #line 18367 "configure"
18368 #include "confdefs.h"
18369 #include <db.h>
18370 _ACEOF
18371 if { (eval echo "$as_me:18371: \"$ac_cpp conftest.$ac_ext\"") >&5
18372   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18373   ac_status=$?
18374   egrep -v '^ *\+' conftest.er1 >conftest.err
18375   rm -f conftest.er1
18376   cat conftest.err >&5
18377   echo "$as_me:18377: \$? = $ac_status" >&5
18378   (exit $ac_status); } >/dev/null; then
18379   if test -s conftest.err; then
18380     ac_cpp_err=$ac_c_preproc_warn_flag
18381   else
18382     ac_cpp_err=
18383   fi
18384 else
18385   ac_cpp_err=yes
18386 fi
18387 if test -z "$ac_cpp_err"; then
18388   ac_cv_header_db_h=yes
18389 else
18390   echo "$as_me: failed program was:" >&5
18391   cat conftest.$ac_ext >&5
18392   ac_cv_header_db_h=no
18393 fi
18394 rm -f conftest.err conftest.$ac_ext
18395 fi
18396 echo "$as_me:18396: result: $ac_cv_header_db_h" >&5
18397 echo "${ECHO_T}$ac_cv_header_db_h" >&6
18398 if test $ac_cv_header_db_h = yes; then
18399
18400 echo "$as_me:18400: checking for version of db" >&5
18401 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
18402 if test "${cf_cv_hashed_db_version+set}" = set; then
18403   echo $ECHO_N "(cached) $ECHO_C" >&6
18404 else
18405
18406 cf_cv_hashed_db_version=unknown
18407
18408 for cf_db_version in 1 2 3 4 5 6
18409 do
18410
18411 echo "${as_me:-configure}:18411: testing checking for db version $cf_db_version ..." 1>&5
18412
18413         cat >conftest.$ac_ext <<_ACEOF
18414 #line 18414 "configure"
18415 #include "confdefs.h"
18416
18417 $ac_includes_default
18418 #include <db.h>
18419
18420 #ifdef DB_VERSION_MAJOR
18421         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
18422 #if $cf_db_version == DB_VERSION_MAJOR
18423         /* ok */
18424 #else
18425         make an error
18426 #endif
18427 #else
18428 #if $cf_db_version == 1
18429         /* ok: assuming this is DB 1.8.5 */
18430 #else
18431         make an error
18432 #endif
18433 #endif
18434
18435 int
18436 main ()
18437 {
18438 DBT *foo = 0
18439   ;
18440   return 0;
18441 }
18442 _ACEOF
18443 rm -f conftest.$ac_objext
18444 if { (eval echo "$as_me:18444: \"$ac_compile\"") >&5
18445   (eval $ac_compile) 2>&5
18446   ac_status=$?
18447   echo "$as_me:18447: \$? = $ac_status" >&5
18448   (exit $ac_status); } &&
18449          { ac_try='test -s conftest.$ac_objext'
18450   { (eval echo "$as_me:18450: \"$ac_try\"") >&5
18451   (eval $ac_try) 2>&5
18452   ac_status=$?
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit $ac_status); }; }; then
18455
18456         cf_cv_hashed_db_version=$cf_db_version
18457         break
18458
18459 else
18460   echo "$as_me: failed program was:" >&5
18461 cat conftest.$ac_ext >&5
18462 fi
18463 rm -f conftest.$ac_objext conftest.$ac_ext
18464 done
18465
18466 fi
18467 echo "$as_me:18467: result: $cf_cv_hashed_db_version" >&5
18468 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
18469
18470 if test "$cf_cv_hashed_db_version" = unknown ; then
18471         { { echo "$as_me:18471: error: Cannot determine version of db" >&5
18472 echo "$as_me: error: Cannot determine version of db" >&2;}
18473    { (exit 1); exit 1; }; }
18474 else
18475
18476 echo "$as_me:18476: checking for db libraries" >&5
18477 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
18478 if test "${cf_cv_hashed_db_libs+set}" = set; then
18479   echo $ECHO_N "(cached) $ECHO_C" >&6
18480 else
18481
18482 cf_cv_hashed_db_libs=unknown
18483 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
18484 do
18485         cf_save_libs="$LIBS"
18486         if test -n "$cf_db_libs"; then
18487
18488 cf_add_libs="-l$cf_db_libs"
18489 # Filter out duplicates - this happens with badly-designed ".pc" files...
18490 for cf_add_1lib in $LIBS
18491 do
18492         for cf_add_2lib in $cf_add_libs
18493         do
18494                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18495                 then
18496                         cf_add_1lib=
18497                         break
18498                 fi
18499         done
18500         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18501 done
18502 LIBS="$cf_add_libs"
18503
18504         fi
18505
18506 echo "${as_me:-configure}:18506: testing checking for library "$cf_db_libs" ..." 1>&5
18507
18508         cat >conftest.$ac_ext <<_ACEOF
18509 #line 18509 "configure"
18510 #include "confdefs.h"
18511
18512 $ac_includes_default
18513 #include <db.h>
18514
18515 int
18516 main ()
18517 {
18518
18519         char *path = "/tmp/foo";
18520 #ifdef DB_VERSION_MAJOR
18521 #if DB_VERSION_MAJOR >= 4
18522         DB *result = 0;
18523         db_create(&result, NULL, 0);
18524         result->open(result,
18525                 NULL,
18526                 path,
18527                 path,
18528                 DB_HASH,
18529                 DB_CREATE,
18530                 0644);
18531 #elif DB_VERSION_MAJOR >= 3
18532         DB *result = 0;
18533         db_create(&result, NULL, 0);
18534         result->open(result,
18535                 path,
18536                 path,
18537                 DB_HASH,
18538                 DB_CREATE,
18539                 0644);
18540 #elif DB_VERSION_MAJOR >= 2
18541         DB *result = 0;
18542         db_open(path,
18543                 DB_HASH,
18544                 DB_CREATE,
18545                 0644,
18546                 (DB_ENV *) 0,
18547                 (DB_INFO *) 0,
18548                 &result);
18549 #endif /* DB_VERSION_MAJOR */
18550 #else
18551         DB *result = dbopen(path,
18552                      2,
18553                      0644,
18554                      DB_HASH,
18555                      0);
18556 #endif
18557         ${cf_cv_main_return:-return}(result != 0)
18558
18559   ;
18560   return 0;
18561 }
18562 _ACEOF
18563 rm -f conftest.$ac_objext conftest$ac_exeext
18564 if { (eval echo "$as_me:18564: \"$ac_link\"") >&5
18565   (eval $ac_link) 2>&5
18566   ac_status=$?
18567   echo "$as_me:18567: \$? = $ac_status" >&5
18568   (exit $ac_status); } &&
18569          { ac_try='test -s conftest$ac_exeext'
18570   { (eval echo "$as_me:18570: \"$ac_try\"") >&5
18571   (eval $ac_try) 2>&5
18572   ac_status=$?
18573   echo "$as_me:18573: \$? = $ac_status" >&5
18574   (exit $ac_status); }; }; then
18575
18576         if test -n "$cf_db_libs" ; then
18577                 cf_cv_hashed_db_libs=$cf_db_libs
18578         else
18579                 cf_cv_hashed_db_libs=default
18580         fi
18581         LIBS="$cf_save_libs"
18582         break
18583
18584 else
18585   echo "$as_me: failed program was:" >&5
18586 cat conftest.$ac_ext >&5
18587 fi
18588 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18589         LIBS="$cf_save_libs"
18590 done
18591
18592 fi
18593 echo "$as_me:18593: result: $cf_cv_hashed_db_libs" >&5
18594 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
18595
18596         if test "$cf_cv_hashed_db_libs" = unknown ; then
18597                 { { echo "$as_me:18597: error: Cannot determine library for db" >&5
18598 echo "$as_me: error: Cannot determine library for db" >&2;}
18599    { (exit 1); exit 1; }; }
18600         elif test "$cf_cv_hashed_db_libs" != default ; then
18601
18602 cf_add_libs="-l$cf_cv_hashed_db_libs"
18603 # Filter out duplicates - this happens with badly-designed ".pc" files...
18604 for cf_add_1lib in $LIBS
18605 do
18606         for cf_add_2lib in $cf_add_libs
18607         do
18608                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18609                 then
18610                         cf_add_1lib=
18611                         break
18612                 fi
18613         done
18614         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18615 done
18616 LIBS="$cf_add_libs"
18617
18618         fi
18619 fi
18620
18621 else
18622
18623         { { echo "$as_me:18623: error: Cannot find db.h" >&5
18624 echo "$as_me: error: Cannot find db.h" >&2;}
18625    { (exit 1); exit 1; }; }
18626
18627 fi
18628
18629 fi
18630
18631 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
18632         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18633         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
18634 fi
18635
18636 # Just in case, check if the C compiler has a bool type.
18637
18638 echo "$as_me:18638: checking if we should include stdbool.h" >&5
18639 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
18640
18641 if test "${cf_cv_header_stdbool_h+set}" = set; then
18642   echo $ECHO_N "(cached) $ECHO_C" >&6
18643 else
18644
18645         cat >conftest.$ac_ext <<_ACEOF
18646 #line 18646 "configure"
18647 #include "confdefs.h"
18648
18649 int
18650 main ()
18651 {
18652 bool foo = false
18653   ;
18654   return 0;
18655 }
18656 _ACEOF
18657 rm -f conftest.$ac_objext
18658 if { (eval echo "$as_me:18658: \"$ac_compile\"") >&5
18659   (eval $ac_compile) 2>&5
18660   ac_status=$?
18661   echo "$as_me:18661: \$? = $ac_status" >&5
18662   (exit $ac_status); } &&
18663          { ac_try='test -s conftest.$ac_objext'
18664   { (eval echo "$as_me:18664: \"$ac_try\"") >&5
18665   (eval $ac_try) 2>&5
18666   ac_status=$?
18667   echo "$as_me:18667: \$? = $ac_status" >&5
18668   (exit $ac_status); }; }; then
18669   cf_cv_header_stdbool_h=0
18670 else
18671   echo "$as_me: failed program was:" >&5
18672 cat conftest.$ac_ext >&5
18673 cat >conftest.$ac_ext <<_ACEOF
18674 #line 18674 "configure"
18675 #include "confdefs.h"
18676
18677 #ifndef __BEOS__
18678 #include <stdbool.h>
18679 #endif
18680
18681 int
18682 main ()
18683 {
18684 bool foo = false
18685   ;
18686   return 0;
18687 }
18688 _ACEOF
18689 rm -f conftest.$ac_objext
18690 if { (eval echo "$as_me:18690: \"$ac_compile\"") >&5
18691   (eval $ac_compile) 2>&5
18692   ac_status=$?
18693   echo "$as_me:18693: \$? = $ac_status" >&5
18694   (exit $ac_status); } &&
18695          { ac_try='test -s conftest.$ac_objext'
18696   { (eval echo "$as_me:18696: \"$ac_try\"") >&5
18697   (eval $ac_try) 2>&5
18698   ac_status=$?
18699   echo "$as_me:18699: \$? = $ac_status" >&5
18700   (exit $ac_status); }; }; then
18701   cf_cv_header_stdbool_h=1
18702 else
18703   echo "$as_me: failed program was:" >&5
18704 cat conftest.$ac_ext >&5
18705 cf_cv_header_stdbool_h=0
18706 fi
18707 rm -f conftest.$ac_objext conftest.$ac_ext
18708 fi
18709 rm -f conftest.$ac_objext conftest.$ac_ext
18710 fi
18711
18712 if test "$cf_cv_header_stdbool_h" = 1
18713 then    echo "$as_me:18713: result: yes" >&5
18714 echo "${ECHO_T}yes" >&6
18715 else    echo "$as_me:18715: result: no" >&5
18716 echo "${ECHO_T}no" >&6
18717 fi
18718
18719 echo "$as_me:18719: checking for builtin bool type" >&5
18720 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
18721
18722 if test "${cf_cv_cc_bool_type+set}" = set; then
18723   echo $ECHO_N "(cached) $ECHO_C" >&6
18724 else
18725
18726         cat >conftest.$ac_ext <<_ACEOF
18727 #line 18727 "configure"
18728 #include "confdefs.h"
18729
18730 #include <stdio.h>
18731 #include <sys/types.h>
18732
18733 int
18734 main ()
18735 {
18736 bool x = false
18737   ;
18738   return 0;
18739 }
18740 _ACEOF
18741 rm -f conftest.$ac_objext
18742 if { (eval echo "$as_me:18742: \"$ac_compile\"") >&5
18743   (eval $ac_compile) 2>&5
18744   ac_status=$?
18745   echo "$as_me:18745: \$? = $ac_status" >&5
18746   (exit $ac_status); } &&
18747          { ac_try='test -s conftest.$ac_objext'
18748   { (eval echo "$as_me:18748: \"$ac_try\"") >&5
18749   (eval $ac_try) 2>&5
18750   ac_status=$?
18751   echo "$as_me:18751: \$? = $ac_status" >&5
18752   (exit $ac_status); }; }; then
18753   cf_cv_cc_bool_type=1
18754 else
18755   echo "$as_me: failed program was:" >&5
18756 cat conftest.$ac_ext >&5
18757 cf_cv_cc_bool_type=0
18758 fi
18759 rm -f conftest.$ac_objext conftest.$ac_ext
18760
18761 fi
18762
18763 if test "$cf_cv_cc_bool_type" = 1
18764 then    echo "$as_me:18764: result: yes" >&5
18765 echo "${ECHO_T}yes" >&6
18766 else    echo "$as_me:18766: result: no" >&5
18767 echo "${ECHO_T}no" >&6
18768 fi
18769
18770 # Check for C++ compiler characteristics (and ensure that it's there!)
18771 if test -n "$CXX" ; then
18772         ac_ext=cc
18773 ac_cpp='$CXXCPP $CPPFLAGS'
18774 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18775 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18776 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18777 ac_main_return=return
18778
18779 if test -n "$GXX" ; then
18780 case $cf_cv_system_name in #(vi
18781 os2*) #(vi
18782         cf_stdcpp_libname=stdcpp
18783         ;;
18784 *)
18785         cf_stdcpp_libname=stdc++
18786         ;;
18787 esac
18788 echo "$as_me:18788: checking for library $cf_stdcpp_libname" >&5
18789 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
18790 if test "${cf_cv_libstdcpp+set}" = set; then
18791   echo $ECHO_N "(cached) $ECHO_C" >&6
18792 else
18793
18794         cf_save="$LIBS"
18795
18796 cf_add_libs="-l$cf_stdcpp_libname"
18797 # Filter out duplicates - this happens with badly-designed ".pc" files...
18798 for cf_add_1lib in $LIBS
18799 do
18800         for cf_add_2lib in $cf_add_libs
18801         do
18802                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18803                 then
18804                         cf_add_1lib=
18805                         break
18806                 fi
18807         done
18808         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18809 done
18810 LIBS="$cf_add_libs"
18811
18812 cat >conftest.$ac_ext <<_ACEOF
18813 #line 18813 "configure"
18814 #include "confdefs.h"
18815
18816 #include <strstream.h>
18817 int
18818 main ()
18819 {
18820
18821 char buf[80];
18822 strstreambuf foo(buf, sizeof(buf))
18823
18824   ;
18825   return 0;
18826 }
18827 _ACEOF
18828 rm -f conftest.$ac_objext conftest$ac_exeext
18829 if { (eval echo "$as_me:18829: \"$ac_link\"") >&5
18830   (eval $ac_link) 2>&5
18831   ac_status=$?
18832   echo "$as_me:18832: \$? = $ac_status" >&5
18833   (exit $ac_status); } &&
18834          { ac_try='test -s conftest$ac_exeext'
18835   { (eval echo "$as_me:18835: \"$ac_try\"") >&5
18836   (eval $ac_try) 2>&5
18837   ac_status=$?
18838   echo "$as_me:18838: \$? = $ac_status" >&5
18839   (exit $ac_status); }; }; then
18840   cf_cv_libstdcpp=yes
18841 else
18842   echo "$as_me: failed program was:" >&5
18843 cat conftest.$ac_ext >&5
18844 cf_cv_libstdcpp=no
18845 fi
18846 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18847         LIBS="$cf_save"
18848
18849 fi
18850 echo "$as_me:18850: result: $cf_cv_libstdcpp" >&5
18851 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
18852 test "$cf_cv_libstdcpp" = yes &&
18853 cf_add_libs="-l$cf_stdcpp_libname"
18854 # Filter out duplicates - this happens with badly-designed ".pc" files...
18855 for cf_add_1lib in $CXXLIBS
18856 do
18857         for cf_add_2lib in $cf_add_libs
18858         do
18859                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18860                 then
18861                         cf_add_1lib=
18862                         break
18863                 fi
18864         done
18865         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18866 done
18867 CXXLIBS="$cf_add_libs"
18868
18869 fi
18870
18871         echo "$as_me:18871: checking whether $CXX understands -c and -o together" >&5
18872 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
18873 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
18874   echo $ECHO_N "(cached) $ECHO_C" >&6
18875 else
18876
18877 cat > conftest.$ac_ext <<CF_EOF
18878 #include <stdio.h>
18879 int main()
18880 {
18881         ${cf_cv_main_return:-return}(0);
18882 }
18883 CF_EOF
18884 # We do the test twice because some compilers refuse to overwrite an
18885 # existing .o file with -o, though they will create one.
18886 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
18887 if { (eval echo "$as_me:18887: \"$ac_try\"") >&5
18888   (eval $ac_try) 2>&5
18889   ac_status=$?
18890   echo "$as_me:18890: \$? = $ac_status" >&5
18891   (exit $ac_status); } &&
18892   test -f conftest2.$ac_objext && { (eval echo "$as_me:18892: \"$ac_try\"") >&5
18893   (eval $ac_try) 2>&5
18894   ac_status=$?
18895   echo "$as_me:18895: \$? = $ac_status" >&5
18896   (exit $ac_status); };
18897 then
18898   eval cf_cv_prog_CXX_c_o=yes
18899 else
18900   eval cf_cv_prog_CXX_c_o=no
18901 fi
18902 rm -rf conftest*
18903
18904 fi
18905 if test $cf_cv_prog_CXX_c_o = yes; then
18906   echo "$as_me:18906: result: yes" >&5
18907 echo "${ECHO_T}yes" >&6
18908 else
18909   echo "$as_me:18909: result: no" >&5
18910 echo "${ECHO_T}no" >&6
18911 fi
18912
18913         case $GXX_VERSION in
18914         1*|2.0-6*)
18915                 cf_cxx_library=yes
18916                 ;;
18917         *-2.7*|2.7*)
18918
18919 cf_cxx_library=unknown
18920 case $cf_cv_system_name in #(vi
18921 os2*) #(vi
18922         cf_gpp_libname=gpp
18923         ;;
18924 *)
18925         cf_gpp_libname=g++
18926         ;;
18927 esac
18928 if test "$GXX" = yes; then
18929         echo "$as_me:18929: checking for lib$cf_gpp_libname" >&5
18930 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
18931         cf_save="$LIBS"
18932
18933 cf_add_libs="-l$cf_gpp_libname"
18934 # Filter out duplicates - this happens with badly-designed ".pc" files...
18935 for cf_add_1lib in $LIBS
18936 do
18937         for cf_add_2lib in $cf_add_libs
18938         do
18939                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18940                 then
18941                         cf_add_1lib=
18942                         break
18943                 fi
18944         done
18945         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18946 done
18947 LIBS="$cf_add_libs"
18948
18949         cat >conftest.$ac_ext <<_ACEOF
18950 #line 18950 "configure"
18951 #include "confdefs.h"
18952
18953 #include <$cf_gpp_libname/builtin.h>
18954
18955 int
18956 main ()
18957 {
18958 two_arg_error_handler_t foo2 = lib_error_handler
18959   ;
18960   return 0;
18961 }
18962 _ACEOF
18963 rm -f conftest.$ac_objext conftest$ac_exeext
18964 if { (eval echo "$as_me:18964: \"$ac_link\"") >&5
18965   (eval $ac_link) 2>&5
18966   ac_status=$?
18967   echo "$as_me:18967: \$? = $ac_status" >&5
18968   (exit $ac_status); } &&
18969          { ac_try='test -s conftest$ac_exeext'
18970   { (eval echo "$as_me:18970: \"$ac_try\"") >&5
18971   (eval $ac_try) 2>&5
18972   ac_status=$?
18973   echo "$as_me:18973: \$? = $ac_status" >&5
18974   (exit $ac_status); }; }; then
18975   cf_cxx_library=yes
18976
18977 cf_add_libs="-l$cf_gpp_libname"
18978 # Filter out duplicates - this happens with badly-designed ".pc" files...
18979 for cf_add_1lib in $CXXLIBS
18980 do
18981         for cf_add_2lib in $cf_add_libs
18982         do
18983                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
18984                 then
18985                         cf_add_1lib=
18986                         break
18987                 fi
18988         done
18989         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18990 done
18991 CXXLIBS="$cf_add_libs"
18992
18993          if test "$cf_gpp_libname" = cpp ; then
18994
18995 cat >>confdefs.h <<\EOF
18996 #define HAVE_GPP_BUILTIN_H 1
18997 EOF
18998
18999          else
19000
19001 cat >>confdefs.h <<\EOF
19002 #define HAVE_GXX_BUILTIN_H 1
19003 EOF
19004
19005          fi
19006 else
19007   echo "$as_me: failed program was:" >&5
19008 cat conftest.$ac_ext >&5
19009 cat >conftest.$ac_ext <<_ACEOF
19010 #line 19010 "configure"
19011 #include "confdefs.h"
19012
19013 #include <builtin.h>
19014
19015 int
19016 main ()
19017 {
19018 two_arg_error_handler_t foo2 = lib_error_handler
19019   ;
19020   return 0;
19021 }
19022 _ACEOF
19023 rm -f conftest.$ac_objext conftest$ac_exeext
19024 if { (eval echo "$as_me:19024: \"$ac_link\"") >&5
19025   (eval $ac_link) 2>&5
19026   ac_status=$?
19027   echo "$as_me:19027: \$? = $ac_status" >&5
19028   (exit $ac_status); } &&
19029          { ac_try='test -s conftest$ac_exeext'
19030   { (eval echo "$as_me:19030: \"$ac_try\"") >&5
19031   (eval $ac_try) 2>&5
19032   ac_status=$?
19033   echo "$as_me:19033: \$? = $ac_status" >&5
19034   (exit $ac_status); }; }; then
19035   cf_cxx_library=yes
19036
19037 cf_add_libs="-l$cf_gpp_libname"
19038 # Filter out duplicates - this happens with badly-designed ".pc" files...
19039 for cf_add_1lib in $CXXLIBS
19040 do
19041         for cf_add_2lib in $cf_add_libs
19042         do
19043                 if test "x$cf_add_1lib" = "x$cf_add_2lib"
19044                 then
19045                         cf_add_1lib=
19046                         break
19047                 fi
19048         done
19049         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19050 done
19051 CXXLIBS="$cf_add_libs"
19052
19053 cat >>confdefs.h <<\EOF
19054 #define HAVE_BUILTIN_H 1
19055 EOF
19056
19057 else
19058   echo "$as_me: failed program was:" >&5
19059 cat conftest.$ac_ext >&5
19060 cf_cxx_library=no
19061 fi
19062 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19063 fi
19064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19065         LIBS="$cf_save"
19066         echo "$as_me:19066: result: $cf_cxx_library" >&5
19067 echo "${ECHO_T}$cf_cxx_library" >&6
19068 fi
19069
19070                 ;;
19071         *)
19072                 cf_cxx_library=no
19073                 ;;
19074         esac
19075
19076         ac_ext=cc
19077 ac_cpp='$CXXCPP $CPPFLAGS'
19078 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19079 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19080 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19081 ac_main_return=return
19082 echo "$as_me:19082: checking how to run the C++ preprocessor" >&5
19083 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
19084 if test -z "$CXXCPP"; then
19085   if test "${ac_cv_prog_CXXCPP+set}" = set; then
19086   echo $ECHO_N "(cached) $ECHO_C" >&6
19087 else
19088       # Double quotes because CXXCPP needs to be expanded
19089     for CXXCPP in "$CXX -E" "/lib/cpp"
19090     do
19091       ac_preproc_ok=false
19092 for ac_cxx_preproc_warn_flag in '' yes
19093 do
19094   # Use a header file that comes with gcc, so configuring glibc
19095   # with a fresh cross-compiler works.
19096   # On the NeXT, cc -E runs the code through the compiler's parser,
19097   # not just through cpp. "Syntax error" is here to catch this case.
19098   cat >conftest.$ac_ext <<_ACEOF
19099 #line 19099 "configure"
19100 #include "confdefs.h"
19101 #include <assert.h>
19102                      Syntax error
19103 _ACEOF
19104 if { (eval echo "$as_me:19104: \"$ac_cpp conftest.$ac_ext\"") >&5
19105   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19106   ac_status=$?
19107   egrep -v '^ *\+' conftest.er1 >conftest.err
19108   rm -f conftest.er1
19109   cat conftest.err >&5
19110   echo "$as_me:19110: \$? = $ac_status" >&5
19111   (exit $ac_status); } >/dev/null; then
19112   if test -s conftest.err; then
19113     ac_cpp_err=$ac_cxx_preproc_warn_flag
19114   else
19115     ac_cpp_err=
19116   fi
19117 else
19118   ac_cpp_err=yes
19119 fi
19120 if test -z "$ac_cpp_err"; then
19121   :
19122 else
19123   echo "$as_me: failed program was:" >&5
19124   cat conftest.$ac_ext >&5
19125   # Broken: fails on valid input.
19126 continue
19127 fi
19128 rm -f conftest.err conftest.$ac_ext
19129
19130   # OK, works on sane cases.  Now check whether non-existent headers
19131   # can be detected and how.
19132   cat >conftest.$ac_ext <<_ACEOF
19133 #line 19133 "configure"
19134 #include "confdefs.h"
19135 #include <ac_nonexistent.h>
19136 _ACEOF
19137 if { (eval echo "$as_me:19137: \"$ac_cpp conftest.$ac_ext\"") >&5
19138   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19139   ac_status=$?
19140   egrep -v '^ *\+' conftest.er1 >conftest.err
19141   rm -f conftest.er1
19142   cat conftest.err >&5
19143   echo "$as_me:19143: \$? = $ac_status" >&5
19144   (exit $ac_status); } >/dev/null; then
19145   if test -s conftest.err; then
19146     ac_cpp_err=$ac_cxx_preproc_warn_flag
19147   else
19148     ac_cpp_err=
19149   fi
19150 else
19151   ac_cpp_err=yes
19152 fi
19153 if test -z "$ac_cpp_err"; then
19154   # Broken: success on invalid input.
19155 continue
19156 else
19157   echo "$as_me: failed program was:" >&5
19158   cat conftest.$ac_ext >&5
19159   # Passes both tests.
19160 ac_preproc_ok=:
19161 break
19162 fi
19163 rm -f conftest.err conftest.$ac_ext
19164
19165 done
19166 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19167 rm -f conftest.err conftest.$ac_ext
19168 if $ac_preproc_ok; then
19169   break
19170 fi
19171
19172     done
19173     ac_cv_prog_CXXCPP=$CXXCPP
19174
19175 fi
19176   CXXCPP=$ac_cv_prog_CXXCPP
19177 else
19178   ac_cv_prog_CXXCPP=$CXXCPP
19179 fi
19180 echo "$as_me:19180: result: $CXXCPP" >&5
19181 echo "${ECHO_T}$CXXCPP" >&6
19182 ac_preproc_ok=false
19183 for ac_cxx_preproc_warn_flag in '' yes
19184 do
19185   # Use a header file that comes with gcc, so configuring glibc
19186   # with a fresh cross-compiler works.
19187   # On the NeXT, cc -E runs the code through the compiler's parser,
19188   # not just through cpp. "Syntax error" is here to catch this case.
19189   cat >conftest.$ac_ext <<_ACEOF
19190 #line 19190 "configure"
19191 #include "confdefs.h"
19192 #include <assert.h>
19193                      Syntax error
19194 _ACEOF
19195 if { (eval echo "$as_me:19195: \"$ac_cpp conftest.$ac_ext\"") >&5
19196   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19197   ac_status=$?
19198   egrep -v '^ *\+' conftest.er1 >conftest.err
19199   rm -f conftest.er1
19200   cat conftest.err >&5
19201   echo "$as_me:19201: \$? = $ac_status" >&5
19202   (exit $ac_status); } >/dev/null; then
19203   if test -s conftest.err; then
19204     ac_cpp_err=$ac_cxx_preproc_warn_flag
19205   else
19206     ac_cpp_err=
19207   fi
19208 else
19209   ac_cpp_err=yes
19210 fi
19211 if test -z "$ac_cpp_err"; then
19212   :
19213 else
19214   echo "$as_me: failed program was:" >&5
19215   cat conftest.$ac_ext >&5
19216   # Broken: fails on valid input.
19217 continue
19218 fi
19219 rm -f conftest.err conftest.$ac_ext
19220
19221   # OK, works on sane cases.  Now check whether non-existent headers
19222   # can be detected and how.
19223   cat >conftest.$ac_ext <<_ACEOF
19224 #line 19224 "configure"
19225 #include "confdefs.h"
19226 #include <ac_nonexistent.h>
19227 _ACEOF
19228 if { (eval echo "$as_me:19228: \"$ac_cpp conftest.$ac_ext\"") >&5
19229   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19230   ac_status=$?
19231   egrep -v '^ *\+' conftest.er1 >conftest.err
19232   rm -f conftest.er1
19233   cat conftest.err >&5
19234   echo "$as_me:19234: \$? = $ac_status" >&5
19235   (exit $ac_status); } >/dev/null; then
19236   if test -s conftest.err; then
19237     ac_cpp_err=$ac_cxx_preproc_warn_flag
19238   else
19239     ac_cpp_err=
19240   fi
19241 else
19242   ac_cpp_err=yes
19243 fi
19244 if test -z "$ac_cpp_err"; then
19245   # Broken: success on invalid input.
19246 continue
19247 else
19248   echo "$as_me: failed program was:" >&5
19249   cat conftest.$ac_ext >&5
19250   # Passes both tests.
19251 ac_preproc_ok=:
19252 break
19253 fi
19254 rm -f conftest.err conftest.$ac_ext
19255
19256 done
19257 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
19258 rm -f conftest.err conftest.$ac_ext
19259 if $ac_preproc_ok; then
19260   :
19261 else
19262   { { echo "$as_me:19262: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
19263 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
19264    { (exit 1); exit 1; }; }
19265 fi
19266
19267 ac_ext=cc
19268 ac_cpp='$CXXCPP $CPPFLAGS'
19269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19272 ac_main_return=return
19273
19274 for ac_header in typeinfo
19275 do
19276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19277 echo "$as_me:19277: checking for $ac_header" >&5
19278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19280   echo $ECHO_N "(cached) $ECHO_C" >&6
19281 else
19282   cat >conftest.$ac_ext <<_ACEOF
19283 #line 19283 "configure"
19284 #include "confdefs.h"
19285 #include <$ac_header>
19286 _ACEOF
19287 if { (eval echo "$as_me:19287: \"$ac_cpp conftest.$ac_ext\"") >&5
19288   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19289   ac_status=$?
19290   egrep -v '^ *\+' conftest.er1 >conftest.err
19291   rm -f conftest.er1
19292   cat conftest.err >&5
19293   echo "$as_me:19293: \$? = $ac_status" >&5
19294   (exit $ac_status); } >/dev/null; then
19295   if test -s conftest.err; then
19296     ac_cpp_err=$ac_cxx_preproc_warn_flag
19297   else
19298     ac_cpp_err=
19299   fi
19300 else
19301   ac_cpp_err=yes
19302 fi
19303 if test -z "$ac_cpp_err"; then
19304   eval "$as_ac_Header=yes"
19305 else
19306   echo "$as_me: failed program was:" >&5
19307   cat conftest.$ac_ext >&5
19308   eval "$as_ac_Header=no"
19309 fi
19310 rm -f conftest.err conftest.$ac_ext
19311 fi
19312 echo "$as_me:19312: result: `eval echo '${'$as_ac_Header'}'`" >&5
19313 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19314 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19315   cat >>confdefs.h <<EOF
19316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19317 EOF
19318
19319 fi
19320 done
19321
19322 for ac_header in iostream
19323 do
19324 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19325 echo "$as_me:19325: checking for $ac_header" >&5
19326 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19327 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19328   echo $ECHO_N "(cached) $ECHO_C" >&6
19329 else
19330   cat >conftest.$ac_ext <<_ACEOF
19331 #line 19331 "configure"
19332 #include "confdefs.h"
19333 #include <$ac_header>
19334 _ACEOF
19335 if { (eval echo "$as_me:19335: \"$ac_cpp conftest.$ac_ext\"") >&5
19336   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19337   ac_status=$?
19338   egrep -v '^ *\+' conftest.er1 >conftest.err
19339   rm -f conftest.er1
19340   cat conftest.err >&5
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit $ac_status); } >/dev/null; then
19343   if test -s conftest.err; then
19344     ac_cpp_err=$ac_cxx_preproc_warn_flag
19345   else
19346     ac_cpp_err=
19347   fi
19348 else
19349   ac_cpp_err=yes
19350 fi
19351 if test -z "$ac_cpp_err"; then
19352   eval "$as_ac_Header=yes"
19353 else
19354   echo "$as_me: failed program was:" >&5
19355   cat conftest.$ac_ext >&5
19356   eval "$as_ac_Header=no"
19357 fi
19358 rm -f conftest.err conftest.$ac_ext
19359 fi
19360 echo "$as_me:19360: result: `eval echo '${'$as_ac_Header'}'`" >&5
19361 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19362 if test `eval echo '${'$as_ac_Header'}'` = yes; then
19363   cat >>confdefs.h <<EOF
19364 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19365 EOF
19366
19367 fi
19368 done
19369
19370 if test x"$ac_cv_header_iostream" = xyes ; then
19371         echo "$as_me:19371: checking if iostream uses std-namespace" >&5
19372 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
19373         cat >conftest.$ac_ext <<_ACEOF
19374 #line 19374 "configure"
19375 #include "confdefs.h"
19376
19377 #include <iostream>
19378 using std::endl;
19379 using std::cerr;
19380 int
19381 main ()
19382 {
19383
19384 cerr << "testing" << endl;
19385
19386   ;
19387   return 0;
19388 }
19389 _ACEOF
19390 rm -f conftest.$ac_objext
19391 if { (eval echo "$as_me:19391: \"$ac_compile\"") >&5
19392   (eval $ac_compile) 2>&5
19393   ac_status=$?
19394   echo "$as_me:19394: \$? = $ac_status" >&5
19395   (exit $ac_status); } &&
19396          { ac_try='test -s conftest.$ac_objext'
19397   { (eval echo "$as_me:19397: \"$ac_try\"") >&5
19398   (eval $ac_try) 2>&5
19399   ac_status=$?
19400   echo "$as_me:19400: \$? = $ac_status" >&5
19401   (exit $ac_status); }; }; then
19402   cf_iostream_namespace=yes
19403 else
19404   echo "$as_me: failed program was:" >&5
19405 cat conftest.$ac_ext >&5
19406 cf_iostream_namespace=no
19407 fi
19408 rm -f conftest.$ac_objext conftest.$ac_ext
19409         echo "$as_me:19409: result: $cf_iostream_namespace" >&5
19410 echo "${ECHO_T}$cf_iostream_namespace" >&6
19411         if test "$cf_iostream_namespace" = yes ; then
19412
19413 cat >>confdefs.h <<\EOF
19414 #define IOSTREAM_NAMESPACE 1
19415 EOF
19416
19417         fi
19418 fi
19419
19420 echo "$as_me:19420: checking if we should include stdbool.h" >&5
19421 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
19422
19423 if test "${cf_cv_header_stdbool_h+set}" = set; then
19424   echo $ECHO_N "(cached) $ECHO_C" >&6
19425 else
19426
19427         cat >conftest.$ac_ext <<_ACEOF
19428 #line 19428 "configure"
19429 #include "confdefs.h"
19430
19431 int
19432 main ()
19433 {
19434 bool foo = false
19435   ;
19436   return 0;
19437 }
19438 _ACEOF
19439 rm -f conftest.$ac_objext
19440 if { (eval echo "$as_me:19440: \"$ac_compile\"") >&5
19441   (eval $ac_compile) 2>&5
19442   ac_status=$?
19443   echo "$as_me:19443: \$? = $ac_status" >&5
19444   (exit $ac_status); } &&
19445          { ac_try='test -s conftest.$ac_objext'
19446   { (eval echo "$as_me:19446: \"$ac_try\"") >&5
19447   (eval $ac_try) 2>&5
19448   ac_status=$?
19449   echo "$as_me:19449: \$? = $ac_status" >&5
19450   (exit $ac_status); }; }; then
19451   cf_cv_header_stdbool_h=0
19452 else
19453   echo "$as_me: failed program was:" >&5
19454 cat conftest.$ac_ext >&5
19455 cat >conftest.$ac_ext <<_ACEOF
19456 #line 19456 "configure"
19457 #include "confdefs.h"
19458
19459 #ifndef __BEOS__
19460 #include <stdbool.h>
19461 #endif
19462
19463 int
19464 main ()
19465 {
19466 bool foo = false
19467   ;
19468   return 0;
19469 }
19470 _ACEOF
19471 rm -f conftest.$ac_objext
19472 if { (eval echo "$as_me:19472: \"$ac_compile\"") >&5
19473   (eval $ac_compile) 2>&5
19474   ac_status=$?
19475   echo "$as_me:19475: \$? = $ac_status" >&5
19476   (exit $ac_status); } &&
19477          { ac_try='test -s conftest.$ac_objext'
19478   { (eval echo "$as_me:19478: \"$ac_try\"") >&5
19479   (eval $ac_try) 2>&5
19480   ac_status=$?
19481   echo "$as_me:19481: \$? = $ac_status" >&5
19482   (exit $ac_status); }; }; then
19483   cf_cv_header_stdbool_h=1
19484 else
19485   echo "$as_me: failed program was:" >&5
19486 cat conftest.$ac_ext >&5
19487 cf_cv_header_stdbool_h=0
19488 fi
19489 rm -f conftest.$ac_objext conftest.$ac_ext
19490 fi
19491 rm -f conftest.$ac_objext conftest.$ac_ext
19492 fi
19493
19494 if test "$cf_cv_header_stdbool_h" = 1
19495 then    echo "$as_me:19495: result: yes" >&5
19496 echo "${ECHO_T}yes" >&6
19497 else    echo "$as_me:19497: result: no" >&5
19498 echo "${ECHO_T}no" >&6
19499 fi
19500
19501 echo "$as_me:19501: checking for builtin bool type" >&5
19502 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
19503
19504 if test "${cf_cv_builtin_bool+set}" = set; then
19505   echo $ECHO_N "(cached) $ECHO_C" >&6
19506 else
19507
19508         cat >conftest.$ac_ext <<_ACEOF
19509 #line 19509 "configure"
19510 #include "confdefs.h"
19511
19512 #include <stdio.h>
19513 #include <sys/types.h>
19514
19515 int
19516 main ()
19517 {
19518 bool x = false
19519   ;
19520   return 0;
19521 }
19522 _ACEOF
19523 rm -f conftest.$ac_objext
19524 if { (eval echo "$as_me:19524: \"$ac_compile\"") >&5
19525   (eval $ac_compile) 2>&5
19526   ac_status=$?
19527   echo "$as_me:19527: \$? = $ac_status" >&5
19528   (exit $ac_status); } &&
19529          { ac_try='test -s conftest.$ac_objext'
19530   { (eval echo "$as_me:19530: \"$ac_try\"") >&5
19531   (eval $ac_try) 2>&5
19532   ac_status=$?
19533   echo "$as_me:19533: \$? = $ac_status" >&5
19534   (exit $ac_status); }; }; then
19535   cf_cv_builtin_bool=1
19536 else
19537   echo "$as_me: failed program was:" >&5
19538 cat conftest.$ac_ext >&5
19539 cf_cv_builtin_bool=0
19540 fi
19541 rm -f conftest.$ac_objext conftest.$ac_ext
19542
19543 fi
19544
19545 if test "$cf_cv_builtin_bool" = 1
19546 then    echo "$as_me:19546: result: yes" >&5
19547 echo "${ECHO_T}yes" >&6
19548 else    echo "$as_me:19548: result: no" >&5
19549 echo "${ECHO_T}no" >&6
19550 fi
19551
19552 echo "$as_me:19552: checking for size of bool" >&5
19553 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19554 if test "${cf_cv_type_of_bool+set}" = set; then
19555   echo $ECHO_N "(cached) $ECHO_C" >&6
19556 else
19557
19558         rm -f cf_test.out
19559         if test "$cross_compiling" = yes; then
19560   cf_cv_type_of_bool=unknown
19561 else
19562   cat >conftest.$ac_ext <<_ACEOF
19563 #line 19563 "configure"
19564 #include "confdefs.h"
19565
19566 #include <stdlib.h>
19567 #include <stdio.h>
19568
19569 #if defined(__cplusplus)
19570
19571 #ifdef HAVE_GXX_BUILTIN_H
19572 #include <g++/builtin.h>
19573 #elif HAVE_GPP_BUILTIN_H
19574 #include <gpp/builtin.h>
19575 #elif HAVE_BUILTIN_H
19576 #include <builtin.h>
19577 #endif
19578
19579 #else
19580
19581 #if $cf_cv_header_stdbool_h
19582 #include <stdbool.h>
19583 #endif
19584
19585 #endif
19586
19587 int main()
19588 {
19589         FILE *fp = fopen("cf_test.out", "w");
19590         if (fp != 0) {
19591                 bool x = true;
19592                 if ((bool)(-x) >= 0)
19593                         fputs("unsigned ", fp);
19594                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19595                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19596                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19597                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19598                 fclose(fp);
19599         }
19600         ${cf_cv_main_return:-return}(0);
19601 }
19602
19603 _ACEOF
19604 rm -f conftest$ac_exeext
19605 if { (eval echo "$as_me:19605: \"$ac_link\"") >&5
19606   (eval $ac_link) 2>&5
19607   ac_status=$?
19608   echo "$as_me:19608: \$? = $ac_status" >&5
19609   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19610   { (eval echo "$as_me:19610: \"$ac_try\"") >&5
19611   (eval $ac_try) 2>&5
19612   ac_status=$?
19613   echo "$as_me:19613: \$? = $ac_status" >&5
19614   (exit $ac_status); }; }; then
19615   cf_cv_type_of_bool=`cat cf_test.out`
19616                  if test -z "$cf_cv_type_of_bool"; then
19617                    cf_cv_type_of_bool=unknown
19618                  fi
19619 else
19620   echo "$as_me: program exited with status $ac_status" >&5
19621 echo "$as_me: failed program was:" >&5
19622 cat conftest.$ac_ext >&5
19623 cf_cv_type_of_bool=unknown
19624 fi
19625 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19626 fi
19627
19628 fi
19629
19630         rm -f cf_test.out
19631 echo "$as_me:19631: result: $cf_cv_type_of_bool" >&5
19632 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19633 if test "$cf_cv_type_of_bool" = unknown ; then
19634         case .$NCURSES_BOOL in #(vi
19635         .auto|.) NCURSES_BOOL=unsigned;;
19636         esac
19637         { echo "$as_me:19637: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
19638 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
19639         cf_cv_type_of_bool=$NCURSES_BOOL
19640 fi
19641
19642 echo "$as_me:19642: checking for special defines needed for etip.h" >&5
19643 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
19644 cf_save_CXXFLAGS="$CXXFLAGS"
19645 cf_result="none"
19646
19647 # etip.h includes ncurses.h which includes ncurses_dll.h
19648 # But ncurses_dll.h is generated - fix here.
19649 test -d include || mkdir include
19650 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
19651
19652 for cf_math in "" MATH_H
19653 do
19654 for cf_excp in "" MATH_EXCEPTION
19655 do
19656         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
19657         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
19658         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
19659 cat >conftest.$ac_ext <<_ACEOF
19660 #line 19660 "configure"
19661 #include "confdefs.h"
19662
19663 #include <etip.h.in>
19664
19665 int
19666 main ()
19667 {
19668
19669   ;
19670   return 0;
19671 }
19672 _ACEOF
19673 rm -f conftest.$ac_objext
19674 if { (eval echo "$as_me:19674: \"$ac_compile\"") >&5
19675   (eval $ac_compile) 2>&5
19676   ac_status=$?
19677   echo "$as_me:19677: \$? = $ac_status" >&5
19678   (exit $ac_status); } &&
19679          { ac_try='test -s conftest.$ac_objext'
19680   { (eval echo "$as_me:19680: \"$ac_try\"") >&5
19681   (eval $ac_try) 2>&5
19682   ac_status=$?
19683   echo "$as_me:19683: \$? = $ac_status" >&5
19684   (exit $ac_status); }; }; then
19685
19686         test -n "$cf_math" && cat >>confdefs.h <<EOF
19687 #define ETIP_NEEDS_${cf_math} 1
19688 EOF
19689
19690         test -n "$cf_excp" && cat >>confdefs.h <<EOF
19691 #define ETIP_NEEDS_${cf_excp} 1
19692 EOF
19693
19694         cf_result="$cf_math $cf_excp"
19695         break 2
19696
19697 else
19698   echo "$as_me: failed program was:" >&5
19699 cat conftest.$ac_ext >&5
19700 fi
19701 rm -f conftest.$ac_objext conftest.$ac_ext
19702 done
19703 done
19704 echo "$as_me:19704: result: $cf_result" >&5
19705 echo "${ECHO_T}$cf_result" >&6
19706 CXXFLAGS="$cf_save_CXXFLAGS"
19707
19708 if test -n "$CXX"; then
19709 echo "$as_me:19709: checking if $CXX accepts parameter initialization" >&5
19710 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
19711 if test "${cf_cv_cpp_param_init+set}" = set; then
19712   echo $ECHO_N "(cached) $ECHO_C" >&6
19713 else
19714
19715         ac_ext=cc
19716 ac_cpp='$CXXCPP $CPPFLAGS'
19717 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19718 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19719 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19720 ac_main_return=return
19721
19722         if test "$cross_compiling" = yes; then
19723   cf_cv_cpp_param_init=unknown
19724 else
19725   cat >conftest.$ac_ext <<_ACEOF
19726 #line 19726 "configure"
19727 #include "confdefs.h"
19728
19729 class TEST {
19730 private:
19731         int value;
19732 public:
19733         TEST(int x = 1);
19734         ~TEST();
19735 };
19736
19737 TEST::TEST(int x = 1)   // some compilers do not like second initializer
19738 {
19739         value = x;
19740 }
19741 int main() { }
19742
19743 _ACEOF
19744 rm -f conftest$ac_exeext
19745 if { (eval echo "$as_me:19745: \"$ac_link\"") >&5
19746   (eval $ac_link) 2>&5
19747   ac_status=$?
19748   echo "$as_me:19748: \$? = $ac_status" >&5
19749   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19750   { (eval echo "$as_me:19750: \"$ac_try\"") >&5
19751   (eval $ac_try) 2>&5
19752   ac_status=$?
19753   echo "$as_me:19753: \$? = $ac_status" >&5
19754   (exit $ac_status); }; }; then
19755   cf_cv_cpp_param_init=yes
19756 else
19757   echo "$as_me: program exited with status $ac_status" >&5
19758 echo "$as_me: failed program was:" >&5
19759 cat conftest.$ac_ext >&5
19760 cf_cv_cpp_param_init=no
19761 fi
19762 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19763 fi
19764         ac_ext=cc
19765 ac_cpp='$CXXCPP $CPPFLAGS'
19766 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19767 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19768 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19769 ac_main_return=return
19770
19771 fi
19772 echo "$as_me:19772: result: $cf_cv_cpp_param_init" >&5
19773 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
19774 fi
19775 test "$cf_cv_cpp_param_init" = yes &&
19776 cat >>confdefs.h <<\EOF
19777 #define CPP_HAS_PARAM_INIT 1
19778 EOF
19779
19780 if test -n "$CXX"; then
19781
19782 echo "$as_me:19782: checking if $CXX accepts static_cast" >&5
19783 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
19784 if test "${cf_cv_cpp_static_cast+set}" = set; then
19785   echo $ECHO_N "(cached) $ECHO_C" >&6
19786 else
19787
19788         ac_ext=cc
19789 ac_cpp='$CXXCPP $CPPFLAGS'
19790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19793 ac_main_return=return
19794
19795         cat >conftest.$ac_ext <<_ACEOF
19796 #line 19796 "configure"
19797 #include "confdefs.h"
19798
19799 class NCursesPanel
19800 {
19801 public:
19802   NCursesPanel(int nlines,
19803                int ncols,
19804                int begin_y = 0,
19805                int begin_x = 0)
19806   {
19807   }
19808   NCursesPanel();
19809   ~NCursesPanel();
19810 };
19811
19812 template<class T> class NCursesUserPanel : public NCursesPanel
19813 {
19814 public:
19815   NCursesUserPanel (int nlines,
19816                     int ncols,
19817                     int begin_y = 0,
19818                     int begin_x = 0,
19819                     const T* p_UserData = static_cast<T*>(0))
19820     : NCursesPanel (nlines, ncols, begin_y, begin_x)
19821   {
19822   };
19823   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
19824   {
19825   };
19826
19827   virtual ~NCursesUserPanel() {};
19828 };
19829
19830 int
19831 main ()
19832 {
19833
19834         const char* p_UserData = static_cast<char*>(0)
19835   ;
19836   return 0;
19837 }
19838 _ACEOF
19839 rm -f conftest.$ac_objext
19840 if { (eval echo "$as_me:19840: \"$ac_compile\"") >&5
19841   (eval $ac_compile) 2>&5
19842   ac_status=$?
19843   echo "$as_me:19843: \$? = $ac_status" >&5
19844   (exit $ac_status); } &&
19845          { ac_try='test -s conftest.$ac_objext'
19846   { (eval echo "$as_me:19846: \"$ac_try\"") >&5
19847   (eval $ac_try) 2>&5
19848   ac_status=$?
19849   echo "$as_me:19849: \$? = $ac_status" >&5
19850   (exit $ac_status); }; }; then
19851   cf_cv_cpp_static_cast=yes
19852 else
19853   echo "$as_me: failed program was:" >&5
19854 cat conftest.$ac_ext >&5
19855 cf_cv_cpp_static_cast=no
19856 fi
19857 rm -f conftest.$ac_objext conftest.$ac_ext
19858
19859         ac_ext=cc
19860 ac_cpp='$CXXCPP $CPPFLAGS'
19861 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
19862 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
19863 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
19864 ac_main_return=return
19865
19866 fi
19867 echo "$as_me:19867: result: $cf_cv_cpp_static_cast" >&5
19868 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
19869
19870 fi
19871
19872 test "$cf_cv_cpp_static_cast" = yes &&
19873 cat >>confdefs.h <<\EOF
19874 #define CPP_HAS_STATIC_CAST 1
19875 EOF
19876
19877         CXX_AR='$(AR)'
19878         CXX_ARFLAGS='$(ARFLAGS)'
19879         case $cf_cv_system_name in #(vi
19880         irix*) #(vi
19881             if test "$GXX" != yes ; then
19882                 CXX_AR='$(CXX)'
19883                 CXX_ARFLAGS='-ar -o'
19884             fi
19885             ;;
19886         sco3.2v5*) #(vi
19887             CXXLDFLAGS="-u main"
19888             ;;
19889         solaris2*)
19890             if test "$GXX" != yes ; then
19891                 CXX_AR='$(CXX)'
19892                 CXX_ARFLAGS='-xar -o'
19893             fi
19894             ;;
19895         esac
19896
19897 else
19898         cf_cxx_library=no
19899         cf_cv_builtin_bool=1
19900
19901         # Just because we are not configuring against C++ right now does not
19902         # mean that a user will not want to use C++.  Some distributors disable
19903         # the C++ portion of this configuration as a shortcut (or just to avoid
19904         # compiling the demo in the c++ directory).  So we need a reasonable
19905         # default for the 'bool' type.
19906         #
19907         # Caveat: since the storage of the bool type is not standardized, it
19908         # may change.
19909
19910         if test "$NCURSES_BOOL" != auto ; then
19911                 cf_cv_type_of_bool=$NCURSES_BOOL
19912                 cf_cv_header_stdbool_h=0
19913         else
19914                 if test "$cf_cv_header_stdbool_h" = 1 ; then
19915
19916 echo "$as_me:19916: checking for size of bool" >&5
19917 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
19918 if test "${cf_cv_type_of_bool+set}" = set; then
19919   echo $ECHO_N "(cached) $ECHO_C" >&6
19920 else
19921
19922         rm -f cf_test.out
19923         if test "$cross_compiling" = yes; then
19924   cf_cv_type_of_bool=unknown
19925 else
19926   cat >conftest.$ac_ext <<_ACEOF
19927 #line 19927 "configure"
19928 #include "confdefs.h"
19929
19930 #include <stdlib.h>
19931 #include <stdio.h>
19932
19933 #if defined(__cplusplus)
19934
19935 #ifdef HAVE_GXX_BUILTIN_H
19936 #include <g++/builtin.h>
19937 #elif HAVE_GPP_BUILTIN_H
19938 #include <gpp/builtin.h>
19939 #elif HAVE_BUILTIN_H
19940 #include <builtin.h>
19941 #endif
19942
19943 #else
19944
19945 #if $cf_cv_header_stdbool_h
19946 #include <stdbool.h>
19947 #endif
19948
19949 #endif
19950
19951 int main()
19952 {
19953         FILE *fp = fopen("cf_test.out", "w");
19954         if (fp != 0) {
19955                 bool x = true;
19956                 if ((bool)(-x) >= 0)
19957                         fputs("unsigned ", fp);
19958                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
19959                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
19960                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
19961                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
19962                 fclose(fp);
19963         }
19964         ${cf_cv_main_return:-return}(0);
19965 }
19966
19967 _ACEOF
19968 rm -f conftest$ac_exeext
19969 if { (eval echo "$as_me:19969: \"$ac_link\"") >&5
19970   (eval $ac_link) 2>&5
19971   ac_status=$?
19972   echo "$as_me:19972: \$? = $ac_status" >&5
19973   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19974   { (eval echo "$as_me:19974: \"$ac_try\"") >&5
19975   (eval $ac_try) 2>&5
19976   ac_status=$?
19977   echo "$as_me:19977: \$? = $ac_status" >&5
19978   (exit $ac_status); }; }; then
19979   cf_cv_type_of_bool=`cat cf_test.out`
19980                  if test -z "$cf_cv_type_of_bool"; then
19981                    cf_cv_type_of_bool=unknown
19982                  fi
19983 else
19984   echo "$as_me: program exited with status $ac_status" >&5
19985 echo "$as_me: failed program was:" >&5
19986 cat conftest.$ac_ext >&5
19987 cf_cv_type_of_bool=unknown
19988 fi
19989 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19990 fi
19991
19992 fi
19993
19994         rm -f cf_test.out
19995 echo "$as_me:19995: result: $cf_cv_type_of_bool" >&5
19996 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
19997 if test "$cf_cv_type_of_bool" = unknown ; then
19998         case .$NCURSES_BOOL in #(vi
19999         .auto|.) NCURSES_BOOL=unsigned;;
20000         esac
20001         { echo "$as_me:20001: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
20002 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
20003         cf_cv_type_of_bool=$NCURSES_BOOL
20004 fi
20005
20006                 else
20007                         echo "$as_me:20007: checking for fallback type of bool" >&5
20008 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
20009                         case "$host_cpu" in #(vi
20010                         i?86)   cf_cv_type_of_bool=char ;; #(vi
20011                         *)      cf_cv_type_of_bool=int  ;;
20012                         esac
20013                         echo "$as_me:20013: result: $cf_cv_type_of_bool" >&5
20014 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
20015                 fi
20016         fi
20017 fi
20018
20019 # If the C compiler did not declare bool, and we did not determine that the C++
20020 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
20021 # ncurses library use the same type as C++ bool.  Note that this allows one to
20022 # specify the type of bool in a configure-script option and postpone
20023 # integration with the C++ compiler provided that the types are compatible.
20024 USE_CXX_BOOL=1
20025 if test $cf_cv_cc_bool_type = 1
20026 then
20027         # oops: C has a bool.  Unlikely, but C++ could differ.
20028         USE_CXX_BOOL=0
20029 elif test $cf_cv_builtin_bool = 0
20030 then
20031         # C++ has no bool
20032         USE_CXX_BOOL=0
20033 else
20034         # this is the normal case
20035         USE_CXX_BOOL='defined(__cplusplus)'
20036 fi
20037
20038 if test -f "${srcdir}/Ada95/Makefile.in" ; then
20039
20040         if test "$cf_with_ada" != "no" ; then
20041                 if test "$with_libtool" != "no"; then
20042                         { echo "$as_me:20042: WARNING: libtool does not support Ada - disabling feature" >&5
20043 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
20044                         cf_with_ada=no
20045                 fi
20046         fi
20047
20048         if test "$cf_with_ada" != "no" ; then
20049
20050 cf_ada_make=gnatmake
20051 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
20052 set dummy $cf_ada_make; ac_word=$2
20053 echo "$as_me:20053: checking for $ac_word" >&5
20054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20055 if test "${ac_cv_prog_gnat_exists+set}" = set; then
20056   echo $ECHO_N "(cached) $ECHO_C" >&6
20057 else
20058   if test -n "$gnat_exists"; then
20059   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
20060 else
20061   ac_save_IFS=$IFS; IFS=$ac_path_separator
20062 ac_dummy="$PATH"
20063 for ac_dir in $ac_dummy; do
20064   IFS=$ac_save_IFS
20065   test -z "$ac_dir" && ac_dir=.
20066   $as_executable_p "$ac_dir/$ac_word" || continue
20067 ac_cv_prog_gnat_exists="yes"
20068 echo "$as_me:20068: found $ac_dir/$ac_word" >&5
20069 break
20070 done
20071
20072   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
20073 fi
20074 fi
20075 gnat_exists=$ac_cv_prog_gnat_exists
20076 if test -n "$gnat_exists"; then
20077   echo "$as_me:20077: result: $gnat_exists" >&5
20078 echo "${ECHO_T}$gnat_exists" >&6
20079 else
20080   echo "$as_me:20080: result: no" >&5
20081 echo "${ECHO_T}no" >&6
20082 fi
20083
20084 if test "$ac_cv_prog_gnat_exists" = no; then
20085    cf_ada_make=
20086    cf_cv_prog_gnat_correct=no
20087 else
20088
20089 echo "$as_me:20089: checking for gnat version" >&5
20090 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
20091 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
20092         grep '[0-9].[0-9][0-9]*' |\
20093     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
20094 echo "$as_me:20094: result: $cf_gnat_version" >&5
20095 echo "${ECHO_T}$cf_gnat_version" >&6
20096
20097 case $cf_gnat_version in #(vi
20098 3.1[1-9]*|3.[2-9]*|[4-9].*|20[0-9][0-9]) #(vi
20099         cf_cv_prog_gnat_correct=yes
20100         ;;
20101 *)
20102         { echo "$as_me:20102: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
20103 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
20104         cf_cv_prog_gnat_correct=no
20105         ;;
20106 esac
20107
20108    # Extract the first word of "m4", so it can be a program name with args.
20109 set dummy m4; ac_word=$2
20110 echo "$as_me:20110: checking for $ac_word" >&5
20111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20112 if test "${ac_cv_prog_M4_exists+set}" = set; then
20113   echo $ECHO_N "(cached) $ECHO_C" >&6
20114 else
20115   if test -n "$M4_exists"; then
20116   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
20117 else
20118   ac_save_IFS=$IFS; IFS=$ac_path_separator
20119 ac_dummy="$PATH"
20120 for ac_dir in $ac_dummy; do
20121   IFS=$ac_save_IFS
20122   test -z "$ac_dir" && ac_dir=.
20123   $as_executable_p "$ac_dir/$ac_word" || continue
20124 ac_cv_prog_M4_exists="yes"
20125 echo "$as_me:20125: found $ac_dir/$ac_word" >&5
20126 break
20127 done
20128
20129   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
20130 fi
20131 fi
20132 M4_exists=$ac_cv_prog_M4_exists
20133 if test -n "$M4_exists"; then
20134   echo "$as_me:20134: result: $M4_exists" >&5
20135 echo "${ECHO_T}$M4_exists" >&6
20136 else
20137   echo "$as_me:20137: result: no" >&5
20138 echo "${ECHO_T}no" >&6
20139 fi
20140
20141    if test "$ac_cv_prog_M4_exists" = no; then
20142       cf_cv_prog_gnat_correct=no
20143       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
20144    fi
20145    if test "$cf_cv_prog_gnat_correct" = yes; then
20146       echo "$as_me:20146: checking if GNAT works" >&5
20147 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
20148
20149 rm -rf conftest* *~conftest*
20150 cat >>conftest.ads <<CF_EOF
20151 procedure conftest;
20152 CF_EOF
20153 cat >>conftest.adb <<CF_EOF
20154 with Text_IO;
20155 with GNAT.OS_Lib;
20156 procedure conftest is
20157 begin
20158    Text_IO.Put ("Hello World");
20159    Text_IO.New_Line;
20160    GNAT.OS_Lib.OS_Exit (0);
20161 end conftest;
20162 CF_EOF
20163 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20164    if ( ./conftest 1>&5 2>&1 ) ; then
20165       cf_cv_prog_gnat_correct=yes
20166    else
20167       cf_cv_prog_gnat_correct=no
20168    fi
20169 else
20170    cf_cv_prog_gnat_correct=no
20171 fi
20172 rm -rf conftest* *~conftest*
20173
20174       echo "$as_me:20174: result: $cf_cv_prog_gnat_correct" >&5
20175 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
20176    fi
20177 fi
20178
20179                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
20180
20181         ADAFLAGS="$ADAFLAGS -gnatpn"
20182
20183         echo "$as_me:20183: checking optimization options for ADAFLAGS" >&5
20184 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
20185         case "$CFLAGS" in
20186         *-g*)
20187
20188         ADAFLAGS="$ADAFLAGS -g"
20189
20190                 ;;
20191         esac
20192         case "$CFLAGS" in
20193         *-O*)
20194                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
20195
20196         ADAFLAGS="$ADAFLAGS $cf_O_flag"
20197
20198                 ;;
20199         esac
20200         echo "$as_me:20200: result: $ADAFLAGS" >&5
20201 echo "${ECHO_T}$ADAFLAGS" >&6
20202
20203 echo "$as_me:20203: checking if GNAT supports generics" >&5
20204 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
20205 case $cf_gnat_version in #(vi
20206 3.[1-9]*|[4-9].*) #(vi
20207         cf_gnat_generics=yes
20208         ;;
20209 *)
20210         cf_gnat_generics=no
20211         ;;
20212 esac
20213 echo "$as_me:20213: result: $cf_gnat_generics" >&5
20214 echo "${ECHO_T}$cf_gnat_generics" >&6
20215
20216 if test "$cf_gnat_generics" = yes
20217 then
20218         cf_compile_generics=generics
20219         cf_generic_objects="\${GENOBJS}"
20220 else
20221         cf_compile_generics=
20222         cf_generic_objects=
20223 fi
20224
20225 echo "$as_me:20225: checking if GNAT supports SIGINT" >&5
20226 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
20227 if test "${cf_cv_gnat_sigint+set}" = set; then
20228   echo $ECHO_N "(cached) $ECHO_C" >&6
20229 else
20230
20231 rm -rf conftest* *~conftest*
20232 cat >>conftest.ads <<CF_EOF
20233 with Ada.Interrupts.Names;
20234
20235 package ConfTest is
20236
20237    pragma Warnings (Off);  --  the next pragma exists since 3.11p
20238    pragma Unreserve_All_Interrupts;
20239    pragma Warnings (On);
20240
20241    protected Process is
20242       procedure Stop;
20243       function Continue return Boolean;
20244       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
20245    private
20246       Done : Boolean := False;
20247    end Process;
20248
20249 end ConfTest;
20250 CF_EOF
20251 cat >>conftest.adb <<CF_EOF
20252 package body ConfTest is
20253    protected body Process is
20254       procedure Stop is
20255       begin
20256          Done := True;
20257       end Stop;
20258       function Continue return Boolean is
20259       begin
20260          return not Done;
20261       end Continue;
20262    end Process;
20263 end ConfTest;
20264 CF_EOF
20265 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
20266       cf_cv_gnat_sigint=yes
20267 else
20268    cf_cv_gnat_sigint=no
20269 fi
20270 rm -rf conftest* *~conftest*
20271
20272 fi
20273 echo "$as_me:20273: result: $cf_cv_gnat_sigint" >&5
20274 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
20275
20276 if test $cf_cv_gnat_sigint = yes ; then
20277         USE_GNAT_SIGINT=""
20278 else
20279         USE_GNAT_SIGINT="#"
20280 fi
20281
20282 cf_gnat_libraries=no
20283 cf_gnat_projects=no
20284
20285 if test "$enable_gnat_projects" != no ; then
20286 echo "$as_me:20286: checking if GNAT supports project files" >&5
20287 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
20288 case $cf_gnat_version in #(vi
20289 3.[0-9]*) #(vi
20290         ;;
20291 *)
20292         case $cf_cv_system_name in #(vi
20293         cygwin*|msys*) #(vi
20294                 ;;
20295         *)
20296                 mkdir conftest.src conftest.bin conftest.lib
20297                 cd conftest.src
20298                 rm -rf conftest* *~conftest*
20299                 cat >>library.gpr <<CF_EOF
20300 project Library is
20301   Kind := External ("LIB_KIND");
20302   for Library_Name use "ConfTest";
20303   for Object_Dir use ".";
20304   for Library_ALI_Dir use External("LIBRARY_DIR");
20305   for Library_Version use External ("SONAME");
20306   for Library_Kind use Kind;
20307   for Library_Dir use External("BUILD_DIR");
20308   Source_Dir := External ("SOURCE_DIR");
20309   for Source_Dirs use (Source_Dir);
20310 end Library;
20311 CF_EOF
20312                 cat >>confpackage.ads <<CF_EOF
20313 package ConfPackage is
20314    procedure conftest;
20315 end ConfPackage;
20316 CF_EOF
20317                 cat >>confpackage.adb <<CF_EOF
20318 with Text_IO;
20319 package body ConfPackage is
20320    procedure conftest is
20321    begin
20322       Text_IO.Put ("Hello World");
20323       Text_IO.New_Line;
20324    end conftest;
20325 end ConfPackage;
20326 CF_EOF
20327                 if ( $cf_ada_make $ADAFLAGS \
20328                                 -Plibrary.gpr \
20329                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
20330                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
20331                                 -XSOURCE_DIR=`pwd` \
20332                                 -XSONAME=libConfTest.so.1 \
20333                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
20334                         cf_gnat_projects=yes
20335                 fi
20336                 cd ..
20337                 if test -f conftest.lib/confpackage.ali
20338                 then
20339                         cf_gnat_libraries=yes
20340                 fi
20341                 rm -rf conftest* *~conftest*
20342                 ;;
20343         esac
20344         ;;
20345 esac
20346 echo "$as_me:20346: result: $cf_gnat_projects" >&5
20347 echo "${ECHO_T}$cf_gnat_projects" >&6
20348 fi # enable_gnat_projects
20349
20350 if test $cf_gnat_projects = yes
20351 then
20352         echo "$as_me:20352: checking if GNAT supports libraries" >&5
20353 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
20354         echo "$as_me:20354: result: $cf_gnat_libraries" >&5
20355 echo "${ECHO_T}$cf_gnat_libraries" >&6
20356 fi
20357
20358 if test "$cf_gnat_projects" = yes
20359 then
20360         USE_OLD_MAKERULES="#"
20361         USE_GNAT_PROJECTS=""
20362 else
20363         USE_OLD_MAKERULES=""
20364         USE_GNAT_PROJECTS="#"
20365 fi
20366
20367 if test "$cf_gnat_libraries" = yes
20368 then
20369         USE_GNAT_LIBRARIES=""
20370 else
20371         USE_GNAT_LIBRARIES="#"
20372 fi
20373
20374 echo "$as_me:20374: checking for ada-compiler" >&5
20375 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
20376
20377 # Check whether --with-ada-compiler or --without-ada-compiler was given.
20378 if test "${with_ada_compiler+set}" = set; then
20379   withval="$with_ada_compiler"
20380   cf_ada_compiler=$withval
20381 else
20382   cf_ada_compiler=gnatmake
20383 fi;
20384
20385 echo "$as_me:20385: result: $cf_ada_compiler" >&5
20386 echo "${ECHO_T}$cf_ada_compiler" >&6
20387
20388                         cf_ada_package=terminal_interface
20389
20390 echo "$as_me:20390: checking for ada-include" >&5
20391 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
20392
20393 # Check whether --with-ada-include or --without-ada-include was given.
20394 if test "${with_ada_include+set}" = set; then
20395   withval="$with_ada_include"
20396
20397 else
20398   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
20399 fi; if test -n "$prefix/share/ada/adainclude" ; then
20400
20401 if test "x$prefix" != xNONE; then
20402   cf_path_syntax="$prefix"
20403 else
20404   cf_path_syntax="$ac_default_prefix"
20405 fi
20406
20407 case ".$withval" in #(vi
20408 .\$\(*\)*|.\'*\'*) #(vi
20409   ;;
20410 ..|./*|.\\*) #(vi
20411   ;;
20412 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20413   ;;
20414 .\${*prefix}*|.\${*dir}*) #(vi
20415   eval withval="$withval"
20416   case ".$withval" in #(vi
20417   .NONE/*)
20418     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20419     ;;
20420   esac
20421   ;; #(vi
20422 .no|.NONE/*)
20423   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20424   ;;
20425 *)
20426   { { echo "$as_me:20426: error: expected a pathname, not \"$withval\"" >&5
20427 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20428    { (exit 1); exit 1; }; }
20429   ;;
20430 esac
20431
20432 fi
20433 eval ADA_INCLUDE="$withval"
20434
20435 echo "$as_me:20435: result: $ADA_INCLUDE" >&5
20436 echo "${ECHO_T}$ADA_INCLUDE" >&6
20437
20438 echo "$as_me:20438: checking for ada-objects" >&5
20439 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
20440
20441 # Check whether --with-ada-objects or --without-ada-objects was given.
20442 if test "${with_ada_objects+set}" = set; then
20443   withval="$with_ada_objects"
20444
20445 else
20446   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
20447 fi; if test -n "$prefix/lib/ada/adalib" ; then
20448
20449 if test "x$prefix" != xNONE; then
20450   cf_path_syntax="$prefix"
20451 else
20452   cf_path_syntax="$ac_default_prefix"
20453 fi
20454
20455 case ".$withval" in #(vi
20456 .\$\(*\)*|.\'*\'*) #(vi
20457   ;;
20458 ..|./*|.\\*) #(vi
20459   ;;
20460 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
20461   ;;
20462 .\${*prefix}*|.\${*dir}*) #(vi
20463   eval withval="$withval"
20464   case ".$withval" in #(vi
20465   .NONE/*)
20466     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20467     ;;
20468   esac
20469   ;; #(vi
20470 .no|.NONE/*)
20471   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
20472   ;;
20473 *)
20474   { { echo "$as_me:20474: error: expected a pathname, not \"$withval\"" >&5
20475 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
20476    { (exit 1); exit 1; }; }
20477   ;;
20478 esac
20479
20480 fi
20481 eval ADA_OBJECTS="$withval"
20482
20483 echo "$as_me:20483: result: $ADA_OBJECTS" >&5
20484 echo "${ECHO_T}$ADA_OBJECTS" >&6
20485
20486 echo "$as_me:20486: checking if an Ada95 shared-library should be built" >&5
20487 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
20488
20489 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
20490 if test "${with_ada_sharedlib+set}" = set; then
20491   withval="$with_ada_sharedlib"
20492   with_ada_sharedlib=$withval
20493 else
20494   with_ada_sharedlib=no
20495 fi;
20496 echo "$as_me:20496: result: $with_ada_sharedlib" >&5
20497 echo "${ECHO_T}$with_ada_sharedlib" >&6
20498
20499 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
20500 MAKE_ADA_SHAREDLIB="#"
20501
20502 if test "x$with_ada_sharedlib" != xno
20503 then
20504         MAKE_ADA_SHAREDLIB=
20505         if test "x$with_ada_sharedlib" != xyes
20506         then
20507                 ADA_SHAREDLIB="$with_ada_sharedlib"
20508         fi
20509 fi
20510
20511                 fi
20512         fi
20513 else
20514         cf_with_ada=no
20515 fi
20516
20517 # do this "late" to avoid conflict with header-checks
20518 if test "x$with_widec" = xyes ; then
20519         echo "$as_me:20519: checking for wchar_t" >&5
20520 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
20521 if test "${ac_cv_type_wchar_t+set}" = set; then
20522   echo $ECHO_N "(cached) $ECHO_C" >&6
20523 else
20524   cat >conftest.$ac_ext <<_ACEOF
20525 #line 20525 "configure"
20526 #include "confdefs.h"
20527 $ac_includes_default
20528 int
20529 main ()
20530 {
20531 if ((wchar_t *) 0)
20532   return 0;
20533 if (sizeof (wchar_t))
20534   return 0;
20535   ;
20536   return 0;
20537 }
20538 _ACEOF
20539 rm -f conftest.$ac_objext
20540 if { (eval echo "$as_me:20540: \"$ac_compile\"") >&5
20541   (eval $ac_compile) 2>&5
20542   ac_status=$?
20543   echo "$as_me:20543: \$? = $ac_status" >&5
20544   (exit $ac_status); } &&
20545          { ac_try='test -s conftest.$ac_objext'
20546   { (eval echo "$as_me:20546: \"$ac_try\"") >&5
20547   (eval $ac_try) 2>&5
20548   ac_status=$?
20549   echo "$as_me:20549: \$? = $ac_status" >&5
20550   (exit $ac_status); }; }; then
20551   ac_cv_type_wchar_t=yes
20552 else
20553   echo "$as_me: failed program was:" >&5
20554 cat conftest.$ac_ext >&5
20555 ac_cv_type_wchar_t=no
20556 fi
20557 rm -f conftest.$ac_objext conftest.$ac_ext
20558 fi
20559 echo "$as_me:20559: result: $ac_cv_type_wchar_t" >&5
20560 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
20561
20562 echo "$as_me:20562: checking size of wchar_t" >&5
20563 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
20564 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20565   echo $ECHO_N "(cached) $ECHO_C" >&6
20566 else
20567   if test "$ac_cv_type_wchar_t" = yes; then
20568   if test "$cross_compiling" = yes; then
20569   # Depending upon the size, compute the lo and hi bounds.
20570 cat >conftest.$ac_ext <<_ACEOF
20571 #line 20571 "configure"
20572 #include "confdefs.h"
20573 $ac_includes_default
20574 int
20575 main ()
20576 {
20577 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
20578   ;
20579   return 0;
20580 }
20581 _ACEOF
20582 rm -f conftest.$ac_objext
20583 if { (eval echo "$as_me:20583: \"$ac_compile\"") >&5
20584   (eval $ac_compile) 2>&5
20585   ac_status=$?
20586   echo "$as_me:20586: \$? = $ac_status" >&5
20587   (exit $ac_status); } &&
20588          { ac_try='test -s conftest.$ac_objext'
20589   { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590   (eval $ac_try) 2>&5
20591   ac_status=$?
20592   echo "$as_me:20592: \$? = $ac_status" >&5
20593   (exit $ac_status); }; }; then
20594   ac_lo=0 ac_mid=0
20595   while :; do
20596     cat >conftest.$ac_ext <<_ACEOF
20597 #line 20597 "configure"
20598 #include "confdefs.h"
20599 $ac_includes_default
20600 int
20601 main ()
20602 {
20603 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20604   ;
20605   return 0;
20606 }
20607 _ACEOF
20608 rm -f conftest.$ac_objext
20609 if { (eval echo "$as_me:20609: \"$ac_compile\"") >&5
20610   (eval $ac_compile) 2>&5
20611   ac_status=$?
20612   echo "$as_me:20612: \$? = $ac_status" >&5
20613   (exit $ac_status); } &&
20614          { ac_try='test -s conftest.$ac_objext'
20615   { (eval echo "$as_me:20615: \"$ac_try\"") >&5
20616   (eval $ac_try) 2>&5
20617   ac_status=$?
20618   echo "$as_me:20618: \$? = $ac_status" >&5
20619   (exit $ac_status); }; }; then
20620   ac_hi=$ac_mid; break
20621 else
20622   echo "$as_me: failed program was:" >&5
20623 cat conftest.$ac_ext >&5
20624 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
20625 fi
20626 rm -f conftest.$ac_objext conftest.$ac_ext
20627   done
20628 else
20629   echo "$as_me: failed program was:" >&5
20630 cat conftest.$ac_ext >&5
20631 ac_hi=-1 ac_mid=-1
20632   while :; do
20633     cat >conftest.$ac_ext <<_ACEOF
20634 #line 20634 "configure"
20635 #include "confdefs.h"
20636 $ac_includes_default
20637 int
20638 main ()
20639 {
20640 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
20641   ;
20642   return 0;
20643 }
20644 _ACEOF
20645 rm -f conftest.$ac_objext
20646 if { (eval echo "$as_me:20646: \"$ac_compile\"") >&5
20647   (eval $ac_compile) 2>&5
20648   ac_status=$?
20649   echo "$as_me:20649: \$? = $ac_status" >&5
20650   (exit $ac_status); } &&
20651          { ac_try='test -s conftest.$ac_objext'
20652   { (eval echo "$as_me:20652: \"$ac_try\"") >&5
20653   (eval $ac_try) 2>&5
20654   ac_status=$?
20655   echo "$as_me:20655: \$? = $ac_status" >&5
20656   (exit $ac_status); }; }; then
20657   ac_lo=$ac_mid; break
20658 else
20659   echo "$as_me: failed program was:" >&5
20660 cat conftest.$ac_ext >&5
20661 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
20662 fi
20663 rm -f conftest.$ac_objext conftest.$ac_ext
20664   done
20665 fi
20666 rm -f conftest.$ac_objext conftest.$ac_ext
20667 # Binary search between lo and hi bounds.
20668 while test "x$ac_lo" != "x$ac_hi"; do
20669   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20670   cat >conftest.$ac_ext <<_ACEOF
20671 #line 20671 "configure"
20672 #include "confdefs.h"
20673 $ac_includes_default
20674 int
20675 main ()
20676 {
20677 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
20678   ;
20679   return 0;
20680 }
20681 _ACEOF
20682 rm -f conftest.$ac_objext
20683 if { (eval echo "$as_me:20683: \"$ac_compile\"") >&5
20684   (eval $ac_compile) 2>&5
20685   ac_status=$?
20686   echo "$as_me:20686: \$? = $ac_status" >&5
20687   (exit $ac_status); } &&
20688          { ac_try='test -s conftest.$ac_objext'
20689   { (eval echo "$as_me:20689: \"$ac_try\"") >&5
20690   (eval $ac_try) 2>&5
20691   ac_status=$?
20692   echo "$as_me:20692: \$? = $ac_status" >&5
20693   (exit $ac_status); }; }; then
20694   ac_hi=$ac_mid
20695 else
20696   echo "$as_me: failed program was:" >&5
20697 cat conftest.$ac_ext >&5
20698 ac_lo=`expr $ac_mid + 1`
20699 fi
20700 rm -f conftest.$ac_objext conftest.$ac_ext
20701 done
20702 ac_cv_sizeof_wchar_t=$ac_lo
20703 else
20704   if test "$cross_compiling" = yes; then
20705   { { echo "$as_me:20705: error: cannot run test program while cross compiling" >&5
20706 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
20707    { (exit 1); exit 1; }; }
20708 else
20709   cat >conftest.$ac_ext <<_ACEOF
20710 #line 20710 "configure"
20711 #include "confdefs.h"
20712 $ac_includes_default
20713 int
20714 main ()
20715 {
20716 FILE *f = fopen ("conftest.val", "w");
20717 if (!f)
20718   $ac_main_return (1);
20719 fprintf (f, "%d", (sizeof (wchar_t)));
20720 fclose (f);
20721   ;
20722   return 0;
20723 }
20724 _ACEOF
20725 rm -f conftest$ac_exeext
20726 if { (eval echo "$as_me:20726: \"$ac_link\"") >&5
20727   (eval $ac_link) 2>&5
20728   ac_status=$?
20729   echo "$as_me:20729: \$? = $ac_status" >&5
20730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20731   { (eval echo "$as_me:20731: \"$ac_try\"") >&5
20732   (eval $ac_try) 2>&5
20733   ac_status=$?
20734   echo "$as_me:20734: \$? = $ac_status" >&5
20735   (exit $ac_status); }; }; then
20736   ac_cv_sizeof_wchar_t=`cat conftest.val`
20737 else
20738   echo "$as_me: program exited with status $ac_status" >&5
20739 echo "$as_me: failed program was:" >&5
20740 cat conftest.$ac_ext >&5
20741 fi
20742 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20743 fi
20744 fi
20745 rm -f conftest.val
20746 else
20747   ac_cv_sizeof_wchar_t=0
20748 fi
20749 fi
20750 echo "$as_me:20750: result: $ac_cv_sizeof_wchar_t" >&5
20751 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
20752 cat >>confdefs.h <<EOF
20753 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
20754 EOF
20755
20756 fi
20757
20758 ### Construct the ncurses library-subsets, if any, from this set of keywords:
20759 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
20760 ###
20761 ### ticlib modules may be a separate library, otherwise contained in termlib.
20762 ### termlib modules may be a separate library, otherwise contained in ncurses.
20763 ###
20764 ### The of "+" or " " between the tokens controls the way the script
20765 ### chooses to split module lists into libraries.
20766 ###
20767 ### (see CF_LIB_RULES).
20768 echo "$as_me:20768: checking for library subsets" >&5
20769 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
20770 LIB_SUBSETS=
20771
20772 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
20773         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
20774         if test "$with_ticlib" != no ; then
20775                 LIB_SUBSETS="${LIB_SUBSETS} "
20776         else
20777                 LIB_SUBSETS="${LIB_SUBSETS}+"
20778         fi
20779 fi
20780
20781 LIB_SUBSETS="${LIB_SUBSETS}termlib"
20782 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
20783
20784 if test "$with_termlib" != no ; then
20785         LIB_SUBSETS="${LIB_SUBSETS} "
20786 else
20787         LIB_SUBSETS="${LIB_SUBSETS}+"
20788 fi
20789
20790 LIB_SUBSETS="${LIB_SUBSETS}base"
20791
20792 # Most term-driver calls are to tinfo, but some like init_pair are to the
20793 # base library (so it resides in base).
20794 if test "$with_term_driver" != no ; then
20795         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
20796         case $cf_cv_system_name in #(vi
20797         *mingw32*) #(vi
20798                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
20799                 ;;
20800         *) #(vi
20801                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
20802                 ;;
20803         esac
20804 fi
20805
20806 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
20807 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
20808
20809 echo "$as_me:20809: result: $LIB_SUBSETS" >&5
20810 echo "${ECHO_T}$LIB_SUBSETS" >&6
20811
20812 ### Construct the list of include-directories to be generated
20813
20814 if test "$GCC" != yes; then
20815         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20816 elif test "$includedir" != "/usr/include"; then
20817         if test "$includedir" = '${prefix}/include' ; then
20818                 if test x$prefix != x/usr ; then
20819                         CPPFLAGS="-I\${includedir} $CPPFLAGS"
20820                 fi
20821         else
20822                 CPPFLAGS="-I\${includedir} $CPPFLAGS"
20823         fi
20824 fi
20825 if test "$srcdir" != "."; then
20826         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
20827 fi
20828 CPPFLAGS="-I../include $CPPFLAGS"
20829 if test "$srcdir" != "."; then
20830         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
20831 fi
20832 CPPFLAGS="-I. $CPPFLAGS"
20833
20834 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
20835 if test "$srcdir" != "."; then
20836         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
20837 fi
20838 if test "$GCC" != yes; then
20839         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20840 elif test "$includedir" != "/usr/include"; then
20841         if test "$includedir" = '${prefix}/include' ; then
20842                 if test x$prefix != x/usr ; then
20843                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20844                 fi
20845         else
20846                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
20847         fi
20848 fi
20849
20850 ### Build up pieces for makefile rules
20851 echo "$as_me:20851: checking default library suffix" >&5
20852 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
20853
20854         case $DFT_LWR_MODEL in
20855         libtool) DFT_ARG_SUFFIX=''   ;;
20856         normal)  DFT_ARG_SUFFIX=''   ;;
20857         debug)   DFT_ARG_SUFFIX='_g' ;;
20858         profile) DFT_ARG_SUFFIX='_p' ;;
20859         shared)  DFT_ARG_SUFFIX=''   ;;
20860         esac
20861         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
20862 echo "$as_me:20862: result: $DFT_ARG_SUFFIX" >&5
20863 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
20864
20865 echo "$as_me:20865: checking default library-dependency suffix" >&5
20866 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
20867
20868         case X$DFT_LWR_MODEL in #(vi
20869         Xlibtool) #(vi
20870                 DFT_LIB_SUFFIX='.la'
20871                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20872                 ;;
20873         Xdebug) #(vi
20874                 DFT_LIB_SUFFIX='_g.a'
20875                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20876                 ;;
20877         Xprofile) #(vi
20878                 DFT_LIB_SUFFIX='_p.a'
20879                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20880                 ;;
20881         Xshared) #(vi
20882                 case $cf_cv_system_name in
20883                 aix[5-7]*) #(vi
20884                         DFT_LIB_SUFFIX='.so'
20885                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20886                         ;;
20887                 cygwin*|msys*|mingw*) #(vi
20888                         DFT_LIB_SUFFIX='.dll'
20889                         DFT_DEP_SUFFIX='.dll.a'
20890                         ;;
20891                 darwin*) #(vi
20892                         DFT_LIB_SUFFIX='.dylib'
20893                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20894                         ;;
20895                 hpux*) #(vi
20896                         case $target in
20897                         ia64*) #(vi
20898                                 DFT_LIB_SUFFIX='.so'
20899                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20900                                 ;;
20901                         *) #(vi
20902                                 DFT_LIB_SUFFIX='.sl'
20903                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20904                                 ;;
20905                         esac
20906                         ;;
20907                 *) #(vi
20908                         DFT_LIB_SUFFIX='.so'
20909                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20910                         ;;
20911                 esac
20912                 ;;
20913         *)
20914                 DFT_LIB_SUFFIX='.a'
20915                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
20916                 ;;
20917         esac
20918         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
20919         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
20920 echo "$as_me:20920: result: $DFT_DEP_SUFFIX" >&5
20921 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
20922
20923 echo "$as_me:20923: checking default object directory" >&5
20924 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
20925
20926         case $DFT_LWR_MODEL in
20927         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
20928         normal)  DFT_OBJ_SUBDIR='objects' ;;
20929         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
20930         profile) DFT_OBJ_SUBDIR='obj_p' ;;
20931         shared)
20932                 case $cf_cv_system_name in #(vi
20933                 cygwin|msys) #(vi
20934                         DFT_OBJ_SUBDIR='objects' ;;
20935                 *)
20936                         DFT_OBJ_SUBDIR='obj_s' ;;
20937                 esac
20938         esac
20939 echo "$as_me:20939: result: $DFT_OBJ_SUBDIR" >&5
20940 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
20941
20942 if test "x$cf_with_cxx" = xyes ; then
20943 echo "$as_me:20943: checking c++ library-dependency suffix" >&5
20944 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
20945 if test "$with_libtool" != "no"; then
20946         # libtool thinks it can make c++ shared libraries (perhaps only g++)
20947         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20948 elif test "$with_shared_cxx" != "no"; then
20949         # also for g++ users...
20950         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
20951 else
20952         # we normally make a static library because C/C++ library rules differ
20953
20954         case Xnormal in #(vi
20955         Xlibtool) #(vi
20956                 CXX_LIB_SUFFIX='.la'
20957                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20958                 ;;
20959         Xdebug) #(vi
20960                 CXX_LIB_SUFFIX='_g.a'
20961                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20962                 ;;
20963         Xprofile) #(vi
20964                 CXX_LIB_SUFFIX='_p.a'
20965                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20966                 ;;
20967         Xshared) #(vi
20968                 case $cf_cv_system_name in
20969                 aix[5-7]*) #(vi
20970                         CXX_LIB_SUFFIX='.so'
20971                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20972                         ;;
20973                 cygwin*|msys*|mingw*) #(vi
20974                         CXX_LIB_SUFFIX='.dll'
20975                         CXX_DEP_SUFFIX='.dll.a'
20976                         ;;
20977                 darwin*) #(vi
20978                         CXX_LIB_SUFFIX='.dylib'
20979                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20980                         ;;
20981                 hpux*) #(vi
20982                         case $target in
20983                         ia64*) #(vi
20984                                 CXX_LIB_SUFFIX='.so'
20985                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20986                                 ;;
20987                         *) #(vi
20988                                 CXX_LIB_SUFFIX='.sl'
20989                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20990                                 ;;
20991                         esac
20992                         ;;
20993                 *) #(vi
20994                         CXX_LIB_SUFFIX='.so'
20995                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
20996                         ;;
20997                 esac
20998                 ;;
20999         *)
21000                 CXX_LIB_SUFFIX='.a'
21001                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
21002                 ;;
21003         esac
21004         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
21005         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
21006
21007 fi
21008 echo "$as_me:21008: result: $CXX_LIB_SUFFIX" >&5
21009 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
21010
21011 fi
21012
21013 # do not want -ldl in build except as needed for -lncurses dependency
21014 if test "x$with_dlsym" = xyes ; then
21015 if test $DFT_LWR_MODEL = shared || \
21016    test $DFT_LWR_MODEL = libtool ; then
21017
21018 # remove dl library from $LIBS
21019 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
21020
21021 fi
21022 fi
21023 ### Set up low-level terminfo dependencies for makefiles.
21024
21025 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
21026 # do not need libdl
21027 TICS_LIST=
21028 if test "x$with_dlsym" = xyes ; then
21029
21030 # remove dl library from $SHLIB_LIST
21031 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
21032
21033 fi
21034
21035 if test "$with_ticlib" != no ; then
21036
21037         if test "x$with_ticlib" != xyes ; then
21038                 TICS_NAME=$with_ticlib
21039                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21040                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21041                 TICS_LIB_SUFFIX="${with_ticlib}"
21042         else
21043                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
21044                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
21045                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
21046         fi
21047         TICS_LDFLAGS="-L${LIB_DIR}"
21048         TICS_LIBS="-l${TICS_LIB_SUFFIX}"
21049 else
21050         TICS_LDFLAGS="-L${LIB_DIR}"
21051         TICS_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21052 fi
21053
21054 if test "$with_termlib" != no ; then
21055
21056         if test "x$with_termlib" != xyes ; then
21057                 TINFO_NAME=$with_termlib
21058                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21059                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21060                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
21061                 TINFO_LIB_SUFFIX="${with_termlib}"
21062         else
21063                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21064                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
21065                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
21066                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
21067         fi
21068
21069         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21070         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
21071         if test "$DFT_LWR_MODEL" = "libtool"; then
21072                 TEST_ARGS="${TEST_DEPS}"
21073                 TEST_ARG2="${TEST_DEP2}"
21074                 TINFO_LDFLAGS="-L${LIB_DIR}"
21075                 TINFO_LIBS="$TEST_ARGS"
21076                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
21077                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
21078         else
21079                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
21080                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
21081                 if test "x$with_term_driver" != xno ; then
21082                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21083                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21084                         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21085                 else
21086                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21087                         TINFO_LIBS="$TEST_ARGS"
21088                 fi
21089                 TINFO_LDFLAGS="-L${LIB_DIR}"
21090                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
21091         fi
21092 else
21093         # the next lines are needed for linking libtic over libncurses
21094         TINFO_NAME=${LIB_NAME}
21095         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
21096         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
21097         if test "x$with_tic_depends" = xyes ; then
21098                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
21099         else
21100                 TICS_LIST="$SHLIB_LIST"
21101         fi
21102
21103         TINFO_LDFLAGS="-L${LIB_DIR}"
21104         TINFO_LIBS="-l${LIB_NAME}${DFT_ARG_SUFFIX}"
21105 fi
21106
21107 if test "$DFT_LWR_MODEL" = shared ; then
21108         case $cf_cv_system_name in #(vi
21109         cygwin*|msys*)
21110                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
21111                 TINFO_SUFFIX=.dll
21112                 ;;
21113         esac
21114 fi
21115
21116 if test "x$with_dlsym" = xyes ; then
21117
21118 # remove dl library from $TICS_LIST
21119 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
21120
21121 fi
21122
21123 if test "$DFT_LWR_MODEL" = "libtool"; then
21124     OBJEXT=lo
21125 fi
21126
21127 # needed for Ada95
21128 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
21129
21130 case $DFT_LWR_MODEL in
21131 normal|debug|profile)
21132
21133 if test "$GCC" = yes ; then
21134         case $cf_cv_system_name in #(
21135         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
21136                 LDFLAGS_STATIC=
21137                 LDFLAGS_SHARED=
21138                 ;;
21139     *)  #( normally, except when broken
21140         LDFLAGS_STATIC=-static
21141         LDFLAGS_SHARED=-dynamic
21142         ;;
21143     esac
21144 else
21145         case $cf_cv_system_name in #(
21146         aix[4-7]*)      #( from ld manpage
21147                 LDFLAGS_STATIC=-bstatic
21148                 LDFLAGS_SHARED=-bdynamic
21149                 ;;
21150         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
21151                 # We could also use just "archive" and "shared".
21152                 LDFLAGS_STATIC=-Wl,-a,archive_shared
21153                 LDFLAGS_SHARED=-Wl,-a,shared_archive
21154                 ;;
21155         irix*)          #( from ld manpage IRIX64
21156                 LDFLAGS_STATIC=-Bstatic
21157                 LDFLAGS_SHARED=-Bdynamic
21158                 ;;
21159         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
21160                 # alternative "-oldstyle_liblookup" (not in cc manpage)
21161                 LDFLAGS_STATIC=-noso
21162                 LDFLAGS_SHARED=-so_archive
21163                 ;;
21164         solaris2*)
21165                 LDFLAGS_STATIC=-Bstatic
21166                 LDFLAGS_SHARED=-Bdynamic
21167                 ;;
21168         esac
21169 fi
21170
21171 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
21172 then
21173         echo "$as_me:21173: checking if linker supports switching between static/dynamic" >&5
21174 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
21175
21176         rm -f libconftest.a
21177         cat >conftest.$ac_ext <<EOF
21178 #line 21178 "configure"
21179 #include <stdio.h>
21180 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
21181 EOF
21182         if { (eval echo "$as_me:21182: \"$ac_compile\"") >&5
21183   (eval $ac_compile) 2>&5
21184   ac_status=$?
21185   echo "$as_me:21185: \$? = $ac_status" >&5
21186   (exit $ac_status); } ; then
21187                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
21188                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
21189         fi
21190         rm -f conftest.*
21191
21192         cf_save_LIBS="$LIBS"
21193
21194         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
21195         cat >conftest.$ac_ext <<_ACEOF
21196 #line 21196 "configure"
21197 #include "confdefs.h"
21198
21199 #line 21199 "configure"
21200 #include <stdio.h>
21201 int cf_ldflags_static(FILE *fp);
21202
21203 int
21204 main ()
21205 {
21206
21207         return cf_ldflags_static(stdin);
21208
21209   ;
21210   return 0;
21211 }
21212 _ACEOF
21213 rm -f conftest.$ac_objext conftest$ac_exeext
21214 if { (eval echo "$as_me:21214: \"$ac_link\"") >&5
21215   (eval $ac_link) 2>&5
21216   ac_status=$?
21217   echo "$as_me:21217: \$? = $ac_status" >&5
21218   (exit $ac_status); } &&
21219          { ac_try='test -s conftest$ac_exeext'
21220   { (eval echo "$as_me:21220: \"$ac_try\"") >&5
21221   (eval $ac_try) 2>&5
21222   ac_status=$?
21223   echo "$as_me:21223: \$? = $ac_status" >&5
21224   (exit $ac_status); }; }; then
21225
21226         # some linkers simply ignore the -dynamic
21227         case x`file conftest$ac_exeext 2>/dev/null` in #(vi
21228         *static*) # (vi
21229                 cf_ldflags_static=no
21230                 ;;
21231         *)
21232                 cf_ldflags_static=yes
21233                 ;;
21234         esac
21235
21236 else
21237   echo "$as_me: failed program was:" >&5
21238 cat conftest.$ac_ext >&5
21239 cf_ldflags_static=no
21240 fi
21241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21242
21243         rm -f libconftest.*
21244         LIBS="$cf_save_LIBS"
21245
21246         echo "$as_me:21246: result: $cf_ldflags_static" >&5
21247 echo "${ECHO_T}$cf_ldflags_static" >&6
21248
21249         if test $cf_ldflags_static != yes
21250         then
21251                 LDFLAGS_STATIC=
21252                 LDFLAGS_SHARED=
21253         fi
21254 else
21255         LDFLAGS_STATIC=
21256         LDFLAGS_SHARED=
21257 fi
21258
21259         ;;
21260 esac
21261
21262 echo "$as_me:21262: checking where we will install curses.h" >&5
21263 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
21264
21265 includesubdir=
21266 if test "$with_overwrite" = no && \
21267  ( test "x$includedir" = 'x${prefix}/include' || \
21268    test "x$includedir" = "x${prefix}/include" )
21269 then
21270         includesubdir="/ncurses${LIB_SUFFIX}"
21271 fi
21272 echo "$as_me:21272: result: ${includedir}${includesubdir}" >&5
21273 echo "${ECHO_T}${includedir}${includesubdir}" >&6
21274
21275 ### Resolve a conflict between normal and wide-curses by forcing applications
21276 ### that will need libutf8 to add it to their configure script.
21277 if test "$with_overwrite" != no ; then
21278 if test "$NCURSES_LIBUTF8" = 1 ; then
21279         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
21280         { echo "$as_me:21280: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
21281 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
21282 fi
21283 fi
21284 WITH_OVERWRITE=$with_overwrite
21285
21286 # used to separate tack out of the tree
21287 NCURSES_TREE=
21288
21289 ### predefined stuff for the test programs
21290
21291 cat >>confdefs.h <<\EOF
21292 #define HAVE_SLK_COLOR 1
21293 EOF
21294
21295 ### Construct the list of subdirectories for which we'll customize makefiles
21296 ### with the appropriate compile-rules.
21297
21298 echo "$as_me:21298: checking for src modules" >&5
21299 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
21300
21301 # dependencies and linker-arguments for test-programs
21302 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
21303 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
21304 if test "$DFT_LWR_MODEL" = "libtool"; then
21305         TEST_ARGS="${TEST_DEPS}"
21306         TEST_ARG2="${TEST_DEP2}"
21307 else
21308         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
21309         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
21310 fi
21311
21312 PC_MODULES_TO_MAKE="ncurses${DFT_ARG_SUFFIX}"
21313 cf_cv_src_modules=
21314 for cf_dir in $modules_to_build
21315 do
21316         if test -f $srcdir/$cf_dir/modules; then
21317
21318                 # We may/may not have tack in the distribution, though the
21319                 # makefile is.
21320                 if test $cf_dir = tack ; then
21321                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
21322                                 continue
21323                         fi
21324                 fi
21325
21326                 if test -z "$cf_cv_src_modules"; then
21327                         cf_cv_src_modules=$cf_dir
21328                 else
21329                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
21330                 fi
21331
21332                 # Make the ncurses_cfg.h file record the library interface files as
21333                 # well.  These are header files that are the same name as their
21334                 # directory.  Ncurses is the only library that does not follow
21335                 # that pattern.
21336                 if test $cf_dir = tack ; then
21337                         continue
21338                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
21339
21340 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21341
21342                         cat >>confdefs.h <<EOF
21343 #define HAVE_${cf_have_include}_H 1
21344 EOF
21345
21346                         cat >>confdefs.h <<EOF
21347 #define HAVE_LIB${cf_have_include} 1
21348 EOF
21349
21350                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
21351                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
21352                         if test "$DFT_LWR_MODEL" = "libtool"; then
21353                                 TEST_ARGS="${TEST_DEPS}"
21354                                 TEST_ARG2="${TEST_DEP2}"
21355                         else
21356                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
21357                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
21358                         fi
21359                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${DFT_ARG_SUFFIX}"
21360                 fi
21361         fi
21362 done
21363 echo "$as_me:21363: result: $cf_cv_src_modules" >&5
21364 echo "${ECHO_T}$cf_cv_src_modules" >&6
21365
21366 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
21367 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
21368
21369 SRC_SUBDIRS=
21370 if test "x$cf_with_manpages" != xno ; then
21371         SRC_SUBDIRS="$SRC_SUBDIRS man"
21372 fi
21373 SRC_SUBDIRS="$SRC_SUBDIRS include"
21374 for cf_dir in $cf_cv_src_modules
21375 do
21376         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
21377 done
21378 if test "x$cf_with_tests" != "xno" ; then
21379         SRC_SUBDIRS="$SRC_SUBDIRS test"
21380 fi
21381 if test "x$cf_with_db_install" = xyes; then
21382         test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
21383 fi
21384 if test "$cf_with_cxx_binding" != no; then
21385         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${DFT_ARG_SUFFIX}"
21386         SRC_SUBDIRS="$SRC_SUBDIRS c++"
21387 fi
21388
21389 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
21390 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
21391
21392 ADA_SUBDIRS=
21393 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f $srcdir/Ada95/Makefile.in; then
21394         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
21395         ADA_SUBDIRS="gen src"
21396         if test "x$cf_with_tests" != "xno" ; then
21397                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
21398         fi
21399 fi
21400
21401 SUB_MAKEFILES=
21402 for cf_dir in $SRC_SUBDIRS
21403 do
21404         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
21405 done
21406
21407 if test -n "$ADA_SUBDIRS"; then
21408         for cf_dir in $ADA_SUBDIRS
21409         do
21410                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
21411         done
21412
21413 fi
21414
21415 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
21416    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
21417    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
21418 fi
21419
21420 DIRS_TO_MAKE="lib"
21421 for cf_item in $cf_list_models
21422 do
21423
21424         case $cf_item in
21425         libtool) cf_subdir='obj_lo'  ;;
21426         normal)  cf_subdir='objects' ;;
21427         debug)   cf_subdir='obj_g' ;;
21428         profile) cf_subdir='obj_p' ;;
21429         shared)
21430                 case $cf_cv_system_name in #(vi
21431                 cygwin|msys) #(vi
21432                         cf_subdir='objects' ;;
21433                 *)
21434                         cf_subdir='obj_s' ;;
21435                 esac
21436         esac
21437
21438         for cf_item2 in $DIRS_TO_MAKE
21439         do
21440                 test $cf_item2 = $cf_subdir && break
21441         done
21442         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
21443 done
21444 for cf_dir in $DIRS_TO_MAKE
21445 do
21446         test ! -d $cf_dir && mkdir $cf_dir
21447 done
21448
21449 # symbols that differ when compiling Ada95 by itself.
21450 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
21451
21452 # values to use as strings
21453
21454 cat >>confdefs.h <<EOF
21455 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
21456 EOF
21457
21458 cat >>confdefs.h <<EOF
21459 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
21460 EOF
21461
21462 ### Now that we're done running tests, add the compiler-warnings, if any
21463
21464 cf_fix_cppflags=no
21465 cf_new_cflags=
21466 cf_new_cppflags=
21467 cf_new_extra_cppflags=
21468
21469 for cf_add_cflags in $EXTRA_CFLAGS
21470 do
21471 case $cf_fix_cppflags in
21472 no)
21473         case $cf_add_cflags in #(vi
21474         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
21475                 case $cf_add_cflags in
21476                 -D*)
21477                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21478
21479                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21480                                 && test -z "${cf_tst_cflags}" \
21481                                 && cf_fix_cppflags=yes
21482
21483                         if test $cf_fix_cppflags = yes ; then
21484                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21485                                 continue
21486                         elif test "${cf_tst_cflags}" = "\"'" ; then
21487                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21488                                 continue
21489                         fi
21490                         ;;
21491                 esac
21492                 case "$CPPFLAGS" in
21493                 *$cf_add_cflags) #(vi
21494                         ;;
21495                 *) #(vi
21496                         case $cf_add_cflags in #(vi
21497                         -D*)
21498                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21499
21500 CPPFLAGS=`echo "$CPPFLAGS" | \
21501         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21502                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21503
21504                                 ;;
21505                         esac
21506                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
21507                         ;;
21508                 esac
21509                 ;;
21510         *)
21511                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
21512                 ;;
21513         esac
21514         ;;
21515 yes)
21516         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
21517
21518         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
21519
21520         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21521                 && test -z "${cf_tst_cflags}" \
21522                 && cf_fix_cppflags=no
21523         ;;
21524 esac
21525 done
21526
21527 if test -n "$cf_new_cflags" ; then
21528
21529         CFLAGS="$CFLAGS $cf_new_cflags"
21530 fi
21531
21532 if test -n "$cf_new_cppflags" ; then
21533
21534         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
21535 fi
21536
21537 if test -n "$cf_new_extra_cppflags" ; then
21538
21539         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
21540 fi
21541
21542 ### Define substitutions for header files to avoid name-pollution
21543
21544 if test "x$cf_cv_have_tcgetattr" = xyes ; then
21545         HAVE_TCGETATTR=1
21546 else
21547         HAVE_TCGETATTR=0
21548 fi
21549
21550 if test "x$ac_cv_header_stdint_h" = xyes ; then
21551         HAVE_STDINT_H=1
21552 else
21553         HAVE_STDINT_H=0
21554 fi
21555
21556 if test "x$ac_cv_header_termio_h" = xyes ; then
21557         HAVE_TERMIO_H=1
21558 else
21559         HAVE_TERMIO_H=0
21560 fi
21561
21562 if test "x$ac_cv_header_termios_h" = xyes ; then
21563         HAVE_TERMIOS_H=1
21564 else
21565         HAVE_TERMIOS_H=0
21566 fi
21567
21568 ################################################################################
21569 test "x$use_database" = xyes && \
21570 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
21571
21572 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
21573 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
21574
21575 if test "x$enable_pc_files" = xyes ; then \
21576 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
21577 MAKE_PC_FILES=
21578 else
21579 MAKE_PC_FILES="#"
21580 fi
21581
21582 # Extract the first word of "tic", so it can be a program name with args.
21583 set dummy tic; ac_word=$2
21584 echo "$as_me:21584: checking for $ac_word" >&5
21585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21586 if test "${ac_cv_path_TIC_PATH+set}" = set; then
21587   echo $ECHO_N "(cached) $ECHO_C" >&6
21588 else
21589   case $TIC_PATH in
21590   [\\/]* | ?:[\\/]*)
21591   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
21592   ;;
21593   *)
21594   ac_save_IFS=$IFS; IFS=$ac_path_separator
21595 ac_dummy="$PATH:/usr/local/ncurses/bin"
21596 for ac_dir in $ac_dummy; do
21597   IFS=$ac_save_IFS
21598   test -z "$ac_dir" && ac_dir=.
21599   if $as_executable_p "$ac_dir/$ac_word"; then
21600    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
21601    echo "$as_me:21601: found $ac_dir/$ac_word" >&5
21602    break
21603 fi
21604 done
21605
21606   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
21607   ;;
21608 esac
21609 fi
21610 TIC_PATH=$ac_cv_path_TIC_PATH
21611
21612 if test -n "$TIC_PATH"; then
21613   echo "$as_me:21613: result: $TIC_PATH" >&5
21614 echo "${ECHO_T}$TIC_PATH" >&6
21615 else
21616   echo "$as_me:21616: result: no" >&5
21617 echo "${ECHO_T}no" >&6
21618 fi
21619
21620 if test -n "$FALLBACK_LIST"
21621 then
21622         if test "$TIC_PATH" = unknown
21623         then
21624                 { echo "$as_me:21624: WARNING: no tic program found for fallbacks" >&5
21625 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
21626         fi
21627 fi
21628
21629 if test "x$cf_with_tests" != xno ; then
21630         MAKE_TESTS=
21631 else
21632         MAKE_TESTS="#"
21633 fi
21634
21635 ADAHTML_DIR=../../doc/html/ada
21636
21637 # these could be configurable, but are not currently
21638 PANEL_NAME=panel
21639 MENU_NAME=menu
21640 FORM_NAME=form
21641 CXX_NAME=ncurses++
21642
21643 # workaround for g++ versus Solaris (20131116)
21644 case $cf_cv_system_name in #(vi
21645 solaris2*) #(vi
21646         case "x$CPPFLAGS" in #(vi
21647         *-D_XOPEN_SOURCE_EXTENDED*)
21648                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
21649
21650 echo "${as_me:-configure}:21650: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
21651
21652                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
21653                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
21654                 ;;
21655         esac
21656         ;;
21657 esac
21658
21659 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
21660 case "x$NCURSES_OSPEED" in #(vi
21661 *short*) #(vi
21662         cf_compatible=1
21663         ;;
21664 *)
21665         cf_compatible=0
21666         ;;
21667 esac
21668
21669 cat >>confdefs.h <<EOF
21670 #define NCURSES_OSPEED_COMPAT $cf_compatible
21671 EOF
21672
21673 case "x$cf_cv_typeof_chtype" in
21674 xshort|xint|xlong)
21675         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
21676         ;;
21677 esac
21678
21679 case "x$cf_cv_typeof_mmask_t" in
21680 xshort|xint|xlong)
21681         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
21682         ;;
21683 esac
21684
21685 SUB_SCRIPTS=
21686
21687 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"
21688 ac_config_commands="$ac_config_commands default"
21689 cat >confcache <<\_ACEOF
21690 # This file is a shell script that caches the results of configure
21691 # tests run on this system so they can be shared between configure
21692 # scripts and configure runs, see configure's option --config-cache.
21693 # It is not useful on other systems.  If it contains results you don't
21694 # want to keep, you may remove or edit it.
21695 #
21696 # config.status only pays attention to the cache file if you give it
21697 # the --recheck option to rerun configure.
21698 #
21699 # `ac_cv_env_foo' variables (set or unset) will be overriden when
21700 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21701 # following values.
21702
21703 _ACEOF
21704
21705 # The following way of writing the cache mishandles newlines in values,
21706 # but we know of no workaround that is simple, portable, and efficient.
21707 # So, don't put newlines in cache variables' values.
21708 # Ultrix sh set writes to stderr and can't be redirected directly,
21709 # and sets the high bit in the cache file unless we assign to the vars.
21710 {
21711   (set) 2>&1 |
21712     case `(ac_space=' '; set | grep ac_space) 2>&1` in
21713     *ac_space=\ *)
21714       # `set' does not quote correctly, so add quotes (double-quote
21715       # substitution turns \\\\ into \\, and sed turns \\ into \).
21716       sed -n \
21717         "s/'/'\\\\''/g;
21718           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21719       ;;
21720     *)
21721       # `set' quotes correctly as required by POSIX, so do not add quotes.
21722       sed -n \
21723         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21724       ;;
21725     esac;
21726 } |
21727   sed '
21728      t clear
21729      : clear
21730      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21731      t end
21732      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21733      : end' >>confcache
21734 if cmp -s $cache_file confcache; then :; else
21735   if test -w $cache_file; then
21736     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21737     cat confcache >$cache_file
21738   else
21739     echo "not updating unwritable cache $cache_file"
21740   fi
21741 fi
21742 rm -f confcache
21743
21744 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21745 # Let make expand exec_prefix.
21746 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21747
21748 # VPATH may cause trouble with some makes, so we remove $(srcdir),
21749 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21750 # trailing colons and then remove the whole line if VPATH becomes empty
21751 # (actually we leave an empty line to preserve line numbers).
21752 if test "x$srcdir" = x.; then
21753   ac_vpsub='/^[         ]*VPATH[        ]*=/{
21754 s/:*\$(srcdir):*/:/;
21755 s/:*\${srcdir}:*/:/;
21756 s/:*@srcdir@:*/:/;
21757 s/^\([^=]*=[    ]*\):*/\1/;
21758 s/:*$//;
21759 s/^[^=]*=[      ]*$//;
21760 }'
21761 fi
21762
21763 DEFS=-DHAVE_CONFIG_H
21764
21765 : ${CONFIG_STATUS=./config.status}
21766 ac_clean_files_save=$ac_clean_files
21767 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21768 { echo "$as_me:21768: creating $CONFIG_STATUS" >&5
21769 echo "$as_me: creating $CONFIG_STATUS" >&6;}
21770 cat >$CONFIG_STATUS <<_ACEOF
21771 #! $SHELL
21772 # Generated automatically by configure.
21773 # Run this file to recreate the current configuration.
21774 # Compiler output produced by configure, useful for debugging
21775 # configure, is in config.log if it exists.
21776
21777 debug=false
21778 SHELL=\${CONFIG_SHELL-$SHELL}
21779 ac_cs_invocation="\$0 \$@"
21780
21781 _ACEOF
21782
21783 cat >>$CONFIG_STATUS <<\_ACEOF
21784 # Be Bourne compatible
21785 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21786   emulate sh
21787   NULLCMD=:
21788 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21789   set -o posix
21790 fi
21791
21792 # Name of the executable.
21793 as_me=`echo "$0" |sed 's,.*[\\/],,'`
21794
21795 if expr a : '\(a\)' >/dev/null 2>&1; then
21796   as_expr=expr
21797 else
21798   as_expr=false
21799 fi
21800
21801 rm -f conf$$ conf$$.exe conf$$.file
21802 echo >conf$$.file
21803 if ln -s conf$$.file conf$$ 2>/dev/null; then
21804   # We could just check for DJGPP; but this test a) works b) is more generic
21805   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21806   if test -f conf$$.exe; then
21807     # Don't use ln at all; we don't have any links
21808     as_ln_s='cp -p'
21809   else
21810     as_ln_s='ln -s'
21811   fi
21812 elif ln conf$$.file conf$$ 2>/dev/null; then
21813   as_ln_s=ln
21814 else
21815   as_ln_s='cp -p'
21816 fi
21817 rm -f conf$$ conf$$.exe conf$$.file
21818
21819 as_executable_p="test -f"
21820
21821 # Support unset when possible.
21822 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21823   as_unset=unset
21824 else
21825   as_unset=false
21826 fi
21827
21828 # NLS nuisances.
21829 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21830 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21831 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21832 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21833 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21834 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21835 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21836 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21837
21838 # IFS
21839 # We need space, tab and new line, in precisely that order.
21840 as_nl='
21841 '
21842 IFS="   $as_nl"
21843
21844 # CDPATH.
21845 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21846
21847 exec 6>&1
21848
21849 _ACEOF
21850
21851 # Files that config.status was made for.
21852 if test -n "$ac_config_files"; then
21853   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21854 fi
21855
21856 if test -n "$ac_config_headers"; then
21857   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21858 fi
21859
21860 if test -n "$ac_config_links"; then
21861   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21862 fi
21863
21864 if test -n "$ac_config_commands"; then
21865   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21866 fi
21867
21868 cat >>$CONFIG_STATUS <<\EOF
21869
21870 ac_cs_usage="\
21871 \`$as_me' instantiates files from templates according to the
21872 current configuration.
21873
21874 Usage: $0 [OPTIONS] [FILE]...
21875
21876   -h, --help       print this help, then exit
21877   -V, --version    print version number, then exit
21878   -d, --debug      don't remove temporary files
21879       --recheck    update $as_me by reconfiguring in the same conditions
21880   --file=FILE[:TEMPLATE]
21881                    instantiate the configuration file FILE
21882   --header=FILE[:TEMPLATE]
21883                    instantiate the configuration header FILE
21884
21885 Configuration files:
21886 $config_files
21887
21888 Configuration headers:
21889 $config_headers
21890
21891 Configuration commands:
21892 $config_commands
21893
21894 Report bugs to <dickey@invisible-island.net>."
21895 EOF
21896
21897 cat >>$CONFIG_STATUS <<EOF
21898 ac_cs_version="\\
21899 config.status
21900 configured by $0, generated by GNU Autoconf 2.52.20121002,
21901   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21902
21903 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21904 Free Software Foundation, Inc.
21905 This config.status script is free software; the Free Software Foundation
21906 gives unlimited permission to copy, distribute and modify it."
21907 srcdir=$srcdir
21908 INSTALL="$INSTALL"
21909 EOF
21910
21911 cat >>$CONFIG_STATUS <<\EOF
21912 # If no file are specified by the user, then we need to provide default
21913 # value.  By we need to know if files were specified by the user.
21914 ac_need_defaults=:
21915 while test $# != 0
21916 do
21917   case $1 in
21918   --*=*)
21919     ac_option=`expr "x$1" : 'x\([^=]*\)='`
21920     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21921     shift
21922     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21923     shift
21924     ;;
21925   -*);;
21926   *) # This is not an option, so the user has probably given explicit
21927      # arguments.
21928      ac_need_defaults=false;;
21929   esac
21930
21931   case $1 in
21932   # Handling of the options.
21933 EOF
21934 cat >>$CONFIG_STATUS <<EOF
21935   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21936     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21937     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21938 EOF
21939 cat >>$CONFIG_STATUS <<\EOF
21940   --version | --vers* | -V )
21941     echo "$ac_cs_version"; exit 0 ;;
21942   --he | --h)
21943     # Conflict between --help and --header
21944     { { echo "$as_me:21944: error: ambiguous option: $1
21945 Try \`$0 --help' for more information." >&5
21946 echo "$as_me: error: ambiguous option: $1
21947 Try \`$0 --help' for more information." >&2;}
21948    { (exit 1); exit 1; }; };;
21949   --help | --hel | -h )
21950     echo "$ac_cs_usage"; exit 0 ;;
21951   --debug | --d* | -d )
21952     debug=: ;;
21953   --file | --fil | --fi | --f )
21954     shift
21955     CONFIG_FILES="$CONFIG_FILES $1"
21956     ac_need_defaults=false;;
21957   --header | --heade | --head | --hea )
21958     shift
21959     CONFIG_HEADERS="$CONFIG_HEADERS $1"
21960     ac_need_defaults=false;;
21961
21962   # This is an error.
21963   -*) { { echo "$as_me:21963: error: unrecognized option: $1
21964 Try \`$0 --help' for more information." >&5
21965 echo "$as_me: error: unrecognized option: $1
21966 Try \`$0 --help' for more information." >&2;}
21967    { (exit 1); exit 1; }; } ;;
21968
21969   *) ac_config_targets="$ac_config_targets $1" ;;
21970
21971   esac
21972   shift
21973 done
21974
21975 exec 5>>config.log
21976 cat >&5 << _ACEOF
21977
21978 ## ----------------------- ##
21979 ## Running config.status.  ##
21980 ## ----------------------- ##
21981
21982 This file was extended by $as_me 2.52.20121002, executed with
21983   CONFIG_FILES    = $CONFIG_FILES
21984   CONFIG_HEADERS  = $CONFIG_HEADERS
21985   CONFIG_LINKS    = $CONFIG_LINKS
21986   CONFIG_COMMANDS = $CONFIG_COMMANDS
21987   > $ac_cs_invocation
21988 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21989
21990 _ACEOF
21991 EOF
21992
21993 cat >>$CONFIG_STATUS <<EOF
21994 #
21995 # INIT-COMMANDS section.
21996 #
21997
21998 ### Special initialization commands, used to pass information from the
21999 ### configuration-run into config.status
22000
22001 AWK="$AWK"
22002 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
22003 DFT_LWR_MODEL="$DFT_LWR_MODEL"
22004 ECHO_LD="$ECHO_LD"
22005 LDCONFIG="$LDCONFIG"
22006 LIBTOOL_VERSION="$LIBTOOL_VERSION"
22007 LIB_NAME="$LIB_NAME"
22008 LIB_PREFIX="$LIB_PREFIX"
22009 LIB_SUBSETS="$LIB_SUBSETS"
22010 LIB_SUFFIX="$LIB_SUFFIX"
22011 LIB_TRACING="$LIB_TRACING"
22012 LN_S="$LN_S"
22013 MAKE_TERMINFO="$MAKE_TERMINFO"
22014 NCURSES_MAJOR="$NCURSES_MAJOR"
22015 NCURSES_MINOR="$NCURSES_MINOR"
22016 NCURSES_OSPEED="$NCURSES_OSPEED"
22017 NCURSES_PATCH="$NCURSES_PATCH"
22018 SRC_SUBDIRS="$SRC_SUBDIRS"
22019 TERMINFO="$TERMINFO"
22020 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
22021 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
22022 TICS_NAME="$TICS_NAME"
22023 TIC_PATH="$TIC_PATH"
22024 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
22025 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
22026 TINFO_NAME="$TINFO_NAME"
22027 TINFO_SUFFIX="$TINFO_SUFFIX"
22028 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
22029 WITH_CURSES_H="$with_curses_h"
22030 WITH_ECHO="${enable_echo:=yes}"
22031 WITH_OVERWRITE="$with_overwrite"
22032 cf_LIST_MODELS="$cf_list_models"
22033 cf_cv_abi_version="$cf_cv_abi_version"
22034 cf_cv_do_relink="$cf_cv_do_relink"
22035 cf_cv_do_symlinks="$cf_cv_do_symlinks"
22036 cf_cv_enable_lp64="$cf_cv_enable_lp64"
22037 cf_cv_enable_opaque="$cf_cv_enable_opaque"
22038 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
22039 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
22040 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
22041 cf_cv_rel_version="$cf_cv_rel_version"
22042 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
22043 cf_cv_shared_soname='$cf_cv_shared_soname'
22044 cf_cv_shlib_version="$cf_cv_shlib_version"
22045 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
22046 cf_cv_system_name="$cf_cv_system_name"
22047 cf_cv_term_driver="$with_term_driver"
22048 cf_with_ada="$cf_with_ada"
22049 cf_with_cxx_binding="$cf_with_cxx_binding"
22050 cf_with_db_install="$cf_with_db_install"
22051 cf_with_manpages="$cf_with_manpages"
22052 cf_with_tests="$cf_with_tests"
22053 with_shared_cxx="$with_shared_cxx"
22054 host="$host"
22055 target="$target"
22056
22057 EOF
22058
22059 cat >>$CONFIG_STATUS <<\EOF
22060 for ac_config_target in $ac_config_targets
22061 do
22062   case "$ac_config_target" in
22063   # Handling of arguments.
22064   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
22065   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
22066   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
22067   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
22068   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
22069   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
22070   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
22071   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22072   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
22073   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
22074   *) { { echo "$as_me:22074: error: invalid argument: $ac_config_target" >&5
22075 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22076    { (exit 1); exit 1; }; };;
22077   esac
22078 done
22079
22080 # If the user did not use the arguments to specify the items to instantiate,
22081 # then the envvar interface is used.  Set only those that are not.
22082 # We use the long form for the default assignment because of an extremely
22083 # bizarre bug on SunOS 4.1.3.
22084 if $ac_need_defaults; then
22085   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22086   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22087   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
22088 fi
22089
22090 # Create a temporary directory, and hook for its removal unless debugging.
22091 $debug ||
22092 {
22093   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22094   trap '{ (exit 1); exit 1; }' 1 2 13 15
22095 }
22096
22097 # Create a (secure) tmp directory for tmp files.
22098 : ${TMPDIR=/tmp}
22099 {
22100   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22101   test -n "$tmp" && test -d "$tmp"
22102 }  ||
22103 {
22104   tmp=$TMPDIR/cs$$-$RANDOM
22105   (umask 077 && mkdir $tmp)
22106 } ||
22107 {
22108    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22109    { (exit 1); exit 1; }
22110 }
22111
22112 EOF
22113
22114 cat >>$CONFIG_STATUS <<EOF
22115
22116 #
22117 # CONFIG_FILES section.
22118 #
22119
22120 # No need to generate the scripts if there are no CONFIG_FILES.
22121 # This happens for instance when ./config.status config.h
22122 if test -n "\$CONFIG_FILES"; then
22123   # Protect against being on the right side of a sed subst in config.status.
22124   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22125    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22126 s,@SHELL@,$SHELL,;t t
22127 s,@exec_prefix@,$exec_prefix,;t t
22128 s,@prefix@,$prefix,;t t
22129 s,@program_transform_name@,$program_transform_name,;t t
22130 s,@bindir@,$bindir,;t t
22131 s,@sbindir@,$sbindir,;t t
22132 s,@libexecdir@,$libexecdir,;t t
22133 s,@datarootdir@,$datarootdir,;t t
22134 s,@datadir@,$datadir,;t t
22135 s,@sysconfdir@,$sysconfdir,;t t
22136 s,@sharedstatedir@,$sharedstatedir,;t t
22137 s,@localstatedir@,$localstatedir,;t t
22138 s,@libdir@,$libdir,;t t
22139 s,@includedir@,$includedir,;t t
22140 s,@oldincludedir@,$oldincludedir,;t t
22141 s,@infodir@,$infodir,;t t
22142 s,@mandir@,$mandir,;t t
22143 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22144 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22145 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22146 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22147 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22148 s,@build_alias@,$build_alias,;t t
22149 s,@host_alias@,$host_alias,;t t
22150 s,@target_alias@,$target_alias,;t t
22151 s,@ECHO_C@,$ECHO_C,;t t
22152 s,@ECHO_N@,$ECHO_N,;t t
22153 s,@ECHO_T@,$ECHO_T,;t t
22154 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22155 s,@DEFS@,$DEFS,;t t
22156 s,@LIBS@,$LIBS,;t t
22157 s,@top_builddir@,$top_builddir,;t t
22158 s,@EGREP@,$EGREP,;t t
22159 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
22160 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
22161 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
22162 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
22163 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
22164 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
22165 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
22166 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
22167 s,@build@,$build,;t t
22168 s,@build_cpu@,$build_cpu,;t t
22169 s,@build_vendor@,$build_vendor,;t t
22170 s,@build_os@,$build_os,;t t
22171 s,@host@,$host,;t t
22172 s,@host_cpu@,$host_cpu,;t t
22173 s,@host_vendor@,$host_vendor,;t t
22174 s,@host_os@,$host_os,;t t
22175 s,@target@,$target,;t t
22176 s,@target_cpu@,$target_cpu,;t t
22177 s,@target_vendor@,$target_vendor,;t t
22178 s,@target_os@,$target_os,;t t
22179 s,@CC@,$CC,;t t
22180 s,@CFLAGS@,$CFLAGS,;t t
22181 s,@LDFLAGS@,$LDFLAGS,;t t
22182 s,@CPPFLAGS@,$CPPFLAGS,;t t
22183 s,@ac_ct_CC@,$ac_ct_CC,;t t
22184 s,@EXEEXT@,$EXEEXT,;t t
22185 s,@OBJEXT@,$OBJEXT,;t t
22186 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22187 s,@CPP@,$CPP,;t t
22188 s,@LDCONFIG@,$LDCONFIG,;t t
22189 s,@CXX@,$CXX,;t t
22190 s,@CXXFLAGS@,$CXXFLAGS,;t t
22191 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
22192 s,@AWK@,$AWK,;t t
22193 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22194 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22195 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22196 s,@LINT@,$LINT,;t t
22197 s,@LINT_OPTS@,$LINT_OPTS,;t t
22198 s,@LN_S@,$LN_S,;t t
22199 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22200 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22201 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
22202 s,@SET_MAKE@,$SET_MAKE,;t t
22203 s,@CTAGS@,$CTAGS,;t t
22204 s,@ETAGS@,$ETAGS,;t t
22205 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22206 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22207 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
22208 s,@RANLIB@,$RANLIB,;t t
22209 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
22210 s,@LD@,$LD,;t t
22211 s,@ac_ct_LD@,$ac_ct_LD,;t t
22212 s,@AR@,$AR,;t t
22213 s,@ac_ct_AR@,$ac_ct_AR,;t t
22214 s,@NM@,$NM,;t t
22215 s,@ac_ct_NM@,$ac_ct_NM,;t t
22216 s,@ARFLAGS@,$ARFLAGS,;t t
22217 s,@DESTDIR@,$DESTDIR,;t t
22218 s,@BUILD_CC@,$BUILD_CC,;t t
22219 s,@BUILD_CPP@,$BUILD_CPP,;t t
22220 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
22221 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
22222 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
22223 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
22224 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
22225 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
22226 s,@cf_list_models@,$cf_list_models,;t t
22227 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
22228 s,@LIBTOOL@,$LIBTOOL,;t t
22229 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
22230 s,@LT_UNDEF@,$LT_UNDEF,;t t
22231 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
22232 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
22233 s,@LIB_CREATE@,$LIB_CREATE,;t t
22234 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
22235 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
22236 s,@LIB_PREP@,$LIB_PREP,;t t
22237 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
22238 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
22239 s,@LIB_LINK@,$LIB_LINK,;t t
22240 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
22241 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
22242 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
22243 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
22244 s,@TICS_NAME@,$TICS_NAME,;t t
22245 s,@TINFO_NAME@,$TINFO_NAME,;t t
22246 s,@LIB_NAME@,$LIB_NAME,;t t
22247 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
22248 s,@CC_G_OPT@,$CC_G_OPT,;t t
22249 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
22250 s,@LD_MODEL@,$LD_MODEL,;t t
22251 s,@shlibdir@,$shlibdir,;t t
22252 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
22253 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
22254 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
22255 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
22256 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
22257 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
22258 s,@LINK_PROGS@,$LINK_PROGS,;t t
22259 s,@LINK_TESTS@,$LINK_TESTS,;t t
22260 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22261 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
22262 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
22263 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
22264 s,@RPATH_LIST@,$RPATH_LIST,;t t
22265 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22266 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
22267 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
22268 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
22269 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
22270 s,@XTERM_KBS@,$XTERM_KBS,;t t
22271 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
22272 s,@TERMINFO@,$TERMINFO,;t t
22273 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
22274 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
22275 s,@TERMPATH@,$TERMPATH,;t t
22276 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
22277 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
22278 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
22279 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
22280 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
22281 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
22282 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
22283 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
22284 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
22285 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
22286 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
22287 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
22288 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
22289 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
22290 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
22291 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
22292 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
22293 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
22294 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
22295 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
22296 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
22297 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
22298 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
22299 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
22300 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
22301 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
22302 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
22303 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
22304 s,@PTHREAD@,$PTHREAD,;t t
22305 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
22306 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
22307 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
22308 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
22309 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
22310 s,@ECHO_LT@,$ECHO_LT,;t t
22311 s,@ECHO_LD@,$ECHO_LD,;t t
22312 s,@RULE_CC@,$RULE_CC,;t t
22313 s,@SHOW_CC@,$SHOW_CC,;t t
22314 s,@ECHO_CC@,$ECHO_CC,;t t
22315 s,@ECHO_LINK@,$ECHO_LINK,;t t
22316 s,@ADAFLAGS@,$ADAFLAGS,;t t
22317 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22318 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
22319 s,@ADA_TRACE@,$ADA_TRACE,;t t
22320 s,@MATH_LIB@,$MATH_LIB,;t t
22321 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
22322 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
22323 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
22324 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
22325 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
22326 s,@TEST_LIBS@,$TEST_LIBS,;t t
22327 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
22328 s,@CXXCPP@,$CXXCPP,;t t
22329 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
22330 s,@CXX_AR@,$CXX_AR,;t t
22331 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
22332 s,@CXXLIBS@,$CXXLIBS,;t t
22333 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
22334 s,@gnat_exists@,$gnat_exists,;t t
22335 s,@M4_exists@,$M4_exists,;t t
22336 s,@cf_ada_make@,$cf_ada_make,;t t
22337 s,@cf_compile_generics@,$cf_compile_generics,;t t
22338 s,@cf_generic_objects@,$cf_generic_objects,;t t
22339 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
22340 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
22341 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
22342 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
22343 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
22344 s,@cf_ada_package@,$cf_ada_package,;t t
22345 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
22346 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
22347 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
22348 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
22349 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
22350 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
22351 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
22352 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
22353 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
22354 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
22355 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
22356 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
22357 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
22358 s,@TICS_LIBS@,$TICS_LIBS,;t t
22359 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
22360 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
22361 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
22362 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
22363 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
22364 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
22365 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
22366 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
22367 s,@includesubdir@,$includesubdir,;t t
22368 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
22369 s,@TICS_LIST@,$TICS_LIST,;t t
22370 s,@TINFO_LIST@,$TINFO_LIST,;t t
22371 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
22372 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
22373 s,@TEST_ARGS@,$TEST_ARGS,;t t
22374 s,@TEST_DEPS@,$TEST_DEPS,;t t
22375 s,@TEST_ARG2@,$TEST_ARG2,;t t
22376 s,@TEST_DEP2@,$TEST_DEP2,;t t
22377 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
22378 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
22379 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
22380 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
22381 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
22382 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
22383 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
22384 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
22385 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
22386 s,@cross_compiling@,$cross_compiling,;t t
22387 s,@TIC_PATH@,$TIC_PATH,;t t
22388 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
22389 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
22390 s,@PANEL_NAME@,$PANEL_NAME,;t t
22391 s,@MENU_NAME@,$MENU_NAME,;t t
22392 s,@FORM_NAME@,$FORM_NAME,;t t
22393 s,@CXX_NAME@,$CXX_NAME,;t t
22394 CEOF
22395
22396 EOF
22397
22398   cat >>$CONFIG_STATUS <<\EOF
22399   # Split the substitutions into bite-sized pieces for seds with
22400   # small command number limits, like on Digital OSF/1 and HP-UX.
22401   ac_max_sed_lines=48
22402   ac_sed_frag=1 # Number of current file.
22403   ac_beg=1 # First line for current file.
22404   ac_end=$ac_max_sed_lines # Line after last line for current file.
22405   ac_more_lines=:
22406   ac_sed_cmds=
22407   while $ac_more_lines; do
22408     if test $ac_beg -gt 1; then
22409       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22410     else
22411       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22412     fi
22413     if test ! -s $tmp/subs.frag; then
22414       ac_more_lines=false
22415     else
22416       # The purpose of the label and of the branching condition is to
22417       # speed up the sed processing (if there are no `@' at all, there
22418       # is no need to browse any of the substitutions).
22419       # These are the two extra sed commands mentioned above.
22420       (echo ':t
22421   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22422       if test -z "$ac_sed_cmds"; then
22423         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22424       else
22425         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22426       fi
22427       ac_sed_frag=`expr $ac_sed_frag + 1`
22428       ac_beg=$ac_end
22429       ac_end=`expr $ac_end + $ac_max_sed_lines`
22430     fi
22431   done
22432   if test -z "$ac_sed_cmds"; then
22433     ac_sed_cmds=cat
22434   fi
22435 fi # test -n "$CONFIG_FILES"
22436
22437 EOF
22438 cat >>$CONFIG_STATUS <<\EOF
22439 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22440   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22441   case $ac_file in
22442   - | *:- | *:-:* ) # input from stdin
22443         cat >$tmp/stdin
22444         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22445         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22446   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22447         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22448   * )   ac_file_in=$ac_file.in ;;
22449   esac
22450
22451   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22452   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22453          X"$ac_file" : 'X\(//\)[^/]' \| \
22454          X"$ac_file" : 'X\(//\)$' \| \
22455          X"$ac_file" : 'X\(/\)' \| \
22456          .     : '\(.\)' 2>/dev/null ||
22457 echo X"$ac_file" |
22458     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22459           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22460           /^X\(\/\/\)$/{ s//\1/; q; }
22461           /^X\(\/\).*/{ s//\1/; q; }
22462           s/.*/./; q'`
22463   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22464     { case "$ac_dir" in
22465   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22466   *)                      as_incr_dir=.;;
22467 esac
22468 as_dummy="$ac_dir"
22469 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22470   case $as_mkdir_dir in
22471     # Skip DOS drivespec
22472     ?:) as_incr_dir=$as_mkdir_dir ;;
22473     *)
22474       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22475       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22476     ;;
22477   esac
22478 done; }
22479
22480     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22481     # A "../" for each directory in $ac_dir_suffix.
22482     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22483   else
22484     ac_dir_suffix= ac_dots=
22485   fi
22486
22487   case $srcdir in
22488   .)  ac_srcdir=.
22489       if test -z "$ac_dots"; then
22490          ac_top_srcdir=.
22491       else
22492          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22493       fi ;;
22494   [\\/]* | ?:[\\/]* )
22495       ac_srcdir=$srcdir$ac_dir_suffix;
22496       ac_top_srcdir=$srcdir ;;
22497   *) # Relative path.
22498     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22499     ac_top_srcdir=$ac_dots$srcdir ;;
22500   esac
22501
22502   case $INSTALL in
22503   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22504   *) ac_INSTALL=$ac_dots$INSTALL ;;
22505   esac
22506
22507   if test x"$ac_file" != x-; then
22508     { echo "$as_me:22508: creating $ac_file" >&5
22509 echo "$as_me: creating $ac_file" >&6;}
22510     rm -f "$ac_file"
22511   fi
22512   # Let's still pretend it is `configure' which instantiates (i.e., don't
22513   # use $as_me), people would be surprised to read:
22514   #    /* config.h.  Generated automatically by config.status.  */
22515   configure_input="Generated automatically from `echo $ac_file_in |
22516                                                  sed 's,.*/,,'` by configure."
22517
22518   # First look for the input files in the build tree, otherwise in the
22519   # src tree.
22520   ac_file_inputs=`IFS=:
22521     for f in $ac_file_in; do
22522       case $f in
22523       -) echo $tmp/stdin ;;
22524       [\\/$]*)
22525          # Absolute (can't be DOS-style, as IFS=:)
22526          test -f "$f" || { { echo "$as_me:22526: error: cannot find input file: $f" >&5
22527 echo "$as_me: error: cannot find input file: $f" >&2;}
22528    { (exit 1); exit 1; }; }
22529          echo $f;;
22530       *) # Relative
22531          if test -f "$f"; then
22532            # Build tree
22533            echo $f
22534          elif test -f "$srcdir/$f"; then
22535            # Source tree
22536            echo $srcdir/$f
22537          else
22538            # /dev/null tree
22539            { { echo "$as_me:22539: error: cannot find input file: $f" >&5
22540 echo "$as_me: error: cannot find input file: $f" >&2;}
22541    { (exit 1); exit 1; }; }
22542          fi;;
22543       esac
22544     done` || { (exit 1); exit 1; }
22545 EOF
22546 cat >>$CONFIG_STATUS <<\EOF
22547   ac_warn_datarootdir=no
22548   if test x"$ac_file" != x-; then
22549     for ac_item in $ac_file_inputs
22550     do
22551       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22552       if test -n "$ac_seen"; then
22553         ac_used=`grep '@datarootdir@' $ac_item`
22554         if test -z "$ac_used"; then
22555           { echo "$as_me:22555: WARNING: datarootdir was used implicitly but not set:
22556 $ac_seen" >&5
22557 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22558 $ac_seen" >&2;}
22559           ac_warn_datarootdir=yes
22560         fi
22561       fi
22562       ac_seen=`grep '${datarootdir}' $ac_item`
22563       if test -n "$ac_seen"; then
22564         { echo "$as_me:22564: WARNING: datarootdir was used explicitly but not set:
22565 $ac_seen" >&5
22566 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22567 $ac_seen" >&2;}
22568         ac_warn_datarootdir=yes
22569       fi
22570     done
22571   fi
22572
22573 if test "x$ac_warn_datarootdir" = xyes; then
22574   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22575 fi
22576
22577 EOF
22578 cat >>$CONFIG_STATUS <<EOF
22579   sed "$ac_vpsub
22580 $extrasub
22581 EOF
22582 cat >>$CONFIG_STATUS <<\EOF
22583 :t
22584 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22585 s,@configure_input@,$configure_input,;t t
22586 s,@srcdir@,$ac_srcdir,;t t
22587 s,@top_srcdir@,$ac_top_srcdir,;t t
22588 s,@INSTALL@,$ac_INSTALL,;t t
22589 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22590   rm -f $tmp/stdin
22591   if test x"$ac_file" != x-; then
22592     cp $tmp/out $ac_file
22593
22594     for ac_name in prefix exec_prefix datarootdir
22595     do
22596         ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22597         if test -n "$ac_seen"; then
22598             ac_init=`egrep '[   ]*'$ac_name'[   ]*=' $ac_file`
22599             if test -z "$ac_init"; then
22600               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22601               { echo "$as_me:22601: WARNING: Variable $ac_name is used but was not set:
22602 $ac_seen" >&5
22603 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22604 $ac_seen" >&2;}
22605             fi
22606         fi
22607     done
22608     egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22609     egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22610     if test -s $tmp/out; then
22611       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22612       { echo "$as_me:22612: WARNING: Some variables may not be substituted:
22613 $ac_seen" >&5
22614 echo "$as_me: WARNING: Some variables may not be substituted:
22615 $ac_seen" >&2;}
22616     fi
22617   else
22618     cat $tmp/out
22619   fi
22620   rm -f $tmp/out
22621
22622 done
22623 EOF
22624 cat >>$CONFIG_STATUS <<\EOF
22625
22626 #
22627 # CONFIG_HEADER section.
22628 #
22629
22630 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22631 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22632 #
22633 # ac_d sets the value in "#define NAME VALUE" lines.
22634 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22635 ac_dB='[        ].*$,\1#\2'
22636 ac_dC=' '
22637 ac_dD=',;t'
22638 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22639 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22640 ac_iB='\([      ]\),\1#\2define\3'
22641 ac_iC=' '
22642 ac_iD='\4,;t'
22643 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22644 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22645 ac_uB='$,\1#\2define\3'
22646 ac_uC=' '
22647 ac_uD=',;t'
22648
22649 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22650   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22651   case $ac_file in
22652   - | *:- | *:-:* ) # input from stdin
22653         cat >$tmp/stdin
22654         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22655         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22656   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22658   * )   ac_file_in=$ac_file.in ;;
22659   esac
22660
22661   test x"$ac_file" != x- && { echo "$as_me:22661: creating $ac_file" >&5
22662 echo "$as_me: creating $ac_file" >&6;}
22663
22664   # First look for the input files in the build tree, otherwise in the
22665   # src tree.
22666   ac_file_inputs=`IFS=:
22667     for f in $ac_file_in; do
22668       case $f in
22669       -) echo $tmp/stdin ;;
22670       [\\/$]*)
22671          # Absolute (can't be DOS-style, as IFS=:)
22672          test -f "$f" || { { echo "$as_me:22672: error: cannot find input file: $f" >&5
22673 echo "$as_me: error: cannot find input file: $f" >&2;}
22674    { (exit 1); exit 1; }; }
22675          echo $f;;
22676       *) # Relative
22677          if test -f "$f"; then
22678            # Build tree
22679            echo $f
22680          elif test -f "$srcdir/$f"; then
22681            # Source tree
22682            echo $srcdir/$f
22683          else
22684            # /dev/null tree
22685            { { echo "$as_me:22685: error: cannot find input file: $f" >&5
22686 echo "$as_me: error: cannot find input file: $f" >&2;}
22687    { (exit 1); exit 1; }; }
22688          fi;;
22689       esac
22690     done` || { (exit 1); exit 1; }
22691   # Remove the trailing spaces.
22692   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
22693
22694 EOF
22695
22696 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
22697 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
22698 # be either 'cat' or 'sort'.
22699 cat confdefs.h | uniq >conftest.vals
22700
22701 # Break up conftest.vals because some shells have a limit on
22702 # the size of here documents, and old seds have small limits too.
22703
22704 rm -f conftest.tail
22705 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
22706 while grep . conftest.vals >/dev/null
22707 do
22708   # Write chunks of a limited-size here document to conftest.frag.
22709   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
22710   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
22711   echo 'CEOF' >> $CONFIG_STATUS
22712   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22713   rm -f conftest.vals
22714   mv conftest.tail conftest.vals
22715 done
22716 rm -f conftest.vals
22717
22718 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
22719 # marker @DEFS@.
22720 echo '  cat >> conftest.edit <<CEOF
22721 /@DEFS@/r conftest.frag
22722 /@DEFS@/d
22723 CEOF
22724 sed -f conftest.edit $tmp/in > $tmp/out
22725 rm -f $tmp/in
22726 mv $tmp/out $tmp/in
22727 rm -f conftest.edit conftest.frag
22728 ' >> $CONFIG_STATUS
22729
22730 cat >>$CONFIG_STATUS <<\EOF
22731   # Let's still pretend it is `configure' which instantiates (i.e., don't
22732   # use $as_me), people would be surprised to read:
22733   #    /* config.h.  Generated automatically by config.status.  */
22734   if test x"$ac_file" = x-; then
22735     echo "/* Generated automatically by configure.  */" >$tmp/config.h
22736   else
22737     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22738   fi
22739   cat $tmp/in >>$tmp/config.h
22740   rm -f $tmp/in
22741   if test x"$ac_file" != x-; then
22742     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22743       { echo "$as_me:22743: $ac_file is unchanged" >&5
22744 echo "$as_me: $ac_file is unchanged" >&6;}
22745     else
22746       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22747          X"$ac_file" : 'X\(//\)[^/]' \| \
22748          X"$ac_file" : 'X\(//\)$' \| \
22749          X"$ac_file" : 'X\(/\)' \| \
22750          .     : '\(.\)' 2>/dev/null ||
22751 echo X"$ac_file" |
22752     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22753           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22754           /^X\(\/\/\)$/{ s//\1/; q; }
22755           /^X\(\/\).*/{ s//\1/; q; }
22756           s/.*/./; q'`
22757       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22758         { case "$ac_dir" in
22759   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22760   *)                      as_incr_dir=.;;
22761 esac
22762 as_dummy="$ac_dir"
22763 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22764   case $as_mkdir_dir in
22765     # Skip DOS drivespec
22766     ?:) as_incr_dir=$as_mkdir_dir ;;
22767     *)
22768       as_incr_dir=$as_incr_dir/$as_mkdir_dir
22769       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22770     ;;
22771   esac
22772 done; }
22773
22774       fi
22775       rm -f $ac_file
22776       mv $tmp/config.h $ac_file
22777     fi
22778   else
22779     cat $tmp/config.h
22780     rm -f $tmp/config.h
22781   fi
22782 done
22783 EOF
22784 cat >>$CONFIG_STATUS <<\EOF
22785 #
22786 # CONFIG_COMMANDS section.
22787 #
22788 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
22789   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
22790   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
22791
22792   case $ac_dest in
22793     default )
22794 if test "x$cf_with_tests" != xno ; then
22795
22796 for cf_dir in test
22797 do
22798         if test ! -d $srcdir/$cf_dir; then
22799                 continue
22800         elif test -f $srcdir/$cf_dir/programs; then
22801                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
22802         fi
22803 done
22804
22805 fi
22806
22807 cf_prefix=$LIB_PREFIX
22808
22809 case $cf_cv_shlib_version in #(vi
22810 cygdll|msysdll|mingw)
22811         TINFO_NAME=$TINFO_ARG_SUFFIX
22812         TINFO_SUFFIX=.dll
22813         ;;
22814 esac
22815
22816 if test -n "$TINFO_SUFFIX" ; then
22817         case $TINFO_SUFFIX in
22818         tw*)
22819                 TINFO_NAME="${TINFO_NAME}tw"
22820                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
22821                 ;;
22822         t*)
22823                 TINFO_NAME="${TINFO_NAME}t"
22824                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
22825                 ;;
22826         w*)
22827                 TINFO_NAME="${TINFO_NAME}w"
22828                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
22829                 ;;
22830         esac
22831 fi
22832
22833 for cf_dir in $SRC_SUBDIRS
22834 do
22835         if test ! -d $srcdir/$cf_dir ; then
22836                 continue
22837         elif test -f $srcdir/$cf_dir/modules; then
22838
22839                 SHARED_LIB=
22840                 Libs_To_Make=
22841                 for cf_item in $cf_LIST_MODELS
22842                 do
22843
22844         case X$cf_item in #(vi
22845         Xlibtool) #(vi
22846                 cf_suffix='.la'
22847                 cf_depsuf=$cf_suffix
22848                 ;;
22849         Xdebug) #(vi
22850                 cf_suffix='_g.a'
22851                 cf_depsuf=$cf_suffix
22852                 ;;
22853         Xprofile) #(vi
22854                 cf_suffix='_p.a'
22855                 cf_depsuf=$cf_suffix
22856                 ;;
22857         Xshared) #(vi
22858                 case $cf_cv_system_name in
22859                 aix[5-7]*) #(vi
22860                         cf_suffix='.so'
22861                         cf_depsuf=$cf_suffix
22862                         ;;
22863                 cygwin*|msys*|mingw*) #(vi
22864                         cf_suffix='.dll'
22865                         cf_depsuf='.dll.a'
22866                         ;;
22867                 darwin*) #(vi
22868                         cf_suffix='.dylib'
22869                         cf_depsuf=$cf_suffix
22870                         ;;
22871                 hpux*) #(vi
22872                         case $target in
22873                         ia64*) #(vi
22874                                 cf_suffix='.so'
22875                                 cf_depsuf=$cf_suffix
22876                                 ;;
22877                         *) #(vi
22878                                 cf_suffix='.sl'
22879                                 cf_depsuf=$cf_suffix
22880                                 ;;
22881                         esac
22882                         ;;
22883                 *) #(vi
22884                         cf_suffix='.so'
22885                         cf_depsuf=$cf_suffix
22886                         ;;
22887                 esac
22888                 ;;
22889         *)
22890                 cf_suffix='.a'
22891                 cf_depsuf=$cf_suffix
22892                 ;;
22893         esac
22894         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
22895         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
22896
22897                         cf_libname=$cf_dir
22898                         test "$cf_dir" = c++ && cf_libname=ncurses++
22899                         if test $cf_item = shared ; then
22900                                 if test -n "${LIB_SUFFIX}"
22901                                 then
22902                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22903                                 else
22904                                         cf_shared_suffix="$cf_suffix"
22905                                 fi
22906                                 if test "$cf_cv_do_symlinks" = yes ; then
22907                                         cf_version_name=
22908
22909                                         case "$cf_cv_shlib_version" in #(vi
22910                                         rel) #(vi
22911                                                 cf_version_name=REL_VERSION
22912                                                 ;;
22913                                         abi)
22914                                                 cf_version_name=ABI_VERSION
22915                                                 ;;
22916                                         esac
22917
22918                                         if test -n "$cf_version_name"
22919                                         then
22920                                                 case "$cf_cv_system_name" in #(vi
22921                                                 darwin*)
22922                                                         # "w", etc?
22923                                                         cf_suffix="${LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
22924                                                         ;; #(vi
22925                                                 *)
22926                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
22927                                                         ;;
22928                                                 esac
22929                                         fi
22930                                         if test -n "${LIB_SUFFIX}"
22931                                         then
22932                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${LIB_SUFFIX}"'//'`
22933                                         else
22934                                                 cf_shared_suffix="$cf_suffix"
22935                                         fi
22936                                 fi
22937                                 # cygwin needs import library, and has unique naming convention
22938                                 # use autodetected ${cf_prefix} for import lib and static lib, but
22939                                 # use 'cyg' prefix for shared lib.
22940                                 case $cf_cv_shlib_version in #(vi
22941                                 cygdll) #(vi
22942                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22943                                         Libs_To_Make="$Libs_To_Make ../lib/cyg${cf_libname}${cf_cygsuf}"
22944                                         continue
22945                                         ;;
22946                                 msysdll) #(vi
22947                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22948                                         Libs_To_Make="$Libs_To_Make ../lib/msys-${cf_libname}${cf_cygsuf}"
22949                                         continue
22950                                         ;;
22951                                 mingw)
22952                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
22953                                         Libs_To_Make="$Libs_To_Make ../lib/lib${cf_libname}${cf_cygsuf}"
22954                                         continue
22955                                         ;;
22956                                 esac
22957                         fi
22958                         Libs_To_Make="$Libs_To_Make ../lib/${cf_prefix}${cf_libname}${cf_suffix}"
22959                 done
22960
22961                 if test $cf_dir = ncurses ; then
22962                         cf_subsets="$LIB_SUBSETS"
22963                         cf_r_parts="$cf_subsets"
22964                         cf_liblist="$Libs_To_Make"
22965
22966                         while test -n "$cf_r_parts"
22967                         do
22968                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
22969                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
22970                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
22971                                         cf_item=
22972                                         case $cf_l_parts in #(vi
22973                                         *termlib*) #(vi
22974                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
22975                                                 ;;
22976                                         *ticlib*)
22977                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
22978                                                 ;;
22979                                         *)
22980                                                 break
22981                                                 ;;
22982                                         esac
22983                                         if test -n "$cf_item"; then
22984                                                 Libs_To_Make="$cf_item $Libs_To_Make"
22985                                         fi
22986                                 else
22987                                         break
22988                                 fi
22989                         done
22990                 else
22991                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
22992                 fi
22993
22994                 if test $cf_dir = c++; then
22995                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
22996                                 cf_list=
22997                                 for cf_item in $Libs_To_Make
22998                                 do
22999                                         case $cf_item in
23000                                         *.a)
23001                                                 ;;
23002                                         *)
23003                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
23004                                                 ;;
23005                                         esac
23006                                         for cf_test in $cf_list
23007                                         do
23008                                                 if test "$cf_test" = "$cf_item"
23009                                                 then
23010                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
23011                                                         cf_item=
23012                                                         break
23013                                                 fi
23014                                         done
23015                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
23016                                 done
23017                                 Libs_To_Make="$cf_list"
23018                         fi
23019                 fi
23020
23021                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
23022                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
23023                         $cf_dir/Makefile >$cf_dir/Makefile.out
23024                 mv $cf_dir/Makefile.out $cf_dir/Makefile
23025
23026                 $AWK -f $srcdir/mk-0th.awk \
23027                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
23028                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23029
23030                 for cf_subset in $cf_subsets
23031                 do
23032                         cf_subdirs=
23033                         for cf_item in $cf_LIST_MODELS
23034                         do
23035
23036                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
23037
23038 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23039
23040                         CXX_MODEL=$cf_ITEM
23041                         if test "$CXX_MODEL" = SHARED; then
23042                                 case $cf_cv_shlib_version in #(vi
23043                                 cygdll|msysdll|mingw) #(vi
23044                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
23045
23046 echo "${as_me:-configure}:23046: testing overriding CXX_MODEL to SHARED ..." 1>&5
23047
23048                                         with_shared_cxx=yes
23049                                         ;;
23050                                 *)
23051                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
23052                                         ;;
23053                                 esac
23054                         fi
23055
23056         case X$cf_item in #(vi
23057         Xlibtool) #(vi
23058                 cf_suffix='.la'
23059                 cf_depsuf=$cf_suffix
23060                 ;;
23061         Xdebug) #(vi
23062                 cf_suffix='_g.a'
23063                 cf_depsuf=$cf_suffix
23064                 ;;
23065         Xprofile) #(vi
23066                 cf_suffix='_p.a'
23067                 cf_depsuf=$cf_suffix
23068                 ;;
23069         Xshared) #(vi
23070                 case $cf_cv_system_name in
23071                 aix[5-7]*) #(vi
23072                         cf_suffix='.so'
23073                         cf_depsuf=$cf_suffix
23074                         ;;
23075                 cygwin*|msys*|mingw*) #(vi
23076                         cf_suffix='.dll'
23077                         cf_depsuf='.dll.a'
23078                         ;;
23079                 darwin*) #(vi
23080                         cf_suffix='.dylib'
23081                         cf_depsuf=$cf_suffix
23082                         ;;
23083                 hpux*) #(vi
23084                         case $target in
23085                         ia64*) #(vi
23086                                 cf_suffix='.so'
23087                                 cf_depsuf=$cf_suffix
23088                                 ;;
23089                         *) #(vi
23090                                 cf_suffix='.sl'
23091                                 cf_depsuf=$cf_suffix
23092                                 ;;
23093                         esac
23094                         ;;
23095                 *) #(vi
23096                         cf_suffix='.so'
23097                         cf_depsuf=$cf_suffix
23098                         ;;
23099                 esac
23100                 ;;
23101         *)
23102                 cf_suffix='.a'
23103                 cf_depsuf=$cf_suffix
23104                 ;;
23105         esac
23106         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
23107         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
23108
23109         case $cf_item in
23110         libtool) cf_subdir='obj_lo'  ;;
23111         normal)  cf_subdir='objects' ;;
23112         debug)   cf_subdir='obj_g' ;;
23113         profile) cf_subdir='obj_p' ;;
23114         shared)
23115                 case $cf_cv_system_name in #(vi
23116                 cygwin|msys) #(vi
23117                         cf_subdir='objects' ;;
23118                 *)
23119                         cf_subdir='obj_s' ;;
23120                 esac
23121         esac
23122
23123                         # Test for case where we build libtinfo with a different name.
23124                         cf_libname=$cf_dir
23125                         if test $cf_dir = ncurses ; then
23126                                 case $cf_subset in
23127                                 *base*)
23128                                         cf_libname=${cf_libname}$LIB_SUFFIX
23129                                         ;;
23130                                 *termlib*)
23131                                         cf_libname=$TINFO_LIB_SUFFIX
23132                                         ;;
23133                                 ticlib*)
23134                                         cf_libname=$TICS_LIB_SUFFIX
23135                                         ;;
23136                                 esac
23137                         elif test $cf_dir = c++ ; then
23138                                 cf_libname=ncurses++$LIB_SUFFIX
23139                         else
23140                                 cf_libname=${cf_libname}$LIB_SUFFIX
23141                         fi
23142                         if test -n "${DFT_ARG_SUFFIX}" ; then
23143                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
23144                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
23145                         fi
23146
23147                         # These dependencies really are for development, not
23148                         # builds, but they are useful in porting, too.
23149                         cf_depend="../include/ncurses_cfg.h"
23150                         if test "$srcdir" = "."; then
23151                                 cf_reldir="."
23152                         else
23153                                 cf_reldir="\${srcdir}"
23154                         fi
23155
23156                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
23157                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
23158                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
23159                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
23160                         fi
23161
23162                         cf_dir_suffix=
23163                         old_cf_suffix="$cf_suffix"
23164                         if test "$cf_cv_shlib_version_infix" = yes ; then
23165                         if test -n "$LIB_SUFFIX" ; then
23166                                 case $LIB_SUFFIX in
23167                                 tw*)
23168                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
23169                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
23170                                         cf_dir_suffix=tw
23171                                         ;;
23172                                 t*)
23173                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
23174                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
23175                                         cf_dir_suffix=t
23176                                         ;;
23177                                 w*)
23178                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
23179                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
23180                                         cf_dir_suffix=w
23181                                         ;;
23182                                 esac
23183                         fi
23184                         fi
23185
23186                         $AWK -f $srcdir/mk-1st.awk \
23187                                 name=${cf_libname}${cf_dir_suffix} \
23188                                 traces=$LIB_TRACING \
23189                                 MODEL=$cf_ITEM \
23190                                 CXX_MODEL=$CXX_MODEL \
23191                                 model=$cf_subdir \
23192                                 prefix=$cf_prefix \
23193                                 suffix=$cf_suffix \
23194                                 subset=$cf_subset \
23195                                 driver=$cf_cv_term_driver \
23196                                 SymLink="$LN_S" \
23197                                 TermlibRoot=$TINFO_NAME \
23198                                 TermlibSuffix=$TINFO_SUFFIX \
23199                                 ShlibVer=$cf_cv_shlib_version \
23200                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
23201                                 ReLink=${cf_cv_do_relink:-no} \
23202                                 DoLinks=$cf_cv_do_symlinks \
23203                                 rmSoLocs=$cf_cv_rm_so_locs \
23204                                 ldconfig="$LDCONFIG" \
23205                                 overwrite=$WITH_OVERWRITE \
23206                                 depend="$cf_depend" \
23207                                 host="$host" \
23208                                 libtool_version="$LIBTOOL_VERSION" \
23209                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23210
23211                         cf_suffix="$old_cf_suffix"
23212
23213                         for cf_subdir2 in $cf_subdirs lib
23214                         do
23215                                 test $cf_subdir = $cf_subdir2 && break
23216                         done
23217                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
23218                         $AWK -f $srcdir/mk-2nd.awk \
23219                                 name=$cf_dir \
23220                                 traces=$LIB_TRACING \
23221                                 MODEL=$cf_ITEM \
23222                                 model=$cf_subdir \
23223                                 subset=$cf_subset \
23224                                 srcdir=$srcdir \
23225                                 echo=$WITH_ECHO \
23226                                 crenames=$cf_cv_prog_CC_c_o \
23227                                 cxxrenames=$cf_cv_prog_CXX_c_o \
23228                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
23229                         cf_subdirs="$cf_subdirs $cf_subdir"
23230                         done
23231                 done
23232         fi
23233
23234         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >>Makefile
23235 done
23236
23237 for cf_dir in $SRC_SUBDIRS
23238 do
23239         if test ! -d $srcdir/$cf_dir ; then
23240                 continue
23241         fi
23242
23243         if test -f $cf_dir/Makefile ; then
23244                 case "$cf_dir" in
23245                 Ada95) #(vi
23246                         echo 'libs \' >> Makefile
23247                         echo 'install.libs \' >> Makefile
23248                         echo 'uninstall.libs ::' >> Makefile
23249                         echo '  cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@' >> Makefile
23250                         ;;
23251                 esac
23252         fi
23253
23254         if test -f $srcdir/$cf_dir/modules; then
23255                 echo >> Makefile
23256                 if test -f $srcdir/$cf_dir/headers; then
23257 cat >> Makefile <<CF_EOF
23258 install.includes \\
23259 uninstall.includes \\
23260 CF_EOF
23261                 fi
23262 if test "$cf_dir" != "c++" ; then
23263 echo 'lint \' >> Makefile
23264 fi
23265 cat >> Makefile <<CF_EOF
23266 libs \\
23267 lintlib \\
23268 install.libs \\
23269 uninstall.libs \\
23270 install.$cf_dir \\
23271 uninstall.$cf_dir ::
23272         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23273 CF_EOF
23274         elif test -f $srcdir/$cf_dir/headers; then
23275 cat >> Makefile <<CF_EOF
23276
23277 libs \\
23278 install.libs \\
23279 uninstall.libs \\
23280 install.includes \\
23281 uninstall.includes ::
23282         cd $cf_dir && \${MAKE} \${TOP_MFLAGS} \$@
23283 CF_EOF
23284 fi
23285 done
23286
23287 if test "x$cf_with_db_install" = xyes; then
23288 cat >> Makefile <<CF_EOF
23289
23290 install.libs uninstall.libs \\
23291 install.data uninstall.data ::
23292 $MAKE_TERMINFO  cd misc && \${MAKE} \${TOP_MFLAGS} \$@
23293 CF_EOF
23294 fi
23295
23296 if test "x$cf_with_manpages" = xyes; then
23297 cat >> Makefile <<CF_EOF
23298
23299 install.man \\
23300 uninstall.man ::
23301         cd man && \${MAKE} \${TOP_MFLAGS} \$@
23302 CF_EOF
23303 fi
23304
23305 cat >> Makefile <<CF_EOF
23306
23307 distclean ::
23308         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
23309         rm -f headers.sh headers.sed mk_shared_lib.sh
23310         rm -f edit_man.* man_alias.*
23311         rm -rf \${DIRS_TO_MAKE}
23312 CF_EOF
23313
23314 # Special case: tack's manpage lives in its own directory.
23315 if test "x$cf_with_manpages" = xyes; then
23316 if test -d tack ; then
23317 if test -f $srcdir/$tack.h; then
23318 cat >> Makefile <<CF_EOF
23319
23320 install.man \\
23321 uninstall.man ::
23322         cd tack && \${MAKE} \${TOP_MFLAGS} \$@
23323 CF_EOF
23324 fi
23325 fi
23326 fi
23327
23328 rm -f headers.sed headers.sh
23329
23330 echo creating headers.sh
23331 cat >headers.sh <<CF_EOF
23332 #! /bin/sh
23333 # This shell script is generated by the 'configure' script.  It is invoked in a
23334 # subdirectory of the build tree.  It generates a sed-script in the parent
23335 # directory that is used to adjust includes for header files that reside in a
23336 # subdirectory of /usr/include, etc.
23337 PRG=""
23338 while test \$# != 3
23339 do
23340 PRG="\$PRG \$1"; shift
23341 done
23342 DST=\$1
23343 REF=\$2
23344 SRC=\$3
23345 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
23346 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
23347 echo installing \$SRC in \$DST
23348 CF_EOF
23349
23350 if test $WITH_CURSES_H = yes; then
23351         cat >>headers.sh <<CF_EOF
23352 case \$DST in
23353 /*/include/*)
23354         END=\`basename \$DST\`
23355         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23356         do
23357                 NAME=\`basename \$i\`
23358                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23359         done
23360         ;;
23361 *)
23362         echo "" >> \$TMPSED
23363         ;;
23364 esac
23365 CF_EOF
23366
23367 else
23368         cat >>headers.sh <<CF_EOF
23369 case \$DST in
23370 /*/include/*)
23371         END=\`basename \$DST\`
23372         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
23373         do
23374                 NAME=\`basename \$i\`
23375                 if test "\$NAME" = "curses.h"
23376                 then
23377                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23378                         NAME=ncurses.h
23379                 fi
23380                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
23381         done
23382         ;;
23383 *)
23384         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
23385         ;;
23386 esac
23387 CF_EOF
23388 fi
23389 cat >>headers.sh <<CF_EOF
23390 rm -f \$TMPSRC
23391 sed -f \$TMPSED \$SRC > \$TMPSRC
23392 NAME=\`basename \$SRC\`
23393 CF_EOF
23394 if test $WITH_CURSES_H != yes; then
23395         cat >>headers.sh <<CF_EOF
23396 test "\$NAME" = "curses.h" && NAME=ncurses.h
23397 CF_EOF
23398 fi
23399 cat >>headers.sh <<CF_EOF
23400 # Just in case someone gzip'd manpages, remove the conflicting copy.
23401 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
23402
23403 eval \$PRG \$TMPSRC \$DST/\$NAME
23404 rm -f \$TMPSRC \$TMPSED
23405 CF_EOF
23406
23407 chmod 0755 headers.sh
23408
23409 for cf_dir in $SRC_SUBDIRS
23410 do
23411         if test ! -d $srcdir/$cf_dir ; then
23412                 continue
23413         fi
23414
23415         if test -f $srcdir/$cf_dir/headers; then
23416                 $AWK -f $srcdir/mk-hdr.awk \
23417                         subset="$LIB_SUBSETS" \
23418                         compat="$WITH_CURSES_H" \
23419                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
23420         fi
23421
23422         if test -f $srcdir/$cf_dir/modules; then
23423                 if test "$cf_dir" != "c++" ; then
23424                         cat >>$cf_dir/Makefile <<"CF_EOF"
23425 depend : ${AUTO_SRC}
23426         makedepend -- ${CPPFLAGS} -- ${C_SRC}
23427
23428 # DO NOT DELETE THIS LINE -- make depend depends on it.
23429 CF_EOF
23430                 fi
23431         fi
23432 done
23433
23434 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
23435 if test -z "$USE_OLD_MAKERULES" ; then
23436         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
23437 fi
23438 fi
23439  ;;
23440   esac
23441 done
23442 EOF
23443
23444 cat >>$CONFIG_STATUS <<\EOF
23445
23446 { (exit 0); exit 0; }
23447 EOF
23448 chmod +x $CONFIG_STATUS
23449 ac_clean_files=$ac_clean_files_save
23450
23451 # configure is writing to config.log, and then calls config.status.
23452 # config.status does its own redirection, appending to config.log.
23453 # Unfortunately, on DOS this fails, as config.log is still kept open
23454 # by configure, so config.status won't be able to write to it; its
23455 # output is simply discarded.  So we exec the FD to /dev/null,
23456 # effectively closing config.log, so it can be properly (re)opened and
23457 # appended to by config.status.  When coming back to configure, we
23458 # need to make the FD available again.
23459 if test "$no_create" != yes; then
23460   ac_cs_success=:
23461   exec 5>/dev/null
23462   $SHELL $CONFIG_STATUS || ac_cs_success=false
23463   exec 5>>config.log
23464   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23465   # would make configure fail if this is the last instruction.
23466   $ac_cs_success || { (exit 1); exit 1; }
23467 fi
23468 ${MAKE:-make} preinstall