1#! /bin/sh
2# From configure.in Revision: 1.351 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20030208.
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
110# Initialize some variables set by options.
111ac_init_help=
112ac_init_version=false
113# The variables have the same names as the options, with
114# dashes changed to underlines.
115cache_file=/dev/null
116exec_prefix=NONE
117no_create=
118no_recursion=
119prefix=NONE
120program_prefix=NONE
121program_suffix=NONE
122program_transform_name=s,x,x,
123silent=
124site=
125srcdir=
126verbose=
127x_includes=NONE
128x_libraries=NONE
129
130# Installation directory options.
131# These are left unexpanded so users can "make install exec_prefix=/foo"
132# and all the variables that are supposed to be based on exec_prefix
133# by default will actually change.
134# Use braces instead of parens because sh, perl, etc. also accept them.
135bindir='${exec_prefix}/bin'
136sbindir='${exec_prefix}/sbin'
137libexecdir='${exec_prefix}/libexec'
138datadir='${prefix}/share'
139sysconfdir='${prefix}/etc'
140sharedstatedir='${prefix}/com'
141localstatedir='${prefix}/var'
142libdir='${exec_prefix}/lib'
143includedir='${prefix}/include'
144oldincludedir='/usr/include'
145infodir='${prefix}/info'
146mandir='${prefix}/man'
147
148# Identity of this package.
149PACKAGE_NAME=
150PACKAGE_TARNAME=
151PACKAGE_VERSION=
152PACKAGE_STRING=
153PACKAGE_BUGREPORT=
154
155ac_prev=
156for ac_option
157do
158  # If the previous option needs an argument, assign it.
159  if test -n "$ac_prev"; then
160    eval "$ac_prev=\$ac_option"
161    ac_prev=
162    continue
163  fi
164
165  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166
167  # Accept the important Cygnus configure options, so we can diagnose typos.
168
169  case $ac_option in
170
171  -bindir | --bindir | --bindi | --bind | --bin | --bi)
172    ac_prev=bindir ;;
173  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
174    bindir=$ac_optarg ;;
175
176  -build | --build | --buil | --bui | --bu)
177    ac_prev=build_alias ;;
178  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
179    build_alias=$ac_optarg ;;
180
181  -cache-file | --cache-file | --cache-fil | --cache-fi \
182  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
183    ac_prev=cache_file ;;
184  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
185  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
186    cache_file=$ac_optarg ;;
187
188  --config-cache | -C)
189    cache_file=config.cache ;;
190
191  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192    ac_prev=datadir ;;
193  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194  | --da=*)
195    datadir=$ac_optarg ;;
196
197  -disable-* | --disable-*)
198    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
199    # Reject names that are not valid shell variable names.
200    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
201      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
202   { (exit 1); exit 1; }; }
203    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
204    eval "enable_$ac_feature=no" ;;
205
206  -enable-* | --enable-*)
207    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
208    # Reject names that are not valid shell variable names.
209    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
210      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
211   { (exit 1); exit 1; }; }
212    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213    case $ac_option in
214      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
215      *) ac_optarg=yes ;;
216    esac
217    eval "enable_$ac_feature='$ac_optarg'" ;;
218
219  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
220  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
221  | --exec | --exe | --ex)
222    ac_prev=exec_prefix ;;
223  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
224  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
225  | --exec=* | --exe=* | --ex=*)
226    exec_prefix=$ac_optarg ;;
227
228  -gas | --gas | --ga | --g)
229    # Obsolete; use --with-gas.
230    with_gas=yes ;;
231
232  -help | --help | --hel | --he | -h)
233    ac_init_help=long ;;
234  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
235    ac_init_help=recursive ;;
236  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
237    ac_init_help=short ;;
238
239  -host | --host | --hos | --ho)
240    ac_prev=host_alias ;;
241  -host=* | --host=* | --hos=* | --ho=*)
242    host_alias=$ac_optarg ;;
243
244  -includedir | --includedir | --includedi | --included | --include \
245  | --includ | --inclu | --incl | --inc)
246    ac_prev=includedir ;;
247  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
248  | --includ=* | --inclu=* | --incl=* | --inc=*)
249    includedir=$ac_optarg ;;
250
251  -infodir | --infodir | --infodi | --infod | --info | --inf)
252    ac_prev=infodir ;;
253  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
254    infodir=$ac_optarg ;;
255
256  -libdir | --libdir | --libdi | --libd)
257    ac_prev=libdir ;;
258  -libdir=* | --libdir=* | --libdi=* | --libd=*)
259    libdir=$ac_optarg ;;
260
261  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
262  | --libexe | --libex | --libe)
263    ac_prev=libexecdir ;;
264  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
265  | --libexe=* | --libex=* | --libe=*)
266    libexecdir=$ac_optarg ;;
267
268  -localstatedir | --localstatedir | --localstatedi | --localstated \
269  | --localstate | --localstat | --localsta | --localst \
270  | --locals | --local | --loca | --loc | --lo)
271    ac_prev=localstatedir ;;
272  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
273  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
274  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
275    localstatedir=$ac_optarg ;;
276
277  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278    ac_prev=mandir ;;
279  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
280    mandir=$ac_optarg ;;
281
282  -nfp | --nfp | --nf)
283    # Obsolete; use --without-fp.
284    with_fp=no ;;
285
286  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
287  | --no-cr | --no-c)
288    no_create=yes ;;
289
290  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
291  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
292    no_recursion=yes ;;
293
294  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
295  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
296  | --oldin | --oldi | --old | --ol | --o)
297    ac_prev=oldincludedir ;;
298  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
299  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
300  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
301    oldincludedir=$ac_optarg ;;
302
303  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304    ac_prev=prefix ;;
305  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
306    prefix=$ac_optarg ;;
307
308  -program-prefix | --program-prefix | --program-prefi | --program-pref \
309  | --program-pre | --program-pr | --program-p)
310    ac_prev=program_prefix ;;
311  -program-prefix=* | --program-prefix=* | --program-prefi=* \
312  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
313    program_prefix=$ac_optarg ;;
314
315  -program-suffix | --program-suffix | --program-suffi | --program-suff \
316  | --program-suf | --program-su | --program-s)
317    ac_prev=program_suffix ;;
318  -program-suffix=* | --program-suffix=* | --program-suffi=* \
319  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
320    program_suffix=$ac_optarg ;;
321
322  -program-transform-name | --program-transform-name \
323  | --program-transform-nam | --program-transform-na \
324  | --program-transform-n | --program-transform- \
325  | --program-transform | --program-transfor \
326  | --program-transfo | --program-transf \
327  | --program-trans | --program-tran \
328  | --progr-tra | --program-tr | --program-t)
329    ac_prev=program_transform_name ;;
330  -program-transform-name=* | --program-transform-name=* \
331  | --program-transform-nam=* | --program-transform-na=* \
332  | --program-transform-n=* | --program-transform-=* \
333  | --program-transform=* | --program-transfor=* \
334  | --program-transfo=* | --program-transf=* \
335  | --program-trans=* | --program-tran=* \
336  | --progr-tra=* | --program-tr=* | --program-t=*)
337    program_transform_name=$ac_optarg ;;
338
339  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
340  | -silent | --silent | --silen | --sile | --sil)
341    silent=yes ;;
342
343  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344    ac_prev=sbindir ;;
345  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346  | --sbi=* | --sb=*)
347    sbindir=$ac_optarg ;;
348
349  -sharedstatedir | --sharedstatedir | --sharedstatedi \
350  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
351  | --sharedst | --shareds | --shared | --share | --shar \
352  | --sha | --sh)
353    ac_prev=sharedstatedir ;;
354  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
355  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
356  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357  | --sha=* | --sh=*)
358    sharedstatedir=$ac_optarg ;;
359
360  -site | --site | --sit)
361    ac_prev=site ;;
362  -site=* | --site=* | --sit=*)
363    site=$ac_optarg ;;
364
365  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366    ac_prev=srcdir ;;
367  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
368    srcdir=$ac_optarg ;;
369
370  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
371  | --syscon | --sysco | --sysc | --sys | --sy)
372    ac_prev=sysconfdir ;;
373  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
374  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
375    sysconfdir=$ac_optarg ;;
376
377  -target | --target | --targe | --targ | --tar | --ta | --t)
378    ac_prev=target_alias ;;
379  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
380    target_alias=$ac_optarg ;;
381
382  -v | -verbose | --verbose | --verbos | --verbo | --verb)
383    verbose=yes ;;
384
385  -version | --version | --versio | --versi | --vers | -V)
386    ac_init_version=: ;;
387
388  -with-* | --with-*)
389    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
390    # Reject names that are not valid shell variable names.
391    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
392      { echo "$as_me: error: invalid package name: $ac_package" >&2
393   { (exit 1); exit 1; }; }
394    ac_package=`echo $ac_package| sed 's/-/_/g'`
395    case $ac_option in
396      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
397      *) ac_optarg=yes ;;
398    esac
399    eval "with_$ac_package='$ac_optarg'" ;;
400
401  -without-* | --without-*)
402    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
403    # Reject names that are not valid shell variable names.
404    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
405      { echo "$as_me: error: invalid package name: $ac_package" >&2
406   { (exit 1); exit 1; }; }
407    ac_package=`echo $ac_package | sed 's/-/_/g'`
408    eval "with_$ac_package=no" ;;
409
410  --x)
411    # Obsolete; use --with-x.
412    with_x=yes ;;
413
414  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415  | --x-incl | --x-inc | --x-in | --x-i)
416    ac_prev=x_includes ;;
417  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
419    x_includes=$ac_optarg ;;
420
421  -x-libraries | --x-libraries | --x-librarie | --x-librari \
422  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423    ac_prev=x_libraries ;;
424  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
426    x_libraries=$ac_optarg ;;
427
428  -*) { echo "$as_me: error: unrecognized option: $ac_option
429Try \`$0 --help' for more information." >&2
430   { (exit 1); exit 1; }; }
431    ;;
432
433  *=*)
434    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
435    # Reject names that are not valid shell variable names.
436    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
437      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
438   { (exit 1); exit 1; }; }
439    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
440    eval "$ac_envvar='$ac_optarg'"
441    export $ac_envvar ;;
442
443  *)
444    # FIXME: should be removed in autoconf 3.0.
445    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
446    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
447      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
448    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
449    ;;
450
451  esac
452done
453
454if test -n "$ac_prev"; then
455  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
456  { echo "$as_me: error: missing argument to $ac_option" >&2
457   { (exit 1); exit 1; }; }
458fi
459
460# Be sure to have absolute paths.
461for ac_var in exec_prefix prefix
462do
463  eval ac_val=$`echo $ac_var`
464  case $ac_val in
465    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
466    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
467   { (exit 1); exit 1; }; };;
468  esac
469done
470
471# Be sure to have absolute paths.
472for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
473              localstatedir libdir includedir oldincludedir infodir mandir
474do
475  eval ac_val=$`echo $ac_var`
476  case $ac_val in
477    [\\/$]* | ?:[\\/]* ) ;;
478    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
479   { (exit 1); exit 1; }; };;
480  esac
481done
482
483# There might be people who depend on the old broken behavior: `$host'
484# used to hold the argument of --host etc.
485build=$build_alias
486host=$host_alias
487target=$target_alias
488
489# FIXME: should be removed in autoconf 3.0.
490if test "x$host_alias" != x; then
491  if test "x$build_alias" = x; then
492    cross_compiling=maybe
493    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
494    If a cross compiler is detected then cross compile mode will be used." >&2
495  elif test "x$build_alias" != "x$host_alias"; then
496    cross_compiling=yes
497  fi
498fi
499
500ac_tool_prefix=
501test -n "$host_alias" && ac_tool_prefix=$host_alias-
502
503test "$silent" = yes && exec 6>/dev/null
504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
507  ac_srcdir_defaulted=yes
508  # Try the directory containing this script, then its parent.
509  ac_prog=$0
510  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
511  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512  srcdir=$ac_confdir
513  if test ! -r $srcdir/$ac_unique_file; then
514    srcdir=..
515  fi
516else
517  ac_srcdir_defaulted=no
518fi
519if test ! -r $srcdir/$ac_unique_file; then
520  if test "$ac_srcdir_defaulted" = yes; then
521    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
522   { (exit 1); exit 1; }; }
523  else
524    { echo "$as_me: error: cannot find sources in $srcdir" >&2
525   { (exit 1); exit 1; }; }
526  fi
527fi
528srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
529ac_env_build_alias_set=${build_alias+set}
530ac_env_build_alias_value=$build_alias
531ac_cv_env_build_alias_set=${build_alias+set}
532ac_cv_env_build_alias_value=$build_alias
533ac_env_host_alias_set=${host_alias+set}
534ac_env_host_alias_value=$host_alias
535ac_cv_env_host_alias_set=${host_alias+set}
536ac_cv_env_host_alias_value=$host_alias
537ac_env_target_alias_set=${target_alias+set}
538ac_env_target_alias_value=$target_alias
539ac_cv_env_target_alias_set=${target_alias+set}
540ac_cv_env_target_alias_value=$target_alias
541ac_env_CC_set=${CC+set}
542ac_env_CC_value=$CC
543ac_cv_env_CC_set=${CC+set}
544ac_cv_env_CC_value=$CC
545ac_env_CFLAGS_set=${CFLAGS+set}
546ac_env_CFLAGS_value=$CFLAGS
547ac_cv_env_CFLAGS_set=${CFLAGS+set}
548ac_cv_env_CFLAGS_value=$CFLAGS
549ac_env_LDFLAGS_set=${LDFLAGS+set}
550ac_env_LDFLAGS_value=$LDFLAGS
551ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
552ac_cv_env_LDFLAGS_value=$LDFLAGS
553ac_env_CPPFLAGS_set=${CPPFLAGS+set}
554ac_env_CPPFLAGS_value=$CPPFLAGS
555ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
556ac_cv_env_CPPFLAGS_value=$CPPFLAGS
557ac_env_CPP_set=${CPP+set}
558ac_env_CPP_value=$CPP
559ac_cv_env_CPP_set=${CPP+set}
560ac_cv_env_CPP_value=$CPP
561ac_env_CXX_set=${CXX+set}
562ac_env_CXX_value=$CXX
563ac_cv_env_CXX_set=${CXX+set}
564ac_cv_env_CXX_value=$CXX
565ac_env_CXXFLAGS_set=${CXXFLAGS+set}
566ac_env_CXXFLAGS_value=$CXXFLAGS
567ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
568ac_cv_env_CXXFLAGS_value=$CXXFLAGS
569ac_env_CXXCPP_set=${CXXCPP+set}
570ac_env_CXXCPP_value=$CXXCPP
571ac_cv_env_CXXCPP_set=${CXXCPP+set}
572ac_cv_env_CXXCPP_value=$CXXCPP
573
574#
575# Report the --help message.
576#
577if test "$ac_init_help" = "long"; then
578  # Omit some internal or obsolete options to make the list less imposing.
579  # This message is too long to be a string in the A/UX 3.1 sh.
580  cat <<EOF
581\`configure' configures this package to adapt to many kinds of systems.
582
583Usage: $0 [OPTION]... [VAR=VALUE]...
584
585To assign environment variables (e.g., CC, CFLAGS...), specify them as
586VAR=VALUE.  See below for descriptions of some of the useful variables.
587
588Defaults for the options are specified in brackets.
589
590Configuration:
591  -h, --help              display this help and exit
592      --help=short        display options specific to this package
593      --help=recursive    display the short help of all the included packages
594  -V, --version           display version information and exit
595  -q, --quiet, --silent   do not print \`checking...' messages
596      --cache-file=FILE   cache test results in FILE [disabled]
597  -C, --config-cache      alias for \`--cache-file=config.cache'
598  -n, --no-create         do not create output files
599      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
600
601EOF
602
603  cat <<EOF
604Installation directories:
605  --prefix=PREFIX         install architecture-independent files in PREFIX
606                          [$ac_default_prefix]
607  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
608                          [PREFIX]
609
610By default, \`make install' will install all the files in
611\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
612an installation prefix other than \`$ac_default_prefix' using \`--prefix',
613for instance \`--prefix=\$HOME'.
614
615For better control, use the options below.
616
617Fine tuning of the installation directories:
618  --bindir=DIR            user executables [EPREFIX/bin]
619  --sbindir=DIR           system admin executables [EPREFIX/sbin]
620  --libexecdir=DIR        program executables [EPREFIX/libexec]
621  --datadir=DIR           read-only architecture-independent data [PREFIX/share]
622  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
623  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
624  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
625  --libdir=DIR            object code libraries [EPREFIX/lib]
626  --includedir=DIR        C header files [PREFIX/include]
627  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
628  --infodir=DIR           info documentation [PREFIX/info]
629  --mandir=DIR            man documentation [PREFIX/man]
630EOF
631
632  cat <<\EOF
633
634Program names:
635  --program-prefix=PREFIX            prepend PREFIX to installed program names
636  --program-suffix=SUFFIX            append SUFFIX to installed program names
637  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
638
639System types:
640  --build=BUILD           configure for building on BUILD [guessed]
641  --host=HOST       build programs to run on HOST [BUILD]
642  --target=TARGET   configure for building compilers for TARGET [HOST]
643EOF
644fi
645
646if test -n "$ac_init_help"; then
647
648  cat <<\EOF
649
650Optional Packages:
651  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
652  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
653
654Optional Features:
655  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
656  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
657
658  --with-rel-version=XXX  override derived release version
659  --with-abi-version=XXX  override derived ABI version
660  --with-system-type=XXX  test: override derived host system-type
661  --without-cxx           do not adjust ncurses bool to match C++
662  --without-cxx-binding   do not build C++ binding and demo
663  --without-ada           suppress check for Ada95, don't build demo
664  --without-progs         suppress build with programs (e.g., tic)
665  --without-curses-h      install curses.h as ncurses.h only
666  --with-install-prefix   prefixes actual install-location ($DESTDIR)
667Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
668  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
669  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
670  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
671  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
672  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
673  --with-build-libs=XXX   the build libraries ($(BUILD_LIBS)
674Options to Specify the Libraries Built/Used:
675  --with-libtool          generate libraries with libtool
676  --with-shared           generate shared-libraries
677  --with-normal           generate normal-libraries (default)
678  --with-debug            generate debug-libraries (default)
679  --with-profile          generate profile-libraries
680  --with-termlib          generate separate terminfo library
681  --with-dbmalloc         use Conor Cahill's dbmalloc library
682  --with-dmalloc          use Gray Watson's dmalloc library
683  --with-gpm              use Alessandro Rubini's GPM library
684  --with-sysmouse         use sysmouse (FreeBSD console)
685  --enable-rpath          use rpath option when generating shared libraries
686  --with-shlib-version=X  Specify rel or abi version for shared libs
687Fine-Tuning Your Configuration:
688  --disable-overwrite     leave out the link to -lcurses
689  --disable-database      do not use terminfo, only fallbacks/termcap
690  --with-database=XXX     specify terminfo source to install
691  --with-fallbacks=XXX    specify list of fallback terminal descriptions
692  --without-xterm-new     specify if xterm terminfo should be old version
693  --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
694  --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
695  --disable-big-core      assume machine has little memory
696  --enable-termcap        compile in termcap fallback support
697  --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
698  --enable-getcap         fast termcap load, no xrefs to terminfo
699  --enable-getcap-cache   cache translated termcaps in ~/.terminfo
700  --disable-home-terminfo drop ~/.terminfo from terminfo search-path
701  --disable-root-environ  limit environment when running as root
702  --enable-symlinks       make tic use symbolic links not hard links
703  --enable-broken_linker  compile with broken-linker support code
704  --enable-widec          compile with wide-char/UTF-8 code
705  --disable-lp64          allow chtype to be long (ignore _LP64)
706  --disable-largefile     omit support for large files
707  --with-bool=TYPE        override fallback type of bool variable
708  --with-caps=alt         compile with alternate Caps file
709  --with-chtype=TYPE      override type of chtype
710  --with-ospeed=TYPE      override type of ospeed variable
711  --with-mmask-t=TYPE     override type of mmask_t
712  --enable-bsdpad         recognize BSD-style prefix padding
713  --with-rcs-ids          compile-in RCS identifiers
714Options to Specify How Manpages are Installed:
715  --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
716                          optionally formatted/catonly, e.g., gzip,formatted
717  --with-manpage-renames  specify manpage-renaming
718  --with-manpage-aliases  specify manpage-aliases using .so
719  --with-manpage-symlinks specify manpage-aliases using symlinks
720  --with-manpage-tbl      specify manpage processing with tbl
721Extensions:
722  --disable-ext-funcs     disable function-extensions
723  --enable-const          compile with extra/non-standard const
724  --enable-no-padding     compile with $NCURSES_NO_PADDING code
725  --enable-sigwinch       compile with SIGWINCH handler
726  --enable-tcap-names     compile with user-definable terminal capabilities
727Development Code:
728  --with-develop          enable all development options
729  --enable-hard-tabs      compile with hard-tabs code
730  --enable-xmc-glitch     compile with limited support for xmc
731Experimental Code:
732  --disable-assumed-color do not assume anything about default-colors
733  --disable-hashmap       compile without hashmap scrolling-optimization
734  --enable-colorfgbg      compile with $COLORFGBG code
735  --enable-ext-colors     compile for experimental 256-color support
736  --enable-ext-mouse      compile for experimental mouse-encoding
737  --enable-safe-sprintf   compile with experimental safe-sprintf code
738  --disable-scroll-hints  compile without scroll-hints code
739Testing/development Options:
740  --enable-echo           build: display "compiling" commands (default)
741  --enable-warnings       build: turn on GCC compiler warnings
742  --enable-assertions     test: turn on generation of assertion code
743  --disable-leaks         test: suppress permanent memory-leaks
744  --enable-expanded       test: generate functions for certain macros
745  --disable-macros        test: use functions rather than macros
746  --with-trace            test: add trace() function to all models of ncurses
747Ada95 Binding Options:
748  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
749  --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
750  --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
751
752Some influential environment variables:
753  CC          C compiler command
754  CFLAGS      C compiler flags
755  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
756              nonstandard directory <lib dir>
757  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
758              headers in a nonstandard directory <include dir>
759  CPP         C preprocessor
760  CXX         C++ compiler command
761  CXXFLAGS    C++ compiler flags
762  CXXCPP      C++ preprocessor
763
764Use these variables to override the choices made by `configure' or to help
765it to find libraries and programs with nonstandard names/locations.
766
767EOF
768fi
769
770if test "$ac_init_help" = "recursive"; then
771  # If there are subdirs, report their specific --help.
772  ac_popdir=`pwd`
773  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
774    cd $ac_subdir
775    # A "../" for each directory in /$ac_subdir.
776    ac_dots=`echo $ac_subdir |
777             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
778
779    case $srcdir in
780    .) # No --srcdir option.  We are building in place.
781      ac_sub_srcdir=$srcdir ;;
782    [\\/]* | ?:[\\/]* ) # Absolute path.
783      ac_sub_srcdir=$srcdir/$ac_subdir ;;
784    *) # Relative path.
785      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
786    esac
787
788    # Check for guested configure; otherwise get Cygnus style configure.
789    if test -f $ac_sub_srcdir/configure.gnu; then
790      echo
791      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
792    elif test -f $ac_sub_srcdir/configure; then
793      echo
794      $SHELL $ac_sub_srcdir/configure  --help=recursive
795    elif test -f $ac_sub_srcdir/configure.ac ||
796           test -f $ac_sub_srcdir/configure.in; then
797      echo
798      $ac_configure --help
799    else
800      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
801    fi
802    cd $ac_popdir
803  done
804fi
805
806test -n "$ac_init_help" && exit 0
807if $ac_init_version; then
808  cat <<\EOF
809
810Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
811Free Software Foundation, Inc.
812This configure script is free software; the Free Software Foundation
813gives unlimited permission to copy, distribute and modify it.
814EOF
815  exit 0
816fi
817exec 5>config.log
818cat >&5 <<EOF
819This file contains any messages produced by compilers while
820running configure, to aid debugging if configure makes a mistake.
821
822It was created by $as_me, which was
823generated by GNU Autoconf 2.52.20030208.  Invocation command line was
824
825  $ $0 $@
826
827EOF
828{
829cat <<_ASUNAME
830## ---------- ##
831## Platform.  ##
832## ---------- ##
833
834hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
835uname -m = `(uname -m) 2>/dev/null || echo unknown`
836uname -r = `(uname -r) 2>/dev/null || echo unknown`
837uname -s = `(uname -s) 2>/dev/null || echo unknown`
838uname -v = `(uname -v) 2>/dev/null || echo unknown`
839
840/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
841/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
842
843/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
844/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
845/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
846hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
847/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
848/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
849/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
850
851PATH = $PATH
852
853_ASUNAME
854} >&5
855
856cat >&5 <<EOF
857## ------------ ##
858## Core tests.  ##
859## ------------ ##
860
861EOF
862
863# Keep a trace of the command line.
864# Strip out --no-create and --no-recursion so they do not pile up.
865# Also quote any args containing shell meta-characters.
866ac_configure_args=
867ac_sep=
868for ac_arg
869do
870  case $ac_arg in
871  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
872  | --no-cr | --no-c) ;;
873  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
874  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
875  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
876    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
877    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
878    ac_sep=" " ;;
879  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
880     ac_sep=" " ;;
881  esac
882  # Get rid of the leading space.
883done
884
885# When interrupted or exit'd, cleanup temporary files, and complete
886# config.log.  We remove comments because anyway the quotes in there
887# would cause problems or look ugly.
888trap 'exit_status=$?
889  # Save into config.log some information that might help in debugging.
890  echo >&5
891  echo "## ----------------- ##" >&5
892  echo "## Cache variables.  ##" >&5
893  echo "## ----------------- ##" >&5
894  echo >&5
895  # The following way of writing the cache mishandles newlines in values,
896{
897  (set) 2>&1 |
898    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
899    *ac_space=\ *)
900      sed -n \
901        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
902    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
903      ;;
904    *)
905      sed -n \
906        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
907      ;;
908    esac;
909} >&5
910  sed "/^$/d" confdefs.h >conftest.log
911  if test -s conftest.log; then
912    echo >&5
913    echo "## ------------ ##" >&5
914    echo "## confdefs.h.  ##" >&5
915    echo "## ------------ ##" >&5
916    echo >&5
917    cat conftest.log >&5
918  fi
919  (echo; echo) >&5
920  test "$ac_signal" != 0 &&
921    echo "$as_me: caught signal $ac_signal" >&5
922  echo "$as_me: exit $exit_status" >&5
923  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
924    exit $exit_status
925     ' 0
926for ac_signal in 1 2 13 15; do
927  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
928done
929ac_signal=0
930
931# confdefs.h avoids OS command line length limits that DEFS can exceed.
932rm -rf conftest* confdefs.h
933# AIX cpp loses on an empty file, so make sure it contains at least a newline.
934echo >confdefs.h
935
936# Let the site file select an alternate cache file if it wants to.
937# Prefer explicitly selected file to automatically selected ones.
938if test -z "$CONFIG_SITE"; then
939  if test "x$prefix" != xNONE; then
940    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
941  else
942    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
943  fi
944fi
945for ac_site_file in $CONFIG_SITE; do
946  if test -r "$ac_site_file"; then
947    { echo "$as_me:947: loading site script $ac_site_file" >&5
948echo "$as_me: loading site script $ac_site_file" >&6;}
949    cat "$ac_site_file" >&5
950    . "$ac_site_file"
951  fi
952done
953
954if test -r "$cache_file"; then
955  # Some versions of bash will fail to source /dev/null (special
956  # files actually), so we avoid doing that.
957  if test -f "$cache_file"; then
958    { echo "$as_me:958: loading cache $cache_file" >&5
959echo "$as_me: loading cache $cache_file" >&6;}
960    case $cache_file in
961      [\\/]* | ?:[\\/]* ) . $cache_file;;
962      *)                      . ./$cache_file;;
963    esac
964  fi
965else
966  { echo "$as_me:966: creating cache $cache_file" >&5
967echo "$as_me: creating cache $cache_file" >&6;}
968  >$cache_file
969fi
970
971# Check that the precious variables saved in the cache have kept the same
972# value.
973ac_cache_corrupted=false
974for ac_var in `(set) 2>&1 |
975               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
976  eval ac_old_set=\$ac_cv_env_${ac_var}_set
977  eval ac_new_set=\$ac_env_${ac_var}_set
978  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
979  eval ac_new_val="\$ac_env_${ac_var}_value"
980  case $ac_old_set,$ac_new_set in
981    set,)
982      { echo "$as_me:982: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
983echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
984      ac_cache_corrupted=: ;;
985    ,set)
986      { echo "$as_me:986: error: \`$ac_var' was not set in the previous run" >&5
987echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
988      ac_cache_corrupted=: ;;
989    ,);;
990    *)
991      if test "x$ac_old_val" != "x$ac_new_val"; then
992        { echo "$as_me:992: error: \`$ac_var' has changed since the previous run:" >&5
993echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
994        { echo "$as_me:994:   former value:  $ac_old_val" >&5
995echo "$as_me:   former value:  $ac_old_val" >&2;}
996        { echo "$as_me:996:   current value: $ac_new_val" >&5
997echo "$as_me:   current value: $ac_new_val" >&2;}
998        ac_cache_corrupted=:
999      fi;;
1000  esac
1001  # Pass precious variables to config.status.  It doesn't matter if
1002  # we pass some twice (in addition to the command line arguments).
1003  if test "$ac_new_set" = set; then
1004    case $ac_new_val in
1005    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1006      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1007      ac_configure_args="$ac_configure_args '$ac_arg'"
1008      ;;
1009    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1010       ;;
1011    esac
1012  fi
1013done
1014if $ac_cache_corrupted; then
1015  { echo "$as_me:1015: error: changes in the environment can compromise the build" >&5
1016echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1017  { { echo "$as_me:1017: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1018echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1019   { (exit 1); exit 1; }; }
1020fi
1021
1022ac_ext=c
1023ac_cpp='$CPP $CPPFLAGS'
1024ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1025ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1026ac_compiler_gnu=$ac_cv_c_compiler_gnu
1027
1028case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1029  *c*,-n*) ECHO_N= ECHO_C='
1030' ECHO_T='	' ;;
1031  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1032  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1033esac
1034echo "#! $SHELL" >conftest.sh
1035echo  "exit 0"   >>conftest.sh
1036chmod +x conftest.sh
1037if { (echo "$as_me:1037: PATH=\".;.\"; conftest.sh") >&5
1038  (PATH=".;."; conftest.sh) 2>&5
1039  ac_status=$?
1040  echo "$as_me:1040: \$? = $ac_status" >&5
1041  (exit $ac_status); }; then
1042  ac_path_separator=';'
1043else
1044  ac_path_separator=:
1045fi
1046PATH_SEPARATOR="$ac_path_separator"
1047rm -f conftest.sh
1048
1049ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1050
1051NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1052NCURSES_MINOR="`egrep '^NCURSES_MINOR[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1053NCURSES_PATCH="`egrep '^NCURSES_PATCH[ 	]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1054cf_cv_abi_version=${NCURSES_MAJOR}
1055cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1056cf_cv_timestamp=`date`
1057echo "$as_me:1057: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1058echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1059
1060test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1061
1062# Check whether --with-rel-version or --without-rel-version was given.
1063if test "${with_rel_version+set}" = set; then
1064  withval="$with_rel_version"
1065  { echo "$as_me:1065: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1066echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1067 cf_cv_rel_version=$withval
1068fi;
1069
1070 NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1071 NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1072
1073if test -n "$NCURSES_MAJOR" ; then
1074  case $NCURSES_MAJOR in #(vi
1075  [0-9]*) #(vi
1076 	;;
1077  *)
1078	{ { echo "$as_me:1078: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1079echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1080   { (exit 1); exit 1; }; }
1081 	;;
1082  esac
1083else
1084  { { echo "$as_me:1084: error: Release major-version value is empty" >&5
1085echo "$as_me: error: Release major-version value is empty" >&2;}
1086   { (exit 1); exit 1; }; }
1087fi
1088
1089if test -n "$NCURSES_MINOR" ; then
1090  case $NCURSES_MINOR in #(vi
1091  [0-9]*) #(vi
1092 	;;
1093  *)
1094	{ { echo "$as_me:1094: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1095echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1096   { (exit 1); exit 1; }; }
1097 	;;
1098  esac
1099else
1100  { { echo "$as_me:1100: error: Release minor-version value is empty" >&5
1101echo "$as_me: error: Release minor-version value is empty" >&2;}
1102   { (exit 1); exit 1; }; }
1103fi
1104
1105test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1106
1107# Check whether --with-abi-version or --without-abi-version was given.
1108if test "${with_abi_version+set}" = set; then
1109  withval="$with_abi_version"
1110  { echo "$as_me:1110: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1111echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1112 cf_cv_abi_version=$withval
1113fi;
1114
1115if test -n "$cf_cv_abi_version" ; then
1116  case $cf_cv_abi_version in #(vi
1117  [0-9]*) #(vi
1118 	;;
1119  *)
1120	{ { echo "$as_me:1120: error: ABI version is not a number: $cf_cv_abi_version" >&5
1121echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1122   { (exit 1); exit 1; }; }
1123 	;;
1124  esac
1125else
1126  { { echo "$as_me:1126: error: ABI version value is empty" >&5
1127echo "$as_me: error: ABI version value is empty" >&2;}
1128   { (exit 1); exit 1; }; }
1129fi
1130
1131ac_aux_dir=
1132for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1133  if test -f $ac_dir/install-sh; then
1134    ac_aux_dir=$ac_dir
1135    ac_install_sh="$ac_aux_dir/install-sh -c"
1136    break
1137  elif test -f $ac_dir/install.sh; then
1138    ac_aux_dir=$ac_dir
1139    ac_install_sh="$ac_aux_dir/install.sh -c"
1140    break
1141  elif test -f $ac_dir/shtool; then
1142    ac_aux_dir=$ac_dir
1143    ac_install_sh="$ac_aux_dir/shtool install -c"
1144    break
1145  fi
1146done
1147if test -z "$ac_aux_dir"; then
1148  { { echo "$as_me:1148: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1149echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1150   { (exit 1); exit 1; }; }
1151fi
1152ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1153ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1154ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1155
1156# Make sure we can run config.sub.
1157$ac_config_sub sun4 >/dev/null 2>&1 ||
1158  { { echo "$as_me:1158: error: cannot run $ac_config_sub" >&5
1159echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1160   { (exit 1); exit 1; }; }
1161
1162echo "$as_me:1162: checking build system type" >&5
1163echo $ECHO_N "checking build system type... $ECHO_C" >&6
1164if test "${ac_cv_build+set}" = set; then
1165  echo $ECHO_N "(cached) $ECHO_C" >&6
1166else
1167  ac_cv_build_alias=$build_alias
1168test -z "$ac_cv_build_alias" &&
1169  ac_cv_build_alias=`$ac_config_guess`
1170test -z "$ac_cv_build_alias" &&
1171  { { echo "$as_me:1171: error: cannot guess build type; you must specify one" >&5
1172echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1173   { (exit 1); exit 1; }; }
1174ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1175  { { echo "$as_me:1175: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1176echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1177   { (exit 1); exit 1; }; }
1178
1179fi
1180echo "$as_me:1180: result: $ac_cv_build" >&5
1181echo "${ECHO_T}$ac_cv_build" >&6
1182build=$ac_cv_build
1183build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1184build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1185build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1186
1187echo "$as_me:1187: checking host system type" >&5
1188echo $ECHO_N "checking host system type... $ECHO_C" >&6
1189if test "${ac_cv_host+set}" = set; then
1190  echo $ECHO_N "(cached) $ECHO_C" >&6
1191else
1192  ac_cv_host_alias=$host_alias
1193test -z "$ac_cv_host_alias" &&
1194  ac_cv_host_alias=$ac_cv_build_alias
1195ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1196  { { echo "$as_me:1196: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1197echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1198   { (exit 1); exit 1; }; }
1199
1200fi
1201echo "$as_me:1201: result: $ac_cv_host" >&5
1202echo "${ECHO_T}$ac_cv_host" >&6
1203host=$ac_cv_host
1204host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1205host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1206host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1207
1208if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1209	echo "$as_me:1209: checking target system type" >&5
1210echo $ECHO_N "checking target system type... $ECHO_C" >&6
1211if test "${ac_cv_target+set}" = set; then
1212  echo $ECHO_N "(cached) $ECHO_C" >&6
1213else
1214  ac_cv_target_alias=$target_alias
1215test "x$ac_cv_target_alias" = "x" &&
1216  ac_cv_target_alias=$ac_cv_host_alias
1217ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1218  { { echo "$as_me:1218: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1219echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1220   { (exit 1); exit 1; }; }
1221
1222fi
1223echo "$as_me:1223: result: $ac_cv_target" >&5
1224echo "${ECHO_T}$ac_cv_target" >&6
1225target=$ac_cv_target
1226target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1227target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1228target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1229
1230# The aliases save the names the user supplied, while $host etc.
1231# will get canonicalized.
1232test -n "$target_alias" &&
1233  test "$program_prefix$program_suffix$program_transform_name" = \
1234    NONENONEs,x,x, &&
1235  program_prefix=${target_alias}-
1236	system_name="$host_os"
1237else
1238	system_name="`(uname -s -r) 2>/dev/null`"
1239	if test -z "$system_name" ; then
1240		system_name="`(hostname) 2>/dev/null`"
1241	fi
1242fi
1243test -n "$system_name" && cat >>confdefs.h <<EOF
1244#define SYSTEM_NAME "$system_name"
1245EOF
1246
1247if test "${cf_cv_system_name+set}" = set; then
1248  echo $ECHO_N "(cached) $ECHO_C" >&6
1249else
1250  cf_cv_system_name="$system_name"
1251fi
1252
1253test -z "$system_name" && system_name="$cf_cv_system_name"
1254test -n "$cf_cv_system_name" && echo "$as_me:1254: result: Configuring for $cf_cv_system_name" >&5
1255echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1256
1257if test ".$system_name" != ".$cf_cv_system_name" ; then
1258	echo "$as_me:1258: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1259echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1260	{ { echo "$as_me:1260: error: \"Please remove config.cache and try again.\"" >&5
1261echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1262   { (exit 1); exit 1; }; }
1263fi
1264
1265# Check whether --with-system-type or --without-system-type was given.
1266if test "${with_system_type+set}" = set; then
1267  withval="$with_system_type"
1268  { echo "$as_me:1268: WARNING: overriding system type to $withval" >&5
1269echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1270 cf_cv_system_name=$withval
1271fi;
1272
1273###	Save the given $CFLAGS to allow user-override.
1274cf_user_CFLAGS="$CFLAGS"
1275
1276###	Default install-location
1277
1278echo "$as_me:1278: checking for prefix" >&5
1279echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1280if test "x$prefix" = "xNONE" ; then
1281	case "$cf_cv_system_name" in
1282		# non-vendor systems don't have a conflict
1283	openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1284		prefix=/usr
1285		;;
1286	*)	prefix=$ac_default_prefix
1287		;;
1288	esac
1289fi
1290echo "$as_me:1290: result: $prefix" >&5
1291echo "${ECHO_T}$prefix" >&6
1292
1293if test "x$prefix" = "xNONE" ; then
1294echo "$as_me:1294: checking for default include-directory" >&5
1295echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1296test -n "$verbose" && echo 1>&6
1297for cf_symbol in \
1298	$includedir \
1299	$includedir/ncurses \
1300	$prefix/include \
1301	$prefix/include/ncurses \
1302	/usr/local/include \
1303	/usr/local/include/ncurses \
1304	/usr/include \
1305	/usr/include/ncurses
1306do
1307	cf_dir=`eval echo $cf_symbol`
1308	if test -f $cf_dir/curses.h ; then
1309	if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1310		includedir="$cf_symbol"
1311		test -n "$verbose"  && echo $ac_n "	found " 1>&6
1312		break
1313	fi
1314	fi
1315	test -n "$verbose"  && echo "	tested $cf_dir" 1>&6
1316done
1317echo "$as_me:1317: result: $includedir" >&5
1318echo "${ECHO_T}$includedir" >&6
1319fi
1320
1321###	Checks for programs.
1322ac_ext=c
1323ac_cpp='$CPP $CPPFLAGS'
1324ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1325ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1326ac_compiler_gnu=$ac_cv_c_compiler_gnu
1327if test -n "$ac_tool_prefix"; then
1328  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1329set dummy ${ac_tool_prefix}gcc; ac_word=$2
1330echo "$as_me:1330: checking for $ac_word" >&5
1331echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1332if test "${ac_cv_prog_CC+set}" = set; then
1333  echo $ECHO_N "(cached) $ECHO_C" >&6
1334else
1335  if test -n "$CC"; then
1336  ac_cv_prog_CC="$CC" # Let the user override the test.
1337else
1338  ac_save_IFS=$IFS; IFS=$ac_path_separator
1339ac_dummy="$PATH"
1340for ac_dir in $ac_dummy; do
1341  IFS=$ac_save_IFS
1342  test -z "$ac_dir" && ac_dir=.
1343  $as_executable_p "$ac_dir/$ac_word" || continue
1344ac_cv_prog_CC="${ac_tool_prefix}gcc"
1345echo "$as_me:1345: found $ac_dir/$ac_word" >&5
1346break
1347done
1348
1349fi
1350fi
1351CC=$ac_cv_prog_CC
1352if test -n "$CC"; then
1353  echo "$as_me:1353: result: $CC" >&5
1354echo "${ECHO_T}$CC" >&6
1355else
1356  echo "$as_me:1356: result: no" >&5
1357echo "${ECHO_T}no" >&6
1358fi
1359
1360fi
1361if test -z "$ac_cv_prog_CC"; then
1362  ac_ct_CC=$CC
1363  # Extract the first word of "gcc", so it can be a program name with args.
1364set dummy gcc; ac_word=$2
1365echo "$as_me:1365: checking for $ac_word" >&5
1366echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1367if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1368  echo $ECHO_N "(cached) $ECHO_C" >&6
1369else
1370  if test -n "$ac_ct_CC"; then
1371  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1372else
1373  ac_save_IFS=$IFS; IFS=$ac_path_separator
1374ac_dummy="$PATH"
1375for ac_dir in $ac_dummy; do
1376  IFS=$ac_save_IFS
1377  test -z "$ac_dir" && ac_dir=.
1378  $as_executable_p "$ac_dir/$ac_word" || continue
1379ac_cv_prog_ac_ct_CC="gcc"
1380echo "$as_me:1380: found $ac_dir/$ac_word" >&5
1381break
1382done
1383
1384fi
1385fi
1386ac_ct_CC=$ac_cv_prog_ac_ct_CC
1387if test -n "$ac_ct_CC"; then
1388  echo "$as_me:1388: result: $ac_ct_CC" >&5
1389echo "${ECHO_T}$ac_ct_CC" >&6
1390else
1391  echo "$as_me:1391: result: no" >&5
1392echo "${ECHO_T}no" >&6
1393fi
1394
1395  CC=$ac_ct_CC
1396else
1397  CC="$ac_cv_prog_CC"
1398fi
1399
1400if test -z "$CC"; then
1401  if test -n "$ac_tool_prefix"; then
1402  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1403set dummy ${ac_tool_prefix}cc; ac_word=$2
1404echo "$as_me:1404: checking for $ac_word" >&5
1405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1406if test "${ac_cv_prog_CC+set}" = set; then
1407  echo $ECHO_N "(cached) $ECHO_C" >&6
1408else
1409  if test -n "$CC"; then
1410  ac_cv_prog_CC="$CC" # Let the user override the test.
1411else
1412  ac_save_IFS=$IFS; IFS=$ac_path_separator
1413ac_dummy="$PATH"
1414for ac_dir in $ac_dummy; do
1415  IFS=$ac_save_IFS
1416  test -z "$ac_dir" && ac_dir=.
1417  $as_executable_p "$ac_dir/$ac_word" || continue
1418ac_cv_prog_CC="${ac_tool_prefix}cc"
1419echo "$as_me:1419: found $ac_dir/$ac_word" >&5
1420break
1421done
1422
1423fi
1424fi
1425CC=$ac_cv_prog_CC
1426if test -n "$CC"; then
1427  echo "$as_me:1427: result: $CC" >&5
1428echo "${ECHO_T}$CC" >&6
1429else
1430  echo "$as_me:1430: result: no" >&5
1431echo "${ECHO_T}no" >&6
1432fi
1433
1434fi
1435if test -z "$ac_cv_prog_CC"; then
1436  ac_ct_CC=$CC
1437  # Extract the first word of "cc", so it can be a program name with args.
1438set dummy cc; ac_word=$2
1439echo "$as_me:1439: checking for $ac_word" >&5
1440echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1441if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1442  echo $ECHO_N "(cached) $ECHO_C" >&6
1443else
1444  if test -n "$ac_ct_CC"; then
1445  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1446else
1447  ac_save_IFS=$IFS; IFS=$ac_path_separator
1448ac_dummy="$PATH"
1449for ac_dir in $ac_dummy; do
1450  IFS=$ac_save_IFS
1451  test -z "$ac_dir" && ac_dir=.
1452  $as_executable_p "$ac_dir/$ac_word" || continue
1453ac_cv_prog_ac_ct_CC="cc"
1454echo "$as_me:1454: found $ac_dir/$ac_word" >&5
1455break
1456done
1457
1458fi
1459fi
1460ac_ct_CC=$ac_cv_prog_ac_ct_CC
1461if test -n "$ac_ct_CC"; then
1462  echo "$as_me:1462: result: $ac_ct_CC" >&5
1463echo "${ECHO_T}$ac_ct_CC" >&6
1464else
1465  echo "$as_me:1465: result: no" >&5
1466echo "${ECHO_T}no" >&6
1467fi
1468
1469  CC=$ac_ct_CC
1470else
1471  CC="$ac_cv_prog_CC"
1472fi
1473
1474fi
1475if test -z "$CC"; then
1476  # Extract the first word of "cc", so it can be a program name with args.
1477set dummy cc; ac_word=$2
1478echo "$as_me:1478: checking for $ac_word" >&5
1479echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1480if test "${ac_cv_prog_CC+set}" = set; then
1481  echo $ECHO_N "(cached) $ECHO_C" >&6
1482else
1483  if test -n "$CC"; then
1484  ac_cv_prog_CC="$CC" # Let the user override the test.
1485else
1486  ac_prog_rejected=no
1487  ac_save_IFS=$IFS; IFS=$ac_path_separator
1488ac_dummy="$PATH"
1489for ac_dir in $ac_dummy; do
1490  IFS=$ac_save_IFS
1491  test -z "$ac_dir" && ac_dir=.
1492  $as_executable_p "$ac_dir/$ac_word" || continue
1493if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1494  ac_prog_rejected=yes
1495  continue
1496fi
1497ac_cv_prog_CC="cc"
1498echo "$as_me:1498: found $ac_dir/$ac_word" >&5
1499break
1500done
1501
1502if test $ac_prog_rejected = yes; then
1503  # We found a bogon in the path, so make sure we never use it.
1504  set dummy $ac_cv_prog_CC
1505  shift
1506  if test $# != 0; then
1507    # We chose a different compiler from the bogus one.
1508    # However, it has the same basename, so the bogon will be chosen
1509    # first if we set CC to just the basename; use the full file name.
1510    shift
1511    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1512    shift
1513    ac_cv_prog_CC="$@"
1514  fi
1515fi
1516fi
1517fi
1518CC=$ac_cv_prog_CC
1519if test -n "$CC"; then
1520  echo "$as_me:1520: result: $CC" >&5
1521echo "${ECHO_T}$CC" >&6
1522else
1523  echo "$as_me:1523: result: no" >&5
1524echo "${ECHO_T}no" >&6
1525fi
1526
1527fi
1528if test -z "$CC"; then
1529  if test -n "$ac_tool_prefix"; then
1530  for ac_prog in cl
1531  do
1532    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1533set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1534echo "$as_me:1534: checking for $ac_word" >&5
1535echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1536if test "${ac_cv_prog_CC+set}" = set; then
1537  echo $ECHO_N "(cached) $ECHO_C" >&6
1538else
1539  if test -n "$CC"; then
1540  ac_cv_prog_CC="$CC" # Let the user override the test.
1541else
1542  ac_save_IFS=$IFS; IFS=$ac_path_separator
1543ac_dummy="$PATH"
1544for ac_dir in $ac_dummy; do
1545  IFS=$ac_save_IFS
1546  test -z "$ac_dir" && ac_dir=.
1547  $as_executable_p "$ac_dir/$ac_word" || continue
1548ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1549echo "$as_me:1549: found $ac_dir/$ac_word" >&5
1550break
1551done
1552
1553fi
1554fi
1555CC=$ac_cv_prog_CC
1556if test -n "$CC"; then
1557  echo "$as_me:1557: result: $CC" >&5
1558echo "${ECHO_T}$CC" >&6
1559else
1560  echo "$as_me:1560: result: no" >&5
1561echo "${ECHO_T}no" >&6
1562fi
1563
1564    test -n "$CC" && break
1565  done
1566fi
1567if test -z "$CC"; then
1568  ac_ct_CC=$CC
1569  for ac_prog in cl
1570do
1571  # Extract the first word of "$ac_prog", so it can be a program name with args.
1572set dummy $ac_prog; ac_word=$2
1573echo "$as_me:1573: checking for $ac_word" >&5
1574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1575if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1576  echo $ECHO_N "(cached) $ECHO_C" >&6
1577else
1578  if test -n "$ac_ct_CC"; then
1579  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1580else
1581  ac_save_IFS=$IFS; IFS=$ac_path_separator
1582ac_dummy="$PATH"
1583for ac_dir in $ac_dummy; do
1584  IFS=$ac_save_IFS
1585  test -z "$ac_dir" && ac_dir=.
1586  $as_executable_p "$ac_dir/$ac_word" || continue
1587ac_cv_prog_ac_ct_CC="$ac_prog"
1588echo "$as_me:1588: found $ac_dir/$ac_word" >&5
1589break
1590done
1591
1592fi
1593fi
1594ac_ct_CC=$ac_cv_prog_ac_ct_CC
1595if test -n "$ac_ct_CC"; then
1596  echo "$as_me:1596: result: $ac_ct_CC" >&5
1597echo "${ECHO_T}$ac_ct_CC" >&6
1598else
1599  echo "$as_me:1599: result: no" >&5
1600echo "${ECHO_T}no" >&6
1601fi
1602
1603  test -n "$ac_ct_CC" && break
1604done
1605
1606  CC=$ac_ct_CC
1607fi
1608
1609fi
1610
1611test -z "$CC" && { { echo "$as_me:1611: error: no acceptable cc found in \$PATH" >&5
1612echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1613   { (exit 1); exit 1; }; }
1614
1615# Provide some information about the compiler.
1616echo "$as_me:1616:" \
1617     "checking for C compiler version" >&5
1618ac_compiler=`set X $ac_compile; echo $2`
1619{ (eval echo "$as_me:1619: \"$ac_compiler --version </dev/null >&5\"") >&5
1620  (eval $ac_compiler --version </dev/null >&5) 2>&5
1621  ac_status=$?
1622  echo "$as_me:1622: \$? = $ac_status" >&5
1623  (exit $ac_status); }
1624{ (eval echo "$as_me:1624: \"$ac_compiler -v </dev/null >&5\"") >&5
1625  (eval $ac_compiler -v </dev/null >&5) 2>&5
1626  ac_status=$?
1627  echo "$as_me:1627: \$? = $ac_status" >&5
1628  (exit $ac_status); }
1629{ (eval echo "$as_me:1629: \"$ac_compiler -V </dev/null >&5\"") >&5
1630  (eval $ac_compiler -V </dev/null >&5) 2>&5
1631  ac_status=$?
1632  echo "$as_me:1632: \$? = $ac_status" >&5
1633  (exit $ac_status); }
1634
1635cat >conftest.$ac_ext <<_ACEOF
1636#line 1636 "configure"
1637#include "confdefs.h"
1638
1639int
1640main ()
1641{
1642
1643  ;
1644  return 0;
1645}
1646_ACEOF
1647ac_clean_files_save=$ac_clean_files
1648ac_clean_files="$ac_clean_files a.out a.exe"
1649# Try to create an executable without -o first, disregard a.out.
1650# It will help us diagnose broken compilers, and finding out an intuition
1651# of exeext.
1652echo "$as_me:1652: checking for C compiler default output" >&5
1653echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1654ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1655if { (eval echo "$as_me:1655: \"$ac_link_default\"") >&5
1656  (eval $ac_link_default) 2>&5
1657  ac_status=$?
1658  echo "$as_me:1658: \$? = $ac_status" >&5
1659  (exit $ac_status); }; then
1660  # Find the output, starting from the most likely.  This scheme is
1661# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1662# resort.
1663for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1664                ls a.out conftest 2>/dev/null;
1665                ls a.* conftest.* 2>/dev/null`; do
1666  case $ac_file in
1667    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1668    a.out ) # We found the default executable, but exeext='' is most
1669            # certainly right.
1670            break;;
1671    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1672          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1673          export ac_cv_exeext
1674          break;;
1675    * ) break;;
1676  esac
1677done
1678else
1679  echo "$as_me: failed program was:" >&5
1680cat conftest.$ac_ext >&5
1681{ { echo "$as_me:1681: error: C compiler cannot create executables" >&5
1682echo "$as_me: error: C compiler cannot create executables" >&2;}
1683   { (exit 77); exit 77; }; }
1684fi
1685
1686ac_exeext=$ac_cv_exeext
1687echo "$as_me:1687: result: $ac_file" >&5
1688echo "${ECHO_T}$ac_file" >&6
1689
1690# Check the compiler produces executables we can run.  If not, either
1691# the compiler is broken, or we cross compile.
1692echo "$as_me:1692: checking whether the C compiler works" >&5
1693echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1694# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1695# If not cross compiling, check that we can run a simple program.
1696if test "$cross_compiling" != yes; then
1697  if { ac_try='./$ac_file'
1698  { (eval echo "$as_me:1698: \"$ac_try\"") >&5
1699  (eval $ac_try) 2>&5
1700  ac_status=$?
1701  echo "$as_me:1701: \$? = $ac_status" >&5
1702  (exit $ac_status); }; }; then
1703    cross_compiling=no
1704  else
1705    if test "$cross_compiling" = maybe; then
1706	cross_compiling=yes
1707    else
1708	{ { echo "$as_me:1708: error: cannot run C compiled programs.
1709If you meant to cross compile, use \`--host'." >&5
1710echo "$as_me: error: cannot run C compiled programs.
1711If you meant to cross compile, use \`--host'." >&2;}
1712   { (exit 1); exit 1; }; }
1713    fi
1714  fi
1715fi
1716echo "$as_me:1716: result: yes" >&5
1717echo "${ECHO_T}yes" >&6
1718
1719rm -f a.out a.exe conftest$ac_cv_exeext
1720ac_clean_files=$ac_clean_files_save
1721# Check the compiler produces executables we can run.  If not, either
1722# the compiler is broken, or we cross compile.
1723echo "$as_me:1723: checking whether we are cross compiling" >&5
1724echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1725echo "$as_me:1725: result: $cross_compiling" >&5
1726echo "${ECHO_T}$cross_compiling" >&6
1727
1728echo "$as_me:1728: checking for executable suffix" >&5
1729echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1730if { (eval echo "$as_me:1730: \"$ac_link\"") >&5
1731  (eval $ac_link) 2>&5
1732  ac_status=$?
1733  echo "$as_me:1733: \$? = $ac_status" >&5
1734  (exit $ac_status); }; then
1735  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1736# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1737# work properly (i.e., refer to `conftest.exe'), while it won't with
1738# `rm'.
1739for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1740  case $ac_file in
1741    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
1742    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1743          export ac_cv_exeext
1744          break;;
1745    * ) break;;
1746  esac
1747done
1748else
1749  { { echo "$as_me:1749: error: cannot compute EXEEXT: cannot compile and link" >&5
1750echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1751   { (exit 1); exit 1; }; }
1752fi
1753
1754rm -f conftest$ac_cv_exeext
1755echo "$as_me:1755: result: $ac_cv_exeext" >&5
1756echo "${ECHO_T}$ac_cv_exeext" >&6
1757
1758rm -f conftest.$ac_ext
1759EXEEXT=$ac_cv_exeext
1760ac_exeext=$EXEEXT
1761echo "$as_me:1761: checking for object suffix" >&5
1762echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1763if test "${ac_cv_objext+set}" = set; then
1764  echo $ECHO_N "(cached) $ECHO_C" >&6
1765else
1766  cat >conftest.$ac_ext <<_ACEOF
1767#line 1767 "configure"
1768#include "confdefs.h"
1769
1770int
1771main ()
1772{
1773
1774  ;
1775  return 0;
1776}
1777_ACEOF
1778rm -f conftest.o conftest.obj
1779if { (eval echo "$as_me:1779: \"$ac_compile\"") >&5
1780  (eval $ac_compile) 2>&5
1781  ac_status=$?
1782  echo "$as_me:1782: \$? = $ac_status" >&5
1783  (exit $ac_status); }; then
1784  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1785  case $ac_file in
1786    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
1787    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1788       break;;
1789  esac
1790done
1791else
1792  echo "$as_me: failed program was:" >&5
1793cat conftest.$ac_ext >&5
1794{ { echo "$as_me:1794: error: cannot compute OBJEXT: cannot compile" >&5
1795echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1796   { (exit 1); exit 1; }; }
1797fi
1798
1799rm -f conftest.$ac_cv_objext conftest.$ac_ext
1800fi
1801echo "$as_me:1801: result: $ac_cv_objext" >&5
1802echo "${ECHO_T}$ac_cv_objext" >&6
1803OBJEXT=$ac_cv_objext
1804ac_objext=$OBJEXT
1805echo "$as_me:1805: checking whether we are using the GNU C compiler" >&5
1806echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1807if test "${ac_cv_c_compiler_gnu+set}" = set; then
1808  echo $ECHO_N "(cached) $ECHO_C" >&6
1809else
1810  cat >conftest.$ac_ext <<_ACEOF
1811#line 1811 "configure"
1812#include "confdefs.h"
1813
1814int
1815main ()
1816{
1817#ifndef __GNUC__
1818       choke me
1819#endif
1820
1821  ;
1822  return 0;
1823}
1824_ACEOF
1825rm -f conftest.$ac_objext
1826if { (eval echo "$as_me:1826: \"$ac_compile\"") >&5
1827  (eval $ac_compile) 2>&5
1828  ac_status=$?
1829  echo "$as_me:1829: \$? = $ac_status" >&5
1830  (exit $ac_status); } &&
1831         { ac_try='test -s conftest.$ac_objext'
1832  { (eval echo "$as_me:1832: \"$ac_try\"") >&5
1833  (eval $ac_try) 2>&5
1834  ac_status=$?
1835  echo "$as_me:1835: \$? = $ac_status" >&5
1836  (exit $ac_status); }; }; then
1837  ac_compiler_gnu=yes
1838else
1839  echo "$as_me: failed program was:" >&5
1840cat conftest.$ac_ext >&5
1841ac_compiler_gnu=no
1842fi
1843rm -f conftest.$ac_objext conftest.$ac_ext
1844ac_cv_c_compiler_gnu=$ac_compiler_gnu
1845
1846fi
1847echo "$as_me:1847: result: $ac_cv_c_compiler_gnu" >&5
1848echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1849GCC=`test $ac_compiler_gnu = yes && echo yes`
1850ac_test_CFLAGS=${CFLAGS+set}
1851ac_save_CFLAGS=$CFLAGS
1852CFLAGS="-g"
1853echo "$as_me:1853: checking whether $CC accepts -g" >&5
1854echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1855if test "${ac_cv_prog_cc_g+set}" = set; then
1856  echo $ECHO_N "(cached) $ECHO_C" >&6
1857else
1858  cat >conftest.$ac_ext <<_ACEOF
1859#line 1859 "configure"
1860#include "confdefs.h"
1861
1862int
1863main ()
1864{
1865
1866  ;
1867  return 0;
1868}
1869_ACEOF
1870rm -f conftest.$ac_objext
1871if { (eval echo "$as_me:1871: \"$ac_compile\"") >&5
1872  (eval $ac_compile) 2>&5
1873  ac_status=$?
1874  echo "$as_me:1874: \$? = $ac_status" >&5
1875  (exit $ac_status); } &&
1876         { ac_try='test -s conftest.$ac_objext'
1877  { (eval echo "$as_me:1877: \"$ac_try\"") >&5
1878  (eval $ac_try) 2>&5
1879  ac_status=$?
1880  echo "$as_me:1880: \$? = $ac_status" >&5
1881  (exit $ac_status); }; }; then
1882  ac_cv_prog_cc_g=yes
1883else
1884  echo "$as_me: failed program was:" >&5
1885cat conftest.$ac_ext >&5
1886ac_cv_prog_cc_g=no
1887fi
1888rm -f conftest.$ac_objext conftest.$ac_ext
1889fi
1890echo "$as_me:1890: result: $ac_cv_prog_cc_g" >&5
1891echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1892if test "$ac_test_CFLAGS" = set; then
1893  CFLAGS=$ac_save_CFLAGS
1894elif test $ac_cv_prog_cc_g = yes; then
1895  if test "$GCC" = yes; then
1896    CFLAGS="-g -O2"
1897  else
1898    CFLAGS="-g"
1899  fi
1900else
1901  if test "$GCC" = yes; then
1902    CFLAGS="-O2"
1903  else
1904    CFLAGS=
1905  fi
1906fi
1907# Some people use a C++ compiler to compile C.  Since we use `exit',
1908# in C++ we need to declare it.  In case someone uses the same compiler
1909# for both compiling C and C++ we need to have the C++ compiler decide
1910# the declaration of exit, since it's the most demanding environment.
1911cat >conftest.$ac_ext <<_ACEOF
1912#ifndef __cplusplus
1913  choke me
1914#endif
1915_ACEOF
1916rm -f conftest.$ac_objext
1917if { (eval echo "$as_me:1917: \"$ac_compile\"") >&5
1918  (eval $ac_compile) 2>&5
1919  ac_status=$?
1920  echo "$as_me:1920: \$? = $ac_status" >&5
1921  (exit $ac_status); } &&
1922         { ac_try='test -s conftest.$ac_objext'
1923  { (eval echo "$as_me:1923: \"$ac_try\"") >&5
1924  (eval $ac_try) 2>&5
1925  ac_status=$?
1926  echo "$as_me:1926: \$? = $ac_status" >&5
1927  (exit $ac_status); }; }; then
1928  for ac_declaration in \
1929   ''\
1930   '#include <stdlib.h>' \
1931   'extern "C" void std::exit (int) throw (); using std::exit;' \
1932   'extern "C" void std::exit (int); using std::exit;' \
1933   'extern "C" void exit (int) throw ();' \
1934   'extern "C" void exit (int);' \
1935   'void exit (int);'
1936do
1937  cat >conftest.$ac_ext <<_ACEOF
1938#line 1938 "configure"
1939#include "confdefs.h"
1940#include <stdlib.h>
1941$ac_declaration
1942int
1943main ()
1944{
1945exit (42);
1946  ;
1947  return 0;
1948}
1949_ACEOF
1950rm -f conftest.$ac_objext
1951if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952  (eval $ac_compile) 2>&5
1953  ac_status=$?
1954  echo "$as_me:1954: \$? = $ac_status" >&5
1955  (exit $ac_status); } &&
1956         { ac_try='test -s conftest.$ac_objext'
1957  { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958  (eval $ac_try) 2>&5
1959  ac_status=$?
1960  echo "$as_me:1960: \$? = $ac_status" >&5
1961  (exit $ac_status); }; }; then
1962  :
1963else
1964  echo "$as_me: failed program was:" >&5
1965cat conftest.$ac_ext >&5
1966continue
1967fi
1968rm -f conftest.$ac_objext conftest.$ac_ext
1969  cat >conftest.$ac_ext <<_ACEOF
1970#line 1970 "configure"
1971#include "confdefs.h"
1972$ac_declaration
1973int
1974main ()
1975{
1976exit (42);
1977  ;
1978  return 0;
1979}
1980_ACEOF
1981rm -f conftest.$ac_objext
1982if { (eval echo "$as_me:1982: \"$ac_compile\"") >&5
1983  (eval $ac_compile) 2>&5
1984  ac_status=$?
1985  echo "$as_me:1985: \$? = $ac_status" >&5
1986  (exit $ac_status); } &&
1987         { ac_try='test -s conftest.$ac_objext'
1988  { (eval echo "$as_me:1988: \"$ac_try\"") >&5
1989  (eval $ac_try) 2>&5
1990  ac_status=$?
1991  echo "$as_me:1991: \$? = $ac_status" >&5
1992  (exit $ac_status); }; }; then
1993  break
1994else
1995  echo "$as_me: failed program was:" >&5
1996cat conftest.$ac_ext >&5
1997fi
1998rm -f conftest.$ac_objext conftest.$ac_ext
1999done
2000rm -f conftest*
2001if test -n "$ac_declaration"; then
2002  echo '#ifdef __cplusplus' >>confdefs.h
2003  echo $ac_declaration      >>confdefs.h
2004  echo '#endif'             >>confdefs.h
2005fi
2006
2007else
2008  echo "$as_me: failed program was:" >&5
2009cat conftest.$ac_ext >&5
2010fi
2011rm -f conftest.$ac_objext conftest.$ac_ext
2012ac_ext=c
2013ac_cpp='$CPP $CPPFLAGS'
2014ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2015ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2016ac_compiler_gnu=$ac_cv_c_compiler_gnu
2017
2018GCC_VERSION=none
2019if test "$GCC" = yes ; then
2020	echo "$as_me:2020: checking version of $CC" >&5
2021echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2022	GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2023	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2024	echo "$as_me:2024: result: $GCC_VERSION" >&5
2025echo "${ECHO_T}$GCC_VERSION" >&6
2026fi
2027
2028ac_ext=c
2029ac_cpp='$CPP $CPPFLAGS'
2030ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2031ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2032ac_compiler_gnu=$ac_cv_c_compiler_gnu
2033echo "$as_me:2033: checking how to run the C preprocessor" >&5
2034echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2035# On Suns, sometimes $CPP names a directory.
2036if test -n "$CPP" && test -d "$CPP"; then
2037  CPP=
2038fi
2039if test -z "$CPP"; then
2040  if test "${ac_cv_prog_CPP+set}" = set; then
2041  echo $ECHO_N "(cached) $ECHO_C" >&6
2042else
2043      # Double quotes because CPP needs to be expanded
2044    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2045    do
2046      ac_preproc_ok=false
2047for ac_c_preproc_warn_flag in '' yes
2048do
2049  # Use a header file that comes with gcc, so configuring glibc
2050  # with a fresh cross-compiler works.
2051  # On the NeXT, cc -E runs the code through the compiler's parser,
2052  # not just through cpp. "Syntax error" is here to catch this case.
2053  cat >conftest.$ac_ext <<_ACEOF
2054#line 2054 "configure"
2055#include "confdefs.h"
2056#include <assert.h>
2057                     Syntax error
2058_ACEOF
2059if { (eval echo "$as_me:2059: \"$ac_cpp conftest.$ac_ext\"") >&5
2060  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2061  ac_status=$?
2062  egrep -v '^ *\+' conftest.er1 >conftest.err
2063  rm -f conftest.er1
2064  cat conftest.err >&5
2065  echo "$as_me:2065: \$? = $ac_status" >&5
2066  (exit $ac_status); } >/dev/null; then
2067  if test -s conftest.err; then
2068    ac_cpp_err=$ac_c_preproc_warn_flag
2069  else
2070    ac_cpp_err=
2071  fi
2072else
2073  ac_cpp_err=yes
2074fi
2075if test -z "$ac_cpp_err"; then
2076  :
2077else
2078  echo "$as_me: failed program was:" >&5
2079  cat conftest.$ac_ext >&5
2080  # Broken: fails on valid input.
2081continue
2082fi
2083rm -f conftest.err conftest.$ac_ext
2084
2085  # OK, works on sane cases.  Now check whether non-existent headers
2086  # can be detected and how.
2087  cat >conftest.$ac_ext <<_ACEOF
2088#line 2088 "configure"
2089#include "confdefs.h"
2090#include <ac_nonexistent.h>
2091_ACEOF
2092if { (eval echo "$as_me:2092: \"$ac_cpp conftest.$ac_ext\"") >&5
2093  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2094  ac_status=$?
2095  egrep -v '^ *\+' conftest.er1 >conftest.err
2096  rm -f conftest.er1
2097  cat conftest.err >&5
2098  echo "$as_me:2098: \$? = $ac_status" >&5
2099  (exit $ac_status); } >/dev/null; then
2100  if test -s conftest.err; then
2101    ac_cpp_err=$ac_c_preproc_warn_flag
2102  else
2103    ac_cpp_err=
2104  fi
2105else
2106  ac_cpp_err=yes
2107fi
2108if test -z "$ac_cpp_err"; then
2109  # Broken: success on invalid input.
2110continue
2111else
2112  echo "$as_me: failed program was:" >&5
2113  cat conftest.$ac_ext >&5
2114  # Passes both tests.
2115ac_preproc_ok=:
2116break
2117fi
2118rm -f conftest.err conftest.$ac_ext
2119
2120done
2121# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2122rm -f conftest.err conftest.$ac_ext
2123if $ac_preproc_ok; then
2124  break
2125fi
2126
2127    done
2128    ac_cv_prog_CPP=$CPP
2129
2130fi
2131  CPP=$ac_cv_prog_CPP
2132else
2133  ac_cv_prog_CPP=$CPP
2134fi
2135echo "$as_me:2135: result: $CPP" >&5
2136echo "${ECHO_T}$CPP" >&6
2137ac_preproc_ok=false
2138for ac_c_preproc_warn_flag in '' yes
2139do
2140  # Use a header file that comes with gcc, so configuring glibc
2141  # with a fresh cross-compiler works.
2142  # On the NeXT, cc -E runs the code through the compiler's parser,
2143  # not just through cpp. "Syntax error" is here to catch this case.
2144  cat >conftest.$ac_ext <<_ACEOF
2145#line 2145 "configure"
2146#include "confdefs.h"
2147#include <assert.h>
2148                     Syntax error
2149_ACEOF
2150if { (eval echo "$as_me:2150: \"$ac_cpp conftest.$ac_ext\"") >&5
2151  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2152  ac_status=$?
2153  egrep -v '^ *\+' conftest.er1 >conftest.err
2154  rm -f conftest.er1
2155  cat conftest.err >&5
2156  echo "$as_me:2156: \$? = $ac_status" >&5
2157  (exit $ac_status); } >/dev/null; then
2158  if test -s conftest.err; then
2159    ac_cpp_err=$ac_c_preproc_warn_flag
2160  else
2161    ac_cpp_err=
2162  fi
2163else
2164  ac_cpp_err=yes
2165fi
2166if test -z "$ac_cpp_err"; then
2167  :
2168else
2169  echo "$as_me: failed program was:" >&5
2170  cat conftest.$ac_ext >&5
2171  # Broken: fails on valid input.
2172continue
2173fi
2174rm -f conftest.err conftest.$ac_ext
2175
2176  # OK, works on sane cases.  Now check whether non-existent headers
2177  # can be detected and how.
2178  cat >conftest.$ac_ext <<_ACEOF
2179#line 2179 "configure"
2180#include "confdefs.h"
2181#include <ac_nonexistent.h>
2182_ACEOF
2183if { (eval echo "$as_me:2183: \"$ac_cpp conftest.$ac_ext\"") >&5
2184  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2185  ac_status=$?
2186  egrep -v '^ *\+' conftest.er1 >conftest.err
2187  rm -f conftest.er1
2188  cat conftest.err >&5
2189  echo "$as_me:2189: \$? = $ac_status" >&5
2190  (exit $ac_status); } >/dev/null; then
2191  if test -s conftest.err; then
2192    ac_cpp_err=$ac_c_preproc_warn_flag
2193  else
2194    ac_cpp_err=
2195  fi
2196else
2197  ac_cpp_err=yes
2198fi
2199if test -z "$ac_cpp_err"; then
2200  # Broken: success on invalid input.
2201continue
2202else
2203  echo "$as_me: failed program was:" >&5
2204  cat conftest.$ac_ext >&5
2205  # Passes both tests.
2206ac_preproc_ok=:
2207break
2208fi
2209rm -f conftest.err conftest.$ac_ext
2210
2211done
2212# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2213rm -f conftest.err conftest.$ac_ext
2214if $ac_preproc_ok; then
2215  :
2216else
2217  { { echo "$as_me:2217: error: C preprocessor \"$CPP\" fails sanity check" >&5
2218echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2219   { (exit 1); exit 1; }; }
2220fi
2221
2222ac_ext=c
2223ac_cpp='$CPP $CPPFLAGS'
2224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2226ac_compiler_gnu=$ac_cv_c_compiler_gnu
2227
2228if test $ac_cv_c_compiler_gnu = yes; then
2229    echo "$as_me:2229: checking whether $CC needs -traditional" >&5
2230echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2231if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2232  echo $ECHO_N "(cached) $ECHO_C" >&6
2233else
2234    ac_pattern="Autoconf.*'x'"
2235  cat >conftest.$ac_ext <<_ACEOF
2236#line 2236 "configure"
2237#include "confdefs.h"
2238#include <sgtty.h>
2239int Autoconf = TIOCGETP;
2240_ACEOF
2241if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2242  egrep "$ac_pattern" >/dev/null 2>&1; then
2243  ac_cv_prog_gcc_traditional=yes
2244else
2245  ac_cv_prog_gcc_traditional=no
2246fi
2247rm -f conftest*
2248
2249  if test $ac_cv_prog_gcc_traditional = no; then
2250    cat >conftest.$ac_ext <<_ACEOF
2251#line 2251 "configure"
2252#include "confdefs.h"
2253#include <termio.h>
2254int Autoconf = TCGETA;
2255_ACEOF
2256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2257  egrep "$ac_pattern" >/dev/null 2>&1; then
2258  ac_cv_prog_gcc_traditional=yes
2259fi
2260rm -f conftest*
2261
2262  fi
2263fi
2264echo "$as_me:2264: result: $ac_cv_prog_gcc_traditional" >&5
2265echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2266  if test $ac_cv_prog_gcc_traditional = yes; then
2267    CC="$CC -traditional"
2268  fi
2269fi
2270
2271echo "$as_me:2271: checking whether $CC understands -c and -o together" >&5
2272echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2273if test "${cf_cv_prog_CC_c_o+set}" = set; then
2274  echo $ECHO_N "(cached) $ECHO_C" >&6
2275else
2276
2277cat > conftest.$ac_ext <<CF_EOF
2278#include <stdio.h>
2279int main()
2280{
2281	return 0;
2282}
2283CF_EOF
2284# We do the test twice because some compilers refuse to overwrite an
2285# existing .o file with -o, though they will create one.
2286ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2287if { (eval echo "$as_me:2287: \"$ac_try\"") >&5
2288  (eval $ac_try) 2>&5
2289  ac_status=$?
2290  echo "$as_me:2290: \$? = $ac_status" >&5
2291  (exit $ac_status); } &&
2292  test -f conftest2.$ac_objext && { (eval echo "$as_me:2292: \"$ac_try\"") >&5
2293  (eval $ac_try) 2>&5
2294  ac_status=$?
2295  echo "$as_me:2295: \$? = $ac_status" >&5
2296  (exit $ac_status); };
2297then
2298  eval cf_cv_prog_CC_c_o=yes
2299else
2300  eval cf_cv_prog_CC_c_o=no
2301fi
2302rm -f conftest*
2303
2304fi
2305if test $cf_cv_prog_CC_c_o = yes; then
2306  echo "$as_me:2306: result: yes" >&5
2307echo "${ECHO_T}yes" >&6
2308else
2309  echo "$as_me:2309: result: no" >&5
2310echo "${ECHO_T}no" >&6
2311fi
2312
2313echo "$as_me:2313: checking for POSIXized ISC" >&5
2314echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2315if test -d /etc/conf/kconfig.d &&
2316   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2317then
2318  echo "$as_me:2318: result: yes" >&5
2319echo "${ECHO_T}yes" >&6
2320  ISC=yes # If later tests want to check for ISC.
2321
2322cat >>confdefs.h <<\EOF
2323#define _POSIX_SOURCE 1
2324EOF
2325
2326  if test "$GCC" = yes; then
2327    CC="$CC -posix"
2328  else
2329    CC="$CC -Xp"
2330  fi
2331else
2332  echo "$as_me:2332: result: no" >&5
2333echo "${ECHO_T}no" >&6
2334  ISC=
2335fi
2336
2337echo "$as_me:2337: checking for ${CC-cc} option to accept ANSI C" >&5
2338echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2339if test "${cf_cv_ansi_cc+set}" = set; then
2340  echo $ECHO_N "(cached) $ECHO_C" >&6
2341else
2342
2343cf_cv_ansi_cc=no
2344cf_save_CFLAGS="$CFLAGS"
2345cf_save_CPPFLAGS="$CPPFLAGS"
2346# Don't try gcc -ansi; that turns off useful extensions and
2347# breaks some systems' header files.
2348# AIX			-qlanglvl=ansi
2349# Ultrix and OSF/1	-std1
2350# HP-UX			-Aa -D_HPUX_SOURCE
2351# SVR4			-Xc
2352# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
2353for cf_arg in "-DCC_HAS_PROTOS" \
2354	"" \
2355	-qlanglvl=ansi \
2356	-std1 \
2357	-Ae \
2358	"-Aa -D_HPUX_SOURCE" \
2359	-Xc
2360do
2361
2362cf_fix_cppflags=no
2363cf_new_cflags=
2364cf_new_cppflags=
2365cf_new_extra_cppflags=
2366
2367for cf_add_cflags in $cf_arg
2368do
2369case $cf_fix_cppflags in
2370no)
2371	case $cf_add_cflags in #(vi
2372	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2373		case $cf_add_cflags in
2374		-D*)
2375			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2376
2377			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2378			&& test -z "${cf_tst_cflags}" \
2379			&& cf_fix_cppflags=yes
2380
2381			if test $cf_fix_cppflags = yes ; then
2382				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2383				continue
2384			elif test "${cf_tst_cflags}" = "\"'" ; then
2385				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2386				continue
2387			fi
2388			;;
2389		esac
2390		case "$CPPFLAGS" in
2391		*$cf_add_cflags) #(vi
2392			;;
2393		*) #(vi
2394			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2395			;;
2396		esac
2397		;;
2398	*)
2399		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2400		;;
2401	esac
2402	;;
2403yes)
2404	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2405
2406	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2407
2408	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2409	&& test -z "${cf_tst_cflags}" \
2410	&& cf_fix_cppflags=no
2411	;;
2412esac
2413done
2414
2415if test -n "$cf_new_cflags" ; then
2416
2417	CFLAGS="$CFLAGS $cf_new_cflags"
2418fi
2419
2420if test -n "$cf_new_cppflags" ; then
2421
2422	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2423fi
2424
2425if test -n "$cf_new_extra_cppflags" ; then
2426
2427	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2428fi
2429
2430	cat >conftest.$ac_ext <<_ACEOF
2431#line 2431 "configure"
2432#include "confdefs.h"
2433
2434#ifndef CC_HAS_PROTOS
2435#if !defined(__STDC__) || (__STDC__ != 1)
2436choke me
2437#endif
2438#endif
2439
2440int
2441main ()
2442{
2443
2444	int test (int i, double x);
2445	struct s1 {int (*f) (int a);};
2446	struct s2 {int (*f) (double a);};
2447  ;
2448  return 0;
2449}
2450_ACEOF
2451rm -f conftest.$ac_objext
2452if { (eval echo "$as_me:2452: \"$ac_compile\"") >&5
2453  (eval $ac_compile) 2>&5
2454  ac_status=$?
2455  echo "$as_me:2455: \$? = $ac_status" >&5
2456  (exit $ac_status); } &&
2457         { ac_try='test -s conftest.$ac_objext'
2458  { (eval echo "$as_me:2458: \"$ac_try\"") >&5
2459  (eval $ac_try) 2>&5
2460  ac_status=$?
2461  echo "$as_me:2461: \$? = $ac_status" >&5
2462  (exit $ac_status); }; }; then
2463  cf_cv_ansi_cc="$cf_arg"; break
2464else
2465  echo "$as_me: failed program was:" >&5
2466cat conftest.$ac_ext >&5
2467fi
2468rm -f conftest.$ac_objext conftest.$ac_ext
2469done
2470CFLAGS="$cf_save_CFLAGS"
2471CPPFLAGS="$cf_save_CPPFLAGS"
2472
2473fi
2474echo "$as_me:2474: result: $cf_cv_ansi_cc" >&5
2475echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2476
2477if test "$cf_cv_ansi_cc" != "no"; then
2478if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2479
2480cf_fix_cppflags=no
2481cf_new_cflags=
2482cf_new_cppflags=
2483cf_new_extra_cppflags=
2484
2485for cf_add_cflags in $cf_cv_ansi_cc
2486do
2487case $cf_fix_cppflags in
2488no)
2489	case $cf_add_cflags in #(vi
2490	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2491		case $cf_add_cflags in
2492		-D*)
2493			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2494
2495			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2496			&& test -z "${cf_tst_cflags}" \
2497			&& cf_fix_cppflags=yes
2498
2499			if test $cf_fix_cppflags = yes ; then
2500				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501				continue
2502			elif test "${cf_tst_cflags}" = "\"'" ; then
2503				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2504				continue
2505			fi
2506			;;
2507		esac
2508		case "$CPPFLAGS" in
2509		*$cf_add_cflags) #(vi
2510			;;
2511		*) #(vi
2512			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2513			;;
2514		esac
2515		;;
2516	*)
2517		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2518		;;
2519	esac
2520	;;
2521yes)
2522	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2523
2524	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2525
2526	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2527	&& test -z "${cf_tst_cflags}" \
2528	&& cf_fix_cppflags=no
2529	;;
2530esac
2531done
2532
2533if test -n "$cf_new_cflags" ; then
2534
2535	CFLAGS="$CFLAGS $cf_new_cflags"
2536fi
2537
2538if test -n "$cf_new_cppflags" ; then
2539
2540	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2541fi
2542
2543if test -n "$cf_new_extra_cppflags" ; then
2544
2545	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2546fi
2547
2548else
2549	cat >>confdefs.h <<\EOF
2550#define CC_HAS_PROTOS 1
2551EOF
2552
2553fi
2554fi
2555
2556if test "$cf_cv_ansi_cc" = "no"; then
2557	{ { echo "$as_me:2557: error: Your compiler does not appear to recognize prototypes.
2558You have the following choices:
2559	a. adjust your compiler options
2560	b. get an up-to-date compiler
2561	c. use a wrapper such as unproto" >&5
2562echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2563You have the following choices:
2564	a. adjust your compiler options
2565	b. get an up-to-date compiler
2566	c. use a wrapper such as unproto" >&2;}
2567   { (exit 1); exit 1; }; }
2568fi
2569
2570case $cf_cv_system_name in
2571os2*)
2572    CFLAGS="$CFLAGS -Zmt"
2573    CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2574    CXXFLAGS="$CXXFLAGS -Zmt"
2575    # autoconf's macro sets -Zexe and suffix both, which conflict:w
2576    LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2577    ac_cv_exeext=.exe
2578    ;;
2579esac
2580
2581PROG_EXT="$EXEEXT"
2582
2583test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2584#define PROG_EXT "$PROG_EXT"
2585EOF
2586
2587if test "$cross_compiling" = yes ; then
2588  LDCONFIG=:
2589else
2590case "$cf_cv_system_name" in #(vi
2591freebsd*) #(vi
2592  test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2593  ;;
2594*) LDPATH=$PATH:/sbin:/usr/sbin
2595  # Extract the first word of "ldconfig", so it can be a program name with args.
2596set dummy ldconfig; ac_word=$2
2597echo "$as_me:2597: checking for $ac_word" >&5
2598echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2599if test "${ac_cv_path_LDCONFIG+set}" = set; then
2600  echo $ECHO_N "(cached) $ECHO_C" >&6
2601else
2602  case $LDCONFIG in
2603  [\\/]* | ?:[\\/]*)
2604  ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2605  ;;
2606  *)
2607  ac_save_IFS=$IFS; IFS=$ac_path_separator
2608ac_dummy="$LDPATH"
2609for ac_dir in $ac_dummy; do
2610  IFS=$ac_save_IFS
2611  test -z "$ac_dir" && ac_dir=.
2612  if $as_executable_p "$ac_dir/$ac_word"; then
2613   ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2614   echo "$as_me:2614: found $ac_dir/$ac_word" >&5
2615   break
2616fi
2617done
2618
2619  ;;
2620esac
2621fi
2622LDCONFIG=$ac_cv_path_LDCONFIG
2623
2624if test -n "$LDCONFIG"; then
2625  echo "$as_me:2625: result: $LDCONFIG" >&5
2626echo "${ECHO_T}$LDCONFIG" >&6
2627else
2628  echo "$as_me:2628: result: no" >&5
2629echo "${ECHO_T}no" >&6
2630fi
2631
2632  ;;
2633esac
2634fi
2635
2636echo "$as_me:2636: checking if you want to ensure bool is consistent with C++" >&5
2637echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2638
2639# Check whether --with-cxx or --without-cxx was given.
2640if test "${with_cxx+set}" = set; then
2641  withval="$with_cxx"
2642  cf_with_cxx=$withval
2643else
2644  cf_with_cxx=yes
2645fi;
2646echo "$as_me:2646: result: $cf_with_cxx" >&5
2647echo "${ECHO_T}$cf_with_cxx" >&6
2648if test "X$cf_with_cxx" = Xno ; then
2649	CXX=""
2650	GXX=""
2651else
2652	# with autoconf 2.13, we can change the error to a warning:
2653		ac_ext=cc
2654ac_cpp='$CXXCPP $CPPFLAGS'
2655ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2656ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2657ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2658if test -n "$ac_tool_prefix"; then
2659  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2660  do
2661    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2662set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2663echo "$as_me:2663: checking for $ac_word" >&5
2664echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2665if test "${ac_cv_prog_CXX+set}" = set; then
2666  echo $ECHO_N "(cached) $ECHO_C" >&6
2667else
2668  if test -n "$CXX"; then
2669  ac_cv_prog_CXX="$CXX" # Let the user override the test.
2670else
2671  ac_save_IFS=$IFS; IFS=$ac_path_separator
2672ac_dummy="$PATH"
2673for ac_dir in $ac_dummy; do
2674  IFS=$ac_save_IFS
2675  test -z "$ac_dir" && ac_dir=.
2676  $as_executable_p "$ac_dir/$ac_word" || continue
2677ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2678echo "$as_me:2678: found $ac_dir/$ac_word" >&5
2679break
2680done
2681
2682fi
2683fi
2684CXX=$ac_cv_prog_CXX
2685if test -n "$CXX"; then
2686  echo "$as_me:2686: result: $CXX" >&5
2687echo "${ECHO_T}$CXX" >&6
2688else
2689  echo "$as_me:2689: result: no" >&5
2690echo "${ECHO_T}no" >&6
2691fi
2692
2693    test -n "$CXX" && break
2694  done
2695fi
2696if test -z "$CXX"; then
2697  ac_ct_CXX=$CXX
2698  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2699do
2700  # Extract the first word of "$ac_prog", so it can be a program name with args.
2701set dummy $ac_prog; ac_word=$2
2702echo "$as_me:2702: checking for $ac_word" >&5
2703echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2704if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2705  echo $ECHO_N "(cached) $ECHO_C" >&6
2706else
2707  if test -n "$ac_ct_CXX"; then
2708  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2709else
2710  ac_save_IFS=$IFS; IFS=$ac_path_separator
2711ac_dummy="$PATH"
2712for ac_dir in $ac_dummy; do
2713  IFS=$ac_save_IFS
2714  test -z "$ac_dir" && ac_dir=.
2715  $as_executable_p "$ac_dir/$ac_word" || continue
2716ac_cv_prog_ac_ct_CXX="$ac_prog"
2717echo "$as_me:2717: found $ac_dir/$ac_word" >&5
2718break
2719done
2720
2721fi
2722fi
2723ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2724if test -n "$ac_ct_CXX"; then
2725  echo "$as_me:2725: result: $ac_ct_CXX" >&5
2726echo "${ECHO_T}$ac_ct_CXX" >&6
2727else
2728  echo "$as_me:2728: result: no" >&5
2729echo "${ECHO_T}no" >&6
2730fi
2731
2732  test -n "$ac_ct_CXX" && break
2733done
2734test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2735
2736  CXX=$ac_ct_CXX
2737fi
2738
2739# Provide some information about the compiler.
2740echo "$as_me:2740:" \
2741     "checking for C++ compiler version" >&5
2742ac_compiler=`set X $ac_compile; echo $2`
2743{ (eval echo "$as_me:2743: \"$ac_compiler --version </dev/null >&5\"") >&5
2744  (eval $ac_compiler --version </dev/null >&5) 2>&5
2745  ac_status=$?
2746  echo "$as_me:2746: \$? = $ac_status" >&5
2747  (exit $ac_status); }
2748{ (eval echo "$as_me:2748: \"$ac_compiler -v </dev/null >&5\"") >&5
2749  (eval $ac_compiler -v </dev/null >&5) 2>&5
2750  ac_status=$?
2751  echo "$as_me:2751: \$? = $ac_status" >&5
2752  (exit $ac_status); }
2753{ (eval echo "$as_me:2753: \"$ac_compiler -V </dev/null >&5\"") >&5
2754  (eval $ac_compiler -V </dev/null >&5) 2>&5
2755  ac_status=$?
2756  echo "$as_me:2756: \$? = $ac_status" >&5
2757  (exit $ac_status); }
2758
2759echo "$as_me:2759: checking whether we are using the GNU C++ compiler" >&5
2760echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2761if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2762  echo $ECHO_N "(cached) $ECHO_C" >&6
2763else
2764  cat >conftest.$ac_ext <<_ACEOF
2765#line 2765 "configure"
2766#include "confdefs.h"
2767
2768int
2769main ()
2770{
2771#ifndef __GNUC__
2772       choke me
2773#endif
2774
2775  ;
2776  return 0;
2777}
2778_ACEOF
2779rm -f conftest.$ac_objext
2780if { (eval echo "$as_me:2780: \"$ac_compile\"") >&5
2781  (eval $ac_compile) 2>&5
2782  ac_status=$?
2783  echo "$as_me:2783: \$? = $ac_status" >&5
2784  (exit $ac_status); } &&
2785         { ac_try='test -s conftest.$ac_objext'
2786  { (eval echo "$as_me:2786: \"$ac_try\"") >&5
2787  (eval $ac_try) 2>&5
2788  ac_status=$?
2789  echo "$as_me:2789: \$? = $ac_status" >&5
2790  (exit $ac_status); }; }; then
2791  ac_compiler_gnu=yes
2792else
2793  echo "$as_me: failed program was:" >&5
2794cat conftest.$ac_ext >&5
2795ac_compiler_gnu=no
2796fi
2797rm -f conftest.$ac_objext conftest.$ac_ext
2798ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2799
2800fi
2801echo "$as_me:2801: result: $ac_cv_cxx_compiler_gnu" >&5
2802echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2803GXX=`test $ac_compiler_gnu = yes && echo yes`
2804ac_test_CXXFLAGS=${CXXFLAGS+set}
2805ac_save_CXXFLAGS=$CXXFLAGS
2806CXXFLAGS="-g"
2807echo "$as_me:2807: checking whether $CXX accepts -g" >&5
2808echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2809if test "${ac_cv_prog_cxx_g+set}" = set; then
2810  echo $ECHO_N "(cached) $ECHO_C" >&6
2811else
2812  cat >conftest.$ac_ext <<_ACEOF
2813#line 2813 "configure"
2814#include "confdefs.h"
2815
2816int
2817main ()
2818{
2819
2820  ;
2821  return 0;
2822}
2823_ACEOF
2824rm -f conftest.$ac_objext
2825if { (eval echo "$as_me:2825: \"$ac_compile\"") >&5
2826  (eval $ac_compile) 2>&5
2827  ac_status=$?
2828  echo "$as_me:2828: \$? = $ac_status" >&5
2829  (exit $ac_status); } &&
2830         { ac_try='test -s conftest.$ac_objext'
2831  { (eval echo "$as_me:2831: \"$ac_try\"") >&5
2832  (eval $ac_try) 2>&5
2833  ac_status=$?
2834  echo "$as_me:2834: \$? = $ac_status" >&5
2835  (exit $ac_status); }; }; then
2836  ac_cv_prog_cxx_g=yes
2837else
2838  echo "$as_me: failed program was:" >&5
2839cat conftest.$ac_ext >&5
2840ac_cv_prog_cxx_g=no
2841fi
2842rm -f conftest.$ac_objext conftest.$ac_ext
2843fi
2844echo "$as_me:2844: result: $ac_cv_prog_cxx_g" >&5
2845echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2846if test "$ac_test_CXXFLAGS" = set; then
2847  CXXFLAGS=$ac_save_CXXFLAGS
2848elif test $ac_cv_prog_cxx_g = yes; then
2849  if test "$GXX" = yes; then
2850    CXXFLAGS="-g -O2"
2851  else
2852    CXXFLAGS="-g"
2853  fi
2854else
2855  if test "$GXX" = yes; then
2856    CXXFLAGS="-O2"
2857  else
2858    CXXFLAGS=
2859  fi
2860fi
2861for ac_declaration in \
2862   ''\
2863   '#include <stdlib.h>' \
2864   'extern "C" void std::exit (int) throw (); using std::exit;' \
2865   'extern "C" void std::exit (int); using std::exit;' \
2866   'extern "C" void exit (int) throw ();' \
2867   'extern "C" void exit (int);' \
2868   'void exit (int);'
2869do
2870  cat >conftest.$ac_ext <<_ACEOF
2871#line 2871 "configure"
2872#include "confdefs.h"
2873#include <stdlib.h>
2874$ac_declaration
2875int
2876main ()
2877{
2878exit (42);
2879  ;
2880  return 0;
2881}
2882_ACEOF
2883rm -f conftest.$ac_objext
2884if { (eval echo "$as_me:2884: \"$ac_compile\"") >&5
2885  (eval $ac_compile) 2>&5
2886  ac_status=$?
2887  echo "$as_me:2887: \$? = $ac_status" >&5
2888  (exit $ac_status); } &&
2889         { ac_try='test -s conftest.$ac_objext'
2890  { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891  (eval $ac_try) 2>&5
2892  ac_status=$?
2893  echo "$as_me:2893: \$? = $ac_status" >&5
2894  (exit $ac_status); }; }; then
2895  :
2896else
2897  echo "$as_me: failed program was:" >&5
2898cat conftest.$ac_ext >&5
2899continue
2900fi
2901rm -f conftest.$ac_objext conftest.$ac_ext
2902  cat >conftest.$ac_ext <<_ACEOF
2903#line 2903 "configure"
2904#include "confdefs.h"
2905$ac_declaration
2906int
2907main ()
2908{
2909exit (42);
2910  ;
2911  return 0;
2912}
2913_ACEOF
2914rm -f conftest.$ac_objext
2915if { (eval echo "$as_me:2915: \"$ac_compile\"") >&5
2916  (eval $ac_compile) 2>&5
2917  ac_status=$?
2918  echo "$as_me:2918: \$? = $ac_status" >&5
2919  (exit $ac_status); } &&
2920         { ac_try='test -s conftest.$ac_objext'
2921  { (eval echo "$as_me:2921: \"$ac_try\"") >&5
2922  (eval $ac_try) 2>&5
2923  ac_status=$?
2924  echo "$as_me:2924: \$? = $ac_status" >&5
2925  (exit $ac_status); }; }; then
2926  break
2927else
2928  echo "$as_me: failed program was:" >&5
2929cat conftest.$ac_ext >&5
2930fi
2931rm -f conftest.$ac_objext conftest.$ac_ext
2932done
2933rm -f conftest*
2934if test -n "$ac_declaration"; then
2935  echo '#ifdef __cplusplus' >>confdefs.h
2936  echo $ac_declaration      >>confdefs.h
2937  echo '#endif'             >>confdefs.h
2938fi
2939
2940ac_ext=c
2941ac_cpp='$CPP $CPPFLAGS'
2942ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2943ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2944ac_compiler_gnu=$ac_cv_c_compiler_gnu
2945
2946		# autoconf 2.5x removed the error - by hardcoding it to g++.
2947	if test "$CXX" = "g++" ; then
2948		# Extract the first word of "g++", so it can be a program name with args.
2949set dummy g++; ac_word=$2
2950echo "$as_me:2950: checking for $ac_word" >&5
2951echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2952if test "${ac_cv_path_CXX+set}" = set; then
2953  echo $ECHO_N "(cached) $ECHO_C" >&6
2954else
2955  case $CXX in
2956  [\\/]* | ?:[\\/]*)
2957  ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2958  ;;
2959  *)
2960  ac_save_IFS=$IFS; IFS=$ac_path_separator
2961ac_dummy="$PATH"
2962for ac_dir in $ac_dummy; do
2963  IFS=$ac_save_IFS
2964  test -z "$ac_dir" && ac_dir=.
2965  if $as_executable_p "$ac_dir/$ac_word"; then
2966   ac_cv_path_CXX="$ac_dir/$ac_word"
2967   echo "$as_me:2967: found $ac_dir/$ac_word" >&5
2968   break
2969fi
2970done
2971
2972  ;;
2973esac
2974fi
2975CXX=$ac_cv_path_CXX
2976
2977if test -n "$CXX"; then
2978  echo "$as_me:2978: result: $CXX" >&5
2979echo "${ECHO_T}$CXX" >&6
2980else
2981  echo "$as_me:2981: result: no" >&5
2982echo "${ECHO_T}no" >&6
2983fi
2984
2985	fi
2986	if test "$CXX" = "g++" ; then
2987		{ echo "$as_me:2987: WARNING: ignoring hardcoded g++" >&5
2988echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
2989		cf_with_cxx=no; CXX=""; GXX="";
2990	fi
2991fi
2992
2993GXX_VERSION=none
2994if test "$GXX" = yes; then
2995	echo "$as_me:2995: checking version of g++" >&5
2996echo $ECHO_N "checking version of g++... $ECHO_C" >&6
2997	GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2998	test -z "$GXX_VERSION" && GXX_VERSION=unknown
2999	echo "$as_me:2999: result: $GXX_VERSION" >&5
3000echo "${ECHO_T}$GXX_VERSION" >&6
3001fi
3002
3003case $GXX_VERSION in
30041*|2.[0-6]*)
3005	GXX=""; CXX=""; ac_cv_cxx_compiler_gnu=no
3006	cf_cxx_library=no
3007	{ echo "$as_me:3007: WARNING: templates do not work" >&5
3008echo "$as_me: WARNING: templates do not work" >&2;}
3009	;;
3010esac
3011
3012echo "$as_me:3012: checking if you want to build C++ binding and demo" >&5
3013echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3014
3015# Check whether --with-cxx-binding or --without-cxx-binding was given.
3016if test "${with_cxx_binding+set}" = set; then
3017  withval="$with_cxx_binding"
3018  cf_with_cxx_binding=$withval
3019else
3020  cf_with_cxx_binding=$cf_with_cxx
3021fi;
3022echo "$as_me:3022: result: $cf_with_cxx_binding" >&5
3023echo "${ECHO_T}$cf_with_cxx_binding" >&6
3024
3025echo "$as_me:3025: checking if you want to build with Ada95" >&5
3026echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3027
3028# Check whether --with-ada or --without-ada was given.
3029if test "${with_ada+set}" = set; then
3030  withval="$with_ada"
3031  cf_with_ada=$withval
3032else
3033  cf_with_ada=yes
3034fi;
3035echo "$as_me:3035: result: $cf_with_ada" >&5
3036echo "${ECHO_T}$cf_with_ada" >&6
3037
3038echo "$as_me:3038: checking if you want to build programs such as tic" >&5
3039echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3040
3041# Check whether --with-progs or --without-progs was given.
3042if test "${with_progs+set}" = set; then
3043  withval="$with_progs"
3044  cf_with_progs=$withval
3045else
3046  cf_with_progs=yes
3047fi;
3048echo "$as_me:3048: result: $cf_with_progs" >&5
3049echo "${ECHO_T}$cf_with_progs" >&6
3050
3051echo "$as_me:3051: checking if you wish to install curses.h" >&5
3052echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3053
3054# Check whether --with-curses-h or --without-curses-h was given.
3055if test "${with_curses_h+set}" = set; then
3056  withval="$with_curses_h"
3057  with_curses_h=$withval
3058else
3059  with_curses_h=yes
3060fi;
3061echo "$as_me:3061: result: $with_curses_h" >&5
3062echo "${ECHO_T}$with_curses_h" >&6
3063
3064modules_to_build="ncurses"
3065if test "X$cf_with_progs" != Xno ; then
3066modules_to_build="$modules_to_build progs tack"
3067fi
3068modules_to_build="$modules_to_build panel menu form"
3069
3070test "$program_prefix" != NONE &&
3071  program_transform_name="s,^,$program_prefix,;$program_transform_name"
3072# Use a double $ so make ignores it.
3073test "$program_suffix" != NONE &&
3074  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3075# Double any \ or $.  echo might interpret backslashes.
3076# By default was `s,x,x', remove it if useless.
3077cat <<\_ACEOF >conftest.sed
3078s/[\\$]/&&/g;s/;s,x,x,$//
3079_ACEOF
3080program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3081rm conftest.sed
3082
3083for ac_prog in mawk gawk nawk awk
3084do
3085  # Extract the first word of "$ac_prog", so it can be a program name with args.
3086set dummy $ac_prog; ac_word=$2
3087echo "$as_me:3087: checking for $ac_word" >&5
3088echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3089if test "${ac_cv_prog_AWK+set}" = set; then
3090  echo $ECHO_N "(cached) $ECHO_C" >&6
3091else
3092  if test -n "$AWK"; then
3093  ac_cv_prog_AWK="$AWK" # Let the user override the test.
3094else
3095  ac_save_IFS=$IFS; IFS=$ac_path_separator
3096ac_dummy="$PATH"
3097for ac_dir in $ac_dummy; do
3098  IFS=$ac_save_IFS
3099  test -z "$ac_dir" && ac_dir=.
3100  $as_executable_p "$ac_dir/$ac_word" || continue
3101ac_cv_prog_AWK="$ac_prog"
3102echo "$as_me:3102: found $ac_dir/$ac_word" >&5
3103break
3104done
3105
3106fi
3107fi
3108AWK=$ac_cv_prog_AWK
3109if test -n "$AWK"; then
3110  echo "$as_me:3110: result: $AWK" >&5
3111echo "${ECHO_T}$AWK" >&6
3112else
3113  echo "$as_me:3113: result: no" >&5
3114echo "${ECHO_T}no" >&6
3115fi
3116
3117  test -n "$AWK" && break
3118done
3119
3120echo "$as_me:3120: checking whether ${MAKE-make} sets \${MAKE}" >&5
3121echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3122set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3123if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3124  echo $ECHO_N "(cached) $ECHO_C" >&6
3125else
3126  cat >conftest.make <<\EOF
3127all:
3128	@echo 'ac_maketemp="${MAKE}"'
3129EOF
3130# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3131eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3132if test -n "$ac_maketemp"; then
3133  eval ac_cv_prog_make_${ac_make}_set=yes
3134else
3135  eval ac_cv_prog_make_${ac_make}_set=no
3136fi
3137rm -f conftest.make
3138fi
3139if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3140  echo "$as_me:3140: result: yes" >&5
3141echo "${ECHO_T}yes" >&6
3142  SET_MAKE=
3143else
3144  echo "$as_me:3144: result: no" >&5
3145echo "${ECHO_T}no" >&6
3146  SET_MAKE="MAKE=${MAKE-make}"
3147fi
3148
3149# Find a good install program.  We prefer a C program (faster),
3150# so one script is as good as another.  But avoid the broken or
3151# incompatible versions:
3152# SysV /etc/install, /usr/sbin/install
3153# SunOS /usr/etc/install
3154# IRIX /sbin/install
3155# AIX /bin/install
3156# AmigaOS /C/install, which installs bootblocks on floppy discs
3157# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3158# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3159# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3160# ./install, which can be erroneously created by make from ./install.sh.
3161echo "$as_me:3161: checking for a BSD compatible install" >&5
3162echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3163if test -z "$INSTALL"; then
3164if test "${ac_cv_path_install+set}" = set; then
3165  echo $ECHO_N "(cached) $ECHO_C" >&6
3166else
3167    ac_save_IFS=$IFS; IFS=$ac_path_separator
3168  for ac_dir in $PATH; do
3169    IFS=$ac_save_IFS
3170    # Account for people who put trailing slashes in PATH elements.
3171    case $ac_dir/ in
3172    / | ./ | .// | /cC/* \
3173    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3174    | /usr/ucb/* ) ;;
3175    *)
3176      # OSF1 and SCO ODT 3.0 have their own names for install.
3177      # Don't use installbsd from OSF since it installs stuff as root
3178      # by default.
3179      for ac_prog in ginstall scoinst install; do
3180        if $as_executable_p "$ac_dir/$ac_prog"; then
3181	  if test $ac_prog = install &&
3182            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3183	    # AIX install.  It has an incompatible calling convention.
3184	    :
3185	  elif test $ac_prog = install &&
3186	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3187	    # program-specific install script used by HP pwplus--don't use.
3188	    :
3189	  else
3190	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3191	    break 2
3192	  fi
3193	fi
3194      done
3195      ;;
3196    esac
3197  done
3198
3199fi
3200  if test "${ac_cv_path_install+set}" = set; then
3201    INSTALL=$ac_cv_path_install
3202  else
3203    # As a last resort, use the slow shell script.  We don't cache a
3204    # path for INSTALL within a source directory, because that will
3205    # break other packages using the cache if that directory is
3206    # removed, or if the path is relative.
3207    INSTALL=$ac_install_sh
3208  fi
3209fi
3210echo "$as_me:3210: result: $INSTALL" >&5
3211echo "${ECHO_T}$INSTALL" >&6
3212
3213# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3214# It thinks the first close brace ends the variable substitution.
3215test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3216
3217test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3218
3219test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3220
3221case $INSTALL in
3222/*)
3223  ;;
3224*)
3225  cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3226  test -z "$cf_dir" && cf_dir=.
3227  INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3228  ;;
3229esac
3230
3231echo "$as_me:3231: checking for long file names" >&5
3232echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3233if test "${ac_cv_sys_long_file_names+set}" = set; then
3234  echo $ECHO_N "(cached) $ECHO_C" >&6
3235else
3236  ac_cv_sys_long_file_names=yes
3237# Test for long file names in all the places we know might matter:
3238#      .		the current directory, where building will happen
3239#      $prefix/lib	where we will be installing things
3240#      $exec_prefix/lib	likewise
3241# eval it to expand exec_prefix.
3242#      $TMPDIR		if set, where it might want to write temporary files
3243# if $TMPDIR is not set:
3244#      /tmp		where it might want to write temporary files
3245#      /var/tmp		likewise
3246#      /usr/tmp		likewise
3247if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3248  ac_tmpdirs=$TMPDIR
3249else
3250  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3251fi
3252for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3253  test -d $ac_dir || continue
3254  test -w $ac_dir || continue # It is less confusing to not echo anything here.
3255  ac_xdir=$ac_dir/cf$$
3256  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3257  ac_tf1=$ac_xdir/conftest9012345
3258  ac_tf2=$ac_xdir/conftest9012346
3259  (echo 1 >$ac_tf1) 2>/dev/null
3260  (echo 2 >$ac_tf2) 2>/dev/null
3261  ac_val=`cat $ac_tf1 2>/dev/null`
3262  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3263    ac_cv_sys_long_file_names=no
3264    rm -rf $ac_xdir 2>/dev/null
3265    break
3266  fi
3267  rm -rf $ac_xdir 2>/dev/null
3268done
3269fi
3270echo "$as_me:3270: result: $ac_cv_sys_long_file_names" >&5
3271echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3272if test $ac_cv_sys_long_file_names = yes; then
3273
3274cat >>confdefs.h <<\EOF
3275#define HAVE_LONG_FILE_NAMES 1
3276EOF
3277
3278fi
3279
3280echo "$as_me:3280: checking if filesystem supports mixed-case filenames" >&5
3281echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3282if test "${cf_cv_mixedcase+set}" = set; then
3283  echo $ECHO_N "(cached) $ECHO_C" >&6
3284else
3285
3286if test "$cross_compiling" = yes ; then
3287	case $target_alias in #(vi
3288	*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3289		cf_cv_mixedcase=no
3290		;;
3291	*)
3292		cf_cv_mixedcase=yes
3293		;;
3294	esac
3295else
3296	rm -f conftest CONFTEST
3297	echo test >conftest
3298	if test -f CONFTEST ; then
3299		cf_cv_mixedcase=no
3300	else
3301		cf_cv_mixedcase=yes
3302	fi
3303	rm -f conftest CONFTEST
3304fi
3305
3306fi
3307echo "$as_me:3307: result: $cf_cv_mixedcase" >&5
3308echo "${ECHO_T}$cf_cv_mixedcase" >&6
3309test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3310#define MIXEDCASE_FILENAMES 1
3311EOF
3312
3313echo "$as_me:3313: checking whether ln -s works" >&5
3314echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3315LN_S=$as_ln_s
3316if test "$LN_S" = "ln -s"; then
3317  echo "$as_me:3317: result: yes" >&5
3318echo "${ECHO_T}yes" >&6
3319else
3320  echo "$as_me:3320: result: no, using $LN_S" >&5
3321echo "${ECHO_T}no, using $LN_S" >&6
3322fi
3323
3324# Extract the first word of "ctags", so it can be a program name with args.
3325set dummy ctags; ac_word=$2
3326echo "$as_me:3326: checking for $ac_word" >&5
3327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3329  echo $ECHO_N "(cached) $ECHO_C" >&6
3330else
3331  if test -n "$MAKE_LOWER_TAGS"; then
3332  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3333else
3334  ac_save_IFS=$IFS; IFS=$ac_path_separator
3335ac_dummy="$PATH"
3336for ac_dir in $ac_dummy; do
3337  IFS=$ac_save_IFS
3338  test -z "$ac_dir" && ac_dir=.
3339  $as_executable_p "$ac_dir/$ac_word" || continue
3340ac_cv_prog_MAKE_LOWER_TAGS="yes"
3341echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342break
3343done
3344
3345  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3346fi
3347fi
3348MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3349if test -n "$MAKE_LOWER_TAGS"; then
3350  echo "$as_me:3350: result: $MAKE_LOWER_TAGS" >&5
3351echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3352else
3353  echo "$as_me:3353: result: no" >&5
3354echo "${ECHO_T}no" >&6
3355fi
3356
3357if test "$cf_cv_mixedcase" = yes ; then
3358	# Extract the first word of "etags", so it can be a program name with args.
3359set dummy etags; ac_word=$2
3360echo "$as_me:3360: checking for $ac_word" >&5
3361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3362if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3363  echo $ECHO_N "(cached) $ECHO_C" >&6
3364else
3365  if test -n "$MAKE_UPPER_TAGS"; then
3366  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3367else
3368  ac_save_IFS=$IFS; IFS=$ac_path_separator
3369ac_dummy="$PATH"
3370for ac_dir in $ac_dummy; do
3371  IFS=$ac_save_IFS
3372  test -z "$ac_dir" && ac_dir=.
3373  $as_executable_p "$ac_dir/$ac_word" || continue
3374ac_cv_prog_MAKE_UPPER_TAGS="yes"
3375echo "$as_me:3375: found $ac_dir/$ac_word" >&5
3376break
3377done
3378
3379  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3380fi
3381fi
3382MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3383if test -n "$MAKE_UPPER_TAGS"; then
3384  echo "$as_me:3384: result: $MAKE_UPPER_TAGS" >&5
3385echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3386else
3387  echo "$as_me:3387: result: no" >&5
3388echo "${ECHO_T}no" >&6
3389fi
3390
3391else
3392	MAKE_UPPER_TAGS=no
3393fi
3394
3395if test "$MAKE_UPPER_TAGS" = yes ; then
3396	MAKE_UPPER_TAGS=
3397else
3398	MAKE_UPPER_TAGS="#"
3399fi
3400
3401if test "$MAKE_LOWER_TAGS" = yes ; then
3402	MAKE_LOWER_TAGS=
3403else
3404	MAKE_LOWER_TAGS="#"
3405fi
3406
3407for ac_prog in tdlint lint alint
3408do
3409  # Extract the first word of "$ac_prog", so it can be a program name with args.
3410set dummy $ac_prog; ac_word=$2
3411echo "$as_me:3411: checking for $ac_word" >&5
3412echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3413if test "${ac_cv_prog_LINT+set}" = set; then
3414  echo $ECHO_N "(cached) $ECHO_C" >&6
3415else
3416  if test -n "$LINT"; then
3417  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3418else
3419  ac_save_IFS=$IFS; IFS=$ac_path_separator
3420ac_dummy="$PATH"
3421for ac_dir in $ac_dummy; do
3422  IFS=$ac_save_IFS
3423  test -z "$ac_dir" && ac_dir=.
3424  $as_executable_p "$ac_dir/$ac_word" || continue
3425ac_cv_prog_LINT="$ac_prog"
3426echo "$as_me:3426: found $ac_dir/$ac_word" >&5
3427break
3428done
3429
3430fi
3431fi
3432LINT=$ac_cv_prog_LINT
3433if test -n "$LINT"; then
3434  echo "$as_me:3434: result: $LINT" >&5
3435echo "${ECHO_T}$LINT" >&6
3436else
3437  echo "$as_me:3437: result: no" >&5
3438echo "${ECHO_T}no" >&6
3439fi
3440
3441  test -n "$LINT" && break
3442done
3443
3444for ac_prog in man man_db
3445do
3446  # Extract the first word of "$ac_prog", so it can be a program name with args.
3447set dummy $ac_prog; ac_word=$2
3448echo "$as_me:3448: checking for $ac_word" >&5
3449echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3450if test "${ac_cv_prog_MAN+set}" = set; then
3451  echo $ECHO_N "(cached) $ECHO_C" >&6
3452else
3453  if test -n "$MAN"; then
3454  ac_cv_prog_MAN="$MAN" # Let the user override the test.
3455else
3456  ac_save_IFS=$IFS; IFS=$ac_path_separator
3457ac_dummy="$PATH"
3458for ac_dir in $ac_dummy; do
3459  IFS=$ac_save_IFS
3460  test -z "$ac_dir" && ac_dir=.
3461  $as_executable_p "$ac_dir/$ac_word" || continue
3462ac_cv_prog_MAN="$ac_prog"
3463echo "$as_me:3463: found $ac_dir/$ac_word" >&5
3464break
3465done
3466
3467fi
3468fi
3469MAN=$ac_cv_prog_MAN
3470if test -n "$MAN"; then
3471  echo "$as_me:3471: result: $MAN" >&5
3472echo "${ECHO_T}$MAN" >&6
3473else
3474  echo "$as_me:3474: result: no" >&5
3475echo "${ECHO_T}no" >&6
3476fi
3477
3478  test -n "$MAN" && break
3479done
3480
3481if test -n "$ac_tool_prefix"; then
3482  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3483set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3484echo "$as_me:3484: checking for $ac_word" >&5
3485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3486if test "${ac_cv_prog_RANLIB+set}" = set; then
3487  echo $ECHO_N "(cached) $ECHO_C" >&6
3488else
3489  if test -n "$RANLIB"; then
3490  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3491else
3492  ac_save_IFS=$IFS; IFS=$ac_path_separator
3493ac_dummy="$PATH"
3494for ac_dir in $ac_dummy; do
3495  IFS=$ac_save_IFS
3496  test -z "$ac_dir" && ac_dir=.
3497  $as_executable_p "$ac_dir/$ac_word" || continue
3498ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3499echo "$as_me:3499: found $ac_dir/$ac_word" >&5
3500break
3501done
3502
3503fi
3504fi
3505RANLIB=$ac_cv_prog_RANLIB
3506if test -n "$RANLIB"; then
3507  echo "$as_me:3507: result: $RANLIB" >&5
3508echo "${ECHO_T}$RANLIB" >&6
3509else
3510  echo "$as_me:3510: result: no" >&5
3511echo "${ECHO_T}no" >&6
3512fi
3513
3514fi
3515if test -z "$ac_cv_prog_RANLIB"; then
3516  ac_ct_RANLIB=$RANLIB
3517  # Extract the first word of "ranlib", so it can be a program name with args.
3518set dummy ranlib; ac_word=$2
3519echo "$as_me:3519: checking for $ac_word" >&5
3520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3522  echo $ECHO_N "(cached) $ECHO_C" >&6
3523else
3524  if test -n "$ac_ct_RANLIB"; then
3525  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3526else
3527  ac_save_IFS=$IFS; IFS=$ac_path_separator
3528ac_dummy="$PATH"
3529for ac_dir in $ac_dummy; do
3530  IFS=$ac_save_IFS
3531  test -z "$ac_dir" && ac_dir=.
3532  $as_executable_p "$ac_dir/$ac_word" || continue
3533ac_cv_prog_ac_ct_RANLIB="ranlib"
3534echo "$as_me:3534: found $ac_dir/$ac_word" >&5
3535break
3536done
3537
3538  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3539fi
3540fi
3541ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3542if test -n "$ac_ct_RANLIB"; then
3543  echo "$as_me:3543: result: $ac_ct_RANLIB" >&5
3544echo "${ECHO_T}$ac_ct_RANLIB" >&6
3545else
3546  echo "$as_me:3546: result: no" >&5
3547echo "${ECHO_T}no" >&6
3548fi
3549
3550  RANLIB=$ac_ct_RANLIB
3551else
3552  RANLIB="$ac_cv_prog_RANLIB"
3553fi
3554
3555if test -n "$ac_tool_prefix"; then
3556  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3557set dummy ${ac_tool_prefix}ld; ac_word=$2
3558echo "$as_me:3558: checking for $ac_word" >&5
3559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3560if test "${ac_cv_prog_LD+set}" = set; then
3561  echo $ECHO_N "(cached) $ECHO_C" >&6
3562else
3563  if test -n "$LD"; then
3564  ac_cv_prog_LD="$LD" # Let the user override the test.
3565else
3566  ac_save_IFS=$IFS; IFS=$ac_path_separator
3567ac_dummy="$PATH"
3568for ac_dir in $ac_dummy; do
3569  IFS=$ac_save_IFS
3570  test -z "$ac_dir" && ac_dir=.
3571  $as_executable_p "$ac_dir/$ac_word" || continue
3572ac_cv_prog_LD="${ac_tool_prefix}ld"
3573echo "$as_me:3573: found $ac_dir/$ac_word" >&5
3574break
3575done
3576
3577fi
3578fi
3579LD=$ac_cv_prog_LD
3580if test -n "$LD"; then
3581  echo "$as_me:3581: result: $LD" >&5
3582echo "${ECHO_T}$LD" >&6
3583else
3584  echo "$as_me:3584: result: no" >&5
3585echo "${ECHO_T}no" >&6
3586fi
3587
3588fi
3589if test -z "$ac_cv_prog_LD"; then
3590  ac_ct_LD=$LD
3591  # Extract the first word of "ld", so it can be a program name with args.
3592set dummy ld; ac_word=$2
3593echo "$as_me:3593: checking for $ac_word" >&5
3594echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3595if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3596  echo $ECHO_N "(cached) $ECHO_C" >&6
3597else
3598  if test -n "$ac_ct_LD"; then
3599  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3600else
3601  ac_save_IFS=$IFS; IFS=$ac_path_separator
3602ac_dummy="$PATH"
3603for ac_dir in $ac_dummy; do
3604  IFS=$ac_save_IFS
3605  test -z "$ac_dir" && ac_dir=.
3606  $as_executable_p "$ac_dir/$ac_word" || continue
3607ac_cv_prog_ac_ct_LD="ld"
3608echo "$as_me:3608: found $ac_dir/$ac_word" >&5
3609break
3610done
3611
3612  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3613fi
3614fi
3615ac_ct_LD=$ac_cv_prog_ac_ct_LD
3616if test -n "$ac_ct_LD"; then
3617  echo "$as_me:3617: result: $ac_ct_LD" >&5
3618echo "${ECHO_T}$ac_ct_LD" >&6
3619else
3620  echo "$as_me:3620: result: no" >&5
3621echo "${ECHO_T}no" >&6
3622fi
3623
3624  LD=$ac_ct_LD
3625else
3626  LD="$ac_cv_prog_LD"
3627fi
3628
3629if test -n "$ac_tool_prefix"; then
3630  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3631set dummy ${ac_tool_prefix}ar; ac_word=$2
3632echo "$as_me:3632: checking for $ac_word" >&5
3633echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3634if test "${ac_cv_prog_AR+set}" = set; then
3635  echo $ECHO_N "(cached) $ECHO_C" >&6
3636else
3637  if test -n "$AR"; then
3638  ac_cv_prog_AR="$AR" # Let the user override the test.
3639else
3640  ac_save_IFS=$IFS; IFS=$ac_path_separator
3641ac_dummy="$PATH"
3642for ac_dir in $ac_dummy; do
3643  IFS=$ac_save_IFS
3644  test -z "$ac_dir" && ac_dir=.
3645  $as_executable_p "$ac_dir/$ac_word" || continue
3646ac_cv_prog_AR="${ac_tool_prefix}ar"
3647echo "$as_me:3647: found $ac_dir/$ac_word" >&5
3648break
3649done
3650
3651fi
3652fi
3653AR=$ac_cv_prog_AR
3654if test -n "$AR"; then
3655  echo "$as_me:3655: result: $AR" >&5
3656echo "${ECHO_T}$AR" >&6
3657else
3658  echo "$as_me:3658: result: no" >&5
3659echo "${ECHO_T}no" >&6
3660fi
3661
3662fi
3663if test -z "$ac_cv_prog_AR"; then
3664  ac_ct_AR=$AR
3665  # Extract the first word of "ar", so it can be a program name with args.
3666set dummy ar; ac_word=$2
3667echo "$as_me:3667: checking for $ac_word" >&5
3668echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3669if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3670  echo $ECHO_N "(cached) $ECHO_C" >&6
3671else
3672  if test -n "$ac_ct_AR"; then
3673  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3674else
3675  ac_save_IFS=$IFS; IFS=$ac_path_separator
3676ac_dummy="$PATH"
3677for ac_dir in $ac_dummy; do
3678  IFS=$ac_save_IFS
3679  test -z "$ac_dir" && ac_dir=.
3680  $as_executable_p "$ac_dir/$ac_word" || continue
3681ac_cv_prog_ac_ct_AR="ar"
3682echo "$as_me:3682: found $ac_dir/$ac_word" >&5
3683break
3684done
3685
3686  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3687fi
3688fi
3689ac_ct_AR=$ac_cv_prog_ac_ct_AR
3690if test -n "$ac_ct_AR"; then
3691  echo "$as_me:3691: result: $ac_ct_AR" >&5
3692echo "${ECHO_T}$ac_ct_AR" >&6
3693else
3694  echo "$as_me:3694: result: no" >&5
3695echo "${ECHO_T}no" >&6
3696fi
3697
3698  AR=$ac_ct_AR
3699else
3700  AR="$ac_cv_prog_AR"
3701fi
3702
3703if test "${cf_cv_subst_AR_OPTS+set}" = set; then
3704  echo $ECHO_N "(cached) $ECHO_C" >&6
3705else
3706
3707echo "$as_me:3707: checking for archiver options (symbol AR_OPTS)" >&5
3708echo $ECHO_N "checking for archiver options (symbol AR_OPTS)... $ECHO_C" >&6
3709test -z "$AR_OPTS" && AR_OPTS=rv
3710echo "$as_me:3710: result: $AR_OPTS" >&5
3711echo "${ECHO_T}$AR_OPTS" >&6
3712
3713cf_cv_subst_AR_OPTS=$AR_OPTS
3714fi
3715
3716AR_OPTS=${cf_cv_subst_AR_OPTS}
3717
3718echo "$as_me:3718: checking for makeflags variable" >&5
3719echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3720if test "${cf_cv_makeflags+set}" = set; then
3721  echo $ECHO_N "(cached) $ECHO_C" >&6
3722else
3723
3724	cf_cv_makeflags=''
3725	for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
3726	do
3727		cat >cf_makeflags.tmp <<CF_EOF
3728SHELL = /bin/sh
3729all :
3730	@ echo '.$cf_option'
3731CF_EOF
3732		cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
3733		case "$cf_result" in
3734		.*k)
3735			cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3736			case "$cf_result" in
3737			.*CC=*)	cf_cv_makeflags=
3738				;;
3739			*)	cf_cv_makeflags=$cf_option
3740				;;
3741			esac
3742			break
3743			;;
3744		*)	echo no match "$cf_result"
3745			;;
3746		esac
3747	done
3748	rm -f cf_makeflags.tmp
3749
3750fi
3751echo "$as_me:3751: result: $cf_cv_makeflags" >&5
3752echo "${ECHO_T}$cf_cv_makeflags" >&6
3753
3754echo "$as_me:3754: checking if you have specified an install-prefix" >&5
3755echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
3756
3757# Check whether --with-install-prefix or --without-install-prefix was given.
3758if test "${with_install_prefix+set}" = set; then
3759  withval="$with_install_prefix"
3760  case "$withval" in #(vi
3761	yes|no) #(vi
3762		;;
3763	*)	DESTDIR="$withval"
3764		;;
3765	esac
3766fi;
3767echo "$as_me:3767: result: $DESTDIR" >&5
3768echo "${ECHO_T}$DESTDIR" >&6
3769
3770###############################################################################
3771
3772# If we're cross-compiling, allow the user to override the tools and their
3773# options.  The configure script is oriented toward identifying the host
3774# compiler, etc., but we need a build compiler to generate parts of the source.
3775
3776if test "$cross_compiling" = yes ; then
3777
3778	# defaults that we might want to override
3779	: ${BUILD_CFLAGS:=''}
3780	: ${BUILD_CPPFLAGS:=''}
3781	: ${BUILD_LDFLAGS:=''}
3782	: ${BUILD_LIBS:=''}
3783	: ${BUILD_EXEEXT:='$x'}
3784	: ${BUILD_OBJEXT:='o'}
3785
3786# Check whether --with-build-cc or --without-build-cc was given.
3787if test "${with_build_cc+set}" = set; then
3788  withval="$with_build_cc"
3789  BUILD_CC="$withval"
3790else
3791  for ac_prog in gcc cc cl
3792do
3793  # Extract the first word of "$ac_prog", so it can be a program name with args.
3794set dummy $ac_prog; ac_word=$2
3795echo "$as_me:3795: checking for $ac_word" >&5
3796echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3797if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3798  echo $ECHO_N "(cached) $ECHO_C" >&6
3799else
3800  if test -n "$BUILD_CC"; then
3801  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3802else
3803  ac_save_IFS=$IFS; IFS=$ac_path_separator
3804ac_dummy="$PATH"
3805for ac_dir in $ac_dummy; do
3806  IFS=$ac_save_IFS
3807  test -z "$ac_dir" && ac_dir=.
3808  $as_executable_p "$ac_dir/$ac_word" || continue
3809ac_cv_prog_BUILD_CC="$ac_prog"
3810echo "$as_me:3810: found $ac_dir/$ac_word" >&5
3811break
3812done
3813
3814fi
3815fi
3816BUILD_CC=$ac_cv_prog_BUILD_CC
3817if test -n "$BUILD_CC"; then
3818  echo "$as_me:3818: result: $BUILD_CC" >&5
3819echo "${ECHO_T}$BUILD_CC" >&6
3820else
3821  echo "$as_me:3821: result: no" >&5
3822echo "${ECHO_T}no" >&6
3823fi
3824
3825  test -n "$BUILD_CC" && break
3826done
3827
3828fi;
3829	echo "$as_me:3829: checking for native build C compiler" >&5
3830echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3831	echo "$as_me:3831: result: $BUILD_CC" >&5
3832echo "${ECHO_T}$BUILD_CC" >&6
3833
3834	echo "$as_me:3834: checking for native build C preprocessor" >&5
3835echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3836
3837# Check whether --with-build-cpp or --without-build-cpp was given.
3838if test "${with_build_cpp+set}" = set; then
3839  withval="$with_build_cpp"
3840  BUILD_CPP="$withval"
3841else
3842  BUILD_CPP='$(BUILD_CC) -E'
3843fi;
3844	echo "$as_me:3844: result: $BUILD_CPP" >&5
3845echo "${ECHO_T}$BUILD_CPP" >&6
3846
3847	echo "$as_me:3847: checking for native build C flags" >&5
3848echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3849
3850# Check whether --with-build-cflags or --without-build-cflags was given.
3851if test "${with_build_cflags+set}" = set; then
3852  withval="$with_build_cflags"
3853  BUILD_CFLAGS="$withval"
3854fi;
3855	echo "$as_me:3855: result: $BUILD_CFLAGS" >&5
3856echo "${ECHO_T}$BUILD_CFLAGS" >&6
3857
3858	echo "$as_me:3858: checking for native build C preprocessor-flags" >&5
3859echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3860
3861# Check whether --with-build-cppflags or --without-build-cppflags was given.
3862if test "${with_build_cppflags+set}" = set; then
3863  withval="$with_build_cppflags"
3864  BUILD_CPPFLAGS="$withval"
3865fi;
3866	echo "$as_me:3866: result: $BUILD_CPPFLAGS" >&5
3867echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3868
3869	echo "$as_me:3869: checking for native build linker-flags" >&5
3870echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3871
3872# Check whether --with-build-ldflags or --without-build-ldflags was given.
3873if test "${with_build_ldflags+set}" = set; then
3874  withval="$with_build_ldflags"
3875  BUILD_LDFLAGS="$withval"
3876fi;
3877	echo "$as_me:3877: result: $BUILD_LDFLAGS" >&5
3878echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3879
3880	echo "$as_me:3880: checking for native build linker-libraries" >&5
3881echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3882
3883# Check whether --with-build-libs or --without-build-libs was given.
3884if test "${with_build_libs+set}" = set; then
3885  withval="$with_build_libs"
3886  BUILD_LIBS="$withval"
3887fi;
3888	echo "$as_me:3888: result: $BUILD_LIBS" >&5
3889echo "${ECHO_T}$BUILD_LIBS" >&6
3890
3891	# this assumes we're on Unix.
3892	BUILD_EXEEXT=
3893	BUILD_OBJEXT=o
3894
3895	: ${BUILD_CC:='$(CC)'}
3896
3897	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '$(CC)' ) ; then
3898		{ { echo "$as_me:3898: error: Cross-build requires two compilers.
3899Use --with-build-cc to specify the native compiler." >&5
3900echo "$as_me: error: Cross-build requires two compilers.
3901Use --with-build-cc to specify the native compiler." >&2;}
3902   { (exit 1); exit 1; }; }
3903	fi
3904
3905else
3906	: ${BUILD_CC:='$(CC)'}
3907	: ${BUILD_CPP:='$(CPP)'}
3908	: ${BUILD_CFLAGS:='$(CFLAGS)'}
3909	: ${BUILD_CPPFLAGS:='$(CPPFLAGS)'}
3910	: ${BUILD_LDFLAGS:='$(LDFLAGS)'}
3911	: ${BUILD_LIBS:='$(LIBS)'}
3912	: ${BUILD_EXEEXT:='$x'}
3913	: ${BUILD_OBJEXT:='o'}
3914fi
3915
3916###############################################################################
3917
3918### Options to allow the user to specify the set of libraries which are used.
3919### Use "--without-normal --with-shared" to allow the default model to be
3920### shared, for example.
3921cf_list_models=""
3922
3923LIBTOOL=
3924
3925# common library maintenance symbols that are convenient for libtool scripts:
3926LIB_CREATE='$(AR) -cr'
3927LIB_OBJECT='$(OBJECTS)'
3928LIB_SUFFIX=.a
3929LIB_PREP="$RANLIB"
3930
3931# symbols used to prop libtool up to enable it to determine what it should be
3932# doing:
3933LIB_CLEAN=
3934LIB_COMPILE=
3935LIB_LINK=
3936LIB_INSTALL=
3937LIB_UNINSTALL=
3938
3939echo "$as_me:3939: checking if you want to build libraries with libtool" >&5
3940echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
3941
3942# Check whether --with-libtool or --without-libtool was given.
3943if test "${with_libtool+set}" = set; then
3944  withval="$with_libtool"
3945  with_libtool=$withval
3946else
3947  with_libtool=no
3948fi;
3949echo "$as_me:3949: result: $with_libtool" >&5
3950echo "${ECHO_T}$with_libtool" >&6
3951if test "$with_libtool" != "no"; then
3952
3953 	if test "$with_libtool" != "yes" ; then
3954
3955case ".$with_libtool" in #(vi
3956.\$\(*\)*|.\'*\'*) #(vi
3957  ;;
3958..|./*|.\\*) #(vi
3959  ;;
3960.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3961  ;;
3962.\${*prefix}*) #(vi
3963  eval with_libtool="$with_libtool"
3964  case ".$with_libtool" in #(vi
3965  .NONE/*)
3966    with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3967    ;;
3968  esac
3969  ;; #(vi
3970.NONE/*)
3971  with_libtool=`echo $with_libtool | sed -e s%NONE%$ac_default_prefix%`
3972  ;;
3973*)
3974  { { echo "$as_me:3974: error: expected a pathname, not \"$with_libtool\"" >&5
3975echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
3976   { (exit 1); exit 1; }; }
3977  ;;
3978esac
3979
3980		LIBTOOL=$with_libtool
3981	else
3982 		# Extract the first word of "libtool", so it can be a program name with args.
3983set dummy libtool; ac_word=$2
3984echo "$as_me:3984: checking for $ac_word" >&5
3985echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3986if test "${ac_cv_path_LIBTOOL+set}" = set; then
3987  echo $ECHO_N "(cached) $ECHO_C" >&6
3988else
3989  case $LIBTOOL in
3990  [\\/]* | ?:[\\/]*)
3991  ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
3992  ;;
3993  *)
3994  ac_save_IFS=$IFS; IFS=$ac_path_separator
3995ac_dummy="$PATH"
3996for ac_dir in $ac_dummy; do
3997  IFS=$ac_save_IFS
3998  test -z "$ac_dir" && ac_dir=.
3999  if $as_executable_p "$ac_dir/$ac_word"; then
4000   ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4001   echo "$as_me:4001: found $ac_dir/$ac_word" >&5
4002   break
4003fi
4004done
4005
4006  ;;
4007esac
4008fi
4009LIBTOOL=$ac_cv_path_LIBTOOL
4010
4011if test -n "$LIBTOOL"; then
4012  echo "$as_me:4012: result: $LIBTOOL" >&5
4013echo "${ECHO_T}$LIBTOOL" >&6
4014else
4015  echo "$as_me:4015: result: no" >&5
4016echo "${ECHO_T}no" >&6
4017fi
4018
4019 	fi
4020 	if test -z "$LIBTOOL" ; then
4021 		{ { echo "$as_me:4021: error: Cannot find libtool" >&5
4022echo "$as_me: error: Cannot find libtool" >&2;}
4023   { (exit 1); exit 1; }; }
4024 	fi
4025	LIB_CREATE='$(LIBTOOL) --mode=link $(CC) -rpath $(DESTDIR)$(libdir) -version-info `cut -f1 $(srcdir)/VERSION` -o'
4026	LIB_OBJECT='$(OBJECTS:.o=.lo)'
4027	LIB_SUFFIX=.la
4028	LIB_CLEAN='$(LIBTOOL) --mode=clean'
4029	LIB_COMPILE='$(LIBTOOL) --mode=compile'
4030	LIB_LINK='$(LIBTOOL) --mode=link'
4031	LIB_INSTALL='$(LIBTOOL) --mode=install'
4032	LIB_UNINSTALL='$(LIBTOOL) --mode=uninstall'
4033	LIB_PREP=:
4034
4035	# Show the version of libtool
4036	echo "$as_me:4036: checking version of libtool" >&5
4037echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4038
4039	# Save the version in a cache variable - this is not entirely a good
4040	# thing, but the version string from libtool is very ugly, and for
4041	# bug reports it might be useful to have the original string.
4042	cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
4043	echo "$as_me:4043: result: $cf_cv_libtool_version" >&5
4044echo "${ECHO_T}$cf_cv_libtool_version" >&6
4045	if test -z "$cf_cv_libtool_version" ; then
4046		{ { echo "$as_me:4046: error: This is not libtool" >&5
4047echo "$as_me: error: This is not libtool" >&2;}
4048   { (exit 1); exit 1; }; }
4049	fi
4050
4051	# special hack to add --tag option for C++ compiler
4052	case $cf_cv_libtool_version in
4053	1.[5-9]*|[2-9]*)
4054		LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4055		;;
4056	*)
4057		LIBTOOL_CXX="$LIBTOOL"
4058		;;
4059	esac
4060else
4061	LIBTOOL=""
4062	LIBTOOL_CXX=""
4063fi
4064
4065test -z "$LIBTOOL" && ECHO_LT=
4066
4067if test "$with_libtool" != "no" ; then
4068
4069cf_list_models="$cf_list_models libtool"
4070
4071else
4072
4073echo "$as_me:4073: checking if you want to build shared libraries" >&5
4074echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4075
4076# Check whether --with-shared or --without-shared was given.
4077if test "${with_shared+set}" = set; then
4078  withval="$with_shared"
4079  with_shared=$withval
4080else
4081  with_shared=no
4082fi;
4083echo "$as_me:4083: result: $with_shared" >&5
4084echo "${ECHO_T}$with_shared" >&6
4085test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4086
4087echo "$as_me:4087: checking if you want to build static libraries" >&5
4088echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4089
4090# Check whether --with-normal or --without-normal was given.
4091if test "${with_normal+set}" = set; then
4092  withval="$with_normal"
4093  with_normal=$withval
4094else
4095  with_normal=yes
4096fi;
4097echo "$as_me:4097: result: $with_normal" >&5
4098echo "${ECHO_T}$with_normal" >&6
4099test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4100
4101echo "$as_me:4101: checking if you want to build debug libraries" >&5
4102echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4103
4104# Check whether --with-debug or --without-debug was given.
4105if test "${with_debug+set}" = set; then
4106  withval="$with_debug"
4107  with_debug=$withval
4108else
4109  with_debug=yes
4110fi;
4111echo "$as_me:4111: result: $with_debug" >&5
4112echo "${ECHO_T}$with_debug" >&6
4113test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4114
4115echo "$as_me:4115: checking if you want to build profiling libraries" >&5
4116echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4117
4118# Check whether --with-profile or --without-profile was given.
4119if test "${with_profile+set}" = set; then
4120  withval="$with_profile"
4121  with_profile=$withval
4122else
4123  with_profile=no
4124fi;
4125echo "$as_me:4125: result: $with_profile" >&5
4126echo "${ECHO_T}$with_profile" >&6
4127test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4128
4129fi
4130
4131###############################################################################
4132
4133echo "$as_me:4133: checking for specified models" >&5
4134echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4135test -z "$cf_list_models" && cf_list_models=normal
4136test "$with_libtool" != "no" && cf_list_models=libtool
4137echo "$as_me:4137: result: $cf_list_models" >&5
4138echo "${ECHO_T}$cf_list_models" >&6
4139
4140### Use the first model as the default, and save its suffix for use in building
4141### up test-applications.
4142echo "$as_me:4142: checking for default model" >&5
4143echo $ECHO_N "checking for default model... $ECHO_C" >&6
4144DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4145echo "$as_me:4145: result: $DFT_LWR_MODEL" >&5
4146echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4147
4148DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4149
4150TINFO_NAME=tinfo
4151
4152LIB_NAME=ncurses
4153
4154LIB_DIR=../lib
4155LIB_2ND=../../lib
4156
4157	case $cf_cv_system_name in
4158	OS/2*)	LIB_PREFIX=''     ;;
4159	os2*)	LIB_PREFIX=''     ;;
4160	*)	LIB_PREFIX='lib'  ;;
4161	esac
4162cf_prefix=$LIB_PREFIX
4163
4164LIB_PREFIX=$cf_prefix
4165
4166LIB_SUFFIX=
4167
4168###############################################################################
4169
4170echo "$as_me:4170: checking if you want to build a separate terminfo library" >&5
4171echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4172
4173# Check whether --with-termlib or --without-termlib was given.
4174if test "${with_termlib+set}" = set; then
4175  withval="$with_termlib"
4176  with_termlib=$withval
4177else
4178  with_termlib=no
4179fi;
4180echo "$as_me:4180: result: $with_termlib" >&5
4181echo "${ECHO_T}$with_termlib" >&6
4182
4183### Checks for special libraries, must be done up-front.
4184
4185echo "$as_me:4185: checking if you want to link with dbmalloc for testing" >&5
4186echo $ECHO_N "checking if you want to link with dbmalloc for testing... $ECHO_C" >&6
4187
4188# Check whether --with-dbmalloc or --without-dbmalloc was given.
4189if test "${with_dbmalloc+set}" = set; then
4190  withval="$with_dbmalloc"
4191  with_dbmalloc=$withval
4192else
4193  with_dbmalloc=no
4194fi;
4195echo "$as_me:4195: result: $with_dbmalloc" >&5
4196echo "${ECHO_T}$with_dbmalloc" >&6
4197if test "$with_dbmalloc" = yes ; then
4198	echo "$as_me:4198: checking for dbmalloc.h" >&5
4199echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4200if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4201  echo $ECHO_N "(cached) $ECHO_C" >&6
4202else
4203  cat >conftest.$ac_ext <<_ACEOF
4204#line 4204 "configure"
4205#include "confdefs.h"
4206#include <dbmalloc.h>
4207_ACEOF
4208if { (eval echo "$as_me:4208: \"$ac_cpp conftest.$ac_ext\"") >&5
4209  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4210  ac_status=$?
4211  egrep -v '^ *\+' conftest.er1 >conftest.err
4212  rm -f conftest.er1
4213  cat conftest.err >&5
4214  echo "$as_me:4214: \$? = $ac_status" >&5
4215  (exit $ac_status); } >/dev/null; then
4216  if test -s conftest.err; then
4217    ac_cpp_err=$ac_c_preproc_warn_flag
4218  else
4219    ac_cpp_err=
4220  fi
4221else
4222  ac_cpp_err=yes
4223fi
4224if test -z "$ac_cpp_err"; then
4225  ac_cv_header_dbmalloc_h=yes
4226else
4227  echo "$as_me: failed program was:" >&5
4228  cat conftest.$ac_ext >&5
4229  ac_cv_header_dbmalloc_h=no
4230fi
4231rm -f conftest.err conftest.$ac_ext
4232fi
4233echo "$as_me:4233: result: $ac_cv_header_dbmalloc_h" >&5
4234echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4235if test $ac_cv_header_dbmalloc_h = yes; then
4236
4237echo "$as_me:4237: checking for debug_malloc in -ldbmalloc" >&5
4238echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4239if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4240  echo $ECHO_N "(cached) $ECHO_C" >&6
4241else
4242  ac_check_lib_save_LIBS=$LIBS
4243LIBS="-ldbmalloc  $LIBS"
4244cat >conftest.$ac_ext <<_ACEOF
4245#line 4245 "configure"
4246#include "confdefs.h"
4247
4248/* Override any gcc2 internal prototype to avoid an error.  */
4249#ifdef __cplusplus
4250extern "C"
4251#endif
4252/* We use char because int might match the return type of a gcc2
4253   builtin and then its argument prototype would still apply.  */
4254char debug_malloc ();
4255int
4256main ()
4257{
4258debug_malloc ();
4259  ;
4260  return 0;
4261}
4262_ACEOF
4263rm -f conftest.$ac_objext conftest$ac_exeext
4264if { (eval echo "$as_me:4264: \"$ac_link\"") >&5
4265  (eval $ac_link) 2>&5
4266  ac_status=$?
4267  echo "$as_me:4267: \$? = $ac_status" >&5
4268  (exit $ac_status); } &&
4269         { ac_try='test -s conftest$ac_exeext'
4270  { (eval echo "$as_me:4270: \"$ac_try\"") >&5
4271  (eval $ac_try) 2>&5
4272  ac_status=$?
4273  echo "$as_me:4273: \$? = $ac_status" >&5
4274  (exit $ac_status); }; }; then
4275  ac_cv_lib_dbmalloc_debug_malloc=yes
4276else
4277  echo "$as_me: failed program was:" >&5
4278cat conftest.$ac_ext >&5
4279ac_cv_lib_dbmalloc_debug_malloc=no
4280fi
4281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4282LIBS=$ac_check_lib_save_LIBS
4283fi
4284echo "$as_me:4284: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4285echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4286if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4287  cat >>confdefs.h <<EOF
4288#define HAVE_LIBDBMALLOC 1
4289EOF
4290
4291  LIBS="-ldbmalloc $LIBS"
4292
4293fi
4294
4295fi
4296
4297fi
4298
4299echo "$as_me:4299: checking if you want to link with dmalloc for testing" >&5
4300echo $ECHO_N "checking if you want to link with dmalloc for testing... $ECHO_C" >&6
4301
4302# Check whether --with-dmalloc or --without-dmalloc was given.
4303if test "${with_dmalloc+set}" = set; then
4304  withval="$with_dmalloc"
4305  with_dmalloc=$withval
4306else
4307  with_dmalloc=no
4308fi;
4309echo "$as_me:4309: result: $with_dmalloc" >&5
4310echo "${ECHO_T}$with_dmalloc" >&6
4311if test "$with_dmalloc" = yes ; then
4312	echo "$as_me:4312: checking for dmalloc.h" >&5
4313echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4314if test "${ac_cv_header_dmalloc_h+set}" = set; then
4315  echo $ECHO_N "(cached) $ECHO_C" >&6
4316else
4317  cat >conftest.$ac_ext <<_ACEOF
4318#line 4318 "configure"
4319#include "confdefs.h"
4320#include <dmalloc.h>
4321_ACEOF
4322if { (eval echo "$as_me:4322: \"$ac_cpp conftest.$ac_ext\"") >&5
4323  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4324  ac_status=$?
4325  egrep -v '^ *\+' conftest.er1 >conftest.err
4326  rm -f conftest.er1
4327  cat conftest.err >&5
4328  echo "$as_me:4328: \$? = $ac_status" >&5
4329  (exit $ac_status); } >/dev/null; then
4330  if test -s conftest.err; then
4331    ac_cpp_err=$ac_c_preproc_warn_flag
4332  else
4333    ac_cpp_err=
4334  fi
4335else
4336  ac_cpp_err=yes
4337fi
4338if test -z "$ac_cpp_err"; then
4339  ac_cv_header_dmalloc_h=yes
4340else
4341  echo "$as_me: failed program was:" >&5
4342  cat conftest.$ac_ext >&5
4343  ac_cv_header_dmalloc_h=no
4344fi
4345rm -f conftest.err conftest.$ac_ext
4346fi
4347echo "$as_me:4347: result: $ac_cv_header_dmalloc_h" >&5
4348echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4349if test $ac_cv_header_dmalloc_h = yes; then
4350
4351echo "$as_me:4351: checking for dmalloc_debug in -ldmalloc" >&5
4352echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4353if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4354  echo $ECHO_N "(cached) $ECHO_C" >&6
4355else
4356  ac_check_lib_save_LIBS=$LIBS
4357LIBS="-ldmalloc  $LIBS"
4358cat >conftest.$ac_ext <<_ACEOF
4359#line 4359 "configure"
4360#include "confdefs.h"
4361
4362/* Override any gcc2 internal prototype to avoid an error.  */
4363#ifdef __cplusplus
4364extern "C"
4365#endif
4366/* We use char because int might match the return type of a gcc2
4367   builtin and then its argument prototype would still apply.  */
4368char dmalloc_debug ();
4369int
4370main ()
4371{
4372dmalloc_debug ();
4373  ;
4374  return 0;
4375}
4376_ACEOF
4377rm -f conftest.$ac_objext conftest$ac_exeext
4378if { (eval echo "$as_me:4378: \"$ac_link\"") >&5
4379  (eval $ac_link) 2>&5
4380  ac_status=$?
4381  echo "$as_me:4381: \$? = $ac_status" >&5
4382  (exit $ac_status); } &&
4383         { ac_try='test -s conftest$ac_exeext'
4384  { (eval echo "$as_me:4384: \"$ac_try\"") >&5
4385  (eval $ac_try) 2>&5
4386  ac_status=$?
4387  echo "$as_me:4387: \$? = $ac_status" >&5
4388  (exit $ac_status); }; }; then
4389  ac_cv_lib_dmalloc_dmalloc_debug=yes
4390else
4391  echo "$as_me: failed program was:" >&5
4392cat conftest.$ac_ext >&5
4393ac_cv_lib_dmalloc_dmalloc_debug=no
4394fi
4395rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4396LIBS=$ac_check_lib_save_LIBS
4397fi
4398echo "$as_me:4398: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4399echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4400if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4401  cat >>confdefs.h <<EOF
4402#define HAVE_LIBDMALLOC 1
4403EOF
4404
4405  LIBS="-ldmalloc $LIBS"
4406
4407fi
4408
4409fi
4410
4411fi
4412
4413SHLIB_LIST=""
4414
4415echo "$as_me:4415: checking if you want to link with the GPM mouse library" >&5
4416echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4417
4418# Check whether --with-gpm or --without-gpm was given.
4419if test "${with_gpm+set}" = set; then
4420  withval="$with_gpm"
4421  with_gpm=$withval
4422else
4423  with_gpm=maybe
4424fi;
4425echo "$as_me:4425: result: $with_gpm" >&5
4426echo "${ECHO_T}$with_gpm" >&6
4427if test "$with_gpm" != no ; then
4428	echo "$as_me:4428: checking for Gpm_Open in -lgpm" >&5
4429echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4430if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4431  echo $ECHO_N "(cached) $ECHO_C" >&6
4432else
4433  ac_check_lib_save_LIBS=$LIBS
4434LIBS="-lgpm  $LIBS"
4435cat >conftest.$ac_ext <<_ACEOF
4436#line 4436 "configure"
4437#include "confdefs.h"
4438
4439/* Override any gcc2 internal prototype to avoid an error.  */
4440#ifdef __cplusplus
4441extern "C"
4442#endif
4443/* We use char because int might match the return type of a gcc2
4444   builtin and then its argument prototype would still apply.  */
4445char Gpm_Open ();
4446int
4447main ()
4448{
4449Gpm_Open ();
4450  ;
4451  return 0;
4452}
4453_ACEOF
4454rm -f conftest.$ac_objext conftest$ac_exeext
4455if { (eval echo "$as_me:4455: \"$ac_link\"") >&5
4456  (eval $ac_link) 2>&5
4457  ac_status=$?
4458  echo "$as_me:4458: \$? = $ac_status" >&5
4459  (exit $ac_status); } &&
4460         { ac_try='test -s conftest$ac_exeext'
4461  { (eval echo "$as_me:4461: \"$ac_try\"") >&5
4462  (eval $ac_try) 2>&5
4463  ac_status=$?
4464  echo "$as_me:4464: \$? = $ac_status" >&5
4465  (exit $ac_status); }; }; then
4466  ac_cv_lib_gpm_Gpm_Open=yes
4467else
4468  echo "$as_me: failed program was:" >&5
4469cat conftest.$ac_ext >&5
4470ac_cv_lib_gpm_Gpm_Open=no
4471fi
4472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4473LIBS=$ac_check_lib_save_LIBS
4474fi
4475echo "$as_me:4475: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4476echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4477if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4478
4479		echo "$as_me:4479: checking for gpm.h" >&5
4480echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4481if test "${ac_cv_header_gpm_h+set}" = set; then
4482  echo $ECHO_N "(cached) $ECHO_C" >&6
4483else
4484  cat >conftest.$ac_ext <<_ACEOF
4485#line 4485 "configure"
4486#include "confdefs.h"
4487#include <gpm.h>
4488_ACEOF
4489if { (eval echo "$as_me:4489: \"$ac_cpp conftest.$ac_ext\"") >&5
4490  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4491  ac_status=$?
4492  egrep -v '^ *\+' conftest.er1 >conftest.err
4493  rm -f conftest.er1
4494  cat conftest.err >&5
4495  echo "$as_me:4495: \$? = $ac_status" >&5
4496  (exit $ac_status); } >/dev/null; then
4497  if test -s conftest.err; then
4498    ac_cpp_err=$ac_c_preproc_warn_flag
4499  else
4500    ac_cpp_err=
4501  fi
4502else
4503  ac_cpp_err=yes
4504fi
4505if test -z "$ac_cpp_err"; then
4506  ac_cv_header_gpm_h=yes
4507else
4508  echo "$as_me: failed program was:" >&5
4509  cat conftest.$ac_ext >&5
4510  ac_cv_header_gpm_h=no
4511fi
4512rm -f conftest.err conftest.$ac_ext
4513fi
4514echo "$as_me:4514: result: $ac_cv_header_gpm_h" >&5
4515echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4516if test $ac_cv_header_gpm_h = yes; then
4517
4518			cat >>confdefs.h <<\EOF
4519#define HAVE_GPM_H 1
4520EOF
4521
4522			with_gpm=yes
4523
4524else
4525
4526			if test "$with_gpm" = yes ; then
4527				{ { echo "$as_me:4527: error: Cannot find GPM header" >&5
4528echo "$as_me: error: Cannot find GPM header" >&2;}
4529   { (exit 1); exit 1; }; }
4530			fi
4531
4532fi
4533
4534else
4535
4536		if test "$with_gpm" = yes ; then
4537			{ { echo "$as_me:4537: error: Cannot link with GPM library" >&5
4538echo "$as_me: error: Cannot link with GPM library" >&2;}
4539   { (exit 1); exit 1; }; }
4540		fi
4541		with_gpm=no
4542
4543fi
4544
4545fi
4546
4547if test "$with_gpm" = yes ; then
4548
4549cf_have_dlsym=no
4550echo "$as_me:4550: checking for dlsym" >&5
4551echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4552if test "${ac_cv_func_dlsym+set}" = set; then
4553  echo $ECHO_N "(cached) $ECHO_C" >&6
4554else
4555  cat >conftest.$ac_ext <<_ACEOF
4556#line 4556 "configure"
4557#include "confdefs.h"
4558/* System header to define __stub macros and hopefully few prototypes,
4559    which can conflict with char dlsym (); below.  */
4560#include <assert.h>
4561/* Override any gcc2 internal prototype to avoid an error.  */
4562#ifdef __cplusplus
4563extern "C"
4564#endif
4565/* We use char because int might match the return type of a gcc2
4566   builtin and then its argument prototype would still apply.  */
4567char dlsym ();
4568char (*f) ();
4569
4570int
4571main ()
4572{
4573/* The GNU C library defines this for functions which it implements
4574    to always fail with ENOSYS.  Some functions are actually named
4575    something starting with __ and the normal name is an alias.  */
4576#if defined (__stub_dlsym) || defined (__stub___dlsym)
4577choke me
4578#else
4579f = dlsym;
4580#endif
4581
4582  ;
4583  return 0;
4584}
4585_ACEOF
4586rm -f conftest.$ac_objext conftest$ac_exeext
4587if { (eval echo "$as_me:4587: \"$ac_link\"") >&5
4588  (eval $ac_link) 2>&5
4589  ac_status=$?
4590  echo "$as_me:4590: \$? = $ac_status" >&5
4591  (exit $ac_status); } &&
4592         { ac_try='test -s conftest$ac_exeext'
4593  { (eval echo "$as_me:4593: \"$ac_try\"") >&5
4594  (eval $ac_try) 2>&5
4595  ac_status=$?
4596  echo "$as_me:4596: \$? = $ac_status" >&5
4597  (exit $ac_status); }; }; then
4598  ac_cv_func_dlsym=yes
4599else
4600  echo "$as_me: failed program was:" >&5
4601cat conftest.$ac_ext >&5
4602ac_cv_func_dlsym=no
4603fi
4604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4605fi
4606echo "$as_me:4606: result: $ac_cv_func_dlsym" >&5
4607echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4608if test $ac_cv_func_dlsym = yes; then
4609  cf_have_dlsym=yes
4610else
4611
4612cf_have_libdl=no
4613echo "$as_me:4613: checking for dlsym in -ldl" >&5
4614echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4615if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4616  echo $ECHO_N "(cached) $ECHO_C" >&6
4617else
4618  ac_check_lib_save_LIBS=$LIBS
4619LIBS="-ldl  $LIBS"
4620cat >conftest.$ac_ext <<_ACEOF
4621#line 4621 "configure"
4622#include "confdefs.h"
4623
4624/* Override any gcc2 internal prototype to avoid an error.  */
4625#ifdef __cplusplus
4626extern "C"
4627#endif
4628/* We use char because int might match the return type of a gcc2
4629   builtin and then its argument prototype would still apply.  */
4630char dlsym ();
4631int
4632main ()
4633{
4634dlsym ();
4635  ;
4636  return 0;
4637}
4638_ACEOF
4639rm -f conftest.$ac_objext conftest$ac_exeext
4640if { (eval echo "$as_me:4640: \"$ac_link\"") >&5
4641  (eval $ac_link) 2>&5
4642  ac_status=$?
4643  echo "$as_me:4643: \$? = $ac_status" >&5
4644  (exit $ac_status); } &&
4645         { ac_try='test -s conftest$ac_exeext'
4646  { (eval echo "$as_me:4646: \"$ac_try\"") >&5
4647  (eval $ac_try) 2>&5
4648  ac_status=$?
4649  echo "$as_me:4649: \$? = $ac_status" >&5
4650  (exit $ac_status); }; }; then
4651  ac_cv_lib_dl_dlsym=yes
4652else
4653  echo "$as_me: failed program was:" >&5
4654cat conftest.$ac_ext >&5
4655ac_cv_lib_dl_dlsym=no
4656fi
4657rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4658LIBS=$ac_check_lib_save_LIBS
4659fi
4660echo "$as_me:4660: result: $ac_cv_lib_dl_dlsym" >&5
4661echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4662if test $ac_cv_lib_dl_dlsym = yes; then
4663
4664	cf_have_dlsym=yes
4665	cf_have_libdl=yes
4666fi
4667
4668fi
4669
4670if test "$cf_have_dlsym" = yes ; then
4671	test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4672
4673	echo "$as_me:4673: checking whether able to link to dl*() functions" >&5
4674echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4675	cat >conftest.$ac_ext <<_ACEOF
4676#line 4676 "configure"
4677#include "confdefs.h"
4678#include <dlfcn.h>
4679int
4680main ()
4681{
4682
4683		void *obj;
4684		if ((obj = dlopen("filename", 0)) != 0) {
4685			if (dlsym(obj, "symbolname") == 0) {
4686			dlclose(obj);
4687			}
4688		}
4689  ;
4690  return 0;
4691}
4692_ACEOF
4693rm -f conftest.$ac_objext conftest$ac_exeext
4694if { (eval echo "$as_me:4694: \"$ac_link\"") >&5
4695  (eval $ac_link) 2>&5
4696  ac_status=$?
4697  echo "$as_me:4697: \$? = $ac_status" >&5
4698  (exit $ac_status); } &&
4699         { ac_try='test -s conftest$ac_exeext'
4700  { (eval echo "$as_me:4700: \"$ac_try\"") >&5
4701  (eval $ac_try) 2>&5
4702  ac_status=$?
4703  echo "$as_me:4703: \$? = $ac_status" >&5
4704  (exit $ac_status); }; }; then
4705
4706		cat >>confdefs.h <<\EOF
4707#define HAVE_LIBDL 1
4708EOF
4709
4710else
4711  echo "$as_me: failed program was:" >&5
4712cat conftest.$ac_ext >&5
4713
4714		{ { echo "$as_me:4714: error: Cannot link test program for libdl" >&5
4715echo "$as_me: error: Cannot link test program for libdl" >&2;}
4716   { (exit 1); exit 1; }; }
4717fi
4718rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4719	echo "$as_me:4719: result: ok" >&5
4720echo "${ECHO_T}ok" >&6
4721else
4722	{ { echo "$as_me:4722: error: Cannot find dlsym function" >&5
4723echo "$as_me: error: Cannot find dlsym function" >&2;}
4724   { (exit 1); exit 1; }; }
4725fi
4726
4727echo "$as_me:4727: checking for soname of gpm library" >&5
4728echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4729if test "${cf_cv_gpm_soname+set}" = set; then
4730  echo $ECHO_N "(cached) $ECHO_C" >&6
4731else
4732
4733cf_cv_gpm_soname=unknown
4734if test "$cross_compiling" != yes ; then
4735cat >conftest.$ac_ext <<CF_EOF
4736#include <gpm.h>
4737int main()
4738{
4739if (Gpm_Open(0,0)) Gpm_Close();
4740return 0;
4741}
4742CF_EOF
4743cf_save_LIBS="$LIBS"
4744	LIBS="-lgpm $LIBS"
4745	if { (eval echo "$as_me:4745: \"$ac_compile\"") >&5
4746  (eval $ac_compile) 2>&5
4747  ac_status=$?
4748  echo "$as_me:4748: \$? = $ac_status" >&5
4749  (exit $ac_status); } ; then
4750		if { (eval echo "$as_me:4750: \"$ac_link\"") >&5
4751  (eval $ac_link) 2>&5
4752  ac_status=$?
4753  echo "$as_me:4753: \$? = $ac_status" >&5
4754  (exit $ac_status); } ; then
4755			cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4756			test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4757		fi
4758	fi
4759rm -f conftest*
4760LIBS="$cf_save_LIBS"
4761fi
4762
4763fi
4764echo "$as_me:4764: result: $cf_cv_gpm_soname" >&5
4765echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4766
4767	test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4768#define LIBGPM_SONAME "$cf_cv_gpm_soname"
4769EOF
4770
4771	SHLIB_LIST="-ldl $SHLIB_LIST"
4772	cat >>confdefs.h <<\EOF
4773#define HAVE_LIBGPM 1
4774EOF
4775
4776	echo "$as_me:4776: checking for Gpm_Wgetch in -lgpm" >&5
4777echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4778if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4779  echo $ECHO_N "(cached) $ECHO_C" >&6
4780else
4781  ac_check_lib_save_LIBS=$LIBS
4782LIBS="-lgpm  $LIBS"
4783cat >conftest.$ac_ext <<_ACEOF
4784#line 4784 "configure"
4785#include "confdefs.h"
4786
4787/* Override any gcc2 internal prototype to avoid an error.  */
4788#ifdef __cplusplus
4789extern "C"
4790#endif
4791/* We use char because int might match the return type of a gcc2
4792   builtin and then its argument prototype would still apply.  */
4793char Gpm_Wgetch ();
4794int
4795main ()
4796{
4797Gpm_Wgetch ();
4798  ;
4799  return 0;
4800}
4801_ACEOF
4802rm -f conftest.$ac_objext conftest$ac_exeext
4803if { (eval echo "$as_me:4803: \"$ac_link\"") >&5
4804  (eval $ac_link) 2>&5
4805  ac_status=$?
4806  echo "$as_me:4806: \$? = $ac_status" >&5
4807  (exit $ac_status); } &&
4808         { ac_try='test -s conftest$ac_exeext'
4809  { (eval echo "$as_me:4809: \"$ac_try\"") >&5
4810  (eval $ac_try) 2>&5
4811  ac_status=$?
4812  echo "$as_me:4812: \$? = $ac_status" >&5
4813  (exit $ac_status); }; }; then
4814  ac_cv_lib_gpm_Gpm_Wgetch=yes
4815else
4816  echo "$as_me: failed program was:" >&5
4817cat conftest.$ac_ext >&5
4818ac_cv_lib_gpm_Gpm_Wgetch=no
4819fi
4820rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4821LIBS=$ac_check_lib_save_LIBS
4822fi
4823echo "$as_me:4823: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4824echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4825if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4826
4827		{ echo "$as_me:4827: WARNING: GPM library is already linked with curses - read the FAQ" >&5
4828echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
4829
4830fi
4831
4832fi
4833
4834# not everyone has "test -c"
4835if test -c /dev/sysmouse 2>/dev/null ; then
4836echo "$as_me:4836: checking if you want to use sysmouse" >&5
4837echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
4838
4839# Check whether --with-sysmouse or --without-sysmouse was given.
4840if test "${with_sysmouse+set}" = set; then
4841  withval="$with_sysmouse"
4842  cf_with_sysmouse=$withval
4843else
4844  cf_with_sysmouse=maybe
4845fi;
4846	if test "$cf_with_sysmouse" != no ; then
4847	cat >conftest.$ac_ext <<_ACEOF
4848#line 4848 "configure"
4849#include "confdefs.h"
4850
4851#include <osreldate.h>
4852#if (__FreeBSD_version >= 400017)
4853#include <sys/consio.h>
4854#include <sys/fbio.h>
4855#else
4856#include <machine/console.h>
4857#endif
4858
4859int
4860main ()
4861{
4862
4863	struct mouse_info the_mouse;
4864	ioctl(0, CONS_MOUSECTL, &the_mouse);
4865
4866  ;
4867  return 0;
4868}
4869_ACEOF
4870rm -f conftest.$ac_objext
4871if { (eval echo "$as_me:4871: \"$ac_compile\"") >&5
4872  (eval $ac_compile) 2>&5
4873  ac_status=$?
4874  echo "$as_me:4874: \$? = $ac_status" >&5
4875  (exit $ac_status); } &&
4876         { ac_try='test -s conftest.$ac_objext'
4877  { (eval echo "$as_me:4877: \"$ac_try\"") >&5
4878  (eval $ac_try) 2>&5
4879  ac_status=$?
4880  echo "$as_me:4880: \$? = $ac_status" >&5
4881  (exit $ac_status); }; }; then
4882  cf_with_sysmouse=yes
4883else
4884  echo "$as_me: failed program was:" >&5
4885cat conftest.$ac_ext >&5
4886cf_with_sysmouse=no
4887fi
4888rm -f conftest.$ac_objext conftest.$ac_ext
4889	fi
4890echo "$as_me:4890: result: $cf_with_sysmouse" >&5
4891echo "${ECHO_T}$cf_with_sysmouse" >&6
4892test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
4893#define USE_SYSMOUSE 1
4894EOF
4895
4896fi
4897
4898if test X"$CC_G_OPT" = X"" ; then
4899	CC_G_OPT='-g'
4900	test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
4901fi
4902
4903if test X"$CXX_G_OPT" = X"" ; then
4904	CXX_G_OPT='-g'
4905	test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
4906fi
4907
4908echo "$as_me:4908: checking for default loader flags" >&5
4909echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
4910case $DFT_LWR_MODEL in
4911libtool) LD_MODEL=''   ;;
4912normal)  LD_MODEL=''   ;;
4913debug)   LD_MODEL=$CC_G_OPT ;;
4914profile) LD_MODEL='-pg';;
4915shared)  LD_MODEL=''   ;;
4916esac
4917echo "$as_me:4917: result: $LD_MODEL" >&5
4918echo "${ECHO_T}$LD_MODEL" >&6
4919
4920echo "$as_me:4920: checking if rpath option should be used" >&5
4921echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
4922
4923# Check whether --enable-rpath or --disable-rpath was given.
4924if test "${enable_rpath+set}" = set; then
4925  enableval="$enable_rpath"
4926  cf_cv_ld_rpath=$enableval
4927else
4928  cf_cv_ld_rpath=no
4929fi;
4930echo "$as_me:4930: result: $cf_cv_ld_rpath" >&5
4931echo "${ECHO_T}$cf_cv_ld_rpath" >&6
4932
4933	LOCAL_LDFLAGS=
4934	LOCAL_LDFLAGS2=
4935	LD_SHARED_OPTS=
4936	INSTALL_LIB="-m 644"
4937
4938	cf_cv_do_symlinks=no
4939
4940	echo "$as_me:4940: checking if release/abi version should be used for shared libs" >&5
4941echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
4942
4943# Check whether --with-shlib-version or --without-shlib-version was given.
4944if test "${with_shlib_version+set}" = set; then
4945  withval="$with_shlib_version"
4946  test -z "$withval" && withval=auto
4947	case $withval in #(vi
4948	yes) #(vi
4949		cf_cv_shlib_version=auto
4950		;;
4951	rel|abi|auto|no) #(vi
4952		cf_cv_shlib_version=$withval
4953		;;
4954	*)
4955		{ { echo "$as_me:4955: error: option value must be one of: rel, abi, auto or no" >&5
4956echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
4957   { (exit 1); exit 1; }; }
4958		;;
4959	esac
4960
4961else
4962  cf_cv_shlib_version=auto
4963fi;
4964	echo "$as_me:4964: result: $cf_cv_shlib_version" >&5
4965echo "${ECHO_T}$cf_cv_shlib_version" >&6
4966
4967	cf_cv_rm_so_locs=no
4968
4969	# Some less-capable ports of gcc support only -fpic
4970	CC_SHARED_OPTS=
4971	if test "$GCC" = yes
4972	then
4973		echo "$as_me:4973: checking which $CC option to use" >&5
4974echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
4975		cf_save_CFLAGS="$CFLAGS"
4976		for CC_SHARED_OPTS in -fPIC -fpic ''
4977		do
4978			CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
4979			cat >conftest.$ac_ext <<_ACEOF
4980#line 4980 "configure"
4981#include "confdefs.h"
4982#include <stdio.h>
4983int
4984main ()
4985{
4986int x = 1
4987  ;
4988  return 0;
4989}
4990_ACEOF
4991rm -f conftest.$ac_objext
4992if { (eval echo "$as_me:4992: \"$ac_compile\"") >&5
4993  (eval $ac_compile) 2>&5
4994  ac_status=$?
4995  echo "$as_me:4995: \$? = $ac_status" >&5
4996  (exit $ac_status); } &&
4997         { ac_try='test -s conftest.$ac_objext'
4998  { (eval echo "$as_me:4998: \"$ac_try\"") >&5
4999  (eval $ac_try) 2>&5
5000  ac_status=$?
5001  echo "$as_me:5001: \$? = $ac_status" >&5
5002  (exit $ac_status); }; }; then
5003  break
5004else
5005  echo "$as_me: failed program was:" >&5
5006cat conftest.$ac_ext >&5
5007fi
5008rm -f conftest.$ac_objext conftest.$ac_ext
5009		done
5010		echo "$as_me:5010: result: $CC_SHARED_OPTS" >&5
5011echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5012		CFLAGS="$cf_save_CFLAGS"
5013	fi
5014
5015	cf_cv_shlib_version_infix=no
5016
5017	case $cf_cv_system_name in
5018	beos*)
5019		MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5020		;;
5021	cygwin*)
5022		CC_SHARED_OPTS=
5023		MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
5024		cf_cv_shlib_version=cygdll
5025		cf_cv_shlib_version_infix=cygdll
5026		;;
5027	darwin*)
5028		EXTRA_CFLAGS="-no-cpp-precomp"
5029		CC_SHARED_OPTS="-dynamic"
5030		MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
5031		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5032		cf_cv_shlib_version_infix=yes
5033		;;
5034	hpux*)
5035		# (tested with gcc 2.7.2 -- I don't have c89)
5036		if test "$GCC" = yes; then
5037			LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
5038		else
5039			CC_SHARED_OPTS='+Z'
5040			LD_SHARED_OPTS='-Wl,+b,$(libdir)'
5041		fi
5042		MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
5043		# HP-UX shared libraries must be executable, and should be
5044		# readonly to exploit a quirk in the memory manager.
5045		INSTALL_LIB="-m 555"
5046		;;
5047	irix*)
5048		if test "$cf_cv_ld_rpath" = yes ; then
5049			if test "$GCC" = yes; then
5050				cf_ld_rpath_opt="-Wl,-rpath,"
5051				EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
5052			else
5053				cf_ld_rpath_opt="-rpath "
5054				EXTRA_LDFLAGS="-rpath \$(libdir) $EXTRA_LDFLAGS"
5055			fi
5056		fi
5057		# tested with IRIX 5.2 and 'cc'.
5058		if test "$GCC" != yes; then
5059			CC_SHARED_OPTS='-KPIC'
5060		fi
5061		MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
5062		cf_cv_rm_so_locs=yes
5063		;;
5064	linux*|gnu*|k*bsd*-gnu)
5065		if test "$DFT_LWR_MODEL" = "shared" ; then
5066			LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5067			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5068		fi
5069		if test "$cf_cv_ld_rpath" = yes ; then
5070			cf_ld_rpath_opt="-Wl,-rpath,"
5071			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5072		fi
5073		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5074		MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
5075		;;
5076	openbsd2*)
5077		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5078		MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
5079		;;
5080	freebsd[45]*)
5081		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5082		MK_SHARED_LIB='$(LD) -Bshareable -soname=`basename $@` -o $@'
5083		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5084
5085# This doesn't work - I keep getting spurious references to needing
5086# libncurses.so.5.3 when ldd says it's resolved.  LOCAL_LDFLAGS2 seems to be
5087# no longer used anyway.  And the rpath logic isn't relative - so I have to
5088# add the local and install lib-directories:
5089#
5090#		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5091#			LOCAL_LDFLAGS="-rpath `pwd`/lib"
5092#			LOCAL_LDFLAGS2="-rpath \$(libdir) $LOCAL_LDFLAGS"
5093#			cf_ld_rpath_opt="-rpath "
5094#			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5095#		fi
5096		;;
5097	openbsd*|freebsd*)
5098		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5099		MK_SHARED_LIB='$(LD) -Bshareable -o $@'
5100		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5101		;;
5102	netbsd*)
5103		CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5104		test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
5105		if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5106			LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5107			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5108			EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
5109			MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5110			if test "$cf_cv_shlib_version" = auto; then
5111			if test ! -f /usr/libexec/ld.elf_so; then
5112				cf_cv_shlib_version=rel
5113			fi
5114			fi
5115		else
5116			MK_SHARED_LIB='$(LD) -Bshareable -o $@'
5117		fi
5118		;;
5119	osf*|mls+*)
5120		# tested with OSF/1 V3.2 and 'cc'
5121		# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5122		# link with shared libs).
5123		MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
5124		case $host_os in
5125		osf4*)
5126			MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5127			;;
5128		esac
5129		MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5130		if test "$DFT_LWR_MODEL" = "shared" ; then
5131			LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
5132			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5133		fi
5134		if test "$cf_cv_ld_rpath" = yes ; then
5135			cf_ld_rpath_opt="-rpath"
5136			# EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5137		fi
5138		cf_cv_rm_so_locs=yes
5139		;;
5140	sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5141		# tested with osr5.0.5
5142		if test "$GCC" != yes; then
5143			CC_SHARED_OPTS='-belf -KPIC'
5144		fi
5145		MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5146		if test "$cf_cv_ld_rpath" = yes ; then
5147			# only way is to set LD_RUN_PATH but no switch for it
5148			RUN_PATH=$libdir
5149		fi
5150		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5151		LINK_PROGS='LD_RUN_PATH=$(libdir)'
5152		LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5153		;;
5154	sunos4*)
5155		# tested with SunOS 4.1.1 and gcc 2.7.0
5156		if test "$GCC" != yes; then
5157			CC_SHARED_OPTS='-KPIC'
5158		fi
5159		MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
5160		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5161		;;
5162	solaris2*)
5163		# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5164		if test "$GCC" != yes; then
5165			CC_SHARED_OPTS='-KPIC'
5166		fi
5167		MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
5168		if test "$DFT_LWR_MODEL" = "shared" ; then
5169			LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
5170			LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5171		fi
5172		if test "$cf_cv_ld_rpath" = yes ; then
5173			cf_ld_rpath_opt="-R"
5174			EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5175		fi
5176		test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5177		;;
5178	sysv5uw7*|unix_sv*)
5179		# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5180		if test "$GCC" != yes; then
5181			CC_SHARED_OPTS='-KPIC'
5182		fi
5183		MK_SHARED_LIB='$(LD) -d y -G -o $@'
5184		;;
5185	*)
5186		CC_SHARED_OPTS='unknown'
5187		MK_SHARED_LIB='echo unknown'
5188		;;
5189	esac
5190
5191	# This works if the last tokens in $MK_SHARED_LIB are the -o target.
5192	case "$cf_cv_shlib_version" in #(vi
5193	rel|abi)
5194		case "$MK_SHARED_LIB" in #(vi
5195		*'-o $@')
5196			test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5197			;;
5198		*)
5199			{ echo "$as_me:5199: WARNING: ignored --with-shlib-version" >&5
5200echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5201			;;
5202		esac
5203		;;
5204	esac
5205
5206	if test -n "$cf_ld_rpath_opt" ; then
5207		echo "$as_me:5207: checking if we need a space after rpath option" >&5
5208echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5209		cf_save_LIBS="$LIBS"
5210		LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
5211		cat >conftest.$ac_ext <<_ACEOF
5212#line 5212 "configure"
5213#include "confdefs.h"
5214
5215int
5216main ()
5217{
5218
5219  ;
5220  return 0;
5221}
5222_ACEOF
5223rm -f conftest.$ac_objext conftest$ac_exeext
5224if { (eval echo "$as_me:5224: \"$ac_link\"") >&5
5225  (eval $ac_link) 2>&5
5226  ac_status=$?
5227  echo "$as_me:5227: \$? = $ac_status" >&5
5228  (exit $ac_status); } &&
5229         { ac_try='test -s conftest$ac_exeext'
5230  { (eval echo "$as_me:5230: \"$ac_try\"") >&5
5231  (eval $ac_try) 2>&5
5232  ac_status=$?
5233  echo "$as_me:5233: \$? = $ac_status" >&5
5234  (exit $ac_status); }; }; then
5235  cf_rpath_space=no
5236else
5237  echo "$as_me: failed program was:" >&5
5238cat conftest.$ac_ext >&5
5239cf_rpath_space=yes
5240fi
5241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5242		LIBS="$cf_save_LIBS"
5243		echo "$as_me:5243: result: $cf_rpath_space" >&5
5244echo "${ECHO_T}$cf_rpath_space" >&6
5245		test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
5246		MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
5247	fi
5248
5249if test "$CC_SHARED_OPTS" = "unknown"; then
5250	for model in $cf_list_models; do
5251		if test "$model" = "shared"; then
5252			{ { echo "$as_me:5252: error: Shared libraries are not supported in this version" >&5
5253echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5254   { (exit 1); exit 1; }; }
5255		fi
5256	done
5257fi
5258
5259###############################################################################
5260
5261###	use option --disable-overwrite to leave out the link to -lcurses
5262echo "$as_me:5262: checking if you wish to install ncurses overwriting curses" >&5
5263echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5264
5265# Check whether --enable-overwrite or --disable-overwrite was given.
5266if test "${enable_overwrite+set}" = set; then
5267  enableval="$enable_overwrite"
5268  with_overwrite=$enableval
5269else
5270  if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5271fi;
5272echo "$as_me:5272: result: $with_overwrite" >&5
5273echo "${ECHO_T}$with_overwrite" >&6
5274
5275echo "$as_me:5275: checking if external terminfo-database is used" >&5
5276echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5277
5278# Check whether --enable-database or --disable-database was given.
5279if test "${enable_database+set}" = set; then
5280  enableval="$enable_database"
5281  use_database=$enableval
5282else
5283  use_database=yes
5284fi;
5285echo "$as_me:5285: result: $use_database" >&5
5286echo "${ECHO_T}$use_database" >&6
5287
5288case $host_os in #(vi
5289os2*) #(vi
5290	TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5291	;;
5292*) #(vi
5293	TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5294	;;
5295esac
5296
5297	case $cf_cv_system_name in
5298	os2*)	PATHSEP=';'  ;;
5299	*)	PATHSEP=':'  ;;
5300	esac
5301
5302if test "$use_database" != no ; then
5303	cat >>confdefs.h <<\EOF
5304#define USE_DATABASE 1
5305EOF
5306
5307	echo "$as_me:5307: checking which terminfo source-file will be installed" >&5
5308echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5309
5310# Check whether --enable-database or --disable-database was given.
5311if test "${enable_database+set}" = set; then
5312  enableval="$enable_database"
5313  TERMINFO_SRC=$withval
5314fi;
5315	echo "$as_me:5315: result: $TERMINFO_SRC" >&5
5316echo "${ECHO_T}$TERMINFO_SRC" >&6
5317fi
5318
5319echo "$as_me:5319: checking for list of fallback descriptions" >&5
5320echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5321
5322# Check whether --with-fallbacks or --without-fallbacks was given.
5323if test "${with_fallbacks+set}" = set; then
5324  withval="$with_fallbacks"
5325  with_fallback=$withval
5326else
5327  with_fallback=
5328fi;
5329echo "$as_me:5329: result: $with_fallback" >&5
5330echo "${ECHO_T}$with_fallback" >&6
5331FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5332
5333echo "$as_me:5333: checking if you want modern xterm or antique" >&5
5334echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5335
5336# Check whether --with-xterm-new or --without-xterm-new was given.
5337if test "${with_xterm_new+set}" = set; then
5338  withval="$with_xterm_new"
5339  with_xterm_new=$withval
5340else
5341  with_xterm_new=yes
5342fi;
5343case $with_xterm_new in
5344no)	with_xterm_new=xterm-old;;
5345*)	with_xterm_new=xterm-new;;
5346esac
5347echo "$as_me:5347: result: $with_xterm_new" >&5
5348echo "${ECHO_T}$with_xterm_new" >&6
5349WHICH_XTERM=$with_xterm_new
5350
5351MAKE_TERMINFO=
5352if test "$use_database" = no ; then
5353	TERMINFO="${datadir}/terminfo"
5354	MAKE_TERMINFO="#"
5355else
5356
5357echo "$as_me:5357: checking for list of terminfo directories" >&5
5358echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5359
5360# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5361if test "${with_terminfo_dirs+set}" = set; then
5362  withval="$with_terminfo_dirs"
5363
5364else
5365  withval=${TERMINFO_DIRS-${datadir}/terminfo}
5366fi;
5367IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5368cf_dst_path=
5369for cf_src_path in $withval
5370do
5371
5372case ".$cf_src_path" in #(vi
5373.\$\(*\)*|.\'*\'*) #(vi
5374  ;;
5375..|./*|.\\*) #(vi
5376  ;;
5377.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5378  ;;
5379.\${*prefix}*) #(vi
5380  eval cf_src_path="$cf_src_path"
5381  case ".$cf_src_path" in #(vi
5382  .NONE/*)
5383    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5384    ;;
5385  esac
5386  ;; #(vi
5387.NONE/*)
5388  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5389  ;;
5390*)
5391  { { echo "$as_me:5391: error: expected a pathname, not \"$cf_src_path\"" >&5
5392echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5393   { (exit 1); exit 1; }; }
5394  ;;
5395esac
5396
5397  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5398  cf_dst_path="${cf_dst_path}${cf_src_path}"
5399done
5400IFS="$ac_save_ifs"
5401
5402eval 'TERMINFO_DIRS="$cf_dst_path"'
5403
5404echo "$as_me:5404: result: $TERMINFO_DIRS" >&5
5405echo "${ECHO_T}$TERMINFO_DIRS" >&6
5406test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5407#define TERMINFO_DIRS "$TERMINFO_DIRS"
5408EOF
5409
5410echo "$as_me:5410: checking for default terminfo directory" >&5
5411echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5412
5413# Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5414if test "${with_default_terminfo_dir+set}" = set; then
5415  withval="$with_default_terminfo_dir"
5416
5417else
5418  withval="${TERMINFO-${datadir}/terminfo}"
5419fi;
5420case ".$withval" in #(vi
5421.\$\(*\)*|.\'*\'*) #(vi
5422  ;;
5423..|./*|.\\*) #(vi
5424  ;;
5425.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5426  ;;
5427.\${*prefix}*) #(vi
5428  eval withval="$withval"
5429  case ".$withval" in #(vi
5430  .NONE/*)
5431    withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
5432    ;;
5433  esac
5434  ;; #(vi
5435.NONE/*)
5436  withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
5437  ;;
5438*)
5439  { { echo "$as_me:5439: error: expected a pathname, not \"$withval\"" >&5
5440echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5441   { (exit 1); exit 1; }; }
5442  ;;
5443esac
5444
5445eval TERMINFO="$withval"
5446
5447echo "$as_me:5447: result: $TERMINFO" >&5
5448echo "${ECHO_T}$TERMINFO" >&6
5449cat >>confdefs.h <<EOF
5450#define TERMINFO "$TERMINFO"
5451EOF
5452
5453fi
5454
5455###	use option --disable-big-core to make tic run on small machines
5456###	We need 4Mb, check if we can allocate 50% more than that.
5457echo "$as_me:5457: checking if big-core option selected" >&5
5458echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5459
5460# Check whether --enable-big-core or --disable-big-core was given.
5461if test "${enable_big_core+set}" = set; then
5462  enableval="$enable_big_core"
5463  with_big_core=$enableval
5464else
5465  if test "$cross_compiling" = yes; then
5466  with_big_core=no
5467else
5468  cat >conftest.$ac_ext <<_ACEOF
5469#line 5469 "configure"
5470#include "confdefs.h"
5471
5472#include <stdlib.h>
5473#include <string.h>
5474int main() {
5475	unsigned long n = 6000000L;
5476	char *s = malloc(n);
5477	if (s != 0)
5478		s[0] = s[n-1] = 0;
5479	exit(s == 0);
5480}
5481_ACEOF
5482rm -f conftest$ac_exeext
5483if { (eval echo "$as_me:5483: \"$ac_link\"") >&5
5484  (eval $ac_link) 2>&5
5485  ac_status=$?
5486  echo "$as_me:5486: \$? = $ac_status" >&5
5487  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5488  { (eval echo "$as_me:5488: \"$ac_try\"") >&5
5489  (eval $ac_try) 2>&5
5490  ac_status=$?
5491  echo "$as_me:5491: \$? = $ac_status" >&5
5492  (exit $ac_status); }; }; then
5493  with_big_core=yes
5494else
5495  echo "$as_me: program exited with status $ac_status" >&5
5496echo "$as_me: failed program was:" >&5
5497cat conftest.$ac_ext >&5
5498with_big_core=no
5499fi
5500rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5501fi
5502fi;
5503echo "$as_me:5503: result: $with_big_core" >&5
5504echo "${ECHO_T}$with_big_core" >&6
5505test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5506#define HAVE_BIG_CORE 1
5507EOF
5508
5509###	use option --enable-termcap to compile in the termcap fallback support
5510echo "$as_me:5510: checking if you want termcap-fallback support" >&5
5511echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5512
5513# Check whether --enable-termcap or --disable-termcap was given.
5514if test "${enable_termcap+set}" = set; then
5515  enableval="$enable_termcap"
5516  with_termcap=$enableval
5517else
5518  with_termcap=no
5519fi;
5520echo "$as_me:5520: result: $with_termcap" >&5
5521echo "${ECHO_T}$with_termcap" >&6
5522
5523if test "$with_termcap" != "yes" ; then
5524	if test "$use_database" = no ; then
5525		if test -z "$with_fallback" ; then
5526			{ { echo "$as_me:5526: error: You have disabled the database w/o specifying fallbacks" >&5
5527echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5528   { (exit 1); exit 1; }; }
5529		fi
5530	fi
5531	cat >>confdefs.h <<\EOF
5532#define PURE_TERMINFO 1
5533EOF
5534
5535else
5536
5537cat >>confdefs.h <<\EOF
5538#define USE_TERMCAP 1
5539EOF
5540
5541echo "$as_me:5541: checking for list of termcap files" >&5
5542echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5543
5544# Check whether --with-termpath or --without-termpath was given.
5545if test "${with_termpath+set}" = set; then
5546  withval="$with_termpath"
5547
5548else
5549  withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5550fi;
5551IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5552cf_dst_path=
5553for cf_src_path in $withval
5554do
5555
5556case ".$cf_src_path" in #(vi
5557.\$\(*\)*|.\'*\'*) #(vi
5558  ;;
5559..|./*|.\\*) #(vi
5560  ;;
5561.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5562  ;;
5563.\${*prefix}*) #(vi
5564  eval cf_src_path="$cf_src_path"
5565  case ".$cf_src_path" in #(vi
5566  .NONE/*)
5567    cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5568    ;;
5569  esac
5570  ;; #(vi
5571.NONE/*)
5572  cf_src_path=`echo $cf_src_path | sed -e s%NONE%$ac_default_prefix%`
5573  ;;
5574*)
5575  { { echo "$as_me:5575: error: expected a pathname, not \"$cf_src_path\"" >&5
5576echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5577   { (exit 1); exit 1; }; }
5578  ;;
5579esac
5580
5581  test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5582  cf_dst_path="${cf_dst_path}${cf_src_path}"
5583done
5584IFS="$ac_save_ifs"
5585
5586eval 'TERMPATH="$cf_dst_path"'
5587
5588echo "$as_me:5588: result: $TERMPATH" >&5
5589echo "${ECHO_T}$TERMPATH" >&6
5590test -n "$TERMPATH" && cat >>confdefs.h <<EOF
5591#define TERMPATH "$TERMPATH"
5592EOF
5593
5594###	use option --enable-getcap to use a hacked getcap for reading termcaps
5595echo "$as_me:5595: checking if fast termcap-loader is needed" >&5
5596echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
5597
5598# Check whether --enable-getcap or --disable-getcap was given.
5599if test "${enable_getcap+set}" = set; then
5600  enableval="$enable_getcap"
5601  with_getcap=$enableval
5602else
5603  with_getcap=no
5604fi;
5605echo "$as_me:5605: result: $with_getcap" >&5
5606echo "${ECHO_T}$with_getcap" >&6
5607test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
5608#define USE_GETCAP 1
5609EOF
5610
5611echo "$as_me:5611: checking if translated termcaps will be cached in ~/.terminfo" >&5
5612echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
5613
5614# Check whether --enable-getcap-cache or --disable-getcap-cache was given.
5615if test "${enable_getcap_cache+set}" = set; then
5616  enableval="$enable_getcap_cache"
5617  with_getcap_cache=$enableval
5618else
5619  with_getcap_cache=no
5620fi;
5621echo "$as_me:5621: result: $with_getcap_cache" >&5
5622echo "${ECHO_T}$with_getcap_cache" >&6
5623test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
5624#define USE_GETCAP_CACHE 1
5625EOF
5626
5627fi
5628
5629###   Use option --disable-home-terminfo to completely remove ~/.terminfo
5630echo "$as_me:5630: checking if ~/.terminfo is wanted" >&5
5631echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
5632
5633# Check whether --enable-home-terminfo or --disable-home-terminfo was given.
5634if test "${enable_home_terminfo+set}" = set; then
5635  enableval="$enable_home_terminfo"
5636  with_home_terminfo=$enableval
5637else
5638  with_home_terminfo=yes
5639fi;
5640echo "$as_me:5640: result: $with_home_terminfo" >&5
5641echo "${ECHO_T}$with_home_terminfo" >&6
5642test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
5643#define USE_HOME_TERMINFO 1
5644EOF
5645
5646echo "$as_me:5646: checking if you want to use restrict environment when running as root" >&5
5647echo $ECHO_N "checking if you want to use restrict environment when running as root... $ECHO_C" >&6
5648
5649# Check whether --enable-root-environ or --disable-root-environ was given.
5650if test "${enable_root_environ+set}" = set; then
5651  enableval="$enable_root_environ"
5652  with_root_environ=$enableval
5653else
5654  with_root_environ=yes
5655fi;
5656echo "$as_me:5656: result: $with_root_environ" >&5
5657echo "${ECHO_T}$with_root_environ" >&6
5658test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
5659#define USE_ROOT_ENVIRON 1
5660EOF
5661
5662###   Use option --enable-symlinks to make tic use symlinks, not hard links
5663###   to reduce storage requirements for the terminfo database.
5664
5665for ac_func in \
5666	remove \
5667	unlink
5668do
5669as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5670echo "$as_me:5670: checking for $ac_func" >&5
5671echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5672if eval "test \"\${$as_ac_var+set}\" = set"; then
5673  echo $ECHO_N "(cached) $ECHO_C" >&6
5674else
5675  cat >conftest.$ac_ext <<_ACEOF
5676#line 5676 "configure"
5677#include "confdefs.h"
5678/* System header to define __stub macros and hopefully few prototypes,
5679    which can conflict with char $ac_func (); below.  */
5680#include <assert.h>
5681/* Override any gcc2 internal prototype to avoid an error.  */
5682#ifdef __cplusplus
5683extern "C"
5684#endif
5685/* We use char because int might match the return type of a gcc2
5686   builtin and then its argument prototype would still apply.  */
5687char $ac_func ();
5688char (*f) ();
5689
5690int
5691main ()
5692{
5693/* The GNU C library defines this for functions which it implements
5694    to always fail with ENOSYS.  Some functions are actually named
5695    something starting with __ and the normal name is an alias.  */
5696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5697choke me
5698#else
5699f = $ac_func;
5700#endif
5701
5702  ;
5703  return 0;
5704}
5705_ACEOF
5706rm -f conftest.$ac_objext conftest$ac_exeext
5707if { (eval echo "$as_me:5707: \"$ac_link\"") >&5
5708  (eval $ac_link) 2>&5
5709  ac_status=$?
5710  echo "$as_me:5710: \$? = $ac_status" >&5
5711  (exit $ac_status); } &&
5712         { ac_try='test -s conftest$ac_exeext'
5713  { (eval echo "$as_me:5713: \"$ac_try\"") >&5
5714  (eval $ac_try) 2>&5
5715  ac_status=$?
5716  echo "$as_me:5716: \$? = $ac_status" >&5
5717  (exit $ac_status); }; }; then
5718  eval "$as_ac_var=yes"
5719else
5720  echo "$as_me: failed program was:" >&5
5721cat conftest.$ac_ext >&5
5722eval "$as_ac_var=no"
5723fi
5724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5725fi
5726echo "$as_me:5726: result: `eval echo '${'$as_ac_var'}'`" >&5
5727echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5728if test `eval echo '${'$as_ac_var'}'` = yes; then
5729  cat >>confdefs.h <<EOF
5730#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5731EOF
5732
5733fi
5734done
5735
5736if test "$cross_compiling" = yes ; then
5737
5738for ac_func in \
5739		link \
5740		symlink
5741do
5742as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5743echo "$as_me:5743: checking for $ac_func" >&5
5744echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5745if eval "test \"\${$as_ac_var+set}\" = set"; then
5746  echo $ECHO_N "(cached) $ECHO_C" >&6
5747else
5748  cat >conftest.$ac_ext <<_ACEOF
5749#line 5749 "configure"
5750#include "confdefs.h"
5751/* System header to define __stub macros and hopefully few prototypes,
5752    which can conflict with char $ac_func (); below.  */
5753#include <assert.h>
5754/* Override any gcc2 internal prototype to avoid an error.  */
5755#ifdef __cplusplus
5756extern "C"
5757#endif
5758/* We use char because int might match the return type of a gcc2
5759   builtin and then its argument prototype would still apply.  */
5760char $ac_func ();
5761char (*f) ();
5762
5763int
5764main ()
5765{
5766/* The GNU C library defines this for functions which it implements
5767    to always fail with ENOSYS.  Some functions are actually named
5768    something starting with __ and the normal name is an alias.  */
5769#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5770choke me
5771#else
5772f = $ac_func;
5773#endif
5774
5775  ;
5776  return 0;
5777}
5778_ACEOF
5779rm -f conftest.$ac_objext conftest$ac_exeext
5780if { (eval echo "$as_me:5780: \"$ac_link\"") >&5
5781  (eval $ac_link) 2>&5
5782  ac_status=$?
5783  echo "$as_me:5783: \$? = $ac_status" >&5
5784  (exit $ac_status); } &&
5785         { ac_try='test -s conftest$ac_exeext'
5786  { (eval echo "$as_me:5786: \"$ac_try\"") >&5
5787  (eval $ac_try) 2>&5
5788  ac_status=$?
5789  echo "$as_me:5789: \$? = $ac_status" >&5
5790  (exit $ac_status); }; }; then
5791  eval "$as_ac_var=yes"
5792else
5793  echo "$as_me: failed program was:" >&5
5794cat conftest.$ac_ext >&5
5795eval "$as_ac_var=no"
5796fi
5797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5798fi
5799echo "$as_me:5799: result: `eval echo '${'$as_ac_var'}'`" >&5
5800echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5801if test `eval echo '${'$as_ac_var'}'` = yes; then
5802  cat >>confdefs.h <<EOF
5803#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5804EOF
5805
5806fi
5807done
5808
5809else
5810	echo "$as_me:5810: checking if link/symlink functions work" >&5
5811echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
5812if test "${cf_cv_link_funcs+set}" = set; then
5813  echo $ECHO_N "(cached) $ECHO_C" >&6
5814else
5815
5816		cf_cv_link_funcs=
5817		for cf_func in link symlink ; do
5818			if test "$cross_compiling" = yes; then
5819
5820			eval 'ac_cv_func_'$cf_func'=error'
5821else
5822  cat >conftest.$ac_ext <<_ACEOF
5823#line 5823 "configure"
5824#include "confdefs.h"
5825
5826#include <sys/types.h>
5827#include <sys/stat.h>
5828#ifdef HAVE_UNISTD_H
5829#include <unistd.h>
5830#endif
5831int main()
5832{
5833	int fail = 0;
5834	char *src = "config.log";
5835	char *dst = "conftest.chk";
5836	struct stat src_sb;
5837	struct stat dst_sb;
5838
5839	stat(src, &src_sb);
5840	fail = ($cf_func("config.log", "conftest.chk") < 0)
5841	    || (stat(dst, &dst_sb) < 0)
5842	    || (dst_sb.st_mtime != src_sb.st_mtime);
5843#ifdef HAVE_UNLINK
5844	unlink(dst);
5845#else
5846	remove(dst);
5847#endif
5848	exit (fail);
5849}
5850
5851_ACEOF
5852rm -f conftest$ac_exeext
5853if { (eval echo "$as_me:5853: \"$ac_link\"") >&5
5854  (eval $ac_link) 2>&5
5855  ac_status=$?
5856  echo "$as_me:5856: \$? = $ac_status" >&5
5857  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5858  { (eval echo "$as_me:5858: \"$ac_try\"") >&5
5859  (eval $ac_try) 2>&5
5860  ac_status=$?
5861  echo "$as_me:5861: \$? = $ac_status" >&5
5862  (exit $ac_status); }; }; then
5863
5864			cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
5865			eval 'ac_cv_func_'$cf_func'=yes'
5866else
5867  echo "$as_me: program exited with status $ac_status" >&5
5868echo "$as_me: failed program was:" >&5
5869cat conftest.$ac_ext >&5
5870
5871			eval 'ac_cv_func_'$cf_func'=no'
5872fi
5873rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5874fi
5875		done
5876		test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
5877
5878fi
5879echo "$as_me:5879: result: $cf_cv_link_funcs" >&5
5880echo "${ECHO_T}$cf_cv_link_funcs" >&6
5881	test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
5882#define HAVE_LINK 1
5883EOF
5884
5885	test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
5886#define HAVE_SYMLINK 1
5887EOF
5888
5889fi
5890
5891with_links=no
5892with_symlinks=no
5893
5894if test "$ac_cv_func_link" != yes ; then
5895    echo "$as_me:5895: checking if tic should use symbolic links" >&5
5896echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5897    if test "$ac_cv_func_symlink" = yes ; then
5898    	with_symlinks=yes
5899    else
5900    	with_symlinks=no
5901    fi
5902    echo "$as_me:5902: result: $with_symlinks" >&5
5903echo "${ECHO_T}$with_symlinks" >&6
5904elif test "$ac_cv_func_symlink" != yes ; then
5905    echo "$as_me:5905: checking if tic should use hard links" >&5
5906echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
5907    if test "$ac_cv_func_link" = yes ; then
5908    	with_links=yes
5909    else
5910    	with_links=no
5911    fi
5912    echo "$as_me:5912: result: $with_links" >&5
5913echo "${ECHO_T}$with_links" >&6
5914else
5915    echo "$as_me:5915: checking if tic should use symbolic links" >&5
5916echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
5917
5918# Check whether --enable-symlinks or --disable-symlinks was given.
5919if test "${enable_symlinks+set}" = set; then
5920  enableval="$enable_symlinks"
5921  with_symlinks=$enableval
5922else
5923  with_symlinks=no
5924fi;
5925    echo "$as_me:5925: result: $with_symlinks" >&5
5926echo "${ECHO_T}$with_symlinks" >&6
5927fi
5928
5929test "$with_links" = yes && cat >>confdefs.h <<\EOF
5930#define USE_LINKS 1
5931EOF
5932
5933test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
5934#define USE_SYMLINKS 1
5935EOF
5936
5937###   use option --enable-broken-linker to force on use of broken-linker support
5938echo "$as_me:5938: checking if you want broken-linker support code" >&5
5939echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
5940
5941# Check whether --enable-broken_linker or --disable-broken_linker was given.
5942if test "${enable_broken_linker+set}" = set; then
5943  enableval="$enable_broken_linker"
5944  with_broken_linker=$enableval
5945else
5946  with_broken_linker=${BROKEN_LINKER-no}
5947fi;
5948echo "$as_me:5948: result: $with_broken_linker" >&5
5949echo "${ECHO_T}$with_broken_linker" >&6
5950
5951BROKEN_LINKER=0
5952if test "$with_broken_linker" = yes ; then
5953	cat >>confdefs.h <<\EOF
5954#define BROKEN_LINKER 1
5955EOF
5956
5957	BROKEN_LINKER=1
5958elif test "$DFT_LWR_MODEL" = shared ; then
5959	case $cf_cv_system_name in #(vi
5960	cygwin*)
5961		cat >>confdefs.h <<\EOF
5962#define BROKEN_LINKER 1
5963EOF
5964
5965		BROKEN_LINKER=1
5966		test -n "$verbose" && echo "	cygwin linker is broken anyway" 1>&6
5967
5968		;;
5969	esac
5970fi
5971
5972###   use option --enable-widec to turn on use of wide-character support
5973NCURSES_CH_T=chtype
5974NCURSES_LIBUTF8=0
5975
5976NEED_WCHAR_H=0
5977NCURSES_MBSTATE_T=0
5978NCURSES_WCHAR_T=0
5979NCURSES_WINT_T=0
5980
5981# Check to define _XOPEN_SOURCE "automatically"
5982
5983echo "$as_me:5983: checking if $CC -U and -D options work together" >&5
5984echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
5985if test "${cf_cv_cc_u_d_options+set}" = set; then
5986  echo $ECHO_N "(cached) $ECHO_C" >&6
5987else
5988
5989	cf_save_CPPFLAGS="$CPPFLAGS"
5990	CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
5991	cat >conftest.$ac_ext <<_ACEOF
5992#line 5992 "configure"
5993#include "confdefs.h"
5994
5995int
5996main ()
5997{
5998
5999#ifndef U_D_OPTIONS
6000make an undefined-error
6001#endif
6002#ifdef  D_U_OPTIONS
6003make a defined-error
6004#endif
6005
6006  ;
6007  return 0;
6008}
6009_ACEOF
6010rm -f conftest.$ac_objext
6011if { (eval echo "$as_me:6011: \"$ac_compile\"") >&5
6012  (eval $ac_compile) 2>&5
6013  ac_status=$?
6014  echo "$as_me:6014: \$? = $ac_status" >&5
6015  (exit $ac_status); } &&
6016         { ac_try='test -s conftest.$ac_objext'
6017  { (eval echo "$as_me:6017: \"$ac_try\"") >&5
6018  (eval $ac_try) 2>&5
6019  ac_status=$?
6020  echo "$as_me:6020: \$? = $ac_status" >&5
6021  (exit $ac_status); }; }; then
6022
6023	cf_cv_cc_u_d_options=yes
6024else
6025  echo "$as_me: failed program was:" >&5
6026cat conftest.$ac_ext >&5
6027
6028	cf_cv_cc_u_d_options=no
6029fi
6030rm -f conftest.$ac_objext conftest.$ac_ext
6031	CPPFLAGS="$cf_save_CPPFLAGS"
6032
6033fi
6034echo "$as_me:6034: result: $cf_cv_cc_u_d_options" >&5
6035echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6036
6037cf_XOPEN_SOURCE=500
6038cf_POSIX_C_SOURCE=199506L
6039
6040case $host_os in #(vi
6041aix[45]*) #(vi
6042	CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6043	;;
6044darwin*) #(vi
6045	# setting _XOPEN_SOURCE breaks things on Darwin
6046	;;
6047freebsd*) #(vi
6048	# 5.x headers associate
6049	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6050	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6051	cf_POSIX_C_SOURCE=200112L
6052	cf_XOPEN_SOURCE=600
6053	CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6054	;;
6055hpux*) #(vi
6056	CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6057	;;
6058irix[56].*) #(vi
6059	CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6060	;;
6061linux*|gnu*) #(vi
6062
6063echo "$as_me:6063: checking if we must define _GNU_SOURCE" >&5
6064echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6065if test "${cf_cv_gnu_source+set}" = set; then
6066  echo $ECHO_N "(cached) $ECHO_C" >&6
6067else
6068
6069cat >conftest.$ac_ext <<_ACEOF
6070#line 6070 "configure"
6071#include "confdefs.h"
6072#include <sys/types.h>
6073int
6074main ()
6075{
6076
6077#ifndef _XOPEN_SOURCE
6078make an error
6079#endif
6080  ;
6081  return 0;
6082}
6083_ACEOF
6084rm -f conftest.$ac_objext
6085if { (eval echo "$as_me:6085: \"$ac_compile\"") >&5
6086  (eval $ac_compile) 2>&5
6087  ac_status=$?
6088  echo "$as_me:6088: \$? = $ac_status" >&5
6089  (exit $ac_status); } &&
6090         { ac_try='test -s conftest.$ac_objext'
6091  { (eval echo "$as_me:6091: \"$ac_try\"") >&5
6092  (eval $ac_try) 2>&5
6093  ac_status=$?
6094  echo "$as_me:6094: \$? = $ac_status" >&5
6095  (exit $ac_status); }; }; then
6096  cf_cv_gnu_source=no
6097else
6098  echo "$as_me: failed program was:" >&5
6099cat conftest.$ac_ext >&5
6100cf_save="$CPPFLAGS"
6101	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6102	 cat >conftest.$ac_ext <<_ACEOF
6103#line 6103 "configure"
6104#include "confdefs.h"
6105#include <sys/types.h>
6106int
6107main ()
6108{
6109
6110#ifdef _XOPEN_SOURCE
6111make an error
6112#endif
6113  ;
6114  return 0;
6115}
6116_ACEOF
6117rm -f conftest.$ac_objext
6118if { (eval echo "$as_me:6118: \"$ac_compile\"") >&5
6119  (eval $ac_compile) 2>&5
6120  ac_status=$?
6121  echo "$as_me:6121: \$? = $ac_status" >&5
6122  (exit $ac_status); } &&
6123         { ac_try='test -s conftest.$ac_objext'
6124  { (eval echo "$as_me:6124: \"$ac_try\"") >&5
6125  (eval $ac_try) 2>&5
6126  ac_status=$?
6127  echo "$as_me:6127: \$? = $ac_status" >&5
6128  (exit $ac_status); }; }; then
6129  cf_cv_gnu_source=no
6130else
6131  echo "$as_me: failed program was:" >&5
6132cat conftest.$ac_ext >&5
6133cf_cv_gnu_source=yes
6134fi
6135rm -f conftest.$ac_objext conftest.$ac_ext
6136	CPPFLAGS="$cf_save"
6137
6138fi
6139rm -f conftest.$ac_objext conftest.$ac_ext
6140
6141fi
6142echo "$as_me:6142: result: $cf_cv_gnu_source" >&5
6143echo "${ECHO_T}$cf_cv_gnu_source" >&6
6144test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6145
6146	;;
6147mirbsd*) #(vi
6148	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6149	;;
6150netbsd*) #(vi
6151	# setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6152	;;
6153openbsd*) #(vi
6154	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6155	;;
6156osf[45]*) #(vi
6157	CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6158	;;
6159nto-qnx*) #(vi
6160	CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6161	;;
6162sco*) #(vi
6163	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6164	;;
6165solaris*) #(vi
6166	CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6167	;;
6168*)
6169	echo "$as_me:6169: checking if we should define _XOPEN_SOURCE" >&5
6170echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6171if test "${cf_cv_xopen_source+set}" = set; then
6172  echo $ECHO_N "(cached) $ECHO_C" >&6
6173else
6174
6175	cat >conftest.$ac_ext <<_ACEOF
6176#line 6176 "configure"
6177#include "confdefs.h"
6178#include <sys/types.h>
6179int
6180main ()
6181{
6182
6183#ifndef _XOPEN_SOURCE
6184make an error
6185#endif
6186  ;
6187  return 0;
6188}
6189_ACEOF
6190rm -f conftest.$ac_objext
6191if { (eval echo "$as_me:6191: \"$ac_compile\"") >&5
6192  (eval $ac_compile) 2>&5
6193  ac_status=$?
6194  echo "$as_me:6194: \$? = $ac_status" >&5
6195  (exit $ac_status); } &&
6196         { ac_try='test -s conftest.$ac_objext'
6197  { (eval echo "$as_me:6197: \"$ac_try\"") >&5
6198  (eval $ac_try) 2>&5
6199  ac_status=$?
6200  echo "$as_me:6200: \$? = $ac_status" >&5
6201  (exit $ac_status); }; }; then
6202  cf_cv_xopen_source=no
6203else
6204  echo "$as_me: failed program was:" >&5
6205cat conftest.$ac_ext >&5
6206cf_save="$CPPFLAGS"
6207	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6208	 cat >conftest.$ac_ext <<_ACEOF
6209#line 6209 "configure"
6210#include "confdefs.h"
6211#include <sys/types.h>
6212int
6213main ()
6214{
6215
6216#ifdef _XOPEN_SOURCE
6217make an error
6218#endif
6219  ;
6220  return 0;
6221}
6222_ACEOF
6223rm -f conftest.$ac_objext
6224if { (eval echo "$as_me:6224: \"$ac_compile\"") >&5
6225  (eval $ac_compile) 2>&5
6226  ac_status=$?
6227  echo "$as_me:6227: \$? = $ac_status" >&5
6228  (exit $ac_status); } &&
6229         { ac_try='test -s conftest.$ac_objext'
6230  { (eval echo "$as_me:6230: \"$ac_try\"") >&5
6231  (eval $ac_try) 2>&5
6232  ac_status=$?
6233  echo "$as_me:6233: \$? = $ac_status" >&5
6234  (exit $ac_status); }; }; then
6235  cf_cv_xopen_source=no
6236else
6237  echo "$as_me: failed program was:" >&5
6238cat conftest.$ac_ext >&5
6239cf_cv_xopen_source=$cf_XOPEN_SOURCE
6240fi
6241rm -f conftest.$ac_objext conftest.$ac_ext
6242	CPPFLAGS="$cf_save"
6243
6244fi
6245rm -f conftest.$ac_objext conftest.$ac_ext
6246
6247fi
6248echo "$as_me:6248: result: $cf_cv_xopen_source" >&5
6249echo "${ECHO_T}$cf_cv_xopen_source" >&6
6250	if test "$cf_cv_xopen_source" != no ; then
6251
6252# remove _XOPEN_SOURCE symbol from $CFLAGS
6253CFLAGS=`echo "$CFLAGS" | \
6254	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6255		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6256
6257# remove _XOPEN_SOURCE symbol from $CPPFLAGS
6258CPPFLAGS=`echo "$CPPFLAGS" | \
6259	sed	-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6260		-e 's/-[UD]_XOPEN_SOURCE\(=[^ 	]*\)\?$//g'`
6261
6262		test "$cf_cv_cc_u_d_options" = yes && \
6263			CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6264		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6265	fi
6266
6267cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6268
6269cf_save_CFLAGS="$CFLAGS"
6270cf_save_CPPFLAGS="$CPPFLAGS"
6271
6272# remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6273cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6274	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6275		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6276
6277# remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6278cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6279	sed	-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?[ 	]/ /g' \
6280		-e 's/-[UD]_POSIX_C_SOURCE\(=[^ 	]*\)\?$//g'`
6281
6282echo "$as_me:6282: checking if we should define _POSIX_C_SOURCE" >&5
6283echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6284if test "${cf_cv_posix_c_source+set}" = set; then
6285  echo $ECHO_N "(cached) $ECHO_C" >&6
6286else
6287
6288echo "(line 6288) testing if the symbol is already defined go no further ..." 1>&5
6289
6290	cat >conftest.$ac_ext <<_ACEOF
6291#line 6291 "configure"
6292#include "confdefs.h"
6293#include <sys/types.h>
6294int
6295main ()
6296{
6297
6298#ifndef _POSIX_C_SOURCE
6299make an error
6300#endif
6301  ;
6302  return 0;
6303}
6304_ACEOF
6305rm -f conftest.$ac_objext
6306if { (eval echo "$as_me:6306: \"$ac_compile\"") >&5
6307  (eval $ac_compile) 2>&5
6308  ac_status=$?
6309  echo "$as_me:6309: \$? = $ac_status" >&5
6310  (exit $ac_status); } &&
6311         { ac_try='test -s conftest.$ac_objext'
6312  { (eval echo "$as_me:6312: \"$ac_try\"") >&5
6313  (eval $ac_try) 2>&5
6314  ac_status=$?
6315  echo "$as_me:6315: \$? = $ac_status" >&5
6316  (exit $ac_status); }; }; then
6317  cf_cv_posix_c_source=no
6318else
6319  echo "$as_me: failed program was:" >&5
6320cat conftest.$ac_ext >&5
6321cf_want_posix_source=no
6322	 case .$cf_POSIX_C_SOURCE in #(vi
6323	 .[12]??*) #(vi
6324		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6325		;;
6326	 .2) #(vi
6327		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6328		cf_want_posix_source=yes
6329		;;
6330	 .*)
6331		cf_want_posix_source=yes
6332		;;
6333	 esac
6334	 if test "$cf_want_posix_source" = yes ; then
6335		cat >conftest.$ac_ext <<_ACEOF
6336#line 6336 "configure"
6337#include "confdefs.h"
6338#include <sys/types.h>
6339int
6340main ()
6341{
6342
6343#ifdef _POSIX_SOURCE
6344make an error
6345#endif
6346  ;
6347  return 0;
6348}
6349_ACEOF
6350rm -f conftest.$ac_objext
6351if { (eval echo "$as_me:6351: \"$ac_compile\"") >&5
6352  (eval $ac_compile) 2>&5
6353  ac_status=$?
6354  echo "$as_me:6354: \$? = $ac_status" >&5
6355  (exit $ac_status); } &&
6356         { ac_try='test -s conftest.$ac_objext'
6357  { (eval echo "$as_me:6357: \"$ac_try\"") >&5
6358  (eval $ac_try) 2>&5
6359  ac_status=$?
6360  echo "$as_me:6360: \$? = $ac_status" >&5
6361  (exit $ac_status); }; }; then
6362  :
6363else
6364  echo "$as_me: failed program was:" >&5
6365cat conftest.$ac_ext >&5
6366cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6367fi
6368rm -f conftest.$ac_objext conftest.$ac_ext
6369	 fi
6370
6371echo "(line 6371) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6372
6373	 CFLAGS="$cf_trim_CFLAGS"
6374	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6375
6376echo "(line 6376) testing if the second compile does not leave our definition intact error ..." 1>&5
6377
6378	 cat >conftest.$ac_ext <<_ACEOF
6379#line 6379 "configure"
6380#include "confdefs.h"
6381#include <sys/types.h>
6382int
6383main ()
6384{
6385
6386#ifndef _POSIX_C_SOURCE
6387make an error
6388#endif
6389  ;
6390  return 0;
6391}
6392_ACEOF
6393rm -f conftest.$ac_objext
6394if { (eval echo "$as_me:6394: \"$ac_compile\"") >&5
6395  (eval $ac_compile) 2>&5
6396  ac_status=$?
6397  echo "$as_me:6397: \$? = $ac_status" >&5
6398  (exit $ac_status); } &&
6399         { ac_try='test -s conftest.$ac_objext'
6400  { (eval echo "$as_me:6400: \"$ac_try\"") >&5
6401  (eval $ac_try) 2>&5
6402  ac_status=$?
6403  echo "$as_me:6403: \$? = $ac_status" >&5
6404  (exit $ac_status); }; }; then
6405  :
6406else
6407  echo "$as_me: failed program was:" >&5
6408cat conftest.$ac_ext >&5
6409cf_cv_posix_c_source=no
6410fi
6411rm -f conftest.$ac_objext conftest.$ac_ext
6412	 CFLAGS="$cf_save_CFLAGS"
6413	 CPPFLAGS="$cf_save_CPPFLAGS"
6414
6415fi
6416rm -f conftest.$ac_objext conftest.$ac_ext
6417
6418fi
6419echo "$as_me:6419: result: $cf_cv_posix_c_source" >&5
6420echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6421
6422if test "$cf_cv_posix_c_source" != no ; then
6423	CFLAGS="$cf_trim_CFLAGS"
6424	CPPFLAGS="$cf_trim_CPPFLAGS"
6425	if test "$cf_cv_cc_u_d_options" = yes ; then
6426		cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6427				sed -e 's/-D/-U/g' -e 's/=[^ 	]*//g'`
6428		CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6429	fi
6430	CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6431fi
6432
6433	;;
6434esac
6435
6436# Checks for CODESET support.
6437
6438  echo "$as_me:6438: checking for nl_langinfo and CODESET" >&5
6439echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6440if test "${am_cv_langinfo_codeset+set}" = set; then
6441  echo $ECHO_N "(cached) $ECHO_C" >&6
6442else
6443  cat >conftest.$ac_ext <<_ACEOF
6444#line 6444 "configure"
6445#include "confdefs.h"
6446#include <langinfo.h>
6447int
6448main ()
6449{
6450char* cs = nl_langinfo(CODESET);
6451  ;
6452  return 0;
6453}
6454_ACEOF
6455rm -f conftest.$ac_objext conftest$ac_exeext
6456if { (eval echo "$as_me:6456: \"$ac_link\"") >&5
6457  (eval $ac_link) 2>&5
6458  ac_status=$?
6459  echo "$as_me:6459: \$? = $ac_status" >&5
6460  (exit $ac_status); } &&
6461         { ac_try='test -s conftest$ac_exeext'
6462  { (eval echo "$as_me:6462: \"$ac_try\"") >&5
6463  (eval $ac_try) 2>&5
6464  ac_status=$?
6465  echo "$as_me:6465: \$? = $ac_status" >&5
6466  (exit $ac_status); }; }; then
6467  am_cv_langinfo_codeset=yes
6468else
6469  echo "$as_me: failed program was:" >&5
6470cat conftest.$ac_ext >&5
6471am_cv_langinfo_codeset=no
6472fi
6473rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6474
6475fi
6476echo "$as_me:6476: result: $am_cv_langinfo_codeset" >&5
6477echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6478  if test $am_cv_langinfo_codeset = yes; then
6479
6480cat >>confdefs.h <<\EOF
6481#define HAVE_LANGINFO_CODESET 1
6482EOF
6483
6484  fi
6485
6486# use these variables to work around a defect in gcc's fixincludes.
6487NCURSES_OK_WCHAR_T=
6488NCURSES_OK_WINT_T=
6489
6490echo "$as_me:6490: checking if you want wide-character code" >&5
6491echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
6492
6493# Check whether --enable-widec or --disable-widec was given.
6494if test "${enable_widec+set}" = set; then
6495  enableval="$enable_widec"
6496  with_widec=$enableval
6497else
6498  with_widec=no
6499fi;
6500echo "$as_me:6500: result: $with_widec" >&5
6501echo "${ECHO_T}$with_widec" >&6
6502if test "$with_widec" = yes ; then
6503	LIB_SUFFIX="w${LIB_SUFFIX}"
6504	cat >>confdefs.h <<\EOF
6505#define USE_WIDEC_SUPPORT 1
6506EOF
6507
6508echo "$as_me:6508: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
6509echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
6510cat >conftest.$ac_ext <<_ACEOF
6511#line 6511 "configure"
6512#include "confdefs.h"
6513#include <sys/types.h>
6514
6515int
6516main ()
6517{
6518
6519#ifndef _XOPEN_SOURCE_EXTENDED
6520make an error
6521#endif
6522  ;
6523  return 0;
6524}
6525_ACEOF
6526rm -f conftest.$ac_objext
6527if { (eval echo "$as_me:6527: \"$ac_compile\"") >&5
6528  (eval $ac_compile) 2>&5
6529  ac_status=$?
6530  echo "$as_me:6530: \$? = $ac_status" >&5
6531  (exit $ac_status); } &&
6532         { ac_try='test -s conftest.$ac_objext'
6533  { (eval echo "$as_me:6533: \"$ac_try\"") >&5
6534  (eval $ac_try) 2>&5
6535  ac_status=$?
6536  echo "$as_me:6536: \$? = $ac_status" >&5
6537  (exit $ac_status); }; }; then
6538  cf_result=no
6539else
6540  echo "$as_me: failed program was:" >&5
6541cat conftest.$ac_ext >&5
6542cf_result=yes
6543fi
6544rm -f conftest.$ac_objext conftest.$ac_ext
6545echo "$as_me:6545: result: $cf_result" >&5
6546echo "${ECHO_T}$cf_result" >&6
6547
6548if test "$cf_result" = yes ; then
6549	CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
6550elif test "x" != "x" ; then
6551	echo "$as_me:6551: checking checking for compatible value versus " >&5
6552echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
6553	cat >conftest.$ac_ext <<_ACEOF
6554#line 6554 "configure"
6555#include "confdefs.h"
6556#include <sys/types.h>
6557
6558int
6559main ()
6560{
6561
6562#if _XOPEN_SOURCE_EXTENDED- < 0
6563make an error
6564#endif
6565  ;
6566  return 0;
6567}
6568_ACEOF
6569rm -f conftest.$ac_objext
6570if { (eval echo "$as_me:6570: \"$ac_compile\"") >&5
6571  (eval $ac_compile) 2>&5
6572  ac_status=$?
6573  echo "$as_me:6573: \$? = $ac_status" >&5
6574  (exit $ac_status); } &&
6575         { ac_try='test -s conftest.$ac_objext'
6576  { (eval echo "$as_me:6576: \"$ac_try\"") >&5
6577  (eval $ac_try) 2>&5
6578  ac_status=$?
6579  echo "$as_me:6579: \$? = $ac_status" >&5
6580  (exit $ac_status); }; }; then
6581  cf_result=yes
6582else
6583  echo "$as_me: failed program was:" >&5
6584cat conftest.$ac_ext >&5
6585cf_result=no
6586fi
6587rm -f conftest.$ac_objext conftest.$ac_ext
6588	echo "$as_me:6588: result: $cf_result" >&5
6589echo "${ECHO_T}$cf_result" >&6
6590	if test "$cf_result" = no ; then
6591		# perhaps we can override it - try...
6592		CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
6593	fi
6594fi
6595
6596	# with_overwrite=no
6597	NCURSES_CH_T=cchar_t
6598
6599for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc
6600do
6601as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6602echo "$as_me:6602: checking for $ac_func" >&5
6603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6604if eval "test \"\${$as_ac_var+set}\" = set"; then
6605  echo $ECHO_N "(cached) $ECHO_C" >&6
6606else
6607  cat >conftest.$ac_ext <<_ACEOF
6608#line 6608 "configure"
6609#include "confdefs.h"
6610/* System header to define __stub macros and hopefully few prototypes,
6611    which can conflict with char $ac_func (); below.  */
6612#include <assert.h>
6613/* Override any gcc2 internal prototype to avoid an error.  */
6614#ifdef __cplusplus
6615extern "C"
6616#endif
6617/* We use char because int might match the return type of a gcc2
6618   builtin and then its argument prototype would still apply.  */
6619char $ac_func ();
6620char (*f) ();
6621
6622int
6623main ()
6624{
6625/* The GNU C library defines this for functions which it implements
6626    to always fail with ENOSYS.  Some functions are actually named
6627    something starting with __ and the normal name is an alias.  */
6628#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6629choke me
6630#else
6631f = $ac_func;
6632#endif
6633
6634  ;
6635  return 0;
6636}
6637_ACEOF
6638rm -f conftest.$ac_objext conftest$ac_exeext
6639if { (eval echo "$as_me:6639: \"$ac_link\"") >&5
6640  (eval $ac_link) 2>&5
6641  ac_status=$?
6642  echo "$as_me:6642: \$? = $ac_status" >&5
6643  (exit $ac_status); } &&
6644         { ac_try='test -s conftest$ac_exeext'
6645  { (eval echo "$as_me:6645: \"$ac_try\"") >&5
6646  (eval $ac_try) 2>&5
6647  ac_status=$?
6648  echo "$as_me:6648: \$? = $ac_status" >&5
6649  (exit $ac_status); }; }; then
6650  eval "$as_ac_var=yes"
6651else
6652  echo "$as_me: failed program was:" >&5
6653cat conftest.$ac_ext >&5
6654eval "$as_ac_var=no"
6655fi
6656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6657fi
6658echo "$as_me:6658: result: `eval echo '${'$as_ac_var'}'`" >&5
6659echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6660if test `eval echo '${'$as_ac_var'}'` = yes; then
6661  cat >>confdefs.h <<EOF
6662#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6663EOF
6664
6665fi
6666done
6667
6668	if test "$ac_cv_func_putwc" != yes ; then
6669
6670echo "$as_me:6670: checking for putwc in libutf8" >&5
6671echo $ECHO_N "checking for putwc in libutf8... $ECHO_C" >&6
6672if test "${cf_cv_libutf8+set}" = set; then
6673  echo $ECHO_N "(cached) $ECHO_C" >&6
6674else
6675
6676	cf_save_LIBS="$LIBS"
6677	LIBS="-lutf8 $LIBS"
6678cat >conftest.$ac_ext <<_ACEOF
6679#line 6679 "configure"
6680#include "confdefs.h"
6681
6682#include <libutf8.h>
6683int
6684main ()
6685{
6686putwc(0,0);
6687  ;
6688  return 0;
6689}
6690_ACEOF
6691rm -f conftest.$ac_objext conftest$ac_exeext
6692if { (eval echo "$as_me:6692: \"$ac_link\"") >&5
6693  (eval $ac_link) 2>&5
6694  ac_status=$?
6695  echo "$as_me:6695: \$? = $ac_status" >&5
6696  (exit $ac_status); } &&
6697         { ac_try='test -s conftest$ac_exeext'
6698  { (eval echo "$as_me:6698: \"$ac_try\"") >&5
6699  (eval $ac_try) 2>&5
6700  ac_status=$?
6701  echo "$as_me:6701: \$? = $ac_status" >&5
6702  (exit $ac_status); }; }; then
6703  cf_cv_libutf8=yes
6704else
6705  echo "$as_me: failed program was:" >&5
6706cat conftest.$ac_ext >&5
6707cf_cv_libutf8=no
6708fi
6709rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6710	LIBS="$cf_save_LIBS"
6711
6712fi
6713echo "$as_me:6713: result: $cf_cv_libutf8" >&5
6714echo "${ECHO_T}$cf_cv_libutf8" >&6
6715
6716if test "$cf_cv_libutf8" = yes ; then
6717	cat >>confdefs.h <<\EOF
6718#define HAVE_LIBUTF8_H 1
6719EOF
6720
6721	LIBS="-lutf8 $LIBS"
6722fi
6723
6724		if test "$cf_cv_libutf8" = yes ; then
6725			NCURSES_LIBUTF8=1
6726		fi
6727	fi
6728
6729# This is needed on Tru64 5.0 to declare mbstate_t
6730echo "$as_me:6730: checking if we must include wchar.h to declare mbstate_t" >&5
6731echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
6732if test "${cf_cv_mbstate_t+set}" = set; then
6733  echo $ECHO_N "(cached) $ECHO_C" >&6
6734else
6735
6736cat >conftest.$ac_ext <<_ACEOF
6737#line 6737 "configure"
6738#include "confdefs.h"
6739
6740#include <stdlib.h>
6741#include <stdarg.h>
6742#include <stdio.h>
6743#ifdef HAVE_LIBUTF8_H
6744#include <libutf8.h>
6745#endif
6746int
6747main ()
6748{
6749mbstate_t state
6750  ;
6751  return 0;
6752}
6753_ACEOF
6754rm -f conftest.$ac_objext
6755if { (eval echo "$as_me:6755: \"$ac_compile\"") >&5
6756  (eval $ac_compile) 2>&5
6757  ac_status=$?
6758  echo "$as_me:6758: \$? = $ac_status" >&5
6759  (exit $ac_status); } &&
6760         { ac_try='test -s conftest.$ac_objext'
6761  { (eval echo "$as_me:6761: \"$ac_try\"") >&5
6762  (eval $ac_try) 2>&5
6763  ac_status=$?
6764  echo "$as_me:6764: \$? = $ac_status" >&5
6765  (exit $ac_status); }; }; then
6766  cf_cv_mbstate_t=no
6767else
6768  echo "$as_me: failed program was:" >&5
6769cat conftest.$ac_ext >&5
6770cat >conftest.$ac_ext <<_ACEOF
6771#line 6771 "configure"
6772#include "confdefs.h"
6773
6774#include <stdlib.h>
6775#include <stdarg.h>
6776#include <stdio.h>
6777#include <wchar.h>
6778#ifdef HAVE_LIBUTF8_H
6779#include <libutf8.h>
6780#endif
6781int
6782main ()
6783{
6784mbstate_t value
6785  ;
6786  return 0;
6787}
6788_ACEOF
6789rm -f conftest.$ac_objext
6790if { (eval echo "$as_me:6790: \"$ac_compile\"") >&5
6791  (eval $ac_compile) 2>&5
6792  ac_status=$?
6793  echo "$as_me:6793: \$? = $ac_status" >&5
6794  (exit $ac_status); } &&
6795         { ac_try='test -s conftest.$ac_objext'
6796  { (eval echo "$as_me:6796: \"$ac_try\"") >&5
6797  (eval $ac_try) 2>&5
6798  ac_status=$?
6799  echo "$as_me:6799: \$? = $ac_status" >&5
6800  (exit $ac_status); }; }; then
6801  cf_cv_mbstate_t=yes
6802else
6803  echo "$as_me: failed program was:" >&5
6804cat conftest.$ac_ext >&5
6805cf_cv_mbstate_t=unknown
6806fi
6807rm -f conftest.$ac_objext conftest.$ac_ext
6808fi
6809rm -f conftest.$ac_objext conftest.$ac_ext
6810fi
6811echo "$as_me:6811: result: $cf_cv_mbstate_t" >&5
6812echo "${ECHO_T}$cf_cv_mbstate_t" >&6
6813
6814if test "$cf_cv_mbstate_t" = yes ; then
6815	cat >>confdefs.h <<\EOF
6816#define NEED_WCHAR_H 1
6817EOF
6818
6819	NEED_WCHAR_H=1
6820fi
6821
6822# if we do not find mbstate_t in either place, use substitution to provide a fallback.
6823if test "$cf_cv_mbstate_t" = unknown ; then
6824	NCURSES_MBSTATE_T=1
6825fi
6826
6827# This is needed on Tru64 5.0 to declare wchar_t
6828echo "$as_me:6828: checking if we must include wchar.h to declare wchar_t" >&5
6829echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
6830if test "${cf_cv_wchar_t+set}" = set; then
6831  echo $ECHO_N "(cached) $ECHO_C" >&6
6832else
6833
6834cat >conftest.$ac_ext <<_ACEOF
6835#line 6835 "configure"
6836#include "confdefs.h"
6837
6838#include <stdlib.h>
6839#include <stdarg.h>
6840#include <stdio.h>
6841#ifdef HAVE_LIBUTF8_H
6842#include <libutf8.h>
6843#endif
6844int
6845main ()
6846{
6847wchar_t state
6848  ;
6849  return 0;
6850}
6851_ACEOF
6852rm -f conftest.$ac_objext
6853if { (eval echo "$as_me:6853: \"$ac_compile\"") >&5
6854  (eval $ac_compile) 2>&5
6855  ac_status=$?
6856  echo "$as_me:6856: \$? = $ac_status" >&5
6857  (exit $ac_status); } &&
6858         { ac_try='test -s conftest.$ac_objext'
6859  { (eval echo "$as_me:6859: \"$ac_try\"") >&5
6860  (eval $ac_try) 2>&5
6861  ac_status=$?
6862  echo "$as_me:6862: \$? = $ac_status" >&5
6863  (exit $ac_status); }; }; then
6864  cf_cv_wchar_t=no
6865else
6866  echo "$as_me: failed program was:" >&5
6867cat conftest.$ac_ext >&5
6868cat >conftest.$ac_ext <<_ACEOF
6869#line 6869 "configure"
6870#include "confdefs.h"
6871
6872#include <stdlib.h>
6873#include <stdarg.h>
6874#include <stdio.h>
6875#include <wchar.h>
6876#ifdef HAVE_LIBUTF8_H
6877#include <libutf8.h>
6878#endif
6879int
6880main ()
6881{
6882wchar_t value
6883  ;
6884  return 0;
6885}
6886_ACEOF
6887rm -f conftest.$ac_objext
6888if { (eval echo "$as_me:6888: \"$ac_compile\"") >&5
6889  (eval $ac_compile) 2>&5
6890  ac_status=$?
6891  echo "$as_me:6891: \$? = $ac_status" >&5
6892  (exit $ac_status); } &&
6893         { ac_try='test -s conftest.$ac_objext'
6894  { (eval echo "$as_me:6894: \"$ac_try\"") >&5
6895  (eval $ac_try) 2>&5
6896  ac_status=$?
6897  echo "$as_me:6897: \$? = $ac_status" >&5
6898  (exit $ac_status); }; }; then
6899  cf_cv_wchar_t=yes
6900else
6901  echo "$as_me: failed program was:" >&5
6902cat conftest.$ac_ext >&5
6903cf_cv_wchar_t=unknown
6904fi
6905rm -f conftest.$ac_objext conftest.$ac_ext
6906fi
6907rm -f conftest.$ac_objext conftest.$ac_ext
6908fi
6909echo "$as_me:6909: result: $cf_cv_wchar_t" >&5
6910echo "${ECHO_T}$cf_cv_wchar_t" >&6
6911
6912if test "$cf_cv_wchar_t" = yes ; then
6913	cat >>confdefs.h <<\EOF
6914#define NEED_WCHAR_H 1
6915EOF
6916
6917	NEED_WCHAR_H=1
6918fi
6919
6920# if we do not find wchar_t in either place, use substitution to provide a fallback.
6921if test "$cf_cv_wchar_t" = unknown ; then
6922	NCURSES_WCHAR_T=1
6923fi
6924
6925# if we find wchar_t in either place, use substitution to provide a fallback.
6926if test "$cf_cv_wchar_t" != unknown ; then
6927	NCURSES_OK_WCHAR_T=1
6928fi
6929
6930# This is needed on Tru64 5.0 to declare wint_t
6931echo "$as_me:6931: checking if we must include wchar.h to declare wint_t" >&5
6932echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
6933if test "${cf_cv_wint_t+set}" = set; then
6934  echo $ECHO_N "(cached) $ECHO_C" >&6
6935else
6936
6937cat >conftest.$ac_ext <<_ACEOF
6938#line 6938 "configure"
6939#include "confdefs.h"
6940
6941#include <stdlib.h>
6942#include <stdarg.h>
6943#include <stdio.h>
6944#ifdef HAVE_LIBUTF8_H
6945#include <libutf8.h>
6946#endif
6947int
6948main ()
6949{
6950wint_t state
6951  ;
6952  return 0;
6953}
6954_ACEOF
6955rm -f conftest.$ac_objext
6956if { (eval echo "$as_me:6956: \"$ac_compile\"") >&5
6957  (eval $ac_compile) 2>&5
6958  ac_status=$?
6959  echo "$as_me:6959: \$? = $ac_status" >&5
6960  (exit $ac_status); } &&
6961         { ac_try='test -s conftest.$ac_objext'
6962  { (eval echo "$as_me:6962: \"$ac_try\"") >&5
6963  (eval $ac_try) 2>&5
6964  ac_status=$?
6965  echo "$as_me:6965: \$? = $ac_status" >&5
6966  (exit $ac_status); }; }; then
6967  cf_cv_wint_t=no
6968else
6969  echo "$as_me: failed program was:" >&5
6970cat conftest.$ac_ext >&5
6971cat >conftest.$ac_ext <<_ACEOF
6972#line 6972 "configure"
6973#include "confdefs.h"
6974
6975#include <stdlib.h>
6976#include <stdarg.h>
6977#include <stdio.h>
6978#include <wchar.h>
6979#ifdef HAVE_LIBUTF8_H
6980#include <libutf8.h>
6981#endif
6982int
6983main ()
6984{
6985wint_t value
6986  ;
6987  return 0;
6988}
6989_ACEOF
6990rm -f conftest.$ac_objext
6991if { (eval echo "$as_me:6991: \"$ac_compile\"") >&5
6992  (eval $ac_compile) 2>&5
6993  ac_status=$?
6994  echo "$as_me:6994: \$? = $ac_status" >&5
6995  (exit $ac_status); } &&
6996         { ac_try='test -s conftest.$ac_objext'
6997  { (eval echo "$as_me:6997: \"$ac_try\"") >&5
6998  (eval $ac_try) 2>&5
6999  ac_status=$?
7000  echo "$as_me:7000: \$? = $ac_status" >&5
7001  (exit $ac_status); }; }; then
7002  cf_cv_wint_t=yes
7003else
7004  echo "$as_me: failed program was:" >&5
7005cat conftest.$ac_ext >&5
7006cf_cv_wint_t=unknown
7007fi
7008rm -f conftest.$ac_objext conftest.$ac_ext
7009fi
7010rm -f conftest.$ac_objext conftest.$ac_ext
7011fi
7012echo "$as_me:7012: result: $cf_cv_wint_t" >&5
7013echo "${ECHO_T}$cf_cv_wint_t" >&6
7014
7015if test "$cf_cv_wint_t" = yes ; then
7016	cat >>confdefs.h <<\EOF
7017#define NEED_WCHAR_H 1
7018EOF
7019
7020	NEED_WCHAR_H=1
7021fi
7022
7023# if we do not find wint_t in either place, use substitution to provide a fallback.
7024if test "$cf_cv_wint_t" = unknown ; then
7025	NCURSES_WINT_T=1
7026fi
7027
7028# if we find wint_t in either place, use substitution to provide a fallback.
7029if test "$cf_cv_wint_t" != unknown ; then
7030	NCURSES_OK_WINT_T=1
7031fi
7032
7033	if test "$NCURSES_MBSTATE_T" != 0; then
7034		cat >>confdefs.h <<\EOF
7035#define NEED_MBSTATE_T_DEF 1
7036EOF
7037
7038	fi
7039fi
7040
7041###   use option --disable-lp64 to allow long chtype
7042case $cf_cv_abi_version in
7043[345]*)
7044	default_with_lp64=no
7045	;;
7046*)
7047	default_with_lp64=yes
7048	;;
7049esac
7050
7051echo "$as_me:7051: checking whether to enable _LP64 definition in curses.h" >&5
7052echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
7053
7054# Check whether --enable-lp64 or --disable-lp64 was given.
7055if test "${enable_lp64+set}" = set; then
7056  enableval="$enable_lp64"
7057  with_lp64=$enableval
7058else
7059  with_lp64=$default_with_lp64
7060fi;
7061echo "$as_me:7061: result: $with_lp64" >&5
7062echo "${ECHO_T}$with_lp64" >&6
7063
7064if test "$with_lp64" = yes ; then
7065	cf_cv_enable_lp64=1
7066else
7067	cf_cv_enable_lp64=0
7068fi
7069
7070	echo "$as_me:7070: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7071echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7072if test "${ac_cv_sys_largefile_source+set}" = set; then
7073  echo $ECHO_N "(cached) $ECHO_C" >&6
7074else
7075  while :; do
7076  ac_cv_sys_largefile_source=no
7077  cat >conftest.$ac_ext <<_ACEOF
7078#line 7078 "configure"
7079#include "confdefs.h"
7080#include <stdio.h>
7081int
7082main ()
7083{
7084return !fseeko;
7085  ;
7086  return 0;
7087}
7088_ACEOF
7089rm -f conftest.$ac_objext
7090if { (eval echo "$as_me:7090: \"$ac_compile\"") >&5
7091  (eval $ac_compile) 2>&5
7092  ac_status=$?
7093  echo "$as_me:7093: \$? = $ac_status" >&5
7094  (exit $ac_status); } &&
7095         { ac_try='test -s conftest.$ac_objext'
7096  { (eval echo "$as_me:7096: \"$ac_try\"") >&5
7097  (eval $ac_try) 2>&5
7098  ac_status=$?
7099  echo "$as_me:7099: \$? = $ac_status" >&5
7100  (exit $ac_status); }; }; then
7101  break
7102else
7103  echo "$as_me: failed program was:" >&5
7104cat conftest.$ac_ext >&5
7105fi
7106rm -f conftest.$ac_objext conftest.$ac_ext
7107  cat >conftest.$ac_ext <<_ACEOF
7108#line 7108 "configure"
7109#include "confdefs.h"
7110#define _LARGEFILE_SOURCE 1
7111#include <stdio.h>
7112int
7113main ()
7114{
7115return !fseeko;
7116  ;
7117  return 0;
7118}
7119_ACEOF
7120rm -f conftest.$ac_objext
7121if { (eval echo "$as_me:7121: \"$ac_compile\"") >&5
7122  (eval $ac_compile) 2>&5
7123  ac_status=$?
7124  echo "$as_me:7124: \$? = $ac_status" >&5
7125  (exit $ac_status); } &&
7126         { ac_try='test -s conftest.$ac_objext'
7127  { (eval echo "$as_me:7127: \"$ac_try\"") >&5
7128  (eval $ac_try) 2>&5
7129  ac_status=$?
7130  echo "$as_me:7130: \$? = $ac_status" >&5
7131  (exit $ac_status); }; }; then
7132  ac_cv_sys_largefile_source=1; break
7133else
7134  echo "$as_me: failed program was:" >&5
7135cat conftest.$ac_ext >&5
7136fi
7137rm -f conftest.$ac_objext conftest.$ac_ext
7138  break
7139done
7140fi
7141echo "$as_me:7141: result: $ac_cv_sys_largefile_source" >&5
7142echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7143if test "$ac_cv_sys_largefile_source" != no; then
7144
7145cat >>confdefs.h <<EOF
7146#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7147EOF
7148
7149fi
7150rm -f conftest*
7151
7152# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7153# in glibc 2.1.3, but that breaks too many other things.
7154# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7155echo "$as_me:7155: checking for fseeko" >&5
7156echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7157if test "${ac_cv_func_fseeko+set}" = set; then
7158  echo $ECHO_N "(cached) $ECHO_C" >&6
7159else
7160  cat >conftest.$ac_ext <<_ACEOF
7161#line 7161 "configure"
7162#include "confdefs.h"
7163#include <stdio.h>
7164int
7165main ()
7166{
7167return fseeko && fseeko (stdin, 0, 0);
7168  ;
7169  return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext conftest$ac_exeext
7173if { (eval echo "$as_me:7173: \"$ac_link\"") >&5
7174  (eval $ac_link) 2>&5
7175  ac_status=$?
7176  echo "$as_me:7176: \$? = $ac_status" >&5
7177  (exit $ac_status); } &&
7178         { ac_try='test -s conftest$ac_exeext'
7179  { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180  (eval $ac_try) 2>&5
7181  ac_status=$?
7182  echo "$as_me:7182: \$? = $ac_status" >&5
7183  (exit $ac_status); }; }; then
7184  ac_cv_func_fseeko=yes
7185else
7186  echo "$as_me: failed program was:" >&5
7187cat conftest.$ac_ext >&5
7188ac_cv_func_fseeko=no
7189fi
7190rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7191fi
7192echo "$as_me:7192: result: $ac_cv_func_fseeko" >&5
7193echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7194if test $ac_cv_func_fseeko = yes; then
7195
7196cat >>confdefs.h <<\EOF
7197#define HAVE_FSEEKO 1
7198EOF
7199
7200fi
7201
7202# Check whether --enable-largefile or --disable-largefile was given.
7203if test "${enable_largefile+set}" = set; then
7204  enableval="$enable_largefile"
7205
7206fi;
7207if test "$enable_largefile" != no; then
7208
7209  echo "$as_me:7209: checking for special C compiler options needed for large files" >&5
7210echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7211if test "${ac_cv_sys_largefile_CC+set}" = set; then
7212  echo $ECHO_N "(cached) $ECHO_C" >&6
7213else
7214  ac_cv_sys_largefile_CC=no
7215     if test "$GCC" != yes; then
7216       ac_save_CC=$CC
7217       while :; do
7218     	 # IRIX 6.2 and later do not support large files by default,
7219     	 # so use the C compiler's -n32 option if that helps.
7220         cat >conftest.$ac_ext <<_ACEOF
7221#line 7221 "configure"
7222#include "confdefs.h"
7223#include <sys/types.h>
7224 /* Check that off_t can represent 2**63 - 1 correctly.
7225    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7226    since some C++ compilers masquerading as C compilers
7227    incorrectly reject 9223372036854775807.  */
7228#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7229  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7230		       && LARGE_OFF_T % 2147483647 == 1)
7231		      ? 1 : -1];
7232int
7233main ()
7234{
7235
7236  ;
7237  return 0;
7238}
7239_ACEOF
7240     	 rm -f conftest.$ac_objext
7241if { (eval echo "$as_me:7241: \"$ac_compile\"") >&5
7242  (eval $ac_compile) 2>&5
7243  ac_status=$?
7244  echo "$as_me:7244: \$? = $ac_status" >&5
7245  (exit $ac_status); } &&
7246         { ac_try='test -s conftest.$ac_objext'
7247  { (eval echo "$as_me:7247: \"$ac_try\"") >&5
7248  (eval $ac_try) 2>&5
7249  ac_status=$?
7250  echo "$as_me:7250: \$? = $ac_status" >&5
7251  (exit $ac_status); }; }; then
7252  break
7253else
7254  echo "$as_me: failed program was:" >&5
7255cat conftest.$ac_ext >&5
7256fi
7257rm -f conftest.$ac_objext
7258     	 CC="$CC -n32"
7259     	 rm -f conftest.$ac_objext
7260if { (eval echo "$as_me:7260: \"$ac_compile\"") >&5
7261  (eval $ac_compile) 2>&5
7262  ac_status=$?
7263  echo "$as_me:7263: \$? = $ac_status" >&5
7264  (exit $ac_status); } &&
7265         { ac_try='test -s conftest.$ac_objext'
7266  { (eval echo "$as_me:7266: \"$ac_try\"") >&5
7267  (eval $ac_try) 2>&5
7268  ac_status=$?
7269  echo "$as_me:7269: \$? = $ac_status" >&5
7270  (exit $ac_status); }; }; then
7271  ac_cv_sys_largefile_CC=' -n32'; break
7272else
7273  echo "$as_me: failed program was:" >&5
7274cat conftest.$ac_ext >&5
7275fi
7276rm -f conftest.$ac_objext
7277         break
7278       done
7279       CC=$ac_save_CC
7280       rm -f conftest.$ac_ext
7281    fi
7282fi
7283echo "$as_me:7283: result: $ac_cv_sys_largefile_CC" >&5
7284echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7285  if test "$ac_cv_sys_largefile_CC" != no; then
7286    CC=$CC$ac_cv_sys_largefile_CC
7287  fi
7288
7289  echo "$as_me:7289: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7290echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7291if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7292  echo $ECHO_N "(cached) $ECHO_C" >&6
7293else
7294  while :; do
7295  ac_cv_sys_file_offset_bits=no
7296  cat >conftest.$ac_ext <<_ACEOF
7297#line 7297 "configure"
7298#include "confdefs.h"
7299#include <sys/types.h>
7300 /* Check that off_t can represent 2**63 - 1 correctly.
7301    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7302    since some C++ compilers masquerading as C compilers
7303    incorrectly reject 9223372036854775807.  */
7304#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7305  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7306		       && LARGE_OFF_T % 2147483647 == 1)
7307		      ? 1 : -1];
7308int
7309main ()
7310{
7311
7312  ;
7313  return 0;
7314}
7315_ACEOF
7316rm -f conftest.$ac_objext
7317if { (eval echo "$as_me:7317: \"$ac_compile\"") >&5
7318  (eval $ac_compile) 2>&5
7319  ac_status=$?
7320  echo "$as_me:7320: \$? = $ac_status" >&5
7321  (exit $ac_status); } &&
7322         { ac_try='test -s conftest.$ac_objext'
7323  { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324  (eval $ac_try) 2>&5
7325  ac_status=$?
7326  echo "$as_me:7326: \$? = $ac_status" >&5
7327  (exit $ac_status); }; }; then
7328  break
7329else
7330  echo "$as_me: failed program was:" >&5
7331cat conftest.$ac_ext >&5
7332fi
7333rm -f conftest.$ac_objext conftest.$ac_ext
7334  cat >conftest.$ac_ext <<_ACEOF
7335#line 7335 "configure"
7336#include "confdefs.h"
7337#define _FILE_OFFSET_BITS 64
7338#include <sys/types.h>
7339 /* Check that off_t can represent 2**63 - 1 correctly.
7340    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7341    since some C++ compilers masquerading as C compilers
7342    incorrectly reject 9223372036854775807.  */
7343#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7344  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7345		       && LARGE_OFF_T % 2147483647 == 1)
7346		      ? 1 : -1];
7347int
7348main ()
7349{
7350
7351  ;
7352  return 0;
7353}
7354_ACEOF
7355rm -f conftest.$ac_objext
7356if { (eval echo "$as_me:7356: \"$ac_compile\"") >&5
7357  (eval $ac_compile) 2>&5
7358  ac_status=$?
7359  echo "$as_me:7359: \$? = $ac_status" >&5
7360  (exit $ac_status); } &&
7361         { ac_try='test -s conftest.$ac_objext'
7362  { (eval echo "$as_me:7362: \"$ac_try\"") >&5
7363  (eval $ac_try) 2>&5
7364  ac_status=$?
7365  echo "$as_me:7365: \$? = $ac_status" >&5
7366  (exit $ac_status); }; }; then
7367  ac_cv_sys_file_offset_bits=64; break
7368else
7369  echo "$as_me: failed program was:" >&5
7370cat conftest.$ac_ext >&5
7371fi
7372rm -f conftest.$ac_objext conftest.$ac_ext
7373  break
7374done
7375fi
7376echo "$as_me:7376: result: $ac_cv_sys_file_offset_bits" >&5
7377echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7378if test "$ac_cv_sys_file_offset_bits" != no; then
7379
7380cat >>confdefs.h <<EOF
7381#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7382EOF
7383
7384fi
7385rm -f conftest*
7386  echo "$as_me:7386: checking for _LARGE_FILES value needed for large files" >&5
7387echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7388if test "${ac_cv_sys_large_files+set}" = set; then
7389  echo $ECHO_N "(cached) $ECHO_C" >&6
7390else
7391  while :; do
7392  ac_cv_sys_large_files=no
7393  cat >conftest.$ac_ext <<_ACEOF
7394#line 7394 "configure"
7395#include "confdefs.h"
7396#include <sys/types.h>
7397 /* Check that off_t can represent 2**63 - 1 correctly.
7398    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7399    since some C++ compilers masquerading as C compilers
7400    incorrectly reject 9223372036854775807.  */
7401#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7402  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7403		       && LARGE_OFF_T % 2147483647 == 1)
7404		      ? 1 : -1];
7405int
7406main ()
7407{
7408
7409  ;
7410  return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (eval echo "$as_me:7414: \"$ac_compile\"") >&5
7415  (eval $ac_compile) 2>&5
7416  ac_status=$?
7417  echo "$as_me:7417: \$? = $ac_status" >&5
7418  (exit $ac_status); } &&
7419         { ac_try='test -s conftest.$ac_objext'
7420  { (eval echo "$as_me:7420: \"$ac_try\"") >&5
7421  (eval $ac_try) 2>&5
7422  ac_status=$?
7423  echo "$as_me:7423: \$? = $ac_status" >&5
7424  (exit $ac_status); }; }; then
7425  break
7426else
7427  echo "$as_me: failed program was:" >&5
7428cat conftest.$ac_ext >&5
7429fi
7430rm -f conftest.$ac_objext conftest.$ac_ext
7431  cat >conftest.$ac_ext <<_ACEOF
7432#line 7432 "configure"
7433#include "confdefs.h"
7434#define _LARGE_FILES 1
7435#include <sys/types.h>
7436 /* Check that off_t can represent 2**63 - 1 correctly.
7437    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7438    since some C++ compilers masquerading as C compilers
7439    incorrectly reject 9223372036854775807.  */
7440#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7441  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7442		       && LARGE_OFF_T % 2147483647 == 1)
7443		      ? 1 : -1];
7444int
7445main ()
7446{
7447
7448  ;
7449  return 0;
7450}
7451_ACEOF
7452rm -f conftest.$ac_objext
7453if { (eval echo "$as_me:7453: \"$ac_compile\"") >&5
7454  (eval $ac_compile) 2>&5
7455  ac_status=$?
7456  echo "$as_me:7456: \$? = $ac_status" >&5
7457  (exit $ac_status); } &&
7458         { ac_try='test -s conftest.$ac_objext'
7459  { (eval echo "$as_me:7459: \"$ac_try\"") >&5
7460  (eval $ac_try) 2>&5
7461  ac_status=$?
7462  echo "$as_me:7462: \$? = $ac_status" >&5
7463  (exit $ac_status); }; }; then
7464  ac_cv_sys_large_files=1; break
7465else
7466  echo "$as_me: failed program was:" >&5
7467cat conftest.$ac_ext >&5
7468fi
7469rm -f conftest.$ac_objext conftest.$ac_ext
7470  break
7471done
7472fi
7473echo "$as_me:7473: result: $ac_cv_sys_large_files" >&5
7474echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7475if test "$ac_cv_sys_large_files" != no; then
7476
7477cat >>confdefs.h <<EOF
7478#define _LARGE_FILES $ac_cv_sys_large_files
7479EOF
7480
7481fi
7482rm -f conftest*
7483fi
7484
7485	# Normally we would collect these definitions in the config.h,
7486	# but (like _XOPEN_SOURCE), some environments rely on having these
7487	# defined before any of the system headers are included.  Another
7488	# case comes up with C++, e.g., on AIX the compiler compiles the
7489	# header files by themselves before looking at the body files it is
7490	# told to compile.  For ncurses, those header files do not include
7491	# the config.h
7492	test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
7493	test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
7494
7495	echo "$as_me:7495: checking whether to use struct dirent64" >&5
7496echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7497if test "${cf_cv_struct_dirent64+set}" = set; then
7498  echo $ECHO_N "(cached) $ECHO_C" >&6
7499else
7500
7501		cat >conftest.$ac_ext <<_ACEOF
7502#line 7502 "configure"
7503#include "confdefs.h"
7504
7505#include <sys/types.h>
7506#include <dirent.h>
7507
7508int
7509main ()
7510{
7511
7512		/* if transitional largefile support is setup, this is true */
7513		extern struct dirent64 * readdir(DIR *);
7514		struct dirent64 *x = readdir((DIR *)0);
7515		struct dirent *y = readdir((DIR *)0);
7516		int z = x - y;
7517
7518  ;
7519  return 0;
7520}
7521_ACEOF
7522rm -f conftest.$ac_objext
7523if { (eval echo "$as_me:7523: \"$ac_compile\"") >&5
7524  (eval $ac_compile) 2>&5
7525  ac_status=$?
7526  echo "$as_me:7526: \$? = $ac_status" >&5
7527  (exit $ac_status); } &&
7528         { ac_try='test -s conftest.$ac_objext'
7529  { (eval echo "$as_me:7529: \"$ac_try\"") >&5
7530  (eval $ac_try) 2>&5
7531  ac_status=$?
7532  echo "$as_me:7532: \$? = $ac_status" >&5
7533  (exit $ac_status); }; }; then
7534  cf_cv_struct_dirent64=yes
7535else
7536  echo "$as_me: failed program was:" >&5
7537cat conftest.$ac_ext >&5
7538cf_cv_struct_dirent64=no
7539fi
7540rm -f conftest.$ac_objext conftest.$ac_ext
7541
7542fi
7543echo "$as_me:7543: result: $cf_cv_struct_dirent64" >&5
7544echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7545	test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
7546#define HAVE_STRUCT_DIRENT64 1
7547EOF
7548
7549###   use option --with-bool to override bool's type
7550echo "$as_me:7550: checking for type of bool" >&5
7551echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
7552
7553# Check whether --with-bool or --without-bool was given.
7554if test "${with_bool+set}" = set; then
7555  withval="$with_bool"
7556  NCURSES_BOOL="$withval"
7557else
7558  NCURSES_BOOL=auto
7559fi;
7560echo "$as_me:7560: result: $NCURSES_BOOL" >&5
7561echo "${ECHO_T}$NCURSES_BOOL" >&6
7562
7563echo "$as_me:7563: checking for alternate terminal capabilities file" >&5
7564echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
7565
7566# Check whether --with-caps or --without-caps was given.
7567if test "${with_caps+set}" = set; then
7568  withval="$with_caps"
7569  TERMINFO_CAPS=Caps.$withval
7570else
7571  TERMINFO_CAPS=Caps
7572fi;
7573test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
7574echo "$as_me:7574: result: $TERMINFO_CAPS" >&5
7575echo "${ECHO_T}$TERMINFO_CAPS" >&6
7576
7577###   use option --with-chtype to override chtype's type
7578echo "$as_me:7578: checking for type of chtype" >&5
7579echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
7580
7581# Check whether --with-chtype or --without-chtype was given.
7582if test "${with_chtype+set}" = set; then
7583  withval="$with_chtype"
7584  NCURSES_CHTYPE="$withval"
7585else
7586  NCURSES_CHTYPE=auto
7587fi;
7588echo "$as_me:7588: result: $NCURSES_CHTYPE" >&5
7589echo "${ECHO_T}$NCURSES_CHTYPE" >&6
7590
7591###   use option --with-ospeed to override ospeed's type
7592echo "$as_me:7592: checking for type of ospeed" >&5
7593echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
7594
7595# Check whether --with-ospeed or --without-ospeed was given.
7596if test "${with_ospeed+set}" = set; then
7597  withval="$with_ospeed"
7598  NCURSES_OSPEED="$withval"
7599else
7600  NCURSES_OSPEED=short
7601fi;
7602echo "$as_me:7602: result: $NCURSES_OSPEED" >&5
7603echo "${ECHO_T}$NCURSES_OSPEED" >&6
7604
7605###   use option --with-mmask-t to override mmask_t's type
7606echo "$as_me:7606: checking for type of mmask_t" >&5
7607echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
7608
7609# Check whether --with-mmask-t or --without-mmask-t was given.
7610if test "${with_mmask_t+set}" = set; then
7611  withval="$with_mmask_t"
7612  NCURSES_MMASK_T="$withval"
7613else
7614  NCURSES_MMASK_T=auto
7615fi;
7616echo "$as_me:7616: result: $NCURSES_MMASK_T" >&5
7617echo "${ECHO_T}$NCURSES_MMASK_T" >&6
7618
7619###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7620echo "$as_me:7620: checking if tputs should process BSD-style prefix padding" >&5
7621echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7622
7623# Check whether --enable-bsdpad or --disable-bsdpad was given.
7624if test "${enable_bsdpad+set}" = set; then
7625  enableval="$enable_bsdpad"
7626  with_bsdpad=$enableval
7627else
7628  with_bsdpad=no
7629fi;
7630echo "$as_me:7630: result: $with_bsdpad" >&5
7631echo "${ECHO_T}$with_bsdpad" >&6
7632test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7633#define BSD_TPUTS 1
7634EOF
7635
7636### Enable compiling-in rcs id's
7637echo "$as_me:7637: checking if RCS identifiers should be compiled-in" >&5
7638echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
7639
7640# Check whether --with-rcs-ids or --without-rcs-ids was given.
7641if test "${with_rcs_ids+set}" = set; then
7642  withval="$with_rcs_ids"
7643  with_rcs_ids=$withval
7644else
7645  with_rcs_ids=no
7646fi;
7647echo "$as_me:7647: result: $with_rcs_ids" >&5
7648echo "${ECHO_T}$with_rcs_ids" >&6
7649test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
7650#define USE_RCS_IDS 1
7651EOF
7652
7653###############################################################################
7654
7655echo "$as_me:7655: checking format of man-pages" >&5
7656echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
7657
7658# Check whether --with-manpage-format or --without-manpage-format was given.
7659if test "${with_manpage_format+set}" = set; then
7660  withval="$with_manpage_format"
7661  MANPAGE_FORMAT=$withval
7662else
7663  MANPAGE_FORMAT=unknown
7664fi;
7665
7666test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
7667MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
7668
7669cf_unknown=
7670
7671case $MANPAGE_FORMAT in
7672unknown)
7673  if test -z "$MANPATH" ; then
7674    MANPATH="/usr/man:/usr/share/man"
7675  fi
7676
7677  # look for the 'date' man-page (it's most likely to be installed!)
7678  MANPAGE_FORMAT=
7679  cf_preform=no
7680  cf_catonly=yes
7681  cf_example=date
7682
7683  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
7684  for cf_dir in $MANPATH; do
7685    test -z "$cf_dir" && cf_dir=/usr/man
7686    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
7687    do
7688      cf_test=`echo $cf_name | sed -e 's/*//'`
7689      if test "x$cf_test" = "x$cf_name" ; then
7690
7691	case "$cf_name" in
7692	*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
7693	*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
7694	*.0)	MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
7695	*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
7696	esac
7697
7698	case "$cf_name" in
7699	$cf_dir/man*)
7700	  cf_catonly=no
7701	  ;;
7702	$cf_dir/cat*)
7703	  cf_preform=yes
7704	  ;;
7705	esac
7706	break
7707      fi
7708
7709      # if we found a match in either man* or cat*, stop looking
7710      if test -n "$MANPAGE_FORMAT" ; then
7711	cf_found=no
7712	test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
7713	test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
7714	case "$cf_name" in
7715	$cf_dir/cat*)
7716	  cf_found=yes
7717	  ;;
7718	esac
7719	test $cf_found=yes && break
7720      fi
7721    done
7722    # only check the first directory in $MANPATH where we find manpages
7723    if test -n "$MANPAGE_FORMAT" ; then
7724       break
7725    fi
7726  done
7727  # if we did not find the example, just assume it is normal
7728  test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
7729  IFS="$ac_save_ifs"
7730  ;;
7731*)
7732  for cf_option in $MANPAGE_FORMAT; do
7733     case $cf_option in #(vi
7734     gzip|compress|BSDI|normal|formatted|catonly)
7735       ;;
7736     *)
7737       cf_unknown="$cf_unknown $cf_option"
7738       ;;
7739     esac
7740  done
7741  ;;
7742esac
7743
7744echo "$as_me:7744: result: $MANPAGE_FORMAT" >&5
7745echo "${ECHO_T}$MANPAGE_FORMAT" >&6
7746if test -n "$cf_unknown" ; then
7747  { echo "$as_me:7747: WARNING: Unexpected manpage-format $cf_unknown" >&5
7748echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
7749fi
7750
7751echo "$as_me:7751: checking for manpage renaming" >&5
7752echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
7753
7754# Check whether --with-manpage-renames or --without-manpage-renames was given.
7755if test "${with_manpage_renames+set}" = set; then
7756  withval="$with_manpage_renames"
7757  MANPAGE_RENAMES=$withval
7758else
7759  MANPAGE_RENAMES=yes
7760fi;
7761
7762case ".$MANPAGE_RENAMES" in #(vi
7763.no) #(vi
7764  ;;
7765.|.yes)
7766  # Debian 'man' program?
7767  if test -f /etc/debian_version ; then
7768    MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
7769  else
7770    MANPAGE_RENAMES=no
7771  fi
7772  ;;
7773esac
7774
7775if test "$MANPAGE_RENAMES" != no ; then
7776  if test -f $srcdir/man/$MANPAGE_RENAMES ; then
7777    MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
7778  elif test ! -f $MANPAGE_RENAMES ; then
7779    { { echo "$as_me:7779: error: not a filename: $MANPAGE_RENAMES" >&5
7780echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
7781   { (exit 1); exit 1; }; }
7782  fi
7783
7784  test ! -d man && mkdir man
7785
7786  # Construct a sed-script to perform renaming within man-pages
7787  if test -n "$MANPAGE_RENAMES" ; then
7788    test ! -d man && mkdir man
7789    sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
7790  fi
7791fi
7792
7793echo "$as_me:7793: result: $MANPAGE_RENAMES" >&5
7794echo "${ECHO_T}$MANPAGE_RENAMES" >&6
7795
7796echo "$as_me:7796: checking if manpage aliases will be installed" >&5
7797echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
7798
7799# Check whether --with-manpage-aliases or --without-manpage-aliases was given.
7800if test "${with_manpage_aliases+set}" = set; then
7801  withval="$with_manpage_aliases"
7802  MANPAGE_ALIASES=$withval
7803else
7804  MANPAGE_ALIASES=yes
7805fi;
7806
7807echo "$as_me:7807: result: $MANPAGE_ALIASES" >&5
7808echo "${ECHO_T}$MANPAGE_ALIASES" >&6
7809
7810if test "$LN_S" = "ln -s"; then
7811	cf_use_symlinks=yes
7812else
7813	cf_use_symlinks=no
7814fi
7815
7816MANPAGE_SYMLINKS=no
7817if test "$MANPAGE_ALIASES" = yes ; then
7818echo "$as_me:7818: checking if manpage symlinks should be used" >&5
7819echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
7820
7821# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
7822if test "${with_manpage_symlinks+set}" = set; then
7823  withval="$with_manpage_symlinks"
7824  MANPAGE_SYMLINKS=$withval
7825else
7826  MANPAGE_SYMLINKS=$cf_use_symlinks
7827fi;
7828
7829if test "$$cf_use_symlinks" = no; then
7830if test "$MANPAGE_SYMLINKS" = yes ; then
7831	{ echo "$as_me:7831: WARNING: cannot make symlinks" >&5
7832echo "$as_me: WARNING: cannot make symlinks" >&2;}
7833	MANPAGE_SYMLINKS=no
7834fi
7835fi
7836
7837echo "$as_me:7837: result: $MANPAGE_SYMLINKS" >&5
7838echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
7839fi
7840
7841echo "$as_me:7841: checking for manpage tbl" >&5
7842echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
7843
7844# Check whether --with-manpage-tbl or --without-manpage-tbl was given.
7845if test "${with_manpage_tbl+set}" = set; then
7846  withval="$with_manpage_tbl"
7847  MANPAGE_TBL=$withval
7848else
7849  MANPAGE_TBL=no
7850fi;
7851
7852echo "$as_me:7852: result: $MANPAGE_TBL" >&5
7853echo "${ECHO_T}$MANPAGE_TBL" >&6
7854
7855  if test "$prefix" = "NONE" ; then
7856     cf_prefix="$ac_default_prefix"
7857  else
7858     cf_prefix="$prefix"
7859  fi
7860
7861  case "$MANPAGE_FORMAT" in # (vi
7862  *catonly*) # (vi
7863    cf_format=yes
7864    cf_inboth=no
7865    ;;
7866  *formatted*) # (vi
7867    cf_format=yes
7868    cf_inboth=yes
7869    ;;
7870  *)
7871    cf_format=no
7872    cf_inboth=no
7873    ;;
7874  esac
7875
7876test ! -d man && mkdir man
7877
7878cf_so_strip=
7879cf_compress=
7880case "$MANPAGE_FORMAT" in #(vi
7881*compress*) #(vi
7882	cf_so_strip="Z"
7883	cf_compress=compress
7884  ;;
7885*gzip*) #(vi
7886	cf_so_strip="gz"
7887	cf_compress=gzip
7888  ;;
7889esac
7890
7891cf_edit_man=./edit_man.sh
7892
7893cat >$cf_edit_man <<CF_EOF
7894#! /bin/sh
7895# this script is generated by the configure-script CF_MAN_PAGES macro.
7896prefix="$cf_prefix"
7897datadir="$datadir"
7898NCURSES_OSPEED="$NCURSES_OSPEED"
7899TERMINFO="$TERMINFO"
7900MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
7901INSTALL="$INSTALL"
7902INSTALL_DATA="$INSTALL_DATA"
7903transform="$program_transform_name"
7904
7905TMP=\${TMPDIR-/tmp}/man\$\$
7906trap "rm -f \$TMP" 0 1 2 5 15
7907
7908form=\$1
7909shift || exit 1
7910
7911verb=\$1
7912shift || exit 1
7913
7914mandir=\$1
7915shift || exit 1
7916
7917srcdir=\$1
7918top_srcdir=\$srcdir/..
7919shift || exit 1
7920
7921if test "\$form" = normal ; then
7922	if test "$cf_format" = yes ; then
7923	if test "$cf_inboth" = no ; then
7924		sh \$0 format \$verb \$mandir \$srcdir \$*
7925		exit $?
7926	fi
7927	fi
7928	cf_subdir=\$mandir/man
7929	cf_tables=$MANPAGE_TBL
7930else
7931	cf_subdir=\$mandir/cat
7932	cf_tables=yes
7933fi
7934
7935# process the list of source-files
7936for i in \$* ; do
7937case \$i in #(vi
7938*.orig|*.rej) ;; #(vi
7939*.[0-9]*)
7940	section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
7941	if test \$verb = installing ; then
7942	if test ! -d \$cf_subdir\${section} ; then
7943		\$MKDIRS \$cf_subdir\$section
7944	fi
7945	fi
7946	aliases=
7947	source=\`basename \$i\`
7948	inalias=\$source
7949	test ! -f \$inalias && inalias="\$srcdir/\$inalias"
7950	if test ! -f \$inalias ; then
7951		echo .. skipped \$source
7952		continue
7953	fi
7954CF_EOF
7955
7956if test "$MANPAGE_ALIASES" != no ; then
7957cat >>$cf_edit_man <<CF_EOF
7958	aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias | sort -u\`
7959CF_EOF
7960fi
7961
7962if test "$MANPAGE_RENAMES" = no ; then
7963cat >>$cf_edit_man <<CF_EOF
7964	# perform program transformations for section 1 man pages
7965	if test \$section = 1 ; then
7966		target=\$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
7967	else
7968		target=\$cf_subdir\${section}/\$source
7969	fi
7970CF_EOF
7971else
7972cat >>$cf_edit_man <<CF_EOF
7973	target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
7974	if test -z "\$target" ; then
7975		echo '? missing rename for '\$source
7976		target="\$source"
7977	fi
7978	target="\$cf_subdir\${section}/\${target}"
7979CF_EOF
7980fi
7981
7982	# replace variables in man page
7983
7984	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
7985	do
7986cat >>$cf_edit_man <<CF_EOF
7987	prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
7988CF_EOF
7989	done
7990
7991cat >>$cf_edit_man <<CF_EOF
7992	sed	-e "s,@DATADIR@,\$datadir," \\
7993		-e "s,@TERMINFO@,\$TERMINFO," \\
7994		-e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
7995CF_EOF
7996
7997	for cf_name in  captoinfo clear infocmp infotocap tic toe tput
7998	do
7999		cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8000cat >>$cf_edit_man <<CF_EOF
8001		-e "s,@$cf_NAME@,\$prog_$cf_name," \\
8002CF_EOF
8003	done
8004
8005if test -f $MANPAGE_RENAMES ; then
8006cat >>$cf_edit_man <<CF_EOF
8007		< \$i | sed -f `pwd`/edit_man.sed >\$TMP
8008CF_EOF
8009else
8010cat >>$cf_edit_man <<CF_EOF
8011		< \$i >\$TMP
8012CF_EOF
8013fi
8014
8015cat >>$cf_edit_man <<CF_EOF
8016if test \$cf_tables = yes ; then
8017	tbl \$TMP >\$TMP.out
8018	mv \$TMP.out \$TMP
8019fi
8020CF_EOF
8021
8022if test $with_curses_h != yes ; then
8023cat >>$cf_edit_man <<CF_EOF
8024	sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
8025	mv \$TMP.out \$TMP
8026CF_EOF
8027fi
8028
8029cat >>$cf_edit_man <<CF_EOF
8030	if test \$form = format ; then
8031		nroff -man \$TMP >\$TMP.out
8032		mv \$TMP.out \$TMP
8033	fi
8034CF_EOF
8035
8036if test -n "$cf_compress" ; then
8037cat >>$cf_edit_man <<CF_EOF
8038	if test \$verb = installing ; then
8039	if ( $cf_compress -f \$TMP )
8040	then
8041		mv \$TMP.$cf_so_strip \$TMP
8042	fi
8043	fi
8044	target="\$target.$cf_so_strip"
8045CF_EOF
8046fi
8047
8048case "$MANPAGE_FORMAT" in #(vi
8049*BSDI*)
8050cat >>$cf_edit_man <<CF_EOF
8051	if test \$form = format ; then
8052		# BSDI installs only .0 suffixes in the cat directories
8053		target="\`echo \$target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
8054	fi
8055CF_EOF
8056  ;;
8057esac
8058
8059cat >>$cf_edit_man <<CF_EOF
8060	suffix=\`basename \$target | sed -e 's%^[^.]*%%'\`
8061	if test \$verb = installing ; then
8062		echo \$verb \$target
8063		\$INSTALL_DATA \$TMP \$target
8064		test -n "\$aliases" && (
8065			cd \$cf_subdir\${section} && (
8066				source=\`echo \$target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
8067				test -n "$cf_so_strip" && source=\`echo \$source |sed -e 's%\.$cf_so_strip\$%%'\`
8068				target=\`basename \$target\`
8069				for cf_alias in \$aliases
8070				do
8071					if test \$section = 1 ; then
8072						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8073					fi
8074
8075					if test "$MANPAGE_SYMLINKS" = yes ; then
8076						if test -f \$cf_alias\${suffix} ; then
8077							if ( cmp -s \$target \$cf_alias\${suffix} )
8078							then
8079								continue
8080							fi
8081						fi
8082						echo .. \$verb alias \$cf_alias\${suffix}
8083						rm -f \$cf_alias\${suffix}
8084						$LN_S \$target \$cf_alias\${suffix}
8085					elif test "\$target" != "\$cf_alias\${suffix}" ; then
8086						echo ".so \$source" >\$TMP
8087CF_EOF
8088if test -n "$cf_compress" ; then
8089cat >>$cf_edit_man <<CF_EOF
8090						if test -n "$cf_so_strip" ; then
8091							$cf_compress -f \$TMP
8092							mv \$TMP.$cf_so_strip \$TMP
8093						fi
8094CF_EOF
8095fi
8096cat >>$cf_edit_man <<CF_EOF
8097						echo .. \$verb alias \$cf_alias\${suffix}
8098						rm -f \$cf_alias\${suffix}
8099						\$INSTALL_DATA \$TMP \$cf_alias\${suffix}
8100					fi
8101				done
8102			)
8103		)
8104	elif test \$verb = removing ; then
8105		echo \$verb \$target
8106		rm -f \$target
8107		test -n "\$aliases" && (
8108			cd \$cf_subdir\${section} && (
8109				for cf_alias in \$aliases
8110				do
8111					if test \$section = 1 ; then
8112						cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
8113					fi
8114
8115					echo .. \$verb alias \$cf_alias\${suffix}
8116					rm -f \$cf_alias\${suffix}
8117				done
8118			)
8119		)
8120	else
8121#		echo ".hy 0"
8122		cat \$TMP
8123	fi
8124	;;
8125esac
8126done
8127
8128if test $cf_inboth = yes ; then
8129if test \$form != format ; then
8130	sh \$0 format \$verb \$mandir \$srcdir \$*
8131fi
8132fi
8133
8134exit 0
8135CF_EOF
8136chmod 755 $cf_edit_man
8137
8138###############################################################################
8139
8140### Note that some functions (such as const) are normally disabled anyway.
8141echo "$as_me:8141: checking if you want to build with function extensions" >&5
8142echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
8143
8144# Check whether --enable-ext-funcs or --disable-ext-funcs was given.
8145if test "${enable_ext_funcs+set}" = set; then
8146  enableval="$enable_ext_funcs"
8147  with_ext_funcs=$enableval
8148else
8149  with_ext_funcs=yes
8150fi;
8151echo "$as_me:8151: result: $with_ext_funcs" >&5
8152echo "${ECHO_T}$with_ext_funcs" >&6
8153if test "$with_ext_funcs" = yes ; then
8154	NCURSES_EXT_FUNCS=1
8155	cat >>confdefs.h <<\EOF
8156#define HAVE_CURSES_VERSION 1
8157EOF
8158
8159	cat >>confdefs.h <<\EOF
8160#define HAVE_HAS_KEY 1
8161EOF
8162
8163	cat >>confdefs.h <<\EOF
8164#define HAVE_RESIZETERM 1
8165EOF
8166
8167	cat >>confdefs.h <<\EOF
8168#define HAVE_RESIZE_TERM 1
8169EOF
8170
8171	cat >>confdefs.h <<\EOF
8172#define HAVE_USE_DEFAULT_COLORS 1
8173EOF
8174
8175	cat >>confdefs.h <<\EOF
8176#define HAVE_WRESIZE 1
8177EOF
8178
8179	cat >>confdefs.h <<\EOF
8180#define NCURSES_EXT_FUNCS 1
8181EOF
8182
8183else
8184	NCURSES_EXT_FUNCS=0
8185fi
8186
8187###   use option --enable-const to turn on use of const beyond that in XSI.
8188echo "$as_me:8188: checking for extended use of const keyword" >&5
8189echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
8190
8191# Check whether --enable-const or --disable-const was given.
8192if test "${enable_const+set}" = set; then
8193  enableval="$enable_const"
8194  with_ext_const=$enableval
8195else
8196  with_ext_const=no
8197fi;
8198echo "$as_me:8198: result: $with_ext_const" >&5
8199echo "${ECHO_T}$with_ext_const" >&6
8200NCURSES_CONST='/*nothing*/'
8201if test "$with_ext_const" = yes ; then
8202	NCURSES_CONST=const
8203fi
8204
8205echo "$as_me:8205: checking if you want \$NCURSES_NO_PADDING code" >&5
8206echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
8207
8208# Check whether --enable-no-padding or --disable-no-padding was given.
8209if test "${enable_no_padding+set}" = set; then
8210  enableval="$enable_no_padding"
8211  with_no_padding=$enableval
8212else
8213  with_no_padding=$with_ext_funcs
8214fi;
8215echo "$as_me:8215: result: $with_no_padding" >&5
8216echo "${ECHO_T}$with_no_padding" >&6
8217test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
8218#define NCURSES_NO_PADDING 1
8219EOF
8220
8221###   use option --enable-sigwinch to turn on use of SIGWINCH logic
8222echo "$as_me:8222: checking if you want SIGWINCH handler" >&5
8223echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
8224
8225# Check whether --enable-sigwinch or --disable-sigwinch was given.
8226if test "${enable_sigwinch+set}" = set; then
8227  enableval="$enable_sigwinch"
8228  with_sigwinch=$enableval
8229else
8230  with_sigwinch=$with_ext_funcs
8231fi;
8232echo "$as_me:8232: result: $with_sigwinch" >&5
8233echo "${ECHO_T}$with_sigwinch" >&6
8234test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
8235#define USE_SIGWINCH 1
8236EOF
8237
8238###   use option --enable-tcap-names to allow user to define new capabilities
8239echo "$as_me:8239: checking if you want user-definable terminal capabilities like termcap" >&5
8240echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
8241
8242# Check whether --enable-tcap-names or --disable-tcap-names was given.
8243if test "${enable_tcap_names+set}" = set; then
8244  enableval="$enable_tcap_names"
8245  with_tcap_names=$enableval
8246else
8247  with_tcap_names=$with_ext_funcs
8248fi;
8249echo "$as_me:8249: result: $with_tcap_names" >&5
8250echo "${ECHO_T}$with_tcap_names" >&6
8251NCURSES_XNAMES=0
8252test "$with_tcap_names" = yes && NCURSES_XNAMES=1
8253
8254###############################################################################
8255# These options are relatively safe to experiment with.
8256
8257echo "$as_me:8257: checking if you want all development code" >&5
8258echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
8259
8260# Check whether --with-develop or --without-develop was given.
8261if test "${with_develop+set}" = set; then
8262  withval="$with_develop"
8263  with_develop=$withval
8264else
8265  with_develop=no
8266fi;
8267echo "$as_me:8267: result: $with_develop" >&5
8268echo "${ECHO_T}$with_develop" >&6
8269
8270###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
8271echo "$as_me:8271: checking if you want hard-tabs code" >&5
8272echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
8273
8274# Check whether --enable-hard-tabs or --disable-hard-tabs was given.
8275if test "${enable_hard_tabs+set}" = set; then
8276  enableval="$enable_hard_tabs"
8277  with_hardtabs=$enableval
8278else
8279  with_hardtabs=$with_develop
8280fi;
8281echo "$as_me:8281: result: $with_hardtabs" >&5
8282echo "${ECHO_T}$with_hardtabs" >&6
8283test "$with_hardtabs" = yes && cat >>confdefs.h <<\EOF
8284#define USE_HARD_TABS 1
8285EOF
8286
8287###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
8288echo "$as_me:8288: checking if you want limited support for xmc" >&5
8289echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
8290
8291# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
8292if test "${enable_xmc_glitch+set}" = set; then
8293  enableval="$enable_xmc_glitch"
8294  with_xmc_glitch=$enableval
8295else
8296  with_xmc_glitch=$with_develop
8297fi;
8298echo "$as_me:8298: result: $with_xmc_glitch" >&5
8299echo "${ECHO_T}$with_xmc_glitch" >&6
8300test "$with_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
8301#define USE_XMC_SUPPORT 1
8302EOF
8303
8304###############################################################################
8305# These are just experimental, probably should not be in a package:
8306
8307echo "$as_me:8307: checking if you do not want to assume colors are white-on-black" >&5
8308echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
8309
8310# Check whether --enable-assumed-color or --disable-assumed-color was given.
8311if test "${enable_assumed_color+set}" = set; then
8312  enableval="$enable_assumed_color"
8313  with_assumed_color=$enableval
8314else
8315  with_assumed_color=yes
8316fi;
8317echo "$as_me:8317: result: $with_assumed_color" >&5
8318echo "${ECHO_T}$with_assumed_color" >&6
8319test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
8320#define USE_ASSUMED_COLOR 1
8321EOF
8322
8323###   use option --enable-hashmap to turn on use of hashmap scrolling logic
8324echo "$as_me:8324: checking if you want hashmap scrolling-optimization code" >&5
8325echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
8326
8327# Check whether --enable-hashmap or --disable-hashmap was given.
8328if test "${enable_hashmap+set}" = set; then
8329  enableval="$enable_hashmap"
8330  with_hashmap=$enableval
8331else
8332  with_hashmap=yes
8333fi;
8334echo "$as_me:8334: result: $with_hashmap" >&5
8335echo "${ECHO_T}$with_hashmap" >&6
8336test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
8337#define USE_HASHMAP 1
8338EOF
8339
8340###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
8341echo "$as_me:8341: checking if you want colorfgbg code" >&5
8342echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
8343
8344# Check whether --enable-colorfgbg or --disable-colorfgbg was given.
8345if test "${enable_colorfgbg+set}" = set; then
8346  enableval="$enable_colorfgbg"
8347  with_colorfgbg=$enableval
8348else
8349  with_colorfgbg=no
8350fi;
8351echo "$as_me:8351: result: $with_colorfgbg" >&5
8352echo "${ECHO_T}$with_colorfgbg" >&6
8353test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
8354#define USE_COLORFGBG 1
8355EOF
8356
8357###   use option --enable-ext-colors to turn on use of colors beyond 16.
8358echo "$as_me:8358: checking if you want to use experimental extended colors" >&5
8359echo $ECHO_N "checking if you want to use experimental extended colors... $ECHO_C" >&6
8360
8361# Check whether --enable-ext-colors or --disable-ext-colors was given.
8362if test "${enable_ext_colors+set}" = set; then
8363  enableval="$enable_ext_colors"
8364  with_ext_colors=$enableval
8365else
8366  with_ext_colors=no
8367fi;
8368echo "$as_me:8368: result: $with_ext_colors" >&5
8369echo "${ECHO_T}$with_ext_colors" >&6
8370NCURSES_EXT_COLORS=0
8371if test "$with_ext_colors" = yes ; then
8372	if test "$with_widec" != yes ; then
8373		{ echo "$as_me:8373: WARNING: This option applies only to wide-character library" >&5
8374echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
8375	else
8376		# cannot be ABI 5 since it changes sizeof(cchar_t)
8377
8378if test "${with_abi_version+set}" != set; then
8379	case $cf_cv_rel_version in
8380	5.*)
8381		cf_cv_rel_version=6.0
8382		cf_cv_abi_version=6
8383		{ echo "$as_me:8383: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8384echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8385		;;
8386	esac
8387fi
8388
8389	fi
8390	NCURSES_EXT_COLORS=1
8391	cat >>confdefs.h <<\EOF
8392#define NCURSES_EXT_COLORS 1
8393EOF
8394
8395fi
8396
8397###   use option --enable-ext-mouse to modify coding to support 5-button mice
8398echo "$as_me:8398: checking if you want to use experimental extended mouse encoding" >&5
8399echo $ECHO_N "checking if you want to use experimental extended mouse encoding... $ECHO_C" >&6
8400
8401# Check whether --enable-ext-mouse or --disable-ext-mouse was given.
8402if test "${enable_ext_mouse+set}" = set; then
8403  enableval="$enable_ext_mouse"
8404  with_ext_mouse=$enableval
8405else
8406  with_ext_mouse=no
8407fi;
8408echo "$as_me:8408: result: $with_ext_mouse" >&5
8409echo "${ECHO_T}$with_ext_mouse" >&6
8410NCURSES_MOUSE_VERSION=1
8411if test "$with_ext_mouse" = yes ; then
8412	NCURSES_MOUSE_VERSION=2
8413
8414if test "${with_abi_version+set}" != set; then
8415	case $cf_cv_rel_version in
8416	5.*)
8417		cf_cv_rel_version=6.0
8418		cf_cv_abi_version=6
8419		{ echo "$as_me:8419: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
8420echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
8421		;;
8422	esac
8423fi
8424
8425fi
8426
8427echo "$as_me:8427: checking if you want experimental safe-sprintf code" >&5
8428echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
8429
8430# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
8431if test "${enable_safe_sprintf+set}" = set; then
8432  enableval="$enable_safe_sprintf"
8433  with_safe_sprintf=$enableval
8434else
8435  with_safe_sprintf=no
8436fi;
8437echo "$as_me:8437: result: $with_safe_sprintf" >&5
8438echo "${ECHO_T}$with_safe_sprintf" >&6
8439test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
8440#define USE_SAFE_SPRINTF 1
8441EOF
8442
8443###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
8444# when hashmap is used scroll hints are useless
8445if test "$with_hashmap" = no ; then
8446echo "$as_me:8446: checking if you want to experiment without scrolling-hints code" >&5
8447echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
8448
8449# Check whether --enable-scroll-hints or --disable-scroll-hints was given.
8450if test "${enable_scroll_hints+set}" = set; then
8451  enableval="$enable_scroll_hints"
8452  with_scroll_hints=$enableval
8453else
8454  with_scroll_hints=yes
8455fi;
8456echo "$as_me:8456: result: $with_scroll_hints" >&5
8457echo "${ECHO_T}$with_scroll_hints" >&6
8458test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
8459#define USE_SCROLL_HINTS 1
8460EOF
8461
8462fi
8463
8464###############################################################################
8465
8466###	use option --disable-echo to suppress full display compiling commands
8467echo "$as_me:8467: checking if you want to display full commands during build" >&5
8468echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
8469
8470# Check whether --enable-echo or --disable-echo was given.
8471if test "${enable_echo+set}" = set; then
8472  enableval="$enable_echo"
8473  with_echo=$enableval
8474else
8475  with_echo=yes
8476fi;
8477if test "$with_echo" = yes; then
8478	ECHO_LINK=
8479else
8480	ECHO_LINK='@ echo linking $@ ... ;'
8481	test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
8482fi
8483echo "$as_me:8483: result: $with_echo" >&5
8484echo "${ECHO_T}$with_echo" >&6
8485
8486###	use option --enable-warnings to turn on all gcc warnings
8487echo "$as_me:8487: checking if you want to see compiler warnings" >&5
8488echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
8489
8490# Check whether --enable-warnings or --disable-warnings was given.
8491if test "${enable_warnings+set}" = set; then
8492  enableval="$enable_warnings"
8493  with_warnings=$enableval
8494fi;
8495echo "$as_me:8495: result: $with_warnings" >&5
8496echo "${ECHO_T}$with_warnings" >&6
8497
8498if test -n "$with_warnings"; then
8499 	ADAFLAGS="$ADAFLAGS -gnatg"
8500
8501INTEL_COMPILER=no
8502
8503if test "$GCC" = yes ; then
8504	case $host_os in
8505	linux*|gnu*)
8506		echo "$as_me:8506: checking if this is really Intel C compiler" >&5
8507echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
8508		cf_save_CFLAGS="$CFLAGS"
8509		CFLAGS="$CFLAGS -no-gcc"
8510		cat >conftest.$ac_ext <<_ACEOF
8511#line 8511 "configure"
8512#include "confdefs.h"
8513
8514int
8515main ()
8516{
8517
8518#ifdef __INTEL_COMPILER
8519#else
8520make an error
8521#endif
8522
8523  ;
8524  return 0;
8525}
8526_ACEOF
8527rm -f conftest.$ac_objext
8528if { (eval echo "$as_me:8528: \"$ac_compile\"") >&5
8529  (eval $ac_compile) 2>&5
8530  ac_status=$?
8531  echo "$as_me:8531: \$? = $ac_status" >&5
8532  (exit $ac_status); } &&
8533         { ac_try='test -s conftest.$ac_objext'
8534  { (eval echo "$as_me:8534: \"$ac_try\"") >&5
8535  (eval $ac_try) 2>&5
8536  ac_status=$?
8537  echo "$as_me:8537: \$? = $ac_status" >&5
8538  (exit $ac_status); }; }; then
8539  INTEL_COMPILER=yes
8540cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
8541
8542else
8543  echo "$as_me: failed program was:" >&5
8544cat conftest.$ac_ext >&5
8545fi
8546rm -f conftest.$ac_objext conftest.$ac_ext
8547		CFLAGS="$cf_save_CFLAGS"
8548		echo "$as_me:8548: result: $INTEL_COMPILER" >&5
8549echo "${ECHO_T}$INTEL_COMPILER" >&6
8550		;;
8551	esac
8552fi
8553
8554cat > conftest.$ac_ext <<EOF
8555#line 8555 "configure"
8556int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8557EOF
8558
8559if test "$INTEL_COMPILER" = yes
8560then
8561# The "-wdXXX" options suppress warnings:
8562# remark #1419: external declaration in primary source file
8563# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8564# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8565# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8566# remark #193: zero used for undefined preprocessing identifier
8567# remark #593: variable "curs_sb_left_arrow" was set but never used
8568# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8569# remark #869: parameter "tw" was never referenced
8570# remark #981: operands are evaluated in unspecified order
8571# warning #269: invalid format string conversion
8572
8573	{ echo "$as_me:8573: checking for $CC warning options..." >&5
8574echo "$as_me: checking for $CC warning options..." >&6;}
8575	cf_save_CFLAGS="$CFLAGS"
8576	EXTRA_CFLAGS="-Wall"
8577	for cf_opt in  \
8578		wd1419 \
8579		wd1682 \
8580		wd1683 \
8581		wd1684 \
8582		wd193 \
8583		wd279 \
8584		wd593 \
8585		wd810 \
8586		wd869 \
8587		wd981
8588	do
8589		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8590		if { (eval echo "$as_me:8590: \"$ac_compile\"") >&5
8591  (eval $ac_compile) 2>&5
8592  ac_status=$?
8593  echo "$as_me:8593: \$? = $ac_status" >&5
8594  (exit $ac_status); }; then
8595			test -n "$verbose" && echo "$as_me:8595: result: ... -$cf_opt" >&5
8596echo "${ECHO_T}... -$cf_opt" >&6
8597			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8598		fi
8599	done
8600	CFLAGS="$cf_save_CFLAGS"
8601
8602elif test "$GCC" = yes
8603then
8604	{ echo "$as_me:8604: checking for $CC warning options..." >&5
8605echo "$as_me: checking for $CC warning options..." >&6;}
8606	cf_save_CFLAGS="$CFLAGS"
8607	EXTRA_CFLAGS="-W -Wall"
8608	cf_warn_CONST=""
8609	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
8610	for cf_opt in \
8611		Wbad-function-cast \
8612		Wcast-align \
8613		Wcast-qual \
8614		Winline \
8615		Wmissing-declarations \
8616		Wmissing-prototypes \
8617		Wnested-externs \
8618		Wpointer-arith \
8619		Wshadow \
8620		Wstrict-prototypes \
8621		Wundef $cf_warn_CONST
8622	do
8623		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8624		if { (eval echo "$as_me:8624: \"$ac_compile\"") >&5
8625  (eval $ac_compile) 2>&5
8626  ac_status=$?
8627  echo "$as_me:8627: \$? = $ac_status" >&5
8628  (exit $ac_status); }; then
8629			test -n "$verbose" && echo "$as_me:8629: result: ... -$cf_opt" >&5
8630echo "${ECHO_T}... -$cf_opt" >&6
8631			case $cf_opt in #(vi
8632			Wcast-qual) #(vi
8633				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
8634				;;
8635			Winline) #(vi
8636				case $GCC_VERSION in
8637				3.3*)
8638					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
8639
8640					continue;;
8641				esac
8642				;;
8643			esac
8644			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8645		fi
8646	done
8647	CFLAGS="$cf_save_CFLAGS"
8648fi
8649rm -f conftest*
8650
8651	if test "$cf_with_cxx" = yes ; then
8652
8653INTEL_CPLUSPLUS=no
8654
8655if test "$GCC" = yes ; then
8656	case $host_os in
8657	linux*|gnu*)
8658		echo "$as_me:8658: checking if this is really Intel C++ compiler" >&5
8659echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
8660		cf_save_CFLAGS="$CXXFLAGS"
8661		CXXFLAGS="$CXXFLAGS -no-gcc"
8662		cat >conftest.$ac_ext <<_ACEOF
8663#line 8663 "configure"
8664#include "confdefs.h"
8665
8666int
8667main ()
8668{
8669
8670#ifdef __INTEL_COMPILER
8671#else
8672make an error
8673#endif
8674
8675  ;
8676  return 0;
8677}
8678_ACEOF
8679rm -f conftest.$ac_objext
8680if { (eval echo "$as_me:8680: \"$ac_compile\"") >&5
8681  (eval $ac_compile) 2>&5
8682  ac_status=$?
8683  echo "$as_me:8683: \$? = $ac_status" >&5
8684  (exit $ac_status); } &&
8685         { ac_try='test -s conftest.$ac_objext'
8686  { (eval echo "$as_me:8686: \"$ac_try\"") >&5
8687  (eval $ac_try) 2>&5
8688  ac_status=$?
8689  echo "$as_me:8689: \$? = $ac_status" >&5
8690  (exit $ac_status); }; }; then
8691  INTEL_CPLUSPLUS=yes
8692cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
8693
8694else
8695  echo "$as_me: failed program was:" >&5
8696cat conftest.$ac_ext >&5
8697fi
8698rm -f conftest.$ac_objext conftest.$ac_ext
8699		CXXFLAGS="$cf_save_CFLAGS"
8700		echo "$as_me:8700: result: $INTEL_CPLUSPLUS" >&5
8701echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
8702		;;
8703	esac
8704fi
8705
8706ac_ext=cc
8707ac_cpp='$CXXCPP $CPPFLAGS'
8708ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8709ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8710ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
8711
8712cat > conftest.$ac_ext <<EOF
8713#line 8713 "configure"
8714int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8715EOF
8716
8717if test "$INTEL_CPLUSPLUS" = yes
8718then
8719# The "-wdXXX" options suppress warnings:
8720# remark #1419: external declaration in primary source file
8721# remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8722# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8723# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8724# remark #193: zero used for undefined preprocessing identifier
8725# remark #593: variable "curs_sb_left_arrow" was set but never used
8726# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8727# remark #869: parameter "tw" was never referenced
8728# remark #981: operands are evaluated in unspecified order
8729# warning #269: invalid format string conversion
8730
8731	{ echo "$as_me:8731: checking for $CC warning options..." >&5
8732echo "$as_me: checking for $CC warning options..." >&6;}
8733	cf_save_CXXFLAGS="$CXXFLAGS"
8734	EXTRA_CXXFLAGS="-Wall"
8735	for cf_opt in \
8736		wd1419 \
8737		wd1682 \
8738		wd1683 \
8739		wd1684 \
8740		wd193 \
8741		wd279 \
8742		wd593 \
8743		wd810 \
8744		wd869 \
8745		wd981
8746	do
8747		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
8748		if { (eval echo "$as_me:8748: \"$ac_compile\"") >&5
8749  (eval $ac_compile) 2>&5
8750  ac_status=$?
8751  echo "$as_me:8751: \$? = $ac_status" >&5
8752  (exit $ac_status); }; then
8753			test -n "$verbose" && echo "$as_me:8753: result: ... -$cf_opt" >&5
8754echo "${ECHO_T}... -$cf_opt" >&6
8755			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
8756		fi
8757	done
8758	CXXFLAGS="$cf_save_CXXFLAGS"
8759
8760elif test "$GXX" = yes
8761then
8762	{ echo "$as_me:8762: checking for $CXX warning options..." >&5
8763echo "$as_me: checking for $CXX warning options..." >&6;}
8764	cf_save_CXXFLAGS="$CXXFLAGS"
8765	EXTRA_CXXFLAGS="-W -Wall"
8766	cf_gxx_extra_warnings=""
8767	test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
8768	case "$GCC_VERSION" in
8769	[1-2].*)
8770		;;
8771	*)
8772		cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
8773		;;
8774	esac
8775	for cf_opt in \
8776		Wabi \
8777		fabi-version=0 \
8778		Woverloaded-virtual \
8779		Wsign-promo \
8780		Wsynth \
8781		Wold-style-cast \
8782		Wcast-align \
8783		Wcast-qual \
8784		Wmissing-prototypes \
8785		Wpointer-arith \
8786		Wshadow \
8787		Wstrict-prototypes \
8788		Wundef $cf_gxx_extra_warnings Wno-unused
8789	do
8790		CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
8791		if { (eval echo "$as_me:8791: \"$ac_compile\"") >&5
8792  (eval $ac_compile) 2>&5
8793  ac_status=$?
8794  echo "$as_me:8794: \$? = $ac_status" >&5
8795  (exit $ac_status); }; then
8796			test -n "$verbose" && echo "$as_me:8796: result: ... -$cf_opt" >&5
8797echo "${ECHO_T}... -$cf_opt" >&6
8798			EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
8799		else
8800			test -n "$verbose" && echo "$as_me:8800: result: ... no -$cf_opt" >&5
8801echo "${ECHO_T}... no -$cf_opt" >&6
8802		fi
8803	done
8804	CXXFLAGS="$cf_save_CXXFLAGS"
8805fi
8806
8807rm -f conftest*
8808ac_ext=c
8809ac_cpp='$CPP $CPPFLAGS'
8810ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
8811ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
8812ac_compiler_gnu=$ac_cv_c_compiler_gnu
8813
8814	fi
8815fi
8816
8817if test "$GCC" = yes
8818then
8819cat > conftest.i <<EOF
8820#ifndef GCC_PRINTF
8821#define GCC_PRINTF 0
8822#endif
8823#ifndef GCC_SCANF
8824#define GCC_SCANF 0
8825#endif
8826#ifndef GCC_NORETURN
8827#define GCC_NORETURN /* nothing */
8828#endif
8829#ifndef GCC_UNUSED
8830#define GCC_UNUSED /* nothing */
8831#endif
8832EOF
8833if test "$GCC" = yes
8834then
8835	{ echo "$as_me:8835: checking for $CC __attribute__ directives..." >&5
8836echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
8837cat > conftest.$ac_ext <<EOF
8838#line 8838 "configure"
8839#include "confdefs.h"
8840#include "conftest.h"
8841#include "conftest.i"
8842#if	GCC_PRINTF
8843#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
8844#else
8845#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
8846#endif
8847#if	GCC_SCANF
8848#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
8849#else
8850#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
8851#endif
8852extern void wow(char *,...) GCC_SCANFLIKE(1,2);
8853extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
8854extern void foo(void) GCC_NORETURN;
8855int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
8856EOF
8857	for cf_attribute in scanf printf unused noreturn
8858	do
8859
8860cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8861
8862		cf_directive="__attribute__(($cf_attribute))"
8863		echo "checking for $CC $cf_directive" 1>&5
8864		case $cf_attribute in
8865		scanf|printf)
8866		cat >conftest.h <<EOF
8867#define GCC_$cf_ATTRIBUTE 1
8868EOF
8869			;;
8870		*)
8871		cat >conftest.h <<EOF
8872#define GCC_$cf_ATTRIBUTE $cf_directive
8873EOF
8874			;;
8875		esac
8876		if { (eval echo "$as_me:8876: \"$ac_compile\"") >&5
8877  (eval $ac_compile) 2>&5
8878  ac_status=$?
8879  echo "$as_me:8879: \$? = $ac_status" >&5
8880  (exit $ac_status); }; then
8881			test -n "$verbose" && echo "$as_me:8881: result: ... $cf_attribute" >&5
8882echo "${ECHO_T}... $cf_attribute" >&6
8883			cat conftest.h >>confdefs.h
8884		fi
8885	done
8886else
8887	fgrep define conftest.i >>confdefs.h
8888fi
8889rm -rf conftest*
8890fi
8891
8892###	use option --enable-assertions to turn on generation of assertion code
8893echo "$as_me:8893: checking if you want to enable runtime assertions" >&5
8894echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
8895
8896# Check whether --enable-assertions or --disable-assertions was given.
8897if test "${enable_assertions+set}" = set; then
8898  enableval="$enable_assertions"
8899  with_assertions=$enableval
8900else
8901  with_assertions=no
8902fi;
8903echo "$as_me:8903: result: $with_assertions" >&5
8904echo "${ECHO_T}$with_assertions" >&6
8905if test -n "$GCC"
8906then
8907	if test "$with_assertions" = no
8908	then
8909		cat >>confdefs.h <<\EOF
8910#define NDEBUG 1
8911EOF
8912
8913		CPPFLAGS="$CPPFLAGS -DNDEBUG"
8914	else
8915		ADAFLAGS="$ADAFLAGS -gnata"
8916	fi
8917fi
8918
8919###	use option --disable-leaks to suppress "permanent" leaks, for testing
8920
8921# Check whether --enable-leaks or --disable-leaks was given.
8922if test "${enable_leaks+set}" = set; then
8923  enableval="$enable_leaks"
8924  test "$enableval" = no && cat >>confdefs.h <<\EOF
8925#define NO_LEAKS 1
8926EOF
8927
8928fi;
8929cat >>confdefs.h <<\EOF
8930#define HAVE_NC_ALLOC_H 1
8931EOF
8932
8933###	use option --enable-expanded to generate certain macros as functions
8934
8935# Check whether --enable-expanded or --disable-expanded was given.
8936if test "${enable_expanded+set}" = set; then
8937  enableval="$enable_expanded"
8938  test "$enableval" = yes && cat >>confdefs.h <<\EOF
8939#define NCURSES_EXPANDED 1
8940EOF
8941
8942fi;
8943
8944###	use option --disable-macros to suppress macros in favor of functions
8945
8946# Check whether --enable-macros or --disable-macros was given.
8947if test "${enable_macros+set}" = set; then
8948  enableval="$enable_macros"
8949  test "$enableval" = no && cat >>confdefs.h <<\EOF
8950#define NCURSES_NOMACROS 1
8951EOF
8952
8953fi;
8954
8955# Normally we only add trace() to the debug-library.  Allow this to be
8956# extended to all models of the ncurses library:
8957cf_all_traces=no
8958case "$CFLAGS $CPPFLAGS" in
8959*-DTRACE*)
8960	cf_all_traces=yes
8961	;;
8962esac
8963
8964echo "$as_me:8964: checking whether to add trace feature to all models" >&5
8965echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
8966
8967# Check whether --with-trace or --without-trace was given.
8968if test "${with_trace+set}" = set; then
8969  withval="$with_trace"
8970  cf_with_trace=$withval
8971else
8972  cf_with_trace=$cf_all_traces
8973fi;
8974echo "$as_me:8974: result: $cf_with_trace" >&5
8975echo "${ECHO_T}$cf_with_trace" >&6
8976
8977if test "$cf_with_trace" = yes ; then
8978	LIB_TRACING=all
8979	ADA_TRACE=TRUE
8980
8981cf_fix_cppflags=no
8982cf_new_cflags=
8983cf_new_cppflags=
8984cf_new_extra_cppflags=
8985
8986for cf_add_cflags in -DTRACE
8987do
8988case $cf_fix_cppflags in
8989no)
8990	case $cf_add_cflags in #(vi
8991	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8992		case $cf_add_cflags in
8993		-D*)
8994			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8995
8996			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8997			&& test -z "${cf_tst_cflags}" \
8998			&& cf_fix_cppflags=yes
8999
9000			if test $cf_fix_cppflags = yes ; then
9001				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9002				continue
9003			elif test "${cf_tst_cflags}" = "\"'" ; then
9004				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9005				continue
9006			fi
9007			;;
9008		esac
9009		case "$CPPFLAGS" in
9010		*$cf_add_cflags) #(vi
9011			;;
9012		*) #(vi
9013			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9014			;;
9015		esac
9016		;;
9017	*)
9018		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9019		;;
9020	esac
9021	;;
9022yes)
9023	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9024
9025	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9026
9027	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
9028	&& test -z "${cf_tst_cflags}" \
9029	&& cf_fix_cppflags=no
9030	;;
9031esac
9032done
9033
9034if test -n "$cf_new_cflags" ; then
9035
9036	CFLAGS="$CFLAGS $cf_new_cflags"
9037fi
9038
9039if test -n "$cf_new_cppflags" ; then
9040
9041	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
9042fi
9043
9044if test -n "$cf_new_extra_cppflags" ; then
9045
9046	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9047fi
9048
9049else
9050	LIB_TRACING=DEBUG
9051	ADA_TRACE=FALSE
9052fi
9053
9054###	Checks for libraries.
9055echo "$as_me:9055: checking for gettimeofday" >&5
9056echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
9057if test "${ac_cv_func_gettimeofday+set}" = set; then
9058  echo $ECHO_N "(cached) $ECHO_C" >&6
9059else
9060  cat >conftest.$ac_ext <<_ACEOF
9061#line 9061 "configure"
9062#include "confdefs.h"
9063/* System header to define __stub macros and hopefully few prototypes,
9064    which can conflict with char gettimeofday (); below.  */
9065#include <assert.h>
9066/* Override any gcc2 internal prototype to avoid an error.  */
9067#ifdef __cplusplus
9068extern "C"
9069#endif
9070/* We use char because int might match the return type of a gcc2
9071   builtin and then its argument prototype would still apply.  */
9072char gettimeofday ();
9073char (*f) ();
9074
9075int
9076main ()
9077{
9078/* The GNU C library defines this for functions which it implements
9079    to always fail with ENOSYS.  Some functions are actually named
9080    something starting with __ and the normal name is an alias.  */
9081#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
9082choke me
9083#else
9084f = gettimeofday;
9085#endif
9086
9087  ;
9088  return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext conftest$ac_exeext
9092if { (eval echo "$as_me:9092: \"$ac_link\"") >&5
9093  (eval $ac_link) 2>&5
9094  ac_status=$?
9095  echo "$as_me:9095: \$? = $ac_status" >&5
9096  (exit $ac_status); } &&
9097         { ac_try='test -s conftest$ac_exeext'
9098  { (eval echo "$as_me:9098: \"$ac_try\"") >&5
9099  (eval $ac_try) 2>&5
9100  ac_status=$?
9101  echo "$as_me:9101: \$? = $ac_status" >&5
9102  (exit $ac_status); }; }; then
9103  ac_cv_func_gettimeofday=yes
9104else
9105  echo "$as_me: failed program was:" >&5
9106cat conftest.$ac_ext >&5
9107ac_cv_func_gettimeofday=no
9108fi
9109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9110fi
9111echo "$as_me:9111: result: $ac_cv_func_gettimeofday" >&5
9112echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
9113if test $ac_cv_func_gettimeofday = yes; then
9114  cat >>confdefs.h <<\EOF
9115#define HAVE_GETTIMEOFDAY 1
9116EOF
9117
9118else
9119
9120echo "$as_me:9120: checking for gettimeofday in -lbsd" >&5
9121echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
9122if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
9123  echo $ECHO_N "(cached) $ECHO_C" >&6
9124else
9125  ac_check_lib_save_LIBS=$LIBS
9126LIBS="-lbsd  $LIBS"
9127cat >conftest.$ac_ext <<_ACEOF
9128#line 9128 "configure"
9129#include "confdefs.h"
9130
9131/* Override any gcc2 internal prototype to avoid an error.  */
9132#ifdef __cplusplus
9133extern "C"
9134#endif
9135/* We use char because int might match the return type of a gcc2
9136   builtin and then its argument prototype would still apply.  */
9137char gettimeofday ();
9138int
9139main ()
9140{
9141gettimeofday ();
9142  ;
9143  return 0;
9144}
9145_ACEOF
9146rm -f conftest.$ac_objext conftest$ac_exeext
9147if { (eval echo "$as_me:9147: \"$ac_link\"") >&5
9148  (eval $ac_link) 2>&5
9149  ac_status=$?
9150  echo "$as_me:9150: \$? = $ac_status" >&5
9151  (exit $ac_status); } &&
9152         { ac_try='test -s conftest$ac_exeext'
9153  { (eval echo "$as_me:9153: \"$ac_try\"") >&5
9154  (eval $ac_try) 2>&5
9155  ac_status=$?
9156  echo "$as_me:9156: \$? = $ac_status" >&5
9157  (exit $ac_status); }; }; then
9158  ac_cv_lib_bsd_gettimeofday=yes
9159else
9160  echo "$as_me: failed program was:" >&5
9161cat conftest.$ac_ext >&5
9162ac_cv_lib_bsd_gettimeofday=no
9163fi
9164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9165LIBS=$ac_check_lib_save_LIBS
9166fi
9167echo "$as_me:9167: result: $ac_cv_lib_bsd_gettimeofday" >&5
9168echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
9169if test $ac_cv_lib_bsd_gettimeofday = yes; then
9170  cat >>confdefs.h <<\EOF
9171#define HAVE_GETTIMEOFDAY 1
9172EOF
9173
9174	LIBS="$LIBS -lbsd"
9175fi
9176
9177fi
9178
9179echo "$as_me:9179: checking if -lm needed for math functions" >&5
9180echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
9181if test "${cf_cv_need_libm+set}" = set; then
9182  echo $ECHO_N "(cached) $ECHO_C" >&6
9183else
9184
9185	cat >conftest.$ac_ext <<_ACEOF
9186#line 9186 "configure"
9187#include "confdefs.h"
9188
9189	#include <stdio.h>
9190	#include <math.h>
9191
9192int
9193main ()
9194{
9195double x = rand(); printf("result = %g\n", sin(x))
9196  ;
9197  return 0;
9198}
9199_ACEOF
9200rm -f conftest.$ac_objext conftest$ac_exeext
9201if { (eval echo "$as_me:9201: \"$ac_link\"") >&5
9202  (eval $ac_link) 2>&5
9203  ac_status=$?
9204  echo "$as_me:9204: \$? = $ac_status" >&5
9205  (exit $ac_status); } &&
9206         { ac_try='test -s conftest$ac_exeext'
9207  { (eval echo "$as_me:9207: \"$ac_try\"") >&5
9208  (eval $ac_try) 2>&5
9209  ac_status=$?
9210  echo "$as_me:9210: \$? = $ac_status" >&5
9211  (exit $ac_status); }; }; then
9212  cf_cv_need_libm=no
9213else
9214  echo "$as_me: failed program was:" >&5
9215cat conftest.$ac_ext >&5
9216cf_cv_need_libm=yes
9217fi
9218rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9219fi
9220echo "$as_me:9220: result: $cf_cv_need_libm" >&5
9221echo "${ECHO_T}$cf_cv_need_libm" >&6
9222if test "$cf_cv_need_libm" = yes
9223then
9224MATH_LIB=-lm
9225fi
9226
9227###	Checks for header files.
9228echo "$as_me:9228: checking for ANSI C header files" >&5
9229echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9230if test "${ac_cv_header_stdc+set}" = set; then
9231  echo $ECHO_N "(cached) $ECHO_C" >&6
9232else
9233  cat >conftest.$ac_ext <<_ACEOF
9234#line 9234 "configure"
9235#include "confdefs.h"
9236#include <stdlib.h>
9237#include <stdarg.h>
9238#include <string.h>
9239#include <float.h>
9240
9241_ACEOF
9242if { (eval echo "$as_me:9242: \"$ac_cpp conftest.$ac_ext\"") >&5
9243  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9244  ac_status=$?
9245  egrep -v '^ *\+' conftest.er1 >conftest.err
9246  rm -f conftest.er1
9247  cat conftest.err >&5
9248  echo "$as_me:9248: \$? = $ac_status" >&5
9249  (exit $ac_status); } >/dev/null; then
9250  if test -s conftest.err; then
9251    ac_cpp_err=$ac_c_preproc_warn_flag
9252  else
9253    ac_cpp_err=
9254  fi
9255else
9256  ac_cpp_err=yes
9257fi
9258if test -z "$ac_cpp_err"; then
9259  ac_cv_header_stdc=yes
9260else
9261  echo "$as_me: failed program was:" >&5
9262  cat conftest.$ac_ext >&5
9263  ac_cv_header_stdc=no
9264fi
9265rm -f conftest.err conftest.$ac_ext
9266
9267if test $ac_cv_header_stdc = yes; then
9268  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9269  cat >conftest.$ac_ext <<_ACEOF
9270#line 9270 "configure"
9271#include "confdefs.h"
9272#include <string.h>
9273
9274_ACEOF
9275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9276  egrep "memchr" >/dev/null 2>&1; then
9277  :
9278else
9279  ac_cv_header_stdc=no
9280fi
9281rm -f conftest*
9282
9283fi
9284
9285if test $ac_cv_header_stdc = yes; then
9286  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9287  cat >conftest.$ac_ext <<_ACEOF
9288#line 9288 "configure"
9289#include "confdefs.h"
9290#include <stdlib.h>
9291
9292_ACEOF
9293if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9294  egrep "free" >/dev/null 2>&1; then
9295  :
9296else
9297  ac_cv_header_stdc=no
9298fi
9299rm -f conftest*
9300
9301fi
9302
9303if test $ac_cv_header_stdc = yes; then
9304  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9305  if test "$cross_compiling" = yes; then
9306  :
9307else
9308  cat >conftest.$ac_ext <<_ACEOF
9309#line 9309 "configure"
9310#include "confdefs.h"
9311#include <ctype.h>
9312#if ((' ' & 0x0FF) == 0x020)
9313# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9314# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9315#else
9316# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9317                     || ('j' <= (c) && (c) <= 'r') \
9318                     || ('s' <= (c) && (c) <= 'z'))
9319# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9320#endif
9321
9322#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9323int
9324main ()
9325{
9326  int i;
9327  for (i = 0; i < 256; i++)
9328    if (XOR (islower (i), ISLOWER (i))
9329        || toupper (i) != TOUPPER (i))
9330      exit(2);
9331  exit (0);
9332}
9333_ACEOF
9334rm -f conftest$ac_exeext
9335if { (eval echo "$as_me:9335: \"$ac_link\"") >&5
9336  (eval $ac_link) 2>&5
9337  ac_status=$?
9338  echo "$as_me:9338: \$? = $ac_status" >&5
9339  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9340  { (eval echo "$as_me:9340: \"$ac_try\"") >&5
9341  (eval $ac_try) 2>&5
9342  ac_status=$?
9343  echo "$as_me:9343: \$? = $ac_status" >&5
9344  (exit $ac_status); }; }; then
9345  :
9346else
9347  echo "$as_me: program exited with status $ac_status" >&5
9348echo "$as_me: failed program was:" >&5
9349cat conftest.$ac_ext >&5
9350ac_cv_header_stdc=no
9351fi
9352rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9353fi
9354fi
9355fi
9356echo "$as_me:9356: result: $ac_cv_header_stdc" >&5
9357echo "${ECHO_T}$ac_cv_header_stdc" >&6
9358if test $ac_cv_header_stdc = yes; then
9359
9360cat >>confdefs.h <<\EOF
9361#define STDC_HEADERS 1
9362EOF
9363
9364fi
9365
9366ac_header_dirent=no
9367for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
9368  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
9369echo "$as_me:9369: checking for $ac_hdr that defines DIR" >&5
9370echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
9371if eval "test \"\${$as_ac_Header+set}\" = set"; then
9372  echo $ECHO_N "(cached) $ECHO_C" >&6
9373else
9374  cat >conftest.$ac_ext <<_ACEOF
9375#line 9375 "configure"
9376#include "confdefs.h"
9377#include <sys/types.h>
9378#include <$ac_hdr>
9379
9380int
9381main ()
9382{
9383if ((DIR *) 0)
9384return 0;
9385  ;
9386  return 0;
9387}
9388_ACEOF
9389rm -f conftest.$ac_objext
9390if { (eval echo "$as_me:9390: \"$ac_compile\"") >&5
9391  (eval $ac_compile) 2>&5
9392  ac_status=$?
9393  echo "$as_me:9393: \$? = $ac_status" >&5
9394  (exit $ac_status); } &&
9395         { ac_try='test -s conftest.$ac_objext'
9396  { (eval echo "$as_me:9396: \"$ac_try\"") >&5
9397  (eval $ac_try) 2>&5
9398  ac_status=$?
9399  echo "$as_me:9399: \$? = $ac_status" >&5
9400  (exit $ac_status); }; }; then
9401  eval "$as_ac_Header=yes"
9402else
9403  echo "$as_me: failed program was:" >&5
9404cat conftest.$ac_ext >&5
9405eval "$as_ac_Header=no"
9406fi
9407rm -f conftest.$ac_objext conftest.$ac_ext
9408fi
9409echo "$as_me:9409: result: `eval echo '${'$as_ac_Header'}'`" >&5
9410echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9411if test `eval echo '${'$as_ac_Header'}'` = yes; then
9412  cat >>confdefs.h <<EOF
9413#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
9414EOF
9415
9416ac_header_dirent=$ac_hdr; break
9417fi
9418
9419done
9420# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
9421if test $ac_header_dirent = dirent.h; then
9422  echo "$as_me:9422: checking for opendir in -ldir" >&5
9423echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
9424if test "${ac_cv_lib_dir_opendir+set}" = set; then
9425  echo $ECHO_N "(cached) $ECHO_C" >&6
9426else
9427  ac_check_lib_save_LIBS=$LIBS
9428LIBS="-ldir  $LIBS"
9429cat >conftest.$ac_ext <<_ACEOF
9430#line 9430 "configure"
9431#include "confdefs.h"
9432
9433/* Override any gcc2 internal prototype to avoid an error.  */
9434#ifdef __cplusplus
9435extern "C"
9436#endif
9437/* We use char because int might match the return type of a gcc2
9438   builtin and then its argument prototype would still apply.  */
9439char opendir ();
9440int
9441main ()
9442{
9443opendir ();
9444  ;
9445  return 0;
9446}
9447_ACEOF
9448rm -f conftest.$ac_objext conftest$ac_exeext
9449if { (eval echo "$as_me:9449: \"$ac_link\"") >&5
9450  (eval $ac_link) 2>&5
9451  ac_status=$?
9452  echo "$as_me:9452: \$? = $ac_status" >&5
9453  (exit $ac_status); } &&
9454         { ac_try='test -s conftest$ac_exeext'
9455  { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9456  (eval $ac_try) 2>&5
9457  ac_status=$?
9458  echo "$as_me:9458: \$? = $ac_status" >&5
9459  (exit $ac_status); }; }; then
9460  ac_cv_lib_dir_opendir=yes
9461else
9462  echo "$as_me: failed program was:" >&5
9463cat conftest.$ac_ext >&5
9464ac_cv_lib_dir_opendir=no
9465fi
9466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9467LIBS=$ac_check_lib_save_LIBS
9468fi
9469echo "$as_me:9469: result: $ac_cv_lib_dir_opendir" >&5
9470echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
9471if test $ac_cv_lib_dir_opendir = yes; then
9472  LIBS="$LIBS -ldir"
9473fi
9474
9475else
9476  echo "$as_me:9476: checking for opendir in -lx" >&5
9477echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
9478if test "${ac_cv_lib_x_opendir+set}" = set; then
9479  echo $ECHO_N "(cached) $ECHO_C" >&6
9480else
9481  ac_check_lib_save_LIBS=$LIBS
9482LIBS="-lx  $LIBS"
9483cat >conftest.$ac_ext <<_ACEOF
9484#line 9484 "configure"
9485#include "confdefs.h"
9486
9487/* Override any gcc2 internal prototype to avoid an error.  */
9488#ifdef __cplusplus
9489extern "C"
9490#endif
9491/* We use char because int might match the return type of a gcc2
9492   builtin and then its argument prototype would still apply.  */
9493char opendir ();
9494int
9495main ()
9496{
9497opendir ();
9498  ;
9499  return 0;
9500}
9501_ACEOF
9502rm -f conftest.$ac_objext conftest$ac_exeext
9503if { (eval echo "$as_me:9503: \"$ac_link\"") >&5
9504  (eval $ac_link) 2>&5
9505  ac_status=$?
9506  echo "$as_me:9506: \$? = $ac_status" >&5
9507  (exit $ac_status); } &&
9508         { ac_try='test -s conftest$ac_exeext'
9509  { (eval echo "$as_me:9509: \"$ac_try\"") >&5
9510  (eval $ac_try) 2>&5
9511  ac_status=$?
9512  echo "$as_me:9512: \$? = $ac_status" >&5
9513  (exit $ac_status); }; }; then
9514  ac_cv_lib_x_opendir=yes
9515else
9516  echo "$as_me: failed program was:" >&5
9517cat conftest.$ac_ext >&5
9518ac_cv_lib_x_opendir=no
9519fi
9520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9521LIBS=$ac_check_lib_save_LIBS
9522fi
9523echo "$as_me:9523: result: $ac_cv_lib_x_opendir" >&5
9524echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
9525if test $ac_cv_lib_x_opendir = yes; then
9526  LIBS="$LIBS -lx"
9527fi
9528
9529fi
9530
9531echo "$as_me:9531: checking whether time.h and sys/time.h may both be included" >&5
9532echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
9533if test "${ac_cv_header_time+set}" = set; then
9534  echo $ECHO_N "(cached) $ECHO_C" >&6
9535else
9536  cat >conftest.$ac_ext <<_ACEOF
9537#line 9537 "configure"
9538#include "confdefs.h"
9539#include <sys/types.h>
9540#include <sys/time.h>
9541#include <time.h>
9542
9543int
9544main ()
9545{
9546if ((struct tm *) 0)
9547return 0;
9548  ;
9549  return 0;
9550}
9551_ACEOF
9552rm -f conftest.$ac_objext
9553if { (eval echo "$as_me:9553: \"$ac_compile\"") >&5
9554  (eval $ac_compile) 2>&5
9555  ac_status=$?
9556  echo "$as_me:9556: \$? = $ac_status" >&5
9557  (exit $ac_status); } &&
9558         { ac_try='test -s conftest.$ac_objext'
9559  { (eval echo "$as_me:9559: \"$ac_try\"") >&5
9560  (eval $ac_try) 2>&5
9561  ac_status=$?
9562  echo "$as_me:9562: \$? = $ac_status" >&5
9563  (exit $ac_status); }; }; then
9564  ac_cv_header_time=yes
9565else
9566  echo "$as_me: failed program was:" >&5
9567cat conftest.$ac_ext >&5
9568ac_cv_header_time=no
9569fi
9570rm -f conftest.$ac_objext conftest.$ac_ext
9571fi
9572echo "$as_me:9572: result: $ac_cv_header_time" >&5
9573echo "${ECHO_T}$ac_cv_header_time" >&6
9574if test $ac_cv_header_time = yes; then
9575
9576cat >>confdefs.h <<\EOF
9577#define TIME_WITH_SYS_TIME 1
9578EOF
9579
9580fi
9581
9582echo "$as_me:9582: checking for regular-expression headers" >&5
9583echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
9584if test "${cf_cv_regex+set}" = set; then
9585  echo $ECHO_N "(cached) $ECHO_C" >&6
9586else
9587
9588cat >conftest.$ac_ext <<_ACEOF
9589#line 9589 "configure"
9590#include "confdefs.h"
9591#include <sys/types.h>
9592#include <regex.h>
9593int
9594main ()
9595{
9596
9597	regex_t *p;
9598	int x = regcomp(p, "", 0);
9599	int y = regexec(p, "", 0, 0, 0);
9600	regfree(p);
9601
9602  ;
9603  return 0;
9604}
9605_ACEOF
9606rm -f conftest.$ac_objext conftest$ac_exeext
9607if { (eval echo "$as_me:9607: \"$ac_link\"") >&5
9608  (eval $ac_link) 2>&5
9609  ac_status=$?
9610  echo "$as_me:9610: \$? = $ac_status" >&5
9611  (exit $ac_status); } &&
9612         { ac_try='test -s conftest$ac_exeext'
9613  { (eval echo "$as_me:9613: \"$ac_try\"") >&5
9614  (eval $ac_try) 2>&5
9615  ac_status=$?
9616  echo "$as_me:9616: \$? = $ac_status" >&5
9617  (exit $ac_status); }; }; then
9618  cf_cv_regex="regex.h"
9619else
9620  echo "$as_me: failed program was:" >&5
9621cat conftest.$ac_ext >&5
9622
9623	cat >conftest.$ac_ext <<_ACEOF
9624#line 9624 "configure"
9625#include "confdefs.h"
9626#include <regexp.h>
9627int
9628main ()
9629{
9630
9631		char *p = compile("", "", "", 0);
9632		int x = step("", "");
9633
9634  ;
9635  return 0;
9636}
9637_ACEOF
9638rm -f conftest.$ac_objext conftest$ac_exeext
9639if { (eval echo "$as_me:9639: \"$ac_link\"") >&5
9640  (eval $ac_link) 2>&5
9641  ac_status=$?
9642  echo "$as_me:9642: \$? = $ac_status" >&5
9643  (exit $ac_status); } &&
9644         { ac_try='test -s conftest$ac_exeext'
9645  { (eval echo "$as_me:9645: \"$ac_try\"") >&5
9646  (eval $ac_try) 2>&5
9647  ac_status=$?
9648  echo "$as_me:9648: \$? = $ac_status" >&5
9649  (exit $ac_status); }; }; then
9650  cf_cv_regex="regexp.h"
9651else
9652  echo "$as_me: failed program was:" >&5
9653cat conftest.$ac_ext >&5
9654
9655		cf_save_LIBS="$LIBS"
9656		LIBS="-lgen $LIBS"
9657		cat >conftest.$ac_ext <<_ACEOF
9658#line 9658 "configure"
9659#include "confdefs.h"
9660#include <regexpr.h>
9661int
9662main ()
9663{
9664
9665			char *p = compile("", "", "");
9666			int x = step("", "");
9667
9668  ;
9669  return 0;
9670}
9671_ACEOF
9672rm -f conftest.$ac_objext conftest$ac_exeext
9673if { (eval echo "$as_me:9673: \"$ac_link\"") >&5
9674  (eval $ac_link) 2>&5
9675  ac_status=$?
9676  echo "$as_me:9676: \$? = $ac_status" >&5
9677  (exit $ac_status); } &&
9678         { ac_try='test -s conftest$ac_exeext'
9679  { (eval echo "$as_me:9679: \"$ac_try\"") >&5
9680  (eval $ac_try) 2>&5
9681  ac_status=$?
9682  echo "$as_me:9682: \$? = $ac_status" >&5
9683  (exit $ac_status); }; }; then
9684  cf_cv_regex="regexpr.h"
9685else
9686  echo "$as_me: failed program was:" >&5
9687cat conftest.$ac_ext >&5
9688LIBS="$cf_save_LIBS"
9689fi
9690rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9691fi
9692rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9693fi
9694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9695
9696fi
9697
9698echo "$as_me:9698: result: $cf_cv_regex" >&5
9699echo "${ECHO_T}$cf_cv_regex" >&6
9700case $cf_cv_regex in
9701	regex.h)   cat >>confdefs.h <<\EOF
9702#define HAVE_REGEX_H_FUNCS 1
9703EOF
9704 ;;
9705	regexp.h)  cat >>confdefs.h <<\EOF
9706#define HAVE_REGEXP_H_FUNCS 1
9707EOF
9708 ;;
9709	regexpr.h) cat >>confdefs.h <<\EOF
9710#define HAVE_REGEXPR_H_FUNCS 1
9711EOF
9712 ;;
9713esac
9714
9715for ac_header in \
9716fcntl.h \
9717getopt.h \
9718limits.h \
9719locale.h \
9720poll.h \
9721sys/bsdtypes.h \
9722sys/ioctl.h \
9723sys/param.h \
9724sys/poll.h \
9725sys/select.h \
9726sys/time.h \
9727sys/times.h \
9728ttyent.h \
9729unistd.h \
9730wctype.h \
9731
9732do
9733as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9734echo "$as_me:9734: checking for $ac_header" >&5
9735echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9736if eval "test \"\${$as_ac_Header+set}\" = set"; then
9737  echo $ECHO_N "(cached) $ECHO_C" >&6
9738else
9739  cat >conftest.$ac_ext <<_ACEOF
9740#line 9740 "configure"
9741#include "confdefs.h"
9742#include <$ac_header>
9743_ACEOF
9744if { (eval echo "$as_me:9744: \"$ac_cpp conftest.$ac_ext\"") >&5
9745  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9746  ac_status=$?
9747  egrep -v '^ *\+' conftest.er1 >conftest.err
9748  rm -f conftest.er1
9749  cat conftest.err >&5
9750  echo "$as_me:9750: \$? = $ac_status" >&5
9751  (exit $ac_status); } >/dev/null; then
9752  if test -s conftest.err; then
9753    ac_cpp_err=$ac_c_preproc_warn_flag
9754  else
9755    ac_cpp_err=
9756  fi
9757else
9758  ac_cpp_err=yes
9759fi
9760if test -z "$ac_cpp_err"; then
9761  eval "$as_ac_Header=yes"
9762else
9763  echo "$as_me: failed program was:" >&5
9764  cat conftest.$ac_ext >&5
9765  eval "$as_ac_Header=no"
9766fi
9767rm -f conftest.err conftest.$ac_ext
9768fi
9769echo "$as_me:9769: result: `eval echo '${'$as_ac_Header'}'`" >&5
9770echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9771if test `eval echo '${'$as_ac_Header'}'` = yes; then
9772  cat >>confdefs.h <<EOF
9773#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9774EOF
9775
9776fi
9777done
9778
9779# check for ISC (this may also define _POSIX_SOURCE)
9780# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
9781if test "$ISC" = yes ; then
9782
9783echo "$as_me:9783: checking for main in -lcposix" >&5
9784echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
9785if test "${ac_cv_lib_cposix_main+set}" = set; then
9786  echo $ECHO_N "(cached) $ECHO_C" >&6
9787else
9788  ac_check_lib_save_LIBS=$LIBS
9789LIBS="-lcposix  $LIBS"
9790cat >conftest.$ac_ext <<_ACEOF
9791#line 9791 "configure"
9792#include "confdefs.h"
9793
9794int
9795main ()
9796{
9797main ();
9798  ;
9799  return 0;
9800}
9801_ACEOF
9802rm -f conftest.$ac_objext conftest$ac_exeext
9803if { (eval echo "$as_me:9803: \"$ac_link\"") >&5
9804  (eval $ac_link) 2>&5
9805  ac_status=$?
9806  echo "$as_me:9806: \$? = $ac_status" >&5
9807  (exit $ac_status); } &&
9808         { ac_try='test -s conftest$ac_exeext'
9809  { (eval echo "$as_me:9809: \"$ac_try\"") >&5
9810  (eval $ac_try) 2>&5
9811  ac_status=$?
9812  echo "$as_me:9812: \$? = $ac_status" >&5
9813  (exit $ac_status); }; }; then
9814  ac_cv_lib_cposix_main=yes
9815else
9816  echo "$as_me: failed program was:" >&5
9817cat conftest.$ac_ext >&5
9818ac_cv_lib_cposix_main=no
9819fi
9820rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9821LIBS=$ac_check_lib_save_LIBS
9822fi
9823echo "$as_me:9823: result: $ac_cv_lib_cposix_main" >&5
9824echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
9825if test $ac_cv_lib_cposix_main = yes; then
9826  cat >>confdefs.h <<EOF
9827#define HAVE_LIBCPOSIX 1
9828EOF
9829
9830  LIBS="-lcposix $LIBS"
9831
9832fi
9833
9834	echo "$as_me:9834: checking for bzero in -linet" >&5
9835echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
9836if test "${ac_cv_lib_inet_bzero+set}" = set; then
9837  echo $ECHO_N "(cached) $ECHO_C" >&6
9838else
9839  ac_check_lib_save_LIBS=$LIBS
9840LIBS="-linet  $LIBS"
9841cat >conftest.$ac_ext <<_ACEOF
9842#line 9842 "configure"
9843#include "confdefs.h"
9844
9845/* Override any gcc2 internal prototype to avoid an error.  */
9846#ifdef __cplusplus
9847extern "C"
9848#endif
9849/* We use char because int might match the return type of a gcc2
9850   builtin and then its argument prototype would still apply.  */
9851char bzero ();
9852int
9853main ()
9854{
9855bzero ();
9856  ;
9857  return 0;
9858}
9859_ACEOF
9860rm -f conftest.$ac_objext conftest$ac_exeext
9861if { (eval echo "$as_me:9861: \"$ac_link\"") >&5
9862  (eval $ac_link) 2>&5
9863  ac_status=$?
9864  echo "$as_me:9864: \$? = $ac_status" >&5
9865  (exit $ac_status); } &&
9866         { ac_try='test -s conftest$ac_exeext'
9867  { (eval echo "$as_me:9867: \"$ac_try\"") >&5
9868  (eval $ac_try) 2>&5
9869  ac_status=$?
9870  echo "$as_me:9870: \$? = $ac_status" >&5
9871  (exit $ac_status); }; }; then
9872  ac_cv_lib_inet_bzero=yes
9873else
9874  echo "$as_me: failed program was:" >&5
9875cat conftest.$ac_ext >&5
9876ac_cv_lib_inet_bzero=no
9877fi
9878rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9879LIBS=$ac_check_lib_save_LIBS
9880fi
9881echo "$as_me:9881: result: $ac_cv_lib_inet_bzero" >&5
9882echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
9883if test $ac_cv_lib_inet_bzero = yes; then
9884  LIBS="$LIBS -linet"
9885fi
9886fi
9887
9888echo "$as_me:9888: checking if sys/time.h works with sys/select.h" >&5
9889echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
9890if test "${cf_cv_sys_time_select+set}" = set; then
9891  echo $ECHO_N "(cached) $ECHO_C" >&6
9892else
9893
9894cat >conftest.$ac_ext <<_ACEOF
9895#line 9895 "configure"
9896#include "confdefs.h"
9897
9898#include <sys/types.h>
9899#ifdef HAVE_SYS_TIME_H
9900#include <sys/time.h>
9901#endif
9902#ifdef HAVE_SYS_SELECT_H
9903#include <sys/select.h>
9904#endif
9905
9906int
9907main ()
9908{
9909
9910  ;
9911  return 0;
9912}
9913_ACEOF
9914rm -f conftest.$ac_objext
9915if { (eval echo "$as_me:9915: \"$ac_compile\"") >&5
9916  (eval $ac_compile) 2>&5
9917  ac_status=$?
9918  echo "$as_me:9918: \$? = $ac_status" >&5
9919  (exit $ac_status); } &&
9920         { ac_try='test -s conftest.$ac_objext'
9921  { (eval echo "$as_me:9921: \"$ac_try\"") >&5
9922  (eval $ac_try) 2>&5
9923  ac_status=$?
9924  echo "$as_me:9924: \$? = $ac_status" >&5
9925  (exit $ac_status); }; }; then
9926  cf_cv_sys_time_select=yes
9927else
9928  echo "$as_me: failed program was:" >&5
9929cat conftest.$ac_ext >&5
9930cf_cv_sys_time_select=no
9931fi
9932rm -f conftest.$ac_objext conftest.$ac_ext
9933
9934fi
9935
9936echo "$as_me:9936: result: $cf_cv_sys_time_select" >&5
9937echo "${ECHO_T}$cf_cv_sys_time_select" >&6
9938test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
9939#define HAVE_SYS_TIME_SELECT 1
9940EOF
9941
9942###	checks for compiler characteristics
9943ac_ext=c
9944ac_cpp='$CPP $CPPFLAGS'
9945ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
9946ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
9947ac_compiler_gnu=$ac_cv_c_compiler_gnu
9948
9949echo "$as_me:9949: checking for $CC option to accept ANSI C" >&5
9950echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
9951if test "${ac_cv_prog_cc_stdc+set}" = set; then
9952  echo $ECHO_N "(cached) $ECHO_C" >&6
9953else
9954  ac_cv_prog_cc_stdc=no
9955ac_save_CC=$CC
9956cat >conftest.$ac_ext <<_ACEOF
9957#line 9957 "configure"
9958#include "confdefs.h"
9959#include <stdarg.h>
9960#include <stdio.h>
9961#include <sys/types.h>
9962#include <sys/stat.h>
9963/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
9964struct buf { int x; };
9965FILE * (*rcsopen) (struct buf *, struct stat *, int);
9966static char *e (p, i)
9967     char **p;
9968     int i;
9969{
9970  return p[i];
9971}
9972static char *f (char * (*g) (char **, int), char **p, ...)
9973{
9974  char *s;
9975  va_list v;
9976  va_start (v,p);
9977  s = g (p, va_arg (v,int));
9978  va_end (v);
9979  return s;
9980}
9981int test (int i, double x);
9982struct s1 {int (*f) (int a);};
9983struct s2 {int (*f) (double a);};
9984int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
9985int argc;
9986char **argv;
9987int
9988main ()
9989{
9990return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
9991  ;
9992  return 0;
9993}
9994_ACEOF
9995# Don't try gcc -ansi; that turns off useful extensions and
9996# breaks some systems' header files.
9997# AIX			-qlanglvl=ansi
9998# Ultrix and OSF/1	-std1
9999# HP-UX 10.20 and later	-Ae
10000# HP-UX older versions	-Aa -D_HPUX_SOURCE
10001# SVR4			-Xc -D__EXTENSIONS__
10002for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
10003do
10004  CC="$ac_save_CC $ac_arg"
10005  rm -f conftest.$ac_objext
10006if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007  (eval $ac_compile) 2>&5
10008  ac_status=$?
10009  echo "$as_me:10009: \$? = $ac_status" >&5
10010  (exit $ac_status); } &&
10011         { ac_try='test -s conftest.$ac_objext'
10012  { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013  (eval $ac_try) 2>&5
10014  ac_status=$?
10015  echo "$as_me:10015: \$? = $ac_status" >&5
10016  (exit $ac_status); }; }; then
10017  ac_cv_prog_cc_stdc=$ac_arg
10018break
10019else
10020  echo "$as_me: failed program was:" >&5
10021cat conftest.$ac_ext >&5
10022fi
10023rm -f conftest.$ac_objext
10024done
10025rm -f conftest.$ac_ext conftest.$ac_objext
10026CC=$ac_save_CC
10027
10028fi
10029
10030case "x$ac_cv_prog_cc_stdc" in
10031  x|xno)
10032    echo "$as_me:10032: result: none needed" >&5
10033echo "${ECHO_T}none needed" >&6 ;;
10034  *)
10035    echo "$as_me:10035: result: $ac_cv_prog_cc_stdc" >&5
10036echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
10037    CC="$CC $ac_cv_prog_cc_stdc" ;;
10038esac
10039
10040echo "$as_me:10040: checking for an ANSI C-conforming const" >&5
10041echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
10042if test "${ac_cv_c_const+set}" = set; then
10043  echo $ECHO_N "(cached) $ECHO_C" >&6
10044else
10045  cat >conftest.$ac_ext <<_ACEOF
10046#line 10046 "configure"
10047#include "confdefs.h"
10048
10049int
10050main ()
10051{
10052/* FIXME: Include the comments suggested by Paul. */
10053#ifndef __cplusplus
10054  /* Ultrix mips cc rejects this.  */
10055  typedef int charset[2];
10056  const charset x;
10057  /* SunOS 4.1.1 cc rejects this.  */
10058  char const *const *ccp;
10059  char **p;
10060  /* NEC SVR4.0.2 mips cc rejects this.  */
10061  struct point {int x, y;};
10062  static struct point const zero = {0,0};
10063  /* AIX XL C 1.02.0.0 rejects this.
10064     It does not let you subtract one const X* pointer from another in
10065     an arm of an if-expression whose if-part is not a constant
10066     expression */
10067  const char *g = "string";
10068  ccp = &g + (g ? g-g : 0);
10069  /* HPUX 7.0 cc rejects these. */
10070  ++ccp;
10071  p = (char**) ccp;
10072  ccp = (char const *const *) p;
10073  { /* SCO 3.2v4 cc rejects this.  */
10074    char *t;
10075    char const *s = 0 ? (char *) 0 : (char const *) 0;
10076
10077    *t++ = 0;
10078  }
10079  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
10080    int x[] = {25, 17};
10081    const int *foo = &x[0];
10082    ++foo;
10083  }
10084  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
10085    typedef const int *iptr;
10086    iptr p = 0;
10087    ++p;
10088  }
10089  { /* AIX XL C 1.02.0.0 rejects this saying
10090       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
10091    struct s { int j; const int *ap[3]; };
10092    struct s *b; b->j = 5;
10093  }
10094  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
10095    const int foo = 10;
10096  }
10097#endif
10098
10099  ;
10100  return 0;
10101}
10102_ACEOF
10103rm -f conftest.$ac_objext
10104if { (eval echo "$as_me:10104: \"$ac_compile\"") >&5
10105  (eval $ac_compile) 2>&5
10106  ac_status=$?
10107  echo "$as_me:10107: \$? = $ac_status" >&5
10108  (exit $ac_status); } &&
10109         { ac_try='test -s conftest.$ac_objext'
10110  { (eval echo "$as_me:10110: \"$ac_try\"") >&5
10111  (eval $ac_try) 2>&5
10112  ac_status=$?
10113  echo "$as_me:10113: \$? = $ac_status" >&5
10114  (exit $ac_status); }; }; then
10115  ac_cv_c_const=yes
10116else
10117  echo "$as_me: failed program was:" >&5
10118cat conftest.$ac_ext >&5
10119ac_cv_c_const=no
10120fi
10121rm -f conftest.$ac_objext conftest.$ac_ext
10122fi
10123echo "$as_me:10123: result: $ac_cv_c_const" >&5
10124echo "${ECHO_T}$ac_cv_c_const" >&6
10125if test $ac_cv_c_const = no; then
10126
10127cat >>confdefs.h <<\EOF
10128#define const
10129EOF
10130
10131fi
10132
10133echo "$as_me:10133: checking for inline" >&5
10134echo $ECHO_N "checking for inline... $ECHO_C" >&6
10135if test "${ac_cv_c_inline+set}" = set; then
10136  echo $ECHO_N "(cached) $ECHO_C" >&6
10137else
10138  ac_cv_c_inline=no
10139for ac_kw in inline __inline__ __inline; do
10140  cat >conftest.$ac_ext <<_ACEOF
10141#line 10141 "configure"
10142#include "confdefs.h"
10143#ifndef __cplusplus
10144static $ac_kw int static_foo () {return 0; }
10145$ac_kw int foo () {return 0; }
10146#endif
10147
10148_ACEOF
10149rm -f conftest.$ac_objext
10150if { (eval echo "$as_me:10150: \"$ac_compile\"") >&5
10151  (eval $ac_compile) 2>&5
10152  ac_status=$?
10153  echo "$as_me:10153: \$? = $ac_status" >&5
10154  (exit $ac_status); } &&
10155         { ac_try='test -s conftest.$ac_objext'
10156  { (eval echo "$as_me:10156: \"$ac_try\"") >&5
10157  (eval $ac_try) 2>&5
10158  ac_status=$?
10159  echo "$as_me:10159: \$? = $ac_status" >&5
10160  (exit $ac_status); }; }; then
10161  ac_cv_c_inline=$ac_kw; break
10162else
10163  echo "$as_me: failed program was:" >&5
10164cat conftest.$ac_ext >&5
10165fi
10166rm -f conftest.$ac_objext conftest.$ac_ext
10167done
10168
10169fi
10170echo "$as_me:10170: result: $ac_cv_c_inline" >&5
10171echo "${ECHO_T}$ac_cv_c_inline" >&6
10172case $ac_cv_c_inline in
10173  inline | yes) ;;
10174  no)
10175cat >>confdefs.h <<\EOF
10176#define inline
10177EOF
10178 ;;
10179  *)  cat >>confdefs.h <<EOF
10180#define inline $ac_cv_c_inline
10181EOF
10182 ;;
10183esac
10184
10185test "$ac_cv_c_inline" != no && cat >>confdefs.h <<\EOF
10186#define CC_HAS_INLINE_FUNCS 1
10187EOF
10188
10189if test $NCURSES_CHTYPE = auto ; then
10190
10191echo "$as_me:10191: checking for type of chtype" >&5
10192echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
10193if test "${cf_cv_typeof_chtype+set}" = set; then
10194  echo $ECHO_N "(cached) $ECHO_C" >&6
10195else
10196
10197		if test "$cross_compiling" = yes; then
10198  cf_cv_typeof_chtype=long
10199else
10200  cat >conftest.$ac_ext <<_ACEOF
10201#line 10201 "configure"
10202#include "confdefs.h"
10203
10204#define WANT_BITS 31
10205#include <stdio.h>
10206int main()
10207{
10208	FILE *fp = fopen("cf_test.out", "w");
10209	if (fp != 0) {
10210		char *result = "long";
10211		if (sizeof(unsigned long) > sizeof(unsigned int)) {
10212			int n;
10213			unsigned int x, y;
10214			for (n = 0; n < WANT_BITS; n++) {
10215				x = (1 << n);
10216				y = (x >> n);
10217				if (y != 1 || x == 0) {
10218					x = 0;
10219					break;
10220				}
10221			}
10222			/*
10223			 * If x is nonzero, an int is big enough for the bits
10224			 * that we want.
10225			 */
10226			result = (x != 0) ? "int" : "long";
10227		}
10228		fputs(result, fp);
10229		fclose(fp);
10230	}
10231	exit(0);
10232}
10233
10234_ACEOF
10235rm -f conftest$ac_exeext
10236if { (eval echo "$as_me:10236: \"$ac_link\"") >&5
10237  (eval $ac_link) 2>&5
10238  ac_status=$?
10239  echo "$as_me:10239: \$? = $ac_status" >&5
10240  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10241  { (eval echo "$as_me:10241: \"$ac_try\"") >&5
10242  (eval $ac_try) 2>&5
10243  ac_status=$?
10244  echo "$as_me:10244: \$? = $ac_status" >&5
10245  (exit $ac_status); }; }; then
10246  cf_cv_typeof_chtype=`cat cf_test.out`
10247else
10248  echo "$as_me: program exited with status $ac_status" >&5
10249echo "$as_me: failed program was:" >&5
10250cat conftest.$ac_ext >&5
10251cf_cv_typeof_chtype=long
10252fi
10253rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10254fi
10255		rm -f cf_test.out
10256
10257fi
10258
10259echo "$as_me:10259: result: $cf_cv_typeof_chtype" >&5
10260echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
10261
10262cat >>confdefs.h <<EOF
10263#define TYPEOF_CHTYPE $cf_cv_typeof_chtype
10264EOF
10265
10266else
10267	cf_cv_typeof_chtype=$NCURSES_CHTYPE
10268fi
10269
10270echo "$as_me:10270: checking if unsigned literals are legal" >&5
10271echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
10272if test "${cf_cv_unsigned_literals+set}" = set; then
10273  echo $ECHO_N "(cached) $ECHO_C" >&6
10274else
10275
10276	cat >conftest.$ac_ext <<_ACEOF
10277#line 10277 "configure"
10278#include "confdefs.h"
10279
10280int
10281main ()
10282{
10283long x = 1L + 1UL + 1U + 1
10284  ;
10285  return 0;
10286}
10287_ACEOF
10288rm -f conftest.$ac_objext
10289if { (eval echo "$as_me:10289: \"$ac_compile\"") >&5
10290  (eval $ac_compile) 2>&5
10291  ac_status=$?
10292  echo "$as_me:10292: \$? = $ac_status" >&5
10293  (exit $ac_status); } &&
10294         { ac_try='test -s conftest.$ac_objext'
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  cf_cv_unsigned_literals=yes
10301else
10302  echo "$as_me: failed program was:" >&5
10303cat conftest.$ac_ext >&5
10304cf_cv_unsigned_literals=no
10305fi
10306rm -f conftest.$ac_objext conftest.$ac_ext
10307
10308fi
10309
10310echo "$as_me:10310: result: $cf_cv_unsigned_literals" >&5
10311echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
10312
10313cf_cv_1UL="1"
10314test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
10315test "$cf_cv_typeof_chtype"    = long && cf_cv_1UL="${cf_cv_1UL}L"
10316
10317if test $NCURSES_MMASK_T = auto ; then
10318	cf_cv_typeof_mmask_t=long
10319else
10320	cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
10321fi
10322
10323###	Checks for external-data
10324
10325echo "$as_me:10325: checking if external errno is declared" >&5
10326echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
10327if test "${cf_cv_dcl_errno+set}" = set; then
10328  echo $ECHO_N "(cached) $ECHO_C" >&6
10329else
10330
10331    cat >conftest.$ac_ext <<_ACEOF
10332#line 10332 "configure"
10333#include "confdefs.h"
10334
10335#ifdef HAVE_STDLIB_H
10336#include <stdlib.h>
10337#endif
10338#include <stdio.h>
10339#include <sys/types.h>
10340#include <errno.h>
10341int
10342main ()
10343{
10344long x = (long) errno
10345  ;
10346  return 0;
10347}
10348_ACEOF
10349rm -f conftest.$ac_objext
10350if { (eval echo "$as_me:10350: \"$ac_compile\"") >&5
10351  (eval $ac_compile) 2>&5
10352  ac_status=$?
10353  echo "$as_me:10353: \$? = $ac_status" >&5
10354  (exit $ac_status); } &&
10355         { ac_try='test -s conftest.$ac_objext'
10356  { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357  (eval $ac_try) 2>&5
10358  ac_status=$?
10359  echo "$as_me:10359: \$? = $ac_status" >&5
10360  (exit $ac_status); }; }; then
10361  cf_cv_dcl_errno=yes
10362else
10363  echo "$as_me: failed program was:" >&5
10364cat conftest.$ac_ext >&5
10365cf_cv_dcl_errno=no
10366fi
10367rm -f conftest.$ac_objext conftest.$ac_ext
10368
10369fi
10370echo "$as_me:10370: result: $cf_cv_dcl_errno" >&5
10371echo "${ECHO_T}$cf_cv_dcl_errno" >&6
10372
10373if test "$cf_cv_dcl_errno" = no ; then
10374
10375cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10376
10377    cat >>confdefs.h <<EOF
10378#define $cf_result 1
10379EOF
10380
10381fi
10382
10383# It's possible (for near-UNIX clones) that the data doesn't exist
10384
10385echo "$as_me:10385: checking if external errno exists" >&5
10386echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
10387if test "${cf_cv_have_errno+set}" = set; then
10388  echo $ECHO_N "(cached) $ECHO_C" >&6
10389else
10390
10391    cat >conftest.$ac_ext <<_ACEOF
10392#line 10392 "configure"
10393#include "confdefs.h"
10394
10395#undef errno
10396extern int errno;
10397
10398int
10399main ()
10400{
10401errno = 2
10402  ;
10403  return 0;
10404}
10405_ACEOF
10406rm -f conftest.$ac_objext conftest$ac_exeext
10407if { (eval echo "$as_me:10407: \"$ac_link\"") >&5
10408  (eval $ac_link) 2>&5
10409  ac_status=$?
10410  echo "$as_me:10410: \$? = $ac_status" >&5
10411  (exit $ac_status); } &&
10412         { ac_try='test -s conftest$ac_exeext'
10413  { (eval echo "$as_me:10413: \"$ac_try\"") >&5
10414  (eval $ac_try) 2>&5
10415  ac_status=$?
10416  echo "$as_me:10416: \$? = $ac_status" >&5
10417  (exit $ac_status); }; }; then
10418  cf_cv_have_errno=yes
10419else
10420  echo "$as_me: failed program was:" >&5
10421cat conftest.$ac_ext >&5
10422cf_cv_have_errno=no
10423fi
10424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10425
10426fi
10427echo "$as_me:10427: result: $cf_cv_have_errno" >&5
10428echo "${ECHO_T}$cf_cv_have_errno" >&6
10429
10430if test "$cf_cv_have_errno" = yes ; then
10431
10432cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10433
10434    cat >>confdefs.h <<EOF
10435#define $cf_result 1
10436EOF
10437
10438fi
10439
10440echo "$as_me:10440: checking if data-only library module links" >&5
10441echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
10442if test "${cf_cv_link_dataonly+set}" = set; then
10443  echo $ECHO_N "(cached) $ECHO_C" >&6
10444else
10445
10446	rm -f conftest.a
10447	cat >conftest.$ac_ext <<EOF
10448#line 10448 "configure"
10449int	testdata[3] = { 123, 456, 789 };
10450EOF
10451	if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452  (eval $ac_compile) 2>&5
10453  ac_status=$?
10454  echo "$as_me:10454: \$? = $ac_status" >&5
10455  (exit $ac_status); } ; then
10456		mv conftest.o data.o && \
10457		( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
10458	fi
10459	rm -f conftest.$ac_ext data.o
10460	cat >conftest.$ac_ext <<EOF
10461#line 10461 "configure"
10462int	testfunc()
10463{
10464#if defined(NeXT)
10465	exit(1);	/* I'm told this linker is broken */
10466#else
10467	extern int testdata[3];
10468	return testdata[0] == 123
10469	   &&  testdata[1] == 456
10470	   &&  testdata[2] == 789;
10471#endif
10472}
10473EOF
10474	if { (eval echo "$as_me:10474: \"$ac_compile\"") >&5
10475  (eval $ac_compile) 2>&5
10476  ac_status=$?
10477  echo "$as_me:10477: \$? = $ac_status" >&5
10478  (exit $ac_status); }; then
10479		mv conftest.o func.o && \
10480		( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
10481	fi
10482	rm -f conftest.$ac_ext func.o
10483	( eval $RANLIB conftest.a ) 2>&5 >/dev/null
10484	cf_saveLIBS="$LIBS"
10485	LIBS="conftest.a $LIBS"
10486	if test "$cross_compiling" = yes; then
10487  cf_cv_link_dataonly=unknown
10488else
10489  cat >conftest.$ac_ext <<_ACEOF
10490#line 10490 "configure"
10491#include "confdefs.h"
10492
10493	int main()
10494	{
10495		extern int testfunc();
10496		exit (!testfunc());
10497	}
10498
10499_ACEOF
10500rm -f conftest$ac_exeext
10501if { (eval echo "$as_me:10501: \"$ac_link\"") >&5
10502  (eval $ac_link) 2>&5
10503  ac_status=$?
10504  echo "$as_me:10504: \$? = $ac_status" >&5
10505  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10506  { (eval echo "$as_me:10506: \"$ac_try\"") >&5
10507  (eval $ac_try) 2>&5
10508  ac_status=$?
10509  echo "$as_me:10509: \$? = $ac_status" >&5
10510  (exit $ac_status); }; }; then
10511  cf_cv_link_dataonly=yes
10512else
10513  echo "$as_me: program exited with status $ac_status" >&5
10514echo "$as_me: failed program was:" >&5
10515cat conftest.$ac_ext >&5
10516cf_cv_link_dataonly=no
10517fi
10518rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10519fi
10520	LIBS="$cf_saveLIBS"
10521
10522fi
10523
10524echo "$as_me:10524: result: $cf_cv_link_dataonly" >&5
10525echo "${ECHO_T}$cf_cv_link_dataonly" >&6
10526
10527if test "$cf_cv_link_dataonly" = no ; then
10528	cat >>confdefs.h <<\EOF
10529#define BROKEN_LINKER 1
10530EOF
10531
10532	BROKEN_LINKER=1
10533fi
10534
10535###	Checks for library functions.
10536
10537for ac_func in \
10538getcwd \
10539getegid \
10540geteuid \
10541getttynam \
10542issetugid \
10543poll \
10544remove \
10545select \
10546setbuf \
10547setbuffer \
10548setvbuf \
10549sigaction \
10550sigvec \
10551strdup \
10552strstr \
10553tcgetpgrp \
10554times \
10555vsnprintf \
10556
10557do
10558as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10559echo "$as_me:10559: checking for $ac_func" >&5
10560echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10561if eval "test \"\${$as_ac_var+set}\" = set"; then
10562  echo $ECHO_N "(cached) $ECHO_C" >&6
10563else
10564  cat >conftest.$ac_ext <<_ACEOF
10565#line 10565 "configure"
10566#include "confdefs.h"
10567/* System header to define __stub macros and hopefully few prototypes,
10568    which can conflict with char $ac_func (); below.  */
10569#include <assert.h>
10570/* Override any gcc2 internal prototype to avoid an error.  */
10571#ifdef __cplusplus
10572extern "C"
10573#endif
10574/* We use char because int might match the return type of a gcc2
10575   builtin and then its argument prototype would still apply.  */
10576char $ac_func ();
10577char (*f) ();
10578
10579int
10580main ()
10581{
10582/* The GNU C library defines this for functions which it implements
10583    to always fail with ENOSYS.  Some functions are actually named
10584    something starting with __ and the normal name is an alias.  */
10585#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10586choke me
10587#else
10588f = $ac_func;
10589#endif
10590
10591  ;
10592  return 0;
10593}
10594_ACEOF
10595rm -f conftest.$ac_objext conftest$ac_exeext
10596if { (eval echo "$as_me:10596: \"$ac_link\"") >&5
10597  (eval $ac_link) 2>&5
10598  ac_status=$?
10599  echo "$as_me:10599: \$? = $ac_status" >&5
10600  (exit $ac_status); } &&
10601         { ac_try='test -s conftest$ac_exeext'
10602  { (eval echo "$as_me:10602: \"$ac_try\"") >&5
10603  (eval $ac_try) 2>&5
10604  ac_status=$?
10605  echo "$as_me:10605: \$? = $ac_status" >&5
10606  (exit $ac_status); }; }; then
10607  eval "$as_ac_var=yes"
10608else
10609  echo "$as_me: failed program was:" >&5
10610cat conftest.$ac_ext >&5
10611eval "$as_ac_var=no"
10612fi
10613rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10614fi
10615echo "$as_me:10615: result: `eval echo '${'$as_ac_var'}'`" >&5
10616echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10617if test `eval echo '${'$as_ac_var'}'` = yes; then
10618  cat >>confdefs.h <<EOF
10619#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10620EOF
10621
10622fi
10623done
10624
10625if test "$with_getcap" = "yes" ; then
10626
10627echo "$as_me:10627: checking for terminal-capability database functions" >&5
10628echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
10629if test "${cf_cv_cgetent+set}" = set; then
10630  echo $ECHO_N "(cached) $ECHO_C" >&6
10631else
10632
10633cat >conftest.$ac_ext <<_ACEOF
10634#line 10634 "configure"
10635#include "confdefs.h"
10636
10637#include <stdlib.h>
10638int
10639main ()
10640{
10641
10642	char temp[128];
10643	char *buf = temp;
10644	char *db_array = temp;
10645	cgetent(&buf, /* int *, */ &db_array, "vt100");
10646	cgetcap(buf, "tc", '=');
10647	cgetmatch(buf, "tc");
10648
10649  ;
10650  return 0;
10651}
10652_ACEOF
10653rm -f conftest.$ac_objext conftest$ac_exeext
10654if { (eval echo "$as_me:10654: \"$ac_link\"") >&5
10655  (eval $ac_link) 2>&5
10656  ac_status=$?
10657  echo "$as_me:10657: \$? = $ac_status" >&5
10658  (exit $ac_status); } &&
10659         { ac_try='test -s conftest$ac_exeext'
10660  { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661  (eval $ac_try) 2>&5
10662  ac_status=$?
10663  echo "$as_me:10663: \$? = $ac_status" >&5
10664  (exit $ac_status); }; }; then
10665  cf_cv_cgetent=yes
10666else
10667  echo "$as_me: failed program was:" >&5
10668cat conftest.$ac_ext >&5
10669cf_cv_cgetent=no
10670fi
10671rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10672
10673fi
10674
10675echo "$as_me:10675: result: $cf_cv_cgetent" >&5
10676echo "${ECHO_T}$cf_cv_cgetent" >&6
10677test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
10678#define HAVE_BSD_CGETENT 1
10679EOF
10680
10681fi
10682
10683echo "$as_me:10683: checking for isascii" >&5
10684echo $ECHO_N "checking for isascii... $ECHO_C" >&6
10685if test "${cf_cv_have_isascii+set}" = set; then
10686  echo $ECHO_N "(cached) $ECHO_C" >&6
10687else
10688
10689	cat >conftest.$ac_ext <<_ACEOF
10690#line 10690 "configure"
10691#include "confdefs.h"
10692#include <ctype.h>
10693int
10694main ()
10695{
10696int x = isascii(' ')
10697  ;
10698  return 0;
10699}
10700_ACEOF
10701rm -f conftest.$ac_objext conftest$ac_exeext
10702if { (eval echo "$as_me:10702: \"$ac_link\"") >&5
10703  (eval $ac_link) 2>&5
10704  ac_status=$?
10705  echo "$as_me:10705: \$? = $ac_status" >&5
10706  (exit $ac_status); } &&
10707         { ac_try='test -s conftest$ac_exeext'
10708  { (eval echo "$as_me:10708: \"$ac_try\"") >&5
10709  (eval $ac_try) 2>&5
10710  ac_status=$?
10711  echo "$as_me:10711: \$? = $ac_status" >&5
10712  (exit $ac_status); }; }; then
10713  cf_cv_have_isascii=yes
10714else
10715  echo "$as_me: failed program was:" >&5
10716cat conftest.$ac_ext >&5
10717cf_cv_have_isascii=no
10718fi
10719rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10720
10721fi
10722echo "$as_me:10722: result: $cf_cv_have_isascii" >&5
10723echo "${ECHO_T}$cf_cv_have_isascii" >&6
10724test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
10725#define HAVE_ISASCII 1
10726EOF
10727
10728if test "$ac_cv_func_sigaction" = yes; then
10729echo "$as_me:10729: checking whether sigaction needs _POSIX_SOURCE" >&5
10730echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
10731cat >conftest.$ac_ext <<_ACEOF
10732#line 10732 "configure"
10733#include "confdefs.h"
10734
10735#include <sys/types.h>
10736#include <signal.h>
10737int
10738main ()
10739{
10740struct sigaction act
10741  ;
10742  return 0;
10743}
10744_ACEOF
10745rm -f conftest.$ac_objext
10746if { (eval echo "$as_me:10746: \"$ac_compile\"") >&5
10747  (eval $ac_compile) 2>&5
10748  ac_status=$?
10749  echo "$as_me:10749: \$? = $ac_status" >&5
10750  (exit $ac_status); } &&
10751         { ac_try='test -s conftest.$ac_objext'
10752  { (eval echo "$as_me:10752: \"$ac_try\"") >&5
10753  (eval $ac_try) 2>&5
10754  ac_status=$?
10755  echo "$as_me:10755: \$? = $ac_status" >&5
10756  (exit $ac_status); }; }; then
10757  sigact_bad=no
10758else
10759  echo "$as_me: failed program was:" >&5
10760cat conftest.$ac_ext >&5
10761
10762cat >conftest.$ac_ext <<_ACEOF
10763#line 10763 "configure"
10764#include "confdefs.h"
10765
10766#define _POSIX_SOURCE
10767#include <sys/types.h>
10768#include <signal.h>
10769int
10770main ()
10771{
10772struct sigaction act
10773  ;
10774  return 0;
10775}
10776_ACEOF
10777rm -f conftest.$ac_objext
10778if { (eval echo "$as_me:10778: \"$ac_compile\"") >&5
10779  (eval $ac_compile) 2>&5
10780  ac_status=$?
10781  echo "$as_me:10781: \$? = $ac_status" >&5
10782  (exit $ac_status); } &&
10783         { ac_try='test -s conftest.$ac_objext'
10784  { (eval echo "$as_me:10784: \"$ac_try\"") >&5
10785  (eval $ac_try) 2>&5
10786  ac_status=$?
10787  echo "$as_me:10787: \$? = $ac_status" >&5
10788  (exit $ac_status); }; }; then
10789  sigact_bad=yes
10790	 cat >>confdefs.h <<\EOF
10791#define SVR4_ACTION 1
10792EOF
10793
10794else
10795  echo "$as_me: failed program was:" >&5
10796cat conftest.$ac_ext >&5
10797sigact_bad=unknown
10798fi
10799rm -f conftest.$ac_objext conftest.$ac_ext
10800fi
10801rm -f conftest.$ac_objext conftest.$ac_ext
10802echo "$as_me:10802: result: $sigact_bad" >&5
10803echo "${ECHO_T}$sigact_bad" >&6
10804fi
10805
10806echo "$as_me:10806: checking if nanosleep really works" >&5
10807echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
10808if test "${cf_cv_func_nanosleep+set}" = set; then
10809  echo $ECHO_N "(cached) $ECHO_C" >&6
10810else
10811
10812if test "$cross_compiling" = yes; then
10813  cf_cv_func_nanosleep=unknown
10814else
10815  cat >conftest.$ac_ext <<_ACEOF
10816#line 10816 "configure"
10817#include "confdefs.h"
10818
10819#include <stdio.h>
10820#include <errno.h>
10821#include <time.h>
10822
10823#ifdef HAVE_SYS_TIME_H
10824#include <sys/time.h>
10825#endif
10826
10827int main() {
10828	struct timespec ts1, ts2;
10829	int code;
10830	ts1.tv_sec  = 0;
10831	ts1.tv_nsec = 750000000;
10832	ts2.tv_sec  = 0;
10833	ts2.tv_nsec = 0;
10834	errno = 0;
10835	code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
10836	exit(code != 0);
10837}
10838
10839_ACEOF
10840rm -f conftest$ac_exeext
10841if { (eval echo "$as_me:10841: \"$ac_link\"") >&5
10842  (eval $ac_link) 2>&5
10843  ac_status=$?
10844  echo "$as_me:10844: \$? = $ac_status" >&5
10845  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10846  { (eval echo "$as_me:10846: \"$ac_try\"") >&5
10847  (eval $ac_try) 2>&5
10848  ac_status=$?
10849  echo "$as_me:10849: \$? = $ac_status" >&5
10850  (exit $ac_status); }; }; then
10851  cf_cv_func_nanosleep=yes
10852else
10853  echo "$as_me: program exited with status $ac_status" >&5
10854echo "$as_me: failed program was:" >&5
10855cat conftest.$ac_ext >&5
10856cf_cv_func_nanosleep=no
10857fi
10858rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10859fi
10860fi
10861echo "$as_me:10861: result: $cf_cv_func_nanosleep" >&5
10862echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
10863
10864test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
10865#define HAVE_NANOSLEEP 1
10866EOF
10867
10868for ac_header in \
10869termio.h \
10870termios.h \
10871unistd.h \
10872
10873do
10874as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10875echo "$as_me:10875: checking for $ac_header" >&5
10876echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10877if eval "test \"\${$as_ac_Header+set}\" = set"; then
10878  echo $ECHO_N "(cached) $ECHO_C" >&6
10879else
10880  cat >conftest.$ac_ext <<_ACEOF
10881#line 10881 "configure"
10882#include "confdefs.h"
10883#include <$ac_header>
10884_ACEOF
10885if { (eval echo "$as_me:10885: \"$ac_cpp conftest.$ac_ext\"") >&5
10886  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10887  ac_status=$?
10888  egrep -v '^ *\+' conftest.er1 >conftest.err
10889  rm -f conftest.er1
10890  cat conftest.err >&5
10891  echo "$as_me:10891: \$? = $ac_status" >&5
10892  (exit $ac_status); } >/dev/null; then
10893  if test -s conftest.err; then
10894    ac_cpp_err=$ac_c_preproc_warn_flag
10895  else
10896    ac_cpp_err=
10897  fi
10898else
10899  ac_cpp_err=yes
10900fi
10901if test -z "$ac_cpp_err"; then
10902  eval "$as_ac_Header=yes"
10903else
10904  echo "$as_me: failed program was:" >&5
10905  cat conftest.$ac_ext >&5
10906  eval "$as_ac_Header=no"
10907fi
10908rm -f conftest.err conftest.$ac_ext
10909fi
10910echo "$as_me:10910: result: `eval echo '${'$as_ac_Header'}'`" >&5
10911echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10912if test `eval echo '${'$as_ac_Header'}'` = yes; then
10913  cat >>confdefs.h <<EOF
10914#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10915EOF
10916
10917fi
10918done
10919
10920if test "$ISC" = yes ; then
10921
10922for ac_header in sys/termio.h
10923do
10924as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10925echo "$as_me:10925: checking for $ac_header" >&5
10926echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10927if eval "test \"\${$as_ac_Header+set}\" = set"; then
10928  echo $ECHO_N "(cached) $ECHO_C" >&6
10929else
10930  cat >conftest.$ac_ext <<_ACEOF
10931#line 10931 "configure"
10932#include "confdefs.h"
10933#include <$ac_header>
10934_ACEOF
10935if { (eval echo "$as_me:10935: \"$ac_cpp conftest.$ac_ext\"") >&5
10936  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10937  ac_status=$?
10938  egrep -v '^ *\+' conftest.er1 >conftest.err
10939  rm -f conftest.er1
10940  cat conftest.err >&5
10941  echo "$as_me:10941: \$? = $ac_status" >&5
10942  (exit $ac_status); } >/dev/null; then
10943  if test -s conftest.err; then
10944    ac_cpp_err=$ac_c_preproc_warn_flag
10945  else
10946    ac_cpp_err=
10947  fi
10948else
10949  ac_cpp_err=yes
10950fi
10951if test -z "$ac_cpp_err"; then
10952  eval "$as_ac_Header=yes"
10953else
10954  echo "$as_me: failed program was:" >&5
10955  cat conftest.$ac_ext >&5
10956  eval "$as_ac_Header=no"
10957fi
10958rm -f conftest.err conftest.$ac_ext
10959fi
10960echo "$as_me:10960: result: `eval echo '${'$as_ac_Header'}'`" >&5
10961echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10962if test `eval echo '${'$as_ac_Header'}'` = yes; then
10963  cat >>confdefs.h <<EOF
10964#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10965EOF
10966
10967fi
10968done
10969
10970fi
10971if test "$ac_cv_header_termios_h" = yes ; then
10972	case "$CFLAGS $CPPFLAGS" in
10973	*-D_POSIX_SOURCE*)
10974		termios_bad=dunno ;;
10975	*)	termios_bad=maybe ;;
10976	esac
10977	if test "$termios_bad" = maybe ; then
10978	echo "$as_me:10978: checking whether termios.h needs _POSIX_SOURCE" >&5
10979echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
10980	cat >conftest.$ac_ext <<_ACEOF
10981#line 10981 "configure"
10982#include "confdefs.h"
10983#include <termios.h>
10984int
10985main ()
10986{
10987struct termios foo; int x = foo.c_iflag
10988  ;
10989  return 0;
10990}
10991_ACEOF
10992rm -f conftest.$ac_objext
10993if { (eval echo "$as_me:10993: \"$ac_compile\"") >&5
10994  (eval $ac_compile) 2>&5
10995  ac_status=$?
10996  echo "$as_me:10996: \$? = $ac_status" >&5
10997  (exit $ac_status); } &&
10998         { ac_try='test -s conftest.$ac_objext'
10999  { (eval echo "$as_me:10999: \"$ac_try\"") >&5
11000  (eval $ac_try) 2>&5
11001  ac_status=$?
11002  echo "$as_me:11002: \$? = $ac_status" >&5
11003  (exit $ac_status); }; }; then
11004  termios_bad=no
11005else
11006  echo "$as_me: failed program was:" >&5
11007cat conftest.$ac_ext >&5
11008
11009		cat >conftest.$ac_ext <<_ACEOF
11010#line 11010 "configure"
11011#include "confdefs.h"
11012
11013#define _POSIX_SOURCE
11014#include <termios.h>
11015int
11016main ()
11017{
11018struct termios foo; int x = foo.c_iflag
11019  ;
11020  return 0;
11021}
11022_ACEOF
11023rm -f conftest.$ac_objext
11024if { (eval echo "$as_me:11024: \"$ac_compile\"") >&5
11025  (eval $ac_compile) 2>&5
11026  ac_status=$?
11027  echo "$as_me:11027: \$? = $ac_status" >&5
11028  (exit $ac_status); } &&
11029         { ac_try='test -s conftest.$ac_objext'
11030  { (eval echo "$as_me:11030: \"$ac_try\"") >&5
11031  (eval $ac_try) 2>&5
11032  ac_status=$?
11033  echo "$as_me:11033: \$? = $ac_status" >&5
11034  (exit $ac_status); }; }; then
11035  termios_bad=unknown
11036else
11037  echo "$as_me: failed program was:" >&5
11038cat conftest.$ac_ext >&5
11039termios_bad=yes cat >>confdefs.h <<\EOF
11040#define SVR4_TERMIO 1
11041EOF
11042
11043fi
11044rm -f conftest.$ac_objext conftest.$ac_ext
11045
11046fi
11047rm -f conftest.$ac_objext conftest.$ac_ext
11048	echo "$as_me:11048: result: $termios_bad" >&5
11049echo "${ECHO_T}$termios_bad" >&6
11050	fi
11051fi
11052
11053echo "$as_me:11053: checking for tcgetattr" >&5
11054echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
11055if test "${cf_cv_have_tcgetattr+set}" = set; then
11056  echo $ECHO_N "(cached) $ECHO_C" >&6
11057else
11058
11059cat >conftest.$ac_ext <<_ACEOF
11060#line 11060 "configure"
11061#include "confdefs.h"
11062
11063#include <sys/types.h>
11064#ifdef HAVE_UNISTD_H
11065#include <unistd.h>
11066#endif
11067#ifdef HAVE_TERMIOS_H
11068#include <termios.h>
11069#define TTY struct termios
11070#else
11071#ifdef HAVE_TERMIO_H
11072#include <termio.h>
11073#define TTY struct termio
11074#endif
11075#endif
11076
11077int
11078main ()
11079{
11080
11081TTY foo;
11082tcgetattr(1, &foo);
11083  ;
11084  return 0;
11085}
11086_ACEOF
11087rm -f conftest.$ac_objext conftest$ac_exeext
11088if { (eval echo "$as_me:11088: \"$ac_link\"") >&5
11089  (eval $ac_link) 2>&5
11090  ac_status=$?
11091  echo "$as_me:11091: \$? = $ac_status" >&5
11092  (exit $ac_status); } &&
11093         { ac_try='test -s conftest$ac_exeext'
11094  { (eval echo "$as_me:11094: \"$ac_try\"") >&5
11095  (eval $ac_try) 2>&5
11096  ac_status=$?
11097  echo "$as_me:11097: \$? = $ac_status" >&5
11098  (exit $ac_status); }; }; then
11099  cf_cv_have_tcgetattr=yes
11100else
11101  echo "$as_me: failed program was:" >&5
11102cat conftest.$ac_ext >&5
11103cf_cv_have_tcgetattr=no
11104fi
11105rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11106fi
11107echo "$as_me:11107: result: $cf_cv_have_tcgetattr" >&5
11108echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
11109test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
11110#define HAVE_TCGETATTR 1
11111EOF
11112
11113echo "$as_me:11113: checking for vsscanf function or workaround" >&5
11114echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
11115if test "${cf_cv_func_vsscanf+set}" = set; then
11116  echo $ECHO_N "(cached) $ECHO_C" >&6
11117else
11118
11119cat >conftest.$ac_ext <<_ACEOF
11120#line 11120 "configure"
11121#include "confdefs.h"
11122
11123#include <stdarg.h>
11124#include <stdio.h>
11125int
11126main ()
11127{
11128
11129	va_list ap;
11130	vsscanf("from", "%d", ap)
11131  ;
11132  return 0;
11133}
11134_ACEOF
11135rm -f conftest.$ac_objext conftest$ac_exeext
11136if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137  (eval $ac_link) 2>&5
11138  ac_status=$?
11139  echo "$as_me:11139: \$? = $ac_status" >&5
11140  (exit $ac_status); } &&
11141         { ac_try='test -s conftest$ac_exeext'
11142  { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143  (eval $ac_try) 2>&5
11144  ac_status=$?
11145  echo "$as_me:11145: \$? = $ac_status" >&5
11146  (exit $ac_status); }; }; then
11147  cf_cv_func_vsscanf=vsscanf
11148else
11149  echo "$as_me: failed program was:" >&5
11150cat conftest.$ac_ext >&5
11151
11152cat >conftest.$ac_ext <<_ACEOF
11153#line 11153 "configure"
11154#include "confdefs.h"
11155
11156#include <stdarg.h>
11157#include <stdio.h>
11158int
11159main ()
11160{
11161
11162    FILE strbuf;
11163    char *str = "from";
11164
11165    strbuf._flag = _IOREAD;
11166    strbuf._ptr = strbuf._base = (unsigned char *) str;
11167    strbuf._cnt = strlen(str);
11168    strbuf._file = _NFILE;
11169    return (vfscanf(&strbuf, "%d", ap))
11170  ;
11171  return 0;
11172}
11173_ACEOF
11174rm -f conftest.$ac_objext conftest$ac_exeext
11175if { (eval echo "$as_me:11175: \"$ac_link\"") >&5
11176  (eval $ac_link) 2>&5
11177  ac_status=$?
11178  echo "$as_me:11178: \$? = $ac_status" >&5
11179  (exit $ac_status); } &&
11180         { ac_try='test -s conftest$ac_exeext'
11181  { (eval echo "$as_me:11181: \"$ac_try\"") >&5
11182  (eval $ac_try) 2>&5
11183  ac_status=$?
11184  echo "$as_me:11184: \$? = $ac_status" >&5
11185  (exit $ac_status); }; }; then
11186  cf_cv_func_vsscanf=vfscanf
11187else
11188  echo "$as_me: failed program was:" >&5
11189cat conftest.$ac_ext >&5
11190
11191cat >conftest.$ac_ext <<_ACEOF
11192#line 11192 "configure"
11193#include "confdefs.h"
11194
11195#include <stdarg.h>
11196#include <stdio.h>
11197int
11198main ()
11199{
11200
11201    FILE strbuf;
11202    char *str = "from";
11203
11204    strbuf._flag = _IOREAD;
11205    strbuf._ptr = strbuf._base = (unsigned char *) str;
11206    strbuf._cnt = strlen(str);
11207    strbuf._file = _NFILE;
11208    return (_doscan(&strbuf, "%d", ap))
11209  ;
11210  return 0;
11211}
11212_ACEOF
11213rm -f conftest.$ac_objext conftest$ac_exeext
11214if { (eval echo "$as_me:11214: \"$ac_link\"") >&5
11215  (eval $ac_link) 2>&5
11216  ac_status=$?
11217  echo "$as_me:11217: \$? = $ac_status" >&5
11218  (exit $ac_status); } &&
11219         { ac_try='test -s conftest$ac_exeext'
11220  { (eval echo "$as_me:11220: \"$ac_try\"") >&5
11221  (eval $ac_try) 2>&5
11222  ac_status=$?
11223  echo "$as_me:11223: \$? = $ac_status" >&5
11224  (exit $ac_status); }; }; then
11225  cf_cv_func_vsscanf=_doscan
11226else
11227  echo "$as_me: failed program was:" >&5
11228cat conftest.$ac_ext >&5
11229
11230cf_cv_func_vsscanf=no
11231fi
11232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11233fi
11234rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11235fi
11236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11237fi
11238echo "$as_me:11238: result: $cf_cv_func_vsscanf" >&5
11239echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
11240
11241case $cf_cv_func_vsscanf in #(vi
11242vsscanf) cat >>confdefs.h <<\EOF
11243#define HAVE_VSSCANF 1
11244EOF
11245;; #(vi
11246vfscanf) cat >>confdefs.h <<\EOF
11247#define HAVE_VFSCANF 1
11248EOF
11249;; #(vi
11250_doscan) cat >>confdefs.h <<\EOF
11251#define HAVE__DOSCAN 1
11252EOF
11253;;
11254esac
11255
11256echo "$as_me:11256: checking for working mkstemp" >&5
11257echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
11258if test "${cf_cv_func_mkstemp+set}" = set; then
11259  echo $ECHO_N "(cached) $ECHO_C" >&6
11260else
11261
11262rm -f conftest*
11263if test "$cross_compiling" = yes; then
11264  echo "$as_me:11264: checking for mkstemp" >&5
11265echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
11266if test "${ac_cv_func_mkstemp+set}" = set; then
11267  echo $ECHO_N "(cached) $ECHO_C" >&6
11268else
11269  cat >conftest.$ac_ext <<_ACEOF
11270#line 11270 "configure"
11271#include "confdefs.h"
11272/* System header to define __stub macros and hopefully few prototypes,
11273    which can conflict with char mkstemp (); below.  */
11274#include <assert.h>
11275/* Override any gcc2 internal prototype to avoid an error.  */
11276#ifdef __cplusplus
11277extern "C"
11278#endif
11279/* We use char because int might match the return type of a gcc2
11280   builtin and then its argument prototype would still apply.  */
11281char mkstemp ();
11282char (*f) ();
11283
11284int
11285main ()
11286{
11287/* The GNU C library defines this for functions which it implements
11288    to always fail with ENOSYS.  Some functions are actually named
11289    something starting with __ and the normal name is an alias.  */
11290#if defined (__stub_mkstemp) || defined (__stub___mkstemp)
11291choke me
11292#else
11293f = mkstemp;
11294#endif
11295
11296  ;
11297  return 0;
11298}
11299_ACEOF
11300rm -f conftest.$ac_objext conftest$ac_exeext
11301if { (eval echo "$as_me:11301: \"$ac_link\"") >&5
11302  (eval $ac_link) 2>&5
11303  ac_status=$?
11304  echo "$as_me:11304: \$? = $ac_status" >&5
11305  (exit $ac_status); } &&
11306         { ac_try='test -s conftest$ac_exeext'
11307  { (eval echo "$as_me:11307: \"$ac_try\"") >&5
11308  (eval $ac_try) 2>&5
11309  ac_status=$?
11310  echo "$as_me:11310: \$? = $ac_status" >&5
11311  (exit $ac_status); }; }; then
11312  ac_cv_func_mkstemp=yes
11313else
11314  echo "$as_me: failed program was:" >&5
11315cat conftest.$ac_ext >&5
11316ac_cv_func_mkstemp=no
11317fi
11318rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11319fi
11320echo "$as_me:11320: result: $ac_cv_func_mkstemp" >&5
11321echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
11322
11323else
11324  cat >conftest.$ac_ext <<_ACEOF
11325#line 11325 "configure"
11326#include "confdefs.h"
11327
11328#include <sys/types.h>
11329#include <stdlib.h>
11330#include <stdio.h>
11331#include <string.h>
11332#include <sys/stat.h>
11333int main()
11334{
11335	char *tmpl = "conftestXXXXXX";
11336	char name[2][80];
11337	int n;
11338	int result = 0;
11339	int fd;
11340	struct stat sb;
11341
11342	umask(077);
11343	for (n = 0; n < 2; ++n) {
11344		strcpy(name[n], tmpl);
11345		if ((fd = mkstemp(name[n])) >= 0) {
11346			if (!strcmp(name[n], tmpl)
11347			 || stat(name[n], &sb) != 0
11348			 || (sb.st_mode & S_IFMT) != S_IFREG
11349			 || (sb.st_mode & 077) != 0) {
11350				result = 1;
11351			}
11352			close(fd);
11353		}
11354	}
11355	if (result == 0
11356	 && !strcmp(name[0], name[1]))
11357		result = 1;
11358	exit(result);
11359}
11360
11361_ACEOF
11362rm -f conftest$ac_exeext
11363if { (eval echo "$as_me:11363: \"$ac_link\"") >&5
11364  (eval $ac_link) 2>&5
11365  ac_status=$?
11366  echo "$as_me:11366: \$? = $ac_status" >&5
11367  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11368  { (eval echo "$as_me:11368: \"$ac_try\"") >&5
11369  (eval $ac_try) 2>&5
11370  ac_status=$?
11371  echo "$as_me:11371: \$? = $ac_status" >&5
11372  (exit $ac_status); }; }; then
11373  cf_cv_func_mkstemp=yes
11374
11375else
11376  echo "$as_me: program exited with status $ac_status" >&5
11377echo "$as_me: failed program was:" >&5
11378cat conftest.$ac_ext >&5
11379cf_cv_func_mkstemp=no
11380
11381fi
11382rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11383fi
11384
11385fi
11386echo "$as_me:11386: result: $cf_cv_func_mkstemp" >&5
11387echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
11388if test "$cf_cv_func_mkstemp" = yes ; then
11389	cat >>confdefs.h <<\EOF
11390#define HAVE_MKSTEMP 1
11391EOF
11392
11393fi
11394
11395# setup for prototype of fallback for vsscanf()
11396if test "$cf_cv_func_vsscanf" = vsscanf ; then
11397	HAVE_VSSCANF=1
11398else
11399	HAVE_VSSCANF=0
11400fi
11401
11402if test "$cross_compiling" = yes ; then
11403	{ echo "$as_me:11403: WARNING: cross compiling: assume setvbuf params not reversed" >&5
11404echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
11405else
11406	echo "$as_me:11406: checking whether setvbuf arguments are reversed" >&5
11407echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
11408if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
11409  echo $ECHO_N "(cached) $ECHO_C" >&6
11410else
11411  if test "$cross_compiling" = yes; then
11412  { { echo "$as_me:11412: error: cannot run test program while cross compiling" >&5
11413echo "$as_me: error: cannot run test program while cross compiling" >&2;}
11414   { (exit 1); exit 1; }; }
11415else
11416  cat >conftest.$ac_ext <<_ACEOF
11417#line 11417 "configure"
11418#include "confdefs.h"
11419#include <stdio.h>
11420/* If setvbuf has the reversed format, exit 0. */
11421int
11422main ()
11423{
11424  /* This call has the arguments reversed.
11425     A reversed system may check and see that the address of main
11426     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
11427  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
11428    exit(1);
11429  putc('\r', stdout);
11430  exit(0);			/* Non-reversed systems segv here.  */
11431}
11432_ACEOF
11433rm -f conftest$ac_exeext
11434if { (eval echo "$as_me:11434: \"$ac_link\"") >&5
11435  (eval $ac_link) 2>&5
11436  ac_status=$?
11437  echo "$as_me:11437: \$? = $ac_status" >&5
11438  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11439  { (eval echo "$as_me:11439: \"$ac_try\"") >&5
11440  (eval $ac_try) 2>&5
11441  ac_status=$?
11442  echo "$as_me:11442: \$? = $ac_status" >&5
11443  (exit $ac_status); }; }; then
11444  ac_cv_func_setvbuf_reversed=yes
11445else
11446  echo "$as_me: program exited with status $ac_status" >&5
11447echo "$as_me: failed program was:" >&5
11448cat conftest.$ac_ext >&5
11449ac_cv_func_setvbuf_reversed=no
11450fi
11451rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11452fi
11453rm -f core core.* *.core
11454fi
11455echo "$as_me:11455: result: $ac_cv_func_setvbuf_reversed" >&5
11456echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
11457if test $ac_cv_func_setvbuf_reversed = yes; then
11458
11459cat >>confdefs.h <<\EOF
11460#define SETVBUF_REVERSED 1
11461EOF
11462
11463fi
11464
11465fi
11466echo "$as_me:11466: checking return type of signal handlers" >&5
11467echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
11468if test "${ac_cv_type_signal+set}" = set; then
11469  echo $ECHO_N "(cached) $ECHO_C" >&6
11470else
11471  cat >conftest.$ac_ext <<_ACEOF
11472#line 11472 "configure"
11473#include "confdefs.h"
11474#include <sys/types.h>
11475#include <signal.h>
11476#ifdef signal
11477# undef signal
11478#endif
11479#ifdef __cplusplus
11480extern "C" void (*signal (int, void (*)(int)))(int);
11481#else
11482void (*signal ()) ();
11483#endif
11484
11485int
11486main ()
11487{
11488int i;
11489  ;
11490  return 0;
11491}
11492_ACEOF
11493rm -f conftest.$ac_objext
11494if { (eval echo "$as_me:11494: \"$ac_compile\"") >&5
11495  (eval $ac_compile) 2>&5
11496  ac_status=$?
11497  echo "$as_me:11497: \$? = $ac_status" >&5
11498  (exit $ac_status); } &&
11499         { ac_try='test -s conftest.$ac_objext'
11500  { (eval echo "$as_me:11500: \"$ac_try\"") >&5
11501  (eval $ac_try) 2>&5
11502  ac_status=$?
11503  echo "$as_me:11503: \$? = $ac_status" >&5
11504  (exit $ac_status); }; }; then
11505  ac_cv_type_signal=void
11506else
11507  echo "$as_me: failed program was:" >&5
11508cat conftest.$ac_ext >&5
11509ac_cv_type_signal=int
11510fi
11511rm -f conftest.$ac_objext conftest.$ac_ext
11512fi
11513echo "$as_me:11513: result: $ac_cv_type_signal" >&5
11514echo "${ECHO_T}$ac_cv_type_signal" >&6
11515
11516cat >>confdefs.h <<EOF
11517#define RETSIGTYPE $ac_cv_type_signal
11518EOF
11519
11520echo "$as_me:11520: checking for type sigaction_t" >&5
11521echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
11522if test "${cf_cv_type_sigaction+set}" = set; then
11523  echo $ECHO_N "(cached) $ECHO_C" >&6
11524else
11525
11526	cat >conftest.$ac_ext <<_ACEOF
11527#line 11527 "configure"
11528#include "confdefs.h"
11529
11530#include <signal.h>
11531int
11532main ()
11533{
11534sigaction_t x
11535  ;
11536  return 0;
11537}
11538_ACEOF
11539rm -f conftest.$ac_objext
11540if { (eval echo "$as_me:11540: \"$ac_compile\"") >&5
11541  (eval $ac_compile) 2>&5
11542  ac_status=$?
11543  echo "$as_me:11543: \$? = $ac_status" >&5
11544  (exit $ac_status); } &&
11545         { ac_try='test -s conftest.$ac_objext'
11546  { (eval echo "$as_me:11546: \"$ac_try\"") >&5
11547  (eval $ac_try) 2>&5
11548  ac_status=$?
11549  echo "$as_me:11549: \$? = $ac_status" >&5
11550  (exit $ac_status); }; }; then
11551  cf_cv_type_sigaction=yes
11552else
11553  echo "$as_me: failed program was:" >&5
11554cat conftest.$ac_ext >&5
11555cf_cv_type_sigaction=no
11556fi
11557rm -f conftest.$ac_objext conftest.$ac_ext
11558fi
11559
11560echo "$as_me:11560: result: $cf_cv_type_sigaction" >&5
11561echo "${ECHO_T}$cf_cv_type_sigaction" >&6
11562test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
11563#define HAVE_TYPE_SIGACTION 1
11564EOF
11565
11566echo "$as_me:11566: checking declaration of size-change" >&5
11567echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
11568if test "${cf_cv_sizechange+set}" = set; then
11569  echo $ECHO_N "(cached) $ECHO_C" >&6
11570else
11571
11572    cf_cv_sizechange=unknown
11573    cf_save_CPPFLAGS="$CPPFLAGS"
11574
11575for cf_opts in "" "NEED_PTEM_H"
11576do
11577
11578    CPPFLAGS="$cf_save_CPPFLAGS"
11579    test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
11580    cat >conftest.$ac_ext <<_ACEOF
11581#line 11581 "configure"
11582#include "confdefs.h"
11583#include <sys/types.h>
11584#ifdef HAVE_TERMIOS_H
11585#include <termios.h>
11586#else
11587#ifdef HAVE_TERMIO_H
11588#include <termio.h>
11589#endif
11590#endif
11591#ifdef NEED_PTEM_H
11592/* This is a workaround for SCO:  they neglected to define struct winsize in
11593 * termios.h -- it's only in termio.h and ptem.h
11594 */
11595#include        <sys/stream.h>
11596#include        <sys/ptem.h>
11597#endif
11598#if !defined(sun) || !defined(HAVE_TERMIOS_H)
11599#include <sys/ioctl.h>
11600#endif
11601
11602int
11603main ()
11604{
11605
11606#ifdef TIOCGSIZE
11607	struct ttysize win;	/* FIXME: what system is this? */
11608	int y = win.ts_lines;
11609	int x = win.ts_cols;
11610#else
11611#ifdef TIOCGWINSZ
11612	struct winsize win;
11613	int y = win.ws_row;
11614	int x = win.ws_col;
11615#else
11616	no TIOCGSIZE or TIOCGWINSZ
11617#endif /* TIOCGWINSZ */
11618#endif /* TIOCGSIZE */
11619
11620  ;
11621  return 0;
11622}
11623_ACEOF
11624rm -f conftest.$ac_objext
11625if { (eval echo "$as_me:11625: \"$ac_compile\"") >&5
11626  (eval $ac_compile) 2>&5
11627  ac_status=$?
11628  echo "$as_me:11628: \$? = $ac_status" >&5
11629  (exit $ac_status); } &&
11630         { ac_try='test -s conftest.$ac_objext'
11631  { (eval echo "$as_me:11631: \"$ac_try\"") >&5
11632  (eval $ac_try) 2>&5
11633  ac_status=$?
11634  echo "$as_me:11634: \$? = $ac_status" >&5
11635  (exit $ac_status); }; }; then
11636  cf_cv_sizechange=yes
11637else
11638  echo "$as_me: failed program was:" >&5
11639cat conftest.$ac_ext >&5
11640cf_cv_sizechange=no
11641fi
11642rm -f conftest.$ac_objext conftest.$ac_ext
11643
11644	CPPFLAGS="$cf_save_CPPFLAGS"
11645	if test "$cf_cv_sizechange" = yes ; then
11646		echo "size-change succeeded ($cf_opts)" >&5
11647		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
11648		break
11649	fi
11650done
11651
11652fi
11653echo "$as_me:11653: result: $cf_cv_sizechange" >&5
11654echo "${ECHO_T}$cf_cv_sizechange" >&6
11655if test "$cf_cv_sizechange" != no ; then
11656	cat >>confdefs.h <<\EOF
11657#define HAVE_SIZECHANGE 1
11658EOF
11659
11660	case $cf_cv_sizechange in #(vi
11661	NEED*)
11662		cat >>confdefs.h <<EOF
11663#define $cf_cv_sizechange  1
11664EOF
11665
11666		;;
11667	esac
11668fi
11669
11670echo "$as_me:11670: checking for memmove" >&5
11671echo $ECHO_N "checking for memmove... $ECHO_C" >&6
11672if test "${ac_cv_func_memmove+set}" = set; then
11673  echo $ECHO_N "(cached) $ECHO_C" >&6
11674else
11675  cat >conftest.$ac_ext <<_ACEOF
11676#line 11676 "configure"
11677#include "confdefs.h"
11678/* System header to define __stub macros and hopefully few prototypes,
11679    which can conflict with char memmove (); below.  */
11680#include <assert.h>
11681/* Override any gcc2 internal prototype to avoid an error.  */
11682#ifdef __cplusplus
11683extern "C"
11684#endif
11685/* We use char because int might match the return type of a gcc2
11686   builtin and then its argument prototype would still apply.  */
11687char memmove ();
11688char (*f) ();
11689
11690int
11691main ()
11692{
11693/* The GNU C library defines this for functions which it implements
11694    to always fail with ENOSYS.  Some functions are actually named
11695    something starting with __ and the normal name is an alias.  */
11696#if defined (__stub_memmove) || defined (__stub___memmove)
11697choke me
11698#else
11699f = memmove;
11700#endif
11701
11702  ;
11703  return 0;
11704}
11705_ACEOF
11706rm -f conftest.$ac_objext conftest$ac_exeext
11707if { (eval echo "$as_me:11707: \"$ac_link\"") >&5
11708  (eval $ac_link) 2>&5
11709  ac_status=$?
11710  echo "$as_me:11710: \$? = $ac_status" >&5
11711  (exit $ac_status); } &&
11712         { ac_try='test -s conftest$ac_exeext'
11713  { (eval echo "$as_me:11713: \"$ac_try\"") >&5
11714  (eval $ac_try) 2>&5
11715  ac_status=$?
11716  echo "$as_me:11716: \$? = $ac_status" >&5
11717  (exit $ac_status); }; }; then
11718  ac_cv_func_memmove=yes
11719else
11720  echo "$as_me: failed program was:" >&5
11721cat conftest.$ac_ext >&5
11722ac_cv_func_memmove=no
11723fi
11724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11725fi
11726echo "$as_me:11726: result: $ac_cv_func_memmove" >&5
11727echo "${ECHO_T}$ac_cv_func_memmove" >&6
11728if test $ac_cv_func_memmove = yes; then
11729  :
11730else
11731
11732echo "$as_me:11732: checking for bcopy" >&5
11733echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
11734if test "${ac_cv_func_bcopy+set}" = set; then
11735  echo $ECHO_N "(cached) $ECHO_C" >&6
11736else
11737  cat >conftest.$ac_ext <<_ACEOF
11738#line 11738 "configure"
11739#include "confdefs.h"
11740/* System header to define __stub macros and hopefully few prototypes,
11741    which can conflict with char bcopy (); below.  */
11742#include <assert.h>
11743/* Override any gcc2 internal prototype to avoid an error.  */
11744#ifdef __cplusplus
11745extern "C"
11746#endif
11747/* We use char because int might match the return type of a gcc2
11748   builtin and then its argument prototype would still apply.  */
11749char bcopy ();
11750char (*f) ();
11751
11752int
11753main ()
11754{
11755/* The GNU C library defines this for functions which it implements
11756    to always fail with ENOSYS.  Some functions are actually named
11757    something starting with __ and the normal name is an alias.  */
11758#if defined (__stub_bcopy) || defined (__stub___bcopy)
11759choke me
11760#else
11761f = bcopy;
11762#endif
11763
11764  ;
11765  return 0;
11766}
11767_ACEOF
11768rm -f conftest.$ac_objext conftest$ac_exeext
11769if { (eval echo "$as_me:11769: \"$ac_link\"") >&5
11770  (eval $ac_link) 2>&5
11771  ac_status=$?
11772  echo "$as_me:11772: \$? = $ac_status" >&5
11773  (exit $ac_status); } &&
11774         { ac_try='test -s conftest$ac_exeext'
11775  { (eval echo "$as_me:11775: \"$ac_try\"") >&5
11776  (eval $ac_try) 2>&5
11777  ac_status=$?
11778  echo "$as_me:11778: \$? = $ac_status" >&5
11779  (exit $ac_status); }; }; then
11780  ac_cv_func_bcopy=yes
11781else
11782  echo "$as_me: failed program was:" >&5
11783cat conftest.$ac_ext >&5
11784ac_cv_func_bcopy=no
11785fi
11786rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11787fi
11788echo "$as_me:11788: result: $ac_cv_func_bcopy" >&5
11789echo "${ECHO_T}$ac_cv_func_bcopy" >&6
11790if test $ac_cv_func_bcopy = yes; then
11791
11792	echo "$as_me:11792: checking if bcopy does overlapping moves" >&5
11793echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
11794if test "${cf_cv_good_bcopy+set}" = set; then
11795  echo $ECHO_N "(cached) $ECHO_C" >&6
11796else
11797
11798		if test "$cross_compiling" = yes; then
11799  cf_cv_good_bcopy=unknown
11800else
11801  cat >conftest.$ac_ext <<_ACEOF
11802#line 11802 "configure"
11803#include "confdefs.h"
11804
11805int main() {
11806	static char data[] = "abcdefghijklmnopqrstuwwxyz";
11807	char temp[40];
11808	bcopy(data, temp, sizeof(data));
11809	bcopy(temp+10, temp, 15);
11810	bcopy(temp+5, temp+15, 10);
11811	exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
11812}
11813
11814_ACEOF
11815rm -f conftest$ac_exeext
11816if { (eval echo "$as_me:11816: \"$ac_link\"") >&5
11817  (eval $ac_link) 2>&5
11818  ac_status=$?
11819  echo "$as_me:11819: \$? = $ac_status" >&5
11820  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11821  { (eval echo "$as_me:11821: \"$ac_try\"") >&5
11822  (eval $ac_try) 2>&5
11823  ac_status=$?
11824  echo "$as_me:11824: \$? = $ac_status" >&5
11825  (exit $ac_status); }; }; then
11826  cf_cv_good_bcopy=yes
11827else
11828  echo "$as_me: program exited with status $ac_status" >&5
11829echo "$as_me: failed program was:" >&5
11830cat conftest.$ac_ext >&5
11831cf_cv_good_bcopy=no
11832fi
11833rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11834fi
11835
11836fi
11837echo "$as_me:11837: result: $cf_cv_good_bcopy" >&5
11838echo "${ECHO_T}$cf_cv_good_bcopy" >&6
11839
11840else
11841  cf_cv_good_bcopy=no
11842fi
11843
11844	if test "$cf_cv_good_bcopy" = yes ; then
11845		cat >>confdefs.h <<\EOF
11846#define USE_OK_BCOPY 1
11847EOF
11848
11849	else
11850		cat >>confdefs.h <<\EOF
11851#define USE_MY_MEMMOVE 1
11852EOF
11853
11854	fi
11855
11856fi
11857
11858echo "$as_me:11858: checking if poll really works" >&5
11859echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
11860if test "${cf_cv_working_poll+set}" = set; then
11861  echo $ECHO_N "(cached) $ECHO_C" >&6
11862else
11863
11864if test "$cross_compiling" = yes; then
11865  cf_cv_working_poll=unknown
11866else
11867  cat >conftest.$ac_ext <<_ACEOF
11868#line 11868 "configure"
11869#include "confdefs.h"
11870
11871#include <stdio.h>
11872#ifdef HAVE_POLL_H
11873#include <poll.h>
11874#else
11875#include <sys/poll.h>
11876#endif
11877int main() {
11878	struct pollfd myfds;
11879	int ret;
11880
11881	myfds.fd = 0;
11882	myfds.events = POLLIN;
11883
11884	ret = poll(&myfds, 1, 100);
11885	exit(ret != 0);
11886}
11887_ACEOF
11888rm -f conftest$ac_exeext
11889if { (eval echo "$as_me:11889: \"$ac_link\"") >&5
11890  (eval $ac_link) 2>&5
11891  ac_status=$?
11892  echo "$as_me:11892: \$? = $ac_status" >&5
11893  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11894  { (eval echo "$as_me:11894: \"$ac_try\"") >&5
11895  (eval $ac_try) 2>&5
11896  ac_status=$?
11897  echo "$as_me:11897: \$? = $ac_status" >&5
11898  (exit $ac_status); }; }; then
11899  cf_cv_working_poll=yes
11900else
11901  echo "$as_me: program exited with status $ac_status" >&5
11902echo "$as_me: failed program was:" >&5
11903cat conftest.$ac_ext >&5
11904cf_cv_working_poll=no
11905fi
11906rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11907fi
11908fi
11909echo "$as_me:11909: result: $cf_cv_working_poll" >&5
11910echo "${ECHO_T}$cf_cv_working_poll" >&6
11911test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
11912#define HAVE_WORKING_POLL 1
11913EOF
11914
11915if test -z "$cf_user_CFLAGS" ; then
11916	CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11917	CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
11918fi
11919
11920# Just in case, check if the C compiler has a bool type.
11921
11922echo "$as_me:11922: checking if we should include stdbool.h" >&5
11923echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
11924
11925if test "${cf_cv_header_stdbool_h+set}" = set; then
11926  echo $ECHO_N "(cached) $ECHO_C" >&6
11927else
11928
11929	cat >conftest.$ac_ext <<_ACEOF
11930#line 11930 "configure"
11931#include "confdefs.h"
11932
11933int
11934main ()
11935{
11936bool foo = false
11937  ;
11938  return 0;
11939}
11940_ACEOF
11941rm -f conftest.$ac_objext
11942if { (eval echo "$as_me:11942: \"$ac_compile\"") >&5
11943  (eval $ac_compile) 2>&5
11944  ac_status=$?
11945  echo "$as_me:11945: \$? = $ac_status" >&5
11946  (exit $ac_status); } &&
11947         { ac_try='test -s conftest.$ac_objext'
11948  { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949  (eval $ac_try) 2>&5
11950  ac_status=$?
11951  echo "$as_me:11951: \$? = $ac_status" >&5
11952  (exit $ac_status); }; }; then
11953  cf_cv_header_stdbool_h=0
11954else
11955  echo "$as_me: failed program was:" >&5
11956cat conftest.$ac_ext >&5
11957cat >conftest.$ac_ext <<_ACEOF
11958#line 11958 "configure"
11959#include "confdefs.h"
11960
11961#if (!defined(__BEOS__) && !defined(__HAIKU__))
11962#include <stdbool.h>
11963#endif
11964
11965int
11966main ()
11967{
11968bool foo = false
11969  ;
11970  return 0;
11971}
11972_ACEOF
11973rm -f conftest.$ac_objext
11974if { (eval echo "$as_me:11974: \"$ac_compile\"") >&5
11975  (eval $ac_compile) 2>&5
11976  ac_status=$?
11977  echo "$as_me:11977: \$? = $ac_status" >&5
11978  (exit $ac_status); } &&
11979         { ac_try='test -s conftest.$ac_objext'
11980  { (eval echo "$as_me:11980: \"$ac_try\"") >&5
11981  (eval $ac_try) 2>&5
11982  ac_status=$?
11983  echo "$as_me:11983: \$? = $ac_status" >&5
11984  (exit $ac_status); }; }; then
11985  cf_cv_header_stdbool_h=1
11986else
11987  echo "$as_me: failed program was:" >&5
11988cat conftest.$ac_ext >&5
11989cf_cv_header_stdbool_h=0
11990fi
11991rm -f conftest.$ac_objext conftest.$ac_ext
11992fi
11993rm -f conftest.$ac_objext conftest.$ac_ext
11994fi
11995
11996if test "$cf_cv_header_stdbool_h" = 1
11997then	echo "$as_me:11997: result: yes" >&5
11998echo "${ECHO_T}yes" >&6
11999else	echo "$as_me:11999: result: no" >&5
12000echo "${ECHO_T}no" >&6
12001fi
12002
12003echo "$as_me:12003: checking for builtin bool type" >&5
12004echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
12005
12006if test "${cf_cv_cc_bool_type+set}" = set; then
12007  echo $ECHO_N "(cached) $ECHO_C" >&6
12008else
12009
12010	cat >conftest.$ac_ext <<_ACEOF
12011#line 12011 "configure"
12012#include "confdefs.h"
12013
12014#include <stdio.h>
12015#include <sys/types.h>
12016
12017int
12018main ()
12019{
12020bool x = false
12021  ;
12022  return 0;
12023}
12024_ACEOF
12025rm -f conftest.$ac_objext
12026if { (eval echo "$as_me:12026: \"$ac_compile\"") >&5
12027  (eval $ac_compile) 2>&5
12028  ac_status=$?
12029  echo "$as_me:12029: \$? = $ac_status" >&5
12030  (exit $ac_status); } &&
12031         { ac_try='test -s conftest.$ac_objext'
12032  { (eval echo "$as_me:12032: \"$ac_try\"") >&5
12033  (eval $ac_try) 2>&5
12034  ac_status=$?
12035  echo "$as_me:12035: \$? = $ac_status" >&5
12036  (exit $ac_status); }; }; then
12037  cf_cv_cc_bool_type=1
12038else
12039  echo "$as_me: failed program was:" >&5
12040cat conftest.$ac_ext >&5
12041cf_cv_cc_bool_type=0
12042fi
12043rm -f conftest.$ac_objext conftest.$ac_ext
12044
12045fi
12046
12047if test "$cf_cv_cc_bool_type" = 1
12048then	echo "$as_me:12048: result: yes" >&5
12049echo "${ECHO_T}yes" >&6
12050else	echo "$as_me:12050: result: no" >&5
12051echo "${ECHO_T}no" >&6
12052fi
12053
12054# Check for C++ compiler characteristics (and ensure that it's there!)
12055if test -n "$CXX" ; then
12056	ac_ext=cc
12057ac_cpp='$CXXCPP $CPPFLAGS'
12058ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12059ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12060ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12061
12062if test -n "$GXX" ; then
12063case $cf_cv_system_name in #(vi
12064os2*) #(vi
12065	cf_stdcpp_libname=stdcpp
12066	;;
12067*)
12068	cf_stdcpp_libname=stdc++
12069	;;
12070esac
12071echo "$as_me:12071: checking for library $cf_stdcpp_libname" >&5
12072echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
12073if test "${cf_cv_libstdcpp+set}" = set; then
12074  echo $ECHO_N "(cached) $ECHO_C" >&6
12075else
12076
12077	cf_save="$LIBS"
12078	LIBS="$LIBS -l$cf_stdcpp_libname"
12079cat >conftest.$ac_ext <<_ACEOF
12080#line 12080 "configure"
12081#include "confdefs.h"
12082
12083#include <strstream.h>
12084int
12085main ()
12086{
12087
12088char buf[80];
12089strstreambuf foo(buf, sizeof(buf))
12090
12091  ;
12092  return 0;
12093}
12094_ACEOF
12095rm -f conftest.$ac_objext conftest$ac_exeext
12096if { (eval echo "$as_me:12096: \"$ac_link\"") >&5
12097  (eval $ac_link) 2>&5
12098  ac_status=$?
12099  echo "$as_me:12099: \$? = $ac_status" >&5
12100  (exit $ac_status); } &&
12101         { ac_try='test -s conftest$ac_exeext'
12102  { (eval echo "$as_me:12102: \"$ac_try\"") >&5
12103  (eval $ac_try) 2>&5
12104  ac_status=$?
12105  echo "$as_me:12105: \$? = $ac_status" >&5
12106  (exit $ac_status); }; }; then
12107  cf_cv_libstdcpp=yes
12108else
12109  echo "$as_me: failed program was:" >&5
12110cat conftest.$ac_ext >&5
12111cf_cv_libstdcpp=no
12112fi
12113rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12114	LIBS="$cf_save"
12115
12116fi
12117echo "$as_me:12117: result: $cf_cv_libstdcpp" >&5
12118echo "${ECHO_T}$cf_cv_libstdcpp" >&6
12119test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
12120fi
12121
12122	echo "$as_me:12122: checking whether $CXX understands -c and -o together" >&5
12123echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
12124if test "${cf_cv_prog_CXX_c_o+set}" = set; then
12125  echo $ECHO_N "(cached) $ECHO_C" >&6
12126else
12127
12128cat > conftest.$ac_ext <<CF_EOF
12129#include <stdio.h>
12130int main()
12131{
12132	return 0;
12133}
12134CF_EOF
12135# We do the test twice because some compilers refuse to overwrite an
12136# existing .o file with -o, though they will create one.
12137ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
12138if { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139  (eval $ac_try) 2>&5
12140  ac_status=$?
12141  echo "$as_me:12141: \$? = $ac_status" >&5
12142  (exit $ac_status); } &&
12143  test -f conftest2.$ac_objext && { (eval echo "$as_me:12143: \"$ac_try\"") >&5
12144  (eval $ac_try) 2>&5
12145  ac_status=$?
12146  echo "$as_me:12146: \$? = $ac_status" >&5
12147  (exit $ac_status); };
12148then
12149  eval cf_cv_prog_CXX_c_o=yes
12150else
12151  eval cf_cv_prog_CXX_c_o=no
12152fi
12153rm -f conftest*
12154
12155fi
12156if test $cf_cv_prog_CXX_c_o = yes; then
12157  echo "$as_me:12157: result: yes" >&5
12158echo "${ECHO_T}yes" >&6
12159else
12160  echo "$as_me:12160: result: no" >&5
12161echo "${ECHO_T}no" >&6
12162fi
12163
12164	case $GXX_VERSION in
12165	1*|2.0-6*)
12166		cf_cxx_library=yes
12167		;;
12168	*-2.7*|2.7*)
12169
12170cf_cxx_library=unknown
12171case $cf_cv_system_name in #(vi
12172os2*) #(vi
12173	cf_gpp_libname=gpp
12174	;;
12175*)
12176	cf_gpp_libname=g++
12177	;;
12178esac
12179if test "$GXX" = yes; then
12180	echo "$as_me:12180: checking for lib$cf_gpp_libname" >&5
12181echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
12182	cf_save="$LIBS"
12183	LIBS="$LIBS -l$cf_gpp_libname"
12184	cat >conftest.$ac_ext <<_ACEOF
12185#line 12185 "configure"
12186#include "confdefs.h"
12187
12188#include <$cf_gpp_libname/builtin.h>
12189
12190int
12191main ()
12192{
12193two_arg_error_handler_t foo2 = lib_error_handler
12194  ;
12195  return 0;
12196}
12197_ACEOF
12198rm -f conftest.$ac_objext conftest$ac_exeext
12199if { (eval echo "$as_me:12199: \"$ac_link\"") >&5
12200  (eval $ac_link) 2>&5
12201  ac_status=$?
12202  echo "$as_me:12202: \$? = $ac_status" >&5
12203  (exit $ac_status); } &&
12204         { ac_try='test -s conftest$ac_exeext'
12205  { (eval echo "$as_me:12205: \"$ac_try\"") >&5
12206  (eval $ac_try) 2>&5
12207  ac_status=$?
12208  echo "$as_me:12208: \$? = $ac_status" >&5
12209  (exit $ac_status); }; }; then
12210  cf_cxx_library=yes
12211	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
12212	 if test "$cf_gpp_libname" = cpp ; then
12213	    cat >>confdefs.h <<\EOF
12214#define HAVE_GPP_BUILTIN_H 1
12215EOF
12216
12217	 else
12218	    cat >>confdefs.h <<\EOF
12219#define HAVE_GXX_BUILTIN_H 1
12220EOF
12221
12222	 fi
12223else
12224  echo "$as_me: failed program was:" >&5
12225cat conftest.$ac_ext >&5
12226cat >conftest.$ac_ext <<_ACEOF
12227#line 12227 "configure"
12228#include "confdefs.h"
12229
12230#include <builtin.h>
12231
12232int
12233main ()
12234{
12235two_arg_error_handler_t foo2 = lib_error_handler
12236  ;
12237  return 0;
12238}
12239_ACEOF
12240rm -f conftest.$ac_objext conftest$ac_exeext
12241if { (eval echo "$as_me:12241: \"$ac_link\"") >&5
12242  (eval $ac_link) 2>&5
12243  ac_status=$?
12244  echo "$as_me:12244: \$? = $ac_status" >&5
12245  (exit $ac_status); } &&
12246         { ac_try='test -s conftest$ac_exeext'
12247  { (eval echo "$as_me:12247: \"$ac_try\"") >&5
12248  (eval $ac_try) 2>&5
12249  ac_status=$?
12250  echo "$as_me:12250: \$? = $ac_status" >&5
12251  (exit $ac_status); }; }; then
12252  cf_cxx_library=yes
12253	 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
12254	 cat >>confdefs.h <<\EOF
12255#define HAVE_BUILTIN_H 1
12256EOF
12257
12258else
12259  echo "$as_me: failed program was:" >&5
12260cat conftest.$ac_ext >&5
12261cf_cxx_library=no
12262fi
12263rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12264fi
12265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12266	LIBS="$cf_save"
12267	echo "$as_me:12267: result: $cf_cxx_library" >&5
12268echo "${ECHO_T}$cf_cxx_library" >&6
12269fi
12270
12271		;;
12272	*)
12273		cf_cxx_library=no
12274		;;
12275	esac
12276
12277	ac_ext=cc
12278ac_cpp='$CXXCPP $CPPFLAGS'
12279ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12280ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12281ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12282echo "$as_me:12282: checking how to run the C++ preprocessor" >&5
12283echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
12284if test -z "$CXXCPP"; then
12285  if test "${ac_cv_prog_CXXCPP+set}" = set; then
12286  echo $ECHO_N "(cached) $ECHO_C" >&6
12287else
12288      # Double quotes because CXXCPP needs to be expanded
12289    for CXXCPP in "$CXX -E" "/lib/cpp"
12290    do
12291      ac_preproc_ok=false
12292for ac_cxx_preproc_warn_flag in '' yes
12293do
12294  # Use a header file that comes with gcc, so configuring glibc
12295  # with a fresh cross-compiler works.
12296  # On the NeXT, cc -E runs the code through the compiler's parser,
12297  # not just through cpp. "Syntax error" is here to catch this case.
12298  cat >conftest.$ac_ext <<_ACEOF
12299#line 12299 "configure"
12300#include "confdefs.h"
12301#include <assert.h>
12302                     Syntax error
12303_ACEOF
12304if { (eval echo "$as_me:12304: \"$ac_cpp conftest.$ac_ext\"") >&5
12305  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12306  ac_status=$?
12307  egrep -v '^ *\+' conftest.er1 >conftest.err
12308  rm -f conftest.er1
12309  cat conftest.err >&5
12310  echo "$as_me:12310: \$? = $ac_status" >&5
12311  (exit $ac_status); } >/dev/null; then
12312  if test -s conftest.err; then
12313    ac_cpp_err=$ac_cxx_preproc_warn_flag
12314  else
12315    ac_cpp_err=
12316  fi
12317else
12318  ac_cpp_err=yes
12319fi
12320if test -z "$ac_cpp_err"; then
12321  :
12322else
12323  echo "$as_me: failed program was:" >&5
12324  cat conftest.$ac_ext >&5
12325  # Broken: fails on valid input.
12326continue
12327fi
12328rm -f conftest.err conftest.$ac_ext
12329
12330  # OK, works on sane cases.  Now check whether non-existent headers
12331  # can be detected and how.
12332  cat >conftest.$ac_ext <<_ACEOF
12333#line 12333 "configure"
12334#include "confdefs.h"
12335#include <ac_nonexistent.h>
12336_ACEOF
12337if { (eval echo "$as_me:12337: \"$ac_cpp conftest.$ac_ext\"") >&5
12338  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12339  ac_status=$?
12340  egrep -v '^ *\+' conftest.er1 >conftest.err
12341  rm -f conftest.er1
12342  cat conftest.err >&5
12343  echo "$as_me:12343: \$? = $ac_status" >&5
12344  (exit $ac_status); } >/dev/null; then
12345  if test -s conftest.err; then
12346    ac_cpp_err=$ac_cxx_preproc_warn_flag
12347  else
12348    ac_cpp_err=
12349  fi
12350else
12351  ac_cpp_err=yes
12352fi
12353if test -z "$ac_cpp_err"; then
12354  # Broken: success on invalid input.
12355continue
12356else
12357  echo "$as_me: failed program was:" >&5
12358  cat conftest.$ac_ext >&5
12359  # Passes both tests.
12360ac_preproc_ok=:
12361break
12362fi
12363rm -f conftest.err conftest.$ac_ext
12364
12365done
12366# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12367rm -f conftest.err conftest.$ac_ext
12368if $ac_preproc_ok; then
12369  break
12370fi
12371
12372    done
12373    ac_cv_prog_CXXCPP=$CXXCPP
12374
12375fi
12376  CXXCPP=$ac_cv_prog_CXXCPP
12377else
12378  ac_cv_prog_CXXCPP=$CXXCPP
12379fi
12380echo "$as_me:12380: result: $CXXCPP" >&5
12381echo "${ECHO_T}$CXXCPP" >&6
12382ac_preproc_ok=false
12383for ac_cxx_preproc_warn_flag in '' yes
12384do
12385  # Use a header file that comes with gcc, so configuring glibc
12386  # with a fresh cross-compiler works.
12387  # On the NeXT, cc -E runs the code through the compiler's parser,
12388  # not just through cpp. "Syntax error" is here to catch this case.
12389  cat >conftest.$ac_ext <<_ACEOF
12390#line 12390 "configure"
12391#include "confdefs.h"
12392#include <assert.h>
12393                     Syntax error
12394_ACEOF
12395if { (eval echo "$as_me:12395: \"$ac_cpp conftest.$ac_ext\"") >&5
12396  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12397  ac_status=$?
12398  egrep -v '^ *\+' conftest.er1 >conftest.err
12399  rm -f conftest.er1
12400  cat conftest.err >&5
12401  echo "$as_me:12401: \$? = $ac_status" >&5
12402  (exit $ac_status); } >/dev/null; then
12403  if test -s conftest.err; then
12404    ac_cpp_err=$ac_cxx_preproc_warn_flag
12405  else
12406    ac_cpp_err=
12407  fi
12408else
12409  ac_cpp_err=yes
12410fi
12411if test -z "$ac_cpp_err"; then
12412  :
12413else
12414  echo "$as_me: failed program was:" >&5
12415  cat conftest.$ac_ext >&5
12416  # Broken: fails on valid input.
12417continue
12418fi
12419rm -f conftest.err conftest.$ac_ext
12420
12421  # OK, works on sane cases.  Now check whether non-existent headers
12422  # can be detected and how.
12423  cat >conftest.$ac_ext <<_ACEOF
12424#line 12424 "configure"
12425#include "confdefs.h"
12426#include <ac_nonexistent.h>
12427_ACEOF
12428if { (eval echo "$as_me:12428: \"$ac_cpp conftest.$ac_ext\"") >&5
12429  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12430  ac_status=$?
12431  egrep -v '^ *\+' conftest.er1 >conftest.err
12432  rm -f conftest.er1
12433  cat conftest.err >&5
12434  echo "$as_me:12434: \$? = $ac_status" >&5
12435  (exit $ac_status); } >/dev/null; then
12436  if test -s conftest.err; then
12437    ac_cpp_err=$ac_cxx_preproc_warn_flag
12438  else
12439    ac_cpp_err=
12440  fi
12441else
12442  ac_cpp_err=yes
12443fi
12444if test -z "$ac_cpp_err"; then
12445  # Broken: success on invalid input.
12446continue
12447else
12448  echo "$as_me: failed program was:" >&5
12449  cat conftest.$ac_ext >&5
12450  # Passes both tests.
12451ac_preproc_ok=:
12452break
12453fi
12454rm -f conftest.err conftest.$ac_ext
12455
12456done
12457# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
12458rm -f conftest.err conftest.$ac_ext
12459if $ac_preproc_ok; then
12460  :
12461else
12462  { { echo "$as_me:12462: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
12463echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
12464   { (exit 1); exit 1; }; }
12465fi
12466
12467ac_ext=cc
12468ac_cpp='$CXXCPP $CPPFLAGS'
12469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12472
12473for ac_header in typeinfo
12474do
12475as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12476echo "$as_me:12476: checking for $ac_header" >&5
12477echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12478if eval "test \"\${$as_ac_Header+set}\" = set"; then
12479  echo $ECHO_N "(cached) $ECHO_C" >&6
12480else
12481  cat >conftest.$ac_ext <<_ACEOF
12482#line 12482 "configure"
12483#include "confdefs.h"
12484#include <$ac_header>
12485_ACEOF
12486if { (eval echo "$as_me:12486: \"$ac_cpp conftest.$ac_ext\"") >&5
12487  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12488  ac_status=$?
12489  egrep -v '^ *\+' conftest.er1 >conftest.err
12490  rm -f conftest.er1
12491  cat conftest.err >&5
12492  echo "$as_me:12492: \$? = $ac_status" >&5
12493  (exit $ac_status); } >/dev/null; then
12494  if test -s conftest.err; then
12495    ac_cpp_err=$ac_cxx_preproc_warn_flag
12496  else
12497    ac_cpp_err=
12498  fi
12499else
12500  ac_cpp_err=yes
12501fi
12502if test -z "$ac_cpp_err"; then
12503  eval "$as_ac_Header=yes"
12504else
12505  echo "$as_me: failed program was:" >&5
12506  cat conftest.$ac_ext >&5
12507  eval "$as_ac_Header=no"
12508fi
12509rm -f conftest.err conftest.$ac_ext
12510fi
12511echo "$as_me:12511: result: `eval echo '${'$as_ac_Header'}'`" >&5
12512echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12513if test `eval echo '${'$as_ac_Header'}'` = yes; then
12514  cat >>confdefs.h <<EOF
12515#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12516EOF
12517
12518fi
12519done
12520
12521echo "$as_me:12521: checking if we should include stdbool.h" >&5
12522echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
12523
12524if test "${cf_cv_header_stdbool_h+set}" = set; then
12525  echo $ECHO_N "(cached) $ECHO_C" >&6
12526else
12527
12528	cat >conftest.$ac_ext <<_ACEOF
12529#line 12529 "configure"
12530#include "confdefs.h"
12531
12532int
12533main ()
12534{
12535bool foo = false
12536  ;
12537  return 0;
12538}
12539_ACEOF
12540rm -f conftest.$ac_objext
12541if { (eval echo "$as_me:12541: \"$ac_compile\"") >&5
12542  (eval $ac_compile) 2>&5
12543  ac_status=$?
12544  echo "$as_me:12544: \$? = $ac_status" >&5
12545  (exit $ac_status); } &&
12546         { ac_try='test -s conftest.$ac_objext'
12547  { (eval echo "$as_me:12547: \"$ac_try\"") >&5
12548  (eval $ac_try) 2>&5
12549  ac_status=$?
12550  echo "$as_me:12550: \$? = $ac_status" >&5
12551  (exit $ac_status); }; }; then
12552  cf_cv_header_stdbool_h=0
12553else
12554  echo "$as_me: failed program was:" >&5
12555cat conftest.$ac_ext >&5
12556cat >conftest.$ac_ext <<_ACEOF
12557#line 12557 "configure"
12558#include "confdefs.h"
12559
12560#if (!defined(__BEOS__) && !defined(__HAIKU__))
12561#include <stdbool.h>
12562#endif
12563
12564int
12565main ()
12566{
12567bool foo = false
12568  ;
12569  return 0;
12570}
12571_ACEOF
12572rm -f conftest.$ac_objext
12573if { (eval echo "$as_me:12573: \"$ac_compile\"") >&5
12574  (eval $ac_compile) 2>&5
12575  ac_status=$?
12576  echo "$as_me:12576: \$? = $ac_status" >&5
12577  (exit $ac_status); } &&
12578         { ac_try='test -s conftest.$ac_objext'
12579  { (eval echo "$as_me:12579: \"$ac_try\"") >&5
12580  (eval $ac_try) 2>&5
12581  ac_status=$?
12582  echo "$as_me:12582: \$? = $ac_status" >&5
12583  (exit $ac_status); }; }; then
12584  cf_cv_header_stdbool_h=1
12585else
12586  echo "$as_me: failed program was:" >&5
12587cat conftest.$ac_ext >&5
12588cf_cv_header_stdbool_h=0
12589fi
12590rm -f conftest.$ac_objext conftest.$ac_ext
12591fi
12592rm -f conftest.$ac_objext conftest.$ac_ext
12593fi
12594
12595if test "$cf_cv_header_stdbool_h" = 1
12596then	echo "$as_me:12596: result: yes" >&5
12597echo "${ECHO_T}yes" >&6
12598else	echo "$as_me:12598: result: no" >&5
12599echo "${ECHO_T}no" >&6
12600fi
12601
12602echo "$as_me:12602: checking for builtin bool type" >&5
12603echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
12604
12605if test "${cf_cv_builtin_bool+set}" = set; then
12606  echo $ECHO_N "(cached) $ECHO_C" >&6
12607else
12608
12609	cat >conftest.$ac_ext <<_ACEOF
12610#line 12610 "configure"
12611#include "confdefs.h"
12612
12613#include <stdio.h>
12614#include <sys/types.h>
12615
12616int
12617main ()
12618{
12619bool x = false
12620  ;
12621  return 0;
12622}
12623_ACEOF
12624rm -f conftest.$ac_objext
12625if { (eval echo "$as_me:12625: \"$ac_compile\"") >&5
12626  (eval $ac_compile) 2>&5
12627  ac_status=$?
12628  echo "$as_me:12628: \$? = $ac_status" >&5
12629  (exit $ac_status); } &&
12630         { ac_try='test -s conftest.$ac_objext'
12631  { (eval echo "$as_me:12631: \"$ac_try\"") >&5
12632  (eval $ac_try) 2>&5
12633  ac_status=$?
12634  echo "$as_me:12634: \$? = $ac_status" >&5
12635  (exit $ac_status); }; }; then
12636  cf_cv_builtin_bool=1
12637else
12638  echo "$as_me: failed program was:" >&5
12639cat conftest.$ac_ext >&5
12640cf_cv_builtin_bool=0
12641fi
12642rm -f conftest.$ac_objext conftest.$ac_ext
12643
12644fi
12645
12646if test "$cf_cv_builtin_bool" = 1
12647then	echo "$as_me:12647: result: yes" >&5
12648echo "${ECHO_T}yes" >&6
12649else	echo "$as_me:12649: result: no" >&5
12650echo "${ECHO_T}no" >&6
12651fi
12652
12653echo "$as_me:12653: checking for size of bool" >&5
12654echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
12655if test "${cf_cv_type_of_bool+set}" = set; then
12656  echo $ECHO_N "(cached) $ECHO_C" >&6
12657else
12658
12659	rm -f cf_test.out
12660	if test "$cross_compiling" = yes; then
12661  cf_cv_type_of_bool=unknown
12662else
12663  cat >conftest.$ac_ext <<_ACEOF
12664#line 12664 "configure"
12665#include "confdefs.h"
12666
12667#include <stdlib.h>
12668#include <stdio.h>
12669
12670#if defined(__cplusplus)
12671
12672#ifdef HAVE_GXX_BUILTIN_H
12673#include <g++/builtin.h>
12674#elif HAVE_GPP_BUILTIN_H
12675#include <gpp/builtin.h>
12676#elif HAVE_BUILTIN_H
12677#include <builtin.h>
12678#endif
12679
12680#else
12681
12682#if $cf_cv_header_stdbool_h
12683#include <stdbool.h>
12684#endif
12685
12686#endif
12687
12688main()
12689{
12690	FILE *fp = fopen("cf_test.out", "w");
12691	if (fp != 0) {
12692		bool x = true;
12693		if ((bool)(-x) >= 0)
12694			fputs("unsigned ", fp);
12695		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
12696		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
12697		else if (sizeof(x) == sizeof(short))fputs("short",fp);
12698		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
12699		fclose(fp);
12700	}
12701	exit(0);
12702}
12703
12704_ACEOF
12705rm -f conftest$ac_exeext
12706if { (eval echo "$as_me:12706: \"$ac_link\"") >&5
12707  (eval $ac_link) 2>&5
12708  ac_status=$?
12709  echo "$as_me:12709: \$? = $ac_status" >&5
12710  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12711  { (eval echo "$as_me:12711: \"$ac_try\"") >&5
12712  (eval $ac_try) 2>&5
12713  ac_status=$?
12714  echo "$as_me:12714: \$? = $ac_status" >&5
12715  (exit $ac_status); }; }; then
12716  cf_cv_type_of_bool=`cat cf_test.out`
12717		 if test -z "$cf_cv_type_of_bool"; then
12718		   cf_cv_type_of_bool=unknown
12719		 fi
12720else
12721  echo "$as_me: program exited with status $ac_status" >&5
12722echo "$as_me: failed program was:" >&5
12723cat conftest.$ac_ext >&5
12724cf_cv_type_of_bool=unknown
12725fi
12726rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12727fi
12728
12729fi
12730
12731	rm -f cf_test.out
12732echo "$as_me:12732: result: $cf_cv_type_of_bool" >&5
12733echo "${ECHO_T}$cf_cv_type_of_bool" >&6
12734if test "$cf_cv_type_of_bool" = unknown ; then
12735	case .$NCURSES_BOOL in #(vi
12736	.auto|.) NCURSES_BOOL=unsigned;;
12737	esac
12738	{ echo "$as_me:12738: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
12739echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
12740	cf_cv_type_of_bool=$NCURSES_BOOL
12741fi
12742
12743echo "$as_me:12743: checking for special defines needed for etip.h" >&5
12744echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
12745cf_save_CXXFLAGS="$CXXFLAGS"
12746cf_result="none"
12747for cf_math in "" MATH_H
12748do
12749for cf_excp in "" MATH_EXCEPTION
12750do
12751	CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
12752	test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
12753	test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
12754cat >conftest.$ac_ext <<_ACEOF
12755#line 12755 "configure"
12756#include "confdefs.h"
12757
12758#include <etip.h.in>
12759
12760int
12761main ()
12762{
12763
12764  ;
12765  return 0;
12766}
12767_ACEOF
12768rm -f conftest.$ac_objext
12769if { (eval echo "$as_me:12769: \"$ac_compile\"") >&5
12770  (eval $ac_compile) 2>&5
12771  ac_status=$?
12772  echo "$as_me:12772: \$? = $ac_status" >&5
12773  (exit $ac_status); } &&
12774         { ac_try='test -s conftest.$ac_objext'
12775  { (eval echo "$as_me:12775: \"$ac_try\"") >&5
12776  (eval $ac_try) 2>&5
12777  ac_status=$?
12778  echo "$as_me:12778: \$? = $ac_status" >&5
12779  (exit $ac_status); }; }; then
12780
12781	test -n "$cf_math" && cat >>confdefs.h <<EOF
12782#define ETIP_NEEDS_${cf_math} 1
12783EOF
12784
12785	test -n "$cf_excp" && cat >>confdefs.h <<EOF
12786#define ETIP_NEEDS_${cf_excp} 1
12787EOF
12788
12789	cf_result="$cf_math $cf_excp"
12790	break
12791
12792else
12793  echo "$as_me: failed program was:" >&5
12794cat conftest.$ac_ext >&5
12795fi
12796rm -f conftest.$ac_objext conftest.$ac_ext
12797done
12798done
12799echo "$as_me:12799: result: $cf_result" >&5
12800echo "${ECHO_T}$cf_result" >&6
12801CXXFLAGS="$cf_save_CXXFLAGS"
12802
12803if test -n "$CXX"; then
12804echo "$as_me:12804: checking if $CXX accepts parameter initialization" >&5
12805echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
12806if test "${cf_cv_cpp_param_init+set}" = set; then
12807  echo $ECHO_N "(cached) $ECHO_C" >&6
12808else
12809
12810	ac_ext=cc
12811ac_cpp='$CXXCPP $CPPFLAGS'
12812ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12813ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12814ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12815
12816	if test "$cross_compiling" = yes; then
12817  cf_cv_cpp_param_init=unknown
12818else
12819  cat >conftest.$ac_ext <<_ACEOF
12820#line 12820 "configure"
12821#include "confdefs.h"
12822
12823class TEST {
12824private:
12825	int value;
12826public:
12827	TEST(int x = 1);
12828	~TEST();
12829};
12830
12831TEST::TEST(int x = 1)	// some compilers do not like second initializer
12832{
12833	value = x;
12834}
12835void main() { }
12836
12837_ACEOF
12838rm -f conftest$ac_exeext
12839if { (eval echo "$as_me:12839: \"$ac_link\"") >&5
12840  (eval $ac_link) 2>&5
12841  ac_status=$?
12842  echo "$as_me:12842: \$? = $ac_status" >&5
12843  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12844  { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845  (eval $ac_try) 2>&5
12846  ac_status=$?
12847  echo "$as_me:12847: \$? = $ac_status" >&5
12848  (exit $ac_status); }; }; then
12849  cf_cv_cpp_param_init=yes
12850else
12851  echo "$as_me: program exited with status $ac_status" >&5
12852echo "$as_me: failed program was:" >&5
12853cat conftest.$ac_ext >&5
12854cf_cv_cpp_param_init=no
12855fi
12856rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12857fi
12858	ac_ext=cc
12859ac_cpp='$CXXCPP $CPPFLAGS'
12860ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12861ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12862ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12863
12864fi
12865echo "$as_me:12865: result: $cf_cv_cpp_param_init" >&5
12866echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
12867fi
12868test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
12869#define CPP_HAS_PARAM_INIT 1
12870EOF
12871
12872if test -n "$CXX"; then
12873
12874echo "$as_me:12874: checking if $CXX accepts static_cast" >&5
12875echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
12876if test "${cf_cv_cpp_static_cast+set}" = set; then
12877  echo $ECHO_N "(cached) $ECHO_C" >&6
12878else
12879
12880	ac_ext=cc
12881ac_cpp='$CXXCPP $CPPFLAGS'
12882ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12883ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12884ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12885
12886	cat >conftest.$ac_ext <<_ACEOF
12887#line 12887 "configure"
12888#include "confdefs.h"
12889
12890class NCursesPanel
12891{
12892public:
12893  NCursesPanel(int nlines,
12894	       int ncols,
12895	       int begin_y = 0,
12896	       int begin_x = 0)
12897  {
12898  }
12899
12900  ~NCursesPanel();
12901};
12902
12903template<class T> class NCursesUserPanel : public NCursesPanel
12904{
12905public:
12906  NCursesUserPanel (int nlines,
12907		    int ncols,
12908		    int begin_y = 0,
12909		    int begin_x = 0,
12910		    const T* p_UserData = static_cast<T*>(0))
12911    : NCursesPanel (nlines, ncols, begin_y, begin_x)
12912  {
12913  };
12914  NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
12915  {
12916  };
12917
12918  virtual ~NCursesUserPanel() {};
12919};
12920
12921int
12922main ()
12923{
12924
12925	const char* p_UserData = static_cast<char*>(0)
12926  ;
12927  return 0;
12928}
12929_ACEOF
12930rm -f conftest.$ac_objext
12931if { (eval echo "$as_me:12931: \"$ac_compile\"") >&5
12932  (eval $ac_compile) 2>&5
12933  ac_status=$?
12934  echo "$as_me:12934: \$? = $ac_status" >&5
12935  (exit $ac_status); } &&
12936         { ac_try='test -s conftest.$ac_objext'
12937  { (eval echo "$as_me:12937: \"$ac_try\"") >&5
12938  (eval $ac_try) 2>&5
12939  ac_status=$?
12940  echo "$as_me:12940: \$? = $ac_status" >&5
12941  (exit $ac_status); }; }; then
12942  cf_cv_cpp_static_cast=yes
12943else
12944  echo "$as_me: failed program was:" >&5
12945cat conftest.$ac_ext >&5
12946cf_cv_cpp_static_cast=no
12947fi
12948rm -f conftest.$ac_objext conftest.$ac_ext
12949
12950	ac_ext=cc
12951ac_cpp='$CXXCPP $CPPFLAGS'
12952ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12953ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12954ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12955
12956fi
12957echo "$as_me:12957: result: $cf_cv_cpp_static_cast" >&5
12958echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
12959
12960fi
12961
12962test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
12963#define CPP_HAS_STATIC_CAST 1
12964EOF
12965
12966if test -n "$CXX"; then
12967
12968ac_ext=cc
12969ac_cpp='$CXXCPP $CPPFLAGS'
12970ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12971ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12972ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
12973
12974for ac_header in strstream.h
12975do
12976as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12977echo "$as_me:12977: checking for $ac_header" >&5
12978echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12979if eval "test \"\${$as_ac_Header+set}\" = set"; then
12980  echo $ECHO_N "(cached) $ECHO_C" >&6
12981else
12982  cat >conftest.$ac_ext <<_ACEOF
12983#line 12983 "configure"
12984#include "confdefs.h"
12985#include <$ac_header>
12986_ACEOF
12987if { (eval echo "$as_me:12987: \"$ac_cpp conftest.$ac_ext\"") >&5
12988  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12989  ac_status=$?
12990  egrep -v '^ *\+' conftest.er1 >conftest.err
12991  rm -f conftest.er1
12992  cat conftest.err >&5
12993  echo "$as_me:12993: \$? = $ac_status" >&5
12994  (exit $ac_status); } >/dev/null; then
12995  if test -s conftest.err; then
12996    ac_cpp_err=$ac_cxx_preproc_warn_flag
12997  else
12998    ac_cpp_err=
12999  fi
13000else
13001  ac_cpp_err=yes
13002fi
13003if test -z "$ac_cpp_err"; then
13004  eval "$as_ac_Header=yes"
13005else
13006  echo "$as_me: failed program was:" >&5
13007  cat conftest.$ac_ext >&5
13008  eval "$as_ac_Header=no"
13009fi
13010rm -f conftest.err conftest.$ac_ext
13011fi
13012echo "$as_me:13012: result: `eval echo '${'$as_ac_Header'}'`" >&5
13013echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13014if test `eval echo '${'$as_ac_Header'}'` = yes; then
13015  cat >>confdefs.h <<EOF
13016#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13017EOF
13018
13019fi
13020done
13021
13022echo "$as_me:13022: checking if $CXX supports vscan function" >&5
13023echo $ECHO_N "checking if $CXX supports vscan function... $ECHO_C" >&6
13024if test "${cf_cv_cpp_vscan_func+set}" = set; then
13025  echo $ECHO_N "(cached) $ECHO_C" >&6
13026else
13027
13028	for cf_vscan_func in strstream strstream_cast stdio
13029	do
13030	case $cf_vscan_func in #(vi
13031	stdio)		cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
13032	strstream)	cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
13033	strstream_cast)	cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
13034	esac
13035	cat >conftest.$ac_ext <<_ACEOF
13036#line 13036 "configure"
13037#include "confdefs.h"
13038
13039#include <stdio.h>
13040#include <stdarg.h>
13041#define $cf_vscan_defs 1
13042#if defined(USE_STDIO_VSCAN)
13043#elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
13044#include <strstream.h>
13045#endif
13046
13047int scanw(const char* fmt, ...)
13048{
13049    int result = -1;
13050    char buf[BUFSIZ];
13051
13052    va_list args;
13053    va_start(args, fmt);
13054#if defined(USE_STDIO_VSCAN)
13055    if (::vsscanf(buf, fmt, args) != -1)
13056	result = 0;
13057#elif defined(USE_STRSTREAM_VSCAN)
13058    strstreambuf ss(buf, sizeof(buf));
13059    if (ss.vscan(fmt, args) != -1)
13060	result = 0;
13061#elif defined(USE_STRSTREAM_VSCAN_CAST)
13062    strstreambuf ss(buf, sizeof(buf));
13063    if (ss.vscan(fmt, (_IO_va_list)args) != -1)
13064	result = 0;
13065#else
13066#error case $cf_vscan_func failed
13067#endif
13068    va_end(args);
13069    return result;
13070}
13071
13072int
13073main ()
13074{
13075int tmp, foo = scanw("%d", &tmp)
13076  ;
13077  return 0;
13078}
13079_ACEOF
13080rm -f conftest.$ac_objext conftest$ac_exeext
13081if { (eval echo "$as_me:13081: \"$ac_link\"") >&5
13082  (eval $ac_link) 2>&5
13083  ac_status=$?
13084  echo "$as_me:13084: \$? = $ac_status" >&5
13085  (exit $ac_status); } &&
13086         { ac_try='test -s conftest$ac_exeext'
13087  { (eval echo "$as_me:13087: \"$ac_try\"") >&5
13088  (eval $ac_try) 2>&5
13089  ac_status=$?
13090  echo "$as_me:13090: \$? = $ac_status" >&5
13091  (exit $ac_status); }; }; then
13092  cf_cv_cpp_vscan_func=$cf_vscan_func; break
13093else
13094  echo "$as_me: failed program was:" >&5
13095cat conftest.$ac_ext >&5
13096cf_cv_cpp_vscan_func=no
13097fi
13098rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13099	test "$cf_cv_cpp_vscan_func" != no && break
13100	done
13101
13102fi
13103echo "$as_me:13103: result: $cf_cv_cpp_vscan_func" >&5
13104echo "${ECHO_T}$cf_cv_cpp_vscan_func" >&6
13105
13106ac_ext=cc
13107ac_cpp='$CXXCPP $CPPFLAGS'
13108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13111
13112fi
13113
13114case $cf_cv_cpp_vscan_func in #(vi
13115stdio) #(vi
13116	cat >>confdefs.h <<\EOF
13117#define CPP_HAS_VSCAN_FUNC 1
13118EOF
13119
13120	cat >>confdefs.h <<\EOF
13121#define USE_STDIO_VSCAN 1
13122EOF
13123
13124	;;
13125strstream)
13126	cat >>confdefs.h <<\EOF
13127#define CPP_HAS_VSCAN_FUNC 1
13128EOF
13129
13130	cat >>confdefs.h <<\EOF
13131#define USE_STRSTREAM_VSCAN 1
13132EOF
13133
13134	;;
13135strstream_cast)
13136	cat >>confdefs.h <<\EOF
13137#define CPP_HAS_VSCAN_FUNC 1
13138EOF
13139
13140	cat >>confdefs.h <<\EOF
13141#define USE_STRSTREAM_VSCAN_CAST 1
13142EOF
13143
13144	;;
13145esac
13146
13147	CXX_AR='$(AR)'
13148	CXX_AR_OPTS='$(AR_OPTS)'
13149	case $cf_cv_system_name in #(vi
13150	irix*) #(vi
13151	    if test "$GXX" != yes ; then
13152		CXX_AR='$(CXX)'
13153		CXX_AR_OPTS='-ar -o'
13154	    fi
13155	    ;;
13156	sco3.2v5*) #(vi
13157	    CXXLDFLAGS="-u main"
13158	    ;;
13159	solaris2*)
13160	    if test "$GXX" != yes ; then
13161		CXX_AR='$(CXX)'
13162		CXX_AR_OPTS='-xar -o'
13163	    fi
13164	    ;;
13165	esac
13166
13167else
13168	cf_cxx_library=no
13169	cf_cv_builtin_bool=1
13170
13171	# Just because we are not configuring against C++ right now does not
13172	# mean that a user will not want to use C++.  Some distributors disable
13173	# the C++ portion of this configuration as a shortcut (or just to avoid
13174	# compiling the demo in the c++ directory).  So we need a reasonable
13175	# default for the 'bool' type.
13176	#
13177	# Caveat: since the storage of the bool type is not standardized, it
13178	# may change.
13179
13180	if test "$NCURSES_BOOL" != auto ; then
13181		cf_cv_type_of_bool=$NCURSES_AUTO
13182	else
13183		if test "$cf_cv_header_stdbool_h" = 1 ; then
13184
13185echo "$as_me:13185: checking for size of bool" >&5
13186echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
13187if test "${cf_cv_type_of_bool+set}" = set; then
13188  echo $ECHO_N "(cached) $ECHO_C" >&6
13189else
13190
13191	rm -f cf_test.out
13192	if test "$cross_compiling" = yes; then
13193  cf_cv_type_of_bool=unknown
13194else
13195  cat >conftest.$ac_ext <<_ACEOF
13196#line 13196 "configure"
13197#include "confdefs.h"
13198
13199#include <stdlib.h>
13200#include <stdio.h>
13201
13202#if defined(__cplusplus)
13203
13204#ifdef HAVE_GXX_BUILTIN_H
13205#include <g++/builtin.h>
13206#elif HAVE_GPP_BUILTIN_H
13207#include <gpp/builtin.h>
13208#elif HAVE_BUILTIN_H
13209#include <builtin.h>
13210#endif
13211
13212#else
13213
13214#if $cf_cv_header_stdbool_h
13215#include <stdbool.h>
13216#endif
13217
13218#endif
13219
13220main()
13221{
13222	FILE *fp = fopen("cf_test.out", "w");
13223	if (fp != 0) {
13224		bool x = true;
13225		if ((bool)(-x) >= 0)
13226			fputs("unsigned ", fp);
13227		if (sizeof(x) == sizeof(int))       fputs("int",  fp);
13228		else if (sizeof(x) == sizeof(char)) fputs("char", fp);
13229		else if (sizeof(x) == sizeof(short))fputs("short",fp);
13230		else if (sizeof(x) == sizeof(long)) fputs("long", fp);
13231		fclose(fp);
13232	}
13233	exit(0);
13234}
13235
13236_ACEOF
13237rm -f conftest$ac_exeext
13238if { (eval echo "$as_me:13238: \"$ac_link\"") >&5
13239  (eval $ac_link) 2>&5
13240  ac_status=$?
13241  echo "$as_me:13241: \$? = $ac_status" >&5
13242  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13243  { (eval echo "$as_me:13243: \"$ac_try\"") >&5
13244  (eval $ac_try) 2>&5
13245  ac_status=$?
13246  echo "$as_me:13246: \$? = $ac_status" >&5
13247  (exit $ac_status); }; }; then
13248  cf_cv_type_of_bool=`cat cf_test.out`
13249		 if test -z "$cf_cv_type_of_bool"; then
13250		   cf_cv_type_of_bool=unknown
13251		 fi
13252else
13253  echo "$as_me: program exited with status $ac_status" >&5
13254echo "$as_me: failed program was:" >&5
13255cat conftest.$ac_ext >&5
13256cf_cv_type_of_bool=unknown
13257fi
13258rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13259fi
13260
13261fi
13262
13263	rm -f cf_test.out
13264echo "$as_me:13264: result: $cf_cv_type_of_bool" >&5
13265echo "${ECHO_T}$cf_cv_type_of_bool" >&6
13266if test "$cf_cv_type_of_bool" = unknown ; then
13267	case .$NCURSES_BOOL in #(vi
13268	.auto|.) NCURSES_BOOL=unsigned;;
13269	esac
13270	{ echo "$as_me:13270: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
13271echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
13272	cf_cv_type_of_bool=$NCURSES_BOOL
13273fi
13274
13275		else
13276			echo "$as_me:13276: checking for fallback type of bool" >&5
13277echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
13278			case "$host_cpu" in #(vi
13279			i?86)	cf_cv_type_of_bool=char	;; #(vi
13280			*)	cf_cv_type_of_bool=int	;;
13281			esac
13282			echo "$as_me:13282: result: $cf_cv_type_of_bool" >&5
13283echo "${ECHO_T}$cf_cv_type_of_bool" >&6
13284		fi
13285	fi
13286fi
13287
13288# If the C compiler did not declare bool, and we did not determine that the C++
13289# compiler does not declare bool, turn on an ifdef in curses.h that makes the
13290# ncurses library use the same type as C++ bool.  Note that this allows one to
13291# specify the type of bool in a configure-script option and postpone
13292# integration with the C++ compiler provided that the types are compatible.
13293USE_CXX_BOOL=1
13294if test $cf_cv_cc_bool_type = 1
13295then
13296	# oops: C has a bool.  Unlikely, but C++ could differ.
13297	USE_CXX_BOOL=0
13298elif test $cf_cv_builtin_bool = 0
13299then
13300	# C++ has no bool
13301	USE_CXX_BOOL=0
13302else
13303	# this is the normal case
13304	USE_CXX_BOOL='defined(__cplusplus)'
13305fi
13306
13307if test "$cf_with_ada" != "no" ; then
13308cf_ada_make=gnatmake
13309# Extract the first word of "$cf_ada_make", so it can be a program name with args.
13310set dummy $cf_ada_make; ac_word=$2
13311echo "$as_me:13311: checking for $ac_word" >&5
13312echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13313if test "${ac_cv_prog_gnat_exists+set}" = set; then
13314  echo $ECHO_N "(cached) $ECHO_C" >&6
13315else
13316  if test -n "$gnat_exists"; then
13317  ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
13318else
13319  ac_save_IFS=$IFS; IFS=$ac_path_separator
13320ac_dummy="$PATH"
13321for ac_dir in $ac_dummy; do
13322  IFS=$ac_save_IFS
13323  test -z "$ac_dir" && ac_dir=.
13324  $as_executable_p "$ac_dir/$ac_word" || continue
13325ac_cv_prog_gnat_exists="yes"
13326echo "$as_me:13326: found $ac_dir/$ac_word" >&5
13327break
13328done
13329
13330  test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
13331fi
13332fi
13333gnat_exists=$ac_cv_prog_gnat_exists
13334if test -n "$gnat_exists"; then
13335  echo "$as_me:13335: result: $gnat_exists" >&5
13336echo "${ECHO_T}$gnat_exists" >&6
13337else
13338  echo "$as_me:13338: result: no" >&5
13339echo "${ECHO_T}no" >&6
13340fi
13341
13342if test "$ac_cv_prog_gnat_exists" = no; then
13343   cf_ada_make=
13344else
13345
13346echo "$as_me:13346: checking for gnat version" >&5
13347echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
13348cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
13349  sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
13350echo "$as_me:13350: result: $cf_gnat_version" >&5
13351echo "${ECHO_T}$cf_gnat_version" >&6
13352
13353case $cf_gnat_version in
13354  3.1[1-9]*|3.[2-9]*|[4-9].*)
13355    cf_cv_prog_gnat_correct=yes
13356    ;;
13357  *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
13358     cf_cv_prog_gnat_correct=no
13359     ;;
13360esac
13361case $cf_gnat_version in
13362  3.[1-9]*|[4-9].*)
13363      cf_compile_generics=generics
13364      cf_generic_objects="\$(GENOBJS)"
13365      ;;
13366  *)  cf_compile_generics=
13367      cf_generic_objects=
13368      ;;
13369esac
13370
13371   # Extract the first word of "m4", so it can be a program name with args.
13372set dummy m4; ac_word=$2
13373echo "$as_me:13373: checking for $ac_word" >&5
13374echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13375if test "${ac_cv_prog_M4_exists+set}" = set; then
13376  echo $ECHO_N "(cached) $ECHO_C" >&6
13377else
13378  if test -n "$M4_exists"; then
13379  ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
13380else
13381  ac_save_IFS=$IFS; IFS=$ac_path_separator
13382ac_dummy="$PATH"
13383for ac_dir in $ac_dummy; do
13384  IFS=$ac_save_IFS
13385  test -z "$ac_dir" && ac_dir=.
13386  $as_executable_p "$ac_dir/$ac_word" || continue
13387ac_cv_prog_M4_exists="yes"
13388echo "$as_me:13388: found $ac_dir/$ac_word" >&5
13389break
13390done
13391
13392  test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
13393fi
13394fi
13395M4_exists=$ac_cv_prog_M4_exists
13396if test -n "$M4_exists"; then
13397  echo "$as_me:13397: result: $M4_exists" >&5
13398echo "${ECHO_T}$M4_exists" >&6
13399else
13400  echo "$as_me:13400: result: no" >&5
13401echo "${ECHO_T}no" >&6
13402fi
13403
13404   if test "$ac_cv_prog_M4_exists" = no; then
13405      cf_cv_prog_gnat_correct=no
13406      echo Ada95 binding required program m4 not found. Ada95 binding disabled.
13407   fi
13408   if test "$cf_cv_prog_gnat_correct" = yes; then
13409      echo "$as_me:13409: checking if GNAT works" >&5
13410echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
13411
13412rm -f conftest*
13413cat >>conftest.ads <<CF_EOF
13414procedure conftest;
13415CF_EOF
13416cat >>conftest.adb <<CF_EOF
13417with Text_IO;
13418with GNAT.OS_Lib;
13419procedure conftest is
13420begin
13421   Text_IO.Put ("Hello World");
13422   Text_IO.New_Line;
13423   GNAT.OS_Lib.OS_Exit (0);
13424end conftest;
13425CF_EOF
13426if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13427   if ( ./conftest 1>&5 2>&1 ) ; then
13428      cf_cv_prog_gnat_correct=yes
13429   else
13430      cf_cv_prog_gnat_correct=no
13431   fi
13432else
13433   cf_cv_prog_gnat_correct=no
13434fi
13435rm -f conftest*
13436
13437      echo "$as_me:13437: result: $cf_cv_prog_gnat_correct" >&5
13438echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
13439   fi
13440fi
13441if test	"$cf_cv_prog_gnat_correct" = yes; then
13442   ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
13443
13444   echo "$as_me:13444: checking if GNAT pragma Unreferenced works" >&5
13445echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
13446
13447rm -f conftest*
13448cat >>conftest.ads <<CF_EOF
13449procedure conftest;
13450CF_EOF
13451cat >>conftest.adb <<CF_EOF
13452with Text_IO;
13453with GNAT.OS_Lib;
13454procedure conftest is
13455   test : Integer;
13456   pragma Unreferenced (test);
13457begin
13458   test := 1;
13459   Text_IO.Put ("Hello World");
13460   Text_IO.New_Line;
13461   GNAT.OS_Lib.OS_Exit (0);
13462end conftest;
13463CF_EOF
13464if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
13465      cf_cv_pragma_unreferenced=yes
13466else
13467   cf_cv_pragma_unreferenced=no
13468fi
13469rm -f conftest*
13470
13471   echo "$as_me:13471: result: $cf_cv_pragma_unreferenced" >&5
13472echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
13473
13474   # if the pragma is supported, use it (needed in the Trace code).
13475   if test $cf_cv_pragma_unreferenced = yes ; then
13476      PRAGMA_UNREF=TRUE
13477   else
13478      PRAGMA_UNREF=FALSE
13479   fi
13480
13481# Check whether --with-ada-compiler or --without-ada-compiler was given.
13482if test "${with_ada_compiler+set}" = set; then
13483  withval="$with_ada_compiler"
13484  cf_ada_compiler=$withval
13485else
13486  cf_ada_compiler=gnatmake
13487fi;
13488
13489   cf_ada_package=terminal_interface
13490
13491# Check whether --with-ada-include or --without-ada-include was given.
13492if test "${with_ada_include+set}" = set; then
13493  withval="$with_ada_include"
13494
13495else
13496  withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
13497fi;
13498case ".$withval" in #(vi
13499.\$\(*\)*|.\'*\'*) #(vi
13500  ;;
13501..|./*|.\\*) #(vi
13502  ;;
13503.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
13504  ;;
13505.\${*prefix}*) #(vi
13506  eval withval="$withval"
13507  case ".$withval" in #(vi
13508  .NONE/*)
13509    withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13510    ;;
13511  esac
13512  ;; #(vi
13513.NONE/*)
13514  withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13515  ;;
13516*)
13517  { { echo "$as_me:13517: error: expected a pathname, not \"$withval\"" >&5
13518echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13519   { (exit 1); exit 1; }; }
13520  ;;
13521esac
13522
13523eval ADA_INCLUDE="$withval"
13524
13525# Check whether --with-ada-objects or --without-ada-objects was given.
13526if test "${with_ada_objects+set}" = set; then
13527  withval="$with_ada_objects"
13528
13529else
13530  withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
13531fi;
13532case ".$withval" in #(vi
13533.\$\(*\)*|.\'*\'*) #(vi
13534  ;;
13535..|./*|.\\*) #(vi
13536  ;;
13537.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
13538  ;;
13539.\${*prefix}*) #(vi
13540  eval withval="$withval"
13541  case ".$withval" in #(vi
13542  .NONE/*)
13543    withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13544    ;;
13545  esac
13546  ;; #(vi
13547.NONE/*)
13548  withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
13549  ;;
13550*)
13551  { { echo "$as_me:13551: error: expected a pathname, not \"$withval\"" >&5
13552echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
13553   { (exit 1); exit 1; }; }
13554  ;;
13555esac
13556
13557eval ADA_OBJECTS="$withval"
13558
13559fi
13560fi
13561
13562### Construct the library-subsets, if any, from this set of keywords:
13563### none, base, ext_funcs, ext_tinfo, termlib, widechar (see CF_LIB_RULES).
13564echo "$as_me:13564: checking for library subsets" >&5
13565echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
13566if test "$with_termlib" != no ; then
13567	LIB_SUBSETS="termlib"
13568	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
13569	LIB_SUBSETS="${LIB_SUBSETS} "
13570else
13571	LIB_SUBSETS="termlib+"
13572	test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}ext_tinfo+"
13573fi
13574LIB_SUBSETS="${LIB_SUBSETS}base"
13575test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
13576test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
13577echo "$as_me:13577: result: $LIB_SUBSETS" >&5
13578echo "${ECHO_T}$LIB_SUBSETS" >&6
13579
13580### Construct the list of include-directories to be generated
13581
13582CPPFLAGS="-I. -I../include $CPPFLAGS"
13583if test "$srcdir" != "."; then
13584	CPPFLAGS="-I\$(srcdir)/../include $CPPFLAGS"
13585fi
13586if test "$GCC" != yes; then
13587	CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13588elif test "$includedir" != "/usr/include"; then
13589	if test "$includedir" = '${prefix}/include' ; then
13590		if test $prefix != /usr ; then
13591			CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13592		fi
13593	else
13594		CPPFLAGS="$CPPFLAGS -I\$(includedir)"
13595	fi
13596fi
13597
13598ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
13599if test "$srcdir" != "."; then
13600	ACPPFLAGS="-I\$(srcdir)/../../include $ACPPFLAGS"
13601fi
13602if test "$GCC" != yes; then
13603	ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13604elif test "$includedir" != "/usr/include"; then
13605	if test "$includedir" = '${prefix}/include' ; then
13606		if test $prefix != /usr ; then
13607			ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13608		fi
13609	else
13610		ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
13611	fi
13612fi
13613
13614### Build up pieces for makefile rules
13615echo "$as_me:13615: checking default library suffix" >&5
13616echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
13617
13618	case $DFT_LWR_MODEL in
13619	libtool) DFT_ARG_SUFFIX=''   ;;
13620	normal)  DFT_ARG_SUFFIX=''   ;;
13621	debug)   DFT_ARG_SUFFIX='_g' ;;
13622	profile) DFT_ARG_SUFFIX='_p' ;;
13623	shared)  DFT_ARG_SUFFIX=''   ;;
13624	esac
13625	test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
13626echo "$as_me:13626: result: $DFT_ARG_SUFFIX" >&5
13627echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
13628
13629echo "$as_me:13629: checking default library-dependency suffix" >&5
13630echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
13631
13632	case $DFT_LWR_MODEL in
13633	libtool) DFT_DEP_SUFFIX='.la'  ;;
13634	normal)  DFT_DEP_SUFFIX='.a'   ;;
13635	debug)   DFT_DEP_SUFFIX='_g.a' ;;
13636	profile) DFT_DEP_SUFFIX='_p.a' ;;
13637	shared)
13638		case $cf_cv_system_name in
13639		cygwin*) DFT_DEP_SUFFIX='.dll' ;;
13640		darwin*) DFT_DEP_SUFFIX='.dylib' ;;
13641		hpux*)
13642			case $target in
13643			ia64*)	DFT_DEP_SUFFIX='.so' ;;
13644			*)	DFT_DEP_SUFFIX='.sl' ;;
13645			esac
13646			;;
13647		*)	DFT_DEP_SUFFIX='.so'  ;;
13648		esac
13649	esac
13650	test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
13651if test $DFT_LWR_MODEL = shared ; then
13652	case $cf_cv_system_name in #(vi
13653	cygwin*)
13654		DFT_DEP_SUFFIX=".dll.a"
13655		;;
13656	esac
13657fi
13658echo "$as_me:13658: result: $DFT_DEP_SUFFIX" >&5
13659echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
13660
13661echo "$as_me:13661: checking default object directory" >&5
13662echo $ECHO_N "checking default object directory... $ECHO_C" >&6
13663
13664	case $DFT_LWR_MODEL in
13665	libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
13666	normal)  DFT_OBJ_SUBDIR='objects' ;;
13667	debug)   DFT_OBJ_SUBDIR='obj_g' ;;
13668	profile) DFT_OBJ_SUBDIR='obj_p' ;;
13669	shared)
13670		case $cf_cv_system_name in #(vi
13671		cygwin) #(vi
13672			DFT_OBJ_SUBDIR='objects' ;;
13673		*)
13674			DFT_OBJ_SUBDIR='obj_s' ;;
13675		esac
13676	esac
13677echo "$as_me:13677: result: $DFT_OBJ_SUBDIR" >&5
13678echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
13679
13680# libtool thinks it can make c++ shared libraries (perhaps only g++)
13681if test "$cf_with_cxx" = yes ; then
13682echo "$as_me:13682: checking c++ library-dependency suffix" >&5
13683echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
13684if test "$with_libtool" != "no"; then
13685	CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
13686else
13687
13688	case normal in
13689	libtool) CXX_LIB_SUFFIX='.la'  ;;
13690	normal)  CXX_LIB_SUFFIX='.a'   ;;
13691	debug)   CXX_LIB_SUFFIX='_g.a' ;;
13692	profile) CXX_LIB_SUFFIX='_p.a' ;;
13693	shared)
13694		case $cf_cv_system_name in
13695		cygwin*) CXX_LIB_SUFFIX='.dll' ;;
13696		darwin*) CXX_LIB_SUFFIX='.dylib' ;;
13697		hpux*)
13698			case $target in
13699			ia64*)	CXX_LIB_SUFFIX='.so' ;;
13700			*)	CXX_LIB_SUFFIX='.sl' ;;
13701			esac
13702			;;
13703		*)	CXX_LIB_SUFFIX='.so'  ;;
13704		esac
13705	esac
13706	test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
13707fi
13708echo "$as_me:13708: result: $CXX_LIB_SUFFIX" >&5
13709echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
13710
13711fi
13712
13713### Set up low-level terminfo dependencies for makefiles.
13714TINFO_LIST="$SHLIB_LIST"
13715if test "$with_termlib" != no ; then
13716
13717	if test "$with_termlib" != yes ; then
13718		TINFO_NAME=$with_termlib
13719		TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
13720		TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
13721		TINFO_LIB_SUFFIX="${with_termlib}"
13722	else
13723		TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
13724		TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
13725		TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
13726	fi
13727
13728	TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
13729	TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
13730	if test "$DFT_LWR_MODEL" = "libtool"; then
13731		TEST_ARGS="${TEST_DEPS}"
13732		TEST_ARG2="${TEST_DEP2}"
13733		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
13734	else
13735		TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
13736		TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
13737		TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
13738		SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
13739	fi
13740else
13741	TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
13742fi
13743
13744# needed for Ada95
13745TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
13746
13747echo "$as_me:13747: checking where we will install curses.h" >&5
13748echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
13749test "$with_overwrite" = no && \
13750test "x$includedir" = 'x${prefix}/include' && \
13751	includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
13752echo "$as_me:13752: result: $includedir" >&5
13753echo "${ECHO_T}$includedir" >&6
13754
13755### Resolve a conflict between normal and wide-curses by forcing applications
13756### that will need libutf8 to add it to their configure script.
13757if test "$with_overwrite" != no ; then
13758if test "$NCURSES_LIBUTF8" = 1 ; then
13759	NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
13760	{ echo "$as_me:13760: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
13761echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
13762fi
13763fi
13764
13765### predefined stuff for the test programs
13766cat >>confdefs.h <<\EOF
13767#define HAVE_SLK_COLOR 1
13768EOF
13769
13770### Construct the list of subdirectories for which we'll customize makefiles
13771### with the appropriate compile-rules.
13772
13773echo "$as_me:13773: checking for src modules" >&5
13774echo $ECHO_N "checking for src modules... $ECHO_C" >&6
13775
13776# dependencies and linker-arguments for test-programs
13777TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
13778TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
13779if test "$DFT_LWR_MODEL" = "libtool"; then
13780	TEST_ARGS="${TEST_DEPS}"
13781	TEST_ARG2="${TEST_DEP2}"
13782else
13783	TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
13784	TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
13785fi
13786
13787cf_cv_src_modules=
13788for cf_dir in $modules_to_build
13789do
13790	if test -f $srcdir/$cf_dir/modules; then
13791
13792		# We may/may not have tack in the distribution, though the
13793		# makefile is.
13794		if test $cf_dir = tack ; then
13795			if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
13796				continue
13797			fi
13798		fi
13799
13800		if test -z "$cf_cv_src_modules"; then
13801			cf_cv_src_modules=$cf_dir
13802		else
13803			cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
13804		fi
13805
13806		# Make the ncurses_cfg.h file record the library interface files as
13807		# well.  These are header files that are the same name as their
13808		# directory.  Ncurses is the only library that does not follow
13809		# that pattern.
13810		if test $cf_dir = tack ; then
13811			continue
13812		elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
13813
13814cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13815
13816			cat >>confdefs.h <<EOF
13817#define HAVE_${cf_have_include}_H 1
13818EOF
13819
13820			cat >>confdefs.h <<EOF
13821#define HAVE_LIB${cf_have_include} 1
13822EOF
13823
13824			TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
13825			TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
13826			if test "$DFT_LWR_MODEL" = "libtool"; then
13827				TEST_ARGS="${TEST_DEPS}"
13828				TEST_ARG2="${TEST_DEP2}"
13829			else
13830				TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
13831				TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
13832			fi
13833		fi
13834	fi
13835done
13836echo "$as_me:13836: result: $cf_cv_src_modules" >&5
13837echo "${ECHO_T}$cf_cv_src_modules" >&6
13838
13839TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
13840TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
13841
13842SRC_SUBDIRS="man include"
13843for cf_dir in $cf_cv_src_modules
13844do
13845	SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
13846done
13847SRC_SUBDIRS="$SRC_SUBDIRS test"
13848test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
13849test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
13850
13851ADA_SUBDIRS=
13852if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
13853   SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
13854   ADA_SUBDIRS="gen src samples"
13855fi
13856
13857SUB_MAKEFILES=
13858for cf_dir in $SRC_SUBDIRS
13859do
13860	SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
13861done
13862
13863if test -n "$ADA_SUBDIRS"; then
13864   for cf_dir in $ADA_SUBDIRS
13865   do
13866      SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
13867   done
13868
13869fi
13870
13871DIRS_TO_MAKE="lib"
13872for cf_item in $cf_list_models
13873do
13874
13875	case $cf_item in
13876	libtool) cf_subdir='obj_lo'  ;;
13877	normal)  cf_subdir='objects' ;;
13878	debug)   cf_subdir='obj_g' ;;
13879	profile) cf_subdir='obj_p' ;;
13880	shared)
13881		case $cf_cv_system_name in #(vi
13882		cygwin) #(vi
13883			cf_subdir='objects' ;;
13884		*)
13885			cf_subdir='obj_s' ;;
13886		esac
13887	esac
13888
13889	for cf_item2 in $DIRS_TO_MAKE
13890	do
13891		test $cf_item2 = $cf_subdir && break
13892	done
13893	test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
13894done
13895for cf_dir in $DIRS_TO_MAKE
13896do
13897	test ! -d $cf_dir && mkdir $cf_dir
13898done
13899
13900cat >>confdefs.h <<EOF
13901#define NCURSES_PATHSEP '$PATHSEP'
13902EOF
13903
13904cat >>confdefs.h <<EOF
13905#define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
13906EOF
13907
13908### Now that we're done running tests, add the compiler-warnings, if any
13909
13910cf_fix_cppflags=no
13911cf_new_cflags=
13912cf_new_cppflags=
13913cf_new_extra_cppflags=
13914
13915for cf_add_cflags in $EXTRA_CFLAGS
13916do
13917case $cf_fix_cppflags in
13918no)
13919	case $cf_add_cflags in #(vi
13920	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13921		case $cf_add_cflags in
13922		-D*)
13923			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13924
13925			test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13926			&& test -z "${cf_tst_cflags}" \
13927			&& cf_fix_cppflags=yes
13928
13929			if test $cf_fix_cppflags = yes ; then
13930				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13931				continue
13932			elif test "${cf_tst_cflags}" = "\"'" ; then
13933				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13934				continue
13935			fi
13936			;;
13937		esac
13938		case "$CPPFLAGS" in
13939		*$cf_add_cflags) #(vi
13940			;;
13941		*) #(vi
13942			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13943			;;
13944		esac
13945		;;
13946	*)
13947		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13948		;;
13949	esac
13950	;;
13951yes)
13952	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13953
13954	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13955
13956	test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13957	&& test -z "${cf_tst_cflags}" \
13958	&& cf_fix_cppflags=no
13959	;;
13960esac
13961done
13962
13963if test -n "$cf_new_cflags" ; then
13964
13965	CFLAGS="$CFLAGS $cf_new_cflags"
13966fi
13967
13968if test -n "$cf_new_cppflags" ; then
13969
13970	CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
13971fi
13972
13973if test -n "$cf_new_extra_cppflags" ; then
13974
13975	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13976fi
13977
13978################################################################################
13979test "$use_database" = yes && SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
13980ac_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"
13981ac_config_commands="$ac_config_commands default"
13982cat >confcache <<\_ACEOF
13983# This file is a shell script that caches the results of configure
13984# tests run on this system so they can be shared between configure
13985# scripts and configure runs, see configure's option --config-cache.
13986# It is not useful on other systems.  If it contains results you don't
13987# want to keep, you may remove or edit it.
13988#
13989# config.status only pays attention to the cache file if you give it
13990# the --recheck option to rerun configure.
13991#
13992# `ac_cv_env_foo' variables (set or unset) will be overriden when
13993# loading this file, other *unset* `ac_cv_foo' will be assigned the
13994# following values.
13995
13996_ACEOF
13997
13998# The following way of writing the cache mishandles newlines in values,
13999# but we know of no workaround that is simple, portable, and efficient.
14000# So, don't put newlines in cache variables' values.
14001# Ultrix sh set writes to stderr and can't be redirected directly,
14002# and sets the high bit in the cache file unless we assign to the vars.
14003{
14004  (set) 2>&1 |
14005    case `(ac_space=' '; set | grep ac_space) 2>&1` in
14006    *ac_space=\ *)
14007      # `set' does not quote correctly, so add quotes (double-quote
14008      # substitution turns \\\\ into \\, and sed turns \\ into \).
14009      sed -n \
14010        "s/'/'\\\\''/g;
14011    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
14012      ;;
14013    *)
14014      # `set' quotes correctly as required by POSIX, so do not add quotes.
14015      sed -n \
14016        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
14017      ;;
14018    esac;
14019} |
14020  sed '
14021     t clear
14022     : clear
14023     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
14024     t end
14025     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
14026     : end' >>confcache
14027if cmp -s $cache_file confcache; then :; else
14028  if test -w $cache_file; then
14029    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
14030    cat confcache >$cache_file
14031  else
14032    echo "not updating unwritable cache $cache_file"
14033  fi
14034fi
14035rm -f confcache
14036
14037test "x$prefix" = xNONE && prefix=$ac_default_prefix
14038# Let make expand exec_prefix.
14039test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14040
14041# VPATH may cause trouble with some makes, so we remove $(srcdir),
14042# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
14043# trailing colons and then remove the whole line if VPATH becomes empty
14044# (actually we leave an empty line to preserve line numbers).
14045if test "x$srcdir" = x.; then
14046  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
14047s/:*\$(srcdir):*/:/;
14048s/:*\${srcdir}:*/:/;
14049s/:*@srcdir@:*/:/;
14050s/^\([^=]*=[ 	]*\):*/\1/;
14051s/:*$//;
14052s/^[^=]*=[ 	]*$//;
14053}'
14054fi
14055
14056DEFS=-DHAVE_CONFIG_H
14057
14058: ${CONFIG_STATUS=./config.status}
14059ac_clean_files_save=$ac_clean_files
14060ac_clean_files="$ac_clean_files $CONFIG_STATUS"
14061{ echo "$as_me:14061: creating $CONFIG_STATUS" >&5
14062echo "$as_me: creating $CONFIG_STATUS" >&6;}
14063cat >$CONFIG_STATUS <<_ACEOF
14064#! $SHELL
14065# Generated automatically by configure.
14066# Run this file to recreate the current configuration.
14067# Compiler output produced by configure, useful for debugging
14068# configure, is in config.log if it exists.
14069
14070debug=false
14071SHELL=\${CONFIG_SHELL-$SHELL}
14072ac_cs_invocation="\$0 \$@"
14073
14074_ACEOF
14075
14076cat >>$CONFIG_STATUS <<\_ACEOF
14077# Be Bourne compatible
14078if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
14079  emulate sh
14080  NULLCMD=:
14081elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
14082  set -o posix
14083fi
14084
14085# Name of the executable.
14086as_me=`echo "$0" |sed 's,.*[\\/],,'`
14087
14088if expr a : '\(a\)' >/dev/null 2>&1; then
14089  as_expr=expr
14090else
14091  as_expr=false
14092fi
14093
14094rm -f conf$$ conf$$.exe conf$$.file
14095echo >conf$$.file
14096if ln -s conf$$.file conf$$ 2>/dev/null; then
14097  # We could just check for DJGPP; but this test a) works b) is more generic
14098  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
14099  if test -f conf$$.exe; then
14100    # Don't use ln at all; we don't have any links
14101    as_ln_s='cp -p'
14102  else
14103    as_ln_s='ln -s'
14104  fi
14105elif ln conf$$.file conf$$ 2>/dev/null; then
14106  as_ln_s=ln
14107else
14108  as_ln_s='cp -p'
14109fi
14110rm -f conf$$ conf$$.exe conf$$.file
14111
14112as_executable_p="test -f"
14113
14114# Support unset when possible.
14115if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
14116  as_unset=unset
14117else
14118  as_unset=false
14119fi
14120
14121# NLS nuisances.
14122$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
14123$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
14124$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
14125$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
14126$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
14127$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
14128$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
14129$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
14130
14131# IFS
14132# We need space, tab and new line, in precisely that order.
14133as_nl='
14134'
14135IFS=" 	$as_nl"
14136
14137# CDPATH.
14138$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
14139
14140exec 6>&1
14141
14142_ACEOF
14143
14144# Files that config.status was made for.
14145if test -n "$ac_config_files"; then
14146  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
14147fi
14148
14149if test -n "$ac_config_headers"; then
14150  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
14151fi
14152
14153if test -n "$ac_config_links"; then
14154  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
14155fi
14156
14157if test -n "$ac_config_commands"; then
14158  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
14159fi
14160
14161cat >>$CONFIG_STATUS <<\EOF
14162
14163ac_cs_usage="\
14164\`$as_me' instantiates files from templates according to the
14165current configuration.
14166
14167Usage: $0 [OPTIONS] [FILE]...
14168
14169  -h, --help       print this help, then exit
14170  -V, --version    print version number, then exit
14171  -d, --debug      don't remove temporary files
14172      --recheck    update $as_me by reconfiguring in the same conditions
14173  --file=FILE[:TEMPLATE]
14174                   instantiate the configuration file FILE
14175  --header=FILE[:TEMPLATE]
14176                   instantiate the configuration header FILE
14177
14178Configuration files:
14179$config_files
14180
14181Configuration headers:
14182$config_headers
14183
14184Configuration commands:
14185$config_commands
14186
14187Report bugs to <bug-autoconf@gnu.org>."
14188EOF
14189
14190cat >>$CONFIG_STATUS <<EOF
14191ac_cs_version="\\
14192config.status
14193configured by $0, generated by GNU Autoconf 2.52.20030208,
14194  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
14195
14196Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
14197Free Software Foundation, Inc.
14198This config.status script is free software; the Free Software Foundation
14199gives unlimited permission to copy, distribute and modify it."
14200srcdir=$srcdir
14201INSTALL="$INSTALL"
14202EOF
14203
14204cat >>$CONFIG_STATUS <<\EOF
14205# If no file are specified by the user, then we need to provide default
14206# value.  By we need to know if files were specified by the user.
14207ac_need_defaults=:
14208while test $# != 0
14209do
14210  case $1 in
14211  --*=*)
14212    ac_option=`expr "x$1" : 'x\([^=]*\)='`
14213    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
14214    shift
14215    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
14216    shift
14217    ;;
14218  -*);;
14219  *) # This is not an option, so the user has probably given explicit
14220     # arguments.
14221     ac_need_defaults=false;;
14222  esac
14223
14224  case $1 in
14225  # Handling of the options.
14226EOF
14227cat >>$CONFIG_STATUS <<EOF
14228  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14229    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
14230    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
14231EOF
14232cat >>$CONFIG_STATUS <<\EOF
14233  --version | --vers* | -V )
14234    echo "$ac_cs_version"; exit 0 ;;
14235  --he | --h)
14236    # Conflict between --help and --header
14237    { { echo "$as_me:14237: error: ambiguous option: $1
14238Try \`$0 --help' for more information." >&5
14239echo "$as_me: error: ambiguous option: $1
14240Try \`$0 --help' for more information." >&2;}
14241   { (exit 1); exit 1; }; };;
14242  --help | --hel | -h )
14243    echo "$ac_cs_usage"; exit 0 ;;
14244  --debug | --d* | -d )
14245    debug=: ;;
14246  --file | --fil | --fi | --f )
14247    shift
14248    CONFIG_FILES="$CONFIG_FILES $1"
14249    ac_need_defaults=false;;
14250  --header | --heade | --head | --hea )
14251    shift
14252    CONFIG_HEADERS="$CONFIG_HEADERS $1"
14253    ac_need_defaults=false;;
14254
14255  # This is an error.
14256  -*) { { echo "$as_me:14256: error: unrecognized option: $1
14257Try \`$0 --help' for more information." >&5
14258echo "$as_me: error: unrecognized option: $1
14259Try \`$0 --help' for more information." >&2;}
14260   { (exit 1); exit 1; }; } ;;
14261
14262  *) ac_config_targets="$ac_config_targets $1" ;;
14263
14264  esac
14265  shift
14266done
14267
14268exec 5>>config.log
14269cat >&5 << _ACEOF
14270
14271## ----------------------- ##
14272## Running config.status.  ##
14273## ----------------------- ##
14274
14275This file was extended by $as_me 2.52.20030208, executed with
14276  CONFIG_FILES    = $CONFIG_FILES
14277  CONFIG_HEADERS  = $CONFIG_HEADERS
14278  CONFIG_LINKS    = $CONFIG_LINKS
14279  CONFIG_COMMANDS = $CONFIG_COMMANDS
14280  > $ac_cs_invocation
14281on `(hostname || uname -n) 2>/dev/null | sed 1q`
14282
14283_ACEOF
14284EOF
14285
14286cat >>$CONFIG_STATUS <<EOF
14287#
14288# INIT-COMMANDS section.
14289#
14290
14291### Special initialization commands, used to pass information from the
14292### configuration-run into config.status
14293
14294AWK="$AWK"
14295CF_LIST_MODELS="$cf_list_models"
14296DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
14297DFT_LWR_MODEL="$DFT_LWR_MODEL"
14298LDCONFIG="$LDCONFIG"
14299LIB_NAME="$LIB_NAME"
14300LIB_SUBSETS="$LIB_SUBSETS"
14301LIB_SUFFIX="$LIB_SUFFIX"
14302LIB_TRACING="$LIB_TRACING"
14303MAKE_TERMINFO="$MAKE_TERMINFO"
14304NCURSES_OSPEED="$NCURSES_OSPEED"
14305SRC_SUBDIRS="$SRC_SUBDIRS"
14306TERMINFO="$TERMINFO"
14307TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
14308TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
14309TINFO_NAME="$TINFO_NAME"
14310WITH_CURSES_H="$with_curses_h"
14311WITH_ECHO="$with_echo"
14312WITH_OVERWRITE="$with_overwrite"
14313cf_cv_abi_version="$cf_cv_abi_version"
14314cf_cv_do_symlinks="$cf_cv_do_symlinks"
14315cf_cv_enable_lp64="$cf_cv_enable_lp64"
14316cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
14317cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
14318cf_cv_rel_version="$cf_cv_rel_version"
14319cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
14320cf_cv_shlib_version="$cf_cv_shlib_version"
14321cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
14322cf_cv_system_name="$cf_cv_system_name"
14323cf_with_cxx_binding="$cf_with_cxx_binding"
14324host="$host"
14325target="$target"
14326
14327EOF
14328
14329cat >>$CONFIG_STATUS <<\EOF
14330for ac_config_target in $ac_config_targets
14331do
14332  case "$ac_config_target" in
14333  # Handling of arguments.
14334  "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
14335  "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
14336  "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
14337  "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
14338  "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
14339  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14340  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
14341  "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
14342  *) { { echo "$as_me:14342: error: invalid argument: $ac_config_target" >&5
14343echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
14344   { (exit 1); exit 1; }; };;
14345  esac
14346done
14347
14348# If the user did not use the arguments to specify the items to instantiate,
14349# then the envvar interface is used.  Set only those that are not.
14350# We use the long form for the default assignment because of an extremely
14351# bizarre bug on SunOS 4.1.3.
14352if $ac_need_defaults; then
14353  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14354  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14355  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14356fi
14357
14358# Create a temporary directory, and hook for its removal unless debugging.
14359$debug ||
14360{
14361  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
14362  trap '{ (exit 1); exit 1; }' 1 2 13 15
14363}
14364
14365# Create a (secure) tmp directory for tmp files.
14366: ${TMPDIR=/tmp}
14367{
14368  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
14369  test -n "$tmp" && test -d "$tmp"
14370}  ||
14371{
14372  tmp=$TMPDIR/cs$$-$RANDOM
14373  (umask 077 && mkdir $tmp)
14374} ||
14375{
14376   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
14377   { (exit 1); exit 1; }
14378}
14379
14380EOF
14381
14382cat >>$CONFIG_STATUS <<EOF
14383
14384#
14385# CONFIG_FILES section.
14386#
14387
14388# No need to generate the scripts if there are no CONFIG_FILES.
14389# This happens for instance when ./config.status config.h
14390if test -n "\$CONFIG_FILES"; then
14391  # Protect against being on the right side of a sed subst in config.status.
14392  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
14393   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
14394s,@SHELL@,$SHELL,;t t
14395s,@exec_prefix@,$exec_prefix,;t t
14396s,@prefix@,$prefix,;t t
14397s,@program_transform_name@,$program_transform_name,;t t
14398s,@bindir@,$bindir,;t t
14399s,@sbindir@,$sbindir,;t t
14400s,@libexecdir@,$libexecdir,;t t
14401s,@datadir@,$datadir,;t t
14402s,@sysconfdir@,$sysconfdir,;t t
14403s,@sharedstatedir@,$sharedstatedir,;t t
14404s,@localstatedir@,$localstatedir,;t t
14405s,@libdir@,$libdir,;t t
14406s,@includedir@,$includedir,;t t
14407s,@oldincludedir@,$oldincludedir,;t t
14408s,@infodir@,$infodir,;t t
14409s,@mandir@,$mandir,;t t
14410s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
14411s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
14412s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
14413s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
14414s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
14415s,@build_alias@,$build_alias,;t t
14416s,@host_alias@,$host_alias,;t t
14417s,@target_alias@,$target_alias,;t t
14418s,@ECHO_C@,$ECHO_C,;t t
14419s,@ECHO_N@,$ECHO_N,;t t
14420s,@ECHO_T@,$ECHO_T,;t t
14421s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
14422s,@DEFS@,$DEFS,;t t
14423s,@LIBS@,$LIBS,;t t
14424s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
14425s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
14426s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
14427s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
14428s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
14429s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
14430s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
14431s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
14432s,@build@,$build,;t t
14433s,@build_cpu@,$build_cpu,;t t
14434s,@build_vendor@,$build_vendor,;t t
14435s,@build_os@,$build_os,;t t
14436s,@host@,$host,;t t
14437s,@host_cpu@,$host_cpu,;t t
14438s,@host_vendor@,$host_vendor,;t t
14439s,@host_os@,$host_os,;t t
14440s,@target@,$target,;t t
14441s,@target_cpu@,$target_cpu,;t t
14442s,@target_vendor@,$target_vendor,;t t
14443s,@target_os@,$target_os,;t t
14444s,@CC@,$CC,;t t
14445s,@CFLAGS@,$CFLAGS,;t t
14446s,@LDFLAGS@,$LDFLAGS,;t t
14447s,@CPPFLAGS@,$CPPFLAGS,;t t
14448s,@ac_ct_CC@,$ac_ct_CC,;t t
14449s,@EXEEXT@,$EXEEXT,;t t
14450s,@OBJEXT@,$OBJEXT,;t t
14451s,@CPP@,$CPP,;t t
14452s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
14453s,@PROG_EXT@,$PROG_EXT,;t t
14454s,@LDCONFIG@,$LDCONFIG,;t t
14455s,@CXX@,$CXX,;t t
14456s,@CXXFLAGS@,$CXXFLAGS,;t t
14457s,@ac_ct_CXX@,$ac_ct_CXX,;t t
14458s,@AWK@,$AWK,;t t
14459s,@SET_MAKE@,$SET_MAKE,;t t
14460s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
14461s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
14462s,@INSTALL_DATA@,$INSTALL_DATA,;t t
14463s,@LN_S@,$LN_S,;t t
14464s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
14465s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
14466s,@LINT@,$LINT,;t t
14467s,@MAN@,$MAN,;t t
14468s,@LINT_OPTS@,$LINT_OPTS,;t t
14469s,@RANLIB@,$RANLIB,;t t
14470s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
14471s,@LD@,$LD,;t t
14472s,@ac_ct_LD@,$ac_ct_LD,;t t
14473s,@AR@,$AR,;t t
14474s,@ac_ct_AR@,$ac_ct_AR,;t t
14475s,@AR_OPTS@,$AR_OPTS,;t t
14476s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
14477s,@DESTDIR@,$DESTDIR,;t t
14478s,@BUILD_CC@,$BUILD_CC,;t t
14479s,@BUILD_CPP@,$BUILD_CPP,;t t
14480s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
14481s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
14482s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
14483s,@BUILD_LIBS@,$BUILD_LIBS,;t t
14484s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
14485s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
14486s,@cf_list_models@,$cf_list_models,;t t
14487s,@LIBTOOL@,$LIBTOOL,;t t
14488s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
14489s,@LIB_CREATE@,$LIB_CREATE,;t t
14490s,@LIB_OBJECT@,$LIB_OBJECT,;t t
14491s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
14492s,@LIB_PREP@,$LIB_PREP,;t t
14493s,@LIB_CLEAN@,$LIB_CLEAN,;t t
14494s,@LIB_COMPILE@,$LIB_COMPILE,;t t
14495s,@LIB_LINK@,$LIB_LINK,;t t
14496s,@LIB_INSTALL@,$LIB_INSTALL,;t t
14497s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
14498s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
14499s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
14500s,@TINFO_NAME@,$TINFO_NAME,;t t
14501s,@LIB_NAME@,$LIB_NAME,;t t
14502s,@LIB_PREFIX@,$LIB_PREFIX,;t t
14503s,@CC_G_OPT@,$CC_G_OPT,;t t
14504s,@CXX_G_OPT@,$CXX_G_OPT,;t t
14505s,@LD_MODEL@,$LD_MODEL,;t t
14506s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
14507s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
14508s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
14509s,@LINK_PROGS@,$LINK_PROGS,;t t
14510s,@LINK_TESTS@,$LINK_TESTS,;t t
14511s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
14512s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
14513s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
14514s,@INSTALL_LIB@,$INSTALL_LIB,;t t
14515s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
14516s,@PATHSEP@,$PATHSEP,;t t
14517s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
14518s,@WHICH_XTERM@,$WHICH_XTERM,;t t
14519s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
14520s,@TERMINFO@,$TERMINFO,;t t
14521s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
14522s,@TERMPATH@,$TERMPATH,;t t
14523s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
14524s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
14525s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
14526s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
14527s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
14528s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
14529s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
14530s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
14531s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
14532s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
14533s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
14534s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
14535s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
14536s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
14537s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
14538s,@NCURSES_CONST@,$NCURSES_CONST,;t t
14539s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
14540s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
14541s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
14542s,@ECHO_LINK@,$ECHO_LINK,;t t
14543s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
14544s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
14545s,@ADA_TRACE@,$ADA_TRACE,;t t
14546s,@MATH_LIB@,$MATH_LIB,;t t
14547s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
14548s,@cf_cv_1UL@,$cf_cv_1UL,;t t
14549s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
14550s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
14551s,@CXXCPP@,$CXXCPP,;t t
14552s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
14553s,@CXX_AR@,$CXX_AR,;t t
14554s,@CXX_AR_OPTS@,$CXX_AR_OPTS,;t t
14555s,@CXXLIBS@,$CXXLIBS,;t t
14556s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
14557s,@gnat_exists@,$gnat_exists,;t t
14558s,@M4_exists@,$M4_exists,;t t
14559s,@cf_ada_make@,$cf_ada_make,;t t
14560s,@cf_ada_compiler@,$cf_ada_compiler,;t t
14561s,@cf_ada_package@,$cf_ada_package,;t t
14562s,@ADAFLAGS@,$ADAFLAGS,;t t
14563s,@cf_compile_generics@,$cf_compile_generics,;t t
14564s,@cf_generic_objects@,$cf_generic_objects,;t t
14565s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
14566s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
14567s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
14568s,@ACPPFLAGS@,$ACPPFLAGS,;t t
14569s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
14570s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
14571s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
14572s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
14573s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
14574s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
14575s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
14576s,@TINFO_ARGS@,$TINFO_ARGS,;t t
14577s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
14578s,@TINFO_LIST@,$TINFO_LIST,;t t
14579s,@SHLIB_LIST@,$SHLIB_LIST,;t t
14580s,@TEST_ARGS@,$TEST_ARGS,;t t
14581s,@TEST_DEPS@,$TEST_DEPS,;t t
14582s,@TEST_ARG2@,$TEST_ARG2,;t t
14583s,@TEST_DEP2@,$TEST_DEP2,;t t
14584s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
14585s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
14586CEOF
14587
14588EOF
14589
14590  cat >>$CONFIG_STATUS <<\EOF
14591  # Split the substitutions into bite-sized pieces for seds with
14592  # small command number limits, like on Digital OSF/1 and HP-UX.
14593  ac_max_sed_lines=48
14594  ac_sed_frag=1 # Number of current file.
14595  ac_beg=1 # First line for current file.
14596  ac_end=$ac_max_sed_lines # Line after last line for current file.
14597  ac_more_lines=:
14598  ac_sed_cmds=
14599  while $ac_more_lines; do
14600    if test $ac_beg -gt 1; then
14601      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14602    else
14603      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
14604    fi
14605    if test ! -s $tmp/subs.frag; then
14606      ac_more_lines=false
14607    else
14608      # The purpose of the label and of the branching condition is to
14609      # speed up the sed processing (if there are no `@' at all, there
14610      # is no need to browse any of the substitutions).
14611      # These are the two extra sed commands mentioned above.
14612      (echo ':t
14613  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
14614      if test -z "$ac_sed_cmds"; then
14615  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
14616      else
14617  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
14618      fi
14619      ac_sed_frag=`expr $ac_sed_frag + 1`
14620      ac_beg=$ac_end
14621      ac_end=`expr $ac_end + $ac_max_sed_lines`
14622    fi
14623  done
14624  if test -z "$ac_sed_cmds"; then
14625    ac_sed_cmds=cat
14626  fi
14627fi # test -n "$CONFIG_FILES"
14628
14629EOF
14630cat >>$CONFIG_STATUS <<\EOF
14631for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
14632  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14633  case $ac_file in
14634  - | *:- | *:-:* ) # input from stdin
14635        cat >$tmp/stdin
14636        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14637        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14638  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14639        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14640  * )   ac_file_in=$ac_file.in ;;
14641  esac
14642
14643  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
14644  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14645         X"$ac_file" : 'X\(//\)[^/]' \| \
14646         X"$ac_file" : 'X\(//\)$' \| \
14647         X"$ac_file" : 'X\(/\)' \| \
14648         .     : '\(.\)' 2>/dev/null ||
14649echo X"$ac_file" |
14650    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14651  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14652  	  /^X\(\/\/\)$/{ s//\1/; q; }
14653  	  /^X\(\/\).*/{ s//\1/; q; }
14654  	  s/.*/./; q'`
14655  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14656    { case "$ac_dir" in
14657  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14658  *)                      as_incr_dir=.;;
14659esac
14660as_dummy="$ac_dir"
14661for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14662  case $as_mkdir_dir in
14663    # Skip DOS drivespec
14664    ?:) as_incr_dir=$as_mkdir_dir ;;
14665    *)
14666      as_incr_dir=$as_incr_dir/$as_mkdir_dir
14667      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14668    ;;
14669  esac
14670done; }
14671
14672    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
14673    # A "../" for each directory in $ac_dir_suffix.
14674    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
14675  else
14676    ac_dir_suffix= ac_dots=
14677  fi
14678
14679  case $srcdir in
14680  .)  ac_srcdir=.
14681      if test -z "$ac_dots"; then
14682         ac_top_srcdir=.
14683      else
14684         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
14685      fi ;;
14686  [\\/]* | ?:[\\/]* )
14687      ac_srcdir=$srcdir$ac_dir_suffix;
14688      ac_top_srcdir=$srcdir ;;
14689  *) # Relative path.
14690    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
14691    ac_top_srcdir=$ac_dots$srcdir ;;
14692  esac
14693
14694  case $INSTALL in
14695  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
14696  *) ac_INSTALL=$ac_dots$INSTALL ;;
14697  esac
14698
14699  if test x"$ac_file" != x-; then
14700    { echo "$as_me:14700: creating $ac_file" >&5
14701echo "$as_me: creating $ac_file" >&6;}
14702    rm -f "$ac_file"
14703  fi
14704  # Let's still pretend it is `configure' which instantiates (i.e., don't
14705  # use $as_me), people would be surprised to read:
14706  #    /* config.h.  Generated automatically by config.status.  */
14707  configure_input="Generated automatically from `echo $ac_file_in |
14708                                                 sed 's,.*/,,'` by configure."
14709
14710  # First look for the input files in the build tree, otherwise in the
14711  # src tree.
14712  ac_file_inputs=`IFS=:
14713    for f in $ac_file_in; do
14714      case $f in
14715      -) echo $tmp/stdin ;;
14716      [\\/$]*)
14717         # Absolute (can't be DOS-style, as IFS=:)
14718         test -f "$f" || { { echo "$as_me:14718: error: cannot find input file: $f" >&5
14719echo "$as_me: error: cannot find input file: $f" >&2;}
14720   { (exit 1); exit 1; }; }
14721         echo $f;;
14722      *) # Relative
14723         if test -f "$f"; then
14724           # Build tree
14725           echo $f
14726         elif test -f "$srcdir/$f"; then
14727           # Source tree
14728           echo $srcdir/$f
14729         else
14730           # /dev/null tree
14731           { { echo "$as_me:14731: error: cannot find input file: $f" >&5
14732echo "$as_me: error: cannot find input file: $f" >&2;}
14733   { (exit 1); exit 1; }; }
14734         fi;;
14735      esac
14736    done` || { (exit 1); exit 1; }
14737EOF
14738cat >>$CONFIG_STATUS <<EOF
14739  sed "$ac_vpsub
14740$extrasub
14741EOF
14742cat >>$CONFIG_STATUS <<\EOF
14743:t
14744/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
14745s,@configure_input@,$configure_input,;t t
14746s,@srcdir@,$ac_srcdir,;t t
14747s,@top_srcdir@,$ac_top_srcdir,;t t
14748s,@INSTALL@,$ac_INSTALL,;t t
14749" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
14750  rm -f $tmp/stdin
14751  if test x"$ac_file" != x-; then
14752    mv $tmp/out $ac_file
14753  else
14754    cat $tmp/out
14755    rm -f $tmp/out
14756  fi
14757
14758done
14759EOF
14760cat >>$CONFIG_STATUS <<\EOF
14761
14762#
14763# CONFIG_HEADER section.
14764#
14765
14766# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14767# NAME is the cpp macro being defined and VALUE is the value it is being given.
14768#
14769# ac_d sets the value in "#define NAME VALUE" lines.
14770ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
14771ac_dB='[ 	].*$,\1#\2'
14772ac_dC=' '
14773ac_dD=',;t'
14774# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14775ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
14776ac_iB='\([ 	]\),\1#\2define\3'
14777ac_iC=' '
14778ac_iD='\4,;t'
14779# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14780ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
14781ac_uB='$,\1#\2define\3'
14782ac_uC=' '
14783ac_uD=',;t'
14784
14785for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
14786  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14787  case $ac_file in
14788  - | *:- | *:-:* ) # input from stdin
14789        cat >$tmp/stdin
14790        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14791        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14792  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
14793        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
14794  * )   ac_file_in=$ac_file.in ;;
14795  esac
14796
14797  test x"$ac_file" != x- && { echo "$as_me:14797: creating $ac_file" >&5
14798echo "$as_me: creating $ac_file" >&6;}
14799
14800  # First look for the input files in the build tree, otherwise in the
14801  # src tree.
14802  ac_file_inputs=`IFS=:
14803    for f in $ac_file_in; do
14804      case $f in
14805      -) echo $tmp/stdin ;;
14806      [\\/$]*)
14807         # Absolute (can't be DOS-style, as IFS=:)
14808         test -f "$f" || { { echo "$as_me:14808: error: cannot find input file: $f" >&5
14809echo "$as_me: error: cannot find input file: $f" >&2;}
14810   { (exit 1); exit 1; }; }
14811         echo $f;;
14812      *) # Relative
14813         if test -f "$f"; then
14814           # Build tree
14815           echo $f
14816         elif test -f "$srcdir/$f"; then
14817           # Source tree
14818           echo $srcdir/$f
14819         else
14820           # /dev/null tree
14821           { { echo "$as_me:14821: error: cannot find input file: $f" >&5
14822echo "$as_me: error: cannot find input file: $f" >&2;}
14823   { (exit 1); exit 1; }; }
14824         fi;;
14825      esac
14826    done` || { (exit 1); exit 1; }
14827  # Remove the trailing spaces.
14828  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
14829
14830EOF
14831
14832# Transform confdefs.h into a list of #define's.  We won't use it as a sed
14833# script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
14834# be either 'cat' or 'sort'.
14835cat confdefs.h | uniq >conftest.vals
14836
14837# Break up conftest.vals because some shells have a limit on
14838# the size of here documents, and old seds have small limits too.
14839
14840rm -f conftest.tail
14841echo '  rm -f conftest.frag' >> $CONFIG_STATUS
14842while grep . conftest.vals >/dev/null
14843do
14844  # Write chunks of a limited-size here document to conftest.frag.
14845  echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
14846  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14847  echo 'CEOF' >> $CONFIG_STATUS
14848  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14849  rm -f conftest.vals
14850  mv conftest.tail conftest.vals
14851done
14852rm -f conftest.vals
14853
14854# Run sed to substitute the contents of conftest.frag into $tmp/in at the
14855# marker @DEFS@.
14856echo '  cat >> conftest.edit <<CEOF
14857/@DEFS@/r conftest.frag
14858/@DEFS@/d
14859CEOF
14860sed -f conftest.edit $tmp/in > $tmp/out
14861rm -f $tmp/in
14862mv $tmp/out $tmp/in
14863rm -f conftest.edit conftest.frag
14864' >> $CONFIG_STATUS
14865
14866cat >>$CONFIG_STATUS <<\EOF
14867  # Let's still pretend it is `configure' which instantiates (i.e., don't
14868  # use $as_me), people would be surprised to read:
14869  #    /* config.h.  Generated automatically by config.status.  */
14870  if test x"$ac_file" = x-; then
14871    echo "/* Generated automatically by configure.  */" >$tmp/config.h
14872  else
14873    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
14874  fi
14875  cat $tmp/in >>$tmp/config.h
14876  rm -f $tmp/in
14877  if test x"$ac_file" != x-; then
14878    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
14879      { echo "$as_me:14879: $ac_file is unchanged" >&5
14880echo "$as_me: $ac_file is unchanged" >&6;}
14881    else
14882      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14883         X"$ac_file" : 'X\(//\)[^/]' \| \
14884         X"$ac_file" : 'X\(//\)$' \| \
14885         X"$ac_file" : 'X\(/\)' \| \
14886         .     : '\(.\)' 2>/dev/null ||
14887echo X"$ac_file" |
14888    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
14889  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
14890  	  /^X\(\/\/\)$/{ s//\1/; q; }
14891  	  /^X\(\/\).*/{ s//\1/; q; }
14892  	  s/.*/./; q'`
14893      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14894        { case "$ac_dir" in
14895  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
14896  *)                      as_incr_dir=.;;
14897esac
14898as_dummy="$ac_dir"
14899for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
14900  case $as_mkdir_dir in
14901    # Skip DOS drivespec
14902    ?:) as_incr_dir=$as_mkdir_dir ;;
14903    *)
14904      as_incr_dir=$as_incr_dir/$as_mkdir_dir
14905      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
14906    ;;
14907  esac
14908done; }
14909
14910      fi
14911      rm -f $ac_file
14912      mv $tmp/config.h $ac_file
14913    fi
14914  else
14915    cat $tmp/config.h
14916    rm -f $tmp/config.h
14917  fi
14918done
14919EOF
14920cat >>$CONFIG_STATUS <<\EOF
14921
14922#
14923# CONFIG_COMMANDS section.
14924#
14925for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
14926  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
14927  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
14928
14929  case $ac_dest in
14930    default )
14931
14932	case $cf_cv_system_name in
14933	OS/2*)	LIB_PREFIX=''     ;;
14934	os2*)	LIB_PREFIX=''     ;;
14935	*)	LIB_PREFIX='lib'  ;;
14936	esac
14937cf_prefix=$LIB_PREFIX
14938
14939for cf_dir in $SRC_SUBDIRS
14940do
14941	if test -f $srcdir/$cf_dir/modules; then
14942
14943		IMPORT_LIB=
14944		SHARED_LIB=
14945		LIBS_TO_MAKE=
14946		for cf_item in $CF_LIST_MODELS
14947		do
14948
14949	case $cf_item in
14950	libtool) cf_suffix='.la'  ;;
14951	normal)  cf_suffix='.a'   ;;
14952	debug)   cf_suffix='_g.a' ;;
14953	profile) cf_suffix='_p.a' ;;
14954	shared)
14955		case $cf_cv_system_name in
14956		cygwin*) cf_suffix='.dll' ;;
14957		darwin*) cf_suffix='.dylib' ;;
14958		hpux*)
14959			case $target in
14960			ia64*)	cf_suffix='.so' ;;
14961			*)	cf_suffix='.sl' ;;
14962			esac
14963			;;
14964		*)	cf_suffix='.so'  ;;
14965		esac
14966	esac
14967	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
14968
14969			if test $cf_item = shared ; then
14970			if test "$cf_cv_do_symlinks" = yes ; then
14971				case "$cf_cv_shlib_version" in #(vi
14972				rel) #(vi
14973					case "$cf_cv_system_name" in #(vi
14974					darwin*)
14975					case .${LIB_SUFFIX} in
14976					.w*)
14977						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
14978						cf_suffix=w'.$(REL_VERSION)'"$cf_suffix"
14979						;;
14980					*)
14981						cf_suffix='.$(REL_VERSION)'"$cf_suffix"
14982						;;
14983					esac
14984					;; #(vi
14985					*) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
14986					esac
14987					;;
14988				abi)
14989					case "$cf_cv_system_name" in #(vi
14990					darwin*)
14991					case .${LIB_SUFFIX} in
14992					.w*)
14993						cf_suffix=`echo $cf_suffix | sed 's/^w//'`
14994						cf_suffix=w'.$(ABI_VERSION)'"$cf_suffix"
14995						;;
14996					*)
14997						cf_suffix='.$(ABI_VERSION)'"$cf_suffix"
14998						;;
14999					esac
15000					;; #(vi
15001					*) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
15002					esac
15003					;;
15004				esac
15005			fi
15006			# cygwin needs import library, and has unique naming convention
15007			# use autodetected ${cf_prefix} for import lib and static lib, but
15008			# use 'cyg' prefix for shared lib.
15009			if test $cf_cv_shlib_version = cygdll ; then
15010				SHARED_LIB="../lib/cyg${cf_dir}\$(ABI_VERSION).dll"
15011				IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
15012				LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
15013				continue
15014			fi
15015			fi
15016			LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
15017		done
15018
15019		if test $cf_dir = ncurses ; then
15020			cf_subsets="$LIB_SUBSETS"
15021			cf_termlib=`echo "$cf_subsets" |sed -e 's/ .*$//'`
15022			if test "$cf_termlib" != "$cf_subsets" ; then
15023				cf_item=`echo $LIBS_TO_MAKE |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
15024				LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
15025			fi
15026		else
15027			cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
15028		fi
15029
15030		sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
15031		    -e "s%@IMPORT_LIB@%$IMPORT_LIB%" \
15032		    -e "s%@SHARED_LIB@%$SHARED_LIB%" \
15033			$cf_dir/Makefile >$cf_dir/Makefile.out
15034		mv $cf_dir/Makefile.out $cf_dir/Makefile
15035
15036		$AWK -f $srcdir/mk-0th.awk \
15037			libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
15038			$srcdir/$cf_dir/modules >>$cf_dir/Makefile
15039
15040		for cf_subset in $cf_subsets
15041		do
15042			cf_subdirs=
15043			for cf_item in $CF_LIST_MODELS
15044			do
15045			echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
15046
15047cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15048
15049	case $cf_item in
15050	libtool) cf_suffix='.la'  ;;
15051	normal)  cf_suffix='.a'   ;;
15052	debug)   cf_suffix='_g.a' ;;
15053	profile) cf_suffix='_p.a' ;;
15054	shared)
15055		case $cf_cv_system_name in
15056		cygwin*) cf_suffix='.dll' ;;
15057		darwin*) cf_suffix='.dylib' ;;
15058		hpux*)
15059			case $target in
15060			ia64*)	cf_suffix='.so' ;;
15061			*)	cf_suffix='.sl' ;;
15062			esac
15063			;;
15064		*)	cf_suffix='.so'  ;;
15065		esac
15066	esac
15067	test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
15068
15069	case $cf_item in
15070	libtool) cf_subdir='obj_lo'  ;;
15071	normal)  cf_subdir='objects' ;;
15072	debug)   cf_subdir='obj_g' ;;
15073	profile) cf_subdir='obj_p' ;;
15074	shared)
15075		case $cf_cv_system_name in #(vi
15076		cygwin) #(vi
15077			cf_subdir='objects' ;;
15078		*)
15079			cf_subdir='obj_s' ;;
15080		esac
15081	esac
15082
15083			# Test for case where we build libtinfo with a different name.
15084			cf_libname=$cf_dir
15085			if test $cf_dir = ncurses ; then
15086				case $cf_subset in
15087				*base*)
15088					;;
15089				termlib*)
15090					cf_libname=$TINFO_LIB_SUFFIX
15091					if test -n "${DFT_ARG_SUFFIX}" ; then
15092						# undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
15093						cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
15094					fi
15095				;;
15096				esac
15097			fi
15098
15099			# These dependencies really are for development, not
15100			# builds, but they are useful in porting, too.
15101			cf_depend="../include/ncurses_cfg.h"
15102			if test "$srcdir" = "."; then
15103				cf_reldir="."
15104			else
15105				cf_reldir="\$(srcdir)"
15106			fi
15107
15108			if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
15109				cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
15110			elif test -f $srcdir/$cf_dir/curses.priv.h; then
15111				cf_depend="$cf_depend $cf_reldir/curses.priv.h"
15112			fi
15113
15114 			cf_dir_suffix=
15115 			old_cf_suffix="$cf_suffix"
15116 			if test "$cf_cv_shlib_version_infix" = yes ; then
15117			if test -n "$LIB_SUFFIX" ; then
15118				case $LIB_SUFFIX in
15119				w*)
15120					cf_libname=`echo $cf_libname | sed 's/w$//'`
15121					cf_suffix=`echo $cf_suffix | sed 's/^w//'`
15122					cf_dir_suffix=w
15123					;;
15124				esac
15125			fi
15126 			fi
15127
15128			$AWK -f $srcdir/mk-1st.awk \
15129				name=${cf_libname}${cf_dir_suffix} \
15130				traces=$LIB_TRACING \
15131				MODEL=$cf_ITEM \
15132				model=$cf_subdir \
15133				prefix=$cf_prefix \
15134				suffix=$cf_suffix \
15135				subset=$cf_subset \
15136				ShlibVer=$cf_cv_shlib_version \
15137				ShlibVerInfix=$cf_cv_shlib_version_infix \
15138				DoLinks=$cf_cv_do_symlinks \
15139				rmSoLocs=$cf_cv_rm_so_locs \
15140				ldconfig="$LDCONFIG" \
15141				overwrite=$WITH_OVERWRITE \
15142				depend="$cf_depend" \
15143				host="$host" \
15144				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
15145
15146			cf_suffix="$old_cf_suffix"
15147
15148			for cf_subdir2 in $cf_subdirs lib
15149			do
15150				test $cf_subdir = $cf_subdir2 && break
15151			done
15152			test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
15153			$AWK -f $srcdir/mk-2nd.awk \
15154				name=$cf_dir \
15155				traces=$LIB_TRACING \
15156				MODEL=$cf_ITEM \
15157				model=$cf_subdir \
15158				subset=$cf_subset \
15159				srcdir=$srcdir \
15160				echo=$WITH_ECHO \
15161				crenames=$cf_cv_prog_CC_c_o \
15162				cxxrenames=$cf_cv_prog_CXX_c_o \
15163				$srcdir/$cf_dir/modules >>$cf_dir/Makefile
15164			cf_subdirs="$cf_subdirs $cf_subdir"
15165			done
15166		done
15167	fi
15168
15169	echo '	cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
15170done
15171
15172for cf_dir in $SRC_SUBDIRS
15173do
15174	if test -f $cf_dir/Makefile ; then
15175		case "$cf_dir" in
15176		Ada95) #(vi
15177			echo 'libs \' >> Makefile
15178			echo 'install.libs \' >> Makefile
15179			echo 'uninstall.libs ::' >> Makefile
15180			echo '	cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
15181			;;
15182		esac
15183	fi
15184
15185	if test -f $srcdir/$cf_dir/modules; then
15186		echo >> Makefile
15187		if test -f $srcdir/$cf_dir/headers; then
15188cat >> Makefile <<CF_EOF
15189install.includes \\
15190uninstall.includes \\
15191CF_EOF
15192		fi
15193if test "$cf_dir" != "c++" ; then
15194echo 'lint \' >> Makefile
15195fi
15196cat >> Makefile <<CF_EOF
15197libs \\
15198lintlib \\
15199install.libs \\
15200uninstall.libs \\
15201install.$cf_dir \\
15202uninstall.$cf_dir ::
15203	cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
15204CF_EOF
15205	elif test -f $srcdir/$cf_dir/headers; then
15206cat >> Makefile <<CF_EOF
15207
15208libs \\
15209install.libs \\
15210uninstall.libs \\
15211install.includes \\
15212uninstall.includes ::
15213	cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
15214CF_EOF
15215fi
15216done
15217
15218cat >> Makefile <<CF_EOF
15219
15220install.data \\
15221uninstall.data ::
15222$MAKE_TERMINFO	cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
15223
15224install.man \\
15225uninstall.man ::
15226	cd man && \$(MAKE) \$(CF_MFLAGS) \$@
15227
15228distclean ::
15229	rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
15230	rm -f headers.sh headers.sed
15231	rm -rf \$(DIRS_TO_MAKE)
15232CF_EOF
15233
15234# Special case: tack's manpage lives in its own directory.
15235if test -d tack ; then
15236if test -f $srcdir/$tack.h; then
15237cat >> Makefile <<CF_EOF
15238
15239install.man \\
15240uninstall.man ::
15241	cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
15242CF_EOF
15243fi
15244fi
15245
15246rm -f headers.sed headers.sh
15247
15248echo creating headers.sh
15249cat >headers.sh <<CF_EOF
15250#! /bin/sh
15251# This shell script is generated by the 'configure' script.  It is invoked in a
15252# subdirectory of the build tree.  It generates a sed-script in the parent
15253# directory that is used to adjust includes for header files that reside in a
15254# subdirectory of /usr/include, etc.
15255PRG=""
15256while test \$# != 3
15257do
15258PRG="\$PRG \$1"; shift
15259done
15260DST=\$1
15261REF=\$2
15262SRC=\$3
15263TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
15264TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
15265echo installing \$SRC in \$DST
15266CF_EOF
15267if test $WITH_CURSES_H = yes; then
15268	cat >>headers.sh <<CF_EOF
15269case \$DST in
15270/*/include/*)
15271	END=\`basename \$DST\`
15272	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
15273	do
15274		NAME=\`basename \$i\`
15275		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
15276	done
15277	;;
15278*)
15279	echo "" >> \$TMPSED
15280	;;
15281esac
15282CF_EOF
15283else
15284	cat >>headers.sh <<CF_EOF
15285case \$DST in
15286/*/include/*)
15287	END=\`basename \$DST\`
15288	for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
15289	do
15290		NAME=\`basename \$i\`
15291		if test "\$NAME" = "curses.h"
15292		then
15293			echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
15294			NAME=ncurses.h
15295		fi
15296		echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
15297	done
15298	;;
15299*)
15300	echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
15301	;;
15302esac
15303CF_EOF
15304fi
15305cat >>headers.sh <<CF_EOF
15306rm -f \$TMPSRC
15307sed -f \$TMPSED \$SRC > \$TMPSRC
15308NAME=\`basename \$SRC\`
15309CF_EOF
15310if test $WITH_CURSES_H != yes; then
15311	cat >>headers.sh <<CF_EOF
15312test "\$NAME" = "curses.h" && NAME=ncurses.h
15313CF_EOF
15314fi
15315cat >>headers.sh <<CF_EOF
15316# Just in case someone gzip'd manpages, remove the conflicting copy.
15317test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
15318
15319eval \$PRG \$TMPSRC \$DST/\$NAME
15320rm -f \$TMPSRC \$TMPSED
15321CF_EOF
15322
15323chmod 0755 headers.sh
15324
15325for cf_dir in $SRC_SUBDIRS
15326do
15327	if test -f $srcdir/$cf_dir/headers; then
15328	cat >>$cf_dir/Makefile <<CF_EOF
15329\$(DESTDIR)\$(includedir) :
15330	sh \$(srcdir)/../mkinstalldirs \$@
15331
15332install \\
15333install.libs \\
15334install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
15335CF_EOF
15336		j=""
15337		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15338		do
15339			test -n "$j" && echo "		$j \\" >>$cf_dir/Makefile
15340			j=$i
15341		done
15342		echo "		$j" >>$cf_dir/Makefile
15343		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15344		do
15345			echo "	@ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
15346			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
15347		done
15348
15349	cat >>$cf_dir/Makefile <<CF_EOF
15350
15351uninstall \\
15352uninstall.libs \\
15353uninstall.includes ::
15354CF_EOF
15355		for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
15356		do
15357			i=`basename $i`
15358			echo "	-@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
15359			test $i = curses.h && echo "	-@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
15360		done
15361	fi
15362
15363	if test -f $srcdir/$cf_dir/modules; then
15364		if test "$cf_dir" != "c++" ; then
15365			cat >>$cf_dir/Makefile <<"CF_EOF"
15366depend : $(AUTO_SRC)
15367	makedepend -- $(CPPFLAGS) -- $(C_SRC)
15368
15369# DO NOT DELETE THIS LINE -- make depend depends on it.
15370CF_EOF
15371		fi
15372	fi
15373done
15374
15375 ;;
15376  esac
15377done
15378EOF
15379
15380cat >>$CONFIG_STATUS <<\EOF
15381
15382{ (exit 0); exit 0; }
15383EOF
15384chmod +x $CONFIG_STATUS
15385ac_clean_files=$ac_clean_files_save
15386
15387# configure is writing to config.log, and then calls config.status.
15388# config.status does its own redirection, appending to config.log.
15389# Unfortunately, on DOS this fails, as config.log is still kept open
15390# by configure, so config.status won't be able to write to it; its
15391# output is simply discarded.  So we exec the FD to /dev/null,
15392# effectively closing config.log, so it can be properly (re)opened and
15393# appended to by config.status.  When coming back to configure, we
15394# need to make the FD available again.
15395if test "$no_create" != yes; then
15396  ac_cs_success=:
15397  exec 5>/dev/null
15398  $SHELL $CONFIG_STATUS || ac_cs_success=false
15399  exec 5>>config.log
15400  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15401  # would make configure fail if this is the last instruction.
15402  $ac_cs_success || { (exit 1); exit 1; }
15403fi
15404${MAKE-make} preinstall
15405