configure revision 166124
1#! /bin/sh
2# From configure.in Revision: 1.383 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20061216.
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.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if 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
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset=unset
64else
65  as_unset=false
66fi
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.
80as_nl='
81'
82IFS=" 	$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.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS= MAKEFLAGS=
101SHELL=${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
108ac_unique_file="ncurses/base/lib_initscr.c"
109# Factoring default headers for most tests.
110ac_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.
147ac_init_help=
148ac_init_version=false
149# The variables have the same names as the options, with
150# dashes changed to underlines.
151cache_file=/dev/null
152exec_prefix=NONE
153no_create=
154no_recursion=
155prefix=NONE
156program_prefix=NONE
157program_suffix=NONE
158program_transform_name=s,x,x,
159silent=
160site=
161srcdir=
162verbose=
163x_includes=NONE
164x_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.
171bindir='${exec_prefix}/bin'
172sbindir='${exec_prefix}/sbin'
173libexecdir='${exec_prefix}/libexec'
174datadir='${prefix}/share'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${prefix}/info'
182mandir='${prefix}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -disable-* | --disable-*)
234    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235    # Reject names that are not valid shell variable names.
236    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238   { (exit 1); exit 1; }; }
239    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240    eval "enable_$ac_feature=no" ;;
241
242  -enable-* | --enable-*)
243    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244    # Reject names that are not valid shell variable names.
245    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247   { (exit 1); exit 1; }; }
248    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249    case $ac_option in
250      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251      *) ac_optarg=yes ;;
252    esac
253    eval "enable_$ac_feature='$ac_optarg'" ;;
254
255  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257  | --exec | --exe | --ex)
258    ac_prev=exec_prefix ;;
259  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261  | --exec=* | --exe=* | --ex=*)
262    exec_prefix=$ac_optarg ;;
263
264  -gas | --gas | --ga | --g)
265    # Obsolete; use --with-gas.
266    with_gas=yes ;;
267
268  -help | --help | --hel | --he | -h)
269    ac_init_help=long ;;
270  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271    ac_init_help=recursive ;;
272  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273    ac_init_help=short ;;
274
275  -host | --host | --hos | --ho)
276    ac_prev=host_alias ;;
277  -host=* | --host=* | --hos=* | --ho=*)
278    host_alias=$ac_optarg ;;
279
280  -includedir | --includedir | --includedi | --included | --include \
281  | --includ | --inclu | --incl | --inc)
282    ac_prev=includedir ;;
283  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284  | --includ=* | --inclu=* | --incl=* | --inc=*)
285    includedir=$ac_optarg ;;
286
287  -infodir | --infodir | --infodi | --infod | --info | --inf)
288    ac_prev=infodir ;;
289  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290    infodir=$ac_optarg ;;
291
292  -libdir | --libdir | --libdi | --libd)
293    ac_prev=libdir ;;
294  -libdir=* | --libdir=* | --libdi=* | --libd=*)
295    libdir=$ac_optarg ;;
296
297  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298  | --libexe | --libex | --libe)
299    ac_prev=libexecdir ;;
300  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301  | --libexe=* | --libex=* | --libe=*)
302    libexecdir=$ac_optarg ;;
303
304  -localstatedir | --localstatedir | --localstatedi | --localstated \
305  | --localstate | --localstat | --localsta | --localst \
306  | --locals | --local | --loca | --loc | --lo)
307    ac_prev=localstatedir ;;
308  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311    localstatedir=$ac_optarg ;;
312
313  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314    ac_prev=mandir ;;
315  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316    mandir=$ac_optarg ;;
317
318  -nfp | --nfp | --nf)
319    # Obsolete; use --without-fp.
320    with_fp=no ;;
321
322  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323  | --no-cr | --no-c)
324    no_create=yes ;;
325
326  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328    no_recursion=yes ;;
329
330  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332  | --oldin | --oldi | --old | --ol | --o)
333    ac_prev=oldincludedir ;;
334  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337    oldincludedir=$ac_optarg ;;
338
339  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340    ac_prev=prefix ;;
341  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342    prefix=$ac_optarg ;;
343
344  -program-prefix | --program-prefix | --program-prefi | --program-pref \
345  | --program-pre | --program-pr | --program-p)
346    ac_prev=program_prefix ;;
347  -program-prefix=* | --program-prefix=* | --program-prefi=* \
348  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349    program_prefix=$ac_optarg ;;
350
351  -program-suffix | --program-suffix | --program-suffi | --program-suff \
352  | --program-suf | --program-su | --program-s)
353    ac_prev=program_suffix ;;
354  -program-suffix=* | --program-suffix=* | --program-suffi=* \
355  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356    program_suffix=$ac_optarg ;;
357
358  -program-transform-name | --program-transform-name \
359  | --program-transform-nam | --program-transform-na \
360  | --program-transform-n | --program-transform- \
361  | --program-transform | --program-transfor \
362  | --program-transfo | --program-transf \
363  | --program-trans | --program-tran \
364  | --progr-tra | --program-tr | --program-t)
365    ac_prev=program_transform_name ;;
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    program_transform_name=$ac_optarg ;;
374
375  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376  | -silent | --silent | --silen | --sile | --sil)
377    silent=yes ;;
378
379  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380    ac_prev=sbindir ;;
381  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382  | --sbi=* | --sb=*)
383    sbindir=$ac_optarg ;;
384
385  -sharedstatedir | --sharedstatedir | --sharedstatedi \
386  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387  | --sharedst | --shareds | --shared | --share | --shar \
388  | --sha | --sh)
389    ac_prev=sharedstatedir ;;
390  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393  | --sha=* | --sh=*)
394    sharedstatedir=$ac_optarg ;;
395
396  -site | --site | --sit)
397    ac_prev=site ;;
398  -site=* | --site=* | --sit=*)
399    site=$ac_optarg ;;
400
401  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402    ac_prev=srcdir ;;
403  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404    srcdir=$ac_optarg ;;
405
406  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407  | --syscon | --sysco | --sysc | --sys | --sy)
408    ac_prev=sysconfdir ;;
409  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411    sysconfdir=$ac_optarg ;;
412
413  -target | --target | --targe | --targ | --tar | --ta | --t)
414    ac_prev=target_alias ;;
415  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416    target_alias=$ac_optarg ;;
417
418  -v | -verbose | --verbose | --verbos | --verbo | --verb)
419    verbose=yes ;;
420
421  -version | --version | --versio | --versi | --vers | -V)
422    ac_init_version=: ;;
423
424  -with-* | --with-*)
425    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426    # Reject names that are not valid shell variable names.
427    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428      { echo "$as_me: error: invalid package name: $ac_package" >&2
429   { (exit 1); exit 1; }; }
430    ac_package=`echo $ac_package| sed 's/-/_/g'`
431    case $ac_option in
432      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433      *) ac_optarg=yes ;;
434    esac
435    eval "with_$ac_package='$ac_optarg'" ;;
436
437  -without-* | --without-*)
438    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439    # Reject names that are not valid shell variable names.
440    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441      { echo "$as_me: error: invalid package name: $ac_package" >&2
442   { (exit 1); exit 1; }; }
443    ac_package=`echo $ac_package | sed 's/-/_/g'`
444    eval "with_$ac_package=no" ;;
445
446  --x)
447    # Obsolete; use --with-x.
448    with_x=yes ;;
449
450  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451  | --x-incl | --x-inc | --x-in | --x-i)
452    ac_prev=x_includes ;;
453  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455    x_includes=$ac_optarg ;;
456
457  -x-libraries | --x-libraries | --x-librarie | --x-librari \
458  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459    ac_prev=x_libraries ;;
460  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462    x_libraries=$ac_optarg ;;
463
464  -*) { echo "$as_me: error: unrecognized option: $ac_option
465Try \`$0 --help' for more information." >&2
466   { (exit 1); exit 1; }; }
467    ;;
468
469  *=*)
470    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471    # Reject names that are not valid shell variable names.
472    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474   { (exit 1); exit 1; }; }
475    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476    eval "$ac_envvar='$ac_optarg'"
477    export $ac_envvar ;;
478
479  *)
480    # FIXME: should be removed in autoconf 3.0.
481    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485    ;;
486
487  esac
488done
489
490if test -n "$ac_prev"; then
491  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492  { echo "$as_me: error: missing argument to $ac_option" >&2
493   { (exit 1); exit 1; }; }
494fi
495
496# Be sure to have absolute paths.
497for ac_var in exec_prefix prefix
498do
499  eval ac_val=$`echo $ac_var`
500  case $ac_val in
501    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503   { (exit 1); exit 1; }; };;
504  esac
505done
506
507# Be sure to have absolute paths.
508for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509              localstatedir libdir includedir oldincludedir infodir mandir
510do
511  eval ac_val=$`echo $ac_var`
512  case $ac_val in
513    [\\/$]* | ?:[\\/]* ) ;;
514    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515   { (exit 1); exit 1; }; };;
516  esac
517done
518
519# There might be people who depend on the old broken behavior: `$host'
520# used to hold the argument of --host etc.
521build=$build_alias
522host=$host_alias
523target=$target_alias
524
525# FIXME: should be removed in autoconf 3.0.
526if test "x$host_alias" != x; then
527  if test "x$build_alias" = x; then
528    cross_compiling=maybe
529    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530    If a cross compiler is detected then cross compile mode will be used." >&2
531  elif test "x$build_alias" != "x$host_alias"; then
532    cross_compiling=yes
533  fi
534fi
535
536ac_tool_prefix=
537test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539test "$silent" = yes && exec 6>/dev/null
540
541# Find the source files, if location was not specified.
542if test -z "$srcdir"; then
543  ac_srcdir_defaulted=yes
544  # Try the directory containing this script, then its parent.
545  ac_prog=$0
546  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548  srcdir=$ac_confdir
549  if test ! -r $srcdir/$ac_unique_file; then
550    srcdir=..
551  fi
552else
553  ac_srcdir_defaulted=no
554fi
555if test ! -r $srcdir/$ac_unique_file; then
556  if test "$ac_srcdir_defaulted" = yes; then
557    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558   { (exit 1); exit 1; }; }
559  else
560    { echo "$as_me: error: cannot find sources in $srcdir" >&2
561   { (exit 1); exit 1; }; }
562  fi
563fi
564srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565ac_env_build_alias_set=${build_alias+set}
566ac_env_build_alias_value=$build_alias
567ac_cv_env_build_alias_set=${build_alias+set}
568ac_cv_env_build_alias_value=$build_alias
569ac_env_host_alias_set=${host_alias+set}
570ac_env_host_alias_value=$host_alias
571ac_cv_env_host_alias_set=${host_alias+set}
572ac_cv_env_host_alias_value=$host_alias
573ac_env_target_alias_set=${target_alias+set}
574ac_env_target_alias_value=$target_alias
575ac_cv_env_target_alias_set=${target_alias+set}
576ac_cv_env_target_alias_value=$target_alias
577ac_env_CC_set=${CC+set}
578ac_env_CC_value=$CC
579ac_cv_env_CC_set=${CC+set}
580ac_cv_env_CC_value=$CC
581ac_env_CFLAGS_set=${CFLAGS+set}
582ac_env_CFLAGS_value=$CFLAGS
583ac_cv_env_CFLAGS_set=${CFLAGS+set}
584ac_cv_env_CFLAGS_value=$CFLAGS
585ac_env_LDFLAGS_set=${LDFLAGS+set}
586ac_env_LDFLAGS_value=$LDFLAGS
587ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588ac_cv_env_LDFLAGS_value=$LDFLAGS
589ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590ac_env_CPPFLAGS_value=$CPPFLAGS
591ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593ac_env_CPP_set=${CPP+set}
594ac_env_CPP_value=$CPP
595ac_cv_env_CPP_set=${CPP+set}
596ac_cv_env_CPP_value=$CPP
597ac_env_CXX_set=${CXX+set}
598ac_env_CXX_value=$CXX
599ac_cv_env_CXX_set=${CXX+set}
600ac_cv_env_CXX_value=$CXX
601ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602ac_env_CXXFLAGS_value=$CXXFLAGS
603ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605ac_env_CXXCPP_set=${CXXCPP+set}
606ac_env_CXXCPP_value=$CXXCPP
607ac_cv_env_CXXCPP_set=${CXXCPP+set}
608ac_cv_env_CXXCPP_value=$CXXCPP
609
610#
611# Report the --help message.
612#
613if test "$ac_init_help" = "long"; then
614  # Omit some internal or obsolete options to make the list less imposing.
615  # This message is too long to be a string in the A/UX 3.1 sh.
616  cat <<EOF
617\`configure' configures this package to adapt to many kinds of systems.
618
619Usage: $0 [OPTION]... [VAR=VALUE]...
620
621To assign environment variables (e.g., CC, CFLAGS...), specify them as
622VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624Defaults for the options are specified in brackets.
625
626Configuration:
627  -h, --help              display this help and exit
628      --help=short        display options specific to this package
629      --help=recursive    display the short help of all the included packages
630  -V, --version           display version information and exit
631  -q, --quiet, --silent   do not print \`checking...' messages
632      --cache-file=FILE   cache test results in FILE [disabled]
633  -C, --config-cache      alias for \`--cache-file=config.cache'
634  -n, --no-create         do not create output files
635      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637EOF
638
639  cat <<EOF
640Installation directories:
641  --prefix=PREFIX         install architecture-independent files in PREFIX
642                          [$ac_default_prefix]
643  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                          [PREFIX]
645
646By default, \`make install' will install all the files in
647\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649for instance \`--prefix=\$HOME'.
650
651For better control, use the options below.
652
653Fine tuning of the installation directories:
654  --bindir=DIR            user executables [EPREFIX/bin]
655  --sbindir=DIR           system admin executables [EPREFIX/sbin]
656  --libexecdir=DIR        program executables [EPREFIX/libexec]
657  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661  --libdir=DIR            object code libraries [EPREFIX/lib]
662  --includedir=DIR        C header files [PREFIX/include]
663  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664  --infodir=DIR           info documentation [PREFIX/info]
665  --mandir=DIR            man documentation [PREFIX/man]
666EOF
667
668  cat <<\EOF
669
670Program names:
671  --program-prefix=PREFIX            prepend PREFIX to installed program names
672  --program-suffix=SUFFIX            append SUFFIX to installed program names
673  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675System types:
676  --build=BUILD           configure for building on BUILD [guessed]
677  --host=HOST       build programs to run on HOST [BUILD]
678  --target=TARGET   configure for building compilers for TARGET [HOST]
679EOF
680fi
681
682if test -n "$ac_init_help"; then
683
684  cat <<\EOF
685
686Optional Packages:
687  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690Optional Features:
691  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694  --with-rel-version=XXX  override derived release version
695  --with-abi-version=XXX  override derived ABI version
696  --with-system-type=XXX  test: override derived host system-type
697  --without-cxx           do not adjust ncurses bool to match C++
698  --without-cxx-binding   do not build C++ binding and demo
699  --without-ada           suppress check for Ada95, don't build demo
700  --without-progs         suppress build with programs (e.g., tic)
701  --without-curses-h      install curses.h as ncurses.h only
702  --with-install-prefix   prefixes actual install-location ($DESTDIR)
703Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
704  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
705  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
706  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
707  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
708  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
709  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
710Options to Specify the Libraries Built/Used:
711  --with-libtool          generate libraries with libtool
712  --with-shared           generate shared-libraries
713  --with-normal           generate normal-libraries (default)
714  --with-debug            generate debug-libraries (default)
715  --with-profile          generate profile-libraries
716  --with-termlib          generate separate terminfo library
717  --with-gpm              use Alessandro Rubini's GPM library
718  --without-dlsym         do not use dlsym() to load GPM dynamically
719  --with-sysmouse         use sysmouse (FreeBSD console)
720  --enable-rpath          use rpath option when generating shared libraries
721  --with-shlib-version=X  Specify rel or abi version for shared libs
722Fine-Tuning Your Configuration:
723  --disable-overwrite     leave out the link to -lcurses
724  --disable-database      do not use terminfo, only fallbacks/termcap
725  --with-database=XXX     specify terminfo source to install
726  --with-hashed-db        specify hashed-database library
727  --with-fallbacks=XXX    specify list of fallback terminal descriptions
728  --without-xterm-new     specify if xterm terminfo should be old version
729  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
730  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
731  --disable-big-core      assume machine has little memory
732  --enable-termcap        compile in termcap fallback support
733  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
734  --enable-getcap         fast termcap load, no xrefs to terminfo
735  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
736  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
737  --disable-root-environ  restrict environment when running as root
738  --enable-symlinks       make tic use symbolic links not hard links
739  --enable-broken_linker  compile with broken-linker support code
740  --enable-bsdpad         recognize BSD-style prefix padding
741  --enable-widec          compile with wide-char/UTF-8 code
742  --disable-lp64          allow chtype to be long (ignore _LP64)
743  --disable-largefile     omit support for large files
744  --disable-tparm-varargs compile tparm() without varargs interface
745  --with-bool=TYPE        override fallback type of bool variable
746  --with-caps=alt         compile with alternate Caps file
747  --with-chtype=TYPE      override type of chtype
748  --with-ospeed=TYPE      override type of ospeed variable
749  --with-mmask-t=TYPE     override type of mmask_t
750  --with-rcs-ids          compile-in RCS identifiers
751Options to Specify How Manpages are Installed:
752  --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
753                          optionally formatted/catonly, e.g., gzip,formatted
754  --with-manpage-renames  specify manpage-renaming
755  --with-manpage-aliases  specify manpage-aliases using .so
756  --with-manpage-symlinks specify manpage-aliases using symlinks
757  --with-manpage-tbl      specify manpage processing with tbl
758Extensions:
759  --disable-ext-funcs     disable function-extensions
760  --enable-const          compile with extra/non-standard const
761  --enable-no-padding     compile with $NCURSES_NO_PADDING code
762  --enable-signed-char    compile with SIGWINCH handler
763  --enable-sigwinch       compile with SIGWINCH handler
764  --enable-tcap-names     compile with user-definable terminal capabilities
765Development Code:
766  --without-develop       disable development options
767  --enable-hard-tabs      compile with hard-tabs code
768  --enable-xmc-glitch     compile with support for xmc (magic-cookie)
769Experimental Code:
770  --disable-assumed-color do not assume anything about default-colors
771  --disable-hashmap       compile without hashmap scrolling-optimization
772  --enable-colorfgbg      compile with $COLORFGBG code
773  --enable-ext-colors     compile for experimental 256-color support
774  --enable-ext-mouse      compile for experimental mouse-encoding
775  --enable-safe-sprintf   compile with experimental safe-sprintf code
776  --disable-scroll-hints  compile without scroll-hints code
777  --enable-wgetch-events  compile with experimental wgetch-events code
778Testing/development Options:
779  --enable-echo           build: display "compiling" commands (default)
780  --enable-warnings       build: turn on GCC compiler warnings
781  --enable-assertions     test: turn on generation of assertion code
782  --with-dmalloc          test: use Gray Watson's dmalloc library
783  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
784  --with-valgrind         test: use valgrind
785  --disable-leaks         test: free permanent memory, analyze leaks
786  --enable-expanded       test: generate functions for certain macros
787  --disable-macros        test: use functions rather than macros
788  --with-trace            test: add trace() function to all models of ncurses
789Ada95 Binding Options:
790  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
791  --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
792  --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
793
794Some influential environment variables:
795  CC          C compiler command
796  CFLAGS      C compiler flags
797  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
798              nonstandard directory <lib dir>
799  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
800              headers in a nonstandard directory <include dir>
801  CPP         C preprocessor
802  CXX         C++ compiler command
803  CXXFLAGS    C++ compiler flags
804  CXXCPP      C++ preprocessor
805
806Use these variables to override the choices made by `configure' or to help
807it to find libraries and programs with nonstandard names/locations.
808
809EOF
810fi
811
812if test "$ac_init_help" = "recursive"; then
813  # If there are subdirs, report their specific --help.
814  ac_popdir=`pwd`
815  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
816    cd $ac_subdir
817    # A "../" for each directory in /$ac_subdir.
818    ac_dots=`echo $ac_subdir |
819             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
820
821    case $srcdir in
822    .) # No --srcdir option.  We are building in place.
823      ac_sub_srcdir=$srcdir ;;
824    [\\/]* | ?:[\\/]* ) # Absolute path.
825      ac_sub_srcdir=$srcdir/$ac_subdir ;;
826    *) # Relative path.
827      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
828    esac
829
830    # Check for guested configure; otherwise get Cygnus style configure.
831    if test -f $ac_sub_srcdir/configure.gnu; then
832      echo
833      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
834    elif test -f $ac_sub_srcdir/configure; then
835      echo
836      $SHELL $ac_sub_srcdir/configure  --help=recursive
837    elif test -f $ac_sub_srcdir/configure.ac ||
838           test -f $ac_sub_srcdir/configure.in; then
839      echo
840      $ac_configure --help
841    else
842      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
843    fi
844    cd $ac_popdir
845  done
846fi
847
848test -n "$ac_init_help" && exit 0
849if $ac_init_version; then
850  cat <<\EOF
851
852Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
853Free Software Foundation, Inc.
854This configure script is free software; the Free Software Foundation
855gives unlimited permission to copy, distribute and modify it.
856EOF
857  exit 0
858fi
859exec 5>config.log
860cat >&5 <<EOF
861This file contains any messages produced by compilers while
862running configure, to aid debugging if configure makes a mistake.
863
864It was created by $as_me, which was
865generated by GNU Autoconf 2.52.20061216.  Invocation command line was
866
867  $ $0 $@
868
869EOF
870{
871cat <<_ASUNAME
872## ---------- ##
873## Platform.  ##
874## ---------- ##
875
876hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
877uname -m = `(uname -m) 2>/dev/null || echo unknown`
878uname -r = `(uname -r) 2>/dev/null || echo unknown`
879uname -s = `(uname -s) 2>/dev/null || echo unknown`
880uname -v = `(uname -v) 2>/dev/null || echo unknown`
881
882/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
883/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
884
885/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
886/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
887/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
888hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
889/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
890/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
891/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
892
893PATH = $PATH
894
895_ASUNAME
896} >&5
897
898cat >&5 <<EOF
899## ------------ ##
900## Core tests.  ##
901## ------------ ##
902
903EOF
904
905# Keep a trace of the command line.
906# Strip out --no-create and --no-recursion so they do not pile up.
907# Also quote any args containing shell meta-characters.
908ac_configure_args=
909ac_sep=
910for ac_arg
911do
912  case $ac_arg in
913  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
914  | --no-cr | --no-c) ;;
915  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
916  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
917  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
918    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
919    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
920    ac_sep=" " ;;
921  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
922     ac_sep=" " ;;
923  esac
924  # Get rid of the leading space.
925done
926
927# When interrupted or exit'd, cleanup temporary files, and complete
928# config.log.  We remove comments because anyway the quotes in there
929# would cause problems or look ugly.
930trap 'exit_status=$?
931  # Save into config.log some information that might help in debugging.
932  echo >&5
933  echo "## ----------------- ##" >&5
934  echo "## Cache variables.  ##" >&5
935  echo "## ----------------- ##" >&5
936  echo >&5
937  # The following way of writing the cache mishandles newlines in values,
938{
939  (set) 2>&1 |
940    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
941    *ac_space=\ *)
942      sed -n \
943        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
944    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
945      ;;
946    *)
947      sed -n \
948        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
949      ;;
950    esac;
951} >&5
952  sed "/^$/d" confdefs.h >conftest.log
953  if test -s conftest.log; then
954    echo >&5
955    echo "## ------------ ##" >&5
956    echo "## confdefs.h.  ##" >&5
957    echo "## ------------ ##" >&5
958    echo >&5
959    cat conftest.log >&5
960  fi
961  (echo; echo) >&5
962  test "$ac_signal" != 0 &&
963    echo "$as_me: caught signal $ac_signal" >&5
964  echo "$as_me: exit $exit_status" >&5
965  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
966    exit $exit_status
967     ' 0
968for ac_signal in 1 2 13 15; do
969  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
970done
971ac_signal=0
972
973# confdefs.h avoids OS command line length limits that DEFS can exceed.
974rm -rf conftest* confdefs.h
975# AIX cpp loses on an empty file, so make sure it contains at least a newline.
976echo >confdefs.h
977
978# Let the site file select an alternate cache file if it wants to.
979# Prefer explicitly selected file to automatically selected ones.
980if test -z "$CONFIG_SITE"; then
981  if test "x$prefix" != xNONE; then
982    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
983  else
984    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
985  fi
986fi
987for ac_site_file in $CONFIG_SITE; do
988  if test -r "$ac_site_file"; then
989    { echo "$as_me:989: loading site script $ac_site_file" >&5
990echo "$as_me: loading site script $ac_site_file" >&6;}
991    cat "$ac_site_file" >&5
992    . "$ac_site_file"
993  fi
994done
995
996if test -r "$cache_file"; then
997  # Some versions of bash will fail to source /dev/null (special
998  # files actually), so we avoid doing that.
999  if test -f "$cache_file"; then
1000    { echo "$as_me:1000: loading cache $cache_file" >&5
1001echo "$as_me: loading cache $cache_file" >&6;}
1002    case $cache_file in
1003      [\\/]* | ?:[\\/]* ) . $cache_file;;
1004      *)                      . ./$cache_file;;
1005    esac
1006  fi
1007else
1008  { echo "$as_me:1008: creating cache $cache_file" >&5
1009echo "$as_me: creating cache $cache_file" >&6;}
1010  >$cache_file
1011fi
1012
1013# Check that the precious variables saved in the cache have kept the same
1014# value.
1015ac_cache_corrupted=false
1016for ac_var in `(set) 2>&1 |
1017               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1018  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1019  eval ac_new_set=\$ac_env_${ac_var}_set
1020  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1021  eval ac_new_val="\$ac_env_${ac_var}_value"
1022  case $ac_old_set,$ac_new_set in
1023    set,)
1024      { echo "$as_me:1024: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1025echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1026      ac_cache_corrupted=: ;;
1027    ,set)
1028      { echo "$as_me:1028: error: \`$ac_var' was not set in the previous run" >&5
1029echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1030      ac_cache_corrupted=: ;;
1031    ,);;
1032    *)
1033      if test "x$ac_old_val" != "x$ac_new_val"; then
1034        { echo "$as_me:1034: error: \`$ac_var' has changed since the previous run:" >&5
1035echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1036        { echo "$as_me:1036:   former value:  $ac_old_val" >&5
1037echo "$as_me:   former value:  $ac_old_val" >&2;}
1038        { echo "$as_me:1038:   current value: $ac_new_val" >&5
1039echo "$as_me:   current value: $ac_new_val" >&2;}
1040        ac_cache_corrupted=:
1041      fi;;
1042  esac
1043  # Pass precious variables to config.status.  It doesn't matter if
1044  # we pass some twice (in addition to the command line arguments).
1045  if test "$ac_new_set" = set; then
1046    case $ac_new_val in
1047    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1048      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1049      ac_configure_args="$ac_configure_args '$ac_arg'"
1050      ;;
1051    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1052       ;;
1053    esac
1054  fi
1055done
1056if $ac_cache_corrupted; then
1057  { echo "$as_me:1057: error: changes in the environment can compromise the build" >&5
1058echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1059  { { echo "$as_me:1059: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1060echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1061   { (exit 1); exit 1; }; }
1062fi
1063
1064ac_ext=c
1065ac_cpp='$CPP $CPPFLAGS'
1066ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1067ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1068ac_compiler_gnu=$ac_cv_c_compiler_gnu
1069ac_main_return=return
1070
1071case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1072  *c*,-n*) ECHO_N= ECHO_C='
1073' ECHO_T='	' ;;
1074  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1075  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1076esac
1077echo "#! $SHELL" >conftest.sh
1078echo  "exit 0"   >>conftest.sh
1079chmod +x conftest.sh
1080if { (echo "$as_me:1080: PATH=\".;.\"; conftest.sh") >&5
1081  (PATH=".;."; conftest.sh) 2>&5
1082  ac_status=$?
1083  echo "$as_me:1083: \$? = $ac_status" >&5
1084  (exit $ac_status); }; then
1085  ac_path_separator=';'
1086else
1087  ac_path_separator=:
1088fi
1089PATH_SEPARATOR="$ac_path_separator"
1090rm -f conftest.sh
1091
1092ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1093
1094top_builddir=`pwd`
1095
1096echo "$as_me:1096: checking for egrep" >&5
1097echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1098if test "${ac_cv_prog_egrep+set}" = set; then
1099  echo $ECHO_N "(cached) $ECHO_C" >&6
1100else
1101  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1102    then ac_cv_prog_egrep='grep -E'
1103    else ac_cv_prog_egrep='egrep'
1104    fi
1105fi
1106echo "$as_me:1106: result: $ac_cv_prog_egrep" >&5
1107echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1108 EGREP=$ac_cv_prog_egrep
1109
1110test -z "$EGREP" && { { echo "$as_me:1110: error: No egrep program found" >&5
1111echo "$as_me: error: No egrep program found" >&2;}
1112   { (exit 1); exit 1; }; }
1113
1114NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1115NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1116NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1117cf_cv_abi_version=${NCURSES_MAJOR}
1118cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1119cf_cv_timestamp=`date`
1120echo "$as_me:1120: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1121echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1122
1123test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1124
1125# Check whether --with-rel-version or --without-rel-version was given.
1126if test "${with_rel_version+set}" = set; then
1127  withval="$with_rel_version"
1128  { echo "$as_me:1128: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1129echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1130 cf_cv_rel_version=$withval
1131fi;
1132
1133 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1134 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1135
1136if test -n "$NCURSES_MAJOR" ; then
1137  case $NCURSES_MAJOR in #(vi
1138  [0-9]*) #(vi
1139 	;;
1140  *)
1141	{ { echo "$as_me:1141: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1142echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1143   { (exit 1); exit 1; }; }
1144 	;;
1145  esac
1146else
1147  { { echo "$as_me:1147: error: Release major-version value is empty" >&5
1148echo "$as_me: error: Release major-version value is empty" >&2;}
1149   { (exit 1); exit 1; }; }
1150fi
1151
1152if test -n "$NCURSES_MINOR" ; then
1153  case $NCURSES_MINOR in #(vi
1154  [0-9]*) #(vi
1155 	;;
1156  *)
1157	{ { echo "$as_me:1157: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1158echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1159   { (exit 1); exit 1; }; }
1160 	;;
1161  esac
1162else
1163  { { echo "$as_me:1163: error: Release minor-version value is empty" >&5
1164echo "$as_me: error: Release minor-version value is empty" >&2;}
1165   { (exit 1); exit 1; }; }
1166fi
1167
1168test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1169
1170# Check whether --with-abi-version or --without-abi-version was given.
1171if test "${with_abi_version+set}" = set; then
1172  withval="$with_abi_version"
1173  { echo "$as_me:1173: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1174echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1175 cf_cv_abi_version=$withval
1176fi;
1177
1178if test -n "$cf_cv_abi_version" ; then
1179  case $cf_cv_abi_version in #(vi
1180  [0-9]*) #(vi
1181 	;;
1182  *)
1183	{ { echo "$as_me:1183: error: ABI version is not a number: $cf_cv_abi_version" >&5
1184echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1185   { (exit 1); exit 1; }; }
1186 	;;
1187  esac
1188else
1189  { { echo "$as_me:1189: error: ABI version value is empty" >&5
1190echo "$as_me: error: ABI version value is empty" >&2;}
1191   { (exit 1); exit 1; }; }
1192fi
1193
1194ac_aux_dir=
1195for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1196  if test -f $ac_dir/install-sh; then
1197    ac_aux_dir=$ac_dir
1198    ac_install_sh="$ac_aux_dir/install-sh -c"
1199    break
1200  elif test -f $ac_dir/install.sh; then
1201    ac_aux_dir=$ac_dir
1202    ac_install_sh="$ac_aux_dir/install.sh -c"
1203    break
1204  elif test -f $ac_dir/shtool; then
1205    ac_aux_dir=$ac_dir
1206    ac_install_sh="$ac_aux_dir/shtool install -c"
1207    break
1208  fi
1209done
1210if test -z "$ac_aux_dir"; then
1211  { { echo "$as_me:1211: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1212echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1213   { (exit 1); exit 1; }; }
1214fi
1215ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1216ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1217ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1218
1219# Make sure we can run config.sub.
1220$ac_config_sub sun4 >/dev/null 2>&1 ||
1221  { { echo "$as_me:1221: error: cannot run $ac_config_sub" >&5
1222echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1223   { (exit 1); exit 1; }; }
1224
1225echo "$as_me:1225: checking build system type" >&5
1226echo $ECHO_N "checking build system type... $ECHO_C" >&6
1227if test "${ac_cv_build+set}" = set; then
1228  echo $ECHO_N "(cached) $ECHO_C" >&6
1229else
1230  ac_cv_build_alias=$build_alias
1231test -z "$ac_cv_build_alias" &&
1232  ac_cv_build_alias=`$ac_config_guess`
1233test -z "$ac_cv_build_alias" &&
1234  { { echo "$as_me:1234: error: cannot guess build type; you must specify one" >&5
1235echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1236   { (exit 1); exit 1; }; }
1237ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1238  { { echo "$as_me:1238: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1239echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1240   { (exit 1); exit 1; }; }
1241
1242fi
1243echo "$as_me:1243: result: $ac_cv_build" >&5
1244echo "${ECHO_T}$ac_cv_build" >&6
1245build=$ac_cv_build
1246build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1247build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1248build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1249
1250echo "$as_me:1250: checking host system type" >&5
1251echo $ECHO_N "checking host system type... $ECHO_C" >&6
1252if test "${ac_cv_host+set}" = set; then
1253  echo $ECHO_N "(cached) $ECHO_C" >&6
1254else
1255  ac_cv_host_alias=$host_alias
1256test -z "$ac_cv_host_alias" &&
1257  ac_cv_host_alias=$ac_cv_build_alias
1258ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1259  { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1260echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1261   { (exit 1); exit 1; }; }
1262
1263fi
1264echo "$as_me:1264: result: $ac_cv_host" >&5
1265echo "${ECHO_T}$ac_cv_host" >&6
1266host=$ac_cv_host
1267host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1272	echo "$as_me:1272: checking target system type" >&5
1273echo $ECHO_N "checking target system type... $ECHO_C" >&6
1274if test "${ac_cv_target+set}" = set; then
1275  echo $ECHO_N "(cached) $ECHO_C" >&6
1276else
1277  ac_cv_target_alias=$target_alias
1278test "x$ac_cv_target_alias" = "x" &&
1279  ac_cv_target_alias=$ac_cv_host_alias
1280ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1281  { { echo "$as_me:1281: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1282echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1283   { (exit 1); exit 1; }; }
1284
1285fi
1286echo "$as_me:1286: result: $ac_cv_target" >&5
1287echo "${ECHO_T}$ac_cv_target" >&6
1288target=$ac_cv_target
1289target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1290target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1291target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1292
1293# The aliases save the names the user supplied, while $host etc.
1294# will get canonicalized.
1295test -n "$target_alias" &&
1296  test "$program_prefix$program_suffix$program_transform_name" = \
1297    NONENONEs,x,x, &&
1298  program_prefix=${target_alias}-
1299	system_name="$host_os"
1300else
1301	system_name="`(uname -s -r) 2>/dev/null`"
1302	if test -z "$system_name" ; then
1303		system_name="`(hostname) 2>/dev/null`"
1304	fi
1305fi
1306test -n "$system_name" && cat >>confdefs.h <<EOF
1307#define SYSTEM_NAME "$system_name"
1308EOF
1309
1310if test "${cf_cv_system_name+set}" = set; then
1311  echo $ECHO_N "(cached) $ECHO_C" >&6
1312else
1313  cf_cv_system_name="$system_name"
1314fi
1315
1316test -z "$system_name" && system_name="$cf_cv_system_name"
1317test -n "$cf_cv_system_name" && echo "$as_me:1317: result: Configuring for $cf_cv_system_name" >&5
1318echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1319
1320if test ".$system_name" != ".$cf_cv_system_name" ; then
1321	echo "$as_me:1321: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1322echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1323	{ { echo "$as_me:1323: error: \"Please remove config.cache and try again.\"" >&5
1324echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1325   { (exit 1); exit 1; }; }
1326fi
1327
1328# Check whether --with-system-type or --without-system-type was given.
1329if test "${with_system_type+set}" = set; then
1330  withval="$with_system_type"
1331  { echo "$as_me:1331: WARNING: overriding system type to $withval" >&5
1332echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1333 cf_cv_system_name=$withval
1334fi;
1335
1336###	Save the given $CFLAGS to allow user-override.
1337cf_user_CFLAGS="$CFLAGS"
1338
1339###	Default install-location
1340
1341echo "$as_me:1341: checking for prefix" >&5
1342echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1343if test "x$prefix" = "xNONE" ; then
1344	case "$cf_cv_system_name" in
1345		# non-vendor systems don't have a conflict
1346	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1347		prefix=/usr
1348		;;
1349	*)	prefix=$ac_default_prefix
1350		;;
1351	esac
1352fi
1353echo "$as_me:1353: result: $prefix" >&5
1354echo "${ECHO_T}$prefix" >&6
1355
1356if test "x$prefix" = "xNONE" ; then
1357echo "$as_me:1357: checking for default include-directory" >&5
1358echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1359test -n "$verbose" && echo 1>&6
1360for cf_symbol in \
1361	$includedir \
1362	$includedir/ncurses \
1363	$prefix/include \
1364	$prefix/include/ncurses \
1365	/usr/local/include \
1366	/usr/local/include/ncurses \
1367	/usr/include \
1368	/usr/include/ncurses
1369do
1370	cf_dir=`eval echo $cf_symbol`
1371	if test -f $cf_dir/curses.h ; then
1372	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1373		includedir="$cf_symbol"
1374		test -n "$verbose"  && echo $ac_n "	found " 1>&6
1375		break
1376	fi
1377	fi
1378	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1379done
1380echo "$as_me:1380: result: $includedir" >&5
1381echo "${ECHO_T}$includedir" >&6
1382fi
1383
1384###	Checks for programs.
1385ac_ext=c
1386ac_cpp='$CPP $CPPFLAGS'
1387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1389ac_compiler_gnu=$ac_cv_c_compiler_gnu
1390ac_main_return=return
1391if test -n "$ac_tool_prefix"; then
1392  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1393set dummy ${ac_tool_prefix}gcc; ac_word=$2
1394echo "$as_me:1394: checking for $ac_word" >&5
1395echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1396if test "${ac_cv_prog_CC+set}" = set; then
1397  echo $ECHO_N "(cached) $ECHO_C" >&6
1398else
1399  if test -n "$CC"; then
1400  ac_cv_prog_CC="$CC" # Let the user override the test.
1401else
1402  ac_save_IFS=$IFS; IFS=$ac_path_separator
1403ac_dummy="$PATH"
1404for ac_dir in $ac_dummy; do
1405  IFS=$ac_save_IFS
1406  test -z "$ac_dir" && ac_dir=.
1407  $as_executable_p "$ac_dir/$ac_word" || continue
1408ac_cv_prog_CC="${ac_tool_prefix}gcc"
1409echo "$as_me:1409: found $ac_dir/$ac_word" >&5
1410break
1411done
1412
1413fi
1414fi
1415CC=$ac_cv_prog_CC
1416if test -n "$CC"; then
1417  echo "$as_me:1417: result: $CC" >&5
1418echo "${ECHO_T}$CC" >&6
1419else
1420  echo "$as_me:1420: result: no" >&5
1421echo "${ECHO_T}no" >&6
1422fi
1423
1424fi
1425if test -z "$ac_cv_prog_CC"; then
1426  ac_ct_CC=$CC
1427  # Extract the first word of "gcc", so it can be a program name with args.
1428set dummy gcc; ac_word=$2
1429echo "$as_me:1429: checking for $ac_word" >&5
1430echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1431if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1432  echo $ECHO_N "(cached) $ECHO_C" >&6
1433else
1434  if test -n "$ac_ct_CC"; then
1435  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1436else
1437  ac_save_IFS=$IFS; IFS=$ac_path_separator
1438ac_dummy="$PATH"
1439for ac_dir in $ac_dummy; do
1440  IFS=$ac_save_IFS
1441  test -z "$ac_dir" && ac_dir=.
1442  $as_executable_p "$ac_dir/$ac_word" || continue
1443ac_cv_prog_ac_ct_CC="gcc"
1444echo "$as_me:1444: found $ac_dir/$ac_word" >&5
1445break
1446done
1447
1448fi
1449fi
1450ac_ct_CC=$ac_cv_prog_ac_ct_CC
1451if test -n "$ac_ct_CC"; then
1452  echo "$as_me:1452: result: $ac_ct_CC" >&5
1453echo "${ECHO_T}$ac_ct_CC" >&6
1454else
1455  echo "$as_me:1455: result: no" >&5
1456echo "${ECHO_T}no" >&6
1457fi
1458
1459  CC=$ac_ct_CC
1460else
1461  CC="$ac_cv_prog_CC"
1462fi
1463
1464if test -z "$CC"; then
1465  if test -n "$ac_tool_prefix"; then
1466  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1467set dummy ${ac_tool_prefix}cc; ac_word=$2
1468echo "$as_me:1468: checking for $ac_word" >&5
1469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1470if test "${ac_cv_prog_CC+set}" = set; then
1471  echo $ECHO_N "(cached) $ECHO_C" >&6
1472else
1473  if test -n "$CC"; then
1474  ac_cv_prog_CC="$CC" # Let the user override the test.
1475else
1476  ac_save_IFS=$IFS; IFS=$ac_path_separator
1477ac_dummy="$PATH"
1478for ac_dir in $ac_dummy; do
1479  IFS=$ac_save_IFS
1480  test -z "$ac_dir" && ac_dir=.
1481  $as_executable_p "$ac_dir/$ac_word" || continue
1482ac_cv_prog_CC="${ac_tool_prefix}cc"
1483echo "$as_me:1483: found $ac_dir/$ac_word" >&5
1484break
1485done
1486
1487fi
1488fi
1489CC=$ac_cv_prog_CC
1490if test -n "$CC"; then
1491  echo "$as_me:1491: result: $CC" >&5
1492echo "${ECHO_T}$CC" >&6
1493else
1494  echo "$as_me:1494: result: no" >&5
1495echo "${ECHO_T}no" >&6
1496fi
1497
1498fi
1499if test -z "$ac_cv_prog_CC"; then
1500  ac_ct_CC=$CC
1501  # Extract the first word of "cc", so it can be a program name with args.
1502set dummy cc; ac_word=$2
1503echo "$as_me:1503: checking for $ac_word" >&5
1504echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1505if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1506  echo $ECHO_N "(cached) $ECHO_C" >&6
1507else
1508  if test -n "$ac_ct_CC"; then
1509  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1510else
1511  ac_save_IFS=$IFS; IFS=$ac_path_separator
1512ac_dummy="$PATH"
1513for ac_dir in $ac_dummy; do
1514  IFS=$ac_save_IFS
1515  test -z "$ac_dir" && ac_dir=.
1516  $as_executable_p "$ac_dir/$ac_word" || continue
1517ac_cv_prog_ac_ct_CC="cc"
1518echo "$as_me:1518: found $ac_dir/$ac_word" >&5
1519break
1520done
1521
1522fi
1523fi
1524ac_ct_CC=$ac_cv_prog_ac_ct_CC
1525if test -n "$ac_ct_CC"; then
1526  echo "$as_me:1526: result: $ac_ct_CC" >&5
1527echo "${ECHO_T}$ac_ct_CC" >&6
1528else
1529  echo "$as_me:1529: result: no" >&5
1530echo "${ECHO_T}no" >&6
1531fi
1532
1533  CC=$ac_ct_CC
1534else
1535  CC="$ac_cv_prog_CC"
1536fi
1537
1538fi
1539if test -z "$CC"; then
1540  # Extract the first word of "cc", so it can be a program name with args.
1541set dummy cc; ac_word=$2
1542echo "$as_me:1542: checking for $ac_word" >&5
1543echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1544if test "${ac_cv_prog_CC+set}" = set; then
1545  echo $ECHO_N "(cached) $ECHO_C" >&6
1546else
1547  if test -n "$CC"; then
1548  ac_cv_prog_CC="$CC" # Let the user override the test.
1549else
1550  ac_prog_rejected=no
1551  ac_save_IFS=$IFS; IFS=$ac_path_separator
1552ac_dummy="$PATH"
1553for ac_dir in $ac_dummy; do
1554  IFS=$ac_save_IFS
1555  test -z "$ac_dir" && ac_dir=.
1556  $as_executable_p "$ac_dir/$ac_word" || continue
1557if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1558  ac_prog_rejected=yes
1559  continue
1560fi
1561ac_cv_prog_CC="cc"
1562echo "$as_me:1562: found $ac_dir/$ac_word" >&5
1563break
1564done
1565
1566if test $ac_prog_rejected = yes; then
1567  # We found a bogon in the path, so make sure we never use it.
1568  set dummy $ac_cv_prog_CC
1569  shift
1570  if test $# != 0; then
1571    # We chose a different compiler from the bogus one.
1572    # However, it has the same basename, so the bogon will be chosen
1573    # first if we set CC to just the basename; use the full file name.
1574    shift
1575    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1576    shift
1577    ac_cv_prog_CC="$@"
1578  fi
1579fi
1580fi
1581fi
1582CC=$ac_cv_prog_CC
1583if test -n "$CC"; then
1584  echo "$as_me:1584: result: $CC" >&5
1585echo "${ECHO_T}$CC" >&6
1586else
1587  echo "$as_me:1587: result: no" >&5
1588echo "${ECHO_T}no" >&6
1589fi
1590
1591fi
1592if test -z "$CC"; then
1593  if test -n "$ac_tool_prefix"; then
1594  for ac_prog in cl
1595  do
1596    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1597set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1598echo "$as_me:1598: checking for $ac_word" >&5
1599echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1600if test "${ac_cv_prog_CC+set}" = set; then
1601  echo $ECHO_N "(cached) $ECHO_C" >&6
1602else
1603  if test -n "$CC"; then
1604  ac_cv_prog_CC="$CC" # Let the user override the test.
1605else
1606  ac_save_IFS=$IFS; IFS=$ac_path_separator
1607ac_dummy="$PATH"
1608for ac_dir in $ac_dummy; do
1609  IFS=$ac_save_IFS
1610  test -z "$ac_dir" && ac_dir=.
1611  $as_executable_p "$ac_dir/$ac_word" || continue
1612ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1613echo "$as_me:1613: found $ac_dir/$ac_word" >&5
1614break
1615done
1616
1617fi
1618fi
1619CC=$ac_cv_prog_CC
1620if test -n "$CC"; then
1621  echo "$as_me:1621: result: $CC" >&5
1622echo "${ECHO_T}$CC" >&6
1623else
1624  echo "$as_me:1624: result: no" >&5
1625echo "${ECHO_T}no" >&6
1626fi
1627
1628    test -n "$CC" && break
1629  done
1630fi
1631if test -z "$CC"; then
1632  ac_ct_CC=$CC
1633  for ac_prog in cl
1634do
1635  # Extract the first word of "$ac_prog", so it can be a program name with args.
1636set dummy $ac_prog; ac_word=$2
1637echo "$as_me:1637: checking for $ac_word" >&5
1638echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1640  echo $ECHO_N "(cached) $ECHO_C" >&6
1641else
1642  if test -n "$ac_ct_CC"; then
1643  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1644else
1645  ac_save_IFS=$IFS; IFS=$ac_path_separator
1646ac_dummy="$PATH"
1647for ac_dir in $ac_dummy; do
1648  IFS=$ac_save_IFS
1649  test -z "$ac_dir" && ac_dir=.
1650  $as_executable_p "$ac_dir/$ac_word" || continue
1651ac_cv_prog_ac_ct_CC="$ac_prog"
1652echo "$as_me:1652: found $ac_dir/$ac_word" >&5
1653break
1654done
1655
1656fi
1657fi
1658ac_ct_CC=$ac_cv_prog_ac_ct_CC
1659if test -n "$ac_ct_CC"; then
1660  echo "$as_me:1660: result: $ac_ct_CC" >&5
1661echo "${ECHO_T}$ac_ct_CC" >&6
1662else
1663  echo "$as_me:1663: result: no" >&5
1664echo "${ECHO_T}no" >&6
1665fi
1666
1667  test -n "$ac_ct_CC" && break
1668done
1669
1670  CC=$ac_ct_CC
1671fi
1672
1673fi
1674
1675test -z "$CC" && { { echo "$as_me:1675: error: no acceptable cc found in \$PATH" >&5
1676echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1677   { (exit 1); exit 1; }; }
1678
1679# Provide some information about the compiler.
1680echo "$as_me:1680:" \
1681     "checking for C compiler version" >&5
1682ac_compiler=`set X $ac_compile; echo $2`
1683{ (eval echo "$as_me:1683: \"$ac_compiler --version </dev/null >&5\"") >&5
1684  (eval $ac_compiler --version </dev/null >&5) 2>&5
1685  ac_status=$?
1686  echo "$as_me:1686: \$? = $ac_status" >&5
1687  (exit $ac_status); }
1688{ (eval echo "$as_me:1688: \"$ac_compiler -v </dev/null >&5\"") >&5
1689  (eval $ac_compiler -v </dev/null >&5) 2>&5
1690  ac_status=$?
1691  echo "$as_me:1691: \$? = $ac_status" >&5
1692  (exit $ac_status); }
1693{ (eval echo "$as_me:1693: \"$ac_compiler -V </dev/null >&5\"") >&5
1694  (eval $ac_compiler -V </dev/null >&5) 2>&5
1695  ac_status=$?
1696  echo "$as_me:1696: \$? = $ac_status" >&5
1697  (exit $ac_status); }
1698
1699cat >conftest.$ac_ext <<_ACEOF
1700#line 1700 "configure"
1701#include "confdefs.h"
1702
1703int
1704main ()
1705{
1706
1707  ;
1708  return 0;
1709}
1710_ACEOF
1711ac_clean_files_save=$ac_clean_files
1712ac_clean_files="$ac_clean_files a.out a.exe"
1713# Try to create an executable without -o first, disregard a.out.
1714# It will help us diagnose broken compilers, and finding out an intuition
1715# of exeext.
1716echo "$as_me:1716: checking for C compiler default output" >&5
1717echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1718ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1719if { (eval echo "$as_me:1719: \"$ac_link_default\"") >&5
1720  (eval $ac_link_default) 2>&5
1721  ac_status=$?
1722  echo "$as_me:1722: \$? = $ac_status" >&5
1723  (exit $ac_status); }; then
1724  # Find the output, starting from the most likely.  This scheme is
1725# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1726# resort.
1727for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1728                ls a.out conftest 2>/dev/null;
1729                ls a.* conftest.* 2>/dev/null`; do
1730  case $ac_file in
1731    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1732    a.out ) # We found the default executable, but exeext='' is most
1733            # certainly right.
1734            break;;
1735    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1736          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1737          export ac_cv_exeext
1738          break;;
1739    * ) break;;
1740  esac
1741done
1742else
1743  echo "$as_me: failed program was:" >&5
1744cat conftest.$ac_ext >&5
1745{ { echo "$as_me:1745: error: C compiler cannot create executables" >&5
1746echo "$as_me: error: C compiler cannot create executables" >&2;}
1747   { (exit 77); exit 77; }; }
1748fi
1749
1750ac_exeext=$ac_cv_exeext
1751echo "$as_me:1751: result: $ac_file" >&5
1752echo "${ECHO_T}$ac_file" >&6
1753
1754# Check the compiler produces executables we can run.  If not, either
1755# the compiler is broken, or we cross compile.
1756echo "$as_me:1756: checking whether the C compiler works" >&5
1757echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1758# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1759# If not cross compiling, check that we can run a simple program.
1760if test "$cross_compiling" != yes; then
1761  if { ac_try='./$ac_file'
1762  { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763  (eval $ac_try) 2>&5
1764  ac_status=$?
1765  echo "$as_me:1765: \$? = $ac_status" >&5
1766  (exit $ac_status); }; }; then
1767    cross_compiling=no
1768  else
1769    if test "$cross_compiling" = maybe; then
1770	cross_compiling=yes
1771    else
1772	{ { echo "$as_me:1772: error: cannot run C compiled programs.
1773If you meant to cross compile, use \`--host'." >&5
1774echo "$as_me: error: cannot run C compiled programs.
1775If you meant to cross compile, use \`--host'." >&2;}
1776   { (exit 1); exit 1; }; }
1777    fi
1778  fi
1779fi
1780echo "$as_me:1780: result: yes" >&5
1781echo "${ECHO_T}yes" >&6
1782
1783rm -f a.out a.exe conftest$ac_cv_exeext
1784ac_clean_files=$ac_clean_files_save
1785# Check the compiler produces executables we can run.  If not, either
1786# the compiler is broken, or we cross compile.
1787echo "$as_me:1787: checking whether we are cross compiling" >&5
1788echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1789echo "$as_me:1789: result: $cross_compiling" >&5
1790echo "${ECHO_T}$cross_compiling" >&6
1791
1792echo "$as_me:1792: checking for executable suffix" >&5
1793echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1794if { (eval echo "$as_me:1794: \"$ac_link\"") >&5
1795  (eval $ac_link) 2>&5
1796  ac_status=$?
1797  echo "$as_me:1797: \$? = $ac_status" >&5
1798  (exit $ac_status); }; then
1799  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1800# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1801# work properly (i.e., refer to `conftest.exe'), while it won't with
1802# `rm'.
1803for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1804  case $ac_file in
1805    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1806    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1807          export ac_cv_exeext
1808          break;;
1809    * ) break;;
1810  esac
1811done
1812else
1813  { { echo "$as_me:1813: error: cannot compute EXEEXT: cannot compile and link" >&5
1814echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1815   { (exit 1); exit 1; }; }
1816fi
1817
1818rm -f conftest$ac_cv_exeext
1819echo "$as_me:1819: result: $ac_cv_exeext" >&5
1820echo "${ECHO_T}$ac_cv_exeext" >&6
1821
1822rm -f conftest.$ac_ext
1823EXEEXT=$ac_cv_exeext
1824ac_exeext=$EXEEXT
1825echo "$as_me:1825: checking for object suffix" >&5
1826echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1827if test "${ac_cv_objext+set}" = set; then
1828  echo $ECHO_N "(cached) $ECHO_C" >&6
1829else
1830  cat >conftest.$ac_ext <<_ACEOF
1831#line 1831 "configure"
1832#include "confdefs.h"
1833
1834int
1835main ()
1836{
1837
1838  ;
1839  return 0;
1840}
1841_ACEOF
1842rm -f conftest.o conftest.obj
1843if { (eval echo "$as_me:1843: \"$ac_compile\"") >&5
1844  (eval $ac_compile) 2>&5
1845  ac_status=$?
1846  echo "$as_me:1846: \$? = $ac_status" >&5
1847  (exit $ac_status); }; then
1848  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1849  case $ac_file in
1850    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1851    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1852       break;;
1853  esac
1854done
1855else
1856  echo "$as_me: failed program was:" >&5
1857cat conftest.$ac_ext >&5
1858{ { echo "$as_me:1858: error: cannot compute OBJEXT: cannot compile" >&5
1859echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1860   { (exit 1); exit 1; }; }
1861fi
1862
1863rm -f conftest.$ac_cv_objext conftest.$ac_ext
1864fi
1865echo "$as_me:1865: result: $ac_cv_objext" >&5
1866echo "${ECHO_T}$ac_cv_objext" >&6
1867OBJEXT=$ac_cv_objext
1868ac_objext=$OBJEXT
1869echo "$as_me:1869: checking whether we are using the GNU C compiler" >&5
1870echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1871if test "${ac_cv_c_compiler_gnu+set}" = set; then
1872  echo $ECHO_N "(cached) $ECHO_C" >&6
1873else
1874  cat >conftest.$ac_ext <<_ACEOF
1875#line 1875 "configure"
1876#include "confdefs.h"
1877
1878int
1879main ()
1880{
1881#ifndef __GNUC__
1882       choke me
1883#endif
1884
1885  ;
1886  return 0;
1887}
1888_ACEOF
1889rm -f conftest.$ac_objext
1890if { (eval echo "$as_me:1890: \"$ac_compile\"") >&5
1891  (eval $ac_compile) 2>&5
1892  ac_status=$?
1893  echo "$as_me:1893: \$? = $ac_status" >&5
1894  (exit $ac_status); } &&
1895         { ac_try='test -s conftest.$ac_objext'
1896  { (eval echo "$as_me:1896: \"$ac_try\"") >&5
1897  (eval $ac_try) 2>&5
1898  ac_status=$?
1899  echo "$as_me:1899: \$? = $ac_status" >&5
1900  (exit $ac_status); }; }; then
1901  ac_compiler_gnu=yes
1902else
1903  echo "$as_me: failed program was:" >&5
1904cat conftest.$ac_ext >&5
1905ac_compiler_gnu=no
1906fi
1907rm -f conftest.$ac_objext conftest.$ac_ext
1908ac_cv_c_compiler_gnu=$ac_compiler_gnu
1909
1910fi
1911echo "$as_me:1911: result: $ac_cv_c_compiler_gnu" >&5
1912echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1913GCC=`test $ac_compiler_gnu = yes && echo yes`
1914ac_test_CFLAGS=${CFLAGS+set}
1915ac_save_CFLAGS=$CFLAGS
1916CFLAGS="-g"
1917echo "$as_me:1917: checking whether $CC accepts -g" >&5
1918echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1919if test "${ac_cv_prog_cc_g+set}" = set; then
1920  echo $ECHO_N "(cached) $ECHO_C" >&6
1921else
1922  cat >conftest.$ac_ext <<_ACEOF
1923#line 1923 "configure"
1924#include "confdefs.h"
1925
1926int
1927main ()
1928{
1929
1930  ;
1931  return 0;
1932}
1933_ACEOF
1934rm -f conftest.$ac_objext
1935if { (eval echo "$as_me:1935: \"$ac_compile\"") >&5
1936  (eval $ac_compile) 2>&5
1937  ac_status=$?
1938  echo "$as_me:1938: \$? = $ac_status" >&5
1939  (exit $ac_status); } &&
1940         { ac_try='test -s conftest.$ac_objext'
1941  { (eval echo "$as_me:1941: \"$ac_try\"") >&5
1942  (eval $ac_try) 2>&5
1943  ac_status=$?
1944  echo "$as_me:1944: \$? = $ac_status" >&5
1945  (exit $ac_status); }; }; then
1946  ac_cv_prog_cc_g=yes
1947else
1948  echo "$as_me: failed program was:" >&5
1949cat conftest.$ac_ext >&5
1950ac_cv_prog_cc_g=no
1951fi
1952rm -f conftest.$ac_objext conftest.$ac_ext
1953fi
1954echo "$as_me:1954: result: $ac_cv_prog_cc_g" >&5
1955echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1956if test "$ac_test_CFLAGS" = set; then
1957  CFLAGS=$ac_save_CFLAGS
1958elif test $ac_cv_prog_cc_g = yes; then
1959  if test "$GCC" = yes; then
1960    CFLAGS="-g -O2"
1961  else
1962    CFLAGS="-g"
1963  fi
1964else
1965  if test "$GCC" = yes; then
1966    CFLAGS="-O2"
1967  else
1968    CFLAGS=
1969  fi
1970fi
1971# Some people use a C++ compiler to compile C.  Since we use `exit',
1972# in C++ we need to declare it.  In case someone uses the same compiler
1973# for both compiling C and C++ we need to have the C++ compiler decide
1974# the declaration of exit, since it's the most demanding environment.
1975cat >conftest.$ac_ext <<_ACEOF
1976#ifndef __cplusplus
1977  choke me
1978#endif
1979_ACEOF
1980rm -f conftest.$ac_objext
1981if { (eval echo "$as_me:1981: \"$ac_compile\"") >&5
1982  (eval $ac_compile) 2>&5
1983  ac_status=$?
1984  echo "$as_me:1984: \$? = $ac_status" >&5
1985  (exit $ac_status); } &&
1986         { ac_try='test -s conftest.$ac_objext'
1987  { (eval echo "$as_me:1987: \"$ac_try\"") >&5
1988  (eval $ac_try) 2>&5
1989  ac_status=$?
1990  echo "$as_me:1990: \$? = $ac_status" >&5
1991  (exit $ac_status); }; }; then
1992  for ac_declaration in \
1993   ''\
1994   '#include <stdlib.h>' \
1995   'extern "C" void std::exit (int) throw (); using std::exit;' \
1996   'extern "C" void std::exit (int); using std::exit;' \
1997   'extern "C" void exit (int) throw ();' \
1998   'extern "C" void exit (int);' \
1999   'void exit (int);'
2000do
2001  cat >conftest.$ac_ext <<_ACEOF
2002#line 2002 "configure"
2003#include "confdefs.h"
2004#include <stdlib.h>
2005$ac_declaration
2006int
2007main ()
2008{
2009exit (42);
2010  ;
2011  return 0;
2012}
2013_ACEOF
2014rm -f conftest.$ac_objext
2015if { (eval echo "$as_me:2015: \"$ac_compile\"") >&5
2016  (eval $ac_compile) 2>&5
2017  ac_status=$?
2018  echo "$as_me:2018: \$? = $ac_status" >&5
2019  (exit $ac_status); } &&
2020         { ac_try='test -s conftest.$ac_objext'
2021  { (eval echo "$as_me:2021: \"$ac_try\"") >&5
2022  (eval $ac_try) 2>&5
2023  ac_status=$?
2024  echo "$as_me:2024: \$? = $ac_status" >&5
2025  (exit $ac_status); }; }; then
2026  :
2027else
2028  echo "$as_me: failed program was:" >&5
2029cat conftest.$ac_ext >&5
2030continue
2031fi
2032rm -f conftest.$ac_objext conftest.$ac_ext
2033  cat >conftest.$ac_ext <<_ACEOF
2034#line 2034 "configure"
2035#include "confdefs.h"
2036$ac_declaration
2037int
2038main ()
2039{
2040exit (42);
2041  ;
2042  return 0;
2043}
2044_ACEOF
2045rm -f conftest.$ac_objext
2046if { (eval echo "$as_me:2046: \"$ac_compile\"") >&5
2047  (eval $ac_compile) 2>&5
2048  ac_status=$?
2049  echo "$as_me:2049: \$? = $ac_status" >&5
2050  (exit $ac_status); } &&
2051         { ac_try='test -s conftest.$ac_objext'
2052  { (eval echo "$as_me:2052: \"$ac_try\"") >&5
2053  (eval $ac_try) 2>&5
2054  ac_status=$?
2055  echo "$as_me:2055: \$? = $ac_status" >&5
2056  (exit $ac_status); }; }; then
2057  break
2058else
2059  echo "$as_me: failed program was:" >&5
2060cat conftest.$ac_ext >&5
2061fi
2062rm -f conftest.$ac_objext conftest.$ac_ext
2063done
2064rm -f conftest*
2065if test -n "$ac_declaration"; then
2066  echo '#ifdef __cplusplus' >>confdefs.h
2067  echo $ac_declaration      >>confdefs.h
2068  echo '#endif'             >>confdefs.h
2069fi
2070
2071else
2072  echo "$as_me: failed program was:" >&5
2073cat conftest.$ac_ext >&5
2074fi
2075rm -f conftest.$ac_objext conftest.$ac_ext
2076ac_ext=c
2077ac_cpp='$CPP $CPPFLAGS'
2078ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2079ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2080ac_compiler_gnu=$ac_cv_c_compiler_gnu
2081ac_main_return=return
2082
2083GCC_VERSION=none
2084if test "$GCC" = yes ; then
2085	echo "$as_me:2085: checking version of $CC" >&5
2086echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2087	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2088	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2089	echo "$as_me:2089: result: $GCC_VERSION" >&5
2090echo "${ECHO_T}$GCC_VERSION" >&6
2091fi
2092
2093ac_ext=c
2094ac_cpp='$CPP $CPPFLAGS'
2095ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098ac_main_return=return
2099echo "$as_me:2099: checking how to run the C preprocessor" >&5
2100echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2101# On Suns, sometimes $CPP names a directory.
2102if test -n "$CPP" && test -d "$CPP"; then
2103  CPP=
2104fi
2105if test -z "$CPP"; then
2106  if test "${ac_cv_prog_CPP+set}" = set; then
2107  echo $ECHO_N "(cached) $ECHO_C" >&6
2108else
2109      # Double quotes because CPP needs to be expanded
2110    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2111    do
2112      ac_preproc_ok=false
2113for ac_c_preproc_warn_flag in '' yes
2114do
2115  # Use a header file that comes with gcc, so configuring glibc
2116  # with a fresh cross-compiler works.
2117  # On the NeXT, cc -E runs the code through the compiler's parser,
2118  # not just through cpp. "Syntax error" is here to catch this case.
2119  cat >conftest.$ac_ext <<_ACEOF
2120#line 2120 "configure"
2121#include "confdefs.h"
2122#include <assert.h>
2123                     Syntax error
2124_ACEOF
2125if { (eval echo "$as_me:2125: \"$ac_cpp conftest.$ac_ext\"") >&5
2126  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2127  ac_status=$?
2128  egrep -v '^ *\+' conftest.er1 >conftest.err
2129  rm -f conftest.er1
2130  cat conftest.err >&5
2131  echo "$as_me:2131: \$? = $ac_status" >&5
2132  (exit $ac_status); } >/dev/null; then
2133  if test -s conftest.err; then
2134    ac_cpp_err=$ac_c_preproc_warn_flag
2135  else
2136    ac_cpp_err=
2137  fi
2138else
2139  ac_cpp_err=yes
2140fi
2141if test -z "$ac_cpp_err"; then
2142  :
2143else
2144  echo "$as_me: failed program was:" >&5
2145  cat conftest.$ac_ext >&5
2146  # Broken: fails on valid input.
2147continue
2148fi
2149rm -f conftest.err conftest.$ac_ext
2150
2151  # OK, works on sane cases.  Now check whether non-existent headers
2152  # can be detected and how.
2153  cat >conftest.$ac_ext <<_ACEOF
2154#line 2154 "configure"
2155#include "confdefs.h"
2156#include <ac_nonexistent.h>
2157_ACEOF
2158if { (eval echo "$as_me:2158: \"$ac_cpp conftest.$ac_ext\"") >&5
2159  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2160  ac_status=$?
2161  egrep -v '^ *\+' conftest.er1 >conftest.err
2162  rm -f conftest.er1
2163  cat conftest.err >&5
2164  echo "$as_me:2164: \$? = $ac_status" >&5
2165  (exit $ac_status); } >/dev/null; then
2166  if test -s conftest.err; then
2167    ac_cpp_err=$ac_c_preproc_warn_flag
2168  else
2169    ac_cpp_err=
2170  fi
2171else
2172  ac_cpp_err=yes
2173fi
2174if test -z "$ac_cpp_err"; then
2175  # Broken: success on invalid input.
2176continue
2177else
2178  echo "$as_me: failed program was:" >&5
2179  cat conftest.$ac_ext >&5
2180  # Passes both tests.
2181ac_preproc_ok=:
2182break
2183fi
2184rm -f conftest.err conftest.$ac_ext
2185
2186done
2187# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2188rm -f conftest.err conftest.$ac_ext
2189if $ac_preproc_ok; then
2190  break
2191fi
2192
2193    done
2194    ac_cv_prog_CPP=$CPP
2195
2196fi
2197  CPP=$ac_cv_prog_CPP
2198else
2199  ac_cv_prog_CPP=$CPP
2200fi
2201echo "$as_me:2201: result: $CPP" >&5
2202echo "${ECHO_T}$CPP" >&6
2203ac_preproc_ok=false
2204for ac_c_preproc_warn_flag in '' yes
2205do
2206  # Use a header file that comes with gcc, so configuring glibc
2207  # with a fresh cross-compiler works.
2208  # On the NeXT, cc -E runs the code through the compiler's parser,
2209  # not just through cpp. "Syntax error" is here to catch this case.
2210  cat >conftest.$ac_ext <<_ACEOF
2211#line 2211 "configure"
2212#include "confdefs.h"
2213#include <assert.h>
2214                     Syntax error
2215_ACEOF
2216if { (eval echo "$as_me:2216: \"$ac_cpp conftest.$ac_ext\"") >&5
2217  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2218  ac_status=$?
2219  egrep -v '^ *\+' conftest.er1 >conftest.err
2220  rm -f conftest.er1
2221  cat conftest.err >&5
2222  echo "$as_me:2222: \$? = $ac_status" >&5
2223  (exit $ac_status); } >/dev/null; then
2224  if test -s conftest.err; then
2225    ac_cpp_err=$ac_c_preproc_warn_flag
2226  else
2227    ac_cpp_err=
2228  fi
2229else
2230  ac_cpp_err=yes
2231fi
2232if test -z "$ac_cpp_err"; then
2233  :
2234else
2235  echo "$as_me: failed program was:" >&5
2236  cat conftest.$ac_ext >&5
2237  # Broken: fails on valid input.
2238continue
2239fi
2240rm -f conftest.err conftest.$ac_ext
2241
2242  # OK, works on sane cases.  Now check whether non-existent headers
2243  # can be detected and how.
2244  cat >conftest.$ac_ext <<_ACEOF
2245#line 2245 "configure"
2246#include "confdefs.h"
2247#include <ac_nonexistent.h>
2248_ACEOF
2249if { (eval echo "$as_me:2249: \"$ac_cpp conftest.$ac_ext\"") >&5
2250  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2251  ac_status=$?
2252  egrep -v '^ *\+' conftest.er1 >conftest.err
2253  rm -f conftest.er1
2254  cat conftest.err >&5
2255  echo "$as_me:2255: \$? = $ac_status" >&5
2256  (exit $ac_status); } >/dev/null; then
2257  if test -s conftest.err; then
2258    ac_cpp_err=$ac_c_preproc_warn_flag
2259  else
2260    ac_cpp_err=
2261  fi
2262else
2263  ac_cpp_err=yes
2264fi
2265if test -z "$ac_cpp_err"; then
2266  # Broken: success on invalid input.
2267continue
2268else
2269  echo "$as_me: failed program was:" >&5
2270  cat conftest.$ac_ext >&5
2271  # Passes both tests.
2272ac_preproc_ok=:
2273break
2274fi
2275rm -f conftest.err conftest.$ac_ext
2276
2277done
2278# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2279rm -f conftest.err conftest.$ac_ext
2280if $ac_preproc_ok; then
2281  :
2282else
2283  { { echo "$as_me:2283: error: C preprocessor \"$CPP\" fails sanity check" >&5
2284echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2285   { (exit 1); exit 1; }; }
2286fi
2287
2288ac_ext=c
2289ac_cpp='$CPP $CPPFLAGS'
2290ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2291ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2292ac_compiler_gnu=$ac_cv_c_compiler_gnu
2293ac_main_return=return
2294
2295if test $ac_cv_c_compiler_gnu = yes; then
2296    echo "$as_me:2296: checking whether $CC needs -traditional" >&5
2297echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2298if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2299  echo $ECHO_N "(cached) $ECHO_C" >&6
2300else
2301    ac_pattern="Autoconf.*'x'"
2302  cat >conftest.$ac_ext <<_ACEOF
2303#line 2303 "configure"
2304#include "confdefs.h"
2305#include <sgtty.h>
2306int Autoconf = TIOCGETP;
2307_ACEOF
2308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2309  egrep "$ac_pattern" >/dev/null 2>&1; then
2310  ac_cv_prog_gcc_traditional=yes
2311else
2312  ac_cv_prog_gcc_traditional=no
2313fi
2314rm -f conftest*
2315
2316  if test $ac_cv_prog_gcc_traditional = no; then
2317    cat >conftest.$ac_ext <<_ACEOF
2318#line 2318 "configure"
2319#include "confdefs.h"
2320#include <termio.h>
2321int Autoconf = TCGETA;
2322_ACEOF
2323if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324  egrep "$ac_pattern" >/dev/null 2>&1; then
2325  ac_cv_prog_gcc_traditional=yes
2326fi
2327rm -f conftest*
2328
2329  fi
2330fi
2331echo "$as_me:2331: result: $ac_cv_prog_gcc_traditional" >&5
2332echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2333  if test $ac_cv_prog_gcc_traditional = yes; then
2334    CC="$CC -traditional"
2335  fi
2336fi
2337
2338echo "$as_me:2338: checking whether $CC understands -c and -o together" >&5
2339echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2340if test "${cf_cv_prog_CC_c_o+set}" = set; then
2341  echo $ECHO_N "(cached) $ECHO_C" >&6
2342else
2343
2344cat > conftest.$ac_ext <<CF_EOF
2345#include <stdio.h>
2346int main()
2347{
2348	${cf_cv_main_return:-return}(0);
2349}
2350CF_EOF
2351# We do the test twice because some compilers refuse to overwrite an
2352# existing .o file with -o, though they will create one.
2353ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2354if { (eval echo "$as_me:2354: \"$ac_try\"") >&5
2355  (eval $ac_try) 2>&5
2356  ac_status=$?
2357  echo "$as_me:2357: \$? = $ac_status" >&5
2358  (exit $ac_status); } &&
2359  test -f conftest2.$ac_objext && { (eval echo "$as_me:2359: \"$ac_try\"") >&5
2360  (eval $ac_try) 2>&5
2361  ac_status=$?
2362  echo "$as_me:2362: \$? = $ac_status" >&5
2363  (exit $ac_status); };
2364then
2365  eval cf_cv_prog_CC_c_o=yes
2366else
2367  eval cf_cv_prog_CC_c_o=no
2368fi
2369rm -f conftest*
2370
2371fi
2372if test $cf_cv_prog_CC_c_o = yes; then
2373  echo "$as_me:2373: result: yes" >&5
2374echo "${ECHO_T}yes" >&6
2375else
2376  echo "$as_me:2376: result: no" >&5
2377echo "${ECHO_T}no" >&6
2378fi
2379
2380echo "$as_me:2380: checking for POSIXized ISC" >&5
2381echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2382if test -d /etc/conf/kconfig.d &&
2383   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2384then
2385  echo "$as_me:2385: result: yes" >&5
2386echo "${ECHO_T}yes" >&6
2387  ISC=yes # If later tests want to check for ISC.
2388
2389cat >>confdefs.h <<\EOF
2390#define _POSIX_SOURCE 1
2391EOF
2392
2393  if test "$GCC" = yes; then
2394    CC="$CC -posix"
2395  else
2396    CC="$CC -Xp"
2397  fi
2398else
2399  echo "$as_me:2399: result: no" >&5
2400echo "${ECHO_T}no" >&6
2401  ISC=
2402fi
2403
2404echo "$as_me:2404: checking for ${CC-cc} option to accept ANSI C" >&5
2405echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2406if test "${cf_cv_ansi_cc+set}" = set; then
2407  echo $ECHO_N "(cached) $ECHO_C" >&6
2408else
2409
2410cf_cv_ansi_cc=no
2411cf_save_CFLAGS="$CFLAGS"
2412cf_save_CPPFLAGS="$CPPFLAGS"
2413# Don't try gcc -ansi; that turns off useful extensions and
2414# breaks some systems' header files.
2415# AIX			-qlanglvl=ansi
2416# Ultrix and OSF/1	-std1
2417# HP-UX			-Aa -D_HPUX_SOURCE
2418# SVR4			-Xc
2419# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2420for cf_arg in "-DCC_HAS_PROTOS" \
2421	"" \
2422	-qlanglvl=ansi \
2423	-std1 \
2424	-Ae \
2425	"-Aa -D_HPUX_SOURCE" \
2426	-Xc
2427do
2428
2429cf_fix_cppflags=no
2430cf_new_cflags=
2431cf_new_cppflags=
2432cf_new_extra_cppflags=
2433
2434for cf_add_cflags in $cf_arg
2435do
2436case $cf_fix_cppflags in
2437no)
2438	case $cf_add_cflags in #(vi
2439	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2440		case $cf_add_cflags in
2441		-D*)
2442			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2443
2444			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2445			&& test -z "${cf_tst_cflags}" \
2446			&& cf_fix_cppflags=yes
2447
2448			if test $cf_fix_cppflags = yes ; then
2449				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2450				continue
2451			elif test "${cf_tst_cflags}" = "\"'" ; then
2452				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2453				continue
2454			fi
2455			;;
2456		esac
2457		case "$CPPFLAGS" in
2458		*$cf_add_cflags) #(vi
2459			;;
2460		*) #(vi
2461			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2462			;;
2463		esac
2464		;;
2465	*)
2466		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2467		;;
2468	esac
2469	;;
2470yes)
2471	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472
2473	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2474
2475	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2476	&& test -z "${cf_tst_cflags}" \
2477	&& cf_fix_cppflags=no
2478	;;
2479esac
2480done
2481
2482if test -n "$cf_new_cflags" ; then
2483
2484	CFLAGS="$CFLAGS $cf_new_cflags"
2485fi
2486
2487if test -n "$cf_new_cppflags" ; then
2488
2489	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2490fi
2491
2492if test -n "$cf_new_extra_cppflags" ; then
2493
2494	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2495fi
2496
2497	cat >conftest.$ac_ext <<_ACEOF
2498#line 2498 "configure"
2499#include "confdefs.h"
2500
2501#ifndef CC_HAS_PROTOS
2502#if !defined(__STDC__) || (__STDC__ != 1)
2503choke me
2504#endif
2505#endif
2506
2507int
2508main ()
2509{
2510
2511	int test (int i, double x);
2512	struct s1 {int (*f) (int a);};
2513	struct s2 {int (*f) (double a);};
2514  ;
2515  return 0;
2516}
2517_ACEOF
2518rm -f conftest.$ac_objext
2519if { (eval echo "$as_me:2519: \"$ac_compile\"") >&5
2520  (eval $ac_compile) 2>&5
2521  ac_status=$?
2522  echo "$as_me:2522: \$? = $ac_status" >&5
2523  (exit $ac_status); } &&
2524         { ac_try='test -s conftest.$ac_objext'
2525  { (eval echo "$as_me:2525: \"$ac_try\"") >&5
2526  (eval $ac_try) 2>&5
2527  ac_status=$?
2528  echo "$as_me:2528: \$? = $ac_status" >&5
2529  (exit $ac_status); }; }; then
2530  cf_cv_ansi_cc="$cf_arg"; break
2531else
2532  echo "$as_me: failed program was:" >&5
2533cat conftest.$ac_ext >&5
2534fi
2535rm -f conftest.$ac_objext conftest.$ac_ext
2536done
2537CFLAGS="$cf_save_CFLAGS"
2538CPPFLAGS="$cf_save_CPPFLAGS"
2539
2540fi
2541echo "$as_me:2541: result: $cf_cv_ansi_cc" >&5
2542echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2543
2544if test "$cf_cv_ansi_cc" != "no"; then
2545if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2546
2547cf_fix_cppflags=no
2548cf_new_cflags=
2549cf_new_cppflags=
2550cf_new_extra_cppflags=
2551
2552for cf_add_cflags in $cf_cv_ansi_cc
2553do
2554case $cf_fix_cppflags in
2555no)
2556	case $cf_add_cflags in #(vi
2557	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2558		case $cf_add_cflags in
2559		-D*)
2560			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2561
2562			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2563			&& test -z "${cf_tst_cflags}" \
2564			&& cf_fix_cppflags=yes
2565
2566			if test $cf_fix_cppflags = yes ; then
2567				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2568				continue
2569			elif test "${cf_tst_cflags}" = "\"'" ; then
2570				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2571				continue
2572			fi
2573			;;
2574		esac
2575		case "$CPPFLAGS" in
2576		*$cf_add_cflags) #(vi
2577			;;
2578		*) #(vi
2579			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2580			;;
2581		esac
2582		;;
2583	*)
2584		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2585		;;
2586	esac
2587	;;
2588yes)
2589	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2590
2591	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2592
2593	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2594	&& test -z "${cf_tst_cflags}" \
2595	&& cf_fix_cppflags=no
2596	;;
2597esac
2598done
2599
2600if test -n "$cf_new_cflags" ; then
2601
2602	CFLAGS="$CFLAGS $cf_new_cflags"
2603fi
2604
2605if test -n "$cf_new_cppflags" ; then
2606
2607	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2608fi
2609
2610if test -n "$cf_new_extra_cppflags" ; then
2611
2612	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2613fi
2614
2615else
2616	cat >>confdefs.h <<\EOF
2617#define CC_HAS_PROTOS 1
2618EOF
2619
2620fi
2621fi
2622
2623if test "$cf_cv_ansi_cc" = "no"; then
2624	{ { echo "$as_me:2624: error: Your compiler does not appear to recognize prototypes.
2625You have the following choices:
2626	a. adjust your compiler options
2627	b. get an up-to-date compiler
2628	c. use a wrapper such as unproto" >&5
2629echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2630You have the following choices:
2631	a. adjust your compiler options
2632	b. get an up-to-date compiler
2633	c. use a wrapper such as unproto" >&2;}
2634   { (exit 1); exit 1; }; }
2635fi
2636
2637case $cf_cv_system_name in
2638os2*)
2639    CFLAGS="$CFLAGS -Zmt"
2640    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2641    CXXFLAGS="$CXXFLAGS -Zmt"
2642    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2643    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2644    ac_cv_exeext=.exe
2645    ;;
2646esac
2647
2648PROG_EXT="$EXEEXT"
2649
2650test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2651#define PROG_EXT "$PROG_EXT"
2652EOF
2653
2654if test "$cross_compiling" = yes ; then
2655  LDCONFIG=:
2656else
2657case "$cf_cv_system_name" in #(vi
2658freebsd*) #(vi
2659  test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2660  ;;
2661*) LDPATH=$PATH:/sbin:/usr/sbin
2662  # Extract the first word of "ldconfig", so it can be a program name with args.
2663set dummy ldconfig; ac_word=$2
2664echo "$as_me:2664: checking for $ac_word" >&5
2665echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2666if test "${ac_cv_path_LDCONFIG+set}" = set; then
2667  echo $ECHO_N "(cached) $ECHO_C" >&6
2668else
2669  case $LDCONFIG in
2670  [\\/]* | ?:[\\/]*)
2671  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2672  ;;
2673  *)
2674  ac_save_IFS=$IFS; IFS=$ac_path_separator
2675ac_dummy="$LDPATH"
2676for ac_dir in $ac_dummy; do
2677  IFS=$ac_save_IFS
2678  test -z "$ac_dir" && ac_dir=.
2679  if $as_executable_p "$ac_dir/$ac_word"; then
2680   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2681   echo "$as_me:2681: found $ac_dir/$ac_word" >&5
2682   break
2683fi
2684done
2685
2686  ;;
2687esac
2688fi
2689LDCONFIG=$ac_cv_path_LDCONFIG
2690
2691if test -n "$LDCONFIG"; then
2692  echo "$as_me:2692: result: $LDCONFIG" >&5
2693echo "${ECHO_T}$LDCONFIG" >&6
2694else
2695  echo "$as_me:2695: result: no" >&5
2696echo "${ECHO_T}no" >&6
2697fi
2698
2699  ;;
2700esac
2701fi
2702
2703echo "$as_me:2703: checking if you want to ensure bool is consistent with C++" >&5
2704echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2705
2706# Check whether --with-cxx or --without-cxx was given.
2707if test "${with_cxx+set}" = set; then
2708  withval="$with_cxx"
2709  cf_with_cxx=$withval
2710else
2711  cf_with_cxx=yes
2712fi;
2713echo "$as_me:2713: result: $cf_with_cxx" >&5
2714echo "${ECHO_T}$cf_with_cxx" >&6
2715if test "X$cf_with_cxx" = Xno ; then
2716	CXX=""
2717	GXX=""
2718else
2719	# with autoconf 2.13, we can change the error to a warning:
2720		ac_ext=cc
2721ac_cpp='$CXXCPP $CPPFLAGS'
2722ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2723ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2724ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2725ac_main_return=return
2726if test -n "$ac_tool_prefix"; then
2727  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2728  do
2729    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2730set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2731echo "$as_me:2731: checking for $ac_word" >&5
2732echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2733if test "${ac_cv_prog_CXX+set}" = set; then
2734  echo $ECHO_N "(cached) $ECHO_C" >&6
2735else
2736  if test -n "$CXX"; then
2737  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2738else
2739  ac_save_IFS=$IFS; IFS=$ac_path_separator
2740ac_dummy="$PATH"
2741for ac_dir in $ac_dummy; do
2742  IFS=$ac_save_IFS
2743  test -z "$ac_dir" && ac_dir=.
2744  $as_executable_p "$ac_dir/$ac_word" || continue
2745ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2746echo "$as_me:2746: found $ac_dir/$ac_word" >&5
2747break
2748done
2749
2750fi
2751fi
2752CXX=$ac_cv_prog_CXX
2753if test -n "$CXX"; then
2754  echo "$as_me:2754: result: $CXX" >&5
2755echo "${ECHO_T}$CXX" >&6
2756else
2757  echo "$as_me:2757: result: no" >&5
2758echo "${ECHO_T}no" >&6
2759fi
2760
2761    test -n "$CXX" && break
2762  done
2763fi
2764if test -z "$CXX"; then
2765  ac_ct_CXX=$CXX
2766  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2767do
2768  # Extract the first word of "$ac_prog", so it can be a program name with args.
2769set dummy $ac_prog; ac_word=$2
2770echo "$as_me:2770: checking for $ac_word" >&5
2771echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2772if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2773  echo $ECHO_N "(cached) $ECHO_C" >&6
2774else
2775  if test -n "$ac_ct_CXX"; then
2776  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2777else
2778  ac_save_IFS=$IFS; IFS=$ac_path_separator
2779ac_dummy="$PATH"
2780for ac_dir in $ac_dummy; do
2781  IFS=$ac_save_IFS
2782  test -z "$ac_dir" && ac_dir=.
2783  $as_executable_p "$ac_dir/$ac_word" || continue
2784ac_cv_prog_ac_ct_CXX="$ac_prog"
2785echo "$as_me:2785: found $ac_dir/$ac_word" >&5
2786break
2787done
2788
2789fi
2790fi
2791ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2792if test -n "$ac_ct_CXX"; then
2793  echo "$as_me:2793: result: $ac_ct_CXX" >&5
2794echo "${ECHO_T}$ac_ct_CXX" >&6
2795else
2796  echo "$as_me:2796: result: no" >&5
2797echo "${ECHO_T}no" >&6
2798fi
2799
2800  test -n "$ac_ct_CXX" && break
2801done
2802test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2803
2804  CXX=$ac_ct_CXX
2805fi
2806
2807# Provide some information about the compiler.
2808echo "$as_me:2808:" \
2809     "checking for C++ compiler version" >&5
2810ac_compiler=`set X $ac_compile; echo $2`
2811{ (eval echo "$as_me:2811: \"$ac_compiler --version </dev/null >&5\"") >&5
2812  (eval $ac_compiler --version </dev/null >&5) 2>&5
2813  ac_status=$?
2814  echo "$as_me:2814: \$? = $ac_status" >&5
2815  (exit $ac_status); }
2816{ (eval echo "$as_me:2816: \"$ac_compiler -v </dev/null >&5\"") >&5
2817  (eval $ac_compiler -v </dev/null >&5) 2>&5
2818  ac_status=$?
2819  echo "$as_me:2819: \$? = $ac_status" >&5
2820  (exit $ac_status); }
2821{ (eval echo "$as_me:2821: \"$ac_compiler -V </dev/null >&5\"") >&5
2822  (eval $ac_compiler -V </dev/null >&5) 2>&5
2823  ac_status=$?
2824  echo "$as_me:2824: \$? = $ac_status" >&5
2825  (exit $ac_status); }
2826
2827echo "$as_me:2827: checking whether we are using the GNU C++ compiler" >&5
2828echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2829if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2830  echo $ECHO_N "(cached) $ECHO_C" >&6
2831else
2832  cat >conftest.$ac_ext <<_ACEOF
2833#line 2833 "configure"
2834#include "confdefs.h"
2835
2836int
2837main ()
2838{
2839#ifndef __GNUC__
2840       choke me
2841#endif
2842
2843  ;
2844  return 0;
2845}
2846_ACEOF
2847rm -f conftest.$ac_objext
2848if { (eval echo "$as_me:2848: \"$ac_compile\"") >&5
2849  (eval $ac_compile) 2>&5
2850  ac_status=$?
2851  echo "$as_me:2851: \$? = $ac_status" >&5
2852  (exit $ac_status); } &&
2853         { ac_try='test -s conftest.$ac_objext'
2854  { (eval echo "$as_me:2854: \"$ac_try\"") >&5
2855  (eval $ac_try) 2>&5
2856  ac_status=$?
2857  echo "$as_me:2857: \$? = $ac_status" >&5
2858  (exit $ac_status); }; }; then
2859  ac_compiler_gnu=yes
2860else
2861  echo "$as_me: failed program was:" >&5
2862cat conftest.$ac_ext >&5
2863ac_compiler_gnu=no
2864fi
2865rm -f conftest.$ac_objext conftest.$ac_ext
2866ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2867
2868fi
2869echo "$as_me:2869: result: $ac_cv_cxx_compiler_gnu" >&5
2870echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2871GXX=`test $ac_compiler_gnu = yes && echo yes`
2872ac_test_CXXFLAGS=${CXXFLAGS+set}
2873ac_save_CXXFLAGS=$CXXFLAGS
2874CXXFLAGS="-g"
2875echo "$as_me:2875: checking whether $CXX accepts -g" >&5
2876echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2877if test "${ac_cv_prog_cxx_g+set}" = set; then
2878  echo $ECHO_N "(cached) $ECHO_C" >&6
2879else
2880  cat >conftest.$ac_ext <<_ACEOF
2881#line 2881 "configure"
2882#include "confdefs.h"
2883
2884int
2885main ()
2886{
2887
2888  ;
2889  return 0;
2890}
2891_ACEOF
2892rm -f conftest.$ac_objext
2893if { (eval echo "$as_me:2893: \"$ac_compile\"") >&5
2894  (eval $ac_compile) 2>&5
2895  ac_status=$?
2896  echo "$as_me:2896: \$? = $ac_status" >&5
2897  (exit $ac_status); } &&
2898         { ac_try='test -s conftest.$ac_objext'
2899  { (eval echo "$as_me:2899: \"$ac_try\"") >&5
2900  (eval $ac_try) 2>&5
2901  ac_status=$?
2902  echo "$as_me:2902: \$? = $ac_status" >&5
2903  (exit $ac_status); }; }; then
2904  ac_cv_prog_cxx_g=yes
2905else
2906  echo "$as_me: failed program was:" >&5
2907cat conftest.$ac_ext >&5
2908ac_cv_prog_cxx_g=no
2909fi
2910rm -f conftest.$ac_objext conftest.$ac_ext
2911fi
2912echo "$as_me:2912: result: $ac_cv_prog_cxx_g" >&5
2913echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2914if test "$ac_test_CXXFLAGS" = set; then
2915  CXXFLAGS=$ac_save_CXXFLAGS
2916elif test $ac_cv_prog_cxx_g = yes; then
2917  if test "$GXX" = yes; then
2918    CXXFLAGS="-g -O2"
2919  else
2920    CXXFLAGS="-g"
2921  fi
2922else
2923  if test "$GXX" = yes; then
2924    CXXFLAGS="-O2"
2925  else
2926    CXXFLAGS=
2927  fi
2928fi
2929for ac_declaration in \
2930   ''\
2931   '#include <stdlib.h>' \
2932   'extern "C" void std::exit (int) throw (); using std::exit;' \
2933   'extern "C" void std::exit (int); using std::exit;' \
2934   'extern "C" void exit (int) throw ();' \
2935   'extern "C" void exit (int);' \
2936   'void exit (int);'
2937do
2938  cat >conftest.$ac_ext <<_ACEOF
2939#line 2939 "configure"
2940#include "confdefs.h"
2941#include <stdlib.h>
2942$ac_declaration
2943int
2944main ()
2945{
2946exit (42);
2947  ;
2948  return 0;
2949}
2950_ACEOF
2951rm -f conftest.$ac_objext
2952if { (eval echo "$as_me:2952: \"$ac_compile\"") >&5
2953  (eval $ac_compile) 2>&5
2954  ac_status=$?
2955  echo "$as_me:2955: \$? = $ac_status" >&5
2956  (exit $ac_status); } &&
2957         { ac_try='test -s conftest.$ac_objext'
2958  { (eval echo "$as_me:2958: \"$ac_try\"") >&5
2959  (eval $ac_try) 2>&5
2960  ac_status=$?
2961  echo "$as_me:2961: \$? = $ac_status" >&5
2962  (exit $ac_status); }; }; then
2963  :
2964else
2965  echo "$as_me: failed program was:" >&5
2966cat conftest.$ac_ext >&5
2967continue
2968fi
2969rm -f conftest.$ac_objext conftest.$ac_ext
2970  cat >conftest.$ac_ext <<_ACEOF
2971#line 2971 "configure"
2972#include "confdefs.h"
2973$ac_declaration
2974int
2975main ()
2976{
2977exit (42);
2978  ;
2979  return 0;
2980}
2981_ACEOF
2982rm -f conftest.$ac_objext
2983if { (eval echo "$as_me:2983: \"$ac_compile\"") >&5
2984  (eval $ac_compile) 2>&5
2985  ac_status=$?
2986  echo "$as_me:2986: \$? = $ac_status" >&5
2987  (exit $ac_status); } &&
2988         { ac_try='test -s conftest.$ac_objext'
2989  { (eval echo "$as_me:2989: \"$ac_try\"") >&5
2990  (eval $ac_try) 2>&5
2991  ac_status=$?
2992  echo "$as_me:2992: \$? = $ac_status" >&5
2993  (exit $ac_status); }; }; then
2994  break
2995else
2996  echo "$as_me: failed program was:" >&5
2997cat conftest.$ac_ext >&5
2998fi
2999rm -f conftest.$ac_objext conftest.$ac_ext
3000done
3001rm -f conftest*
3002if test -n "$ac_declaration"; then
3003  echo '#ifdef __cplusplus' >>confdefs.h
3004  echo $ac_declaration      >>confdefs.h
3005  echo '#endif'             >>confdefs.h
3006fi
3007
3008ac_ext=c
3009ac_cpp='$CPP $CPPFLAGS'
3010ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3011ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3012ac_compiler_gnu=$ac_cv_c_compiler_gnu
3013ac_main_return=return
3014
3015		# autoconf 2.5x removed the error - by hardcoding it to g++.
3016	if test "$CXX" = "g++" ; then
3017		# Extract the first word of "g++", so it can be a program name with args.
3018set dummy g++; ac_word=$2
3019echo "$as_me:3019: checking for $ac_word" >&5
3020echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3021if test "${ac_cv_path_CXX+set}" = set; then
3022  echo $ECHO_N "(cached) $ECHO_C" >&6
3023else
3024  case $CXX in
3025  [\\/]* | ?:[\\/]*)
3026  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3027  ;;
3028  *)
3029  ac_save_IFS=$IFS; IFS=$ac_path_separator
3030ac_dummy="$PATH"
3031for ac_dir in $ac_dummy; do
3032  IFS=$ac_save_IFS
3033  test -z "$ac_dir" && ac_dir=.
3034  if $as_executable_p "$ac_dir/$ac_word"; then
3035   ac_cv_path_CXX="$ac_dir/$ac_word"
3036   echo "$as_me:3036: found $ac_dir/$ac_word" >&5
3037   break
3038fi
3039done
3040
3041  ;;
3042esac
3043fi
3044CXX=$ac_cv_path_CXX
3045
3046if test -n "$CXX"; then
3047  echo "$as_me:3047: result: $CXX" >&5
3048echo "${ECHO_T}$CXX" >&6
3049else
3050  echo "$as_me:3050: result: no" >&5
3051echo "${ECHO_T}no" >&6
3052fi
3053
3054	fi
3055	if test "$CXX" = "g++" ; then
3056		{ echo "$as_me:3056: WARNING: ignoring hardcoded g++" >&5
3057echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3058		cf_with_cxx=no; CXX=""; GXX="";
3059	fi
3060fi
3061
3062GXX_VERSION=none
3063if test "$GXX" = yes; then
3064	echo "$as_me:3064: checking version of g++" >&5
3065echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3066	GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3067	test -z "$GXX_VERSION" && GXX_VERSION=unknown
3068	echo "$as_me:3068: result: $GXX_VERSION" >&5
3069echo "${ECHO_T}$GXX_VERSION" >&6
3070fi
3071
3072case $GXX_VERSION in
30731*|2.[0-6]*)
3074	# GXX=""; CXX=""; ac_cv_prog_gxx=no
3075	# cf_cxx_library=no
3076	{ echo "$as_me:3076: WARNING: templates do not work" >&5
3077echo "$as_me: WARNING: templates do not work" >&2;}
3078	;;
3079esac
3080
3081echo "$as_me:3081: checking if you want to build C++ binding and demo" >&5
3082echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3083
3084# Check whether --with-cxx-binding or --without-cxx-binding was given.
3085if test "${with_cxx_binding+set}" = set; then
3086  withval="$with_cxx_binding"
3087  cf_with_cxx_binding=$withval
3088else
3089  cf_with_cxx_binding=$cf_with_cxx
3090fi;
3091echo "$as_me:3091: result: $cf_with_cxx_binding" >&5
3092echo "${ECHO_T}$cf_with_cxx_binding" >&6
3093
3094echo "$as_me:3094: checking if you want to build with Ada95" >&5
3095echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3096
3097# Check whether --with-ada or --without-ada was given.
3098if test "${with_ada+set}" = set; then
3099  withval="$with_ada"
3100  cf_with_ada=$withval
3101else
3102  cf_with_ada=yes
3103fi;
3104echo "$as_me:3104: result: $cf_with_ada" >&5
3105echo "${ECHO_T}$cf_with_ada" >&6
3106
3107echo "$as_me:3107: checking if you want to build programs such as tic" >&5
3108echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3109
3110# Check whether --with-progs or --without-progs was given.
3111if test "${with_progs+set}" = set; then
3112  withval="$with_progs"
3113  cf_with_progs=$withval
3114else
3115  cf_with_progs=yes
3116fi;
3117echo "$as_me:3117: result: $cf_with_progs" >&5
3118echo "${ECHO_T}$cf_with_progs" >&6
3119
3120echo "$as_me:3120: checking if you wish to install curses.h" >&5
3121echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3122
3123# Check whether --with-curses-h or --without-curses-h was given.
3124if test "${with_curses_h+set}" = set; then
3125  withval="$with_curses_h"
3126  with_curses_h=$withval
3127else
3128  with_curses_h=yes
3129fi;
3130echo "$as_me:3130: result: $with_curses_h" >&5
3131echo "${ECHO_T}$with_curses_h" >&6
3132
3133modules_to_build="ncurses"
3134if test "X$cf_with_progs" != Xno ; then
3135modules_to_build="$modules_to_build progs tack"
3136fi
3137modules_to_build="$modules_to_build panel menu form"
3138
3139test "$program_prefix" != NONE &&
3140  program_transform_name="s,^,$program_prefix,;$program_transform_name"
3141# Use a double $ so make ignores it.
3142test "$program_suffix" != NONE &&
3143  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3144# Double any \ or $.  echo might interpret backslashes.
3145# By default was `s,x,x', remove it if useless.
3146cat <<\_ACEOF >conftest.sed
3147s/[\\$]/&&/g;s/;s,x,x,$//
3148_ACEOF
3149program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3150rm conftest.sed
3151
3152for ac_prog in mawk gawk nawk awk
3153do
3154  # Extract the first word of "$ac_prog", so it can be a program name with args.
3155set dummy $ac_prog; ac_word=$2
3156echo "$as_me:3156: checking for $ac_word" >&5
3157echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158if test "${ac_cv_prog_AWK+set}" = set; then
3159  echo $ECHO_N "(cached) $ECHO_C" >&6
3160else
3161  if test -n "$AWK"; then
3162  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3163else
3164  ac_save_IFS=$IFS; IFS=$ac_path_separator
3165ac_dummy="$PATH"
3166for ac_dir in $ac_dummy; do
3167  IFS=$ac_save_IFS
3168  test -z "$ac_dir" && ac_dir=.
3169  $as_executable_p "$ac_dir/$ac_word" || continue
3170ac_cv_prog_AWK="$ac_prog"
3171echo "$as_me:3171: found $ac_dir/$ac_word" >&5
3172break
3173done
3174
3175fi
3176fi
3177AWK=$ac_cv_prog_AWK
3178if test -n "$AWK"; then
3179  echo "$as_me:3179: result: $AWK" >&5
3180echo "${ECHO_T}$AWK" >&6
3181else
3182  echo "$as_me:3182: result: no" >&5
3183echo "${ECHO_T}no" >&6
3184fi
3185
3186  test -n "$AWK" && break
3187done
3188
3189test -z "$AWK" && { { echo "$as_me:3189: error: No awk program found" >&5
3190echo "$as_me: error: No awk program found" >&2;}
3191   { (exit 1); exit 1; }; }
3192
3193echo "$as_me:3193: checking for egrep" >&5
3194echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3195if test "${ac_cv_prog_egrep+set}" = set; then
3196  echo $ECHO_N "(cached) $ECHO_C" >&6
3197else
3198  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3199    then ac_cv_prog_egrep='grep -E'
3200    else ac_cv_prog_egrep='egrep'
3201    fi
3202fi
3203echo "$as_me:3203: result: $ac_cv_prog_egrep" >&5
3204echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3205 EGREP=$ac_cv_prog_egrep
3206
3207test -z "$EGREP" && { { echo "$as_me:3207: error: No egrep program found" >&5
3208echo "$as_me: error: No egrep program found" >&2;}
3209   { (exit 1); exit 1; }; }
3210
3211# Find a good install program.  We prefer a C program (faster),
3212# so one script is as good as another.  But avoid the broken or
3213# incompatible versions:
3214# SysV /etc/install, /usr/sbin/install
3215# SunOS /usr/etc/install
3216# IRIX /sbin/install
3217# AIX /bin/install
3218# AmigaOS /C/install, which installs bootblocks on floppy discs
3219# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3220# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3221# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3222# ./install, which can be erroneously created by make from ./install.sh.
3223echo "$as_me:3223: checking for a BSD compatible install" >&5
3224echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3225if test -z "$INSTALL"; then
3226if test "${ac_cv_path_install+set}" = set; then
3227  echo $ECHO_N "(cached) $ECHO_C" >&6
3228else
3229    ac_save_IFS=$IFS; IFS=$ac_path_separator
3230  for ac_dir in $PATH; do
3231    IFS=$ac_save_IFS
3232    # Account for people who put trailing slashes in PATH elements.
3233    case $ac_dir/ in
3234    / | ./ | .// | /cC/* \
3235    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3236    | /usr/ucb/* ) ;;
3237    *)
3238      # OSF1 and SCO ODT 3.0 have their own names for install.
3239      # Don't use installbsd from OSF since it installs stuff as root
3240      # by default.
3241      for ac_prog in ginstall scoinst install; do
3242        if $as_executable_p "$ac_dir/$ac_prog"; then
3243	  if test $ac_prog = install &&
3244            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3245	    # AIX install.  It has an incompatible calling convention.
3246	    :
3247	  elif test $ac_prog = install &&
3248	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3249	    # program-specific install script used by HP pwplus--don't use.
3250	    :
3251	  else
3252	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3253	    break 2
3254	  fi
3255	fi
3256      done
3257      ;;
3258    esac
3259  done
3260
3261fi
3262  if test "${ac_cv_path_install+set}" = set; then
3263    INSTALL=$ac_cv_path_install
3264  else
3265    # As a last resort, use the slow shell script.  We don't cache a
3266    # path for INSTALL within a source directory, because that will
3267    # break other packages using the cache if that directory is
3268    # removed, or if the path is relative.
3269    INSTALL=$ac_install_sh
3270  fi
3271fi
3272echo "$as_me:3272: result: $INSTALL" >&5
3273echo "${ECHO_T}$INSTALL" >&6
3274
3275# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3276# It thinks the first close brace ends the variable substitution.
3277test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3278
3279test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3280
3281test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3282
3283case $INSTALL in
3284/*)
3285  ;;
3286*)
3287  cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3288  test -z "$cf_dir" && cf_dir=.
3289  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3290  ;;
3291esac
3292
3293for ac_prog in tdlint lint alint
3294do
3295  # Extract the first word of "$ac_prog", so it can be a program name with args.
3296set dummy $ac_prog; ac_word=$2
3297echo "$as_me:3297: checking for $ac_word" >&5
3298echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3299if test "${ac_cv_prog_LINT+set}" = set; then
3300  echo $ECHO_N "(cached) $ECHO_C" >&6
3301else
3302  if test -n "$LINT"; then
3303  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3304else
3305  ac_save_IFS=$IFS; IFS=$ac_path_separator
3306ac_dummy="$PATH"
3307for ac_dir in $ac_dummy; do
3308  IFS=$ac_save_IFS
3309  test -z "$ac_dir" && ac_dir=.
3310  $as_executable_p "$ac_dir/$ac_word" || continue
3311ac_cv_prog_LINT="$ac_prog"
3312echo "$as_me:3312: found $ac_dir/$ac_word" >&5
3313break
3314done
3315
3316fi
3317fi
3318LINT=$ac_cv_prog_LINT
3319if test -n "$LINT"; then
3320  echo "$as_me:3320: result: $LINT" >&5
3321echo "${ECHO_T}$LINT" >&6
3322else
3323  echo "$as_me:3323: result: no" >&5
3324echo "${ECHO_T}no" >&6
3325fi
3326
3327  test -n "$LINT" && break
3328done
3329
3330echo "$as_me:3330: checking whether ln -s works" >&5
3331echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3332LN_S=$as_ln_s
3333if test "$LN_S" = "ln -s"; then
3334  echo "$as_me:3334: result: yes" >&5
3335echo "${ECHO_T}yes" >&6
3336else
3337  echo "$as_me:3337: result: no, using $LN_S" >&5
3338echo "${ECHO_T}no, using $LN_S" >&6
3339fi
3340
3341echo "$as_me:3341: checking whether ${MAKE-make} sets \${MAKE}" >&5
3342echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3343set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3344if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3345  echo $ECHO_N "(cached) $ECHO_C" >&6
3346else
3347  cat >conftest.make <<\EOF
3348all:
3349	@echo 'ac_maketemp="${MAKE}"'
3350EOF
3351# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3352eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3353if test -n "$ac_maketemp"; then
3354  eval ac_cv_prog_make_${ac_make}_set=yes
3355else
3356  eval ac_cv_prog_make_${ac_make}_set=no
3357fi
3358rm -f conftest.make
3359fi
3360if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3361  echo "$as_me:3361: result: yes" >&5
3362echo "${ECHO_T}yes" >&6
3363  SET_MAKE=
3364else
3365  echo "$as_me:3365: result: no" >&5
3366echo "${ECHO_T}no" >&6
3367  SET_MAKE="MAKE=${MAKE-make}"
3368fi
3369
3370echo "$as_me:3370: checking if filesystem supports mixed-case filenames" >&5
3371echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3372if test "${cf_cv_mixedcase+set}" = set; then
3373  echo $ECHO_N "(cached) $ECHO_C" >&6
3374else
3375
3376if test "$cross_compiling" = yes ; then
3377	case $target_alias in #(vi
3378	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3379		cf_cv_mixedcase=no
3380		;;
3381	*)
3382		cf_cv_mixedcase=yes
3383		;;
3384	esac
3385else
3386	rm -f conftest CONFTEST
3387	echo test >conftest
3388	if test -f CONFTEST ; then
3389		cf_cv_mixedcase=no
3390	else
3391		cf_cv_mixedcase=yes
3392	fi
3393	rm -f conftest CONFTEST
3394fi
3395
3396fi
3397echo "$as_me:3397: result: $cf_cv_mixedcase" >&5
3398echo "${ECHO_T}$cf_cv_mixedcase" >&6
3399test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3400#define MIXEDCASE_FILENAMES 1
3401EOF
3402
3403# Extract the first word of "ctags", so it can be a program name with args.
3404set dummy ctags; ac_word=$2
3405echo "$as_me:3405: checking for $ac_word" >&5
3406echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3407if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3408  echo $ECHO_N "(cached) $ECHO_C" >&6
3409else
3410  if test -n "$MAKE_LOWER_TAGS"; then
3411  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3412else
3413  ac_save_IFS=$IFS; IFS=$ac_path_separator
3414ac_dummy="$PATH"
3415for ac_dir in $ac_dummy; do
3416  IFS=$ac_save_IFS
3417  test -z "$ac_dir" && ac_dir=.
3418  $as_executable_p "$ac_dir/$ac_word" || continue
3419ac_cv_prog_MAKE_LOWER_TAGS="yes"
3420echo "$as_me:3420: found $ac_dir/$ac_word" >&5
3421break
3422done
3423
3424  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3425fi
3426fi
3427MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3428if test -n "$MAKE_LOWER_TAGS"; then
3429  echo "$as_me:3429: result: $MAKE_LOWER_TAGS" >&5
3430echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3431else
3432  echo "$as_me:3432: result: no" >&5
3433echo "${ECHO_T}no" >&6
3434fi
3435
3436if test "$cf_cv_mixedcase" = yes ; then
3437	# Extract the first word of "etags", so it can be a program name with args.
3438set dummy etags; ac_word=$2
3439echo "$as_me:3439: checking for $ac_word" >&5
3440echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3441if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3442  echo $ECHO_N "(cached) $ECHO_C" >&6
3443else
3444  if test -n "$MAKE_UPPER_TAGS"; then
3445  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3446else
3447  ac_save_IFS=$IFS; IFS=$ac_path_separator
3448ac_dummy="$PATH"
3449for ac_dir in $ac_dummy; do
3450  IFS=$ac_save_IFS
3451  test -z "$ac_dir" && ac_dir=.
3452  $as_executable_p "$ac_dir/$ac_word" || continue
3453ac_cv_prog_MAKE_UPPER_TAGS="yes"
3454echo "$as_me:3454: found $ac_dir/$ac_word" >&5
3455break
3456done
3457
3458  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3459fi
3460fi
3461MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3462if test -n "$MAKE_UPPER_TAGS"; then
3463  echo "$as_me:3463: result: $MAKE_UPPER_TAGS" >&5
3464echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3465else
3466  echo "$as_me:3466: result: no" >&5
3467echo "${ECHO_T}no" >&6
3468fi
3469
3470else
3471	MAKE_UPPER_TAGS=no
3472fi
3473
3474if test "$MAKE_UPPER_TAGS" = yes ; then
3475	MAKE_UPPER_TAGS=
3476else
3477	MAKE_UPPER_TAGS="#"
3478fi
3479
3480if test "$MAKE_LOWER_TAGS" = yes ; then
3481	MAKE_LOWER_TAGS=
3482else
3483	MAKE_LOWER_TAGS="#"
3484fi
3485
3486echo "$as_me:3486: checking for makeflags variable" >&5
3487echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3488if test "${cf_cv_makeflags+set}" = set; then
3489  echo $ECHO_N "(cached) $ECHO_C" >&6
3490else
3491
3492	cf_cv_makeflags=''
3493	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3494	do
3495		cat >cf_makeflags.tmp <<CF_EOF
3496SHELL = /bin/sh
3497all :
3498	@ echo '.$cf_option'
3499CF_EOF
3500		cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[ 	]*$,,'`
3501		case "$cf_result" in
3502		.*k)
3503			cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3504			case "$cf_result" in
3505			.*CC=*)	cf_cv_makeflags=
3506				;;
3507			*)	cf_cv_makeflags=$cf_option
3508				;;
3509			esac
3510			break
3511			;;
3512		.-)	;;
3513		*)	echo "given option \"$cf_option\", no match \"$cf_result\""
3514			;;
3515		esac
3516	done
3517	rm -f cf_makeflags.tmp
3518
3519fi
3520echo "$as_me:3520: result: $cf_cv_makeflags" >&5
3521echo "${ECHO_T}$cf_cv_makeflags" >&6
3522
3523echo "$as_me:3523: checking for long file names" >&5
3524echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3525if test "${ac_cv_sys_long_file_names+set}" = set; then
3526  echo $ECHO_N "(cached) $ECHO_C" >&6
3527else
3528  ac_cv_sys_long_file_names=yes
3529# Test for long file names in all the places we know might matter:
3530#      .		the current directory, where building will happen
3531#      $prefix/lib	where we will be installing things
3532#      $exec_prefix/lib	likewise
3533# eval it to expand exec_prefix.
3534#      $TMPDIR		if set, where it might want to write temporary files
3535# if $TMPDIR is not set:
3536#      /tmp		where it might want to write temporary files
3537#      /var/tmp		likewise
3538#      /usr/tmp		likewise
3539if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3540  ac_tmpdirs=$TMPDIR
3541else
3542  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3543fi
3544for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3545  test -d $ac_dir || continue
3546  test -w $ac_dir || continue # It is less confusing to not echo anything here.
3547  ac_xdir=$ac_dir/cf$$
3548  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3549  ac_tf1=$ac_xdir/conftest9012345
3550  ac_tf2=$ac_xdir/conftest9012346
3551  (echo 1 >$ac_tf1) 2>/dev/null
3552  (echo 2 >$ac_tf2) 2>/dev/null
3553  ac_val=`cat $ac_tf1 2>/dev/null`
3554  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3555    ac_cv_sys_long_file_names=no
3556    rm -rf $ac_xdir 2>/dev/null
3557    break
3558  fi
3559  rm -rf $ac_xdir 2>/dev/null
3560done
3561fi
3562echo "$as_me:3562: result: $ac_cv_sys_long_file_names" >&5
3563echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3564if test $ac_cv_sys_long_file_names = yes; then
3565
3566cat >>confdefs.h <<\EOF
3567#define HAVE_LONG_FILE_NAMES 1
3568EOF
3569
3570fi
3571
3572echo "$as_me:3572: checking if filesystem supports mixed-case filenames" >&5
3573echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3574if test "${cf_cv_mixedcase+set}" = set; then
3575  echo $ECHO_N "(cached) $ECHO_C" >&6
3576else
3577
3578if test "$cross_compiling" = yes ; then
3579	case $target_alias in #(vi
3580	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3581		cf_cv_mixedcase=no
3582		;;
3583	*)
3584		cf_cv_mixedcase=yes
3585		;;
3586	esac
3587else
3588	rm -f conftest CONFTEST
3589	echo test >conftest
3590	if test -f CONFTEST ; then
3591		cf_cv_mixedcase=no
3592	else
3593		cf_cv_mixedcase=yes
3594	fi
3595	rm -f conftest CONFTEST
3596fi
3597
3598fi
3599echo "$as_me:3599: result: $cf_cv_mixedcase" >&5
3600echo "${ECHO_T}$cf_cv_mixedcase" >&6
3601test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3602#define MIXEDCASE_FILENAMES 1
3603EOF
3604
3605if test -n "$ac_tool_prefix"; then
3606  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3607set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3608echo "$as_me:3608: checking for $ac_word" >&5
3609echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3610if test "${ac_cv_prog_RANLIB+set}" = set; then
3611  echo $ECHO_N "(cached) $ECHO_C" >&6
3612else
3613  if test -n "$RANLIB"; then
3614  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3615else
3616  ac_save_IFS=$IFS; IFS=$ac_path_separator
3617ac_dummy="$PATH"
3618for ac_dir in $ac_dummy; do
3619  IFS=$ac_save_IFS
3620  test -z "$ac_dir" && ac_dir=.
3621  $as_executable_p "$ac_dir/$ac_word" || continue
3622ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3623echo "$as_me:3623: found $ac_dir/$ac_word" >&5
3624break
3625done
3626
3627fi
3628fi
3629RANLIB=$ac_cv_prog_RANLIB
3630if test -n "$RANLIB"; then
3631  echo "$as_me:3631: result: $RANLIB" >&5
3632echo "${ECHO_T}$RANLIB" >&6
3633else
3634  echo "$as_me:3634: result: no" >&5
3635echo "${ECHO_T}no" >&6
3636fi
3637
3638fi
3639if test -z "$ac_cv_prog_RANLIB"; then
3640  ac_ct_RANLIB=$RANLIB
3641  # Extract the first word of "ranlib", so it can be a program name with args.
3642set dummy ranlib; ac_word=$2
3643echo "$as_me:3643: checking for $ac_word" >&5
3644echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3645if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3646  echo $ECHO_N "(cached) $ECHO_C" >&6
3647else
3648  if test -n "$ac_ct_RANLIB"; then
3649  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3650else
3651  ac_save_IFS=$IFS; IFS=$ac_path_separator
3652ac_dummy="$PATH"
3653for ac_dir in $ac_dummy; do
3654  IFS=$ac_save_IFS
3655  test -z "$ac_dir" && ac_dir=.
3656  $as_executable_p "$ac_dir/$ac_word" || continue
3657ac_cv_prog_ac_ct_RANLIB="ranlib"
3658echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659break
3660done
3661
3662  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3663fi
3664fi
3665ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3666if test -n "$ac_ct_RANLIB"; then
3667  echo "$as_me:3667: result: $ac_ct_RANLIB" >&5
3668echo "${ECHO_T}$ac_ct_RANLIB" >&6
3669else
3670  echo "$as_me:3670: result: no" >&5
3671echo "${ECHO_T}no" >&6
3672fi
3673
3674  RANLIB=$ac_ct_RANLIB
3675else
3676  RANLIB="$ac_cv_prog_RANLIB"
3677fi
3678
3679if test -n "$ac_tool_prefix"; then
3680  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3681set dummy ${ac_tool_prefix}ld; ac_word=$2
3682echo "$as_me:3682: checking for $ac_word" >&5
3683echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3684if test "${ac_cv_prog_LD+set}" = set; then
3685  echo $ECHO_N "(cached) $ECHO_C" >&6
3686else
3687  if test -n "$LD"; then
3688  ac_cv_prog_LD="$LD" # Let the user override the test.
3689else
3690  ac_save_IFS=$IFS; IFS=$ac_path_separator
3691ac_dummy="$PATH"
3692for ac_dir in $ac_dummy; do
3693  IFS=$ac_save_IFS
3694  test -z "$ac_dir" && ac_dir=.
3695  $as_executable_p "$ac_dir/$ac_word" || continue
3696ac_cv_prog_LD="${ac_tool_prefix}ld"
3697echo "$as_me:3697: found $ac_dir/$ac_word" >&5
3698break
3699done
3700
3701fi
3702fi
3703LD=$ac_cv_prog_LD
3704if test -n "$LD"; then
3705  echo "$as_me:3705: result: $LD" >&5
3706echo "${ECHO_T}$LD" >&6
3707else
3708  echo "$as_me:3708: result: no" >&5
3709echo "${ECHO_T}no" >&6
3710fi
3711
3712fi
3713if test -z "$ac_cv_prog_LD"; then
3714  ac_ct_LD=$LD
3715  # Extract the first word of "ld", so it can be a program name with args.
3716set dummy ld; ac_word=$2
3717echo "$as_me:3717: checking for $ac_word" >&5
3718echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3719if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3720  echo $ECHO_N "(cached) $ECHO_C" >&6
3721else
3722  if test -n "$ac_ct_LD"; then
3723  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3724else
3725  ac_save_IFS=$IFS; IFS=$ac_path_separator
3726ac_dummy="$PATH"
3727for ac_dir in $ac_dummy; do
3728  IFS=$ac_save_IFS
3729  test -z "$ac_dir" && ac_dir=.
3730  $as_executable_p "$ac_dir/$ac_word" || continue
3731ac_cv_prog_ac_ct_LD="ld"
3732echo "$as_me:3732: found $ac_dir/$ac_word" >&5
3733break
3734done
3735
3736  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3737fi
3738fi
3739ac_ct_LD=$ac_cv_prog_ac_ct_LD
3740if test -n "$ac_ct_LD"; then
3741  echo "$as_me:3741: result: $ac_ct_LD" >&5
3742echo "${ECHO_T}$ac_ct_LD" >&6
3743else
3744  echo "$as_me:3744: result: no" >&5
3745echo "${ECHO_T}no" >&6
3746fi
3747
3748  LD=$ac_ct_LD
3749else
3750  LD="$ac_cv_prog_LD"
3751fi
3752
3753if test -n "$ac_tool_prefix"; then
3754  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3755set dummy ${ac_tool_prefix}ar; ac_word=$2
3756echo "$as_me:3756: checking for $ac_word" >&5
3757echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758if test "${ac_cv_prog_AR+set}" = set; then
3759  echo $ECHO_N "(cached) $ECHO_C" >&6
3760else
3761  if test -n "$AR"; then
3762  ac_cv_prog_AR="$AR" # Let the user override the test.
3763else
3764  ac_save_IFS=$IFS; IFS=$ac_path_separator
3765ac_dummy="$PATH"
3766for ac_dir in $ac_dummy; do
3767  IFS=$ac_save_IFS
3768  test -z "$ac_dir" && ac_dir=.
3769  $as_executable_p "$ac_dir/$ac_word" || continue
3770ac_cv_prog_AR="${ac_tool_prefix}ar"
3771echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772break
3773done
3774
3775fi
3776fi
3777AR=$ac_cv_prog_AR
3778if test -n "$AR"; then
3779  echo "$as_me:3779: result: $AR" >&5
3780echo "${ECHO_T}$AR" >&6
3781else
3782  echo "$as_me:3782: result: no" >&5
3783echo "${ECHO_T}no" >&6
3784fi
3785
3786fi
3787if test -z "$ac_cv_prog_AR"; then
3788  ac_ct_AR=$AR
3789  # Extract the first word of "ar", so it can be a program name with args.
3790set dummy ar; ac_word=$2
3791echo "$as_me:3791: checking for $ac_word" >&5
3792echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3794  echo $ECHO_N "(cached) $ECHO_C" >&6
3795else
3796  if test -n "$ac_ct_AR"; then
3797  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3798else
3799  ac_save_IFS=$IFS; IFS=$ac_path_separator
3800ac_dummy="$PATH"
3801for ac_dir in $ac_dummy; do
3802  IFS=$ac_save_IFS
3803  test -z "$ac_dir" && ac_dir=.
3804  $as_executable_p "$ac_dir/$ac_word" || continue
3805ac_cv_prog_ac_ct_AR="ar"
3806echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807break
3808done
3809
3810  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3811fi
3812fi
3813ac_ct_AR=$ac_cv_prog_ac_ct_AR
3814if test -n "$ac_ct_AR"; then
3815  echo "$as_me:3815: result: $ac_ct_AR" >&5
3816echo "${ECHO_T}$ac_ct_AR" >&6
3817else
3818  echo "$as_me:3818: result: no" >&5
3819echo "${ECHO_T}no" >&6
3820fi
3821
3822  AR=$ac_ct_AR
3823else
3824  AR="$ac_cv_prog_AR"
3825fi
3826
3827if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3828  echo $ECHO_N "(cached) $ECHO_C" >&6
3829else
3830
3831echo "$as_me:3831: checking for archiver options (symbol AR_OPTS)" >&5
3832echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3833
3834if test -z "$AR_OPTS" ; then
3835	AR_OPTS=rv
3836
3837fi
3838
3839cf_cv_subst_AR_OPTS=$AR_OPTS
3840echo "$as_me:3840: result: $AR_OPTS" >&5
3841echo "${ECHO_T}$AR_OPTS" >&6
3842
3843fi
3844
3845echo "$as_me:3845: checking if you have specified an install-prefix" >&5
3846echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3847
3848# Check whether --with-install-prefix or --without-install-prefix was given.
3849if test "${with_install_prefix+set}" = set; then
3850  withval="$with_install_prefix"
3851  case "$withval" in #(vi
3852	yes|no) #(vi
3853		;;
3854	*)	DESTDIR="$withval"
3855		;;
3856	esac
3857fi;
3858echo "$as_me:3858: result: $DESTDIR" >&5
3859echo "${ECHO_T}$DESTDIR" >&6
3860
3861###############################################################################
3862
3863# If we're cross-compiling, allow the user to override the tools and their
3864# options.  The configure script is oriented toward identifying the host
3865# compiler, etc., but we need a build compiler to generate parts of the source.
3866
3867if test "$cross_compiling" = yes ; then
3868
3869	# defaults that we might want to override
3870	: ${BUILD_CFLAGS:=''}
3871	: ${BUILD_CPPFLAGS:=''}
3872	: ${BUILD_LDFLAGS:=''}
3873	: ${BUILD_LIBS:=''}
3874	: ${BUILD_EXEEXT:='$x'}
3875	: ${BUILD_OBJEXT:='o'}
3876
3877# Check whether --with-build-cc or --without-build-cc was given.
3878if test "${with_build_cc+set}" = set; then
3879  withval="$with_build_cc"
3880  BUILD_CC="$withval"
3881else
3882  for ac_prog in gcc cc cl
3883do
3884  # Extract the first word of "$ac_prog", so it can be a program name with args.
3885set dummy $ac_prog; ac_word=$2
3886echo "$as_me:3886: checking for $ac_word" >&5
3887echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3888if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3889  echo $ECHO_N "(cached) $ECHO_C" >&6
3890else
3891  if test -n "$BUILD_CC"; then
3892  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3893else
3894  ac_save_IFS=$IFS; IFS=$ac_path_separator
3895ac_dummy="$PATH"
3896for ac_dir in $ac_dummy; do
3897  IFS=$ac_save_IFS
3898  test -z "$ac_dir" && ac_dir=.
3899  $as_executable_p "$ac_dir/$ac_word" || continue
3900ac_cv_prog_BUILD_CC="$ac_prog"
3901echo "$as_me:3901: found $ac_dir/$ac_word" >&5
3902break
3903done
3904
3905fi
3906fi
3907BUILD_CC=$ac_cv_prog_BUILD_CC
3908if test -n "$BUILD_CC"; then
3909  echo "$as_me:3909: result: $BUILD_CC" >&5
3910echo "${ECHO_T}$BUILD_CC" >&6
3911else
3912  echo "$as_me:3912: result: no" >&5
3913echo "${ECHO_T}no" >&6
3914fi
3915
3916  test -n "$BUILD_CC" && break
3917done
3918
3919fi;
3920	echo "$as_me:3920: checking for native build C compiler" >&5
3921echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3922	echo "$as_me:3922: result: $BUILD_CC" >&5
3923echo "${ECHO_T}$BUILD_CC" >&6
3924
3925	echo "$as_me:3925: checking for native build C preprocessor" >&5
3926echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3927
3928# Check whether --with-build-cpp or --without-build-cpp was given.
3929if test "${with_build_cpp+set}" = set; then
3930  withval="$with_build_cpp"
3931  BUILD_CPP="$withval"
3932else
3933  BUILD_CPP='${BUILD_CC} -E'
3934fi;
3935	echo "$as_me:3935: result: $BUILD_CPP" >&5
3936echo "${ECHO_T}$BUILD_CPP" >&6
3937
3938	echo "$as_me:3938: checking for native build C flags" >&5
3939echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3940
3941# Check whether --with-build-cflags or --without-build-cflags was given.
3942if test "${with_build_cflags+set}" = set; then
3943  withval="$with_build_cflags"
3944  BUILD_CFLAGS="$withval"
3945fi;
3946	echo "$as_me:3946: result: $BUILD_CFLAGS" >&5
3947echo "${ECHO_T}$BUILD_CFLAGS" >&6
3948
3949	echo "$as_me:3949: checking for native build C preprocessor-flags" >&5
3950echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3951
3952# Check whether --with-build-cppflags or --without-build-cppflags was given.
3953if test "${with_build_cppflags+set}" = set; then
3954  withval="$with_build_cppflags"
3955  BUILD_CPPFLAGS="$withval"
3956fi;
3957	echo "$as_me:3957: result: $BUILD_CPPFLAGS" >&5
3958echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3959
3960	echo "$as_me:3960: checking for native build linker-flags" >&5
3961echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3962
3963# Check whether --with-build-ldflags or --without-build-ldflags was given.
3964if test "${with_build_ldflags+set}" = set; then
3965  withval="$with_build_ldflags"
3966  BUILD_LDFLAGS="$withval"
3967fi;
3968	echo "$as_me:3968: result: $BUILD_LDFLAGS" >&5
3969echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3970
3971	echo "$as_me:3971: checking for native build linker-libraries" >&5
3972echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3973
3974# Check whether --with-build-libs or --without-build-libs was given.
3975if test "${with_build_libs+set}" = set; then
3976  withval="$with_build_libs"
3977  BUILD_LIBS="$withval"
3978fi;
3979	echo "$as_me:3979: result: $BUILD_LIBS" >&5
3980echo "${ECHO_T}$BUILD_LIBS" >&6
3981
3982	# this assumes we're on Unix.
3983	BUILD_EXEEXT=
3984	BUILD_OBJEXT=o
3985
3986	: ${BUILD_CC:='${CC}'}
3987
3988	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
3989		{ { echo "$as_me:3989: error: Cross-build requires two compilers.
3990Use --with-build-cc to specify the native compiler." >&5
3991echo "$as_me: error: Cross-build requires two compilers.
3992Use --with-build-cc to specify the native compiler." >&2;}
3993   { (exit 1); exit 1; }; }
3994	fi
3995
3996else
3997	: ${BUILD_CC:='${CC}'}
3998	: ${BUILD_CPP:='${CPP}'}
3999	: ${BUILD_CFLAGS:='${CFLAGS}'}
4000	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4001	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
4002	: ${BUILD_LIBS:='${LIBS}'}
4003	: ${BUILD_EXEEXT:='$x'}
4004	: ${BUILD_OBJEXT:='o'}
4005fi
4006
4007###############################################################################
4008
4009### Options to allow the user to specify the set of libraries which are used.
4010### Use "--without-normal --with-shared" to allow the default model to be
4011### shared, for example.
4012cf_list_models=""
4013
4014LIBTOOL=
4015
4016# common library maintenance symbols that are convenient for libtool scripts:
4017LIB_CREATE='${AR} -cr'
4018LIB_OBJECT='${OBJECTS}'
4019LIB_SUFFIX=.a
4020LIB_PREP="$RANLIB"
4021
4022# symbols used to prop libtool up to enable it to determine what it should be
4023# doing:
4024LIB_CLEAN=
4025LIB_COMPILE=
4026LIB_LINK=
4027LIB_INSTALL=
4028LIB_UNINSTALL=
4029
4030echo "$as_me:4030: checking if you want to build libraries with libtool" >&5
4031echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4032
4033# Check whether --with-libtool or --without-libtool was given.
4034if test "${with_libtool+set}" = set; then
4035  withval="$with_libtool"
4036  with_libtool=$withval
4037else
4038  with_libtool=no
4039fi;
4040echo "$as_me:4040: result: $with_libtool" >&5
4041echo "${ECHO_T}$with_libtool" >&6
4042if test "$with_libtool" != "no"; then
4043
4044 	if test "$with_libtool" != "yes" ; then
4045
4046if test "x$prefix" != xNONE; then
4047  cf_path_syntax="$prefix"
4048else
4049  cf_path_syntax="$ac_default_prefix"
4050fi
4051
4052case ".$with_libtool" in #(vi
4053.\$\(*\)*|.\'*\'*) #(vi
4054  ;;
4055..|./*|.\\*) #(vi
4056  ;;
4057.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4058  ;;
4059.\${*prefix}*) #(vi
4060  eval with_libtool="$with_libtool"
4061  case ".$with_libtool" in #(vi
4062  .NONE/*)
4063    with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4064    ;;
4065  esac
4066  ;; #(vi
4067.no|.NONE/*)
4068  with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4069  ;;
4070*)
4071  { { echo "$as_me:4071: error: expected a pathname, not \"$with_libtool\"" >&5
4072echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4073   { (exit 1); exit 1; }; }
4074  ;;
4075esac
4076
4077		LIBTOOL=$with_libtool
4078	else
4079 		# Extract the first word of "libtool", so it can be a program name with args.
4080set dummy libtool; ac_word=$2
4081echo "$as_me:4081: checking for $ac_word" >&5
4082echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4083if test "${ac_cv_path_LIBTOOL+set}" = set; then
4084  echo $ECHO_N "(cached) $ECHO_C" >&6
4085else
4086  case $LIBTOOL in
4087  [\\/]* | ?:[\\/]*)
4088  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4089  ;;
4090  *)
4091  ac_save_IFS=$IFS; IFS=$ac_path_separator
4092ac_dummy="$PATH"
4093for ac_dir in $ac_dummy; do
4094  IFS=$ac_save_IFS
4095  test -z "$ac_dir" && ac_dir=.
4096  if $as_executable_p "$ac_dir/$ac_word"; then
4097   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4098   echo "$as_me:4098: found $ac_dir/$ac_word" >&5
4099   break
4100fi
4101done
4102
4103  ;;
4104esac
4105fi
4106LIBTOOL=$ac_cv_path_LIBTOOL
4107
4108if test -n "$LIBTOOL"; then
4109  echo "$as_me:4109: result: $LIBTOOL" >&5
4110echo "${ECHO_T}$LIBTOOL" >&6
4111else
4112  echo "$as_me:4112: result: no" >&5
4113echo "${ECHO_T}no" >&6
4114fi
4115
4116 	fi
4117 	if test -z "$LIBTOOL" ; then
4118 		{ { echo "$as_me:4118: error: Cannot find libtool" >&5
4119echo "$as_me: error: Cannot find libtool" >&2;}
4120   { (exit 1); exit 1; }; }
4121 	fi
4122	LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` -o'
4123	LIB_OBJECT='${OBJECTS}.o=.lo)'
4124	LIB_SUFFIX=.la
4125	LIB_CLEAN='${LIBTOOL} --mode=clean'
4126	LIB_COMPILE='${LIBTOOL} --mode=compile'
4127	LIB_LINK='${LIBTOOL} --mode=link'
4128	LIB_INSTALL='${LIBTOOL} --mode=install'
4129	LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4130	LIB_PREP=:
4131
4132	# Show the version of libtool
4133	echo "$as_me:4133: checking version of libtool" >&5
4134echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4135
4136	# Save the version in a cache variable - this is not entirely a good
4137	# thing, but the version string from libtool is very ugly, and for
4138	# bug reports it might be useful to have the original string.
4139	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4140	echo "$as_me:4140: result: $cf_cv_libtool_version" >&5
4141echo "${ECHO_T}$cf_cv_libtool_version" >&6
4142	if test -z "$cf_cv_libtool_version" ; then
4143		{ { echo "$as_me:4143: error: This is not libtool" >&5
4144echo "$as_me: error: This is not libtool" >&2;}
4145   { (exit 1); exit 1; }; }
4146	fi
4147
4148	# special hack to add --tag option for C++ compiler
4149	case $cf_cv_libtool_version in
4150	1.[5-9]*|[2-9]*)
4151		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4152		;;
4153	*)
4154		LIBTOOL_CXX="$LIBTOOL"
4155		;;
4156	esac
4157else
4158	LIBTOOL=""
4159	LIBTOOL_CXX=""
4160fi
4161
4162test -z "$LIBTOOL" && ECHO_LT=
4163
4164if test "$with_libtool" != "no" ; then
4165
4166cf_list_models="$cf_list_models libtool"
4167
4168else
4169
4170echo "$as_me:4170: checking if you want to build shared libraries" >&5
4171echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4172
4173# Check whether --with-shared or --without-shared was given.
4174if test "${with_shared+set}" = set; then
4175  withval="$with_shared"
4176  with_shared=$withval
4177else
4178  with_shared=no
4179fi;
4180echo "$as_me:4180: result: $with_shared" >&5
4181echo "${ECHO_T}$with_shared" >&6
4182test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4183
4184echo "$as_me:4184: checking if you want to build static libraries" >&5
4185echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4186
4187# Check whether --with-normal or --without-normal was given.
4188if test "${with_normal+set}" = set; then
4189  withval="$with_normal"
4190  with_normal=$withval
4191else
4192  with_normal=yes
4193fi;
4194echo "$as_me:4194: result: $with_normal" >&5
4195echo "${ECHO_T}$with_normal" >&6
4196test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4197
4198echo "$as_me:4198: checking if you want to build debug libraries" >&5
4199echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4200
4201# Check whether --with-debug or --without-debug was given.
4202if test "${with_debug+set}" = set; then
4203  withval="$with_debug"
4204  with_debug=$withval
4205else
4206  with_debug=yes
4207fi;
4208echo "$as_me:4208: result: $with_debug" >&5
4209echo "${ECHO_T}$with_debug" >&6
4210test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4211
4212echo "$as_me:4212: checking if you want to build profiling libraries" >&5
4213echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4214
4215# Check whether --with-profile or --without-profile was given.
4216if test "${with_profile+set}" = set; then
4217  withval="$with_profile"
4218  with_profile=$withval
4219else
4220  with_profile=no
4221fi;
4222echo "$as_me:4222: result: $with_profile" >&5
4223echo "${ECHO_T}$with_profile" >&6
4224test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4225
4226fi
4227
4228###############################################################################
4229
4230echo "$as_me:4230: checking for specified models" >&5
4231echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4232test -z "$cf_list_models" && cf_list_models=normal
4233test "$with_libtool" != "no" && cf_list_models=libtool
4234echo "$as_me:4234: result: $cf_list_models" >&5
4235echo "${ECHO_T}$cf_list_models" >&6
4236
4237### Use the first model as the default, and save its suffix for use in building
4238### up test-applications.
4239echo "$as_me:4239: checking for default model" >&5
4240echo $ECHO_N "checking for default model... $ECHO_C" >&6
4241DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4242echo "$as_me:4242: result: $DFT_LWR_MODEL" >&5
4243echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4244
4245DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4246
4247TINFO_NAME=tinfo
4248
4249LIB_NAME=ncurses
4250
4251LIB_DIR=../lib
4252LIB_2ND=../../lib
4253
4254	case $cf_cv_system_name in
4255	OS/2*)	LIB_PREFIX=''     ;;
4256	os2*)	LIB_PREFIX=''     ;;
4257	*)	LIB_PREFIX='lib'  ;;
4258	esac
4259cf_prefix=$LIB_PREFIX
4260
4261LIB_PREFIX=$cf_prefix
4262
4263LIB_SUFFIX=
4264
4265###############################################################################
4266
4267echo "$as_me:4267: checking if you want to build a separate terminfo library" >&5
4268echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4269
4270# Check whether --with-termlib or --without-termlib was given.
4271if test "${with_termlib+set}" = set; then
4272  withval="$with_termlib"
4273  with_termlib=$withval
4274else
4275  with_termlib=no
4276fi;
4277echo "$as_me:4277: result: $with_termlib" >&5
4278echo "${ECHO_T}$with_termlib" >&6
4279
4280### Checks for special libraries, must be done up-front.
4281SHLIB_LIST=""
4282
4283echo "$as_me:4283: checking if you want to link with the GPM mouse library" >&5
4284echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4285
4286# Check whether --with-gpm or --without-gpm was given.
4287if test "${with_gpm+set}" = set; then
4288  withval="$with_gpm"
4289  with_gpm=$withval
4290else
4291  with_gpm=maybe
4292fi;
4293echo "$as_me:4293: result: $with_gpm" >&5
4294echo "${ECHO_T}$with_gpm" >&6
4295
4296if test "$with_gpm" != no ; then
4297	echo "$as_me:4297: checking for gpm.h" >&5
4298echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4299if test "${ac_cv_header_gpm_h+set}" = set; then
4300  echo $ECHO_N "(cached) $ECHO_C" >&6
4301else
4302  cat >conftest.$ac_ext <<_ACEOF
4303#line 4303 "configure"
4304#include "confdefs.h"
4305#include <gpm.h>
4306_ACEOF
4307if { (eval echo "$as_me:4307: \"$ac_cpp conftest.$ac_ext\"") >&5
4308  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4309  ac_status=$?
4310  egrep -v '^ *\+' conftest.er1 >conftest.err
4311  rm -f conftest.er1
4312  cat conftest.err >&5
4313  echo "$as_me:4313: \$? = $ac_status" >&5
4314  (exit $ac_status); } >/dev/null; then
4315  if test -s conftest.err; then
4316    ac_cpp_err=$ac_c_preproc_warn_flag
4317  else
4318    ac_cpp_err=
4319  fi
4320else
4321  ac_cpp_err=yes
4322fi
4323if test -z "$ac_cpp_err"; then
4324  ac_cv_header_gpm_h=yes
4325else
4326  echo "$as_me: failed program was:" >&5
4327  cat conftest.$ac_ext >&5
4328  ac_cv_header_gpm_h=no
4329fi
4330rm -f conftest.err conftest.$ac_ext
4331fi
4332echo "$as_me:4332: result: $ac_cv_header_gpm_h" >&5
4333echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4334if test $ac_cv_header_gpm_h = yes; then
4335
4336		cat >>confdefs.h <<\EOF
4337#define HAVE_GPM_H 1
4338EOF
4339
4340		if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4341			test -n "$verbose" && echo "	assuming we really have GPM library" 1>&6
4342
4343			cat >>confdefs.h <<\EOF
4344#define HAVE_LIBGPM 1
4345EOF
4346
4347		else
4348			echo "$as_me:4348: checking for Gpm_Open in -lgpm" >&5
4349echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4350if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4351  echo $ECHO_N "(cached) $ECHO_C" >&6
4352else
4353  ac_check_lib_save_LIBS=$LIBS
4354LIBS="-lgpm  $LIBS"
4355cat >conftest.$ac_ext <<_ACEOF
4356#line 4356 "configure"
4357#include "confdefs.h"
4358
4359/* Override any gcc2 internal prototype to avoid an error.  */
4360#ifdef __cplusplus
4361extern "C"
4362#endif
4363/* We use char because int might match the return type of a gcc2
4364   builtin and then its argument prototype would still apply.  */
4365char Gpm_Open ();
4366int
4367main ()
4368{
4369Gpm_Open ();
4370  ;
4371  return 0;
4372}
4373_ACEOF
4374rm -f conftest.$ac_objext conftest$ac_exeext
4375if { (eval echo "$as_me:4375: \"$ac_link\"") >&5
4376  (eval $ac_link) 2>&5
4377  ac_status=$?
4378  echo "$as_me:4378: \$? = $ac_status" >&5
4379  (exit $ac_status); } &&
4380         { ac_try='test -s conftest$ac_exeext'
4381  { (eval echo "$as_me:4381: \"$ac_try\"") >&5
4382  (eval $ac_try) 2>&5
4383  ac_status=$?
4384  echo "$as_me:4384: \$? = $ac_status" >&5
4385  (exit $ac_status); }; }; then
4386  ac_cv_lib_gpm_Gpm_Open=yes
4387else
4388  echo "$as_me: failed program was:" >&5
4389cat conftest.$ac_ext >&5
4390ac_cv_lib_gpm_Gpm_Open=no
4391fi
4392rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4393LIBS=$ac_check_lib_save_LIBS
4394fi
4395echo "$as_me:4395: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4396echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4397if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4398  :
4399else
4400
4401				{ { echo "$as_me:4401: error: Cannot link with GPM library" >&5
4402echo "$as_me: error: Cannot link with GPM library" >&2;}
4403   { (exit 1); exit 1; }; }
4404		fi
4405		with_gpm=yes
4406
4407fi
4408
4409else
4410
4411		test "$with_gpm" != maybe && { echo "$as_me:4411: WARNING: Cannot find GPM header" >&5
4412echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4413		with_gpm=no
4414
4415fi
4416
4417fi
4418
4419if test "$with_gpm" != no ; then
4420	echo "$as_me:4420: checking if you want to load GPM dynamically" >&5
4421echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4422
4423# Check whether --with-dlsym or --without-dlsym was given.
4424if test "${with_dlsym+set}" = set; then
4425  withval="$with_dlsym"
4426  with_dlsym=$withval
4427else
4428  with_dlsym=yes
4429fi;
4430	echo "$as_me:4430: result: $with_dlsym" >&5
4431echo "${ECHO_T}$with_dlsym" >&6
4432	if test "$with_dlsym" = yes ; then
4433
4434cf_have_dlsym=no
4435echo "$as_me:4435: checking for dlsym" >&5
4436echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4437if test "${ac_cv_func_dlsym+set}" = set; then
4438  echo $ECHO_N "(cached) $ECHO_C" >&6
4439else
4440  cat >conftest.$ac_ext <<_ACEOF
4441#line 4441 "configure"
4442#include "confdefs.h"
4443/* System header to define __stub macros and hopefully few prototypes,
4444    which can conflict with char dlsym (); below.  */
4445#include <assert.h>
4446/* Override any gcc2 internal prototype to avoid an error.  */
4447#ifdef __cplusplus
4448extern "C"
4449#endif
4450/* We use char because int might match the return type of a gcc2
4451   builtin and then its argument prototype would still apply.  */
4452char dlsym ();
4453char (*f) ();
4454
4455int
4456main ()
4457{
4458/* The GNU C library defines this for functions which it implements
4459    to always fail with ENOSYS.  Some functions are actually named
4460    something starting with __ and the normal name is an alias.  */
4461#if defined (__stub_dlsym) || defined (__stub___dlsym)
4462choke me
4463#else
4464f = dlsym;
4465#endif
4466
4467  ;
4468  return 0;
4469}
4470_ACEOF
4471rm -f conftest.$ac_objext conftest$ac_exeext
4472if { (eval echo "$as_me:4472: \"$ac_link\"") >&5
4473  (eval $ac_link) 2>&5
4474  ac_status=$?
4475  echo "$as_me:4475: \$? = $ac_status" >&5
4476  (exit $ac_status); } &&
4477         { ac_try='test -s conftest$ac_exeext'
4478  { (eval echo "$as_me:4478: \"$ac_try\"") >&5
4479  (eval $ac_try) 2>&5
4480  ac_status=$?
4481  echo "$as_me:4481: \$? = $ac_status" >&5
4482  (exit $ac_status); }; }; then
4483  ac_cv_func_dlsym=yes
4484else
4485  echo "$as_me: failed program was:" >&5
4486cat conftest.$ac_ext >&5
4487ac_cv_func_dlsym=no
4488fi
4489rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4490fi
4491echo "$as_me:4491: result: $ac_cv_func_dlsym" >&5
4492echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4493if test $ac_cv_func_dlsym = yes; then
4494  cf_have_dlsym=yes
4495else
4496
4497cf_have_libdl=no
4498echo "$as_me:4498: checking for dlsym in -ldl" >&5
4499echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4500if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4501  echo $ECHO_N "(cached) $ECHO_C" >&6
4502else
4503  ac_check_lib_save_LIBS=$LIBS
4504LIBS="-ldl  $LIBS"
4505cat >conftest.$ac_ext <<_ACEOF
4506#line 4506 "configure"
4507#include "confdefs.h"
4508
4509/* Override any gcc2 internal prototype to avoid an error.  */
4510#ifdef __cplusplus
4511extern "C"
4512#endif
4513/* We use char because int might match the return type of a gcc2
4514   builtin and then its argument prototype would still apply.  */
4515char dlsym ();
4516int
4517main ()
4518{
4519dlsym ();
4520  ;
4521  return 0;
4522}
4523_ACEOF
4524rm -f conftest.$ac_objext conftest$ac_exeext
4525if { (eval echo "$as_me:4525: \"$ac_link\"") >&5
4526  (eval $ac_link) 2>&5
4527  ac_status=$?
4528  echo "$as_me:4528: \$? = $ac_status" >&5
4529  (exit $ac_status); } &&
4530         { ac_try='test -s conftest$ac_exeext'
4531  { (eval echo "$as_me:4531: \"$ac_try\"") >&5
4532  (eval $ac_try) 2>&5
4533  ac_status=$?
4534  echo "$as_me:4534: \$? = $ac_status" >&5
4535  (exit $ac_status); }; }; then
4536  ac_cv_lib_dl_dlsym=yes
4537else
4538  echo "$as_me: failed program was:" >&5
4539cat conftest.$ac_ext >&5
4540ac_cv_lib_dl_dlsym=no
4541fi
4542rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4543LIBS=$ac_check_lib_save_LIBS
4544fi
4545echo "$as_me:4545: result: $ac_cv_lib_dl_dlsym" >&5
4546echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4547if test $ac_cv_lib_dl_dlsym = yes; then
4548
4549	cf_have_dlsym=yes
4550	cf_have_libdl=yes
4551fi
4552
4553fi
4554
4555if test "$cf_have_dlsym" = yes ; then
4556	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4557
4558	echo "$as_me:4558: checking whether able to link to dl*() functions" >&5
4559echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4560	cat >conftest.$ac_ext <<_ACEOF
4561#line 4561 "configure"
4562#include "confdefs.h"
4563#include <dlfcn.h>
4564int
4565main ()
4566{
4567
4568		void *obj;
4569		if ((obj = dlopen("filename", 0)) != 0) {
4570			if (dlsym(obj, "symbolname") == 0) {
4571			dlclose(obj);
4572			}
4573		}
4574  ;
4575  return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext conftest$ac_exeext
4579if { (eval echo "$as_me:4579: \"$ac_link\"") >&5
4580  (eval $ac_link) 2>&5
4581  ac_status=$?
4582  echo "$as_me:4582: \$? = $ac_status" >&5
4583  (exit $ac_status); } &&
4584         { ac_try='test -s conftest$ac_exeext'
4585  { (eval echo "$as_me:4585: \"$ac_try\"") >&5
4586  (eval $ac_try) 2>&5
4587  ac_status=$?
4588  echo "$as_me:4588: \$? = $ac_status" >&5
4589  (exit $ac_status); }; }; then
4590
4591		cat >>confdefs.h <<\EOF
4592#define HAVE_LIBDL 1
4593EOF
4594
4595else
4596  echo "$as_me: failed program was:" >&5
4597cat conftest.$ac_ext >&5
4598
4599		{ { echo "$as_me:4599: error: Cannot link test program for libdl" >&5
4600echo "$as_me: error: Cannot link test program for libdl" >&2;}
4601   { (exit 1); exit 1; }; }
4602fi
4603rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4604	echo "$as_me:4604: result: ok" >&5
4605echo "${ECHO_T}ok" >&6
4606else
4607	{ { echo "$as_me:4607: error: Cannot find dlsym function" >&5
4608echo "$as_me: error: Cannot find dlsym function" >&2;}
4609   { (exit 1); exit 1; }; }
4610fi
4611
4612		if test "$with_gpm" != yes ; then
4613			test -n "$verbose" && echo "	assuming soname for gpm is $with_gpm" 1>&6
4614
4615			cf_cv_gpm_soname="$with_gpm"
4616		else
4617
4618echo "$as_me:4618: checking for soname of gpm library" >&5
4619echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4620if test "${cf_cv_gpm_soname+set}" = set; then
4621  echo $ECHO_N "(cached) $ECHO_C" >&6
4622else
4623
4624cf_cv_gpm_soname=unknown
4625if test "$cross_compiling" != yes ; then
4626cat >conftest.$ac_ext <<CF_EOF
4627#include <gpm.h>
4628int main()
4629{
4630if (Gpm_Open(0,0)) Gpm_Close();
4631	${cf_cv_main_return:-return}(0);
4632}
4633CF_EOF
4634cf_save_LIBS="$LIBS"
4635	LIBS="-lgpm $LIBS"
4636	if { (eval echo "$as_me:4636: \"$ac_compile\"") >&5
4637  (eval $ac_compile) 2>&5
4638  ac_status=$?
4639  echo "$as_me:4639: \$? = $ac_status" >&5
4640  (exit $ac_status); } ; then
4641		if { (eval echo "$as_me:4641: \"$ac_link\"") >&5
4642  (eval $ac_link) 2>&5
4643  ac_status=$?
4644  echo "$as_me:4644: \$? = $ac_status" >&5
4645  (exit $ac_status); } ; then
4646			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4647			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4648		fi
4649	fi
4650rm -f conftest*
4651LIBS="$cf_save_LIBS"
4652fi
4653
4654fi
4655echo "$as_me:4655: result: $cf_cv_gpm_soname" >&5
4656echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4657
4658		fi
4659		test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4660#define LIBGPM_SONAME "$cf_cv_gpm_soname"
4661EOF
4662
4663		SHLIB_LIST="-ldl $SHLIB_LIST"
4664	else
4665		SHLIB_LIST="-lgpm $SHLIB_LIST"
4666	fi
4667	cat >>confdefs.h <<\EOF
4668#define HAVE_LIBGPM 1
4669EOF
4670
4671	echo "$as_me:4671: checking for Gpm_Wgetch in -lgpm" >&5
4672echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4673if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4674  echo $ECHO_N "(cached) $ECHO_C" >&6
4675else
4676  ac_check_lib_save_LIBS=$LIBS
4677LIBS="-lgpm  $LIBS"
4678cat >conftest.$ac_ext <<_ACEOF
4679#line 4679 "configure"
4680#include "confdefs.h"
4681
4682/* Override any gcc2 internal prototype to avoid an error.  */
4683#ifdef __cplusplus
4684extern "C"
4685#endif
4686/* We use char because int might match the return type of a gcc2
4687   builtin and then its argument prototype would still apply.  */
4688char Gpm_Wgetch ();
4689int
4690main ()
4691{
4692Gpm_Wgetch ();
4693  ;
4694  return 0;
4695}
4696_ACEOF
4697rm -f conftest.$ac_objext conftest$ac_exeext
4698if { (eval echo "$as_me:4698: \"$ac_link\"") >&5
4699  (eval $ac_link) 2>&5
4700  ac_status=$?
4701  echo "$as_me:4701: \$? = $ac_status" >&5
4702  (exit $ac_status); } &&
4703         { ac_try='test -s conftest$ac_exeext'
4704  { (eval echo "$as_me:4704: \"$ac_try\"") >&5
4705  (eval $ac_try) 2>&5
4706  ac_status=$?
4707  echo "$as_me:4707: \$? = $ac_status" >&5
4708  (exit $ac_status); }; }; then
4709  ac_cv_lib_gpm_Gpm_Wgetch=yes
4710else
4711  echo "$as_me: failed program was:" >&5
4712cat conftest.$ac_ext >&5
4713ac_cv_lib_gpm_Gpm_Wgetch=no
4714fi
4715rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4716LIBS=$ac_check_lib_save_LIBS
4717fi
4718echo "$as_me:4718: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4719echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4720if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4721
4722		{ echo "$as_me:4722: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4723echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4724
4725fi
4726
4727fi
4728
4729# not everyone has "test -c"
4730if test -c /dev/sysmouse 2>/dev/null ; then
4731echo "$as_me:4731: checking if you want to use sysmouse" >&5
4732echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4733
4734# Check whether --with-sysmouse or --without-sysmouse was given.
4735if test "${with_sysmouse+set}" = set; then
4736  withval="$with_sysmouse"
4737  cf_with_sysmouse=$withval
4738else
4739  cf_with_sysmouse=maybe
4740fi;
4741	if test "$cf_with_sysmouse" != no ; then
4742	cat >conftest.$ac_ext <<_ACEOF
4743#line 4743 "configure"
4744#include "confdefs.h"
4745
4746#include <osreldate.h>
4747#if (__FreeBSD_version >= 400017)
4748#include <sys/consio.h>
4749#include <sys/fbio.h>
4750#else
4751#include <machine/console.h>
4752#endif
4753
4754int
4755main ()
4756{
4757
4758	struct mouse_info the_mouse;
4759	ioctl(0, CONS_MOUSECTL, &the_mouse);
4760
4761  ;
4762  return 0;
4763}
4764_ACEOF
4765rm -f conftest.$ac_objext
4766if { (eval echo "$as_me:4766: \"$ac_compile\"") >&5
4767  (eval $ac_compile) 2>&5
4768  ac_status=$?
4769  echo "$as_me:4769: \$? = $ac_status" >&5
4770  (exit $ac_status); } &&
4771         { ac_try='test -s conftest.$ac_objext'
4772  { (eval echo "$as_me:4772: \"$ac_try\"") >&5
4773  (eval $ac_try) 2>&5
4774  ac_status=$?
4775  echo "$as_me:4775: \$? = $ac_status" >&5
4776  (exit $ac_status); }; }; then
4777  cf_with_sysmouse=yes
4778else
4779  echo "$as_me: failed program was:" >&5
4780cat conftest.$ac_ext >&5
4781cf_with_sysmouse=no
4782fi
4783rm -f conftest.$ac_objext conftest.$ac_ext
4784	fi
4785echo "$as_me:4785: result: $cf_with_sysmouse" >&5
4786echo "${ECHO_T}$cf_with_sysmouse" >&6
4787test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4788#define USE_SYSMOUSE 1
4789EOF
4790
4791fi
4792
4793if test X"$CC_G_OPT" = X"" ; then
4794	CC_G_OPT='-g'
4795	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4796fi
4797
4798if test X"$CXX_G_OPT" = X"" ; then
4799	CXX_G_OPT='-g'
4800	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4801fi
4802
4803echo "$as_me:4803: checking for default loader flags" >&5
4804echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4805case $DFT_LWR_MODEL in
4806libtool) LD_MODEL=''   ;;
4807normal)  LD_MODEL=''   ;;
4808debug)   LD_MODEL=$CC_G_OPT ;;
4809profile) LD_MODEL='-pg';;
4810shared)  LD_MODEL=''   ;;
4811esac
4812echo "$as_me:4812: result: $LD_MODEL" >&5
4813echo "${ECHO_T}$LD_MODEL" >&6
4814
4815echo "$as_me:4815: checking if rpath option should be used" >&5
4816echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4817
4818# Check whether --enable-rpath or --disable-rpath was given.
4819if test "${enable_rpath+set}" = set; then
4820  enableval="$enable_rpath"
4821  cf_cv_ld_rpath=$enableval
4822else
4823  cf_cv_ld_rpath=no
4824fi;
4825echo "$as_me:4825: result: $cf_cv_ld_rpath" >&5
4826echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4827
4828	LOCAL_LDFLAGS=
4829	LOCAL_LDFLAGS2=
4830	LD_SHARED_OPTS=
4831	INSTALL_LIB="-m 644"
4832
4833	cf_cv_do_symlinks=no
4834
4835	echo "$as_me:4835: checking if release/abi version should be used for shared libs" >&5
4836echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4837
4838# Check whether --with-shlib-version or --without-shlib-version was given.
4839if test "${with_shlib_version+set}" = set; then
4840  withval="$with_shlib_version"
4841  test -z "$withval" && withval=auto
4842	case $withval in #(vi
4843	yes) #(vi
4844		cf_cv_shlib_version=auto
4845		;;
4846	rel|abi|auto|no) #(vi
4847		cf_cv_shlib_version=$withval
4848		;;
4849	*)
4850		{ { echo "$as_me:4850: error: option value must be one of: rel, abi, auto or no" >&5
4851echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4852   { (exit 1); exit 1; }; }
4853		;;
4854	esac
4855
4856else
4857  cf_cv_shlib_version=auto
4858fi;
4859	echo "$as_me:4859: result: $cf_cv_shlib_version" >&5
4860echo "${ECHO_T}$cf_cv_shlib_version" >&6
4861
4862	cf_cv_rm_so_locs=no
4863
4864	# Some less-capable ports of gcc support only -fpic
4865	CC_SHARED_OPTS=
4866	if test "$GCC" = yes
4867	then
4868		echo "$as_me:4868: checking which $CC option to use" >&5
4869echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4870		cf_save_CFLAGS="$CFLAGS"
4871		for CC_SHARED_OPTS in -fPIC -fpic ''
4872		do
4873			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4874			cat >conftest.$ac_ext <<_ACEOF
4875#line 4875 "configure"
4876#include "confdefs.h"
4877#include <stdio.h>
4878int
4879main ()
4880{
4881int x = 1
4882  ;
4883  return 0;
4884}
4885_ACEOF
4886rm -f conftest.$ac_objext
4887if { (eval echo "$as_me:4887: \"$ac_compile\"") >&5
4888  (eval $ac_compile) 2>&5
4889  ac_status=$?
4890  echo "$as_me:4890: \$? = $ac_status" >&5
4891  (exit $ac_status); } &&
4892         { ac_try='test -s conftest.$ac_objext'
4893  { (eval echo "$as_me:4893: \"$ac_try\"") >&5
4894  (eval $ac_try) 2>&5
4895  ac_status=$?
4896  echo "$as_me:4896: \$? = $ac_status" >&5
4897  (exit $ac_status); }; }; then
4898  break
4899else
4900  echo "$as_me: failed program was:" >&5
4901cat conftest.$ac_ext >&5
4902fi
4903rm -f conftest.$ac_objext conftest.$ac_ext
4904		done
4905		echo "$as_me:4905: result: $CC_SHARED_OPTS" >&5
4906echo "${ECHO_T}$CC_SHARED_OPTS" >&6
4907		CFLAGS="$cf_save_CFLAGS"
4908	fi
4909
4910	cf_cv_shlib_version_infix=no
4911
4912	case $cf_cv_system_name in
4913	beos*)
4914		MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
4915		;;
4916	cygwin*)
4917		CC_SHARED_OPTS=
4918		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,--out-implib=../lib/${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/${SHARED_LIB}'
4919		cf_cv_shlib_version=cygdll
4920		cf_cv_shlib_version_infix=cygdll
4921		;;
4922	darwin*)
4923		EXTRA_CFLAGS="-no-cpp-precomp"
4924		CC_SHARED_OPTS="-dynamic"
4925		MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${DESTDIR}${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
4926		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
4927		cf_cv_shlib_version_infix=yes
4928		echo "$as_me:4928: checking if ld -search_paths_first works" >&5
4929echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
4930if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
4931  echo $ECHO_N "(cached) $ECHO_C" >&6
4932else
4933
4934			cf_save_LDFLAGS=$LDFLAGS
4935			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4936			cat >conftest.$ac_ext <<_ACEOF
4937#line 4937 "configure"
4938#include "confdefs.h"
4939
4940int
4941main ()
4942{
4943int i;
4944  ;
4945  return 0;
4946}
4947_ACEOF
4948rm -f conftest.$ac_objext conftest$ac_exeext
4949if { (eval echo "$as_me:4949: \"$ac_link\"") >&5
4950  (eval $ac_link) 2>&5
4951  ac_status=$?
4952  echo "$as_me:4952: \$? = $ac_status" >&5
4953  (exit $ac_status); } &&
4954         { ac_try='test -s conftest$ac_exeext'
4955  { (eval echo "$as_me:4955: \"$ac_try\"") >&5
4956  (eval $ac_try) 2>&5
4957  ac_status=$?
4958  echo "$as_me:4958: \$? = $ac_status" >&5
4959  (exit $ac_status); }; }; then
4960  cf_cv_ldflags_search_paths_first=yes
4961else
4962  echo "$as_me: failed program was:" >&5
4963cat conftest.$ac_ext >&5
4964cf_cv_ldflags_search_paths_first=no
4965fi
4966rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4967				LDFLAGS=$cf_save_LDFLAGS
4968fi
4969echo "$as_me:4969: result: $cf_cv_ldflags_search_paths_first" >&5
4970echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
4971		if test $cf_cv_ldflags_search_paths_first = yes; then
4972			LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
4973		fi
4974		;;
4975	hpux*)
4976		# (tested with gcc 2.7.2 -- I don't have c89)
4977		if test "$GCC" = yes; then
4978			LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
4979		else
4980			CC_SHARED_OPTS='+Z'
4981			LD_SHARED_OPTS='-Wl,+b,${libdir}'
4982		fi
4983		MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
4984		# HP-UX shared libraries must be executable, and should be
4985		# readonly to exploit a quirk in the memory manager.
4986		INSTALL_LIB="-m 555"
4987		;;
4988	irix*)
4989		if test "$cf_cv_ld_rpath" = yes ; then
4990			if test "$GCC" = yes; then
4991				cf_ld_rpath_opt="-Wl,-rpath,"
4992				EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
4993			else
4994				cf_ld_rpath_opt="-rpath "
4995				EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
4996			fi
4997		fi
4998		# tested with IRIX 5.2 and 'cc'.
4999		if test "$GCC" != yes; then
5000			CC_SHARED_OPTS='-KPIC'
5001		fi
5002		MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5003		cf_cv_rm_so_locs=yes
5004		;;
5005	linux*|gnu*|k*bsd*-gnu)
5006		if test "$DFT_LWR_MODEL" = "shared" ; then
5007			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5008			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5009		fi
5010		if test "$cf_cv_ld_rpath" = yes ; then
5011			cf_ld_rpath_opt="-Wl,-rpath,"
5012			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5013		fi
5014
5015	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5016	if test "$cf_cv_shlib_version" = rel; then
5017		cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5018	else
5019		cf_shared_soname='`basename $@`'
5020	fi
5021
5022		MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname',-stats,-lc -o $@'
5023		;;
5024	openbsd2*)
5025		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5026		MK_SHARED_LIB='${LD} -Bshareable -soname,`basename $@.${ABI_VERSION}` -o $@'
5027		;;
5028	openbsd*|freebsd[23]*)
5029		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5030		MK_SHARED_LIB='${LD} -Bshareable -o $@'
5031		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5032		;;
5033	freebsd*)
5034		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5035		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5036			LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5037			LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5038			cf_ld_rpath_opt="-rpath "
5039			EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5040		fi
5041
5042	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5043	if test "$cf_cv_shlib_version" = rel; then
5044		cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5045	else
5046		cf_shared_soname='`basename $@`'
5047	fi
5048
5049		MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5050		;;
5051	netbsd*)
5052		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5053		test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5054		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5055			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5056			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5057			EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5058			if test "$cf_cv_shlib_version" = auto; then
5059			if test -f /usr/libexec/ld.elf_so; then
5060				cf_cv_shlib_version=abi
5061			else
5062				cf_cv_shlib_version=rel
5063			fi
5064			fi
5065
5066	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5067	if test "$cf_cv_shlib_version" = rel; then
5068		cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5069	else
5070		cf_shared_soname='`basename $@`'
5071	fi
5072
5073			MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_shared_soname' -o $@'
5074		else
5075			MK_SHARED_LIB='${LD} -Bshareable -o $@'
5076		fi
5077		;;
5078	osf*|mls+*)
5079		# tested with OSF/1 V3.2 and 'cc'
5080		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5081		# link with shared libs).
5082		MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5083		case $host_os in
5084		osf4*)
5085			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5086			;;
5087		esac
5088		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5089		if test "$DFT_LWR_MODEL" = "shared" ; then
5090			LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5091			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5092		fi
5093		if test "$cf_cv_ld_rpath" = yes ; then
5094			cf_ld_rpath_opt="-rpath"
5095			# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5096		fi
5097		cf_cv_rm_so_locs=yes
5098		;;
5099	sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5100		# tested with osr5.0.5
5101		if test "$GCC" != yes; then
5102			CC_SHARED_OPTS='-belf -KPIC'
5103		fi
5104		MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5105		if test "$cf_cv_ld_rpath" = yes ; then
5106			# only way is to set LD_RUN_PATH but no switch for it
5107			RUN_PATH=$libdir
5108		fi
5109		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5110		LINK_PROGS='LD_RUN_PATH=${libdir}'
5111		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5112		;;
5113	sunos4*)
5114		# tested with SunOS 4.1.1 and gcc 2.7.0
5115		if test "$GCC" != yes; then
5116			CC_SHARED_OPTS='-KPIC'
5117		fi
5118		MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5119		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5120		;;
5121	solaris2*)
5122		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5123		if test "$GCC" != yes; then
5124			CC_SHARED_OPTS='-KPIC'
5125		fi
5126		if test "$DFT_LWR_MODEL" = "shared" ; then
5127			LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5128			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5129		fi
5130		if test "$cf_cv_ld_rpath" = yes ; then
5131			cf_ld_rpath_opt="-R"
5132			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5133		fi
5134
5135	test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5136	if test "$cf_cv_shlib_version" = rel; then
5137		cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5138	else
5139		cf_shared_soname='`basename $@`'
5140	fi
5141
5142		MK_SHARED_LIB='${CC} -dy -G -h '$cf_shared_soname' -o $@'
5143		;;
5144	sysv5uw7*|unix_sv*)
5145		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5146		if test "$GCC" != yes; then
5147			CC_SHARED_OPTS='-KPIC'
5148		fi
5149		MK_SHARED_LIB='${LD} -d y -G -o $@'
5150		;;
5151	*)
5152		CC_SHARED_OPTS='unknown'
5153		MK_SHARED_LIB='echo unknown'
5154		;;
5155	esac
5156
5157	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
5158	case "$cf_cv_shlib_version" in #(vi
5159	rel|abi)
5160		case "$MK_SHARED_LIB" in #(vi
5161		*'-o $@')
5162			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5163			;;
5164		*)
5165			{ echo "$as_me:5165: WARNING: ignored --with-shlib-version" >&5
5166echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5167			;;
5168		esac
5169		;;
5170	esac
5171
5172	if test -n "$cf_ld_rpath_opt" ; then
5173		echo "$as_me:5173: checking if we need a space after rpath option" >&5
5174echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5175		cf_save_LIBS="$LIBS"
5176		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5177		cat >conftest.$ac_ext <<_ACEOF
5178#line 5178 "configure"
5179#include "confdefs.h"
5180
5181int
5182main ()
5183{
5184
5185  ;
5186  return 0;
5187}
5188_ACEOF
5189rm -f conftest.$ac_objext conftest$ac_exeext
5190if { (eval echo "$as_me:5190: \"$ac_link\"") >&5
5191  (eval $ac_link) 2>&5
5192  ac_status=$?
5193  echo "$as_me:5193: \$? = $ac_status" >&5
5194  (exit $ac_status); } &&
5195         { ac_try='test -s conftest$ac_exeext'
5196  { (eval echo "$as_me:5196: \"$ac_try\"") >&5
5197  (eval $ac_try) 2>&5
5198  ac_status=$?
5199  echo "$as_me:5199: \$? = $ac_status" >&5
5200  (exit $ac_status); }; }; then
5201  cf_rpath_space=no
5202else
5203  echo "$as_me: failed program was:" >&5
5204cat conftest.$ac_ext >&5
5205cf_rpath_space=yes
5206fi
5207rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5208		LIBS="$cf_save_LIBS"
5209		echo "$as_me:5209: result: $cf_rpath_space" >&5
5210echo "${ECHO_T}$cf_rpath_space" >&6
5211		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5212		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5213	fi
5214
5215if test "$CC_SHARED_OPTS" = "unknown"; then
5216	for model in $cf_list_models; do
5217		if test "$model" = "shared"; then
5218			{ { echo "$as_me:5218: error: Shared libraries are not supported in this version" >&5
5219echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5220   { (exit 1); exit 1; }; }
5221		fi
5222	done
5223fi
5224
5225###############################################################################
5226
5227###	use option --disable-overwrite to leave out the link to -lcurses
5228echo "$as_me:5228: checking if you wish to install ncurses overwriting curses" >&5
5229echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5230
5231# Check whether --enable-overwrite or --disable-overwrite was given.
5232if test "${enable_overwrite+set}" = set; then
5233  enableval="$enable_overwrite"
5234  with_overwrite=$enableval
5235else
5236  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5237fi;
5238echo "$as_me:5238: result: $with_overwrite" >&5
5239echo "${ECHO_T}$with_overwrite" >&6
5240
5241echo "$as_me:5241: checking if external terminfo-database is used" >&5
5242echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5243
5244# Check whether --enable-database or --disable-database was given.
5245if test "${enable_database+set}" = set; then
5246  enableval="$enable_database"
5247  use_database=$enableval
5248else
5249  use_database=yes
5250fi;
5251echo "$as_me:5251: result: $use_database" >&5
5252echo "${ECHO_T}$use_database" >&6
5253
5254case $host_os in #(vi
5255os2*) #(vi
5256	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5257	;;
5258*) #(vi
5259	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5260	;;
5261esac
5262
5263	case $cf_cv_system_name in
5264	os2*)	PATHSEP=';'  ;;
5265	*)	PATHSEP=':'  ;;
5266	esac
5267
5268if test "$use_database" != no ; then
5269	cat >>confdefs.h <<\EOF
5270#define USE_DATABASE 1
5271EOF
5272
5273	echo "$as_me:5273: checking which terminfo source-file will be installed" >&5
5274echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5275
5276# Check whether --enable-database or --disable-database was given.
5277if test "${enable_database+set}" = set; then
5278  enableval="$enable_database"
5279  TERMINFO_SRC=$withval
5280fi;
5281	echo "$as_me:5281: result: $TERMINFO_SRC" >&5
5282echo "${ECHO_T}$TERMINFO_SRC" >&6
5283
5284	echo "$as_me:5284: checking whether to use hashed database instead of directory/tree" >&5
5285echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5286
5287# Check whether --with-hashed-db or --without-hashed-db was given.
5288if test "${with_hashed_db+set}" = set; then
5289  withval="$with_hashed_db"
5290
5291else
5292  with_hashed_db=no
5293fi;
5294	echo "$as_me:5294: result: $with_hashed_db" >&5
5295echo "${ECHO_T}$with_hashed_db" >&6
5296fi
5297
5298echo "$as_me:5298: checking for list of fallback descriptions" >&5
5299echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5300
5301# Check whether --with-fallbacks or --without-fallbacks was given.
5302if test "${with_fallbacks+set}" = set; then
5303  withval="$with_fallbacks"
5304  with_fallback=$withval
5305else
5306  with_fallback=
5307fi;
5308echo "$as_me:5308: result: $with_fallback" >&5
5309echo "${ECHO_T}$with_fallback" >&6
5310FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5311
5312echo "$as_me:5312: checking if you want modern xterm or antique" >&5
5313echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5314
5315# Check whether --with-xterm-new or --without-xterm-new was given.
5316if test "${with_xterm_new+set}" = set; then
5317  withval="$with_xterm_new"
5318  with_xterm_new=$withval
5319else
5320  with_xterm_new=yes
5321fi;
5322case $with_xterm_new in
5323no)	with_xterm_new=xterm-old;;
5324*)	with_xterm_new=xterm-new;;
5325esac
5326echo "$as_me:5326: result: $with_xterm_new" >&5
5327echo "${ECHO_T}$with_xterm_new" >&6
5328WHICH_XTERM=$with_xterm_new
5329
5330MAKE_TERMINFO=
5331if test "$use_database" = no ; then
5332	TERMINFO="${datadir}/terminfo"
5333	MAKE_TERMINFO="#"
5334else
5335
5336echo "$as_me:5336: checking for list of terminfo directories" >&5
5337echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5338
5339# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5340if test "${with_terminfo_dirs+set}" = set; then
5341  withval="$with_terminfo_dirs"
5342
5343else
5344  withval=${TERMINFO_DIRS-${datadir}/terminfo}
5345fi;
5346IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5347cf_dst_path=
5348for cf_src_path in $withval
5349do
5350
5351if test "x$prefix" != xNONE; then
5352  cf_path_syntax="$prefix"
5353else
5354  cf_path_syntax="$ac_default_prefix"
5355fi
5356
5357case ".$cf_src_path" in #(vi
5358.\$\(*\)*|.\'*\'*) #(vi
5359  ;;
5360..|./*|.\\*) #(vi
5361  ;;
5362.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5363  ;;
5364.\${*prefix}*) #(vi
5365  eval cf_src_path="$cf_src_path"
5366  case ".$cf_src_path" in #(vi
5367  .NONE/*)
5368    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5369    ;;
5370  esac
5371  ;; #(vi
5372.no|.NONE/*)
5373  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5374  ;;
5375*)
5376  { { echo "$as_me:5376: error: expected a pathname, not \"$cf_src_path\"" >&5
5377echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5378   { (exit 1); exit 1; }; }
5379  ;;
5380esac
5381
5382  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5383  cf_dst_path="${cf_dst_path}${cf_src_path}"
5384done
5385IFS="$ac_save_ifs"
5386
5387eval 'TERMINFO_DIRS="$cf_dst_path"'
5388
5389echo "$as_me:5389: result: $TERMINFO_DIRS" >&5
5390echo "${ECHO_T}$TERMINFO_DIRS" >&6
5391test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5392#define TERMINFO_DIRS "$TERMINFO_DIRS"
5393EOF
5394
5395echo "$as_me:5395: checking for default terminfo directory" >&5
5396echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5397
5398# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5399if test "${with_default_terminfo_dir+set}" = set; then
5400  withval="$with_default_terminfo_dir"
5401
5402else
5403  withval="${TERMINFO-${datadir}/terminfo}"
5404fi;
5405if test "x$prefix" != xNONE; then
5406  cf_path_syntax="$prefix"
5407else
5408  cf_path_syntax="$ac_default_prefix"
5409fi
5410
5411case ".$withval" in #(vi
5412.\$\(*\)*|.\'*\'*) #(vi
5413  ;;
5414..|./*|.\\*) #(vi
5415  ;;
5416.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5417  ;;
5418.\${*prefix}*) #(vi
5419  eval withval="$withval"
5420  case ".$withval" in #(vi
5421  .NONE/*)
5422    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5423    ;;
5424  esac
5425  ;; #(vi
5426.no|.NONE/*)
5427  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5428  ;;
5429*)
5430  { { echo "$as_me:5430: error: expected a pathname, not \"$withval\"" >&5
5431echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5432   { (exit 1); exit 1; }; }
5433  ;;
5434esac
5435
5436TERMINFO="$withval"
5437
5438echo "$as_me:5438: result: $TERMINFO" >&5
5439echo "${ECHO_T}$TERMINFO" >&6
5440cat >>confdefs.h <<EOF
5441#define TERMINFO "$TERMINFO"
5442EOF
5443
5444fi
5445
5446###	use option --disable-big-core to make tic run on small machines
5447###	We need 4Mb, check if we can allocate 50% more than that.
5448echo "$as_me:5448: checking if big-core option selected" >&5
5449echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5450
5451# Check whether --enable-big-core or --disable-big-core was given.
5452if test "${enable_big_core+set}" = set; then
5453  enableval="$enable_big_core"
5454  with_big_core=$enableval
5455else
5456  if test "$cross_compiling" = yes; then
5457  with_big_core=no
5458else
5459  cat >conftest.$ac_ext <<_ACEOF
5460#line 5460 "configure"
5461#include "confdefs.h"
5462
5463#include <stdlib.h>
5464#include <string.h>
5465int main() {
5466	unsigned long n = 6000000L;
5467	char *s = malloc(n);
5468	if (s != 0)
5469		s[0] = s[n-1] = 0;
5470	${cf_cv_main_return:-return}(s == 0);
5471}
5472_ACEOF
5473rm -f conftest$ac_exeext
5474if { (eval echo "$as_me:5474: \"$ac_link\"") >&5
5475  (eval $ac_link) 2>&5
5476  ac_status=$?
5477  echo "$as_me:5477: \$? = $ac_status" >&5
5478  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5479  { (eval echo "$as_me:5479: \"$ac_try\"") >&5
5480  (eval $ac_try) 2>&5
5481  ac_status=$?
5482  echo "$as_me:5482: \$? = $ac_status" >&5
5483  (exit $ac_status); }; }; then
5484  with_big_core=yes
5485else
5486  echo "$as_me: program exited with status $ac_status" >&5
5487echo "$as_me: failed program was:" >&5
5488cat conftest.$ac_ext >&5
5489with_big_core=no
5490fi
5491rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5492fi
5493fi;
5494echo "$as_me:5494: result: $with_big_core" >&5
5495echo "${ECHO_T}$with_big_core" >&6
5496test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5497#define HAVE_BIG_CORE 1
5498EOF
5499
5500###	use option --enable-termcap to compile in the termcap fallback support
5501echo "$as_me:5501: checking if you want termcap-fallback support" >&5
5502echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5503
5504# Check whether --enable-termcap or --disable-termcap was given.
5505if test "${enable_termcap+set}" = set; then
5506  enableval="$enable_termcap"
5507  with_termcap=$enableval
5508else
5509  with_termcap=no
5510fi;
5511echo "$as_me:5511: result: $with_termcap" >&5
5512echo "${ECHO_T}$with_termcap" >&6
5513
5514if test "$with_termcap" != "yes" ; then
5515	if test "$use_database" = no ; then
5516		if test -z "$with_fallback" ; then
5517			{ { echo "$as_me:5517: error: You have disabled the database w/o specifying fallbacks" >&5
5518echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5519   { (exit 1); exit 1; }; }
5520		fi
5521	fi
5522	cat >>confdefs.h <<\EOF
5523#define PURE_TERMINFO 1
5524EOF
5525
5526else
5527
5528cat >>confdefs.h <<\EOF
5529#define USE_TERMCAP 1
5530EOF
5531
5532echo "$as_me:5532: checking for list of termcap files" >&5
5533echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5534
5535# Check whether --with-termpath or --without-termpath was given.
5536if test "${with_termpath+set}" = set; then
5537  withval="$with_termpath"
5538
5539else
5540  withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5541fi;
5542IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5543cf_dst_path=
5544for cf_src_path in $withval
5545do
5546
5547if test "x$prefix" != xNONE; then
5548  cf_path_syntax="$prefix"
5549else
5550  cf_path_syntax="$ac_default_prefix"
5551fi
5552
5553case ".$cf_src_path" in #(vi
5554.\$\(*\)*|.\'*\'*) #(vi
5555  ;;
5556..|./*|.\\*) #(vi
5557  ;;
5558.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5559  ;;
5560.\${*prefix}*) #(vi
5561  eval cf_src_path="$cf_src_path"
5562  case ".$cf_src_path" in #(vi
5563  .NONE/*)
5564    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5565    ;;
5566  esac
5567  ;; #(vi
5568.no|.NONE/*)
5569  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5570  ;;
5571*)
5572  { { echo "$as_me:5572: error: expected a pathname, not \"$cf_src_path\"" >&5
5573echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5574   { (exit 1); exit 1; }; }
5575  ;;
5576esac
5577
5578  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5579  cf_dst_path="${cf_dst_path}${cf_src_path}"
5580done
5581IFS="$ac_save_ifs"
5582
5583eval 'TERMPATH="$cf_dst_path"'
5584
5585echo "$as_me:5585: result: $TERMPATH" >&5
5586echo "${ECHO_T}$TERMPATH" >&6
5587test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5588#define TERMPATH "$TERMPATH"
5589EOF
5590
5591###	use option --enable-getcap to use a hacked getcap for reading termcaps
5592echo "$as_me:5592: checking if fast termcap-loader is needed" >&5
5593echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5594
5595# Check whether --enable-getcap or --disable-getcap was given.
5596if test "${enable_getcap+set}" = set; then
5597  enableval="$enable_getcap"
5598  with_getcap=$enableval
5599else
5600  with_getcap=no
5601fi;
5602echo "$as_me:5602: result: $with_getcap" >&5
5603echo "${ECHO_T}$with_getcap" >&6
5604test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5605#define USE_GETCAP 1
5606EOF
5607
5608echo "$as_me:5608: checking if translated termcaps will be cached in ~/.terminfo" >&5
5609echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5610
5611# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5612if test "${enable_getcap_cache+set}" = set; then
5613  enableval="$enable_getcap_cache"
5614  with_getcap_cache=$enableval
5615else
5616  with_getcap_cache=no
5617fi;
5618echo "$as_me:5618: result: $with_getcap_cache" >&5
5619echo "${ECHO_T}$with_getcap_cache" >&6
5620test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5621#define USE_GETCAP_CACHE 1
5622EOF
5623
5624fi
5625
5626###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5627echo "$as_me:5627: checking if ~/.terminfo is wanted" >&5
5628echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5629
5630# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5631if test "${enable_home_terminfo+set}" = set; then
5632  enableval="$enable_home_terminfo"
5633  with_home_terminfo=$enableval
5634else
5635  with_home_terminfo=yes
5636fi;
5637echo "$as_me:5637: result: $with_home_terminfo" >&5
5638echo "${ECHO_T}$with_home_terminfo" >&6
5639test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5640#define USE_HOME_TERMINFO 1
5641EOF
5642
5643echo "$as_me:5643: checking if you want to use restricted environment when running as root" >&5
5644echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
5645
5646# Check whether --enable-root-environ or --disable-root-environ was given.
5647if test "${enable_root_environ+set}" = set; then
5648  enableval="$enable_root_environ"
5649  with_root_environ=$enableval
5650else
5651  with_root_environ=yes
5652fi;
5653echo "$as_me:5653: result: $with_root_environ" >&5
5654echo "${ECHO_T}$with_root_environ" >&6
5655test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5656#define USE_ROOT_ENVIRON 1
5657EOF
5658
5659###   Use option --enable-symlinks to make tic use symlinks, not hard links
5660###   to reduce storage requirements for the terminfo database.
5661
5662for ac_func in \
5663	remove \
5664	unlink
5665do
5666as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5667echo "$as_me:5667: checking for $ac_func" >&5
5668echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5669if eval "test \"\${$as_ac_var+set}\" = set"; then
5670  echo $ECHO_N "(cached) $ECHO_C" >&6
5671else
5672  cat >conftest.$ac_ext <<_ACEOF
5673#line 5673 "configure"
5674#include "confdefs.h"
5675/* System header to define __stub macros and hopefully few prototypes,
5676    which can conflict with char $ac_func (); below.  */
5677#include <assert.h>
5678/* Override any gcc2 internal prototype to avoid an error.  */
5679#ifdef __cplusplus
5680extern "C"
5681#endif
5682/* We use char because int might match the return type of a gcc2
5683   builtin and then its argument prototype would still apply.  */
5684char $ac_func ();
5685char (*f) ();
5686
5687int
5688main ()
5689{
5690/* The GNU C library defines this for functions which it implements
5691    to always fail with ENOSYS.  Some functions are actually named
5692    something starting with __ and the normal name is an alias.  */
5693#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5694choke me
5695#else
5696f = $ac_func;
5697#endif
5698
5699  ;
5700  return 0;
5701}
5702_ACEOF
5703rm -f conftest.$ac_objext conftest$ac_exeext
5704if { (eval echo "$as_me:5704: \"$ac_link\"") >&5
5705  (eval $ac_link) 2>&5
5706  ac_status=$?
5707  echo "$as_me:5707: \$? = $ac_status" >&5
5708  (exit $ac_status); } &&
5709         { ac_try='test -s conftest$ac_exeext'
5710  { (eval echo "$as_me:5710: \"$ac_try\"") >&5
5711  (eval $ac_try) 2>&5
5712  ac_status=$?
5713  echo "$as_me:5713: \$? = $ac_status" >&5
5714  (exit $ac_status); }; }; then
5715  eval "$as_ac_var=yes"
5716else
5717  echo "$as_me: failed program was:" >&5
5718cat conftest.$ac_ext >&5
5719eval "$as_ac_var=no"
5720fi
5721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5722fi
5723echo "$as_me:5723: result: `eval echo '${'$as_ac_var'}'`" >&5
5724echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5725if test `eval echo '${'$as_ac_var'}'` = yes; then
5726  cat >>confdefs.h <<EOF
5727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5728EOF
5729
5730fi
5731done
5732
5733if test "$cross_compiling" = yes ; then
5734
5735for ac_func in \
5736		link \
5737		symlink
5738do
5739as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5740echo "$as_me:5740: checking for $ac_func" >&5
5741echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5742if eval "test \"\${$as_ac_var+set}\" = set"; then
5743  echo $ECHO_N "(cached) $ECHO_C" >&6
5744else
5745  cat >conftest.$ac_ext <<_ACEOF
5746#line 5746 "configure"
5747#include "confdefs.h"
5748/* System header to define __stub macros and hopefully few prototypes,
5749    which can conflict with char $ac_func (); below.  */
5750#include <assert.h>
5751/* Override any gcc2 internal prototype to avoid an error.  */
5752#ifdef __cplusplus
5753extern "C"
5754#endif
5755/* We use char because int might match the return type of a gcc2
5756   builtin and then its argument prototype would still apply.  */
5757char $ac_func ();
5758char (*f) ();
5759
5760int
5761main ()
5762{
5763/* The GNU C library defines this for functions which it implements
5764    to always fail with ENOSYS.  Some functions are actually named
5765    something starting with __ and the normal name is an alias.  */
5766#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5767choke me
5768#else
5769f = $ac_func;
5770#endif
5771
5772  ;
5773  return 0;
5774}
5775_ACEOF
5776rm -f conftest.$ac_objext conftest$ac_exeext
5777if { (eval echo "$as_me:5777: \"$ac_link\"") >&5
5778  (eval $ac_link) 2>&5
5779  ac_status=$?
5780  echo "$as_me:5780: \$? = $ac_status" >&5
5781  (exit $ac_status); } &&
5782         { ac_try='test -s conftest$ac_exeext'
5783  { (eval echo "$as_me:5783: \"$ac_try\"") >&5
5784  (eval $ac_try) 2>&5
5785  ac_status=$?
5786  echo "$as_me:5786: \$? = $ac_status" >&5
5787  (exit $ac_status); }; }; then
5788  eval "$as_ac_var=yes"
5789else
5790  echo "$as_me: failed program was:" >&5
5791cat conftest.$ac_ext >&5
5792eval "$as_ac_var=no"
5793fi
5794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5795fi
5796echo "$as_me:5796: result: `eval echo '${'$as_ac_var'}'`" >&5
5797echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5798if test `eval echo '${'$as_ac_var'}'` = yes; then
5799  cat >>confdefs.h <<EOF
5800#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5801EOF
5802
5803fi
5804done
5805
5806else
5807	echo "$as_me:5807: checking if link/symlink functions work" >&5
5808echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5809if test "${cf_cv_link_funcs+set}" = set; then
5810  echo $ECHO_N "(cached) $ECHO_C" >&6
5811else
5812
5813		cf_cv_link_funcs=
5814		for cf_func in link symlink ; do
5815			if test "$cross_compiling" = yes; then
5816
5817			eval 'ac_cv_func_'$cf_func'=error'
5818else
5819  cat >conftest.$ac_ext <<_ACEOF
5820#line 5820 "configure"
5821#include "confdefs.h"
5822
5823#include <sys/types.h>
5824#include <sys/stat.h>
5825#ifdef HAVE_UNISTD_H
5826#include <unistd.h>
5827#endif
5828int main()
5829{
5830	int fail = 0;
5831	char *src = "config.log";
5832	char *dst = "conftest.chk";
5833	struct stat src_sb;
5834	struct stat dst_sb;
5835
5836	stat(src, &src_sb);
5837	fail = ($cf_func("config.log", "conftest.chk") < 0)
5838	    || (stat(dst, &dst_sb) < 0)
5839	    || (dst_sb.st_mtime != src_sb.st_mtime);
5840#ifdef HAVE_UNLINK
5841	unlink(dst);
5842#else
5843	remove(dst);
5844#endif
5845	${cf_cv_main_return:-return} (fail);
5846}
5847
5848_ACEOF
5849rm -f conftest$ac_exeext
5850if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
5851  (eval $ac_link) 2>&5
5852  ac_status=$?
5853  echo "$as_me:5853: \$? = $ac_status" >&5
5854  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5855  { (eval echo "$as_me:5855: \"$ac_try\"") >&5
5856  (eval $ac_try) 2>&5
5857  ac_status=$?
5858  echo "$as_me:5858: \$? = $ac_status" >&5
5859  (exit $ac_status); }; }; then
5860
5861			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5862			eval 'ac_cv_func_'$cf_func'=yes'
5863else
5864  echo "$as_me: program exited with status $ac_status" >&5
5865echo "$as_me: failed program was:" >&5
5866cat conftest.$ac_ext >&5
5867
5868			eval 'ac_cv_func_'$cf_func'=no'
5869fi
5870rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5871fi
5872		done
5873		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5874
5875fi
5876echo "$as_me:5876: result: $cf_cv_link_funcs" >&5
5877echo "${ECHO_T}$cf_cv_link_funcs" >&6
5878	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5879#define HAVE_LINK 1
5880EOF
5881
5882	test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5883#define HAVE_SYMLINK 1
5884EOF
5885
5886fi
5887
5888with_links=no
5889with_symlinks=no
5890
5891# soft links (symbolic links) are useful for some systems where hard links do
5892# not work, or to make it simpler to copy terminfo trees around.
5893if test "$ac_cv_func_symlink" = yes ; then
5894    echo "$as_me:5894: checking if tic should use symbolic links" >&5
5895echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5896
5897# Check whether --enable-symlinks or --disable-symlinks was given.
5898if test "${enable_symlinks+set}" = set; then
5899  enableval="$enable_symlinks"
5900  with_symlinks=$enableval
5901else
5902  with_symlinks=no
5903fi;
5904    echo "$as_me:5904: result: $with_symlinks" >&5
5905echo "${ECHO_T}$with_symlinks" >&6
5906fi
5907
5908# If we have hard links and did not choose to use soft links instead, there is
5909# no reason to make this choice optional - use the hard links.
5910if test "$with_symlinks" = no ; then
5911    echo "$as_me:5911: checking if tic should use hard links" >&5
5912echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5913    if test "$ac_cv_func_link" = yes ; then
5914	with_links=yes
5915    else
5916	with_links=no
5917    fi
5918    echo "$as_me:5918: result: $with_links" >&5
5919echo "${ECHO_T}$with_links" >&6
5920fi
5921
5922test "$with_links" = yes && cat >>confdefs.h <<\EOF
5923#define USE_LINKS 1
5924EOF
5925
5926test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5927#define USE_SYMLINKS 1
5928EOF
5929
5930###   use option --enable-broken-linker to force on use of broken-linker support
5931echo "$as_me:5931: checking if you want broken-linker support code" >&5
5932echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5933
5934# Check whether --enable-broken_linker or --disable-broken_linker was given.
5935if test "${enable_broken_linker+set}" = set; then
5936  enableval="$enable_broken_linker"
5937  with_broken_linker=$enableval
5938else
5939  with_broken_linker=${BROKEN_LINKER-no}
5940fi;
5941echo "$as_me:5941: result: $with_broken_linker" >&5
5942echo "${ECHO_T}$with_broken_linker" >&6
5943
5944BROKEN_LINKER=0
5945if test "$with_broken_linker" = yes ; then
5946	cat >>confdefs.h <<\EOF
5947#define BROKEN_LINKER 1
5948EOF
5949
5950	BROKEN_LINKER=1
5951elif test "$DFT_LWR_MODEL" = shared ; then
5952	case $cf_cv_system_name in #(vi
5953	cygwin*)
5954		cat >>confdefs.h <<\EOF
5955#define BROKEN_LINKER 1
5956EOF
5957
5958		BROKEN_LINKER=1
5959		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
5960
5961		;;
5962	esac
5963fi
5964
5965###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
5966echo "$as_me:5966: checking if tputs should process BSD-style prefix padding" >&5
5967echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
5968
5969# Check whether --enable-bsdpad or --disable-bsdpad was given.
5970if test "${enable_bsdpad+set}" = set; then
5971  enableval="$enable_bsdpad"
5972  with_bsdpad=$enableval
5973else
5974  with_bsdpad=no
5975fi;
5976echo "$as_me:5976: result: $with_bsdpad" >&5
5977echo "${ECHO_T}$with_bsdpad" >&6
5978test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
5979#define BSD_TPUTS 1
5980EOF
5981
5982###   use option --enable-widec to turn on use of wide-character support
5983NCURSES_CH_T=chtype
5984NCURSES_LIBUTF8=0
5985
5986NEED_WCHAR_H=0
5987NCURSES_MBSTATE_T=0
5988NCURSES_WCHAR_T=0
5989NCURSES_WINT_T=0
5990
5991# Check to define _XOPEN_SOURCE "automatically"
5992
5993echo "$as_me:5993: checking if $CC -U and -D options work together" >&5
5994echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
5995if test "${cf_cv_cc_u_d_options+set}" = set; then
5996  echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998
5999	cf_save_CPPFLAGS="$CPPFLAGS"
6000	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6001	cat >conftest.$ac_ext <<_ACEOF
6002#line 6002 "configure"
6003#include "confdefs.h"
6004
6005int
6006main ()
6007{
6008
6009#ifndef U_D_OPTIONS
6010make an undefined-error
6011#endif
6012#ifdef  D_U_OPTIONS
6013make a defined-error
6014#endif
6015
6016  ;
6017  return 0;
6018}
6019_ACEOF
6020rm -f conftest.$ac_objext
6021if { (eval echo "$as_me:6021: \"$ac_compile\"") >&5
6022  (eval $ac_compile) 2>&5
6023  ac_status=$?
6024  echo "$as_me:6024: \$? = $ac_status" >&5
6025  (exit $ac_status); } &&
6026         { ac_try='test -s conftest.$ac_objext'
6027  { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028  (eval $ac_try) 2>&5
6029  ac_status=$?
6030  echo "$as_me:6030: \$? = $ac_status" >&5
6031  (exit $ac_status); }; }; then
6032
6033	cf_cv_cc_u_d_options=yes
6034else
6035  echo "$as_me: failed program was:" >&5
6036cat conftest.$ac_ext >&5
6037
6038	cf_cv_cc_u_d_options=no
6039fi
6040rm -f conftest.$ac_objext conftest.$ac_ext
6041	CPPFLAGS="$cf_save_CPPFLAGS"
6042
6043fi
6044echo "$as_me:6044: result: $cf_cv_cc_u_d_options" >&5
6045echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6046
6047cf_XOPEN_SOURCE=500
6048cf_POSIX_C_SOURCE=199506L
6049
6050case $host_os in #(vi
6051aix[45]*) #(vi
6052	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6053	;;
6054freebsd*) #(vi
6055	# 5.x headers associate
6056	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6057	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6058	cf_POSIX_C_SOURCE=200112L
6059	cf_XOPEN_SOURCE=600
6060	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6061	;;
6062hpux*) #(vi
6063	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6064	;;
6065irix[56].*) #(vi
6066	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6067	;;
6068linux*|gnu*) #(vi
6069
6070echo "$as_me:6070: checking if we must define _GNU_SOURCE" >&5
6071echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6072if test "${cf_cv_gnu_source+set}" = set; then
6073  echo $ECHO_N "(cached) $ECHO_C" >&6
6074else
6075
6076cat >conftest.$ac_ext <<_ACEOF
6077#line 6077 "configure"
6078#include "confdefs.h"
6079#include <sys/types.h>
6080int
6081main ()
6082{
6083
6084#ifndef _XOPEN_SOURCE
6085make an error
6086#endif
6087  ;
6088  return 0;
6089}
6090_ACEOF
6091rm -f conftest.$ac_objext
6092if { (eval echo "$as_me:6092: \"$ac_compile\"") >&5
6093  (eval $ac_compile) 2>&5
6094  ac_status=$?
6095  echo "$as_me:6095: \$? = $ac_status" >&5
6096  (exit $ac_status); } &&
6097         { ac_try='test -s conftest.$ac_objext'
6098  { (eval echo "$as_me:6098: \"$ac_try\"") >&5
6099  (eval $ac_try) 2>&5
6100  ac_status=$?
6101  echo "$as_me:6101: \$? = $ac_status" >&5
6102  (exit $ac_status); }; }; then
6103  cf_cv_gnu_source=no
6104else
6105  echo "$as_me: failed program was:" >&5
6106cat conftest.$ac_ext >&5
6107cf_save="$CPPFLAGS"
6108	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6109	 cat >conftest.$ac_ext <<_ACEOF
6110#line 6110 "configure"
6111#include "confdefs.h"
6112#include <sys/types.h>
6113int
6114main ()
6115{
6116
6117#ifdef _XOPEN_SOURCE
6118make an error
6119#endif
6120  ;
6121  return 0;
6122}
6123_ACEOF
6124rm -f conftest.$ac_objext
6125if { (eval echo "$as_me:6125: \"$ac_compile\"") >&5
6126  (eval $ac_compile) 2>&5
6127  ac_status=$?
6128  echo "$as_me:6128: \$? = $ac_status" >&5
6129  (exit $ac_status); } &&
6130         { ac_try='test -s conftest.$ac_objext'
6131  { (eval echo "$as_me:6131: \"$ac_try\"") >&5
6132  (eval $ac_try) 2>&5
6133  ac_status=$?
6134  echo "$as_me:6134: \$? = $ac_status" >&5
6135  (exit $ac_status); }; }; then
6136  cf_cv_gnu_source=no
6137else
6138  echo "$as_me: failed program was:" >&5
6139cat conftest.$ac_ext >&5
6140cf_cv_gnu_source=yes
6141fi
6142rm -f conftest.$ac_objext conftest.$ac_ext
6143	CPPFLAGS="$cf_save"
6144
6145fi
6146rm -f conftest.$ac_objext conftest.$ac_ext
6147
6148fi
6149echo "$as_me:6149: result: $cf_cv_gnu_source" >&5
6150echo "${ECHO_T}$cf_cv_gnu_source" >&6
6151test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6152
6153	;;
6154mirbsd*) #(vi
6155	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6156	;;
6157netbsd*) #(vi
6158	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6159	;;
6160openbsd*) #(vi
6161	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6162	;;
6163osf[45]*) #(vi
6164	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6165	;;
6166nto-qnx*) #(vi
6167	CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6168	;;
6169sco*) #(vi
6170	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6171	;;
6172solaris*) #(vi
6173	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6174	;;
6175*)
6176	echo "$as_me:6176: checking if we should define _XOPEN_SOURCE" >&5
6177echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6178if test "${cf_cv_xopen_source+set}" = set; then
6179  echo $ECHO_N "(cached) $ECHO_C" >&6
6180else
6181
6182	cat >conftest.$ac_ext <<_ACEOF
6183#line 6183 "configure"
6184#include "confdefs.h"
6185#include <sys/types.h>
6186int
6187main ()
6188{
6189
6190#ifndef _XOPEN_SOURCE
6191make an error
6192#endif
6193  ;
6194  return 0;
6195}
6196_ACEOF
6197rm -f conftest.$ac_objext
6198if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
6199  (eval $ac_compile) 2>&5
6200  ac_status=$?
6201  echo "$as_me:6201: \$? = $ac_status" >&5
6202  (exit $ac_status); } &&
6203         { ac_try='test -s conftest.$ac_objext'
6204  { (eval echo "$as_me:6204: \"$ac_try\"") >&5
6205  (eval $ac_try) 2>&5
6206  ac_status=$?
6207  echo "$as_me:6207: \$? = $ac_status" >&5
6208  (exit $ac_status); }; }; then
6209  cf_cv_xopen_source=no
6210else
6211  echo "$as_me: failed program was:" >&5
6212cat conftest.$ac_ext >&5
6213cf_save="$CPPFLAGS"
6214	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6215	 cat >conftest.$ac_ext <<_ACEOF
6216#line 6216 "configure"
6217#include "confdefs.h"
6218#include <sys/types.h>
6219int
6220main ()
6221{
6222
6223#ifdef _XOPEN_SOURCE
6224make an error
6225#endif
6226  ;
6227  return 0;
6228}
6229_ACEOF
6230rm -f conftest.$ac_objext
6231if { (eval echo "$as_me:6231: \"$ac_compile\"") >&5
6232  (eval $ac_compile) 2>&5
6233  ac_status=$?
6234  echo "$as_me:6234: \$? = $ac_status" >&5
6235  (exit $ac_status); } &&
6236         { ac_try='test -s conftest.$ac_objext'
6237  { (eval echo "$as_me:6237: \"$ac_try\"") >&5
6238  (eval $ac_try) 2>&5
6239  ac_status=$?
6240  echo "$as_me:6240: \$? = $ac_status" >&5
6241  (exit $ac_status); }; }; then
6242  cf_cv_xopen_source=no
6243else
6244  echo "$as_me: failed program was:" >&5
6245cat conftest.$ac_ext >&5
6246cf_cv_xopen_source=$cf_XOPEN_SOURCE
6247fi
6248rm -f conftest.$ac_objext conftest.$ac_ext
6249	CPPFLAGS="$cf_save"
6250
6251fi
6252rm -f conftest.$ac_objext conftest.$ac_ext
6253
6254fi
6255echo "$as_me:6255: result: $cf_cv_xopen_source" >&5
6256echo "${ECHO_T}$cf_cv_xopen_source" >&6
6257	if test "$cf_cv_xopen_source" != no ; then
6258
6259# remove _XOPEN_SOURCE symbol from $CFLAGS
6260CFLAGS=`echo "$CFLAGS" | \
6261	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6262		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6263
6264# remove _XOPEN_SOURCE symbol from $CPPFLAGS
6265CPPFLAGS=`echo "$CPPFLAGS" | \
6266	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6267		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6268
6269		test "$cf_cv_cc_u_d_options" = yes && \
6270			CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6271		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6272	fi
6273
6274cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6275
6276cf_save_CFLAGS="$CFLAGS"
6277cf_save_CPPFLAGS="$CPPFLAGS"
6278
6279# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6280cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6281	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6282		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6283
6284# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6285cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6286	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6287		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6288
6289echo "$as_me:6289: checking if we should define _POSIX_C_SOURCE" >&5
6290echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6291if test "${cf_cv_posix_c_source+set}" = set; then
6292  echo $ECHO_N "(cached) $ECHO_C" >&6
6293else
6294
6295echo "(line 6295) testing if the symbol is already defined go no further ..." 1>&5
6296
6297	cat >conftest.$ac_ext <<_ACEOF
6298#line 6298 "configure"
6299#include "confdefs.h"
6300#include <sys/types.h>
6301int
6302main ()
6303{
6304
6305#ifndef _POSIX_C_SOURCE
6306make an error
6307#endif
6308  ;
6309  return 0;
6310}
6311_ACEOF
6312rm -f conftest.$ac_objext
6313if { (eval echo "$as_me:6313: \"$ac_compile\"") >&5
6314  (eval $ac_compile) 2>&5
6315  ac_status=$?
6316  echo "$as_me:6316: \$? = $ac_status" >&5
6317  (exit $ac_status); } &&
6318         { ac_try='test -s conftest.$ac_objext'
6319  { (eval echo "$as_me:6319: \"$ac_try\"") >&5
6320  (eval $ac_try) 2>&5
6321  ac_status=$?
6322  echo "$as_me:6322: \$? = $ac_status" >&5
6323  (exit $ac_status); }; }; then
6324  cf_cv_posix_c_source=no
6325else
6326  echo "$as_me: failed program was:" >&5
6327cat conftest.$ac_ext >&5
6328cf_want_posix_source=no
6329	 case .$cf_POSIX_C_SOURCE in #(vi
6330	 .[12]??*) #(vi
6331		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6332		;;
6333	 .2) #(vi
6334		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6335		cf_want_posix_source=yes
6336		;;
6337	 .*)
6338		cf_want_posix_source=yes
6339		;;
6340	 esac
6341	 if test "$cf_want_posix_source" = yes ; then
6342		cat >conftest.$ac_ext <<_ACEOF
6343#line 6343 "configure"
6344#include "confdefs.h"
6345#include <sys/types.h>
6346int
6347main ()
6348{
6349
6350#ifdef _POSIX_SOURCE
6351make an error
6352#endif
6353  ;
6354  return 0;
6355}
6356_ACEOF
6357rm -f conftest.$ac_objext
6358if { (eval echo "$as_me:6358: \"$ac_compile\"") >&5
6359  (eval $ac_compile) 2>&5
6360  ac_status=$?
6361  echo "$as_me:6361: \$? = $ac_status" >&5
6362  (exit $ac_status); } &&
6363         { ac_try='test -s conftest.$ac_objext'
6364  { (eval echo "$as_me:6364: \"$ac_try\"") >&5
6365  (eval $ac_try) 2>&5
6366  ac_status=$?
6367  echo "$as_me:6367: \$? = $ac_status" >&5
6368  (exit $ac_status); }; }; then
6369  :
6370else
6371  echo "$as_me: failed program was:" >&5
6372cat conftest.$ac_ext >&5
6373cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6374fi
6375rm -f conftest.$ac_objext conftest.$ac_ext
6376	 fi
6377
6378echo "(line 6378) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6379
6380	 CFLAGS="$cf_trim_CFLAGS"
6381	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6382
6383echo "(line 6383) testing if the second compile does not leave our definition intact error ..." 1>&5
6384
6385	 cat >conftest.$ac_ext <<_ACEOF
6386#line 6386 "configure"
6387#include "confdefs.h"
6388#include <sys/types.h>
6389int
6390main ()
6391{
6392
6393#ifndef _POSIX_C_SOURCE
6394make an error
6395#endif
6396  ;
6397  return 0;
6398}
6399_ACEOF
6400rm -f conftest.$ac_objext
6401if { (eval echo "$as_me:6401: \"$ac_compile\"") >&5
6402  (eval $ac_compile) 2>&5
6403  ac_status=$?
6404  echo "$as_me:6404: \$? = $ac_status" >&5
6405  (exit $ac_status); } &&
6406         { ac_try='test -s conftest.$ac_objext'
6407  { (eval echo "$as_me:6407: \"$ac_try\"") >&5
6408  (eval $ac_try) 2>&5
6409  ac_status=$?
6410  echo "$as_me:6410: \$? = $ac_status" >&5
6411  (exit $ac_status); }; }; then
6412  :
6413else
6414  echo "$as_me: failed program was:" >&5
6415cat conftest.$ac_ext >&5
6416cf_cv_posix_c_source=no
6417fi
6418rm -f conftest.$ac_objext conftest.$ac_ext
6419	 CFLAGS="$cf_save_CFLAGS"
6420	 CPPFLAGS="$cf_save_CPPFLAGS"
6421
6422fi
6423rm -f conftest.$ac_objext conftest.$ac_ext
6424
6425fi
6426echo "$as_me:6426: result: $cf_cv_posix_c_source" >&5
6427echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6428
6429if test "$cf_cv_posix_c_source" != no ; then
6430	CFLAGS="$cf_trim_CFLAGS"
6431	CPPFLAGS="$cf_trim_CPPFLAGS"
6432	if test "$cf_cv_cc_u_d_options" = yes ; then
6433		cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6434				sed -e 's/-D/-U/g' -e 's/=[^ 	]*//g'`
6435		CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6436	fi
6437	CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6438fi
6439
6440	;;
6441esac
6442
6443# Work around breakage on OS X
6444
6445echo "$as_me:6445: checking if SIGWINCH is defined" >&5
6446echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6447if test "${cf_cv_define_sigwinch+set}" = set; then
6448  echo $ECHO_N "(cached) $ECHO_C" >&6
6449else
6450
6451	cat >conftest.$ac_ext <<_ACEOF
6452#line 6452 "configure"
6453#include "confdefs.h"
6454
6455#include <sys/types.h>
6456#include <sys/signal.h>
6457
6458int
6459main ()
6460{
6461int x = SIGWINCH
6462  ;
6463  return 0;
6464}
6465_ACEOF
6466rm -f conftest.$ac_objext
6467if { (eval echo "$as_me:6467: \"$ac_compile\"") >&5
6468  (eval $ac_compile) 2>&5
6469  ac_status=$?
6470  echo "$as_me:6470: \$? = $ac_status" >&5
6471  (exit $ac_status); } &&
6472         { ac_try='test -s conftest.$ac_objext'
6473  { (eval echo "$as_me:6473: \"$ac_try\"") >&5
6474  (eval $ac_try) 2>&5
6475  ac_status=$?
6476  echo "$as_me:6476: \$? = $ac_status" >&5
6477  (exit $ac_status); }; }; then
6478  cf_cv_define_sigwinch=yes
6479else
6480  echo "$as_me: failed program was:" >&5
6481cat conftest.$ac_ext >&5
6482cat >conftest.$ac_ext <<_ACEOF
6483#line 6483 "configure"
6484#include "confdefs.h"
6485
6486#undef _XOPEN_SOURCE
6487#undef _POSIX_SOURCE
6488#undef _POSIX_C_SOURCE
6489#include <sys/types.h>
6490#include <sys/signal.h>
6491
6492int
6493main ()
6494{
6495int x = SIGWINCH
6496  ;
6497  return 0;
6498}
6499_ACEOF
6500rm -f conftest.$ac_objext
6501if { (eval echo "$as_me:6501: \"$ac_compile\"") >&5
6502  (eval $ac_compile) 2>&5
6503  ac_status=$?
6504  echo "$as_me:6504: \$? = $ac_status" >&5
6505  (exit $ac_status); } &&
6506         { ac_try='test -s conftest.$ac_objext'
6507  { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508  (eval $ac_try) 2>&5
6509  ac_status=$?
6510  echo "$as_me:6510: \$? = $ac_status" >&5
6511  (exit $ac_status); }; }; then
6512  cf_cv_define_sigwinch=maybe
6513else
6514  echo "$as_me: failed program was:" >&5
6515cat conftest.$ac_ext >&5
6516cf_cv_define_sigwinch=no
6517fi
6518rm -f conftest.$ac_objext conftest.$ac_ext
6519
6520fi
6521rm -f conftest.$ac_objext conftest.$ac_ext
6522
6523fi
6524echo "$as_me:6524: result: $cf_cv_define_sigwinch" >&5
6525echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6526
6527if test "$cf_cv_define_sigwinch" = maybe ; then
6528echo "$as_me:6528: checking for actual SIGWINCH definition" >&5
6529echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6530if test "${cf_cv_fixup_sigwinch+set}" = set; then
6531  echo $ECHO_N "(cached) $ECHO_C" >&6
6532else
6533
6534cf_cv_fixup_sigwinch=unknown
6535cf_sigwinch=32
6536while test $cf_sigwinch != 1
6537do
6538	cat >conftest.$ac_ext <<_ACEOF
6539#line 6539 "configure"
6540#include "confdefs.h"
6541
6542#undef _XOPEN_SOURCE
6543#undef _POSIX_SOURCE
6544#undef _POSIX_C_SOURCE
6545#include <sys/types.h>
6546#include <sys/signal.h>
6547
6548int
6549main ()
6550{
6551
6552#if SIGWINCH != $cf_sigwinch
6553make an error
6554#endif
6555int x = SIGWINCH
6556  ;
6557  return 0;
6558}
6559_ACEOF
6560rm -f conftest.$ac_objext
6561if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5
6562  (eval $ac_compile) 2>&5
6563  ac_status=$?
6564  echo "$as_me:6564: \$? = $ac_status" >&5
6565  (exit $ac_status); } &&
6566         { ac_try='test -s conftest.$ac_objext'
6567  { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568  (eval $ac_try) 2>&5
6569  ac_status=$?
6570  echo "$as_me:6570: \$? = $ac_status" >&5
6571  (exit $ac_status); }; }; then
6572  cf_cv_fixup_sigwinch=$cf_sigwinch
6573	 break
6574else
6575  echo "$as_me: failed program was:" >&5
6576cat conftest.$ac_ext >&5
6577fi
6578rm -f conftest.$ac_objext conftest.$ac_ext
6579
6580cf_sigwinch=`expr $cf_sigwinch - 1`
6581done
6582
6583fi
6584echo "$as_me:6584: result: $cf_cv_fixup_sigwinch" >&5
6585echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6586
6587	if test "$cf_cv_fixup_sigwinch" != unknown ; then
6588		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6589	fi
6590fi
6591
6592# Checks for CODESET support.
6593
6594  echo "$as_me:6594: checking for nl_langinfo and CODESET" >&5
6595echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6596if test "${am_cv_langinfo_codeset+set}" = set; then
6597  echo $ECHO_N "(cached) $ECHO_C" >&6
6598else
6599  cat >conftest.$ac_ext <<_ACEOF
6600#line 6600 "configure"
6601#include "confdefs.h"
6602#include <langinfo.h>
6603int
6604main ()
6605{
6606char* cs = nl_langinfo(CODESET);
6607  ;
6608  return 0;
6609}
6610_ACEOF
6611rm -f conftest.$ac_objext conftest$ac_exeext
6612if { (eval echo "$as_me:6612: \"$ac_link\"") >&5
6613  (eval $ac_link) 2>&5
6614  ac_status=$?
6615  echo "$as_me:6615: \$? = $ac_status" >&5
6616  (exit $ac_status); } &&
6617         { ac_try='test -s conftest$ac_exeext'
6618  { (eval echo "$as_me:6618: \"$ac_try\"") >&5
6619  (eval $ac_try) 2>&5
6620  ac_status=$?
6621  echo "$as_me:6621: \$? = $ac_status" >&5
6622  (exit $ac_status); }; }; then
6623  am_cv_langinfo_codeset=yes
6624else
6625  echo "$as_me: failed program was:" >&5
6626cat conftest.$ac_ext >&5
6627am_cv_langinfo_codeset=no
6628fi
6629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6630
6631fi
6632echo "$as_me:6632: result: $am_cv_langinfo_codeset" >&5
6633echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6634  if test $am_cv_langinfo_codeset = yes; then
6635
6636cat >>confdefs.h <<\EOF
6637#define HAVE_LANGINFO_CODESET 1
6638EOF
6639
6640  fi
6641
6642# use these variables to work around a defect in gcc's fixincludes.
6643NCURSES_OK_WCHAR_T=
6644NCURSES_OK_WINT_T=
6645
6646echo "$as_me:6646: checking if you want wide-character code" >&5
6647echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6648
6649# Check whether --enable-widec or --disable-widec was given.
6650if test "${enable_widec+set}" = set; then
6651  enableval="$enable_widec"
6652  with_widec=$enableval
6653else
6654  with_widec=no
6655fi;
6656echo "$as_me:6656: result: $with_widec" >&5
6657echo "${ECHO_T}$with_widec" >&6
6658if test "$with_widec" = yes ; then
6659	LIB_SUFFIX="w${LIB_SUFFIX}"
6660	cat >>confdefs.h <<\EOF
6661#define USE_WIDEC_SUPPORT 1
6662EOF
6663
6664echo "$as_me:6664: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6665echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6666cat >conftest.$ac_ext <<_ACEOF
6667#line 6667 "configure"
6668#include "confdefs.h"
6669#include <sys/types.h>
6670
6671int
6672main ()
6673{
6674
6675#ifndef _XOPEN_SOURCE_EXTENDED
6676make an error
6677#endif
6678  ;
6679  return 0;
6680}
6681_ACEOF
6682rm -f conftest.$ac_objext
6683if { (eval echo "$as_me:6683: \"$ac_compile\"") >&5
6684  (eval $ac_compile) 2>&5
6685  ac_status=$?
6686  echo "$as_me:6686: \$? = $ac_status" >&5
6687  (exit $ac_status); } &&
6688         { ac_try='test -s conftest.$ac_objext'
6689  { (eval echo "$as_me:6689: \"$ac_try\"") >&5
6690  (eval $ac_try) 2>&5
6691  ac_status=$?
6692  echo "$as_me:6692: \$? = $ac_status" >&5
6693  (exit $ac_status); }; }; then
6694  cf_result=no
6695else
6696  echo "$as_me: failed program was:" >&5
6697cat conftest.$ac_ext >&5
6698cf_result=yes
6699fi
6700rm -f conftest.$ac_objext conftest.$ac_ext
6701echo "$as_me:6701: result: $cf_result" >&5
6702echo "${ECHO_T}$cf_result" >&6
6703
6704if test "$cf_result" = yes ; then
6705	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6706elif test "x" != "x" ; then
6707	echo "$as_me:6707: checking checking for compatible value versus " >&5
6708echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6709	cat >conftest.$ac_ext <<_ACEOF
6710#line 6710 "configure"
6711#include "confdefs.h"
6712#include <sys/types.h>
6713
6714int
6715main ()
6716{
6717
6718#if _XOPEN_SOURCE_EXTENDED- < 0
6719make an error
6720#endif
6721  ;
6722  return 0;
6723}
6724_ACEOF
6725rm -f conftest.$ac_objext
6726if { (eval echo "$as_me:6726: \"$ac_compile\"") >&5
6727  (eval $ac_compile) 2>&5
6728  ac_status=$?
6729  echo "$as_me:6729: \$? = $ac_status" >&5
6730  (exit $ac_status); } &&
6731         { ac_try='test -s conftest.$ac_objext'
6732  { (eval echo "$as_me:6732: \"$ac_try\"") >&5
6733  (eval $ac_try) 2>&5
6734  ac_status=$?
6735  echo "$as_me:6735: \$? = $ac_status" >&5
6736  (exit $ac_status); }; }; then
6737  cf_result=yes
6738else
6739  echo "$as_me: failed program was:" >&5
6740cat conftest.$ac_ext >&5
6741cf_result=no
6742fi
6743rm -f conftest.$ac_objext conftest.$ac_ext
6744	echo "$as_me:6744: result: $cf_result" >&5
6745echo "${ECHO_T}$cf_result" >&6
6746	if test "$cf_result" = no ; then
6747		# perhaps we can override it - try...
6748		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6749	fi
6750fi
6751
6752	# with_overwrite=no
6753	NCURSES_CH_T=cchar_t
6754
6755for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6756do
6757as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6758echo "$as_me:6758: checking for $ac_func" >&5
6759echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6760if eval "test \"\${$as_ac_var+set}\" = set"; then
6761  echo $ECHO_N "(cached) $ECHO_C" >&6
6762else
6763  cat >conftest.$ac_ext <<_ACEOF
6764#line 6764 "configure"
6765#include "confdefs.h"
6766/* System header to define __stub macros and hopefully few prototypes,
6767    which can conflict with char $ac_func (); below.  */
6768#include <assert.h>
6769/* Override any gcc2 internal prototype to avoid an error.  */
6770#ifdef __cplusplus
6771extern "C"
6772#endif
6773/* We use char because int might match the return type of a gcc2
6774   builtin and then its argument prototype would still apply.  */
6775char $ac_func ();
6776char (*f) ();
6777
6778int
6779main ()
6780{
6781/* The GNU C library defines this for functions which it implements
6782    to always fail with ENOSYS.  Some functions are actually named
6783    something starting with __ and the normal name is an alias.  */
6784#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6785choke me
6786#else
6787f = $ac_func;
6788#endif
6789
6790  ;
6791  return 0;
6792}
6793_ACEOF
6794rm -f conftest.$ac_objext conftest$ac_exeext
6795if { (eval echo "$as_me:6795: \"$ac_link\"") >&5
6796  (eval $ac_link) 2>&5
6797  ac_status=$?
6798  echo "$as_me:6798: \$? = $ac_status" >&5
6799  (exit $ac_status); } &&
6800         { ac_try='test -s conftest$ac_exeext'
6801  { (eval echo "$as_me:6801: \"$ac_try\"") >&5
6802  (eval $ac_try) 2>&5
6803  ac_status=$?
6804  echo "$as_me:6804: \$? = $ac_status" >&5
6805  (exit $ac_status); }; }; then
6806  eval "$as_ac_var=yes"
6807else
6808  echo "$as_me: failed program was:" >&5
6809cat conftest.$ac_ext >&5
6810eval "$as_ac_var=no"
6811fi
6812rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6813fi
6814echo "$as_me:6814: result: `eval echo '${'$as_ac_var'}'`" >&5
6815echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6816if test `eval echo '${'$as_ac_var'}'` = yes; then
6817  cat >>confdefs.h <<EOF
6818#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6819EOF
6820
6821fi
6822done
6823
6824	if test "$ac_cv_func_putwc" != yes ; then
6825
6826echo "$as_me:6826: checking for putwc in libutf8" >&5
6827echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6828if test "${cf_cv_libutf8+set}" = set; then
6829  echo $ECHO_N "(cached) $ECHO_C" >&6
6830else
6831
6832	cf_save_LIBS="$LIBS"
6833	LIBS="-lutf8 $LIBS"
6834cat >conftest.$ac_ext <<_ACEOF
6835#line 6835 "configure"
6836#include "confdefs.h"
6837
6838#include <libutf8.h>
6839int
6840main ()
6841{
6842putwc(0,0);
6843  ;
6844  return 0;
6845}
6846_ACEOF
6847rm -f conftest.$ac_objext conftest$ac_exeext
6848if { (eval echo "$as_me:6848: \"$ac_link\"") >&5
6849  (eval $ac_link) 2>&5
6850  ac_status=$?
6851  echo "$as_me:6851: \$? = $ac_status" >&5
6852  (exit $ac_status); } &&
6853         { ac_try='test -s conftest$ac_exeext'
6854  { (eval echo "$as_me:6854: \"$ac_try\"") >&5
6855  (eval $ac_try) 2>&5
6856  ac_status=$?
6857  echo "$as_me:6857: \$? = $ac_status" >&5
6858  (exit $ac_status); }; }; then
6859  cf_cv_libutf8=yes
6860else
6861  echo "$as_me: failed program was:" >&5
6862cat conftest.$ac_ext >&5
6863cf_cv_libutf8=no
6864fi
6865rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6866	LIBS="$cf_save_LIBS"
6867
6868fi
6869echo "$as_me:6869: result: $cf_cv_libutf8" >&5
6870echo "${ECHO_T}$cf_cv_libutf8" >&6
6871
6872if test "$cf_cv_libutf8" = yes ; then
6873	cat >>confdefs.h <<\EOF
6874#define HAVE_LIBUTF8_H 1
6875EOF
6876
6877	LIBS="-lutf8 $LIBS"
6878fi
6879
6880		if test "$cf_cv_libutf8" = yes ; then
6881			NCURSES_LIBUTF8=1
6882		fi
6883	fi
6884
6885# This is needed on Tru64 5.0 to declare mbstate_t
6886echo "$as_me:6886: checking if we must include wchar.h to declare mbstate_t" >&5
6887echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6888if test "${cf_cv_mbstate_t+set}" = set; then
6889  echo $ECHO_N "(cached) $ECHO_C" >&6
6890else
6891
6892cat >conftest.$ac_ext <<_ACEOF
6893#line 6893 "configure"
6894#include "confdefs.h"
6895
6896#include <stdlib.h>
6897#include <stdarg.h>
6898#include <stdio.h>
6899#ifdef HAVE_LIBUTF8_H
6900#include <libutf8.h>
6901#endif
6902int
6903main ()
6904{
6905mbstate_t state
6906  ;
6907  return 0;
6908}
6909_ACEOF
6910rm -f conftest.$ac_objext
6911if { (eval echo "$as_me:6911: \"$ac_compile\"") >&5
6912  (eval $ac_compile) 2>&5
6913  ac_status=$?
6914  echo "$as_me:6914: \$? = $ac_status" >&5
6915  (exit $ac_status); } &&
6916         { ac_try='test -s conftest.$ac_objext'
6917  { (eval echo "$as_me:6917: \"$ac_try\"") >&5
6918  (eval $ac_try) 2>&5
6919  ac_status=$?
6920  echo "$as_me:6920: \$? = $ac_status" >&5
6921  (exit $ac_status); }; }; then
6922  cf_cv_mbstate_t=no
6923else
6924  echo "$as_me: failed program was:" >&5
6925cat conftest.$ac_ext >&5
6926cat >conftest.$ac_ext <<_ACEOF
6927#line 6927 "configure"
6928#include "confdefs.h"
6929
6930#include <stdlib.h>
6931#include <stdarg.h>
6932#include <stdio.h>
6933#include <wchar.h>
6934#ifdef HAVE_LIBUTF8_H
6935#include <libutf8.h>
6936#endif
6937int
6938main ()
6939{
6940mbstate_t value
6941  ;
6942  return 0;
6943}
6944_ACEOF
6945rm -f conftest.$ac_objext
6946if { (eval echo "$as_me:6946: \"$ac_compile\"") >&5
6947  (eval $ac_compile) 2>&5
6948  ac_status=$?
6949  echo "$as_me:6949: \$? = $ac_status" >&5
6950  (exit $ac_status); } &&
6951         { ac_try='test -s conftest.$ac_objext'
6952  { (eval echo "$as_me:6952: \"$ac_try\"") >&5
6953  (eval $ac_try) 2>&5
6954  ac_status=$?
6955  echo "$as_me:6955: \$? = $ac_status" >&5
6956  (exit $ac_status); }; }; then
6957  cf_cv_mbstate_t=yes
6958else
6959  echo "$as_me: failed program was:" >&5
6960cat conftest.$ac_ext >&5
6961cf_cv_mbstate_t=unknown
6962fi
6963rm -f conftest.$ac_objext conftest.$ac_ext
6964fi
6965rm -f conftest.$ac_objext conftest.$ac_ext
6966fi
6967echo "$as_me:6967: result: $cf_cv_mbstate_t" >&5
6968echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6969
6970if test "$cf_cv_mbstate_t" = yes ; then
6971	cat >>confdefs.h <<\EOF
6972#define NEED_WCHAR_H 1
6973EOF
6974
6975	NEED_WCHAR_H=1
6976fi
6977
6978# if we do not find mbstate_t in either place, use substitution to provide a fallback.
6979if test "$cf_cv_mbstate_t" = unknown ; then
6980	NCURSES_MBSTATE_T=1
6981fi
6982
6983# This is needed on Tru64 5.0 to declare wchar_t
6984echo "$as_me:6984: checking if we must include wchar.h to declare wchar_t" >&5
6985echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
6986if test "${cf_cv_wchar_t+set}" = set; then
6987  echo $ECHO_N "(cached) $ECHO_C" >&6
6988else
6989
6990cat >conftest.$ac_ext <<_ACEOF
6991#line 6991 "configure"
6992#include "confdefs.h"
6993
6994#include <stdlib.h>
6995#include <stdarg.h>
6996#include <stdio.h>
6997#ifdef HAVE_LIBUTF8_H
6998#include <libutf8.h>
6999#endif
7000int
7001main ()
7002{
7003wchar_t state
7004  ;
7005  return 0;
7006}
7007_ACEOF
7008rm -f conftest.$ac_objext
7009if { (eval echo "$as_me:7009: \"$ac_compile\"") >&5
7010  (eval $ac_compile) 2>&5
7011  ac_status=$?
7012  echo "$as_me:7012: \$? = $ac_status" >&5
7013  (exit $ac_status); } &&
7014         { ac_try='test -s conftest.$ac_objext'
7015  { (eval echo "$as_me:7015: \"$ac_try\"") >&5
7016  (eval $ac_try) 2>&5
7017  ac_status=$?
7018  echo "$as_me:7018: \$? = $ac_status" >&5
7019  (exit $ac_status); }; }; then
7020  cf_cv_wchar_t=no
7021else
7022  echo "$as_me: failed program was:" >&5
7023cat conftest.$ac_ext >&5
7024cat >conftest.$ac_ext <<_ACEOF
7025#line 7025 "configure"
7026#include "confdefs.h"
7027
7028#include <stdlib.h>
7029#include <stdarg.h>
7030#include <stdio.h>
7031#include <wchar.h>
7032#ifdef HAVE_LIBUTF8_H
7033#include <libutf8.h>
7034#endif
7035int
7036main ()
7037{
7038wchar_t value
7039  ;
7040  return 0;
7041}
7042_ACEOF
7043rm -f conftest.$ac_objext
7044if { (eval echo "$as_me:7044: \"$ac_compile\"") >&5
7045  (eval $ac_compile) 2>&5
7046  ac_status=$?
7047  echo "$as_me:7047: \$? = $ac_status" >&5
7048  (exit $ac_status); } &&
7049         { ac_try='test -s conftest.$ac_objext'
7050  { (eval echo "$as_me:7050: \"$ac_try\"") >&5
7051  (eval $ac_try) 2>&5
7052  ac_status=$?
7053  echo "$as_me:7053: \$? = $ac_status" >&5
7054  (exit $ac_status); }; }; then
7055  cf_cv_wchar_t=yes
7056else
7057  echo "$as_me: failed program was:" >&5
7058cat conftest.$ac_ext >&5
7059cf_cv_wchar_t=unknown
7060fi
7061rm -f conftest.$ac_objext conftest.$ac_ext
7062fi
7063rm -f conftest.$ac_objext conftest.$ac_ext
7064fi
7065echo "$as_me:7065: result: $cf_cv_wchar_t" >&5
7066echo "${ECHO_T}$cf_cv_wchar_t" >&6
7067
7068if test "$cf_cv_wchar_t" = yes ; then
7069	cat >>confdefs.h <<\EOF
7070#define NEED_WCHAR_H 1
7071EOF
7072
7073	NEED_WCHAR_H=1
7074fi
7075
7076# if we do not find wchar_t in either place, use substitution to provide a fallback.
7077if test "$cf_cv_wchar_t" = unknown ; then
7078	NCURSES_WCHAR_T=1
7079fi
7080
7081# if we find wchar_t in either place, use substitution to provide a fallback.
7082if test "$cf_cv_wchar_t" != unknown ; then
7083	NCURSES_OK_WCHAR_T=1
7084fi
7085
7086# This is needed on Tru64 5.0 to declare wint_t
7087echo "$as_me:7087: checking if we must include wchar.h to declare wint_t" >&5
7088echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
7089if test "${cf_cv_wint_t+set}" = set; then
7090  echo $ECHO_N "(cached) $ECHO_C" >&6
7091else
7092
7093cat >conftest.$ac_ext <<_ACEOF
7094#line 7094 "configure"
7095#include "confdefs.h"
7096
7097#include <stdlib.h>
7098#include <stdarg.h>
7099#include <stdio.h>
7100#ifdef HAVE_LIBUTF8_H
7101#include <libutf8.h>
7102#endif
7103int
7104main ()
7105{
7106wint_t state
7107  ;
7108  return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext
7112if { (eval echo "$as_me:7112: \"$ac_compile\"") >&5
7113  (eval $ac_compile) 2>&5
7114  ac_status=$?
7115  echo "$as_me:7115: \$? = $ac_status" >&5
7116  (exit $ac_status); } &&
7117         { ac_try='test -s conftest.$ac_objext'
7118  { (eval echo "$as_me:7118: \"$ac_try\"") >&5
7119  (eval $ac_try) 2>&5
7120  ac_status=$?
7121  echo "$as_me:7121: \$? = $ac_status" >&5
7122  (exit $ac_status); }; }; then
7123  cf_cv_wint_t=no
7124else
7125  echo "$as_me: failed program was:" >&5
7126cat conftest.$ac_ext >&5
7127cat >conftest.$ac_ext <<_ACEOF
7128#line 7128 "configure"
7129#include "confdefs.h"
7130
7131#include <stdlib.h>
7132#include <stdarg.h>
7133#include <stdio.h>
7134#include <wchar.h>
7135#ifdef HAVE_LIBUTF8_H
7136#include <libutf8.h>
7137#endif
7138int
7139main ()
7140{
7141wint_t value
7142  ;
7143  return 0;
7144}
7145_ACEOF
7146rm -f conftest.$ac_objext
7147if { (eval echo "$as_me:7147: \"$ac_compile\"") >&5
7148  (eval $ac_compile) 2>&5
7149  ac_status=$?
7150  echo "$as_me:7150: \$? = $ac_status" >&5
7151  (exit $ac_status); } &&
7152         { ac_try='test -s conftest.$ac_objext'
7153  { (eval echo "$as_me:7153: \"$ac_try\"") >&5
7154  (eval $ac_try) 2>&5
7155  ac_status=$?
7156  echo "$as_me:7156: \$? = $ac_status" >&5
7157  (exit $ac_status); }; }; then
7158  cf_cv_wint_t=yes
7159else
7160  echo "$as_me: failed program was:" >&5
7161cat conftest.$ac_ext >&5
7162cf_cv_wint_t=unknown
7163fi
7164rm -f conftest.$ac_objext conftest.$ac_ext
7165fi
7166rm -f conftest.$ac_objext conftest.$ac_ext
7167fi
7168echo "$as_me:7168: result: $cf_cv_wint_t" >&5
7169echo "${ECHO_T}$cf_cv_wint_t" >&6
7170
7171if test "$cf_cv_wint_t" = yes ; then
7172	cat >>confdefs.h <<\EOF
7173#define NEED_WCHAR_H 1
7174EOF
7175
7176	NEED_WCHAR_H=1
7177fi
7178
7179# if we do not find wint_t in either place, use substitution to provide a fallback.
7180if test "$cf_cv_wint_t" = unknown ; then
7181	NCURSES_WINT_T=1
7182fi
7183
7184# if we find wint_t in either place, use substitution to provide a fallback.
7185if test "$cf_cv_wint_t" != unknown ; then
7186	NCURSES_OK_WINT_T=1
7187fi
7188
7189	if test "$NCURSES_MBSTATE_T" != 0; then
7190		cat >>confdefs.h <<\EOF
7191#define NEED_MBSTATE_T_DEF 1
7192EOF
7193
7194	fi
7195fi
7196
7197###   use option --disable-lp64 to allow long chtype
7198case $cf_cv_abi_version in
7199[345]*)
7200	default_with_lp64=no
7201	;;
7202*)
7203	default_with_lp64=yes
7204	;;
7205esac
7206
7207echo "$as_me:7207: checking whether to enable _LP64 definition in curses.h" >&5
7208echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7209
7210# Check whether --enable-lp64 or --disable-lp64 was given.
7211if test "${enable_lp64+set}" = set; then
7212  enableval="$enable_lp64"
7213  with_lp64=$enableval
7214else
7215  with_lp64=$default_with_lp64
7216fi;
7217echo "$as_me:7217: result: $with_lp64" >&5
7218echo "${ECHO_T}$with_lp64" >&6
7219
7220if test "$with_lp64" = yes ; then
7221	cf_cv_enable_lp64=1
7222else
7223	cf_cv_enable_lp64=0
7224fi
7225
7226# Check whether --enable-largefile or --disable-largefile was given.
7227if test "${enable_largefile+set}" = set; then
7228  enableval="$enable_largefile"
7229
7230fi;
7231if test "$enable_largefile" != no; then
7232
7233  echo "$as_me:7233: checking for special C compiler options needed for large files" >&5
7234echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7235if test "${ac_cv_sys_largefile_CC+set}" = set; then
7236  echo $ECHO_N "(cached) $ECHO_C" >&6
7237else
7238  ac_cv_sys_largefile_CC=no
7239     if test "$GCC" != yes; then
7240       ac_save_CC=$CC
7241       while :; do
7242     	 # IRIX 6.2 and later do not support large files by default,
7243     	 # so use the C compiler's -n32 option if that helps.
7244         cat >conftest.$ac_ext <<_ACEOF
7245#line 7245 "configure"
7246#include "confdefs.h"
7247#include <sys/types.h>
7248 /* Check that off_t can represent 2**63 - 1 correctly.
7249    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7250    since some C++ compilers masquerading as C compilers
7251    incorrectly reject 9223372036854775807.  */
7252#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7253  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7254		       && LARGE_OFF_T % 2147483647 == 1)
7255		      ? 1 : -1];
7256int
7257main ()
7258{
7259
7260  ;
7261  return 0;
7262}
7263_ACEOF
7264     	 rm -f conftest.$ac_objext
7265if { (eval echo "$as_me:7265: \"$ac_compile\"") >&5
7266  (eval $ac_compile) 2>&5
7267  ac_status=$?
7268  echo "$as_me:7268: \$? = $ac_status" >&5
7269  (exit $ac_status); } &&
7270         { ac_try='test -s conftest.$ac_objext'
7271  { (eval echo "$as_me:7271: \"$ac_try\"") >&5
7272  (eval $ac_try) 2>&5
7273  ac_status=$?
7274  echo "$as_me:7274: \$? = $ac_status" >&5
7275  (exit $ac_status); }; }; then
7276  break
7277else
7278  echo "$as_me: failed program was:" >&5
7279cat conftest.$ac_ext >&5
7280fi
7281rm -f conftest.$ac_objext
7282     	 CC="$CC -n32"
7283     	 rm -f conftest.$ac_objext
7284if { (eval echo "$as_me:7284: \"$ac_compile\"") >&5
7285  (eval $ac_compile) 2>&5
7286  ac_status=$?
7287  echo "$as_me:7287: \$? = $ac_status" >&5
7288  (exit $ac_status); } &&
7289         { ac_try='test -s conftest.$ac_objext'
7290  { (eval echo "$as_me:7290: \"$ac_try\"") >&5
7291  (eval $ac_try) 2>&5
7292  ac_status=$?
7293  echo "$as_me:7293: \$? = $ac_status" >&5
7294  (exit $ac_status); }; }; then
7295  ac_cv_sys_largefile_CC=' -n32'; break
7296else
7297  echo "$as_me: failed program was:" >&5
7298cat conftest.$ac_ext >&5
7299fi
7300rm -f conftest.$ac_objext
7301         break
7302       done
7303       CC=$ac_save_CC
7304       rm -f conftest.$ac_ext
7305    fi
7306fi
7307echo "$as_me:7307: result: $ac_cv_sys_largefile_CC" >&5
7308echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7309  if test "$ac_cv_sys_largefile_CC" != no; then
7310    CC=$CC$ac_cv_sys_largefile_CC
7311  fi
7312
7313  echo "$as_me:7313: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7314echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7315if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7316  echo $ECHO_N "(cached) $ECHO_C" >&6
7317else
7318  while :; do
7319  ac_cv_sys_file_offset_bits=no
7320  cat >conftest.$ac_ext <<_ACEOF
7321#line 7321 "configure"
7322#include "confdefs.h"
7323#include <sys/types.h>
7324 /* Check that off_t can represent 2**63 - 1 correctly.
7325    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7326    since some C++ compilers masquerading as C compilers
7327    incorrectly reject 9223372036854775807.  */
7328#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7329  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7330		       && LARGE_OFF_T % 2147483647 == 1)
7331		      ? 1 : -1];
7332int
7333main ()
7334{
7335
7336  ;
7337  return 0;
7338}
7339_ACEOF
7340rm -f conftest.$ac_objext
7341if { (eval echo "$as_me:7341: \"$ac_compile\"") >&5
7342  (eval $ac_compile) 2>&5
7343  ac_status=$?
7344  echo "$as_me:7344: \$? = $ac_status" >&5
7345  (exit $ac_status); } &&
7346         { ac_try='test -s conftest.$ac_objext'
7347  { (eval echo "$as_me:7347: \"$ac_try\"") >&5
7348  (eval $ac_try) 2>&5
7349  ac_status=$?
7350  echo "$as_me:7350: \$? = $ac_status" >&5
7351  (exit $ac_status); }; }; then
7352  break
7353else
7354  echo "$as_me: failed program was:" >&5
7355cat conftest.$ac_ext >&5
7356fi
7357rm -f conftest.$ac_objext conftest.$ac_ext
7358  cat >conftest.$ac_ext <<_ACEOF
7359#line 7359 "configure"
7360#include "confdefs.h"
7361#define _FILE_OFFSET_BITS 64
7362#include <sys/types.h>
7363 /* Check that off_t can represent 2**63 - 1 correctly.
7364    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7365    since some C++ compilers masquerading as C compilers
7366    incorrectly reject 9223372036854775807.  */
7367#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7368  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7369		       && LARGE_OFF_T % 2147483647 == 1)
7370		      ? 1 : -1];
7371int
7372main ()
7373{
7374
7375  ;
7376  return 0;
7377}
7378_ACEOF
7379rm -f conftest.$ac_objext
7380if { (eval echo "$as_me:7380: \"$ac_compile\"") >&5
7381  (eval $ac_compile) 2>&5
7382  ac_status=$?
7383  echo "$as_me:7383: \$? = $ac_status" >&5
7384  (exit $ac_status); } &&
7385         { ac_try='test -s conftest.$ac_objext'
7386  { (eval echo "$as_me:7386: \"$ac_try\"") >&5
7387  (eval $ac_try) 2>&5
7388  ac_status=$?
7389  echo "$as_me:7389: \$? = $ac_status" >&5
7390  (exit $ac_status); }; }; then
7391  ac_cv_sys_file_offset_bits=64; break
7392else
7393  echo "$as_me: failed program was:" >&5
7394cat conftest.$ac_ext >&5
7395fi
7396rm -f conftest.$ac_objext conftest.$ac_ext
7397  break
7398done
7399fi
7400echo "$as_me:7400: result: $ac_cv_sys_file_offset_bits" >&5
7401echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7402if test "$ac_cv_sys_file_offset_bits" != no; then
7403
7404cat >>confdefs.h <<EOF
7405#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7406EOF
7407
7408fi
7409rm -f conftest*
7410  echo "$as_me:7410: checking for _LARGE_FILES value needed for large files" >&5
7411echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7412if test "${ac_cv_sys_large_files+set}" = set; then
7413  echo $ECHO_N "(cached) $ECHO_C" >&6
7414else
7415  while :; do
7416  ac_cv_sys_large_files=no
7417  cat >conftest.$ac_ext <<_ACEOF
7418#line 7418 "configure"
7419#include "confdefs.h"
7420#include <sys/types.h>
7421 /* Check that off_t can represent 2**63 - 1 correctly.
7422    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7423    since some C++ compilers masquerading as C compilers
7424    incorrectly reject 9223372036854775807.  */
7425#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7426  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7427		       && LARGE_OFF_T % 2147483647 == 1)
7428		      ? 1 : -1];
7429int
7430main ()
7431{
7432
7433  ;
7434  return 0;
7435}
7436_ACEOF
7437rm -f conftest.$ac_objext
7438if { (eval echo "$as_me:7438: \"$ac_compile\"") >&5
7439  (eval $ac_compile) 2>&5
7440  ac_status=$?
7441  echo "$as_me:7441: \$? = $ac_status" >&5
7442  (exit $ac_status); } &&
7443         { ac_try='test -s conftest.$ac_objext'
7444  { (eval echo "$as_me:7444: \"$ac_try\"") >&5
7445  (eval $ac_try) 2>&5
7446  ac_status=$?
7447  echo "$as_me:7447: \$? = $ac_status" >&5
7448  (exit $ac_status); }; }; then
7449  break
7450else
7451  echo "$as_me: failed program was:" >&5
7452cat conftest.$ac_ext >&5
7453fi
7454rm -f conftest.$ac_objext conftest.$ac_ext
7455  cat >conftest.$ac_ext <<_ACEOF
7456#line 7456 "configure"
7457#include "confdefs.h"
7458#define _LARGE_FILES 1
7459#include <sys/types.h>
7460 /* Check that off_t can represent 2**63 - 1 correctly.
7461    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7462    since some C++ compilers masquerading as C compilers
7463    incorrectly reject 9223372036854775807.  */
7464#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7465  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7466		       && LARGE_OFF_T % 2147483647 == 1)
7467		      ? 1 : -1];
7468int
7469main ()
7470{
7471
7472  ;
7473  return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (eval echo "$as_me:7477: \"$ac_compile\"") >&5
7478  (eval $ac_compile) 2>&5
7479  ac_status=$?
7480  echo "$as_me:7480: \$? = $ac_status" >&5
7481  (exit $ac_status); } &&
7482         { ac_try='test -s conftest.$ac_objext'
7483  { (eval echo "$as_me:7483: \"$ac_try\"") >&5
7484  (eval $ac_try) 2>&5
7485  ac_status=$?
7486  echo "$as_me:7486: \$? = $ac_status" >&5
7487  (exit $ac_status); }; }; then
7488  ac_cv_sys_large_files=1; break
7489else
7490  echo "$as_me: failed program was:" >&5
7491cat conftest.$ac_ext >&5
7492fi
7493rm -f conftest.$ac_objext conftest.$ac_ext
7494  break
7495done
7496fi
7497echo "$as_me:7497: result: $ac_cv_sys_large_files" >&5
7498echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7499if test "$ac_cv_sys_large_files" != no; then
7500
7501cat >>confdefs.h <<EOF
7502#define _LARGE_FILES $ac_cv_sys_large_files
7503EOF
7504
7505fi
7506rm -f conftest*
7507fi
7508
7509    if test "$enable_largefile" != no ; then
7510	echo "$as_me:7510: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7511echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7512if test "${ac_cv_sys_largefile_source+set}" = set; then
7513  echo $ECHO_N "(cached) $ECHO_C" >&6
7514else
7515  while :; do
7516  ac_cv_sys_largefile_source=no
7517  cat >conftest.$ac_ext <<_ACEOF
7518#line 7518 "configure"
7519#include "confdefs.h"
7520#include <stdio.h>
7521int
7522main ()
7523{
7524return !fseeko;
7525  ;
7526  return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
7530if { (eval echo "$as_me:7530: \"$ac_compile\"") >&5
7531  (eval $ac_compile) 2>&5
7532  ac_status=$?
7533  echo "$as_me:7533: \$? = $ac_status" >&5
7534  (exit $ac_status); } &&
7535         { ac_try='test -s conftest.$ac_objext'
7536  { (eval echo "$as_me:7536: \"$ac_try\"") >&5
7537  (eval $ac_try) 2>&5
7538  ac_status=$?
7539  echo "$as_me:7539: \$? = $ac_status" >&5
7540  (exit $ac_status); }; }; then
7541  break
7542else
7543  echo "$as_me: failed program was:" >&5
7544cat conftest.$ac_ext >&5
7545fi
7546rm -f conftest.$ac_objext conftest.$ac_ext
7547  cat >conftest.$ac_ext <<_ACEOF
7548#line 7548 "configure"
7549#include "confdefs.h"
7550#define _LARGEFILE_SOURCE 1
7551#include <stdio.h>
7552int
7553main ()
7554{
7555return !fseeko;
7556  ;
7557  return 0;
7558}
7559_ACEOF
7560rm -f conftest.$ac_objext
7561if { (eval echo "$as_me:7561: \"$ac_compile\"") >&5
7562  (eval $ac_compile) 2>&5
7563  ac_status=$?
7564  echo "$as_me:7564: \$? = $ac_status" >&5
7565  (exit $ac_status); } &&
7566         { ac_try='test -s conftest.$ac_objext'
7567  { (eval echo "$as_me:7567: \"$ac_try\"") >&5
7568  (eval $ac_try) 2>&5
7569  ac_status=$?
7570  echo "$as_me:7570: \$? = $ac_status" >&5
7571  (exit $ac_status); }; }; then
7572  ac_cv_sys_largefile_source=1; break
7573else
7574  echo "$as_me: failed program was:" >&5
7575cat conftest.$ac_ext >&5
7576fi
7577rm -f conftest.$ac_objext conftest.$ac_ext
7578  break
7579done
7580fi
7581echo "$as_me:7581: result: $ac_cv_sys_largefile_source" >&5
7582echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7583if test "$ac_cv_sys_largefile_source" != no; then
7584
7585cat >>confdefs.h <<EOF
7586#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7587EOF
7588
7589fi
7590rm -f conftest*
7591
7592# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7593# in glibc 2.1.3, but that breaks too many other things.
7594# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7595echo "$as_me:7595: checking for fseeko" >&5
7596echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7597if test "${ac_cv_func_fseeko+set}" = set; then
7598  echo $ECHO_N "(cached) $ECHO_C" >&6
7599else
7600  cat >conftest.$ac_ext <<_ACEOF
7601#line 7601 "configure"
7602#include "confdefs.h"
7603#include <stdio.h>
7604int
7605main ()
7606{
7607return fseeko && fseeko (stdin, 0, 0);
7608  ;
7609  return 0;
7610}
7611_ACEOF
7612rm -f conftest.$ac_objext conftest$ac_exeext
7613if { (eval echo "$as_me:7613: \"$ac_link\"") >&5
7614  (eval $ac_link) 2>&5
7615  ac_status=$?
7616  echo "$as_me:7616: \$? = $ac_status" >&5
7617  (exit $ac_status); } &&
7618         { ac_try='test -s conftest$ac_exeext'
7619  { (eval echo "$as_me:7619: \"$ac_try\"") >&5
7620  (eval $ac_try) 2>&5
7621  ac_status=$?
7622  echo "$as_me:7622: \$? = $ac_status" >&5
7623  (exit $ac_status); }; }; then
7624  ac_cv_func_fseeko=yes
7625else
7626  echo "$as_me: failed program was:" >&5
7627cat conftest.$ac_ext >&5
7628ac_cv_func_fseeko=no
7629fi
7630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7631fi
7632echo "$as_me:7632: result: $ac_cv_func_fseeko" >&5
7633echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7634if test $ac_cv_func_fseeko = yes; then
7635
7636cat >>confdefs.h <<\EOF
7637#define HAVE_FSEEKO 1
7638EOF
7639
7640fi
7641
7642	# Normally we would collect these definitions in the config.h,
7643	# but (like _XOPEN_SOURCE), some environments rely on having these
7644	# defined before any of the system headers are included.  Another
7645	# case comes up with C++, e.g., on AIX the compiler compiles the
7646	# header files by themselves before looking at the body files it is
7647	# told to compile.  For ncurses, those header files do not include
7648	# the config.h
7649	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7650	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7651
7652	echo "$as_me:7652: checking whether to use struct dirent64" >&5
7653echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7654if test "${cf_cv_struct_dirent64+set}" = set; then
7655  echo $ECHO_N "(cached) $ECHO_C" >&6
7656else
7657
7658		cat >conftest.$ac_ext <<_ACEOF
7659#line 7659 "configure"
7660#include "confdefs.h"
7661
7662#include <sys/types.h>
7663#include <dirent.h>
7664
7665int
7666main ()
7667{
7668
7669		/* if transitional largefile support is setup, this is true */
7670		extern struct dirent64 * readdir(DIR *);
7671		struct dirent64 *x = readdir((DIR *)0);
7672		struct dirent *y = readdir((DIR *)0);
7673		int z = x - y;
7674
7675  ;
7676  return 0;
7677}
7678_ACEOF
7679rm -f conftest.$ac_objext
7680if { (eval echo "$as_me:7680: \"$ac_compile\"") >&5
7681  (eval $ac_compile) 2>&5
7682  ac_status=$?
7683  echo "$as_me:7683: \$? = $ac_status" >&5
7684  (exit $ac_status); } &&
7685         { ac_try='test -s conftest.$ac_objext'
7686  { (eval echo "$as_me:7686: \"$ac_try\"") >&5
7687  (eval $ac_try) 2>&5
7688  ac_status=$?
7689  echo "$as_me:7689: \$? = $ac_status" >&5
7690  (exit $ac_status); }; }; then
7691  cf_cv_struct_dirent64=yes
7692else
7693  echo "$as_me: failed program was:" >&5
7694cat conftest.$ac_ext >&5
7695cf_cv_struct_dirent64=no
7696fi
7697rm -f conftest.$ac_objext conftest.$ac_ext
7698
7699fi
7700echo "$as_me:7700: result: $cf_cv_struct_dirent64" >&5
7701echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7702	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7703#define HAVE_STRUCT_DIRENT64 1
7704EOF
7705
7706    fi
7707
7708###   use option --disable-tparm-varargs to make tparm() conform to X/Open
7709echo "$as_me:7709: checking if you want tparm not to use X/Open fixed-parameter list" >&5
7710echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
7711
7712# Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
7713if test "${enable_tparm_varargs+set}" = set; then
7714  enableval="$enable_tparm_varargs"
7715  with_tparm_varargs=$enableval
7716else
7717  with_tparm_varargs=yes
7718fi;
7719echo "$as_me:7719: result: $with_tparm_varargs" >&5
7720echo "${ECHO_T}$with_tparm_varargs" >&6
7721NCURSES_TPARM_VARARGS=0
7722test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
7723
7724###   use option --with-bool to override bool's type
7725echo "$as_me:7725: checking for type of bool" >&5
7726echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7727
7728# Check whether --with-bool or --without-bool was given.
7729if test "${with_bool+set}" = set; then
7730  withval="$with_bool"
7731  NCURSES_BOOL="$withval"
7732else
7733  NCURSES_BOOL=auto
7734fi;
7735echo "$as_me:7735: result: $NCURSES_BOOL" >&5
7736echo "${ECHO_T}$NCURSES_BOOL" >&6
7737
7738echo "$as_me:7738: checking for alternate terminal capabilities file" >&5
7739echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7740
7741# Check whether --with-caps or --without-caps was given.
7742if test "${with_caps+set}" = set; then
7743  withval="$with_caps"
7744  TERMINFO_CAPS=Caps.$withval
7745else
7746  TERMINFO_CAPS=Caps
7747fi;
7748test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
7749echo "$as_me:7749: result: $TERMINFO_CAPS" >&5
7750echo "${ECHO_T}$TERMINFO_CAPS" >&6
7751
7752###   use option --with-chtype to override chtype's type
7753echo "$as_me:7753: checking for type of chtype" >&5
7754echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7755
7756# Check whether --with-chtype or --without-chtype was given.
7757if test "${with_chtype+set}" = set; then
7758  withval="$with_chtype"
7759  NCURSES_CHTYPE="$withval"
7760else
7761  NCURSES_CHTYPE=auto
7762fi;
7763echo "$as_me:7763: result: $NCURSES_CHTYPE" >&5
7764echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7765
7766###   use option --with-ospeed to override ospeed's type
7767echo "$as_me:7767: checking for type of ospeed" >&5
7768echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7769
7770# Check whether --with-ospeed or --without-ospeed was given.
7771if test "${with_ospeed+set}" = set; then
7772  withval="$with_ospeed"
7773  NCURSES_OSPEED="$withval"
7774else
7775  NCURSES_OSPEED=short
7776fi;
7777echo "$as_me:7777: result: $NCURSES_OSPEED" >&5
7778echo "${ECHO_T}$NCURSES_OSPEED" >&6
7779
7780###   use option --with-mmask-t to override mmask_t's type
7781echo "$as_me:7781: checking for type of mmask_t" >&5
7782echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7783
7784# Check whether --with-mmask-t or --without-mmask-t was given.
7785if test "${with_mmask_t+set}" = set; then
7786  withval="$with_mmask_t"
7787  NCURSES_MMASK_T="$withval"
7788else
7789  NCURSES_MMASK_T=auto
7790fi;
7791echo "$as_me:7791: result: $NCURSES_MMASK_T" >&5
7792echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7793
7794### Enable compiling-in rcs id's
7795echo "$as_me:7795: checking if RCS identifiers should be compiled-in" >&5
7796echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7797
7798# Check whether --with-rcs-ids or --without-rcs-ids was given.
7799if test "${with_rcs_ids+set}" = set; then
7800  withval="$with_rcs_ids"
7801  with_rcs_ids=$withval
7802else
7803  with_rcs_ids=no
7804fi;
7805echo "$as_me:7805: result: $with_rcs_ids" >&5
7806echo "${ECHO_T}$with_rcs_ids" >&6
7807test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7808#define USE_RCS_IDS 1
7809EOF
7810
7811###############################################################################
7812
7813echo "$as_me:7813: checking format of man-pages" >&5
7814echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7815
7816# Check whether --with-manpage-format or --without-manpage-format was given.
7817if test "${with_manpage_format+set}" = set; then
7818  withval="$with_manpage_format"
7819  MANPAGE_FORMAT=$withval
7820else
7821  MANPAGE_FORMAT=unknown
7822fi;
7823
7824test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7825MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7826
7827cf_unknown=
7828
7829case $MANPAGE_FORMAT in
7830unknown)
7831  if test -z "$MANPATH" ; then
7832    MANPATH="/usr/man:/usr/share/man"
7833  fi
7834
7835  # look for the 'date' man-page (it's most likely to be installed!)
7836  MANPAGE_FORMAT=
7837  cf_preform=no
7838  cf_catonly=yes
7839  cf_example=date
7840
7841  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7842  for cf_dir in $MANPATH; do
7843    test -z "$cf_dir" && cf_dir=/usr/man
7844    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
7845    do
7846      cf_test=`echo $cf_name | sed -e 's/*//'`
7847      if test "x$cf_test" = "x$cf_name" ; then
7848
7849	case "$cf_name" in
7850	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7851	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7852	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7853	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7854	esac
7855
7856	case "$cf_name" in
7857	$cf_dir/man*)
7858	  cf_catonly=no
7859	  ;;
7860	$cf_dir/cat*)
7861	  cf_preform=yes
7862	  ;;
7863	esac
7864	break
7865      fi
7866
7867      # if we found a match in either man* or cat*, stop looking
7868      if test -n "$MANPAGE_FORMAT" ; then
7869	cf_found=no
7870	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7871	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7872	case "$cf_name" in
7873	$cf_dir/cat*)
7874	  cf_found=yes
7875	  ;;
7876	esac
7877	test $cf_found=yes && break
7878      fi
7879    done
7880    # only check the first directory in $MANPATH where we find manpages
7881    if test -n "$MANPAGE_FORMAT" ; then
7882       break
7883    fi
7884  done
7885  # if we did not find the example, just assume it is normal
7886  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7887  IFS="$ac_save_ifs"
7888  ;;
7889*)
7890  for cf_option in $MANPAGE_FORMAT; do
7891     case $cf_option in #(vi
7892     gzip|compress|BSDI|normal|formatted|catonly)
7893       ;;
7894     *)
7895       cf_unknown="$cf_unknown $cf_option"
7896       ;;
7897     esac
7898  done
7899  ;;
7900esac
7901
7902echo "$as_me:7902: result: $MANPAGE_FORMAT" >&5
7903echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7904if test -n "$cf_unknown" ; then
7905  { echo "$as_me:7905: WARNING: Unexpected manpage-format $cf_unknown" >&5
7906echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7907fi
7908
7909echo "$as_me:7909: checking for manpage renaming" >&5
7910echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7911
7912# Check whether --with-manpage-renames or --without-manpage-renames was given.
7913if test "${with_manpage_renames+set}" = set; then
7914  withval="$with_manpage_renames"
7915  MANPAGE_RENAMES=$withval
7916else
7917  MANPAGE_RENAMES=yes
7918fi;
7919
7920case ".$MANPAGE_RENAMES" in #(vi
7921.no) #(vi
7922  ;;
7923.|.yes)
7924  # Debian 'man' program?
7925  if test -f /etc/debian_version ; then
7926    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7927  else
7928    MANPAGE_RENAMES=no
7929  fi
7930  ;;
7931esac
7932
7933if test "$MANPAGE_RENAMES" != no ; then
7934  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7935    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7936  elif test ! -f $MANPAGE_RENAMES ; then
7937    { { echo "$as_me:7937: error: not a filename: $MANPAGE_RENAMES" >&5
7938echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7939   { (exit 1); exit 1; }; }
7940  fi
7941
7942  test ! -d man && mkdir man
7943
7944  # Construct a sed-script to perform renaming within man-pages
7945  if test -n "$MANPAGE_RENAMES" ; then
7946    test ! -d man && mkdir man
7947    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7948  fi
7949fi
7950
7951echo "$as_me:7951: result: $MANPAGE_RENAMES" >&5
7952echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7953
7954echo "$as_me:7954: checking if manpage aliases will be installed" >&5
7955echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7956
7957# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7958if test "${with_manpage_aliases+set}" = set; then
7959  withval="$with_manpage_aliases"
7960  MANPAGE_ALIASES=$withval
7961else
7962  MANPAGE_ALIASES=yes
7963fi;
7964
7965echo "$as_me:7965: result: $MANPAGE_ALIASES" >&5
7966echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7967
7968if test "$LN_S" = "ln -s"; then
7969	cf_use_symlinks=yes
7970else
7971	cf_use_symlinks=no
7972fi
7973
7974MANPAGE_SYMLINKS=no
7975if test "$MANPAGE_ALIASES" = yes ; then
7976echo "$as_me:7976: checking if manpage symlinks should be used" >&5
7977echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
7978
7979# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
7980if test "${with_manpage_symlinks+set}" = set; then
7981  withval="$with_manpage_symlinks"
7982  MANPAGE_SYMLINKS=$withval
7983else
7984  MANPAGE_SYMLINKS=$cf_use_symlinks
7985fi;
7986
7987if test "$$cf_use_symlinks" = no; then
7988if test "$MANPAGE_SYMLINKS" = yes ; then
7989	{ echo "$as_me:7989: WARNING: cannot make symlinks" >&5
7990echo "$as_me: WARNING: cannot make symlinks" >&2;}
7991	MANPAGE_SYMLINKS=no
7992fi
7993fi
7994
7995echo "$as_me:7995: result: $MANPAGE_SYMLINKS" >&5
7996echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
7997fi
7998
7999echo "$as_me:7999: checking for manpage tbl" >&5
8000echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8001
8002# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8003if test "${with_manpage_tbl+set}" = set; then
8004  withval="$with_manpage_tbl"
8005  MANPAGE_TBL=$withval
8006else
8007  MANPAGE_TBL=no
8008fi;
8009
8010echo "$as_me:8010: result: $MANPAGE_TBL" >&5
8011echo "${ECHO_T}$MANPAGE_TBL" >&6
8012
8013  if test "$prefix" = "NONE" ; then
8014     cf_prefix="$ac_default_prefix"
8015  else
8016     cf_prefix="$prefix"
8017  fi
8018
8019  case "$MANPAGE_FORMAT" in # (vi
8020  *catonly*) # (vi
8021    cf_format=yes
8022    cf_inboth=no
8023    ;;
8024  *formatted*) # (vi
8025    cf_format=yes
8026    cf_inboth=yes
8027    ;;
8028  *)
8029    cf_format=no
8030    cf_inboth=no
8031    ;;
8032  esac
8033
8034test ! -d man && mkdir man
8035
8036cf_so_strip=
8037cf_compress=
8038case "$MANPAGE_FORMAT" in #(vi
8039*compress*) #(vi
8040	cf_so_strip="Z"
8041	cf_compress=compress
8042  ;;
8043*gzip*) #(vi
8044	cf_so_strip="gz"
8045	cf_compress=gzip
8046  ;;
8047esac
8048
8049cf_edit_man=./edit_man.sh
8050
8051cat >$cf_edit_man <<CF_EOF
8052#! /bin/sh
8053# this script is generated by the configure-script CF_MAN_PAGES macro.
8054
8055prefix="$cf_prefix"
8056datadir="$datadir"
8057
8058NCURSES_MAJOR="$NCURSES_MAJOR"
8059NCURSES_MINOR="$NCURSES_MINOR"
8060NCURSES_PATCH="$NCURSES_PATCH"
8061
8062NCURSES_OSPEED="$NCURSES_OSPEED"
8063TERMINFO="$TERMINFO"
8064
8065MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
8066
8067INSTALL="$INSTALL"
8068INSTALL_DATA="$INSTALL_DATA"
8069
8070transform="$program_transform_name"
8071
8072TMP=\${TMPDIR-/tmp}/man\$\$
8073trap "rm -f \$TMP" 0 1 2 5 15
8074
8075form=\$1
8076shift || exit 1
8077
8078verb=\$1
8079shift || exit 1
8080
8081mandir=\$1
8082shift || exit 1
8083
8084srcdir=\$1
8085top_srcdir=\$srcdir/..
8086shift || exit 1
8087
8088if test "\$form" = normal ; then
8089	if test "$cf_format" = yes ; then
8090	if test "$cf_inboth" = no ; then
8091		sh \$0 format \$verb \$mandir \$srcdir \$*
8092		exit $?
8093	fi
8094	fi
8095	cf_subdir=\$mandir/man
8096	cf_tables=$MANPAGE_TBL
8097else
8098	cf_subdir=\$mandir/cat
8099	cf_tables=yes
8100fi
8101
8102# process the list of source-files
8103for i in \$* ; do
8104case \$i in #(vi
8105*.orig|*.rej) ;; #(vi
8106*.[0-9]*)
8107	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
8108	if test \$verb = installing ; then
8109	if test ! -d \$cf_subdir\${section} ; then
8110		\$MKDIRS \$cf_subdir\$section
8111	fi
8112	fi
8113	aliases=
8114	cf_source=\`basename \$i\`
8115	inalias=\$cf_source
8116	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
8117	if test ! -f \$inalias ; then
8118		echo .. skipped \$cf_source
8119		continue
8120	fi
8121CF_EOF
8122
8123if test "$MANPAGE_ALIASES" != no ; then
8124cat >>$cf_edit_man <<CF_EOF
8125	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias | sort -u\`
8126CF_EOF
8127fi
8128
8129if test "$MANPAGE_RENAMES" = no ; then
8130cat >>$cf_edit_man <<CF_EOF
8131	# perform program transformations for section 1 man pages
8132	if test \$section = 1 ; then
8133		cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
8134	else
8135		cf_target=\$cf_subdir\${section}/\$cf_source
8136	fi
8137CF_EOF
8138else
8139cat >>$cf_edit_man <<CF_EOF
8140	cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
8141	if test -z "\$cf_target" ; then
8142		echo '? missing rename for '\$cf_source
8143		cf_target="\$cf_source"
8144	fi
8145	cf_target="\$cf_subdir\${section}/\${cf_target}"
8146CF_EOF
8147fi
8148
8149	# replace variables in man page
8150
8151	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8152	do
8153cat >>$cf_edit_man <<CF_EOF
8154	prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
8155CF_EOF
8156	done
8157
8158cat >>$cf_edit_man <<CF_EOF
8159	sed	-e "s,@DATADIR@,\$datadir," \\
8160		-e "s,@TERMINFO@,\$TERMINFO," \\
8161		-e "s,@NCURSES_MAJOR@,\$NCURSES_MAJOR," \\
8162		-e "s,@NCURSES_MINOR@,\$NCURSES_MINOR," \\
8163		-e "s,@NCURSES_PATCH@,\$NCURSES_PATCH," \\
8164		-e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
8165CF_EOF
8166
8167	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
8168	do
8169		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8170cat >>$cf_edit_man <<CF_EOF
8171		-e "s,@$cf_NAME@,\$prog_$cf_name," \\
8172CF_EOF
8173	done
8174
8175if test -f $MANPAGE_RENAMES ; then
8176cat >>$cf_edit_man <<CF_EOF
8177		< \$i | sed -f `pwd`/edit_man.sed >\$TMP
8178CF_EOF
8179else
8180cat >>$cf_edit_man <<CF_EOF
8181		< \$i >\$TMP
8182CF_EOF
8183fi
8184
8185cat >>$cf_edit_man <<CF_EOF
8186if test \$cf_tables = yes ; then
8187	tbl \$TMP >\$TMP.out
8188	mv \$TMP.out \$TMP
8189fi
8190CF_EOF
8191
8192if test $with_curses_h != yes ; then
8193cat >>$cf_edit_man <<CF_EOF
8194	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8195	mv \$TMP.out \$TMP
8196CF_EOF
8197fi
8198
8199cat >>$cf_edit_man <<CF_EOF
8200	if test \$form = format ; then
8201		nroff -man \$TMP >\$TMP.out
8202		mv \$TMP.out \$TMP
8203	fi
8204CF_EOF
8205
8206if test -n "$cf_compress" ; then
8207cat >>$cf_edit_man <<CF_EOF
8208	if test \$verb = installing ; then
8209	if ( $cf_compress -f \$TMP )
8210	then
8211		mv \$TMP.$cf_so_strip \$TMP
8212	fi
8213	fi
8214	cf_target="\$cf_target.$cf_so_strip"
8215CF_EOF
8216fi
8217
8218case "$MANPAGE_FORMAT" in #(vi
8219*BSDI*)
8220cat >>$cf_edit_man <<CF_EOF
8221	if test \$form = format ; then
8222		# BSDI installs only .0 suffixes in the cat directories
8223		cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8224	fi
8225CF_EOF
8226  ;;
8227esac
8228
8229cat >>$cf_edit_man <<CF_EOF
8230	suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
8231	if test \$verb = installing ; then
8232		echo \$verb \$cf_target
8233		\$INSTALL_DATA \$TMP \$cf_target
8234		test -n "\$aliases" && (
8235			cd \$cf_subdir\${section} && (
8236				cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8237				test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
8238				cf_target=\`basename \$cf_target\`
8239				for cf_alias in \$aliases
8240				do
8241					if test \$section = 1 ; then
8242						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8243					fi
8244
8245					if test "$MANPAGE_SYMLINKS" = yes ; then
8246						if test -f \$cf_alias\${suffix} ; then
8247							if ( cmp -s \$cf_target \$cf_alias\${suffix} )
8248							then
8249								continue
8250							fi
8251						fi
8252						echo .. \$verb alias \$cf_alias\${suffix}
8253						rm -f \$cf_alias\${suffix}
8254						$LN_S \$cf_target \$cf_alias\${suffix}
8255					elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
8256						echo ".so \$cf_source" >\$TMP
8257CF_EOF
8258if test -n "$cf_compress" ; then
8259cat >>$cf_edit_man <<CF_EOF
8260						if test -n "$cf_so_strip" ; then
8261							$cf_compress -f \$TMP
8262							mv \$TMP.$cf_so_strip \$TMP
8263						fi
8264CF_EOF
8265fi
8266cat >>$cf_edit_man <<CF_EOF
8267						echo .. \$verb alias \$cf_alias\${suffix}
8268						rm -f \$cf_alias\${suffix}
8269						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8270					fi
8271				done
8272			)
8273		)
8274	elif test \$verb = removing ; then
8275		echo \$verb \$cf_target
8276		rm -f \$cf_target
8277		test -n "\$aliases" && (
8278			cd \$cf_subdir\${section} && (
8279				for cf_alias in \$aliases
8280				do
8281					if test \$section = 1 ; then
8282						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8283					fi
8284
8285					echo .. \$verb alias \$cf_alias\${suffix}
8286					rm -f \$cf_alias\${suffix}
8287				done
8288			)
8289		)
8290	else
8291#		echo ".hy 0"
8292		cat \$TMP
8293	fi
8294	;;
8295esac
8296done
8297
8298if test $cf_inboth = yes ; then
8299if test \$form != format ; then
8300	sh \$0 format \$verb \$mandir \$srcdir \$*
8301fi
8302fi
8303
8304exit 0
8305CF_EOF
8306chmod 755 $cf_edit_man
8307
8308###############################################################################
8309
8310### Note that some functions (such as const) are normally disabled anyway.
8311echo "$as_me:8311: checking if you want to build with function extensions" >&5
8312echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8313
8314# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8315if test "${enable_ext_funcs+set}" = set; then
8316  enableval="$enable_ext_funcs"
8317  with_ext_funcs=$enableval
8318else
8319  with_ext_funcs=yes
8320fi;
8321echo "$as_me:8321: result: $with_ext_funcs" >&5
8322echo "${ECHO_T}$with_ext_funcs" >&6
8323if test "$with_ext_funcs" = yes ; then
8324	NCURSES_EXT_FUNCS=1
8325	cat >>confdefs.h <<\EOF
8326#define HAVE_CURSES_VERSION 1
8327EOF
8328
8329	cat >>confdefs.h <<\EOF
8330#define HAVE_HAS_KEY 1
8331EOF
8332
8333	cat >>confdefs.h <<\EOF
8334#define HAVE_RESIZETERM 1
8335EOF
8336
8337	cat >>confdefs.h <<\EOF
8338#define HAVE_RESIZE_TERM 1
8339EOF
8340
8341	cat >>confdefs.h <<\EOF
8342#define HAVE_USE_DEFAULT_COLORS 1
8343EOF
8344
8345	cat >>confdefs.h <<\EOF
8346#define HAVE_WRESIZE 1
8347EOF
8348
8349	cat >>confdefs.h <<\EOF
8350#define NCURSES_EXT_FUNCS 1
8351EOF
8352
8353else
8354	NCURSES_EXT_FUNCS=0
8355fi
8356
8357###   use option --enable-const to turn on use of const beyond that in XSI.
8358echo "$as_me:8358: checking for extended use of const keyword" >&5
8359echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8360
8361# Check whether --enable-const or --disable-const was given.
8362if test "${enable_const+set}" = set; then
8363  enableval="$enable_const"
8364  with_ext_const=$enableval
8365else
8366  with_ext_const=no
8367fi;
8368echo "$as_me:8368: result: $with_ext_const" >&5
8369echo "${ECHO_T}$with_ext_const" >&6
8370NCURSES_CONST='/*nothing*/'
8371if test "$with_ext_const" = yes ; then
8372	NCURSES_CONST=const
8373fi
8374
8375echo "$as_me:8375: checking if you want \$NCURSES_NO_PADDING code" >&5
8376echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8377
8378# Check whether --enable-no-padding or --disable-no-padding was given.
8379if test "${enable_no_padding+set}" = set; then
8380  enableval="$enable_no_padding"
8381  with_no_padding=$enableval
8382else
8383  with_no_padding=$with_ext_funcs
8384fi;
8385echo "$as_me:8385: result: $with_no_padding" >&5
8386echo "${ECHO_T}$with_no_padding" >&6
8387test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8388#define NCURSES_NO_PADDING 1
8389EOF
8390
8391echo "$as_me:8391: checking for ANSI C header files" >&5
8392echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
8393if test "${ac_cv_header_stdc+set}" = set; then
8394  echo $ECHO_N "(cached) $ECHO_C" >&6
8395else
8396  cat >conftest.$ac_ext <<_ACEOF
8397#line 8397 "configure"
8398#include "confdefs.h"
8399#include <stdlib.h>
8400#include <stdarg.h>
8401#include <string.h>
8402#include <float.h>
8403
8404_ACEOF
8405if { (eval echo "$as_me:8405: \"$ac_cpp conftest.$ac_ext\"") >&5
8406  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8407  ac_status=$?
8408  egrep -v '^ *\+' conftest.er1 >conftest.err
8409  rm -f conftest.er1
8410  cat conftest.err >&5
8411  echo "$as_me:8411: \$? = $ac_status" >&5
8412  (exit $ac_status); } >/dev/null; then
8413  if test -s conftest.err; then
8414    ac_cpp_err=$ac_c_preproc_warn_flag
8415  else
8416    ac_cpp_err=
8417  fi
8418else
8419  ac_cpp_err=yes
8420fi
8421if test -z "$ac_cpp_err"; then
8422  ac_cv_header_stdc=yes
8423else
8424  echo "$as_me: failed program was:" >&5
8425  cat conftest.$ac_ext >&5
8426  ac_cv_header_stdc=no
8427fi
8428rm -f conftest.err conftest.$ac_ext
8429
8430if test $ac_cv_header_stdc = yes; then
8431  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8432  cat >conftest.$ac_ext <<_ACEOF
8433#line 8433 "configure"
8434#include "confdefs.h"
8435#include <string.h>
8436
8437_ACEOF
8438if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8439  egrep "memchr" >/dev/null 2>&1; then
8440  :
8441else
8442  ac_cv_header_stdc=no
8443fi
8444rm -f conftest*
8445
8446fi
8447
8448if test $ac_cv_header_stdc = yes; then
8449  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8450  cat >conftest.$ac_ext <<_ACEOF
8451#line 8451 "configure"
8452#include "confdefs.h"
8453#include <stdlib.h>
8454
8455_ACEOF
8456if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8457  egrep "free" >/dev/null 2>&1; then
8458  :
8459else
8460  ac_cv_header_stdc=no
8461fi
8462rm -f conftest*
8463
8464fi
8465
8466if test $ac_cv_header_stdc = yes; then
8467  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8468  if test "$cross_compiling" = yes; then
8469  :
8470else
8471  cat >conftest.$ac_ext <<_ACEOF
8472#line 8472 "configure"
8473#include "confdefs.h"
8474#include <ctype.h>
8475#if ((' ' & 0x0FF) == 0x020)
8476# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8477# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8478#else
8479# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8480                     || ('j' <= (c) && (c) <= 'r') \
8481                     || ('s' <= (c) && (c) <= 'z'))
8482# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8483#endif
8484
8485#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8486int
8487main ()
8488{
8489  int i;
8490  for (i = 0; i < 256; i++)
8491    if (XOR (islower (i), ISLOWER (i))
8492        || toupper (i) != TOUPPER (i))
8493      $ac_main_return(2);
8494  $ac_main_return (0);
8495}
8496_ACEOF
8497rm -f conftest$ac_exeext
8498if { (eval echo "$as_me:8498: \"$ac_link\"") >&5
8499  (eval $ac_link) 2>&5
8500  ac_status=$?
8501  echo "$as_me:8501: \$? = $ac_status" >&5
8502  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8503  { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504  (eval $ac_try) 2>&5
8505  ac_status=$?
8506  echo "$as_me:8506: \$? = $ac_status" >&5
8507  (exit $ac_status); }; }; then
8508  :
8509else
8510  echo "$as_me: program exited with status $ac_status" >&5
8511echo "$as_me: failed program was:" >&5
8512cat conftest.$ac_ext >&5
8513ac_cv_header_stdc=no
8514fi
8515rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8516fi
8517fi
8518fi
8519echo "$as_me:8519: result: $ac_cv_header_stdc" >&5
8520echo "${ECHO_T}$ac_cv_header_stdc" >&6
8521if test $ac_cv_header_stdc = yes; then
8522
8523cat >>confdefs.h <<\EOF
8524#define STDC_HEADERS 1
8525EOF
8526
8527fi
8528
8529# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8530
8531for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8532                  inttypes.h stdint.h unistd.h
8533do
8534as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8535echo "$as_me:8535: checking for $ac_header" >&5
8536echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8537if eval "test \"\${$as_ac_Header+set}\" = set"; then
8538  echo $ECHO_N "(cached) $ECHO_C" >&6
8539else
8540  cat >conftest.$ac_ext <<_ACEOF
8541#line 8541 "configure"
8542#include "confdefs.h"
8543$ac_includes_default
8544#include <$ac_header>
8545_ACEOF
8546rm -f conftest.$ac_objext
8547if { (eval echo "$as_me:8547: \"$ac_compile\"") >&5
8548  (eval $ac_compile) 2>&5
8549  ac_status=$?
8550  echo "$as_me:8550: \$? = $ac_status" >&5
8551  (exit $ac_status); } &&
8552         { ac_try='test -s conftest.$ac_objext'
8553  { (eval echo "$as_me:8553: \"$ac_try\"") >&5
8554  (eval $ac_try) 2>&5
8555  ac_status=$?
8556  echo "$as_me:8556: \$? = $ac_status" >&5
8557  (exit $ac_status); }; }; then
8558  eval "$as_ac_Header=yes"
8559else
8560  echo "$as_me: failed program was:" >&5
8561cat conftest.$ac_ext >&5
8562eval "$as_ac_Header=no"
8563fi
8564rm -f conftest.$ac_objext conftest.$ac_ext
8565fi
8566echo "$as_me:8566: result: `eval echo '${'$as_ac_Header'}'`" >&5
8567echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8568if test `eval echo '${'$as_ac_Header'}'` = yes; then
8569  cat >>confdefs.h <<EOF
8570#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8571EOF
8572
8573fi
8574done
8575
8576echo "$as_me:8576: checking for signed char" >&5
8577echo $ECHO_N "checking for signed char... $ECHO_C" >&6
8578if test "${ac_cv_type_signed_char+set}" = set; then
8579  echo $ECHO_N "(cached) $ECHO_C" >&6
8580else
8581  cat >conftest.$ac_ext <<_ACEOF
8582#line 8582 "configure"
8583#include "confdefs.h"
8584$ac_includes_default
8585int
8586main ()
8587{
8588if ((signed char *) 0)
8589  return 0;
8590if (sizeof (signed char))
8591  return 0;
8592  ;
8593  return 0;
8594}
8595_ACEOF
8596rm -f conftest.$ac_objext
8597if { (eval echo "$as_me:8597: \"$ac_compile\"") >&5
8598  (eval $ac_compile) 2>&5
8599  ac_status=$?
8600  echo "$as_me:8600: \$? = $ac_status" >&5
8601  (exit $ac_status); } &&
8602         { ac_try='test -s conftest.$ac_objext'
8603  { (eval echo "$as_me:8603: \"$ac_try\"") >&5
8604  (eval $ac_try) 2>&5
8605  ac_status=$?
8606  echo "$as_me:8606: \$? = $ac_status" >&5
8607  (exit $ac_status); }; }; then
8608  ac_cv_type_signed_char=yes
8609else
8610  echo "$as_me: failed program was:" >&5
8611cat conftest.$ac_ext >&5
8612ac_cv_type_signed_char=no
8613fi
8614rm -f conftest.$ac_objext conftest.$ac_ext
8615fi
8616echo "$as_me:8616: result: $ac_cv_type_signed_char" >&5
8617echo "${ECHO_T}$ac_cv_type_signed_char" >&6
8618
8619echo "$as_me:8619: checking size of signed char" >&5
8620echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
8621if test "${ac_cv_sizeof_signed_char+set}" = set; then
8622  echo $ECHO_N "(cached) $ECHO_C" >&6
8623else
8624  if test "$ac_cv_type_signed_char" = yes; then
8625  if test "$cross_compiling" = yes; then
8626  # Depending upon the size, compute the lo and hi bounds.
8627cat >conftest.$ac_ext <<_ACEOF
8628#line 8628 "configure"
8629#include "confdefs.h"
8630$ac_includes_default
8631int
8632main ()
8633{
8634int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
8635  ;
8636  return 0;
8637}
8638_ACEOF
8639rm -f conftest.$ac_objext
8640if { (eval echo "$as_me:8640: \"$ac_compile\"") >&5
8641  (eval $ac_compile) 2>&5
8642  ac_status=$?
8643  echo "$as_me:8643: \$? = $ac_status" >&5
8644  (exit $ac_status); } &&
8645         { ac_try='test -s conftest.$ac_objext'
8646  { (eval echo "$as_me:8646: \"$ac_try\"") >&5
8647  (eval $ac_try) 2>&5
8648  ac_status=$?
8649  echo "$as_me:8649: \$? = $ac_status" >&5
8650  (exit $ac_status); }; }; then
8651  ac_lo=0 ac_mid=0
8652  while :; do
8653    cat >conftest.$ac_ext <<_ACEOF
8654#line 8654 "configure"
8655#include "confdefs.h"
8656$ac_includes_default
8657int
8658main ()
8659{
8660int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8661  ;
8662  return 0;
8663}
8664_ACEOF
8665rm -f conftest.$ac_objext
8666if { (eval echo "$as_me:8666: \"$ac_compile\"") >&5
8667  (eval $ac_compile) 2>&5
8668  ac_status=$?
8669  echo "$as_me:8669: \$? = $ac_status" >&5
8670  (exit $ac_status); } &&
8671         { ac_try='test -s conftest.$ac_objext'
8672  { (eval echo "$as_me:8672: \"$ac_try\"") >&5
8673  (eval $ac_try) 2>&5
8674  ac_status=$?
8675  echo "$as_me:8675: \$? = $ac_status" >&5
8676  (exit $ac_status); }; }; then
8677  ac_hi=$ac_mid; break
8678else
8679  echo "$as_me: failed program was:" >&5
8680cat conftest.$ac_ext >&5
8681ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
8682fi
8683rm -f conftest.$ac_objext conftest.$ac_ext
8684  done
8685else
8686  echo "$as_me: failed program was:" >&5
8687cat conftest.$ac_ext >&5
8688ac_hi=-1 ac_mid=-1
8689  while :; do
8690    cat >conftest.$ac_ext <<_ACEOF
8691#line 8691 "configure"
8692#include "confdefs.h"
8693$ac_includes_default
8694int
8695main ()
8696{
8697int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
8698  ;
8699  return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
8703if { (eval echo "$as_me:8703: \"$ac_compile\"") >&5
8704  (eval $ac_compile) 2>&5
8705  ac_status=$?
8706  echo "$as_me:8706: \$? = $ac_status" >&5
8707  (exit $ac_status); } &&
8708         { ac_try='test -s conftest.$ac_objext'
8709  { (eval echo "$as_me:8709: \"$ac_try\"") >&5
8710  (eval $ac_try) 2>&5
8711  ac_status=$?
8712  echo "$as_me:8712: \$? = $ac_status" >&5
8713  (exit $ac_status); }; }; then
8714  ac_lo=$ac_mid; break
8715else
8716  echo "$as_me: failed program was:" >&5
8717cat conftest.$ac_ext >&5
8718ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
8719fi
8720rm -f conftest.$ac_objext conftest.$ac_ext
8721  done
8722fi
8723rm -f conftest.$ac_objext conftest.$ac_ext
8724# Binary search between lo and hi bounds.
8725while test "x$ac_lo" != "x$ac_hi"; do
8726  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8727  cat >conftest.$ac_ext <<_ACEOF
8728#line 8728 "configure"
8729#include "confdefs.h"
8730$ac_includes_default
8731int
8732main ()
8733{
8734int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
8735  ;
8736  return 0;
8737}
8738_ACEOF
8739rm -f conftest.$ac_objext
8740if { (eval echo "$as_me:8740: \"$ac_compile\"") >&5
8741  (eval $ac_compile) 2>&5
8742  ac_status=$?
8743  echo "$as_me:8743: \$? = $ac_status" >&5
8744  (exit $ac_status); } &&
8745         { ac_try='test -s conftest.$ac_objext'
8746  { (eval echo "$as_me:8746: \"$ac_try\"") >&5
8747  (eval $ac_try) 2>&5
8748  ac_status=$?
8749  echo "$as_me:8749: \$? = $ac_status" >&5
8750  (exit $ac_status); }; }; then
8751  ac_hi=$ac_mid
8752else
8753  echo "$as_me: failed program was:" >&5
8754cat conftest.$ac_ext >&5
8755ac_lo=`expr $ac_mid + 1`
8756fi
8757rm -f conftest.$ac_objext conftest.$ac_ext
8758done
8759ac_cv_sizeof_signed_char=$ac_lo
8760else
8761  if test "$cross_compiling" = yes; then
8762  { { echo "$as_me:8762: error: cannot run test program while cross compiling" >&5
8763echo "$as_me: error: cannot run test program while cross compiling" >&2;}
8764   { (exit 1); exit 1; }; }
8765else
8766  cat >conftest.$ac_ext <<_ACEOF
8767#line 8767 "configure"
8768#include "confdefs.h"
8769$ac_includes_default
8770int
8771main ()
8772{
8773FILE *f = fopen ("conftest.val", "w");
8774if (!f)
8775  $ac_main_return (1);
8776fprintf (f, "%d", (sizeof (signed char)));
8777fclose (f);
8778  ;
8779  return 0;
8780}
8781_ACEOF
8782rm -f conftest$ac_exeext
8783if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
8784  (eval $ac_link) 2>&5
8785  ac_status=$?
8786  echo "$as_me:8786: \$? = $ac_status" >&5
8787  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8788  { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8789  (eval $ac_try) 2>&5
8790  ac_status=$?
8791  echo "$as_me:8791: \$? = $ac_status" >&5
8792  (exit $ac_status); }; }; then
8793  ac_cv_sizeof_signed_char=`cat conftest.val`
8794else
8795  echo "$as_me: program exited with status $ac_status" >&5
8796echo "$as_me: failed program was:" >&5
8797cat conftest.$ac_ext >&5
8798fi
8799rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8800fi
8801fi
8802rm -f conftest.val
8803else
8804  ac_cv_sizeof_signed_char=0
8805fi
8806fi
8807echo "$as_me:8807: result: $ac_cv_sizeof_signed_char" >&5
8808echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
8809cat >>confdefs.h <<EOF
8810#define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
8811EOF
8812
8813if test "$ac_cv_sizeof_signed_char" = 1 ; then
8814	NCURSES_SBOOL="signed char"
8815else
8816	NCURSES_SBOOL="char"
8817fi
8818echo "$as_me:8818: checking if you want to use signed Boolean array in term.h" >&5
8819echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
8820
8821# Check whether --enable-signed-char or --disable-signed-char was given.
8822if test "${enable_signed_char+set}" = set; then
8823  enableval="$enable_signed_char"
8824  with_signed_char=$enableval
8825else
8826  with_signed_char=no
8827fi;
8828echo "$as_me:8828: result: $with_signed_char" >&5
8829echo "${ECHO_T}$with_signed_char" >&6
8830test "$with_signed_char" != yes && NCURSES_SBOOL="char"
8831
8832###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8833echo "$as_me:8833: checking if you want SIGWINCH handler" >&5
8834echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8835
8836# Check whether --enable-sigwinch or --disable-sigwinch was given.
8837if test "${enable_sigwinch+set}" = set; then
8838  enableval="$enable_sigwinch"
8839  with_sigwinch=$enableval
8840else
8841  with_sigwinch=$with_ext_funcs
8842fi;
8843echo "$as_me:8843: result: $with_sigwinch" >&5
8844echo "${ECHO_T}$with_sigwinch" >&6
8845test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8846#define USE_SIGWINCH 1
8847EOF
8848
8849###   use option --enable-tcap-names to allow user to define new capabilities
8850echo "$as_me:8850: checking if you want user-definable terminal capabilities like termcap" >&5
8851echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8852
8853# Check whether --enable-tcap-names or --disable-tcap-names was given.
8854if test "${enable_tcap_names+set}" = set; then
8855  enableval="$enable_tcap_names"
8856  with_tcap_names=$enableval
8857else
8858  with_tcap_names=$with_ext_funcs
8859fi;
8860echo "$as_me:8860: result: $with_tcap_names" >&5
8861echo "${ECHO_T}$with_tcap_names" >&6
8862NCURSES_XNAMES=0
8863test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8864
8865###############################################################################
8866# These options are relatively safe to experiment with.
8867
8868echo "$as_me:8868: checking if you want all development code" >&5
8869echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8870
8871# Check whether --with-develop or --without-develop was given.
8872if test "${with_develop+set}" = set; then
8873  withval="$with_develop"
8874  with_develop=$withval
8875else
8876  with_develop=no
8877fi;
8878echo "$as_me:8878: result: $with_develop" >&5
8879echo "${ECHO_T}$with_develop" >&6
8880
8881###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8882echo "$as_me:8882: checking if you want hard-tabs code" >&5
8883echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8884
8885# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8886if test "${enable_hard_tabs+set}" = set; then
8887  enableval="$enable_hard_tabs"
8888
8889else
8890  enable_hard_tabs=$with_develop
8891fi;
8892echo "$as_me:8892: result: $enable_hard_tabs" >&5
8893echo "${ECHO_T}$enable_hard_tabs" >&6
8894test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
8895#define USE_HARD_TABS 1
8896EOF
8897
8898###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8899echo "$as_me:8899: checking if you want limited support for xmc" >&5
8900echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8901
8902# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8903if test "${enable_xmc_glitch+set}" = set; then
8904  enableval="$enable_xmc_glitch"
8905
8906else
8907  enable_xmc_glitch=$with_develop
8908fi;
8909echo "$as_me:8909: result: $enable_xmc_glitch" >&5
8910echo "${ECHO_T}$enable_xmc_glitch" >&6
8911test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8912#define USE_XMC_SUPPORT 1
8913EOF
8914
8915###############################################################################
8916# These are just experimental, probably should not be in a package:
8917
8918echo "$as_me:8918: checking if you do not want to assume colors are white-on-black" >&5
8919echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8920
8921# Check whether --enable-assumed-color or --disable-assumed-color was given.
8922if test "${enable_assumed_color+set}" = set; then
8923  enableval="$enable_assumed_color"
8924  with_assumed_color=$enableval
8925else
8926  with_assumed_color=yes
8927fi;
8928echo "$as_me:8928: result: $with_assumed_color" >&5
8929echo "${ECHO_T}$with_assumed_color" >&6
8930test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8931#define USE_ASSUMED_COLOR 1
8932EOF
8933
8934###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8935echo "$as_me:8935: checking if you want hashmap scrolling-optimization code" >&5
8936echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8937
8938# Check whether --enable-hashmap or --disable-hashmap was given.
8939if test "${enable_hashmap+set}" = set; then
8940  enableval="$enable_hashmap"
8941  with_hashmap=$enableval
8942else
8943  with_hashmap=yes
8944fi;
8945echo "$as_me:8945: result: $with_hashmap" >&5
8946echo "${ECHO_T}$with_hashmap" >&6
8947test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8948#define USE_HASHMAP 1
8949EOF
8950
8951###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8952echo "$as_me:8952: checking if you want colorfgbg code" >&5
8953echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8954
8955# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8956if test "${enable_colorfgbg+set}" = set; then
8957  enableval="$enable_colorfgbg"
8958  with_colorfgbg=$enableval
8959else
8960  with_colorfgbg=no
8961fi;
8962echo "$as_me:8962: result: $with_colorfgbg" >&5
8963echo "${ECHO_T}$with_colorfgbg" >&6
8964test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8965#define USE_COLORFGBG 1
8966EOF
8967
8968###   use option --enable-ext-colors to turn on use of colors beyond 16.
8969echo "$as_me:8969: checking if you want to use experimental extended colors" >&5
8970echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8971
8972# Check whether --enable-ext-colors or --disable-ext-colors was given.
8973if test "${enable_ext_colors+set}" = set; then
8974  enableval="$enable_ext_colors"
8975  with_ext_colors=$enableval
8976else
8977  with_ext_colors=no
8978fi;
8979echo "$as_me:8979: result: $with_ext_colors" >&5
8980echo "${ECHO_T}$with_ext_colors" >&6
8981NCURSES_EXT_COLORS=0
8982if test "$with_ext_colors" = yes ; then
8983	if test "$with_widec" != yes ; then
8984		{ echo "$as_me:8984: WARNING: This option applies only to wide-character library" >&5
8985echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
8986	else
8987		# cannot be ABI 5 since it changes sizeof(cchar_t)
8988
8989if test "${with_abi_version+set}" != set; then
8990	case $cf_cv_rel_version in
8991	5.*)
8992		cf_cv_rel_version=6.0
8993		cf_cv_abi_version=6
8994		{ echo "$as_me:8994: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8995echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8996		;;
8997	esac
8998fi
8999
9000	fi
9001	NCURSES_EXT_COLORS=1
9002	cat >>confdefs.h <<\EOF
9003#define NCURSES_EXT_COLORS 1
9004EOF
9005
9006fi
9007
9008###   use option --enable-ext-mouse to modify coding to support 5-button mice
9009echo "$as_me:9009: checking if you want to use experimental extended mouse encoding" >&5
9010echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
9011
9012# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9013if test "${enable_ext_mouse+set}" = set; then
9014  enableval="$enable_ext_mouse"
9015  with_ext_mouse=$enableval
9016else
9017  with_ext_mouse=no
9018fi;
9019echo "$as_me:9019: result: $with_ext_mouse" >&5
9020echo "${ECHO_T}$with_ext_mouse" >&6
9021NCURSES_MOUSE_VERSION=1
9022if test "$with_ext_mouse" = yes ; then
9023	NCURSES_MOUSE_VERSION=2
9024
9025if test "${with_abi_version+set}" != set; then
9026	case $cf_cv_rel_version in
9027	5.*)
9028		cf_cv_rel_version=6.0
9029		cf_cv_abi_version=6
9030		{ echo "$as_me:9030: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9031echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9032		;;
9033	esac
9034fi
9035
9036fi
9037
9038echo "$as_me:9038: checking if you want experimental safe-sprintf code" >&5
9039echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
9040
9041# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
9042if test "${enable_safe_sprintf+set}" = set; then
9043  enableval="$enable_safe_sprintf"
9044  with_safe_sprintf=$enableval
9045else
9046  with_safe_sprintf=no
9047fi;
9048echo "$as_me:9048: result: $with_safe_sprintf" >&5
9049echo "${ECHO_T}$with_safe_sprintf" >&6
9050test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
9051#define USE_SAFE_SPRINTF 1
9052EOF
9053
9054###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
9055# when hashmap is used scroll hints are useless
9056if test "$with_hashmap" = no ; then
9057echo "$as_me:9057: checking if you want to experiment without scrolling-hints code" >&5
9058echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
9059
9060# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
9061if test "${enable_scroll_hints+set}" = set; then
9062  enableval="$enable_scroll_hints"
9063  with_scroll_hints=$enableval
9064else
9065  with_scroll_hints=yes
9066fi;
9067echo "$as_me:9067: result: $with_scroll_hints" >&5
9068echo "${ECHO_T}$with_scroll_hints" >&6
9069test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
9070#define USE_SCROLL_HINTS 1
9071EOF
9072
9073fi
9074
9075echo "$as_me:9075: checking if you want experimental wgetch-events code" >&5
9076echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
9077
9078# Check whether --enable-wgetch-events or --disable-wgetch-events was given.
9079if test "${enable_wgetch_events+set}" = set; then
9080  enableval="$enable_wgetch_events"
9081  with_wgetch_events=$enableval
9082else
9083  with_wgetch_events=no
9084fi;
9085echo "$as_me:9085: result: $with_wgetch_events" >&5
9086echo "${ECHO_T}$with_wgetch_events" >&6
9087test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
9088#define NCURSES_WGETCH_EVENTS 1
9089EOF
9090
9091###############################################################################
9092
9093###	use option --disable-echo to suppress full display compiling commands
9094echo "$as_me:9094: checking if you want to display full commands during build" >&5
9095echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
9096
9097# Check whether --enable-echo or --disable-echo was given.
9098if test "${enable_echo+set}" = set; then
9099  enableval="$enable_echo"
9100  with_echo=$enableval
9101else
9102  with_echo=yes
9103fi;
9104if test "$with_echo" = yes; then
9105	ECHO_LINK=
9106else
9107	ECHO_LINK='@ echo linking $@ ... ;'
9108	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
9109fi
9110echo "$as_me:9110: result: $with_echo" >&5
9111echo "${ECHO_T}$with_echo" >&6
9112
9113###	use option --enable-warnings to turn on all gcc warnings
9114echo "$as_me:9114: checking if you want to see compiler warnings" >&5
9115echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
9116
9117# Check whether --enable-warnings or --disable-warnings was given.
9118if test "${enable_warnings+set}" = set; then
9119  enableval="$enable_warnings"
9120  with_warnings=$enableval
9121fi;
9122echo "$as_me:9122: result: $with_warnings" >&5
9123echo "${ECHO_T}$with_warnings" >&6
9124
9125if test -n "$with_warnings"; then
9126 	ADAFLAGS="$ADAFLAGS -gnatg"
9127
9128INTEL_COMPILER=no
9129
9130if test "$GCC" = yes ; then
9131	case $host_os in
9132	linux*|gnu*)
9133		echo "$as_me:9133: checking if this is really Intel C compiler" >&5
9134echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
9135		cf_save_CFLAGS="$CFLAGS"
9136		CFLAGS="$CFLAGS -no-gcc"
9137		cat >conftest.$ac_ext <<_ACEOF
9138#line 9138 "configure"
9139#include "confdefs.h"
9140
9141int
9142main ()
9143{
9144
9145#ifdef __INTEL_COMPILER
9146#else
9147make an error
9148#endif
9149
9150  ;
9151  return 0;
9152}
9153_ACEOF
9154rm -f conftest.$ac_objext
9155if { (eval echo "$as_me:9155: \"$ac_compile\"") >&5
9156  (eval $ac_compile) 2>&5
9157  ac_status=$?
9158  echo "$as_me:9158: \$? = $ac_status" >&5
9159  (exit $ac_status); } &&
9160         { ac_try='test -s conftest.$ac_objext'
9161  { (eval echo "$as_me:9161: \"$ac_try\"") >&5
9162  (eval $ac_try) 2>&5
9163  ac_status=$?
9164  echo "$as_me:9164: \$? = $ac_status" >&5
9165  (exit $ac_status); }; }; then
9166  INTEL_COMPILER=yes
9167cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9168
9169else
9170  echo "$as_me: failed program was:" >&5
9171cat conftest.$ac_ext >&5
9172fi
9173rm -f conftest.$ac_objext conftest.$ac_ext
9174		CFLAGS="$cf_save_CFLAGS"
9175		echo "$as_me:9175: result: $INTEL_COMPILER" >&5
9176echo "${ECHO_T}$INTEL_COMPILER" >&6
9177		;;
9178	esac
9179fi
9180
9181cat > conftest.$ac_ext <<EOF
9182#line 9182 "configure"
9183int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9184EOF
9185
9186if test "$INTEL_COMPILER" = yes
9187then
9188# The "-wdXXX" options suppress warnings:
9189# remark #1419: external declaration in primary source file
9190# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9191# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9192# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9193# remark #193: zero used for undefined preprocessing identifier
9194# remark #593: variable "curs_sb_left_arrow" was set but never used
9195# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9196# remark #869: parameter "tw" was never referenced
9197# remark #981: operands are evaluated in unspecified order
9198# warning #269: invalid format string conversion
9199
9200	{ echo "$as_me:9200: checking for $CC warning options..." >&5
9201echo "$as_me: checking for $CC warning options..." >&6;}
9202	cf_save_CFLAGS="$CFLAGS"
9203	EXTRA_CFLAGS="-Wall"
9204	for cf_opt in  \
9205		wd1419 \
9206		wd1682 \
9207		wd1683 \
9208		wd1684 \
9209		wd193 \
9210		wd279 \
9211		wd593 \
9212		wd810 \
9213		wd869 \
9214		wd981
9215	do
9216		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9217		if { (eval echo "$as_me:9217: \"$ac_compile\"") >&5
9218  (eval $ac_compile) 2>&5
9219  ac_status=$?
9220  echo "$as_me:9220: \$? = $ac_status" >&5
9221  (exit $ac_status); }; then
9222			test -n "$verbose" && echo "$as_me:9222: result: ... -$cf_opt" >&5
9223echo "${ECHO_T}... -$cf_opt" >&6
9224			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9225		fi
9226	done
9227	CFLAGS="$cf_save_CFLAGS"
9228
9229elif test "$GCC" = yes
9230then
9231	{ echo "$as_me:9231: checking for $CC warning options..." >&5
9232echo "$as_me: checking for $CC warning options..." >&6;}
9233	cf_save_CFLAGS="$CFLAGS"
9234	EXTRA_CFLAGS="-W -Wall"
9235	cf_warn_CONST=""
9236	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
9237	for cf_opt in \
9238		Wbad-function-cast \
9239		Wcast-align \
9240		Wcast-qual \
9241		Winline \
9242		Wmissing-declarations \
9243		Wmissing-prototypes \
9244		Wnested-externs \
9245		Wpointer-arith \
9246		Wshadow \
9247		Wstrict-prototypes \
9248		Wundef $cf_warn_CONST
9249	do
9250		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
9251		if { (eval echo "$as_me:9251: \"$ac_compile\"") >&5
9252  (eval $ac_compile) 2>&5
9253  ac_status=$?
9254  echo "$as_me:9254: \$? = $ac_status" >&5
9255  (exit $ac_status); }; then
9256			test -n "$verbose" && echo "$as_me:9256: result: ... -$cf_opt" >&5
9257echo "${ECHO_T}... -$cf_opt" >&6
9258			case $cf_opt in #(vi
9259			Wcast-qual) #(vi
9260				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
9261				;;
9262			Winline) #(vi
9263				case $GCC_VERSION in
9264				3.3*)
9265					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
9266
9267					continue;;
9268				esac
9269				;;
9270			esac
9271			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
9272		fi
9273	done
9274	CFLAGS="$cf_save_CFLAGS"
9275fi
9276rm -f conftest*
9277
9278	if test "$cf_with_cxx" = yes ; then
9279
9280INTEL_CPLUSPLUS=no
9281
9282if test "$GCC" = yes ; then
9283	case $host_os in
9284	linux*|gnu*)
9285		echo "$as_me:9285: checking if this is really Intel C++ compiler" >&5
9286echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
9287		cf_save_CFLAGS="$CXXFLAGS"
9288		CXXFLAGS="$CXXFLAGS -no-gcc"
9289		cat >conftest.$ac_ext <<_ACEOF
9290#line 9290 "configure"
9291#include "confdefs.h"
9292
9293int
9294main ()
9295{
9296
9297#ifdef __INTEL_COMPILER
9298#else
9299make an error
9300#endif
9301
9302  ;
9303  return 0;
9304}
9305_ACEOF
9306rm -f conftest.$ac_objext
9307if { (eval echo "$as_me:9307: \"$ac_compile\"") >&5
9308  (eval $ac_compile) 2>&5
9309  ac_status=$?
9310  echo "$as_me:9310: \$? = $ac_status" >&5
9311  (exit $ac_status); } &&
9312         { ac_try='test -s conftest.$ac_objext'
9313  { (eval echo "$as_me:9313: \"$ac_try\"") >&5
9314  (eval $ac_try) 2>&5
9315  ac_status=$?
9316  echo "$as_me:9316: \$? = $ac_status" >&5
9317  (exit $ac_status); }; }; then
9318  INTEL_CPLUSPLUS=yes
9319cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
9320
9321else
9322  echo "$as_me: failed program was:" >&5
9323cat conftest.$ac_ext >&5
9324fi
9325rm -f conftest.$ac_objext conftest.$ac_ext
9326		CXXFLAGS="$cf_save_CFLAGS"
9327		echo "$as_me:9327: result: $INTEL_CPLUSPLUS" >&5
9328echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
9329		;;
9330	esac
9331fi
9332
9333ac_ext=cc
9334ac_cpp='$CXXCPP $CPPFLAGS'
9335ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9336ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9337ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
9338ac_main_return=return
9339
9340cat > conftest.$ac_ext <<EOF
9341#line 9341 "configure"
9342int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
9343EOF
9344
9345if test "$INTEL_CPLUSPLUS" = yes
9346then
9347# The "-wdXXX" options suppress warnings:
9348# remark #1419: external declaration in primary source file
9349# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9350# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
9351# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
9352# remark #193: zero used for undefined preprocessing identifier
9353# remark #593: variable "curs_sb_left_arrow" was set but never used
9354# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
9355# remark #869: parameter "tw" was never referenced
9356# remark #981: operands are evaluated in unspecified order
9357# warning #269: invalid format string conversion
9358
9359	{ echo "$as_me:9359: checking for $CC warning options..." >&5
9360echo "$as_me: checking for $CC warning options..." >&6;}
9361	cf_save_CXXFLAGS="$CXXFLAGS"
9362	EXTRA_CXXFLAGS="-Wall"
9363	for cf_opt in \
9364		wd1419 \
9365		wd1682 \
9366		wd1683 \
9367		wd1684 \
9368		wd193 \
9369		wd279 \
9370		wd593 \
9371		wd810 \
9372		wd869 \
9373		wd981
9374	do
9375		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
9376		if { (eval echo "$as_me:9376: \"$ac_compile\"") >&5
9377  (eval $ac_compile) 2>&5
9378  ac_status=$?
9379  echo "$as_me:9379: \$? = $ac_status" >&5
9380  (exit $ac_status); }; then
9381			test -n "$verbose" && echo "$as_me:9381: result: ... -$cf_opt" >&5
9382echo "${ECHO_T}... -$cf_opt" >&6
9383			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9384		fi
9385	done
9386	CXXFLAGS="$cf_save_CXXFLAGS"
9387
9388elif test "$GXX" = yes
9389then
9390	{ echo "$as_me:9390: checking for $CXX warning options..." >&5
9391echo "$as_me: checking for $CXX warning options..." >&6;}
9392	cf_save_CXXFLAGS="$CXXFLAGS"
9393	EXTRA_CXXFLAGS="-W -Wall"
9394	cf_gxx_extra_warnings=""
9395	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
9396	case "$GCC_VERSION" in
9397	[1-2].*)
9398		;;
9399	*)
9400		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
9401		;;
9402	esac
9403	for cf_opt in \
9404		Wabi \
9405		fabi-version=0 \
9406		Woverloaded-virtual \
9407		Wsign-promo \
9408		Wsynth \
9409		Wold-style-cast \
9410		Wcast-align \
9411		Wcast-qual \
9412		Wmissing-prototypes \
9413		Wpointer-arith \
9414		Wshadow \
9415		Wstrict-prototypes \
9416		Wundef $cf_gxx_extra_warnings Wno-unused
9417	do
9418		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
9419		if { (eval echo "$as_me:9419: \"$ac_compile\"") >&5
9420  (eval $ac_compile) 2>&5
9421  ac_status=$?
9422  echo "$as_me:9422: \$? = $ac_status" >&5
9423  (exit $ac_status); }; then
9424			test -n "$verbose" && echo "$as_me:9424: result: ... -$cf_opt" >&5
9425echo "${ECHO_T}... -$cf_opt" >&6
9426			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
9427		else
9428			test -n "$verbose" && echo "$as_me:9428: result: ... no -$cf_opt" >&5
9429echo "${ECHO_T}... no -$cf_opt" >&6
9430		fi
9431	done
9432	CXXFLAGS="$cf_save_CXXFLAGS"
9433fi
9434
9435rm -f conftest*
9436ac_ext=c
9437ac_cpp='$CPP $CPPFLAGS'
9438ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9439ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9440ac_compiler_gnu=$ac_cv_c_compiler_gnu
9441ac_main_return=return
9442
9443	fi
9444fi
9445
9446if test "$GCC" = yes
9447then
9448cat > conftest.i <<EOF
9449#ifndef GCC_PRINTF
9450#define GCC_PRINTF 0
9451#endif
9452#ifndef GCC_SCANF
9453#define GCC_SCANF 0
9454#endif
9455#ifndef GCC_NORETURN
9456#define GCC_NORETURN /* nothing */
9457#endif
9458#ifndef GCC_UNUSED
9459#define GCC_UNUSED /* nothing */
9460#endif
9461EOF
9462if test "$GCC" = yes
9463then
9464	{ echo "$as_me:9464: checking for $CC __attribute__ directives..." >&5
9465echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
9466cat > conftest.$ac_ext <<EOF
9467#line 9467 "configure"
9468#include "confdefs.h"
9469#include "conftest.h"
9470#include "conftest.i"
9471#if	GCC_PRINTF
9472#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
9473#else
9474#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
9475#endif
9476#if	GCC_SCANF
9477#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
9478#else
9479#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
9480#endif
9481extern void wow(char *,...) GCC_SCANFLIKE(1,2);
9482extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
9483extern void foo(void) GCC_NORETURN;
9484int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
9485EOF
9486	for cf_attribute in scanf printf unused noreturn
9487	do
9488
9489cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9490
9491		cf_directive="__attribute__(($cf_attribute))"
9492		echo "checking for $CC $cf_directive" 1>&5
9493		case $cf_attribute in
9494		scanf|printf)
9495		cat >conftest.h <<EOF
9496#define GCC_$cf_ATTRIBUTE 1
9497EOF
9498			;;
9499		*)
9500		cat >conftest.h <<EOF
9501#define GCC_$cf_ATTRIBUTE $cf_directive
9502EOF
9503			;;
9504		esac
9505		if { (eval echo "$as_me:9505: \"$ac_compile\"") >&5
9506  (eval $ac_compile) 2>&5
9507  ac_status=$?
9508  echo "$as_me:9508: \$? = $ac_status" >&5
9509  (exit $ac_status); }; then
9510			test -n "$verbose" && echo "$as_me:9510: result: ... $cf_attribute" >&5
9511echo "${ECHO_T}... $cf_attribute" >&6
9512			cat conftest.h >>confdefs.h
9513		fi
9514	done
9515else
9516	fgrep define conftest.i >>confdefs.h
9517fi
9518rm -rf conftest*
9519fi
9520
9521###	use option --enable-assertions to turn on generation of assertion code
9522echo "$as_me:9522: checking if you want to enable runtime assertions" >&5
9523echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
9524
9525# Check whether --enable-assertions or --disable-assertions was given.
9526if test "${enable_assertions+set}" = set; then
9527  enableval="$enable_assertions"
9528  with_assertions=$enableval
9529else
9530  with_assertions=no
9531fi;
9532echo "$as_me:9532: result: $with_assertions" >&5
9533echo "${ECHO_T}$with_assertions" >&6
9534if test -n "$GCC"
9535then
9536	if test "$with_assertions" = no
9537	then
9538		cat >>confdefs.h <<\EOF
9539#define NDEBUG 1
9540EOF
9541
9542		CPPFLAGS="$CPPFLAGS -DNDEBUG"
9543	else
9544		ADAFLAGS="$ADAFLAGS -gnata"
9545	fi
9546fi
9547
9548###	use option --disable-leaks to suppress "permanent" leaks, for testing
9549
9550echo "$as_me:9550: checking if you want to use dmalloc for testing" >&5
9551echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
9552
9553# Check whether --with-dmalloc or --without-dmalloc was given.
9554if test "${with_dmalloc+set}" = set; then
9555  withval="$with_dmalloc"
9556  cat >>confdefs.h <<\EOF
9557#define USE_DMALLOC 1
9558EOF
9559
9560	: ${with_cflags:=-g}
9561	: ${with_no_leaks:=yes}
9562	 with_dmalloc=yes
9563else
9564  with_dmalloc=
9565fi;
9566echo "$as_me:9566: result: ${with_dmalloc:-no}" >&5
9567echo "${ECHO_T}${with_dmalloc:-no}" >&6
9568
9569case .$with_cflags in #(vi
9570.*-g*)
9571	case .$CFLAGS in #(vi
9572	.*-g*) #(vi
9573		;;
9574	*)
9575
9576cf_fix_cppflags=no
9577cf_new_cflags=
9578cf_new_cppflags=
9579cf_new_extra_cppflags=
9580
9581for cf_add_cflags in -g
9582do
9583case $cf_fix_cppflags in
9584no)
9585	case $cf_add_cflags in #(vi
9586	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9587		case $cf_add_cflags in
9588		-D*)
9589			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9590
9591			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9592			&& test -z "${cf_tst_cflags}" \
9593			&& cf_fix_cppflags=yes
9594
9595			if test $cf_fix_cppflags = yes ; then
9596				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9597				continue
9598			elif test "${cf_tst_cflags}" = "\"'" ; then
9599				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9600				continue
9601			fi
9602			;;
9603		esac
9604		case "$CPPFLAGS" in
9605		*$cf_add_cflags) #(vi
9606			;;
9607		*) #(vi
9608			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9609			;;
9610		esac
9611		;;
9612	*)
9613		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9614		;;
9615	esac
9616	;;
9617yes)
9618	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9619
9620	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9621
9622	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9623	&& test -z "${cf_tst_cflags}" \
9624	&& cf_fix_cppflags=no
9625	;;
9626esac
9627done
9628
9629if test -n "$cf_new_cflags" ; then
9630
9631	CFLAGS="$CFLAGS $cf_new_cflags"
9632fi
9633
9634if test -n "$cf_new_cppflags" ; then
9635
9636	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9637fi
9638
9639if test -n "$cf_new_extra_cppflags" ; then
9640
9641	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9642fi
9643
9644		;;
9645	esac
9646	;;
9647esac
9648
9649if test "$with_dmalloc" = yes ; then
9650	echo "$as_me:9650: checking for dmalloc.h" >&5
9651echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
9652if test "${ac_cv_header_dmalloc_h+set}" = set; then
9653  echo $ECHO_N "(cached) $ECHO_C" >&6
9654else
9655  cat >conftest.$ac_ext <<_ACEOF
9656#line 9656 "configure"
9657#include "confdefs.h"
9658#include <dmalloc.h>
9659_ACEOF
9660if { (eval echo "$as_me:9660: \"$ac_cpp conftest.$ac_ext\"") >&5
9661  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9662  ac_status=$?
9663  egrep -v '^ *\+' conftest.er1 >conftest.err
9664  rm -f conftest.er1
9665  cat conftest.err >&5
9666  echo "$as_me:9666: \$? = $ac_status" >&5
9667  (exit $ac_status); } >/dev/null; then
9668  if test -s conftest.err; then
9669    ac_cpp_err=$ac_c_preproc_warn_flag
9670  else
9671    ac_cpp_err=
9672  fi
9673else
9674  ac_cpp_err=yes
9675fi
9676if test -z "$ac_cpp_err"; then
9677  ac_cv_header_dmalloc_h=yes
9678else
9679  echo "$as_me: failed program was:" >&5
9680  cat conftest.$ac_ext >&5
9681  ac_cv_header_dmalloc_h=no
9682fi
9683rm -f conftest.err conftest.$ac_ext
9684fi
9685echo "$as_me:9685: result: $ac_cv_header_dmalloc_h" >&5
9686echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
9687if test $ac_cv_header_dmalloc_h = yes; then
9688
9689echo "$as_me:9689: checking for dmalloc_debug in -ldmalloc" >&5
9690echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
9691if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
9692  echo $ECHO_N "(cached) $ECHO_C" >&6
9693else
9694  ac_check_lib_save_LIBS=$LIBS
9695LIBS="-ldmalloc  $LIBS"
9696cat >conftest.$ac_ext <<_ACEOF
9697#line 9697 "configure"
9698#include "confdefs.h"
9699
9700/* Override any gcc2 internal prototype to avoid an error.  */
9701#ifdef __cplusplus
9702extern "C"
9703#endif
9704/* We use char because int might match the return type of a gcc2
9705   builtin and then its argument prototype would still apply.  */
9706char dmalloc_debug ();
9707int
9708main ()
9709{
9710dmalloc_debug ();
9711  ;
9712  return 0;
9713}
9714_ACEOF
9715rm -f conftest.$ac_objext conftest$ac_exeext
9716if { (eval echo "$as_me:9716: \"$ac_link\"") >&5
9717  (eval $ac_link) 2>&5
9718  ac_status=$?
9719  echo "$as_me:9719: \$? = $ac_status" >&5
9720  (exit $ac_status); } &&
9721         { ac_try='test -s conftest$ac_exeext'
9722  { (eval echo "$as_me:9722: \"$ac_try\"") >&5
9723  (eval $ac_try) 2>&5
9724  ac_status=$?
9725  echo "$as_me:9725: \$? = $ac_status" >&5
9726  (exit $ac_status); }; }; then
9727  ac_cv_lib_dmalloc_dmalloc_debug=yes
9728else
9729  echo "$as_me: failed program was:" >&5
9730cat conftest.$ac_ext >&5
9731ac_cv_lib_dmalloc_dmalloc_debug=no
9732fi
9733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9734LIBS=$ac_check_lib_save_LIBS
9735fi
9736echo "$as_me:9736: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
9737echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
9738if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
9739  cat >>confdefs.h <<EOF
9740#define HAVE_LIBDMALLOC 1
9741EOF
9742
9743  LIBS="-ldmalloc $LIBS"
9744
9745fi
9746
9747fi
9748
9749fi
9750
9751echo "$as_me:9751: checking if you want to use dbmalloc for testing" >&5
9752echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
9753
9754# Check whether --with-dbmalloc or --without-dbmalloc was given.
9755if test "${with_dbmalloc+set}" = set; then
9756  withval="$with_dbmalloc"
9757  cat >>confdefs.h <<\EOF
9758#define USE_DBMALLOC 1
9759EOF
9760
9761	: ${with_cflags:=-g}
9762	: ${with_no_leaks:=yes}
9763	 with_dbmalloc=yes
9764else
9765  with_dbmalloc=
9766fi;
9767echo "$as_me:9767: result: ${with_dbmalloc:-no}" >&5
9768echo "${ECHO_T}${with_dbmalloc:-no}" >&6
9769
9770case .$with_cflags in #(vi
9771.*-g*)
9772	case .$CFLAGS in #(vi
9773	.*-g*) #(vi
9774		;;
9775	*)
9776
9777cf_fix_cppflags=no
9778cf_new_cflags=
9779cf_new_cppflags=
9780cf_new_extra_cppflags=
9781
9782for cf_add_cflags in -g
9783do
9784case $cf_fix_cppflags in
9785no)
9786	case $cf_add_cflags in #(vi
9787	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9788		case $cf_add_cflags in
9789		-D*)
9790			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9791
9792			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9793			&& test -z "${cf_tst_cflags}" \
9794			&& cf_fix_cppflags=yes
9795
9796			if test $cf_fix_cppflags = yes ; then
9797				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9798				continue
9799			elif test "${cf_tst_cflags}" = "\"'" ; then
9800				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9801				continue
9802			fi
9803			;;
9804		esac
9805		case "$CPPFLAGS" in
9806		*$cf_add_cflags) #(vi
9807			;;
9808		*) #(vi
9809			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9810			;;
9811		esac
9812		;;
9813	*)
9814		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9815		;;
9816	esac
9817	;;
9818yes)
9819	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9820
9821	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9822
9823	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9824	&& test -z "${cf_tst_cflags}" \
9825	&& cf_fix_cppflags=no
9826	;;
9827esac
9828done
9829
9830if test -n "$cf_new_cflags" ; then
9831
9832	CFLAGS="$CFLAGS $cf_new_cflags"
9833fi
9834
9835if test -n "$cf_new_cppflags" ; then
9836
9837	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9838fi
9839
9840if test -n "$cf_new_extra_cppflags" ; then
9841
9842	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9843fi
9844
9845		;;
9846	esac
9847	;;
9848esac
9849
9850if test "$with_dbmalloc" = yes ; then
9851	echo "$as_me:9851: checking for dbmalloc.h" >&5
9852echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
9853if test "${ac_cv_header_dbmalloc_h+set}" = set; then
9854  echo $ECHO_N "(cached) $ECHO_C" >&6
9855else
9856  cat >conftest.$ac_ext <<_ACEOF
9857#line 9857 "configure"
9858#include "confdefs.h"
9859#include <dbmalloc.h>
9860_ACEOF
9861if { (eval echo "$as_me:9861: \"$ac_cpp conftest.$ac_ext\"") >&5
9862  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9863  ac_status=$?
9864  egrep -v '^ *\+' conftest.er1 >conftest.err
9865  rm -f conftest.er1
9866  cat conftest.err >&5
9867  echo "$as_me:9867: \$? = $ac_status" >&5
9868  (exit $ac_status); } >/dev/null; then
9869  if test -s conftest.err; then
9870    ac_cpp_err=$ac_c_preproc_warn_flag
9871  else
9872    ac_cpp_err=
9873  fi
9874else
9875  ac_cpp_err=yes
9876fi
9877if test -z "$ac_cpp_err"; then
9878  ac_cv_header_dbmalloc_h=yes
9879else
9880  echo "$as_me: failed program was:" >&5
9881  cat conftest.$ac_ext >&5
9882  ac_cv_header_dbmalloc_h=no
9883fi
9884rm -f conftest.err conftest.$ac_ext
9885fi
9886echo "$as_me:9886: result: $ac_cv_header_dbmalloc_h" >&5
9887echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
9888if test $ac_cv_header_dbmalloc_h = yes; then
9889
9890echo "$as_me:9890: checking for debug_malloc in -ldbmalloc" >&5
9891echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
9892if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
9893  echo $ECHO_N "(cached) $ECHO_C" >&6
9894else
9895  ac_check_lib_save_LIBS=$LIBS
9896LIBS="-ldbmalloc  $LIBS"
9897cat >conftest.$ac_ext <<_ACEOF
9898#line 9898 "configure"
9899#include "confdefs.h"
9900
9901/* Override any gcc2 internal prototype to avoid an error.  */
9902#ifdef __cplusplus
9903extern "C"
9904#endif
9905/* We use char because int might match the return type of a gcc2
9906   builtin and then its argument prototype would still apply.  */
9907char debug_malloc ();
9908int
9909main ()
9910{
9911debug_malloc ();
9912  ;
9913  return 0;
9914}
9915_ACEOF
9916rm -f conftest.$ac_objext conftest$ac_exeext
9917if { (eval echo "$as_me:9917: \"$ac_link\"") >&5
9918  (eval $ac_link) 2>&5
9919  ac_status=$?
9920  echo "$as_me:9920: \$? = $ac_status" >&5
9921  (exit $ac_status); } &&
9922         { ac_try='test -s conftest$ac_exeext'
9923  { (eval echo "$as_me:9923: \"$ac_try\"") >&5
9924  (eval $ac_try) 2>&5
9925  ac_status=$?
9926  echo "$as_me:9926: \$? = $ac_status" >&5
9927  (exit $ac_status); }; }; then
9928  ac_cv_lib_dbmalloc_debug_malloc=yes
9929else
9930  echo "$as_me: failed program was:" >&5
9931cat conftest.$ac_ext >&5
9932ac_cv_lib_dbmalloc_debug_malloc=no
9933fi
9934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9935LIBS=$ac_check_lib_save_LIBS
9936fi
9937echo "$as_me:9937: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
9938echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
9939if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
9940  cat >>confdefs.h <<EOF
9941#define HAVE_LIBDBMALLOC 1
9942EOF
9943
9944  LIBS="-ldbmalloc $LIBS"
9945
9946fi
9947
9948fi
9949
9950fi
9951
9952echo "$as_me:9952: checking if you want to use valgrind for testing" >&5
9953echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
9954
9955# Check whether --with-valgrind or --without-valgrind was given.
9956if test "${with_valgrind+set}" = set; then
9957  withval="$with_valgrind"
9958  cat >>confdefs.h <<\EOF
9959#define USE_VALGRIND 1
9960EOF
9961
9962	: ${with_cflags:=-g}
9963	: ${with_no_leaks:=yes}
9964	 with_valgrind=yes
9965else
9966  with_valgrind=
9967fi;
9968echo "$as_me:9968: result: ${with_valgrind:-no}" >&5
9969echo "${ECHO_T}${with_valgrind:-no}" >&6
9970
9971case .$with_cflags in #(vi
9972.*-g*)
9973	case .$CFLAGS in #(vi
9974	.*-g*) #(vi
9975		;;
9976	*)
9977
9978cf_fix_cppflags=no
9979cf_new_cflags=
9980cf_new_cppflags=
9981cf_new_extra_cppflags=
9982
9983for cf_add_cflags in -g
9984do
9985case $cf_fix_cppflags in
9986no)
9987	case $cf_add_cflags in #(vi
9988	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
9989		case $cf_add_cflags in
9990		-D*)
9991			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9992
9993			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9994			&& test -z "${cf_tst_cflags}" \
9995			&& cf_fix_cppflags=yes
9996
9997			if test $cf_fix_cppflags = yes ; then
9998				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9999				continue
10000			elif test "${cf_tst_cflags}" = "\"'" ; then
10001				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10002				continue
10003			fi
10004			;;
10005		esac
10006		case "$CPPFLAGS" in
10007		*$cf_add_cflags) #(vi
10008			;;
10009		*) #(vi
10010			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10011			;;
10012		esac
10013		;;
10014	*)
10015		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10016		;;
10017	esac
10018	;;
10019yes)
10020	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10021
10022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10023
10024	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10025	&& test -z "${cf_tst_cflags}" \
10026	&& cf_fix_cppflags=no
10027	;;
10028esac
10029done
10030
10031if test -n "$cf_new_cflags" ; then
10032
10033	CFLAGS="$CFLAGS $cf_new_cflags"
10034fi
10035
10036if test -n "$cf_new_cppflags" ; then
10037
10038	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10039fi
10040
10041if test -n "$cf_new_extra_cppflags" ; then
10042
10043	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10044fi
10045
10046		;;
10047	esac
10048	;;
10049esac
10050
10051echo "$as_me:10051: checking if you want to perform memory-leak testing" >&5
10052echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
10053
10054# Check whether --enable-leaks or --disable-leaks was given.
10055if test "${enable_leaks+set}" = set; then
10056  enableval="$enable_leaks"
10057  with_no_leaks=yes
10058else
10059  : ${with_no_leaks:=no}
10060fi;
10061echo "$as_me:10061: result: $with_no_leaks" >&5
10062echo "${ECHO_T}$with_no_leaks" >&6
10063
10064if test "$with_no_leaks" = yes ; then
10065	cat >>confdefs.h <<\EOF
10066#define NO_LEAKS 1
10067EOF
10068
10069fi
10070
10071cat >>confdefs.h <<\EOF
10072#define HAVE_NC_ALLOC_H 1
10073EOF
10074
10075###	use option --enable-expanded to generate certain macros as functions
10076
10077# Check whether --enable-expanded or --disable-expanded was given.
10078if test "${enable_expanded+set}" = set; then
10079  enableval="$enable_expanded"
10080  test "$enableval" = yes && cat >>confdefs.h <<\EOF
10081#define NCURSES_EXPANDED 1
10082EOF
10083
10084fi;
10085
10086###	use option --disable-macros to suppress macros in favor of functions
10087
10088# Check whether --enable-macros or --disable-macros was given.
10089if test "${enable_macros+set}" = set; then
10090  enableval="$enable_macros"
10091  test "$enableval" = no && cat >>confdefs.h <<\EOF
10092#define NCURSES_NOMACROS 1
10093EOF
10094
10095fi;
10096
10097# Normally we only add trace() to the debug-library.  Allow this to be
10098# extended to all models of the ncurses library:
10099cf_all_traces=no
10100case "$CFLAGS $CPPFLAGS" in
10101*-DTRACE*)
10102	cf_all_traces=yes
10103	;;
10104esac
10105
10106echo "$as_me:10106: checking whether to add trace feature to all models" >&5
10107echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
10108
10109# Check whether --with-trace or --without-trace was given.
10110if test "${with_trace+set}" = set; then
10111  withval="$with_trace"
10112  cf_with_trace=$withval
10113else
10114  cf_with_trace=$cf_all_traces
10115fi;
10116echo "$as_me:10116: result: $cf_with_trace" >&5
10117echo "${ECHO_T}$cf_with_trace" >&6
10118
10119if test "$cf_with_trace" = yes ; then
10120	LIB_TRACING=all
10121	ADA_TRACE=TRUE
10122
10123cf_fix_cppflags=no
10124cf_new_cflags=
10125cf_new_cppflags=
10126cf_new_extra_cppflags=
10127
10128for cf_add_cflags in -DTRACE
10129do
10130case $cf_fix_cppflags in
10131no)
10132	case $cf_add_cflags in #(vi
10133	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10134		case $cf_add_cflags in
10135		-D*)
10136			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10137
10138			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10139			&& test -z "${cf_tst_cflags}" \
10140			&& cf_fix_cppflags=yes
10141
10142			if test $cf_fix_cppflags = yes ; then
10143				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10144				continue
10145			elif test "${cf_tst_cflags}" = "\"'" ; then
10146				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10147				continue
10148			fi
10149			;;
10150		esac
10151		case "$CPPFLAGS" in
10152		*$cf_add_cflags) #(vi
10153			;;
10154		*) #(vi
10155			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10156			;;
10157		esac
10158		;;
10159	*)
10160		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10161		;;
10162	esac
10163	;;
10164yes)
10165	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10166
10167	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10168
10169	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10170	&& test -z "${cf_tst_cflags}" \
10171	&& cf_fix_cppflags=no
10172	;;
10173esac
10174done
10175
10176if test -n "$cf_new_cflags" ; then
10177
10178	CFLAGS="$CFLAGS $cf_new_cflags"
10179fi
10180
10181if test -n "$cf_new_cppflags" ; then
10182
10183	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10184fi
10185
10186if test -n "$cf_new_extra_cppflags" ; then
10187
10188	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10189fi
10190
10191else
10192	LIB_TRACING=DEBUG
10193	ADA_TRACE=FALSE
10194fi
10195
10196###	Checks for libraries.
10197echo "$as_me:10197: checking for gettimeofday" >&5
10198echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
10199if test "${ac_cv_func_gettimeofday+set}" = set; then
10200  echo $ECHO_N "(cached) $ECHO_C" >&6
10201else
10202  cat >conftest.$ac_ext <<_ACEOF
10203#line 10203 "configure"
10204#include "confdefs.h"
10205/* System header to define __stub macros and hopefully few prototypes,
10206    which can conflict with char gettimeofday (); below.  */
10207#include <assert.h>
10208/* Override any gcc2 internal prototype to avoid an error.  */
10209#ifdef __cplusplus
10210extern "C"
10211#endif
10212/* We use char because int might match the return type of a gcc2
10213   builtin and then its argument prototype would still apply.  */
10214char gettimeofday ();
10215char (*f) ();
10216
10217int
10218main ()
10219{
10220/* The GNU C library defines this for functions which it implements
10221    to always fail with ENOSYS.  Some functions are actually named
10222    something starting with __ and the normal name is an alias.  */
10223#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
10224choke me
10225#else
10226f = gettimeofday;
10227#endif
10228
10229  ;
10230  return 0;
10231}
10232_ACEOF
10233rm -f conftest.$ac_objext conftest$ac_exeext
10234if { (eval echo "$as_me:10234: \"$ac_link\"") >&5
10235  (eval $ac_link) 2>&5
10236  ac_status=$?
10237  echo "$as_me:10237: \$? = $ac_status" >&5
10238  (exit $ac_status); } &&
10239         { ac_try='test -s conftest$ac_exeext'
10240  { (eval echo "$as_me:10240: \"$ac_try\"") >&5
10241  (eval $ac_try) 2>&5
10242  ac_status=$?
10243  echo "$as_me:10243: \$? = $ac_status" >&5
10244  (exit $ac_status); }; }; then
10245  ac_cv_func_gettimeofday=yes
10246else
10247  echo "$as_me: failed program was:" >&5
10248cat conftest.$ac_ext >&5
10249ac_cv_func_gettimeofday=no
10250fi
10251rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10252fi
10253echo "$as_me:10253: result: $ac_cv_func_gettimeofday" >&5
10254echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
10255if test $ac_cv_func_gettimeofday = yes; then
10256  cat >>confdefs.h <<\EOF
10257#define HAVE_GETTIMEOFDAY 1
10258EOF
10259
10260else
10261
10262echo "$as_me:10262: checking for gettimeofday in -lbsd" >&5
10263echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
10264if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
10265  echo $ECHO_N "(cached) $ECHO_C" >&6
10266else
10267  ac_check_lib_save_LIBS=$LIBS
10268LIBS="-lbsd  $LIBS"
10269cat >conftest.$ac_ext <<_ACEOF
10270#line 10270 "configure"
10271#include "confdefs.h"
10272
10273/* Override any gcc2 internal prototype to avoid an error.  */
10274#ifdef __cplusplus
10275extern "C"
10276#endif
10277/* We use char because int might match the return type of a gcc2
10278   builtin and then its argument prototype would still apply.  */
10279char gettimeofday ();
10280int
10281main ()
10282{
10283gettimeofday ();
10284  ;
10285  return 0;
10286}
10287_ACEOF
10288rm -f conftest.$ac_objext conftest$ac_exeext
10289if { (eval echo "$as_me:10289: \"$ac_link\"") >&5
10290  (eval $ac_link) 2>&5
10291  ac_status=$?
10292  echo "$as_me:10292: \$? = $ac_status" >&5
10293  (exit $ac_status); } &&
10294         { ac_try='test -s conftest$ac_exeext'
10295  { (eval echo "$as_me:10295: \"$ac_try\"") >&5
10296  (eval $ac_try) 2>&5
10297  ac_status=$?
10298  echo "$as_me:10298: \$? = $ac_status" >&5
10299  (exit $ac_status); }; }; then
10300  ac_cv_lib_bsd_gettimeofday=yes
10301else
10302  echo "$as_me: failed program was:" >&5
10303cat conftest.$ac_ext >&5
10304ac_cv_lib_bsd_gettimeofday=no
10305fi
10306rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10307LIBS=$ac_check_lib_save_LIBS
10308fi
10309echo "$as_me:10309: result: $ac_cv_lib_bsd_gettimeofday" >&5
10310echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
10311if test $ac_cv_lib_bsd_gettimeofday = yes; then
10312  cat >>confdefs.h <<\EOF
10313#define HAVE_GETTIMEOFDAY 1
10314EOF
10315
10316	LIBS="$LIBS -lbsd"
10317fi
10318
10319fi
10320
10321echo "$as_me:10321: checking if -lm needed for math functions" >&5
10322echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
10323if test "${cf_cv_need_libm+set}" = set; then
10324  echo $ECHO_N "(cached) $ECHO_C" >&6
10325else
10326
10327	cat >conftest.$ac_ext <<_ACEOF
10328#line 10328 "configure"
10329#include "confdefs.h"
10330
10331	#include <stdio.h>
10332	#include <math.h>
10333
10334int
10335main ()
10336{
10337double x = rand(); printf("result = %g\n", sin(x))
10338  ;
10339  return 0;
10340}
10341_ACEOF
10342rm -f conftest.$ac_objext conftest$ac_exeext
10343if { (eval echo "$as_me:10343: \"$ac_link\"") >&5
10344  (eval $ac_link) 2>&5
10345  ac_status=$?
10346  echo "$as_me:10346: \$? = $ac_status" >&5
10347  (exit $ac_status); } &&
10348         { ac_try='test -s conftest$ac_exeext'
10349  { (eval echo "$as_me:10349: \"$ac_try\"") >&5
10350  (eval $ac_try) 2>&5
10351  ac_status=$?
10352  echo "$as_me:10352: \$? = $ac_status" >&5
10353  (exit $ac_status); }; }; then
10354  cf_cv_need_libm=no
10355else
10356  echo "$as_me: failed program was:" >&5
10357cat conftest.$ac_ext >&5
10358cf_cv_need_libm=yes
10359fi
10360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10361fi
10362echo "$as_me:10362: result: $cf_cv_need_libm" >&5
10363echo "${ECHO_T}$cf_cv_need_libm" >&6
10364if test "$cf_cv_need_libm" = yes
10365then
10366MATH_LIB=-lm
10367fi
10368
10369###	Checks for header files.
10370echo "$as_me:10370: checking for ANSI C header files" >&5
10371echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10372if test "${ac_cv_header_stdc+set}" = set; then
10373  echo $ECHO_N "(cached) $ECHO_C" >&6
10374else
10375  cat >conftest.$ac_ext <<_ACEOF
10376#line 10376 "configure"
10377#include "confdefs.h"
10378#include <stdlib.h>
10379#include <stdarg.h>
10380#include <string.h>
10381#include <float.h>
10382
10383_ACEOF
10384if { (eval echo "$as_me:10384: \"$ac_cpp conftest.$ac_ext\"") >&5
10385  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10386  ac_status=$?
10387  egrep -v '^ *\+' conftest.er1 >conftest.err
10388  rm -f conftest.er1
10389  cat conftest.err >&5
10390  echo "$as_me:10390: \$? = $ac_status" >&5
10391  (exit $ac_status); } >/dev/null; then
10392  if test -s conftest.err; then
10393    ac_cpp_err=$ac_c_preproc_warn_flag
10394  else
10395    ac_cpp_err=
10396  fi
10397else
10398  ac_cpp_err=yes
10399fi
10400if test -z "$ac_cpp_err"; then
10401  ac_cv_header_stdc=yes
10402else
10403  echo "$as_me: failed program was:" >&5
10404  cat conftest.$ac_ext >&5
10405  ac_cv_header_stdc=no
10406fi
10407rm -f conftest.err conftest.$ac_ext
10408
10409if test $ac_cv_header_stdc = yes; then
10410  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10411  cat >conftest.$ac_ext <<_ACEOF
10412#line 10412 "configure"
10413#include "confdefs.h"
10414#include <string.h>
10415
10416_ACEOF
10417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10418  egrep "memchr" >/dev/null 2>&1; then
10419  :
10420else
10421  ac_cv_header_stdc=no
10422fi
10423rm -f conftest*
10424
10425fi
10426
10427if test $ac_cv_header_stdc = yes; then
10428  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10429  cat >conftest.$ac_ext <<_ACEOF
10430#line 10430 "configure"
10431#include "confdefs.h"
10432#include <stdlib.h>
10433
10434_ACEOF
10435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10436  egrep "free" >/dev/null 2>&1; then
10437  :
10438else
10439  ac_cv_header_stdc=no
10440fi
10441rm -f conftest*
10442
10443fi
10444
10445if test $ac_cv_header_stdc = yes; then
10446  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10447  if test "$cross_compiling" = yes; then
10448  :
10449else
10450  cat >conftest.$ac_ext <<_ACEOF
10451#line 10451 "configure"
10452#include "confdefs.h"
10453#include <ctype.h>
10454#if ((' ' & 0x0FF) == 0x020)
10455# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10456# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10457#else
10458# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10459                     || ('j' <= (c) && (c) <= 'r') \
10460                     || ('s' <= (c) && (c) <= 'z'))
10461# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10462#endif
10463
10464#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10465int
10466main ()
10467{
10468  int i;
10469  for (i = 0; i < 256; i++)
10470    if (XOR (islower (i), ISLOWER (i))
10471        || toupper (i) != TOUPPER (i))
10472      $ac_main_return(2);
10473  $ac_main_return (0);
10474}
10475_ACEOF
10476rm -f conftest$ac_exeext
10477if { (eval echo "$as_me:10477: \"$ac_link\"") >&5
10478  (eval $ac_link) 2>&5
10479  ac_status=$?
10480  echo "$as_me:10480: \$? = $ac_status" >&5
10481  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10482  { (eval echo "$as_me:10482: \"$ac_try\"") >&5
10483  (eval $ac_try) 2>&5
10484  ac_status=$?
10485  echo "$as_me:10485: \$? = $ac_status" >&5
10486  (exit $ac_status); }; }; then
10487  :
10488else
10489  echo "$as_me: program exited with status $ac_status" >&5
10490echo "$as_me: failed program was:" >&5
10491cat conftest.$ac_ext >&5
10492ac_cv_header_stdc=no
10493fi
10494rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10495fi
10496fi
10497fi
10498echo "$as_me:10498: result: $ac_cv_header_stdc" >&5
10499echo "${ECHO_T}$ac_cv_header_stdc" >&6
10500if test $ac_cv_header_stdc = yes; then
10501
10502cat >>confdefs.h <<\EOF
10503#define STDC_HEADERS 1
10504EOF
10505
10506fi
10507
10508ac_header_dirent=no
10509for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
10510  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
10511echo "$as_me:10511: checking for $ac_hdr that defines DIR" >&5
10512echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
10513if eval "test \"\${$as_ac_Header+set}\" = set"; then
10514  echo $ECHO_N "(cached) $ECHO_C" >&6
10515else
10516  cat >conftest.$ac_ext <<_ACEOF
10517#line 10517 "configure"
10518#include "confdefs.h"
10519#include <sys/types.h>
10520#include <$ac_hdr>
10521
10522int
10523main ()
10524{
10525if ((DIR *) 0)
10526return 0;
10527  ;
10528  return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext
10532if { (eval echo "$as_me:10532: \"$ac_compile\"") >&5
10533  (eval $ac_compile) 2>&5
10534  ac_status=$?
10535  echo "$as_me:10535: \$? = $ac_status" >&5
10536  (exit $ac_status); } &&
10537         { ac_try='test -s conftest.$ac_objext'
10538  { (eval echo "$as_me:10538: \"$ac_try\"") >&5
10539  (eval $ac_try) 2>&5
10540  ac_status=$?
10541  echo "$as_me:10541: \$? = $ac_status" >&5
10542  (exit $ac_status); }; }; then
10543  eval "$as_ac_Header=yes"
10544else
10545  echo "$as_me: failed program was:" >&5
10546cat conftest.$ac_ext >&5
10547eval "$as_ac_Header=no"
10548fi
10549rm -f conftest.$ac_objext conftest.$ac_ext
10550fi
10551echo "$as_me:10551: result: `eval echo '${'$as_ac_Header'}'`" >&5
10552echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10553if test `eval echo '${'$as_ac_Header'}'` = yes; then
10554  cat >>confdefs.h <<EOF
10555#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
10556EOF
10557
10558ac_header_dirent=$ac_hdr; break
10559fi
10560
10561done
10562# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
10563if test $ac_header_dirent = dirent.h; then
10564  echo "$as_me:10564: checking for opendir in -ldir" >&5
10565echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
10566if test "${ac_cv_lib_dir_opendir+set}" = set; then
10567  echo $ECHO_N "(cached) $ECHO_C" >&6
10568else
10569  ac_check_lib_save_LIBS=$LIBS
10570LIBS="-ldir  $LIBS"
10571cat >conftest.$ac_ext <<_ACEOF
10572#line 10572 "configure"
10573#include "confdefs.h"
10574
10575/* Override any gcc2 internal prototype to avoid an error.  */
10576#ifdef __cplusplus
10577extern "C"
10578#endif
10579/* We use char because int might match the return type of a gcc2
10580   builtin and then its argument prototype would still apply.  */
10581char opendir ();
10582int
10583main ()
10584{
10585opendir ();
10586  ;
10587  return 0;
10588}
10589_ACEOF
10590rm -f conftest.$ac_objext conftest$ac_exeext
10591if { (eval echo "$as_me:10591: \"$ac_link\"") >&5
10592  (eval $ac_link) 2>&5
10593  ac_status=$?
10594  echo "$as_me:10594: \$? = $ac_status" >&5
10595  (exit $ac_status); } &&
10596         { ac_try='test -s conftest$ac_exeext'
10597  { (eval echo "$as_me:10597: \"$ac_try\"") >&5
10598  (eval $ac_try) 2>&5
10599  ac_status=$?
10600  echo "$as_me:10600: \$? = $ac_status" >&5
10601  (exit $ac_status); }; }; then
10602  ac_cv_lib_dir_opendir=yes
10603else
10604  echo "$as_me: failed program was:" >&5
10605cat conftest.$ac_ext >&5
10606ac_cv_lib_dir_opendir=no
10607fi
10608rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10609LIBS=$ac_check_lib_save_LIBS
10610fi
10611echo "$as_me:10611: result: $ac_cv_lib_dir_opendir" >&5
10612echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
10613if test $ac_cv_lib_dir_opendir = yes; then
10614  LIBS="$LIBS -ldir"
10615fi
10616
10617else
10618  echo "$as_me:10618: checking for opendir in -lx" >&5
10619echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
10620if test "${ac_cv_lib_x_opendir+set}" = set; then
10621  echo $ECHO_N "(cached) $ECHO_C" >&6
10622else
10623  ac_check_lib_save_LIBS=$LIBS
10624LIBS="-lx  $LIBS"
10625cat >conftest.$ac_ext <<_ACEOF
10626#line 10626 "configure"
10627#include "confdefs.h"
10628
10629/* Override any gcc2 internal prototype to avoid an error.  */
10630#ifdef __cplusplus
10631extern "C"
10632#endif
10633/* We use char because int might match the return type of a gcc2
10634   builtin and then its argument prototype would still apply.  */
10635char opendir ();
10636int
10637main ()
10638{
10639opendir ();
10640  ;
10641  return 0;
10642}
10643_ACEOF
10644rm -f conftest.$ac_objext conftest$ac_exeext
10645if { (eval echo "$as_me:10645: \"$ac_link\"") >&5
10646  (eval $ac_link) 2>&5
10647  ac_status=$?
10648  echo "$as_me:10648: \$? = $ac_status" >&5
10649  (exit $ac_status); } &&
10650         { ac_try='test -s conftest$ac_exeext'
10651  { (eval echo "$as_me:10651: \"$ac_try\"") >&5
10652  (eval $ac_try) 2>&5
10653  ac_status=$?
10654  echo "$as_me:10654: \$? = $ac_status" >&5
10655  (exit $ac_status); }; }; then
10656  ac_cv_lib_x_opendir=yes
10657else
10658  echo "$as_me: failed program was:" >&5
10659cat conftest.$ac_ext >&5
10660ac_cv_lib_x_opendir=no
10661fi
10662rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10663LIBS=$ac_check_lib_save_LIBS
10664fi
10665echo "$as_me:10665: result: $ac_cv_lib_x_opendir" >&5
10666echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
10667if test $ac_cv_lib_x_opendir = yes; then
10668  LIBS="$LIBS -lx"
10669fi
10670
10671fi
10672
10673echo "$as_me:10673: checking whether time.h and sys/time.h may both be included" >&5
10674echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
10675if test "${ac_cv_header_time+set}" = set; then
10676  echo $ECHO_N "(cached) $ECHO_C" >&6
10677else
10678  cat >conftest.$ac_ext <<_ACEOF
10679#line 10679 "configure"
10680#include "confdefs.h"
10681#include <sys/types.h>
10682#include <sys/time.h>
10683#include <time.h>
10684
10685int
10686main ()
10687{
10688if ((struct tm *) 0)
10689return 0;
10690  ;
10691  return 0;
10692}
10693_ACEOF
10694rm -f conftest.$ac_objext
10695if { (eval echo "$as_me:10695: \"$ac_compile\"") >&5
10696  (eval $ac_compile) 2>&5
10697  ac_status=$?
10698  echo "$as_me:10698: \$? = $ac_status" >&5
10699  (exit $ac_status); } &&
10700         { ac_try='test -s conftest.$ac_objext'
10701  { (eval echo "$as_me:10701: \"$ac_try\"") >&5
10702  (eval $ac_try) 2>&5
10703  ac_status=$?
10704  echo "$as_me:10704: \$? = $ac_status" >&5
10705  (exit $ac_status); }; }; then
10706  ac_cv_header_time=yes
10707else
10708  echo "$as_me: failed program was:" >&5
10709cat conftest.$ac_ext >&5
10710ac_cv_header_time=no
10711fi
10712rm -f conftest.$ac_objext conftest.$ac_ext
10713fi
10714echo "$as_me:10714: result: $ac_cv_header_time" >&5
10715echo "${ECHO_T}$ac_cv_header_time" >&6
10716if test $ac_cv_header_time = yes; then
10717
10718cat >>confdefs.h <<\EOF
10719#define TIME_WITH_SYS_TIME 1
10720EOF
10721
10722fi
10723
10724echo "$as_me:10724: checking for regular-expression headers" >&5
10725echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
10726if test "${cf_cv_regex+set}" = set; then
10727  echo $ECHO_N "(cached) $ECHO_C" >&6
10728else
10729
10730cat >conftest.$ac_ext <<_ACEOF
10731#line 10731 "configure"
10732#include "confdefs.h"
10733#include <sys/types.h>
10734#include <regex.h>
10735int
10736main ()
10737{
10738
10739	regex_t *p;
10740	int x = regcomp(p, "", 0);
10741	int y = regexec(p, "", 0, 0, 0);
10742	regfree(p);
10743
10744  ;
10745  return 0;
10746}
10747_ACEOF
10748rm -f conftest.$ac_objext conftest$ac_exeext
10749if { (eval echo "$as_me:10749: \"$ac_link\"") >&5
10750  (eval $ac_link) 2>&5
10751  ac_status=$?
10752  echo "$as_me:10752: \$? = $ac_status" >&5
10753  (exit $ac_status); } &&
10754         { ac_try='test -s conftest$ac_exeext'
10755  { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756  (eval $ac_try) 2>&5
10757  ac_status=$?
10758  echo "$as_me:10758: \$? = $ac_status" >&5
10759  (exit $ac_status); }; }; then
10760  cf_cv_regex="regex.h"
10761else
10762  echo "$as_me: failed program was:" >&5
10763cat conftest.$ac_ext >&5
10764
10765	cat >conftest.$ac_ext <<_ACEOF
10766#line 10766 "configure"
10767#include "confdefs.h"
10768#include <regexp.h>
10769int
10770main ()
10771{
10772
10773		char *p = compile("", "", "", 0);
10774		int x = step("", "");
10775
10776  ;
10777  return 0;
10778}
10779_ACEOF
10780rm -f conftest.$ac_objext conftest$ac_exeext
10781if { (eval echo "$as_me:10781: \"$ac_link\"") >&5
10782  (eval $ac_link) 2>&5
10783  ac_status=$?
10784  echo "$as_me:10784: \$? = $ac_status" >&5
10785  (exit $ac_status); } &&
10786         { ac_try='test -s conftest$ac_exeext'
10787  { (eval echo "$as_me:10787: \"$ac_try\"") >&5
10788  (eval $ac_try) 2>&5
10789  ac_status=$?
10790  echo "$as_me:10790: \$? = $ac_status" >&5
10791  (exit $ac_status); }; }; then
10792  cf_cv_regex="regexp.h"
10793else
10794  echo "$as_me: failed program was:" >&5
10795cat conftest.$ac_ext >&5
10796
10797		cf_save_LIBS="$LIBS"
10798		LIBS="-lgen $LIBS"
10799		cat >conftest.$ac_ext <<_ACEOF
10800#line 10800 "configure"
10801#include "confdefs.h"
10802#include <regexpr.h>
10803int
10804main ()
10805{
10806
10807			char *p = compile("", "", "");
10808			int x = step("", "");
10809
10810  ;
10811  return 0;
10812}
10813_ACEOF
10814rm -f conftest.$ac_objext conftest$ac_exeext
10815if { (eval echo "$as_me:10815: \"$ac_link\"") >&5
10816  (eval $ac_link) 2>&5
10817  ac_status=$?
10818  echo "$as_me:10818: \$? = $ac_status" >&5
10819  (exit $ac_status); } &&
10820         { ac_try='test -s conftest$ac_exeext'
10821  { (eval echo "$as_me:10821: \"$ac_try\"") >&5
10822  (eval $ac_try) 2>&5
10823  ac_status=$?
10824  echo "$as_me:10824: \$? = $ac_status" >&5
10825  (exit $ac_status); }; }; then
10826  cf_cv_regex="regexpr.h"
10827else
10828  echo "$as_me: failed program was:" >&5
10829cat conftest.$ac_ext >&5
10830LIBS="$cf_save_LIBS"
10831fi
10832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10833fi
10834rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10835fi
10836rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10837
10838fi
10839
10840echo "$as_me:10840: result: $cf_cv_regex" >&5
10841echo "${ECHO_T}$cf_cv_regex" >&6
10842case $cf_cv_regex in
10843	regex.h)   cat >>confdefs.h <<\EOF
10844#define HAVE_REGEX_H_FUNCS 1
10845EOF
10846 ;;
10847	regexp.h)  cat >>confdefs.h <<\EOF
10848#define HAVE_REGEXP_H_FUNCS 1
10849EOF
10850 ;;
10851	regexpr.h) cat >>confdefs.h <<\EOF
10852#define HAVE_REGEXPR_H_FUNCS 1
10853EOF
10854 ;;
10855esac
10856
10857for ac_header in \
10858fcntl.h \
10859getopt.h \
10860limits.h \
10861locale.h \
10862poll.h \
10863sys/bsdtypes.h \
10864sys/ioctl.h \
10865sys/param.h \
10866sys/poll.h \
10867sys/select.h \
10868sys/time.h \
10869sys/times.h \
10870ttyent.h \
10871unistd.h \
10872wctype.h \
10873
10874do
10875as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10876echo "$as_me:10876: checking for $ac_header" >&5
10877echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10878if eval "test \"\${$as_ac_Header+set}\" = set"; then
10879  echo $ECHO_N "(cached) $ECHO_C" >&6
10880else
10881  cat >conftest.$ac_ext <<_ACEOF
10882#line 10882 "configure"
10883#include "confdefs.h"
10884#include <$ac_header>
10885_ACEOF
10886if { (eval echo "$as_me:10886: \"$ac_cpp conftest.$ac_ext\"") >&5
10887  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10888  ac_status=$?
10889  egrep -v '^ *\+' conftest.er1 >conftest.err
10890  rm -f conftest.er1
10891  cat conftest.err >&5
10892  echo "$as_me:10892: \$? = $ac_status" >&5
10893  (exit $ac_status); } >/dev/null; then
10894  if test -s conftest.err; then
10895    ac_cpp_err=$ac_c_preproc_warn_flag
10896  else
10897    ac_cpp_err=
10898  fi
10899else
10900  ac_cpp_err=yes
10901fi
10902if test -z "$ac_cpp_err"; then
10903  eval "$as_ac_Header=yes"
10904else
10905  echo "$as_me: failed program was:" >&5
10906  cat conftest.$ac_ext >&5
10907  eval "$as_ac_Header=no"
10908fi
10909rm -f conftest.err conftest.$ac_ext
10910fi
10911echo "$as_me:10911: result: `eval echo '${'$as_ac_Header'}'`" >&5
10912echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10913if test `eval echo '${'$as_ac_Header'}'` = yes; then
10914  cat >>confdefs.h <<EOF
10915#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10916EOF
10917
10918fi
10919done
10920
10921# check for ISC (this may also define _POSIX_SOURCE)
10922# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
10923if test "$ISC" = yes ; then
10924
10925echo "$as_me:10925: checking for main in -lcposix" >&5
10926echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
10927if test "${ac_cv_lib_cposix_main+set}" = set; then
10928  echo $ECHO_N "(cached) $ECHO_C" >&6
10929else
10930  ac_check_lib_save_LIBS=$LIBS
10931LIBS="-lcposix  $LIBS"
10932cat >conftest.$ac_ext <<_ACEOF
10933#line 10933 "configure"
10934#include "confdefs.h"
10935
10936int
10937main ()
10938{
10939main ();
10940  ;
10941  return 0;
10942}
10943_ACEOF
10944rm -f conftest.$ac_objext conftest$ac_exeext
10945if { (eval echo "$as_me:10945: \"$ac_link\"") >&5
10946  (eval $ac_link) 2>&5
10947  ac_status=$?
10948  echo "$as_me:10948: \$? = $ac_status" >&5
10949  (exit $ac_status); } &&
10950         { ac_try='test -s conftest$ac_exeext'
10951  { (eval echo "$as_me:10951: \"$ac_try\"") >&5
10952  (eval $ac_try) 2>&5
10953  ac_status=$?
10954  echo "$as_me:10954: \$? = $ac_status" >&5
10955  (exit $ac_status); }; }; then
10956  ac_cv_lib_cposix_main=yes
10957else
10958  echo "$as_me: failed program was:" >&5
10959cat conftest.$ac_ext >&5
10960ac_cv_lib_cposix_main=no
10961fi
10962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10963LIBS=$ac_check_lib_save_LIBS
10964fi
10965echo "$as_me:10965: result: $ac_cv_lib_cposix_main" >&5
10966echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
10967if test $ac_cv_lib_cposix_main = yes; then
10968  cat >>confdefs.h <<EOF
10969#define HAVE_LIBCPOSIX 1
10970EOF
10971
10972  LIBS="-lcposix $LIBS"
10973
10974fi
10975
10976	echo "$as_me:10976: checking for bzero in -linet" >&5
10977echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
10978if test "${ac_cv_lib_inet_bzero+set}" = set; then
10979  echo $ECHO_N "(cached) $ECHO_C" >&6
10980else
10981  ac_check_lib_save_LIBS=$LIBS
10982LIBS="-linet  $LIBS"
10983cat >conftest.$ac_ext <<_ACEOF
10984#line 10984 "configure"
10985#include "confdefs.h"
10986
10987/* Override any gcc2 internal prototype to avoid an error.  */
10988#ifdef __cplusplus
10989extern "C"
10990#endif
10991/* We use char because int might match the return type of a gcc2
10992   builtin and then its argument prototype would still apply.  */
10993char bzero ();
10994int
10995main ()
10996{
10997bzero ();
10998  ;
10999  return 0;
11000}
11001_ACEOF
11002rm -f conftest.$ac_objext conftest$ac_exeext
11003if { (eval echo "$as_me:11003: \"$ac_link\"") >&5
11004  (eval $ac_link) 2>&5
11005  ac_status=$?
11006  echo "$as_me:11006: \$? = $ac_status" >&5
11007  (exit $ac_status); } &&
11008         { ac_try='test -s conftest$ac_exeext'
11009  { (eval echo "$as_me:11009: \"$ac_try\"") >&5
11010  (eval $ac_try) 2>&5
11011  ac_status=$?
11012  echo "$as_me:11012: \$? = $ac_status" >&5
11013  (exit $ac_status); }; }; then
11014  ac_cv_lib_inet_bzero=yes
11015else
11016  echo "$as_me: failed program was:" >&5
11017cat conftest.$ac_ext >&5
11018ac_cv_lib_inet_bzero=no
11019fi
11020rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11021LIBS=$ac_check_lib_save_LIBS
11022fi
11023echo "$as_me:11023: result: $ac_cv_lib_inet_bzero" >&5
11024echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
11025if test $ac_cv_lib_inet_bzero = yes; then
11026  LIBS="$LIBS -linet"
11027fi
11028fi
11029
11030echo "$as_me:11030: checking if sys/time.h works with sys/select.h" >&5
11031echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
11032if test "${cf_cv_sys_time_select+set}" = set; then
11033  echo $ECHO_N "(cached) $ECHO_C" >&6
11034else
11035
11036cat >conftest.$ac_ext <<_ACEOF
11037#line 11037 "configure"
11038#include "confdefs.h"
11039
11040#include <sys/types.h>
11041#ifdef HAVE_SYS_TIME_H
11042#include <sys/time.h>
11043#endif
11044#ifdef HAVE_SYS_SELECT_H
11045#include <sys/select.h>
11046#endif
11047
11048int
11049main ()
11050{
11051
11052  ;
11053  return 0;
11054}
11055_ACEOF
11056rm -f conftest.$ac_objext
11057if { (eval echo "$as_me:11057: \"$ac_compile\"") >&5
11058  (eval $ac_compile) 2>&5
11059  ac_status=$?
11060  echo "$as_me:11060: \$? = $ac_status" >&5
11061  (exit $ac_status); } &&
11062         { ac_try='test -s conftest.$ac_objext'
11063  { (eval echo "$as_me:11063: \"$ac_try\"") >&5
11064  (eval $ac_try) 2>&5
11065  ac_status=$?
11066  echo "$as_me:11066: \$? = $ac_status" >&5
11067  (exit $ac_status); }; }; then
11068  cf_cv_sys_time_select=yes
11069else
11070  echo "$as_me: failed program was:" >&5
11071cat conftest.$ac_ext >&5
11072cf_cv_sys_time_select=no
11073fi
11074rm -f conftest.$ac_objext conftest.$ac_ext
11075
11076fi
11077
11078echo "$as_me:11078: result: $cf_cv_sys_time_select" >&5
11079echo "${ECHO_T}$cf_cv_sys_time_select" >&6
11080test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
11081#define HAVE_SYS_TIME_SELECT 1
11082EOF
11083
11084###	checks for compiler characteristics
11085ac_ext=c
11086ac_cpp='$CPP $CPPFLAGS'
11087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11089ac_compiler_gnu=$ac_cv_c_compiler_gnu
11090ac_main_return=return
11091
11092echo "$as_me:11092: checking for $CC option to accept ANSI C" >&5
11093echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
11094if test "${ac_cv_prog_cc_stdc+set}" = set; then
11095  echo $ECHO_N "(cached) $ECHO_C" >&6
11096else
11097  ac_cv_prog_cc_stdc=no
11098ac_save_CC=$CC
11099cat >conftest.$ac_ext <<_ACEOF
11100#line 11100 "configure"
11101#include "confdefs.h"
11102#include <stdarg.h>
11103#include <stdio.h>
11104#include <sys/types.h>
11105#include <sys/stat.h>
11106/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
11107struct buf { int x; };
11108FILE * (*rcsopen) (struct buf *, struct stat *, int);
11109static char *e (p, i)
11110     char **p;
11111     int i;
11112{
11113  return p[i];
11114}
11115static char *f (char * (*g) (char **, int), char **p, ...)
11116{
11117  char *s;
11118  va_list v;
11119  va_start (v,p);
11120  s = g (p, va_arg (v,int));
11121  va_end (v);
11122  return s;
11123}
11124int test (int i, double x);
11125struct s1 {int (*f) (int a);};
11126struct s2 {int (*f) (double a);};
11127int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
11128int argc;
11129char **argv;
11130int
11131main ()
11132{
11133return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
11134  ;
11135  return 0;
11136}
11137_ACEOF
11138# Don't try gcc -ansi; that turns off useful extensions and
11139# breaks some systems' header files.
11140# AIX			-qlanglvl=ansi
11141# Ultrix and OSF/1	-std1
11142# HP-UX 10.20 and later	-Ae
11143# HP-UX older versions	-Aa -D_HPUX_SOURCE
11144# SVR4			-Xc -D__EXTENSIONS__
11145for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
11146do
11147  CC="$ac_save_CC $ac_arg"
11148  rm -f conftest.$ac_objext
11149if { (eval echo "$as_me:11149: \"$ac_compile\"") >&5
11150  (eval $ac_compile) 2>&5
11151  ac_status=$?
11152  echo "$as_me:11152: \$? = $ac_status" >&5
11153  (exit $ac_status); } &&
11154         { ac_try='test -s conftest.$ac_objext'
11155  { (eval echo "$as_me:11155: \"$ac_try\"") >&5
11156  (eval $ac_try) 2>&5
11157  ac_status=$?
11158  echo "$as_me:11158: \$? = $ac_status" >&5
11159  (exit $ac_status); }; }; then
11160  ac_cv_prog_cc_stdc=$ac_arg
11161break
11162else
11163  echo "$as_me: failed program was:" >&5
11164cat conftest.$ac_ext >&5
11165fi
11166rm -f conftest.$ac_objext
11167done
11168rm -f conftest.$ac_ext conftest.$ac_objext
11169CC=$ac_save_CC
11170
11171fi
11172
11173case "x$ac_cv_prog_cc_stdc" in
11174  x|xno)
11175    echo "$as_me:11175: result: none needed" >&5
11176echo "${ECHO_T}none needed" >&6 ;;
11177  *)
11178    echo "$as_me:11178: result: $ac_cv_prog_cc_stdc" >&5
11179echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
11180    CC="$CC $ac_cv_prog_cc_stdc" ;;
11181esac
11182
11183echo "$as_me:11183: checking for an ANSI C-conforming const" >&5
11184echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
11185if test "${ac_cv_c_const+set}" = set; then
11186  echo $ECHO_N "(cached) $ECHO_C" >&6
11187else
11188  cat >conftest.$ac_ext <<_ACEOF
11189#line 11189 "configure"
11190#include "confdefs.h"
11191
11192int
11193main ()
11194{
11195/* FIXME: Include the comments suggested by Paul. */
11196#ifndef __cplusplus
11197  /* Ultrix mips cc rejects this.  */
11198  typedef int charset[2];
11199  const charset x;
11200  /* SunOS 4.1.1 cc rejects this.  */
11201  char const *const *ccp;
11202  char **p;
11203  /* NEC SVR4.0.2 mips cc rejects this.  */
11204  struct point {int x, y;};
11205  static struct point const zero = {0,0};
11206  /* AIX XL C 1.02.0.0 rejects this.
11207     It does not let you subtract one const X* pointer from another in
11208     an arm of an if-expression whose if-part is not a constant
11209     expression */
11210  const char *g = "string";
11211  ccp = &g + (g ? g-g : 0);
11212  /* HPUX 7.0 cc rejects these. */
11213  ++ccp;
11214  p = (char**) ccp;
11215  ccp = (char const *const *) p;
11216  { /* SCO 3.2v4 cc rejects this.  */
11217    char *t;
11218    char const *s = 0 ? (char *) 0 : (char const *) 0;
11219
11220    *t++ = 0;
11221  }
11222  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
11223    int x[] = {25, 17};
11224    const int *foo = &x[0];
11225    ++foo;
11226  }
11227  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11228    typedef const int *iptr;
11229    iptr p = 0;
11230    ++p;
11231  }
11232  { /* AIX XL C 1.02.0.0 rejects this saying
11233       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11234    struct s { int j; const int *ap[3]; };
11235    struct s *b; b->j = 5;
11236  }
11237  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11238    const int foo = 10;
11239  }
11240#endif
11241
11242  ;
11243  return 0;
11244}
11245_ACEOF
11246rm -f conftest.$ac_objext
11247if { (eval echo "$as_me:11247: \"$ac_compile\"") >&5
11248  (eval $ac_compile) 2>&5
11249  ac_status=$?
11250  echo "$as_me:11250: \$? = $ac_status" >&5
11251  (exit $ac_status); } &&
11252         { ac_try='test -s conftest.$ac_objext'
11253  { (eval echo "$as_me:11253: \"$ac_try\"") >&5
11254  (eval $ac_try) 2>&5
11255  ac_status=$?
11256  echo "$as_me:11256: \$? = $ac_status" >&5
11257  (exit $ac_status); }; }; then
11258  ac_cv_c_const=yes
11259else
11260  echo "$as_me: failed program was:" >&5
11261cat conftest.$ac_ext >&5
11262ac_cv_c_const=no
11263fi
11264rm -f conftest.$ac_objext conftest.$ac_ext
11265fi
11266echo "$as_me:11266: result: $ac_cv_c_const" >&5
11267echo "${ECHO_T}$ac_cv_c_const" >&6
11268if test $ac_cv_c_const = no; then
11269
11270cat >>confdefs.h <<\EOF
11271#define const
11272EOF
11273
11274fi
11275
11276echo "$as_me:11276: checking for inline" >&5
11277echo $ECHO_N "checking for inline... $ECHO_C" >&6
11278if test "${ac_cv_c_inline+set}" = set; then
11279  echo $ECHO_N "(cached) $ECHO_C" >&6
11280else
11281  ac_cv_c_inline=no
11282for ac_kw in inline __inline__ __inline; do
11283  cat >conftest.$ac_ext <<_ACEOF
11284#line 11284 "configure"
11285#include "confdefs.h"
11286#ifndef __cplusplus
11287static $ac_kw int static_foo () {return 0; }
11288$ac_kw int foo () {return 0; }
11289#endif
11290
11291_ACEOF
11292rm -f conftest.$ac_objext
11293if { (eval echo "$as_me:11293: \"$ac_compile\"") >&5
11294  (eval $ac_compile) 2>&5
11295  ac_status=$?
11296  echo "$as_me:11296: \$? = $ac_status" >&5
11297  (exit $ac_status); } &&
11298         { ac_try='test -s conftest.$ac_objext'
11299  { (eval echo "$as_me:11299: \"$ac_try\"") >&5
11300  (eval $ac_try) 2>&5
11301  ac_status=$?
11302  echo "$as_me:11302: \$? = $ac_status" >&5
11303  (exit $ac_status); }; }; then
11304  ac_cv_c_inline=$ac_kw; break
11305else
11306  echo "$as_me: failed program was:" >&5
11307cat conftest.$ac_ext >&5
11308fi
11309rm -f conftest.$ac_objext conftest.$ac_ext
11310done
11311
11312fi
11313echo "$as_me:11313: result: $ac_cv_c_inline" >&5
11314echo "${ECHO_T}$ac_cv_c_inline" >&6
11315case $ac_cv_c_inline in
11316  inline | yes) ;;
11317  no)
11318cat >>confdefs.h <<\EOF
11319#define inline
11320EOF
11321 ;;
11322  *)  cat >>confdefs.h <<EOF
11323#define inline $ac_cv_c_inline
11324EOF
11325 ;;
11326esac
11327
11328NCURSES_INLINE=
11329if test "$ac_cv_c_inline" != no ; then
11330	cat >>confdefs.h <<\EOF
11331#define CC_HAS_INLINE_FUNCS 1
11332EOF
11333
11334	NCURSES_INLINE=inline
11335fi
11336
11337if test $NCURSES_CHTYPE = auto ; then
11338
11339echo "$as_me:11339: checking for type of chtype" >&5
11340echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
11341if test "${cf_cv_typeof_chtype+set}" = set; then
11342  echo $ECHO_N "(cached) $ECHO_C" >&6
11343else
11344
11345		if test "$cross_compiling" = yes; then
11346  cf_cv_typeof_chtype=long
11347else
11348  cat >conftest.$ac_ext <<_ACEOF
11349#line 11349 "configure"
11350#include "confdefs.h"
11351
11352#define WANT_BITS 31
11353#include <stdio.h>
11354int main()
11355{
11356	FILE *fp = fopen("cf_test.out", "w");
11357	if (fp != 0) {
11358		char *result = "long";
11359		if (sizeof(unsigned long) > sizeof(unsigned int)) {
11360			int n;
11361			unsigned int x, y;
11362			for (n = 0; n < WANT_BITS; n++) {
11363				x = (1 << n);
11364				y = (x >> n);
11365				if (y != 1 || x == 0) {
11366					x = 0;
11367					break;
11368				}
11369			}
11370			/*
11371			 * If x is nonzero, an int is big enough for the bits
11372			 * that we want.
11373			 */
11374			result = (x != 0) ? "int" : "long";
11375		}
11376		fputs(result, fp);
11377		fclose(fp);
11378	}
11379	${cf_cv_main_return:-return}(0);
11380}
11381
11382_ACEOF
11383rm -f conftest$ac_exeext
11384if { (eval echo "$as_me:11384: \"$ac_link\"") >&5
11385  (eval $ac_link) 2>&5
11386  ac_status=$?
11387  echo "$as_me:11387: \$? = $ac_status" >&5
11388  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11389  { (eval echo "$as_me:11389: \"$ac_try\"") >&5
11390  (eval $ac_try) 2>&5
11391  ac_status=$?
11392  echo "$as_me:11392: \$? = $ac_status" >&5
11393  (exit $ac_status); }; }; then
11394  cf_cv_typeof_chtype=`cat cf_test.out`
11395else
11396  echo "$as_me: program exited with status $ac_status" >&5
11397echo "$as_me: failed program was:" >&5
11398cat conftest.$ac_ext >&5
11399cf_cv_typeof_chtype=long
11400fi
11401rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11402fi
11403		rm -f cf_test.out
11404
11405fi
11406
11407echo "$as_me:11407: result: $cf_cv_typeof_chtype" >&5
11408echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
11409
11410cat >>confdefs.h <<EOF
11411#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
11412EOF
11413
11414else
11415	cf_cv_typeof_chtype=$NCURSES_CHTYPE
11416fi
11417
11418echo "$as_me:11418: checking if unsigned literals are legal" >&5
11419echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
11420if test "${cf_cv_unsigned_literals+set}" = set; then
11421  echo $ECHO_N "(cached) $ECHO_C" >&6
11422else
11423
11424	cat >conftest.$ac_ext <<_ACEOF
11425#line 11425 "configure"
11426#include "confdefs.h"
11427
11428int
11429main ()
11430{
11431long x = 1L + 1UL + 1U + 1
11432  ;
11433  return 0;
11434}
11435_ACEOF
11436rm -f conftest.$ac_objext
11437if { (eval echo "$as_me:11437: \"$ac_compile\"") >&5
11438  (eval $ac_compile) 2>&5
11439  ac_status=$?
11440  echo "$as_me:11440: \$? = $ac_status" >&5
11441  (exit $ac_status); } &&
11442         { ac_try='test -s conftest.$ac_objext'
11443  { (eval echo "$as_me:11443: \"$ac_try\"") >&5
11444  (eval $ac_try) 2>&5
11445  ac_status=$?
11446  echo "$as_me:11446: \$? = $ac_status" >&5
11447  (exit $ac_status); }; }; then
11448  cf_cv_unsigned_literals=yes
11449else
11450  echo "$as_me: failed program was:" >&5
11451cat conftest.$ac_ext >&5
11452cf_cv_unsigned_literals=no
11453fi
11454rm -f conftest.$ac_objext conftest.$ac_ext
11455
11456fi
11457
11458echo "$as_me:11458: result: $cf_cv_unsigned_literals" >&5
11459echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
11460
11461cf_cv_1UL="1"
11462test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
11463test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
11464
11465if test $NCURSES_MMASK_T = auto ; then
11466	cf_cv_typeof_mmask_t=long
11467else
11468	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
11469fi
11470
11471###	Checks for external-data
11472
11473echo "$as_me:11473: checking if external errno is declared" >&5
11474echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
11475if test "${cf_cv_dcl_errno+set}" = set; then
11476  echo $ECHO_N "(cached) $ECHO_C" >&6
11477else
11478
11479    cat >conftest.$ac_ext <<_ACEOF
11480#line 11480 "configure"
11481#include "confdefs.h"
11482
11483#ifdef HAVE_STDLIB_H
11484#include <stdlib.h>
11485#endif
11486#include <stdio.h>
11487#include <sys/types.h>
11488#include <errno.h>
11489int
11490main ()
11491{
11492long x = (long) errno
11493  ;
11494  return 0;
11495}
11496_ACEOF
11497rm -f conftest.$ac_objext
11498if { (eval echo "$as_me:11498: \"$ac_compile\"") >&5
11499  (eval $ac_compile) 2>&5
11500  ac_status=$?
11501  echo "$as_me:11501: \$? = $ac_status" >&5
11502  (exit $ac_status); } &&
11503         { ac_try='test -s conftest.$ac_objext'
11504  { (eval echo "$as_me:11504: \"$ac_try\"") >&5
11505  (eval $ac_try) 2>&5
11506  ac_status=$?
11507  echo "$as_me:11507: \$? = $ac_status" >&5
11508  (exit $ac_status); }; }; then
11509  cf_cv_dcl_errno=yes
11510else
11511  echo "$as_me: failed program was:" >&5
11512cat conftest.$ac_ext >&5
11513cf_cv_dcl_errno=no
11514fi
11515rm -f conftest.$ac_objext conftest.$ac_ext
11516
11517fi
11518echo "$as_me:11518: result: $cf_cv_dcl_errno" >&5
11519echo "${ECHO_T}$cf_cv_dcl_errno" >&6
11520
11521if test "$cf_cv_dcl_errno" = no ; then
11522
11523cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11524
11525    cat >>confdefs.h <<EOF
11526#define $cf_result 1
11527EOF
11528
11529fi
11530
11531# It's possible (for near-UNIX clones) that the data doesn't exist
11532
11533echo "$as_me:11533: checking if external errno exists" >&5
11534echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
11535if test "${cf_cv_have_errno+set}" = set; then
11536  echo $ECHO_N "(cached) $ECHO_C" >&6
11537else
11538
11539    cat >conftest.$ac_ext <<_ACEOF
11540#line 11540 "configure"
11541#include "confdefs.h"
11542
11543#undef errno
11544extern int errno;
11545
11546int
11547main ()
11548{
11549errno = 2
11550  ;
11551  return 0;
11552}
11553_ACEOF
11554rm -f conftest.$ac_objext conftest$ac_exeext
11555if { (eval echo "$as_me:11555: \"$ac_link\"") >&5
11556  (eval $ac_link) 2>&5
11557  ac_status=$?
11558  echo "$as_me:11558: \$? = $ac_status" >&5
11559  (exit $ac_status); } &&
11560         { ac_try='test -s conftest$ac_exeext'
11561  { (eval echo "$as_me:11561: \"$ac_try\"") >&5
11562  (eval $ac_try) 2>&5
11563  ac_status=$?
11564  echo "$as_me:11564: \$? = $ac_status" >&5
11565  (exit $ac_status); }; }; then
11566  cf_cv_have_errno=yes
11567else
11568  echo "$as_me: failed program was:" >&5
11569cat conftest.$ac_ext >&5
11570cf_cv_have_errno=no
11571fi
11572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11573
11574fi
11575echo "$as_me:11575: result: $cf_cv_have_errno" >&5
11576echo "${ECHO_T}$cf_cv_have_errno" >&6
11577
11578if test "$cf_cv_have_errno" = yes ; then
11579
11580cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11581
11582    cat >>confdefs.h <<EOF
11583#define $cf_result 1
11584EOF
11585
11586fi
11587
11588echo "$as_me:11588: checking if data-only library module links" >&5
11589echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
11590if test "${cf_cv_link_dataonly+set}" = set; then
11591  echo $ECHO_N "(cached) $ECHO_C" >&6
11592else
11593
11594	rm -f conftest.a
11595	cat >conftest.$ac_ext <<EOF
11596#line 11596 "configure"
11597int	testdata[3] = { 123, 456, 789 };
11598EOF
11599	if { (eval echo "$as_me:11599: \"$ac_compile\"") >&5
11600  (eval $ac_compile) 2>&5
11601  ac_status=$?
11602  echo "$as_me:11602: \$? = $ac_status" >&5
11603  (exit $ac_status); } ; then
11604		mv conftest.o data.o && \
11605		( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
11606	fi
11607	rm -f conftest.$ac_ext data.o
11608	cat >conftest.$ac_ext <<EOF
11609#line 11609 "configure"
11610int	testfunc()
11611{
11612#if defined(NeXT)
11613	${cf_cv_main_return:-return}(1);	/* I'm told this linker is broken */
11614#else
11615	extern int testdata[3];
11616	return testdata[0] == 123
11617	   &&  testdata[1] == 456
11618	   &&  testdata[2] == 789;
11619#endif
11620}
11621EOF
11622	if { (eval echo "$as_me:11622: \"$ac_compile\"") >&5
11623  (eval $ac_compile) 2>&5
11624  ac_status=$?
11625  echo "$as_me:11625: \$? = $ac_status" >&5
11626  (exit $ac_status); }; then
11627		mv conftest.o func.o && \
11628		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
11629	fi
11630	rm -f conftest.$ac_ext func.o
11631	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
11632	cf_saveLIBS="$LIBS"
11633	LIBS="conftest.a $LIBS"
11634	if test "$cross_compiling" = yes; then
11635  cf_cv_link_dataonly=unknown
11636else
11637  cat >conftest.$ac_ext <<_ACEOF
11638#line 11638 "configure"
11639#include "confdefs.h"
11640
11641	int main()
11642	{
11643		extern int testfunc();
11644		${cf_cv_main_return:-return} (!testfunc());
11645	}
11646
11647_ACEOF
11648rm -f conftest$ac_exeext
11649if { (eval echo "$as_me:11649: \"$ac_link\"") >&5
11650  (eval $ac_link) 2>&5
11651  ac_status=$?
11652  echo "$as_me:11652: \$? = $ac_status" >&5
11653  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11654  { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655  (eval $ac_try) 2>&5
11656  ac_status=$?
11657  echo "$as_me:11657: \$? = $ac_status" >&5
11658  (exit $ac_status); }; }; then
11659  cf_cv_link_dataonly=yes
11660else
11661  echo "$as_me: program exited with status $ac_status" >&5
11662echo "$as_me: failed program was:" >&5
11663cat conftest.$ac_ext >&5
11664cf_cv_link_dataonly=no
11665fi
11666rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11667fi
11668	LIBS="$cf_saveLIBS"
11669
11670fi
11671
11672echo "$as_me:11672: result: $cf_cv_link_dataonly" >&5
11673echo "${ECHO_T}$cf_cv_link_dataonly" >&6
11674
11675if test "$cf_cv_link_dataonly" = no ; then
11676	cat >>confdefs.h <<\EOF
11677#define BROKEN_LINKER 1
11678EOF
11679
11680	BROKEN_LINKER=1
11681fi
11682
11683###	Checks for library functions.
11684
11685for ac_func in \
11686getcwd \
11687getegid \
11688geteuid \
11689getttynam \
11690issetugid \
11691poll \
11692remove \
11693select \
11694setbuf \
11695setbuffer \
11696setvbuf \
11697sigaction \
11698sigvec \
11699strdup \
11700strstr \
11701tcgetpgrp \
11702times \
11703vsnprintf \
11704
11705do
11706as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11707echo "$as_me:11707: checking for $ac_func" >&5
11708echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11709if eval "test \"\${$as_ac_var+set}\" = set"; then
11710  echo $ECHO_N "(cached) $ECHO_C" >&6
11711else
11712  cat >conftest.$ac_ext <<_ACEOF
11713#line 11713 "configure"
11714#include "confdefs.h"
11715/* System header to define __stub macros and hopefully few prototypes,
11716    which can conflict with char $ac_func (); below.  */
11717#include <assert.h>
11718/* Override any gcc2 internal prototype to avoid an error.  */
11719#ifdef __cplusplus
11720extern "C"
11721#endif
11722/* We use char because int might match the return type of a gcc2
11723   builtin and then its argument prototype would still apply.  */
11724char $ac_func ();
11725char (*f) ();
11726
11727int
11728main ()
11729{
11730/* The GNU C library defines this for functions which it implements
11731    to always fail with ENOSYS.  Some functions are actually named
11732    something starting with __ and the normal name is an alias.  */
11733#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11734choke me
11735#else
11736f = $ac_func;
11737#endif
11738
11739  ;
11740  return 0;
11741}
11742_ACEOF
11743rm -f conftest.$ac_objext conftest$ac_exeext
11744if { (eval echo "$as_me:11744: \"$ac_link\"") >&5
11745  (eval $ac_link) 2>&5
11746  ac_status=$?
11747  echo "$as_me:11747: \$? = $ac_status" >&5
11748  (exit $ac_status); } &&
11749         { ac_try='test -s conftest$ac_exeext'
11750  { (eval echo "$as_me:11750: \"$ac_try\"") >&5
11751  (eval $ac_try) 2>&5
11752  ac_status=$?
11753  echo "$as_me:11753: \$? = $ac_status" >&5
11754  (exit $ac_status); }; }; then
11755  eval "$as_ac_var=yes"
11756else
11757  echo "$as_me: failed program was:" >&5
11758cat conftest.$ac_ext >&5
11759eval "$as_ac_var=no"
11760fi
11761rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11762fi
11763echo "$as_me:11763: result: `eval echo '${'$as_ac_var'}'`" >&5
11764echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11765if test `eval echo '${'$as_ac_var'}'` = yes; then
11766  cat >>confdefs.h <<EOF
11767#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11768EOF
11769
11770fi
11771done
11772
11773if test "$with_getcap" = "yes" ; then
11774
11775echo "$as_me:11775: checking for terminal-capability database functions" >&5
11776echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
11777if test "${cf_cv_cgetent+set}" = set; then
11778  echo $ECHO_N "(cached) $ECHO_C" >&6
11779else
11780
11781cat >conftest.$ac_ext <<_ACEOF
11782#line 11782 "configure"
11783#include "confdefs.h"
11784
11785#include <stdlib.h>
11786int
11787main ()
11788{
11789
11790	char temp[128];
11791	char *buf = temp;
11792	char *db_array = temp;
11793	cgetent(&buf, /* int *, */ &db_array, "vt100");
11794	cgetcap(buf, "tc", '=');
11795	cgetmatch(buf, "tc");
11796
11797  ;
11798  return 0;
11799}
11800_ACEOF
11801rm -f conftest.$ac_objext conftest$ac_exeext
11802if { (eval echo "$as_me:11802: \"$ac_link\"") >&5
11803  (eval $ac_link) 2>&5
11804  ac_status=$?
11805  echo "$as_me:11805: \$? = $ac_status" >&5
11806  (exit $ac_status); } &&
11807         { ac_try='test -s conftest$ac_exeext'
11808  { (eval echo "$as_me:11808: \"$ac_try\"") >&5
11809  (eval $ac_try) 2>&5
11810  ac_status=$?
11811  echo "$as_me:11811: \$? = $ac_status" >&5
11812  (exit $ac_status); }; }; then
11813  cf_cv_cgetent=yes
11814else
11815  echo "$as_me: failed program was:" >&5
11816cat conftest.$ac_ext >&5
11817cf_cv_cgetent=no
11818fi
11819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11820
11821fi
11822
11823echo "$as_me:11823: result: $cf_cv_cgetent" >&5
11824echo "${ECHO_T}$cf_cv_cgetent" >&6
11825test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
11826#define HAVE_BSD_CGETENT 1
11827EOF
11828
11829fi
11830
11831echo "$as_me:11831: checking for isascii" >&5
11832echo $ECHO_N "checking for isascii... $ECHO_C" >&6
11833if test "${cf_cv_have_isascii+set}" = set; then
11834  echo $ECHO_N "(cached) $ECHO_C" >&6
11835else
11836
11837	cat >conftest.$ac_ext <<_ACEOF
11838#line 11838 "configure"
11839#include "confdefs.h"
11840#include <ctype.h>
11841int
11842main ()
11843{
11844int x = isascii(' ')
11845  ;
11846  return 0;
11847}
11848_ACEOF
11849rm -f conftest.$ac_objext conftest$ac_exeext
11850if { (eval echo "$as_me:11850: \"$ac_link\"") >&5
11851  (eval $ac_link) 2>&5
11852  ac_status=$?
11853  echo "$as_me:11853: \$? = $ac_status" >&5
11854  (exit $ac_status); } &&
11855         { ac_try='test -s conftest$ac_exeext'
11856  { (eval echo "$as_me:11856: \"$ac_try\"") >&5
11857  (eval $ac_try) 2>&5
11858  ac_status=$?
11859  echo "$as_me:11859: \$? = $ac_status" >&5
11860  (exit $ac_status); }; }; then
11861  cf_cv_have_isascii=yes
11862else
11863  echo "$as_me: failed program was:" >&5
11864cat conftest.$ac_ext >&5
11865cf_cv_have_isascii=no
11866fi
11867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11868
11869fi
11870echo "$as_me:11870: result: $cf_cv_have_isascii" >&5
11871echo "${ECHO_T}$cf_cv_have_isascii" >&6
11872test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
11873#define HAVE_ISASCII 1
11874EOF
11875
11876if test "$ac_cv_func_sigaction" = yes; then
11877echo "$as_me:11877: checking whether sigaction needs _POSIX_SOURCE" >&5
11878echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
11879cat >conftest.$ac_ext <<_ACEOF
11880#line 11880 "configure"
11881#include "confdefs.h"
11882
11883#include <sys/types.h>
11884#include <signal.h>
11885int
11886main ()
11887{
11888struct sigaction act
11889  ;
11890  return 0;
11891}
11892_ACEOF
11893rm -f conftest.$ac_objext
11894if { (eval echo "$as_me:11894: \"$ac_compile\"") >&5
11895  (eval $ac_compile) 2>&5
11896  ac_status=$?
11897  echo "$as_me:11897: \$? = $ac_status" >&5
11898  (exit $ac_status); } &&
11899         { ac_try='test -s conftest.$ac_objext'
11900  { (eval echo "$as_me:11900: \"$ac_try\"") >&5
11901  (eval $ac_try) 2>&5
11902  ac_status=$?
11903  echo "$as_me:11903: \$? = $ac_status" >&5
11904  (exit $ac_status); }; }; then
11905  sigact_bad=no
11906else
11907  echo "$as_me: failed program was:" >&5
11908cat conftest.$ac_ext >&5
11909
11910cat >conftest.$ac_ext <<_ACEOF
11911#line 11911 "configure"
11912#include "confdefs.h"
11913
11914#define _POSIX_SOURCE
11915#include <sys/types.h>
11916#include <signal.h>
11917int
11918main ()
11919{
11920struct sigaction act
11921  ;
11922  return 0;
11923}
11924_ACEOF
11925rm -f conftest.$ac_objext
11926if { (eval echo "$as_me:11926: \"$ac_compile\"") >&5
11927  (eval $ac_compile) 2>&5
11928  ac_status=$?
11929  echo "$as_me:11929: \$? = $ac_status" >&5
11930  (exit $ac_status); } &&
11931         { ac_try='test -s conftest.$ac_objext'
11932  { (eval echo "$as_me:11932: \"$ac_try\"") >&5
11933  (eval $ac_try) 2>&5
11934  ac_status=$?
11935  echo "$as_me:11935: \$? = $ac_status" >&5
11936  (exit $ac_status); }; }; then
11937  sigact_bad=yes
11938	 cat >>confdefs.h <<\EOF
11939#define SVR4_ACTION 1
11940EOF
11941
11942else
11943  echo "$as_me: failed program was:" >&5
11944cat conftest.$ac_ext >&5
11945sigact_bad=unknown
11946fi
11947rm -f conftest.$ac_objext conftest.$ac_ext
11948fi
11949rm -f conftest.$ac_objext conftest.$ac_ext
11950echo "$as_me:11950: result: $sigact_bad" >&5
11951echo "${ECHO_T}$sigact_bad" >&6
11952fi
11953
11954echo "$as_me:11954: checking if nanosleep really works" >&5
11955echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
11956if test "${cf_cv_func_nanosleep+set}" = set; then
11957  echo $ECHO_N "(cached) $ECHO_C" >&6
11958else
11959
11960if test "$cross_compiling" = yes; then
11961  cf_cv_func_nanosleep=unknown
11962else
11963  cat >conftest.$ac_ext <<_ACEOF
11964#line 11964 "configure"
11965#include "confdefs.h"
11966
11967#include <stdio.h>
11968#include <errno.h>
11969#include <time.h>
11970
11971#ifdef HAVE_SYS_TIME_H
11972#include <sys/time.h>
11973#endif
11974
11975int main() {
11976	struct timespec ts1, ts2;
11977	int code;
11978	ts1.tv_sec  = 0;
11979	ts1.tv_nsec = 750000000;
11980	ts2.tv_sec  = 0;
11981	ts2.tv_nsec = 0;
11982	errno = 0;
11983	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
11984	${cf_cv_main_return:-return}(code != 0);
11985}
11986
11987_ACEOF
11988rm -f conftest$ac_exeext
11989if { (eval echo "$as_me:11989: \"$ac_link\"") >&5
11990  (eval $ac_link) 2>&5
11991  ac_status=$?
11992  echo "$as_me:11992: \$? = $ac_status" >&5
11993  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11994  { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995  (eval $ac_try) 2>&5
11996  ac_status=$?
11997  echo "$as_me:11997: \$? = $ac_status" >&5
11998  (exit $ac_status); }; }; then
11999  cf_cv_func_nanosleep=yes
12000else
12001  echo "$as_me: program exited with status $ac_status" >&5
12002echo "$as_me: failed program was:" >&5
12003cat conftest.$ac_ext >&5
12004cf_cv_func_nanosleep=no
12005fi
12006rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12007fi
12008fi
12009echo "$as_me:12009: result: $cf_cv_func_nanosleep" >&5
12010echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
12011
12012test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
12013#define HAVE_NANOSLEEP 1
12014EOF
12015
12016for ac_header in \
12017termio.h \
12018termios.h \
12019unistd.h \
12020
12021do
12022as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12023echo "$as_me:12023: checking for $ac_header" >&5
12024echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12025if eval "test \"\${$as_ac_Header+set}\" = set"; then
12026  echo $ECHO_N "(cached) $ECHO_C" >&6
12027else
12028  cat >conftest.$ac_ext <<_ACEOF
12029#line 12029 "configure"
12030#include "confdefs.h"
12031#include <$ac_header>
12032_ACEOF
12033if { (eval echo "$as_me:12033: \"$ac_cpp conftest.$ac_ext\"") >&5
12034  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12035  ac_status=$?
12036  egrep -v '^ *\+' conftest.er1 >conftest.err
12037  rm -f conftest.er1
12038  cat conftest.err >&5
12039  echo "$as_me:12039: \$? = $ac_status" >&5
12040  (exit $ac_status); } >/dev/null; then
12041  if test -s conftest.err; then
12042    ac_cpp_err=$ac_c_preproc_warn_flag
12043  else
12044    ac_cpp_err=
12045  fi
12046else
12047  ac_cpp_err=yes
12048fi
12049if test -z "$ac_cpp_err"; then
12050  eval "$as_ac_Header=yes"
12051else
12052  echo "$as_me: failed program was:" >&5
12053  cat conftest.$ac_ext >&5
12054  eval "$as_ac_Header=no"
12055fi
12056rm -f conftest.err conftest.$ac_ext
12057fi
12058echo "$as_me:12058: result: `eval echo '${'$as_ac_Header'}'`" >&5
12059echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12060if test `eval echo '${'$as_ac_Header'}'` = yes; then
12061  cat >>confdefs.h <<EOF
12062#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12063EOF
12064
12065fi
12066done
12067
12068if test "$ISC" = yes ; then
12069
12070for ac_header in sys/termio.h
12071do
12072as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12073echo "$as_me:12073: checking for $ac_header" >&5
12074echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12075if eval "test \"\${$as_ac_Header+set}\" = set"; then
12076  echo $ECHO_N "(cached) $ECHO_C" >&6
12077else
12078  cat >conftest.$ac_ext <<_ACEOF
12079#line 12079 "configure"
12080#include "confdefs.h"
12081#include <$ac_header>
12082_ACEOF
12083if { (eval echo "$as_me:12083: \"$ac_cpp conftest.$ac_ext\"") >&5
12084  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12085  ac_status=$?
12086  egrep -v '^ *\+' conftest.er1 >conftest.err
12087  rm -f conftest.er1
12088  cat conftest.err >&5
12089  echo "$as_me:12089: \$? = $ac_status" >&5
12090  (exit $ac_status); } >/dev/null; then
12091  if test -s conftest.err; then
12092    ac_cpp_err=$ac_c_preproc_warn_flag
12093  else
12094    ac_cpp_err=
12095  fi
12096else
12097  ac_cpp_err=yes
12098fi
12099if test -z "$ac_cpp_err"; then
12100  eval "$as_ac_Header=yes"
12101else
12102  echo "$as_me: failed program was:" >&5
12103  cat conftest.$ac_ext >&5
12104  eval "$as_ac_Header=no"
12105fi
12106rm -f conftest.err conftest.$ac_ext
12107fi
12108echo "$as_me:12108: result: `eval echo '${'$as_ac_Header'}'`" >&5
12109echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12110if test `eval echo '${'$as_ac_Header'}'` = yes; then
12111  cat >>confdefs.h <<EOF
12112#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12113EOF
12114
12115fi
12116done
12117
12118fi
12119if test "$ac_cv_header_termios_h" = yes ; then
12120	case "$CFLAGS $CPPFLAGS" in
12121	*-D_POSIX_SOURCE*)
12122		termios_bad=dunno ;;
12123	*)	termios_bad=maybe ;;
12124	esac
12125	if test "$termios_bad" = maybe ; then
12126	echo "$as_me:12126: checking whether termios.h needs _POSIX_SOURCE" >&5
12127echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
12128	cat >conftest.$ac_ext <<_ACEOF
12129#line 12129 "configure"
12130#include "confdefs.h"
12131#include <termios.h>
12132int
12133main ()
12134{
12135struct termios foo; int x = foo.c_iflag
12136  ;
12137  return 0;
12138}
12139_ACEOF
12140rm -f conftest.$ac_objext
12141if { (eval echo "$as_me:12141: \"$ac_compile\"") >&5
12142  (eval $ac_compile) 2>&5
12143  ac_status=$?
12144  echo "$as_me:12144: \$? = $ac_status" >&5
12145  (exit $ac_status); } &&
12146         { ac_try='test -s conftest.$ac_objext'
12147  { (eval echo "$as_me:12147: \"$ac_try\"") >&5
12148  (eval $ac_try) 2>&5
12149  ac_status=$?
12150  echo "$as_me:12150: \$? = $ac_status" >&5
12151  (exit $ac_status); }; }; then
12152  termios_bad=no
12153else
12154  echo "$as_me: failed program was:" >&5
12155cat conftest.$ac_ext >&5
12156
12157		cat >conftest.$ac_ext <<_ACEOF
12158#line 12158 "configure"
12159#include "confdefs.h"
12160
12161#define _POSIX_SOURCE
12162#include <termios.h>
12163int
12164main ()
12165{
12166struct termios foo; int x = foo.c_iflag
12167  ;
12168  return 0;
12169}
12170_ACEOF
12171rm -f conftest.$ac_objext
12172if { (eval echo "$as_me:12172: \"$ac_compile\"") >&5
12173  (eval $ac_compile) 2>&5
12174  ac_status=$?
12175  echo "$as_me:12175: \$? = $ac_status" >&5
12176  (exit $ac_status); } &&
12177         { ac_try='test -s conftest.$ac_objext'
12178  { (eval echo "$as_me:12178: \"$ac_try\"") >&5
12179  (eval $ac_try) 2>&5
12180  ac_status=$?
12181  echo "$as_me:12181: \$? = $ac_status" >&5
12182  (exit $ac_status); }; }; then
12183  termios_bad=unknown
12184else
12185  echo "$as_me: failed program was:" >&5
12186cat conftest.$ac_ext >&5
12187termios_bad=yes cat >>confdefs.h <<\EOF
12188#define SVR4_TERMIO 1
12189EOF
12190
12191fi
12192rm -f conftest.$ac_objext conftest.$ac_ext
12193
12194fi
12195rm -f conftest.$ac_objext conftest.$ac_ext
12196	echo "$as_me:12196: result: $termios_bad" >&5
12197echo "${ECHO_T}$termios_bad" >&6
12198	fi
12199fi
12200
12201echo "$as_me:12201: checking for tcgetattr" >&5
12202echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
12203if test "${cf_cv_have_tcgetattr+set}" = set; then
12204  echo $ECHO_N "(cached) $ECHO_C" >&6
12205else
12206
12207cat >conftest.$ac_ext <<_ACEOF
12208#line 12208 "configure"
12209#include "confdefs.h"
12210
12211#include <sys/types.h>
12212#ifdef HAVE_UNISTD_H
12213#include <unistd.h>
12214#endif
12215#ifdef HAVE_TERMIOS_H
12216#include <termios.h>
12217#define TTY struct termios
12218#else
12219#ifdef HAVE_TERMIO_H
12220#include <termio.h>
12221#define TTY struct termio
12222#endif
12223#endif
12224
12225int
12226main ()
12227{
12228
12229TTY foo;
12230tcgetattr(1, &foo);
12231  ;
12232  return 0;
12233}
12234_ACEOF
12235rm -f conftest.$ac_objext conftest$ac_exeext
12236if { (eval echo "$as_me:12236: \"$ac_link\"") >&5
12237  (eval $ac_link) 2>&5
12238  ac_status=$?
12239  echo "$as_me:12239: \$? = $ac_status" >&5
12240  (exit $ac_status); } &&
12241         { ac_try='test -s conftest$ac_exeext'
12242  { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243  (eval $ac_try) 2>&5
12244  ac_status=$?
12245  echo "$as_me:12245: \$? = $ac_status" >&5
12246  (exit $ac_status); }; }; then
12247  cf_cv_have_tcgetattr=yes
12248else
12249  echo "$as_me: failed program was:" >&5
12250cat conftest.$ac_ext >&5
12251cf_cv_have_tcgetattr=no
12252fi
12253rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12254fi
12255echo "$as_me:12255: result: $cf_cv_have_tcgetattr" >&5
12256echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
12257test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
12258#define HAVE_TCGETATTR 1
12259EOF
12260
12261echo "$as_me:12261: checking for vsscanf function or workaround" >&5
12262echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
12263if test "${cf_cv_func_vsscanf+set}" = set; then
12264  echo $ECHO_N "(cached) $ECHO_C" >&6
12265else
12266
12267cat >conftest.$ac_ext <<_ACEOF
12268#line 12268 "configure"
12269#include "confdefs.h"
12270
12271#include <stdarg.h>
12272#include <stdio.h>
12273int
12274main ()
12275{
12276
12277	va_list ap;
12278	vsscanf("from", "%d", ap)
12279  ;
12280  return 0;
12281}
12282_ACEOF
12283rm -f conftest.$ac_objext conftest$ac_exeext
12284if { (eval echo "$as_me:12284: \"$ac_link\"") >&5
12285  (eval $ac_link) 2>&5
12286  ac_status=$?
12287  echo "$as_me:12287: \$? = $ac_status" >&5
12288  (exit $ac_status); } &&
12289         { ac_try='test -s conftest$ac_exeext'
12290  { (eval echo "$as_me:12290: \"$ac_try\"") >&5
12291  (eval $ac_try) 2>&5
12292  ac_status=$?
12293  echo "$as_me:12293: \$? = $ac_status" >&5
12294  (exit $ac_status); }; }; then
12295  cf_cv_func_vsscanf=vsscanf
12296else
12297  echo "$as_me: failed program was:" >&5
12298cat conftest.$ac_ext >&5
12299
12300cat >conftest.$ac_ext <<_ACEOF
12301#line 12301 "configure"
12302#include "confdefs.h"
12303
12304#include <stdarg.h>
12305#include <stdio.h>
12306int
12307main ()
12308{
12309
12310    FILE strbuf;
12311    char *str = "from";
12312
12313    strbuf._flag = _IOREAD;
12314    strbuf._ptr = strbuf._base = (unsigned char *) str;
12315    strbuf._cnt = strlen(str);
12316    strbuf._file = _NFILE;
12317    return (vfscanf(&strbuf, "%d", ap))
12318  ;
12319  return 0;
12320}
12321_ACEOF
12322rm -f conftest.$ac_objext conftest$ac_exeext
12323if { (eval echo "$as_me:12323: \"$ac_link\"") >&5
12324  (eval $ac_link) 2>&5
12325  ac_status=$?
12326  echo "$as_me:12326: \$? = $ac_status" >&5
12327  (exit $ac_status); } &&
12328         { ac_try='test -s conftest$ac_exeext'
12329  { (eval echo "$as_me:12329: \"$ac_try\"") >&5
12330  (eval $ac_try) 2>&5
12331  ac_status=$?
12332  echo "$as_me:12332: \$? = $ac_status" >&5
12333  (exit $ac_status); }; }; then
12334  cf_cv_func_vsscanf=vfscanf
12335else
12336  echo "$as_me: failed program was:" >&5
12337cat conftest.$ac_ext >&5
12338
12339cat >conftest.$ac_ext <<_ACEOF
12340#line 12340 "configure"
12341#include "confdefs.h"
12342
12343#include <stdarg.h>
12344#include <stdio.h>
12345int
12346main ()
12347{
12348
12349    FILE strbuf;
12350    char *str = "from";
12351
12352    strbuf._flag = _IOREAD;
12353    strbuf._ptr = strbuf._base = (unsigned char *) str;
12354    strbuf._cnt = strlen(str);
12355    strbuf._file = _NFILE;
12356    return (_doscan(&strbuf, "%d", ap))
12357  ;
12358  return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext conftest$ac_exeext
12362if { (eval echo "$as_me:12362: \"$ac_link\"") >&5
12363  (eval $ac_link) 2>&5
12364  ac_status=$?
12365  echo "$as_me:12365: \$? = $ac_status" >&5
12366  (exit $ac_status); } &&
12367         { ac_try='test -s conftest$ac_exeext'
12368  { (eval echo "$as_me:12368: \"$ac_try\"") >&5
12369  (eval $ac_try) 2>&5
12370  ac_status=$?
12371  echo "$as_me:12371: \$? = $ac_status" >&5
12372  (exit $ac_status); }; }; then
12373  cf_cv_func_vsscanf=_doscan
12374else
12375  echo "$as_me: failed program was:" >&5
12376cat conftest.$ac_ext >&5
12377
12378cf_cv_func_vsscanf=no
12379fi
12380rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12381fi
12382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12383fi
12384rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12385fi
12386echo "$as_me:12386: result: $cf_cv_func_vsscanf" >&5
12387echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
12388
12389case $cf_cv_func_vsscanf in #(vi
12390vsscanf) cat >>confdefs.h <<\EOF
12391#define HAVE_VSSCANF 1
12392EOF
12393;; #(vi
12394vfscanf) cat >>confdefs.h <<\EOF
12395#define HAVE_VFSCANF 1
12396EOF
12397;; #(vi
12398_doscan) cat >>confdefs.h <<\EOF
12399#define HAVE__DOSCAN 1
12400EOF
12401;;
12402esac
12403
12404echo "$as_me:12404: checking for working mkstemp" >&5
12405echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
12406if test "${cf_cv_func_mkstemp+set}" = set; then
12407  echo $ECHO_N "(cached) $ECHO_C" >&6
12408else
12409
12410rm -f conftest*
12411if test "$cross_compiling" = yes; then
12412  echo "$as_me:12412: checking for mkstemp" >&5
12413echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
12414if test "${ac_cv_func_mkstemp+set}" = set; then
12415  echo $ECHO_N "(cached) $ECHO_C" >&6
12416else
12417  cat >conftest.$ac_ext <<_ACEOF
12418#line 12418 "configure"
12419#include "confdefs.h"
12420/* System header to define __stub macros and hopefully few prototypes,
12421    which can conflict with char mkstemp (); below.  */
12422#include <assert.h>
12423/* Override any gcc2 internal prototype to avoid an error.  */
12424#ifdef __cplusplus
12425extern "C"
12426#endif
12427/* We use char because int might match the return type of a gcc2
12428   builtin and then its argument prototype would still apply.  */
12429char mkstemp ();
12430char (*f) ();
12431
12432int
12433main ()
12434{
12435/* The GNU C library defines this for functions which it implements
12436    to always fail with ENOSYS.  Some functions are actually named
12437    something starting with __ and the normal name is an alias.  */
12438#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
12439choke me
12440#else
12441f = mkstemp;
12442#endif
12443
12444  ;
12445  return 0;
12446}
12447_ACEOF
12448rm -f conftest.$ac_objext conftest$ac_exeext
12449if { (eval echo "$as_me:12449: \"$ac_link\"") >&5
12450  (eval $ac_link) 2>&5
12451  ac_status=$?
12452  echo "$as_me:12452: \$? = $ac_status" >&5
12453  (exit $ac_status); } &&
12454         { ac_try='test -s conftest$ac_exeext'
12455  { (eval echo "$as_me:12455: \"$ac_try\"") >&5
12456  (eval $ac_try) 2>&5
12457  ac_status=$?
12458  echo "$as_me:12458: \$? = $ac_status" >&5
12459  (exit $ac_status); }; }; then
12460  ac_cv_func_mkstemp=yes
12461else
12462  echo "$as_me: failed program was:" >&5
12463cat conftest.$ac_ext >&5
12464ac_cv_func_mkstemp=no
12465fi
12466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12467fi
12468echo "$as_me:12468: result: $ac_cv_func_mkstemp" >&5
12469echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
12470
12471else
12472  cat >conftest.$ac_ext <<_ACEOF
12473#line 12473 "configure"
12474#include "confdefs.h"
12475
12476#include <sys/types.h>
12477#include <stdlib.h>
12478#include <stdio.h>
12479#include <string.h>
12480#include <sys/stat.h>
12481int main()
12482{
12483	char *tmpl = "conftestXXXXXX";
12484	char name[2][80];
12485	int n;
12486	int result = 0;
12487	int fd;
12488	struct stat sb;
12489
12490	umask(077);
12491	for (n = 0; n < 2; ++n) {
12492		strcpy(name[n], tmpl);
12493		if ((fd = mkstemp(name[n])) >= 0) {
12494			if (!strcmp(name[n], tmpl)
12495			 || stat(name[n], &sb) != 0
12496			 || (sb.st_mode & S_IFMT) != S_IFREG
12497			 || (sb.st_mode & 077) != 0) {
12498				result = 1;
12499			}
12500			close(fd);
12501		}
12502	}
12503	if (result == 0
12504	 && !strcmp(name[0], name[1]))
12505		result = 1;
12506	${cf_cv_main_return:-return}(result);
12507}
12508
12509_ACEOF
12510rm -f conftest$ac_exeext
12511if { (eval echo "$as_me:12511: \"$ac_link\"") >&5
12512  (eval $ac_link) 2>&5
12513  ac_status=$?
12514  echo "$as_me:12514: \$? = $ac_status" >&5
12515  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12516  { (eval echo "$as_me:12516: \"$ac_try\"") >&5
12517  (eval $ac_try) 2>&5
12518  ac_status=$?
12519  echo "$as_me:12519: \$? = $ac_status" >&5
12520  (exit $ac_status); }; }; then
12521  cf_cv_func_mkstemp=yes
12522
12523else
12524  echo "$as_me: program exited with status $ac_status" >&5
12525echo "$as_me: failed program was:" >&5
12526cat conftest.$ac_ext >&5
12527cf_cv_func_mkstemp=no
12528
12529fi
12530rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12531fi
12532
12533fi
12534echo "$as_me:12534: result: $cf_cv_func_mkstemp" >&5
12535echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
12536if test "$cf_cv_func_mkstemp" = yes ; then
12537	cat >>confdefs.h <<\EOF
12538#define HAVE_MKSTEMP 1
12539EOF
12540
12541fi
12542
12543# setup for prototype of fallback for vsscanf()
12544
12545if test "$cf_cv_func_vsscanf" = vsscanf ; then
12546	HAVE_VSSCANF=1
12547else
12548	HAVE_VSSCANF=0
12549fi
12550
12551if test "$cross_compiling" = yes ; then
12552	{ echo "$as_me:12552: WARNING: cross compiling: assume setvbuf params not reversed" >&5
12553echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
12554else
12555	echo "$as_me:12555: checking whether setvbuf arguments are reversed" >&5
12556echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
12557if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
12558  echo $ECHO_N "(cached) $ECHO_C" >&6
12559else
12560  if test "$cross_compiling" = yes; then
12561  { { echo "$as_me:12561: error: cannot run test program while cross compiling" >&5
12562echo "$as_me: error: cannot run test program while cross compiling" >&2;}
12563   { (exit 1); exit 1; }; }
12564else
12565  cat >conftest.$ac_ext <<_ACEOF
12566#line 12566 "configure"
12567#include "confdefs.h"
12568#include <stdio.h>
12569/* If setvbuf has the reversed format, exit 0. */
12570int
12571main ()
12572{
12573  /* This call has the arguments reversed.
12574     A reversed system may check and see that the address of main
12575     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
12576  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
12577    $ac_main_return(1);
12578  putc('\r', stdout);
12579  $ac_main_return(0);			/* Non-reversed systems segv here.  */
12580}
12581_ACEOF
12582rm -f conftest$ac_exeext
12583if { (eval echo "$as_me:12583: \"$ac_link\"") >&5
12584  (eval $ac_link) 2>&5
12585  ac_status=$?
12586  echo "$as_me:12586: \$? = $ac_status" >&5
12587  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12588  { (eval echo "$as_me:12588: \"$ac_try\"") >&5
12589  (eval $ac_try) 2>&5
12590  ac_status=$?
12591  echo "$as_me:12591: \$? = $ac_status" >&5
12592  (exit $ac_status); }; }; then
12593  ac_cv_func_setvbuf_reversed=yes
12594else
12595  echo "$as_me: program exited with status $ac_status" >&5
12596echo "$as_me: failed program was:" >&5
12597cat conftest.$ac_ext >&5
12598ac_cv_func_setvbuf_reversed=no
12599fi
12600rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12601fi
12602rm -f core core.* *.core
12603fi
12604echo "$as_me:12604: result: $ac_cv_func_setvbuf_reversed" >&5
12605echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
12606if test $ac_cv_func_setvbuf_reversed = yes; then
12607
12608cat >>confdefs.h <<\EOF
12609#define SETVBUF_REVERSED 1
12610EOF
12611
12612fi
12613
12614fi
12615echo "$as_me:12615: checking return type of signal handlers" >&5
12616echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12617if test "${ac_cv_type_signal+set}" = set; then
12618  echo $ECHO_N "(cached) $ECHO_C" >&6
12619else
12620  cat >conftest.$ac_ext <<_ACEOF
12621#line 12621 "configure"
12622#include "confdefs.h"
12623#include <sys/types.h>
12624#include <signal.h>
12625#ifdef signal
12626# undef signal
12627#endif
12628#ifdef __cplusplus
12629extern "C" void (*signal (int, void (*)(int)))(int);
12630#else
12631void (*signal ()) ();
12632#endif
12633
12634int
12635main ()
12636{
12637int i;
12638  ;
12639  return 0;
12640}
12641_ACEOF
12642rm -f conftest.$ac_objext
12643if { (eval echo "$as_me:12643: \"$ac_compile\"") >&5
12644  (eval $ac_compile) 2>&5
12645  ac_status=$?
12646  echo "$as_me:12646: \$? = $ac_status" >&5
12647  (exit $ac_status); } &&
12648         { ac_try='test -s conftest.$ac_objext'
12649  { (eval echo "$as_me:12649: \"$ac_try\"") >&5
12650  (eval $ac_try) 2>&5
12651  ac_status=$?
12652  echo "$as_me:12652: \$? = $ac_status" >&5
12653  (exit $ac_status); }; }; then
12654  ac_cv_type_signal=void
12655else
12656  echo "$as_me: failed program was:" >&5
12657cat conftest.$ac_ext >&5
12658ac_cv_type_signal=int
12659fi
12660rm -f conftest.$ac_objext conftest.$ac_ext
12661fi
12662echo "$as_me:12662: result: $ac_cv_type_signal" >&5
12663echo "${ECHO_T}$ac_cv_type_signal" >&6
12664
12665cat >>confdefs.h <<EOF
12666#define RETSIGTYPE $ac_cv_type_signal
12667EOF
12668
12669echo "$as_me:12669: checking for type sigaction_t" >&5
12670echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
12671if test "${cf_cv_type_sigaction+set}" = set; then
12672  echo $ECHO_N "(cached) $ECHO_C" >&6
12673else
12674
12675	cat >conftest.$ac_ext <<_ACEOF
12676#line 12676 "configure"
12677#include "confdefs.h"
12678
12679#include <signal.h>
12680int
12681main ()
12682{
12683sigaction_t x
12684  ;
12685  return 0;
12686}
12687_ACEOF
12688rm -f conftest.$ac_objext
12689if { (eval echo "$as_me:12689: \"$ac_compile\"") >&5
12690  (eval $ac_compile) 2>&5
12691  ac_status=$?
12692  echo "$as_me:12692: \$? = $ac_status" >&5
12693  (exit $ac_status); } &&
12694         { ac_try='test -s conftest.$ac_objext'
12695  { (eval echo "$as_me:12695: \"$ac_try\"") >&5
12696  (eval $ac_try) 2>&5
12697  ac_status=$?
12698  echo "$as_me:12698: \$? = $ac_status" >&5
12699  (exit $ac_status); }; }; then
12700  cf_cv_type_sigaction=yes
12701else
12702  echo "$as_me: failed program was:" >&5
12703cat conftest.$ac_ext >&5
12704cf_cv_type_sigaction=no
12705fi
12706rm -f conftest.$ac_objext conftest.$ac_ext
12707fi
12708
12709echo "$as_me:12709: result: $cf_cv_type_sigaction" >&5
12710echo "${ECHO_T}$cf_cv_type_sigaction" >&6
12711test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
12712#define HAVE_TYPE_SIGACTION 1
12713EOF
12714
12715echo "$as_me:12715: checking declaration of size-change" >&5
12716echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
12717if test "${cf_cv_sizechange+set}" = set; then
12718  echo $ECHO_N "(cached) $ECHO_C" >&6
12719else
12720
12721    cf_cv_sizechange=unknown
12722    cf_save_CPPFLAGS="$CPPFLAGS"
12723
12724for cf_opts in "" "NEED_PTEM_H"
12725do
12726
12727    CPPFLAGS="$cf_save_CPPFLAGS"
12728    test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
12729    cat >conftest.$ac_ext <<_ACEOF
12730#line 12730 "configure"
12731#include "confdefs.h"
12732#include <sys/types.h>
12733#ifdef HAVE_TERMIOS_H
12734#include <termios.h>
12735#else
12736#ifdef HAVE_TERMIO_H
12737#include <termio.h>
12738#endif
12739#endif
12740#ifdef NEED_PTEM_H
12741/* This is a workaround for SCO:  they neglected to define struct winsize in
12742 * termios.h -- it's only in termio.h and ptem.h
12743 */
12744#include        <sys/stream.h>
12745#include        <sys/ptem.h>
12746#endif
12747#if !defined(sun) || !defined(HAVE_TERMIOS_H)
12748#include <sys/ioctl.h>
12749#endif
12750
12751int
12752main ()
12753{
12754
12755#ifdef TIOCGSIZE
12756	struct ttysize win;	/* FIXME: what system is this? */
12757	int y = win.ts_lines;
12758	int x = win.ts_cols;
12759#else
12760#ifdef TIOCGWINSZ
12761	struct winsize win;
12762	int y = win.ws_row;
12763	int x = win.ws_col;
12764#else
12765	no TIOCGSIZE or TIOCGWINSZ
12766#endif /* TIOCGWINSZ */
12767#endif /* TIOCGSIZE */
12768
12769  ;
12770  return 0;
12771}
12772_ACEOF
12773rm -f conftest.$ac_objext
12774if { (eval echo "$as_me:12774: \"$ac_compile\"") >&5
12775  (eval $ac_compile) 2>&5
12776  ac_status=$?
12777  echo "$as_me:12777: \$? = $ac_status" >&5
12778  (exit $ac_status); } &&
12779         { ac_try='test -s conftest.$ac_objext'
12780  { (eval echo "$as_me:12780: \"$ac_try\"") >&5
12781  (eval $ac_try) 2>&5
12782  ac_status=$?
12783  echo "$as_me:12783: \$? = $ac_status" >&5
12784  (exit $ac_status); }; }; then
12785  cf_cv_sizechange=yes
12786else
12787  echo "$as_me: failed program was:" >&5
12788cat conftest.$ac_ext >&5
12789cf_cv_sizechange=no
12790fi
12791rm -f conftest.$ac_objext conftest.$ac_ext
12792
12793	CPPFLAGS="$cf_save_CPPFLAGS"
12794	if test "$cf_cv_sizechange" = yes ; then
12795		echo "size-change succeeded ($cf_opts)" >&5
12796		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
12797		break
12798	fi
12799done
12800
12801fi
12802echo "$as_me:12802: result: $cf_cv_sizechange" >&5
12803echo "${ECHO_T}$cf_cv_sizechange" >&6
12804if test "$cf_cv_sizechange" != no ; then
12805	cat >>confdefs.h <<\EOF
12806#define HAVE_SIZECHANGE 1
12807EOF
12808
12809	case $cf_cv_sizechange in #(vi
12810	NEED*)
12811		cat >>confdefs.h <<EOF
12812#define $cf_cv_sizechange  1
12813EOF
12814
12815		;;
12816	esac
12817fi
12818
12819echo "$as_me:12819: checking for memmove" >&5
12820echo $ECHO_N "checking for memmove... $ECHO_C" >&6
12821if test "${ac_cv_func_memmove+set}" = set; then
12822  echo $ECHO_N "(cached) $ECHO_C" >&6
12823else
12824  cat >conftest.$ac_ext <<_ACEOF
12825#line 12825 "configure"
12826#include "confdefs.h"
12827/* System header to define __stub macros and hopefully few prototypes,
12828    which can conflict with char memmove (); below.  */
12829#include <assert.h>
12830/* Override any gcc2 internal prototype to avoid an error.  */
12831#ifdef __cplusplus
12832extern "C"
12833#endif
12834/* We use char because int might match the return type of a gcc2
12835   builtin and then its argument prototype would still apply.  */
12836char memmove ();
12837char (*f) ();
12838
12839int
12840main ()
12841{
12842/* The GNU C library defines this for functions which it implements
12843    to always fail with ENOSYS.  Some functions are actually named
12844    something starting with __ and the normal name is an alias.  */
12845#if defined (__stub_memmove) || defined (__stub___memmove)
12846choke me
12847#else
12848f = memmove;
12849#endif
12850
12851  ;
12852  return 0;
12853}
12854_ACEOF
12855rm -f conftest.$ac_objext conftest$ac_exeext
12856if { (eval echo "$as_me:12856: \"$ac_link\"") >&5
12857  (eval $ac_link) 2>&5
12858  ac_status=$?
12859  echo "$as_me:12859: \$? = $ac_status" >&5
12860  (exit $ac_status); } &&
12861         { ac_try='test -s conftest$ac_exeext'
12862  { (eval echo "$as_me:12862: \"$ac_try\"") >&5
12863  (eval $ac_try) 2>&5
12864  ac_status=$?
12865  echo "$as_me:12865: \$? = $ac_status" >&5
12866  (exit $ac_status); }; }; then
12867  ac_cv_func_memmove=yes
12868else
12869  echo "$as_me: failed program was:" >&5
12870cat conftest.$ac_ext >&5
12871ac_cv_func_memmove=no
12872fi
12873rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12874fi
12875echo "$as_me:12875: result: $ac_cv_func_memmove" >&5
12876echo "${ECHO_T}$ac_cv_func_memmove" >&6
12877if test $ac_cv_func_memmove = yes; then
12878  :
12879else
12880
12881echo "$as_me:12881: checking for bcopy" >&5
12882echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
12883if test "${ac_cv_func_bcopy+set}" = set; then
12884  echo $ECHO_N "(cached) $ECHO_C" >&6
12885else
12886  cat >conftest.$ac_ext <<_ACEOF
12887#line 12887 "configure"
12888#include "confdefs.h"
12889/* System header to define __stub macros and hopefully few prototypes,
12890    which can conflict with char bcopy (); below.  */
12891#include <assert.h>
12892/* Override any gcc2 internal prototype to avoid an error.  */
12893#ifdef __cplusplus
12894extern "C"
12895#endif
12896/* We use char because int might match the return type of a gcc2
12897   builtin and then its argument prototype would still apply.  */
12898char bcopy ();
12899char (*f) ();
12900
12901int
12902main ()
12903{
12904/* The GNU C library defines this for functions which it implements
12905    to always fail with ENOSYS.  Some functions are actually named
12906    something starting with __ and the normal name is an alias.  */
12907#if defined (__stub_bcopy) || defined (__stub___bcopy)
12908choke me
12909#else
12910f = bcopy;
12911#endif
12912
12913  ;
12914  return 0;
12915}
12916_ACEOF
12917rm -f conftest.$ac_objext conftest$ac_exeext
12918if { (eval echo "$as_me:12918: \"$ac_link\"") >&5
12919  (eval $ac_link) 2>&5
12920  ac_status=$?
12921  echo "$as_me:12921: \$? = $ac_status" >&5
12922  (exit $ac_status); } &&
12923         { ac_try='test -s conftest$ac_exeext'
12924  { (eval echo "$as_me:12924: \"$ac_try\"") >&5
12925  (eval $ac_try) 2>&5
12926  ac_status=$?
12927  echo "$as_me:12927: \$? = $ac_status" >&5
12928  (exit $ac_status); }; }; then
12929  ac_cv_func_bcopy=yes
12930else
12931  echo "$as_me: failed program was:" >&5
12932cat conftest.$ac_ext >&5
12933ac_cv_func_bcopy=no
12934fi
12935rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12936fi
12937echo "$as_me:12937: result: $ac_cv_func_bcopy" >&5
12938echo "${ECHO_T}$ac_cv_func_bcopy" >&6
12939if test $ac_cv_func_bcopy = yes; then
12940
12941	echo "$as_me:12941: checking if bcopy does overlapping moves" >&5
12942echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
12943if test "${cf_cv_good_bcopy+set}" = set; then
12944  echo $ECHO_N "(cached) $ECHO_C" >&6
12945else
12946
12947		if test "$cross_compiling" = yes; then
12948  cf_cv_good_bcopy=unknown
12949else
12950  cat >conftest.$ac_ext <<_ACEOF
12951#line 12951 "configure"
12952#include "confdefs.h"
12953
12954int main() {
12955	static char data[] = "abcdefghijklmnopqrstuwwxyz";
12956	char temp[40];
12957	bcopy(data, temp, sizeof(data));
12958	bcopy(temp+10, temp, 15);
12959	bcopy(temp+5, temp+15, 10);
12960	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
12961}
12962
12963_ACEOF
12964rm -f conftest$ac_exeext
12965if { (eval echo "$as_me:12965: \"$ac_link\"") >&5
12966  (eval $ac_link) 2>&5
12967  ac_status=$?
12968  echo "$as_me:12968: \$? = $ac_status" >&5
12969  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12970  { (eval echo "$as_me:12970: \"$ac_try\"") >&5
12971  (eval $ac_try) 2>&5
12972  ac_status=$?
12973  echo "$as_me:12973: \$? = $ac_status" >&5
12974  (exit $ac_status); }; }; then
12975  cf_cv_good_bcopy=yes
12976else
12977  echo "$as_me: program exited with status $ac_status" >&5
12978echo "$as_me: failed program was:" >&5
12979cat conftest.$ac_ext >&5
12980cf_cv_good_bcopy=no
12981fi
12982rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12983fi
12984
12985fi
12986echo "$as_me:12986: result: $cf_cv_good_bcopy" >&5
12987echo "${ECHO_T}$cf_cv_good_bcopy" >&6
12988
12989else
12990  cf_cv_good_bcopy=no
12991fi
12992
12993	if test "$cf_cv_good_bcopy" = yes ; then
12994		cat >>confdefs.h <<\EOF
12995#define USE_OK_BCOPY 1
12996EOF
12997
12998	else
12999		cat >>confdefs.h <<\EOF
13000#define USE_MY_MEMMOVE 1
13001EOF
13002
13003	fi
13004
13005fi
13006
13007echo "$as_me:13007: checking if poll really works" >&5
13008echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
13009if test "${cf_cv_working_poll+set}" = set; then
13010  echo $ECHO_N "(cached) $ECHO_C" >&6
13011else
13012
13013if test "$cross_compiling" = yes; then
13014  cf_cv_working_poll=unknown
13015else
13016  cat >conftest.$ac_ext <<_ACEOF
13017#line 13017 "configure"
13018#include "confdefs.h"
13019
13020#include <stdio.h>
13021#ifdef HAVE_POLL_H
13022#include <poll.h>
13023#else
13024#include <sys/poll.h>
13025#endif
13026int main() {
13027	struct pollfd myfds;
13028	int ret;
13029
13030	myfds.fd = 0;
13031	myfds.events = POLLIN;
13032
13033	ret = poll(&myfds, 1, 100);
13034	${cf_cv_main_return:-return}(ret != 0);
13035}
13036_ACEOF
13037rm -f conftest$ac_exeext
13038if { (eval echo "$as_me:13038: \"$ac_link\"") >&5
13039  (eval $ac_link) 2>&5
13040  ac_status=$?
13041  echo "$as_me:13041: \$? = $ac_status" >&5
13042  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13043  { (eval echo "$as_me:13043: \"$ac_try\"") >&5
13044  (eval $ac_try) 2>&5
13045  ac_status=$?
13046  echo "$as_me:13046: \$? = $ac_status" >&5
13047  (exit $ac_status); }; }; then
13048  cf_cv_working_poll=yes
13049else
13050  echo "$as_me: program exited with status $ac_status" >&5
13051echo "$as_me: failed program was:" >&5
13052cat conftest.$ac_ext >&5
13053cf_cv_working_poll=no
13054fi
13055rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13056fi
13057fi
13058echo "$as_me:13058: result: $cf_cv_working_poll" >&5
13059echo "${ECHO_T}$cf_cv_working_poll" >&6
13060test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
13061#define HAVE_WORKING_POLL 1
13062EOF
13063
13064if test "$with_hashed_db" != no ; then
13065	cat >>confdefs.h <<\EOF
13066#define USE_HASHED_DB 1
13067EOF
13068
13069echo "$as_me:13069: checking for db.h" >&5
13070echo $ECHO_N "checking for db.h... $ECHO_C" >&6
13071if test "${ac_cv_header_db_h+set}" = set; then
13072  echo $ECHO_N "(cached) $ECHO_C" >&6
13073else
13074  cat >conftest.$ac_ext <<_ACEOF
13075#line 13075 "configure"
13076#include "confdefs.h"
13077#include <db.h>
13078_ACEOF
13079if { (eval echo "$as_me:13079: \"$ac_cpp conftest.$ac_ext\"") >&5
13080  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13081  ac_status=$?
13082  egrep -v '^ *\+' conftest.er1 >conftest.err
13083  rm -f conftest.er1
13084  cat conftest.err >&5
13085  echo "$as_me:13085: \$? = $ac_status" >&5
13086  (exit $ac_status); } >/dev/null; then
13087  if test -s conftest.err; then
13088    ac_cpp_err=$ac_c_preproc_warn_flag
13089  else
13090    ac_cpp_err=
13091  fi
13092else
13093  ac_cpp_err=yes
13094fi
13095if test -z "$ac_cpp_err"; then
13096  ac_cv_header_db_h=yes
13097else
13098  echo "$as_me: failed program was:" >&5
13099  cat conftest.$ac_ext >&5
13100  ac_cv_header_db_h=no
13101fi
13102rm -f conftest.err conftest.$ac_ext
13103fi
13104echo "$as_me:13104: result: $ac_cv_header_db_h" >&5
13105echo "${ECHO_T}$ac_cv_header_db_h" >&6
13106if test $ac_cv_header_db_h = yes; then
13107
13108echo "$as_me:13108: checking for version of db" >&5
13109echo $ECHO_N "checking for version of db... $ECHO_C" >&6
13110if test "${cf_cv_hashed_db_version+set}" = set; then
13111  echo $ECHO_N "(cached) $ECHO_C" >&6
13112else
13113
13114cf_cv_hashed_db_version=unknown
13115
13116for cf_db_version in 1 2 3 4
13117do
13118
13119echo "(line 13119) testing checking for db version $cf_db_version ..." 1>&5
13120
13121	cat >conftest.$ac_ext <<_ACEOF
13122#line 13122 "configure"
13123#include "confdefs.h"
13124
13125$ac_includes_default
13126#include <db.h>
13127
13128#ifdef DB_VERSION_MAJOR
13129	/* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
13130#if $cf_db_version == DB_VERSION_MAJOR
13131	/* ok */
13132#else
13133	make an error
13134#endif
13135#else
13136#if $cf_db_version == 1
13137	/* ok: assuming this is DB 1.8.5 */
13138#else
13139	make an error
13140#endif
13141#endif
13142
13143int
13144main ()
13145{
13146DBT *foo = 0
13147  ;
13148  return 0;
13149}
13150_ACEOF
13151rm -f conftest.$ac_objext
13152if { (eval echo "$as_me:13152: \"$ac_compile\"") >&5
13153  (eval $ac_compile) 2>&5
13154  ac_status=$?
13155  echo "$as_me:13155: \$? = $ac_status" >&5
13156  (exit $ac_status); } &&
13157         { ac_try='test -s conftest.$ac_objext'
13158  { (eval echo "$as_me:13158: \"$ac_try\"") >&5
13159  (eval $ac_try) 2>&5
13160  ac_status=$?
13161  echo "$as_me:13161: \$? = $ac_status" >&5
13162  (exit $ac_status); }; }; then
13163
13164	cf_cv_hashed_db_version=$cf_db_version
13165	break
13166
13167else
13168  echo "$as_me: failed program was:" >&5
13169cat conftest.$ac_ext >&5
13170fi
13171rm -f conftest.$ac_objext conftest.$ac_ext
13172done
13173
13174fi
13175echo "$as_me:13175: result: $cf_cv_hashed_db_version" >&5
13176echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
13177
13178if test "$cf_cv_hashed_db_version" = unknown ; then
13179	{ { echo "$as_me:13179: error: Cannot determine version of db" >&5
13180echo "$as_me: error: Cannot determine version of db" >&2;}
13181   { (exit 1); exit 1; }; }
13182else
13183
13184echo "$as_me:13184: checking for db libraries" >&5
13185echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
13186if test "${cf_cv_hashed_db_libs+set}" = set; then
13187  echo $ECHO_N "(cached) $ECHO_C" >&6
13188else
13189
13190cf_cv_hashed_db_libs=unknown
13191for cf_db_libs in db$cf_cv_hashed_db_version db ''
13192do
13193	cf_save_libs="$LIBS"
13194	if test -n "$cf_db_libs"; then
13195		LIBS="-l$cf_db_libs $LIBS"
13196	fi
13197
13198echo "(line 13198) testing checking for library "$cf_db_libs" ..." 1>&5
13199
13200	cat >conftest.$ac_ext <<_ACEOF
13201#line 13201 "configure"
13202#include "confdefs.h"
13203
13204$ac_includes_default
13205#include <db.h>
13206
13207int
13208main ()
13209{
13210
13211	char *path = "/tmp/foo";
13212#ifdef DB_VERSION_MAJOR
13213#if DB_VERSION_MAJOR >= 4
13214	DB *result = 0;
13215	db_create(&result, NULL, 0);
13216	result->open(result,
13217		NULL,
13218		path,
13219		path,
13220		DB_HASH,
13221		DB_CREATE,
13222		0644);
13223#elif DB_VERSION_MAJOR >= 3
13224	DB *result = 0;
13225	db_create(&result, NULL, 0);
13226	result->open(result,
13227		path,
13228		path,
13229		DB_HASH,
13230		DB_CREATE,
13231		0644);
13232#elif DB_VERSION_MAJOR >= 2
13233	DB *result = 0;
13234	db_open(path,
13235		DB_HASH,
13236		DB_CREATE,
13237		0644,
13238		(DB_ENV *) 0,
13239		(DB_INFO *) 0,
13240		&result);
13241#endif /* DB_VERSION_MAJOR */
13242#else
13243	DB *result = dbopen(path,
13244		     2,
13245		     0644,
13246		     DB_HASH,
13247		     0);
13248#endif
13249	${cf_cv_main_return:-return}(result != 0)
13250
13251  ;
13252  return 0;
13253}
13254_ACEOF
13255rm -f conftest.$ac_objext conftest$ac_exeext
13256if { (eval echo "$as_me:13256: \"$ac_link\"") >&5
13257  (eval $ac_link) 2>&5
13258  ac_status=$?
13259  echo "$as_me:13259: \$? = $ac_status" >&5
13260  (exit $ac_status); } &&
13261         { ac_try='test -s conftest$ac_exeext'
13262  { (eval echo "$as_me:13262: \"$ac_try\"") >&5
13263  (eval $ac_try) 2>&5
13264  ac_status=$?
13265  echo "$as_me:13265: \$? = $ac_status" >&5
13266  (exit $ac_status); }; }; then
13267
13268	if test -n "$cf_db_libs" ; then
13269		cf_cv_hashed_db_libs=$cf_db_libs
13270	else
13271		cf_cv_hashed_db_libs=default
13272	fi
13273	LIBS="$cf_save_libs"
13274	break
13275
13276else
13277  echo "$as_me: failed program was:" >&5
13278cat conftest.$ac_ext >&5
13279fi
13280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13281	LIBS="$cf_save_libs"
13282done
13283
13284fi
13285echo "$as_me:13285: result: $cf_cv_hashed_db_libs" >&5
13286echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
13287
13288	if test "$cf_cv_hashed_db_libs" = unknown ; then
13289		{ { echo "$as_me:13289: error: Cannot determine library for db" >&5
13290echo "$as_me: error: Cannot determine library for db" >&2;}
13291   { (exit 1); exit 1; }; }
13292	elif test "$cf_cv_hashed_db_libs" != default ; then
13293		LIBS="-l$cf_cv_hashed_db_libs $LIBS"
13294	fi
13295fi
13296
13297else
13298
13299	{ { echo "$as_me:13299: error: Cannot find db.h" >&5
13300echo "$as_me: error: Cannot find db.h" >&2;}
13301   { (exit 1); exit 1; }; }
13302
13303fi
13304
13305fi
13306
13307if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
13308	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13309	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
13310fi
13311
13312# Just in case, check if the C compiler has a bool type.
13313
13314echo "$as_me:13314: checking if we should include stdbool.h" >&5
13315echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13316
13317if test "${cf_cv_header_stdbool_h+set}" = set; then
13318  echo $ECHO_N "(cached) $ECHO_C" >&6
13319else
13320
13321	cat >conftest.$ac_ext <<_ACEOF
13322#line 13322 "configure"
13323#include "confdefs.h"
13324
13325int
13326main ()
13327{
13328bool foo = false
13329  ;
13330  return 0;
13331}
13332_ACEOF
13333rm -f conftest.$ac_objext
13334if { (eval echo "$as_me:13334: \"$ac_compile\"") >&5
13335  (eval $ac_compile) 2>&5
13336  ac_status=$?
13337  echo "$as_me:13337: \$? = $ac_status" >&5
13338  (exit $ac_status); } &&
13339         { ac_try='test -s conftest.$ac_objext'
13340  { (eval echo "$as_me:13340: \"$ac_try\"") >&5
13341  (eval $ac_try) 2>&5
13342  ac_status=$?
13343  echo "$as_me:13343: \$? = $ac_status" >&5
13344  (exit $ac_status); }; }; then
13345  cf_cv_header_stdbool_h=0
13346else
13347  echo "$as_me: failed program was:" >&5
13348cat conftest.$ac_ext >&5
13349cat >conftest.$ac_ext <<_ACEOF
13350#line 13350 "configure"
13351#include "confdefs.h"
13352
13353#ifndef __BEOS__
13354#include <stdbool.h>
13355#endif
13356
13357int
13358main ()
13359{
13360bool foo = false
13361  ;
13362  return 0;
13363}
13364_ACEOF
13365rm -f conftest.$ac_objext
13366if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
13367  (eval $ac_compile) 2>&5
13368  ac_status=$?
13369  echo "$as_me:13369: \$? = $ac_status" >&5
13370  (exit $ac_status); } &&
13371         { ac_try='test -s conftest.$ac_objext'
13372  { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373  (eval $ac_try) 2>&5
13374  ac_status=$?
13375  echo "$as_me:13375: \$? = $ac_status" >&5
13376  (exit $ac_status); }; }; then
13377  cf_cv_header_stdbool_h=1
13378else
13379  echo "$as_me: failed program was:" >&5
13380cat conftest.$ac_ext >&5
13381cf_cv_header_stdbool_h=0
13382fi
13383rm -f conftest.$ac_objext conftest.$ac_ext
13384fi
13385rm -f conftest.$ac_objext conftest.$ac_ext
13386fi
13387
13388if test "$cf_cv_header_stdbool_h" = 1
13389then	echo "$as_me:13389: result: yes" >&5
13390echo "${ECHO_T}yes" >&6
13391else	echo "$as_me:13391: result: no" >&5
13392echo "${ECHO_T}no" >&6
13393fi
13394
13395echo "$as_me:13395: checking for builtin bool type" >&5
13396echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13397
13398if test "${cf_cv_cc_bool_type+set}" = set; then
13399  echo $ECHO_N "(cached) $ECHO_C" >&6
13400else
13401
13402	cat >conftest.$ac_ext <<_ACEOF
13403#line 13403 "configure"
13404#include "confdefs.h"
13405
13406#include <stdio.h>
13407#include <sys/types.h>
13408
13409int
13410main ()
13411{
13412bool x = false
13413  ;
13414  return 0;
13415}
13416_ACEOF
13417rm -f conftest.$ac_objext
13418if { (eval echo "$as_me:13418: \"$ac_compile\"") >&5
13419  (eval $ac_compile) 2>&5
13420  ac_status=$?
13421  echo "$as_me:13421: \$? = $ac_status" >&5
13422  (exit $ac_status); } &&
13423         { ac_try='test -s conftest.$ac_objext'
13424  { (eval echo "$as_me:13424: \"$ac_try\"") >&5
13425  (eval $ac_try) 2>&5
13426  ac_status=$?
13427  echo "$as_me:13427: \$? = $ac_status" >&5
13428  (exit $ac_status); }; }; then
13429  cf_cv_cc_bool_type=1
13430else
13431  echo "$as_me: failed program was:" >&5
13432cat conftest.$ac_ext >&5
13433cf_cv_cc_bool_type=0
13434fi
13435rm -f conftest.$ac_objext conftest.$ac_ext
13436
13437fi
13438
13439if test "$cf_cv_cc_bool_type" = 1
13440then	echo "$as_me:13440: result: yes" >&5
13441echo "${ECHO_T}yes" >&6
13442else	echo "$as_me:13442: result: no" >&5
13443echo "${ECHO_T}no" >&6
13444fi
13445
13446# Check for C++ compiler characteristics (and ensure that it's there!)
13447if test -n "$CXX" ; then
13448	ac_ext=cc
13449ac_cpp='$CXXCPP $CPPFLAGS'
13450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13453ac_main_return=return
13454
13455if test -n "$GXX" ; then
13456case $cf_cv_system_name in #(vi
13457os2*) #(vi
13458	cf_stdcpp_libname=stdcpp
13459	;;
13460*)
13461	cf_stdcpp_libname=stdc++
13462	;;
13463esac
13464echo "$as_me:13464: checking for library $cf_stdcpp_libname" >&5
13465echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
13466if test "${cf_cv_libstdcpp+set}" = set; then
13467  echo $ECHO_N "(cached) $ECHO_C" >&6
13468else
13469
13470	cf_save="$LIBS"
13471	LIBS="$LIBS -l$cf_stdcpp_libname"
13472cat >conftest.$ac_ext <<_ACEOF
13473#line 13473 "configure"
13474#include "confdefs.h"
13475
13476#include <strstream.h>
13477int
13478main ()
13479{
13480
13481char buf[80];
13482strstreambuf foo(buf, sizeof(buf))
13483
13484  ;
13485  return 0;
13486}
13487_ACEOF
13488rm -f conftest.$ac_objext conftest$ac_exeext
13489if { (eval echo "$as_me:13489: \"$ac_link\"") >&5
13490  (eval $ac_link) 2>&5
13491  ac_status=$?
13492  echo "$as_me:13492: \$? = $ac_status" >&5
13493  (exit $ac_status); } &&
13494         { ac_try='test -s conftest$ac_exeext'
13495  { (eval echo "$as_me:13495: \"$ac_try\"") >&5
13496  (eval $ac_try) 2>&5
13497  ac_status=$?
13498  echo "$as_me:13498: \$? = $ac_status" >&5
13499  (exit $ac_status); }; }; then
13500  cf_cv_libstdcpp=yes
13501else
13502  echo "$as_me: failed program was:" >&5
13503cat conftest.$ac_ext >&5
13504cf_cv_libstdcpp=no
13505fi
13506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13507	LIBS="$cf_save"
13508
13509fi
13510echo "$as_me:13510: result: $cf_cv_libstdcpp" >&5
13511echo "${ECHO_T}$cf_cv_libstdcpp" >&6
13512test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
13513fi
13514
13515	echo "$as_me:13515: checking whether $CXX understands -c and -o together" >&5
13516echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
13517if test "${cf_cv_prog_CXX_c_o+set}" = set; then
13518  echo $ECHO_N "(cached) $ECHO_C" >&6
13519else
13520
13521cat > conftest.$ac_ext <<CF_EOF
13522#include <stdio.h>
13523int main()
13524{
13525	${cf_cv_main_return:-return}(0);
13526}
13527CF_EOF
13528# We do the test twice because some compilers refuse to overwrite an
13529# existing .o file with -o, though they will create one.
13530ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
13531if { (eval echo "$as_me:13531: \"$ac_try\"") >&5
13532  (eval $ac_try) 2>&5
13533  ac_status=$?
13534  echo "$as_me:13534: \$? = $ac_status" >&5
13535  (exit $ac_status); } &&
13536  test -f conftest2.$ac_objext && { (eval echo "$as_me:13536: \"$ac_try\"") >&5
13537  (eval $ac_try) 2>&5
13538  ac_status=$?
13539  echo "$as_me:13539: \$? = $ac_status" >&5
13540  (exit $ac_status); };
13541then
13542  eval cf_cv_prog_CXX_c_o=yes
13543else
13544  eval cf_cv_prog_CXX_c_o=no
13545fi
13546rm -f conftest*
13547
13548fi
13549if test $cf_cv_prog_CXX_c_o = yes; then
13550  echo "$as_me:13550: result: yes" >&5
13551echo "${ECHO_T}yes" >&6
13552else
13553  echo "$as_me:13553: result: no" >&5
13554echo "${ECHO_T}no" >&6
13555fi
13556
13557	case $GXX_VERSION in
13558	1*|2.0-6*)
13559		cf_cxx_library=yes
13560		;;
13561	*-2.7*|2.7*)
13562
13563cf_cxx_library=unknown
13564case $cf_cv_system_name in #(vi
13565os2*) #(vi
13566	cf_gpp_libname=gpp
13567	;;
13568*)
13569	cf_gpp_libname=g++
13570	;;
13571esac
13572if test "$GXX" = yes; then
13573	echo "$as_me:13573: checking for lib$cf_gpp_libname" >&5
13574echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
13575	cf_save="$LIBS"
13576	LIBS="$LIBS -l$cf_gpp_libname"
13577	cat >conftest.$ac_ext <<_ACEOF
13578#line 13578 "configure"
13579#include "confdefs.h"
13580
13581#include <$cf_gpp_libname/builtin.h>
13582
13583int
13584main ()
13585{
13586two_arg_error_handler_t foo2 = lib_error_handler
13587  ;
13588  return 0;
13589}
13590_ACEOF
13591rm -f conftest.$ac_objext conftest$ac_exeext
13592if { (eval echo "$as_me:13592: \"$ac_link\"") >&5
13593  (eval $ac_link) 2>&5
13594  ac_status=$?
13595  echo "$as_me:13595: \$? = $ac_status" >&5
13596  (exit $ac_status); } &&
13597         { ac_try='test -s conftest$ac_exeext'
13598  { (eval echo "$as_me:13598: \"$ac_try\"") >&5
13599  (eval $ac_try) 2>&5
13600  ac_status=$?
13601  echo "$as_me:13601: \$? = $ac_status" >&5
13602  (exit $ac_status); }; }; then
13603  cf_cxx_library=yes
13604	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13605	 if test "$cf_gpp_libname" = cpp ; then
13606	    cat >>confdefs.h <<\EOF
13607#define HAVE_GPP_BUILTIN_H 1
13608EOF
13609
13610	 else
13611	    cat >>confdefs.h <<\EOF
13612#define HAVE_GXX_BUILTIN_H 1
13613EOF
13614
13615	 fi
13616else
13617  echo "$as_me: failed program was:" >&5
13618cat conftest.$ac_ext >&5
13619cat >conftest.$ac_ext <<_ACEOF
13620#line 13620 "configure"
13621#include "confdefs.h"
13622
13623#include <builtin.h>
13624
13625int
13626main ()
13627{
13628two_arg_error_handler_t foo2 = lib_error_handler
13629  ;
13630  return 0;
13631}
13632_ACEOF
13633rm -f conftest.$ac_objext conftest$ac_exeext
13634if { (eval echo "$as_me:13634: \"$ac_link\"") >&5
13635  (eval $ac_link) 2>&5
13636  ac_status=$?
13637  echo "$as_me:13637: \$? = $ac_status" >&5
13638  (exit $ac_status); } &&
13639         { ac_try='test -s conftest$ac_exeext'
13640  { (eval echo "$as_me:13640: \"$ac_try\"") >&5
13641  (eval $ac_try) 2>&5
13642  ac_status=$?
13643  echo "$as_me:13643: \$? = $ac_status" >&5
13644  (exit $ac_status); }; }; then
13645  cf_cxx_library=yes
13646	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
13647	 cat >>confdefs.h <<\EOF
13648#define HAVE_BUILTIN_H 1
13649EOF
13650
13651else
13652  echo "$as_me: failed program was:" >&5
13653cat conftest.$ac_ext >&5
13654cf_cxx_library=no
13655fi
13656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13657fi
13658rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13659	LIBS="$cf_save"
13660	echo "$as_me:13660: result: $cf_cxx_library" >&5
13661echo "${ECHO_T}$cf_cxx_library" >&6
13662fi
13663
13664		;;
13665	*)
13666		cf_cxx_library=no
13667		;;
13668	esac
13669
13670	ac_ext=cc
13671ac_cpp='$CXXCPP $CPPFLAGS'
13672ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13673ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13674ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13675ac_main_return=return
13676echo "$as_me:13676: checking how to run the C++ preprocessor" >&5
13677echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
13678if test -z "$CXXCPP"; then
13679  if test "${ac_cv_prog_CXXCPP+set}" = set; then
13680  echo $ECHO_N "(cached) $ECHO_C" >&6
13681else
13682      # Double quotes because CXXCPP needs to be expanded
13683    for CXXCPP in "$CXX -E" "/lib/cpp"
13684    do
13685      ac_preproc_ok=false
13686for ac_cxx_preproc_warn_flag in '' yes
13687do
13688  # Use a header file that comes with gcc, so configuring glibc
13689  # with a fresh cross-compiler works.
13690  # On the NeXT, cc -E runs the code through the compiler's parser,
13691  # not just through cpp. "Syntax error" is here to catch this case.
13692  cat >conftest.$ac_ext <<_ACEOF
13693#line 13693 "configure"
13694#include "confdefs.h"
13695#include <assert.h>
13696                     Syntax error
13697_ACEOF
13698if { (eval echo "$as_me:13698: \"$ac_cpp conftest.$ac_ext\"") >&5
13699  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13700  ac_status=$?
13701  egrep -v '^ *\+' conftest.er1 >conftest.err
13702  rm -f conftest.er1
13703  cat conftest.err >&5
13704  echo "$as_me:13704: \$? = $ac_status" >&5
13705  (exit $ac_status); } >/dev/null; then
13706  if test -s conftest.err; then
13707    ac_cpp_err=$ac_cxx_preproc_warn_flag
13708  else
13709    ac_cpp_err=
13710  fi
13711else
13712  ac_cpp_err=yes
13713fi
13714if test -z "$ac_cpp_err"; then
13715  :
13716else
13717  echo "$as_me: failed program was:" >&5
13718  cat conftest.$ac_ext >&5
13719  # Broken: fails on valid input.
13720continue
13721fi
13722rm -f conftest.err conftest.$ac_ext
13723
13724  # OK, works on sane cases.  Now check whether non-existent headers
13725  # can be detected and how.
13726  cat >conftest.$ac_ext <<_ACEOF
13727#line 13727 "configure"
13728#include "confdefs.h"
13729#include <ac_nonexistent.h>
13730_ACEOF
13731if { (eval echo "$as_me:13731: \"$ac_cpp conftest.$ac_ext\"") >&5
13732  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13733  ac_status=$?
13734  egrep -v '^ *\+' conftest.er1 >conftest.err
13735  rm -f conftest.er1
13736  cat conftest.err >&5
13737  echo "$as_me:13737: \$? = $ac_status" >&5
13738  (exit $ac_status); } >/dev/null; then
13739  if test -s conftest.err; then
13740    ac_cpp_err=$ac_cxx_preproc_warn_flag
13741  else
13742    ac_cpp_err=
13743  fi
13744else
13745  ac_cpp_err=yes
13746fi
13747if test -z "$ac_cpp_err"; then
13748  # Broken: success on invalid input.
13749continue
13750else
13751  echo "$as_me: failed program was:" >&5
13752  cat conftest.$ac_ext >&5
13753  # Passes both tests.
13754ac_preproc_ok=:
13755break
13756fi
13757rm -f conftest.err conftest.$ac_ext
13758
13759done
13760# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13761rm -f conftest.err conftest.$ac_ext
13762if $ac_preproc_ok; then
13763  break
13764fi
13765
13766    done
13767    ac_cv_prog_CXXCPP=$CXXCPP
13768
13769fi
13770  CXXCPP=$ac_cv_prog_CXXCPP
13771else
13772  ac_cv_prog_CXXCPP=$CXXCPP
13773fi
13774echo "$as_me:13774: result: $CXXCPP" >&5
13775echo "${ECHO_T}$CXXCPP" >&6
13776ac_preproc_ok=false
13777for ac_cxx_preproc_warn_flag in '' yes
13778do
13779  # Use a header file that comes with gcc, so configuring glibc
13780  # with a fresh cross-compiler works.
13781  # On the NeXT, cc -E runs the code through the compiler's parser,
13782  # not just through cpp. "Syntax error" is here to catch this case.
13783  cat >conftest.$ac_ext <<_ACEOF
13784#line 13784 "configure"
13785#include "confdefs.h"
13786#include <assert.h>
13787                     Syntax error
13788_ACEOF
13789if { (eval echo "$as_me:13789: \"$ac_cpp conftest.$ac_ext\"") >&5
13790  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13791  ac_status=$?
13792  egrep -v '^ *\+' conftest.er1 >conftest.err
13793  rm -f conftest.er1
13794  cat conftest.err >&5
13795  echo "$as_me:13795: \$? = $ac_status" >&5
13796  (exit $ac_status); } >/dev/null; then
13797  if test -s conftest.err; then
13798    ac_cpp_err=$ac_cxx_preproc_warn_flag
13799  else
13800    ac_cpp_err=
13801  fi
13802else
13803  ac_cpp_err=yes
13804fi
13805if test -z "$ac_cpp_err"; then
13806  :
13807else
13808  echo "$as_me: failed program was:" >&5
13809  cat conftest.$ac_ext >&5
13810  # Broken: fails on valid input.
13811continue
13812fi
13813rm -f conftest.err conftest.$ac_ext
13814
13815  # OK, works on sane cases.  Now check whether non-existent headers
13816  # can be detected and how.
13817  cat >conftest.$ac_ext <<_ACEOF
13818#line 13818 "configure"
13819#include "confdefs.h"
13820#include <ac_nonexistent.h>
13821_ACEOF
13822if { (eval echo "$as_me:13822: \"$ac_cpp conftest.$ac_ext\"") >&5
13823  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13824  ac_status=$?
13825  egrep -v '^ *\+' conftest.er1 >conftest.err
13826  rm -f conftest.er1
13827  cat conftest.err >&5
13828  echo "$as_me:13828: \$? = $ac_status" >&5
13829  (exit $ac_status); } >/dev/null; then
13830  if test -s conftest.err; then
13831    ac_cpp_err=$ac_cxx_preproc_warn_flag
13832  else
13833    ac_cpp_err=
13834  fi
13835else
13836  ac_cpp_err=yes
13837fi
13838if test -z "$ac_cpp_err"; then
13839  # Broken: success on invalid input.
13840continue
13841else
13842  echo "$as_me: failed program was:" >&5
13843  cat conftest.$ac_ext >&5
13844  # Passes both tests.
13845ac_preproc_ok=:
13846break
13847fi
13848rm -f conftest.err conftest.$ac_ext
13849
13850done
13851# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
13852rm -f conftest.err conftest.$ac_ext
13853if $ac_preproc_ok; then
13854  :
13855else
13856  { { echo "$as_me:13856: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
13857echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
13858   { (exit 1); exit 1; }; }
13859fi
13860
13861ac_ext=cc
13862ac_cpp='$CXXCPP $CPPFLAGS'
13863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13866ac_main_return=return
13867
13868for ac_header in typeinfo
13869do
13870as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13871echo "$as_me:13871: checking for $ac_header" >&5
13872echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13873if eval "test \"\${$as_ac_Header+set}\" = set"; then
13874  echo $ECHO_N "(cached) $ECHO_C" >&6
13875else
13876  cat >conftest.$ac_ext <<_ACEOF
13877#line 13877 "configure"
13878#include "confdefs.h"
13879#include <$ac_header>
13880_ACEOF
13881if { (eval echo "$as_me:13881: \"$ac_cpp conftest.$ac_ext\"") >&5
13882  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13883  ac_status=$?
13884  egrep -v '^ *\+' conftest.er1 >conftest.err
13885  rm -f conftest.er1
13886  cat conftest.err >&5
13887  echo "$as_me:13887: \$? = $ac_status" >&5
13888  (exit $ac_status); } >/dev/null; then
13889  if test -s conftest.err; then
13890    ac_cpp_err=$ac_cxx_preproc_warn_flag
13891  else
13892    ac_cpp_err=
13893  fi
13894else
13895  ac_cpp_err=yes
13896fi
13897if test -z "$ac_cpp_err"; then
13898  eval "$as_ac_Header=yes"
13899else
13900  echo "$as_me: failed program was:" >&5
13901  cat conftest.$ac_ext >&5
13902  eval "$as_ac_Header=no"
13903fi
13904rm -f conftest.err conftest.$ac_ext
13905fi
13906echo "$as_me:13906: result: `eval echo '${'$as_ac_Header'}'`" >&5
13907echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13908if test `eval echo '${'$as_ac_Header'}'` = yes; then
13909  cat >>confdefs.h <<EOF
13910#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13911EOF
13912
13913fi
13914done
13915
13916echo "$as_me:13916: checking if we should include stdbool.h" >&5
13917echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
13918
13919if test "${cf_cv_header_stdbool_h+set}" = set; then
13920  echo $ECHO_N "(cached) $ECHO_C" >&6
13921else
13922
13923	cat >conftest.$ac_ext <<_ACEOF
13924#line 13924 "configure"
13925#include "confdefs.h"
13926
13927int
13928main ()
13929{
13930bool foo = false
13931  ;
13932  return 0;
13933}
13934_ACEOF
13935rm -f conftest.$ac_objext
13936if { (eval echo "$as_me:13936: \"$ac_compile\"") >&5
13937  (eval $ac_compile) 2>&5
13938  ac_status=$?
13939  echo "$as_me:13939: \$? = $ac_status" >&5
13940  (exit $ac_status); } &&
13941         { ac_try='test -s conftest.$ac_objext'
13942  { (eval echo "$as_me:13942: \"$ac_try\"") >&5
13943  (eval $ac_try) 2>&5
13944  ac_status=$?
13945  echo "$as_me:13945: \$? = $ac_status" >&5
13946  (exit $ac_status); }; }; then
13947  cf_cv_header_stdbool_h=0
13948else
13949  echo "$as_me: failed program was:" >&5
13950cat conftest.$ac_ext >&5
13951cat >conftest.$ac_ext <<_ACEOF
13952#line 13952 "configure"
13953#include "confdefs.h"
13954
13955#ifndef __BEOS__
13956#include <stdbool.h>
13957#endif
13958
13959int
13960main ()
13961{
13962bool foo = false
13963  ;
13964  return 0;
13965}
13966_ACEOF
13967rm -f conftest.$ac_objext
13968if { (eval echo "$as_me:13968: \"$ac_compile\"") >&5
13969  (eval $ac_compile) 2>&5
13970  ac_status=$?
13971  echo "$as_me:13971: \$? = $ac_status" >&5
13972  (exit $ac_status); } &&
13973         { ac_try='test -s conftest.$ac_objext'
13974  { (eval echo "$as_me:13974: \"$ac_try\"") >&5
13975  (eval $ac_try) 2>&5
13976  ac_status=$?
13977  echo "$as_me:13977: \$? = $ac_status" >&5
13978  (exit $ac_status); }; }; then
13979  cf_cv_header_stdbool_h=1
13980else
13981  echo "$as_me: failed program was:" >&5
13982cat conftest.$ac_ext >&5
13983cf_cv_header_stdbool_h=0
13984fi
13985rm -f conftest.$ac_objext conftest.$ac_ext
13986fi
13987rm -f conftest.$ac_objext conftest.$ac_ext
13988fi
13989
13990if test "$cf_cv_header_stdbool_h" = 1
13991then	echo "$as_me:13991: result: yes" >&5
13992echo "${ECHO_T}yes" >&6
13993else	echo "$as_me:13993: result: no" >&5
13994echo "${ECHO_T}no" >&6
13995fi
13996
13997echo "$as_me:13997: checking for builtin bool type" >&5
13998echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
13999
14000if test "${cf_cv_builtin_bool+set}" = set; then
14001  echo $ECHO_N "(cached) $ECHO_C" >&6
14002else
14003
14004	cat >conftest.$ac_ext <<_ACEOF
14005#line 14005 "configure"
14006#include "confdefs.h"
14007
14008#include <stdio.h>
14009#include <sys/types.h>
14010
14011int
14012main ()
14013{
14014bool x = false
14015  ;
14016  return 0;
14017}
14018_ACEOF
14019rm -f conftest.$ac_objext
14020if { (eval echo "$as_me:14020: \"$ac_compile\"") >&5
14021  (eval $ac_compile) 2>&5
14022  ac_status=$?
14023  echo "$as_me:14023: \$? = $ac_status" >&5
14024  (exit $ac_status); } &&
14025         { ac_try='test -s conftest.$ac_objext'
14026  { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027  (eval $ac_try) 2>&5
14028  ac_status=$?
14029  echo "$as_me:14029: \$? = $ac_status" >&5
14030  (exit $ac_status); }; }; then
14031  cf_cv_builtin_bool=1
14032else
14033  echo "$as_me: failed program was:" >&5
14034cat conftest.$ac_ext >&5
14035cf_cv_builtin_bool=0
14036fi
14037rm -f conftest.$ac_objext conftest.$ac_ext
14038
14039fi
14040
14041if test "$cf_cv_builtin_bool" = 1
14042then	echo "$as_me:14042: result: yes" >&5
14043echo "${ECHO_T}yes" >&6
14044else	echo "$as_me:14044: result: no" >&5
14045echo "${ECHO_T}no" >&6
14046fi
14047
14048echo "$as_me:14048: checking for size of bool" >&5
14049echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14050if test "${cf_cv_type_of_bool+set}" = set; then
14051  echo $ECHO_N "(cached) $ECHO_C" >&6
14052else
14053
14054	rm -f cf_test.out
14055	if test "$cross_compiling" = yes; then
14056  cf_cv_type_of_bool=unknown
14057else
14058  cat >conftest.$ac_ext <<_ACEOF
14059#line 14059 "configure"
14060#include "confdefs.h"
14061
14062#include <stdlib.h>
14063#include <stdio.h>
14064
14065#if defined(__cplusplus)
14066
14067#ifdef HAVE_GXX_BUILTIN_H
14068#include <g++/builtin.h>
14069#elif HAVE_GPP_BUILTIN_H
14070#include <gpp/builtin.h>
14071#elif HAVE_BUILTIN_H
14072#include <builtin.h>
14073#endif
14074
14075#else
14076
14077#if $cf_cv_header_stdbool_h
14078#include <stdbool.h>
14079#endif
14080
14081#endif
14082
14083main()
14084{
14085	FILE *fp = fopen("cf_test.out", "w");
14086	if (fp != 0) {
14087		bool x = true;
14088		if ((bool)(-x) >= 0)
14089			fputs("unsigned ", fp);
14090		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14091		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14092		else if (sizeof(x) == sizeof(short))fputs("short",fp);
14093		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14094		fclose(fp);
14095	}
14096	${cf_cv_main_return:-return}(0);
14097}
14098
14099_ACEOF
14100rm -f conftest$ac_exeext
14101if { (eval echo "$as_me:14101: \"$ac_link\"") >&5
14102  (eval $ac_link) 2>&5
14103  ac_status=$?
14104  echo "$as_me:14104: \$? = $ac_status" >&5
14105  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14106  { (eval echo "$as_me:14106: \"$ac_try\"") >&5
14107  (eval $ac_try) 2>&5
14108  ac_status=$?
14109  echo "$as_me:14109: \$? = $ac_status" >&5
14110  (exit $ac_status); }; }; then
14111  cf_cv_type_of_bool=`cat cf_test.out`
14112		 if test -z "$cf_cv_type_of_bool"; then
14113		   cf_cv_type_of_bool=unknown
14114		 fi
14115else
14116  echo "$as_me: program exited with status $ac_status" >&5
14117echo "$as_me: failed program was:" >&5
14118cat conftest.$ac_ext >&5
14119cf_cv_type_of_bool=unknown
14120fi
14121rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14122fi
14123
14124fi
14125
14126	rm -f cf_test.out
14127echo "$as_me:14127: result: $cf_cv_type_of_bool" >&5
14128echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14129if test "$cf_cv_type_of_bool" = unknown ; then
14130	case .$NCURSES_BOOL in #(vi
14131	.auto|.) NCURSES_BOOL=unsigned;;
14132	esac
14133	{ echo "$as_me:14133: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14134echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14135	cf_cv_type_of_bool=$NCURSES_BOOL
14136fi
14137
14138echo "$as_me:14138: checking for special defines needed for etip.h" >&5
14139echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
14140cf_save_CXXFLAGS="$CXXFLAGS"
14141cf_result="none"
14142for cf_math in "" MATH_H
14143do
14144for cf_excp in "" MATH_EXCEPTION
14145do
14146	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
14147	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
14148	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
14149cat >conftest.$ac_ext <<_ACEOF
14150#line 14150 "configure"
14151#include "confdefs.h"
14152
14153#include <etip.h.in>
14154
14155int
14156main ()
14157{
14158
14159  ;
14160  return 0;
14161}
14162_ACEOF
14163rm -f conftest.$ac_objext
14164if { (eval echo "$as_me:14164: \"$ac_compile\"") >&5
14165  (eval $ac_compile) 2>&5
14166  ac_status=$?
14167  echo "$as_me:14167: \$? = $ac_status" >&5
14168  (exit $ac_status); } &&
14169         { ac_try='test -s conftest.$ac_objext'
14170  { (eval echo "$as_me:14170: \"$ac_try\"") >&5
14171  (eval $ac_try) 2>&5
14172  ac_status=$?
14173  echo "$as_me:14173: \$? = $ac_status" >&5
14174  (exit $ac_status); }; }; then
14175
14176	test -n "$cf_math" && cat >>confdefs.h <<EOF
14177#define ETIP_NEEDS_${cf_math} 1
14178EOF
14179
14180	test -n "$cf_excp" && cat >>confdefs.h <<EOF
14181#define ETIP_NEEDS_${cf_excp} 1
14182EOF
14183
14184	cf_result="$cf_math $cf_excp"
14185	break
14186
14187else
14188  echo "$as_me: failed program was:" >&5
14189cat conftest.$ac_ext >&5
14190fi
14191rm -f conftest.$ac_objext conftest.$ac_ext
14192done
14193done
14194echo "$as_me:14194: result: $cf_result" >&5
14195echo "${ECHO_T}$cf_result" >&6
14196CXXFLAGS="$cf_save_CXXFLAGS"
14197
14198if test -n "$CXX"; then
14199echo "$as_me:14199: checking if $CXX accepts parameter initialization" >&5
14200echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
14201if test "${cf_cv_cpp_param_init+set}" = set; then
14202  echo $ECHO_N "(cached) $ECHO_C" >&6
14203else
14204
14205	ac_ext=cc
14206ac_cpp='$CXXCPP $CPPFLAGS'
14207ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14208ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14209ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14210ac_main_return=return
14211
14212	if test "$cross_compiling" = yes; then
14213  cf_cv_cpp_param_init=unknown
14214else
14215  cat >conftest.$ac_ext <<_ACEOF
14216#line 14216 "configure"
14217#include "confdefs.h"
14218
14219class TEST {
14220private:
14221	int value;
14222public:
14223	TEST(int x = 1);
14224	~TEST();
14225};
14226
14227TEST::TEST(int x = 1)	// some compilers do not like second initializer
14228{
14229	value = x;
14230}
14231void main() { }
14232
14233_ACEOF
14234rm -f conftest$ac_exeext
14235if { (eval echo "$as_me:14235: \"$ac_link\"") >&5
14236  (eval $ac_link) 2>&5
14237  ac_status=$?
14238  echo "$as_me:14238: \$? = $ac_status" >&5
14239  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14240  { (eval echo "$as_me:14240: \"$ac_try\"") >&5
14241  (eval $ac_try) 2>&5
14242  ac_status=$?
14243  echo "$as_me:14243: \$? = $ac_status" >&5
14244  (exit $ac_status); }; }; then
14245  cf_cv_cpp_param_init=yes
14246else
14247  echo "$as_me: program exited with status $ac_status" >&5
14248echo "$as_me: failed program was:" >&5
14249cat conftest.$ac_ext >&5
14250cf_cv_cpp_param_init=no
14251fi
14252rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14253fi
14254	ac_ext=cc
14255ac_cpp='$CXXCPP $CPPFLAGS'
14256ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14257ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14258ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14259ac_main_return=return
14260
14261fi
14262echo "$as_me:14262: result: $cf_cv_cpp_param_init" >&5
14263echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
14264fi
14265test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
14266#define CPP_HAS_PARAM_INIT 1
14267EOF
14268
14269if test -n "$CXX"; then
14270
14271echo "$as_me:14271: checking if $CXX accepts static_cast" >&5
14272echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
14273if test "${cf_cv_cpp_static_cast+set}" = set; then
14274  echo $ECHO_N "(cached) $ECHO_C" >&6
14275else
14276
14277	ac_ext=cc
14278ac_cpp='$CXXCPP $CPPFLAGS'
14279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14282ac_main_return=return
14283
14284	cat >conftest.$ac_ext <<_ACEOF
14285#line 14285 "configure"
14286#include "confdefs.h"
14287
14288class NCursesPanel
14289{
14290public:
14291  NCursesPanel(int nlines,
14292	       int ncols,
14293	       int begin_y = 0,
14294	       int begin_x = 0)
14295  {
14296  }
14297
14298  ~NCursesPanel();
14299};
14300
14301template<class T> class NCursesUserPanel : public NCursesPanel
14302{
14303public:
14304  NCursesUserPanel (int nlines,
14305		    int ncols,
14306		    int begin_y = 0,
14307		    int begin_x = 0,
14308		    const T* p_UserData = static_cast<T*>(0))
14309    : NCursesPanel (nlines, ncols, begin_y, begin_x)
14310  {
14311  };
14312  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
14313  {
14314  };
14315
14316  virtual ~NCursesUserPanel() {};
14317};
14318
14319int
14320main ()
14321{
14322
14323	const char* p_UserData = static_cast<char*>(0)
14324  ;
14325  return 0;
14326}
14327_ACEOF
14328rm -f conftest.$ac_objext
14329if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
14330  (eval $ac_compile) 2>&5
14331  ac_status=$?
14332  echo "$as_me:14332: \$? = $ac_status" >&5
14333  (exit $ac_status); } &&
14334         { ac_try='test -s conftest.$ac_objext'
14335  { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336  (eval $ac_try) 2>&5
14337  ac_status=$?
14338  echo "$as_me:14338: \$? = $ac_status" >&5
14339  (exit $ac_status); }; }; then
14340  cf_cv_cpp_static_cast=yes
14341else
14342  echo "$as_me: failed program was:" >&5
14343cat conftest.$ac_ext >&5
14344cf_cv_cpp_static_cast=no
14345fi
14346rm -f conftest.$ac_objext conftest.$ac_ext
14347
14348	ac_ext=cc
14349ac_cpp='$CXXCPP $CPPFLAGS'
14350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14353ac_main_return=return
14354
14355fi
14356echo "$as_me:14356: result: $cf_cv_cpp_static_cast" >&5
14357echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
14358
14359fi
14360
14361test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
14362#define CPP_HAS_STATIC_CAST 1
14363EOF
14364
14365if test -n "$CXX"; then
14366
14367ac_ext=cc
14368ac_cpp='$CXXCPP $CPPFLAGS'
14369ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14370ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14371ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14372ac_main_return=return
14373
14374for ac_header in strstream.h
14375do
14376as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14377echo "$as_me:14377: checking for $ac_header" >&5
14378echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14379if eval "test \"\${$as_ac_Header+set}\" = set"; then
14380  echo $ECHO_N "(cached) $ECHO_C" >&6
14381else
14382  cat >conftest.$ac_ext <<_ACEOF
14383#line 14383 "configure"
14384#include "confdefs.h"
14385#include <$ac_header>
14386_ACEOF
14387if { (eval echo "$as_me:14387: \"$ac_cpp conftest.$ac_ext\"") >&5
14388  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14389  ac_status=$?
14390  egrep -v '^ *\+' conftest.er1 >conftest.err
14391  rm -f conftest.er1
14392  cat conftest.err >&5
14393  echo "$as_me:14393: \$? = $ac_status" >&5
14394  (exit $ac_status); } >/dev/null; then
14395  if test -s conftest.err; then
14396    ac_cpp_err=$ac_cxx_preproc_warn_flag
14397  else
14398    ac_cpp_err=
14399  fi
14400else
14401  ac_cpp_err=yes
14402fi
14403if test -z "$ac_cpp_err"; then
14404  eval "$as_ac_Header=yes"
14405else
14406  echo "$as_me: failed program was:" >&5
14407  cat conftest.$ac_ext >&5
14408  eval "$as_ac_Header=no"
14409fi
14410rm -f conftest.err conftest.$ac_ext
14411fi
14412echo "$as_me:14412: result: `eval echo '${'$as_ac_Header'}'`" >&5
14413echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14414if test `eval echo '${'$as_ac_Header'}'` = yes; then
14415  cat >>confdefs.h <<EOF
14416#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14417EOF
14418
14419fi
14420done
14421
14422echo "$as_me:14422: checking if $CXX supports vscan function" >&5
14423echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
14424if test "${cf_cv_cpp_vscan_func+set}" = set; then
14425  echo $ECHO_N "(cached) $ECHO_C" >&6
14426else
14427
14428	for cf_vscan_func in strstream strstream_cast stdio
14429	do
14430	case $cf_vscan_func in #(vi
14431	stdio)		cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
14432	strstream)	cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
14433	strstream_cast)	cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
14434	esac
14435	cat >conftest.$ac_ext <<_ACEOF
14436#line 14436 "configure"
14437#include "confdefs.h"
14438
14439#include <stdio.h>
14440#include <stdarg.h>
14441#define $cf_vscan_defs 1
14442#if defined(USE_STDIO_VSCAN)
14443#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
14444#include <strstream.h>
14445#endif
14446
14447int scanw(const char* fmt, ...)
14448{
14449    int result = -1;
14450    char buf[BUFSIZ];
14451
14452    va_list args;
14453    va_start(args, fmt);
14454#if defined(USE_STDIO_VSCAN)
14455    if (::vsscanf(buf, fmt, args) != -1)
14456	result = 0;
14457#elif defined(USE_STRSTREAM_VSCAN)
14458    strstreambuf ss(buf, sizeof(buf));
14459    if (ss.vscan(fmt, args) != -1)
14460	result = 0;
14461#elif defined(USE_STRSTREAM_VSCAN_CAST)
14462    strstreambuf ss(buf, sizeof(buf));
14463    if (ss.vscan(fmt, (_IO_va_list)args) != -1)
14464	result = 0;
14465#else
14466#error case $cf_vscan_func failed
14467#endif
14468    va_end(args);
14469    return result;
14470}
14471
14472int
14473main ()
14474{
14475int tmp, foo = scanw("%d", &tmp)
14476  ;
14477  return 0;
14478}
14479_ACEOF
14480rm -f conftest.$ac_objext conftest$ac_exeext
14481if { (eval echo "$as_me:14481: \"$ac_link\"") >&5
14482  (eval $ac_link) 2>&5
14483  ac_status=$?
14484  echo "$as_me:14484: \$? = $ac_status" >&5
14485  (exit $ac_status); } &&
14486         { ac_try='test -s conftest$ac_exeext'
14487  { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488  (eval $ac_try) 2>&5
14489  ac_status=$?
14490  echo "$as_me:14490: \$? = $ac_status" >&5
14491  (exit $ac_status); }; }; then
14492  cf_cv_cpp_vscan_func=$cf_vscan_func; break
14493else
14494  echo "$as_me: failed program was:" >&5
14495cat conftest.$ac_ext >&5
14496cf_cv_cpp_vscan_func=no
14497fi
14498rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14499	test "$cf_cv_cpp_vscan_func" != no && break
14500	done
14501
14502fi
14503echo "$as_me:14503: result: $cf_cv_cpp_vscan_func" >&5
14504echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
14505
14506ac_ext=cc
14507ac_cpp='$CXXCPP $CPPFLAGS'
14508ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
14509ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
14510ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
14511ac_main_return=return
14512
14513fi
14514
14515case $cf_cv_cpp_vscan_func in #(vi
14516stdio) #(vi
14517	cat >>confdefs.h <<\EOF
14518#define CPP_HAS_VSCAN_FUNC 1
14519EOF
14520
14521	cat >>confdefs.h <<\EOF
14522#define USE_STDIO_VSCAN 1
14523EOF
14524
14525	;;
14526strstream)
14527	cat >>confdefs.h <<\EOF
14528#define CPP_HAS_VSCAN_FUNC 1
14529EOF
14530
14531	cat >>confdefs.h <<\EOF
14532#define USE_STRSTREAM_VSCAN 1
14533EOF
14534
14535	;;
14536strstream_cast)
14537	cat >>confdefs.h <<\EOF
14538#define CPP_HAS_VSCAN_FUNC 1
14539EOF
14540
14541	cat >>confdefs.h <<\EOF
14542#define USE_STRSTREAM_VSCAN_CAST 1
14543EOF
14544
14545	;;
14546esac
14547
14548	CXX_AR='$(AR)'
14549	CXX_AR_OPTS='$(AR_OPTS)'
14550	case $cf_cv_system_name in #(vi
14551	irix*) #(vi
14552	    if test "$GXX" != yes ; then
14553		CXX_AR='$(CXX)'
14554		CXX_AR_OPTS='-ar -o'
14555	    fi
14556	    ;;
14557	sco3.2v5*) #(vi
14558	    CXXLDFLAGS="-u main"
14559	    ;;
14560	solaris2*)
14561	    if test "$GXX" != yes ; then
14562		CXX_AR='$(CXX)'
14563		CXX_AR_OPTS='-xar -o'
14564	    fi
14565	    ;;
14566	esac
14567
14568else
14569	cf_cxx_library=no
14570	cf_cv_builtin_bool=1
14571
14572	# Just because we are not configuring against C++ right now does not
14573	# mean that a user will not want to use C++.  Some distributors disable
14574	# the C++ portion of this configuration as a shortcut (or just to avoid
14575	# compiling the demo in the c++ directory).  So we need a reasonable
14576	# default for the 'bool' type.
14577	#
14578	# Caveat: since the storage of the bool type is not standardized, it
14579	# may change.
14580
14581	if test "$NCURSES_BOOL" != auto ; then
14582		cf_cv_type_of_bool=$NCURSES_BOOL
14583		cf_cv_header_stdbool_h=0
14584	else
14585		if test "$cf_cv_header_stdbool_h" = 1 ; then
14586
14587echo "$as_me:14587: checking for size of bool" >&5
14588echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
14589if test "${cf_cv_type_of_bool+set}" = set; then
14590  echo $ECHO_N "(cached) $ECHO_C" >&6
14591else
14592
14593	rm -f cf_test.out
14594	if test "$cross_compiling" = yes; then
14595  cf_cv_type_of_bool=unknown
14596else
14597  cat >conftest.$ac_ext <<_ACEOF
14598#line 14598 "configure"
14599#include "confdefs.h"
14600
14601#include <stdlib.h>
14602#include <stdio.h>
14603
14604#if defined(__cplusplus)
14605
14606#ifdef HAVE_GXX_BUILTIN_H
14607#include <g++/builtin.h>
14608#elif HAVE_GPP_BUILTIN_H
14609#include <gpp/builtin.h>
14610#elif HAVE_BUILTIN_H
14611#include <builtin.h>
14612#endif
14613
14614#else
14615
14616#if $cf_cv_header_stdbool_h
14617#include <stdbool.h>
14618#endif
14619
14620#endif
14621
14622main()
14623{
14624	FILE *fp = fopen("cf_test.out", "w");
14625	if (fp != 0) {
14626		bool x = true;
14627		if ((bool)(-x) >= 0)
14628			fputs("unsigned ", fp);
14629		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
14630		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
14631		else if (sizeof(x) == sizeof(short))fputs("short",fp);
14632		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
14633		fclose(fp);
14634	}
14635	${cf_cv_main_return:-return}(0);
14636}
14637
14638_ACEOF
14639rm -f conftest$ac_exeext
14640if { (eval echo "$as_me:14640: \"$ac_link\"") >&5
14641  (eval $ac_link) 2>&5
14642  ac_status=$?
14643  echo "$as_me:14643: \$? = $ac_status" >&5
14644  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14645  { (eval echo "$as_me:14645: \"$ac_try\"") >&5
14646  (eval $ac_try) 2>&5
14647  ac_status=$?
14648  echo "$as_me:14648: \$? = $ac_status" >&5
14649  (exit $ac_status); }; }; then
14650  cf_cv_type_of_bool=`cat cf_test.out`
14651		 if test -z "$cf_cv_type_of_bool"; then
14652		   cf_cv_type_of_bool=unknown
14653		 fi
14654else
14655  echo "$as_me: program exited with status $ac_status" >&5
14656echo "$as_me: failed program was:" >&5
14657cat conftest.$ac_ext >&5
14658cf_cv_type_of_bool=unknown
14659fi
14660rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14661fi
14662
14663fi
14664
14665	rm -f cf_test.out
14666echo "$as_me:14666: result: $cf_cv_type_of_bool" >&5
14667echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14668if test "$cf_cv_type_of_bool" = unknown ; then
14669	case .$NCURSES_BOOL in #(vi
14670	.auto|.) NCURSES_BOOL=unsigned;;
14671	esac
14672	{ echo "$as_me:14672: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
14673echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
14674	cf_cv_type_of_bool=$NCURSES_BOOL
14675fi
14676
14677		else
14678			echo "$as_me:14678: checking for fallback type of bool" >&5
14679echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
14680			case "$host_cpu" in #(vi
14681			i?86)	cf_cv_type_of_bool=char	;; #(vi
14682			*)	cf_cv_type_of_bool=int	;;
14683			esac
14684			echo "$as_me:14684: result: $cf_cv_type_of_bool" >&5
14685echo "${ECHO_T}$cf_cv_type_of_bool" >&6
14686		fi
14687	fi
14688fi
14689
14690# If the C compiler did not declare bool, and we did not determine that the C++
14691# compiler does not declare bool, turn on an ifdef in curses.h that makes the
14692# ncurses library use the same type as C++ bool.  Note that this allows one to
14693# specify the type of bool in a configure-script option and postpone
14694# integration with the C++ compiler provided that the types are compatible.
14695USE_CXX_BOOL=1
14696if test $cf_cv_cc_bool_type = 1
14697then
14698	# oops: C has a bool.  Unlikely, but C++ could differ.
14699	USE_CXX_BOOL=0
14700elif test $cf_cv_builtin_bool = 0
14701then
14702	# C++ has no bool
14703	USE_CXX_BOOL=0
14704else
14705	# this is the normal case
14706	USE_CXX_BOOL='defined(__cplusplus)'
14707fi
14708
14709if test -f "${srcdir}/Ada95/Makefile.in" ; then
14710if test "$cf_with_ada" != "no" ; then
14711cf_ada_make=gnatmake
14712# Extract the first word of "$cf_ada_make", so it can be a program name with args.
14713set dummy $cf_ada_make; ac_word=$2
14714echo "$as_me:14714: checking for $ac_word" >&5
14715echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14716if test "${ac_cv_prog_gnat_exists+set}" = set; then
14717  echo $ECHO_N "(cached) $ECHO_C" >&6
14718else
14719  if test -n "$gnat_exists"; then
14720  ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
14721else
14722  ac_save_IFS=$IFS; IFS=$ac_path_separator
14723ac_dummy="$PATH"
14724for ac_dir in $ac_dummy; do
14725  IFS=$ac_save_IFS
14726  test -z "$ac_dir" && ac_dir=.
14727  $as_executable_p "$ac_dir/$ac_word" || continue
14728ac_cv_prog_gnat_exists="yes"
14729echo "$as_me:14729: found $ac_dir/$ac_word" >&5
14730break
14731done
14732
14733  test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
14734fi
14735fi
14736gnat_exists=$ac_cv_prog_gnat_exists
14737if test -n "$gnat_exists"; then
14738  echo "$as_me:14738: result: $gnat_exists" >&5
14739echo "${ECHO_T}$gnat_exists" >&6
14740else
14741  echo "$as_me:14741: result: no" >&5
14742echo "${ECHO_T}no" >&6
14743fi
14744
14745if test "$ac_cv_prog_gnat_exists" = no; then
14746   cf_ada_make=
14747else
14748
14749echo "$as_me:14749: checking for gnat version" >&5
14750echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
14751cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
14752  sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
14753echo "$as_me:14753: result: $cf_gnat_version" >&5
14754echo "${ECHO_T}$cf_gnat_version" >&6
14755
14756case $cf_gnat_version in
14757  3.1[1-9]*|3.[2-9]*|[4-9].*)
14758    cf_cv_prog_gnat_correct=yes
14759    ;;
14760  *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
14761     cf_cv_prog_gnat_correct=no
14762     ;;
14763esac
14764case $cf_gnat_version in
14765  3.[1-9]*|[4-9].*)
14766      cf_compile_generics=generics
14767      cf_generic_objects="\${GENOBJS}"
14768      ;;
14769  *)  cf_compile_generics=
14770      cf_generic_objects=
14771      ;;
14772esac
14773
14774   # Extract the first word of "m4", so it can be a program name with args.
14775set dummy m4; ac_word=$2
14776echo "$as_me:14776: checking for $ac_word" >&5
14777echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14778if test "${ac_cv_prog_M4_exists+set}" = set; then
14779  echo $ECHO_N "(cached) $ECHO_C" >&6
14780else
14781  if test -n "$M4_exists"; then
14782  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
14783else
14784  ac_save_IFS=$IFS; IFS=$ac_path_separator
14785ac_dummy="$PATH"
14786for ac_dir in $ac_dummy; do
14787  IFS=$ac_save_IFS
14788  test -z "$ac_dir" && ac_dir=.
14789  $as_executable_p "$ac_dir/$ac_word" || continue
14790ac_cv_prog_M4_exists="yes"
14791echo "$as_me:14791: found $ac_dir/$ac_word" >&5
14792break
14793done
14794
14795  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
14796fi
14797fi
14798M4_exists=$ac_cv_prog_M4_exists
14799if test -n "$M4_exists"; then
14800  echo "$as_me:14800: result: $M4_exists" >&5
14801echo "${ECHO_T}$M4_exists" >&6
14802else
14803  echo "$as_me:14803: result: no" >&5
14804echo "${ECHO_T}no" >&6
14805fi
14806
14807   if test "$ac_cv_prog_M4_exists" = no; then
14808      cf_cv_prog_gnat_correct=no
14809      echo Ada95 binding required program m4 not found. Ada95 binding disabled.
14810   fi
14811   if test "$cf_cv_prog_gnat_correct" = yes; then
14812      echo "$as_me:14812: checking if GNAT works" >&5
14813echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
14814
14815rm -f conftest*
14816cat >>conftest.ads <<CF_EOF
14817procedure conftest;
14818CF_EOF
14819cat >>conftest.adb <<CF_EOF
14820with Text_IO;
14821with GNAT.OS_Lib;
14822procedure conftest is
14823begin
14824   Text_IO.Put ("Hello World");
14825   Text_IO.New_Line;
14826   GNAT.OS_Lib.OS_Exit (0);
14827end conftest;
14828CF_EOF
14829if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14830   if ( ./conftest 1>&5 2>&1 ) ; then
14831      cf_cv_prog_gnat_correct=yes
14832   else
14833      cf_cv_prog_gnat_correct=no
14834   fi
14835else
14836   cf_cv_prog_gnat_correct=no
14837fi
14838rm -f conftest*
14839
14840      echo "$as_me:14840: result: $cf_cv_prog_gnat_correct" >&5
14841echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
14842   fi
14843fi
14844if test	"$cf_cv_prog_gnat_correct" = yes; then
14845   ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
14846
14847   echo "$as_me:14847: checking if GNAT pragma Unreferenced works" >&5
14848echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
14849
14850rm -f conftest*
14851cat >>conftest.ads <<CF_EOF
14852procedure conftest;
14853CF_EOF
14854cat >>conftest.adb <<CF_EOF
14855with Text_IO;
14856with GNAT.OS_Lib;
14857procedure conftest is
14858   test : Integer;
14859   pragma Unreferenced (test);
14860begin
14861   test := 1;
14862   Text_IO.Put ("Hello World");
14863   Text_IO.New_Line;
14864   GNAT.OS_Lib.OS_Exit (0);
14865end conftest;
14866CF_EOF
14867if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
14868      cf_cv_pragma_unreferenced=yes
14869else
14870   cf_cv_pragma_unreferenced=no
14871fi
14872rm -f conftest*
14873
14874   echo "$as_me:14874: result: $cf_cv_pragma_unreferenced" >&5
14875echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
14876
14877   # if the pragma is supported, use it (needed in the Trace code).
14878   if test $cf_cv_pragma_unreferenced = yes ; then
14879      PRAGMA_UNREF=TRUE
14880   else
14881      PRAGMA_UNREF=FALSE
14882   fi
14883
14884# Check whether --with-ada-compiler or --without-ada-compiler was given.
14885if test "${with_ada_compiler+set}" = set; then
14886  withval="$with_ada_compiler"
14887  cf_ada_compiler=$withval
14888else
14889  cf_ada_compiler=gnatmake
14890fi;
14891
14892   cf_ada_package=terminal_interface
14893
14894# Check whether --with-ada-include or --without-ada-include was given.
14895if test "${with_ada_include+set}" = set; then
14896  withval="$with_ada_include"
14897
14898else
14899  withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
14900fi;
14901if test "x$prefix" != xNONE; then
14902  cf_path_syntax="$prefix"
14903else
14904  cf_path_syntax="$ac_default_prefix"
14905fi
14906
14907case ".$withval" in #(vi
14908.\$\(*\)*|.\'*\'*) #(vi
14909  ;;
14910..|./*|.\\*) #(vi
14911  ;;
14912.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14913  ;;
14914.\${*prefix}*) #(vi
14915  eval withval="$withval"
14916  case ".$withval" in #(vi
14917  .NONE/*)
14918    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14919    ;;
14920  esac
14921  ;; #(vi
14922.no|.NONE/*)
14923  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14924  ;;
14925*)
14926  { { echo "$as_me:14926: error: expected a pathname, not \"$withval\"" >&5
14927echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14928   { (exit 1); exit 1; }; }
14929  ;;
14930esac
14931
14932ADA_INCLUDE="$withval"
14933
14934# Check whether --with-ada-objects or --without-ada-objects was given.
14935if test "${with_ada_objects+set}" = set; then
14936  withval="$with_ada_objects"
14937
14938else
14939  withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
14940fi;
14941if test "x$prefix" != xNONE; then
14942  cf_path_syntax="$prefix"
14943else
14944  cf_path_syntax="$ac_default_prefix"
14945fi
14946
14947case ".$withval" in #(vi
14948.\$\(*\)*|.\'*\'*) #(vi
14949  ;;
14950..|./*|.\\*) #(vi
14951  ;;
14952.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
14953  ;;
14954.\${*prefix}*) #(vi
14955  eval withval="$withval"
14956  case ".$withval" in #(vi
14957  .NONE/*)
14958    withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14959    ;;
14960  esac
14961  ;; #(vi
14962.no|.NONE/*)
14963  withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
14964  ;;
14965*)
14966  { { echo "$as_me:14966: error: expected a pathname, not \"$withval\"" >&5
14967echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
14968   { (exit 1); exit 1; }; }
14969  ;;
14970esac
14971
14972ADA_OBJECTS="$withval"
14973
14974fi
14975fi
14976fi
14977
14978### Construct the library-subsets, if any, from this set of keywords:
14979### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
14980echo "$as_me:14980: checking for library subsets" >&5
14981echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
14982if test "$with_termlib" != no ; then
14983	LIB_SUBSETS="termlib"
14984	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
14985	LIB_SUBSETS="${LIB_SUBSETS} "
14986else
14987	LIB_SUBSETS="termlib+"
14988	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
14989fi
14990LIB_SUBSETS="${LIB_SUBSETS}base"
14991test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
14992test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
14993echo "$as_me:14993: result: $LIB_SUBSETS" >&5
14994echo "${ECHO_T}$LIB_SUBSETS" >&6
14995
14996### Construct the list of include-directories to be generated
14997
14998CPPFLAGS="-I. -I../include $CPPFLAGS"
14999if test "$srcdir" != "."; then
15000	CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
15001fi
15002if test "$GCC" != yes; then
15003	CPPFLAGS="$CPPFLAGS -I\${includedir}"
15004elif test "$includedir" != "/usr/include"; then
15005	if test "$includedir" = '${prefix}/include' ; then
15006		if test $prefix != /usr ; then
15007			CPPFLAGS="$CPPFLAGS -I\${includedir}"
15008		fi
15009	else
15010		CPPFLAGS="$CPPFLAGS -I\${includedir}"
15011	fi
15012fi
15013
15014ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
15015if test "$srcdir" != "."; then
15016	ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
15017fi
15018if test "$GCC" != yes; then
15019	ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15020elif test "$includedir" != "/usr/include"; then
15021	if test "$includedir" = '${prefix}/include' ; then
15022		if test $prefix != /usr ; then
15023			ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15024		fi
15025	else
15026		ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
15027	fi
15028fi
15029
15030### Build up pieces for makefile rules
15031echo "$as_me:15031: checking default library suffix" >&5
15032echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
15033
15034	case $DFT_LWR_MODEL in
15035	libtool) DFT_ARG_SUFFIX=''   ;;
15036	normal)  DFT_ARG_SUFFIX=''   ;;
15037	debug)   DFT_ARG_SUFFIX='_g' ;;
15038	profile) DFT_ARG_SUFFIX='_p' ;;
15039	shared)  DFT_ARG_SUFFIX=''   ;;
15040	esac
15041	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
15042echo "$as_me:15042: result: $DFT_ARG_SUFFIX" >&5
15043echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
15044
15045echo "$as_me:15045: checking default library-dependency suffix" >&5
15046echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
15047
15048	case $DFT_LWR_MODEL in
15049	libtool) DFT_DEP_SUFFIX='.la'  ;;
15050	normal)  DFT_DEP_SUFFIX='.a'   ;;
15051	debug)   DFT_DEP_SUFFIX='_g.a' ;;
15052	profile) DFT_DEP_SUFFIX='_p.a' ;;
15053	shared)
15054		case $cf_cv_system_name in
15055		cygwin*) DFT_DEP_SUFFIX='.dll' ;;
15056		darwin*) DFT_DEP_SUFFIX='.dylib' ;;
15057		hpux*)
15058			case $target in
15059			ia64*)	DFT_DEP_SUFFIX='.so' ;;
15060			*)	DFT_DEP_SUFFIX='.sl' ;;
15061			esac
15062			;;
15063		*)	DFT_DEP_SUFFIX='.so'  ;;
15064		esac
15065	esac
15066	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
15067if test $DFT_LWR_MODEL = shared ; then
15068	case $cf_cv_system_name in #(vi
15069	cygwin*)
15070		DFT_DEP_SUFFIX=".dll.a"
15071		;;
15072	esac
15073fi
15074echo "$as_me:15074: result: $DFT_DEP_SUFFIX" >&5
15075echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
15076
15077echo "$as_me:15077: checking default object directory" >&5
15078echo $ECHO_N "checking default object directory... $ECHO_C" >&6
15079
15080	case $DFT_LWR_MODEL in
15081	libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
15082	normal)  DFT_OBJ_SUBDIR='objects' ;;
15083	debug)   DFT_OBJ_SUBDIR='obj_g' ;;
15084	profile) DFT_OBJ_SUBDIR='obj_p' ;;
15085	shared)
15086		case $cf_cv_system_name in #(vi
15087		cygwin) #(vi
15088			DFT_OBJ_SUBDIR='objects' ;;
15089		*)
15090			DFT_OBJ_SUBDIR='obj_s' ;;
15091		esac
15092	esac
15093echo "$as_me:15093: result: $DFT_OBJ_SUBDIR" >&5
15094echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
15095
15096# libtool thinks it can make c++ shared libraries (perhaps only g++)
15097if test "$cf_with_cxx" = yes ; then
15098echo "$as_me:15098: checking c++ library-dependency suffix" >&5
15099echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
15100if test "$with_libtool" != "no"; then
15101	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
15102else
15103
15104	case normal in
15105	libtool) CXX_LIB_SUFFIX='.la'  ;;
15106	normal)  CXX_LIB_SUFFIX='.a'   ;;
15107	debug)   CXX_LIB_SUFFIX='_g.a' ;;
15108	profile) CXX_LIB_SUFFIX='_p.a' ;;
15109	shared)
15110		case $cf_cv_system_name in
15111		cygwin*) CXX_LIB_SUFFIX='.dll' ;;
15112		darwin*) CXX_LIB_SUFFIX='.dylib' ;;
15113		hpux*)
15114			case $target in
15115			ia64*)	CXX_LIB_SUFFIX='.so' ;;
15116			*)	CXX_LIB_SUFFIX='.sl' ;;
15117			esac
15118			;;
15119		*)	CXX_LIB_SUFFIX='.so'  ;;
15120		esac
15121	esac
15122	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
15123fi
15124echo "$as_me:15124: result: $CXX_LIB_SUFFIX" >&5
15125echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
15126
15127fi
15128
15129### Set up low-level terminfo dependencies for makefiles.
15130TINFO_LIST="$SHLIB_LIST"
15131if test "$with_termlib" != no ; then
15132
15133	if test "$with_termlib" != yes ; then
15134		TINFO_NAME=$with_termlib
15135		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15136		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
15137		TINFO_LIB_SUFFIX="${with_termlib}"
15138	else
15139		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
15140		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
15141		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
15142	fi
15143
15144	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15145	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
15146	if test "$DFT_LWR_MODEL" = "libtool"; then
15147		TEST_ARGS="${TEST_DEPS}"
15148		TEST_ARG2="${TEST_DEP2}"
15149		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15150	else
15151		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
15152		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
15153		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
15154		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
15155	fi
15156else
15157	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
15158fi
15159
15160# needed for Ada95
15161TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
15162
15163echo "$as_me:15163: checking where we will install curses.h" >&5
15164echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
15165test "$with_overwrite" = no && \
15166test "x$includedir" = 'x${prefix}/include' && \
15167	includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
15168echo "$as_me:15168: result: $includedir" >&5
15169echo "${ECHO_T}$includedir" >&6
15170
15171### Resolve a conflict between normal and wide-curses by forcing applications
15172### that will need libutf8 to add it to their configure script.
15173if test "$with_overwrite" != no ; then
15174if test "$NCURSES_LIBUTF8" = 1 ; then
15175	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
15176	{ echo "$as_me:15176: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
15177echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
15178fi
15179fi
15180
15181### predefined stuff for the test programs
15182cat >>confdefs.h <<\EOF
15183#define HAVE_SLK_COLOR 1
15184EOF
15185
15186### Construct the list of subdirectories for which we'll customize makefiles
15187### with the appropriate compile-rules.
15188
15189echo "$as_me:15189: checking for src modules" >&5
15190echo $ECHO_N "checking for src modules... $ECHO_C" >&6
15191
15192# dependencies and linker-arguments for test-programs
15193TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
15194TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
15195if test "$DFT_LWR_MODEL" = "libtool"; then
15196	TEST_ARGS="${TEST_DEPS}"
15197	TEST_ARG2="${TEST_DEP2}"
15198else
15199	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
15200	TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
15201fi
15202
15203cf_cv_src_modules=
15204for cf_dir in $modules_to_build
15205do
15206	if test -f $srcdir/$cf_dir/modules; then
15207
15208		# We may/may not have tack in the distribution, though the
15209		# makefile is.
15210		if test $cf_dir = tack ; then
15211			if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
15212				continue
15213			fi
15214		fi
15215
15216		if test -z "$cf_cv_src_modules"; then
15217			cf_cv_src_modules=$cf_dir
15218		else
15219			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
15220		fi
15221
15222		# Make the ncurses_cfg.h file record the library interface files as
15223		# well.  These are header files that are the same name as their
15224		# directory.  Ncurses is the only library that does not follow
15225		# that pattern.
15226		if test $cf_dir = tack ; then
15227			continue
15228		elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
15229
15230cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15231
15232			cat >>confdefs.h <<EOF
15233#define HAVE_${cf_have_include}_H 1
15234EOF
15235
15236			cat >>confdefs.h <<EOF
15237#define HAVE_LIB${cf_have_include} 1
15238EOF
15239
15240			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
15241			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
15242			if test "$DFT_LWR_MODEL" = "libtool"; then
15243				TEST_ARGS="${TEST_DEPS}"
15244				TEST_ARG2="${TEST_DEP2}"
15245			else
15246				TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
15247				TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
15248			fi
15249		fi
15250	fi
15251done
15252echo "$as_me:15252: result: $cf_cv_src_modules" >&5
15253echo "${ECHO_T}$cf_cv_src_modules" >&6
15254
15255TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
15256TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
15257
15258SRC_SUBDIRS="man include"
15259for cf_dir in $cf_cv_src_modules
15260do
15261	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
15262done
15263SRC_SUBDIRS="$SRC_SUBDIRS test"
15264test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
15265test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
15266
15267ADA_SUBDIRS=
15268if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
15269   SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
15270   ADA_SUBDIRS="gen src samples"
15271fi
15272
15273SUB_MAKEFILES=
15274for cf_dir in $SRC_SUBDIRS
15275do
15276	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
15277done
15278
15279if test -n "$ADA_SUBDIRS"; then
15280   for cf_dir in $ADA_SUBDIRS
15281   do
15282      SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
15283   done
15284
15285fi
15286
15287DIRS_TO_MAKE="lib"
15288for cf_item in $cf_list_models
15289do
15290
15291	case $cf_item in
15292	libtool) cf_subdir='obj_lo'  ;;
15293	normal)  cf_subdir='objects' ;;
15294	debug)   cf_subdir='obj_g' ;;
15295	profile) cf_subdir='obj_p' ;;
15296	shared)
15297		case $cf_cv_system_name in #(vi
15298		cygwin) #(vi
15299			cf_subdir='objects' ;;
15300		*)
15301			cf_subdir='obj_s' ;;
15302		esac
15303	esac
15304
15305	for cf_item2 in $DIRS_TO_MAKE
15306	do
15307		test $cf_item2 = $cf_subdir && break
15308	done
15309	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
15310done
15311for cf_dir in $DIRS_TO_MAKE
15312do
15313	test ! -d $cf_dir && mkdir $cf_dir
15314done
15315
15316cat >>confdefs.h <<EOF
15317#define NCURSES_PATHSEP '$PATHSEP'
15318EOF
15319
15320cat >>confdefs.h <<EOF
15321#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
15322EOF
15323
15324### Now that we're done running tests, add the compiler-warnings, if any
15325
15326cf_fix_cppflags=no
15327cf_new_cflags=
15328cf_new_cppflags=
15329cf_new_extra_cppflags=
15330
15331for cf_add_cflags in $EXTRA_CFLAGS
15332do
15333case $cf_fix_cppflags in
15334no)
15335	case $cf_add_cflags in #(vi
15336	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
15337		case $cf_add_cflags in
15338		-D*)
15339			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15340
15341			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15342			&& test -z "${cf_tst_cflags}" \
15343			&& cf_fix_cppflags=yes
15344
15345			if test $cf_fix_cppflags = yes ; then
15346				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15347				continue
15348			elif test "${cf_tst_cflags}" = "\"'" ; then
15349				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15350				continue
15351			fi
15352			;;
15353		esac
15354		case "$CPPFLAGS" in
15355		*$cf_add_cflags) #(vi
15356			;;
15357		*) #(vi
15358			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
15359			;;
15360		esac
15361		;;
15362	*)
15363		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
15364		;;
15365	esac
15366	;;
15367yes)
15368	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
15369
15370	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15371
15372	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
15373	&& test -z "${cf_tst_cflags}" \
15374	&& cf_fix_cppflags=no
15375	;;
15376esac
15377done
15378
15379if test -n "$cf_new_cflags" ; then
15380
15381	CFLAGS="$CFLAGS $cf_new_cflags"
15382fi
15383
15384if test -n "$cf_new_cppflags" ; then
15385
15386	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
15387fi
15388
15389if test -n "$cf_new_extra_cppflags" ; then
15390
15391	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
15392fi
15393
15394### Define substitutions for header files to avoid name-pollution
15395
15396if test "$cf_cv_have_tcgetattr" = yes ; then
15397	HAVE_TCGETATTR=1
15398else
15399	HAVE_TCGETATTR=0
15400fi
15401
15402if test "$ac_cv_header_termio_h" = yes ; then
15403	HAVE_TERMIO_H=1
15404else
15405	HAVE_TERMIO_H=0
15406fi
15407
15408if test "$ac_cv_header_termios_h" = yes ; then
15409	HAVE_TERMIOS_H=1
15410else
15411	HAVE_TERMIOS_H=0
15412fi
15413
15414################################################################################
15415test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
15416SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
15417ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
15418ac_config_commands="$ac_config_commands default"
15419cat >confcache <<\_ACEOF
15420# This file is a shell script that caches the results of configure
15421# tests run on this system so they can be shared between configure
15422# scripts and configure runs, see configure's option --config-cache.
15423# It is not useful on other systems.  If it contains results you don't
15424# want to keep, you may remove or edit it.
15425#
15426# config.status only pays attention to the cache file if you give it
15427# the --recheck option to rerun configure.
15428#
15429# `ac_cv_env_foo' variables (set or unset) will be overriden when
15430# loading this file, other *unset* `ac_cv_foo' will be assigned the
15431# following values.
15432
15433_ACEOF
15434
15435# The following way of writing the cache mishandles newlines in values,
15436# but we know of no workaround that is simple, portable, and efficient.
15437# So, don't put newlines in cache variables' values.
15438# Ultrix sh set writes to stderr and can't be redirected directly,
15439# and sets the high bit in the cache file unless we assign to the vars.
15440{
15441  (set) 2>&1 |
15442    case `(ac_space=' '; set | grep ac_space) 2>&1` in
15443    *ac_space=\ *)
15444      # `set' does not quote correctly, so add quotes (double-quote
15445      # substitution turns \\\\ into \\, and sed turns \\ into \).
15446      sed -n \
15447        "s/'/'\\\\''/g;
15448    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15449      ;;
15450    *)
15451      # `set' quotes correctly as required by POSIX, so do not add quotes.
15452      sed -n \
15453        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15454      ;;
15455    esac;
15456} |
15457  sed '
15458     t clear
15459     : clear
15460     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15461     t end
15462     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15463     : end' >>confcache
15464if cmp -s $cache_file confcache; then :; else
15465  if test -w $cache_file; then
15466    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15467    cat confcache >$cache_file
15468  else
15469    echo "not updating unwritable cache $cache_file"
15470  fi
15471fi
15472rm -f confcache
15473
15474test "x$prefix" = xNONE && prefix=$ac_default_prefix
15475# Let make expand exec_prefix.
15476test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15477
15478# VPATH may cause trouble with some makes, so we remove $(srcdir),
15479# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15480# trailing colons and then remove the whole line if VPATH becomes empty
15481# (actually we leave an empty line to preserve line numbers).
15482if test "x$srcdir" = x.; then
15483  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
15484s/:*\$(srcdir):*/:/;
15485s/:*\${srcdir}:*/:/;
15486s/:*@srcdir@:*/:/;
15487s/^\([^=]*=[ 	]*\):*/\1/;
15488s/:*$//;
15489s/^[^=]*=[ 	]*$//;
15490}'
15491fi
15492
15493DEFS=-DHAVE_CONFIG_H
15494
15495: ${CONFIG_STATUS=./config.status}
15496ac_clean_files_save=$ac_clean_files
15497ac_clean_files="$ac_clean_files $CONFIG_STATUS"
15498{ echo "$as_me:15498: creating $CONFIG_STATUS" >&5
15499echo "$as_me: creating $CONFIG_STATUS" >&6;}
15500cat >$CONFIG_STATUS <<_ACEOF
15501#! $SHELL
15502# Generated automatically by configure.
15503# Run this file to recreate the current configuration.
15504# Compiler output produced by configure, useful for debugging
15505# configure, is in config.log if it exists.
15506
15507debug=false
15508SHELL=\${CONFIG_SHELL-$SHELL}
15509ac_cs_invocation="\$0 \$@"
15510
15511_ACEOF
15512
15513cat >>$CONFIG_STATUS <<\_ACEOF
15514# Be Bourne compatible
15515if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15516  emulate sh
15517  NULLCMD=:
15518elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
15519  set -o posix
15520fi
15521
15522# Name of the executable.
15523as_me=`echo "$0" |sed 's,.*[\\/],,'`
15524
15525if expr a : '\(a\)' >/dev/null 2>&1; then
15526  as_expr=expr
15527else
15528  as_expr=false
15529fi
15530
15531rm -f conf$$ conf$$.exe conf$$.file
15532echo >conf$$.file
15533if ln -s conf$$.file conf$$ 2>/dev/null; then
15534  # We could just check for DJGPP; but this test a) works b) is more generic
15535  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
15536  if test -f conf$$.exe; then
15537    # Don't use ln at all; we don't have any links
15538    as_ln_s='cp -p'
15539  else
15540    as_ln_s='ln -s'
15541  fi
15542elif ln conf$$.file conf$$ 2>/dev/null; then
15543  as_ln_s=ln
15544else
15545  as_ln_s='cp -p'
15546fi
15547rm -f conf$$ conf$$.exe conf$$.file
15548
15549as_executable_p="test -f"
15550
15551# Support unset when possible.
15552if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
15553  as_unset=unset
15554else
15555  as_unset=false
15556fi
15557
15558# NLS nuisances.
15559$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
15560$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
15561$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
15562$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
15563$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
15564$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
15565$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
15566$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
15567
15568# IFS
15569# We need space, tab and new line, in precisely that order.
15570as_nl='
15571'
15572IFS=" 	$as_nl"
15573
15574# CDPATH.
15575$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
15576
15577exec 6>&1
15578
15579_ACEOF
15580
15581# Files that config.status was made for.
15582if test -n "$ac_config_files"; then
15583  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
15584fi
15585
15586if test -n "$ac_config_headers"; then
15587  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
15588fi
15589
15590if test -n "$ac_config_links"; then
15591  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
15592fi
15593
15594if test -n "$ac_config_commands"; then
15595  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
15596fi
15597
15598cat >>$CONFIG_STATUS <<\EOF
15599
15600ac_cs_usage="\
15601\`$as_me' instantiates files from templates according to the
15602current configuration.
15603
15604Usage: $0 [OPTIONS] [FILE]...
15605
15606  -h, --help       print this help, then exit
15607  -V, --version    print version number, then exit
15608  -d, --debug      don't remove temporary files
15609      --recheck    update $as_me by reconfiguring in the same conditions
15610  --file=FILE[:TEMPLATE]
15611                   instantiate the configuration file FILE
15612  --header=FILE[:TEMPLATE]
15613                   instantiate the configuration header FILE
15614
15615Configuration files:
15616$config_files
15617
15618Configuration headers:
15619$config_headers
15620
15621Configuration commands:
15622$config_commands
15623
15624Report bugs to <bug-autoconf@gnu.org>."
15625EOF
15626
15627cat >>$CONFIG_STATUS <<EOF
15628ac_cs_version="\\
15629config.status
15630configured by $0, generated by GNU Autoconf 2.52.20061216,
15631  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
15632
15633Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
15634Free Software Foundation, Inc.
15635This config.status script is free software; the Free Software Foundation
15636gives unlimited permission to copy, distribute and modify it."
15637srcdir=$srcdir
15638INSTALL="$INSTALL"
15639EOF
15640
15641cat >>$CONFIG_STATUS <<\EOF
15642# If no file are specified by the user, then we need to provide default
15643# value.  By we need to know if files were specified by the user.
15644ac_need_defaults=:
15645while test $# != 0
15646do
15647  case $1 in
15648  --*=*)
15649    ac_option=`expr "x$1" : 'x\([^=]*\)='`
15650    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
15651    shift
15652    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
15653    shift
15654    ;;
15655  -*);;
15656  *) # This is not an option, so the user has probably given explicit
15657     # arguments.
15658     ac_need_defaults=false;;
15659  esac
15660
15661  case $1 in
15662  # Handling of the options.
15663EOF
15664cat >>$CONFIG_STATUS <<EOF
15665  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15666    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
15667    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
15668EOF
15669cat >>$CONFIG_STATUS <<\EOF
15670  --version | --vers* | -V )
15671    echo "$ac_cs_version"; exit 0 ;;
15672  --he | --h)
15673    # Conflict between --help and --header
15674    { { echo "$as_me:15674: error: ambiguous option: $1
15675Try \`$0 --help' for more information." >&5
15676echo "$as_me: error: ambiguous option: $1
15677Try \`$0 --help' for more information." >&2;}
15678   { (exit 1); exit 1; }; };;
15679  --help | --hel | -h )
15680    echo "$ac_cs_usage"; exit 0 ;;
15681  --debug | --d* | -d )
15682    debug=: ;;
15683  --file | --fil | --fi | --f )
15684    shift
15685    CONFIG_FILES="$CONFIG_FILES $1"
15686    ac_need_defaults=false;;
15687  --header | --heade | --head | --hea )
15688    shift
15689    CONFIG_HEADERS="$CONFIG_HEADERS $1"
15690    ac_need_defaults=false;;
15691
15692  # This is an error.
15693  -*) { { echo "$as_me:15693: error: unrecognized option: $1
15694Try \`$0 --help' for more information." >&5
15695echo "$as_me: error: unrecognized option: $1
15696Try \`$0 --help' for more information." >&2;}
15697   { (exit 1); exit 1; }; } ;;
15698
15699  *) ac_config_targets="$ac_config_targets $1" ;;
15700
15701  esac
15702  shift
15703done
15704
15705exec 5>>config.log
15706cat >&5 << _ACEOF
15707
15708## ----------------------- ##
15709## Running config.status.  ##
15710## ----------------------- ##
15711
15712This file was extended by $as_me 2.52.20061216, executed with
15713  CONFIG_FILES    = $CONFIG_FILES
15714  CONFIG_HEADERS  = $CONFIG_HEADERS
15715  CONFIG_LINKS    = $CONFIG_LINKS
15716  CONFIG_COMMANDS = $CONFIG_COMMANDS
15717  > $ac_cs_invocation
15718on `(hostname || uname -n) 2>/dev/null | sed 1q`
15719
15720_ACEOF
15721EOF
15722
15723cat >>$CONFIG_STATUS <<EOF
15724#
15725# INIT-COMMANDS section.
15726#
15727
15728### Special initialization commands, used to pass information from the
15729### configuration-run into config.status
15730
15731AWK="$AWK"
15732DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
15733DFT_LWR_MODEL="$DFT_LWR_MODEL"
15734ECHO_LINK="$ECHO_LINK"
15735LDCONFIG="$LDCONFIG"
15736LIB_NAME="$LIB_NAME"
15737LIB_SUBSETS="$LIB_SUBSETS"
15738LIB_SUFFIX="$LIB_SUFFIX"
15739LIB_TRACING="$LIB_TRACING"
15740MAKE_TERMINFO="$MAKE_TERMINFO"
15741NCURSES_MAJOR="$NCURSES_MAJOR"
15742NCURSES_MINOR="$NCURSES_MINOR"
15743NCURSES_OSPEED="$NCURSES_OSPEED"
15744NCURSES_PATCH="$NCURSES_PATCH"
15745SRC_SUBDIRS="$SRC_SUBDIRS"
15746TERMINFO="$TERMINFO"
15747TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
15748TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
15749TINFO_NAME="$TINFO_NAME"
15750WITH_CURSES_H="$with_curses_h"
15751WITH_ECHO="$with_echo"
15752WITH_OVERWRITE="$with_overwrite"
15753cf_LIST_MODELS="$cf_list_models"
15754cf_cv_abi_version="$cf_cv_abi_version"
15755cf_cv_do_symlinks="$cf_cv_do_symlinks"
15756cf_cv_enable_lp64="$cf_cv_enable_lp64"
15757cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
15758cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
15759cf_cv_rel_version="$cf_cv_rel_version"
15760cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
15761cf_cv_shlib_version="$cf_cv_shlib_version"
15762cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
15763cf_cv_system_name="$cf_cv_system_name"
15764cf_with_cxx_binding="$cf_with_cxx_binding"
15765host="$host"
15766target="$target"
15767
15768EOF
15769
15770cat >>$CONFIG_STATUS <<\EOF
15771for ac_config_target in $ac_config_targets
15772do
15773  case "$ac_config_target" in
15774  # Handling of arguments.
15775  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
15776  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
15777  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
15778  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
15779  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
15780  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
15781  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
15782  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
15783  *) { { echo "$as_me:15783: error: invalid argument: $ac_config_target" >&5
15784echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
15785   { (exit 1); exit 1; }; };;
15786  esac
15787done
15788
15789# If the user did not use the arguments to specify the items to instantiate,
15790# then the envvar interface is used.  Set only those that are not.
15791# We use the long form for the default assignment because of an extremely
15792# bizarre bug on SunOS 4.1.3.
15793if $ac_need_defaults; then
15794  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15795  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15796  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
15797fi
15798
15799# Create a temporary directory, and hook for its removal unless debugging.
15800$debug ||
15801{
15802  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
15803  trap '{ (exit 1); exit 1; }' 1 2 13 15
15804}
15805
15806# Create a (secure) tmp directory for tmp files.
15807: ${TMPDIR=/tmp}
15808{
15809  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
15810  test -n "$tmp" && test -d "$tmp"
15811}  ||
15812{
15813  tmp=$TMPDIR/cs$$-$RANDOM
15814  (umask 077 && mkdir $tmp)
15815} ||
15816{
15817   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
15818   { (exit 1); exit 1; }
15819}
15820
15821EOF
15822
15823cat >>$CONFIG_STATUS <<EOF
15824
15825#
15826# CONFIG_FILES section.
15827#
15828
15829# No need to generate the scripts if there are no CONFIG_FILES.
15830# This happens for instance when ./config.status config.h
15831if test -n "\$CONFIG_FILES"; then
15832  # Protect against being on the right side of a sed subst in config.status.
15833  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
15834   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
15835s,@SHELL@,$SHELL,;t t
15836s,@exec_prefix@,$exec_prefix,;t t
15837s,@prefix@,$prefix,;t t
15838s,@program_transform_name@,$program_transform_name,;t t
15839s,@bindir@,$bindir,;t t
15840s,@sbindir@,$sbindir,;t t
15841s,@libexecdir@,$libexecdir,;t t
15842s,@datadir@,$datadir,;t t
15843s,@sysconfdir@,$sysconfdir,;t t
15844s,@sharedstatedir@,$sharedstatedir,;t t
15845s,@localstatedir@,$localstatedir,;t t
15846s,@libdir@,$libdir,;t t
15847s,@includedir@,$includedir,;t t
15848s,@oldincludedir@,$oldincludedir,;t t
15849s,@infodir@,$infodir,;t t
15850s,@mandir@,$mandir,;t t
15851s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
15852s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
15853s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
15854s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
15855s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
15856s,@build_alias@,$build_alias,;t t
15857s,@host_alias@,$host_alias,;t t
15858s,@target_alias@,$target_alias,;t t
15859s,@ECHO_C@,$ECHO_C,;t t
15860s,@ECHO_N@,$ECHO_N,;t t
15861s,@ECHO_T@,$ECHO_T,;t t
15862s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
15863s,@DEFS@,$DEFS,;t t
15864s,@LIBS@,$LIBS,;t t
15865s,@top_builddir@,$top_builddir,;t t
15866s,@EGREP@,$EGREP,;t t
15867s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
15868s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
15869s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
15870s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
15871s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
15872s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
15873s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
15874s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
15875s,@build@,$build,;t t
15876s,@build_cpu@,$build_cpu,;t t
15877s,@build_vendor@,$build_vendor,;t t
15878s,@build_os@,$build_os,;t t
15879s,@host@,$host,;t t
15880s,@host_cpu@,$host_cpu,;t t
15881s,@host_vendor@,$host_vendor,;t t
15882s,@host_os@,$host_os,;t t
15883s,@target@,$target,;t t
15884s,@target_cpu@,$target_cpu,;t t
15885s,@target_vendor@,$target_vendor,;t t
15886s,@target_os@,$target_os,;t t
15887s,@CC@,$CC,;t t
15888s,@CFLAGS@,$CFLAGS,;t t
15889s,@LDFLAGS@,$LDFLAGS,;t t
15890s,@CPPFLAGS@,$CPPFLAGS,;t t
15891s,@ac_ct_CC@,$ac_ct_CC,;t t
15892s,@EXEEXT@,$EXEEXT,;t t
15893s,@OBJEXT@,$OBJEXT,;t t
15894s,@CPP@,$CPP,;t t
15895s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
15896s,@PROG_EXT@,$PROG_EXT,;t t
15897s,@LDCONFIG@,$LDCONFIG,;t t
15898s,@CXX@,$CXX,;t t
15899s,@CXXFLAGS@,$CXXFLAGS,;t t
15900s,@ac_ct_CXX@,$ac_ct_CXX,;t t
15901s,@AWK@,$AWK,;t t
15902s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
15903s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
15904s,@INSTALL_DATA@,$INSTALL_DATA,;t t
15905s,@LINT@,$LINT,;t t
15906s,@LINT_OPTS@,$LINT_OPTS,;t t
15907s,@LN_S@,$LN_S,;t t
15908s,@SET_MAKE@,$SET_MAKE,;t t
15909s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
15910s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
15911s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
15912s,@RANLIB@,$RANLIB,;t t
15913s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
15914s,@LD@,$LD,;t t
15915s,@ac_ct_LD@,$ac_ct_LD,;t t
15916s,@AR@,$AR,;t t
15917s,@ac_ct_AR@,$ac_ct_AR,;t t
15918s,@AR_OPTS@,$AR_OPTS,;t t
15919s,@DESTDIR@,$DESTDIR,;t t
15920s,@BUILD_CC@,$BUILD_CC,;t t
15921s,@BUILD_CPP@,$BUILD_CPP,;t t
15922s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
15923s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
15924s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
15925s,@BUILD_LIBS@,$BUILD_LIBS,;t t
15926s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
15927s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
15928s,@cf_list_models@,$cf_list_models,;t t
15929s,@LIBTOOL@,$LIBTOOL,;t t
15930s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
15931s,@LIB_CREATE@,$LIB_CREATE,;t t
15932s,@LIB_OBJECT@,$LIB_OBJECT,;t t
15933s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
15934s,@LIB_PREP@,$LIB_PREP,;t t
15935s,@LIB_CLEAN@,$LIB_CLEAN,;t t
15936s,@LIB_COMPILE@,$LIB_COMPILE,;t t
15937s,@LIB_LINK@,$LIB_LINK,;t t
15938s,@LIB_INSTALL@,$LIB_INSTALL,;t t
15939s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
15940s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
15941s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
15942s,@TINFO_NAME@,$TINFO_NAME,;t t
15943s,@LIB_NAME@,$LIB_NAME,;t t
15944s,@LIB_PREFIX@,$LIB_PREFIX,;t t
15945s,@CC_G_OPT@,$CC_G_OPT,;t t
15946s,@CXX_G_OPT@,$CXX_G_OPT,;t t
15947s,@LD_MODEL@,$LD_MODEL,;t t
15948s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
15949s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
15950s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
15951s,@LINK_PROGS@,$LINK_PROGS,;t t
15952s,@LINK_TESTS@,$LINK_TESTS,;t t
15953s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
15954s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
15955s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
15956s,@INSTALL_LIB@,$INSTALL_LIB,;t t
15957s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
15958s,@PATHSEP@,$PATHSEP,;t t
15959s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
15960s,@WHICH_XTERM@,$WHICH_XTERM,;t t
15961s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
15962s,@TERMINFO@,$TERMINFO,;t t
15963s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
15964s,@TERMPATH@,$TERMPATH,;t t
15965s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
15966s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
15967s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
15968s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
15969s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
15970s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
15971s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
15972s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
15973s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
15974s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
15975s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
15976s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
15977s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
15978s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
15979s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
15980s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
15981s,@NCURSES_CONST@,$NCURSES_CONST,;t t
15982s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
15983s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
15984s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
15985s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
15986s,@ECHO_LINK@,$ECHO_LINK,;t t
15987s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
15988s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
15989s,@ADA_TRACE@,$ADA_TRACE,;t t
15990s,@MATH_LIB@,$MATH_LIB,;t t
15991s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
15992s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
15993s,@cf_cv_1UL@,$cf_cv_1UL,;t t
15994s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
15995s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
15996s,@CXXCPP@,$CXXCPP,;t t
15997s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
15998s,@CXX_AR@,$CXX_AR,;t t
15999s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
16000s,@CXXLIBS@,$CXXLIBS,;t t
16001s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
16002s,@gnat_exists@,$gnat_exists,;t t
16003s,@M4_exists@,$M4_exists,;t t
16004s,@cf_ada_make@,$cf_ada_make,;t t
16005s,@cf_ada_compiler@,$cf_ada_compiler,;t t
16006s,@cf_ada_package@,$cf_ada_package,;t t
16007s,@ADAFLAGS@,$ADAFLAGS,;t t
16008s,@cf_compile_generics@,$cf_compile_generics,;t t
16009s,@cf_generic_objects@,$cf_generic_objects,;t t
16010s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
16011s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
16012s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
16013s,@ACPPFLAGS@,$ACPPFLAGS,;t t
16014s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
16015s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16016s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16017s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
16018s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
16019s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
16020s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
16021s,@TINFO_ARGS@,$TINFO_ARGS,;t t
16022s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
16023s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
16024s,@TINFO_LIST@,$TINFO_LIST,;t t
16025s,@SHLIB_LIST@,$SHLIB_LIST,;t t
16026s,@TEST_ARGS@,$TEST_ARGS,;t t
16027s,@TEST_DEPS@,$TEST_DEPS,;t t
16028s,@TEST_ARG2@,$TEST_ARG2,;t t
16029s,@TEST_DEP2@,$TEST_DEP2,;t t
16030s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
16031s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
16032s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
16033s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
16034s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
16035CEOF
16036
16037EOF
16038
16039  cat >>$CONFIG_STATUS <<\EOF
16040  # Split the substitutions into bite-sized pieces for seds with
16041  # small command number limits, like on Digital OSF/1 and HP-UX.
16042  ac_max_sed_lines=48
16043  ac_sed_frag=1 # Number of current file.
16044  ac_beg=1 # First line for current file.
16045  ac_end=$ac_max_sed_lines # Line after last line for current file.
16046  ac_more_lines=:
16047  ac_sed_cmds=
16048  while $ac_more_lines; do
16049    if test $ac_beg -gt 1; then
16050      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16051    else
16052      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16053    fi
16054    if test ! -s $tmp/subs.frag; then
16055      ac_more_lines=false
16056    else
16057      # The purpose of the label and of the branching condition is to
16058      # speed up the sed processing (if there are no `@' at all, there
16059      # is no need to browse any of the substitutions).
16060      # These are the two extra sed commands mentioned above.
16061      (echo ':t
16062  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16063      if test -z "$ac_sed_cmds"; then
16064  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16065      else
16066  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16067      fi
16068      ac_sed_frag=`expr $ac_sed_frag + 1`
16069      ac_beg=$ac_end
16070      ac_end=`expr $ac_end + $ac_max_sed_lines`
16071    fi
16072  done
16073  if test -z "$ac_sed_cmds"; then
16074    ac_sed_cmds=cat
16075  fi
16076fi # test -n "$CONFIG_FILES"
16077
16078EOF
16079cat >>$CONFIG_STATUS <<\EOF
16080for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16081  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16082  case $ac_file in
16083  - | *:- | *:-:* ) # input from stdin
16084        cat >$tmp/stdin
16085        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16086        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16087  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16088        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16089  * )   ac_file_in=$ac_file.in ;;
16090  esac
16091
16092  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16093  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16094         X"$ac_file" : 'X\(//\)[^/]' \| \
16095         X"$ac_file" : 'X\(//\)$' \| \
16096         X"$ac_file" : 'X\(/\)' \| \
16097         .     : '\(.\)' 2>/dev/null ||
16098echo X"$ac_file" |
16099    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16100  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16101  	  /^X\(\/\/\)$/{ s//\1/; q; }
16102  	  /^X\(\/\).*/{ s//\1/; q; }
16103  	  s/.*/./; q'`
16104  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16105    { case "$ac_dir" in
16106  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16107  *)                      as_incr_dir=.;;
16108esac
16109as_dummy="$ac_dir"
16110for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16111  case $as_mkdir_dir in
16112    # Skip DOS drivespec
16113    ?:) as_incr_dir=$as_mkdir_dir ;;
16114    *)
16115      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16116      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16117    ;;
16118  esac
16119done; }
16120
16121    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16122    # A "../" for each directory in $ac_dir_suffix.
16123    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16124  else
16125    ac_dir_suffix= ac_dots=
16126  fi
16127
16128  case $srcdir in
16129  .)  ac_srcdir=.
16130      if test -z "$ac_dots"; then
16131         ac_top_srcdir=.
16132      else
16133         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16134      fi ;;
16135  [\\/]* | ?:[\\/]* )
16136      ac_srcdir=$srcdir$ac_dir_suffix;
16137      ac_top_srcdir=$srcdir ;;
16138  *) # Relative path.
16139    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16140    ac_top_srcdir=$ac_dots$srcdir ;;
16141  esac
16142
16143  case $INSTALL in
16144  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16145  *) ac_INSTALL=$ac_dots$INSTALL ;;
16146  esac
16147
16148  if test x"$ac_file" != x-; then
16149    { echo "$as_me:16149: creating $ac_file" >&5
16150echo "$as_me: creating $ac_file" >&6;}
16151    rm -f "$ac_file"
16152  fi
16153  # Let's still pretend it is `configure' which instantiates (i.e., don't
16154  # use $as_me), people would be surprised to read:
16155  #    /* config.h.  Generated automatically by config.status.  */
16156  configure_input="Generated automatically from `echo $ac_file_in |
16157                                                 sed 's,.*/,,'` by configure."
16158
16159  # First look for the input files in the build tree, otherwise in the
16160  # src tree.
16161  ac_file_inputs=`IFS=:
16162    for f in $ac_file_in; do
16163      case $f in
16164      -) echo $tmp/stdin ;;
16165      [\\/$]*)
16166         # Absolute (can't be DOS-style, as IFS=:)
16167         test -f "$f" || { { echo "$as_me:16167: error: cannot find input file: $f" >&5
16168echo "$as_me: error: cannot find input file: $f" >&2;}
16169   { (exit 1); exit 1; }; }
16170         echo $f;;
16171      *) # Relative
16172         if test -f "$f"; then
16173           # Build tree
16174           echo $f
16175         elif test -f "$srcdir/$f"; then
16176           # Source tree
16177           echo $srcdir/$f
16178         else
16179           # /dev/null tree
16180           { { echo "$as_me:16180: error: cannot find input file: $f" >&5
16181echo "$as_me: error: cannot find input file: $f" >&2;}
16182   { (exit 1); exit 1; }; }
16183         fi;;
16184      esac
16185    done` || { (exit 1); exit 1; }
16186EOF
16187cat >>$CONFIG_STATUS <<EOF
16188  sed "$ac_vpsub
16189$extrasub
16190EOF
16191cat >>$CONFIG_STATUS <<\EOF
16192:t
16193/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16194s,@configure_input@,$configure_input,;t t
16195s,@srcdir@,$ac_srcdir,;t t
16196s,@top_srcdir@,$ac_top_srcdir,;t t
16197s,@INSTALL@,$ac_INSTALL,;t t
16198" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16199  rm -f $tmp/stdin
16200  if test x"$ac_file" != x-; then
16201    mv $tmp/out $ac_file
16202  else
16203    cat $tmp/out
16204    rm -f $tmp/out
16205  fi
16206
16207done
16208EOF
16209cat >>$CONFIG_STATUS <<\EOF
16210
16211#
16212# CONFIG_HEADER section.
16213#
16214
16215# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16216# NAME is the cpp macro being defined and VALUE is the value it is being given.
16217#
16218# ac_d sets the value in "#define NAME VALUE" lines.
16219ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
16220ac_dB='[ 	].*$,\1#\2'
16221ac_dC=' '
16222ac_dD=',;t'
16223# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16224ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16225ac_iB='\([ 	]\),\1#\2define\3'
16226ac_iC=' '
16227ac_iD='\4,;t'
16228# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16229ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
16230ac_uB='$,\1#\2define\3'
16231ac_uC=' '
16232ac_uD=',;t'
16233
16234for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16235  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16236  case $ac_file in
16237  - | *:- | *:-:* ) # input from stdin
16238        cat >$tmp/stdin
16239        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16240        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16241  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16242        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16243  * )   ac_file_in=$ac_file.in ;;
16244  esac
16245
16246  test x"$ac_file" != x- && { echo "$as_me:16246: creating $ac_file" >&5
16247echo "$as_me: creating $ac_file" >&6;}
16248
16249  # First look for the input files in the build tree, otherwise in the
16250  # src tree.
16251  ac_file_inputs=`IFS=:
16252    for f in $ac_file_in; do
16253      case $f in
16254      -) echo $tmp/stdin ;;
16255      [\\/$]*)
16256         # Absolute (can't be DOS-style, as IFS=:)
16257         test -f "$f" || { { echo "$as_me:16257: error: cannot find input file: $f" >&5
16258echo "$as_me: error: cannot find input file: $f" >&2;}
16259   { (exit 1); exit 1; }; }
16260         echo $f;;
16261      *) # Relative
16262         if test -f "$f"; then
16263           # Build tree
16264           echo $f
16265         elif test -f "$srcdir/$f"; then
16266           # Source tree
16267           echo $srcdir/$f
16268         else
16269           # /dev/null tree
16270           { { echo "$as_me:16270: error: cannot find input file: $f" >&5
16271echo "$as_me: error: cannot find input file: $f" >&2;}
16272   { (exit 1); exit 1; }; }
16273         fi;;
16274      esac
16275    done` || { (exit 1); exit 1; }
16276  # Remove the trailing spaces.
16277  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
16278
16279EOF
16280
16281# Transform confdefs.h into a list of #define's.  We won't use it as a sed
16282# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
16283# be either 'cat' or 'sort'.
16284cat confdefs.h | uniq >conftest.vals
16285
16286# Break up conftest.vals because some shells have a limit on
16287# the size of here documents, and old seds have small limits too.
16288
16289rm -f conftest.tail
16290echo '  rm -f conftest.frag' >> $CONFIG_STATUS
16291while grep . conftest.vals >/dev/null
16292do
16293  # Write chunks of a limited-size here document to conftest.frag.
16294  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16295  sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16296  echo 'CEOF' >> $CONFIG_STATUS
16297  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16298  rm -f conftest.vals
16299  mv conftest.tail conftest.vals
16300done
16301rm -f conftest.vals
16302
16303# Run sed to substitute the contents of conftest.frag into $tmp/in at the
16304# marker @DEFS@.
16305echo '  cat >> conftest.edit <<CEOF
16306/@DEFS@/r conftest.frag
16307/@DEFS@/d
16308CEOF
16309sed -f conftest.edit $tmp/in > $tmp/out
16310rm -f $tmp/in
16311mv $tmp/out $tmp/in
16312rm -f conftest.edit conftest.frag
16313' >> $CONFIG_STATUS
16314
16315cat >>$CONFIG_STATUS <<\EOF
16316  # Let's still pretend it is `configure' which instantiates (i.e., don't
16317  # use $as_me), people would be surprised to read:
16318  #    /* config.h.  Generated automatically by config.status.  */
16319  if test x"$ac_file" = x-; then
16320    echo "/* Generated automatically by configure.  */" >$tmp/config.h
16321  else
16322    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
16323  fi
16324  cat $tmp/in >>$tmp/config.h
16325  rm -f $tmp/in
16326  if test x"$ac_file" != x-; then
16327    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16328      { echo "$as_me:16328: $ac_file is unchanged" >&5
16329echo "$as_me: $ac_file is unchanged" >&6;}
16330    else
16331      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16332         X"$ac_file" : 'X\(//\)[^/]' \| \
16333         X"$ac_file" : 'X\(//\)$' \| \
16334         X"$ac_file" : 'X\(/\)' \| \
16335         .     : '\(.\)' 2>/dev/null ||
16336echo X"$ac_file" |
16337    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16338  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16339  	  /^X\(\/\/\)$/{ s//\1/; q; }
16340  	  /^X\(\/\).*/{ s//\1/; q; }
16341  	  s/.*/./; q'`
16342      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16343        { case "$ac_dir" in
16344  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16345  *)                      as_incr_dir=.;;
16346esac
16347as_dummy="$ac_dir"
16348for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16349  case $as_mkdir_dir in
16350    # Skip DOS drivespec
16351    ?:) as_incr_dir=$as_mkdir_dir ;;
16352    *)
16353      as_incr_dir=$as_incr_dir/$as_mkdir_dir
16354      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16355    ;;
16356  esac
16357done; }
16358
16359      fi
16360      rm -f $ac_file
16361      mv $tmp/config.h $ac_file
16362    fi
16363  else
16364    cat $tmp/config.h
16365    rm -f $tmp/config.h
16366  fi
16367done
16368EOF
16369cat >>$CONFIG_STATUS <<\EOF
16370
16371#
16372# CONFIG_COMMANDS section.
16373#
16374for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16375  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16376  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16377
16378  case $ac_dest in
16379    default )
16380
16381for cf_dir in test
16382do
16383	if test ! -d $srcdir/$cf_dir; then
16384		continue
16385	elif test -f $srcdir/$cf_dir/programs; then
16386		$AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16387	fi
16388done
16389
16390	case $cf_cv_system_name in
16391	OS/2*)	LIB_PREFIX=''     ;;
16392	os2*)	LIB_PREFIX=''     ;;
16393	*)	LIB_PREFIX='lib'  ;;
16394	esac
16395cf_prefix=$LIB_PREFIX
16396
16397for cf_dir in $SRC_SUBDIRS
16398do
16399	if test ! -d $srcdir/$cf_dir ; then
16400		continue
16401	elif test -f $srcdir/$cf_dir/modules; then
16402
16403		IMPORT_LIB=
16404		SHARED_LIB=
16405		LIBS_TO_MAKE=
16406		for cf_item in $cf_LIST_MODELS
16407		do
16408
16409	case $cf_item in
16410	libtool) cf_suffix='.la'  ;;
16411	normal)  cf_suffix='.a'   ;;
16412	debug)   cf_suffix='_g.a' ;;
16413	profile) cf_suffix='_p.a' ;;
16414	shared)
16415		case $cf_cv_system_name in
16416		cygwin*) cf_suffix='.dll' ;;
16417		darwin*) cf_suffix='.dylib' ;;
16418		hpux*)
16419			case $target in
16420			ia64*)	cf_suffix='.so' ;;
16421			*)	cf_suffix='.sl' ;;
16422			esac
16423			;;
16424		*)	cf_suffix='.so'  ;;
16425		esac
16426	esac
16427	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16428
16429			if test $cf_item = shared ; then
16430			if test "$cf_cv_do_symlinks" = yes ; then
16431				case "$cf_cv_shlib_version" in #(vi
16432				rel) #(vi
16433					case "$cf_cv_system_name" in #(vi
16434					darwin*)
16435					case .${LIB_SUFFIX} in
16436					.w*)
16437						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16438						cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
16439						;;
16440					*)
16441						cf_suffix='.${REL_VERSION}'"$cf_suffix"
16442						;;
16443					esac
16444					;; #(vi
16445					*) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
16446					esac
16447					;;
16448				abi)
16449					case "$cf_cv_system_name" in #(vi
16450					darwin*)
16451					case .${LIB_SUFFIX} in
16452					.w*)
16453						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16454						cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
16455						;;
16456					*)
16457						cf_suffix='.${ABI_VERSION}'"$cf_suffix"
16458						;;
16459					esac
16460					;; #(vi
16461					*) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
16462					esac
16463					;;
16464				esac
16465			fi
16466			# cygwin needs import library, and has unique naming convention
16467			# use autodetected ${cf_prefix} for import lib and static lib, but
16468			# use 'cyg' prefix for shared lib.
16469			if test $cf_cv_shlib_version = cygdll ; then
16470				SHARED_LIB="cyg${cf_dir}\${ABI_VERSION}.dll"
16471				IMPORT_LIB="${cf_prefix}${cf_dir}.dll.a"
16472				LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/\${SHARED_LIB} ../lib/\${IMPORT_LIB}"
16473				continue
16474			fi
16475			fi
16476			LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
16477		done
16478
16479		if test $cf_dir = ncurses ; then
16480			cf_subsets="$LIB_SUBSETS"
16481			cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
16482			if test "$cf_termlib" != "$cf_subsets" ; then
16483				cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
16484				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
16485			fi
16486		else
16487			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
16488		fi
16489
16490		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
16491		    -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
16492		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
16493			$cf_dir/Makefile >$cf_dir/Makefile.out
16494		mv $cf_dir/Makefile.out $cf_dir/Makefile
16495
16496		$AWK -f $srcdir/mk-0th.awk \
16497			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
16498			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
16499
16500		for cf_subset in $cf_subsets
16501		do
16502			cf_subdirs=
16503			for cf_item in $cf_LIST_MODELS
16504			do
16505			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
16506
16507cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16508
16509	case $cf_item in
16510	libtool) cf_suffix='.la'  ;;
16511	normal)  cf_suffix='.a'   ;;
16512	debug)   cf_suffix='_g.a' ;;
16513	profile) cf_suffix='_p.a' ;;
16514	shared)
16515		case $cf_cv_system_name in
16516		cygwin*) cf_suffix='.dll' ;;
16517		darwin*) cf_suffix='.dylib' ;;
16518		hpux*)
16519			case $target in
16520			ia64*)	cf_suffix='.so' ;;
16521			*)	cf_suffix='.sl' ;;
16522			esac
16523			;;
16524		*)	cf_suffix='.so'  ;;
16525		esac
16526	esac
16527	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
16528
16529	case $cf_item in
16530	libtool) cf_subdir='obj_lo'  ;;
16531	normal)  cf_subdir='objects' ;;
16532	debug)   cf_subdir='obj_g' ;;
16533	profile) cf_subdir='obj_p' ;;
16534	shared)
16535		case $cf_cv_system_name in #(vi
16536		cygwin) #(vi
16537			cf_subdir='objects' ;;
16538		*)
16539			cf_subdir='obj_s' ;;
16540		esac
16541	esac
16542
16543			# Test for case where we build libtinfo with a different name.
16544			cf_libname=$cf_dir
16545			if test $cf_dir = ncurses ; then
16546				case $cf_subset in
16547				*base*)
16548					;;
16549				termlib*)
16550					cf_libname=$TINFO_LIB_SUFFIX
16551					if test -n "${DFT_ARG_SUFFIX}" ; then
16552						# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
16553						cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
16554					fi
16555				;;
16556				esac
16557			fi
16558
16559			# These dependencies really are for development, not
16560			# builds, but they are useful in porting, too.
16561			cf_depend="../include/ncurses_cfg.h"
16562			if test "$srcdir" = "."; then
16563				cf_reldir="."
16564			else
16565				cf_reldir="\${srcdir}"
16566			fi
16567
16568			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
16569				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
16570			elif test -f $srcdir/$cf_dir/curses.priv.h; then
16571				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
16572			fi
16573
16574 			cf_dir_suffix=
16575 			old_cf_suffix="$cf_suffix"
16576 			if test "$cf_cv_shlib_version_infix" = yes ; then
16577			if test -n "$LIB_SUFFIX" ; then
16578				case $LIB_SUFFIX in
16579				w*)
16580					cf_libname=`echo $cf_libname | sed 's/w$//'`
16581					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
16582					cf_dir_suffix=w
16583					;;
16584				esac
16585			fi
16586 			fi
16587
16588			$AWK -f $srcdir/mk-1st.awk \
16589				name=${cf_libname}${cf_dir_suffix} \
16590				traces=$LIB_TRACING \
16591				MODEL=$cf_ITEM \
16592				model=$cf_subdir \
16593				prefix=$cf_prefix \
16594				suffix=$cf_suffix \
16595				subset=$cf_subset \
16596				ShlibVer=$cf_cv_shlib_version \
16597				ShlibVerInfix=$cf_cv_shlib_version_infix \
16598				DoLinks=$cf_cv_do_symlinks \
16599				rmSoLocs=$cf_cv_rm_so_locs \
16600				ldconfig="$LDCONFIG" \
16601				overwrite=$WITH_OVERWRITE \
16602				depend="$cf_depend" \
16603				host="$host" \
16604				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
16605
16606			cf_suffix="$old_cf_suffix"
16607
16608			for cf_subdir2 in $cf_subdirs lib
16609			do
16610				test $cf_subdir = $cf_subdir2 && break
16611			done
16612			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
16613			$AWK -f $srcdir/mk-2nd.awk \
16614				name=$cf_dir \
16615				traces=$LIB_TRACING \
16616				MODEL=$cf_ITEM \
16617				model=$cf_subdir \
16618				subset=$cf_subset \
16619				srcdir=$srcdir \
16620				echo=$WITH_ECHO \
16621				crenames=$cf_cv_prog_CC_c_o \
16622				cxxrenames=$cf_cv_prog_CXX_c_o \
16623				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
16624			cf_subdirs="$cf_subdirs $cf_subdir"
16625			done
16626		done
16627	fi
16628
16629	echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
16630done
16631
16632for cf_dir in $SRC_SUBDIRS
16633do
16634	if test ! -d $srcdir/$cf_dir ; then
16635		continue
16636	fi
16637
16638	if test -f $cf_dir/Makefile ; then
16639		case "$cf_dir" in
16640		Ada95) #(vi
16641			echo 'libs \' >> Makefile
16642			echo 'install.libs \' >> Makefile
16643			echo 'uninstall.libs ::' >> Makefile
16644			echo '	cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
16645			;;
16646		esac
16647	fi
16648
16649	if test -f $srcdir/$cf_dir/modules; then
16650		echo >> Makefile
16651		if test -f $srcdir/$cf_dir/headers; then
16652cat >> Makefile <<CF_EOF
16653install.includes \\
16654uninstall.includes \\
16655CF_EOF
16656		fi
16657if test "$cf_dir" != "c++" ; then
16658echo 'lint \' >> Makefile
16659fi
16660cat >> Makefile <<CF_EOF
16661libs \\
16662lintlib \\
16663install.libs \\
16664uninstall.libs \\
16665install.$cf_dir \\
16666uninstall.$cf_dir ::
16667	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16668CF_EOF
16669	elif test -f $srcdir/$cf_dir/headers; then
16670cat >> Makefile <<CF_EOF
16671
16672libs \\
16673install.libs \\
16674uninstall.libs \\
16675install.includes \\
16676uninstall.includes ::
16677	cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
16678CF_EOF
16679fi
16680done
16681
16682cat >> Makefile <<CF_EOF
16683
16684install.data \\
16685uninstall.data ::
16686$MAKE_TERMINFO	cd misc && \${MAKE} \${CF_MFLAGS} \$@
16687
16688install.man \\
16689uninstall.man ::
16690	cd man && \${MAKE} \${CF_MFLAGS} \$@
16691
16692distclean ::
16693	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
16694	rm -f headers.sh headers.sed
16695	rm -rf \${DIRS_TO_MAKE}
16696CF_EOF
16697
16698# Special case: tack's manpage lives in its own directory.
16699if test -d tack ; then
16700if test -f $srcdir/$tack.h; then
16701cat >> Makefile <<CF_EOF
16702
16703install.man \\
16704uninstall.man ::
16705	cd tack && \${MAKE} \${CF_MFLAGS} \$@
16706CF_EOF
16707fi
16708fi
16709
16710rm -f headers.sed headers.sh
16711
16712echo creating headers.sh
16713cat >headers.sh <<CF_EOF
16714#! /bin/sh
16715# This shell script is generated by the 'configure' script.  It is invoked in a
16716# subdirectory of the build tree.  It generates a sed-script in the parent
16717# directory that is used to adjust includes for header files that reside in a
16718# subdirectory of /usr/include, etc.
16719PRG=""
16720while test \$# != 3
16721do
16722PRG="\$PRG \$1"; shift
16723done
16724DST=\$1
16725REF=\$2
16726SRC=\$3
16727TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
16728TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
16729echo installing \$SRC in \$DST
16730CF_EOF
16731
16732if test $WITH_CURSES_H = yes; then
16733	cat >>headers.sh <<CF_EOF
16734case \$DST in
16735/*/include/*)
16736	END=\`basename \$DST\`
16737	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16738	do
16739		NAME=\`basename \$i\`
16740		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16741	done
16742	;;
16743*)
16744	echo "" >> \$TMPSED
16745	;;
16746esac
16747CF_EOF
16748
16749else
16750	cat >>headers.sh <<CF_EOF
16751case \$DST in
16752/*/include/*)
16753	END=\`basename \$DST\`
16754	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
16755	do
16756		NAME=\`basename \$i\`
16757		if test "\$NAME" = "curses.h"
16758		then
16759			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16760			NAME=ncurses.h
16761		fi
16762		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
16763	done
16764	;;
16765*)
16766	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
16767	;;
16768esac
16769CF_EOF
16770fi
16771cat >>headers.sh <<CF_EOF
16772rm -f \$TMPSRC
16773sed -f \$TMPSED \$SRC > \$TMPSRC
16774NAME=\`basename \$SRC\`
16775CF_EOF
16776if test $WITH_CURSES_H != yes; then
16777	cat >>headers.sh <<CF_EOF
16778test "\$NAME" = "curses.h" && NAME=ncurses.h
16779CF_EOF
16780fi
16781cat >>headers.sh <<CF_EOF
16782# Just in case someone gzip'd manpages, remove the conflicting copy.
16783test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
16784
16785eval \$PRG \$TMPSRC \$DST/\$NAME
16786rm -f \$TMPSRC \$TMPSED
16787CF_EOF
16788
16789chmod 0755 headers.sh
16790
16791for cf_dir in $SRC_SUBDIRS
16792do
16793	if test ! -d $srcdir/$cf_dir ; then
16794		continue
16795	fi
16796
16797	if test -f $srcdir/$cf_dir/headers; then
16798	cat >>$cf_dir/Makefile <<CF_EOF
16799\${DESTDIR}\${includedir} :
16800	sh \${srcdir}/../mkinstalldirs \$@
16801
16802install \\
16803install.libs \\
16804install.includes :: \${AUTO_SRC} \${DESTDIR}\${includedir} \\
16805CF_EOF
16806		j=""
16807		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16808		do
16809			test -n "$j" && echo "		$j \\" >>$cf_dir/Makefile
16810			j=$i
16811		done
16812
16813		echo "		$j" >>$cf_dir/Makefile
16814
16815		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16816		do
16817			echo "	@ (cd \${DESTDIR}\${includedir} && rm -f `basename $i`) ; ../headers.sh \${INSTALL_DATA} \${DESTDIR}\${includedir} \${srcdir} $i" >>$cf_dir/Makefile
16818			test $i = curses.h && test $WITH_CURSES_H = yes && echo "	@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h && \${LN_S} curses.h ncurses.h)" >>$cf_dir/Makefile
16819		done
16820
16821	cat >>$cf_dir/Makefile <<CF_EOF
16822
16823uninstall \\
16824uninstall.libs \\
16825uninstall.includes ::
16826CF_EOF
16827		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
16828		do
16829			i=`basename $i`
16830			echo "	-@ (cd \${DESTDIR}\${includedir} && rm -f $i)" >>$cf_dir/Makefile
16831			test $i = curses.h && echo "	-@ (cd \${DESTDIR}\${includedir} && rm -f ncurses.h)" >>$cf_dir/Makefile
16832		done
16833	fi
16834
16835	if test -f $srcdir/$cf_dir/modules; then
16836		if test "$cf_dir" != "c++" ; then
16837			cat >>$cf_dir/Makefile <<"CF_EOF"
16838depend : ${AUTO_SRC}
16839	makedepend -- ${CPPFLAGS} -- ${C_SRC}
16840
16841# DO NOT DELETE THIS LINE -- make depend depends on it.
16842CF_EOF
16843		fi
16844	fi
16845done
16846
16847 ;;
16848  esac
16849done
16850EOF
16851
16852cat >>$CONFIG_STATUS <<\EOF
16853
16854{ (exit 0); exit 0; }
16855EOF
16856chmod +x $CONFIG_STATUS
16857ac_clean_files=$ac_clean_files_save
16858
16859# configure is writing to config.log, and then calls config.status.
16860# config.status does its own redirection, appending to config.log.
16861# Unfortunately, on DOS this fails, as config.log is still kept open
16862# by configure, so config.status won't be able to write to it; its
16863# output is simply discarded.  So we exec the FD to /dev/null,
16864# effectively closing config.log, so it can be properly (re)opened and
16865# appended to by config.status.  When coming back to configure, we
16866# need to make the FD available again.
16867if test "$no_create" != yes; then
16868  ac_cs_success=:
16869  exec 5>/dev/null
16870  $SHELL $CONFIG_STATUS || ac_cs_success=false
16871  exec 5>>config.log
16872  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16873  # would make configure fail if this is the last instruction.
16874  $ac_cs_success || { (exit 1); exit 1; }
16875fi
16876${MAKE-make} preinstall
16877